Merge commit 'origin/covariance'
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 21 May 2010 10:22:51 +0000 (12:22 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 21 May 2010 10:22:51 +0000 (12:22 +0200)
Conflicts:

src/data/dictionary.c
src/language/stats/correlations.c
src/language/stats/regression.q
src/math/automake.mk

706 files changed:
.gitignore
ABOUT-NLS [new file with mode: 0644]
AUTHORS
INSTALL
Makefile.am
NEWS
README
README.Git
Smake
THANKS
TODO [deleted file]
acinclude.m4
config/OChangeLog [deleted file]
config/automake.mk [deleted file]
config/devices [deleted file]
config/psfonts/Courier-Bold.afm [deleted file]
config/psfonts/Courier-BoldOblique.afm [deleted file]
config/psfonts/Courier-Oblique.afm [deleted file]
config/psfonts/Courier.afm [deleted file]
config/psfonts/Helvetica-Bold.afm [deleted file]
config/psfonts/Helvetica-BoldOblique.afm [deleted file]
config/psfonts/Helvetica-Oblique.afm [deleted file]
config/psfonts/Helvetica.afm [deleted file]
config/psfonts/Times-Bold.afm [deleted file]
config/psfonts/Times-BoldItalic.afm [deleted file]
config/psfonts/Times-Italic.afm [deleted file]
config/psfonts/Times-Roman.afm [deleted file]
configure.ac
doc/.gitignore
doc/automake.mk
doc/configuring.texi [deleted file]
doc/data-io.texi
doc/dev/concepts.texi
doc/dev/system-file-format.texi
doc/fdl.texi
doc/introduction.texi
doc/invoking.texi
doc/language.texi
doc/pspp-dev.texinfo
doc/pspp.texinfo
doc/statistics.texi
doc/tutorial.texi
doc/utilities.texi
doc/variables.texi
examples/Makefile.am [deleted file]
glade/automake.mk
glade/psppire.xml
glade/var-view.c [new file with mode: 0644]
lib/automake.mk
lib/gtk-contrib/automake.mk
lib/gtk-contrib/gtk-builder-convert [deleted file]
lib/gtk-contrib/psppire-sheet.c
lib/gtk-contrib/psppire-sheet.h
perl-module/Makefile.PL
perl-module/PSPP.xs
perl-module/README
perl-module/automake.mk
perl-module/lib/PSPP.pm [deleted file]
perl-module/lib/PSPP.pm.in [new file with mode: 0644]
perl-module/t/Pspp.t
po/.gitignore
po/Makefile.in [new file with mode: 0644]
po/Makevars
po/automake.mk
po/ca.po [new file with mode: 0644]
po/en_GB.po
po/es.po [new file with mode: 0644]
po/nl.po
po/pt_BR.po
src/automake.mk
src/data/any-reader.c
src/data/any-reader.h
src/data/automake.mk
src/data/caseproto.c
src/data/caseproto.h
src/data/casereader-project.c [new file with mode: 0644]
src/data/casereader-select.c [new file with mode: 0644]
src/data/casereader-shim.c [new file with mode: 0644]
src/data/casereader-shim.h [new file with mode: 0644]
src/data/casereader-translator.c
src/data/casereader.c
src/data/casereader.h
src/data/casewindow.c
src/data/category.c [deleted file]
src/data/category.h [deleted file]
src/data/data-in.c
src/data/datasheet.c
src/data/dictionary.c
src/data/dictionary.h
src/data/file-name.c
src/data/file-name.h
src/data/gnumeric-reader.c
src/data/make-file.c
src/data/make-file.h
src/data/mrset.c [new file with mode: 0644]
src/data/mrset.h [new file with mode: 0644]
src/data/por-file-reader.c
src/data/procedure.c
src/data/settings.c
src/data/settings.h
src/data/short-names.c
src/data/subcase.c
src/data/subcase.h
src/data/sys-file-reader.c
src/data/sys-file-writer.c
src/data/value-labels.c
src/data/value-labels.h
src/data/value.c
src/data/value.h
src/data/vardict.h
src/data/variable.c
src/data/variable.h
src/language/automake.mk
src/language/command.c
src/language/command.def
src/language/control/repeat.c
src/language/data-io/combine-files.c
src/language/data-io/data-parser.c
src/language/data-io/data-reader.c
src/language/data-io/list.q
src/language/data-io/print-space.c
src/language/data-io/print.c
src/language/data-io/trim.c
src/language/dictionary/automake.mk
src/language/dictionary/missing-values.c
src/language/dictionary/mrsets.c [new file with mode: 0644]
src/language/dictionary/numeric.c
src/language/dictionary/rename-variables.c
src/language/dictionary/split-file.c
src/language/dictionary/sys-file-info.c
src/language/expressions/automake.mk
src/language/expressions/evaluate.h.pl [deleted file]
src/language/expressions/evaluate.hpl [new file with mode: 0644]
src/language/expressions/evaluate.inc.pl [deleted file]
src/language/expressions/evaluate.incpl [new file with mode: 0644]
src/language/expressions/helpers.c
src/language/expressions/operations.h.pl [deleted file]
src/language/expressions/operations.hpl [new file with mode: 0644]
src/language/expressions/optimize.inc.pl [deleted file]
src/language/expressions/optimize.incpl [new file with mode: 0644]
src/language/expressions/parse.c
src/language/expressions/parse.inc.pl [deleted file]
src/language/expressions/parse.incpl [new file with mode: 0644]
src/language/lexer/lexer.c
src/language/lexer/q2c.c
src/language/lexer/variable-parser.c
src/language/prompt.c
src/language/stats/aggregate.c
src/language/stats/automake.mk
src/language/stats/autorecode.c
src/language/stats/binomial.c
src/language/stats/chisquare.c
src/language/stats/correlations.c
src/language/stats/crosstabs.q
src/language/stats/descriptives.c
src/language/stats/examine.q
src/language/stats/factor.c [new file with mode: 0644]
src/language/stats/flip.c
src/language/stats/freq.c
src/language/stats/freq.h
src/language/stats/frequencies.q
src/language/stats/glm.q
src/language/stats/npar-summary.c
src/language/stats/npar.q
src/language/stats/oneway.q
src/language/stats/rank.q
src/language/stats/regression.q
src/language/stats/reliability.q
src/language/stats/roc.c
src/language/stats/roc.h [new file with mode: 0644]
src/language/stats/sign.c
src/language/stats/t-test.q
src/language/stats/wilcoxon.c
src/language/syntax-file.c
src/language/syntax-string-source.c
src/language/tests/paper-size.c
src/language/utilities/echo.c
src/language/utilities/include.c
src/language/utilities/set.q
src/language/utilities/title.c
src/language/xforms/count.c
src/libpspp/abt.c
src/libpspp/abt.h
src/libpspp/array.c
src/libpspp/array.h
src/libpspp/automake.mk
src/libpspp/bt.c
src/libpspp/bt.h
src/libpspp/cast.h [new file with mode: 0644]
src/libpspp/compiler.h
src/libpspp/getl.c
src/libpspp/getl.h
src/libpspp/hash-functions.c
src/libpspp/hash-functions.h
src/libpspp/hash.h
src/libpspp/heap.h
src/libpspp/hmap.c
src/libpspp/hmap.h
src/libpspp/hmapx.c
src/libpspp/hmapx.h
src/libpspp/i18n.c
src/libpspp/i18n.h
src/libpspp/integer-format.c
src/libpspp/intern.c [new file with mode: 0644]
src/libpspp/intern.h [new file with mode: 0644]
src/libpspp/ll.c
src/libpspp/ll.h
src/libpspp/llx.c
src/libpspp/llx.h
src/libpspp/message.c
src/libpspp/message.h
src/libpspp/msg-locator.c
src/libpspp/range-map.h
src/libpspp/range-set.c
src/libpspp/range-set.h
src/libpspp/sparse-array.c
src/libpspp/str.c
src/libpspp/str.h
src/libpspp/string-array.c [new file with mode: 0644]
src/libpspp/string-array.h [new file with mode: 0644]
src/libpspp/string-map.c [new file with mode: 0644]
src/libpspp/string-map.h [new file with mode: 0644]
src/libpspp/string-set.c [new file with mode: 0644]
src/libpspp/string-set.h [new file with mode: 0644]
src/libpspp/stringi-map.c [new file with mode: 0644]
src/libpspp/stringi-map.h [new file with mode: 0644]
src/libpspp/stringi-set.c [new file with mode: 0644]
src/libpspp/stringi-set.h [new file with mode: 0644]
src/libpspp/taint.c
src/libpspp/tmpfile.c
src/libpspp/tower.c
src/libpspp/tower.h
src/libpspp/verbose-msg.c [deleted file]
src/libpspp/verbose-msg.h [deleted file]
src/libpspp/version.h
src/libpspp/zip-writer.c [new file with mode: 0644]
src/libpspp/zip-writer.h [new file with mode: 0644]
src/math/automake.mk
src/math/box-whisker.c
src/math/box-whisker.h
src/math/coefficient.c
src/math/correlation.c [new file with mode: 0644]
src/math/correlation.h [new file with mode: 0644]
src/math/covariance-matrix.c [deleted file]
src/math/covariance-matrix.h [deleted file]
src/math/design-matrix.c [deleted file]
src/math/design-matrix.h [deleted file]
src/math/histogram.c
src/math/histogram.h
src/math/interaction.c
src/math/levene.c
src/math/linreg.c
src/math/moments.c
src/math/np.c
src/math/np.h
src/math/order-stats.c
src/math/percentiles.c
src/math/percentiles.h
src/math/trimmed-mean.c
src/math/trimmed-mean.h
src/math/tukey-hinges.c
src/math/tukey-hinges.h
src/output/afm.c [deleted file]
src/output/afm.h [deleted file]
src/output/ascii.c
src/output/automake.mk
src/output/cairo-chart.c [new file with mode: 0644]
src/output/cairo-chart.h [new file with mode: 0644]
src/output/cairo.c [new file with mode: 0644]
src/output/cairo.h [new file with mode: 0644]
src/output/chart-item-provider.h [new file with mode: 0644]
src/output/chart-item.c [new file with mode: 0644]
src/output/chart-item.h [new file with mode: 0644]
src/output/chart.c [deleted file]
src/output/chart.h [deleted file]
src/output/charts/Makefile [deleted file]
src/output/charts/automake.mk [deleted file]
src/output/charts/barchart.c [deleted file]
src/output/charts/barchart.h [deleted file]
src/output/charts/box-whisker.c [deleted file]
src/output/charts/box-whisker.h [deleted file]
src/output/charts/boxplot-cairo.c [new file with mode: 0644]
src/output/charts/boxplot.c [new file with mode: 0644]
src/output/charts/boxplot.h [new file with mode: 0644]
src/output/charts/cartesian.c [deleted file]
src/output/charts/cartesian.h [deleted file]
src/output/charts/dummy-chart.c [deleted file]
src/output/charts/np-plot-cairo.c [new file with mode: 0644]
src/output/charts/np-plot.c [new file with mode: 0644]
src/output/charts/np-plot.h [new file with mode: 0644]
src/output/charts/piechart-cairo.c [new file with mode: 0644]
src/output/charts/piechart.c
src/output/charts/piechart.h
src/output/charts/plot-chart.c [deleted file]
src/output/charts/plot-chart.h [deleted file]
src/output/charts/plot-hist-cairo.c [new file with mode: 0644]
src/output/charts/plot-hist.c
src/output/charts/plot-hist.h
src/output/charts/roc-chart-cairo.c [new file with mode: 0644]
src/output/charts/roc-chart.c [new file with mode: 0644]
src/output/charts/roc-chart.h [new file with mode: 0644]
src/output/charts/scree-cairo.c [new file with mode: 0644]
src/output/charts/scree.c [new file with mode: 0644]
src/output/charts/scree.h [new file with mode: 0644]
src/output/csv.c [new file with mode: 0644]
src/output/driver-provider.h [new file with mode: 0644]
src/output/driver.c [new file with mode: 0644]
src/output/driver.h [new file with mode: 0644]
src/output/dummy-chart.c [deleted file]
src/output/html.c
src/output/htmlP.h [deleted file]
src/output/journal.c
src/output/journal.h
src/output/manager.c [deleted file]
src/output/manager.h [deleted file]
src/output/measure.c [new file with mode: 0644]
src/output/measure.h [new file with mode: 0644]
src/output/message-item.c [new file with mode: 0644]
src/output/message-item.h [new file with mode: 0644]
src/output/mk-class-boilerplate [new file with mode: 0755]
src/output/msglog.c [new file with mode: 0644]
src/output/msglog.h [new file with mode: 0644]
src/output/odt.c [new file with mode: 0644]
src/output/options.c [new file with mode: 0644]
src/output/options.h [new file with mode: 0644]
src/output/output-item-provider.h [new file with mode: 0644]
src/output/output-item.c [new file with mode: 0644]
src/output/output-item.h [new file with mode: 0644]
src/output/output.c [deleted file]
src/output/output.h [deleted file]
src/output/postscript.c [deleted file]
src/output/render.c [new file with mode: 0644]
src/output/render.h [new file with mode: 0644]
src/output/tab.c [new file with mode: 0644]
src/output/tab.h [new file with mode: 0644]
src/output/table-casereader.c [new file with mode: 0644]
src/output/table-item.c [new file with mode: 0644]
src/output/table-item.h [new file with mode: 0644]
src/output/table-paste.c [new file with mode: 0644]
src/output/table-provider.h [new file with mode: 0644]
src/output/table-select.c [new file with mode: 0644]
src/output/table-transpose.c [new file with mode: 0644]
src/output/table.c
src/output/table.h
src/output/text-item.c [new file with mode: 0644]
src/output/text-item.h [new file with mode: 0644]
src/ui/automake.mk
src/ui/command-line.c [deleted file]
src/ui/command-line.h [deleted file]
src/ui/gui/.gitignore
src/ui/gui/about.c [deleted file]
src/ui/gui/about.h [deleted file]
src/ui/gui/automake.mk
src/ui/gui/binomial-dialog.c [new file with mode: 0644]
src/ui/gui/binomial-dialog.h [new file with mode: 0644]
src/ui/gui/binomial.ui [new file with mode: 0644]
src/ui/gui/checkbox-treeview.c
src/ui/gui/chi-square-dialog.c [new file with mode: 0644]
src/ui/gui/chi-square-dialog.h [new file with mode: 0644]
src/ui/gui/chi-square.ui [new file with mode: 0644]
src/ui/gui/comments-dialog.c
src/ui/gui/comments-dialog.h
src/ui/gui/compute-dialog.c
src/ui/gui/compute-dialog.h
src/ui/gui/correlation-dialog.c [new file with mode: 0644]
src/ui/gui/correlation-dialog.h [new file with mode: 0644]
src/ui/gui/correlation.ui [new file with mode: 0644]
src/ui/gui/crosstabs-dialog.c
src/ui/gui/crosstabs-dialog.h
src/ui/gui/crosstabs.glade [deleted file]
src/ui/gui/crosstabs.ui [new file with mode: 0644]
src/ui/gui/customentry.c
src/ui/gui/data-editor.glade [deleted file]
src/ui/gui/data-editor.ui [new file with mode: 0644]
src/ui/gui/descriptives-dialog.c
src/ui/gui/descriptives-dialog.glade [deleted file]
src/ui/gui/descriptives-dialog.h
src/ui/gui/descriptives.ui [new file with mode: 0644]
src/ui/gui/dialog-common.c
src/ui/gui/dialog-common.h
src/ui/gui/dict-display.c
src/ui/gui/dict-display.h
src/ui/gui/examine-dialog.c
src/ui/gui/examine-dialog.h
src/ui/gui/examine.glade [deleted file]
src/ui/gui/examine.ui [new file with mode: 0644]
src/ui/gui/executor.c
src/ui/gui/factor-dialog.c [new file with mode: 0644]
src/ui/gui/factor-dialog.h [new file with mode: 0644]
src/ui/gui/factor.ui [new file with mode: 0644]
src/ui/gui/find-dialog.c
src/ui/gui/find-dialog.h
src/ui/gui/find.glade [deleted file]
src/ui/gui/find.ui [new file with mode: 0644]
src/ui/gui/frequencies-dialog.c
src/ui/gui/frequencies-dialog.h
src/ui/gui/frequencies.glade [deleted file]
src/ui/gui/frequencies.ui [new file with mode: 0644]
src/ui/gui/goto-case-dialog.c
src/ui/gui/goto-case-dialog.h
src/ui/gui/help-menu.c [new file with mode: 0644]
src/ui/gui/help-menu.h [new file with mode: 0644]
src/ui/gui/helper.c
src/ui/gui/helper.h
src/ui/gui/main.c
src/ui/gui/message-dialog.c [deleted file]
src/ui/gui/message-dialog.glade [deleted file]
src/ui/gui/message-dialog.h [deleted file]
src/ui/gui/oneway-anova-dialog.c
src/ui/gui/oneway-anova-dialog.h
src/ui/gui/oneway.glade [deleted file]
src/ui/gui/oneway.ui [new file with mode: 0644]
src/ui/gui/output-viewer.glade [deleted file]
src/ui/gui/output-viewer.ui [new file with mode: 0644]
src/ui/gui/psppire-acr.c
src/ui/gui/psppire-buttonbox.c
src/ui/gui/psppire-conf.c
src/ui/gui/psppire-conf.h
src/ui/gui/psppire-data-editor.c
src/ui/gui/psppire-data-window.c
src/ui/gui/psppire-dialog.c
src/ui/gui/psppire-dict.c
src/ui/gui/psppire-dictview.c
src/ui/gui/psppire-output-window.c
src/ui/gui/psppire-output-window.h
src/ui/gui/psppire-select-dest.c [new file with mode: 0644]
src/ui/gui/psppire-select-dest.h [new file with mode: 0644]
src/ui/gui/psppire-selector.c
src/ui/gui/psppire-selector.h
src/ui/gui/psppire-syntax-window.c
src/ui/gui/psppire-syntax-window.h
src/ui/gui/psppire-var-sheet.c
src/ui/gui/psppire-var-store.c
src/ui/gui/psppire-var-view.c [new file with mode: 0644]
src/ui/gui/psppire-var-view.h [new file with mode: 0644]
src/ui/gui/psppire-window.c
src/ui/gui/psppire.c
src/ui/gui/psppire.glade [deleted file]
src/ui/gui/psppire.h
src/ui/gui/psppire.ui [new file with mode: 0644]
src/ui/gui/rank-dialog.c
src/ui/gui/rank-dialog.h
src/ui/gui/rank.glade [deleted file]
src/ui/gui/rank.ui [new file with mode: 0644]
src/ui/gui/recode-dialog.c
src/ui/gui/recode-dialog.h
src/ui/gui/recode.glade [deleted file]
src/ui/gui/recode.ui [new file with mode: 0644]
src/ui/gui/regression-dialog.c
src/ui/gui/regression-dialog.h
src/ui/gui/regression.glade [deleted file]
src/ui/gui/regression.ui [new file with mode: 0644]
src/ui/gui/reliability-dialog.c
src/ui/gui/reliability-dialog.h
src/ui/gui/reliability.glade [deleted file]
src/ui/gui/reliability.ui [new file with mode: 0644]
src/ui/gui/roc-dialog.c [new file with mode: 0644]
src/ui/gui/roc-dialog.h [new file with mode: 0644]
src/ui/gui/roc.ui [new file with mode: 0644]
src/ui/gui/select-cases-dialog.c
src/ui/gui/select-cases-dialog.h
src/ui/gui/sheet/automake.mk
src/ui/gui/sheet/psppire-axis.c
src/ui/gui/sort-cases-dialog.c
src/ui/gui/sort-cases-dialog.h
src/ui/gui/sort.ui [new file with mode: 0644]
src/ui/gui/split-file-dialog.c
src/ui/gui/split-file-dialog.h
src/ui/gui/syntax-editor-source.c
src/ui/gui/syntax-editor.glade [deleted file]
src/ui/gui/syntax-editor.ui [new file with mode: 0644]
src/ui/gui/t-test-independent-samples-dialog.c
src/ui/gui/t-test-independent-samples-dialog.h
src/ui/gui/t-test-one-sample.c
src/ui/gui/t-test-one-sample.h
src/ui/gui/t-test-options.c
src/ui/gui/t-test-paired-samples.c
src/ui/gui/t-test-paired-samples.h
src/ui/gui/t-test.glade [deleted file]
src/ui/gui/t-test.ui [new file with mode: 0644]
src/ui/gui/text-data-import-dialog.c
src/ui/gui/text-data-import.glade [deleted file]
src/ui/gui/text-data-import.ui [new file with mode: 0644]
src/ui/gui/transpose-dialog.c
src/ui/gui/transpose-dialog.h
src/ui/gui/val-labs-dialog.c
src/ui/gui/var-display.c
src/ui/gui/var-sheet-dialogs.glade [deleted file]
src/ui/gui/var-sheet-dialogs.ui [new file with mode: 0644]
src/ui/gui/var-type-dialog.c
src/ui/gui/var-type-dialog.h
src/ui/gui/variable-info-dialog.c
src/ui/gui/variable-info-dialog.glade [deleted file]
src/ui/gui/variable-info-dialog.h
src/ui/gui/variable-info.ui [new file with mode: 0644]
src/ui/gui/weight-cases-dialog.c
src/ui/gui/weight-cases-dialog.h
src/ui/gui/widgets.c
src/ui/source-init-opts.c
src/ui/source-init-opts.h
src/ui/terminal/automake.mk
src/ui/terminal/main.c
src/ui/terminal/msg-ui.c
src/ui/terminal/msg-ui.h
src/ui/terminal/read-line.c
src/ui/terminal/terminal-opts.c
src/ui/terminal/terminal-opts.h
tests/.gitignore
tests/atlocal.in [new file with mode: 0644]
tests/automake.mk
tests/bugs/agg-crash-2.sh [deleted file]
tests/bugs/agg_crash.sh [deleted file]
tests/bugs/alpha-freq.sh [deleted file]
tests/bugs/big-input-2.sh
tests/bugs/big-input.sh
tests/bugs/case-map.sh
tests/bugs/comment-at-eof.sh
tests/bugs/compression.sh
tests/bugs/compute-fmt.sh [deleted file]
tests/bugs/compute-lv.sh [deleted file]
tests/bugs/compute-sum.sh [deleted file]
tests/bugs/computebug.out [deleted file]
tests/bugs/computebug.sh [deleted file]
tests/bugs/computebug.stat [deleted file]
tests/bugs/crosstabs-crash.sh [deleted file]
tests/bugs/crosstabs-crash2.sh [deleted file]
tests/bugs/crosstabs.sh [deleted file]
tests/bugs/crosstabs2.sh [deleted file]
tests/bugs/curtailed.sh
tests/bugs/data-crash.sh
tests/bugs/double-frequency.sh [deleted file]
tests/bugs/empty-do-repeat.sh
tests/bugs/examine-1sample.sh
tests/bugs/examine-crash.sh
tests/bugs/examine-crash2.sh
tests/bugs/examine-crash3.sh
tests/bugs/examine-missing.sh
tests/bugs/examine-missing2.sh
tests/bugs/freq-nolabels.sh [deleted file]
tests/bugs/get-no-file.sh
tests/bugs/get.sh
tests/bugs/html-frequency.sh [deleted file]
tests/bugs/if_crash.sh
tests/bugs/input-crash.sh
tests/bugs/keep-all.sh
tests/bugs/lag_crash.sh
tests/bugs/list-overflow.sh
tests/bugs/match-files-scratch.sh
tests/bugs/multipass.sh
tests/bugs/overwrite-input-file.sh
tests/bugs/overwrite-special-file.sh
tests/bugs/piechart.sh [deleted file]
tests/bugs/print-crash.sh
tests/bugs/random.sh
tests/bugs/recode-copy-bug-1.out [deleted file]
tests/bugs/recode-copy-bug-1.stat [deleted file]
tests/bugs/recode-copy-bug-2.out [deleted file]
tests/bugs/recode-copy-bug-2.stat [deleted file]
tests/bugs/recode-copy-bug.sh [deleted file]
tests/bugs/shbang.sh
tests/bugs/signals.sh
tests/bugs/t-test-alpha.sh
tests/bugs/t-test-alpha2.sh
tests/bugs/t-test-alpha3.sh
tests/bugs/t-test-paired.sh
tests/bugs/t-test-with-temp.sh
tests/bugs/t-test.sh
tests/bugs/temp-freq.sh [deleted file]
tests/bugs/temporary.sh
tests/bugs/unwritable-dir.sh
tests/bugs/val-labs-trailing-slash.sh
tests/bugs/val-labs.sh
tests/command/add-files.sh
tests/command/aggregate.sh [deleted file]
tests/command/attributes.sh
tests/command/autorecod.sh [deleted file]
tests/command/beg-data.sh
tests/command/bignum.sh
tests/command/correlation.sh
tests/command/count.sh
tests/command/data-list.sh
tests/command/do-if.sh
tests/command/do-repeat.sh
tests/command/erase.sh
tests/command/examine-extremes.sh
tests/command/examine-percentiles.sh
tests/command/examine.sh
tests/command/file-handle.sh
tests/command/file-label.sh
tests/command/filter.sh
tests/command/flip.sh
tests/command/get-data-gnm.sh
tests/command/get-data-psql.sh
tests/command/get-data-txt-examples.sh
tests/command/get-data-txt-importcases.sh
tests/command/get-data-txt.sh
tests/command/import-export.sh
tests/command/input-program.sh
tests/command/insert.sh
tests/command/lag.sh
tests/command/line-ends.sh
tests/command/list.sh
tests/command/longvars.sh
tests/command/loop.sh
tests/command/match-files.sh
tests/command/missing-values.sh
tests/command/n_of_cases.sh
tests/command/no_case_size.sh
tests/command/npar-binomial.sh
tests/command/npar-chisquare.sh
tests/command/npar-sign.sh
tests/command/npar-wilcoxon.sh
tests/command/oneway-missing.sh
tests/command/oneway-with-splits.sh
tests/command/oneway.sh
tests/command/permissions.sh
tests/command/print-strings.sh
tests/command/print.sh
tests/command/rank.sh
tests/command/regression-qr.sh
tests/command/regression.sh
tests/command/reliability.sh
tests/command/rename.sh
tests/command/roc.sh
tests/command/roc2.sh
tests/command/sample.sh
tests/command/sort.sh
tests/command/split-file.sh
tests/command/sysfile-info.sh
tests/command/sysfiles-old.sh
tests/command/sysfiles.sh
tests/command/t-test-1-indep-val.sh
tests/command/t-test-1-sample-missing-anal.sh
tests/command/t-test-1-sample-missing-list.sh
tests/command/t-test-1s.sh
tests/command/t-test-groups.sh
tests/command/t-test-indep-missing-anal.sh
tests/command/t-test-indep-missing-list.sh
tests/command/t-test-paired-missing-anal.sh
tests/command/t-test-paired-missing-list.sh
tests/command/t-test-pairs.sh
tests/command/tabs.sh
tests/command/trimmed-mean.sh
tests/command/update.sh
tests/command/use.sh
tests/command/variable-display.sh
tests/command/vector.sh
tests/command/very-long-strings.sh
tests/command/weight.sh
tests/coverage.sh
tests/data/datasheet-test.c
tests/dissect-sysfile.c
tests/expressions/epoch.sh
tests/expressions/expressions.sh
tests/expressions/randist.sh
tests/expressions/valuelabel.sh
tests/expressions/variables.sh
tests/expressions/vectors.sh
tests/formats/360.sh
tests/formats/bcd-in.sh
tests/formats/binhex-out.sh
tests/formats/date-in.sh
tests/formats/date-out.sh
tests/formats/float-format.sh
tests/formats/format-guesser.sh
tests/formats/ib-in.sh
tests/formats/legacy-in.sh
tests/formats/month-in.sh
tests/formats/month-out.sh
tests/formats/num-in.sh
tests/formats/num-out.sh
tests/formats/time-in.sh
tests/formats/time-out.sh
tests/formats/wkday-in.sh
tests/formats/wkday-out.sh
tests/language/dictionary/mrsets.at [new file with mode: 0644]
tests/language/stats/aggregate.at [new file with mode: 0644]
tests/language/stats/autorecode.at [new file with mode: 0644]
tests/language/stats/crosstabs.at [new file with mode: 0644]
tests/language/stats/descriptives.at [new file with mode: 0644]
tests/language/stats/factor.at [new file with mode: 0644]
tests/language/stats/frequencies.at [new file with mode: 0644]
tests/language/xforms/compute.at [new file with mode: 0644]
tests/language/xforms/recode.at [new file with mode: 0644]
tests/libpspp/hmap-test.c
tests/libpspp/hmapx-test.c
tests/libpspp/llx-test.c
tests/libpspp/range-set-test.c
tests/libpspp/string-map-test.c [new file with mode: 0644]
tests/libpspp/string-set-test.c [new file with mode: 0644]
tests/libpspp/stringi-map-test.c [new file with mode: 0644]
tests/libpspp/stringi-set-test.c [new file with mode: 0644]
tests/output/paper-size.sh
tests/output/render-test.c [new file with mode: 0644]
tests/output/render.at [new file with mode: 0644]
tests/perl-module.at [new file with mode: 0644]
tests/stats/descript-basic.sh [deleted file]
tests/stats/descript-mean-bug.sh [deleted file]
tests/stats/descript-missing.sh [deleted file]
tests/stats/moments.sh
tests/stats/ntiles.sh [deleted file]
tests/stats/percentiles-compatible.sh [deleted file]
tests/stats/percentiles-enhanced.sh
tests/test_template
tests/testsuite.at [new file with mode: 0644]
tests/xforms/recode.sh [deleted file]

index ad89bf36e4884d85df1c47754057f8b2e1635d28..25b989e7b1a0c473bfbe25f26d5d794a574d8528 100644 (file)
@@ -1,7 +1,8 @@
-ABOUT-NLS
 ChangeLog
-Makefile
-Makefile.in
+/Makefile
+/Makefile.in
+/gl/Makefile
+/gl/Makefile.in
 aclocal.m4
 autom4te.cache
 compile
@@ -39,3 +40,8 @@ gitlog-to-changelog
 *.deps
 *.la
 *.libs
+/arg-nonnull.h
+/c++defs.h
+/package.m4
+/unused-parameter.h
+/warn-on-use.h
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644 (file)
index 0000000..51510b5
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,1303 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+1.1 Quick configuration advice
+==============================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation.  Future versions of GNU `gettext' will
+very likely convey even more functionality.  So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+   So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+1.2 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  If not, the included GNU
+`gettext' library will be used.  This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --disable-nls
+
+will, respectively, bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this.  This might not be desirable.  You should use
+the more recent version of the GNU `gettext' library.  I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   The configuration process will not test for the `catgets' function
+and therefore it will not be used.  The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+   Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.3 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  If you happen to have the `LC_ALL' or some other
+`LC_xxx' environment variables set, you should unset them before
+setting `LANG', otherwise the setting of `LANG' will not have the
+desired effect.  Here `LL' is an ISO 639 two-letter language code, and
+`CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.4 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://translationproject.org/', in the "Teams" area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `coordinator@translationproject.org' to
+reach the coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skills are praised more than
+programming skills, here.
+
+1.5 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of March
+2010.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am ar ast az be be@latin bg bn_IN bs ca crh
+                        +------------------------------------------------+
+     a2ps               |                 []                      []     |
+     aegis              |                                                |
+     ant-phone          |                                                |
+     anubis             |                                                |
+     aspell             |          []                             []     |
+     bash               |                                                |
+     bfd                |                                                |
+     bibshelf           |          []                                    |
+     binutils           |                                                |
+     bison              |                                                |
+     bison-runtime      |          []                                    |
+     bluez-pin          | []       []                                    |
+     bombono-dvd        |                                                |
+     buzztard           |                                                |
+     cflow              |                                                |
+     clisp              |                                                |
+     coreutils          |                             []          []     |
+     cpio               |                                                |
+     cppi               |                                                |
+     cpplib             |                                         []     |
+     cryptsetup         |                                                |
+     dfarc              |                                                |
+     dialog             |                       []                []     |
+     dico               |                                                |
+     diffutils          |                                         []     |
+     dink               |                                                |
+     doodle             |                                                |
+     e2fsprogs          |                                         []     |
+     enscript           |                                         []     |
+     exif               |                                                |
+     fetchmail          |                                         []     |
+     findutils          |                             []                 |
+     flex               |                                         []     |
+     freedink           |                                                |
+     gas                |                                                |
+     gawk               |          []                             []     |
+     gcal               |                                         []     |
+     gcc                |                                                |
+     gettext-examples   | []       []                 []          []     |
+     gettext-runtime    |                 []          []          []     |
+     gettext-tools      |                             []          []     |
+     gip                |                             []                 |
+     gliv               |                             []                 |
+     glunarclock        |          []                 []                 |
+     gnubiff            |                                                |
+     gnucash            |                                         []     |
+     gnuedu             |                                                |
+     gnulib             |                                                |
+     gnunet             |                                                |
+     gnunet-gtk         |                                                |
+     gnutls             |                                                |
+     gold               |                                                |
+     gpe-aerial         |                                                |
+     gpe-beam           |                                                |
+     gpe-bluetooth      |                                                |
+     gpe-calendar       |                                                |
+     gpe-clock          |          []                                    |
+     gpe-conf           |                                                |
+     gpe-contacts       |                                                |
+     gpe-edit           |                                                |
+     gpe-filemanager    |                                                |
+     gpe-go             |                                                |
+     gpe-login          |                                                |
+     gpe-ownerinfo      |          []                                    |
+     gpe-package        |                                                |
+     gpe-sketchbook     |                                                |
+     gpe-su             |          []                                    |
+     gpe-taskmanager    |          []                                    |
+     gpe-timesheet      |          []                                    |
+     gpe-today          |          []                                    |
+     gpe-todo           |                                                |
+     gphoto2            |                                                |
+     gprof              |                             []                 |
+     gpsdrive           |                                                |
+     gramadoir          |                                                |
+     grep               |                                                |
+     grub               |          []                             []     |
+     gsasl              |                                                |
+     gss                |                                                |
+     gst-plugins-bad    |                             []                 |
+     gst-plugins-base   |                             []                 |
+     gst-plugins-good   |                             []                 |
+     gst-plugins-ugly   |                             []                 |
+     gstreamer          | []                          []          []     |
+     gtick              |                                                |
+     gtkam              |                 []                             |
+     gtkorphan          |                             []                 |
+     gtkspell           | []       []     []                             |
+     gutenprint         |                                                |
+     hello              |                             []                 |
+     hylafax            |                                                |
+     idutils            |                                                |
+     indent             |                             []          []     |
+     iso_15924          |                                                |
+     iso_3166           | []              []          []  []   [] [] []  |
+     iso_3166_2         |                                                |
+     iso_4217           |                                                |
+     iso_639            |          []     []              []         []  |
+     iso_639_3          |                                            []  |
+     jwhois             |                                                |
+     kbd                |                                                |
+     keytouch           |                                         []     |
+     keytouch-editor    |                                                |
+     keytouch-keyboa... |                                         []     |
+     klavaro            |       []                                       |
+     latrine            |                                                |
+     ld                 |                             []                 |
+     leafpad            |                             []          []     |
+     libc               |                             []          []     |
+     libexif            |                 ()                             |
+     libextractor       |                                                |
+     libgnutls          |                                                |
+     libgpewidget       |                                                |
+     libgpg-error       |                                                |
+     libgphoto2         |                                                |
+     libgphoto2_port    |                                                |
+     libgsasl           |                                                |
+     libiconv           |                             []                 |
+     libidn             |                                                |
+     lifelines          |                                                |
+     liferea            |                       []                []     |
+     lilypond           |                                                |
+     linkdr             |       []                                       |
+     lordsawar          |                                                |
+     lprng              |                                                |
+     lynx               |                                         []     |
+     m4                 |                                                |
+     mailfromd          |                                                |
+     mailutils          |                                                |
+     make               |                                                |
+     man-db             |                                                |
+     man-db-manpages    |                                                |
+     minicom            |                                                |
+     mkisofs            |                                                |
+     nano               |                             []          []     |
+     opcodes            |                                                |
+     parted             |                                                |
+     pies               |                                                |
+     popt               |                                                |
+     psmisc             |                                                |
+     pspp               |                                         []     |
+     pwdutils           |                                                |
+     radius             |                                         []     |
+     recode             |                 []                      []     |
+     rosegarden         |                                                |
+     rpm                |                                                |
+     rush               |                                                |
+     screem             |                                                |
+     scrollkeeper       |              [] []                      []     |
+     sed                |          []                             []     |
+     sharutils          |                             []          []     |
+     shishi             |                                                |
+     skencil            |                                                |
+     solfege            |                                                |
+     solfege-manual     |                                                |
+     soundtracker       |                                                |
+     sp                 |                                                |
+     sysstat            |                                                |
+     tar                |                             []                 |
+     texinfo            |                                                |
+     tin                |                                                |
+     unicode-han-tra... |                                                |
+     unicode-transla... |                                                |
+     util-linux-ng      |                                         []     |
+     vice               |                                                |
+     vmm                |                                                |
+     vorbis-tools       |                                                |
+     wastesedge         |                                                |
+     wdiff              |                                                |
+     wget               |                                         []     |
+     wyslij-po          |                                                |
+     xchat              |          []     []          []          []     |
+     xdg-user-dirs      | []       []     []    []    []          [] []  |
+     xkeyboard-config   |                             []          [] []  |
+                        +------------------------------------------------+
+                          af am ar ast az be be@latin bg bn_IN bs ca crh
+                           6  0  2 19   1 10     3    28   2    1 38  5
+
+                          cs da  de  el en en_GB en_ZA eo es et eu fa fi
+                        +-------------------------------------------------+
+     a2ps               | [] []  []  []     []            [] []       []  |
+     aegis              |    []  []                       []              |
+     ant-phone          |    []  ()                                       |
+     anubis             |    []  []                                   []  |
+     aspell             | [] []  []         []            []              |
+     bash               | []                           [] []          []  |
+     bfd                |                                 []          []  |
+     bibshelf           |    []  []                       []          []  |
+     binutils           |                                 []          []  |
+     bison              |        []  []                               []  |
+     bison-runtime      |    []  []  []                      []       []  |
+     bluez-pin          | [] []  []  []                [] []          []  |
+     bombono-dvd        |                                             []  |
+     buzztard           | [] []  []                                       |
+     cflow              |    []  []                                   []  |
+     clisp              |    []  []     []                []              |
+     coreutils          | [] []  []                          []           |
+     cpio               |                                             []  |
+     cppi               |                                                 |
+     cpplib             |    []  []                       []              |
+     cryptsetup         |        []                                       |
+     dfarc              |    []  []                       []          []  |
+     dialog             |    []  []                    [] []    []        |
+     dico               |                                                 |
+     diffutils          | [] []  []  []                [] []          []  |
+     dink               |    []  []                       []              |
+     doodle             |        []                                       |
+     e2fsprogs          | []     []                       []              |
+     enscript           |    []  []         []                            |
+     exif               | () []  []                                   []  |
+     fetchmail          | [] []  ()  []     []            []              |
+     findutils          | [] []  []                                   []  |
+     flex               |        []                       []          []  |
+     freedink           |    []  []                       []          []  |
+     gas                |                                 []              |
+     gawk               |    []  []                       []              |
+     gcal               |                                 []              |
+     gcc                |        []                       []              |
+     gettext-examples   |        []  []                [] []          []  |
+     gettext-runtime    |    []  []                    [] []          []  |
+     gettext-tools      |        []                       []    []        |
+     gip                |    []  []                       []    []    []  |
+     gliv               | [] []  []                                   []  |
+     glunarclock        |    []  []                                   []  |
+     gnubiff            |        ()                                       |
+     gnucash            | []     ()  ()     ()            ()          ()  |
+     gnuedu             |    []                           []              |
+     gnulib             |        []                       []          []  |
+     gnunet             |                                                 |
+     gnunet-gtk         |    []                                           |
+     gnutls             | []     []                                       |
+     gold               |                                 []          []  |
+     gpe-aerial         | [] []  []                       []          []  |
+     gpe-beam           | [] []  []                       []          []  |
+     gpe-bluetooth      |    []                                       []  |
+     gpe-calendar       |    []                                       []  |
+     gpe-clock          | [] []  []                       []          []  |
+     gpe-conf           | [] []  []                                   []  |
+     gpe-contacts       |    []  []                       []          []  |
+     gpe-edit           |    []  []                                   []  |
+     gpe-filemanager    |    []  []                       []          []  |
+     gpe-go             | [] []  []                       []          []  |
+     gpe-login          |    []  []                                   []  |
+     gpe-ownerinfo      | [] []  []                       []          []  |
+     gpe-package        |    []  []                       []          []  |
+     gpe-sketchbook     | [] []  []                       []          []  |
+     gpe-su             | [] []  []                       []          []  |
+     gpe-taskmanager    | [] []  []                       []          []  |
+     gpe-timesheet      | [] []  []                       []          []  |
+     gpe-today          | [] []  []                       []          []  |
+     gpe-todo           |    []  []                       []          []  |
+     gphoto2            | [] []  ()         []            []    []    []  |
+     gprof              |    []  []                       []          []  |
+     gpsdrive           |    []                           [] []           |
+     gramadoir          |    []  []                    []                 |
+     grep               | []                                          []  |
+     grub               |        []                                   []  |
+     gsasl              |        []                                   []  |
+     gss                |                                             []  |
+     gst-plugins-bad    | [] []  []                       []    []    []  |
+     gst-plugins-base   | [] []  []                       []    []    []  |
+     gst-plugins-good   | [] []  []  []                   []    []    []  |
+     gst-plugins-ugly   | [] []  []  []                   []    []    []  |
+     gstreamer          | [] []  []                       []    []    []  |
+     gtick              |    []  ()                    []             []  |
+     gtkam              | [] []  ()                    [] []              |
+     gtkorphan          | [] []  []                    []                 |
+     gtkspell           | [] []  []  []                [] []    []    []  |
+     gutenprint         |    []  []         []                            |
+     hello              |    []  []                    [] []          []  |
+     hylafax            |        []                       []              |
+     idutils            |    []  []                                   []  |
+     indent             | [] []  []                    [] [] [] []    []  |
+     iso_15924          |    []      ()                [] []          []  |
+     iso_3166           | [] []  []  ()                [] [] [] ()    []  |
+     iso_3166_2         |            ()                                   |
+     iso_4217           | [] []  []  ()                   [] []       []  |
+     iso_639            | [] []  []  ()                [] []          []  |
+     iso_639_3          |                                                 |
+     jwhois             |                                 []          []  |
+     kbd                | [] []  []  []                   []              |
+     keytouch           |    []  []                                   []  |
+     keytouch-editor    |    []  []                                   []  |
+     keytouch-keyboa... |    []                                       []  |
+     klavaro            | [] []  []                    []                 |
+     latrine            |    []  ()                                   []  |
+     ld                 |    []                           []          []  |
+     leafpad            | [] []  []  []                   []    []    []  |
+     libc               | [] []  []                       []          []  |
+     libexif            |    []  []         ()                            |
+     libextractor       |                                                 |
+     libgnutls          | []                                              |
+     libgpewidget       |    []  []                                   []  |
+     libgpg-error       | []     []                                       |
+     libgphoto2         |    []  ()                                       |
+     libgphoto2_port    |    []  ()                             []        |
+     libgsasl           |                                             []  |
+     libiconv           | [] []  []                    []    []       []  |
+     libidn             | []     []                    []             []  |
+     lifelines          |    []  ()                                       |
+     liferea            | []     []  []                   []    []        |
+     lilypond           | []     []                       []          []  |
+     linkdr             |    []  []                       []          []  |
+     lordsawar          |    []                                           |
+     lprng              |                                                 |
+     lynx               | [] []  []                          []           |
+     m4                 | [] []  []  []                               []  |
+     mailfromd          |                                                 |
+     mailutils          |                                 []              |
+     make               |    []  []                       []          []  |
+     man-db             |                                                 |
+     man-db-manpages    |                                                 |
+     minicom            | [] []  []                       []          []  |
+     mkisofs            |                                             []  |
+     nano               |        []                       []    []    []  |
+     opcodes            |        []                       []          []  |
+     parted             | []     []                                       |
+     pies               |                                                 |
+     popt               | [] []  []                    [] []          []  |
+     psmisc             | []     []                             []    []  |
+     pspp               |                                 []              |
+     pwdutils           |    []                                           |
+     radius             |                                 []              |
+     recode             | [] []  []  []                [] []          []  |
+     rosegarden         | ()     ()                       ()          ()  |
+     rpm                |    []  []                       []              |
+     rush               |                                                 |
+     screem             |                                                 |
+     scrollkeeper       | [] []  []         []            []          []  |
+     sed                | []     []  []                [] [] []       []  |
+     sharutils          |    []  []                       [] []       []  |
+     shishi             |                                                 |
+     skencil            |    []  ()                       []              |
+     solfege            |        []                    []    []       []  |
+     solfege-manual     |                              []    []           |
+     soundtracker       |    []  []                       []              |
+     sp                 |        []                                       |
+     sysstat            |    []  []                             []    []  |
+     tar                | []     []                          [] []    []  |
+     texinfo            |        []                    [] []              |
+     tin                |        []                          []           |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |                                                 |
+     util-linux-ng      | [] []  []                       []          []  |
+     vice               |    ()  ()                                       |
+     vmm                |        []                                       |
+     vorbis-tools       | []                           []                 |
+     wastesedge         |    []                                           |
+     wdiff              |                                 []          []  |
+     wget               | []     []                          []       []  |
+     wyslij-po          |                                             []  |
+     xchat              | []     []  []                   [] []       []  |
+     xdg-user-dirs      | [] []  []  []                [] [] [] []    []  |
+     xkeyboard-config   | [] []  []                    [] []          []  |
+                        +-------------------------------------------------+
+                          cs da  de  el en en_GB en_ZA eo es et eu fa fi
+                          64 103 113 18  1   8     0   28 89 18 19  0 100
+
+                          fr  ga gl gu he hi hr hu hy id  is it ja ka kn
+                        +------------------------------------------------+
+     a2ps               | []                          []        []       |
+     aegis              | []                                 []          |
+     ant-phone          | []                                 []          |
+     anubis             | []                          []     []          |
+     aspell             | []  []                      []     []          |
+     bash               |                             []                 |
+     bfd                |                             []                 |
+     bibshelf           | []  []                      []     []          |
+     binutils           | []                          []                 |
+     bison              | []  []                      []                 |
+     bison-runtime      | []  []                      []     [] []       |
+     bluez-pin          | []  []                [] [] []  []    []       |
+     bombono-dvd        |                                                |
+     buzztard           |                             []                 |
+     cflow              |     []                      []                 |
+     clisp              | []                                             |
+     coreutils          | []  []                []    []     []          |
+     cpio               | []  []                      []                 |
+     cppi               | []                                             |
+     cpplib             | []                          []                 |
+     cryptsetup         | []                          []     []          |
+     dfarc              | []                                 []          |
+     dialog             | []  [] []                   []  [] [] []       |
+     dico               |                                                |
+     diffutils          | []  [] []    []       []    []     [] []       |
+     dink               | []                                             |
+     doodle             |     []                             []          |
+     e2fsprogs          | []                          []                 |
+     enscript           | []  []             []       []                 |
+     exif               | []                          []  [] [] []       |
+     fetchmail          | []                          []     [] []       |
+     findutils          | []  []                []    []     []          |
+     flex               | []  []                                         |
+     freedink           | []                          []                 |
+     gas                | []                          []                 |
+     gawk               | []  []       []             []     () []       |
+     gcal               | []                                             |
+     gcc                |                             []                 |
+     gettext-examples   | []  []                []    []     [] []       |
+     gettext-runtime    | []  []                      []     [] []       |
+     gettext-tools      | []                          []     [] []       |
+     gip                | []  [] []                   []        []       |
+     gliv               | ()                                             |
+     glunarclock        |     []                []    []                 |
+     gnubiff            | ()                          []     ()          |
+     gnucash            | ()           ()       ()           () []       |
+     gnuedu             | []                                 []          |
+     gnulib             | []  []                []           [] []       |
+     gnunet             |                                                |
+     gnunet-gtk         | []                                             |
+     gnutls             | []                                 []          |
+     gold               |                             []                 |
+     gpe-aerial         | []                          []                 |
+     gpe-beam           | []                          []        []       |
+     gpe-bluetooth      |                             []     [] []       |
+     gpe-calendar       |                                       []       |
+     gpe-clock          | []                    []    []        []       |
+     gpe-conf           | []                          []        []       |
+     gpe-contacts       | []                          []        []       |
+     gpe-edit           |                             []        []       |
+     gpe-filemanager    |                       []    []        []       |
+     gpe-go             | []                    []    []        []       |
+     gpe-login          |                             []        []       |
+     gpe-ownerinfo      | []                    []    []        []       |
+     gpe-package        |                             []        []       |
+     gpe-sketchbook     | []                          []        []       |
+     gpe-su             | []     []             []    []        []       |
+     gpe-taskmanager    | []                          []        []       |
+     gpe-timesheet      | []  []                      []        []       |
+     gpe-today          | []  [] []                   []        []       |
+     gpe-todo           |                             []        []       |
+     gphoto2            | []                    []    []     [] []       |
+     gprof              | []  []                      []                 |
+     gpsdrive           |        []                   []     []          |
+     gramadoir          | []  []                      []                 |
+     grep               |                                                |
+     grub               |                             []                 |
+     gsasl              | []  []                      []     []          |
+     gss                | []  []                      []     []          |
+     gst-plugins-bad    | []                    []    []     []          |
+     gst-plugins-base   | []                    []    []     [] []       |
+     gst-plugins-good   | []                    []    []     [] []       |
+     gst-plugins-ugly   | []                    []    []     [] []       |
+     gstreamer          | []                    []    []     []          |
+     gtick              | []  []                      []     []          |
+     gtkam              | []                    []    []     [] []       |
+     gtkorphan          | []                          []     []          |
+     gtkspell           | []  [] []             [] [] []     [] []       |
+     gutenprint         | []                    []           []          |
+     hello              |     []                      []                 |
+     hylafax            |                             []                 |
+     idutils            | []  []                []    []     []          |
+     indent             | []  [] []             []    []     [] []       |
+     iso_15924          | ()                          []     []          |
+     iso_3166           | ()  [] [] [] [] [] [] []    []     [] []       |
+     iso_3166_2         | ()                          []     []          |
+     iso_4217           | ()                    []    []     [] []       |
+     iso_639            | ()  []    []          []    []     [] []    [] |
+     iso_639_3          | ()                                 []       [] |
+     jwhois             | []                    []    []     []          |
+     kbd                | []                          []                 |
+     keytouch           | []  []                []    []     []          |
+     keytouch-editor    |     []                []    []     []          |
+     keytouch-keyboa... |     []                []    []     []          |
+     klavaro            |        []             []                       |
+     latrine            |                             []     []          |
+     ld                 | []  []                      []                 |
+     leafpad            | []  []       []       []    []     [] ()       |
+     libc               | []     []                   []        []       |
+     libexif            |                                                |
+     libextractor       |                                                |
+     libgnutls          | []                                 []          |
+     libgpewidget       |     []                      []        []       |
+     libgpg-error       | []                                 []          |
+     libgphoto2         | []                                    []       |
+     libgphoto2_port    | []                                 [] []       |
+     libgsasl           | []  []                      []     []          |
+     libiconv           | []  []                      []     [] []       |
+     libidn             | []                          []     []          |
+     lifelines          | ()                                             |
+     liferea            | []                    []           [] []       |
+     lilypond           | []                                             |
+     linkdr             |              []    [] []           []          |
+     lordsawar          |                                                |
+     lprng              |                             []                 |
+     lynx               | []                    []    []     [] []       |
+     m4                 | []  [] []                   []        []       |
+     mailfromd          |                                                |
+     mailutils          | []                          []                 |
+     make               | []  [] []    []    []       []     [] []       |
+     man-db             |                             []     []          |
+     man-db-manpages    |                             []                 |
+     minicom            | []                    []    []        []       |
+     mkisofs            | []                          []     []          |
+     nano               | []  [] []             []           []          |
+     opcodes            | []  []                      []                 |
+     parted             | []                          []     [] []       |
+     pies               |                                                |
+     popt               | []  [] []             []    []  [] [] []       |
+     psmisc             |                       []    []     []          |
+     pspp               |                                                |
+     pwdutils           | []                          []                 |
+     radius             | []                          []                 |
+     recode             | []  [] []    []       []    []     []          |
+     rosegarden         | ()                          ()     () ()       |
+     rpm                |                             []        []       |
+     rush               |                                                |
+     screem             |                                    [] []       |
+     scrollkeeper       |                       []    []     []          |
+     sed                | []  [] []             []    []     [] []       |
+     sharutils          | []  []                []    []     [] []       |
+     shishi             | []                                             |
+     skencil            | []                                             |
+     solfege            | []     []                          []          |
+     solfege-manual     | []     []                                      |
+     soundtracker       | []                                 []          |
+     sp                 | []                                    ()       |
+     sysstat            | []                          []     [] []       |
+     tar                | []  []                []    []     [] []       |
+     texinfo            | []                          []     []          |
+     tin                | []                                             |
+     unicode-han-tra... |                                                |
+     unicode-transla... | []  []                                         |
+     util-linux-ng      | []                    []    []     [] []       |
+     vice               | ()                    ()           ()          |
+     vmm                | []                                             |
+     vorbis-tools       |                             []                 |
+     wastesedge         | ()                                 ()          |
+     wdiff              |                                                |
+     wget               | []  []             [] []    []     [] []       |
+     wyslij-po          | []                          []                 |
+     xchat              | []        []    []    []    []     [] []    [] |
+     xdg-user-dirs      | []  [] [] [] []       []    []  [] [] []    [] |
+     xkeyboard-config   | []                    []    []     []          |
+                        +------------------------------------------------+
+                          fr  ga gl gu he hi hr hu hy id  is it ja ka kn
+                          116 53 20  4  8  2  5 50  2 120  5 81 64  0  4
+
+                          ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
+                        +-----------------------------------------------+
+     a2ps               |                               []              |
+     aegis              |                                               |
+     ant-phone          |                                               |
+     anubis             |                               []    []        |
+     aspell             |                         []                    |
+     bash               |                                               |
+     bfd                |                                               |
+     bibshelf           |                []             []              |
+     binutils           |                                               |
+     bison              |                               []              |
+     bison-runtime      |       []    [] []             []    []        |
+     bluez-pin          |    [] []    [] []             []              |
+     bombono-dvd        |                                               |
+     buzztard           |                                               |
+     cflow              |                                               |
+     clisp              |                                               |
+     coreutils          |          []                                   |
+     cpio               |                                               |
+     cppi               |                                               |
+     cpplib             |                                               |
+     cryptsetup         |                                               |
+     dfarc              |                   []                          |
+     dialog             |    []       [] []             []    []        |
+     dico               |                                               |
+     diffutils          |                []             []              |
+     dink               |                                               |
+     doodle             |                                               |
+     e2fsprogs          |                                               |
+     enscript           |                                               |
+     exif               |                []                             |
+     fetchmail          |                                               |
+     findutils          |                                               |
+     flex               |                                               |
+     freedink           |                                     []        |
+     gas                |                                               |
+     gawk               |                                               |
+     gcal               |                                               |
+     gcc                |                                               |
+     gettext-examples   |       []       []             [] []           |
+     gettext-runtime    | []                                            |
+     gettext-tools      | []                                            |
+     gip                |                []             []              |
+     gliv               |                                               |
+     glunarclock        |                []                             |
+     gnubiff            |                                               |
+     gnucash            | ()          ()                      ()     () |
+     gnuedu             |                                               |
+     gnulib             |                                               |
+     gnunet             |                                               |
+     gnunet-gtk         |                                               |
+     gnutls             |                               []              |
+     gold               |                                               |
+     gpe-aerial         |                []                             |
+     gpe-beam           |                []                             |
+     gpe-bluetooth      |                []                []           |
+     gpe-calendar       |                []                             |
+     gpe-clock          | []    []       []             [] []           |
+     gpe-conf           | []             []                             |
+     gpe-contacts       | []             []                             |
+     gpe-edit           |                []                             |
+     gpe-filemanager    | []             []                             |
+     gpe-go             | []             []                []           |
+     gpe-login          |                []                             |
+     gpe-ownerinfo      |                []             []              |
+     gpe-package        | []             []                             |
+     gpe-sketchbook     | []             []                             |
+     gpe-su             | []    []       []             [] [] []        |
+     gpe-taskmanager    | [] [] []       []             [] []           |
+     gpe-timesheet      |                []             []              |
+     gpe-today          |       []       []             [] []           |
+     gpe-todo           |                []                   []        |
+     gphoto2            |                                               |
+     gprof              |                               []              |
+     gpsdrive           |                                               |
+     gramadoir          |                                               |
+     grep               |                                               |
+     grub               |                                               |
+     gsasl              |                                               |
+     gss                |                                               |
+     gst-plugins-bad    |                []                []           |
+     gst-plugins-base   |             [] []                             |
+     gst-plugins-good   |                []                []           |
+     gst-plugins-ugly   |             [] []             [] [] []        |
+     gstreamer          |                                               |
+     gtick              |                                               |
+     gtkam              |                                     []        |
+     gtkorphan          |                []                      []     |
+     gtkspell           |       []    [] []       []    []    [] []     |
+     gutenprint         |                                               |
+     hello              | []             []             []              |
+     hylafax            |                                               |
+     idutils            |                                               |
+     indent             |                                               |
+     iso_15924          |             [] []                             |
+     iso_3166           | [] []       () [] [] []    []       []        |
+     iso_3166_2         |                                               |
+     iso_4217           |             []                      []        |
+     iso_639            |                            []                 |
+     iso_639_3          |                            []                 |
+     jwhois             |                []                             |
+     kbd                |                                               |
+     keytouch           |                []                             |
+     keytouch-editor    |                []                             |
+     keytouch-keyboa... |                []                             |
+     klavaro            |                                     []        |
+     latrine            |                []                             |
+     ld                 |                                               |
+     leafpad            | []          [] []                             |
+     libc               | []                                            |
+     libexif            |                                               |
+     libextractor       |                                               |
+     libgnutls          |                               []              |
+     libgpewidget       |                []             []              |
+     libgpg-error       |                                               |
+     libgphoto2         |                                               |
+     libgphoto2_port    |                                               |
+     libgsasl           |                                               |
+     libiconv           |                                               |
+     libidn             |                                               |
+     lifelines          |                                               |
+     liferea            |                                               |
+     lilypond           |                                               |
+     linkdr             |                                               |
+     lordsawar          |                                               |
+     lprng              |                                               |
+     lynx               |                                               |
+     m4                 |                                               |
+     mailfromd          |                                               |
+     mailutils          |                                               |
+     make               | []                                            |
+     man-db             |                                               |
+     man-db-manpages    |                                               |
+     minicom            |                                     []        |
+     mkisofs            |                                               |
+     nano               |                               []    []        |
+     opcodes            |                                               |
+     parted             |                                               |
+     pies               |                                               |
+     popt               | []             []                   []        |
+     psmisc             |                                               |
+     pspp               |                                               |
+     pwdutils           |                                               |
+     radius             |                                               |
+     recode             |                                               |
+     rosegarden         |                                               |
+     rpm                |                                               |
+     rush               |                                               |
+     screem             |                                               |
+     scrollkeeper       |                                     []     [] |
+     sed                |                                               |
+     sharutils          |                                               |
+     shishi             |                                               |
+     skencil            |                                               |
+     solfege            |                                     []        |
+     solfege-manual     |                                               |
+     soundtracker       |                                               |
+     sp                 |                                               |
+     sysstat            |                []                             |
+     tar                |       []                                      |
+     texinfo            |                                     []        |
+     tin                |                                               |
+     unicode-han-tra... |                                               |
+     unicode-transla... |                                               |
+     util-linux-ng      |                                               |
+     vice               |                                               |
+     vmm                |                                               |
+     vorbis-tools       |                                               |
+     wastesedge         |                                               |
+     wdiff              |                                               |
+     wget               |             []                                |
+     wyslij-po          |                                               |
+     xchat              | []             [] []                          |
+     xdg-user-dirs      | [] []       [] [] []       []       [] []     |
+     xkeyboard-config   | []    []    []                                |
+                        +-----------------------------------------------+
+                          ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
+                          20  5 10  1 12 48  4  1  2  4 24 10 19  3   1
+
+                          nl  nn pa pl ps pt pt_BR ro ru rw sk sl sq sr sv
+                        +---------------------------------------------------+
+     a2ps               | []        []    []  []   [] []       []    [] []  |
+     aegis              | []                  []      []                    |
+     ant-phone          |                          []                   []  |
+     anubis             | []        []                []                []  |
+     aspell             | []                       [] []    [] []           |
+     bash               | []                                []          []  |
+     bfd                |                             []                    |
+     bibshelf           | []  []                                        []  |
+     binutils           |                             []    []              |
+     bison              | []        []                []                []  |
+     bison-runtime      | []        []    []  []   [] []       []       []  |
+     bluez-pin          | []        []        []   [] []    [] []    [] []  |
+     bombono-dvd        |     []                      ()                    |
+     buzztard           | []  []                                            |
+     cflow              |           []                                      |
+     clisp              | []                          []                    |
+     coreutils          | []        []    []  []      []       []       []  |
+     cpio               | []        []                []                []  |
+     cppi               |                                                   |
+     cpplib             | []                                            []  |
+     cryptsetup         | []                                            []  |
+     dfarc              |           []                                      |
+     dialog             | []        []        []      []                []  |
+     dico               |           []                                      |
+     diffutils          | []        []        []   [] []             [] []  |
+     dink               | ()                                                |
+     doodle             | []                                      []    []  |
+     e2fsprogs          | []        []                                  []  |
+     enscript           | []                  []   [] []       []       []  |
+     exif               | []        []             [] ()    []          []  |
+     fetchmail          | []        []                []          []        |
+     findutils          | []        []    []          []       []       []  |
+     flex               | []        []        []   [] []                []  |
+     freedink           | []        []                                      |
+     gas                |                                                   |
+     gawk               | []        []        []   []                   []  |
+     gcal               |                                               []  |
+     gcc                |                                            [] []  |
+     gettext-examples   | []        []    []       [] []    [] []    [] []  |
+     gettext-runtime    | []  []    []    []       [] []    [] []    [] []  |
+     gettext-tools      |           []             [] []    [] []    [] []  |
+     gip                | []        []                []    []       [] []  |
+     gliv               | []        []        []   [] []    []          []  |
+     glunarclock        | []                  []   []       []       [] []  |
+     gnubiff            | []                       ()                   []  |
+     gnucash            | []        ()        ()      ()                    |
+     gnuedu             | []                                                |
+     gnulib             | []        []                []       []       []  |
+     gnunet             |                                                   |
+     gnunet-gtk         |                                               []  |
+     gnutls             | []        []                                  []  |
+     gold               |                                                   |
+     gpe-aerial         | []              []  []   [] []       []    [] []  |
+     gpe-beam           | []              []  []   [] []       []    [] []  |
+     gpe-bluetooth      | []                  []                        []  |
+     gpe-calendar       |                     []      []       []    [] []  |
+     gpe-clock          | []              []  []   [] []    [] []    [] []  |
+     gpe-conf           | []              []  []   [] []    [] []       []  |
+     gpe-contacts       |                     []   [] []       []    [] []  |
+     gpe-edit           | []        []                         []       []  |
+     gpe-filemanager    | []                          []       []       []  |
+     gpe-go             | []        []        []   [] []    [] []    [] []  |
+     gpe-login          | []                  []                        []  |
+     gpe-ownerinfo      | []              []  []   [] []    [] []    [] []  |
+     gpe-package        | []                                   []       []  |
+     gpe-sketchbook     | []              []  []   [] []       []    [] []  |
+     gpe-su             | []              []  []   [] []    [] []    [] []  |
+     gpe-taskmanager    | []              []  []   [] []    [] []    [] []  |
+     gpe-timesheet      | []              []  []   [] []    [] []    [] []  |
+     gpe-today          | []              []  []   [] []    [] []    [] []  |
+     gpe-todo           | []                  []      []       []    [] []  |
+     gphoto2            | []     [] []        []   [] []    []       [] []  |
+     gprof              | []                  []   []                   []  |
+     gpsdrive           | []                          []                []  |
+     gramadoir          | []                                []          []  |
+     grep               |           []                []                    |
+     grub               |                             []                []  |
+     gsasl              | []        []                      []       [] []  |
+     gss                |           []             []       []          []  |
+     gst-plugins-bad    | []        []        []      []    []          []  |
+     gst-plugins-base   | []        []        []      []    []          []  |
+     gst-plugins-good   | []        []        []      []    []          []  |
+     gst-plugins-ugly   | []        []        []      []    [] []       []  |
+     gstreamer          | []        []        []      []    []          []  |
+     gtick              | []                          []    []              |
+     gtkam              | []     [] []        []      []    []          []  |
+     gtkorphan          | []                                            []  |
+     gtkspell           | []        []    []  []   [] []    [] [] [] [] []  |
+     gutenprint         | []                          []                []  |
+     hello              | []        []                      [] []       []  |
+     hylafax            | []                                                |
+     idutils            | []        []        []   [] []                []  |
+     indent             | []        []        []   [] []    []       [] []  |
+     iso_15924          | []        []                []       []           |
+     iso_3166           | []  [] [] []    ()  []   [] [] [] [] [] [] [] []  |
+     iso_3166_2         | []        []                                      |
+     iso_4217           | []  []    []    []          [] []    []    [] []  |
+     iso_639            | []     [] []                   [] [] []    [] []  |
+     iso_639_3          |        []                                         |
+     jwhois             | []        []        []   []                   []  |
+     kbd                | []        []             []                   []  |
+     keytouch           | []                                []          []  |
+     keytouch-editor    | []                                []          []  |
+     keytouch-keyboa... | []                                []          []  |
+     klavaro            | []                  []                            |
+     latrine            |           []                []                    |
+     ld                 |                                               []  |
+     leafpad            | []  []    []    []  []      []    [] []    [] []  |
+     libc               | []        []                []    []          []  |
+     libexif            | []        []        ()            []              |
+     libextractor       |                                                   |
+     libgnutls          | []        []                                  []  |
+     libgpewidget       | []        []                         []       []  |
+     libgpg-error       |           []             []                   []  |
+     libgphoto2         | []        []                                      |
+     libgphoto2_port    | []        []                []    []          []  |
+     libgsasl           | []        []             []       []       [] []  |
+     libiconv           | []        []                      [] []    [] []  |
+     libidn             | []        []                                  ()  |
+     lifelines          | []        []                                  []  |
+     liferea            | []        []    []  []   [] ()    ()    []    []  |
+     lilypond           | []                                                |
+     linkdr             | []              []          []                []  |
+     lordsawar          |                                                   |
+     lprng              |           []                                      |
+     lynx               | []                  []      []                []  |
+     m4                 | []        []        []   [] []                []  |
+     mailfromd          |           []                                      |
+     mailutils          |           []                                      |
+     make               | []        []        []      []                []  |
+     man-db             | []        []                []                []  |
+     man-db-manpages    | []        []                []                    |
+     minicom            |           []        []   [] []                []  |
+     mkisofs            | []                          []                    |
+     nano               | []                  []      []                []  |
+     opcodes            | []                       []                   []  |
+     parted             | []        []                []    []          []  |
+     pies               |           []                                      |
+     popt               | []        []    []          []                []  |
+     psmisc             | []        []                []                []  |
+     pspp               | []                  []                            |
+     pwdutils           |           []                                  []  |
+     radius             | []        []                []                    |
+     recode             | []        []    []  []   [] []    [] []       []  |
+     rosegarden         |           ()                ()                ()  |
+     rpm                | []        []    []                            []  |
+     rush               |           []                                      |
+     screem             |                                                   |
+     scrollkeeper       | []  []    []             [] []    []    [] [] []  |
+     sed                | []        []    []  []   [] []    [] []    [] []  |
+     sharutils          | []        []                []             [] []  |
+     shishi             |           []                                      |
+     skencil            |                 []  []                        []  |
+     solfege            | []        []        []      []                []  |
+     solfege-manual     | []        []        []                            |
+     soundtracker       |                                   []          []  |
+     sp                 |                                                   |
+     sysstat            | []        []        []      []                    |
+     tar                | []        []                []       []       []  |
+     texinfo            | []        []             [] []                []  |
+     tin                |                             []                    |
+     unicode-han-tra... |                                                   |
+     unicode-transla... |                                                   |
+     util-linux-ng      | []        []        []      []       []       []  |
+     vice               | []                                            ()  |
+     vmm                | []                                                |
+     vorbis-tools       | []        []                                      |
+     wastesedge         | []                                                |
+     wdiff              | []        []                                  []  |
+     wget               | []        []    []  []      []    [] []       []  |
+     wyslij-po          | []  []                                            |
+     xchat              | []     [] []    []          []    [] [] [] [] []  |
+     xdg-user-dirs      | []  [] [] [] [] []  []   [] []    [] [] [] [] []  |
+     xkeyboard-config   | []        []                []    [] []       []  |
+                        +---------------------------------------------------+
+                          nl  nn pa pl ps pt pt_BR ro ru rw sk sl sq sr sv
+                          132 10  7 96  1 29  60   47 89  3 54 46  8 37 118
+
+                          sw ta te tg th tr uk vi  wa zh_CN zh_HK zh_TW
+                        +-----------------------------------------------+
+     a2ps               |             [] [] [] []                       | 27
+     aegis              |                      []                       |  9
+     ant-phone          |                []    []      []               |  8
+     anubis             |                [] [] []                       | 15
+     aspell             |                   [] []  []                   | 20
+     bash               |                      []                       |  9
+     bfd                |                      []                       |  5
+     bibshelf           |                      []      []               | 16
+     binutils           |                   [] []                       |  8
+     bison              |                      []                       | 12
+     bison-runtime      |             []    [] []      []          []   | 29
+     bluez-pin          |             [] [] [] []  []  []          []   | 37
+     bombono-dvd        |                      []                       |  3
+     buzztard           |                                               |  6
+     cflow              |                   [] []      []               |  9
+     clisp              |                                               | 10
+     coreutils          |                   [] []      []               | 22
+     cpio               |                [] [] []      []          []   | 13
+     cppi               |                      []                       |  2
+     cpplib             |                [] [] []      []          []   | 13
+     cryptsetup         |                      []                       |  7
+     dfarc              |                      []                       |  9
+     dialog             | []          []       []  []  []          []   | 30
+     dico               |                   []                          |  2
+     diffutils          |                [] [] []      []          []   | 30
+     dink               |                                               |  4
+     doodle             |                      []                       |  7
+     e2fsprogs          |                []    []                       | 11
+     enscript           |                [] [] []                       | 17
+     exif               |                      []      []               | 16
+     fetchmail          |                []    []      []               | 17
+     findutils          |                [] [] []      []               | 20
+     flex               |                []    []                  []   | 15
+     freedink           |                      []                       | 10
+     gas                |                []                             |  4
+     gawk               |                []    []      []               | 18
+     gcal               |                []                             |  5
+     gcc                |                []            []               |  7
+     gettext-examples   |                [] [] []      []    []    []   | 34
+     gettext-runtime    |                [] [] []      []    []    []   | 30
+     gettext-tools      |                [] [] []      []          []   | 22
+     gip                |                      []      []          []   | 22
+     gliv               |                []    []                       | 14
+     glunarclock        |                      []  []  []          []   | 19
+     gnubiff            |                      []                       |  4
+     gnucash            |                () [] ()                  ()   |  9
+     gnuedu             |                      []                  []   |  7
+     gnulib             |                   [] []      []               | 16
+     gnunet             |                      []                       |  1
+     gnunet-gtk         |                []    []                       |  5
+     gnutls             |                      []      []               | 10
+     gold               |                                               |  3
+     gpe-aerial         |                      []      []               | 18
+     gpe-beam           |                      []      []               | 19
+     gpe-bluetooth      |                      []      []               | 12
+     gpe-calendar       |                      []  []  []               | 12
+     gpe-clock          |                []    []  []  []               | 28
+     gpe-conf           |                      []  []  []               | 20
+     gpe-contacts       |                      []      []               | 17
+     gpe-edit           |                      []      []               | 12
+     gpe-filemanager    |                      []  []  []               | 16
+     gpe-go             |                []    []  []  []               | 25
+     gpe-login          |                      []      []               | 11
+     gpe-ownerinfo      |                []    []      []          []   | 25
+     gpe-package        |                      []      []               | 13
+     gpe-sketchbook     |                      []      []               | 20
+     gpe-su             |                []    []  []  []               | 30
+     gpe-taskmanager    |                []    []  []  []               | 28
+     gpe-timesheet      |                []    []      []          []   | 25
+     gpe-today          |                []    []  []  []          []   | 29
+     gpe-todo           |                      []  []  []               | 17
+     gphoto2            |                   [] []      []          []   | 24
+     gprof              |                []    []                       | 15
+     gpsdrive           |                      []      []               | 11
+     gramadoir          |                      []      []               | 11
+     grep               |             []       []                       |  6
+     grub               |                      []      []               |  9
+     gsasl              |                      []      []          []   | 14
+     gss                |                      []      []               | 11
+     gst-plugins-bad    |                []    []      []               | 22
+     gst-plugins-base   |                [] [] []      []               | 24
+     gst-plugins-good   |                [] [] []      []               | 25
+     gst-plugins-ugly   |                [] [] []      []               | 29
+     gstreamer          |                   [] []      []               | 22
+     gtick              |                   [] []      []               | 13
+     gtkam              |                      []      []               | 20
+     gtkorphan          |                      []      []               | 14
+     gtkspell           |             [] [] [] []  []  []    []    []   | 45
+     gutenprint         |                                               |  9
+     hello              |             [] []    []      []          []   | 21
+     hylafax            |                      []                       |  5
+     idutils            |                []    []      []               | 17
+     indent             |                [] [] []      []          []   | 30
+     iso_15924          |             ()    [] ()      []          []   | 16
+     iso_3166           |       []    () [] [] ()  []  []    []    ()   | 51
+     iso_3166_2         |             ()    [] ()      []               |  7
+     iso_4217           |             () [] [] ()      []    []         | 26
+     iso_639            |    [] []    ()    [] ()  []  []    []    []   | 34
+     iso_639_3          |    []                ()                       |  7
+     jwhois             |                []    []      []          []   | 16
+     kbd                |                [] [] []      []               | 15
+     keytouch           |                      []      []               | 15
+     keytouch-editor    |                      []      []               | 13
+     keytouch-keyboa... |                      []      []               | 13
+     klavaro            |                      []                       | 11
+     latrine            |                []    []      []               | 10
+     ld                 |                []    []                  []   | 11
+     leafpad            |                [] [] []      []          []   | 33
+     libc               |                []    []      []          []   | 21
+     libexif            |                      []      ()               |  6
+     libextractor       |                      []                       |  1
+     libgnutls          |                      []      []               |  9
+     libgpewidget       |                      []      []               | 14
+     libgpg-error       |                      []      []               |  9
+     libgphoto2         |                   [] []                       |  7
+     libgphoto2_port    |                   [] []                  []   | 13
+     libgsasl           |                      []      []               | 13
+     libiconv           |                      []  []  []               | 21
+     libidn             |                      []      []               | 11
+     lifelines          |                                               |  4
+     liferea            |                []            []               | 21
+     lilypond           |                      []                       |  7
+     linkdr             |                []    []      []          []   | 17
+     lordsawar          |                                               |  1
+     lprng              |                      []                       |  3
+     lynx               |                [] [] []                       | 17
+     m4                 |                      []      []          []   | 19
+     mailfromd          |                   [] []                       |  3
+     mailutils          |                      []                       |  5
+     make               |                []    []      []               | 21
+     man-db             |                      []      []               |  8
+     man-db-manpages    |                                               |  4
+     minicom            |                      []                       | 16
+     mkisofs            |                              []               |  7
+     nano               |                      []      []          []   | 20
+     opcodes            |                []    []                       | 11
+     parted             |                [] [] []                  []   | 15
+     pies               |                   []                          |  2
+     popt               |             [] []    []      []          []   | 27
+     psmisc             |                      []                       | 12
+     pspp               |                                               |  4
+     pwdutils           |                      []                       |  6
+     radius             |                   [] []                       |  9
+     recode             |                []    []      []               | 28
+     rosegarden         |                                               |  0
+     rpm                |                      []                  []   | 11
+     rush               |                   [] []                       |  3
+     screem             |                      []                       |  3
+     scrollkeeper       |                [] [] []                  []   | 27
+     sed                |                []    []      []          []   | 30
+     sharutils          |                []    []      []          []   | 22
+     shishi             |                      []                       |  3
+     skencil            |                      []                       |  7
+     solfege            |                []    []      []               | 16
+     solfege-manual     |                []                             |  8
+     soundtracker       |                []    []                       |  9
+     sp                 |                []                             |  3
+     sysstat            |                      []      []               | 15
+     tar                |                [] [] []      []          []   | 23
+     texinfo            |                []    []      []               | 15
+     tin                |                                               |  4
+     unicode-han-tra... |                                               |  0
+     unicode-transla... |                                               |  2
+     util-linux-ng      |                [] [] []                       | 20
+     vice               |                ()                             |  1
+     vmm                |                      []                       |  4
+     vorbis-tools       |                      []                       |  6
+     wastesedge         |                                               |  2
+     wdiff              |                      []                       |  6
+     wget               |                []    []      []          []   | 25
+     wyslij-po          |                      []                       |  6
+     xchat              |             []    [] []      []          []   | 36
+     xdg-user-dirs      |    []       [] [] [] []      []    []    []   | 57
+     xkeyboard-config   |                [] [] []                       | 25
+                        +-----------------------------------------------+
+       82 teams           sw ta te tg th tr uk vi  wa zh_CN zh_HK zh_TW
+      174 domains          1  3  2  0 10 66 48 149 17  96     7    41    2551
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If March 2010 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
+matrix with full percentage details can be found at
+`http://translationproject.org/extra/matrix.html'.
+
+1.6 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+`coordinator@translationproject.org' to make the `.pot' files available
+to the translation teams.
+
diff --git a/AUTHORS b/AUTHORS
index 38ed6fe0428e4c9e4967860054f06cee66eae708..1003445bdb38ace03711769d8756a298a6cb3008 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -14,7 +14,16 @@ revisions to other modules.
 including lib/gslextras and the linear regression features. Jason 
 is also an important contributor to GSL, which is used by PSPP. 
 
-* Harry Thijssen contributed and maintains the Dutch translation.
+* Translators:
+
+  - Dutch: Harry Thijssen.
+
+  - Catalan and Spanish: Palmira Payá Sanchez, Javier Gómez Serrano,
+    and Francesc Josep Miguel Quesada.
+
+  - British English: John Darrington.
+
+  - Brazilian Portuguese: Michel Almada de Castro Boaventura.
 
 We also thank past contributors:
 
diff --git a/INSTALL b/INSTALL
index 177e383018263fd852ef72e4e5074d74b9f2db49..6654e90bb52507a395ac9be49812e69529f3e41a 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -33,16 +33,17 @@ The following packages are required to install PSPP:
       If you don't have a version already, you can install GNU
       libiconv (http://www.gnu.org/software/libiconv/).
 
-    * GNU make (http://www.gnu.org/software/make).  Version 3.81 is
-      known to work; other versions will likely work too.  Non-GNU
-      "make" programs will probably not work.
+    * libintl, from GNU gettext (http://ww.gnu.org/software/gettext).
+      GNU libc includes an integrated libintl, so there is no need to
+      separately install libintl on a GNU/Linux system.
 
-The following package is required to enable PSPP's graphing features.
-If you cannot arrange to install it, you must run `configure' with
---without-libplot.
+The following packages are required to enable PSPP's graphing
+features.  If you cannot arrange to install them, you must run
+`configure' with --without-cairo.
 
-    * libplot, from GNU plotutils
-      (http://www.gnu.org/software/plotutils/).
+    * Cairo (http://cairographics.org/), version 1.5 or later.
+
+    * Pango (http://www.pango.org/), version 1.22 or later.
 
 The following packages are required to enable PSPPIRE, the graphical
 user interface for PSPP.  If you cannot install them or do not wish to
@@ -54,10 +55,6 @@ use the GUI, you must run `configure' with --without-gui.
 
     * GTK+ (http://www.gtk.org/), version 2.12.0 or later.
 
-    * pkg-config (http://pkg-config.freedesktop.org/wiki/).  Versions
-      0.18 and 0.19 have a bug that will prevent library detection,
-      but other versions should be fine.
-
 To cross-compile PSPP, you will likely need to set the
 PKG_CONFIG_LIBDIR environment variable to point to an
 appropriate pkg-config for the cross-compilation environment.
@@ -69,6 +66,11 @@ Gnumeric files.
 
     * libxml2 (http://xmlsoft.org/).  
 
+Installing the following packages will allow your PSPP binary to write
+OpenDocument text (ODT) files:
+
+    * libxml2 (http://xmlsoft.org/).  
+
 The following packages are optional.
 
     * libncurses (http://www.gnu.org/software/ncurses/).  Without it,
@@ -144,9 +146,7 @@ release.
      `configure', additional features will be available in your PSPP
      installation.
 
-  2. Type `make' to compile the package.  (If GNU make is installed
-     under a different program name, e.g. "gmake", run that program
-     instead in this step and in the following steps as well.)
+  2. Type `make' to compile the package.
 
   3. Optionally, type `make check' to run the self-tests that come
      with the package.  If any of the self-tests fail, please mail
@@ -215,14 +215,17 @@ suffix on their names by giving `configure' the  option
 Optional Features
 =================
 
-`--without-libplot'
-    Don't compile in support for charts (using libplot).  This is
-    useful if your system doesn't have the libplot library.
+`--without-cairo'
+    Don't compile in support for charts (using Cairo and Pango).  This
+    is useful if your system lacks these libraries.
 
 `--without-gui'
     Don't build the PSPPIRE gui.  Use this option if you only want to
     build the command line version of PSPP.
 
+    Cairo and Pango required to build the GUI, so --without-cairo
+    implies --without-gui.
+
 `--with-gui-tools'
     Build the gui developer tools.  There is no reason to use this
     option unless you're involved with the development of PSPP
@@ -234,6 +237,10 @@ Optional Features
     In these cases you can use --without-lib{xx} to force configure
     to disregard it.
 
+`--without-perl-module'
+   Disable building the Perl module, in case it does not build properly
+   or you do not need it.
+
 `--enable-anachronistic-dependencies'
    If you use this option, some of the checks for dependent libraries
    will be relaxed, permitting configure to succeed when older versions
index 6fca4b1c29699b2bd77cb74fe4b416a7b0d9ac9e..78790a431da0dae13e2487c3ce7a8c82ce517ab7 100644 (file)
@@ -1,16 +1,15 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
-AUTOMAKE_OPTIONS = gnits 1.10 subdir-objects
+AUTOMAKE_OPTIONS = std-options check-news 1.10.1 subdir-objects
 
-SUBDIRS = gl
+SUBDIRS = gl po
 DISTCLEANFILES = ./po/stamp-po xconfigure 
 BUILT_SOURCES =
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/gl \
        -I$(top_builddir)/gl \
-       -DINSTALLDIR=\"$(bindir)\" \
-       -DDOCDIR=\"$(docdir)\"
+       -DINSTALLDIR=\"$(bindir)\"
 
 AM_CFLAGS=
 
@@ -19,8 +18,6 @@ AM_CFLAGS+=-Wall -W -Wwrite-strings -Wstrict-prototypes \
 -Wpointer-arith -Wno-sign-compare -Wmissing-prototypes
 endif
 
-CC_FOR_BUILD = @CC_FOR_BUILD@
-EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
 .q.c:
        @$(MKDIR_P) `dirname $@`
        ./src/language/lexer/q2c$(EXEEXT_FOR_BUILD) $< $@
@@ -28,7 +25,7 @@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
 $(all_q_sources:.q=.c): src/language/lexer/q2c$(EXEEXT_FOR_BUILD)
 all_q_sources =
 
-pkgsysconfdir = $(sysconfdir)/@PACKAGE@
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
 
 
 EXTRA_DIST = OChangeLog ONEWS config.rpath pspp-mode.el
@@ -36,6 +33,7 @@ EXTRA_DIST = OChangeLog ONEWS config.rpath pspp-mode.el
 CLEANFILES = 
 CLEAN_LOCAL =
 ALL_LOCAL =
+CHECK_LOCAL =
 ACLOCAL_AMFLAGS = -I m4 -I gl/m4
 noinst_LIBRARIES=
 noinst_LTLIBRARIES=
@@ -46,6 +44,7 @@ DIST_HOOKS =
 INSTALL_DATA_HOOKS = 
 UNINSTALL_DATA_HOOKS =
 PHONY =
+SUFFIXES = .q
 
 generate-changelog:
        if test -d $(top_srcdir)/.git; then                     \
@@ -61,7 +60,6 @@ DIST_HOOKS += generate-changelog
 include $(top_srcdir)/po/automake.mk
 include $(top_srcdir)/lib/automake.mk
 include $(top_srcdir)/doc/automake.mk
-include $(top_srcdir)/config/automake.mk
 include $(top_srcdir)/examples/automake.mk
 include $(top_srcdir)/src/automake.mk
 
@@ -87,6 +85,7 @@ uninstall-hook: $(UNINSTALL_DATA_HOOKS)
 
 clean-local: $(CLEAN_LOCAL)
 all-local: $(ALL_LOCAL)
+check-local: $(CHECK_LOCAL)
 
 # A convenience target to build all the binaries
 programs: $(PROGRAMS)
diff --git a/NEWS b/NEWS
index 1aac688c8736a3b66322cf993fbc0f195ee9920f..ce98d876dd59178b7667bf54d2ed6aeac68f6a06 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,26 @@
 PSPP NEWS -- history of user-visible changes.
-Time-stamp: <2009-09-08 21:08:29 blp>
-Copyright (C) 1996-9, 2000, 2008, 2009 Free Software Foundation, Inc.
+Time-stamp: <2010-04-25 21:08:59 blp>
+Copyright (C) 1996-9, 2000, 2008, 2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
 Please send PSPP bug reports to bug-gnu-pspp@gnu.org.
 
+Changes from 0.7.3 to 0.7.4:
+
+ * The MRSETS command is now implemented.
+
+Changes from 0.7.2 to 0.7.3:
+
+ * Charts are now produced with Cairo and Pango, instead of libplot.
+   Without them, the new graphing features will not work.  If you do
+   not have Cairo and Pango installed, you must run `configure' with
+   --without-cairo.
+
+ * The new "cairo" output driver supports output in PostScript, PDF,
+   and SVG formats.  Its functionality is a superset of that of the
+   "postscript" driver, which has been removed.  You must have Cairo
+   and Pango installed to build the "cairo" driver.
+
 Changes from 0.7.1 to 0.7.2:
 
  * Updated Perl module interface.
@@ -54,8 +70,7 @@ Changes from 0.6.2-pre6 to 0.7.0:
 
   * A tutorial chapter has been added to the user manual.
 
-
-Changes from 0.6.1 to 0.6.2-pre6:
+Changes from 0.6.1 to 0.6.2
 
   * New translations:
 
@@ -77,6 +92,8 @@ Changes from 0.6.1 to 0.6.2-pre6:
 
   * Build fixes and changes:
 
+    - Fix build with GTK+ 2.17.4 and later.
+
     - Make running "make" after running "configure" with different
       settings reliably rebuild version.c.
 
@@ -100,6 +117,9 @@ Changes from 0.6.1 to 0.6.2-pre6:
 
     - Fix writing corrupted .sav files on Windows.
 
+    - Fix writing variable labels longer than 252 bytes to save files.
+      Thanks to Robert Westlund for reporting this bug.
+
     - Fix writing corrupted .por files (bug #26034).
 
     - Fix reading .por files whose initial lines are not padded out
diff --git a/README b/README
index 02e81d77e9525093cc3252d38903717b6252b9eb..d1c78db2c20bca092cbde646171aec4fc78068b6 100644 (file)
--- a/README
+++ b/README
@@ -4,7 +4,7 @@ is a free replacement for the proprietary program SPSS.
 PSPP development is ongoing. It already supports a large subset of
 SPSS's syntax.  Its statistical procedure support is currently
 limited, but growing.  At your option, PSPP will produce statistical
-reports in ASCII, PostScript, or HTML formats. 
+reports in ASCII, PostScript, PDF, HTML, SVG, or OpenDocument formats. 
 
 Instructions for PSPP installation are in INSTALL, including a list of
 prerequisite packages and other PSPP-specific information.  Full
@@ -52,8 +52,8 @@ following support to users:
 
        * Attractive output, including graphs, in a variety of human-
           and machine-readable formats.  PSPP currently produces
-          output in ASCII, PostScript, and HTML formats.  We will
-          enhance PSPP's output formatting in the future.
+          output in ASCII, PostScript, PDF, HTML, and SVG formats.  We
+          will enhance PSPP's output formatting in the future.
 
        * Good documentation.  Currently the PSPP manual describes its
           language completely, but we would like to add information on
index 753423e3e98bd4a1f816309f637f51826d0bb7a1..1a6b9765dd9e06b95f7b28a9fc1f9eb24b77991b 100644 (file)
@@ -34,11 +34,11 @@ This version of PSPP should work with the Gnulib commit shown below.
 Gnulib does not maintain a stable API or ABI, so it is possible that
 PSPP will not work with older or newer versions of Gnulib.
 
-    commit e21985ad14508137d75b0dccf064adfc4e5888c6
+    commit 75dc5a3dbe3c65f57adc9533561100079922e180
     Author: Bruno Haible <bruno@clisp.org>
-    Date:   Mon Sep 28 23:25:49 2009 +0200
+    Date:   Wed May 19 23:30:18 2010 +0200
 
-       Avoid identifier clash with POSIX function 'remove' defined as a macro.
+       Clean up dead code in recent commit.
 
 To clone Gnulib into a directory named "gnulib" using Git, and then
 check out this particular commit, run these commands:
diff --git a/Smake b/Smake
index e8ffdd5705b2802df79ef79b6ccf90b075a521c0..22c0f692de0638be8e8d5405da76d573837086e2 100644 (file)
--- a/Smake
+++ b/Smake
@@ -5,13 +5,14 @@ GNULIB = ../gnulib
 GNULIB_TOOL = $(GNULIB)/gnulib-tool
 
 GNULIB_MODULES = \
-       argp \
        assert \
        byteswap \
        c-ctype \
        c-strtod \
        close \
+       configmake \
        count-one-bits \
+       crc \
        crypto/md4 \
        dirname \
        environ \
@@ -25,9 +26,7 @@ GNULIB_MODULES = \
         fseeko \
         ftello \
        fwriteerror \
-       gethostname \
        getline \
-       getlogin_r \
        getopt \
        gettext-h \
        gettimeofday \
@@ -46,6 +45,7 @@ GNULIB_MODULES = \
        mempcpy \
        memset \
        minmax \
+       mkdtemp \
        mkstemp \
        printf-posix \
        printf-safe \
@@ -65,7 +65,6 @@ GNULIB_MODULES = \
        strcspn \
        strerror \
        strftime \
-       strsep \
        strtod \
        strtok_r \
        strtol \
@@ -81,6 +80,8 @@ GNULIB_MODULES = \
        unistr/u8-strncat \
        unlocked-io \
        vasprintf-posix \
+       version-etc \
+       version-etc-fsf \
        vfprintf-posix \
        vprintf-posix \
        vsnprintf \
@@ -138,7 +139,6 @@ po/Makevars.template po/pspp.pot
 
 clean:
        rm -f config.sub config.guess config.rpath
-       rm -f ABOUT-NLS
        rm -fr autom4te.cache
        rm -f aclocal.m4
        rm -f missing mkinstalldirs
diff --git a/THANKS b/THANKS
index 5af731084b7a32f5e571832a10a4e2680609afca..baa4354ad4126b98fbc9c5e0242ea4280edb8314 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -13,4 +13,4 @@ Thanks to...
 
      * Jim Van Zandt for Debian packaging and suggestions.
 
-     * The authors of libplot and libgsl for providing those libraries.
+     * The coordinators and translators at translationproject.org.
diff --git a/TODO b/TODO
deleted file mode 100644 (file)
index 4889f5d..0000000
--- a/TODO
+++ /dev/null
@@ -1,64 +0,0 @@
-Time-stamp: <2006-12-17 18:45:35 blp>
-
-Get rid of need for GNU diff in `make check'.
-
-CROSSTABS needs to be re-examined.
-
-Scratch variables should not be available for use following TEMPORARY.
-
-Check our results against the NIST StRD benchmark results at
-strd.itl.nist.gov/div898/strd
-
-Storage of value labels on disk is inefficient.  Invent new data structure.
-
-Fix spanned joint cells, i.e., EDLEVEL on crosstabs.stat.
-
-SELECT IF should be moved before other transformations whenever possible.  It
-should only be impossible when one of the variables referred to in SELECT IF is
-created or modified by a previous transformation.
-
-Figure out a stylesheet for messages displayed by PSPP: i.e., what quotation
-marks around filenames, etc.
-
-From Zvi Grauer <z.grauer@csuohio.edu> and <zvi@mail.ohio.net>:
-
-   1. design of experiments software, specifically Factorial, response surface
-   methodology and mixrture design.
-
-   These would be EXTREMELY USEFUL for chemists, engineeris, and anyone
-   involved in the production of chemicals or formulations.
-
-   2. Multidimensional Scaling analysis (for market analysis) -
-
-   3. Preference mapping software for market analysis
-
-   4. Hierarchical clustering (as well as partition clustering)
-
-   5. Conjoint analysis
-
-   6. Categorical data analsys ?
-
-Sometimes very wide (or very tall) columns can occur in tables.  What is a good
-way to truncate them?  It doesn't seem to cause problems for the ascii or
-postscript drivers, but it's not good in the general case.  Should they be
-split somehow?  (One way that wide columns can occur is through user request,
-for instance through a wide PRINT request--try time-date.stat with a narrow
-ascii page or with the postscript driver on letter size paper.)
-
-From Moshe Braner <mbraner@nessie.vdh.state.vt.us>: An idea regarding MATCH
-FILES, again getting BEYOND the state of SPSS: it always bothered me that if I
-have a large data file and I want to match it to a small lookup table, via
-MATCH FILES FILE= /TABLE= /BY key, I need to SORT the large file on key, do the
-match, then (usually) re-sort back into the order I really want it.  There is
-no reason to do this, when the lookup table is small.  Even a dumb sequential
-search through the table, for every case in the big file, is better, in some
-cases, than the sort.  So here's my idea: first look at the /TABLE file, if it
-is "small enough", read it into memory, and create an index (or hash table,
-whatever) for it.  Then read the /FILE and use the index to match to each case.
-OTOH, if the /TABLE is too large, then do it the old way, complaining if either
-file is not sorted on key.
-
-Local Variables:
-mode: text
-fill-column: 79
-End:
index 307ce149a4344f3f5e373146cac3fefea7b5a08c..14d11dc70a26e44bc22f28bac8ca5418360c4843 100644 (file)
@@ -43,40 +43,6 @@ AC_DEFUN([PSPP_PERL],
   AC_SUBST([VERSION_FOR_PERL])
 ])
 
-dnl Check that libplot is available.
-AC_DEFUN([PSPP_LIBPLOT],
-[
-  AC_ARG_WITH(
-    libplot, 
-    [AS_HELP_STRING([--without-libplot],
-                    [don't compile in support of charts (using libplot)])])
-
-  if test x"$with_libplot" != x"no" ; then 
-    # Check whether we can link against libplot without any extra libraries.
-    AC_CHECK_LIB(plot, pl_newpl_r, [LIBPLOT_LIBS="-lplot"])
-
-    # Check whether we can link against libplot if we also link X.
-    if test x"$LIBPLOT_LIBS" = x""; then
-      AC_PATH_XTRA
-      extra_libs="-lXaw -lXmu -lXt $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS -lm"
-      AC_CHECK_LIB(plot, pl_newpl_r,
-                  [LIBPLOT_LIBS="-lplot $extra_libs"
-                    LDFLAGS="$LDFLAGS $X_LIBS"],,
-                  [$extra_libs])
-    fi
-
-    # Still can't link?
-    if test x"$LIBPLOT_LIBS" = x""; then
-      PSPP_REQUIRED_PREREQ([libplot (or use --without-libplot)])
-    fi
-
-    # Set up to make everything work.
-    LIBS="$LIBPLOT_LIBS $LIBS"
-    AC_DEFINE(HAVE_LIBPLOT, 1,
-              [Define to 1 if you have the `libplot' library (-lplot).])
-  fi
-])
-
 dnl PSPP_CHECK_CC_OPTION([OPTION], [ACTION-IF-ACCEPTED], [ACTION-IF-REJECTED])
 dnl Check whether the given C compiler OPTION is accepted.
 dnl If so, execute ACTION-IF-ACCEPTED, otherwise ACTION-IF-REJECTED.
diff --git a/config/OChangeLog b/config/OChangeLog
deleted file mode 100644 (file)
index dbf6c3a..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-2007-09-25  Ben Pfaff  <blp@gnu.org>
-
-       * devices (tty-ascii): Set length and width to "auto", so that
-       they reflect the current size of the terminal window as it
-       changes.
-
-2007-09-22  Ben Pfaff  <blp@gnu.org>
-
-       Bug #21128.  Reviewed by John Darrington.
-
-       * papersize: Removed.
-
-       * automake.mk (dist_pkgsysconf_DATA): Remove papersize.
-
-2007-08-26  Ben Pfaff  <blp@gnu.org>
-
-       * devices: Change raw-ascii from screen to listing device (because
-       that's how it's used).
-
-2007-07-25  Ben Pfaff  <blp@gnu.org>
-
-       * devices: Add tty and listing devices that use VT100 (and xterm)
-       line-drawing characters.
-
-2007-07-25  Ben Pfaff  <blp@gnu.org>
-
-       * devices: Add an "interactive" category that defaults to
-       tty-ascii.  Make the tty-ascii device more user-friendly.
-
-Tue Apr  4 20:20:49 2006  Ben Pfaff  <blp@gnu.org>
-
-       * automake.mk: Fix bugs in installation targets.
-
-Mon Apr  3 11:01:16 2006  Ben Pfaff  <blp@gnu.org>
-
-       * automake.mk: (pkgsysconf_DATA) Add AFM files in config/psfonts.
-       Remove config/html-prologue, config/ps-prologue.
-
-       * html-prologue: Removed.
-
-       * ps-prologue: Removed.
-
-       * psfonts/Courier-Bold.afm, psfonts/Courier-BoldOblique.afm,
-       psfonts/Courier-Oblique.afm, psfonts/Courier.afm,
-       psfonts/Helvetica-Bold.afm, psfonts/Helvetica-BoldOblique.afm,
-       psfonts/Helvetica-Oblique.afm, psfonts/Helvetica.afm,
-       psfonts/Times-Bold.afm, psfonts/Times-BoldItalic.afm,
-       psfonts/Times-Italic.afm, psfonts/Times-Roman.afm: New files.
-
-Sat Feb 11 21:58:29 2006  Ben Pfaff  <blp@gnu.org>
-
-       * html-prologue: Don't use ${source-file}, which is no longer
-       supported.
-
-Tue Dec 30 22:37:04 2003  Ben Pfaff  <blp@gnu.org>
-
-       * devices: Add "squeeze=on top-margin=0 bottom-margin=0" to
-       raw-ascii to make test output more readable.
-
-Sun May 24 22:40:13 1998  Ben Pfaff  <blp@gnu.org>
-
-       * ps-prologue: Add %%DocumentMedia: comment.
-
-Wed May 20 00:02:51 1998  Ben Pfaff  <blp@gnu.org>
-
-       * ps-prologue: Comment out misleading Bounding-Box comment for
-       now.  SF arguments rearranged.  BP removed.
-
-Wed Apr 15 13:00:46 1998  Ben Pfaff  <blp@gnu.org>
-
-       * Makefile.am: (private-install) Make it work for separate source
-       and build directories.
-
-       * ps-prologue: New TL macro for a thick line.  New thick-width arg
-       to BP.
-
-Sun Jan  4 18:11:11 1998  Ben Pfaff  <blp@gnu.org>
-
-       * ps-prologue: Minor reorganization.  New GB macro to draw a gray
-       box.
-
-Wed Dec 24 22:35:13 1997  Ben Pfaff  <blp@gnu.org>
-
-       * devices: Added devicetype options and documentation for them.
-
-Fri Dec  5 21:51:08 1997  Ben Pfaff  <blp@gnu.org>
-
-       * Makefile.am: (pkgsysconf_DATA) Add html-prologue.
-       (EXTRA_DIST) Add html-prologue.
-
-       * devices: Add `html' device.  Add `listing', `screen', and
-       `printer' flags to devices as appropriate.
-
-       * html-prologue: New file.
-
-       * ps-prologue: Comment fixes.
-
-Thu Sep 18 21:31:02 1997  Ben Pfaff  <blp@gnu.org>
-
-       * Makefile.am: (pkgsysconfdir) Changed from $(pkgdatadir) to
-       $(sysconfdir)/$(PACKAGE).
-
-Thu Aug 14 22:05:54 1997  Ben Pfaff  <blp@gnu.org>
-
-       * devices: (tty) Define as null instead of not defining.
-
-Sun Aug  3 11:33:28 1997  Ben Pfaff  <blp@gnu.org>
-
-       * devices: tty-ascii has no bold or italic by default.
-
-Wed Jun 25 22:50:19 1997  Ben Pfaff  <blp@gnu.org>
-
-       * Makefile.am: (EXTRA_DIST) New target.
-
-Mon May  5 21:56:54 1997  Ben Pfaff  <blp@gnu.org>
-
-       * devices, papersize, ps-prologue: Comment fixes.
-
-Fri May  2 22:05:44 1997  Ben Pfaff  <blp@gnu.org>
-
-       * Makefile.am: Removed ps-fontmap.
-
-       * ps-fontmap: Removed.
-
-       * ps-prologue: Added comments.  Fixed DSC comments.
-       (BP) Two new arguments; fixed problem with SF argument conflict
-       with SF function.
-
-Thu May  1 14:57:52 1997  Ben Pfaff  <blp@gnu.org>
-
-       * ps-prologue: (BP) New argument, SF or scale factor.
-       
-Fri Apr 18 16:48:41 1997  Ben Pfaff  <blp@gnu.org>
-
-       * Makefile.am: New file.
-       
-       * environment: Comment fix.
-
-Sat Feb 15 21:26:53 1997  Ben Pfaff  <blp@gnu.org>
-
-       * devices: Added ml520 and ml520-ul printer devices.
-
-Sat Jan 11 15:44:15 1997  Ben Pfaff  <blp@gnu.org>
-
-       * devices: Default listing device is list-ascii, not list-ibmpc.
-
-Sun Dec 29 21:36:48 1996  Ben Pfaff  <blp@gnu.org>
-
-       * devices: Changed default devices.
-
-Sat Sep  7 22:35:12 1996  Ben Pfaff  <blp@gnu.org>
-
-       * ps-prologue: Added `!encodings' line to cause encodings to be
-       output.
-       (T) Fixed.  Yes, really this time.
-
-Thu Sep  5 22:05:56 1996  Ben Pfaff  <blp@gnu.org>
-
-       * ps-prologue: (T) Now works correctly.
-       (SF) Parameters changed to: size in psus, target font name,
-       encoding, PostScript font name.
-
-Wed Sep  4 21:45:35 1996  Ben Pfaff  <blp@gnu.org>
-
-       * prologue.ps: Renamed ps-prologue, all references changed.
-       (T) New definition.
-
-       * ps-encodings: New PostScript configuration file (not present in
-       distribution).
-
-Sat Aug 31 23:52:38 1996  Ben Pfaff  <blp@gnu.org>
-
-       * prologue.ps: One minor comment change.
-
-Thu Aug 29 21:36:41 1996  Ben Pfaff  <blp@gnu.org>
-
-       * prologue.ps: Portions other than DSC comments are essentially
-       completely new.
-
-Sat Aug 24 23:26:00 1996  Ben Pfaff  <blp@gnu.org>
-
-       * devices: Added PostScript driver.
-
-Sun Aug 11 21:31:22 1996  Ben Pfaff  <blp@gnu.org>
-
-       * prologue.ps: Calls `setlinecap' in setup code.
-
-Sat Aug 10 23:28:17 1996  Ben Pfaff  <blp@gnu.org>
-
-       * prologue.ps: DSC comment changes.  New call to `setlinewidth' in
-       setup code.
-
-Thu Aug  8 22:31:11 1996  Ben Pfaff  <blp@gnu.org>
-
-       * prologue.ps: Changes to scaling & translating code.
-
-Sat Aug  3 20:50:35 1996  Ben Pfaff  <blp@gnu.org>
-
-       * environment: New file.  Yet another new time- and memory-hogging
-       redundant config file; why not?
-       
-       * papersize: Comment changes.
-
-       * prologue.ps: Changed vars from $varname$ to ${varname} format.
-       Miscellaneous changes.
-
-       * ps-fontmap: Comment changes.  Fixed ZC family.
-
-Sat Jul 27 22:32:38 1996  Ben Pfaff  <blp@gnu.org>
-
-       * ps-fontmap: New configuration file.  Added to Makefile.am.
-
-----------------------------------------------------------------------
-Local Variables:
-mode: change-log
-version-control: never
-End:
diff --git a/config/automake.mk b/config/automake.mk
deleted file mode 100644 (file)
index 88b63ac..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-## Process this file with automake to produce Makefile.in  -*- makefile -*-
-
-
-dist_pkgsysconf_DATA = \
-       config/devices
-
-psfontsdir = $(pkgsysconfdir)/psfonts
-dist_psfonts_DATA = \
-       config/psfonts/Helvetica-Bold.afm \
-       config/psfonts/Times-Bold.afm \
-       config/psfonts/Courier-Bold.afm \
-       config/psfonts/Helvetica-BoldOblique.afm \
-       config/psfonts/Times-BoldItalic.afm \
-       config/psfonts/Courier-BoldOblique.afm \
-       config/psfonts/Helvetica-Oblique.afm \
-       config/psfonts/Times-Italic.afm \
-       config/psfonts/Courier-Oblique.afm \
-       config/psfonts/Helvetica.afm \
-       config/psfonts/Times-Roman.afm \
-       config/psfonts/Courier.afm
-
-EXTRA_DIST += config/OChangeLog
diff --git a/config/devices b/config/devices
deleted file mode 100644 (file)
index 48513fe..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-# PSPP's standard output drivers.
-#
-# An introduction to the use of PSPP output drivers and this file
-# follows.  However, refer to PSPP's Texinfo documentation for full
-# information.
-#
-# Each output driver specification must be on a single line; however,
-# lines may be spliced with a \ at the end of a line.  Line splicing
-# is performed *before* comments (introduced by `#') are removed.
-#
-# Format is `DRIVERNAME:CLASSNAME:DEVICETYPE:OPTIONS'.
-#
-# DRIVERNAME is the name that identifies the driver to the user.  It
-# is the name used on the -o command-line option.
-#
-# CLASSNAME is the internal name of the type of driver.  Device
-# classes can be listed with `pspp -l'.
-#
-# DEVICETYPE identifies what type or types the devices is.  Zero or
-# more of the following keywords may be given here: screen, printer,
-# or listing.
-#
-# OPTIONS is a list of key/value pairs to pass to the driver.  Use
-# spaces to separate pairs, and '=' to separate keys and values.
-# Quotes " or ' can be used to delimit values that contain spaces.
-# Example: paper-size="Envelope #10" charset=latin1
-#
-# Driver categories may be defined with lines of the form:
-#
-#   category=driver1 driver2 driver3 ... driverN
-#
-# To disable a driver, define a category with nothing on the right
-# side.
-#
-# Macros may be defined with lines of the form:
-#
-#   define macro-name definition
-#
-# Macros may not be recursive; they may not take arguments.  (However,
-# `definition' is macro-expanded *at time of definition*.)  Macros are
-# referenced with $var or ${var} syntax; the latter is preferred.
-
-# Preferred devices.
-default=list-ascii
-interactive=tty-ascii
-
-# Output files.
-define tty-output-file "|more"
-define list-output-file "pspp.list"
-
-# Generic ASCII devices
-tty-ascii:ascii:screen:squeeze=on headers=off top-margin=0 bottom-margin=0 \
-  paginate=off length=auto width=auto output-file=${tty-output-file}
-list-ascii:ascii:listing:length=66 width=79 output-file=${list-output-file}
-raw-ascii:ascii:listing:width=9999 length=9999 output-file=${list-output-file} \
-  emphasis=none headers=off paginate=off squeeze=on \
-  top-margin=0 bottom-margin=0
-
-# ASCII devices that support bold & underline via backspacing.
-tty-ascii-bi:ascii:screen:output-file=${tty-output-file}
-list-ascii-bi:ascii:listing:length=66 width=79 output-file=${list-output-file}
-
-# VT100 graphics devices.
-define vt100-graphics \
-  init='\033(B\033)0' \
-  box[1000]='\16q\17' box[1010]='\16q\17' box[0010]='\16q\17' \
-  box[0100]='\16x\17' box[0101]='\16x\17' box[0001]='\16x\17' \
-  box[0011]='\16j\17' box[1100]='\16l\17' box[0110]='\16k\17' \
-  box[1001]='\16m\17' box[1110]='\16w\17' box[1101]='\16t\17' \
-  box[0111]='\16u\17' box[1011]='\16v\17' box[1111]='\16n\17'
-
-tty-vt100:ascii:screen:squeeze=on headers=off top-margin=0 bottom-margin=0 \
-  paginate=off output-file=${tty-output-file} ${vt100-graphics}
-list-vt100:ascii:listing:length=66 width=79 output-file=${list-output-file} \
-  ${vt100-graphics}
-
-# HTML device.
-html:html::
-
-# PostScript device.
-list-ps:postscript::
-
-# Devices that support the IBM PC line-drawing characters.
-define ibmpc-graphics \
-  box[0000]='\x20' box[0001]='\xb3' box[0002]='\xba' \
-  box[0010]='\xc4' box[0011]='\xd9' box[0012]='\xbd' \
-  box[0020]='\xcd' box[0021]='\xbe' box[0022]='\xbc' \
-  box[0100]='\xb3' box[0101]='\xb3' box[0102]='\xc4' \
-  box[0110]='\xbf' box[0111]='\xb4' box[0112]='\xb6' \
-  box[0120]='\xb8' box[0121]='\xb5' box[0122]='\xb9' \
-  box[0200]='\xba' box[0201]='\xba' box[0202]='\xba' \
-  box[0210]='\xb7' box[0211]='\xb6' box[0212]='\xb6' \
-  box[0220]='\xbb' box[0221]='\xb9' box[0222]='\xb9' \
-  box[1000]='\xc4' box[1001]='\xc0' box[1002]='\xd3' \
-  box[1010]='\xc4' box[1011]='\xc1' box[1012]='\xd0' \
-  box[1020]='\xcd' box[1021]='\xcf' box[1022]='\xca' \
-  box[1100]='\xda' box[1101]='\xc3' box[1102]='\xc7' \
-  box[1110]='\xc2' box[1111]='\xc5' box[1112]='\xd7' \
-  box[1120]='\xd1' box[1121]='\xd8' box[1122]='\xce' \
-  box[1200]='\xd6' box[1201]='\xc7' box[1202]='\xc7' \
-  box[1210]='\xd2' box[1211]='\xd7' box[1212]='\xd7' \
-  box[1220]='\xca' box[1221]='\xce' box[1222]='\xce' \
-  box[2000]='\xcd' box[2001]='\xd4' box[2002]='\xc8' \
-  box[2010]='\xcd' box[2011]='\xcf' box[2012]='\xca' \
-  box[2020]='\xcd' box[2021]='\xcf' box[2022]='\xca' \
-  box[2100]='\xd5' box[2101]='\xc6' box[2102]='\xcc' \
-  box[2110]='\xd1' box[2111]='\xd8' box[2112]='\xce' \
-  box[2120]='\xd1' box[2121]='\xd8' box[2122]='\xce' \
-  box[2200]='\xc9' box[2201]='\xcc' box[2202]='\xcc' \
-  box[2210]='\xcb' box[2211]='\xce' box[2212]='\xce' \
-  box[2220]='\xcb' box[2221]='\xce' box[2222]='\xce'
-
-tty-ibmpc:ascii:screen:length=$viewlength width=$viewwidth ${ibmpc-graphics} \
-  output-file=${tty-output-file}
-list-ibmpc:ascii:listing:length=66 width=79 output-file=${list-output-file} \
-  ${ibmpc-graphics}
-
-# Local Variables:
-# fill-prefix: "# "
-# End:
diff --git a/config/psfonts/Courier-Bold.afm b/config/psfonts/Courier-Bold.afm
deleted file mode 100644 (file)
index dbfdddb..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1989 1990 Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Thu Jan 18 16:13:14 1990
-Comment UniqueID 27058
-Comment VMusage 28444 40812
-FontName Courier-Bold
-FullName Courier Bold
-FamilyName Courier
-Weight Bold
-ItalicAngle 0
-IsFixedPitch true
-FontBBox -40 -206 786 801
-UnderlinePosition -100
-UnderlineThickness 50
-Version 002.003
-Notice Copyright (c) 1989 1990 Adobe Systems Incorporated. All rights reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 562
-XHeight 439
-Ascender 626
-Descender -142
-StartCharMetrics 260
-C 32 ; WX 600 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 600 ; N exclam ; B 212 -15 388 572 ;
-C 34 ; WX 600 ; N quotedbl ; B 145 297 455 562 ;
-C 35 ; WX 600 ; N numbersign ; B 66 -45 534 651 ;
-C 36 ; WX 600 ; N dollar ; B 92 -126 509 666 ;
-C 37 ; WX 600 ; N percent ; B 5 -15 595 616 ;
-C 38 ; WX 600 ; N ampersand ; B 46 -15 536 543 ;
-C 39 ; WX 600 ; N quoteright ; B 188 297 412 562 ;
-C 40 ; WX 600 ; N parenleft ; B 229 -102 451 616 ;
-C 41 ; WX 600 ; N parenright ; B 149 -102 371 616 ;
-C 42 ; WX 600 ; N asterisk ; B 91 219 509 601 ;
-C 43 ; WX 600 ; N plus ; B 81 0 519 439 ;
-C 44 ; WX 600 ; N comma ; B 140 -101 374 164 ;
-C 45 ; WX 600 ; N hyphen ; B 110 213 490 303 ;
-C 46 ; WX 600 ; N period ; B 206 -15 394 151 ;
-C 47 ; WX 600 ; N slash ; B 105 -77 496 626 ;
-C 48 ; WX 600 ; N zero ; B 97 -15 503 616 ;
-C 49 ; WX 600 ; N one ; B 91 0 529 616 ;
-C 50 ; WX 600 ; N two ; B 71 0 489 616 ;
-C 51 ; WX 600 ; N three ; B 73 -15 491 616 ;
-C 52 ; WX 600 ; N four ; B 63 0 497 616 ;
-C 53 ; WX 600 ; N five ; B 80 -15 511 601 ;
-C 54 ; WX 600 ; N six ; B 100 -15 511 616 ;
-C 55 ; WX 600 ; N seven ; B 65 0 484 601 ;
-C 56 ; WX 600 ; N eight ; B 93 -15 507 616 ;
-C 57 ; WX 600 ; N nine ; B 89 -15 500 616 ;
-C 58 ; WX 600 ; N colon ; B 206 -15 394 405 ;
-C 59 ; WX 600 ; N semicolon ; B 140 -101 394 405 ;
-C 60 ; WX 600 ; N less ; B 66 -15 503 453 ;
-C 61 ; WX 600 ; N equal ; B 81 89 519 349 ;
-C 62 ; WX 600 ; N greater ; B 97 -15 534 453 ;
-C 63 ; WX 600 ; N question ; B 108 -15 491 580 ;
-C 64 ; WX 600 ; N at ; B 26 -15 574 616 ;
-C 65 ; WX 600 ; N A ; B 1 0 599 562 ;
-C 66 ; WX 600 ; N B ; B 40 0 563 562 ;
-C 67 ; WX 600 ; N C ; B 32 -18 554 580 ;
-C 68 ; WX 600 ; N D ; B 40 0 584 562 ;
-C 69 ; WX 600 ; N E ; B 40 0 545 562 ;
-C 70 ; WX 600 ; N F ; B 54 0 555 562 ;
-C 71 ; WX 600 ; N G ; B 32 -18 584 580 ;
-C 72 ; WX 600 ; N H ; B 30 0 570 562 ;
-C 73 ; WX 600 ; N I ; B 87 0 513 562 ;
-C 74 ; WX 600 ; N J ; B 47 -18 591 562 ;
-C 75 ; WX 600 ; N K ; B 36 0 584 562 ;
-C 76 ; WX 600 ; N L ; B 49 0 568 562 ;
-C 77 ; WX 600 ; N M ; B 3 0 597 562 ;
-C 78 ; WX 600 ; N N ; B 18 -12 600 562 ;
-C 79 ; WX 600 ; N O ; B 32 -18 568 580 ;
-C 80 ; WX 600 ; N P ; B 58 0 549 562 ;
-C 81 ; WX 600 ; N Q ; B 32 -123 568 580 ;
-C 82 ; WX 600 ; N R ; B 34 0 589 562 ;
-C 83 ; WX 600 ; N S ; B 57 -22 543 582 ;
-C 84 ; WX 600 ; N T ; B 31 0 569 562 ;
-C 85 ; WX 600 ; N U ; B 14 -18 586 562 ;
-C 86 ; WX 600 ; N V ; B -3 0 603 562 ;
-C 87 ; WX 600 ; N W ; B -8 0 608 562 ;
-C 88 ; WX 600 ; N X ; B 22 0 578 562 ;
-C 89 ; WX 600 ; N Y ; B 22 0 579 562 ;
-C 90 ; WX 600 ; N Z ; B 72 0 529 562 ;
-C 91 ; WX 600 ; N bracketleft ; B 255 -102 465 616 ;
-C 92 ; WX 600 ; N backslash ; B 105 -77 496 626 ;
-C 93 ; WX 600 ; N bracketright ; B 135 -102 345 616 ;
-C 94 ; WX 600 ; N asciicircum ; B 108 249 492 616 ;
-C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ;
-C 96 ; WX 600 ; N quoteleft ; B 188 297 412 562 ;
-C 97 ; WX 600 ; N a ; B 45 -15 560 454 ;
-C 98 ; WX 600 ; N b ; B 10 -15 574 626 ;
-C 99 ; WX 600 ; N c ; B 50 -15 539 459 ;
-C 100 ; WX 600 ; N d ; B 30 -15 581 626 ;
-C 101 ; WX 600 ; N e ; B 50 -15 553 454 ;
-C 102 ; WX 600 ; N f ; B 93 0 537 626 ; L i fi ; L l fl ;
-C 103 ; WX 600 ; N g ; B 40 -146 570 454 ;
-C 104 ; WX 600 ; N h ; B 15 0 582 626 ;
-C 105 ; WX 600 ; N i ; B 87 0 513 648 ;
-C 106 ; WX 600 ; N j ; B 73 -146 430 648 ;
-C 107 ; WX 600 ; N k ; B 30 0 575 626 ;
-C 108 ; WX 600 ; N l ; B 87 0 513 626 ;
-C 109 ; WX 600 ; N m ; B -12 0 616 454 ;
-C 110 ; WX 600 ; N n ; B 28 0 582 454 ;
-C 111 ; WX 600 ; N o ; B 40 -15 560 454 ;
-C 112 ; WX 600 ; N p ; B 9 -142 560 454 ;
-C 113 ; WX 600 ; N q ; B 30 -142 581 454 ;
-C 114 ; WX 600 ; N r ; B 57 0 570 454 ;
-C 115 ; WX 600 ; N s ; B 78 -17 525 459 ;
-C 116 ; WX 600 ; N t ; B 57 -15 522 562 ;
-C 117 ; WX 600 ; N u ; B 9 -15 559 439 ;
-C 118 ; WX 600 ; N v ; B 9 0 591 439 ;
-C 119 ; WX 600 ; N w ; B -8 0 608 439 ;
-C 120 ; WX 600 ; N x ; B 16 0 584 439 ;
-C 121 ; WX 600 ; N y ; B 6 -142 591 439 ;
-C 122 ; WX 600 ; N z ; B 91 0 510 439 ;
-C 123 ; WX 600 ; N braceleft ; B 170 -102 454 616 ;
-C 124 ; WX 600 ; N bar ; B 255 -77 345 626 ;
-C 125 ; WX 600 ; N braceright ; B 146 -102 430 616 ;
-C 126 ; WX 600 ; N asciitilde ; B 81 124 520 307 ;
-C 161 ; WX 600 ; N exclamdown ; B 212 -146 388 449 ;
-C 162 ; WX 600 ; N cent ; B 76 -49 508 614 ;
-C 163 ; WX 600 ; N sterling ; B 82 -28 548 611 ;
-C 164 ; WX 600 ; N fraction ; B 30 -60 571 661 ;
-C 165 ; WX 600 ; N yen ; B 20 0 580 591 ;
-C 166 ; WX 600 ; N florin ; B -20 -131 562 616 ;
-C 167 ; WX 600 ; N section ; B 103 -70 497 580 ;
-C 168 ; WX 600 ; N currency ; B 54 49 546 517 ;
-C 169 ; WX 600 ; N quotesingle ; B 237 297 363 562 ;
-C 170 ; WX 600 ; N quotedblleft ; B 81 297 519 562 ;
-C 171 ; WX 600 ; N guillemotleft ; B 8 70 553 446 ;
-C 172 ; WX 600 ; N guilsinglleft ; B 141 70 459 446 ;
-C 173 ; WX 600 ; N guilsinglright ; B 141 70 459 446 ;
-C 174 ; WX 600 ; N fi ; B 22 0 583 626 ;
-C 175 ; WX 600 ; N fl ; B 22 0 583 626 ;
-C 177 ; WX 600 ; N endash ; B 75 213 525 303 ;
-C 178 ; WX 600 ; N dagger ; B 116 -70 484 580 ;
-C 179 ; WX 600 ; N daggerdbl ; B 116 -70 484 580 ;
-C 180 ; WX 600 ; N periodcentered ; B 206 136 394 302 ;
-C 182 ; WX 600 ; N paragraph ; B 16 -70 566 580 ;
-C 183 ; WX 600 ; N bullet ; B 150 142 450 420 ;
-C 184 ; WX 600 ; N quotesinglbase ; B 188 -140 412 125 ;
-C 185 ; WX 600 ; N quotedblbase ; B 81 -140 519 125 ;
-C 186 ; WX 600 ; N quotedblright ; B 81 297 519 562 ;
-C 187 ; WX 600 ; N guillemotright ; B 47 70 592 446 ;
-C 188 ; WX 600 ; N ellipsis ; B 36 -15 564 96 ;
-C 189 ; WX 600 ; N perthousand ; B -40 -15 786 616 ;
-C 191 ; WX 600 ; N questiondown ; B 109 -146 492 449 ;
-C 193 ; WX 600 ; N grave ; B 132 508 395 661 ;
-C 194 ; WX 600 ; N acute ; B 205 508 468 661 ;
-C 195 ; WX 600 ; N circumflex ; B 103 483 497 657 ;
-C 196 ; WX 600 ; N tilde ; B 89 493 512 636 ;
-C 197 ; WX 600 ; N macron ; B 88 505 512 585 ;
-C 198 ; WX 600 ; N breve ; B 83 468 517 631 ;
-C 199 ; WX 600 ; N dotaccent ; B 240 505 360 625 ;
-C 200 ; WX 600 ; N dieresis ; B 148 505 452 625 ;
-C 202 ; WX 600 ; N ring ; B 198 481 402 678 ;
-C 203 ; WX 600 ; N cedilla ; B 205 -206 387 0 ;
-C 205 ; WX 600 ; N hungarumlaut ; B 95 508 578 661 ;
-C 206 ; WX 600 ; N ogonek ; B 169 -199 367 0 ;
-C 207 ; WX 600 ; N caron ; B 103 493 497 667 ;
-C 208 ; WX 600 ; N emdash ; B 0 213 600 303 ;
-C 225 ; WX 600 ; N AE ; B -29 0 562 562 ;
-C 227 ; WX 600 ; N ordfeminine ; B 147 196 453 580 ;
-C 232 ; WX 600 ; N Lslash ; B 49 0 568 562 ;
-C 233 ; WX 600 ; N Oslash ; B 32 -22 568 584 ;
-C 234 ; WX 600 ; N OE ; B 0 0 570 562 ;
-C 235 ; WX 600 ; N ordmasculine ; B 147 196 453 580 ;
-C 241 ; WX 600 ; N ae ; B 6 -15 591 454 ;
-C 245 ; WX 600 ; N dotlessi ; B 87 0 513 439 ;
-C 248 ; WX 600 ; N lslash ; B 87 0 513 626 ;
-C 249 ; WX 600 ; N oslash ; B 40 -24 560 463 ;
-C 250 ; WX 600 ; N oe ; B -8 -15 601 454 ;
-C 251 ; WX 600 ; N germandbls ; B 32 -15 586 626 ;
-C -1 ; WX 600 ; N scedilla ; B 78 -206 525 459 ;
-C -1 ; WX 600 ; N notegraphic ; B 87 -15 513 572 ;
-C -1 ; WX 600 ; N Ocircumflex ; B 32 -18 568 780 ;
-C -1 ; WX 600 ; N ll ; B -2 0 590 626 ;
-C -1 ; WX 600 ; N otilde ; B 40 -15 560 636 ;
-C -1 ; WX 600 ; N scaron ; B 78 -17 525 667 ;
-C -1 ; WX 600 ; N divide ; B 81 -15 519 453 ;
-C -1 ; WX 600 ; N Thorn ; B 58 0 547 562 ;
-C -1 ; WX 600 ; N format ; B 5 -146 95 598 ;
-C -1 ; WX 600 ; N largebullet ; B 258 239 342 323 ;
-C -1 ; WX 600 ; N Eth ; B 40 0 584 562 ;
-C -1 ; WX 600 ; N Odieresis ; B 32 -18 568 748 ;
-C -1 ; WX 600 ; N onesuperior ; B 158 230 442 616 ;
-C -1 ; WX 600 ; N dectab ; B 18 0 582 290 ;
-C -1 ; WX 600 ; N Ydieresis ; B 22 0 579 748 ;
-C -1 ; WX 600 ; N merge ; B 144 -15 456 487 ;
-C -1 ; WX 600 ; N IJ ; B 2 -18 612 562 ;
-C -1 ; WX 600 ; N ccedilla ; B 50 -206 539 459 ;
-C -1 ; WX 600 ; N multiply ; B 81 0 520 439 ;
-C -1 ; WX 600 ; N degree ; B 86 243 474 616 ;
-C -1 ; WX 600 ; N prescription ; B 34 -15 589 562 ;
-C -1 ; WX 600 ; N indent ; B 70 52 530 364 ;
-C -1 ; WX 600 ; N Otilde ; B 32 -18 568 759 ;
-C -1 ; WX 600 ; N thorn ; B -4 -142 560 626 ;
-C -1 ; WX 600 ; N mu ; B 9 -142 559 439 ;
-C -1 ; WX 600 ; N Yacute ; B 22 0 579 784 ;
-C -1 ; WX 600 ; N threesuperior ; B 148 222 423 616 ;
-C -1 ; WX 600 ; N logicalnot ; B 81 59 519 349 ;
-C -1 ; WX 600 ; N Ugrave ; B 14 -18 586 784 ;
-C -1 ; WX 600 ; N eth ; B 68 -27 533 626 ;
-C -1 ; WX 600 ; N left ; B 70 52 530 364 ;
-C -1 ; WX 600 ; N Ecircumflex ; B 40 0 545 780 ;
-C -1 ; WX 600 ; N edieresis ; B 50 -15 553 625 ;
-C -1 ; WX 600 ; N Ograve ; B 32 -18 568 784 ;
-C -1 ; WX 600 ; N down ; B 144 -15 456 422 ;
-C -1 ; WX 600 ; N Agrave ; B 1 0 599 784 ;
-C -1 ; WX 600 ; N atilde ; B 45 -15 560 636 ;
-C -1 ; WX 600 ; N up ; B 144 0 456 437 ;
-C -1 ; WX 600 ; N eacute ; B 50 -15 553 661 ;
-C -1 ; WX 600 ; N graybox ; B 76 0 525 599 ;
-C -1 ; WX 600 ; N lira ; B 82 -28 548 611 ;
-C -1 ; WX 600 ; N Icircumflex ; B 87 0 513 780 ;
-C -1 ; WX 600 ; N Adieresis ; B 1 0 599 748 ;
-C -1 ; WX 600 ; N yacute ; B 6 -142 591 661 ;
-C -1 ; WX 600 ; N icircumflex ; B 63 0 513 657 ;
-C -1 ; WX 600 ; N adieresis ; B 45 -15 560 625 ;
-C -1 ; WX 600 ; N zcaron ; B 91 0 510 667 ;
-C -1 ; WX 600 ; N Scaron ; B 57 -22 543 790 ;
-C -1 ; WX 600 ; N minus ; B 81 174 519 264 ;
-C -1 ; WX 600 ; N Aring ; B 1 0 599 801 ;
-C -1 ; WX 600 ; N Ucircumflex ; B 14 -18 586 780 ;
-C -1 ; WX 600 ; N plusminus ; B 81 0 519 461 ;
-C -1 ; WX 600 ; N ograve ; B 40 -15 560 661 ;
-C -1 ; WX 600 ; N Edieresis ; B 40 0 545 748 ;
-C -1 ; WX 600 ; N brokenbar ; B 255 -77 345 626 ;
-C -1 ; WX 600 ; N Idieresis ; B 87 0 513 748 ;
-C -1 ; WX 600 ; N acircumflex ; B 45 -15 560 657 ;
-C -1 ; WX 600 ; N ydieresis ; B 6 -142 591 625 ;
-C -1 ; WX 600 ; N Oacute ; B 32 -18 568 784 ;
-C -1 ; WX 600 ; N Egrave ; B 40 0 545 784 ;
-C -1 ; WX 600 ; N center ; B 40 14 560 580 ;
-C -1 ; WX 600 ; N threequarters ; B -20 -60 675 661 ;
-C -1 ; WX 600 ; N tab ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N ecircumflex ; B 50 -15 553 657 ;
-C -1 ; WX 600 ; N Eacute ; B 40 0 545 784 ;
-C -1 ; WX 600 ; N trademark ; B -9 230 749 562 ;
-C -1 ; WX 600 ; N square ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N onehalf ; B -20 -60 675 661 ;
-C -1 ; WX 600 ; N onequarter ; B -20 -60 692 661 ;
-C -1 ; WX 600 ; N Uacute ; B 14 -18 586 784 ;
-C -1 ; WX 600 ; N Atilde ; B 1 0 599 759 ;
-C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ;
-C -1 ; WX 600 ; N Igrave ; B 87 0 513 784 ;
-C -1 ; WX 600 ; N Iacute ; B 87 0 513 784 ;
-C -1 ; WX 600 ; N Acircumflex ; B 1 0 599 780 ;
-C -1 ; WX 600 ; N Udieresis ; B 14 -18 586 748 ;
-C -1 ; WX 600 ; N Gcaron ; B 32 -18 584 790 ;
-C -1 ; WX 600 ; N Aacute ; B 1 0 599 784 ;
-C -1 ; WX 600 ; N LL ; B -35 0 635 562 ;
-C -1 ; WX 600 ; N twosuperior ; B 153 230 426 616 ;
-C -1 ; WX 600 ; N Scedilla ; B 57 -206 543 582 ;
-C -1 ; WX 600 ; N arrowboth ; B -24 143 624 455 ;
-C -1 ; WX 600 ; N udieresis ; B 9 -15 559 625 ;
-C -1 ; WX 600 ; N odieresis ; B 40 -15 560 625 ;
-C -1 ; WX 600 ; N aring ; B 45 -15 560 678 ;
-C -1 ; WX 600 ; N ij ; B 16 -146 564 648 ;
-C -1 ; WX 600 ; N arrowdown ; B 144 -15 456 608 ;
-C -1 ; WX 600 ; N igrave ; B 87 0 513 661 ;
-C -1 ; WX 600 ; N aacute ; B 45 -15 560 661 ;
-C -1 ; WX 600 ; N stop ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N ocircumflex ; B 40 -15 560 657 ;
-C -1 ; WX 600 ; N gcaron ; B 40 -146 570 667 ;
-C -1 ; WX 600 ; N iacute ; B 87 0 513 661 ;
-C -1 ; WX 600 ; N Ntilde ; B 18 -12 600 759 ;
-C -1 ; WX 600 ; N idieresis ; B 87 0 513 625 ;
-C -1 ; WX 600 ; N Ccedilla ; B 32 -206 554 580 ;
-C -1 ; WX 600 ; N arrowright ; B -24 143 624 455 ;
-C -1 ; WX 600 ; N ucircumflex ; B 9 -15 559 657 ;
-C -1 ; WX 600 ; N Idot ; B 87 0 513 748 ;
-C -1 ; WX 600 ; N agrave ; B 45 -15 560 661 ;
-C -1 ; WX 600 ; N ntilde ; B 28 0 582 636 ;
-C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ;
-C -1 ; WX 600 ; N return ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N Zcaron ; B 72 0 529 790 ;
-C -1 ; WX 600 ; N uacute ; B 9 -15 559 661 ;
-C -1 ; WX 600 ; N overscore ; B 0 579 600 629 ;
-C -1 ; WX 600 ; N egrave ; B 50 -15 553 661 ;
-C -1 ; WX 600 ; N ugrave ; B 9 -15 559 661 ;
-C -1 ; WX 600 ; N oacute ; B 40 -15 560 661 ;
-C -1 ; WX 600 ; N arrowleft ; B -24 143 624 455 ;
-C -1 ; WX 600 ; N arrowup ; B 144 0 456 623 ;
-EndCharMetrics
-StartComposites 62
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 30 123 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -30 123 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis -20 123 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave -50 123 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring -10 123 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde -30 123 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 30 123 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 123 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 123 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 123 ;
-CC Gcaron 2 ; PCC G 0 0 ; PCC caron 10 123 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 123 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 123 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 123 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 123 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 123 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 123 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 123 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 123 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 123 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 123 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 123 ;
-CC Scedilla 2 ; PCC S 0 0 ; PCC cedilla 20 0 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 30 123 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 123 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 123 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave -30 123 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 30 123 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 123 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 123 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex -20 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis -10 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave -30 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ;
-CC gcaron 2 ; PCC g 0 0 ; PCC caron -40 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -40 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -40 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ;
-CC scedilla 2 ; PCC s 0 0 ; PCC cedilla 0 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -20 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis -20 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 30 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 10 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Courier-BoldOblique.afm b/config/psfonts/Courier-BoldOblique.afm
deleted file mode 100644 (file)
index 77e50d7..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1989 1990 Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Thu Jan 18 17:20:38 1990
-Comment UniqueID 27068
-Comment VMusage 6910 48006
-FontName Courier-BoldOblique
-FullName Courier Bold Oblique
-FamilyName Courier
-Weight Bold
-ItalicAngle -12
-IsFixedPitch true
-FontBBox -46 -206 868 801
-UnderlinePosition -100
-UnderlineThickness 50
-Version 002.003
-Notice Copyright (c) 1989 1990 Adobe Systems Incorporated. All rights reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 562
-XHeight 439
-Ascender 626
-Descender -142
-StartCharMetrics 260
-C 32 ; WX 600 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 600 ; N exclam ; B 224 -15 484 572 ;
-C 34 ; WX 600 ; N quotedbl ; B 226 297 574 562 ;
-C 35 ; WX 600 ; N numbersign ; B 100 -45 628 651 ;
-C 36 ; WX 600 ; N dollar ; B 97 -126 619 666 ;
-C 37 ; WX 600 ; N percent ; B 103 -15 624 616 ;
-C 38 ; WX 600 ; N ampersand ; B 72 -15 582 543 ;
-C 39 ; WX 600 ; N quoteright ; B 251 297 531 562 ;
-C 40 ; WX 600 ; N parenleft ; B 276 -102 582 616 ;
-C 41 ; WX 600 ; N parenright ; B 127 -102 434 616 ;
-C 42 ; WX 600 ; N asterisk ; B 179 219 597 601 ;
-C 43 ; WX 600 ; N plus ; B 118 0 575 439 ;
-C 44 ; WX 600 ; N comma ; B 119 -101 409 164 ;
-C 45 ; WX 600 ; N hyphen ; B 155 213 554 303 ;
-C 46 ; WX 600 ; N period ; B 219 -15 410 151 ;
-C 47 ; WX 600 ; N slash ; B 96 -77 622 626 ;
-C 48 ; WX 600 ; N zero ; B 146 -15 583 616 ;
-C 49 ; WX 600 ; N one ; B 103 0 547 616 ;
-C 50 ; WX 600 ; N two ; B 71 0 583 616 ;
-C 51 ; WX 600 ; N three ; B 82 -15 561 616 ;
-C 52 ; WX 600 ; N four ; B 92 0 544 616 ;
-C 53 ; WX 600 ; N five ; B 87 -15 611 601 ;
-C 54 ; WX 600 ; N six ; B 146 -15 642 616 ;
-C 55 ; WX 600 ; N seven ; B 157 0 612 601 ;
-C 56 ; WX 600 ; N eight ; B 125 -15 594 616 ;
-C 57 ; WX 600 ; N nine ; B 86 -15 582 616 ;
-C 58 ; WX 600 ; N colon ; B 219 -15 464 405 ;
-C 59 ; WX 600 ; N semicolon ; B 119 -101 464 405 ;
-C 60 ; WX 600 ; N less ; B 113 -15 584 453 ;
-C 61 ; WX 600 ; N equal ; B 100 89 593 349 ;
-C 62 ; WX 600 ; N greater ; B 109 -15 581 453 ;
-C 63 ; WX 600 ; N question ; B 193 -15 581 580 ;
-C 64 ; WX 600 ; N at ; B 76 -15 627 616 ;
-C 65 ; WX 600 ; N A ; B 1 0 617 562 ;
-C 66 ; WX 600 ; N B ; B 40 0 619 562 ;
-C 67 ; WX 600 ; N C ; B 85 -18 664 580 ;
-C 68 ; WX 600 ; N D ; B 40 0 654 562 ;
-C 69 ; WX 600 ; N E ; B 40 0 654 562 ;
-C 70 ; WX 600 ; N F ; B 54 0 668 562 ;
-C 71 ; WX 600 ; N G ; B 85 -18 664 580 ;
-C 72 ; WX 600 ; N H ; B 30 0 689 562 ;
-C 73 ; WX 600 ; N I ; B 87 0 632 562 ;
-C 74 ; WX 600 ; N J ; B 69 -18 710 562 ;
-C 75 ; WX 600 ; N K ; B 36 0 676 562 ;
-C 76 ; WX 600 ; N L ; B 49 0 625 562 ;
-C 77 ; WX 600 ; N M ; B 3 0 716 562 ;
-C 78 ; WX 600 ; N N ; B 18 -12 719 562 ;
-C 79 ; WX 600 ; N O ; B 84 -18 636 580 ;
-C 80 ; WX 600 ; N P ; B 58 0 634 562 ;
-C 81 ; WX 600 ; N Q ; B 84 -123 636 580 ;
-C 82 ; WX 600 ; N R ; B 34 0 607 562 ;
-C 83 ; WX 600 ; N S ; B 64 -22 662 582 ;
-C 84 ; WX 600 ; N T ; B 96 0 668 562 ;
-C 85 ; WX 600 ; N U ; B 116 -18 705 562 ;
-C 86 ; WX 600 ; N V ; B 99 0 722 562 ;
-C 87 ; WX 600 ; N W ; B 94 0 727 562 ;
-C 88 ; WX 600 ; N X ; B 22 0 679 562 ;
-C 89 ; WX 600 ; N Y ; B 124 0 698 562 ;
-C 90 ; WX 600 ; N Z ; B 72 0 626 562 ;
-C 91 ; WX 600 ; N bracketleft ; B 233 -102 596 616 ;
-C 92 ; WX 600 ; N backslash ; B 231 -77 487 626 ;
-C 93 ; WX 600 ; N bracketright ; B 113 -102 476 616 ;
-C 94 ; WX 600 ; N asciicircum ; B 171 249 555 616 ;
-C 95 ; WX 600 ; N underscore ; B -27 -125 584 -75 ;
-C 96 ; WX 600 ; N quoteleft ; B 251 297 531 562 ;
-C 97 ; WX 600 ; N a ; B 72 -15 578 454 ;
-C 98 ; WX 600 ; N b ; B 23 -15 626 626 ;
-C 99 ; WX 600 ; N c ; B 91 -15 621 459 ;
-C 100 ; WX 600 ; N d ; B 71 -15 634 626 ;
-C 101 ; WX 600 ; N e ; B 91 -15 594 454 ;
-C 102 ; WX 600 ; N f ; B 93 0 667 626 ; L i fi ; L l fl ;
-C 103 ; WX 600 ; N g ; B 51 -146 663 454 ;
-C 104 ; WX 600 ; N h ; B 28 0 600 626 ;
-C 105 ; WX 600 ; N i ; B 87 0 531 648 ;
-C 106 ; WX 600 ; N j ; B 47 -146 568 648 ;
-C 107 ; WX 600 ; N k ; B 43 0 632 626 ;
-C 108 ; WX 600 ; N l ; B 87 0 531 626 ;
-C 109 ; WX 600 ; N m ; B -12 0 634 454 ;
-C 110 ; WX 600 ; N n ; B 28 0 600 454 ;
-C 111 ; WX 600 ; N o ; B 81 -15 612 454 ;
-C 112 ; WX 600 ; N p ; B -21 -142 612 454 ;
-C 113 ; WX 600 ; N q ; B 71 -142 674 454 ;
-C 114 ; WX 600 ; N r ; B 57 0 644 454 ;
-C 115 ; WX 600 ; N s ; B 77 -17 597 459 ;
-C 116 ; WX 600 ; N t ; B 132 -15 556 562 ;
-C 117 ; WX 600 ; N u ; B 84 -15 577 439 ;
-C 118 ; WX 600 ; N v ; B 84 0 684 439 ;
-C 119 ; WX 600 ; N w ; B 67 0 701 439 ;
-C 120 ; WX 600 ; N x ; B 16 0 660 439 ;
-C 121 ; WX 600 ; N y ; B -10 -142 684 439 ;
-C 122 ; WX 600 ; N z ; B 91 0 603 439 ;
-C 123 ; WX 600 ; N braceleft ; B 216 -102 585 616 ;
-C 124 ; WX 600 ; N bar ; B 239 -77 478 626 ;
-C 125 ; WX 600 ; N braceright ; B 124 -102 494 616 ;
-C 126 ; WX 600 ; N asciitilde ; B 120 124 573 307 ;
-C 161 ; WX 600 ; N exclamdown ; B 207 -146 468 449 ;
-C 162 ; WX 600 ; N cent ; B 131 -49 594 614 ;
-C 163 ; WX 600 ; N sterling ; B 117 -28 640 611 ;
-C 164 ; WX 600 ; N fraction ; B 27 -60 702 661 ;
-C 165 ; WX 600 ; N yen ; B 110 0 706 591 ;
-C 166 ; WX 600 ; N florin ; B -46 -131 691 616 ;
-C 167 ; WX 600 ; N section ; B 94 -70 599 580 ;
-C 168 ; WX 600 ; N currency ; B 77 49 643 517 ;
-C 169 ; WX 600 ; N quotesingle ; B 318 297 482 562 ;
-C 170 ; WX 600 ; N quotedblleft ; B 144 297 638 562 ;
-C 171 ; WX 600 ; N guillemotleft ; B 63 70 638 446 ;
-C 172 ; WX 600 ; N guilsinglleft ; B 196 70 544 446 ;
-C 173 ; WX 600 ; N guilsinglright ; B 166 70 514 446 ;
-C 174 ; WX 600 ; N fi ; B 22 0 633 626 ;
-C 175 ; WX 600 ; N fl ; B 22 0 633 626 ;
-C 177 ; WX 600 ; N endash ; B 120 213 589 303 ;
-C 178 ; WX 600 ; N dagger ; B 188 -70 573 580 ;
-C 179 ; WX 600 ; N daggerdbl ; B 134 -70 574 580 ;
-C 180 ; WX 600 ; N periodcentered ; B 251 136 442 302 ;
-C 182 ; WX 600 ; N paragraph ; B 71 -70 689 580 ;
-C 183 ; WX 600 ; N bullet ; B 207 142 513 420 ;
-C 184 ; WX 600 ; N quotesinglbase ; B 158 -140 439 125 ;
-C 185 ; WX 600 ; N quotedblbase ; B 51 -140 546 125 ;
-C 186 ; WX 600 ; N quotedblright ; B 144 297 638 562 ;
-C 187 ; WX 600 ; N guillemotright ; B 72 70 647 446 ;
-C 188 ; WX 600 ; N ellipsis ; B 43 -15 574 96 ;
-C 189 ; WX 600 ; N perthousand ; B 24 -15 815 616 ;
-C 191 ; WX 600 ; N questiondown ; B 111 -146 499 449 ;
-C 193 ; WX 600 ; N grave ; B 272 508 503 661 ;
-C 194 ; WX 600 ; N acute ; B 313 508 608 661 ;
-C 195 ; WX 600 ; N circumflex ; B 212 483 606 657 ;
-C 196 ; WX 600 ; N tilde ; B 200 493 642 636 ;
-C 197 ; WX 600 ; N macron ; B 195 505 636 585 ;
-C 198 ; WX 600 ; N breve ; B 217 468 651 631 ;
-C 199 ; WX 600 ; N dotaccent ; B 359 505 482 625 ;
-C 200 ; WX 600 ; N dieresis ; B 267 505 574 625 ;
-C 202 ; WX 600 ; N ring ; B 319 481 528 678 ;
-C 203 ; WX 600 ; N cedilla ; B 169 -206 367 0 ;
-C 205 ; WX 600 ; N hungarumlaut ; B 203 508 718 661 ;
-C 206 ; WX 600 ; N ogonek ; B 144 -199 350 0 ;
-C 207 ; WX 600 ; N caron ; B 238 493 632 667 ;
-C 208 ; WX 600 ; N emdash ; B 45 213 664 303 ;
-C 225 ; WX 600 ; N AE ; B -29 0 667 562 ;
-C 227 ; WX 600 ; N ordfeminine ; B 189 196 526 580 ;
-C 232 ; WX 600 ; N Lslash ; B 49 0 625 562 ;
-C 233 ; WX 600 ; N Oslash ; B 48 -22 672 584 ;
-C 234 ; WX 600 ; N OE ; B 51 0 675 562 ;
-C 235 ; WX 600 ; N ordmasculine ; B 189 196 542 580 ;
-C 241 ; WX 600 ; N ae ; B 30 -15 641 454 ;
-C 245 ; WX 600 ; N dotlessi ; B 87 0 531 439 ;
-C 248 ; WX 600 ; N lslash ; B 87 0 574 626 ;
-C 249 ; WX 600 ; N oslash ; B 54 -24 637 463 ;
-C 250 ; WX 600 ; N oe ; B 29 -15 651 454 ;
-C 251 ; WX 600 ; N germandbls ; B 32 -15 618 626 ;
-C -1 ; WX 600 ; N scedilla ; B 77 -206 597 459 ;
-C -1 ; WX 600 ; N notegraphic ; B 99 -15 609 572 ;
-C -1 ; WX 600 ; N Ocircumflex ; B 84 -18 636 780 ;
-C -1 ; WX 600 ; N ll ; B 11 0 643 626 ;
-C -1 ; WX 600 ; N otilde ; B 81 -15 642 636 ;
-C -1 ; WX 600 ; N scaron ; B 77 -17 632 667 ;
-C -1 ; WX 600 ; N divide ; B 118 -15 575 453 ;
-C -1 ; WX 600 ; N Thorn ; B 58 0 613 562 ;
-C -1 ; WX 600 ; N format ; B -26 -146 222 598 ;
-C -1 ; WX 600 ; N largebullet ; B 317 239 403 323 ;
-C -1 ; WX 600 ; N Eth ; B 40 0 654 562 ;
-C -1 ; WX 600 ; N Odieresis ; B 84 -18 636 748 ;
-C -1 ; WX 600 ; N onesuperior ; B 218 230 506 616 ;
-C -1 ; WX 600 ; N dectab ; B 18 0 601 290 ;
-C -1 ; WX 600 ; N Ydieresis ; B 124 0 698 748 ;
-C -1 ; WX 600 ; N merge ; B 174 -15 526 487 ;
-C -1 ; WX 600 ; N IJ ; B 2 -18 731 562 ;
-C -1 ; WX 600 ; N ccedilla ; B 91 -206 621 459 ;
-C -1 ; WX 600 ; N multiply ; B 94 0 600 439 ;
-C -1 ; WX 600 ; N degree ; B 173 243 569 616 ;
-C -1 ; WX 600 ; N prescription ; B 34 -15 632 562 ;
-C -1 ; WX 600 ; N indent ; B 106 52 574 364 ;
-C -1 ; WX 600 ; N Otilde ; B 84 -18 668 759 ;
-C -1 ; WX 600 ; N thorn ; B -21 -142 612 626 ;
-C -1 ; WX 600 ; N mu ; B 60 -142 577 439 ;
-C -1 ; WX 600 ; N Yacute ; B 124 0 698 784 ;
-C -1 ; WX 600 ; N threesuperior ; B 203 222 515 616 ;
-C -1 ; WX 600 ; N logicalnot ; B 136 59 593 349 ;
-C -1 ; WX 600 ; N Ugrave ; B 116 -18 705 784 ;
-C -1 ; WX 600 ; N eth ; B 103 -27 651 626 ;
-C -1 ; WX 600 ; N left ; B 114 52 582 364 ;
-C -1 ; WX 600 ; N Ecircumflex ; B 40 0 654 780 ;
-C -1 ; WX 600 ; N edieresis ; B 91 -15 594 625 ;
-C -1 ; WX 600 ; N Ograve ; B 84 -18 636 784 ;
-C -1 ; WX 600 ; N down ; B 174 -15 486 422 ;
-C -1 ; WX 600 ; N Agrave ; B 1 0 617 784 ;
-C -1 ; WX 600 ; N atilde ; B 72 -15 642 636 ;
-C -1 ; WX 600 ; N up ; B 204 0 516 437 ;
-C -1 ; WX 600 ; N eacute ; B 91 -15 608 661 ;
-C -1 ; WX 600 ; N graybox ; B 76 0 652 599 ;
-C -1 ; WX 600 ; N lira ; B 117 -28 640 611 ;
-C -1 ; WX 600 ; N Icircumflex ; B 87 0 632 780 ;
-C -1 ; WX 600 ; N Adieresis ; B 1 0 617 748 ;
-C -1 ; WX 600 ; N yacute ; B -10 -142 684 661 ;
-C -1 ; WX 600 ; N icircumflex ; B 87 0 566 657 ;
-C -1 ; WX 600 ; N adieresis ; B 72 -15 578 625 ;
-C -1 ; WX 600 ; N zcaron ; B 91 0 632 667 ;
-C -1 ; WX 600 ; N Scaron ; B 64 -22 662 790 ;
-C -1 ; WX 600 ; N minus ; B 118 174 575 264 ;
-C -1 ; WX 600 ; N Aring ; B 1 0 617 801 ;
-C -1 ; WX 600 ; N Ucircumflex ; B 116 -18 705 780 ;
-C -1 ; WX 600 ; N plusminus ; B 81 0 592 461 ;
-C -1 ; WX 600 ; N ograve ; B 81 -15 612 661 ;
-C -1 ; WX 600 ; N Edieresis ; B 40 0 654 748 ;
-C -1 ; WX 600 ; N brokenbar ; B 239 -77 478 626 ;
-C -1 ; WX 600 ; N Idieresis ; B 87 0 632 748 ;
-C -1 ; WX 600 ; N acircumflex ; B 72 -15 586 657 ;
-C -1 ; WX 600 ; N ydieresis ; B -10 -142 684 625 ;
-C -1 ; WX 600 ; N Oacute ; B 84 -18 636 784 ;
-C -1 ; WX 600 ; N Egrave ; B 40 0 654 784 ;
-C -1 ; WX 600 ; N center ; B 103 14 623 580 ;
-C -1 ; WX 600 ; N threequarters ; B 35 -60 725 661 ;
-C -1 ; WX 600 ; N tab ; B 19 0 641 562 ;
-C -1 ; WX 600 ; N ecircumflex ; B 91 -15 606 657 ;
-C -1 ; WX 600 ; N Eacute ; B 40 0 665 784 ;
-C -1 ; WX 600 ; N trademark ; B 86 230 868 562 ;
-C -1 ; WX 600 ; N square ; B 19 0 700 562 ;
-C -1 ; WX 600 ; N onehalf ; B 50 -60 742 661 ;
-C -1 ; WX 600 ; N onequarter ; B 50 -60 742 661 ;
-C -1 ; WX 600 ; N Uacute ; B 116 -18 705 784 ;
-C -1 ; WX 600 ; N Atilde ; B 1 0 638 759 ;
-C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ;
-C -1 ; WX 600 ; N Igrave ; B 87 0 632 784 ;
-C -1 ; WX 600 ; N Iacute ; B 87 0 635 784 ;
-C -1 ; WX 600 ; N Acircumflex ; B 1 0 617 780 ;
-C -1 ; WX 600 ; N Udieresis ; B 116 -18 705 748 ;
-C -1 ; WX 600 ; N Gcaron ; B 85 -18 669 790 ;
-C -1 ; WX 600 ; N Aacute ; B 1 0 665 784 ;
-C -1 ; WX 600 ; N LL ; B -35 0 684 562 ;
-C -1 ; WX 600 ; N twosuperior ; B 202 230 531 616 ;
-C -1 ; WX 600 ; N Scedilla ; B 64 -206 662 582 ;
-C -1 ; WX 600 ; N arrowboth ; B 40 143 688 455 ;
-C -1 ; WX 600 ; N udieresis ; B 84 -15 577 625 ;
-C -1 ; WX 600 ; N odieresis ; B 81 -15 612 625 ;
-C -1 ; WX 600 ; N aring ; B 72 -15 578 678 ;
-C -1 ; WX 600 ; N ij ; B 16 -146 702 648 ;
-C -1 ; WX 600 ; N arrowdown ; B 174 -15 486 608 ;
-C -1 ; WX 600 ; N igrave ; B 87 0 531 661 ;
-C -1 ; WX 600 ; N aacute ; B 72 -15 608 661 ;
-C -1 ; WX 600 ; N stop ; B 19 0 700 562 ;
-C -1 ; WX 600 ; N ocircumflex ; B 81 -15 612 657 ;
-C -1 ; WX 600 ; N gcaron ; B 51 -146 663 667 ;
-C -1 ; WX 600 ; N iacute ; B 87 0 608 661 ;
-C -1 ; WX 600 ; N Ntilde ; B 18 -12 719 759 ;
-C -1 ; WX 600 ; N idieresis ; B 87 0 534 625 ;
-C -1 ; WX 600 ; N Ccedilla ; B 85 -206 664 580 ;
-C -1 ; WX 600 ; N arrowright ; B 32 143 688 455 ;
-C -1 ; WX 600 ; N ucircumflex ; B 84 -15 586 657 ;
-C -1 ; WX 600 ; N Idot ; B 87 0 632 748 ;
-C -1 ; WX 600 ; N agrave ; B 72 -15 578 661 ;
-C -1 ; WX 600 ; N ntilde ; B 28 0 642 636 ;
-C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ;
-C -1 ; WX 600 ; N return ; B 79 0 700 562 ;
-C -1 ; WX 600 ; N Zcaron ; B 72 0 659 790 ;
-C -1 ; WX 600 ; N uacute ; B 84 -15 608 661 ;
-C -1 ; WX 600 ; N overscore ; B 123 579 734 629 ;
-C -1 ; WX 600 ; N egrave ; B 91 -15 594 661 ;
-C -1 ; WX 600 ; N ugrave ; B 84 -15 577 661 ;
-C -1 ; WX 600 ; N oacute ; B 81 -15 612 661 ;
-C -1 ; WX 600 ; N arrowleft ; B 40 143 695 455 ;
-C -1 ; WX 600 ; N arrowup ; B 243 0 555 623 ;
-EndCharMetrics
-StartComposites 62
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 56 123 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -4 123 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 6 123 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave -24 123 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 16 123 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde -4 123 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 56 123 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 26 123 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 26 123 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 26 123 ;
-CC Gcaron 2 ; PCC G 0 0 ; PCC caron 36 123 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 26 123 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 26 123 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 26 123 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 26 123 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 26 123 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 26 123 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 26 123 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 26 123 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 26 123 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 26 123 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 26 123 ;
-CC Scedilla 2 ; PCC S 0 0 ; PCC cedilla 20 0 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 56 123 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 26 123 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 26 123 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave -4 123 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 56 123 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 26 123 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 26 123 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex -20 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis -10 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave -30 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ;
-CC gcaron 2 ; PCC g 0 0 ; PCC caron -40 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -40 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -40 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ;
-CC scedilla 2 ; PCC s 0 0 ; PCC cedilla 0 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -20 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis -20 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 30 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 10 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Courier-Oblique.afm b/config/psfonts/Courier-Oblique.afm
deleted file mode 100644 (file)
index 4dc9419..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1989, 1990 Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Thu Jan 18 18:32:01 1990
-Comment UniqueID 27082
-Comment VMusage 6415 46660
-FontName Courier-Oblique
-FullName Courier Oblique
-FamilyName Courier
-Weight Medium
-ItalicAngle -12
-IsFixedPitch true
-FontBBox -30 -157 734 805
-UnderlinePosition -100
-UnderlineThickness 50
-Version 002.003
-Notice Copyright (c) 1989, 1990 Adobe Systems Incorporated. All rights reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 562
-XHeight 426
-Ascender 629
-Descender -157
-StartCharMetrics 260
-C 32 ; WX 600 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 600 ; N exclam ; B 243 -15 457 572 ;
-C 34 ; WX 600 ; N quotedbl ; B 273 328 532 562 ;
-C 35 ; WX 600 ; N numbersign ; B 142 -32 587 639 ;
-C 36 ; WX 600 ; N dollar ; B 115 -126 589 662 ;
-C 37 ; WX 600 ; N percent ; B 147 -15 596 622 ;
-C 38 ; WX 600 ; N ampersand ; B 94 -15 572 543 ;
-C 39 ; WX 600 ; N quoteright ; B 283 328 495 562 ;
-C 40 ; WX 600 ; N parenleft ; B 320 -108 565 622 ;
-C 41 ; WX 600 ; N parenright ; B 144 -108 389 622 ;
-C 42 ; WX 600 ; N asterisk ; B 212 257 580 607 ;
-C 43 ; WX 600 ; N plus ; B 128 0 562 426 ;
-C 44 ; WX 600 ; N comma ; B 157 -112 370 122 ;
-C 45 ; WX 600 ; N hyphen ; B 161 238 549 278 ;
-C 46 ; WX 600 ; N period ; B 238 -15 382 109 ;
-C 47 ; WX 600 ; N slash ; B 111 -80 606 629 ;
-C 48 ; WX 600 ; N zero ; B 161 -15 568 622 ;
-C 49 ; WX 600 ; N one ; B 105 0 505 622 ;
-C 50 ; WX 600 ; N two ; B 77 0 561 622 ;
-C 51 ; WX 600 ; N three ; B 89 -15 531 622 ;
-C 52 ; WX 600 ; N four ; B 120 0 532 622 ;
-C 53 ; WX 600 ; N five ; B 105 -15 589 607 ;
-C 54 ; WX 600 ; N six ; B 162 -15 629 622 ;
-C 55 ; WX 600 ; N seven ; B 191 0 605 607 ;
-C 56 ; WX 600 ; N eight ; B 139 -15 581 622 ;
-C 57 ; WX 600 ; N nine ; B 100 -15 567 622 ;
-C 58 ; WX 600 ; N colon ; B 238 -15 441 385 ;
-C 59 ; WX 600 ; N semicolon ; B 157 -112 441 385 ;
-C 60 ; WX 600 ; N less ; B 86 -2 603 428 ;
-C 61 ; WX 600 ; N equal ; B 108 101 582 325 ;
-C 62 ; WX 600 ; N greater ; B 87 -2 604 428 ;
-C 63 ; WX 600 ; N question ; B 224 -15 576 572 ;
-C 64 ; WX 600 ; N at ; B 134 -15 575 622 ;
-C 65 ; WX 600 ; N A ; B 10 0 597 562 ;
-C 66 ; WX 600 ; N B ; B 50 0 609 562 ;
-C 67 ; WX 600 ; N C ; B 100 -18 651 580 ;
-C 68 ; WX 600 ; N D ; B 50 0 638 562 ;
-C 69 ; WX 600 ; N E ; B 60 0 653 562 ;
-C 70 ; WX 600 ; N F ; B 60 0 653 562 ;
-C 71 ; WX 600 ; N G ; B 90 -18 641 580 ;
-C 72 ; WX 600 ; N H ; B 39 0 680 562 ;
-C 73 ; WX 600 ; N I ; B 103 0 616 562 ;
-C 74 ; WX 600 ; N J ; B 59 -18 678 562 ;
-C 75 ; WX 600 ; N K ; B 45 0 664 562 ;
-C 76 ; WX 600 ; N L ; B 54 0 598 562 ;
-C 77 ; WX 600 ; N M ; B 11 0 708 562 ;
-C 78 ; WX 600 ; N N ; B 14 -13 705 562 ;
-C 79 ; WX 600 ; N O ; B 94 -18 625 580 ;
-C 80 ; WX 600 ; N P ; B 86 0 637 562 ;
-C 81 ; WX 600 ; N Q ; B 95 -129 625 580 ;
-C 82 ; WX 600 ; N R ; B 45 0 590 562 ;
-C 83 ; WX 600 ; N S ; B 83 -20 643 580 ;
-C 84 ; WX 600 ; N T ; B 116 0 658 562 ;
-C 85 ; WX 600 ; N U ; B 132 -18 695 562 ;
-C 86 ; WX 600 ; N V ; B 115 -13 716 562 ;
-C 87 ; WX 600 ; N W ; B 115 -13 716 562 ;
-C 88 ; WX 600 ; N X ; B 30 0 668 562 ;
-C 89 ; WX 600 ; N Y ; B 143 0 688 562 ;
-C 90 ; WX 600 ; N Z ; B 86 0 610 562 ;
-C 91 ; WX 600 ; N bracketleft ; B 253 -108 574 622 ;
-C 92 ; WX 600 ; N backslash ; B 256 -80 461 629 ;
-C 93 ; WX 600 ; N bracketright ; B 135 -108 456 622 ;
-C 94 ; WX 600 ; N asciicircum ; B 175 359 587 622 ;
-C 95 ; WX 600 ; N underscore ; B -27 -125 584 -75 ;
-C 96 ; WX 600 ; N quoteleft ; B 294 328 506 562 ;
-C 97 ; WX 600 ; N a ; B 83 -15 559 441 ;
-C 98 ; WX 600 ; N b ; B 36 -15 618 629 ;
-C 99 ; WX 600 ; N c ; B 113 -15 607 441 ;
-C 100 ; WX 600 ; N d ; B 92 -15 633 629 ;
-C 101 ; WX 600 ; N e ; B 113 -15 591 441 ;
-C 102 ; WX 600 ; N f ; B 121 0 655 629 ; L i fi ; L l fl ;
-C 103 ; WX 600 ; N g ; B 68 -157 650 441 ;
-C 104 ; WX 600 ; N h ; B 40 0 582 629 ;
-C 105 ; WX 600 ; N i ; B 102 0 505 657 ;
-C 106 ; WX 600 ; N j ; B 59 -157 543 657 ;
-C 107 ; WX 600 ; N k ; B 65 0 626 629 ;
-C 108 ; WX 600 ; N l ; B 102 0 505 629 ;
-C 109 ; WX 600 ; N m ; B 2 0 606 441 ;
-C 110 ; WX 600 ; N n ; B 33 0 575 441 ;
-C 111 ; WX 600 ; N o ; B 102 -15 588 441 ;
-C 112 ; WX 600 ; N p ; B -17 -157 598 441 ;
-C 113 ; WX 600 ; N q ; B 92 -157 675 441 ;
-C 114 ; WX 600 ; N r ; B 67 0 631 441 ;
-C 115 ; WX 600 ; N s ; B 92 -15 570 441 ;
-C 116 ; WX 600 ; N t ; B 157 -15 534 561 ;
-C 117 ; WX 600 ; N u ; B 111 -15 562 426 ;
-C 118 ; WX 600 ; N v ; B 100 -10 674 426 ;
-C 119 ; WX 600 ; N w ; B 82 -10 692 426 ;
-C 120 ; WX 600 ; N x ; B 27 0 648 426 ;
-C 121 ; WX 600 ; N y ; B -30 -157 643 426 ;
-C 122 ; WX 600 ; N z ; B 106 0 586 426 ;
-C 123 ; WX 600 ; N braceleft ; B 240 -108 562 622 ;
-C 124 ; WX 600 ; N bar ; B 265 -80 453 629 ;
-C 125 ; WX 600 ; N braceright ; B 147 -108 470 622 ;
-C 126 ; WX 600 ; N asciitilde ; B 110 160 585 269 ;
-C 161 ; WX 600 ; N exclamdown ; B 232 -157 445 430 ;
-C 162 ; WX 600 ; N cent ; B 158 -49 581 614 ;
-C 163 ; WX 600 ; N sterling ; B 131 -21 614 611 ;
-C 164 ; WX 600 ; N fraction ; B 23 -57 706 665 ;
-C 165 ; WX 600 ; N yen ; B 135 0 693 594 ;
-C 166 ; WX 600 ; N florin ; B -19 -143 664 622 ;
-C 167 ; WX 600 ; N section ; B 111 -78 583 580 ;
-C 168 ; WX 600 ; N currency ; B 99 65 621 499 ;
-C 169 ; WX 600 ; N quotesingle ; B 345 328 460 562 ;
-C 170 ; WX 600 ; N quotedblleft ; B 213 328 576 562 ;
-C 171 ; WX 600 ; N guillemotleft ; B 92 70 652 446 ;
-C 172 ; WX 600 ; N guilsinglleft ; B 204 70 540 446 ;
-C 173 ; WX 600 ; N guilsinglright ; B 170 70 506 446 ;
-C 174 ; WX 600 ; N fi ; B 10 0 612 629 ;
-C 175 ; WX 600 ; N fl ; B 10 0 612 629 ;
-C 177 ; WX 600 ; N endash ; B 126 238 584 278 ;
-C 178 ; WX 600 ; N dagger ; B 226 -78 537 580 ;
-C 179 ; WX 600 ; N daggerdbl ; B 171 -78 537 580 ;
-C 180 ; WX 600 ; N periodcentered ; B 273 152 418 276 ;
-C 182 ; WX 600 ; N paragraph ; B 107 -78 623 562 ;
-C 183 ; WX 600 ; N bullet ; B 231 137 478 376 ;
-C 184 ; WX 600 ; N quotesinglbase ; B 185 -134 397 100 ;
-C 185 ; WX 600 ; N quotedblbase ; B 115 -134 478 100 ;
-C 186 ; WX 600 ; N quotedblright ; B 213 328 576 562 ;
-C 187 ; WX 600 ; N guillemotright ; B 58 70 618 446 ;
-C 188 ; WX 600 ; N ellipsis ; B 51 -15 566 97 ;
-C 189 ; WX 600 ; N perthousand ; B 57 -15 627 622 ;
-C 191 ; WX 600 ; N questiondown ; B 112 -157 464 430 ;
-C 193 ; WX 600 ; N grave ; B 294 497 484 672 ;
-C 194 ; WX 600 ; N acute ; B 348 497 612 672 ;
-C 195 ; WX 600 ; N circumflex ; B 229 477 581 654 ;
-C 196 ; WX 600 ; N tilde ; B 219 503 617 606 ;
-C 197 ; WX 600 ; N macron ; B 232 525 600 565 ;
-C 198 ; WX 600 ; N breve ; B 279 501 576 609 ;
-C 199 ; WX 600 ; N dotaccent ; B 379 508 452 580 ;
-C 200 ; WX 600 ; N dieresis ; B 313 508 519 580 ;
-C 202 ; WX 600 ; N ring ; B 344 483 492 627 ;
-C 203 ; WX 600 ; N cedilla ; B 221 -151 340 10 ;
-C 205 ; WX 600 ; N hungarumlaut ; B 239 497 683 672 ;
-C 206 ; WX 600 ; N ogonek ; B 207 -151 348 0 ;
-C 207 ; WX 600 ; N caron ; B 262 492 614 669 ;
-C 208 ; WX 600 ; N emdash ; B 51 238 659 278 ;
-C 225 ; WX 600 ; N AE ; B 10 0 648 562 ;
-C 227 ; WX 600 ; N ordfeminine ; B 216 259 504 580 ;
-C 232 ; WX 600 ; N Lslash ; B 54 0 598 562 ;
-C 233 ; WX 600 ; N Oslash ; B 94 -80 625 629 ;
-C 234 ; WX 600 ; N OE ; B 66 0 665 562 ;
-C 235 ; WX 600 ; N ordmasculine ; B 217 259 530 580 ;
-C 241 ; WX 600 ; N ae ; B 47 -15 620 441 ;
-C 245 ; WX 600 ; N dotlessi ; B 102 0 505 426 ;
-C 248 ; WX 600 ; N lslash ; B 102 0 559 629 ;
-C 249 ; WX 600 ; N oslash ; B 102 -80 588 506 ;
-C 250 ; WX 600 ; N oe ; B 61 -15 609 441 ;
-C 251 ; WX 600 ; N germandbls ; B 55 -15 610 629 ;
-C -1 ; WX 600 ; N scedilla ; B 92 -151 570 441 ;
-C -1 ; WX 600 ; N notegraphic ; B 143 -15 557 572 ;
-C -1 ; WX 600 ; N Ocircumflex ; B 94 -18 625 775 ;
-C -1 ; WX 600 ; N ll ; B 40 0 609 629 ;
-C -1 ; WX 600 ; N otilde ; B 102 -15 617 606 ;
-C -1 ; WX 600 ; N scaron ; B 92 -15 614 669 ;
-C -1 ; WX 600 ; N divide ; B 128 1 562 426 ;
-C -1 ; WX 600 ; N Thorn ; B 86 0 599 562 ;
-C -1 ; WX 600 ; N format ; B -28 -157 169 598 ;
-C -1 ; WX 600 ; N largebullet ; B 322 227 388 290 ;
-C -1 ; WX 600 ; N Eth ; B 50 0 638 562 ;
-C -1 ; WX 600 ; N Odieresis ; B 94 -18 625 716 ;
-C -1 ; WX 600 ; N onesuperior ; B 238 249 481 622 ;
-C -1 ; WX 600 ; N dectab ; B 18 0 590 227 ;
-C -1 ; WX 600 ; N Ydieresis ; B 143 0 688 716 ;
-C -1 ; WX 600 ; N merge ; B 192 -15 497 436 ;
-C -1 ; WX 600 ; N IJ ; B 39 -18 681 562 ;
-C -1 ; WX 600 ; N ccedilla ; B 113 -151 607 441 ;
-C -1 ; WX 600 ; N multiply ; B 93 -1 599 426 ;
-C -1 ; WX 600 ; N degree ; B 214 269 576 622 ;
-C -1 ; WX 600 ; N prescription ; B 34 -15 610 562 ;
-C -1 ; WX 600 ; N indent ; B 110 75 574 341 ;
-C -1 ; WX 600 ; N Otilde ; B 94 -18 644 732 ;
-C -1 ; WX 600 ; N thorn ; B -17 -157 598 629 ;
-C -1 ; WX 600 ; N mu ; B 79 -157 562 426 ;
-C -1 ; WX 600 ; N Yacute ; B 143 0 688 793 ;
-C -1 ; WX 600 ; N threesuperior ; B 220 240 494 622 ;
-C -1 ; WX 600 ; N logicalnot ; B 148 64 582 325 ;
-C -1 ; WX 600 ; N Ugrave ; B 132 -18 695 793 ;
-C -1 ; WX 600 ; N eth ; B 102 -15 629 629 ;
-C -1 ; WX 600 ; N left ; B 114 75 578 341 ;
-C -1 ; WX 600 ; N Ecircumflex ; B 60 0 653 775 ;
-C -1 ; WX 600 ; N edieresis ; B 113 -15 591 580 ;
-C -1 ; WX 600 ; N Ograve ; B 94 -18 625 793 ;
-C -1 ; WX 600 ; N down ; B 192 -15 458 422 ;
-C -1 ; WX 600 ; N Agrave ; B 10 0 597 793 ;
-C -1 ; WX 600 ; N atilde ; B 83 -15 617 606 ;
-C -1 ; WX 600 ; N up ; B 232 0 498 437 ;
-C -1 ; WX 600 ; N eacute ; B 113 -15 612 672 ;
-C -1 ; WX 600 ; N graybox ; B 76 0 652 599 ;
-C -1 ; WX 600 ; N lira ; B 125 -21 614 611 ;
-C -1 ; WX 600 ; N Icircumflex ; B 103 0 616 775 ;
-C -1 ; WX 600 ; N Adieresis ; B 10 0 597 716 ;
-C -1 ; WX 600 ; N yacute ; B -30 -157 643 672 ;
-C -1 ; WX 600 ; N icircumflex ; B 102 0 551 654 ;
-C -1 ; WX 600 ; N adieresis ; B 83 -15 559 580 ;
-C -1 ; WX 600 ; N zcaron ; B 106 0 624 669 ;
-C -1 ; WX 600 ; N Scaron ; B 83 -20 673 805 ;
-C -1 ; WX 600 ; N minus ; B 128 195 562 232 ;
-C -1 ; WX 600 ; N Aring ; B 10 0 597 753 ;
-C -1 ; WX 600 ; N Ucircumflex ; B 132 -18 695 775 ;
-C -1 ; WX 600 ; N plusminus ; B 87 0 583 514 ;
-C -1 ; WX 600 ; N ograve ; B 102 -15 588 672 ;
-C -1 ; WX 600 ; N Edieresis ; B 60 0 653 716 ;
-C -1 ; WX 600 ; N brokenbar ; B 265 -80 453 629 ;
-C -1 ; WX 600 ; N Idieresis ; B 103 0 616 716 ;
-C -1 ; WX 600 ; N acircumflex ; B 83 -15 581 654 ;
-C -1 ; WX 600 ; N ydieresis ; B -30 -157 643 580 ;
-C -1 ; WX 600 ; N Oacute ; B 94 -18 638 793 ;
-C -1 ; WX 600 ; N Egrave ; B 60 0 653 793 ;
-C -1 ; WX 600 ; N center ; B 103 14 623 580 ;
-C -1 ; WX 600 ; N threequarters ; B 28 -57 711 665 ;
-C -1 ; WX 600 ; N tab ; B 19 0 641 562 ;
-C -1 ; WX 600 ; N ecircumflex ; B 113 -15 591 654 ;
-C -1 ; WX 600 ; N Eacute ; B 60 0 668 793 ;
-C -1 ; WX 600 ; N trademark ; B 108 263 710 562 ;
-C -1 ; WX 600 ; N square ; B 19 0 700 562 ;
-C -1 ; WX 600 ; N onehalf ; B 42 -57 725 665 ;
-C -1 ; WX 600 ; N onequarter ; B 48 -57 731 665 ;
-C -1 ; WX 600 ; N Uacute ; B 132 -18 695 793 ;
-C -1 ; WX 600 ; N Atilde ; B 10 0 644 732 ;
-C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ;
-C -1 ; WX 600 ; N Igrave ; B 103 0 616 793 ;
-C -1 ; WX 600 ; N Iacute ; B 103 0 638 793 ;
-C -1 ; WX 600 ; N Acircumflex ; B 10 0 597 775 ;
-C -1 ; WX 600 ; N Udieresis ; B 132 -18 695 716 ;
-C -1 ; WX 600 ; N Gcaron ; B 90 -18 643 805 ;
-C -1 ; WX 600 ; N Aacute ; B 10 0 658 793 ;
-C -1 ; WX 600 ; N LL ; B 15 0 640 562 ;
-C -1 ; WX 600 ; N twosuperior ; B 237 249 528 622 ;
-C -1 ; WX 600 ; N Scedilla ; B 83 -151 643 580 ;
-C -1 ; WX 600 ; N arrowboth ; B 36 122 692 476 ;
-C -1 ; WX 600 ; N udieresis ; B 111 -15 562 580 ;
-C -1 ; WX 600 ; N odieresis ; B 102 -15 588 580 ;
-C -1 ; WX 600 ; N aring ; B 83 -15 559 627 ;
-C -1 ; WX 600 ; N ij ; B 44 -157 623 657 ;
-C -1 ; WX 600 ; N arrowdown ; B 157 -15 511 608 ;
-C -1 ; WX 600 ; N igrave ; B 102 0 505 672 ;
-C -1 ; WX 600 ; N aacute ; B 83 -15 612 672 ;
-C -1 ; WX 600 ; N stop ; B 19 0 700 562 ;
-C -1 ; WX 600 ; N ocircumflex ; B 102 -15 588 654 ;
-C -1 ; WX 600 ; N gcaron ; B 68 -157 650 669 ;
-C -1 ; WX 600 ; N iacute ; B 102 0 612 672 ;
-C -1 ; WX 600 ; N Ntilde ; B 14 -13 705 732 ;
-C -1 ; WX 600 ; N idieresis ; B 102 0 505 580 ;
-C -1 ; WX 600 ; N Ccedilla ; B 100 -151 651 580 ;
-C -1 ; WX 600 ; N arrowright ; B 35 122 688 476 ;
-C -1 ; WX 600 ; N ucircumflex ; B 111 -15 571 654 ;
-C -1 ; WX 600 ; N Idot ; B 103 0 616 716 ;
-C -1 ; WX 600 ; N agrave ; B 83 -15 559 672 ;
-C -1 ; WX 600 ; N ntilde ; B 33 0 617 606 ;
-C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ;
-C -1 ; WX 600 ; N return ; B 79 0 700 562 ;
-C -1 ; WX 600 ; N Zcaron ; B 86 0 643 805 ;
-C -1 ; WX 600 ; N uacute ; B 111 -15 602 672 ;
-C -1 ; WX 600 ; N overscore ; B 123 579 734 629 ;
-C -1 ; WX 600 ; N egrave ; B 113 -15 591 672 ;
-C -1 ; WX 600 ; N ugrave ; B 111 -15 562 672 ;
-C -1 ; WX 600 ; N oacute ; B 102 -15 612 672 ;
-C -1 ; WX 600 ; N arrowleft ; B 40 122 692 476 ;
-C -1 ; WX 600 ; N arrowup ; B 218 0 572 623 ;
-EndCharMetrics
-StartComposites 62
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 46 121 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -4 121 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis -1 136 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave -4 121 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 12 126 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 27 126 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 56 121 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 26 121 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 29 136 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 26 121 ;
-CC Gcaron 2 ; PCC G 0 0 ; PCC caron 29 136 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 26 121 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 26 121 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 29 136 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 26 121 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 27 126 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 26 121 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 26 121 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 29 136 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 26 121 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 27 126 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 59 136 ;
-CC Scedilla 2 ; PCC S 0 0 ; PCC cedilla 0 0 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 56 121 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 26 121 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 29 136 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave -4 121 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 56 121 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 29 136 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 29 136 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ;
-CC gcaron 2 ; PCC g 0 0 ; PCC caron -30 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -30 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -30 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -30 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ;
-CC scedilla 2 ; PCC s 0 0 ; PCC cedilla 0 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute -10 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -10 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute -20 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis -10 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 10 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Courier.afm b/config/psfonts/Courier.afm
deleted file mode 100644 (file)
index 3688908..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1989, 1990 Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Thu Jan 18 17:48:17 1990
-Comment UniqueID 27077
-Comment VMusage 27874 40242
-FontName Courier
-FullName Courier
-FamilyName Courier
-Weight Medium
-ItalicAngle 0
-IsFixedPitch true
-FontBBox -28 -157 628 805
-UnderlinePosition -100
-UnderlineThickness 50
-Version 002.003
-Notice Copyright (c) 1989, 1990 Adobe Systems Incorporated. All rights reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 562
-XHeight 426
-Ascender 629
-Descender -157
-StartCharMetrics 260
-C 32 ; WX 600 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 600 ; N exclam ; B 236 -15 364 572 ;
-C 34 ; WX 600 ; N quotedbl ; B 187 328 413 562 ;
-C 35 ; WX 600 ; N numbersign ; B 100 -32 500 639 ;
-C 36 ; WX 600 ; N dollar ; B 112 -126 489 662 ;
-C 37 ; WX 600 ; N percent ; B 97 -15 515 622 ;
-C 38 ; WX 600 ; N ampersand ; B 70 -15 531 543 ;
-C 39 ; WX 600 ; N quoteright ; B 213 328 376 562 ;
-C 40 ; WX 600 ; N parenleft ; B 276 -108 433 622 ;
-C 41 ; WX 600 ; N parenright ; B 167 -108 324 622 ;
-C 42 ; WX 600 ; N asterisk ; B 116 257 484 607 ;
-C 43 ; WX 600 ; N plus ; B 87 0 513 426 ;
-C 44 ; WX 600 ; N comma ; B 181 -112 344 122 ;
-C 45 ; WX 600 ; N hyphen ; B 110 238 490 278 ;
-C 46 ; WX 600 ; N period ; B 229 -15 371 109 ;
-C 47 ; WX 600 ; N slash ; B 125 -80 475 629 ;
-C 48 ; WX 600 ; N zero ; B 113 -15 487 622 ;
-C 49 ; WX 600 ; N one ; B 102 0 498 622 ;
-C 50 ; WX 600 ; N two ; B 77 0 464 622 ;
-C 51 ; WX 600 ; N three ; B 82 -15 459 622 ;
-C 52 ; WX 600 ; N four ; B 88 0 493 622 ;
-C 53 ; WX 600 ; N five ; B 99 -15 490 607 ;
-C 54 ; WX 600 ; N six ; B 118 -15 497 622 ;
-C 55 ; WX 600 ; N seven ; B 89 0 476 607 ;
-C 56 ; WX 600 ; N eight ; B 109 -15 491 622 ;
-C 57 ; WX 600 ; N nine ; B 103 -15 482 622 ;
-C 58 ; WX 600 ; N colon ; B 229 -15 371 385 ;
-C 59 ; WX 600 ; N semicolon ; B 181 -112 371 385 ;
-C 60 ; WX 600 ; N less ; B 41 -2 519 428 ;
-C 61 ; WX 600 ; N equal ; B 87 101 513 325 ;
-C 62 ; WX 600 ; N greater ; B 81 -2 559 428 ;
-C 63 ; WX 600 ; N question ; B 136 -15 485 572 ;
-C 64 ; WX 600 ; N at ; B 84 -15 526 622 ;
-C 65 ; WX 600 ; N A ; B 10 0 590 562 ;
-C 66 ; WX 600 ; N B ; B 50 0 552 562 ;
-C 67 ; WX 600 ; N C ; B 48 -18 533 580 ;
-C 68 ; WX 600 ; N D ; B 50 0 567 562 ;
-C 69 ; WX 600 ; N E ; B 60 0 543 562 ;
-C 70 ; WX 600 ; N F ; B 60 0 538 562 ;
-C 71 ; WX 600 ; N G ; B 38 -18 568 580 ;
-C 72 ; WX 600 ; N H ; B 39 0 561 562 ;
-C 73 ; WX 600 ; N I ; B 103 0 497 562 ;
-C 74 ; WX 600 ; N J ; B 41 -18 559 562 ;
-C 75 ; WX 600 ; N K ; B 45 0 575 562 ;
-C 76 ; WX 600 ; N L ; B 54 0 547 562 ;
-C 77 ; WX 600 ; N M ; B 11 0 589 562 ;
-C 78 ; WX 600 ; N N ; B 14 -13 586 562 ;
-C 79 ; WX 600 ; N O ; B 43 -18 557 580 ;
-C 80 ; WX 600 ; N P ; B 86 0 551 562 ;
-C 81 ; WX 600 ; N Q ; B 43 -129 557 580 ;
-C 82 ; WX 600 ; N R ; B 45 0 581 562 ;
-C 83 ; WX 600 ; N S ; B 79 -20 522 580 ;
-C 84 ; WX 600 ; N T ; B 45 0 556 562 ;
-C 85 ; WX 600 ; N U ; B 24 -18 576 562 ;
-C 86 ; WX 600 ; N V ; B 3 -13 597 562 ;
-C 87 ; WX 600 ; N W ; B 3 -13 597 562 ;
-C 88 ; WX 600 ; N X ; B 30 0 570 562 ;
-C 89 ; WX 600 ; N Y ; B 31 0 569 562 ;
-C 90 ; WX 600 ; N Z ; B 86 0 514 562 ;
-C 91 ; WX 600 ; N bracketleft ; B 276 -108 442 622 ;
-C 92 ; WX 600 ; N backslash ; B 125 -80 475 629 ;
-C 93 ; WX 600 ; N bracketright ; B 158 -108 324 622 ;
-C 94 ; WX 600 ; N asciicircum ; B 94 359 506 622 ;
-C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ;
-C 96 ; WX 600 ; N quoteleft ; B 224 328 387 562 ;
-C 97 ; WX 600 ; N a ; B 60 -15 552 441 ;
-C 98 ; WX 600 ; N b ; B 21 -15 568 629 ;
-C 99 ; WX 600 ; N c ; B 73 -15 522 441 ;
-C 100 ; WX 600 ; N d ; B 52 -15 584 629 ;
-C 101 ; WX 600 ; N e ; B 73 -15 541 441 ;
-C 102 ; WX 600 ; N f ; B 121 0 524 629 ; L i fi ; L l fl ;
-C 103 ; WX 600 ; N g ; B 52 -157 559 441 ;
-C 104 ; WX 600 ; N h ; B 25 0 575 629 ;
-C 105 ; WX 600 ; N i ; B 102 0 498 657 ;
-C 106 ; WX 600 ; N j ; B 89 -157 403 657 ;
-C 107 ; WX 600 ; N k ; B 50 0 573 629 ;
-C 108 ; WX 600 ; N l ; B 102 0 498 629 ;
-C 109 ; WX 600 ; N m ; B 2 0 598 441 ;
-C 110 ; WX 600 ; N n ; B 33 0 568 441 ;
-C 111 ; WX 600 ; N o ; B 62 -15 538 441 ;
-C 112 ; WX 600 ; N p ; B 16 -157 548 441 ;
-C 113 ; WX 600 ; N q ; B 52 -157 584 441 ;
-C 114 ; WX 600 ; N r ; B 67 0 552 441 ;
-C 115 ; WX 600 ; N s ; B 94 -15 506 441 ;
-C 116 ; WX 600 ; N t ; B 74 -15 503 561 ;
-C 117 ; WX 600 ; N u ; B 28 -15 555 426 ;
-C 118 ; WX 600 ; N v ; B 17 -10 583 426 ;
-C 119 ; WX 600 ; N w ; B -1 -10 601 426 ;
-C 120 ; WX 600 ; N x ; B 27 0 573 426 ;
-C 121 ; WX 600 ; N y ; B -12 -157 552 426 ;
-C 122 ; WX 600 ; N z ; B 106 0 495 426 ;
-C 123 ; WX 600 ; N braceleft ; B 189 -108 430 622 ;
-C 124 ; WX 600 ; N bar ; B 282 -80 319 629 ;
-C 125 ; WX 600 ; N braceright ; B 170 -108 411 622 ;
-C 126 ; WX 600 ; N asciitilde ; B 67 160 534 269 ;
-C 161 ; WX 600 ; N exclamdown ; B 236 -157 364 430 ;
-C 162 ; WX 600 ; N cent ; B 103 -49 493 614 ;
-C 163 ; WX 600 ; N sterling ; B 91 -21 518 611 ;
-C 164 ; WX 600 ; N fraction ; B 31 -57 569 665 ;
-C 165 ; WX 600 ; N yen ; B 33 0 567 594 ;
-C 166 ; WX 600 ; N florin ; B 11 -143 532 622 ;
-C 167 ; WX 600 ; N section ; B 120 -78 481 580 ;
-C 168 ; WX 600 ; N currency ; B 80 65 520 499 ;
-C 169 ; WX 600 ; N quotesingle ; B 259 328 341 562 ;
-C 170 ; WX 600 ; N quotedblleft ; B 143 328 457 562 ;
-C 171 ; WX 600 ; N guillemotleft ; B 37 70 563 446 ;
-C 172 ; WX 600 ; N guilsinglleft ; B 149 70 451 446 ;
-C 173 ; WX 600 ; N guilsinglright ; B 149 70 451 446 ;
-C 174 ; WX 600 ; N fi ; B 10 0 590 629 ;
-C 175 ; WX 600 ; N fl ; B 10 0 590 629 ;
-C 177 ; WX 600 ; N endash ; B 75 238 525 278 ;
-C 178 ; WX 600 ; N dagger ; B 148 -78 452 580 ;
-C 179 ; WX 600 ; N daggerdbl ; B 148 -78 452 580 ;
-C 180 ; WX 600 ; N periodcentered ; B 229 152 371 276 ;
-C 182 ; WX 600 ; N paragraph ; B 57 -78 504 562 ;
-C 183 ; WX 600 ; N bullet ; B 179 137 421 376 ;
-C 184 ; WX 600 ; N quotesinglbase ; B 213 -134 376 100 ;
-C 185 ; WX 600 ; N quotedblbase ; B 143 -134 457 100 ;
-C 186 ; WX 600 ; N quotedblright ; B 143 328 457 562 ;
-C 187 ; WX 600 ; N guillemotright ; B 37 70 563 446 ;
-C 188 ; WX 600 ; N ellipsis ; B 44 -15 556 97 ;
-C 189 ; WX 600 ; N perthousand ; B 3 -15 600 622 ;
-C 191 ; WX 600 ; N questiondown ; B 115 -157 464 430 ;
-C 193 ; WX 600 ; N grave ; B 151 497 378 672 ;
-C 194 ; WX 600 ; N acute ; B 242 497 469 672 ;
-C 195 ; WX 600 ; N circumflex ; B 124 477 476 654 ;
-C 196 ; WX 600 ; N tilde ; B 109 503 491 606 ;
-C 197 ; WX 600 ; N macron ; B 120 525 480 565 ;
-C 198 ; WX 600 ; N breve ; B 153 501 447 609 ;
-C 199 ; WX 600 ; N dotaccent ; B 264 508 336 580 ;
-C 200 ; WX 600 ; N dieresis ; B 198 508 402 580 ;
-C 202 ; WX 600 ; N ring ; B 228 483 372 627 ;
-C 203 ; WX 600 ; N cedilla ; B 249 -151 358 10 ;
-C 205 ; WX 600 ; N hungarumlaut ; B 133 497 540 672 ;
-C 206 ; WX 600 ; N ogonek ; B 227 -151 370 0 ;
-C 207 ; WX 600 ; N caron ; B 124 492 476 669 ;
-C 208 ; WX 600 ; N emdash ; B 0 238 600 278 ;
-C 225 ; WX 600 ; N AE ; B 10 0 543 562 ;
-C 227 ; WX 600 ; N ordfeminine ; B 161 259 437 580 ;
-C 232 ; WX 600 ; N Lslash ; B 54 0 547 562 ;
-C 233 ; WX 600 ; N Oslash ; B 43 -80 557 629 ;
-C 234 ; WX 600 ; N OE ; B 14 0 560 562 ;
-C 235 ; WX 600 ; N ordmasculine ; B 162 259 438 580 ;
-C 241 ; WX 600 ; N ae ; B 26 -15 563 441 ;
-C 245 ; WX 600 ; N dotlessi ; B 102 0 498 426 ;
-C 248 ; WX 600 ; N lslash ; B 102 0 498 629 ;
-C 249 ; WX 600 ; N oslash ; B 62 -80 538 506 ;
-C 250 ; WX 600 ; N oe ; B 26 -15 552 441 ;
-C 251 ; WX 600 ; N germandbls ; B 55 -15 581 629 ;
-C -1 ; WX 600 ; N scedilla ; B 94 -151 506 441 ;
-C -1 ; WX 600 ; N notegraphic ; B 136 -15 464 572 ;
-C -1 ; WX 600 ; N Ocircumflex ; B 43 -18 557 775 ;
-C -1 ; WX 600 ; N ll ; B 25 0 560 629 ;
-C -1 ; WX 600 ; N otilde ; B 62 -15 538 606 ;
-C -1 ; WX 600 ; N scaron ; B 94 -15 506 669 ;
-C -1 ; WX 600 ; N divide ; B 87 1 513 426 ;
-C -1 ; WX 600 ; N Thorn ; B 86 0 531 562 ;
-C -1 ; WX 600 ; N format ; B 5 -157 42 598 ;
-C -1 ; WX 600 ; N largebullet ; B 268 227 332 290 ;
-C -1 ; WX 600 ; N Eth ; B 30 0 567 562 ;
-C -1 ; WX 600 ; N Odieresis ; B 43 -18 557 716 ;
-C -1 ; WX 600 ; N onesuperior ; B 179 249 421 622 ;
-C -1 ; WX 600 ; N dectab ; B 18 0 582 227 ;
-C -1 ; WX 600 ; N Ydieresis ; B 31 0 569 716 ;
-C -1 ; WX 600 ; N merge ; B 167 -15 433 436 ;
-C -1 ; WX 600 ; N IJ ; B 39 -18 562 562 ;
-C -1 ; WX 600 ; N ccedilla ; B 73 -151 522 441 ;
-C -1 ; WX 600 ; N multiply ; B 87 -1 514 426 ;
-C -1 ; WX 600 ; N degree ; B 123 269 477 622 ;
-C -1 ; WX 600 ; N prescription ; B 34 -15 570 562 ;
-C -1 ; WX 600 ; N indent ; B 70 75 530 341 ;
-C -1 ; WX 600 ; N Otilde ; B 43 -18 557 732 ;
-C -1 ; WX 600 ; N thorn ; B 1 -157 548 629 ;
-C -1 ; WX 600 ; N mu ; B 28 -157 555 426 ;
-C -1 ; WX 600 ; N Yacute ; B 31 0 569 793 ;
-C -1 ; WX 600 ; N threesuperior ; B 162 240 399 622 ;
-C -1 ; WX 600 ; N logicalnot ; B 87 64 513 325 ;
-C -1 ; WX 600 ; N Ugrave ; B 24 -18 576 793 ;
-C -1 ; WX 600 ; N eth ; B 62 -15 538 629 ;
-C -1 ; WX 600 ; N left ; B 70 75 530 341 ;
-C -1 ; WX 600 ; N Ecircumflex ; B 60 0 543 775 ;
-C -1 ; WX 600 ; N edieresis ; B 73 -15 541 580 ;
-C -1 ; WX 600 ; N Ograve ; B 43 -18 557 793 ;
-C -1 ; WX 600 ; N down ; B 167 -15 433 422 ;
-C -1 ; WX 600 ; N Agrave ; B 10 0 590 793 ;
-C -1 ; WX 600 ; N atilde ; B 60 -15 552 606 ;
-C -1 ; WX 600 ; N up ; B 167 0 433 437 ;
-C -1 ; WX 600 ; N eacute ; B 73 -15 541 672 ;
-C -1 ; WX 600 ; N graybox ; B 76 0 525 599 ;
-C -1 ; WX 600 ; N lira ; B 80 -21 518 611 ;
-C -1 ; WX 600 ; N Icircumflex ; B 103 0 497 775 ;
-C -1 ; WX 600 ; N Adieresis ; B 10 0 590 716 ;
-C -1 ; WX 600 ; N yacute ; B -12 -157 552 672 ;
-C -1 ; WX 600 ; N icircumflex ; B 94 0 498 654 ;
-C -1 ; WX 600 ; N adieresis ; B 60 -15 552 580 ;
-C -1 ; WX 600 ; N zcaron ; B 106 0 495 669 ;
-C -1 ; WX 600 ; N Scaron ; B 79 -20 522 805 ;
-C -1 ; WX 600 ; N minus ; B 87 195 513 232 ;
-C -1 ; WX 600 ; N Aring ; B 10 0 590 753 ;
-C -1 ; WX 600 ; N Ucircumflex ; B 24 -18 576 775 ;
-C -1 ; WX 600 ; N plusminus ; B 87 0 513 514 ;
-C -1 ; WX 600 ; N ograve ; B 62 -15 538 672 ;
-C -1 ; WX 600 ; N Edieresis ; B 60 0 543 716 ;
-C -1 ; WX 600 ; N brokenbar ; B 282 -80 319 629 ;
-C -1 ; WX 600 ; N Idieresis ; B 103 0 497 716 ;
-C -1 ; WX 600 ; N acircumflex ; B 60 -15 552 654 ;
-C -1 ; WX 600 ; N ydieresis ; B -12 -157 552 580 ;
-C -1 ; WX 600 ; N Oacute ; B 43 -18 557 793 ;
-C -1 ; WX 600 ; N Egrave ; B 60 0 543 793 ;
-C -1 ; WX 600 ; N center ; B 40 14 560 580 ;
-C -1 ; WX 600 ; N threequarters ; B 22 -57 574 665 ;
-C -1 ; WX 600 ; N tab ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N ecircumflex ; B 73 -15 541 654 ;
-C -1 ; WX 600 ; N Eacute ; B 60 0 543 793 ;
-C -1 ; WX 600 ; N trademark ; B 10 263 591 562 ;
-C -1 ; WX 600 ; N square ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N onehalf ; B 0 -57 611 665 ;
-C -1 ; WX 600 ; N onequarter ; B 6 -57 594 665 ;
-C -1 ; WX 600 ; N Uacute ; B 24 -18 576 793 ;
-C -1 ; WX 600 ; N Atilde ; B 10 0 590 732 ;
-C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ;
-C -1 ; WX 600 ; N Igrave ; B 103 0 497 793 ;
-C -1 ; WX 600 ; N Iacute ; B 103 0 497 793 ;
-C -1 ; WX 600 ; N Acircumflex ; B 10 0 590 775 ;
-C -1 ; WX 600 ; N Udieresis ; B 24 -18 576 716 ;
-C -1 ; WX 600 ; N Gcaron ; B 38 -18 568 805 ;
-C -1 ; WX 600 ; N Aacute ; B 10 0 590 793 ;
-C -1 ; WX 600 ; N LL ; B 15 0 585 562 ;
-C -1 ; WX 600 ; N twosuperior ; B 184 249 417 622 ;
-C -1 ; WX 600 ; N Scedilla ; B 79 -151 522 580 ;
-C -1 ; WX 600 ; N arrowboth ; B -28 122 628 476 ;
-C -1 ; WX 600 ; N udieresis ; B 28 -15 555 580 ;
-C -1 ; WX 600 ; N odieresis ; B 62 -15 538 580 ;
-C -1 ; WX 600 ; N aring ; B 60 -15 552 627 ;
-C -1 ; WX 600 ; N ij ; B 44 -157 483 657 ;
-C -1 ; WX 600 ; N arrowdown ; B 123 -15 477 608 ;
-C -1 ; WX 600 ; N igrave ; B 102 0 498 672 ;
-C -1 ; WX 600 ; N aacute ; B 60 -15 552 672 ;
-C -1 ; WX 600 ; N stop ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N ocircumflex ; B 62 -15 538 654 ;
-C -1 ; WX 600 ; N gcaron ; B 52 -157 559 669 ;
-C -1 ; WX 600 ; N iacute ; B 102 0 498 672 ;
-C -1 ; WX 600 ; N Ntilde ; B 14 -13 586 732 ;
-C -1 ; WX 600 ; N idieresis ; B 102 0 498 580 ;
-C -1 ; WX 600 ; N Ccedilla ; B 48 -151 533 580 ;
-C -1 ; WX 600 ; N arrowright ; B -24 122 624 476 ;
-C -1 ; WX 600 ; N ucircumflex ; B 28 -15 555 654 ;
-C -1 ; WX 600 ; N Idot ; B 103 0 497 716 ;
-C -1 ; WX 600 ; N agrave ; B 60 -15 552 672 ;
-C -1 ; WX 600 ; N ntilde ; B 33 0 568 606 ;
-C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ;
-C -1 ; WX 600 ; N return ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N Zcaron ; B 86 0 514 805 ;
-C -1 ; WX 600 ; N uacute ; B 28 -15 555 672 ;
-C -1 ; WX 600 ; N overscore ; B 0 579 600 629 ;
-C -1 ; WX 600 ; N egrave ; B 73 -15 541 672 ;
-C -1 ; WX 600 ; N ugrave ; B 28 -15 555 672 ;
-C -1 ; WX 600 ; N oacute ; B 62 -15 538 672 ;
-C -1 ; WX 600 ; N arrowleft ; B -24 122 624 476 ;
-C -1 ; WX 600 ; N arrowup ; B 123 0 477 623 ;
-EndCharMetrics
-StartComposites 62
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 20 121 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -30 121 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis -30 136 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave -30 121 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring -15 126 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 126 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 30 121 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 121 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 136 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 121 ;
-CC Gcaron 2 ; PCC G 0 0 ; PCC caron 0 136 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 121 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 121 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 136 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 121 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 126 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 121 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 121 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 136 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 121 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 126 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 30 136 ;
-CC Scedilla 2 ; PCC S 0 0 ; PCC cedilla 0 0 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 30 121 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 121 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 136 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave -30 121 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 30 121 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 136 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 136 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ;
-CC gcaron 2 ; PCC g 0 0 ; PCC caron -30 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -30 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -30 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -30 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ;
-CC scedilla 2 ; PCC s 0 0 ; PCC cedilla 0 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute -10 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -10 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute -20 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis -10 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 10 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Helvetica-Bold.afm b/config/psfonts/Helvetica-Bold.afm
deleted file mode 100644 (file)
index a1e1b33..0000000
+++ /dev/null
@@ -1,570 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Thu Mar 15 09:43:00 1990
-Comment UniqueID 28357
-Comment VMusage 26878 33770
-FontName Helvetica-Bold
-FullName Helvetica Bold
-FamilyName Helvetica
-Weight Bold
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -170 -228 1003 962
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 532
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 90 0 244 718 ;
-C 34 ; WX 474 ; N quotedbl ; B 98 447 376 718 ;
-C 35 ; WX 556 ; N numbersign ; B 18 0 538 698 ;
-C 36 ; WX 556 ; N dollar ; B 30 -115 523 775 ;
-C 37 ; WX 889 ; N percent ; B 28 -19 861 710 ;
-C 38 ; WX 722 ; N ampersand ; B 54 -19 701 718 ;
-C 39 ; WX 278 ; N quoteright ; B 69 445 209 718 ;
-C 40 ; WX 333 ; N parenleft ; B 35 -208 314 734 ;
-C 41 ; WX 333 ; N parenright ; B 19 -208 298 734 ;
-C 42 ; WX 389 ; N asterisk ; B 27 387 362 718 ;
-C 43 ; WX 584 ; N plus ; B 40 0 544 506 ;
-C 44 ; WX 278 ; N comma ; B 64 -168 214 146 ;
-C 45 ; WX 333 ; N hyphen ; B 27 215 306 345 ;
-C 46 ; WX 278 ; N period ; B 64 0 214 146 ;
-C 47 ; WX 278 ; N slash ; B -33 -19 311 737 ;
-C 48 ; WX 556 ; N zero ; B 32 -19 524 710 ;
-C 49 ; WX 556 ; N one ; B 69 0 378 710 ;
-C 50 ; WX 556 ; N two ; B 26 0 511 710 ;
-C 51 ; WX 556 ; N three ; B 27 -19 516 710 ;
-C 52 ; WX 556 ; N four ; B 27 0 526 710 ;
-C 53 ; WX 556 ; N five ; B 27 -19 516 698 ;
-C 54 ; WX 556 ; N six ; B 31 -19 520 710 ;
-C 55 ; WX 556 ; N seven ; B 25 0 528 698 ;
-C 56 ; WX 556 ; N eight ; B 32 -19 524 710 ;
-C 57 ; WX 556 ; N nine ; B 30 -19 522 710 ;
-C 58 ; WX 333 ; N colon ; B 92 0 242 512 ;
-C 59 ; WX 333 ; N semicolon ; B 92 -168 242 512 ;
-C 60 ; WX 584 ; N less ; B 38 -8 546 514 ;
-C 61 ; WX 584 ; N equal ; B 40 87 544 419 ;
-C 62 ; WX 584 ; N greater ; B 38 -8 546 514 ;
-C 63 ; WX 611 ; N question ; B 60 0 556 727 ;
-C 64 ; WX 975 ; N at ; B 118 -19 856 737 ;
-C 65 ; WX 722 ; N A ; B 20 0 702 718 ;
-C 66 ; WX 722 ; N B ; B 76 0 669 718 ;
-C 67 ; WX 722 ; N C ; B 44 -19 684 737 ;
-C 68 ; WX 722 ; N D ; B 76 0 685 718 ;
-C 69 ; WX 667 ; N E ; B 76 0 621 718 ;
-C 70 ; WX 611 ; N F ; B 76 0 587 718 ;
-C 71 ; WX 778 ; N G ; B 44 -19 713 737 ;
-C 72 ; WX 722 ; N H ; B 71 0 651 718 ;
-C 73 ; WX 278 ; N I ; B 64 0 214 718 ;
-C 74 ; WX 556 ; N J ; B 22 -18 484 718 ;
-C 75 ; WX 722 ; N K ; B 87 0 722 718 ;
-C 76 ; WX 611 ; N L ; B 76 0 583 718 ;
-C 77 ; WX 833 ; N M ; B 69 0 765 718 ;
-C 78 ; WX 722 ; N N ; B 69 0 654 718 ;
-C 79 ; WX 778 ; N O ; B 44 -19 734 737 ;
-C 80 ; WX 667 ; N P ; B 76 0 627 718 ;
-C 81 ; WX 778 ; N Q ; B 44 -52 737 737 ;
-C 82 ; WX 722 ; N R ; B 76 0 677 718 ;
-C 83 ; WX 667 ; N S ; B 39 -19 629 737 ;
-C 84 ; WX 611 ; N T ; B 14 0 598 718 ;
-C 85 ; WX 722 ; N U ; B 72 -19 651 718 ;
-C 86 ; WX 667 ; N V ; B 19 0 648 718 ;
-C 87 ; WX 944 ; N W ; B 16 0 929 718 ;
-C 88 ; WX 667 ; N X ; B 14 0 653 718 ;
-C 89 ; WX 667 ; N Y ; B 15 0 653 718 ;
-C 90 ; WX 611 ; N Z ; B 25 0 586 718 ;
-C 91 ; WX 333 ; N bracketleft ; B 63 -196 309 722 ;
-C 92 ; WX 278 ; N backslash ; B -33 -19 311 737 ;
-C 93 ; WX 333 ; N bracketright ; B 24 -196 270 722 ;
-C 94 ; WX 584 ; N asciicircum ; B 62 323 522 698 ;
-C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 69 454 209 727 ;
-C 97 ; WX 556 ; N a ; B 29 -14 527 546 ;
-C 98 ; WX 611 ; N b ; B 61 -14 578 718 ;
-C 99 ; WX 556 ; N c ; B 34 -14 524 546 ;
-C 100 ; WX 611 ; N d ; B 34 -14 551 718 ;
-C 101 ; WX 556 ; N e ; B 23 -14 528 546 ;
-C 102 ; WX 333 ; N f ; B 10 0 318 727 ; L i fi ; L l fl ;
-C 103 ; WX 611 ; N g ; B 40 -217 553 546 ;
-C 104 ; WX 611 ; N h ; B 65 0 546 718 ;
-C 105 ; WX 278 ; N i ; B 69 0 209 725 ;
-C 106 ; WX 278 ; N j ; B 3 -214 209 725 ;
-C 107 ; WX 556 ; N k ; B 69 0 562 718 ;
-C 108 ; WX 278 ; N l ; B 69 0 209 718 ;
-C 109 ; WX 889 ; N m ; B 64 0 826 546 ;
-C 110 ; WX 611 ; N n ; B 65 0 546 546 ;
-C 111 ; WX 611 ; N o ; B 34 -14 578 546 ;
-C 112 ; WX 611 ; N p ; B 62 -207 578 546 ;
-C 113 ; WX 611 ; N q ; B 34 -207 552 546 ;
-C 114 ; WX 389 ; N r ; B 64 0 373 546 ;
-C 115 ; WX 556 ; N s ; B 30 -14 519 546 ;
-C 116 ; WX 333 ; N t ; B 10 -6 309 676 ;
-C 117 ; WX 611 ; N u ; B 66 -14 545 532 ;
-C 118 ; WX 556 ; N v ; B 13 0 543 532 ;
-C 119 ; WX 778 ; N w ; B 10 0 769 532 ;
-C 120 ; WX 556 ; N x ; B 15 0 541 532 ;
-C 121 ; WX 556 ; N y ; B 10 -214 539 532 ;
-C 122 ; WX 500 ; N z ; B 20 0 480 532 ;
-C 123 ; WX 389 ; N braceleft ; B 48 -196 365 722 ;
-C 124 ; WX 280 ; N bar ; B 84 -19 196 737 ;
-C 125 ; WX 389 ; N braceright ; B 24 -196 341 722 ;
-C 126 ; WX 584 ; N asciitilde ; B 61 163 523 343 ;
-C 161 ; WX 333 ; N exclamdown ; B 90 -186 244 532 ;
-C 162 ; WX 556 ; N cent ; B 34 -118 524 628 ;
-C 163 ; WX 556 ; N sterling ; B 28 -16 541 718 ;
-C 164 ; WX 167 ; N fraction ; B -170 -19 336 710 ;
-C 165 ; WX 556 ; N yen ; B -9 0 565 698 ;
-C 166 ; WX 556 ; N florin ; B -10 -210 516 737 ;
-C 167 ; WX 556 ; N section ; B 34 -184 522 727 ;
-C 168 ; WX 556 ; N currency ; B -3 76 559 636 ;
-C 169 ; WX 238 ; N quotesingle ; B 70 447 168 718 ;
-C 170 ; WX 500 ; N quotedblleft ; B 64 454 436 727 ;
-C 171 ; WX 556 ; N guillemotleft ; B 88 76 468 484 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 83 76 250 484 ;
-C 173 ; WX 333 ; N guilsinglright ; B 83 76 250 484 ;
-C 174 ; WX 611 ; N fi ; B 10 0 542 727 ;
-C 175 ; WX 611 ; N fl ; B 10 0 542 727 ;
-C 177 ; WX 556 ; N endash ; B 0 227 556 333 ;
-C 178 ; WX 556 ; N dagger ; B 36 -171 520 718 ;
-C 179 ; WX 556 ; N daggerdbl ; B 36 -171 520 718 ;
-C 180 ; WX 278 ; N periodcentered ; B 58 172 220 334 ;
-C 182 ; WX 556 ; N paragraph ; B -8 -191 539 700 ;
-C 183 ; WX 350 ; N bullet ; B 10 194 340 524 ;
-C 184 ; WX 278 ; N quotesinglbase ; B 69 -146 209 127 ;
-C 185 ; WX 500 ; N quotedblbase ; B 64 -146 436 127 ;
-C 186 ; WX 500 ; N quotedblright ; B 64 445 436 718 ;
-C 187 ; WX 556 ; N guillemotright ; B 88 76 468 484 ;
-C 188 ; WX 1000 ; N ellipsis ; B 92 0 908 146 ;
-C 189 ; WX 1000 ; N perthousand ; B -3 -19 1003 710 ;
-C 191 ; WX 611 ; N questiondown ; B 55 -195 551 532 ;
-C 193 ; WX 333 ; N grave ; B -23 604 225 750 ;
-C 194 ; WX 333 ; N acute ; B 108 604 356 750 ;
-C 195 ; WX 333 ; N circumflex ; B -10 604 343 750 ;
-C 196 ; WX 333 ; N tilde ; B -17 610 350 737 ;
-C 197 ; WX 333 ; N macron ; B -6 604 339 678 ;
-C 198 ; WX 333 ; N breve ; B -2 604 335 750 ;
-C 199 ; WX 333 ; N dotaccent ; B 104 614 230 729 ;
-C 200 ; WX 333 ; N dieresis ; B 6 614 327 729 ;
-C 202 ; WX 333 ; N ring ; B 59 568 275 776 ;
-C 203 ; WX 333 ; N cedilla ; B 6 -228 245 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 9 604 486 750 ;
-C 206 ; WX 333 ; N ogonek ; B 71 -228 304 0 ;
-C 207 ; WX 333 ; N caron ; B -10 604 343 750 ;
-C 208 ; WX 1000 ; N emdash ; B 0 227 1000 333 ;
-C 225 ; WX 1000 ; N AE ; B 5 0 954 718 ;
-C 227 ; WX 370 ; N ordfeminine ; B 22 276 347 737 ;
-C 232 ; WX 611 ; N Lslash ; B -20 0 583 718 ;
-C 233 ; WX 778 ; N Oslash ; B 33 -27 744 745 ;
-C 234 ; WX 1000 ; N OE ; B 37 -19 961 737 ;
-C 235 ; WX 365 ; N ordmasculine ; B 6 276 360 737 ;
-C 241 ; WX 889 ; N ae ; B 29 -14 858 546 ;
-C 245 ; WX 278 ; N dotlessi ; B 69 0 209 532 ;
-C 248 ; WX 278 ; N lslash ; B -18 0 296 718 ;
-C 249 ; WX 611 ; N oslash ; B 22 -29 589 560 ;
-C 250 ; WX 944 ; N oe ; B 34 -14 912 546 ;
-C 251 ; WX 611 ; N germandbls ; B 69 -14 579 731 ;
-C -1 ; WX 611 ; N Zcaron ; B 25 0 586 936 ;
-C -1 ; WX 556 ; N ccedilla ; B 34 -228 524 546 ;
-C -1 ; WX 556 ; N ydieresis ; B 10 -214 539 729 ;
-C -1 ; WX 556 ; N atilde ; B 29 -14 527 737 ;
-C -1 ; WX 278 ; N icircumflex ; B -37 0 316 750 ;
-C -1 ; WX 333 ; N threesuperior ; B 8 271 326 710 ;
-C -1 ; WX 556 ; N ecircumflex ; B 23 -14 528 750 ;
-C -1 ; WX 611 ; N thorn ; B 62 -208 578 718 ;
-C -1 ; WX 556 ; N egrave ; B 23 -14 528 750 ;
-C -1 ; WX 333 ; N twosuperior ; B 9 283 324 710 ;
-C -1 ; WX 556 ; N eacute ; B 23 -14 528 750 ;
-C -1 ; WX 611 ; N otilde ; B 34 -14 578 737 ;
-C -1 ; WX 722 ; N Aacute ; B 20 0 702 936 ;
-C -1 ; WX 611 ; N ocircumflex ; B 34 -14 578 750 ;
-C -1 ; WX 556 ; N yacute ; B 10 -214 539 750 ;
-C -1 ; WX 611 ; N udieresis ; B 66 -14 545 729 ;
-C -1 ; WX 834 ; N threequarters ; B 16 -19 799 710 ;
-C -1 ; WX 556 ; N acircumflex ; B 29 -14 527 750 ;
-C -1 ; WX 722 ; N Eth ; B -5 0 685 718 ;
-C -1 ; WX 556 ; N edieresis ; B 23 -14 528 729 ;
-C -1 ; WX 611 ; N ugrave ; B 66 -14 545 750 ;
-C -1 ; WX 1000 ; N trademark ; B 44 306 956 718 ;
-C -1 ; WX 611 ; N ograve ; B 34 -14 578 750 ;
-C -1 ; WX 556 ; N scaron ; B 30 -14 519 750 ;
-C -1 ; WX 278 ; N Idieresis ; B -21 0 300 915 ;
-C -1 ; WX 611 ; N uacute ; B 66 -14 545 750 ;
-C -1 ; WX 556 ; N agrave ; B 29 -14 527 750 ;
-C -1 ; WX 611 ; N ntilde ; B 65 0 546 737 ;
-C -1 ; WX 556 ; N aring ; B 29 -14 527 776 ;
-C -1 ; WX 500 ; N zcaron ; B 20 0 480 750 ;
-C -1 ; WX 278 ; N Icircumflex ; B -37 0 316 936 ;
-C -1 ; WX 722 ; N Ntilde ; B 69 0 654 923 ;
-C -1 ; WX 611 ; N ucircumflex ; B 66 -14 545 750 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 76 0 621 936 ;
-C -1 ; WX 278 ; N Iacute ; B 64 0 329 936 ;
-C -1 ; WX 722 ; N Ccedilla ; B 44 -228 684 737 ;
-C -1 ; WX 778 ; N Odieresis ; B 44 -19 734 915 ;
-C -1 ; WX 667 ; N Scaron ; B 39 -19 629 936 ;
-C -1 ; WX 667 ; N Edieresis ; B 76 0 621 915 ;
-C -1 ; WX 278 ; N Igrave ; B -50 0 214 936 ;
-C -1 ; WX 556 ; N adieresis ; B 29 -14 527 729 ;
-C -1 ; WX 778 ; N Ograve ; B 44 -19 734 936 ;
-C -1 ; WX 667 ; N Egrave ; B 76 0 621 936 ;
-C -1 ; WX 667 ; N Ydieresis ; B 15 0 653 915 ;
-C -1 ; WX 737 ; N registered ; B -11 -19 748 737 ;
-C -1 ; WX 778 ; N Otilde ; B 44 -19 734 923 ;
-C -1 ; WX 834 ; N onequarter ; B 26 -19 766 710 ;
-C -1 ; WX 722 ; N Ugrave ; B 72 -19 651 936 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 72 -19 651 936 ;
-C -1 ; WX 667 ; N Thorn ; B 76 0 627 718 ;
-C -1 ; WX 584 ; N divide ; B 40 -42 544 548 ;
-C -1 ; WX 722 ; N Atilde ; B 20 0 702 923 ;
-C -1 ; WX 722 ; N Uacute ; B 72 -19 651 936 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 44 -19 734 936 ;
-C -1 ; WX 584 ; N logicalnot ; B 40 108 544 419 ;
-C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ;
-C -1 ; WX 278 ; N idieresis ; B -21 0 300 729 ;
-C -1 ; WX 278 ; N iacute ; B 69 0 329 750 ;
-C -1 ; WX 556 ; N aacute ; B 29 -14 527 750 ;
-C -1 ; WX 584 ; N plusminus ; B 40 0 544 506 ;
-C -1 ; WX 584 ; N multiply ; B 40 1 545 505 ;
-C -1 ; WX 722 ; N Udieresis ; B 72 -19 651 915 ;
-C -1 ; WX 584 ; N minus ; B 40 197 544 309 ;
-C -1 ; WX 333 ; N onesuperior ; B 26 283 237 710 ;
-C -1 ; WX 667 ; N Eacute ; B 76 0 621 936 ;
-C -1 ; WX 722 ; N Acircumflex ; B 20 0 702 936 ;
-C -1 ; WX 737 ; N copyright ; B -11 -19 749 737 ;
-C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ;
-C -1 ; WX 611 ; N odieresis ; B 34 -14 578 729 ;
-C -1 ; WX 611 ; N oacute ; B 34 -14 578 750 ;
-C -1 ; WX 400 ; N degree ; B 57 426 343 712 ;
-C -1 ; WX 278 ; N igrave ; B -50 0 209 750 ;
-C -1 ; WX 611 ; N mu ; B 66 -207 545 532 ;
-C -1 ; WX 778 ; N Oacute ; B 44 -19 734 936 ;
-C -1 ; WX 611 ; N eth ; B 34 -14 578 737 ;
-C -1 ; WX 722 ; N Adieresis ; B 20 0 702 915 ;
-C -1 ; WX 667 ; N Yacute ; B 15 0 653 936 ;
-C -1 ; WX 280 ; N brokenbar ; B 84 -19 196 737 ;
-C -1 ; WX 834 ; N onehalf ; B 26 -19 794 710 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 209
-
-KPX A y -30
-KPX A w -30
-KPX A v -40
-KPX A u -30
-KPX A Y -110
-KPX A W -60
-KPX A V -80
-KPX A U -50
-KPX A T -90
-KPX A Q -40
-KPX A O -40
-KPX A G -50
-KPX A C -40
-
-KPX B U -10
-KPX B A -30
-
-KPX D period -30
-KPX D comma -30
-KPX D Y -70
-KPX D W -40
-KPX D V -40
-KPX D A -40
-
-KPX F period -100
-KPX F comma -100
-KPX F a -20
-KPX F A -80
-
-KPX J u -20
-KPX J period -20
-KPX J comma -20
-KPX J A -20
-
-KPX K y -40
-KPX K u -30
-KPX K o -35
-KPX K e -15
-KPX K O -30
-
-KPX L y -30
-KPX L quoteright -140
-KPX L quotedblright -140
-KPX L Y -120
-KPX L W -80
-KPX L V -110
-KPX L T -90
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -50
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -50
-
-KPX P period -120
-KPX P o -40
-KPX P e -30
-KPX P comma -120
-KPX P a -30
-KPX P A -100
-
-KPX Q period 20
-KPX Q comma 20
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -40
-KPX R V -50
-KPX R U -20
-KPX R T -20
-KPX R O -20
-
-KPX T y -60
-KPX T w -60
-KPX T u -90
-KPX T semicolon -40
-KPX T r -80
-KPX T period -80
-KPX T o -80
-KPX T hyphen -120
-KPX T e -60
-KPX T comma -80
-KPX T colon -40
-KPX T a -80
-KPX T O -40
-KPX T A -90
-
-KPX U period -30
-KPX U comma -30
-KPX U A -50
-
-KPX V u -60
-KPX V semicolon -40
-KPX V period -120
-KPX V o -90
-KPX V hyphen -80
-KPX V e -50
-KPX V comma -120
-KPX V colon -40
-KPX V a -60
-KPX V O -50
-KPX V G -50
-KPX V A -80
-
-KPX W y -20
-KPX W u -45
-KPX W semicolon -10
-KPX W period -80
-KPX W o -60
-KPX W hyphen -40
-KPX W e -35
-KPX W comma -80
-KPX W colon -10
-KPX W a -40
-KPX W O -20
-KPX W A -60
-
-KPX Y u -100
-KPX Y semicolon -50
-KPX Y period -100
-KPX Y o -100
-KPX Y e -80
-KPX Y comma -100
-KPX Y colon -50
-KPX Y a -90
-KPX Y O -70
-KPX Y A -110
-
-KPX a y -20
-KPX a w -15
-KPX a v -15
-KPX a g -10
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b l -10
-
-KPX c y -10
-KPX c l -20
-KPX c k -20
-KPX c h -10
-
-KPX colon space -40
-
-KPX comma space -40
-KPX comma quoteright -120
-KPX comma quotedblright -120
-
-KPX d y -15
-KPX d w -15
-KPX d v -15
-KPX d d -10
-
-KPX e y -15
-KPX e x -15
-KPX e w -15
-KPX e v -15
-KPX e period 20
-KPX e comma 10
-
-KPX f quoteright 30
-KPX f quotedblright 30
-KPX f period -10
-KPX f o -20
-KPX f e -10
-KPX f comma -10
-
-KPX g g -10
-KPX g e 10
-
-KPX h y -20
-
-KPX k o -15
-
-KPX l y -15
-KPX l w -15
-
-KPX m y -30
-KPX m u -20
-
-KPX n y -20
-KPX n v -40
-KPX n u -10
-
-KPX o y -20
-KPX o x -30
-KPX o w -15
-KPX o v -20
-
-KPX p y -15
-
-KPX period space -40
-KPX period quoteright -120
-KPX period quotedblright -120
-
-KPX quotedblright space -80
-
-KPX quoteleft quoteleft -46
-
-KPX quoteright v -20
-KPX quoteright space -80
-KPX quoteright s -60
-KPX quoteright r -40
-KPX quoteright quoteright -46
-KPX quoteright l -20
-KPX quoteright d -80
-
-KPX r y 10
-KPX r v 10
-KPX r t 20
-KPX r s -15
-KPX r q -20
-KPX r period -60
-KPX r o -20
-KPX r hyphen -20
-KPX r g -15
-KPX r d -20
-KPX r comma -60
-KPX r c -20
-
-KPX s w -15
-
-KPX semicolon space -40
-
-KPX space quoteleft -60
-KPX space quotedblleft -80
-KPX space Y -120
-KPX space W -80
-KPX space V -80
-KPX space T -100
-
-KPX v period -80
-KPX v o -30
-KPX v comma -80
-KPX v a -20
-
-KPX w period -40
-KPX w o -20
-KPX w comma -40
-
-KPX x e -10
-
-KPX y period -80
-KPX y o -25
-KPX y e -10
-KPX y comma -80
-KPX y a -30
-
-KPX z e 10
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 186 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 186 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 186 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 186 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 195 186 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 186 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 215 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 186 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 186 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 186 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 186 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 186 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 186 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 186 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 186 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 195 186 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 186 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 186 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 186 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 186 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 186 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 186 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 186 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 195 186 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 195 186 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 195 186 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 167 186 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 186 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 186 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 132 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 112 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 112 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Helvetica-BoldOblique.afm b/config/psfonts/Helvetica-BoldOblique.afm
deleted file mode 100644 (file)
index b6cff41..0000000
+++ /dev/null
@@ -1,570 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Thu Mar 15 10:44:33 1990
-Comment UniqueID 28371
-Comment VMusage 7614 43068
-FontName Helvetica-BoldOblique
-FullName Helvetica Bold Oblique
-FamilyName Helvetica
-Weight Bold
-ItalicAngle -12
-IsFixedPitch false
-FontBBox -174 -228 1114 962
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 532
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 94 0 397 718 ;
-C 34 ; WX 474 ; N quotedbl ; B 193 447 529 718 ;
-C 35 ; WX 556 ; N numbersign ; B 60 0 644 698 ;
-C 36 ; WX 556 ; N dollar ; B 67 -115 622 775 ;
-C 37 ; WX 889 ; N percent ; B 136 -19 901 710 ;
-C 38 ; WX 722 ; N ampersand ; B 89 -19 732 718 ;
-C 39 ; WX 278 ; N quoteright ; B 167 445 362 718 ;
-C 40 ; WX 333 ; N parenleft ; B 76 -208 470 734 ;
-C 41 ; WX 333 ; N parenright ; B -25 -208 369 734 ;
-C 42 ; WX 389 ; N asterisk ; B 146 387 481 718 ;
-C 43 ; WX 584 ; N plus ; B 82 0 610 506 ;
-C 44 ; WX 278 ; N comma ; B 28 -168 245 146 ;
-C 45 ; WX 333 ; N hyphen ; B 73 215 379 345 ;
-C 46 ; WX 278 ; N period ; B 64 0 245 146 ;
-C 47 ; WX 278 ; N slash ; B -37 -19 468 737 ;
-C 48 ; WX 556 ; N zero ; B 86 -19 617 710 ;
-C 49 ; WX 556 ; N one ; B 173 0 529 710 ;
-C 50 ; WX 556 ; N two ; B 26 0 619 710 ;
-C 51 ; WX 556 ; N three ; B 65 -19 608 710 ;
-C 52 ; WX 556 ; N four ; B 60 0 598 710 ;
-C 53 ; WX 556 ; N five ; B 64 -19 636 698 ;
-C 54 ; WX 556 ; N six ; B 85 -19 619 710 ;
-C 55 ; WX 556 ; N seven ; B 125 0 676 698 ;
-C 56 ; WX 556 ; N eight ; B 69 -19 616 710 ;
-C 57 ; WX 556 ; N nine ; B 78 -19 615 710 ;
-C 58 ; WX 333 ; N colon ; B 92 0 351 512 ;
-C 59 ; WX 333 ; N semicolon ; B 56 -168 351 512 ;
-C 60 ; WX 584 ; N less ; B 82 -8 655 514 ;
-C 61 ; WX 584 ; N equal ; B 58 87 633 419 ;
-C 62 ; WX 584 ; N greater ; B 36 -8 609 514 ;
-C 63 ; WX 611 ; N question ; B 165 0 671 727 ;
-C 64 ; WX 975 ; N at ; B 186 -19 954 737 ;
-C 65 ; WX 722 ; N A ; B 20 0 702 718 ;
-C 66 ; WX 722 ; N B ; B 76 0 764 718 ;
-C 67 ; WX 722 ; N C ; B 107 -19 789 737 ;
-C 68 ; WX 722 ; N D ; B 76 0 777 718 ;
-C 69 ; WX 667 ; N E ; B 76 0 757 718 ;
-C 70 ; WX 611 ; N F ; B 76 0 740 718 ;
-C 71 ; WX 778 ; N G ; B 108 -19 817 737 ;
-C 72 ; WX 722 ; N H ; B 71 0 804 718 ;
-C 73 ; WX 278 ; N I ; B 64 0 367 718 ;
-C 74 ; WX 556 ; N J ; B 60 -18 637 718 ;
-C 75 ; WX 722 ; N K ; B 87 0 858 718 ;
-C 76 ; WX 611 ; N L ; B 76 0 611 718 ;
-C 77 ; WX 833 ; N M ; B 69 0 918 718 ;
-C 78 ; WX 722 ; N N ; B 69 0 807 718 ;
-C 79 ; WX 778 ; N O ; B 107 -19 823 737 ;
-C 80 ; WX 667 ; N P ; B 76 0 738 718 ;
-C 81 ; WX 778 ; N Q ; B 107 -52 823 737 ;
-C 82 ; WX 722 ; N R ; B 76 0 778 718 ;
-C 83 ; WX 667 ; N S ; B 81 -19 718 737 ;
-C 84 ; WX 611 ; N T ; B 140 0 751 718 ;
-C 85 ; WX 722 ; N U ; B 116 -19 804 718 ;
-C 86 ; WX 667 ; N V ; B 172 0 801 718 ;
-C 87 ; WX 944 ; N W ; B 169 0 1082 718 ;
-C 88 ; WX 667 ; N X ; B 14 0 791 718 ;
-C 89 ; WX 667 ; N Y ; B 168 0 806 718 ;
-C 90 ; WX 611 ; N Z ; B 25 0 737 718 ;
-C 91 ; WX 333 ; N bracketleft ; B 21 -196 462 722 ;
-C 92 ; WX 278 ; N backslash ; B 124 -19 307 737 ;
-C 93 ; WX 333 ; N bracketright ; B -18 -196 423 722 ;
-C 94 ; WX 584 ; N asciicircum ; B 131 323 591 698 ;
-C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 165 454 361 727 ;
-C 97 ; WX 556 ; N a ; B 55 -14 583 546 ;
-C 98 ; WX 611 ; N b ; B 61 -14 645 718 ;
-C 99 ; WX 556 ; N c ; B 79 -14 599 546 ;
-C 100 ; WX 611 ; N d ; B 82 -14 704 718 ;
-C 101 ; WX 556 ; N e ; B 70 -14 593 546 ;
-C 102 ; WX 333 ; N f ; B 87 0 469 727 ; L i fi ; L l fl ;
-C 103 ; WX 611 ; N g ; B 38 -217 666 546 ;
-C 104 ; WX 611 ; N h ; B 65 0 629 718 ;
-C 105 ; WX 278 ; N i ; B 69 0 363 725 ;
-C 106 ; WX 278 ; N j ; B -42 -214 363 725 ;
-C 107 ; WX 556 ; N k ; B 69 0 670 718 ;
-C 108 ; WX 278 ; N l ; B 69 0 362 718 ;
-C 109 ; WX 889 ; N m ; B 64 0 909 546 ;
-C 110 ; WX 611 ; N n ; B 65 0 629 546 ;
-C 111 ; WX 611 ; N o ; B 82 -14 643 546 ;
-C 112 ; WX 611 ; N p ; B 18 -207 645 546 ;
-C 113 ; WX 611 ; N q ; B 80 -207 665 546 ;
-C 114 ; WX 389 ; N r ; B 64 0 489 546 ;
-C 115 ; WX 556 ; N s ; B 63 -14 584 546 ;
-C 116 ; WX 333 ; N t ; B 100 -6 422 676 ;
-C 117 ; WX 611 ; N u ; B 98 -14 658 532 ;
-C 118 ; WX 556 ; N v ; B 126 0 656 532 ;
-C 119 ; WX 778 ; N w ; B 123 0 882 532 ;
-C 120 ; WX 556 ; N x ; B 15 0 648 532 ;
-C 121 ; WX 556 ; N y ; B 42 -214 652 532 ;
-C 122 ; WX 500 ; N z ; B 20 0 583 532 ;
-C 123 ; WX 389 ; N braceleft ; B 94 -196 518 722 ;
-C 124 ; WX 280 ; N bar ; B 80 -19 353 737 ;
-C 125 ; WX 389 ; N braceright ; B -18 -196 407 722 ;
-C 126 ; WX 584 ; N asciitilde ; B 115 163 577 343 ;
-C 161 ; WX 333 ; N exclamdown ; B 50 -186 353 532 ;
-C 162 ; WX 556 ; N cent ; B 79 -118 599 628 ;
-C 163 ; WX 556 ; N sterling ; B 50 -16 635 718 ;
-C 164 ; WX 167 ; N fraction ; B -174 -19 487 710 ;
-C 165 ; WX 556 ; N yen ; B 60 0 713 698 ;
-C 166 ; WX 556 ; N florin ; B -50 -210 669 737 ;
-C 167 ; WX 556 ; N section ; B 61 -184 598 727 ;
-C 168 ; WX 556 ; N currency ; B 27 76 680 636 ;
-C 169 ; WX 238 ; N quotesingle ; B 165 447 321 718 ;
-C 170 ; WX 500 ; N quotedblleft ; B 160 454 588 727 ;
-C 171 ; WX 556 ; N guillemotleft ; B 135 76 571 484 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 130 76 353 484 ;
-C 173 ; WX 333 ; N guilsinglright ; B 99 76 322 484 ;
-C 174 ; WX 611 ; N fi ; B 87 0 696 727 ;
-C 175 ; WX 611 ; N fl ; B 87 0 695 727 ;
-C 177 ; WX 556 ; N endash ; B 48 227 627 333 ;
-C 178 ; WX 556 ; N dagger ; B 118 -171 626 718 ;
-C 179 ; WX 556 ; N daggerdbl ; B 46 -171 628 718 ;
-C 180 ; WX 278 ; N periodcentered ; B 110 172 276 334 ;
-C 182 ; WX 556 ; N paragraph ; B 98 -191 688 700 ;
-C 183 ; WX 350 ; N bullet ; B 83 194 420 524 ;
-C 184 ; WX 278 ; N quotesinglbase ; B 41 -146 236 127 ;
-C 185 ; WX 500 ; N quotedblbase ; B 36 -146 463 127 ;
-C 186 ; WX 500 ; N quotedblright ; B 162 445 589 718 ;
-C 187 ; WX 556 ; N guillemotright ; B 104 76 540 484 ;
-C 188 ; WX 1000 ; N ellipsis ; B 92 0 939 146 ;
-C 189 ; WX 1000 ; N perthousand ; B 76 -19 1038 710 ;
-C 191 ; WX 611 ; N questiondown ; B 53 -195 559 532 ;
-C 193 ; WX 333 ; N grave ; B 136 604 353 750 ;
-C 194 ; WX 333 ; N acute ; B 236 604 515 750 ;
-C 195 ; WX 333 ; N circumflex ; B 118 604 471 750 ;
-C 196 ; WX 333 ; N tilde ; B 113 610 507 737 ;
-C 197 ; WX 333 ; N macron ; B 122 604 483 678 ;
-C 198 ; WX 333 ; N breve ; B 156 604 494 750 ;
-C 199 ; WX 333 ; N dotaccent ; B 235 614 385 729 ;
-C 200 ; WX 333 ; N dieresis ; B 137 614 482 729 ;
-C 202 ; WX 333 ; N ring ; B 200 568 420 776 ;
-C 203 ; WX 333 ; N cedilla ; B -37 -228 220 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 137 604 645 750 ;
-C 206 ; WX 333 ; N ogonek ; B 41 -228 264 0 ;
-C 207 ; WX 333 ; N caron ; B 149 604 502 750 ;
-C 208 ; WX 1000 ; N emdash ; B 48 227 1071 333 ;
-C 225 ; WX 1000 ; N AE ; B 5 0 1100 718 ;
-C 227 ; WX 370 ; N ordfeminine ; B 92 276 465 737 ;
-C 232 ; WX 611 ; N Lslash ; B 34 0 611 718 ;
-C 233 ; WX 778 ; N Oslash ; B 35 -27 894 745 ;
-C 234 ; WX 1000 ; N OE ; B 99 -19 1114 737 ;
-C 235 ; WX 365 ; N ordmasculine ; B 92 276 485 737 ;
-C 241 ; WX 889 ; N ae ; B 56 -14 923 546 ;
-C 245 ; WX 278 ; N dotlessi ; B 69 0 322 532 ;
-C 248 ; WX 278 ; N lslash ; B 40 0 407 718 ;
-C 249 ; WX 611 ; N oslash ; B 22 -29 701 560 ;
-C 250 ; WX 944 ; N oe ; B 82 -14 977 546 ;
-C 251 ; WX 611 ; N germandbls ; B 69 -14 657 731 ;
-C -1 ; WX 611 ; N Zcaron ; B 25 0 737 936 ;
-C -1 ; WX 556 ; N ccedilla ; B 79 -228 599 546 ;
-C -1 ; WX 556 ; N ydieresis ; B 42 -214 652 729 ;
-C -1 ; WX 556 ; N atilde ; B 55 -14 619 737 ;
-C -1 ; WX 278 ; N icircumflex ; B 69 0 444 750 ;
-C -1 ; WX 333 ; N threesuperior ; B 91 271 441 710 ;
-C -1 ; WX 556 ; N ecircumflex ; B 70 -14 593 750 ;
-C -1 ; WX 611 ; N thorn ; B 18 -208 645 718 ;
-C -1 ; WX 556 ; N egrave ; B 70 -14 593 750 ;
-C -1 ; WX 333 ; N twosuperior ; B 69 283 449 710 ;
-C -1 ; WX 556 ; N eacute ; B 70 -14 627 750 ;
-C -1 ; WX 611 ; N otilde ; B 82 -14 646 737 ;
-C -1 ; WX 722 ; N Aacute ; B 20 0 750 936 ;
-C -1 ; WX 611 ; N ocircumflex ; B 82 -14 643 750 ;
-C -1 ; WX 556 ; N yacute ; B 42 -214 652 750 ;
-C -1 ; WX 611 ; N udieresis ; B 98 -14 658 729 ;
-C -1 ; WX 834 ; N threequarters ; B 99 -19 839 710 ;
-C -1 ; WX 556 ; N acircumflex ; B 55 -14 583 750 ;
-C -1 ; WX 722 ; N Eth ; B 62 0 777 718 ;
-C -1 ; WX 556 ; N edieresis ; B 70 -14 594 729 ;
-C -1 ; WX 611 ; N ugrave ; B 98 -14 658 750 ;
-C -1 ; WX 1000 ; N trademark ; B 179 306 1109 718 ;
-C -1 ; WX 611 ; N ograve ; B 82 -14 643 750 ;
-C -1 ; WX 556 ; N scaron ; B 63 -14 614 750 ;
-C -1 ; WX 278 ; N Idieresis ; B 64 0 494 915 ;
-C -1 ; WX 611 ; N uacute ; B 98 -14 658 750 ;
-C -1 ; WX 556 ; N agrave ; B 55 -14 583 750 ;
-C -1 ; WX 611 ; N ntilde ; B 65 0 646 737 ;
-C -1 ; WX 556 ; N aring ; B 55 -14 583 776 ;
-C -1 ; WX 500 ; N zcaron ; B 20 0 586 750 ;
-C -1 ; WX 278 ; N Icircumflex ; B 64 0 484 936 ;
-C -1 ; WX 722 ; N Ntilde ; B 69 0 807 923 ;
-C -1 ; WX 611 ; N ucircumflex ; B 98 -14 658 750 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 76 0 757 936 ;
-C -1 ; WX 278 ; N Iacute ; B 64 0 528 936 ;
-C -1 ; WX 722 ; N Ccedilla ; B 107 -228 789 737 ;
-C -1 ; WX 778 ; N Odieresis ; B 107 -19 823 915 ;
-C -1 ; WX 667 ; N Scaron ; B 81 -19 718 936 ;
-C -1 ; WX 667 ; N Edieresis ; B 76 0 757 915 ;
-C -1 ; WX 278 ; N Igrave ; B 64 0 367 936 ;
-C -1 ; WX 556 ; N adieresis ; B 55 -14 594 729 ;
-C -1 ; WX 778 ; N Ograve ; B 107 -19 823 936 ;
-C -1 ; WX 667 ; N Egrave ; B 76 0 757 936 ;
-C -1 ; WX 667 ; N Ydieresis ; B 168 0 806 915 ;
-C -1 ; WX 737 ; N registered ; B 55 -19 834 737 ;
-C -1 ; WX 778 ; N Otilde ; B 107 -19 823 923 ;
-C -1 ; WX 834 ; N onequarter ; B 132 -19 806 710 ;
-C -1 ; WX 722 ; N Ugrave ; B 116 -19 804 936 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 116 -19 804 936 ;
-C -1 ; WX 667 ; N Thorn ; B 76 0 716 718 ;
-C -1 ; WX 584 ; N divide ; B 82 -42 610 548 ;
-C -1 ; WX 722 ; N Atilde ; B 20 0 741 923 ;
-C -1 ; WX 722 ; N Uacute ; B 116 -19 804 936 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 107 -19 823 936 ;
-C -1 ; WX 584 ; N logicalnot ; B 105 108 633 419 ;
-C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ;
-C -1 ; WX 278 ; N idieresis ; B 69 0 455 729 ;
-C -1 ; WX 278 ; N iacute ; B 69 0 488 750 ;
-C -1 ; WX 556 ; N aacute ; B 55 -14 627 750 ;
-C -1 ; WX 584 ; N plusminus ; B 40 0 625 506 ;
-C -1 ; WX 584 ; N multiply ; B 57 1 635 505 ;
-C -1 ; WX 722 ; N Udieresis ; B 116 -19 804 915 ;
-C -1 ; WX 584 ; N minus ; B 82 197 610 309 ;
-C -1 ; WX 333 ; N onesuperior ; B 148 283 388 710 ;
-C -1 ; WX 667 ; N Eacute ; B 76 0 757 936 ;
-C -1 ; WX 722 ; N Acircumflex ; B 20 0 706 936 ;
-C -1 ; WX 737 ; N copyright ; B 56 -19 835 737 ;
-C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ;
-C -1 ; WX 611 ; N odieresis ; B 82 -14 643 729 ;
-C -1 ; WX 611 ; N oacute ; B 82 -14 654 750 ;
-C -1 ; WX 400 ; N degree ; B 175 426 467 712 ;
-C -1 ; WX 278 ; N igrave ; B 69 0 326 750 ;
-C -1 ; WX 611 ; N mu ; B 22 -207 658 532 ;
-C -1 ; WX 778 ; N Oacute ; B 107 -19 823 936 ;
-C -1 ; WX 611 ; N eth ; B 82 -14 670 737 ;
-C -1 ; WX 722 ; N Adieresis ; B 20 0 716 915 ;
-C -1 ; WX 667 ; N Yacute ; B 168 0 806 936 ;
-C -1 ; WX 280 ; N brokenbar ; B 80 -19 353 737 ;
-C -1 ; WX 834 ; N onehalf ; B 132 -19 858 710 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 209
-
-KPX A y -30
-KPX A w -30
-KPX A v -40
-KPX A u -30
-KPX A Y -110
-KPX A W -60
-KPX A V -80
-KPX A U -50
-KPX A T -90
-KPX A Q -40
-KPX A O -40
-KPX A G -50
-KPX A C -40
-
-KPX B U -10
-KPX B A -30
-
-KPX D period -30
-KPX D comma -30
-KPX D Y -70
-KPX D W -40
-KPX D V -40
-KPX D A -40
-
-KPX F period -100
-KPX F comma -100
-KPX F a -20
-KPX F A -80
-
-KPX J u -20
-KPX J period -20
-KPX J comma -20
-KPX J A -20
-
-KPX K y -40
-KPX K u -30
-KPX K o -35
-KPX K e -15
-KPX K O -30
-
-KPX L y -30
-KPX L quoteright -140
-KPX L quotedblright -140
-KPX L Y -120
-KPX L W -80
-KPX L V -110
-KPX L T -90
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -50
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -50
-
-KPX P period -120
-KPX P o -40
-KPX P e -30
-KPX P comma -120
-KPX P a -30
-KPX P A -100
-
-KPX Q period 20
-KPX Q comma 20
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -40
-KPX R V -50
-KPX R U -20
-KPX R T -20
-KPX R O -20
-
-KPX T y -60
-KPX T w -60
-KPX T u -90
-KPX T semicolon -40
-KPX T r -80
-KPX T period -80
-KPX T o -80
-KPX T hyphen -120
-KPX T e -60
-KPX T comma -80
-KPX T colon -40
-KPX T a -80
-KPX T O -40
-KPX T A -90
-
-KPX U period -30
-KPX U comma -30
-KPX U A -50
-
-KPX V u -60
-KPX V semicolon -40
-KPX V period -120
-KPX V o -90
-KPX V hyphen -80
-KPX V e -50
-KPX V comma -120
-KPX V colon -40
-KPX V a -60
-KPX V O -50
-KPX V G -50
-KPX V A -80
-
-KPX W y -20
-KPX W u -45
-KPX W semicolon -10
-KPX W period -80
-KPX W o -60
-KPX W hyphen -40
-KPX W e -35
-KPX W comma -80
-KPX W colon -10
-KPX W a -40
-KPX W O -20
-KPX W A -60
-
-KPX Y u -100
-KPX Y semicolon -50
-KPX Y period -100
-KPX Y o -100
-KPX Y e -80
-KPX Y comma -100
-KPX Y colon -50
-KPX Y a -90
-KPX Y O -70
-KPX Y A -110
-
-KPX a y -20
-KPX a w -15
-KPX a v -15
-KPX a g -10
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b l -10
-
-KPX c y -10
-KPX c l -20
-KPX c k -20
-KPX c h -10
-
-KPX colon space -40
-
-KPX comma space -40
-KPX comma quoteright -120
-KPX comma quotedblright -120
-
-KPX d y -15
-KPX d w -15
-KPX d v -15
-KPX d d -10
-
-KPX e y -15
-KPX e x -15
-KPX e w -15
-KPX e v -15
-KPX e period 20
-KPX e comma 10
-
-KPX f quoteright 30
-KPX f quotedblright 30
-KPX f period -10
-KPX f o -20
-KPX f e -10
-KPX f comma -10
-
-KPX g g -10
-KPX g e 10
-
-KPX h y -20
-
-KPX k o -15
-
-KPX l y -15
-KPX l w -15
-
-KPX m y -30
-KPX m u -20
-
-KPX n y -20
-KPX n v -40
-KPX n u -10
-
-KPX o y -20
-KPX o x -30
-KPX o w -15
-KPX o v -20
-
-KPX p y -15
-
-KPX period space -40
-KPX period quoteright -120
-KPX period quotedblright -120
-
-KPX quotedblright space -80
-
-KPX quoteleft quoteleft -46
-
-KPX quoteright v -20
-KPX quoteright space -80
-KPX quoteright s -60
-KPX quoteright r -40
-KPX quoteright quoteright -46
-KPX quoteright l -20
-KPX quoteright d -80
-
-KPX r y 10
-KPX r v 10
-KPX r t 20
-KPX r s -15
-KPX r q -20
-KPX r period -60
-KPX r o -20
-KPX r hyphen -20
-KPX r g -15
-KPX r d -20
-KPX r comma -60
-KPX r c -20
-
-KPX s w -15
-
-KPX semicolon space -40
-
-KPX space quoteleft -60
-KPX space quotedblleft -80
-KPX space Y -120
-KPX space W -80
-KPX space V -80
-KPX space T -100
-
-KPX v period -80
-KPX v o -30
-KPX v comma -80
-KPX v a -20
-
-KPX w period -40
-KPX w o -20
-KPX w comma -40
-
-KPX x e -10
-
-KPX y period -80
-KPX y o -25
-KPX y e -10
-KPX y comma -80
-KPX y a -30
-
-KPX z e 10
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 235 186 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 235 186 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 235 186 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 235 186 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 235 186 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 235 186 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 215 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 207 186 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 207 186 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 207 186 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 207 186 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 13 186 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 13 186 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 13 186 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 13 186 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 235 186 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 263 186 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 263 186 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 263 186 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 263 186 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 263 186 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 207 186 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 235 186 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 235 186 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 235 186 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 235 186 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 207 186 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 207 186 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 179 186 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 132 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 112 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 112 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Helvetica-Oblique.afm b/config/psfonts/Helvetica-Oblique.afm
deleted file mode 100644 (file)
index 3d69eb7..0000000
+++ /dev/null
@@ -1,612 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.
-Comment Creation Date: Thu Mar 15 10:24:18 1990
-Comment UniqueID 28362
-Comment VMusage 7572 42473
-FontName Helvetica-Oblique
-FullName Helvetica Oblique
-FamilyName Helvetica
-Weight Medium
-ItalicAngle -12
-IsFixedPitch false
-FontBBox -170 -225 1116 931
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.006
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 523
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 278 ; N exclam ; B 90 0 340 718 ;
-C 34 ; WX 355 ; N quotedbl ; B 168 463 438 718 ;
-C 35 ; WX 556 ; N numbersign ; B 73 0 631 688 ;
-C 36 ; WX 556 ; N dollar ; B 69 -115 617 775 ;
-C 37 ; WX 889 ; N percent ; B 147 -19 889 703 ;
-C 38 ; WX 667 ; N ampersand ; B 77 -15 647 718 ;
-C 39 ; WX 222 ; N quoteright ; B 151 463 310 718 ;
-C 40 ; WX 333 ; N parenleft ; B 108 -207 454 733 ;
-C 41 ; WX 333 ; N parenright ; B -9 -207 337 733 ;
-C 42 ; WX 389 ; N asterisk ; B 165 431 475 718 ;
-C 43 ; WX 584 ; N plus ; B 85 0 606 505 ;
-C 44 ; WX 278 ; N comma ; B 56 -147 214 106 ;
-C 45 ; WX 333 ; N hyphen ; B 93 232 357 322 ;
-C 46 ; WX 278 ; N period ; B 87 0 214 106 ;
-C 47 ; WX 278 ; N slash ; B -21 -19 452 737 ;
-C 48 ; WX 556 ; N zero ; B 93 -19 608 703 ;
-C 49 ; WX 556 ; N one ; B 207 0 508 703 ;
-C 50 ; WX 556 ; N two ; B 26 0 617 703 ;
-C 51 ; WX 556 ; N three ; B 75 -19 610 703 ;
-C 52 ; WX 556 ; N four ; B 61 0 576 703 ;
-C 53 ; WX 556 ; N five ; B 68 -19 621 688 ;
-C 54 ; WX 556 ; N six ; B 91 -19 615 703 ;
-C 55 ; WX 556 ; N seven ; B 137 0 669 688 ;
-C 56 ; WX 556 ; N eight ; B 74 -19 607 703 ;
-C 57 ; WX 556 ; N nine ; B 82 -19 609 703 ;
-C 58 ; WX 278 ; N colon ; B 87 0 301 516 ;
-C 59 ; WX 278 ; N semicolon ; B 56 -147 301 516 ;
-C 60 ; WX 584 ; N less ; B 94 11 641 495 ;
-C 61 ; WX 584 ; N equal ; B 63 115 628 390 ;
-C 62 ; WX 584 ; N greater ; B 50 11 597 495 ;
-C 63 ; WX 556 ; N question ; B 161 0 610 727 ;
-C 64 ; WX 1015 ; N at ; B 215 -19 965 737 ;
-C 65 ; WX 667 ; N A ; B 14 0 654 718 ;
-C 66 ; WX 667 ; N B ; B 74 0 712 718 ;
-C 67 ; WX 722 ; N C ; B 108 -19 782 737 ;
-C 68 ; WX 722 ; N D ; B 81 0 764 718 ;
-C 69 ; WX 667 ; N E ; B 86 0 762 718 ;
-C 70 ; WX 611 ; N F ; B 86 0 736 718 ;
-C 71 ; WX 778 ; N G ; B 111 -19 799 737 ;
-C 72 ; WX 722 ; N H ; B 77 0 799 718 ;
-C 73 ; WX 278 ; N I ; B 91 0 341 718 ;
-C 74 ; WX 500 ; N J ; B 47 -19 581 718 ;
-C 75 ; WX 667 ; N K ; B 76 0 808 718 ;
-C 76 ; WX 556 ; N L ; B 76 0 555 718 ;
-C 77 ; WX 833 ; N M ; B 73 0 914 718 ;
-C 78 ; WX 722 ; N N ; B 76 0 799 718 ;
-C 79 ; WX 778 ; N O ; B 105 -19 826 737 ;
-C 80 ; WX 667 ; N P ; B 86 0 737 718 ;
-C 81 ; WX 778 ; N Q ; B 105 -56 826 737 ;
-C 82 ; WX 722 ; N R ; B 88 0 773 718 ;
-C 83 ; WX 667 ; N S ; B 90 -19 713 737 ;
-C 84 ; WX 611 ; N T ; B 148 0 750 718 ;
-C 85 ; WX 722 ; N U ; B 123 -19 797 718 ;
-C 86 ; WX 667 ; N V ; B 173 0 800 718 ;
-C 87 ; WX 944 ; N W ; B 169 0 1081 718 ;
-C 88 ; WX 667 ; N X ; B 19 0 790 718 ;
-C 89 ; WX 667 ; N Y ; B 167 0 806 718 ;
-C 90 ; WX 611 ; N Z ; B 23 0 741 718 ;
-C 91 ; WX 278 ; N bracketleft ; B 21 -196 403 722 ;
-C 92 ; WX 278 ; N backslash ; B 140 -19 291 737 ;
-C 93 ; WX 278 ; N bracketright ; B -14 -196 368 722 ;
-C 94 ; WX 469 ; N asciicircum ; B 42 264 539 688 ;
-C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ;
-C 96 ; WX 222 ; N quoteleft ; B 165 470 323 725 ;
-C 97 ; WX 556 ; N a ; B 61 -15 559 538 ;
-C 98 ; WX 556 ; N b ; B 58 -15 584 718 ;
-C 99 ; WX 500 ; N c ; B 74 -15 553 538 ;
-C 100 ; WX 556 ; N d ; B 84 -15 652 718 ;
-C 101 ; WX 556 ; N e ; B 84 -15 578 538 ;
-C 102 ; WX 278 ; N f ; B 86 0 416 728 ; L i fi ; L l fl ;
-C 103 ; WX 556 ; N g ; B 42 -220 610 538 ;
-C 104 ; WX 556 ; N h ; B 65 0 573 718 ;
-C 105 ; WX 222 ; N i ; B 67 0 308 718 ;
-C 106 ; WX 222 ; N j ; B -60 -210 308 718 ;
-C 107 ; WX 500 ; N k ; B 67 0 600 718 ;
-C 108 ; WX 222 ; N l ; B 67 0 308 718 ;
-C 109 ; WX 833 ; N m ; B 65 0 852 538 ;
-C 110 ; WX 556 ; N n ; B 65 0 573 538 ;
-C 111 ; WX 556 ; N o ; B 83 -14 585 538 ;
-C 112 ; WX 556 ; N p ; B 14 -207 584 538 ;
-C 113 ; WX 556 ; N q ; B 84 -207 605 538 ;
-C 114 ; WX 333 ; N r ; B 77 0 446 538 ;
-C 115 ; WX 500 ; N s ; B 63 -15 529 538 ;
-C 116 ; WX 278 ; N t ; B 102 -7 368 669 ;
-C 117 ; WX 556 ; N u ; B 94 -15 600 523 ;
-C 118 ; WX 500 ; N v ; B 119 0 603 523 ;
-C 119 ; WX 722 ; N w ; B 125 0 820 523 ;
-C 120 ; WX 500 ; N x ; B 11 0 594 523 ;
-C 121 ; WX 500 ; N y ; B 15 -214 600 523 ;
-C 122 ; WX 500 ; N z ; B 31 0 571 523 ;
-C 123 ; WX 334 ; N braceleft ; B 92 -196 445 722 ;
-C 124 ; WX 260 ; N bar ; B 90 -19 324 737 ;
-C 125 ; WX 334 ; N braceright ; B 0 -196 354 722 ;
-C 126 ; WX 584 ; N asciitilde ; B 111 180 580 326 ;
-C 161 ; WX 333 ; N exclamdown ; B 77 -195 326 523 ;
-C 162 ; WX 556 ; N cent ; B 95 -115 584 623 ;
-C 163 ; WX 556 ; N sterling ; B 49 -16 634 718 ;
-C 164 ; WX 167 ; N fraction ; B -170 -19 482 703 ;
-C 165 ; WX 556 ; N yen ; B 81 0 699 688 ;
-C 166 ; WX 556 ; N florin ; B -52 -207 654 737 ;
-C 167 ; WX 556 ; N section ; B 76 -191 584 737 ;
-C 168 ; WX 556 ; N currency ; B 60 99 646 603 ;
-C 169 ; WX 191 ; N quotesingle ; B 157 463 285 718 ;
-C 170 ; WX 333 ; N quotedblleft ; B 138 470 461 725 ;
-C 171 ; WX 556 ; N guillemotleft ; B 146 108 554 446 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 137 108 340 446 ;
-C 173 ; WX 333 ; N guilsinglright ; B 111 108 314 446 ;
-C 174 ; WX 500 ; N fi ; B 86 0 587 728 ;
-C 175 ; WX 500 ; N fl ; B 86 0 585 728 ;
-C 177 ; WX 556 ; N endash ; B 51 240 623 313 ;
-C 178 ; WX 556 ; N dagger ; B 135 -159 622 718 ;
-C 179 ; WX 556 ; N daggerdbl ; B 52 -159 623 718 ;
-C 180 ; WX 278 ; N periodcentered ; B 129 190 257 315 ;
-C 182 ; WX 537 ; N paragraph ; B 126 -173 650 718 ;
-C 183 ; WX 350 ; N bullet ; B 91 202 413 517 ;
-C 184 ; WX 222 ; N quotesinglbase ; B 21 -149 180 106 ;
-C 185 ; WX 333 ; N quotedblbase ; B -6 -149 318 106 ;
-C 186 ; WX 333 ; N quotedblright ; B 124 463 448 718 ;
-C 187 ; WX 556 ; N guillemotright ; B 120 108 528 446 ;
-C 188 ; WX 1000 ; N ellipsis ; B 115 0 908 106 ;
-C 189 ; WX 1000 ; N perthousand ; B 88 -19 1029 703 ;
-C 191 ; WX 611 ; N questiondown ; B 85 -201 534 525 ;
-C 193 ; WX 333 ; N grave ; B 170 593 337 734 ;
-C 194 ; WX 333 ; N acute ; B 248 593 475 734 ;
-C 195 ; WX 333 ; N circumflex ; B 147 593 438 734 ;
-C 196 ; WX 333 ; N tilde ; B 125 606 490 722 ;
-C 197 ; WX 333 ; N macron ; B 143 627 468 684 ;
-C 198 ; WX 333 ; N breve ; B 167 595 476 731 ;
-C 199 ; WX 333 ; N dotaccent ; B 249 604 362 706 ;
-C 200 ; WX 333 ; N dieresis ; B 168 604 443 706 ;
-C 202 ; WX 333 ; N ring ; B 214 572 402 756 ;
-C 203 ; WX 333 ; N cedilla ; B 2 -225 232 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 157 593 565 734 ;
-C 206 ; WX 333 ; N ogonek ; B 43 -225 249 0 ;
-C 207 ; WX 333 ; N caron ; B 177 593 468 734 ;
-C 208 ; WX 1000 ; N emdash ; B 51 240 1067 313 ;
-C 225 ; WX 1000 ; N AE ; B 8 0 1097 718 ;
-C 227 ; WX 370 ; N ordfeminine ; B 100 304 449 737 ;
-C 232 ; WX 556 ; N Lslash ; B 41 0 555 718 ;
-C 233 ; WX 778 ; N Oslash ; B 43 -19 890 737 ;
-C 234 ; WX 1000 ; N OE ; B 98 -19 1116 737 ;
-C 235 ; WX 365 ; N ordmasculine ; B 100 304 468 737 ;
-C 241 ; WX 889 ; N ae ; B 61 -15 909 538 ;
-C 245 ; WX 278 ; N dotlessi ; B 95 0 294 523 ;
-C 248 ; WX 222 ; N lslash ; B 41 0 347 718 ;
-C 249 ; WX 611 ; N oslash ; B 29 -22 647 545 ;
-C 250 ; WX 944 ; N oe ; B 83 -15 964 538 ;
-C 251 ; WX 611 ; N germandbls ; B 67 -15 658 728 ;
-C -1 ; WX 611 ; N Zcaron ; B 23 0 741 929 ;
-C -1 ; WX 500 ; N ccedilla ; B 74 -225 553 538 ;
-C -1 ; WX 500 ; N ydieresis ; B 15 -214 600 706 ;
-C -1 ; WX 556 ; N atilde ; B 61 -15 592 722 ;
-C -1 ; WX 278 ; N icircumflex ; B 95 0 411 734 ;
-C -1 ; WX 333 ; N threesuperior ; B 90 270 436 703 ;
-C -1 ; WX 556 ; N ecircumflex ; B 84 -15 578 734 ;
-C -1 ; WX 556 ; N thorn ; B 14 -207 584 718 ;
-C -1 ; WX 556 ; N egrave ; B 84 -15 578 734 ;
-C -1 ; WX 333 ; N twosuperior ; B 64 281 449 703 ;
-C -1 ; WX 556 ; N eacute ; B 84 -15 587 734 ;
-C -1 ; WX 556 ; N otilde ; B 83 -14 602 722 ;
-C -1 ; WX 667 ; N Aacute ; B 14 0 683 929 ;
-C -1 ; WX 556 ; N ocircumflex ; B 83 -14 585 734 ;
-C -1 ; WX 500 ; N yacute ; B 15 -214 600 734 ;
-C -1 ; WX 556 ; N udieresis ; B 94 -15 600 706 ;
-C -1 ; WX 834 ; N threequarters ; B 130 -19 861 703 ;
-C -1 ; WX 556 ; N acircumflex ; B 61 -15 559 734 ;
-C -1 ; WX 722 ; N Eth ; B 69 0 764 718 ;
-C -1 ; WX 556 ; N edieresis ; B 84 -15 578 706 ;
-C -1 ; WX 556 ; N ugrave ; B 94 -15 600 734 ;
-C -1 ; WX 1000 ; N trademark ; B 186 306 1056 718 ;
-C -1 ; WX 556 ; N ograve ; B 83 -14 585 734 ;
-C -1 ; WX 500 ; N scaron ; B 63 -15 552 734 ;
-C -1 ; WX 278 ; N Idieresis ; B 91 0 458 901 ;
-C -1 ; WX 556 ; N uacute ; B 94 -15 600 734 ;
-C -1 ; WX 556 ; N agrave ; B 61 -15 559 734 ;
-C -1 ; WX 556 ; N ntilde ; B 65 0 592 722 ;
-C -1 ; WX 556 ; N aring ; B 61 -15 559 756 ;
-C -1 ; WX 500 ; N zcaron ; B 31 0 571 734 ;
-C -1 ; WX 278 ; N Icircumflex ; B 91 0 452 929 ;
-C -1 ; WX 722 ; N Ntilde ; B 76 0 799 917 ;
-C -1 ; WX 556 ; N ucircumflex ; B 94 -15 600 734 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 86 0 762 929 ;
-C -1 ; WX 278 ; N Iacute ; B 91 0 489 929 ;
-C -1 ; WX 722 ; N Ccedilla ; B 108 -225 782 737 ;
-C -1 ; WX 778 ; N Odieresis ; B 105 -19 826 901 ;
-C -1 ; WX 667 ; N Scaron ; B 90 -19 713 929 ;
-C -1 ; WX 667 ; N Edieresis ; B 86 0 762 901 ;
-C -1 ; WX 278 ; N Igrave ; B 91 0 351 929 ;
-C -1 ; WX 556 ; N adieresis ; B 61 -15 559 706 ;
-C -1 ; WX 778 ; N Ograve ; B 105 -19 826 929 ;
-C -1 ; WX 667 ; N Egrave ; B 86 0 762 929 ;
-C -1 ; WX 667 ; N Ydieresis ; B 167 0 806 901 ;
-C -1 ; WX 737 ; N registered ; B 54 -19 837 737 ;
-C -1 ; WX 778 ; N Otilde ; B 105 -19 826 917 ;
-C -1 ; WX 834 ; N onequarter ; B 150 -19 802 703 ;
-C -1 ; WX 722 ; N Ugrave ; B 123 -19 797 929 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 123 -19 797 929 ;
-C -1 ; WX 667 ; N Thorn ; B 86 0 712 718 ;
-C -1 ; WX 584 ; N divide ; B 85 -19 606 524 ;
-C -1 ; WX 667 ; N Atilde ; B 14 0 699 917 ;
-C -1 ; WX 722 ; N Uacute ; B 123 -19 797 929 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 105 -19 826 929 ;
-C -1 ; WX 584 ; N logicalnot ; B 106 108 628 390 ;
-C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ;
-C -1 ; WX 278 ; N idieresis ; B 95 0 416 706 ;
-C -1 ; WX 278 ; N iacute ; B 95 0 448 734 ;
-C -1 ; WX 556 ; N aacute ; B 61 -15 587 734 ;
-C -1 ; WX 584 ; N plusminus ; B 39 0 618 506 ;
-C -1 ; WX 584 ; N multiply ; B 50 0 642 506 ;
-C -1 ; WX 722 ; N Udieresis ; B 123 -19 797 901 ;
-C -1 ; WX 584 ; N minus ; B 85 216 606 289 ;
-C -1 ; WX 333 ; N onesuperior ; B 166 281 371 703 ;
-C -1 ; WX 667 ; N Eacute ; B 86 0 762 929 ;
-C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ;
-C -1 ; WX 737 ; N copyright ; B 54 -19 837 737 ;
-C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ;
-C -1 ; WX 556 ; N odieresis ; B 83 -14 585 706 ;
-C -1 ; WX 556 ; N oacute ; B 83 -14 587 734 ;
-C -1 ; WX 400 ; N degree ; B 169 411 468 703 ;
-C -1 ; WX 278 ; N igrave ; B 95 0 310 734 ;
-C -1 ; WX 556 ; N mu ; B 24 -207 600 523 ;
-C -1 ; WX 778 ; N Oacute ; B 105 -19 826 929 ;
-C -1 ; WX 556 ; N eth ; B 81 -15 617 737 ;
-C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ;
-C -1 ; WX 667 ; N Yacute ; B 167 0 806 929 ;
-C -1 ; WX 260 ; N brokenbar ; B 90 -19 324 737 ;
-C -1 ; WX 834 ; N onehalf ; B 114 -19 839 703 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 250
-
-KPX A y -40
-KPX A w -40
-KPX A v -40
-KPX A u -30
-KPX A Y -100
-KPX A W -50
-KPX A V -70
-KPX A U -50
-KPX A T -120
-KPX A Q -30
-KPX A O -30
-KPX A G -30
-KPX A C -30
-
-KPX B period -20
-KPX B comma -20
-KPX B U -10
-
-KPX C period -30
-KPX C comma -30
-
-KPX D period -70
-KPX D comma -70
-KPX D Y -90
-KPX D W -40
-KPX D V -70
-KPX D A -40
-
-KPX F r -45
-KPX F period -150
-KPX F o -30
-KPX F e -30
-KPX F comma -150
-KPX F a -50
-KPX F A -80
-
-KPX J u -20
-KPX J period -30
-KPX J comma -30
-KPX J a -20
-KPX J A -20
-
-KPX K y -50
-KPX K u -30
-KPX K o -40
-KPX K e -40
-KPX K O -50
-
-KPX L y -30
-KPX L quoteright -160
-KPX L quotedblright -140
-KPX L Y -140
-KPX L W -70
-KPX L V -110
-KPX L T -110
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -60
-KPX O W -30
-KPX O V -50
-KPX O T -40
-KPX O A -20
-
-KPX P period -180
-KPX P o -50
-KPX P e -50
-KPX P comma -180
-KPX P a -40
-KPX P A -120
-
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -30
-KPX R V -50
-KPX R U -40
-KPX R T -30
-KPX R O -20
-
-KPX S period -20
-KPX S comma -20
-
-KPX T y -120
-KPX T w -120
-KPX T u -120
-KPX T semicolon -20
-KPX T r -120
-KPX T period -120
-KPX T o -120
-KPX T hyphen -140
-KPX T e -120
-KPX T comma -120
-KPX T colon -20
-KPX T a -120
-KPX T O -40
-KPX T A -120
-
-KPX U period -40
-KPX U comma -40
-KPX U A -40
-
-KPX V u -70
-KPX V semicolon -40
-KPX V period -125
-KPX V o -80
-KPX V hyphen -80
-KPX V e -80
-KPX V comma -125
-KPX V colon -40
-KPX V a -70
-KPX V O -40
-KPX V G -40
-KPX V A -80
-
-KPX W y -20
-KPX W u -30
-KPX W period -80
-KPX W o -30
-KPX W hyphen -40
-KPX W e -30
-KPX W comma -80
-KPX W a -40
-KPX W O -20
-KPX W A -50
-
-KPX Y u -110
-KPX Y semicolon -60
-KPX Y period -140
-KPX Y o -140
-KPX Y i -20
-KPX Y hyphen -140
-KPX Y e -140
-KPX Y comma -140
-KPX Y colon -60
-KPX Y a -140
-KPX Y O -85
-KPX Y A -110
-
-KPX a y -30
-KPX a w -20
-KPX a v -20
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b period -40
-KPX b l -20
-KPX b comma -40
-KPX b b -10
-
-KPX c k -20
-KPX c comma -15
-
-KPX colon space -50
-
-KPX comma quoteright -100
-KPX comma quotedblright -100
-
-KPX e y -20
-KPX e x -30
-KPX e w -20
-KPX e v -30
-KPX e period -15
-KPX e comma -15
-
-KPX f quoteright 50
-KPX f quotedblright 60
-KPX f period -30
-KPX f o -30
-KPX f e -30
-KPX f dotlessi -28
-KPX f comma -30
-KPX f a -30
-
-KPX g r -10
-
-KPX h y -30
-
-KPX k o -20
-KPX k e -20
-
-KPX m y -15
-KPX m u -10
-
-KPX n y -15
-KPX n v -20
-KPX n u -10
-
-KPX o y -30
-KPX o x -30
-KPX o w -15
-KPX o v -15
-KPX o period -40
-KPX o comma -40
-
-KPX oslash z -55
-KPX oslash y -70
-KPX oslash x -85
-KPX oslash w -70
-KPX oslash v -70
-KPX oslash u -55
-KPX oslash t -55
-KPX oslash s -55
-KPX oslash r -55
-KPX oslash q -55
-KPX oslash period -95
-KPX oslash p -55
-KPX oslash o -55
-KPX oslash n -55
-KPX oslash m -55
-KPX oslash l -55
-KPX oslash k -55
-KPX oslash j -55
-KPX oslash i -55
-KPX oslash h -55
-KPX oslash g -55
-KPX oslash f -55
-KPX oslash e -55
-KPX oslash d -55
-KPX oslash comma -95
-KPX oslash c -55
-KPX oslash b -55
-KPX oslash a -55
-
-KPX p y -30
-KPX p period -35
-KPX p comma -35
-
-KPX period space -60
-KPX period quoteright -100
-KPX period quotedblright -100
-
-KPX quotedblright space -40
-
-KPX quoteleft quoteleft -57
-
-KPX quoteright space -70
-KPX quoteright s -50
-KPX quoteright r -50
-KPX quoteright quoteright -57
-KPX quoteright d -50
-
-KPX r y 30
-KPX r v 30
-KPX r u 15
-KPX r t 40
-KPX r semicolon 30
-KPX r period -50
-KPX r p 30
-KPX r n 25
-KPX r m 25
-KPX r l 15
-KPX r k 15
-KPX r i 15
-KPX r comma -50
-KPX r colon 30
-KPX r a -10
-
-KPX s w -30
-KPX s period -15
-KPX s comma -15
-
-KPX semicolon space -50
-
-KPX space quoteleft -60
-KPX space quotedblleft -30
-KPX space Y -90
-KPX space W -40
-KPX space V -50
-KPX space T -50
-
-KPX v period -80
-KPX v o -25
-KPX v e -25
-KPX v comma -80
-KPX v a -25
-
-KPX w period -60
-KPX w o -10
-KPX w e -10
-KPX w comma -60
-KPX w a -15
-
-KPX x e -30
-
-KPX y period -100
-KPX y o -20
-KPX y e -20
-KPX y comma -100
-KPX y a -20
-
-KPX z o -15
-KPX z e -15
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 208 195 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 208 195 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 208 195 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 208 195 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 204 175 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 208 195 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 195 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 208 195 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 208 195 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 208 195 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 208 195 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 14 195 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 14 195 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 14 195 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 14 195 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 246 195 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 264 195 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 264 195 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 264 195 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 264 195 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 264 195 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 208 195 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 236 195 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 236 195 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 236 195 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 236 195 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 208 195 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 208 195 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 180 195 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 102 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 84 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 102 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 112 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 112 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 112 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 84 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 112 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 112 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Helvetica.afm b/config/psfonts/Helvetica.afm
deleted file mode 100644 (file)
index 1eb3b44..0000000
+++ /dev/null
@@ -1,612 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.
-Comment Creation Date: Thu Mar 15 08:58:00 1990
-Comment UniqueID 28352
-Comment VMusage 26389 33281
-FontName Helvetica
-FullName Helvetica
-FamilyName Helvetica
-Weight Medium
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -166 -225 1000 931
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.006
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 523
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 278 ; N exclam ; B 90 0 187 718 ;
-C 34 ; WX 355 ; N quotedbl ; B 70 463 285 718 ;
-C 35 ; WX 556 ; N numbersign ; B 28 0 529 688 ;
-C 36 ; WX 556 ; N dollar ; B 32 -115 520 775 ;
-C 37 ; WX 889 ; N percent ; B 39 -19 850 703 ;
-C 38 ; WX 667 ; N ampersand ; B 44 -15 645 718 ;
-C 39 ; WX 222 ; N quoteright ; B 53 463 157 718 ;
-C 40 ; WX 333 ; N parenleft ; B 68 -207 299 733 ;
-C 41 ; WX 333 ; N parenright ; B 34 -207 265 733 ;
-C 42 ; WX 389 ; N asterisk ; B 39 431 349 718 ;
-C 43 ; WX 584 ; N plus ; B 39 0 545 505 ;
-C 44 ; WX 278 ; N comma ; B 87 -147 191 106 ;
-C 45 ; WX 333 ; N hyphen ; B 44 232 289 322 ;
-C 46 ; WX 278 ; N period ; B 87 0 191 106 ;
-C 47 ; WX 278 ; N slash ; B -17 -19 295 737 ;
-C 48 ; WX 556 ; N zero ; B 37 -19 519 703 ;
-C 49 ; WX 556 ; N one ; B 101 0 359 703 ;
-C 50 ; WX 556 ; N two ; B 26 0 507 703 ;
-C 51 ; WX 556 ; N three ; B 34 -19 522 703 ;
-C 52 ; WX 556 ; N four ; B 25 0 523 703 ;
-C 53 ; WX 556 ; N five ; B 32 -19 514 688 ;
-C 54 ; WX 556 ; N six ; B 38 -19 518 703 ;
-C 55 ; WX 556 ; N seven ; B 37 0 523 688 ;
-C 56 ; WX 556 ; N eight ; B 38 -19 517 703 ;
-C 57 ; WX 556 ; N nine ; B 42 -19 514 703 ;
-C 58 ; WX 278 ; N colon ; B 87 0 191 516 ;
-C 59 ; WX 278 ; N semicolon ; B 87 -147 191 516 ;
-C 60 ; WX 584 ; N less ; B 48 11 536 495 ;
-C 61 ; WX 584 ; N equal ; B 39 115 545 390 ;
-C 62 ; WX 584 ; N greater ; B 48 11 536 495 ;
-C 63 ; WX 556 ; N question ; B 56 0 492 727 ;
-C 64 ; WX 1015 ; N at ; B 147 -19 868 737 ;
-C 65 ; WX 667 ; N A ; B 14 0 654 718 ;
-C 66 ; WX 667 ; N B ; B 74 0 627 718 ;
-C 67 ; WX 722 ; N C ; B 44 -19 681 737 ;
-C 68 ; WX 722 ; N D ; B 81 0 674 718 ;
-C 69 ; WX 667 ; N E ; B 86 0 616 718 ;
-C 70 ; WX 611 ; N F ; B 86 0 583 718 ;
-C 71 ; WX 778 ; N G ; B 48 -19 704 737 ;
-C 72 ; WX 722 ; N H ; B 77 0 646 718 ;
-C 73 ; WX 278 ; N I ; B 91 0 188 718 ;
-C 74 ; WX 500 ; N J ; B 17 -19 428 718 ;
-C 75 ; WX 667 ; N K ; B 76 0 663 718 ;
-C 76 ; WX 556 ; N L ; B 76 0 537 718 ;
-C 77 ; WX 833 ; N M ; B 73 0 761 718 ;
-C 78 ; WX 722 ; N N ; B 76 0 646 718 ;
-C 79 ; WX 778 ; N O ; B 39 -19 739 737 ;
-C 80 ; WX 667 ; N P ; B 86 0 622 718 ;
-C 81 ; WX 778 ; N Q ; B 39 -56 739 737 ;
-C 82 ; WX 722 ; N R ; B 88 0 684 718 ;
-C 83 ; WX 667 ; N S ; B 49 -19 620 737 ;
-C 84 ; WX 611 ; N T ; B 14 0 597 718 ;
-C 85 ; WX 722 ; N U ; B 79 -19 644 718 ;
-C 86 ; WX 667 ; N V ; B 20 0 647 718 ;
-C 87 ; WX 944 ; N W ; B 16 0 928 718 ;
-C 88 ; WX 667 ; N X ; B 19 0 648 718 ;
-C 89 ; WX 667 ; N Y ; B 14 0 653 718 ;
-C 90 ; WX 611 ; N Z ; B 23 0 588 718 ;
-C 91 ; WX 278 ; N bracketleft ; B 63 -196 250 722 ;
-C 92 ; WX 278 ; N backslash ; B -17 -19 295 737 ;
-C 93 ; WX 278 ; N bracketright ; B 28 -196 215 722 ;
-C 94 ; WX 469 ; N asciicircum ; B -14 264 483 688 ;
-C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ;
-C 96 ; WX 222 ; N quoteleft ; B 65 470 169 725 ;
-C 97 ; WX 556 ; N a ; B 36 -15 530 538 ;
-C 98 ; WX 556 ; N b ; B 58 -15 517 718 ;
-C 99 ; WX 500 ; N c ; B 30 -15 477 538 ;
-C 100 ; WX 556 ; N d ; B 35 -15 499 718 ;
-C 101 ; WX 556 ; N e ; B 40 -15 516 538 ;
-C 102 ; WX 278 ; N f ; B 14 0 262 728 ; L i fi ; L l fl ;
-C 103 ; WX 556 ; N g ; B 40 -220 499 538 ;
-C 104 ; WX 556 ; N h ; B 65 0 491 718 ;
-C 105 ; WX 222 ; N i ; B 67 0 155 718 ;
-C 106 ; WX 222 ; N j ; B -16 -210 155 718 ;
-C 107 ; WX 500 ; N k ; B 67 0 501 718 ;
-C 108 ; WX 222 ; N l ; B 67 0 155 718 ;
-C 109 ; WX 833 ; N m ; B 65 0 769 538 ;
-C 110 ; WX 556 ; N n ; B 65 0 491 538 ;
-C 111 ; WX 556 ; N o ; B 35 -14 521 538 ;
-C 112 ; WX 556 ; N p ; B 58 -207 517 538 ;
-C 113 ; WX 556 ; N q ; B 35 -207 494 538 ;
-C 114 ; WX 333 ; N r ; B 77 0 332 538 ;
-C 115 ; WX 500 ; N s ; B 32 -15 464 538 ;
-C 116 ; WX 278 ; N t ; B 14 -7 257 669 ;
-C 117 ; WX 556 ; N u ; B 68 -15 489 523 ;
-C 118 ; WX 500 ; N v ; B 8 0 492 523 ;
-C 119 ; WX 722 ; N w ; B 14 0 709 523 ;
-C 120 ; WX 500 ; N x ; B 11 0 490 523 ;
-C 121 ; WX 500 ; N y ; B 11 -214 489 523 ;
-C 122 ; WX 500 ; N z ; B 31 0 469 523 ;
-C 123 ; WX 334 ; N braceleft ; B 42 -196 292 722 ;
-C 124 ; WX 260 ; N bar ; B 94 -19 167 737 ;
-C 125 ; WX 334 ; N braceright ; B 42 -196 292 722 ;
-C 126 ; WX 584 ; N asciitilde ; B 61 180 523 326 ;
-C 161 ; WX 333 ; N exclamdown ; B 118 -195 215 523 ;
-C 162 ; WX 556 ; N cent ; B 51 -115 513 623 ;
-C 163 ; WX 556 ; N sterling ; B 33 -16 539 718 ;
-C 164 ; WX 167 ; N fraction ; B -166 -19 333 703 ;
-C 165 ; WX 556 ; N yen ; B 3 0 553 688 ;
-C 166 ; WX 556 ; N florin ; B -11 -207 501 737 ;
-C 167 ; WX 556 ; N section ; B 43 -191 512 737 ;
-C 168 ; WX 556 ; N currency ; B 28 99 528 603 ;
-C 169 ; WX 191 ; N quotesingle ; B 59 463 132 718 ;
-C 170 ; WX 333 ; N quotedblleft ; B 38 470 307 725 ;
-C 171 ; WX 556 ; N guillemotleft ; B 97 108 459 446 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 88 108 245 446 ;
-C 173 ; WX 333 ; N guilsinglright ; B 88 108 245 446 ;
-C 174 ; WX 500 ; N fi ; B 14 0 434 728 ;
-C 175 ; WX 500 ; N fl ; B 14 0 432 728 ;
-C 177 ; WX 556 ; N endash ; B 0 240 556 313 ;
-C 178 ; WX 556 ; N dagger ; B 43 -159 514 718 ;
-C 179 ; WX 556 ; N daggerdbl ; B 43 -159 514 718 ;
-C 180 ; WX 278 ; N periodcentered ; B 77 190 202 315 ;
-C 182 ; WX 537 ; N paragraph ; B 18 -173 497 718 ;
-C 183 ; WX 350 ; N bullet ; B 18 202 333 517 ;
-C 184 ; WX 222 ; N quotesinglbase ; B 53 -149 157 106 ;
-C 185 ; WX 333 ; N quotedblbase ; B 26 -149 295 106 ;
-C 186 ; WX 333 ; N quotedblright ; B 26 463 295 718 ;
-C 187 ; WX 556 ; N guillemotright ; B 97 108 459 446 ;
-C 188 ; WX 1000 ; N ellipsis ; B 115 0 885 106 ;
-C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 703 ;
-C 191 ; WX 611 ; N questiondown ; B 91 -201 527 525 ;
-C 193 ; WX 333 ; N grave ; B 14 593 211 734 ;
-C 194 ; WX 333 ; N acute ; B 122 593 319 734 ;
-C 195 ; WX 333 ; N circumflex ; B 21 593 312 734 ;
-C 196 ; WX 333 ; N tilde ; B -4 606 337 722 ;
-C 197 ; WX 333 ; N macron ; B 10 627 323 684 ;
-C 198 ; WX 333 ; N breve ; B 13 595 321 731 ;
-C 199 ; WX 333 ; N dotaccent ; B 121 604 212 706 ;
-C 200 ; WX 333 ; N dieresis ; B 40 604 293 706 ;
-C 202 ; WX 333 ; N ring ; B 75 572 259 756 ;
-C 203 ; WX 333 ; N cedilla ; B 45 -225 259 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 31 593 409 734 ;
-C 206 ; WX 333 ; N ogonek ; B 73 -225 287 0 ;
-C 207 ; WX 333 ; N caron ; B 21 593 312 734 ;
-C 208 ; WX 1000 ; N emdash ; B 0 240 1000 313 ;
-C 225 ; WX 1000 ; N AE ; B 8 0 951 718 ;
-C 227 ; WX 370 ; N ordfeminine ; B 24 304 346 737 ;
-C 232 ; WX 556 ; N Lslash ; B -20 0 537 718 ;
-C 233 ; WX 778 ; N Oslash ; B 39 -19 740 737 ;
-C 234 ; WX 1000 ; N OE ; B 36 -19 965 737 ;
-C 235 ; WX 365 ; N ordmasculine ; B 25 304 341 737 ;
-C 241 ; WX 889 ; N ae ; B 36 -15 847 538 ;
-C 245 ; WX 278 ; N dotlessi ; B 95 0 183 523 ;
-C 248 ; WX 222 ; N lslash ; B -20 0 242 718 ;
-C 249 ; WX 611 ; N oslash ; B 28 -22 537 545 ;
-C 250 ; WX 944 ; N oe ; B 35 -15 902 538 ;
-C 251 ; WX 611 ; N germandbls ; B 67 -15 571 728 ;
-C -1 ; WX 611 ; N Zcaron ; B 23 0 588 929 ;
-C -1 ; WX 500 ; N ccedilla ; B 30 -225 477 538 ;
-C -1 ; WX 500 ; N ydieresis ; B 11 -214 489 706 ;
-C -1 ; WX 556 ; N atilde ; B 36 -15 530 722 ;
-C -1 ; WX 278 ; N icircumflex ; B -6 0 285 734 ;
-C -1 ; WX 333 ; N threesuperior ; B 5 270 325 703 ;
-C -1 ; WX 556 ; N ecircumflex ; B 40 -15 516 734 ;
-C -1 ; WX 556 ; N thorn ; B 58 -207 517 718 ;
-C -1 ; WX 556 ; N egrave ; B 40 -15 516 734 ;
-C -1 ; WX 333 ; N twosuperior ; B 4 281 323 703 ;
-C -1 ; WX 556 ; N eacute ; B 40 -15 516 734 ;
-C -1 ; WX 556 ; N otilde ; B 35 -14 521 722 ;
-C -1 ; WX 667 ; N Aacute ; B 14 0 654 929 ;
-C -1 ; WX 556 ; N ocircumflex ; B 35 -14 521 734 ;
-C -1 ; WX 500 ; N yacute ; B 11 -214 489 734 ;
-C -1 ; WX 556 ; N udieresis ; B 68 -15 489 706 ;
-C -1 ; WX 834 ; N threequarters ; B 45 -19 810 703 ;
-C -1 ; WX 556 ; N acircumflex ; B 36 -15 530 734 ;
-C -1 ; WX 722 ; N Eth ; B 0 0 674 718 ;
-C -1 ; WX 556 ; N edieresis ; B 40 -15 516 706 ;
-C -1 ; WX 556 ; N ugrave ; B 68 -15 489 734 ;
-C -1 ; WX 1000 ; N trademark ; B 46 306 903 718 ;
-C -1 ; WX 556 ; N ograve ; B 35 -14 521 734 ;
-C -1 ; WX 500 ; N scaron ; B 32 -15 464 734 ;
-C -1 ; WX 278 ; N Idieresis ; B 13 0 266 901 ;
-C -1 ; WX 556 ; N uacute ; B 68 -15 489 734 ;
-C -1 ; WX 556 ; N agrave ; B 36 -15 530 734 ;
-C -1 ; WX 556 ; N ntilde ; B 65 0 491 722 ;
-C -1 ; WX 556 ; N aring ; B 36 -15 530 756 ;
-C -1 ; WX 500 ; N zcaron ; B 31 0 469 734 ;
-C -1 ; WX 278 ; N Icircumflex ; B -6 0 285 929 ;
-C -1 ; WX 722 ; N Ntilde ; B 76 0 646 917 ;
-C -1 ; WX 556 ; N ucircumflex ; B 68 -15 489 734 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 86 0 616 929 ;
-C -1 ; WX 278 ; N Iacute ; B 91 0 292 929 ;
-C -1 ; WX 722 ; N Ccedilla ; B 44 -225 681 737 ;
-C -1 ; WX 778 ; N Odieresis ; B 39 -19 739 901 ;
-C -1 ; WX 667 ; N Scaron ; B 49 -19 620 929 ;
-C -1 ; WX 667 ; N Edieresis ; B 86 0 616 901 ;
-C -1 ; WX 278 ; N Igrave ; B -13 0 188 929 ;
-C -1 ; WX 556 ; N adieresis ; B 36 -15 530 706 ;
-C -1 ; WX 778 ; N Ograve ; B 39 -19 739 929 ;
-C -1 ; WX 667 ; N Egrave ; B 86 0 616 929 ;
-C -1 ; WX 667 ; N Ydieresis ; B 14 0 653 901 ;
-C -1 ; WX 737 ; N registered ; B -14 -19 752 737 ;
-C -1 ; WX 778 ; N Otilde ; B 39 -19 739 917 ;
-C -1 ; WX 834 ; N onequarter ; B 73 -19 756 703 ;
-C -1 ; WX 722 ; N Ugrave ; B 79 -19 644 929 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 79 -19 644 929 ;
-C -1 ; WX 667 ; N Thorn ; B 86 0 622 718 ;
-C -1 ; WX 584 ; N divide ; B 39 -19 545 524 ;
-C -1 ; WX 667 ; N Atilde ; B 14 0 654 917 ;
-C -1 ; WX 722 ; N Uacute ; B 79 -19 644 929 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 39 -19 739 929 ;
-C -1 ; WX 584 ; N logicalnot ; B 39 108 545 390 ;
-C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ;
-C -1 ; WX 278 ; N idieresis ; B 13 0 266 706 ;
-C -1 ; WX 278 ; N iacute ; B 95 0 292 734 ;
-C -1 ; WX 556 ; N aacute ; B 36 -15 530 734 ;
-C -1 ; WX 584 ; N plusminus ; B 39 0 545 506 ;
-C -1 ; WX 584 ; N multiply ; B 39 0 545 506 ;
-C -1 ; WX 722 ; N Udieresis ; B 79 -19 644 901 ;
-C -1 ; WX 584 ; N minus ; B 39 216 545 289 ;
-C -1 ; WX 333 ; N onesuperior ; B 43 281 222 703 ;
-C -1 ; WX 667 ; N Eacute ; B 86 0 616 929 ;
-C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ;
-C -1 ; WX 737 ; N copyright ; B -14 -19 752 737 ;
-C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ;
-C -1 ; WX 556 ; N odieresis ; B 35 -14 521 706 ;
-C -1 ; WX 556 ; N oacute ; B 35 -14 521 734 ;
-C -1 ; WX 400 ; N degree ; B 54 411 346 703 ;
-C -1 ; WX 278 ; N igrave ; B -13 0 184 734 ;
-C -1 ; WX 556 ; N mu ; B 68 -207 489 523 ;
-C -1 ; WX 778 ; N Oacute ; B 39 -19 739 929 ;
-C -1 ; WX 556 ; N eth ; B 35 -15 522 737 ;
-C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ;
-C -1 ; WX 667 ; N Yacute ; B 14 0 653 929 ;
-C -1 ; WX 260 ; N brokenbar ; B 94 -19 167 737 ;
-C -1 ; WX 834 ; N onehalf ; B 43 -19 773 703 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 250
-
-KPX A y -40
-KPX A w -40
-KPX A v -40
-KPX A u -30
-KPX A Y -100
-KPX A W -50
-KPX A V -70
-KPX A U -50
-KPX A T -120
-KPX A Q -30
-KPX A O -30
-KPX A G -30
-KPX A C -30
-
-KPX B period -20
-KPX B comma -20
-KPX B U -10
-
-KPX C period -30
-KPX C comma -30
-
-KPX D period -70
-KPX D comma -70
-KPX D Y -90
-KPX D W -40
-KPX D V -70
-KPX D A -40
-
-KPX F r -45
-KPX F period -150
-KPX F o -30
-KPX F e -30
-KPX F comma -150
-KPX F a -50
-KPX F A -80
-
-KPX J u -20
-KPX J period -30
-KPX J comma -30
-KPX J a -20
-KPX J A -20
-
-KPX K y -50
-KPX K u -30
-KPX K o -40
-KPX K e -40
-KPX K O -50
-
-KPX L y -30
-KPX L quoteright -160
-KPX L quotedblright -140
-KPX L Y -140
-KPX L W -70
-KPX L V -110
-KPX L T -110
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -60
-KPX O W -30
-KPX O V -50
-KPX O T -40
-KPX O A -20
-
-KPX P period -180
-KPX P o -50
-KPX P e -50
-KPX P comma -180
-KPX P a -40
-KPX P A -120
-
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -30
-KPX R V -50
-KPX R U -40
-KPX R T -30
-KPX R O -20
-
-KPX S period -20
-KPX S comma -20
-
-KPX T y -120
-KPX T w -120
-KPX T u -120
-KPX T semicolon -20
-KPX T r -120
-KPX T period -120
-KPX T o -120
-KPX T hyphen -140
-KPX T e -120
-KPX T comma -120
-KPX T colon -20
-KPX T a -120
-KPX T O -40
-KPX T A -120
-
-KPX U period -40
-KPX U comma -40
-KPX U A -40
-
-KPX V u -70
-KPX V semicolon -40
-KPX V period -125
-KPX V o -80
-KPX V hyphen -80
-KPX V e -80
-KPX V comma -125
-KPX V colon -40
-KPX V a -70
-KPX V O -40
-KPX V G -40
-KPX V A -80
-
-KPX W y -20
-KPX W u -30
-KPX W period -80
-KPX W o -30
-KPX W hyphen -40
-KPX W e -30
-KPX W comma -80
-KPX W a -40
-KPX W O -20
-KPX W A -50
-
-KPX Y u -110
-KPX Y semicolon -60
-KPX Y period -140
-KPX Y o -140
-KPX Y i -20
-KPX Y hyphen -140
-KPX Y e -140
-KPX Y comma -140
-KPX Y colon -60
-KPX Y a -140
-KPX Y O -85
-KPX Y A -110
-
-KPX a y -30
-KPX a w -20
-KPX a v -20
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b period -40
-KPX b l -20
-KPX b comma -40
-KPX b b -10
-
-KPX c k -20
-KPX c comma -15
-
-KPX colon space -50
-
-KPX comma quoteright -100
-KPX comma quotedblright -100
-
-KPX e y -20
-KPX e x -30
-KPX e w -20
-KPX e v -30
-KPX e period -15
-KPX e comma -15
-
-KPX f quoteright 50
-KPX f quotedblright 60
-KPX f period -30
-KPX f o -30
-KPX f e -30
-KPX f dotlessi -28
-KPX f comma -30
-KPX f a -30
-
-KPX g r -10
-
-KPX h y -30
-
-KPX k o -20
-KPX k e -20
-
-KPX m y -15
-KPX m u -10
-
-KPX n y -15
-KPX n v -20
-KPX n u -10
-
-KPX o y -30
-KPX o x -30
-KPX o w -15
-KPX o v -15
-KPX o period -40
-KPX o comma -40
-
-KPX oslash z -55
-KPX oslash y -70
-KPX oslash x -85
-KPX oslash w -70
-KPX oslash v -70
-KPX oslash u -55
-KPX oslash t -55
-KPX oslash s -55
-KPX oslash r -55
-KPX oslash q -55
-KPX oslash period -95
-KPX oslash p -55
-KPX oslash o -55
-KPX oslash n -55
-KPX oslash m -55
-KPX oslash l -55
-KPX oslash k -55
-KPX oslash j -55
-KPX oslash i -55
-KPX oslash h -55
-KPX oslash g -55
-KPX oslash f -55
-KPX oslash e -55
-KPX oslash d -55
-KPX oslash comma -95
-KPX oslash c -55
-KPX oslash b -55
-KPX oslash a -55
-
-KPX p y -30
-KPX p period -35
-KPX p comma -35
-
-KPX period space -60
-KPX period quoteright -100
-KPX period quotedblright -100
-
-KPX quotedblright space -40
-
-KPX quoteleft quoteleft -57
-
-KPX quoteright space -70
-KPX quoteright s -50
-KPX quoteright r -50
-KPX quoteright quoteright -57
-KPX quoteright d -50
-
-KPX r y 30
-KPX r v 30
-KPX r u 15
-KPX r t 40
-KPX r semicolon 30
-KPX r period -50
-KPX r p 30
-KPX r n 25
-KPX r m 25
-KPX r l 15
-KPX r k 15
-KPX r i 15
-KPX r comma -50
-KPX r colon 30
-KPX r a -10
-
-KPX s w -30
-KPX s period -15
-KPX s comma -15
-
-KPX semicolon space -50
-
-KPX space quoteleft -60
-KPX space quotedblleft -30
-KPX space Y -90
-KPX space W -40
-KPX space V -50
-KPX space T -50
-
-KPX v period -80
-KPX v o -25
-KPX v e -25
-KPX v comma -80
-KPX v a -25
-
-KPX w period -60
-KPX w o -10
-KPX w e -10
-KPX w comma -60
-KPX w a -15
-
-KPX x e -30
-
-KPX y period -100
-KPX y o -20
-KPX y e -20
-KPX y comma -100
-KPX y a -20
-
-KPX z o -15
-KPX z e -15
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 195 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 195 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 195 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 195 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 167 175 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 195 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 195 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 195 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 195 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 195 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 195 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 195 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 195 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 195 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 195 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 205 195 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 195 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 195 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 195 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 195 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 195 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 195 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 195 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 195 195 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 195 195 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 195 195 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 167 195 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 195 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 195 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 102 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 84 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 102 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 112 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 112 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 112 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 84 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 112 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 112 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Times-Bold.afm b/config/psfonts/Times-Bold.afm
deleted file mode 100644 (file)
index 55207f9..0000000
+++ /dev/null
@@ -1,648 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Mar 20 12:17:14 1990
-Comment UniqueID 28417
-Comment VMusage 30458 37350
-FontName Times-Bold
-FullName Times Bold
-FamilyName Times
-Weight Bold
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -168 -218 1000 935
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 676
-XHeight 461
-Ascender 676
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 81 -13 251 691 ;
-C 34 ; WX 555 ; N quotedbl ; B 83 404 472 691 ;
-C 35 ; WX 500 ; N numbersign ; B 4 0 496 700 ;
-C 36 ; WX 500 ; N dollar ; B 29 -99 472 750 ;
-C 37 ; WX 1000 ; N percent ; B 124 -14 877 692 ;
-C 38 ; WX 833 ; N ampersand ; B 62 -16 787 691 ;
-C 39 ; WX 333 ; N quoteright ; B 79 356 263 691 ;
-C 40 ; WX 333 ; N parenleft ; B 46 -168 306 694 ;
-C 41 ; WX 333 ; N parenright ; B 27 -168 287 694 ;
-C 42 ; WX 500 ; N asterisk ; B 56 255 447 691 ;
-C 43 ; WX 570 ; N plus ; B 33 0 537 506 ;
-C 44 ; WX 250 ; N comma ; B 39 -180 223 155 ;
-C 45 ; WX 333 ; N hyphen ; B 44 171 287 287 ;
-C 46 ; WX 250 ; N period ; B 41 -13 210 156 ;
-C 47 ; WX 278 ; N slash ; B -24 -19 302 691 ;
-C 48 ; WX 500 ; N zero ; B 24 -13 476 688 ;
-C 49 ; WX 500 ; N one ; B 65 0 442 688 ;
-C 50 ; WX 500 ; N two ; B 17 0 478 688 ;
-C 51 ; WX 500 ; N three ; B 16 -14 468 688 ;
-C 52 ; WX 500 ; N four ; B 19 0 475 688 ;
-C 53 ; WX 500 ; N five ; B 22 -8 470 676 ;
-C 54 ; WX 500 ; N six ; B 28 -13 475 688 ;
-C 55 ; WX 500 ; N seven ; B 17 0 477 676 ;
-C 56 ; WX 500 ; N eight ; B 28 -13 472 688 ;
-C 57 ; WX 500 ; N nine ; B 26 -13 473 688 ;
-C 58 ; WX 333 ; N colon ; B 82 -13 251 472 ;
-C 59 ; WX 333 ; N semicolon ; B 82 -180 266 472 ;
-C 60 ; WX 570 ; N less ; B 31 -8 539 514 ;
-C 61 ; WX 570 ; N equal ; B 33 107 537 399 ;
-C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ;
-C 63 ; WX 500 ; N question ; B 57 -13 445 689 ;
-C 64 ; WX 930 ; N at ; B 108 -19 822 691 ;
-C 65 ; WX 722 ; N A ; B 9 0 689 690 ;
-C 66 ; WX 667 ; N B ; B 16 0 619 676 ;
-C 67 ; WX 722 ; N C ; B 49 -19 687 691 ;
-C 68 ; WX 722 ; N D ; B 14 0 690 676 ;
-C 69 ; WX 667 ; N E ; B 16 0 641 676 ;
-C 70 ; WX 611 ; N F ; B 16 0 583 676 ;
-C 71 ; WX 778 ; N G ; B 37 -19 755 691 ;
-C 72 ; WX 778 ; N H ; B 21 0 759 676 ;
-C 73 ; WX 389 ; N I ; B 20 0 370 676 ;
-C 74 ; WX 500 ; N J ; B 3 -96 479 676 ;
-C 75 ; WX 778 ; N K ; B 30 0 769 676 ;
-C 76 ; WX 667 ; N L ; B 19 0 638 676 ;
-C 77 ; WX 944 ; N M ; B 14 0 921 676 ;
-C 78 ; WX 722 ; N N ; B 16 -18 701 676 ;
-C 79 ; WX 778 ; N O ; B 35 -19 743 691 ;
-C 80 ; WX 611 ; N P ; B 16 0 600 676 ;
-C 81 ; WX 778 ; N Q ; B 35 -176 743 691 ;
-C 82 ; WX 722 ; N R ; B 26 0 715 676 ;
-C 83 ; WX 556 ; N S ; B 35 -19 513 692 ;
-C 84 ; WX 667 ; N T ; B 31 0 636 676 ;
-C 85 ; WX 722 ; N U ; B 16 -19 701 676 ;
-C 86 ; WX 722 ; N V ; B 16 -18 701 676 ;
-C 87 ; WX 1000 ; N W ; B 19 -15 981 676 ;
-C 88 ; WX 722 ; N X ; B 16 0 699 676 ;
-C 89 ; WX 722 ; N Y ; B 15 0 699 676 ;
-C 90 ; WX 667 ; N Z ; B 28 0 634 676 ;
-C 91 ; WX 333 ; N bracketleft ; B 67 -149 301 678 ;
-C 92 ; WX 278 ; N backslash ; B -25 -19 303 691 ;
-C 93 ; WX 333 ; N bracketright ; B 32 -149 266 678 ;
-C 94 ; WX 581 ; N asciicircum ; B 73 311 509 676 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 333 ; N quoteleft ; B 70 356 254 691 ;
-C 97 ; WX 500 ; N a ; B 25 -14 488 473 ;
-C 98 ; WX 556 ; N b ; B 17 -14 521 676 ;
-C 99 ; WX 444 ; N c ; B 25 -14 430 473 ;
-C 100 ; WX 556 ; N d ; B 25 -14 534 676 ;
-C 101 ; WX 444 ; N e ; B 25 -14 426 473 ;
-C 102 ; WX 333 ; N f ; B 14 0 389 691 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 28 -206 483 473 ;
-C 104 ; WX 556 ; N h ; B 16 0 534 676 ;
-C 105 ; WX 278 ; N i ; B 16 0 255 691 ;
-C 106 ; WX 333 ; N j ; B -57 -203 263 691 ;
-C 107 ; WX 556 ; N k ; B 22 0 543 676 ;
-C 108 ; WX 278 ; N l ; B 16 0 255 676 ;
-C 109 ; WX 833 ; N m ; B 16 0 814 473 ;
-C 110 ; WX 556 ; N n ; B 21 0 539 473 ;
-C 111 ; WX 500 ; N o ; B 25 -14 476 473 ;
-C 112 ; WX 556 ; N p ; B 19 -205 524 473 ;
-C 113 ; WX 556 ; N q ; B 34 -205 536 473 ;
-C 114 ; WX 444 ; N r ; B 29 0 434 473 ;
-C 115 ; WX 389 ; N s ; B 25 -14 361 473 ;
-C 116 ; WX 333 ; N t ; B 20 -12 332 630 ;
-C 117 ; WX 556 ; N u ; B 16 -14 537 461 ;
-C 118 ; WX 500 ; N v ; B 21 -14 485 461 ;
-C 119 ; WX 722 ; N w ; B 23 -14 707 461 ;
-C 120 ; WX 500 ; N x ; B 12 0 484 461 ;
-C 121 ; WX 500 ; N y ; B 16 -205 480 461 ;
-C 122 ; WX 444 ; N z ; B 21 0 420 461 ;
-C 123 ; WX 394 ; N braceleft ; B 22 -175 340 698 ;
-C 124 ; WX 220 ; N bar ; B 66 -19 154 691 ;
-C 125 ; WX 394 ; N braceright ; B 54 -175 372 698 ;
-C 126 ; WX 520 ; N asciitilde ; B 29 173 491 333 ;
-C 161 ; WX 333 ; N exclamdown ; B 82 -203 252 501 ;
-C 162 ; WX 500 ; N cent ; B 53 -140 458 588 ;
-C 163 ; WX 500 ; N sterling ; B 21 -14 477 684 ;
-C 164 ; WX 167 ; N fraction ; B -168 -12 329 688 ;
-C 165 ; WX 500 ; N yen ; B -64 0 547 676 ;
-C 166 ; WX 500 ; N florin ; B 0 -155 498 706 ;
-C 167 ; WX 500 ; N section ; B 57 -132 443 691 ;
-C 168 ; WX 500 ; N currency ; B -26 61 526 613 ;
-C 169 ; WX 278 ; N quotesingle ; B 75 404 204 691 ;
-C 170 ; WX 500 ; N quotedblleft ; B 32 356 486 691 ;
-C 171 ; WX 500 ; N guillemotleft ; B 23 36 473 415 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 51 36 305 415 ;
-C 173 ; WX 333 ; N guilsinglright ; B 28 36 282 415 ;
-C 174 ; WX 556 ; N fi ; B 14 0 536 691 ;
-C 175 ; WX 556 ; N fl ; B 14 0 536 691 ;
-C 177 ; WX 500 ; N endash ; B 0 181 500 271 ;
-C 178 ; WX 500 ; N dagger ; B 47 -134 453 691 ;
-C 179 ; WX 500 ; N daggerdbl ; B 45 -132 456 691 ;
-C 180 ; WX 250 ; N periodcentered ; B 41 248 210 417 ;
-C 182 ; WX 540 ; N paragraph ; B 0 -186 519 676 ;
-C 183 ; WX 350 ; N bullet ; B 35 198 315 478 ;
-C 184 ; WX 333 ; N quotesinglbase ; B 79 -180 263 155 ;
-C 185 ; WX 500 ; N quotedblbase ; B 14 -180 468 155 ;
-C 186 ; WX 500 ; N quotedblright ; B 14 356 468 691 ;
-C 187 ; WX 500 ; N guillemotright ; B 27 36 477 415 ;
-C 188 ; WX 1000 ; N ellipsis ; B 82 -13 917 156 ;
-C 189 ; WX 1000 ; N perthousand ; B 7 -29 995 706 ;
-C 191 ; WX 500 ; N questiondown ; B 55 -201 443 501 ;
-C 193 ; WX 333 ; N grave ; B 8 528 246 713 ;
-C 194 ; WX 333 ; N acute ; B 86 528 324 713 ;
-C 195 ; WX 333 ; N circumflex ; B -2 528 335 704 ;
-C 196 ; WX 333 ; N tilde ; B -16 547 349 674 ;
-C 197 ; WX 333 ; N macron ; B 1 565 331 637 ;
-C 198 ; WX 333 ; N breve ; B 15 528 318 691 ;
-C 199 ; WX 333 ; N dotaccent ; B 103 537 230 667 ;
-C 200 ; WX 333 ; N dieresis ; B -2 537 335 667 ;
-C 202 ; WX 333 ; N ring ; B 60 527 273 740 ;
-C 203 ; WX 333 ; N cedilla ; B 68 -218 294 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B -13 528 425 713 ;
-C 206 ; WX 333 ; N ogonek ; B 90 -173 319 44 ;
-C 207 ; WX 333 ; N caron ; B -2 528 335 704 ;
-C 208 ; WX 1000 ; N emdash ; B 0 181 1000 271 ;
-C 225 ; WX 1000 ; N AE ; B 4 0 951 676 ;
-C 227 ; WX 300 ; N ordfeminine ; B -1 397 301 688 ;
-C 232 ; WX 667 ; N Lslash ; B 19 0 638 676 ;
-C 233 ; WX 778 ; N Oslash ; B 35 -74 743 737 ;
-C 234 ; WX 1000 ; N OE ; B 22 -5 981 684 ;
-C 235 ; WX 330 ; N ordmasculine ; B 18 397 312 688 ;
-C 241 ; WX 722 ; N ae ; B 33 -14 693 473 ;
-C 245 ; WX 278 ; N dotlessi ; B 16 0 255 461 ;
-C 248 ; WX 278 ; N lslash ; B -22 0 303 676 ;
-C 249 ; WX 500 ; N oslash ; B 25 -92 476 549 ;
-C 250 ; WX 722 ; N oe ; B 22 -14 696 473 ;
-C 251 ; WX 556 ; N germandbls ; B 19 -12 517 691 ;
-C -1 ; WX 667 ; N Zcaron ; B 28 0 634 914 ;
-C -1 ; WX 444 ; N ccedilla ; B 25 -218 430 473 ;
-C -1 ; WX 500 ; N ydieresis ; B 16 -205 480 667 ;
-C -1 ; WX 500 ; N atilde ; B 25 -14 488 674 ;
-C -1 ; WX 278 ; N icircumflex ; B -36 0 301 704 ;
-C -1 ; WX 300 ; N threesuperior ; B 3 268 297 688 ;
-C -1 ; WX 444 ; N ecircumflex ; B 25 -14 426 704 ;
-C -1 ; WX 556 ; N thorn ; B 19 -205 524 676 ;
-C -1 ; WX 444 ; N egrave ; B 25 -14 426 713 ;
-C -1 ; WX 300 ; N twosuperior ; B 0 275 300 688 ;
-C -1 ; WX 444 ; N eacute ; B 25 -14 426 713 ;
-C -1 ; WX 500 ; N otilde ; B 25 -14 476 674 ;
-C -1 ; WX 722 ; N Aacute ; B 9 0 689 923 ;
-C -1 ; WX 500 ; N ocircumflex ; B 25 -14 476 704 ;
-C -1 ; WX 500 ; N yacute ; B 16 -205 480 713 ;
-C -1 ; WX 556 ; N udieresis ; B 16 -14 537 667 ;
-C -1 ; WX 750 ; N threequarters ; B 23 -12 733 688 ;
-C -1 ; WX 500 ; N acircumflex ; B 25 -14 488 704 ;
-C -1 ; WX 722 ; N Eth ; B 6 0 690 676 ;
-C -1 ; WX 444 ; N edieresis ; B 25 -14 426 667 ;
-C -1 ; WX 556 ; N ugrave ; B 16 -14 537 713 ;
-C -1 ; WX 1000 ; N trademark ; B 24 271 977 676 ;
-C -1 ; WX 500 ; N ograve ; B 25 -14 476 713 ;
-C -1 ; WX 389 ; N scaron ; B 25 -14 363 704 ;
-C -1 ; WX 389 ; N Idieresis ; B 20 0 370 877 ;
-C -1 ; WX 556 ; N uacute ; B 16 -14 537 713 ;
-C -1 ; WX 500 ; N agrave ; B 25 -14 488 713 ;
-C -1 ; WX 556 ; N ntilde ; B 21 0 539 674 ;
-C -1 ; WX 500 ; N aring ; B 25 -14 488 740 ;
-C -1 ; WX 444 ; N zcaron ; B 21 0 420 704 ;
-C -1 ; WX 389 ; N Icircumflex ; B 20 0 370 914 ;
-C -1 ; WX 722 ; N Ntilde ; B 16 -18 701 884 ;
-C -1 ; WX 556 ; N ucircumflex ; B 16 -14 537 704 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 16 0 641 914 ;
-C -1 ; WX 389 ; N Iacute ; B 20 0 370 923 ;
-C -1 ; WX 722 ; N Ccedilla ; B 49 -218 687 691 ;
-C -1 ; WX 778 ; N Odieresis ; B 35 -19 743 877 ;
-C -1 ; WX 556 ; N Scaron ; B 35 -19 513 914 ;
-C -1 ; WX 667 ; N Edieresis ; B 16 0 641 877 ;
-C -1 ; WX 389 ; N Igrave ; B 20 0 370 923 ;
-C -1 ; WX 500 ; N adieresis ; B 25 -14 488 667 ;
-C -1 ; WX 778 ; N Ograve ; B 35 -19 743 923 ;
-C -1 ; WX 667 ; N Egrave ; B 16 0 641 923 ;
-C -1 ; WX 722 ; N Ydieresis ; B 15 0 699 877 ;
-C -1 ; WX 747 ; N registered ; B 26 -19 721 691 ;
-C -1 ; WX 778 ; N Otilde ; B 35 -19 743 884 ;
-C -1 ; WX 750 ; N onequarter ; B 28 -12 743 688 ;
-C -1 ; WX 722 ; N Ugrave ; B 16 -19 701 923 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 16 -19 701 914 ;
-C -1 ; WX 611 ; N Thorn ; B 16 0 600 676 ;
-C -1 ; WX 570 ; N divide ; B 33 -31 537 537 ;
-C -1 ; WX 722 ; N Atilde ; B 9 0 689 884 ;
-C -1 ; WX 722 ; N Uacute ; B 16 -19 701 923 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 35 -19 743 914 ;
-C -1 ; WX 570 ; N logicalnot ; B 33 108 537 399 ;
-C -1 ; WX 722 ; N Aring ; B 9 0 689 935 ;
-C -1 ; WX 278 ; N idieresis ; B -36 0 301 667 ;
-C -1 ; WX 278 ; N iacute ; B 16 0 290 713 ;
-C -1 ; WX 500 ; N aacute ; B 25 -14 488 713 ;
-C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ;
-C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ;
-C -1 ; WX 722 ; N Udieresis ; B 16 -19 701 877 ;
-C -1 ; WX 570 ; N minus ; B 33 209 537 297 ;
-C -1 ; WX 300 ; N onesuperior ; B 28 275 273 688 ;
-C -1 ; WX 667 ; N Eacute ; B 16 0 641 923 ;
-C -1 ; WX 722 ; N Acircumflex ; B 9 0 689 914 ;
-C -1 ; WX 747 ; N copyright ; B 26 -19 721 691 ;
-C -1 ; WX 722 ; N Agrave ; B 9 0 689 923 ;
-C -1 ; WX 500 ; N odieresis ; B 25 -14 476 667 ;
-C -1 ; WX 500 ; N oacute ; B 25 -14 476 713 ;
-C -1 ; WX 400 ; N degree ; B 57 402 343 688 ;
-C -1 ; WX 278 ; N igrave ; B -26 0 255 713 ;
-C -1 ; WX 556 ; N mu ; B 33 -206 536 461 ;
-C -1 ; WX 778 ; N Oacute ; B 35 -19 743 923 ;
-C -1 ; WX 500 ; N eth ; B 25 -14 476 691 ;
-C -1 ; WX 722 ; N Adieresis ; B 9 0 689 877 ;
-C -1 ; WX 722 ; N Yacute ; B 15 0 699 928 ;
-C -1 ; WX 220 ; N brokenbar ; B 66 -19 154 691 ;
-C -1 ; WX 750 ; N onehalf ; B -7 -12 775 688 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 283
-
-KPX A y -74
-KPX A w -90
-KPX A v -100
-KPX A u -50
-KPX A quoteright -74
-KPX A quotedblright 0
-KPX A p -25
-KPX A Y -100
-KPX A W -130
-KPX A V -145
-KPX A U -50
-KPX A T -95
-KPX A Q -45
-KPX A O -45
-KPX A G -55
-KPX A C -55
-
-KPX B period 0
-KPX B comma 0
-KPX B U -10
-KPX B A -30
-
-KPX D period -20
-KPX D comma 0
-KPX D Y -40
-KPX D W -40
-KPX D V -40
-KPX D A -35
-
-KPX F r 0
-KPX F period -110
-KPX F o -25
-KPX F i 0
-KPX F e -25
-KPX F comma -92
-KPX F a -25
-KPX F A -90
-
-KPX G period 0
-KPX G comma 0
-
-KPX J u -15
-KPX J period -20
-KPX J o -15
-KPX J e -15
-KPX J comma 0
-KPX J a -15
-KPX J A -30
-
-KPX K y -45
-KPX K u -15
-KPX K o -25
-KPX K e -25
-KPX K O -30
-
-KPX L y -55
-KPX L quoteright -110
-KPX L quotedblright -20
-KPX L Y -92
-KPX L W -92
-KPX L V -92
-KPX L T -92
-
-KPX N period 0
-KPX N comma 0
-KPX N A -20
-
-KPX O period 0
-KPX O comma 0
-KPX O Y -50
-KPX O X -40
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -40
-
-KPX P period -110
-KPX P o -20
-KPX P e -20
-KPX P comma -92
-KPX P a -10
-KPX P A -74
-
-KPX Q period -20
-KPX Q comma 0
-KPX Q U -10
-
-KPX R Y -35
-KPX R W -35
-KPX R V -55
-KPX R U -30
-KPX R T -40
-KPX R O -30
-
-KPX S period 0
-KPX S comma 0
-
-KPX T y -74
-KPX T w -74
-KPX T u -92
-KPX T semicolon -74
-KPX T r -74
-KPX T period -90
-KPX T o -92
-KPX T i -18
-KPX T hyphen -92
-KPX T h 0
-KPX T e -92
-KPX T comma -74
-KPX T colon -74
-KPX T a -92
-KPX T O -18
-KPX T A -90
-
-KPX U period -50
-KPX U comma -50
-KPX U A -60
-
-KPX V u -92
-KPX V semicolon -92
-KPX V period -145
-KPX V o -100
-KPX V i -37
-KPX V hyphen -74
-KPX V e -100
-KPX V comma -129
-KPX V colon -92
-KPX V a -92
-KPX V O -45
-KPX V G -30
-KPX V A -135
-
-KPX W y -60
-KPX W u -50
-KPX W semicolon -55
-KPX W period -92
-KPX W o -75
-KPX W i -18
-KPX W hyphen -37
-KPX W h 0
-KPX W e -65
-KPX W comma -92
-KPX W colon -55
-KPX W a -65
-KPX W O -10
-KPX W A -120
-
-KPX Y u -92
-KPX Y semicolon -92
-KPX Y period -92
-KPX Y o -111
-KPX Y i -37
-KPX Y hyphen -92
-KPX Y e -111
-KPX Y comma -92
-KPX Y colon -92
-KPX Y a -85
-KPX Y O -35
-KPX Y A -110
-
-KPX a y 0
-KPX a w 0
-KPX a v -25
-KPX a t 0
-KPX a p 0
-KPX a g 0
-KPX a b 0
-
-KPX b y 0
-KPX b v -15
-KPX b u -20
-KPX b period -40
-KPX b l 0
-KPX b comma 0
-KPX b b -10
-
-KPX c y 0
-KPX c period 0
-KPX c l 0
-KPX c k 0
-KPX c h 0
-KPX c comma 0
-
-KPX colon space 0
-
-KPX comma space 0
-KPX comma quoteright -55
-KPX comma quotedblright -45
-
-KPX d y 0
-KPX d w -15
-KPX d v 0
-KPX d period 0
-KPX d d 0
-KPX d comma 0
-
-KPX e y 0
-KPX e x 0
-KPX e w 0
-KPX e v -15
-KPX e period 0
-KPX e p 0
-KPX e g 0
-KPX e comma 0
-KPX e b 0
-
-KPX f quoteright 55
-KPX f quotedblright 50
-KPX f period -15
-KPX f o -25
-KPX f l 0
-KPX f i -25
-KPX f f 0
-KPX f e 0
-KPX f dotlessi -35
-KPX f comma -15
-KPX f a 0
-
-KPX g y 0
-KPX g r 0
-KPX g period -15
-KPX g o 0
-KPX g i 0
-KPX g g 0
-KPX g e 0
-KPX g comma 0
-KPX g a 0
-
-KPX h y -15
-
-KPX i v -10
-
-KPX k y -15
-KPX k o -15
-KPX k e -10
-
-KPX l y 0
-KPX l w 0
-
-KPX m y 0
-KPX m u 0
-
-KPX n y 0
-KPX n v -40
-KPX n u 0
-
-KPX o y 0
-KPX o x 0
-KPX o w -10
-KPX o v -10
-KPX o g 0
-
-KPX p y 0
-
-KPX period quoteright -55
-KPX period quotedblright -55
-
-KPX quotedblleft quoteleft 0
-KPX quotedblleft A -10
-
-KPX quotedblright space 0
-
-KPX quoteleft quoteleft -63
-KPX quoteleft A -10
-
-KPX quoteright v -20
-KPX quoteright t 0
-KPX quoteright space -74
-KPX quoteright s -37
-KPX quoteright r -20
-KPX quoteright quoteright -63
-KPX quoteright quotedblright 0
-KPX quoteright l 0
-KPX quoteright d -20
-
-KPX r y 0
-KPX r v -10
-KPX r u 0
-KPX r t 0
-KPX r s 0
-KPX r r 0
-KPX r q -18
-KPX r period -100
-KPX r p -10
-KPX r o -18
-KPX r n -15
-KPX r m 0
-KPX r l 0
-KPX r k 0
-KPX r i 0
-KPX r hyphen -37
-KPX r g -10
-KPX r e -18
-KPX r d 0
-KPX r comma -92
-KPX r c -18
-KPX r a 0
-
-KPX s w 0
-
-KPX space quoteleft 0
-KPX space quotedblleft 0
-KPX space Y -55
-KPX space W -30
-KPX space V -45
-KPX space T -30
-KPX space A -55
-
-KPX v period -70
-KPX v o -10
-KPX v e -10
-KPX v comma -55
-KPX v a -10
-
-KPX w period -70
-KPX w o -10
-KPX w h 0
-KPX w e 0
-KPX w comma -55
-KPX w a 0
-
-KPX x e 0
-
-KPX y period -70
-KPX y o -25
-KPX y e -10
-KPX y comma -55
-KPX y a 0
-
-KPX z o 0
-KPX z e 0
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 188 210 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 188 210 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 188 210 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 188 210 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 180 195 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 188 210 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 208 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 174 210 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 174 210 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 174 210 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 174 210 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 210 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 210 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 210 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 210 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 195 210 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 210 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 210 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 210 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 210 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 210 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 210 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 222 210 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 222 210 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 222 210 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 222 210 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 210 215 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 215 210 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 210 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 77 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 77 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 77 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 77 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 77 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 77 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 69 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 62 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 62 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 62 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 62 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -34 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -34 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -34 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -34 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 112 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 105 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 105 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 105 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 105 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 56 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Times-BoldItalic.afm b/config/psfonts/Times-BoldItalic.afm
deleted file mode 100644 (file)
index 25ab54e..0000000
+++ /dev/null
@@ -1,648 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Mar 20 13:14:55 1990
-Comment UniqueID 28425
-Comment VMusage 32721 39613
-FontName Times-BoldItalic
-FullName Times Bold Italic
-FamilyName Times
-Weight Bold
-ItalicAngle -15
-IsFixedPitch false
-FontBBox -200 -218 996 921
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.009
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 669
-XHeight 462
-Ascender 699
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 389 ; N exclam ; B 67 -13 370 684 ;
-C 34 ; WX 555 ; N quotedbl ; B 136 398 536 685 ;
-C 35 ; WX 500 ; N numbersign ; B -33 0 533 700 ;
-C 36 ; WX 500 ; N dollar ; B -20 -100 497 733 ;
-C 37 ; WX 833 ; N percent ; B 39 -10 793 692 ;
-C 38 ; WX 778 ; N ampersand ; B 5 -19 699 682 ;
-C 39 ; WX 333 ; N quoteright ; B 98 369 302 685 ;
-C 40 ; WX 333 ; N parenleft ; B 28 -179 344 685 ;
-C 41 ; WX 333 ; N parenright ; B -44 -179 271 685 ;
-C 42 ; WX 500 ; N asterisk ; B 65 249 456 685 ;
-C 43 ; WX 570 ; N plus ; B 33 0 537 506 ;
-C 44 ; WX 250 ; N comma ; B -60 -182 144 134 ;
-C 45 ; WX 333 ; N hyphen ; B 2 166 271 282 ;
-C 46 ; WX 250 ; N period ; B -9 -13 139 135 ;
-C 47 ; WX 278 ; N slash ; B -64 -18 342 685 ;
-C 48 ; WX 500 ; N zero ; B 17 -14 477 683 ;
-C 49 ; WX 500 ; N one ; B 5 0 419 683 ;
-C 50 ; WX 500 ; N two ; B -27 0 446 683 ;
-C 51 ; WX 500 ; N three ; B -15 -13 450 683 ;
-C 52 ; WX 500 ; N four ; B -15 0 503 683 ;
-C 53 ; WX 500 ; N five ; B -11 -13 487 669 ;
-C 54 ; WX 500 ; N six ; B 23 -15 509 679 ;
-C 55 ; WX 500 ; N seven ; B 52 0 525 669 ;
-C 56 ; WX 500 ; N eight ; B 3 -13 476 683 ;
-C 57 ; WX 500 ; N nine ; B -12 -10 475 683 ;
-C 58 ; WX 333 ; N colon ; B 23 -13 264 459 ;
-C 59 ; WX 333 ; N semicolon ; B -25 -183 264 459 ;
-C 60 ; WX 570 ; N less ; B 31 -8 539 514 ;
-C 61 ; WX 570 ; N equal ; B 33 107 537 399 ;
-C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ;
-C 63 ; WX 500 ; N question ; B 79 -13 470 684 ;
-C 64 ; WX 832 ; N at ; B 63 -18 770 685 ;
-C 65 ; WX 667 ; N A ; B -67 0 593 683 ;
-C 66 ; WX 667 ; N B ; B -24 0 624 669 ;
-C 67 ; WX 667 ; N C ; B 32 -18 677 685 ;
-C 68 ; WX 722 ; N D ; B -46 0 685 669 ;
-C 69 ; WX 667 ; N E ; B -27 0 653 669 ;
-C 70 ; WX 667 ; N F ; B -13 0 660 669 ;
-C 71 ; WX 722 ; N G ; B 21 -18 706 685 ;
-C 72 ; WX 778 ; N H ; B -24 0 799 669 ;
-C 73 ; WX 389 ; N I ; B -32 0 406 669 ;
-C 74 ; WX 500 ; N J ; B -46 -99 524 669 ;
-C 75 ; WX 667 ; N K ; B -21 0 702 669 ;
-C 76 ; WX 611 ; N L ; B -22 0 590 669 ;
-C 77 ; WX 889 ; N M ; B -29 -12 917 669 ;
-C 78 ; WX 722 ; N N ; B -27 -15 748 669 ;
-C 79 ; WX 722 ; N O ; B 27 -18 691 685 ;
-C 80 ; WX 611 ; N P ; B -27 0 613 669 ;
-C 81 ; WX 722 ; N Q ; B 27 -208 691 685 ;
-C 82 ; WX 667 ; N R ; B -29 0 623 669 ;
-C 83 ; WX 556 ; N S ; B 2 -18 526 685 ;
-C 84 ; WX 611 ; N T ; B 50 0 650 669 ;
-C 85 ; WX 722 ; N U ; B 67 -18 744 669 ;
-C 86 ; WX 667 ; N V ; B 65 -18 715 669 ;
-C 87 ; WX 889 ; N W ; B 65 -18 940 669 ;
-C 88 ; WX 667 ; N X ; B -24 0 694 669 ;
-C 89 ; WX 611 ; N Y ; B 73 0 659 669 ;
-C 90 ; WX 611 ; N Z ; B -11 0 590 669 ;
-C 91 ; WX 333 ; N bracketleft ; B -37 -159 362 674 ;
-C 92 ; WX 278 ; N backslash ; B -1 -18 279 685 ;
-C 93 ; WX 333 ; N bracketright ; B -56 -157 343 674 ;
-C 94 ; WX 570 ; N asciicircum ; B 67 304 503 669 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 333 ; N quoteleft ; B 128 369 332 685 ;
-C 97 ; WX 500 ; N a ; B -21 -14 455 462 ;
-C 98 ; WX 500 ; N b ; B -14 -13 444 699 ;
-C 99 ; WX 444 ; N c ; B -5 -13 392 462 ;
-C 100 ; WX 500 ; N d ; B -21 -13 517 699 ;
-C 101 ; WX 444 ; N e ; B 5 -13 398 462 ;
-C 102 ; WX 333 ; N f ; B -169 -205 446 698 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B -52 -203 478 462 ;
-C 104 ; WX 556 ; N h ; B -13 -9 498 699 ;
-C 105 ; WX 278 ; N i ; B 2 -9 263 684 ;
-C 106 ; WX 278 ; N j ; B -189 -207 279 684 ;
-C 107 ; WX 500 ; N k ; B -23 -8 483 699 ;
-C 108 ; WX 278 ; N l ; B 2 -9 290 699 ;
-C 109 ; WX 778 ; N m ; B -14 -9 722 462 ;
-C 110 ; WX 556 ; N n ; B -6 -9 493 462 ;
-C 111 ; WX 500 ; N o ; B -3 -13 441 462 ;
-C 112 ; WX 500 ; N p ; B -120 -205 446 462 ;
-C 113 ; WX 500 ; N q ; B 1 -205 471 462 ;
-C 114 ; WX 389 ; N r ; B -21 0 389 462 ;
-C 115 ; WX 389 ; N s ; B -19 -13 333 462 ;
-C 116 ; WX 278 ; N t ; B -11 -9 281 594 ;
-C 117 ; WX 556 ; N u ; B 15 -9 492 462 ;
-C 118 ; WX 444 ; N v ; B 16 -13 401 462 ;
-C 119 ; WX 667 ; N w ; B 16 -13 614 462 ;
-C 120 ; WX 500 ; N x ; B -46 -13 469 462 ;
-C 121 ; WX 444 ; N y ; B -94 -205 392 462 ;
-C 122 ; WX 389 ; N z ; B -43 -78 368 449 ;
-C 123 ; WX 348 ; N braceleft ; B 5 -187 436 686 ;
-C 124 ; WX 220 ; N bar ; B 66 -18 154 685 ;
-C 125 ; WX 348 ; N braceright ; B -129 -187 302 686 ;
-C 126 ; WX 570 ; N asciitilde ; B 54 173 516 333 ;
-C 161 ; WX 389 ; N exclamdown ; B 19 -205 322 492 ;
-C 162 ; WX 500 ; N cent ; B 42 -143 439 576 ;
-C 163 ; WX 500 ; N sterling ; B -32 -12 510 683 ;
-C 164 ; WX 167 ; N fraction ; B -169 -14 324 683 ;
-C 165 ; WX 500 ; N yen ; B 33 0 628 669 ;
-C 166 ; WX 500 ; N florin ; B -87 -156 537 707 ;
-C 167 ; WX 500 ; N section ; B 36 -143 459 685 ;
-C 168 ; WX 500 ; N currency ; B -26 34 526 586 ;
-C 169 ; WX 278 ; N quotesingle ; B 128 398 268 685 ;
-C 170 ; WX 500 ; N quotedblleft ; B 53 369 513 685 ;
-C 171 ; WX 500 ; N guillemotleft ; B 12 32 468 415 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 32 32 303 415 ;
-C 173 ; WX 333 ; N guilsinglright ; B 10 32 281 415 ;
-C 174 ; WX 556 ; N fi ; B -188 -205 514 703 ;
-C 175 ; WX 556 ; N fl ; B -186 -205 553 704 ;
-C 177 ; WX 500 ; N endash ; B -40 178 477 269 ;
-C 178 ; WX 500 ; N dagger ; B 91 -145 494 685 ;
-C 179 ; WX 500 ; N daggerdbl ; B 10 -139 493 685 ;
-C 180 ; WX 250 ; N periodcentered ; B 51 257 199 405 ;
-C 182 ; WX 500 ; N paragraph ; B -57 -193 562 669 ;
-C 183 ; WX 350 ; N bullet ; B 0 175 350 525 ;
-C 184 ; WX 333 ; N quotesinglbase ; B -5 -182 199 134 ;
-C 185 ; WX 500 ; N quotedblbase ; B -57 -182 403 134 ;
-C 186 ; WX 500 ; N quotedblright ; B 53 369 513 685 ;
-C 187 ; WX 500 ; N guillemotright ; B 12 32 468 415 ;
-C 188 ; WX 1000 ; N ellipsis ; B 40 -13 852 135 ;
-C 189 ; WX 1000 ; N perthousand ; B 7 -29 996 706 ;
-C 191 ; WX 500 ; N questiondown ; B 30 -205 421 492 ;
-C 193 ; WX 333 ; N grave ; B 85 516 297 697 ;
-C 194 ; WX 333 ; N acute ; B 139 516 379 697 ;
-C 195 ; WX 333 ; N circumflex ; B 40 516 367 690 ;
-C 196 ; WX 333 ; N tilde ; B 48 536 407 655 ;
-C 197 ; WX 333 ; N macron ; B 51 553 393 623 ;
-C 198 ; WX 333 ; N breve ; B 71 516 387 678 ;
-C 199 ; WX 333 ; N dotaccent ; B 163 525 293 655 ;
-C 200 ; WX 333 ; N dieresis ; B 55 525 397 655 ;
-C 202 ; WX 333 ; N ring ; B 127 516 340 729 ;
-C 203 ; WX 333 ; N cedilla ; B -80 -218 156 5 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 69 516 498 697 ;
-C 206 ; WX 333 ; N ogonek ; B -40 -173 189 44 ;
-C 207 ; WX 333 ; N caron ; B 79 516 411 690 ;
-C 208 ; WX 1000 ; N emdash ; B -40 178 977 269 ;
-C 225 ; WX 944 ; N AE ; B -64 0 918 669 ;
-C 227 ; WX 266 ; N ordfeminine ; B 16 399 330 685 ;
-C 232 ; WX 611 ; N Lslash ; B -22 0 590 669 ;
-C 233 ; WX 722 ; N Oslash ; B 27 -125 691 764 ;
-C 234 ; WX 944 ; N OE ; B 23 -8 946 677 ;
-C 235 ; WX 300 ; N ordmasculine ; B 56 400 347 685 ;
-C 241 ; WX 722 ; N ae ; B -5 -13 673 462 ;
-C 245 ; WX 278 ; N dotlessi ; B 2 -9 238 462 ;
-C 248 ; WX 278 ; N lslash ; B -13 -9 301 699 ;
-C 249 ; WX 500 ; N oslash ; B -3 -119 441 560 ;
-C 250 ; WX 722 ; N oe ; B 6 -13 674 462 ;
-C 251 ; WX 500 ; N germandbls ; B -200 -200 473 705 ;
-C -1 ; WX 611 ; N Zcaron ; B -11 0 590 897 ;
-C -1 ; WX 444 ; N ccedilla ; B -24 -218 392 462 ;
-C -1 ; WX 444 ; N ydieresis ; B -94 -205 438 655 ;
-C -1 ; WX 500 ; N atilde ; B -21 -14 491 655 ;
-C -1 ; WX 278 ; N icircumflex ; B -2 -9 325 690 ;
-C -1 ; WX 300 ; N threesuperior ; B 17 265 321 683 ;
-C -1 ; WX 444 ; N ecircumflex ; B 5 -13 423 690 ;
-C -1 ; WX 500 ; N thorn ; B -120 -205 446 699 ;
-C -1 ; WX 444 ; N egrave ; B 5 -13 398 697 ;
-C -1 ; WX 300 ; N twosuperior ; B 2 274 313 683 ;
-C -1 ; WX 444 ; N eacute ; B 5 -13 435 697 ;
-C -1 ; WX 500 ; N otilde ; B -3 -13 491 655 ;
-C -1 ; WX 667 ; N Aacute ; B -67 0 593 904 ;
-C -1 ; WX 500 ; N ocircumflex ; B -3 -13 451 690 ;
-C -1 ; WX 444 ; N yacute ; B -94 -205 435 697 ;
-C -1 ; WX 556 ; N udieresis ; B 15 -9 494 655 ;
-C -1 ; WX 750 ; N threequarters ; B 7 -14 726 683 ;
-C -1 ; WX 500 ; N acircumflex ; B -21 -14 455 690 ;
-C -1 ; WX 722 ; N Eth ; B -31 0 700 669 ;
-C -1 ; WX 444 ; N edieresis ; B 5 -13 443 655 ;
-C -1 ; WX 556 ; N ugrave ; B 15 -9 492 697 ;
-C -1 ; WX 1000 ; N trademark ; B 32 263 968 669 ;
-C -1 ; WX 500 ; N ograve ; B -3 -13 441 697 ;
-C -1 ; WX 389 ; N scaron ; B -19 -13 439 690 ;
-C -1 ; WX 389 ; N Idieresis ; B -32 0 445 862 ;
-C -1 ; WX 556 ; N uacute ; B 15 -9 492 697 ;
-C -1 ; WX 500 ; N agrave ; B -21 -14 455 697 ;
-C -1 ; WX 556 ; N ntilde ; B -6 -9 504 655 ;
-C -1 ; WX 500 ; N aring ; B -21 -14 455 729 ;
-C -1 ; WX 389 ; N zcaron ; B -43 -78 424 690 ;
-C -1 ; WX 389 ; N Icircumflex ; B -32 0 420 897 ;
-C -1 ; WX 722 ; N Ntilde ; B -27 -15 748 862 ;
-C -1 ; WX 556 ; N ucircumflex ; B 15 -9 492 690 ;
-C -1 ; WX 667 ; N Ecircumflex ; B -27 0 653 897 ;
-C -1 ; WX 389 ; N Iacute ; B -32 0 412 904 ;
-C -1 ; WX 667 ; N Ccedilla ; B 32 -218 677 685 ;
-C -1 ; WX 722 ; N Odieresis ; B 27 -18 691 862 ;
-C -1 ; WX 556 ; N Scaron ; B 2 -18 526 897 ;
-C -1 ; WX 667 ; N Edieresis ; B -27 0 653 862 ;
-C -1 ; WX 389 ; N Igrave ; B -32 0 406 904 ;
-C -1 ; WX 500 ; N adieresis ; B -21 -14 471 655 ;
-C -1 ; WX 722 ; N Ograve ; B 27 -18 691 904 ;
-C -1 ; WX 667 ; N Egrave ; B -27 0 653 904 ;
-C -1 ; WX 611 ; N Ydieresis ; B 73 0 659 862 ;
-C -1 ; WX 747 ; N registered ; B 30 -18 718 685 ;
-C -1 ; WX 722 ; N Otilde ; B 27 -18 691 862 ;
-C -1 ; WX 750 ; N onequarter ; B 7 -14 721 683 ;
-C -1 ; WX 722 ; N Ugrave ; B 67 -18 744 904 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 67 -18 744 897 ;
-C -1 ; WX 611 ; N Thorn ; B -27 0 573 669 ;
-C -1 ; WX 570 ; N divide ; B 33 -29 537 535 ;
-C -1 ; WX 667 ; N Atilde ; B -67 0 593 862 ;
-C -1 ; WX 722 ; N Uacute ; B 67 -18 744 904 ;
-C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 691 897 ;
-C -1 ; WX 606 ; N logicalnot ; B 51 108 555 399 ;
-C -1 ; WX 667 ; N Aring ; B -67 0 593 921 ;
-C -1 ; WX 278 ; N idieresis ; B 2 -9 360 655 ;
-C -1 ; WX 278 ; N iacute ; B 2 -9 352 697 ;
-C -1 ; WX 500 ; N aacute ; B -21 -14 463 697 ;
-C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ;
-C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ;
-C -1 ; WX 722 ; N Udieresis ; B 67 -18 744 862 ;
-C -1 ; WX 606 ; N minus ; B 51 209 555 297 ;
-C -1 ; WX 300 ; N onesuperior ; B 30 274 301 683 ;
-C -1 ; WX 667 ; N Eacute ; B -27 0 653 904 ;
-C -1 ; WX 667 ; N Acircumflex ; B -67 0 593 897 ;
-C -1 ; WX 747 ; N copyright ; B 30 -18 718 685 ;
-C -1 ; WX 667 ; N Agrave ; B -67 0 593 904 ;
-C -1 ; WX 500 ; N odieresis ; B -3 -13 466 655 ;
-C -1 ; WX 500 ; N oacute ; B -3 -13 463 697 ;
-C -1 ; WX 400 ; N degree ; B 83 397 369 683 ;
-C -1 ; WX 278 ; N igrave ; B 2 -9 260 697 ;
-C -1 ; WX 576 ; N mu ; B -60 -207 516 449 ;
-C -1 ; WX 722 ; N Oacute ; B 27 -18 691 904 ;
-C -1 ; WX 500 ; N eth ; B -3 -13 454 699 ;
-C -1 ; WX 667 ; N Adieresis ; B -67 0 593 862 ;
-C -1 ; WX 611 ; N Yacute ; B 73 0 659 904 ;
-C -1 ; WX 220 ; N brokenbar ; B 66 -18 154 685 ;
-C -1 ; WX 750 ; N onehalf ; B -9 -14 723 683 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 283
-
-KPX A y -74
-KPX A w -74
-KPX A v -74
-KPX A u -30
-KPX A quoteright -74
-KPX A quotedblright 0
-KPX A p 0
-KPX A Y -70
-KPX A W -100
-KPX A V -95
-KPX A U -50
-KPX A T -55
-KPX A Q -55
-KPX A O -50
-KPX A G -60
-KPX A C -65
-
-KPX B period 0
-KPX B comma 0
-KPX B U -10
-KPX B A -25
-
-KPX D period 0
-KPX D comma 0
-KPX D Y -50
-KPX D W -40
-KPX D V -50
-KPX D A -25
-
-KPX F r -50
-KPX F period -129
-KPX F o -70
-KPX F i -40
-KPX F e -100
-KPX F comma -129
-KPX F a -95
-KPX F A -100
-
-KPX G period 0
-KPX G comma 0
-
-KPX J u -40
-KPX J period -10
-KPX J o -40
-KPX J e -40
-KPX J comma -10
-KPX J a -40
-KPX J A -25
-
-KPX K y -20
-KPX K u -20
-KPX K o -25
-KPX K e -25
-KPX K O -30
-
-KPX L y -37
-KPX L quoteright -55
-KPX L quotedblright 0
-KPX L Y -37
-KPX L W -37
-KPX L V -37
-KPX L T -18
-
-KPX N period 0
-KPX N comma 0
-KPX N A -30
-
-KPX O period 0
-KPX O comma 0
-KPX O Y -50
-KPX O X -40
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -40
-
-KPX P period -129
-KPX P o -55
-KPX P e -50
-KPX P comma -129
-KPX P a -40
-KPX P A -85
-
-KPX Q period 0
-KPX Q comma 0
-KPX Q U -10
-
-KPX R Y -18
-KPX R W -18
-KPX R V -18
-KPX R U -40
-KPX R T -30
-KPX R O -40
-
-KPX S period 0
-KPX S comma 0
-
-KPX T y -37
-KPX T w -37
-KPX T u -37
-KPX T semicolon -74
-KPX T r -37
-KPX T period -92
-KPX T o -95
-KPX T i -37
-KPX T hyphen -92
-KPX T h 0
-KPX T e -92
-KPX T comma -92
-KPX T colon -74
-KPX T a -92
-KPX T O -18
-KPX T A -55
-
-KPX U period 0
-KPX U comma 0
-KPX U A -45
-
-KPX V u -55
-KPX V semicolon -74
-KPX V period -129
-KPX V o -111
-KPX V i -55
-KPX V hyphen -70
-KPX V e -111
-KPX V comma -129
-KPX V colon -74
-KPX V a -111
-KPX V O -30
-KPX V G -10
-KPX V A -85
-
-KPX W y -55
-KPX W u -55
-KPX W semicolon -55
-KPX W period -74
-KPX W o -80
-KPX W i -37
-KPX W hyphen -50
-KPX W h 0
-KPX W e -90
-KPX W comma -74
-KPX W colon -55
-KPX W a -85
-KPX W O -15
-KPX W A -74
-
-KPX Y u -92
-KPX Y semicolon -92
-KPX Y period -74
-KPX Y o -111
-KPX Y i -55
-KPX Y hyphen -92
-KPX Y e -111
-KPX Y comma -92
-KPX Y colon -92
-KPX Y a -92
-KPX Y O -25
-KPX Y A -74
-
-KPX a y 0
-KPX a w 0
-KPX a v 0
-KPX a t 0
-KPX a p 0
-KPX a g 0
-KPX a b 0
-
-KPX b y 0
-KPX b v 0
-KPX b u -20
-KPX b period -40
-KPX b l 0
-KPX b comma 0
-KPX b b -10
-
-KPX c y 0
-KPX c period 0
-KPX c l 0
-KPX c k -10
-KPX c h -10
-KPX c comma 0
-
-KPX colon space 0
-
-KPX comma space 0
-KPX comma quoteright -95
-KPX comma quotedblright -95
-
-KPX d y 0
-KPX d w 0
-KPX d v 0
-KPX d period 0
-KPX d d 0
-KPX d comma 0
-
-KPX e y 0
-KPX e x 0
-KPX e w 0
-KPX e v 0
-KPX e period 0
-KPX e p 0
-KPX e g 0
-KPX e comma 0
-KPX e b -10
-
-KPX f quoteright 55
-KPX f quotedblright 0
-KPX f period -10
-KPX f o -10
-KPX f l 0
-KPX f i 0
-KPX f f -18
-KPX f e -10
-KPX f dotlessi -30
-KPX f comma -10
-KPX f a 0
-
-KPX g y 0
-KPX g r 0
-KPX g period 0
-KPX g o 0
-KPX g i 0
-KPX g g 0
-KPX g e 0
-KPX g comma 0
-KPX g a 0
-
-KPX h y 0
-
-KPX i v 0
-
-KPX k y 0
-KPX k o -10
-KPX k e -30
-
-KPX l y 0
-KPX l w 0
-
-KPX m y 0
-KPX m u 0
-
-KPX n y 0
-KPX n v -40
-KPX n u 0
-
-KPX o y -10
-KPX o x -10
-KPX o w -25
-KPX o v -15
-KPX o g 0
-
-KPX p y 0
-
-KPX period quoteright -95
-KPX period quotedblright -95
-
-KPX quotedblleft quoteleft 0
-KPX quotedblleft A 0
-
-KPX quotedblright space 0
-
-KPX quoteleft quoteleft -74
-KPX quoteleft A 0
-
-KPX quoteright v -15
-KPX quoteright t -37
-KPX quoteright space -74
-KPX quoteright s -74
-KPX quoteright r -15
-KPX quoteright quoteright -74
-KPX quoteright quotedblright 0
-KPX quoteright l 0
-KPX quoteright d -15
-
-KPX r y 0
-KPX r v 0
-KPX r u 0
-KPX r t 0
-KPX r s 0
-KPX r r 0
-KPX r q 0
-KPX r period -65
-KPX r p 0
-KPX r o 0
-KPX r n 0
-KPX r m 0
-KPX r l 0
-KPX r k 0
-KPX r i 0
-KPX r hyphen 0
-KPX r g 0
-KPX r e 0
-KPX r d 0
-KPX r comma -65
-KPX r c 0
-KPX r a 0
-
-KPX s w 0
-
-KPX space quoteleft 0
-KPX space quotedblleft 0
-KPX space Y -70
-KPX space W -70
-KPX space V -70
-KPX space T 0
-KPX space A -37
-
-KPX v period -37
-KPX v o -15
-KPX v e -15
-KPX v comma -37
-KPX v a 0
-
-KPX w period -37
-KPX w o -15
-KPX w h 0
-KPX w e -10
-KPX w comma -37
-KPX w a -10
-
-KPX x e -10
-
-KPX y period -37
-KPX y o 0
-KPX y e 0
-KPX y comma -37
-KPX y a 0
-
-KPX z o 0
-KPX z e 0
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 172 207 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 187 207 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 207 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 172 207 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 157 192 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 207 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 172 207 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 187 207 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 187 207 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 172 207 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 33 207 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 53 207 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 48 207 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 33 207 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 210 207 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 200 207 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 230 207 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 215 207 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 200 207 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 207 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 207 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 210 207 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 230 207 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 230 207 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 200 207 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 154 207 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 169 207 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 207 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 84 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 84 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 74 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 74 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 84 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 46 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 46 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -42 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -37 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -37 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 97 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 69 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 74 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 112 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 97 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 102 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 41 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 13 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Times-Italic.afm b/config/psfonts/Times-Italic.afm
deleted file mode 100644 (file)
index 6d7a003..0000000
+++ /dev/null
@@ -1,648 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Mar 20 13:14:56 1990
-Comment UniqueID 28427
-Comment VMusage 32912 39804
-FontName Times-Italic
-FullName Times Italic
-FamilyName Times
-Weight Medium
-ItalicAngle -15.5
-IsFixedPitch false
-FontBBox -169 -217 1010 883
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 653
-XHeight 441
-Ascender 683
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 39 -11 302 667 ;
-C 34 ; WX 420 ; N quotedbl ; B 144 421 432 666 ;
-C 35 ; WX 500 ; N numbersign ; B 2 0 540 676 ;
-C 36 ; WX 500 ; N dollar ; B 31 -89 497 731 ;
-C 37 ; WX 833 ; N percent ; B 79 -13 790 676 ;
-C 38 ; WX 778 ; N ampersand ; B 76 -18 723 666 ;
-C 39 ; WX 333 ; N quoteright ; B 151 436 290 666 ;
-C 40 ; WX 333 ; N parenleft ; B 42 -181 315 669 ;
-C 41 ; WX 333 ; N parenright ; B 16 -180 289 669 ;
-C 42 ; WX 500 ; N asterisk ; B 128 255 492 666 ;
-C 43 ; WX 675 ; N plus ; B 86 0 590 506 ;
-C 44 ; WX 250 ; N comma ; B -4 -129 135 101 ;
-C 45 ; WX 333 ; N hyphen ; B 49 192 282 255 ;
-C 46 ; WX 250 ; N period ; B 27 -11 138 100 ;
-C 47 ; WX 278 ; N slash ; B -65 -18 386 666 ;
-C 48 ; WX 500 ; N zero ; B 32 -7 497 676 ;
-C 49 ; WX 500 ; N one ; B 49 0 409 676 ;
-C 50 ; WX 500 ; N two ; B 12 0 452 676 ;
-C 51 ; WX 500 ; N three ; B 15 -7 465 676 ;
-C 52 ; WX 500 ; N four ; B 1 0 479 676 ;
-C 53 ; WX 500 ; N five ; B 15 -7 491 666 ;
-C 54 ; WX 500 ; N six ; B 30 -7 521 686 ;
-C 55 ; WX 500 ; N seven ; B 75 -8 537 666 ;
-C 56 ; WX 500 ; N eight ; B 30 -7 493 676 ;
-C 57 ; WX 500 ; N nine ; B 23 -17 492 676 ;
-C 58 ; WX 333 ; N colon ; B 50 -11 261 441 ;
-C 59 ; WX 333 ; N semicolon ; B 27 -129 261 441 ;
-C 60 ; WX 675 ; N less ; B 84 -8 592 514 ;
-C 61 ; WX 675 ; N equal ; B 86 120 590 386 ;
-C 62 ; WX 675 ; N greater ; B 84 -8 592 514 ;
-C 63 ; WX 500 ; N question ; B 132 -12 472 664 ;
-C 64 ; WX 920 ; N at ; B 118 -18 806 666 ;
-C 65 ; WX 611 ; N A ; B -51 0 564 668 ;
-C 66 ; WX 611 ; N B ; B -8 0 588 653 ;
-C 67 ; WX 667 ; N C ; B 66 -18 689 666 ;
-C 68 ; WX 722 ; N D ; B -8 0 700 653 ;
-C 69 ; WX 611 ; N E ; B -1 0 634 653 ;
-C 70 ; WX 611 ; N F ; B 8 0 645 653 ;
-C 71 ; WX 722 ; N G ; B 52 -18 722 666 ;
-C 72 ; WX 722 ; N H ; B -8 0 767 653 ;
-C 73 ; WX 333 ; N I ; B -8 0 384 653 ;
-C 74 ; WX 444 ; N J ; B -6 -18 491 653 ;
-C 75 ; WX 667 ; N K ; B 7 0 722 653 ;
-C 76 ; WX 556 ; N L ; B -8 0 559 653 ;
-C 77 ; WX 833 ; N M ; B -18 0 873 653 ;
-C 78 ; WX 667 ; N N ; B -20 -15 727 653 ;
-C 79 ; WX 722 ; N O ; B 60 -18 699 666 ;
-C 80 ; WX 611 ; N P ; B 0 0 605 653 ;
-C 81 ; WX 722 ; N Q ; B 59 -182 699 666 ;
-C 82 ; WX 611 ; N R ; B -13 0 588 653 ;
-C 83 ; WX 500 ; N S ; B 17 -18 508 667 ;
-C 84 ; WX 556 ; N T ; B 59 0 633 653 ;
-C 85 ; WX 722 ; N U ; B 102 -18 765 653 ;
-C 86 ; WX 611 ; N V ; B 76 -18 688 653 ;
-C 87 ; WX 833 ; N W ; B 71 -18 906 653 ;
-C 88 ; WX 611 ; N X ; B -29 0 655 653 ;
-C 89 ; WX 556 ; N Y ; B 78 0 633 653 ;
-C 90 ; WX 556 ; N Z ; B -6 0 606 653 ;
-C 91 ; WX 389 ; N bracketleft ; B 21 -153 391 663 ;
-C 92 ; WX 278 ; N backslash ; B -41 -18 319 666 ;
-C 93 ; WX 389 ; N bracketright ; B 12 -153 382 663 ;
-C 94 ; WX 422 ; N asciicircum ; B 0 301 422 666 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 333 ; N quoteleft ; B 171 436 310 666 ;
-C 97 ; WX 500 ; N a ; B 17 -11 476 441 ;
-C 98 ; WX 500 ; N b ; B 23 -11 473 683 ;
-C 99 ; WX 444 ; N c ; B 30 -11 425 441 ;
-C 100 ; WX 500 ; N d ; B 15 -13 527 683 ;
-C 101 ; WX 444 ; N e ; B 31 -11 412 441 ;
-C 102 ; WX 278 ; N f ; B -147 -207 424 678 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 8 -206 472 441 ;
-C 104 ; WX 500 ; N h ; B 19 -9 478 683 ;
-C 105 ; WX 278 ; N i ; B 49 -11 264 654 ;
-C 106 ; WX 278 ; N j ; B -124 -207 276 654 ;
-C 107 ; WX 444 ; N k ; B 14 -11 461 683 ;
-C 108 ; WX 278 ; N l ; B 41 -11 279 683 ;
-C 109 ; WX 722 ; N m ; B 12 -9 704 441 ;
-C 110 ; WX 500 ; N n ; B 14 -9 474 441 ;
-C 111 ; WX 500 ; N o ; B 27 -11 468 441 ;
-C 112 ; WX 500 ; N p ; B -75 -205 469 441 ;
-C 113 ; WX 500 ; N q ; B 25 -209 483 441 ;
-C 114 ; WX 389 ; N r ; B 45 0 412 441 ;
-C 115 ; WX 389 ; N s ; B 16 -13 366 442 ;
-C 116 ; WX 278 ; N t ; B 37 -11 296 546 ;
-C 117 ; WX 500 ; N u ; B 42 -11 475 441 ;
-C 118 ; WX 444 ; N v ; B 21 -18 426 441 ;
-C 119 ; WX 667 ; N w ; B 16 -18 648 441 ;
-C 120 ; WX 444 ; N x ; B -27 -11 447 441 ;
-C 121 ; WX 444 ; N y ; B -24 -206 426 441 ;
-C 122 ; WX 389 ; N z ; B -2 -81 380 428 ;
-C 123 ; WX 400 ; N braceleft ; B 51 -177 407 687 ;
-C 124 ; WX 275 ; N bar ; B 105 -18 171 666 ;
-C 125 ; WX 400 ; N braceright ; B -7 -177 349 687 ;
-C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ;
-C 161 ; WX 389 ; N exclamdown ; B 59 -205 322 473 ;
-C 162 ; WX 500 ; N cent ; B 77 -143 472 560 ;
-C 163 ; WX 500 ; N sterling ; B 10 -6 517 670 ;
-C 164 ; WX 167 ; N fraction ; B -169 -10 337 676 ;
-C 165 ; WX 500 ; N yen ; B 27 0 603 653 ;
-C 166 ; WX 500 ; N florin ; B 25 -182 507 682 ;
-C 167 ; WX 500 ; N section ; B 53 -162 461 666 ;
-C 168 ; WX 500 ; N currency ; B -22 53 522 597 ;
-C 169 ; WX 214 ; N quotesingle ; B 132 421 241 666 ;
-C 170 ; WX 556 ; N quotedblleft ; B 166 436 514 666 ;
-C 171 ; WX 500 ; N guillemotleft ; B 53 37 445 403 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 51 37 281 403 ;
-C 173 ; WX 333 ; N guilsinglright ; B 52 37 282 403 ;
-C 174 ; WX 500 ; N fi ; B -141 -207 481 681 ;
-C 175 ; WX 500 ; N fl ; B -141 -204 518 682 ;
-C 177 ; WX 500 ; N endash ; B -6 197 505 243 ;
-C 178 ; WX 500 ; N dagger ; B 101 -159 488 666 ;
-C 179 ; WX 500 ; N daggerdbl ; B 22 -143 491 666 ;
-C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ;
-C 182 ; WX 523 ; N paragraph ; B 55 -123 616 653 ;
-C 183 ; WX 350 ; N bullet ; B 40 191 310 461 ;
-C 184 ; WX 333 ; N quotesinglbase ; B 44 -129 183 101 ;
-C 185 ; WX 556 ; N quotedblbase ; B 57 -129 405 101 ;
-C 186 ; WX 556 ; N quotedblright ; B 151 436 499 666 ;
-C 187 ; WX 500 ; N guillemotright ; B 55 37 447 403 ;
-C 188 ; WX 889 ; N ellipsis ; B 57 -11 762 100 ;
-C 189 ; WX 1000 ; N perthousand ; B 25 -19 1010 706 ;
-C 191 ; WX 500 ; N questiondown ; B 28 -205 368 471 ;
-C 193 ; WX 333 ; N grave ; B 121 492 311 664 ;
-C 194 ; WX 333 ; N acute ; B 180 494 403 664 ;
-C 195 ; WX 333 ; N circumflex ; B 91 492 385 661 ;
-C 196 ; WX 333 ; N tilde ; B 100 517 427 624 ;
-C 197 ; WX 333 ; N macron ; B 99 532 411 583 ;
-C 198 ; WX 333 ; N breve ; B 117 492 418 650 ;
-C 199 ; WX 333 ; N dotaccent ; B 207 508 305 606 ;
-C 200 ; WX 333 ; N dieresis ; B 107 508 405 606 ;
-C 202 ; WX 333 ; N ring ; B 155 492 355 691 ;
-C 203 ; WX 333 ; N cedilla ; B -30 -217 182 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 93 494 486 664 ;
-C 206 ; WX 333 ; N ogonek ; B -20 -169 200 40 ;
-C 207 ; WX 333 ; N caron ; B 121 492 426 661 ;
-C 208 ; WX 889 ; N emdash ; B -6 197 894 243 ;
-C 225 ; WX 889 ; N AE ; B -27 0 911 653 ;
-C 227 ; WX 276 ; N ordfeminine ; B 42 406 352 676 ;
-C 232 ; WX 556 ; N Lslash ; B -8 0 559 653 ;
-C 233 ; WX 722 ; N Oslash ; B 60 -105 699 722 ;
-C 234 ; WX 944 ; N OE ; B 49 -8 964 666 ;
-C 235 ; WX 310 ; N ordmasculine ; B 67 406 362 676 ;
-C 241 ; WX 667 ; N ae ; B 23 -11 640 441 ;
-C 245 ; WX 278 ; N dotlessi ; B 49 -11 235 441 ;
-C 248 ; WX 278 ; N lslash ; B 37 -11 307 683 ;
-C 249 ; WX 500 ; N oslash ; B 28 -135 469 554 ;
-C 250 ; WX 667 ; N oe ; B 20 -12 646 441 ;
-C 251 ; WX 500 ; N germandbls ; B -168 -207 493 679 ;
-C -1 ; WX 556 ; N Zcaron ; B -6 0 606 873 ;
-C -1 ; WX 444 ; N ccedilla ; B 26 -217 425 441 ;
-C -1 ; WX 444 ; N ydieresis ; B -24 -206 441 606 ;
-C -1 ; WX 500 ; N atilde ; B 17 -11 511 624 ;
-C -1 ; WX 278 ; N icircumflex ; B 34 -11 328 661 ;
-C -1 ; WX 300 ; N threesuperior ; B 43 268 339 676 ;
-C -1 ; WX 444 ; N ecircumflex ; B 31 -11 441 661 ;
-C -1 ; WX 500 ; N thorn ; B -75 -205 469 683 ;
-C -1 ; WX 444 ; N egrave ; B 31 -11 412 664 ;
-C -1 ; WX 300 ; N twosuperior ; B 33 271 324 676 ;
-C -1 ; WX 444 ; N eacute ; B 31 -11 459 664 ;
-C -1 ; WX 500 ; N otilde ; B 27 -11 496 624 ;
-C -1 ; WX 611 ; N Aacute ; B -51 0 564 876 ;
-C -1 ; WX 500 ; N ocircumflex ; B 27 -11 468 661 ;
-C -1 ; WX 444 ; N yacute ; B -24 -206 459 664 ;
-C -1 ; WX 500 ; N udieresis ; B 42 -11 479 606 ;
-C -1 ; WX 750 ; N threequarters ; B 23 -10 736 676 ;
-C -1 ; WX 500 ; N acircumflex ; B 17 -11 476 661 ;
-C -1 ; WX 722 ; N Eth ; B -8 0 700 653 ;
-C -1 ; WX 444 ; N edieresis ; B 31 -11 451 606 ;
-C -1 ; WX 500 ; N ugrave ; B 42 -11 475 664 ;
-C -1 ; WX 980 ; N trademark ; B 30 247 957 653 ;
-C -1 ; WX 500 ; N ograve ; B 27 -11 468 664 ;
-C -1 ; WX 389 ; N scaron ; B 16 -13 454 661 ;
-C -1 ; WX 333 ; N Idieresis ; B -8 0 435 818 ;
-C -1 ; WX 500 ; N uacute ; B 42 -11 477 664 ;
-C -1 ; WX 500 ; N agrave ; B 17 -11 476 664 ;
-C -1 ; WX 500 ; N ntilde ; B 14 -9 476 624 ;
-C -1 ; WX 500 ; N aring ; B 17 -11 476 691 ;
-C -1 ; WX 389 ; N zcaron ; B -2 -81 434 661 ;
-C -1 ; WX 333 ; N Icircumflex ; B -8 0 425 873 ;
-C -1 ; WX 667 ; N Ntilde ; B -20 -15 727 836 ;
-C -1 ; WX 500 ; N ucircumflex ; B 42 -11 475 661 ;
-C -1 ; WX 611 ; N Ecircumflex ; B -1 0 634 873 ;
-C -1 ; WX 333 ; N Iacute ; B -8 0 413 876 ;
-C -1 ; WX 667 ; N Ccedilla ; B 66 -217 689 666 ;
-C -1 ; WX 722 ; N Odieresis ; B 60 -18 699 818 ;
-C -1 ; WX 500 ; N Scaron ; B 17 -18 520 873 ;
-C -1 ; WX 611 ; N Edieresis ; B -1 0 634 818 ;
-C -1 ; WX 333 ; N Igrave ; B -8 0 384 876 ;
-C -1 ; WX 500 ; N adieresis ; B 17 -11 489 606 ;
-C -1 ; WX 722 ; N Ograve ; B 60 -18 699 876 ;
-C -1 ; WX 611 ; N Egrave ; B -1 0 634 876 ;
-C -1 ; WX 556 ; N Ydieresis ; B 78 0 633 818 ;
-C -1 ; WX 760 ; N registered ; B 41 -18 719 666 ;
-C -1 ; WX 722 ; N Otilde ; B 60 -18 699 836 ;
-C -1 ; WX 750 ; N onequarter ; B 33 -10 736 676 ;
-C -1 ; WX 722 ; N Ugrave ; B 102 -18 765 876 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 102 -18 765 873 ;
-C -1 ; WX 611 ; N Thorn ; B 0 0 569 653 ;
-C -1 ; WX 675 ; N divide ; B 86 -11 590 517 ;
-C -1 ; WX 611 ; N Atilde ; B -51 0 566 836 ;
-C -1 ; WX 722 ; N Uacute ; B 102 -18 765 876 ;
-C -1 ; WX 722 ; N Ocircumflex ; B 60 -18 699 873 ;
-C -1 ; WX 675 ; N logicalnot ; B 86 108 590 386 ;
-C -1 ; WX 611 ; N Aring ; B -51 0 564 883 ;
-C -1 ; WX 278 ; N idieresis ; B 49 -11 353 606 ;
-C -1 ; WX 278 ; N iacute ; B 49 -11 356 664 ;
-C -1 ; WX 500 ; N aacute ; B 17 -11 487 664 ;
-C -1 ; WX 675 ; N plusminus ; B 86 0 590 506 ;
-C -1 ; WX 675 ; N multiply ; B 93 8 582 497 ;
-C -1 ; WX 722 ; N Udieresis ; B 102 -18 765 818 ;
-C -1 ; WX 675 ; N minus ; B 86 220 590 286 ;
-C -1 ; WX 300 ; N onesuperior ; B 43 271 284 676 ;
-C -1 ; WX 611 ; N Eacute ; B -1 0 634 876 ;
-C -1 ; WX 611 ; N Acircumflex ; B -51 0 564 873 ;
-C -1 ; WX 760 ; N copyright ; B 41 -18 719 666 ;
-C -1 ; WX 611 ; N Agrave ; B -51 0 564 876 ;
-C -1 ; WX 500 ; N odieresis ; B 27 -11 489 606 ;
-C -1 ; WX 500 ; N oacute ; B 27 -11 487 664 ;
-C -1 ; WX 400 ; N degree ; B 101 390 387 676 ;
-C -1 ; WX 278 ; N igrave ; B 49 -11 284 664 ;
-C -1 ; WX 500 ; N mu ; B -30 -209 497 428 ;
-C -1 ; WX 722 ; N Oacute ; B 60 -18 699 876 ;
-C -1 ; WX 500 ; N eth ; B 27 -11 482 683 ;
-C -1 ; WX 611 ; N Adieresis ; B -51 0 564 818 ;
-C -1 ; WX 556 ; N Yacute ; B 78 0 633 876 ;
-C -1 ; WX 275 ; N brokenbar ; B 105 -18 171 666 ;
-C -1 ; WX 750 ; N onehalf ; B 34 -10 749 676 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 283
-
-KPX A y -55
-KPX A w -55
-KPX A v -55
-KPX A u -20
-KPX A quoteright -37
-KPX A quotedblright 0
-KPX A p 0
-KPX A Y -55
-KPX A W -95
-KPX A V -105
-KPX A U -50
-KPX A T -37
-KPX A Q -40
-KPX A O -40
-KPX A G -35
-KPX A C -30
-
-KPX B period 0
-KPX B comma 0
-KPX B U -10
-KPX B A -25
-
-KPX D period 0
-KPX D comma 0
-KPX D Y -40
-KPX D W -40
-KPX D V -40
-KPX D A -35
-
-KPX F r -55
-KPX F period -135
-KPX F o -105
-KPX F i -45
-KPX F e -75
-KPX F comma -135
-KPX F a -75
-KPX F A -115
-
-KPX G period 0
-KPX G comma 0
-
-KPX J u -35
-KPX J period -25
-KPX J o -25
-KPX J e -25
-KPX J comma -25
-KPX J a -35
-KPX J A -40
-
-KPX K y -40
-KPX K u -40
-KPX K o -40
-KPX K e -35
-KPX K O -50
-
-KPX L y -30
-KPX L quoteright -37
-KPX L quotedblright 0
-KPX L Y -20
-KPX L W -55
-KPX L V -55
-KPX L T -20
-
-KPX N period 0
-KPX N comma 0
-KPX N A -27
-
-KPX O period 0
-KPX O comma 0
-KPX O Y -50
-KPX O X -40
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -55
-
-KPX P period -135
-KPX P o -80
-KPX P e -80
-KPX P comma -135
-KPX P a -80
-KPX P A -90
-
-KPX Q period 0
-KPX Q comma 0
-KPX Q U -10
-
-KPX R Y -18
-KPX R W -18
-KPX R V -18
-KPX R U -40
-KPX R T 0
-KPX R O -40
-
-KPX S period 0
-KPX S comma 0
-
-KPX T y -74
-KPX T w -74
-KPX T u -55
-KPX T semicolon -65
-KPX T r -55
-KPX T period -74
-KPX T o -92
-KPX T i -55
-KPX T hyphen -74
-KPX T h 0
-KPX T e -92
-KPX T comma -74
-KPX T colon -55
-KPX T a -92
-KPX T O -18
-KPX T A -50
-
-KPX U period -25
-KPX U comma -25
-KPX U A -40
-
-KPX V u -74
-KPX V semicolon -74
-KPX V period -129
-KPX V o -111
-KPX V i -74
-KPX V hyphen -55
-KPX V e -111
-KPX V comma -129
-KPX V colon -65
-KPX V a -111
-KPX V O -30
-KPX V G 0
-KPX V A -60
-
-KPX W y -70
-KPX W u -55
-KPX W semicolon -65
-KPX W period -92
-KPX W o -92
-KPX W i -55
-KPX W hyphen -37
-KPX W h 0
-KPX W e -92
-KPX W comma -92
-KPX W colon -65
-KPX W a -92
-KPX W O -25
-KPX W A -60
-
-KPX Y u -92
-KPX Y semicolon -65
-KPX Y period -92
-KPX Y o -92
-KPX Y i -74
-KPX Y hyphen -74
-KPX Y e -92
-KPX Y comma -92
-KPX Y colon -65
-KPX Y a -92
-KPX Y O -15
-KPX Y A -50
-
-KPX a y 0
-KPX a w 0
-KPX a v 0
-KPX a t 0
-KPX a p 0
-KPX a g -10
-KPX a b 0
-
-KPX b y 0
-KPX b v 0
-KPX b u -20
-KPX b period -40
-KPX b l 0
-KPX b comma 0
-KPX b b 0
-
-KPX c y 0
-KPX c period 0
-KPX c l 0
-KPX c k -20
-KPX c h -15
-KPX c comma 0
-
-KPX colon space 0
-
-KPX comma space 0
-KPX comma quoteright -140
-KPX comma quotedblright -140
-
-KPX d y 0
-KPX d w 0
-KPX d v 0
-KPX d period 0
-KPX d d 0
-KPX d comma 0
-
-KPX e y -30
-KPX e x -20
-KPX e w -15
-KPX e v -15
-KPX e period -15
-KPX e p 0
-KPX e g -40
-KPX e comma -10
-KPX e b 0
-
-KPX f quoteright 92
-KPX f quotedblright 0
-KPX f period -15
-KPX f o 0
-KPX f l 0
-KPX f i -20
-KPX f f -18
-KPX f e 0
-KPX f dotlessi -60
-KPX f comma -10
-KPX f a 0
-
-KPX g y 0
-KPX g r 0
-KPX g period -15
-KPX g o 0
-KPX g i 0
-KPX g g -10
-KPX g e -10
-KPX g comma -10
-KPX g a 0
-
-KPX h y 0
-
-KPX i v 0
-
-KPX k y -10
-KPX k o -10
-KPX k e -10
-
-KPX l y 0
-KPX l w 0
-
-KPX m y 0
-KPX m u 0
-
-KPX n y 0
-KPX n v -40
-KPX n u 0
-
-KPX o y 0
-KPX o x 0
-KPX o w 0
-KPX o v -10
-KPX o g -10
-
-KPX p y 0
-
-KPX period quoteright -140
-KPX period quotedblright -140
-
-KPX quotedblleft quoteleft 0
-KPX quotedblleft A 0
-
-KPX quotedblright space 0
-
-KPX quoteleft quoteleft -111
-KPX quoteleft A 0
-
-KPX quoteright v -10
-KPX quoteright t -30
-KPX quoteright space -111
-KPX quoteright s -40
-KPX quoteright r -25
-KPX quoteright quoteright -111
-KPX quoteright quotedblright 0
-KPX quoteright l 0
-KPX quoteright d -25
-
-KPX r y 0
-KPX r v 0
-KPX r u 0
-KPX r t 0
-KPX r s -10
-KPX r r 0
-KPX r q -37
-KPX r period -111
-KPX r p 0
-KPX r o -45
-KPX r n 0
-KPX r m 0
-KPX r l 0
-KPX r k 0
-KPX r i 0
-KPX r hyphen -20
-KPX r g -37
-KPX r e -37
-KPX r d -37
-KPX r comma -111
-KPX r c -37
-KPX r a -15
-
-KPX s w 0
-
-KPX space quoteleft 0
-KPX space quotedblleft 0
-KPX space Y -75
-KPX space W -40
-KPX space V -35
-KPX space T -18
-KPX space A -18
-
-KPX v period -74
-KPX v o 0
-KPX v e 0
-KPX v comma -74
-KPX v a 0
-
-KPX w period -74
-KPX w o 0
-KPX w h 0
-KPX w e 0
-KPX w comma -74
-KPX w a 0
-
-KPX x e 0
-
-KPX y period -55
-KPX y o 0
-KPX y e 0
-KPX y comma -55
-KPX y a 0
-
-KPX z o 0
-KPX z e 0
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 139 212 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 144 212 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 139 212 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 149 212 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 129 192 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 139 212 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 149 212 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 169 212 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 159 212 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 149 212 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 10 212 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 40 212 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 30 212 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 10 212 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 177 212 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 195 212 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 230 212 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 230 212 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 205 212 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 212 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 94 212 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 212 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 215 212 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 225 212 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 215 212 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 132 212 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 142 212 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 112 212 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 84 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 84 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 84 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 84 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 84 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 46 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -47 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -57 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -52 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 49 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 74 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 69 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 74 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 74 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 74 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 36 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 8 0 ;
-EndComposites
-EndFontMetrics
diff --git a/config/psfonts/Times-Roman.afm b/config/psfonts/Times-Roman.afm
deleted file mode 100644 (file)
index e5092b5..0000000
+++ /dev/null
@@ -1,648 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Mar 20 12:15:44 1990
-Comment UniqueID 28416
-Comment VMusage 30487 37379
-FontName Times-Roman
-FullName Times Roman
-FamilyName Times
-Weight Roman
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -168 -218 1000 898
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 662
-XHeight 450
-Ascender 683
-Descender -217
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 130 -9 238 676 ;
-C 34 ; WX 408 ; N quotedbl ; B 77 431 331 676 ;
-C 35 ; WX 500 ; N numbersign ; B 5 0 496 662 ;
-C 36 ; WX 500 ; N dollar ; B 44 -87 457 727 ;
-C 37 ; WX 833 ; N percent ; B 61 -13 772 676 ;
-C 38 ; WX 778 ; N ampersand ; B 42 -13 750 676 ;
-C 39 ; WX 333 ; N quoteright ; B 79 433 218 676 ;
-C 40 ; WX 333 ; N parenleft ; B 48 -177 304 676 ;
-C 41 ; WX 333 ; N parenright ; B 29 -177 285 676 ;
-C 42 ; WX 500 ; N asterisk ; B 69 265 432 676 ;
-C 43 ; WX 564 ; N plus ; B 30 0 534 506 ;
-C 44 ; WX 250 ; N comma ; B 56 -141 195 102 ;
-C 45 ; WX 333 ; N hyphen ; B 39 194 285 257 ;
-C 46 ; WX 250 ; N period ; B 70 -11 181 100 ;
-C 47 ; WX 278 ; N slash ; B -9 -14 287 676 ;
-C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ;
-C 49 ; WX 500 ; N one ; B 111 0 394 676 ;
-C 50 ; WX 500 ; N two ; B 30 0 475 676 ;
-C 51 ; WX 500 ; N three ; B 43 -14 431 676 ;
-C 52 ; WX 500 ; N four ; B 12 0 472 676 ;
-C 53 ; WX 500 ; N five ; B 32 -14 438 688 ;
-C 54 ; WX 500 ; N six ; B 34 -14 468 684 ;
-C 55 ; WX 500 ; N seven ; B 20 -8 449 662 ;
-C 56 ; WX 500 ; N eight ; B 56 -14 445 676 ;
-C 57 ; WX 500 ; N nine ; B 30 -22 459 676 ;
-C 58 ; WX 278 ; N colon ; B 81 -11 192 459 ;
-C 59 ; WX 278 ; N semicolon ; B 80 -141 219 459 ;
-C 60 ; WX 564 ; N less ; B 28 -8 536 514 ;
-C 61 ; WX 564 ; N equal ; B 30 120 534 386 ;
-C 62 ; WX 564 ; N greater ; B 28 -8 536 514 ;
-C 63 ; WX 444 ; N question ; B 68 -8 414 676 ;
-C 64 ; WX 921 ; N at ; B 116 -14 809 676 ;
-C 65 ; WX 722 ; N A ; B 15 0 706 674 ;
-C 66 ; WX 667 ; N B ; B 17 0 593 662 ;
-C 67 ; WX 667 ; N C ; B 28 -14 633 676 ;
-C 68 ; WX 722 ; N D ; B 16 0 685 662 ;
-C 69 ; WX 611 ; N E ; B 12 0 597 662 ;
-C 70 ; WX 556 ; N F ; B 12 0 546 662 ;
-C 71 ; WX 722 ; N G ; B 32 -14 709 676 ;
-C 72 ; WX 722 ; N H ; B 19 0 702 662 ;
-C 73 ; WX 333 ; N I ; B 18 0 315 662 ;
-C 74 ; WX 389 ; N J ; B 10 -14 370 662 ;
-C 75 ; WX 722 ; N K ; B 34 0 723 662 ;
-C 76 ; WX 611 ; N L ; B 12 0 598 662 ;
-C 77 ; WX 889 ; N M ; B 12 0 863 662 ;
-C 78 ; WX 722 ; N N ; B 12 -11 707 662 ;
-C 79 ; WX 722 ; N O ; B 34 -14 688 676 ;
-C 80 ; WX 556 ; N P ; B 16 0 542 662 ;
-C 81 ; WX 722 ; N Q ; B 34 -178 701 676 ;
-C 82 ; WX 667 ; N R ; B 17 0 659 662 ;
-C 83 ; WX 556 ; N S ; B 42 -14 491 676 ;
-C 84 ; WX 611 ; N T ; B 17 0 593 662 ;
-C 85 ; WX 722 ; N U ; B 14 -14 705 662 ;
-C 86 ; WX 722 ; N V ; B 16 -11 697 662 ;
-C 87 ; WX 944 ; N W ; B 5 -11 932 662 ;
-C 88 ; WX 722 ; N X ; B 10 0 704 662 ;
-C 89 ; WX 722 ; N Y ; B 22 0 703 662 ;
-C 90 ; WX 611 ; N Z ; B 9 0 597 662 ;
-C 91 ; WX 333 ; N bracketleft ; B 88 -156 299 662 ;
-C 92 ; WX 278 ; N backslash ; B -9 -14 287 676 ;
-C 93 ; WX 333 ; N bracketright ; B 34 -156 245 662 ;
-C 94 ; WX 469 ; N asciicircum ; B 24 297 446 662 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 333 ; N quoteleft ; B 115 433 254 676 ;
-C 97 ; WX 444 ; N a ; B 37 -10 442 460 ;
-C 98 ; WX 500 ; N b ; B 3 -10 468 683 ;
-C 99 ; WX 444 ; N c ; B 25 -10 412 460 ;
-C 100 ; WX 500 ; N d ; B 27 -10 491 683 ;
-C 101 ; WX 444 ; N e ; B 25 -10 424 460 ;
-C 102 ; WX 333 ; N f ; B 20 0 383 683 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 28 -218 470 460 ;
-C 104 ; WX 500 ; N h ; B 9 0 487 683 ;
-C 105 ; WX 278 ; N i ; B 16 0 253 683 ;
-C 106 ; WX 278 ; N j ; B -70 -218 194 683 ;
-C 107 ; WX 500 ; N k ; B 7 0 505 683 ;
-C 108 ; WX 278 ; N l ; B 19 0 257 683 ;
-C 109 ; WX 778 ; N m ; B 16 0 775 460 ;
-C 110 ; WX 500 ; N n ; B 16 0 485 460 ;
-C 111 ; WX 500 ; N o ; B 29 -10 470 460 ;
-C 112 ; WX 500 ; N p ; B 5 -217 470 460 ;
-C 113 ; WX 500 ; N q ; B 24 -217 488 460 ;
-C 114 ; WX 333 ; N r ; B 5 0 335 460 ;
-C 115 ; WX 389 ; N s ; B 51 -10 348 460 ;
-C 116 ; WX 278 ; N t ; B 13 -10 279 579 ;
-C 117 ; WX 500 ; N u ; B 9 -10 479 450 ;
-C 118 ; WX 500 ; N v ; B 19 -14 477 450 ;
-C 119 ; WX 722 ; N w ; B 21 -14 694 450 ;
-C 120 ; WX 500 ; N x ; B 17 0 479 450 ;
-C 121 ; WX 500 ; N y ; B 14 -218 475 450 ;
-C 122 ; WX 444 ; N z ; B 27 0 418 450 ;
-C 123 ; WX 480 ; N braceleft ; B 100 -181 350 680 ;
-C 124 ; WX 200 ; N bar ; B 67 -14 133 676 ;
-C 125 ; WX 480 ; N braceright ; B 130 -181 380 680 ;
-C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ;
-C 161 ; WX 333 ; N exclamdown ; B 97 -218 205 467 ;
-C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ;
-C 163 ; WX 500 ; N sterling ; B 12 -8 490 676 ;
-C 164 ; WX 167 ; N fraction ; B -168 -14 331 676 ;
-C 165 ; WX 500 ; N yen ; B -53 0 512 662 ;
-C 166 ; WX 500 ; N florin ; B 7 -189 490 676 ;
-C 167 ; WX 500 ; N section ; B 70 -148 426 676 ;
-C 168 ; WX 500 ; N currency ; B -22 58 522 602 ;
-C 169 ; WX 180 ; N quotesingle ; B 48 431 133 676 ;
-C 170 ; WX 444 ; N quotedblleft ; B 43 433 414 676 ;
-C 171 ; WX 500 ; N guillemotleft ; B 42 33 456 416 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 63 33 285 416 ;
-C 173 ; WX 333 ; N guilsinglright ; B 48 33 270 416 ;
-C 174 ; WX 556 ; N fi ; B 31 0 521 683 ;
-C 175 ; WX 556 ; N fl ; B 32 0 521 683 ;
-C 177 ; WX 500 ; N endash ; B 0 201 500 250 ;
-C 178 ; WX 500 ; N dagger ; B 59 -149 442 676 ;
-C 179 ; WX 500 ; N daggerdbl ; B 58 -153 442 676 ;
-C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ;
-C 182 ; WX 453 ; N paragraph ; B -22 -154 450 662 ;
-C 183 ; WX 350 ; N bullet ; B 40 196 310 466 ;
-C 184 ; WX 333 ; N quotesinglbase ; B 79 -141 218 102 ;
-C 185 ; WX 444 ; N quotedblbase ; B 45 -141 416 102 ;
-C 186 ; WX 444 ; N quotedblright ; B 30 433 401 676 ;
-C 187 ; WX 500 ; N guillemotright ; B 44 33 458 416 ;
-C 188 ; WX 1000 ; N ellipsis ; B 111 -11 888 100 ;
-C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 706 ;
-C 191 ; WX 444 ; N questiondown ; B 30 -218 376 466 ;
-C 193 ; WX 333 ; N grave ; B 19 507 242 678 ;
-C 194 ; WX 333 ; N acute ; B 93 507 317 678 ;
-C 195 ; WX 333 ; N circumflex ; B 11 507 322 674 ;
-C 196 ; WX 333 ; N tilde ; B 1 532 331 638 ;
-C 197 ; WX 333 ; N macron ; B 11 547 322 601 ;
-C 198 ; WX 333 ; N breve ; B 26 507 307 664 ;
-C 199 ; WX 333 ; N dotaccent ; B 118 523 216 623 ;
-C 200 ; WX 333 ; N dieresis ; B 18 523 315 623 ;
-C 202 ; WX 333 ; N ring ; B 67 512 266 711 ;
-C 203 ; WX 333 ; N cedilla ; B 52 -215 261 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B -3 507 377 678 ;
-C 206 ; WX 333 ; N ogonek ; B 64 -165 249 0 ;
-C 207 ; WX 333 ; N caron ; B 11 507 322 674 ;
-C 208 ; WX 1000 ; N emdash ; B 0 201 1000 250 ;
-C 225 ; WX 889 ; N AE ; B 0 0 863 662 ;
-C 227 ; WX 276 ; N ordfeminine ; B 4 394 270 676 ;
-C 232 ; WX 611 ; N Lslash ; B 12 0 598 662 ;
-C 233 ; WX 722 ; N Oslash ; B 34 -80 688 734 ;
-C 234 ; WX 889 ; N OE ; B 30 -6 885 668 ;
-C 235 ; WX 310 ; N ordmasculine ; B 6 394 304 676 ;
-C 241 ; WX 667 ; N ae ; B 38 -10 632 460 ;
-C 245 ; WX 278 ; N dotlessi ; B 16 0 253 460 ;
-C 248 ; WX 278 ; N lslash ; B 19 0 259 683 ;
-C 249 ; WX 500 ; N oslash ; B 29 -112 470 551 ;
-C 250 ; WX 722 ; N oe ; B 30 -10 690 460 ;
-C 251 ; WX 500 ; N germandbls ; B 12 -9 468 683 ;
-C -1 ; WX 611 ; N Zcaron ; B 9 0 597 886 ;
-C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 460 ;
-C -1 ; WX 500 ; N ydieresis ; B 14 -218 475 623 ;
-C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ;
-C -1 ; WX 278 ; N icircumflex ; B -16 0 295 674 ;
-C -1 ; WX 300 ; N threesuperior ; B 15 262 291 676 ;
-C -1 ; WX 444 ; N ecircumflex ; B 25 -10 424 674 ;
-C -1 ; WX 500 ; N thorn ; B 5 -217 470 683 ;
-C -1 ; WX 444 ; N egrave ; B 25 -10 424 678 ;
-C -1 ; WX 300 ; N twosuperior ; B 1 270 296 676 ;
-C -1 ; WX 444 ; N eacute ; B 25 -10 424 678 ;
-C -1 ; WX 500 ; N otilde ; B 29 -10 470 638 ;
-C -1 ; WX 722 ; N Aacute ; B 15 0 706 890 ;
-C -1 ; WX 500 ; N ocircumflex ; B 29 -10 470 674 ;
-C -1 ; WX 500 ; N yacute ; B 14 -218 475 678 ;
-C -1 ; WX 500 ; N udieresis ; B 9 -10 479 623 ;
-C -1 ; WX 750 ; N threequarters ; B 15 -14 718 676 ;
-C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ;
-C -1 ; WX 722 ; N Eth ; B 16 0 685 662 ;
-C -1 ; WX 444 ; N edieresis ; B 25 -10 424 623 ;
-C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ;
-C -1 ; WX 980 ; N trademark ; B 30 256 957 662 ;
-C -1 ; WX 500 ; N ograve ; B 29 -10 470 678 ;
-C -1 ; WX 389 ; N scaron ; B 39 -10 350 674 ;
-C -1 ; WX 333 ; N Idieresis ; B 18 0 315 835 ;
-C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ;
-C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ;
-C -1 ; WX 500 ; N ntilde ; B 16 0 485 638 ;
-C -1 ; WX 444 ; N aring ; B 37 -10 442 711 ;
-C -1 ; WX 444 ; N zcaron ; B 27 0 418 674 ;
-C -1 ; WX 333 ; N Icircumflex ; B 11 0 322 886 ;
-C -1 ; WX 722 ; N Ntilde ; B 12 -11 707 850 ;
-C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ;
-C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 886 ;
-C -1 ; WX 333 ; N Iacute ; B 18 0 317 890 ;
-C -1 ; WX 667 ; N Ccedilla ; B 28 -215 633 676 ;
-C -1 ; WX 722 ; N Odieresis ; B 34 -14 688 835 ;
-C -1 ; WX 556 ; N Scaron ; B 42 -14 491 886 ;
-C -1 ; WX 611 ; N Edieresis ; B 12 0 597 835 ;
-C -1 ; WX 333 ; N Igrave ; B 18 0 315 890 ;
-C -1 ; WX 444 ; N adieresis ; B 37 -10 442 623 ;
-C -1 ; WX 722 ; N Ograve ; B 34 -14 688 890 ;
-C -1 ; WX 611 ; N Egrave ; B 12 0 597 890 ;
-C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 835 ;
-C -1 ; WX 760 ; N registered ; B 38 -14 722 676 ;
-C -1 ; WX 722 ; N Otilde ; B 34 -14 688 850 ;
-C -1 ; WX 750 ; N onequarter ; B 37 -14 718 676 ;
-C -1 ; WX 722 ; N Ugrave ; B 14 -14 705 890 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 14 -14 705 886 ;
-C -1 ; WX 556 ; N Thorn ; B 16 0 542 662 ;
-C -1 ; WX 564 ; N divide ; B 30 -10 534 516 ;
-C -1 ; WX 722 ; N Atilde ; B 15 0 706 850 ;
-C -1 ; WX 722 ; N Uacute ; B 14 -14 705 890 ;
-C -1 ; WX 722 ; N Ocircumflex ; B 34 -14 688 886 ;
-C -1 ; WX 564 ; N logicalnot ; B 30 108 534 386 ;
-C -1 ; WX 722 ; N Aring ; B 15 0 706 898 ;
-C -1 ; WX 278 ; N idieresis ; B -9 0 288 623 ;
-C -1 ; WX 278 ; N iacute ; B 16 0 290 678 ;
-C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ;
-C -1 ; WX 564 ; N plusminus ; B 30 0 534 506 ;
-C -1 ; WX 564 ; N multiply ; B 38 8 527 497 ;
-C -1 ; WX 722 ; N Udieresis ; B 14 -14 705 835 ;
-C -1 ; WX 564 ; N minus ; B 30 220 534 286 ;
-C -1 ; WX 300 ; N onesuperior ; B 57 270 248 676 ;
-C -1 ; WX 611 ; N Eacute ; B 12 0 597 890 ;
-C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 886 ;
-C -1 ; WX 760 ; N copyright ; B 38 -14 722 676 ;
-C -1 ; WX 722 ; N Agrave ; B 15 0 706 890 ;
-C -1 ; WX 500 ; N odieresis ; B 29 -10 470 623 ;
-C -1 ; WX 500 ; N oacute ; B 29 -10 470 678 ;
-C -1 ; WX 400 ; N degree ; B 57 390 343 676 ;
-C -1 ; WX 278 ; N igrave ; B -8 0 253 678 ;
-C -1 ; WX 500 ; N mu ; B 36 -218 512 450 ;
-C -1 ; WX 722 ; N Oacute ; B 34 -14 688 890 ;
-C -1 ; WX 500 ; N eth ; B 29 -10 471 686 ;
-C -1 ; WX 722 ; N Adieresis ; B 15 0 706 835 ;
-C -1 ; WX 722 ; N Yacute ; B 22 0 703 890 ;
-C -1 ; WX 200 ; N brokenbar ; B 67 -14 133 676 ;
-C -1 ; WX 750 ; N onehalf ; B 31 -14 746 676 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 283
-
-KPX A y -92
-KPX A w -92
-KPX A v -74
-KPX A u 0
-KPX A quoteright -111
-KPX A quotedblright 0
-KPX A p 0
-KPX A Y -105
-KPX A W -90
-KPX A V -135
-KPX A U -55
-KPX A T -111
-KPX A Q -55
-KPX A O -55
-KPX A G -40
-KPX A C -40
-
-KPX B period 0
-KPX B comma 0
-KPX B U -10
-KPX B A -35
-
-KPX D period 0
-KPX D comma 0
-KPX D Y -55
-KPX D W -30
-KPX D V -40
-KPX D A -40
-
-KPX F r 0
-KPX F period -80
-KPX F o -15
-KPX F i 0
-KPX F e 0
-KPX F comma -80
-KPX F a -15
-KPX F A -74
-
-KPX G period 0
-KPX G comma 0
-
-KPX J u 0
-KPX J period 0
-KPX J o 0
-KPX J e 0
-KPX J comma 0
-KPX J a 0
-KPX J A -60
-
-KPX K y -25
-KPX K u -15
-KPX K o -35
-KPX K e -25
-KPX K O -30
-
-KPX L y -55
-KPX L quoteright -92
-KPX L quotedblright 0
-KPX L Y -100
-KPX L W -74
-KPX L V -100
-KPX L T -92
-
-KPX N period 0
-KPX N comma 0
-KPX N A -35
-
-KPX O period 0
-KPX O comma 0
-KPX O Y -50
-KPX O X -40
-KPX O W -35
-KPX O V -50
-KPX O T -40
-KPX O A -35
-
-KPX P period -111
-KPX P o 0
-KPX P e 0
-KPX P comma -111
-KPX P a -15
-KPX P A -92
-
-KPX Q period 0
-KPX Q comma 0
-KPX Q U -10
-
-KPX R Y -65
-KPX R W -55
-KPX R V -80
-KPX R U -40
-KPX R T -60
-KPX R O -40
-
-KPX S period 0
-KPX S comma 0
-
-KPX T y -80
-KPX T w -80
-KPX T u -45
-KPX T semicolon -55
-KPX T r -35
-KPX T period -74
-KPX T o -80
-KPX T i -35
-KPX T hyphen -92
-KPX T h 0
-KPX T e -70
-KPX T comma -74
-KPX T colon -50
-KPX T a -80
-KPX T O -18
-KPX T A -93
-
-KPX U period 0
-KPX U comma 0
-KPX U A -40
-
-KPX V u -75
-KPX V semicolon -74
-KPX V period -129
-KPX V o -129
-KPX V i -60
-KPX V hyphen -100
-KPX V e -111
-KPX V comma -129
-KPX V colon -74
-KPX V a -111
-KPX V O -40
-KPX V G -15
-KPX V A -135
-
-KPX W y -73
-KPX W u -50
-KPX W semicolon -37
-KPX W period -92
-KPX W o -80
-KPX W i -40
-KPX W hyphen -65
-KPX W h 0
-KPX W e -80
-KPX W comma -92
-KPX W colon -37
-KPX W a -80
-KPX W O -10
-KPX W A -120
-
-KPX Y u -111
-KPX Y semicolon -92
-KPX Y period -129
-KPX Y o -110
-KPX Y i -55
-KPX Y hyphen -111
-KPX Y e -100
-KPX Y comma -129
-KPX Y colon -92
-KPX Y a -100
-KPX Y O -30
-KPX Y A -120
-
-KPX a y 0
-KPX a w -15
-KPX a v -20
-KPX a t 0
-KPX a p 0
-KPX a g 0
-KPX a b 0
-
-KPX b y 0
-KPX b v -15
-KPX b u -20
-KPX b period -40
-KPX b l 0
-KPX b comma 0
-KPX b b 0
-
-KPX c y -15
-KPX c period 0
-KPX c l 0
-KPX c k 0
-KPX c h 0
-KPX c comma 0
-
-KPX colon space 0
-
-KPX comma space 0
-KPX comma quoteright -70
-KPX comma quotedblright -70
-
-KPX d y 0
-KPX d w 0
-KPX d v 0
-KPX d period 0
-KPX d d 0
-KPX d comma 0
-
-KPX e y -15
-KPX e x -15
-KPX e w -25
-KPX e v -25
-KPX e period 0
-KPX e p 0
-KPX e g -15
-KPX e comma 0
-KPX e b 0
-
-KPX f quoteright 55
-KPX f quotedblright 0
-KPX f period 0
-KPX f o 0
-KPX f l 0
-KPX f i -20
-KPX f f -25
-KPX f e 0
-KPX f dotlessi -50
-KPX f comma 0
-KPX f a -10
-
-KPX g y 0
-KPX g r 0
-KPX g period 0
-KPX g o 0
-KPX g i 0
-KPX g g 0
-KPX g e 0
-KPX g comma 0
-KPX g a -5
-
-KPX h y -5
-
-KPX i v -25
-
-KPX k y -15
-KPX k o -10
-KPX k e -10
-
-KPX l y 0
-KPX l w -10
-
-KPX m y 0
-KPX m u 0
-
-KPX n y -15
-KPX n v -40
-KPX n u 0
-
-KPX o y -10
-KPX o x 0
-KPX o w -25
-KPX o v -15
-KPX o g 0
-
-KPX p y -10
-
-KPX period quoteright -70
-KPX period quotedblright -70
-
-KPX quotedblleft quoteleft 0
-KPX quotedblleft A -80
-
-KPX quotedblright space 0
-
-KPX quoteleft quoteleft -74
-KPX quoteleft A -80
-
-KPX quoteright v -50
-KPX quoteright t -18
-KPX quoteright space -74
-KPX quoteright s -55
-KPX quoteright r -50
-KPX quoteright quoteright -74
-KPX quoteright quotedblright 0
-KPX quoteright l -10
-KPX quoteright d -50
-
-KPX r y 0
-KPX r v 0
-KPX r u 0
-KPX r t 0
-KPX r s 0
-KPX r r 0
-KPX r q 0
-KPX r period -55
-KPX r p 0
-KPX r o 0
-KPX r n 0
-KPX r m 0
-KPX r l 0
-KPX r k 0
-KPX r i 0
-KPX r hyphen -20
-KPX r g -18
-KPX r e 0
-KPX r d 0
-KPX r comma -40
-KPX r c 0
-KPX r a 0
-
-KPX s w 0
-
-KPX space quoteleft 0
-KPX space quotedblleft 0
-KPX space Y -90
-KPX space W -30
-KPX space V -50
-KPX space T -18
-KPX space A -55
-
-KPX v period -65
-KPX v o -20
-KPX v e -15
-KPX v comma -65
-KPX v a -25
-
-KPX w period -65
-KPX w o -10
-KPX w h 0
-KPX w e 0
-KPX w comma -65
-KPX w a -10
-
-KPX x e -15
-
-KPX y period -65
-KPX y o 0
-KPX y e 0
-KPX y comma -65
-KPX y a 0
-
-KPX z o 0
-KPX z e 0
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 212 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 212 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 212 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 212 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 185 187 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 212 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 212 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 212 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 212 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 212 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 212 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 212 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 212 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 212 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 195 212 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 195 212 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 195 212 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 195 212 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 195 212 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 195 212 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 212 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 212 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 195 212 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 195 212 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 195 212 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 195 212 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 195 212 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 212 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 56 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 56 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 56 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 56 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 56 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 56 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 56 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 84 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 84 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 84 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 56 0 ;
-EndComposites
-EndFontMetrics
index 95dfc66f454604b1ee3c0a8d084511675a1860c5..40626e809c03740b40168614ea002365df710ff6 100644 (file)
@@ -1,9 +1,10 @@
 dnl Process this file with autoconf to produce a configure script.
 
 dnl Initialize.
-AC_PREREQ(2.60)
-AC_INIT([pspp],[0.7.2],[bug-gnu-pspp@gnu.org])
+AC_PREREQ(2.63)
+AC_INIT([GNU PSPP], [0.7.4], [bug-gnu-pspp@gnu.org], [pspp])
 AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_TESTDIR([tests])
 AM_INIT_AUTOMAKE
 
 dnl Checks for programs.
@@ -31,36 +32,59 @@ PSPP_CC_FOR_BUILD
 PSPP_PERL
 
 dnl Internationalization macros.
-AC_ARG_ENABLE(nls, [AS_HELP_STRING([--disable-nls], [do not use Native Language Support])])
-if  test x"$enable_nls" != x"no"  ; then
- AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.])
+AC_PROVIDE([AM_PO_SUBDIRS])    # PSPP provides its own po/ support.
+AM_GNU_GETTEXT([external], [need-ngettext])
+AM_GNU_GETTEXT_VERSION([0.17])
+if test -n "$LIBINTL"; then
+  AC_DEFINE([DEPENDS_ON_LIBINTL], [1], 
+    [Define to 1 if libintl is a separate library, not integrated into libc])
 fi
 
-
 dnl Checks for libraries.
 AC_SYS_LARGEFILE
 AC_SEARCH_LIBS([sin], [m])
-PSPP_LIBPLOT
+AC_SEARCH_LIBS([dcgettext], [intl])
 PSPP_LC_PAPER
-AM_CONDITIONAL(WITHCHARTS, test x"$with_libplot" != x"no")
 
 
 AC_ARG_VAR([PSPP_LDFLAGS], [linker flags to be used for linking the pspp binary only])
 AC_ARG_VAR([PSPPIRE_LDFLAGS], [linker flags to be used for linking the psppire binary only])
 
-
-AC_ARG_WITH(
-  gui, 
-  [AS_HELP_STRING([--without-gui], [don't build the PSPPIRE gui])])
-
-required_gtk_version=2.12
-
-if test x"$with_gui" != x"no" ; then 
-  PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $required_gtk_version,,
-    [PSPP_REQUIRED_PREREQ([gtk+ 2.0 v$required_gtk_version or later (or use --without-gui)])])
+# Support for Cairo and Pango.
+AC_ARG_WITH([cairo],
+  [AS_HELP_STRING(
+    [--without-cairo], 
+    [Don't build support for charts (using Cairo and Pango);
+     implies --without-gui])],
+  [], [with_cairo=yes])
+AM_CONDITIONAL([HAVE_CAIRO], [test "$with_cairo" != no])
+if test "$with_cairo" != no; then
+  PKG_CHECK_MODULES([CAIRO], [cairo >= 1.5 pango >= 1.20 pangocairo], 
+    [CPPFLAGS="$CPPFLAGS $CAIRO_CFLAGS"
+     AC_DEFINE([HAVE_CAIRO], 1, 
+       [Define to 1 if Cairo and Pango are available.])],
+    [PSPP_REQUIRED_PREREQ([cairo 1.5 or later and pango 1.20 or later (or use --without-cairo)])])
+  AC_PATH_PROG([XMLLINT], [xmllint], [echo], [$PATH])
+  AC_SUBST(XMLLINT)
 fi
-AM_CONDITIONAL(WITHGUI, test x"$with_gui" != x"no")
 
+# Support for GUI.
+AC_ARG_WITH([gui], 
+  [AS_HELP_STRING([--without-gui], 
+                  [Don't build the PSPPIRE GUI (using GTK+)])],
+  [], [with_gui=yes])
+AM_CONDITIONAL([HAVE_GUI], 
+               [test "$with_cairo" != no && test "$with_gui" != "no"])
+if test "$with_cairo" != no && test "$with_gui" != "no"; then
+  PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.12], [],
+    [PSPP_REQUIRED_PREREQ([gtk+ 2.0 version 2.12 or later (or use --without-gui)])])
+
+  AC_ARG_VAR([GLIB_GENMARSHAL])
+  AC_CHECK_PROGS([GLIB_GENMARSHAL], [glib-genmarshal])
+  if test "x$GLIB_GENMARSHAL" = x; then
+    PSPP_REQUIRED_PREREQ([glib-genmarshal (or use --without-gui)])
+  fi
+fi
 
 dnl Checks needed for psql reader
 
@@ -80,48 +104,115 @@ dnl only set PG_LDFLAGS if it's not found.
 AC_ARG_WITH(
   libpq, 
   [AS_HELP_STRING([--without-libpq], [don't compile in Postgres capability])])
-
-if test x"$with_libpq" != x"no" ; then
- AC_SEARCH_LIBS([PQexec], [pq], [libpq_in_std_lib_path=yes])
-
- AC_ARG_VAR([PG_CONFIG], [Full pathname of the pg_config program shipped with Postgresql])
- if test x"$cross_compiling" != x"yes" ; then
-   AC_PATH_PROG([PG_CONFIG], [pg_config], [], [$PATH:/usr/local/pgsql/bin:/usr/pgsql/bin])
- fi 
- if test -n "$PG_CONFIG" ; then 
-   AC_SUBST(PG_CONFIG)
-   AC_DEFINE([PSQL_SUPPORT], 1,
-   [Define to 1 if building in support for reading from postgres databases.])
-   PG_CFLAGS=-I`$PG_CONFIG --includedir` 
-   AC_SUBST(PG_CFLAGS)
-   
-   if test "x$libpq_in_std_lib_path" != x"yes" ; then
-      PG_LDFLAGS="-L`$PG_CONFIG --libdir` -R`$PG_CONFIG --libdir`"
-   fi
-   AC_SUBST(PG_LDFLAGS)
-
-   PG_LIBS=-lpq
-   AC_SUBST(PG_LIBS)
-   PKG_CHECK_EXISTS(libssl,
-         AC_DEFINE([USE_SSL],1,
-                   [Define to 1 if the openssl library is present.])
-           ,)
- fi
+AC_ARG_VAR([PG_CONFIG], 
+           [Full pathname of the pg_config program shipped with Postgresql])
+AC_PATH_PROG([PG_CONFIG], [pg_config], [], 
+             [$PATH:/usr/local/pgsql/bin:/usr/pgsql/bin])
+
+if test x"$with_libpq" != x"no" && test -n "$PG_CONFIG" ; then 
+  AC_SUBST(PG_CONFIG)
+  PG_CFLAGS=-I`$PG_CONFIG --includedir` 
+  AC_SUBST(PG_CFLAGS)
+
+  AC_CHECK_LIB([pq], [PQexec],
+     [:], 
+     [PG_LDFLAGS="-L`$PG_CONFIG --libdir` -R`$PG_CONFIG --libdir`"])
+  AC_SUBST(PG_LDFLAGS)
+
+  PG_LIBS=-lpq
+  AC_SUBST(PG_LIBS)
+
+  PKG_CHECK_EXISTS(libssl,
+       AC_DEFINE([USE_SSL],1,
+                  [Define to 1 if the openssl library is present.])
+          ,)
+
+  # Now verify that we can actually link against libpq.  If we are
+  # cross-compiling and picked up a host libpq, or if libpq is just
+  # badly installed, this will fail.
+  AC_CACHE_CHECK(
+    [whether -lpq links successfully],
+    [pspp_cv_have_libpq],
+    [save_CPPFLAGS=$CPPFLAGS
+     save_LIBS=$LIBS
+     save_LDFLAGS=$LDFLAGS
+     CPPFLAGS="$PG_CFLAGS $CPPFLAGS"
+     LIBS="$PG_LIBS $LIBS"
+     LDFLAGS="$PG_LDFLAGS $LDFLAGS"
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+        [#include <libpq-fe.h>
+        ], [PQfinish (0);])],
+       [pspp_cv_have_libpq=yes],
+       [pspp_cv_have_libpq=no])
+     CPPFLAGS=$save_CPPFLAGS
+     LIBS=$save_LIBS
+     LDFLAGS=$save_LDFLAGS])
+
+  if test $pspp_cv_have_libpq = yes; then
+    AC_DEFINE([PSQL_SUPPORT], [1],
+      [Define to 1 if building in support for reading from postgres
+       databases.])
+  else
+    PG_CONFIG=
+    PG_CFLAGS=
+    PG_LDFLAGS=
+    PG_LIBS=
+  fi
+else
+  pspp_cv_have_libpq=no
 fi
-AM_CONDITIONAL(PSQL_SUPPORT, test -n "$PG_CONFIG")
-
-dnl Checks needed for Gnumeric reader
-gnm_support=yes;
-PKG_CHECK_MODULES(LIBXML2, libxml-2.0,,
-                          [PSPP_OPTIONAL_PREREQ([libxml2]); gnm_support=no;]);
-AC_SEARCH_LIBS(gzopen,z,,[PSPP_OPTIONAL_PREREQ([zlib]); gnm_support=no;])
-AC_CHECK_HEADERS(zlib.h,,[PSPP_OPTIONAL_PREREQ([zlib]); gnm_support=no;])
-
-if test x"$gnm_support" = x"yes" ; then 
-   AC_DEFINE([GNM_SUPPORT], 1,
-   [Define to 1 if building in support for reading Gnumeric files.])
+AM_CONDITIONAL(PSQL_SUPPORT, test $pspp_cv_have_libpq = yes)
+
+dnl Check for libxml2
+PKG_CHECK_MODULES(
+  [LIBXML2], [libxml-2.0], 
+  [HAVE_LIBXML2=yes],
+  [HAVE_LIBXML2=no
+   PSPP_OPTIONAL_PREREQ([libxml2])])
+
+dnl Check for zlib.
+AC_SEARCH_LIBS(
+  [gzopen], [z],
+  [HAVE_ZLIB=yes],
+  [HAVE_ZLIB=no
+   PSPP_OPTIONAL_PREREQ([zlib])])
+AC_CHECK_HEADERS(
+  [zlib.h], 
+  [],
+  [HAVE_ZLIB=no
+   PSPP_OPTIONAL_PREREQ([zlib])])
+
+dnl Avoid interference between zlib's crc32() function and gnulib's
+dnl crc32() function, which have different signatures.  PSPP calls
+dnl only gnulib's crc32() directly, but it calls zlib's crc32()
+dnl indirectly through other zlib calls.  If we don't rename gnulib's
+dnl crc32(), then zlib will call gnulib's version instead of its own,
+dnl causing failures.  (This can happen even if zlib isn't detected
+dnl directly, because other libraries that PSPP uses, e.g. libpng,
+dnl sometimes use zlib themselves.)
+AC_DEFINE(
+  [crc32], [gl_crc32],
+  [Avoid making zlib call gnulib's crc32() instead of its own.])
+
+dnl Gnumeric support requires libxml2 and zlib.
+if test $HAVE_LIBXML2 = yes && test $HAVE_ZLIB = yes; then
+  GNM_SUPPORT=yes
+  AC_DEFINE(
+    [GNM_SUPPORT], [1],
+    [Define to 1 if building in support for reading Gnumeric files.])
+else
+  GNM_SUPPORT=no
 fi
-AM_CONDITIONAL(GNM_SUPPORT, test x"$gnm_support" = x"yes")
+AM_CONDITIONAL([GNM_SUPPORT], [test $GNM_SUPPORT = yes])
+
+dnl ODT support requires libxml2.
+if test $HAVE_LIBXML2 = yes; then
+  AC_DEFINE(
+    [ODT_SUPPORT], [1],
+    [Define to 1 if building in support for writing ODT files.])
+fi
+AM_CONDITIONAL([ODT_SUPPORT], [test $HAVE_LIBXML2 = yes])
 
 AC_ARG_WITH(
   gui_tools,
@@ -131,7 +222,21 @@ if test x"$with_gui_tools" = x"yes" ; then
 fi
 AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes")
 
-AM_CONDITIONAL(WITH_PERL_MODULE, test x"$cross_compiling" != x"yes")
+AC_ARG_WITH(
+  [perl-module],
+  [AS_HELP_STRING([--without-perl-module], [do not build the Perl module])],
+  [case $with_perl_module in # (
+     yes|no) ;; # (
+     *) AC_MSG_FAILURE([--with-perl-module argument must be 'yes' or 'no']) ;;
+   esac
+   WITH_PERL_MODULE=$with_perl_module],
+  [if test x"$cross_compiling" != x"yes"; then
+     WITH_PERL_MODULE=yes
+   else
+     WITH_PERL_MODULE=no
+   fi])
+AC_SUBST([WITH_PERL_MODULE])
+AM_CONDITIONAL(WITH_PERL_MODULE, test $WITH_PERL_MODULE = yes)
 
 AC_SEARCH_LIBS([cblas_dsdot], [gslcblas],,[PSPP_REQUIRED_PREREQ([libgslcblas])])
 AC_SEARCH_LIBS([gsl_cdf_binomial_P], [gsl],,[PSPP_REQUIRED_PREREQ([libgsl (version 1.8 or later)])])
@@ -178,7 +283,7 @@ fi
 PSPP_READLINE
 
 dnl Checks for header files.
-AC_CHECK_HEADERS([sys/wait.h fpu_control.h ieeefp.h fenv.h])
+AC_CHECK_HEADERS([sys/wait.h fpu_control.h ieeefp.h fenv.h pwd.h])
 
 # For gnulib.
 gl_INIT
@@ -213,7 +318,8 @@ RELOCATABLE_STRIP=:
 
 PSPP_CHECK_PREREQS
 
-AC_CONFIG_FILES([Makefile gl/Makefile])
+AC_CONFIG_FILES(
+  [Makefile gl/Makefile po/Makefile tests/atlocal perl-module/lib/PSPP.pm])
 
 AC_OUTPUT
 echo "PSPP configured successfully."
index 06eb3bb18a49b17bb6a488f2c2a259d95e6be159..c375556614708dbe4d085e3066efc56809a0007e 100644 (file)
@@ -3,6 +3,7 @@ Makefile.in
 ni.texi
 pspp-dev.info
 pspp.info*
+pspp.xml
 stamp-1
 stamp-vti
 version-dev.texi
index b75aee0bb75aee553ca4a2b29121df78ca1e4b0a..b31aa769b48291670e0ffeb7e8162c13ca4a8f8c 100644 (file)
@@ -6,7 +6,6 @@ doc_pspp_TEXINFOS = doc/version.texi \
        doc/bugs.texi \
        doc/command-index.texi \
        doc/concept-index.texi \
-       doc/configuring.texi \
        doc/data-io.texi \
        doc/data-selection.texi \
        doc/expressions.texi \
@@ -46,21 +45,22 @@ EXTRA_DIST += doc/pspp.man \
 
 doc/ni.texi: $(top_srcdir)/src/language/command.def doc/get-commands.pl
        @$(MKDIR_P)  doc
-       @PERL@ $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@
+       $(PERL) $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@
 
 doc/tut.texi:
        @$(MKDIR_P) doc
        echo "@set example-dir $(examplesdir)" > $@
 
 
-doc/pspp.xml: doc/pspp.texinfo $(doc_pspp_TEXINFOS)
+$(srcdir)/doc/pspp.xml: doc/pspp.texinfo $(doc_pspp_TEXINFOS)
        @$(MKDIR_P)  doc
-       $(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) $< -o $@
-       $(SED) -i -e 's/Time-&-Date/Time-\&amp;-Date/g' $@
+       $(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \
+               $(top_srcdir)/doc/pspp.texinfo -o - \
+               | $(SED) 's/Time-&-Date/Time-\&amp;-Date/g' > $@
+       $(XMLLINT) --output /dev/null $@ 2>&1 2> /dev/null || ( $(RM) $@ && false )
 
 docbookdir = $(docdir)
-docbook_DATA = doc/pspp.xml
-
+dist_docbook_DATA = doc/pspp.xml
 
 EXTRA_DIST += doc/OChangeLog
 CLEANFILES += pspp-dev.dvi $(docbook_DATA)
diff --git a/doc/configuring.texi b/doc/configuring.texi
deleted file mode 100644 (file)
index 164d9ab..0000000
+++ /dev/null
@@ -1,897 +0,0 @@
-@node Configuration
-@appendix Configuring PSPP
-@cindex configuration
-@cindex PSPP, configuring
-
-This chapter describe how to configure PSPP for your system.
-
-@menu
-* File locations::              How PSPP finds config files.
-* Configuration techniques::    Many different methods of configuration...
-* Configuration files::         How configuration files are read.
-* Environment variables::       All about environment variables.
-* Output devices::              Describing your terminal(s) and printer(s).
-* PostScript driver class::     Configuration of PostScript devices.
-* ASCII driver class::          Configuration of character-code devices.
-* HTML driver class::           Configuration for HTML output.
-* Miscellaneous configuring::   Even more configuration variables.
-@end menu
-
-@node File locations
-@section Locating configuration files
-
-PSPP searches each directory in the configuration file path for most
-configuration files.  The default configuration file path searches first
-@file{$HOME/.pspp}, then the package system configuration directory (usually
-@file{/usr/local/etc/pspp} or @file{/etc/pspp}).  The value of
-environment variable @env{PSPP_CONFIG_PATH}, if defined, overrides this
-default path.  Finally, @samp{-B @var{path}} or
-@samp{--config-dir=@var{path}} specified on the command line has highest
-priority.
-
-@node Configuration techniques
-@section Configuration techniques
-
-There are many ways that PSPP can be configured.  These are
-described in the list below.  Values given by earlier items take
-precedence over those given by later items.
-
-@enumerate
-@item
-Syntax commands that modify settings, such as @cmd{SET}.  @xref{SET}.
-
-@item
-Command-line options.  @xref{Invocation}.
-
-@item
-PSPP-specific environment variable contents.  @xref{Environment
-variables}.
-
-@item
-General environment variable contents.  @xref{Environment variables}.
-
-@item
-Configuration file contents.  @xref{Configuration files}.
-
-@item
-Fallback defaults.
-@end enumerate
-
-Some of the above may not apply to a particular setting.
-
-@node Configuration files
-@section Configuration files
-
-Most configuration files have a common form:
-
-@itemize @bullet
-@item
-Each line forms a separate command or directive.  This means that lines
-cannot be broken up, unless they are spliced together with a trailing
-backslash, as described below.
-
-@item
-Before anything else is done, trailing white space is removed.
-
-@item
-When a line ends in a backslash (@samp{\}), the backslash is removed,
-and the next line is read and appended to the current line.
-
-@itemize @minus
-@item
-White space preceding the backslash is retained.
-
-@item
-This rule continues to be applied until the line read does not end in a
-backslash.
-
-@item
-It is an error if the last line in the file ends in a backslash.
-@end itemize
-
-@item
-Comments are introduced by an octothorpe (@samp{#}), and continue until the
-end of the line.
-
-@itemize @minus
-@item
-An octothorpe inside balanced pairs of double quotation marks (@samp{"})
-or single quotation marks (@samp{'}) does not introduce a comment.
-
-@item
-The backslash character can be used inside balanced quotes of either
-type to escape the following character as a literal character.  
-
-(This is distinct from the use of a backslash as a line-splicing
-character.)
-
-@item
-Line splicing takes place before comment removal.
-@end itemize
-
-@item
-Blank lines, and lines that contain only white space, are ignored.
-@end itemize
-
-@node Environment variables
-@section Environment variables
-
-You may think the concept of environment variables is a fairly simple
-one.  However, the author of PSPP has found a way to complicate
-even something so simple.  Environment variables are further described
-in the sections below:
-
-@menu
-* Environment substitutions::   How environment substitutions are made.
-* Predefined variables::        A few variables are automatically defined.
-@end menu
-
-@node Environment substitutions
-@subsection Environment substitutions
-
-Much of the power of environment variables lies in the way that they may
-be substituted into configuration files.  Variable substitutions are
-described below.
-
-The line is scanned from left to right.  In this scan, all characters
-other than dollar signs (@samp{$}) are retained without change.  Dollar
-signs introduce environment variable references.  References
-take three forms:
-
-@table @code
-@item $@var{var}
-Replaced by the value of environment variable @var{var}.  @var{var} must
-consist of either one or more letters, or exactly one non-alphabetic
-character other than a left brace (@samp{@{}).
-
-@item $@{@var{var}@}
-Same as above, but @var{var} may contain any character (except
-@samp{@}}).
-
-@item $$
-Replaced by a single dollar sign.
-@end table
-
-Undefined variables expand to a empty value.
-
-@node Predefined variables
-@subsection Predefined environment variables
-
-There are two environment variables predefined for use in environment
-substitutions:
-
-@table @samp
-@item VER
-Defined as the version number of PSPP, as a string, in a format
-something like @samp{0.9.4}.
-
-@item ARCH
-Defined as the host architecture of PSPP, as a string, in standard
-cpu-manufacturer-OS format.  For instance, Debian GNU/Linux 1.1 on an
-Intel machine defines this as @samp{i586-unknown-linux}.  This is
-somewhat dependent on the system used to compile PSPP.
-@end table
-
-Nothing prevents these values from being overridden, although it's a
-good idea not to do so.
-
-@node Output devices
-@section Output devices
-
-Configuring output devices is the most complicated aspect of configuring
-PSPP.  The output device configuration file is named
-@file{devices}.  It is searched for using the usual algorithm for
-finding configuration files (@pxref{File locations}).  Each line in the
-file is read in the usual manner for configuration files
-(@pxref{Configuration files}).
-
-Lines in @file{devices} are divided into three categories, described
-briefly in the table below:
-
-@table @i
-@item driver category definitions
-Define a driver in terms of other drivers.
-
-@item macro definitions
-Define environment variables local to the output driver
-configuration file.
-
-@item device definitions
-Describe the configuration of an output device.
-@end table
-
-The following sections further elaborate the contents of the
-@file{devices} file.
-
-@menu
-* Driver categories::           How to organize the driver namespace.
-* Macro definitions::           Environment variables local to @file{devices}.
-* Device definitions::          Output device descriptions.
-* Dimensions::                  Lengths, widths, sizes, @enddots{}
-* Distinguishing line types::   Details on @file{devices} parsing.
-* Tokenizing lines::            Dividing @file{devices} lines into tokens.
-@end menu
-
-@node Driver categories
-@subsection Driver categories
-
-Drivers can be divided into categories.  Drivers are specified by their
-names, or by the names of the categories that they are contained in.
-Only certain drivers are enabled each time PSPP is run; by
-default, these are the drivers in the category `default'.  To enable a
-different set of drivers, use the @samp{-o @var{device}} command-line
-option (@pxref{Invocation}).
-
-Categories are specified with a line of the form
-@samp{@var{category}=@var{driver1} @var{driver2} @var{driver3} @var{@dots{}}
-@var{driver@var{n}}}.  This line specifies that the category
-@var{category} is composed of drivers named @var{driver1},
-@var{driver2}, and so on.  There may be any number of drivers in the
-category, from zero on up.
-
-Categories may also be specified on the command line
-(@pxref{Invocation}).
-
-This is all you need to know about categories.  If you're still curious,
-read on.
-
-First of all, the term `categories' is a bit of a misnomer.  In fact,
-the internal representation is nothing like the hierarchy that the term
-seems to imply: a linear list is used to keep track of the enabled
-drivers.
-
-When PSPP first begins reading @file{devices}, this list contains
-the name of any drivers or categories specified on the command line, or
-the single item `default' if none were specified.
-
-Each time a category definition is specified, the list is searched for
-an item with the value of @var{category}.  If a matching item is found,
-it is deleted.  If there was a match, the list of drivers (@var{driver1}
-through @var{driver@var{n}}) is then appended to the list.
-
-Each time a driver definition line is encountered, the list is searched.
-If the list contains an item with that driver's name, the driver is
-enabled and the item is deleted from the list.  Otherwise, the driver
-is not enabled.
-
-It is an error if the list is not empty when the end of @file{devices}
-is reached.
-
-@node Macro definitions
-@subsection Macro definitions
-
-Macro definitions take the form @samp{define @var{macroname}
-@var{definition}}.  In such a macro definition, the environment variable
-@var{macroname} is defined to expand to the value @var{definition}.
-Before the definition is made, however, any macros used in
-@var{definition} are expanded.
-
-Please note the following nuances of macro usage:
-
-@itemize @bullet
-@item
-For the purposes of this section, @dfn{macro} and @dfn{environment
-variable} are synonyms.
-
-@item
-Macros may not take arguments.
-
-@item
-Macros may not recurse.
-
-@item
-Macros are just environment variable definitions like other environment
-variable definitions, with the exception that they are limited in scope
-to the @file{devices} configuration file.
-
-@item
-Macros override other all environment variables of the same name (within
-the scope of @file{devices}).
-
-@item
-Earlier macro definitions for a particular @var{key} override later
-ones.  In particular, macro definitions on the command line override
-those in the device definition file.  @xref{Non-option Arguments}.
-
-@item
-There are two predefined macros, whose values are determined at runtime:
-
-@table @samp
-@item viewwidth
-Defined as the width of the console screen, in columns of text.
-
-@item viewlength
-Defined as the length of the console screen, in lines of text.
-@end table
-@end itemize
-
-@node Device definitions
-@subsection Driver definitions
-
-Driver definitions are the ultimate purpose of the @file{devices}
-configuration file.  These are where the real action is.  Driver
-definitions tell PSPP where it should send its output.
-
-Each driver definition line is divided into four fields.  These fields
-are delimited by colons (@samp{:}).  Each line is subjected to
-environment variable interpolation before it is processed further
-(@pxref{Environment substitutions}).  From left to right, the four
-fields are, in brief:
-
-@table @i
-@item driver name
-A unique identifier, used to determine whether to enable the driver.
-
-@item class name
-One of the predefined driver classes supported by PSPP.  The
-currently supported driver classes include `postscript' and `ascii'.
-
-@item device type(s)
-Zero or more of the following keywords, delimited by spaces:
-
-@table @code
-@item screen
-
-Indicates that the device is a screen display.  This may reduce the
-amount of buffering done by the driver, to make interactive use more
-convenient.
-
-@item printer
-
-Indicates that the device is a printer.
-
-@item listing
-
-Indicates that the device is a listing file.
-@end table
-
-These options are just hints to PSPP and do not cause the output to be
-directed to the screen, or to the printer, or to a listing file---those
-must be set elsewhere in the options.  They are used primarily to decide
-which devices should be enabled at any given time.  @xref{SET}, for more
-information.
-
-@item options
-An optional set of options to pass to the driver itself.  The exact
-format for the options varies among drivers.
-@end table
-
-The driver is enabled if:
-
-@enumerate
-@item
-Its driver name is specified on the command line, or
-
-@item
-It's in a category specified on the command line, or
-
-@item
-If no categories or driver names are specified on the command line, it
-is in category @code{default}.
-@end enumerate
-
-For more information on driver names, see @ref{Driver categories}.
-
-The class name must be one of those supported by PSPP.  The
-classes supported depend on the options with which PSPP was
-compiled.  See later sections in this chapter for descriptions of the
-available driver classes.
-
-Options are dependent on the driver.  See the driver descriptions for
-details.
-
-@node Dimensions
-@subsection Dimensions
-
-Quite often in configuration it is necessary to specify a length or a
-size.  PSPP uses a common syntax for all such, calling them
-collectively by the name @dfn{dimensions}.
-
-@itemize @bullet
-@item
-You can specify dimensions in decimal form (@samp{12.5}) or as
-fractions, either as mixed numbers (@samp{12-1/2}) or raw fractions
-(@samp{25/2}).
-
-@item 
-A number of different units are available.  These are suffixed to the
-numeric part of the dimension.  There must be no spaces between the
-number and the unit.  The available units are identical to those offered
-by the popular typesetting system @TeX{}:
-
-@table @code
-@item in
-inch (1 @code{in} = 2.54 @code{cm})
-
-@item "
-inch (1 @code{in} = 2.54 @code{cm})
-
-@item pt
-printer's point (1 @code{in} = 72.27 @code{pt})
-
-@item pc
-pica (12 @code{pt} = 1 @code{pc})
-
-@item bp
-PostScript point (1 @code{in} = 72 @code{bp})
-
-@item cm
-centimeter
-
-@item mm
-millimeter (10 @code{mm} = 1 @code{cm})
-
-@item dd
-didot point (1157 @code{dd} = 1238 @code{pt})
-
-@item cc
-cicero (1 @code{cc} = 12 @code{dd})
-
-@item sp
-scaled point (65536 @code{sp} = 1 @code{pt})
-@end table
-
-@item
-If no explicit unit is given, PSPP attempts to guess the best unit:
-
-@itemize @minus
-@item
-Numbers less than 50 are assumed to be in inches.
-
-@item
-Numbers 50 or greater are assumed to be in millimeters.
-@end itemize
-@end itemize
-
-@node Distinguishing line types
-@subsection How lines are divided into types
-
-The lines in @file{devices} are distinguished in the following manner:
-
-@enumerate
-@item
-Leading white space is removed.
-
-@item
-If the resulting line begins with the exact string @code{define},
-followed by one or more white space characters, the line is processed as
-a macro definition.
-
-@item
-Otherwise, the line is scanned for the first instance of a colon
-(@samp{:}) or an equals sign (@samp{=}).
-
-@item
-If a colon is encountered first, the line is processed as a driver
-definition.
-
-@item
-Otherwise, if an equals sign is encountered, the line is processed as a
-macro definition.
-
-@item
-Otherwise, the line is ill-formed.
-@end enumerate
-
-@node Tokenizing lines
-@subsection How lines are divided into tokens
-
-Each driver definition line is run through a simple tokenizer.  This
-tokenizer recognizes two basic types of tokens.
-
-The first type is an equals sign (@samp{=}).  Equals signs are both
-delimiters between tokens and tokens in themselves.
-
-The second type is an identifier or string token.  Identifiers and
-strings are equivalent after tokenization, though they are written
-differently.  An identifier is any string of characters other than
-white space or equals sign.
-
-A string is introduced by a single- or double-quote character (@samp{'}
-or @samp{"}) and, in general, continues until the next occurrence of
-that same character.  The following standard C escapes can also be
-embedded within strings:
-
-@table @code
-@item \'
-A single-quote (@samp{'}).
-
-@item \"
-A double-quote (@samp{"}).
-
-@item \?
-A question mark (@samp{?}).  Included for hysterical raisins.
-
-@item \\
-A backslash (@samp{\}).
-
-@item \a
-Audio bell (ASCII 7).
-
-@item \b
-Backspace (ASCII 8).
-
-@item \f
-Formfeed (ASCII 12).
-
-@item \n
-New-line (ASCII 10)
-
-@item \r
-Carriage return (ASCII 13).
-
-@item \t
-Tab (ASCII 9).
-
-@item \v
-Vertical tab (ASCII 11).
-
-@item \@var{o}@var{o}@var{o}
-Each @samp{o} must be an octal digit.  The character is the one having
-the octal value specified.  Any number of octal digits is read and
-interpreted; only the lower 8 bits are used.
-
-@item \x@var{h}@var{h}
-Each @samp{h} must be a hex digit.  The character is the one having the
-hexadecimal value specified.  Any number of hex digits is read and
-interpreted; only the lower 8 bits are used.
-@end table
-
-Tokens, outside of quoted strings, are delimited by white space or equals
-signs.
-
-@node PostScript driver class
-@section The PostScript driver class
-
-The @code{postscript} driver class is used to produce output that is
-acceptable to PostScript printers and other interpreters.
-
-The available options are listed below.
-
-@table @code
-@item output-file=@var{file-name}
-
-File to which output should be sent.  This can be an ordinary file name
-(i.e., @code{"pspp.ps"}), a pipe (i.e., @code{"|lpr"}), or
-stdout (@code{"-"}).  Default: @code{"pspp.ps"}.
-
-@item headers=@var{boolean}
-
-Controls whether the standard headers showing the time and date and
-title and subtitle are printed at the top of each page.  Default:
-@code{on}.
-
-@item paper-size=@var{paper-size}
-
-Paper size.  You may specify a name (e.g.@: @code{a4}, @code{letter})
-or measurements (e.g.@: @code{210x297}, @code{8.5x11in}).
-
-The default paper size is taken from the @env{PAPERSIZE} environment
-variable or the file indicated by the @env{PAPERCONF} environment
-variable, if either variable is set.  If not, and your system supports
-the @code{LC_PAPER} locale category, then the default paper size is
-taken from the locale.  Otherwise, if @file{/etc/papersize} exists,
-the default paper size is read from it.  As a last resort, A4 paper is
-assumed.
-
-@item orientation=@var{orientation}
-
-Either @code{portrait} or @code{landscape}.  Default: @code{portrait}.
-
-@item left-margin=@var{dimension}
-@itemx right-margin=@var{dimension}
-@itemx top-margin=@var{dimension}
-@itemx bottom-margin=@var{dimension}
-
-Sets the margins around the page.  The headers, if enabled, are not
-included in the margins; they are in addition to the margins.  For a
-description of dimensions, see @ref{Dimensions}.  Default: @code{0.5in}.
-
-@item prop-font=@var{afm-file}[,@var{font-file}[,@var{encoding-file}]]
-@itemx emph-font=@var{afm-file}[,@var{font-file}[,@var{encoding-file}]]
-@itemx fixed-font=@var{afm-file}[,@var{font-file}[,@var{encoding-file}]]
-
-Sets the font used for proportional, emphasized, or fixed-pitch text.
-The only required value is @var{afm-file}, the AFM file for the font.
-
-If specified, @var{font-file} will be downloaded to the printer at the
-beginning of the print job.  The font file may be in PFA or PFB format.
-
-The font is reencoded as specified in @var{encoding-file}, if specified.
-Each line in @var{encoding-file} should consist of a PostScript
-character name and a decimal encoding value (between 0 and 255),
-separated by white space.  Blank lines and comments introduced by
-@samp{#} are also allowed.
-
-The files specified on these options are located as follows.  If
-the file name begins with @samp{/}, then it is taken as an absolute
-path.  Otherwise, PSPP searches its configuration path for the specified
-name prefixed by @code{psfonts/} (@pxref{File locations}).
-
-Default: proportional font @code{Times-Roman.afm}, emphasis font
-@code{Times-Italic.afm}, fixed-pitch font @code{Courier.afm}.
-
-@item font-size=@var{font-size}
-
-Sets the size of the default fonts, in thousandths of a point.  Default:
-10000 (10 point).
-
-@item line-gutter=@var{dimension}
-
-Sets the width of white space on either side of lines that border text
-or graphics objects.  @xref{Dimensions}.  Default: @code{1pt}.
-
-@item line-spacing=@var{dimension}
-
-Sets the spacing between the lines in a double line in a table.
-Default: @code{1pt}.
-
-@item line-width=@var{dimension}
-
-Sets the width of the lines used in tables.  Default: @code{0.5pt}.
-@end table
-
-@node ASCII driver class
-@section The ASCII driver class
-
-The ASCII driver class produces output that can be displayed on a
-terminal or output to printers.  The ASCII driver has class name
-@samp{ascii}.
-
-The available options are listed below.
-
-@table @code
-@item output-file=@var{file-name}
-
-File to which output should be sent.  This can be an ordinary file name
-(e.g., @code{"pspp.txt"}), a pipe (e.g., @code{"|more"}), or
-stdout (@code{"-"}).  Default: @code{"pspp.list"}.
-
-@item chart-files=@var{file-name-template}
-Template for the file names used for charts.  The name should contain
-a single @samp{#}, which is replaced by the chart number.  Default:
-@file{"pspp-#.png"}.
-
-@item chart-type=@var{type}.
-Type of charts to output.  Available types typically include @samp{X},
-@samp{png}, @samp{gif}, @samp{svg}, @samp{ps}, @samp{cgm}, @samp{fig},
-@samp{pcl}, @samp{hpgl}, @samp{regis}, @samp{tek}, and @samp{meta}.
-Default: @samp{png}.
-
-You may specify @samp{none} to disable chart output.  Charts are also
-disabled if your installation of PSPP was compiled without
-@code{libplot}.
-
-@item paginate=@var{boolean}
-
-If set, a formfeed will be written at the end of every page.  Default:
-@code{on}.
-
-@item tab-width=@var{tab-width-value}
-
-The distance between tab stops for this device.  If set to 0, tabs will
-not be used in the output.  Default: @code{8}.
-
-@item headers=@var{boolean}
-
-If enabled, two lines of header information giving title and subtitle,
-page number, date and time, and PSPP version are printed at the top of
-every page.  These two lines are in addition to any top margin
-requested.  Default: @code{on}.
-
-@item length=@var{line-count}
-
-Physical length of a page.  Headers and margins are subtracted from
-this value.  You may specify the number of lines as a number, or for
-screen output you may specify @code{auto} to track the height of the
-terminal as it changes.  Default: @code{66}.
-
-@item width=@var{character-count}
-
-Physical width of a page.  Margins are subtracted from this value.
-You may specify the width as a number of characters, or for screen
-output you may specify @code{auto} to track the width of the terminal
-as it changes.  Default: @code{79}.
-
-@item top-margin=@var{top-margin-lines}
-
-Length of the top margin, in lines.  PSPP subtracts this value from
-the page length.  Default: @code{2}.
-
-@item bottom-margin=@var{bottom-margin-lines}
-
-Length of the bottom margin, in lines.  PSPP subtracts this value from
-the page length.  Default: @code{2}.
-
-@item box[@var{line-type}]=@var{box-chars}
-
-The characters used for lines in tables produced by the ASCII driver can
-be changed using this option.  @var{line-type} is used to indicate which
-type of line to change; @var{box-chars} is the character or string of
-characters to use for this type of line.
-
-@var{line-type} must be a 4-digit number.  The digits are in the order
-`right', `bottom', `left', `top'.  The possibilities for each digit are:
-
-@table @asis
-@item 0
-No line.
-
-@item 1
-Single line.
-
-@item 2
-Double line.
-@end table
-
-Examples:
-
-@table @code
-@item box[0101]="|"
-
-Sets @samp{|} as the character to use for a single-width line with
-bottom and top components.
-
-@item box[2222]="#"
-
-Sets @samp{#} as the character to use for the intersection of four
-double-width lines, one each from the top, bottom, left and right.
-
-@item box[1100]="\xda"
-
-Sets @samp{"\xda"}, which under MS-DOS is a box character suitable for
-the top-left corner of a box, as the character for the intersection of
-two single-width lines, one each from the right and bottom.
-
-@end table
-
-Defaults:
-
-@itemize @bullet
-@item
-@code{box[0000]=" "}
-
-@item
-@code{box[1000]="-"}
-@*@code{box[0010]="-"}
-@*@code{box[1010]="-"}
-
-@item
-@code{box[0100]="|"}
-@*@code{box[0001]="|"}
-@*@code{box[0101]="|"}
-
-@item
-@code{box[2000]="="}
-@*@code{box[0020]="="}
-@*@code{box[2020]="="}
-
-@item
-@code{box[3000]="="}
-@*@code{box[0030]="="}
-@*@code{box[3030]="="}
-
-@item
-For all others, @samp{+} is used unless there are double lines or
-special lines, in which case @samp{#} is used.
-@end itemize
-
-@item init=@var{init-string}
-If set, this string is written at the beginning of each output file.
-It can be used to initialize device features, e.g.@: to enable VT100
-line-drawing characters.
-
-@item emphasis=@var{emphasis-style}
-
-How to emphasize text.  Your choices are @code{bold}, @code{underline},
-or @code{none}.  Bold and underline emphasis are achieved with
-overstriking, which may not be supported by all the software to which
-you might pass the output.
-@end table
-
-@node HTML driver class
-@section The HTML driver class
-
-The @code{html} driver class is used to produce output for viewing in
-tables-capable web browsers such as Emacs' w3-mode.  Its configuration
-is very simple.  Currently, the output has a very plain format.  In the
-future, further work may be done on improving the output appearance.
-
-There are only a few options:
-
-@table @code
-@item output-file=@var{file-name}
-
-File to which output should be sent.  This can be an ordinary file name
-(i.e., @code{"pspp.ps"}), a pipe (i.e., @code{"|lpr"}), or
-stdout (@code{"-"}).  Default: @file{"pspp.html"}.
-
-@item chart-files=@var{file-name-template}
-Template for the file names used for charts, which are output in PNG
-format.  The name should contain a single @samp{#}, which is replaced by
-the chart number.  Default: @file{"pspp-#.png"}.
-@end table
-
-@node Miscellaneous configuring
-@section Miscellaneous configuration
-
-The following environment variables can be used to further configure
-PSPP:
-
-@table @code
-@item HOME
-
-Used to determine the user's home directory.  No default value.
-
-@item STAT_INCLUDE_PATH
-
-Path used to find include files in PSPP syntax files.  Defaults vary
-across operating systems:
-
-@table @asis
-@item UNIX
-
-@itemize @bullet
-@item
-@file{.}
-
-@item
-@file{$HOME/.pspp/include}
-
-@item
-@file{/usr/local/lib/pspp/include}
-
-@item
-@file{/usr/lib/pspp/include}
-
-@item
-@file{/usr/local/share/pspp/include}
-
-@item
-@file{/usr/share/pspp/include}
-@end itemize
-
-@item MS-DOS
-
-@itemize @bullet
-@item
-@file{.}
-
-@item
-@file{C:\PSPP\INCLUDE}
-
-@item
-@file{$PATH}
-@end itemize
-
-@item Other OSes
-No default path.
-@end table
-
-@item TERM
-
-The terminal type @code{termcap} or @code{ncurses} will use, if such
-support was compiled into PSPP.
-
-@item STAT_OUTPUT_INIT_FILE
-
-The basename used to search for the driver definition file.
-@xref{Output devices}.  @xref{File locations}.  Default: @code{devices}.
-
-@item STAT_OUTPUT_INIT_PATH
-
-The path used to search for the driver definition file.
-@xref{File locations}.  Default: the standard configuration path.
-
-@item TMPDIR
-
-The directory in which PSPP stores its temporary files (used when sorting 
-cases or concatenating large numbers of cases).
-Default: (UNIX) @file{/tmp}, (MS-DOS) @file{\}, (other OSes) empty string.
-
-@item TEMP
-@item TMP
-
-Under MS-DOS only, these variables are consulted after TMPDIR, in this
-order.
-@end table
index 1bad334e95b60a1dc0c7872ada8f2bff4b28b5a8..fc521caee6beb8411803b4196fc850ec90fc04db 100644 (file)
@@ -826,8 +826,7 @@ random variates between 0 and 10.
 LIST
         /VARIABLES=var_list
         /CASES=FROM start_index TO end_index BY incr_index
-        /FORMAT=@{UNNUMBERED,NUMBERED@} @{WRAP,SINGLE@} 
-                @{NOWEIGHT,WEIGHT@}
+        /FORMAT=@{UNNUMBERED,NUMBERED@} @{WRAP,SINGLE@}
 @end display
 
 The @cmd{LIST} procedure prints the values of specified variables to the
@@ -846,9 +845,7 @@ settings.  If CASES is not specified then all cases are printed.
 The FORMAT subcommand can be used to change the output format.  NUMBERED
 will print case numbers along with each case; UNNUMBERED, the default,
 causes the case numbers to be omitted.  The WRAP and SINGLE settings are
-currently not used.  WEIGHT will cause case weights to be printed along
-with variable values; NOWEIGHT, the default, causes case weights to be
-omitted from the output.
+currently not used.
 
 Case numbers start from 1.  They are counted after all transformations
 have been considered.
index 06652d62653b1ec21ccdbc387f8993ae8f762b1f..f1347379347af558112140837de5cfe0b06e859c 100644 (file)
@@ -2106,17 +2106,23 @@ if through a call to @code{var_create} with those arguments
 of variables, and returns the new variable.
 @end deftypefun
 
-@deftypefun {struct variable *} dict_clone_var (struct dictionary *@var{dict}, const struct variable *@var{old_var}, const char *@var{name})
-@deftypefunx {struct variable *} dict_clone_var_assert (struct dictionary *@var{dict}, const struct variable *@var{old_var}, const char *@var{name})
+@deftypefun {struct variable *} dict_clone_var (struct dictionary *@var{dict}, const struct variable *@var{old_var})
+@deftypefunx {struct variable *} dict_clone_var_assert (struct dictionary *@var{dict}, const struct variable *@var{old_var})
 Creates a new variable as a clone of @var{var}, inserts the new
-variable into @var{dict}, and returns the new variable.  The new
-variable is named @var{name}.  Other properties of the new variable
-are copied from @var{old_var}, except for those not copied by
-@code{var_clone} (@pxref{var_clone}).
+variable into @var{dict}, and returns the new variable.  Other
+properties of the new variable are copied from @var{old_var}, except
+for those not copied by @code{var_clone} (@pxref{var_clone}).
 
 @var{var} does not need to be a member of any dictionary.
 @end deftypefun
 
+@deftypefun {struct variable *} dict_clone_var_as (struct dictionary *@var{dict}, const struct variable *@var{old_var}, const char *@var{name})
+@deftypefunx {struct variable *} dict_clone_var_as_assert (struct dictionary *@var{dict}, const struct variable *@var{old_var}, const char *@var{name})
+These functions are similar to @code{dict_clone_var} and
+@code{dict_clone_var_assert}, respectively, except that the new
+variable is named @var{name} instead of keeping @var{old_var}'s name.
+@end deftypefun
+
 @node Dictionary Deleting Variables
 @subsection Deleting Variables
 
index a404d0d6ce3961eed3ca1ec134a2ff9f6140adac..972b1331b4fb0f0be54ff7b2118f8bb204a71293 100644 (file)
@@ -5,8 +5,10 @@ A system file encapsulates a set of cases and dictionary information
 that describes how they may be interpreted.  This chapter describes
 the format of a system file.
 
-System files use three data types: 8-bit characters, 32-bit integers,
-and 64-bit floating points, called here @code{char}, @code{int32}, and
+System files use four data types: 8-bit characters, 32-bit integers,
+64-bit integers, 
+and 64-bit floating points, called here @code{char}, @code{int32},
+@code{int64}, and
 @code{flt64}, respectively.  Data is not necessarily aligned on a word
 or double-word boundary: the long variable name record (@pxref{Long
 Variable Names Record}) and very long string records (@pxref{Very Long
@@ -58,24 +60,7 @@ if present.
 Document record, if present.
 
 @item
-Any of the following records, if present, in any order:
-
-@itemize @minus
-@item
-Machine integer info record.
-
-@item
-Machine floating-point info record.
-
-@item
-Variable display parameter record.
-
-@item
-Long variable names record.
-
-@item
-Miscellaneous informational records.
-@end itemize
+Any records not explicitly included in this list, in any order.
 
 @item
 Dictionary termination record.
@@ -93,12 +78,14 @@ Each type of record is described separately below.
 * Document Record::
 * Machine Integer Info Record::
 * Machine Floating-Point Info Record::
+* Multiple Response Sets Records::
 * Variable Display Parameter Record::
 * Long Variable Names Record::
 * Very Long String Record::
 * Character Encoding Record::
 * Long String Value Labels Record::
 * Data File and Variable Attributes Records::
+* Extended Number of Cases Record::
 * Miscellaneous Informational Records::
 * Dictionary Termination Record::
 * Data Record::
@@ -166,7 +153,7 @@ In the general case it is not possible to determine the number of cases
 that will be output to a system file at the time that the header is
 written.  The way that this is dealt with is by writing the entire
 system file, including the header, then seeking back to the beginning of
-the file and writing just the @code{ncases} field.  For `files' in which
+the file and writing just the @code{ncases} field.  For files in which
 this is not valid, the seek operation fails.  In this case,
 @code{ncases} remains -1.
 
@@ -280,8 +267,10 @@ stops (@samp{.}).  The variable name is padded on the right with spaces.
 
 @item int32 label_len;
 This field is present only if @code{has_var_label} is set to 1.  It is
-set to the length, in characters, of the variable label, which must be a
-number between 0 and 120.
+set to the length, in characters, of the variable label.  The
+documented maximum length varies from 120 to 255 based on SPSS
+version, but some files have been seen with longer labels.  PSPP
+accepts longer labels and truncates them to 255 bytes on input.
 
 @item char label[];
 This field is present only if @code{has_var_label} is set to 1.  It has
@@ -439,7 +428,9 @@ in length.  Its type and width cannot be determined until the
 following value label variables record (see below) is read.
 
 @item char label_len;
-The label's length, in bytes.
+The label's length, in bytes.  The documented maximum length varies
+from 60 to 120 based on SPSS version.  PSPP supports value labels up
+to 255 bytes long.
 
 @item char label[];
 @code{label_len} bytes of the actual label, followed by up to 7 bytes
@@ -609,6 +600,129 @@ The value used for HIGHEST in missing values.
 The value used for LOWEST in missing values.
 @end table
 
+@node Multiple Response Sets Records
+@section Multiple Response Sets Records
+
+The system file format has two different types of records that
+represent multiple response sets (@pxref{MRSETS,,,pspp, PSPP Users
+Guide}).  The first type of record describes multiple response sets
+that can be understood by SPSS before version 14.  The second type of
+record, with a closely related format, is used for multiple dichotomy
+sets that use the CATEGORYLABELS=COUNTEDVALUES feature added in
+version 14.
+
+@example
+/* @r{Header.} */
+int32               rec_type;
+int32               subtype;
+int32               size;
+int32               count;
+
+/* @r{Exactly @code{count} bytes of data.} */
+char                mrsets[];
+@end example
+
+@table @code
+@item int32 rec_type;
+Record type.  Always set to 7.
+
+@item int32 subtype;
+Record subtype.  Set to 7 for records that describe multiple response
+sets understood by SPSS before version 14, or to 19 for records that
+describe dichotomy sets that use the CATEGORYLABELS=COUNTEDVALUES
+feature added in version 14.
+
+@item int32 size;
+The size of each element in the @code{mrsets} member. Always set to 1.
+
+@item int32 count;
+The total number of bytes in @code{mrsets}.
+
+@item char mrsets[];
+A series of multiple response sets, each of which consists of the
+following:
+
+@itemize @bullet
+@item
+The set's name (an identifier that begins with @samp{$}).
+
+@item
+An equals sign (@samp{=}).
+
+@item
+@samp{C} for a multiple category set, @samp{D} for a multiple
+dichotomy set with CATEGORYLABELS=VARLABELS, or @samp{E} for a
+multiple dichotomy set with CATEGORYLABELS=COUNTEDVALUES.
+
+@item
+For a multiple dichotomy set with CATEGORYLABELS=COUNTEDVALUES, a
+space, followed by a number expressed as decimal digits, followed by a
+space.  If LABELSOURCE=VARLABEL was specified on MRSETS, then the
+number is 11; otherwise it is 1.@footnote{This part of the format may
+not be fully understood, because only a single example of each
+possibility has been examined.}
+
+@item
+For either kind of multiple dichotomy set, the counted value, as a
+positive integer count specified as decimal digits, followed by a
+space, followed by as many string bytes as specified in the count.  If
+the set contains numeric variables, the string consists of the counted
+integer value expressed as decimal digits.  If the set contains string
+variables, the string contains the counted string value.  Either way,
+the string may be padded on the right with spaces (older versions of
+SPSS seem to always pad to a width of 8 bytes; newer versions don't).
+
+@item
+A space.
+
+@item
+The multiple response set's label, using the same format as for the
+counted value for multiple dichotomy sets.  A string of length 0 means
+that the set does not have a label.  A string of length 0 is also
+written if LABELSOURCE=VARLABEL was specified.
+
+@item
+A space.
+
+@item
+The names of the variables in the set, each separated from the
+previous by a single space.
+
+@item
+A line feed (byte 0x0a).
+@end itemize
+@end table
+
+Example: Given appropriate variable definitions, consider the
+following MRSETS command:
+
+@example
+MRSETS /MCGROUP NAME=$a LABEL='my mcgroup' VARIABLES=a b c
+       /MDGROUP NAME=$b VARIABLES=g e f d VALUE=55
+       /MDGROUP NAME=$c LABEL='mdgroup #2' VARIABLES=h i j VALUE='Yes'
+       /MDGROUP NAME=$d LABEL='third mdgroup' CATEGORYLABELS=COUNTEDVALUES
+        VARIABLES=k l m VALUE=34
+       /MDGROUP NAME=$e CATEGORYLABELS=COUNTEDVALUES LABELSOURCE=VARLABEL
+        VARIABLES=n o p VALUE='choice'.
+@end example
+
+The above would generate the following multiple response set record of
+subtype 7:
+
+@example
+$a=C 10 my mcgroup a b c
+$b=D2 55 0  g e f d
+$c=D3 Yes 10 mdgroup #2 h i j
+@end example
+
+It would also generate the following multiple response set record with
+subtype 19:
+
+@example
+$d=E 1 2 34 13 third mdgroup k l m
+$e=E 11 6 choice 0  n o p
+@end example
+
 @node Variable Display Parameter Record
 @section Variable Display Parameter Record
 
@@ -973,7 +1087,8 @@ element.
 In record type 18, this field contains a sequence of one or more
 variable attribute sets.  If more than one variable attribute set is
 present, each one after the first is delimited from the previous by
-@code{/}.  Each variable attribute set consists of a variable name,
+@code{/}.  Each variable attribute set consists of a (potentially
+long) variable name,
 followed by @code{:}, followed by an attribute set with the same
 syntax as on record type 17.
 
@@ -1000,6 +1115,45 @@ will contain a variable attribute record with the following contents:
 00000030  0a 29                                             |.)              |
 @end example
 
+@node Extended Number of Cases Record
+@section Extended Number of Cases Record
+
+The file header record expresses the number of cases in the system
+file as an int32 (@pxref{File Header Record}).  This record allows the
+number of cases in the system file to be expressed as a 64-bit number.
+
+@example
+int32               rec_type;
+int32               subtype;
+int32               size;
+int32               count;
+int64               unknown;
+int64               ncases64;
+@end example
+
+@table @code
+@item int32 rec_type;
+Record type.  Always set to 7.
+
+@item int32 subtype;
+Record subtype.  Always set to 16.
+
+@item int32 size;
+Size of each element.  Always set to 8.
+
+@item int32 count;
+Number of pieces of data in the data part.  Alway set to 2.
+
+@item int64 unknown;
+Meaning unknown.  Always set to 1.
+
+@item int64 ncases64;
+Number of cases in the file as a 64-bit integer.  Presumably this
+could be -1 to indicate that the number of cases is unknown, for the
+same reason as @code{ncases} in the file header record, but this has
+not been observed in the wild.
+@end table
+
 @node Miscellaneous Informational Records
 @section Miscellaneous Informational Records
 
@@ -1093,6 +1247,9 @@ value @var{code} - @var{bias}, where
 variable @code{bias} from the file header.  For example,
 code 105 with bias 100.0 (the normal value) indicates a numeric variable
 of value 5.
+One file has been seen written by SPSS 14 that contained such a code
+in a @emph{string} field with the value 0 (after the bias is
+subtracted) as a way of encoding null bytes.
 
 @item 252
 End of file.  This code may or may not appear at the end of the data
index 3ab5da10bdeb53c765d8c9297c31efb430b14807..8711c1ae04ca2761b9aa938f330fefd5116a0d12 100644 (file)
@@ -1,12 +1,15 @@
 @node GNU Free Documentation License
 @appendix GNU Free Documentation License
 
-@cindex FDL, GNU Free Documentation License
-@center Version 1.2, November 2002
+@c The GNU Free Documentation License.
+@center Version 1.3, 3 November 2008
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
 
 @display
-Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
-51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
+Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+@uref{http://fsf.org/}
 
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
@@ -111,6 +114,9 @@ formats which do not have any title page as such, ``Title Page'' means
 the text near the most prominent appearance of the work's title,
 preceding the beginning of the body of the text.
 
+The ``publisher'' means any person or entity that distributes copies
+of the Document to the public.
+
 A section ``Entitled XYZ'' means a named subunit of the Document whose
 title either is precisely XYZ or contains XYZ in parentheses following
 text that translates XYZ in another language.  (Here XYZ stands for a
@@ -379,13 +385,30 @@ title.
 @item
 TERMINATION
 
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License.  Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License.  However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
 
 @item
 FUTURE REVISIONS OF THIS LICENSE
@@ -403,11 +426,46 @@ following the terms and conditions either of that specified version or
 of any later version that has been published (not as a draft) by the
 Free Software Foundation.  If the Document does not specify a version
 number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
+as a draft) by the Free Software Foundation.  If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+@item
+RELICENSING
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works.  A
+public wiki that anybody can edit is an example of such a server.  A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
 @end enumerate
 
 @page
-@appendixsec ADDENDUM: How to use this License for your documents
+@heading ADDENDUM: How to use this License for your documents
 
 To use this License in a document you have written, include a copy of
 the License in the document and put the following copyright and
@@ -417,7 +475,7 @@ license notices just after the title page:
 @group
   Copyright (C)  @var{year}  @var{your name}.
   Permission is granted to copy, distribute and/or modify this document
-  under the terms of the GNU Free Documentation License, Version 1.2
+  under the terms of the GNU Free Documentation License, Version 1.3
   or any later version published by the Free Software Foundation;
   with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
   Texts.  A copy of the license is included in the section entitled ``GNU
@@ -426,7 +484,7 @@ license notices just after the title page:
 @end smallexample
 
 If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the ``with...Texts.'' line with this:
+replace the ``with@dots{}Texts.'' line with this:
 
 @smallexample
 @group
index 735a54c5a20720859c62c4103f3b4ff1afb5b253..f96a2329e3747afa6b6cafc7e5142626a4208ead 100644 (file)
@@ -15,15 +15,15 @@ later in this manual.
 @cindex files, PSPP
 @cindex output, PSPP
 @cindex PostScript
+@cindex PDF
+@cindex HTML
+@cindex SVG
 @cindex graphics
 @cindex Ghostscript
 @cindex Free Software Foundation
-PSPP produces output in two forms: tables and charts.  Both of these can
-be written in several formats; currently, ASCII, PostScript, and HTML
-are supported.  In the future, more drivers, such as PCL and X Window
-System drivers, may be developed.  For now, Ghostscript, available from
-the Free Software Foundation, may be used to convert PostScript chart
-output to other formats.
+PSPP produces tables and charts as output, which it can produce in
+several formats; currently, ASCII, PostScript, PDF, HTML, and SVG are
+supported.
 
 The current version of PSPP, @value{VERSION}, is woefully incomplete in
 terms of its statistical procedure support.  PSPP is a work in progress.
index 3052162fddbfac4af381b3e3e1966c7f3e0704f8..830d176463baccdb4f8de9261b162bc30954907b 100644 (file)
-@node Invocation
-
-@chapter Starting PSPP
+@node Invoking PSPP
+@chapter Invoking @command{pspp}
 @cindex invocation
 @cindex PSPP, invoking
 
-There are two separate user interfaces for PSPP.
-There is the command line interface, which responds to commands
-typed by the user.
-The command line interface is generally available on more platforms
-than the graphic user interface and since it doesn't require a
-graphics device it can be used from a remote terminal.
-Platforms which have a windowing system may also be able to support
-the graphic user interface.
-The graphic user interface can perform all functionality of the
-command line interface.
-In addition it gives an instantaneous view of the data, variables and
-statistical output.
-
-Whichever interface you choose, a basic understanding of the concepts
-used by PSPP is necessary before effective use of the system can be achieved.
+PSPP has two separate user interfaces.  This chapter describes
+@command{pspp}, PSPP's command-line driven text-based user interface.
+The following chapter briefly describes PSPPIRE, the graphical user
+interface to PSPP.
 
+The sections below describe the @command{pspp} program's command-line
+interface.
 
 @menu
-* The command line user interface::  
-* The graphic user interface::  
+* Main Options::                
+* PDF PostScript and SVG Output Options::  
+* Plain Text Output Options::   
+* HTML Output Options::         
+* OpenDocument Output Options::  
+* Comma-Separated Value Output Options::  
 @end menu
 
+@node Main Options
+@section Main Options
 
-@node The command line user interface
-@section The command line user interface
+Here is a summary of all the options, grouped by type, followed by
+explanations in the same order.
 
-@cindex command line, options
-@cindex options, command-line
+In the table, arguments to long options also apply to any
+corresponding short options.
 
+@table @emph
+@item Non-option arguments
 @example
-pspp [ -B @var{dir} | --config-dir=@var{dir} ] [ -o @var{device} | --device=@var{device} ]
-       [ -a @{compatible|enhanced@} | --algorithm=@{compatible|enhanced@}]
-       [ -x @{compatible|enhanced@} | --syntax=@{compatible|enhanced@}]
-       [ -I- | --no-include ]
-       [ -I @var{dir} | --include=@var{dir} ] [ -i | --interactive ] 
-       [ -r | --no-statrc ] [ -h | --help ] [ -l | --list ] 
-       [ -s | --safer ]
-       [ --testing-mode ] [ -V | --version ] [ -v | --verbose ] 
-       [ @var{key}=@var{value} ] @var{file}@enddots{}
+@var{syntax-file}
 @end example
 
-@menu
-* Non-option Arguments::        Specifying syntax files and output devices.
-* Configuration Options::       Change the configuration for the current run.
-* Input and output options::    Controlling input and output files.
-* Language control options::    Language variants.
-* Informational options::       Helpful information about PSPP.
-@end menu
-
-@node Non-option Arguments
-@subsection Non-option Arguments
-
-Syntax files and output device substitutions can be specified on
-PSPP's command line:
-
-@table @code
-@item @var{file}
-
-A file by itself on the command line will be executed as a syntax file.
-If multiple files are specified, they are executed in order, as if
-their contents had been given in a single file.
-PSPP terminates after the syntax files run, unless the @code{-i} or
-@code{--interactive} option is given (@pxref{Language control options}).
-
-@item @var{key}=@var{value}
-
-Defines an output device macro @var{key} to expand to @var{value},
-overriding any macro having the same @var{key} defined in the device
-configuration file.  @xref{Macro definitions}.
-
-@end table
-
-There is one other way to specify a syntax file, if your operating
-system supports it.  If you have a syntax file @file{foobar.stat}, put
-the notation
-
+@item Output options
 @example
-#! /usr/local/bin/pspp
+-o, --output=@var{output-file}
+-O @var{option}=@var{value}
+-O format=@var{format}
+-O device=@{terminal|listing@}
+-e, --error-file=@var{error-file}
 @end example
 
-at the top, and mark the file as executable with @code{chmod +x
-foobar.stat}.  (If PSPP is not installed in @file{/usr/local/bin},
-then insert its actual installation directory into the syntax file
-instead.)  Now you should be able to invoke the syntax file just by
-typing its name.  You can include any options on the command line as
-usual.  PSPP entirely ignores any lines beginning with @samp{#!}.
-
-@node Configuration Options
-@subsection Configuration Options
-
-Configuration options are used to change PSPP's configuration for the
-current run.  The configuration options are:
-
-@table @code
-@item -a @{compatible|enhanced@}
-@itemx --algorithm=@{compatible|enhanced@}
-
-If you chose @code{compatible}, then PSPP will use the same  algorithms 
-as used by some proprietary statistical analysis packages.
-This is not recommended, as  these algorithms are inferior and in some cases 
-compeletely broken.
-The default setting is @code{enhanced}.
-Certain commands have subcommands which allow you to override this setting on 
-a per command basis.
-
-@item -B @var{dir}
-@itemx --config-dir=@var{dir}
-
-Sets the configuration directory to @var{dir}.  @xref{File locations}.
+@item Language options
+@example
+-I, --include=@var{dir}
+-I-, --no-include
+-i, --interactive
+-r, --no-statrc
+-a, --algorithm=@{compatible|enhanced@}
+-x, --syntax=@{compatible|enhanced@}
+@end example
 
-@item -o @var{device}
-@itemx --device=@var{device}
+@item Informational options
+@example
+-h, --help
+-V, --version
+@end example
 
-Selects the output device with name @var{device}.  If this option is
-given more than once, then all devices mentioned are selected.  This
-option disables all devices besides those mentioned on the command line.
+@item Other options
+@example
+-s, --safer
+--testing-mode
+@end example
 @end table
 
-@node Input and output options
-@subsection Input and output options
-
-Input and output options affect how PSPP reads input and writes
-output.  These are the input and output options:
-
 @table @code
-@item -I-
-@itemx --no-include
-
-Clears all directories from the include path.  This includes all
-directories put in the include path by default.  @xref{Miscellaneous
-configuring}.
+@item @var{syntax-file}
+Read and execute the named syntax file.  If no syntax files are
+specified, PSPP prompts for commands.  If any syntax files are
+specified, PSPP by default exits after it runs them, but you may make
+it prompt for commands by specifying @samp{-} as an additional syntax
+file.
+
+@item -o @var{output-file}
+Write output to @var{output-file}.  PSPP has several different output
+drivers that support output in various formats (use @option{--help} to
+list the available formats).  Specify this option more than once to
+produce multiple output files, presumably in different formats.
+
+Use @samp{-} as @var{output-file} to write output to standard output.
+
+If no @option{-o} option is used, then PSPP writes output to standard
+output in plain text format.
+
+@item -O @var{option}=@var{value}
+Sets an option for the output file configured by a preceding
+@option{-o}.  Most options are specific to particular output formats.
+A few options that apply generically are listed below.
+
+@item -O format=@var{format}
+PSPP uses the extension of the file name given on @option{-o} to
+select an output format.  Use this option to override this choice by
+specifying an alternate format, e.g.@: @option{-o pspp.out -O html} to
+write HTML to a file named @file{pspp.out}.  Use @option{--help} to
+list the available formats.
+
+@item -O device=@{terminal|listing@}
+Sets whether PSPP considers the output device configured by the
+preceding @option{-o} to be a terminal or a listing device.  This
+affects what output will be sent to the device, as configured by the
+SET command's output routing subcommands (@pxref{SET}).  By default,
+output written to standard output is considered a terminal device and
+other output is considered a listing device.
+
+@item -e @var{error-file}
+@itemx --error-file=@var{error-file}
+Configures a file to receive PSPP error, warning, and note messages in
+plain text format.  Use @samp{-} as @var{error-file} to write messages
+to standard output.  The default error file is standard output in the
+absence of these options, but this is suppressed if an output device
+writes to standard output (or another terminal), to avoid printing
+every message twice.  Use @samp{none} as @var{error-file} to
+explicitly suppress the default.
 
 @item -I @var{dir}
 @itemx --include=@var{dir}
+Appends @var{dir} to the set of directories searched by INCLUDE
+(@pxref{INCLUDE}) and INSERT (@pxref{INSERT}).
 
-Appends directory @var{dir} to the path that is searched for include
-files in PSPP syntax files.
-
-@item --testing-mode
-
-Invoke heuristics to assist with testing PSPP.  For use by @code{make
-check} and similar scripts.
-@end table
-
-@node Language control options
-@subsection Language control options
-
-Language control options control how PSPP syntax files are parsed and
-interpreted.  The available language control options are:
+@item -I-
+@itemx --no-include
+Clears all directories from the include path, including directories
+inserted in the include path by default.  The default include path is
+@file{.} (the current directory), followed by @file{.pspp} in the
+user's home directory, followed by PSPP's system configuration
+directory (usually @file{/etc/pspp} or @file{/usr/local/etc/pspp}).
 
-@table @code
 @item -i
 @itemx --interactive
-
-When a syntax file is specified on the command line, PSPP normally
-terminates after processing it.  Giving this option will cause PSPP to
-bring up a command prompt after processing the syntax file.
-
-In addition, this forces syntax files to be interpreted in interactive
-mode, rather than the default batch mode.  @xref{Tokenizing lines}, for
-information on the differences between batch mode and interactive mode
-command interpretation.
+This option forces syntax files to be interpreted in interactive
+mode, rather than the default batch mode.  @xref{Syntax Variants}, for
+a description of the differences.
 
 @item -r
 @itemx --no-statrc
+Disables running @file{rc} at PSPP startup time.
+
+@item -a @{enhanced|compatible@}
+@itemx --algorithm=@{enhanced|compatible@}
+With @code{enhanced}, the default, PSPP uses the best implemented
+algorithms for statistical procedures.  With @code{compatible},
+however, PSPP will in some cases use inferior algorithms to produce
+the same results as the proprietary program SPSS.
+
+Some commands have subcommands that override this setting on a per
+command basis.
+
+@item -x @{enhanced|compatible@}
+@itemx --syntax=@{enhanced|compatible@}
+With @code{enhanced}, the default, PSPP accepts its own extensions
+beyond those compatible with the proprietary program SPSS.  With
+@code{compatible}, PSPP rejects syntax that uses these extensions.
+
+@item -?
+@itemx --help
+Prints a message describing PSPP command-line syntax and the available
+device formats, then exits.
 
-Prevents the execution of the PSPP startup syntax file.
+@item -V
+@itemx --version
+Prints a brief message listing PSPP's version, warranties you don't
+have, copying conditions and copyright, and e-mail address for bug
+reports, then exits.
 
 @item -s
 @itemx --safer
-
 Disables certain unsafe operations.  This includes the ERASE and
 HOST commands, as well as use of pipes as input and output files.
-@end table
-
-@node Informational options
-@subsection Informational options
-
-Informational options cause information about PSPP to be written to
-the terminal.  Here are the available options:
-
-@table @code
-@item -h
-@item --help
-
-Prints a message describing PSPP command-line syntax and the available
-device driver classes, then terminates.
 
-@item -l
-@item --list
+@item --testing-mode
+Invoke heuristics to assist with testing PSPP.  For use by @code{make
+check} and similar scripts.
+@end table
 
-Lists the available device driver classes, then terminates.
+@node PDF PostScript and SVG Output Options
+@section PDF, PostScript, and SVG Output Options
 
-@item -x @{compatible|enhanced@}
-@itemx --syntax=@{compatible|enhanced@}
+To produce output in PDF, PostScript, and SVG formats, specify
+@option{-o @var{file}} on the PSPP command line, optionally followed
+by any of the options shown in the table below to customize the output
+format.
 
-If you chose @code{compatible}, then PSPP will only accept command syntax that 
-is compatible with the proprietary program SPSS.
-If you choose @code{enhanced} then additional syntax will be available.
-The default is @code{enhanced}.
+PDF, PostScript, and SVG output is only available if your installation
+of PSPP was compiled with the Cairo library.
 
+@table @code
+@item -O format=@{pdf|ps|svg@}
+Specify the output format.  This is only necessary if the file name
+given on @option{-o} does not end in @file{.pdf}, @file{.ps}, or
+@file{.svg}.
+
+@item -O paper-size=@var{paper-size}
+Paper size, as a name (e.g.@: @code{a4}, @code{letter}) or
+measurements (e.g.@: @code{210x297}, @code{8.5x11in}).
+
+The default paper size is taken from the @env{PAPERSIZE} environment
+variable or the file indicated by the @env{PAPERCONF} environment
+variable, if either variable is set.  If not, and your system supports
+the @code{LC_PAPER} locale category, then the default paper size is
+taken from the locale.  Otherwise, if @file{/etc/papersize} exists,
+the default paper size is read from it.  As a last resort, A4 paper is
+assumed.
+
+@item -O orientation=@var{orientation}
+Either @code{portrait} or @code{landscape}.  Default: @code{portrait}.
+
+@item -O headers=@var{boolean}
+When enabled, headers showing the time and date, title and subtitle,
+and page number are printed at the top of each page.  Default:
+@code{on}.
+
+@item -O left-margin=@var{dimension}
+@itemx -O right-margin=@var{dimension}
+@itemx -O top-margin=@var{dimension}
+@itemx -O bottom-margin=@var{dimension}
+Sets the margins around the page.  The headers, if enabled, are not
+included in the margins; they are in addition to the margins.  See
+below for the allowed forms of @var{dimension} Default: @code{0.5in}.
+
+@item -O prop-font=@var{font-name}
+@itemx -O emph-font=@var{font-name}
+@itemx -O fixed-font=@var{font-name}
+Sets the font used for proportional, emphasized, or fixed-pitch text.
+Most systems support CSS-like font names such as ``serif'' and
+``monospace'', but a wide range of system-specific font are likely to
+be supported as well.
+
+Default: proportional font @code{serif}, emphasis font @code{serif
+italic}, fixed-pitch font @code{monospace}.
+
+@item -O font-size=@var{font-size}
+Sets the size of the default fonts, in thousandths of a point.  Default:
+10000 (10 point).
+
+@item -O line-gutter=@var{dimension}
+Sets the width of white space on either side of lines that border text
+or graphics objects.  Default: @code{1pt}.
+
+@item -O line-spacing=@var{dimension}
+Sets the spacing between the lines in a double line in a table.
+Default: @code{1pt}.
+
+@item -O line-width=@var{dimension}
+Sets the width of the lines used in tables.  Default: @code{0.5pt}.
+@end table
 
-@item -V
-@item --version
+Each @var{dimension} value above may be specified in various units
+based on its suffix: @samp{mm} for millimeters, @samp{in} for inches,
+or @samp{pt} for points.  Lacking a suffix, numbers below 50 are
+assumed to be in inches and those about 50 are assumed to be in
+millimeters.
 
-Prints a brief message listing PSPP's version, warranties you don't
-have, copying conditions and copyright, and e-mail address for bug
-reports, then terminates.
+@node Plain Text Output Options
+@section Plain Text Output Options
 
-@item -v
-@item --verbose
+PSPP can produce plain text output, drawing boxes using ASCII or
+Unicode line drawing characters.  To produce plain text output,
+specify @option{-o @var{file}} on the PSPP command line, optionally
+followed by options from the table below to customize the output
+format.
 
-Increments PSPP's verbosity level.  Higher verbosity levels cause
-PSPP to display greater amounts of information about what it is
-doing.  Often useful for debugging PSPP's configuration.  
+@table @code
+@item -O format=txt
+Specify the output format.  This is only necessary if the file name
+given on @option{-o} does not end in @file{.txt} or @file{.list}.
+
+@item -O charts=@{@var{template}.png|none@}
+Name for chart files included in output.  The value should be a file
+name that includes a single @samp{#} and ends in @file{png}.  When a
+chart is output, the @samp{#} is replaced by the chart number.  The
+default is the file name specified on @option{-o} with the extension
+stripped off and replaced by @file{-#.png}.
+
+Specify @code{none} to disable chart output.  Charts are always
+disabled if your installation of PSPP was compiled without the
+Cairo library.
+
+@item -O paginate=@var{boolean}
+If set, PSPP writes an ASCII formfeed the end of every page.  Default:
+@code{off}.
+
+@item -O headers=@var{boolean}
+If enabled, PSPP prints two lines of header information giving title
+and subtitle, page number, date and time, and PSPP version are printed
+at the top of every page.  These two lines are in addition to any top
+margin requested.  Default: @code{off}.
+
+@item -O length=@var{line-count}
+Physical length of a page.  Headers and margins are subtracted from
+this value.  You may specify the number of lines as a number, or for
+screen output you may specify @code{auto} to track the height of the
+terminal as it changes.  Default: @code{66}.
+
+@item -O width=@var{character-count}
+Width of a page, in characters.  Margins are subtracted from this
+value.  For screen output you may specify @code{auto} in place of a
+number to track the width of the terminal as it changes.  Default:
+@code{79}.
+
+@item -O top-margin=@var{top-margin-lines}
+Length of the top margin, in lines.  PSPP subtracts this value from
+the page length.  Default: @code{0}.
+
+@item -O bottom-margin=@var{bottom-margin-lines}
+Length of the bottom margin, in lines.  PSPP subtracts this value from
+the page length.  Default: @code{0}.
+
+@item -O box[@var{line-type}]=@var{box-chars}
+Sets the characters used for lines in tables.  @var{line-type} is a
+4-digit number that indicates the type of line to change, in the order
+`right', `bottom', `left', `top'.  Each digit is 0 for ``no line'', 1
+for a single line, and 2 for a double line.  @var{box-chars} is the
+character or string of characters to use for this type of line.
+
+For example, @code{box[0101]="|"} sets @samp{|} as the character to
+use for a single-width vertical line, and @code{box[1100]="\xda"} sets
+@samp{"\xda"}, which on MS-DOS is suitable for the top-left corner of
+a box, as the character for the intersection of two single-width
+lines, one each from the right and bottom.
+
+The defaults use @samp{-}, @samp{|}, and @samp{+} for single-width
+lines and @samp{=} and @samp{#} for double-width lines.
+
+@item -O init=@var{init-string}
+If set, this string is written at the beginning of each output file.
+It can be used to initialize device features, e.g.@: to enable VT100
+line-drawing characters.
+
+@item -O emphasis=@{none|bold|underline@}
+How to emphasize text.  Bold and underline emphasis are achieved with
+overstriking, which may not be supported by all the software to which
+you might pass the output.  Default: @code{none}.
+@end table
 
-This option can be given multiple times to set the verbosity level to
-that value.  The default verbosity level is 0, in which no informational
-messages will be displayed.
+@node HTML Output Options
+@section HTML Output Options
 
-Higher verbosity levels cause messages to be displayed when the
-corresponding events take place.
+To produce output in HTML format, specify @option{-o @var{file}} on
+the PSPP command line, optionally followed by any of the options shown
+in the table below to customize the output format.
 
-@table @asis
-@item 1
+@table @code
+@item -O format=html
+Specify the output format.  This is only necessary if the file name
+given on @option{-o} does not end in @file{.html}.
 
-Driver and subsystem initializations.
+@item -O charts=@{@var{template}.png|none@}
+Sets the name used for chart files.  @xref{Plain Text Output Options},
+for details.
+@end table
 
-@item 2
+@node OpenDocument Output Options
+@section OpenDocument Output Options
 
-Completion of driver initializations.  Beginning of driver closings.
+To produce output as an OpenDocument text (ODT) document, specify
+@option{-o @var{file}} on the PSPP command line.  If @var{file} does
+not end in @file{.odt}, you must also specify @option{-O format=odt}.
 
-@item 3
+ODT support is only available if your installation of PSPP was
+compiled with the libxml2 library.
 
-Completion of driver closings.
+The OpenDocument output format does not have any configurable options.
 
-@item 4
+@node Comma-Separated Value Output Options
+@section Comma-Separated Value Output Options
 
-Files searched for; success of searches.
+To produce output in comma-separated value (CSV) format, specify
+@option{-o @var{file}} on the PSPP command line, optionally followed
+by any of the options shown in the table below to customize the output
+format.
 
-@item 5
+@table @code
+@item -O format=csv
+Specify the output format.  This is only necessary if the file name
+given on @option{-o} does not end in @file{.csv}.
 
-Individual directories included in file searches.
+@item -O separator=@var{field-separator}
+Sets the character used to separate fields.  The default is a comma
+(@samp{,}).
 @end table
 
-Each verbosity level also includes messages from lower verbosity levels.
+The CSV format used is an extension to that specified in RFC 4180:
 
+@table @asis
+@item Tables
+Each table row is output on a separate line, and each column is output
+as a field.  The contents of a cell that spans multiple rows or
+columns is output only for the top-left row and column; the rest are
+output as empty fields.  When a table has a caption, it is output just
+above the table as a single field prefixed by @samp{Table:}.
+
+@item Text
+Text in output is printed as a field on a line by itself.  The TITLE
+and SUBTITLE produce similar output, prefixed by @samp{Title:} or
+@samp{Subtitle:}, respectively.
+
+@item Messages
+Errors, warnings, and notes are printed the same way as text.
+
+@item Charts
+Charts are not included in CSV output.
 @end table
 
+Successive output items are separated by a blank line.
 
-@node The graphic user interface
+@node Invoking PSPPIRE
+@chapter Invoking @command{psppire}
 @section The graphic user interface
-
 @cindex Graphic user interface
 @cindex PSPPIRE
 
+The PSPPIRE graphic user interface for PSPP can perform all
+functionality of the command line interface.  In addition it gives an
+instantaneous view of the data, variables and statistical output.
+
 The graphic user interface can be started by typing @command{psppire} at a 
 command prompt.
 Alternatively many systems have a system of interactive menus or buttons 
index e23a558028805dbc9babcb360811d34c87258434..19c9a6b9dc72593d76ec80ba7ba4722bf71e3772 100644 (file)
@@ -3,10 +3,6 @@
 @cindex language, PSPP
 @cindex PSPP, language
 
-@note{PSPP is not even close to completion.
-Only a few statistical procedures are implemented.  PSPP
-is a work in progress.}
-
 This chapter discusses elements common to many PSPP commands.
 Later chapters will describe individual commands in detail.
 
@@ -212,9 +208,9 @@ new command, which allows for visual indentation of a command without
 that command being considered part of the previous command. 
 The period terminating the end of a command is optional but recommended.
 
-In interactive mode, each command must  either be terminated with a period,
-or an empty line must follow the command.
-The use of (@samp{+} and @samp{@minus{}} as continuation characters is not
+In interactive mode, each command must be terminated with a period
+or by a blank line.
+The use of @samp{+} and @samp{@minus{}} as continuation characters is not
 permitted.
 
 @node Types of Commands
index 4b92654da31cbe63f151441875b0d7c06b1e11de..41b8566c9e31fef4c0207c3b48d54476e5399644 100644 (file)
 This manual is for GNU PSPP version @value{VERSION},
 software for statistical analysis.
 
-Copyright @copyright{} 1997, 1998, 2004, 2005, 2007 Free Software Foundation, Inc.
+Copyright @copyright{} 1997, 1998, 2004, 2005, 2007, 2010 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
-modify this GNU manual.''
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+A copy of the license is included in the section entitled "GNU
+Free Documentation License".
 @end quotation
 @end copying
 
index 562b328dbab3bb595574c9ee804d66703dc1d407..18828047118e03742ccbdc4c7140b93468d63e04 100644 (file)
@@ -33,6 +33,7 @@
 @dircategory Math
 @direntry
 * PSPP: (pspp).             Statistical analysis package.
+* PSPPIRE: (pspp).          Graphical user interface to PSPP.
 @end direntry
 
 @copying
@@ -43,15 +44,11 @@ Copyright @copyright{} 1997, 1998, 2004, 2005, 2009 Free Software Foundation, In
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
-modify this GNU manual.''
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+A copy of the license is included in the section entitled "GNU
+Free Documentation License".
 @end quotation
 @end copying
 
@@ -65,9 +62,8 @@ modify this GNU manual.''
 @insertcopying
 @end titlepage
 
-@chapheading Acknowledgements
-The authors wish to thank
-Network Theory Ltd 
+@c @chapheading Acknowledgements
+The authors wish to thank Network Theory Ltd 
 @url{http://www.network-theory.co.uk}
 for their financial support 
 in the production of this manual.
@@ -87,7 +83,8 @@ in the production of this manual.
 * Introduction::                Description of the package.
 * License::                     Your rights and obligations.
 
-* Invocation::                  Starting and running PSPP.
+* Invoking PSPP::               Starting the PSPP text-based interface.
+* Invoking PSPPIRE::            Starting the PSPP graphical user interface.
 * Using PSPP::                  How to use PSPP --- A brief tutorial.
 * Language::                    Basics of the PSPP command language.
 * Expressions::                 Numeric and string expression syntax.
@@ -109,8 +106,6 @@ in the production of this manual.
 * Command Index::               Index of PSPP procedures.
 * Concept Index::               Index of concepts.
 
-* Configuration::               Configuring PSPP.
-
 * GNU Free Documentation License:: License for copying this manual.
 @end menu
 
@@ -137,8 +132,6 @@ in the production of this manual.
 @include command-index.texi
 @include concept-index.texi
 
-@include configuring.texi
-
 @include fdl.texi
 
 @bye
index 63e8f35aef9ba37f540661aee7018c3b6a9fadb4..81e16698c85c6cd63242c3849bc35fe5db6c828d 100644 (file)
@@ -10,6 +10,7 @@ far.
 * EXAMINE::                     Testing data for normality.
 * CORRELATIONS::                Correlation tables.
 * CROSSTABS::                   Crosstabulation tables.
+* FACTOR::                      Factor analysis and Principal Components analysis
 * NPAR TESTS::                  Nonparametric tests.
 * T-TEST::                      Test hypotheses about means.
 * ONEWAY::                      One way analysis of variance.
@@ -117,11 +118,7 @@ respectively.
 FREQUENCIES
         /VARIABLES=var_list
         /FORMAT=@{TABLE,NOTABLE,LIMIT(limit)@}
-                @{STANDARD,CONDENSE,ONEPAGE[(onepage_limit)]@}
-                @{LABELS,NOLABELS@}
                 @{AVALUE,DVALUE,AFREQ,DFREQ@}
-                @{SINGLE,DOUBLE@}
-                @{OLDPAGE,NEWPAGE@}
         /MISSING=@{EXCLUDE,INCLUDE@}
         /STATISTICS=@{DEFAULT,MEAN,SEMEAN,MEDIAN,MODE,STDDEV,VARIANCE,
                      KURTOSIS,SKEWNESS,RANGE,MINIMUM,MAXIMUM,SUM,
@@ -129,8 +126,9 @@ FREQUENCIES
         /NTILES=ntiles
         /PERCENTILES=percent@dots{}
         /HISTOGRAM=[MINIMUM(x_min)] [MAXIMUM(x_max)] 
-                   [@{FREQ,PCNT@}] [@{NONORMAL,NORMAL@}]
-        /PIECHART=[MINIMUM(x_min)] [MAXIMUM(x_max)] @{NOMISSING,MISSING@}
+                   [@{FREQ[(y_max)],PERCENT[(y_max)]@}] [@{NONORMAL,NORMAL@}]
+        /PIECHART=[MINIMUM(x_min)] [MAXIMUM(x_max)]
+                  [@{FREQ,PERCENT@}] [@{NOMISSING,MISSING@}]
 
 (These options are not currently implemented.)
         /BARCHART=@dots{}
@@ -141,11 +139,9 @@ FREQUENCIES
 The @cmd{FREQUENCIES} procedure outputs frequency tables for specified
 variables.
 @cmd{FREQUENCIES} can also calculate and display descriptive statistics
-(including median and mode) and percentiles.
-
-@cmd{FREQUENCIES} also support graphical output in the form of
-histograms and pie charts.  In the future, it will be able to produce
-bar charts and output percentiles for grouped data.
+(including median and mode) and percentiles,
+@cmd{FREQUENCIES} can also output
+histograms and pie charts.  
 
 The VARIABLES subcommand is the only required subcommand.  Specify the
 variables to be analyzed.
@@ -160,30 +156,11 @@ variable specified.  NOTABLE prevents them from being output.  LIMIT
 with a numeric argument causes them to be output except when there are
 more than the specified number of values in the table.
 
-@item
-STANDARD frequency tables contain more complete information, but also to
-take up more space on the printed page.  CONDENSE frequency tables are
-less informative but take up less space.  ONEPAGE with a numeric
-argument will output standard frequency tables if there are the
-specified number of values or less, condensed tables otherwise.  ONEPAGE
-without an argument defaults to a threshold of 50 values.
-
-@item
-LABELS causes value labels to be displayed in STANDARD frequency
-tables.  NOLABLES prevents this.
-
 @item
 Normally frequency tables are sorted in ascending order by value.  This
 is AVALUE.  DVALUE tables are sorted in descending order by value.
 AFREQ and DFREQ tables are sorted in ascending and descending order,
 respectively, by frequency count.
-
-@item
-SINGLE spaced frequency tables are closely spaced.  DOUBLE spaced
-frequency tables have wider spacing.
-
-@item
-OLDPAGE and NEWPAGE are not currently used.
 @end itemize
 
 The MISSING subcommand controls the handling of user-missing values.
@@ -207,13 +184,11 @@ boundaries of the data set divided into the specified number of ranges.
 For instance, @code{/NTILES=4} would cause quartiles to be reported.
 
 The HISTOGRAM subcommand causes the output to include a histogram for
-each specified numeric variable.  The X axis by default ranges from the
-minimum to the maximum value observed in the data, but the MINIMUM and
-MAXIMUM keywords can set an explicit range.  The Y axis by default is
-labeled in frequencies; use the PERCENT keyword to causes it to be
-labeled in percent of the total observed count.  Specify NORMAL to
-superimpose a normal curve on the histogram.
-Histograms are not created for string variables.
+each specified numeric variable.  The X axis by default ranges from
+the minimum to the maximum value observed in the data, but the MINIMUM
+and MAXIMUM keywords can set an explicit range.  Specify NORMAL to
+superimpose a normal curve on the histogram.  Histograms are not
+created for string variables.
 
 The PIECHART adds a pie chart for each variable to the data.  Each
 slice represents one value, with the size of the slice proportional to
@@ -222,6 +197,9 @@ slices.  The MINIMUM and MAXIMUM keywords can be used to limit the
 displayed slices to a given range of values.  The MISSING keyword adds
 slices for missing values.
 
+The FREQ and PERCENT options on HISTOGRAM and PIECHART are accepted
+but not currently honored.
+
 @node EXAMINE
 @comment  node-name,  next,  previous,  up
 @section EXAMINE
@@ -341,7 +319,7 @@ values are excluded as well as system-missing values.
 This is the default.
 
 If LISTWISE is set, then the entire case is excluded from analysis
-whenever any variable  specified in the any @cmd{/VARIABLES} subcommand
+whenever any variable  specified in any @cmd{/VARIABLES} subcommand
 contains a missing value.   
 If PAIRWISE is set, then a case is considered missing only if either of the
 values  for the particular coefficient are missing.
@@ -553,6 +531,108 @@ Approximate T of uncertainty coefficient is wrong.
 
 Fixes for any of these deficiencies would be welcomed.
 
+@node FACTOR
+@section FACTOR
+
+@vindex FACTOR
+@cindex factor analysis
+@cindex principal components analysis
+@cindex principal axis factoring
+@cindex data reduction
+
+@display
+FACTOR  VARIABLES=var_list
+
+        [ /METHOD = @{CORRELATION, COVARIANCE@} ]
+
+        [ /EXTRACTION=@{PC, PAF@}] 
+
+        [ /ROTATION=@{VARIMAX, EQUAMAX, QUARTIMAX, NOROTATE@}]
+
+        [ /PRINT=[INITIAL] [EXTRACTION] [ROTATION] [UNIVARIATE] [CORRELATION] [COVARIANCE] [DET] [SIG] [ALL] [DEFAULT] ]
+
+        [ /PLOT=[EIGEN] ]
+
+        [ /FORMAT=[SORT] [BLANK(@var{n})] [DEFAULT] ]
+
+        [ /CRITERIA=[FACTORS(@var{n})] [MINEIGEN(@var{l})] [ITERATE(@var{m})] [ECONVERGE (@var{delta})] [DEFAULT] ]
+
+        [ /MISSING=[@{LISTWISE, PAIRWISE@}] [@{INCLUDE, EXCLUDE@}] ]
+@end display
+
+The FACTOR command performs Factor Analysis or Principal Axis Factoring on a dataset.  It may be used to find
+common factors in the data or for data reduction purposes.
+
+The VARIABLES subcommand is required.  It lists the variables which are to partake in the analysis.
+
+The /EXTRACTION subcommand is used to specify the way in which factors (components) are extracted from the data.
+If PC is specified, then Principal Components Analysis is used.  If PAF is specified, then Principal Axis Factoring is
+used. By default Principal Components Analysis will be used.
+
+The /ROTATION subcommand is used to specify the method by which the extracted solution will be rotated.
+Three methods are available: VARIMAX (which is the default), EQUAMAX, and QUARTIMAX.
+If don't want any rotation to be performed, the word NOROTATE will prevent the command from performing any
+rotation on the data. Oblique rotations are not supported.
+
+The /METHOD subcommand should be used to determine whether the covariance matrix or the correlation matrix of the data is
+to be analysed.  By default, the correlation matrix is analysed.
+
+The /PRINT subcommand may be used to select which features of the analysis are reported:
+
+@itemize
+@item UNIVARIATE
+      A table of mean values, standard deviations and total weights are printed.
+@item INITIAL
+      Initial communalities and eigenvalues are printed.
+@item EXTRACTION
+      Extracted communalities and eigenvalues are printed.
+@item ROTATION
+      Rotated communalities and eigenvalues are printed.
+@item CORRELATION
+      The correlation matrix is printed.
+@item COVARIANCE
+      The covariance matrix is printed.
+@item DET
+      The determinant of the correlation or covariance matrix is printed.
+@item SIG
+      The significance of the elements of correlation matrix is printed.
+@item ALL
+      All of the above are printed.
+@item DEFAULT
+      Identical to INITIAL and EXTRACTION.
+@end itemize
+
+If /PLOT=EIGEN is given, then a ``Scree'' plot of the eigenvalues will be printed.  This can be useful for visualising
+which factors (components) should be retained.
+
+The /FORMAT subcommand determined how data are to be displayed in loading matrices.  If SORT is specified, then the variables
+are sorted in descending order of significance.  If BLANK(@var{n}) is specified, then coefficients whose absolute value is less
+than @var{n} will not be printed.  If the keyword DEFAULT is given, or if no /FORMAT subcommand is given, then no sorting is 
+performed, and all coefficients will be printed.
+
+The /CRITERIA subcommand is used to specify how the number of extracted factors (components) are chosen.  If FACTORS(@var{n}) is
+specified, where @var{n} is an integer, then @var{n} factors will be extracted.  Otherwise, the MINEIGEN setting will
+be used.  MINEIGEN(@var{l}) requests that all factors whose eigenvalues are greater than or equal to @var{l} are extracted.
+The default value of @var{l} is 1.    The ECONVERGE and ITERATE settings have effect only when iterative algorithms for factor
+extraction (such as Principal Axis Factoring) are used.   ECONVERGE(@var{delta}) specifies that iteration should cease when
+the maximum absolute value of the communality estimate between one iteration and the previous is less than @var{delta}. The
+default value of @var{delta} is 0.001.
+The ITERATE(@var{m}) setting sets the maximum number of iterations to @var{m}.  The default value of @var{m} is 25.
+
+The @cmd{MISSING} subcommand determines the handling of missing variables.  
+If INCLUDE is set, then user-missing values are included in the
+calculations, but system-missing values are not.
+If EXCLUDE is set, which is the default, user-missing
+values are excluded as well as system-missing values. 
+This is the default.
+If LISTWISE is set, then the entire case is excluded from analysis
+whenever any variable  specified in the @cmd{VARIABLES} subcommand
+contains a missing value.   
+If PAIRWISE is set, then a case is considered missing only if either of the
+values  for the particular coefficient are missing.
+The default is LISTWISE.
+
 @node NPAR TESTS
 @section NPAR TESTS
 
index 540da62abd90d409219a73ac2004bdba46d11ea6..994c0a7fc90028e5ffab058d92b3849aaf2520d0 100644 (file)
@@ -507,7 +507,7 @@ Output (dictionary information omitted for clarity):
 
 1.2 RELIABILITY.  Reliability Statistics
 #================#==========#
-#Cronbach's Alpha#N of items#
+#Cronbach's Alpha#N of Items#
 #================#==========#
 #             .86#         3#
 #================#==========#
index 6882aa2165f525aa2b12ae466da5d762eabe95af..fabec248b6aed6f894ea3afdd11ddf4243fe22a0 100644 (file)
@@ -330,7 +330,6 @@ SET
 (interaction)
         /CPROMPT='cprompt_string'
         /DPROMPT='dprompt_string'
-        /ERRORBREAK=@{OFF,ON@}
         /MXERRS=max_errs
         /MXWARNS=max_warnings
         /PROMPT='prompt'
@@ -353,17 +352,14 @@ SET
         /WRB=@{NATIVE,ISL,ISB,IDL,IDB,VF,VD,VG,ZS,ZL@}
 
 (output routing)
-        /ECHO=@{ON,OFF@}
         /ERRORS=@{ON,OFF,TERMINAL,LISTING,BOTH,NONE@}
-        /INCLUDE=@{ON,OFF@}
         /MESSAGES=@{ON,OFF,TERMINAL,LISTING,BOTH,NONE@}
-        /PRINTBACK=@{ON,OFF@}
+        /PRINTBACK=@{ON,OFF,TERMINAL,LISTING,BOTH,NONE@}
         /RESULTS=@{ON,OFF,TERMINAL,LISTING,BOTH,NONE@}
 
 (output driver options)
         /HEADERS=@{NO,YES,BLANK@}
         /LENGTH=@{NONE,length_in_lines@}
-        /LISTING=@{ON,OFF,'file-name'@}
         /MORE=@{ON,OFF@}
         /WIDTH=@{NARROW,WIDTH,n_characters@}
 
@@ -383,7 +379,6 @@ SET
         /BOXSTRING=@{'xxx','xxxxxxxxxxx'@}
         /CASE=@{UPPER,UPLOW@}
         /CPI=cpi_value
-        /DISK=@{ON,OFF@}
         /HIGHRES=@{ON,OFF@}
         /HISTOGRAM='c'
         /LOWRES=@{AUTO,ON,OFF@}
@@ -524,10 +519,6 @@ The command continuation prompt.  The default is @samp{    > }.
 Prompt used when expecting data input within @cmd{BEGIN DATA} (@pxref{BEGIN
 DATA}).  The default is @samp{data> }.
 
-@item ERRORBREAK
-Whether an error causes PSPP to stop processing the current command
-file after finishing the current command.  The default is OFF.
-
 @item MXERRS
 The maximum number of errors before PSPP halts processing of the current
 command file.  The default is 50.
@@ -615,30 +606,55 @@ RB format (@pxref{Binary and Hexadecimal Numeric Formats}).  The choices
 are the same as SET RIB.  The default is NATIVE.
 @end table
 
-Output routing subcommands affect where the output of transformations
-and procedures is sent.  These subcommands are
+In the PSPP text-based interface, the output routing subcommands
+affect where output is sent.  The following values are allowed for
+each of these subcommands:
 
 @table @asis
-@item ECHO
+@item OFF
+@item NONE
+Discard this kind of output.
+
+@item TERMINAL
+Write this output to the terminal, but not to listing files and other
+output devices.
+
+@item LISTING
+Write this output to listing files and other output devices, but not
+to the terminal.
 
-If turned on, commands are written to the listing file as they are read
-from command files.  The default is OFF.
+@item ON
+@itemx BOTH
+Write this type of output to all output devices.
+@end table
+
+These output routing subcommands are:
+
+@table @asis
+@item ERRORS
+Applies to error and warning messages.  The default is BOTH.
 
-@itemx ERRORS
-@itemx INCLUDE
 @itemx MESSAGES
-@item PRINTBACK
-@item RESULTS
-Currently not used.
+Applies to notes.  The default is BOTH.
+
+@itemx PRINTBACK
+Determines whether the syntax used for input is printed back as part
+of the output.  The default is NONE.
+
+@itemx RESULTS
+Applies to everything not in one of the above categories, such as the
+results of statistical procedures.  The default is BOTH.
 @end table
 
+These subcommands have no effect on output in the PSPP GUI
+environment.
+
 Output driver option subcommands affect output drivers' settings.  These
 subcommands are
 
 @table @asis
 @item HEADERS
 @itemx LENGTH
-@itemx LISTING
 @itemx MORE
 @itemx PAGER 
 @itemx WIDTH
@@ -646,7 +662,6 @@ subcommands are
 
 @cindex headers
 @cindex length
-@cindex listing
 @cindex more
 @cindex pager 
 @cindex width
index c9e270bfc242b6d8fb5e5fa6df3c12d6d097e7a9..6b4e574e724903a2dc9a42a5deecbfe00f2e4523 100644 (file)
@@ -12,6 +12,7 @@ several utility functions for examining and adjusting them.
 * LEAVE::                       Don't clear variables between cases.
 * MISSING VALUES::              Set missing values for variables.
 * MODIFY VARS::                 Rename, reorder, and drop variables.
+* MRSETS::                      Add, modify, and list multiple response sets.
 * NUMERIC::                     Create new numeric variables.
 * PRINT FORMATS::               Set variable print formats.
 * RENAME VARIABLES::            Rename variables.
@@ -293,6 +294,113 @@ Formats}); otherwise, the default is F8.2.
 Variables created with @cmd{NUMERIC} are initialized to the
 system-missing value.
 
+@node MRSETS
+@section MRSETS
+@vindex MRSETS
+
+@display
+MRSETS 
+    /MDGROUP NAME=name VARIABLES=var_list VALUE=value
+     [CATEGORYLABELS=@{VARLABELS,COUNTEDVALUES@}]
+     [@{LABEL='label',LABELSOURCE=VARLABEL@}]
+
+    /MCGROUP NAME=name VARIABLES=var_list [LABEL='label']
+
+    /DELETE NAME=@{[names],ALL@}
+
+    /DISPLAY NAME=@{[names],ALL@}
+@end display
+
+@cmd{MRSETS} creates, modifies, deletes, and displays multiple
+response sets.  A multiple response set is a set of variables that
+represent multiple responses to a single survey question in one of the
+two following ways:
+
+@itemize @bullet
+@item
+A @dfn{multiple dichotomy set} is analogous to a survey question with
+a set of checkboxes.  Each variable in the set is treated in a Boolean
+fashion: one value (the "counted value") means that the box was
+checked, and any other value means that it was not.
+
+@item
+A @dfn{multiple category set} represents a survey question where the
+respondent is instructed to list up to @var{n} choices.  Each variable
+represents one of the responses.
+@end itemize
+
+Any number of subcommands may be specified in any order.
+
+The MDGROUP subcommand creates a new multiple dichotomy set or
+replaces an existing multiple response set.  The NAME, VARIABLES, and
+VALUE specifications are required.  The others are optional:
+
+@itemize @bullet
+@item
+NAME specifies the name used in syntax for the new multiple dichotomy
+set.  The name must begin with @samp{$}; it must otherwise follow the
+rules for identifiers (@pxref{Tokens}).
+
+@item
+VARIABLES specifies the variables that belong to the set.  At least
+two variables must be specified.  The variables must be all string or
+all numeric.
+
+@item
+VALUE specifies the counted value.  If the variables are numeric, the
+value must be an integer.  If the variables are strings, then the
+value must be a string that is no longer than the shortest of the
+variables in the set (ignoring trailing spaces).
+
+@item
+CATEGORYLABELS optionally specifies the source of the labels for each
+category in the set:
+
+@itemize @minus
+@item
+VARLABELS, the default, uses variable labels or, for variables without
+variable labels, variable names.  PSPP warns if two variables have the
+same variable label, since these categories cannot be distinguished in
+output.
+
+@item 
+COUNTEDVALUES instead uses each variable's value label for the counted
+value.  PSPP warns if two variables have the same value label for the
+counted value or if one of the variables lacks a value label, since
+such categories cannot be distinguished in output.
+@end itemize
+
+@item
+LABEL optionally specifies a label for the multiple response set.  If
+neither LABEL nor LABELSOURCE=VARLABEL is specified, the set is
+unlabeled.
+
+@item
+LABELSOURCE=VARLABEL draws the multiple response set's label from the
+first variable label among the variables in the set; if none of the
+variables has a label, the name of the first variable is used.
+LABELSOURCE=VARLABEL must be used with CATEGORYLABELS=COUNTEDVALUES.
+It is mutually exclusive with LABEL.
+@end itemize
+
+The MCGROUP subcommand creates a new multiple category set or
+replaces an existing multiple response set.  The NAME and VARIABLES
+specifications are required, and LABEL is optional.  Their meanings
+are as described above to MDGROUP.  PSPP warns if two variables in the
+set have different value labels for a single value, since each of the
+variables in the set should have the same possible categories.
+
+The DELETE subcommand deletes multiple response groups.  A list of
+groups may be named within a set of required square brackets, or ALL
+may be used to delete all groups.
+
+The DISPLAY subcommand displays information about defined multiple
+response sets.  Its syntax is the same as the DELETE subcommand.
+
+Multiple response sets are saved to and read from system files by,
+e.g., the @cmd{SAVE} and @cmd{GET} command.  Otherwise, multiple
+response sets are currently used only by third party software.
+
 @node PRINT FORMATS
 @section PRINT FORMATS
 @vindex PRINT FORMATS
diff --git a/examples/Makefile.am b/examples/Makefile.am
deleted file mode 100644 (file)
index 71a7c86..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-## Process this file with automake to produce Makefile.in  -*- makefile -*-
-
-EXTRA_DIST = descript.stat regress.stat regress_categorical.stat
index 8e51e1f720244b9e96c4eca5233f5aadf29f11a1..1f0bf0ba1922303faf17e3b9bc6c28b65c3b82d2 100644 (file)
@@ -15,6 +15,7 @@ libglade_psppire_la_SOURCES = \
        glade/selector.c \
        glade/acr.c \
        glade/dictview.c \
+       glade/var-view.c \
        src/ui/gui/psppire-conf.c \
        src/ui/gui/psppire-acr.c \
        src/ui/gui/psppire-buttonbox.c \
@@ -23,7 +24,9 @@ libglade_psppire_la_SOURCES = \
        src/ui/gui/psppire-dialog.c \
        src/ui/gui/psppire-keypad.c \
        src/ui/gui/psppire-dictview.c \
-       src/ui/gui/psppire-selector.c
+       src/ui/gui/psppire-selector.c \
+       src/ui/gui/psppire-select-dest.c \
+       src/ui/gui/psppire-var-view.c
 
 dist_catalog_DATA = \
        glade/psppire.xml
index 50a0366186ea4da876516362fec16840196e5e63..db8956b70ac7880d179d1a706911c69c6552938b 100644 (file)
          </displayable-values>
        </property>
 
-
-       <property id="visible" ignore="True" default="True" />
+       <property id="source-widget"     ignore="True" />
+       <property id="dest-widget"       ignore="True" />
+       <property id="visible"           ignore="True" default="True" />
+       <property id="primary"           default="False" />
      </properties>
 
     </glade-widget-class>
       <property id="child"                disabled="True" />
       <property id="homogeneous"          disabled="True" />
       <property id="visible" ignore="True" default="True" />
+      <property id="model"                visible="False"  query="False" />
+    </properties>
+
+    </glade-widget-class>
+
+
+    <glade-widget-class name="PsppireVarView" generic-name="psppire-var-view" title="Variable Treeview">
+
+      <post-create-function>glade_psppire_var_view_post_create</post-create-function>
+      <get-children-function>glade_psppire_var_view_get_children</get-children-function>
+      <get-internal-child-function>glade_psppire_var_view_get_internal_child</get-internal-child-function>
+
+
+    <properties>
+      <property id="child"                disabled="True" />
+      <property id="homogeneous"          disabled="True" />
+      <property id="visible" ignore="True" default="True" />
+      <property id="model"                visible="False"  query="False" disabled="True" />
+      <property id="n-cols"    ignore="True" />
+
     </properties>
 
     </glade-widget-class>
 
 
   </glade-widget-classes>
+
  
 
  <glade-widget-group name="psppire" title="Psppire">
   <glade-widget-class-ref name="PsppireHButtonBox"/>
   <glade-widget-class-ref name="PsppireVButtonBox"/>
   <glade-widget-class-ref name="PsppireDictView"/>
+  <glade-widget-class-ref name="PsppireVarView"/>
   <glade-widget-class-ref name="PsppireSelector"/>
   <glade-widget-class-ref name="PsppireKeypad"/>
   <glade-widget-class-ref name="PsppireAcr"/>
diff --git a/glade/var-view.c b/glade/var-view.c
new file mode 100644 (file)
index 0000000..7eb6c62
--- /dev/null
@@ -0,0 +1,83 @@
+#include <config.h>
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include "psppire-var-view.h"
+
+#include <gladeui/glade.h>
+
+
+/* Dummy function to keep the linker happy.
+   Glade never actually needs to use this return value.
+ */
+GType
+psppire_var_ptr_get_type (void)
+{
+  return 0;
+}
+
+void
+glade_psppire_var_view_post_create (GladeWidgetAdaptor *adaptor,
+                                   GObject            *object,
+                                   GladeCreateReason   reason)
+{
+  GladeWidget *widget ;
+
+  PsppireVarView *var_view = PSPPIRE_VAR_VIEW (object);
+
+  g_return_if_fail (PSPPIRE_IS_VAR_VIEW (var_view));
+
+  widget = glade_widget_get_from_gobject (GTK_WIDGET (var_view));
+  if (!widget)
+    return;
+
+  if (reason == GLADE_CREATE_USER)
+    {
+      /* HIG complient border-width defaults on var_views */
+      glade_widget_property_set (widget, "border-width", 5);
+    }
+}
+
+
+GtkWidget *
+glade_psppire_var_view_get_internal_child (GladeWidgetAdaptor  *adaptor,
+                                        PsppireVarView       *var_view,
+                                        const gchar         *name)
+{
+#if DEBUGGING
+  g_print ("%s\n", __FUNCTION__);
+#endif
+  return GTK_WIDGET (var_view);
+}
+
+
+
+void
+glade_psppire_var_view_set_property (GladeWidgetAdaptor *adaptor,
+                                    GObject            *object,
+                                    const gchar        *id,
+                                    const GValue       *value)
+{
+#if DEBUGGING
+  g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object,
+          G_OBJECT_TYPE_NAME( object ),
+          id);
+#endif
+
+  GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object,
+                                                id, value);
+}
+
+
+GList *
+glade_psppire_var_view_get_children (GladeWidgetAdaptor  *adaptor,
+                                    PsppireVarView  *dv)
+{
+  GList *list = NULL;
+
+  g_return_val_if_fail (PSPPIRE_IS_VAR_VIEW (dv), NULL);
+
+  list = glade_util_container_get_all_children (GTK_CONTAINER (dv));
+
+  return list;
+}
index 6b20c67478909fe6232730b58d7b4056de720490..9bde4afcf26d77b9950e960cdfd29063b7cbbbeb 100644 (file)
@@ -2,7 +2,7 @@
 
 include $(top_srcdir)/lib/linreg/automake.mk
 
-if WITHGUI
+if HAVE_GUI
 include $(top_srcdir)/lib/gtk-contrib/automake.mk
 endif
 
index f3cd96e21a89437508f54e2678d186c246300bd6..b39bdb38786fe7d4f06ba4131a61427efb8fed0d 100644 (file)
@@ -12,6 +12,5 @@ lib_gtk_contrib_libgtksheet_a_SOURCES = \
        lib/gtk-contrib/gtkxpaned.h
 
 EXTRA_DIST += lib/gtk-contrib/OChangeLog \
-       lib/gtk-contrib/README \
-       lib/gtk-contrib/gtk-builder-convert
+       lib/gtk-contrib/README 
 
diff --git a/lib/gtk-contrib/gtk-builder-convert b/lib/gtk-contrib/gtk-builder-convert
deleted file mode 100755 (executable)
index 35b4916..0000000
+++ /dev/null
@@ -1,776 +0,0 @@
-#!/usr/bin/env python
-#    This file was downloaded from 
-#    http://git.gnome.org/cgit/gtk+/plain/gtk/gtk-builder-convert
-#    on 4 Oct 2009
-#
-#
-# Copyright (C) 2006-2008 Async Open Source
-#                         Henrique Romano <henrique@async.com.br>
-#                         Johan Dahlin <jdahlin@async.com.br>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser 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 Lesser 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.
-#
-# TODO:
-#  Toolbars
-
-"""Usage: gtk-builder-convert [OPTION] [INPUT] [OUTPUT]
-Converts Glade files into XML files which can be loaded with GtkBuilder.
-The [INPUT] file is
-
-  -w, --skip-windows     Convert everything but GtkWindow subclasses.
-  -r, --root             Convert only widget named root and its children
-  -h, --help             display this help and exit
-
-When OUTPUT is -, write to standard output.
-
-Examples:
-  gtk-builder-convert preference.glade preferences.ui
-
-Report bugs to http://bugzilla.gnome.org/."""
-
-import getopt
-import os
-import sys
-
-from xml.dom import minidom, Node
-
-DIALOGS = ['GtkDialog',
-           'GtkFileChooserDialog',
-           'GtkMessageDialog']
-WINDOWS = ['GtkWindow'] + DIALOGS
-
-# The subprocess is only available in Python 2.4+
-try:
-    import subprocess
-    subprocess # pyflakes
-except ImportError:
-    subprocess = None
-
-def get_child_nodes(node):
-    assert node.tagName == 'object'
-    nodes = []
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName != 'child':
-            continue
-        nodes.append(child)
-    return nodes
-
-def get_properties(node):
-    assert node.tagName == 'object'
-    properties = {}
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName != 'property':
-            continue
-        value = child.childNodes[0].data
-        properties[child.getAttribute('name')] = value
-    return properties
-
-def get_property(node, property_name):
-    assert node.tagName == 'object'
-    properties = get_properties(node)
-    return properties.get(property_name)
-
-def get_property_node(node, property_name):
-    assert node.tagName == 'object'
-    properties = {}
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName != 'property':
-            continue
-        if child.getAttribute('name') == property_name:
-            return child
-
-def get_signal_nodes(node):
-    assert node.tagName == 'object'
-    signals = []
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName == 'signal':
-            signals.append(child)
-    return signals
-
-def get_property_nodes(node):
-    assert node.tagName == 'object'
-    properties = []
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        # FIXME: handle comments
-        if child.tagName == 'property':
-            properties.append(child)
-    return properties
-
-def get_accelerator_nodes(node):
-    assert node.tagName == 'object'
-    accelerators = []
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName == 'accelerator':
-            accelerators.append(child)
-    return accelerators
-
-def get_object_node(child_node):
-    assert child_node.tagName == 'child', child_node
-    nodes = []
-    for node in child_node.childNodes:
-        if node.nodeType != Node.ELEMENT_NODE:
-            continue
-        if node.tagName == 'object':
-            nodes.append(node)
-    assert len(nodes) == 1, nodes
-    return nodes[0]
-
-def copy_properties(node, props, prop_dict):
-    assert node.tagName == 'object'
-    for prop_name in props:
-        child = get_property_node(node, prop_name)
-        if child is not None:
-            prop_dict[prop_name] = child
-
-    return node
-
-class GtkBuilderConverter(object):
-
-    def __init__(self, skip_windows, root):
-        self.skip_windows = skip_windows
-        self.root = root
-        self.root_objects = []
-        self.objects = {}
-
-    #
-    # Public API
-    #
-
-    def parse_file(self, file):
-        self._dom = minidom.parse(file)
-        self._parse()
-
-    def parse_buffer(self, buffer):
-        self._dom = minidom.parseString(buffer)
-        self._parse()
-
-    def to_xml(self):
-        xml = self._dom.toprettyxml("", "")
-        return xml.encode('utf-8')
-
-    #
-    # Private
-    #
-
-    def _get_object(self, name):
-        return self.objects.get(name)
-
-    def _get_objects_by_attr(self, attribute, value):
-        return [w for w in self._dom.getElementsByTagName("object")
-                      if w.getAttribute(attribute) == value]
-
-    def _create_object(self, obj_class, obj_id, template=None, properties=None):
-        """
-        Creates a new <object> tag.
-        Optionally a name template can be provided which will be used
-        to avoid naming collisions.
-        The properties dictionary can either contain string values or Node
-        values. If a node is provided the name of the node will be overridden
-        by the dictionary key.
-
-        @param obj_class: class of the object (class tag)
-        @param obj_id: identifier of the object (id tag)
-        @param template: name template to use, for example 'button'
-        @param properties: dictionary of properties
-        @type properties: string or Node.
-        @returns: Newly created node of the object
-        """
-        if template is not None:
-            count = 1
-            while True:
-                obj_id = template + str(count)
-                widget = self._get_object(obj_id)
-                if widget is None:
-                    break
-
-                count += 1
-
-        obj = self._dom.createElement('object')
-        obj.setAttribute('class', obj_class)
-        obj.setAttribute('id', obj_id)
-        if properties:
-            for name, value in properties.items():
-                if isinstance(value, Node):
-                    # Reuse the node, so translatable and context still will be
-                    # set when converting nodes. See also #509153
-                    prop = value
-                else:
-                    prop = self._dom.createElement('property')
-                    prop.appendChild(self._dom.createTextNode(value))
-
-                prop.setAttribute('name', str(name))
-                obj.appendChild(prop)
-        self.objects[obj_id] = obj
-        return obj
-
-    def _create_root_object(self, obj_class, template, properties=None):
-        obj = self._create_object(obj_class, None, template, properties)
-        self.root_objects.append(obj)
-        return obj
-
-    def _parse(self):
-        glade_iface = self._dom.getElementsByTagName("glade-interface")
-        assert glade_iface, ("Badly formed XML, there is "
-                             "no <glade-interface> tag.")
-        # Rename glade-interface to interface
-        glade_iface[0].tagName = 'interface'
-        self._interface = glade_iface[0]
-
-        # Remove glade-interface doc type
-        for node in self._dom.childNodes:
-            if node.nodeType == Node.DOCUMENT_TYPE_NODE:
-                if node.name == 'glade-interface':
-                    self._dom.removeChild(node)
-
-        # Strip unsupported tags
-        for tag in ['requires', 'requires-version']:
-            for child in self._dom.getElementsByTagName(tag):
-                child.parentNode.removeChild(child)
-
-        if self.root:
-            self._strip_root(self.root)
-
-        # Rename widget to object
-        objects = self._dom.getElementsByTagName("widget")
-        for node in objects:
-            node.tagName = "object"
-
-        for node in objects:
-            self._convert(node.getAttribute("class"), node)
-            if self._get_object(node.getAttribute('id')) is not None:
-               print "WARNING: duplicate id \"" + node.getAttribute('id') + "\""
-            self.objects[node.getAttribute('id')] = node
-
-        # Convert Gazpachos UI tag
-        for node in self._dom.getElementsByTagName("ui"):
-            self._convert_ui(node)
-
-        # Convert accessibility tag
-        for node in self._dom.getElementsByTagName("accessibility"):
-            self._convert_accessibility(node)
-
-        # Output the newly created root objects and sort them
-        # by attribute id
-        # FIXME: Use sorted(self.root_objects,
-        #                   key=lambda n: n.getAttribute('id'),
-        #                   reverse=True):
-        # when we can depend on python 2.4 or higher
-        root_objects = self.root_objects[:]
-        root_objects.sort(lambda a, b: cmp(b.getAttribute('id'),
-                                           a.getAttribute('id')))
-        for obj in root_objects:
-            self._interface.childNodes.insert(0, obj)
-
-    def _convert(self, klass, node):
-        if klass == 'GtkNotebook':
-            self._packing_prop_to_child_attr(node, "type", "tab")
-        elif klass in ['GtkExpander', 'GtkFrame']:
-            self._packing_prop_to_child_attr(
-                node, "type", "label_item", "label")
-        elif klass == "GtkMenuBar":
-            self._convert_menu(node)
-        elif klass == "GtkMenu":
-            # Only convert toplevel popups
-            if node.parentNode == self._interface:
-                self._convert_menu(node, popup=True)
-        elif klass in WINDOWS and self.skip_windows:
-            self._remove_window(node)
-        self._default_widget_converter(node)
-
-    def _default_widget_converter(self, node):
-        klass = node.getAttribute("class")
-        for prop in get_property_nodes(node):
-            prop_name = prop.getAttribute("name")
-            if prop_name == "sizegroup":
-                self._convert_sizegroup(node, prop)
-            elif prop_name == "tooltip" and klass != "GtkAction":
-                prop.setAttribute("name", "tooltip-text")
-            elif prop_name in ["response_id", 'response-id']:
-                # It does not make sense to convert responses when
-                # we're not going to output dialogs
-                if self.skip_windows:
-                    continue
-                object_id = node.getAttribute('id')
-                response = prop.childNodes[0].data
-                self._convert_dialog_response(node, object_id, response)
-                prop.parentNode.removeChild(prop)
-            elif prop_name == "adjustment":
-                self._convert_adjustment(prop)
-            elif prop_name == "items" and klass in ['GtkComboBox',
-                                                    'GtkComboBoxEntry']:
-                self._convert_combobox_items(node, prop)
-            elif prop_name == "text" and klass == 'GtkTextView':
-                self._convert_textview_text(prop)
-
-    def _remove_window(self, node):
-        object_node = get_object_node(get_child_nodes(node)[0])
-        parent = node.parentNode
-        parent.removeChild(node)
-        parent.appendChild(object_node)
-
-    def _convert_menu(self, node, popup=False):
-        if node.hasAttribute('constructor'):
-            return
-
-        uimgr = self._create_root_object('GtkUIManager',
-                                         template='uimanager')
-
-        if popup:
-            name = 'popup'
-        else:
-            name = 'menubar'
-
-        menu = self._dom.createElement(name)
-        menu.setAttribute('name', node.getAttribute('id'))
-        node.setAttribute('constructor', uimgr.getAttribute('id'))
-
-        for child in get_child_nodes(node):
-            obj_node = get_object_node(child)
-            item = self._convert_menuitem(uimgr, obj_node)
-            menu.appendChild(item)
-            child.removeChild(obj_node)
-            child.parentNode.removeChild(child)
-
-        ui = self._dom.createElement('ui')
-        uimgr.appendChild(ui)
-
-        ui.appendChild(menu)
-
-    def _convert_menuitem(self, uimgr, obj_node):
-        children = get_child_nodes(obj_node)
-        name = 'menuitem'
-        if children:
-            child_node = children[0]
-            menu_node = get_object_node(child_node)
-            # Can be GtkImage, which will take care of later.
-            if menu_node.getAttribute('class') == 'GtkMenu':
-                name = 'menu'
-
-        object_class = obj_node.getAttribute('class')
-        if object_class in ['GtkMenuItem',
-                            'GtkImageMenuItem',
-                            'GtkCheckMenuItem',
-                            'GtkRadioMenuItem']:
-            menu = self._dom.createElement(name)
-        elif object_class == 'GtkSeparatorMenuItem':
-            return self._dom.createElement('separator')
-        else:
-            raise NotImplementedError(object_class)
-
-        menu.setAttribute('action', obj_node.getAttribute('id'))
-        self._add_action_from_menuitem(uimgr, obj_node)
-        if children:
-            for child in get_child_nodes(menu_node):
-                obj_node = get_object_node(child)
-                item = self._convert_menuitem(uimgr, obj_node)
-                menu.appendChild(item)
-                child.removeChild(obj_node)
-                child.parentNode.removeChild(child)
-        return menu
-
-    def _menuitem_to_action(self, node, properties):
-        copy_properties(node, ['label', 'tooltip'], properties)
-
-    def _togglemenuitem_to_action(self, node, properties):
-        self._menuitem_to_action(node, properties)
-        copy_properties(node, ['active'], properties)
-
-    def _radiomenuitem_to_action(self, node, properties):
-        self._togglemenuitem_to_action(node, properties)
-        copy_properties(node, ['group'], properties)
-
-    def _add_action_from_menuitem(self, uimgr, node):
-        properties = {}
-        object_class = node.getAttribute('class')
-        object_id = node.getAttribute('id')
-        if object_class == 'GtkMenuItem':
-            name = 'GtkAction'
-            self._menuitem_to_action(node, properties)
-        elif object_class == 'GtkCheckMenuItem':
-            name = 'GtkToggleAction'
-            self._togglemenuitem_to_action(node, properties)
-        elif object_class == 'GtkRadioMenuItem':
-            name = 'GtkRadioAction'
-            self._radiomenuitem_to_action(node, properties)
-        elif object_class == 'GtkImageMenuItem':
-            name = 'GtkAction'
-            children = get_child_nodes(node)
-            if (children and
-                children[0].getAttribute('internal-child') == 'image'):
-                image = get_object_node(children[0])
-                child = get_property_node(image, 'stock')
-                if child is not None:
-                    properties['stock_id'] = child
-            self._menuitem_to_action(node, properties)
-        elif object_class == 'GtkSeparatorMenuItem':
-            return
-        else:
-            raise NotImplementedError(object_class)
-
-        if get_property(node, 'use_stock') == 'True':
-            if 'label' in properties:
-                properties['stock_id'] = properties['label']
-                del properties['label']
-
-        properties['name'] = object_id
-        action = self._create_object(name,
-                                     object_id,
-                                     properties=properties)
-        for signal in get_signal_nodes(node):
-            signal_name = signal.getAttribute('name')
-            if signal_name in ['activate', 'toggled']:
-                action.appendChild(signal)
-            else:
-                print 'Unhandled signal %s::%s' % (node.getAttribute('class'),
-                                                   signal_name)
-
-        if not uimgr.childNodes:
-            child = self._dom.createElement('child')
-            uimgr.appendChild(child)
-
-            group = self._create_object('GtkActionGroup', None,
-                                        template='actiongroup')
-            child.appendChild(group)
-        else:
-            group = uimgr.childNodes[0].childNodes[0]
-
-        child = self._dom.createElement('child')
-        group.appendChild(child)
-        child.appendChild(action)
-
-        for accelerator in get_accelerator_nodes(node):
-            signal_name = accelerator.getAttribute('signal')
-            if signal_name != 'activate':
-                print 'Unhandled accelerator signal for %s::%s' % (
-                    node.getAttribute('class'), signal_name)
-                continue
-            accelerator.removeAttribute('signal')
-            child.appendChild(accelerator)
-
-    def _convert_sizegroup(self, node, prop):
-        # This is Gazpacho only
-        node.removeChild(prop)
-        obj = self._get_object(prop.childNodes[0].data)
-        if obj is None:
-            widgets = self._get_objects_by_attr("class", "GtkSizeGroup")
-            if widgets:
-                obj = widgets[-1]
-            else:
-                obj = self._create_root_object('GtkSizeGroup',
-                                               template='sizegroup')
-
-        widgets = obj.getElementsByTagName("widgets")
-        if widgets:
-            assert len(widgets) == 1
-            widgets = widgets[0]
-        else:
-            widgets = self._dom.createElement("widgets")
-            obj.appendChild(widgets)
-
-        member = self._dom.createElement("widget")
-        member.setAttribute("name", node.getAttribute("id"))
-        widgets.appendChild(member)
-
-    def _convert_dialog_response(self, node, object_name, response):
-        # 1) Get parent dialog node
-        while True:
-            # If we can't find the parent dialog, give up
-            if node == self._dom:
-                return
-
-            if (node.tagName == 'object' and
-                node.getAttribute('class') in DIALOGS):
-                dialog = node
-                break
-            node = node.parentNode
-            assert node
-
-        # 2) Get dialogs action-widgets tag, create if not found
-        for child in dialog.childNodes:
-            if child.nodeType != Node.ELEMENT_NODE:
-                continue
-            if child.tagName == 'action-widgets':
-                actions = child
-                break
-        else:
-            actions = self._dom.createElement("action-widgets")
-            dialog.appendChild(actions)
-
-        # 3) Add action-widget tag for the response
-        action = self._dom.createElement("action-widget")
-        action.setAttribute("response", response)
-        action.appendChild(self._dom.createTextNode(object_name))
-        actions.appendChild(action)
-
-    def _convert_adjustment(self, prop):
-        properties = {}
-        if prop.childNodes:
-            data = prop.childNodes[0].data
-            value, lower, upper, step, page, page_size = data.split(' ')
-            properties.update(value=value,
-                              lower=lower,
-                              upper=upper,
-                              step_increment=step,
-                              page_increment=page,
-                              page_size=page_size)
-        else:
-            prop.appendChild(self._dom.createTextNode(""))
-
-        adj = self._create_root_object("GtkAdjustment",
-                                       template='adjustment',
-                                       properties=properties)
-        prop.childNodes[0].data = adj.getAttribute('id')
-
-    def _convert_combobox_items(self, node, prop):
-        parent = prop.parentNode
-        if not prop.childNodes:
-            parent.removeChild(prop)
-            return
-
-        translatable_attr = prop.attributes.get('translatable')
-        translatable = translatable_attr is not None and translatable_attr.value == 'yes'
-        has_context_attr = prop.attributes.get('context')
-        has_context = has_context_attr is not None and has_context_attr.value == 'yes'
-        comments_attr = prop.attributes.get('comments')
-        comments = comments_attr is not None and comments_attr.value or None
-
-        value = prop.childNodes[0].data
-        model = self._create_root_object("GtkListStore",
-                                         template="model")
-
-        columns = self._dom.createElement('columns')
-        model.appendChild(columns)
-
-        column = self._dom.createElement('column')
-        column.setAttribute('type', 'gchararray')
-        columns.appendChild(column)
-
-        data = self._dom.createElement('data')
-        model.appendChild(data)
-
-        if value.endswith('\n'):
-            value = value[:-1]
-        for item in value.split('\n'):
-            row = self._dom.createElement('row')
-            data.appendChild(row)
-
-            col = self._dom.createElement('col')
-            col.setAttribute('id', '0')
-            if translatable:
-                col.setAttribute('translatable', 'yes')
-            if has_context:
-                splitting = item.split('|', 1)
-                if len(splitting) == 2:
-                    context, item = splitting
-                    col.setAttribute('context', context)
-            if comments is not None:
-                col.setAttribute('comments', comments)
-            col.appendChild(self._dom.createTextNode(item))
-            row.appendChild(col)
-
-        model_prop = self._dom.createElement('property')
-        model_prop.setAttribute('name', 'model')
-        model_prop.appendChild(
-            self._dom.createTextNode(model.getAttribute('id')))
-        parent.appendChild(model_prop)
-
-        parent.removeChild(prop)
-
-        child = self._dom.createElement('child')
-        node.appendChild(child)
-        cell_renderer = self._create_object('GtkCellRendererText', None,
-                                            template='renderer')
-        child.appendChild(cell_renderer)
-
-        attributes = self._dom.createElement('attributes')
-        child.appendChild(attributes)
-
-        attribute = self._dom.createElement('attribute')
-        attributes.appendChild(attribute)
-        attribute.setAttribute('name', 'text')
-        attribute.appendChild(self._dom.createTextNode('0'))
-
-    def _convert_textview_text(self, prop):
-        if not prop.childNodes:
-            prop.parentNode.removeChild(prop)
-            return
-
-        data = prop.childNodes[0].data
-        if prop.hasAttribute('translatable'):
-            prop.removeAttribute('translatable')
-        tbuffer = self._create_root_object("GtkTextBuffer",
-                                           template='textbuffer',
-                                           properties=dict(text=data))
-        prop.childNodes[0].data = tbuffer.getAttribute('id')
-        prop.setAttribute('name', 'buffer')
-
-    def _packing_prop_to_child_attr(self, node, prop_name, prop_val,
-                                   attr_val=None):
-        for child in get_child_nodes(node):
-            packing_props = [p for p in child.childNodes if p.nodeName == "packing"]
-            if not packing_props:
-                continue
-            assert len(packing_props) == 1
-            packing_prop = packing_props[0]
-            properties = packing_prop.getElementsByTagName("property")
-            for prop in properties:
-                if (prop.getAttribute("name") != prop_name or
-                    prop.childNodes[0].data != prop_val):
-                    continue
-                packing_prop.removeChild(prop)
-                child.setAttribute(prop_name, attr_val or prop_val)
-            if len(properties) == 1:
-                child.removeChild(packing_prop)
-
-    def _convert_ui(self, node):
-        cdata = node.childNodes[0]
-        data = cdata.toxml().strip()
-        if not data.startswith("<![CDATA[") or not data.endswith("]]>"):
-            return
-        data = data[9:-3]
-        child = minidom.parseString(data).childNodes[0]
-        nodes = child.childNodes[:]
-        for child_node in nodes:
-            node.appendChild(child_node)
-        node.removeChild(cdata)
-        if not node.hasAttribute("id"):
-            return
-
-        # Updating references made by widgets
-        parent_id = node.parentNode.getAttribute("id")
-        for widget in self._get_objects_by_attr("constructor",
-                                                node.getAttribute("id")):
-            widget.getAttributeNode("constructor").value = parent_id
-        node.removeAttribute("id")
-
-    def _convert_accessibility(self, node):
-        objectNode = node.parentNode
-        parent_id = objectNode.getAttribute("id")
-
-        properties = {}
-        for node in node.childNodes:
-            if node.nodeName == 'atkproperty':
-                node.tagName = 'property'
-                properties[node.getAttribute('name')] = node
-                node.parentNode.removeChild(node)
-            elif node.nodeName == 'atkrelation':
-                node.tagName = 'relation'
-                relation_type = node.getAttribute('type')
-                relation_type = relation_type.replace('_', '-')
-                node.setAttribute('type', relation_type)
-            elif node.nodeName == 'atkaction':
-                node.tagName = 'action'
-
-        if properties:
-            child = self._dom.createElement('child')
-            child.setAttribute("internal-child", "accessible")
-
-            atkobject = self._create_object(
-                "AtkObject", None,
-                template='a11y-%s' % (parent_id,),
-                properties=properties)
-            child.appendChild(atkobject)
-            objectNode.appendChild(child)
-
-    def _strip_root(self, root_name):
-        for widget in self._dom.getElementsByTagName("widget"):
-            if widget.getAttribute('id') == root_name:
-                break
-        else:
-            raise SystemExit("Could not find an object called `%s'" % (
-                root_name))
-
-        for child in self._interface.childNodes[:]:
-            if child.nodeType != Node.ELEMENT_NODE:
-                continue
-            child.parentNode.removeChild(child)
-
-        self._interface.appendChild(widget)
-
-
-def _indent(output):
-    if not subprocess:
-        return output
-
-    for directory in os.environ['PATH'].split(os.pathsep):
-        filename = os.path.join(directory, 'xmllint')
-        if os.path.exists(filename):
-            break
-    else:
-        return output
-
-    s = subprocess.Popen([filename, '--format', '-'],
-                         stdin=subprocess.PIPE,
-                         stdout=subprocess.PIPE)
-    s.stdin.write(output)
-    s.stdin.close()
-    return s.stdout.read()
-
-def usage():
-    print __doc__
-
-def main(args):
-    try:
-        opts, args = getopt.getopt(args[1:], "hwr:",
-                                   ["help", "skip-windows", "root="])
-    except getopt.GetoptError:
-        usage()
-        return 2
-
-    if len(args) != 2:
-        usage()
-        return 2
-
-    input_filename, output_filename = args
-
-    skip_windows = False
-    split = False
-    root = None
-    for o, a in opts:
-        if o in ("-h", "--help"):
-            usage()
-            sys.exit()
-        elif o in ("-r", "--root"):
-            root = a
-        elif o in ("-w", "--skip-windows"):
-            skip_windows = True
-
-    conv = GtkBuilderConverter(skip_windows=skip_windows,
-                               root=root)
-    conv.parse_file(input_filename)
-
-    xml = _indent(conv.to_xml())
-    if output_filename == "-":
-        print xml
-    else:
-        open(output_filename, 'w').write(xml)
-        print "Wrote", output_filename
-
-    return 0
-
-if __name__ == "__main__":
-    sys.exit(main(sys.argv))
index 6d1c0af9755cdeeeaee47dada8587dbffc81907f..b48617136d860a2a2abf31fe57202474fcc0f98b 100644 (file)
@@ -1391,7 +1391,7 @@ psppire_sheet_set_model (PsppireSheet *sheet, PsppireSheetModel *model)
 
 
 void
-psppire_sheet_change_entry (PsppireSheet *sheet, GtkType entry_type)
+psppire_sheet_change_entry (PsppireSheet *sheet, GType entry_type)
 {
   g_return_if_fail (sheet != NULL);
   g_return_if_fail (PSPPIRE_IS_SHEET (sheet));
@@ -3022,9 +3022,7 @@ psppire_sheet_click_cell (PsppireSheet *sheet, gint row, gint column)
       sheet->range.row0 = 0;
       sheet->range.col0 = 0;
       sheet->range.rowi = psppire_axis_unit_count (sheet->vaxis) - 1;
-      sheet->range.coli =
-       psppire_axis_unit_count (sheet->haxis) - 1;
-      psppire_sheet_select_range (sheet, NULL);
+      sheet->range.coli = psppire_axis_unit_count (sheet->haxis) - 1;
       return TRUE;
     }
 
index db58d4bdf3ea4429dcc35637cc61df28d089ab5f..eccffe84c0bf9237fc21cd8c0f1a2da3df8809ea 100644 (file)
@@ -65,11 +65,12 @@ enum
 
 #define PSPPIRE_TYPE_SHEET_RANGE (psppire_sheet_range_get_type ())
 #define PSPPIRE_TYPE_SHEET_CELL (psppire_sheet_cell_get_type ())
-#define PSPPIRE_TYPE_SHEET (psppire_sheet_get_type ())
 
-#define PSPPIRE_SHEET(obj)          GTK_CHECK_CAST (obj, psppire_sheet_get_type (), PsppireSheet)
-#define PSPPIRE_SHEET_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, psppire_sheet_get_type (), PsppireSheetClass)
-#define PSPPIRE_IS_SHEET(obj)       GTK_CHECK_TYPE (obj, psppire_sheet_get_type ())
+
+#define PSPPIRE_TYPE_SHEET          (psppire_sheet_get_type ())
+#define PSPPIRE_SHEET(obj)          G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_TYPE_SHEET, PsppireSheet)
+#define PSPPIRE_SHEET_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST ((klass),  PSPPIRE_TYPE_SHEET, PsppireSheetClass)
+#define PSPPIRE_IS_SHEET(obj)       G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_SHEET)
 
 
 typedef struct _PsppireSheetClass PsppireSheetClass;
@@ -123,7 +124,7 @@ struct _PsppireSheet
   GtkWidget *entry_widget;
 
   /* The type of entry_widget */
-  GtkType entry_type;
+  GType entry_type;
 
   /* global selection button */
   GtkWidget *button;
@@ -224,7 +225,7 @@ struct _PsppireSheetClass
 };
 
 GType psppire_sheet_get_type (void);
-GtkType psppire_sheet_range_get_type (void);
+GType psppire_sheet_range_get_type (void);
 
 
 /* create a new sheet */
@@ -232,10 +233,10 @@ GtkWidget * psppire_sheet_new (PsppireSheetModel *model);
 
 /* create a new sheet with custom entry */
 GtkWidget *
-psppire_sheet_new_with_custom_entry (GtkType entry_type);
+psppire_sheet_new_with_custom_entry (GType entry_type);
 
 /* Change entry */
-void psppire_sheet_change_entry                (PsppireSheet *sheet, GtkType entry_type);
+void psppire_sheet_change_entry                (PsppireSheet *sheet, GType entry_type);
 
 GtkEntry *psppire_sheet_get_entry    (PsppireSheet *sheet);
 
index 045b4e767710e0ba7b2d43b21c03c0a07316cb6b..56b8a930ce77ea4229cce6e6211bc9b27d58ac57 100644 (file)
@@ -12,7 +12,7 @@ do 'pspp-module-config' || do {
 };
 
 WriteMakefile(
-    FULLPERL          => "PSPP_TEST_CMD=\"$Locations{BuildDir}/src/ui/terminal/pspp -B $Locations{SourceDir}/config\" \$(PERL)",
+    FULLPERL          => "PSPP_TEST_CMD=\"$Locations{BuildDir}/src/ui/terminal/pspp\" \$(PERL)",
     NAME              => 'PSPP',
     DISTNAME          => 'PSPP-Perl',
     VERSION_FROM      => "$Locations{BuildDir}/src/libpspp/version.c", 
index 77a720caabf69cc17a172ab2c0b1233b7baa9987..ca3f873ae110be68520c63a09c4f4601ca623c06 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - computes sample statistics.
-   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
 
 #include <config.h>
 
+/* The Gnulib "strftime" module defines my_strftime in <config.h> for use by
+   gl/strftime.c.  Perl also defines my_strftime in embed.h for some other
+   purpose.  The former definition doesn't matter in this file, so suppress it
+   to avoid a compiler warning. */
+#undef my_strftime
+
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
@@ -181,11 +187,10 @@ format_value (val, var)
 CODE:
  SV *ret;
  const struct fmt_spec *fmt = var_get_print_format (var);
- const struct dictionary *dict = var_get_vardict (var)->dict;
  union value uv;
  char *s;
  make_value_from_scalar (&uv, val, var);
- s = data_out (&uv, dict_get_encoding (dict), fmt);
+ s = data_out (&uv, var_get_encoding (var), fmt);
  value_destroy (&uv, var_get_width (var));
  ret = newSVpv (s, fmt->w);
  free (s);
@@ -584,6 +589,7 @@ CODE:
  struct file_handle *fh =
   fh_create_file (NULL, name, fh_default_properties () );
  struct sysfile_info *sfi = xmalloc (sizeof (*sfi));
+ dict_set_encoding (dict, "UTF-8");
  sfi->writer = sfm_open_writer (fh, dict, opts);
  sfi->dict = dict;
  sfi->opened = true;
index c8e9484612628492b36f7a809b34f146dc3a8c4a..7c44cf3923c33c8c2a7b0febb68d573c96277c1b 100644 (file)
@@ -7,8 +7,9 @@ system files.
 INSTALLATION
 
 To install you must have first installed and built pspp 0.7.2 or
-later.  Pspp is not required to use this module, only to install
-it. 
+later.  The Perl module does not use the installed PSPP binaries, but
+it does require the libpspp-core-$VERSION.so library installed with
+PSPP (see below).
 
 To install this module type the following:
 
@@ -34,7 +35,7 @@ required during installation, but are not needed to run the module.
 
 COPYRIGHT AND LICENCE
 
-Copyright (C) 2007, 2009 by Free Software Foundation
+Copyright (C) 2007, 2009, 2010 by Free Software Foundation
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as
index 819df652dc7d9bff07cf8696b7dd022463291f6c..c442d04eb50615bf231a035580fbd56d4ae1104a 100644 (file)
@@ -27,13 +27,14 @@ perl-module/Makefile: perl-module/Makefile.PL perl-module/pspp-module-config
        cd perl-module && $(PERL) Makefile.PL PREFIX=$(prefix)
 
 perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz: $(module_sources)
-       $(RM) $@
+       rm -f $@
        cd perl-module && $(MAKE) $(AM_MAKEFLAGS) tardist
 
 PHONY += module-make
 module-make: perl-module/Makefile src/libpspp-core.la
        cd perl-module && $(MAKE) $(AM_MAKEFLAGS)
 
+ALL_LOCAL += perl_module_tarball
 perl_module_tarball:
        if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
         for f in $(module_sources); do \
@@ -47,21 +48,13 @@ perl_module_tarball:
        fi
        $(MAKE) $(AM_MAKEFLAGS) module-make perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz
 
-ALL_LOCAL += perl_module_tarball
-
-check-local:
-       loc=`pwd` ; cd $(top_builddir)/src/.libs ; llp=`pwd` ; cd $$loc ;  \
-       LANG=C LD_LIBRARY_PATH=$$llp sh -c "cd perl-module && $(MAKE) $(AM_MAKEFLAGS) test"
-
-
-perl_module_CLEAN:
+CLEAN_LOCAL += perl_module_clean
+perl_module_clean:
        cd perl-module && $(MAKE) $(AM_MAKEFLAGS) clean || true
        if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
-         $(RM) $(module_sources) ; \
+         rm -f $(module_sources) ; \
        fi
-       $(RM) perl-module/Makefile.old
-
-CLEAN_LOCAL += perl_module_CLEAN
+       rm -f perl-module/Makefile.old
 
 CLEANFILES += \
         perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz \
diff --git a/perl-module/lib/PSPP.pm b/perl-module/lib/PSPP.pm
deleted file mode 100644 (file)
index e559990..0000000
+++ /dev/null
@@ -1,560 +0,0 @@
-use 5.008008;
-use strict;
-use warnings;
-
-=head1 NAME
-
-PSPP-Perl - Perl extension to PSPP
-
-=head1 SYNOPSIS
-
-  use PSPP;
-
-=head1 DESCRIPTION
-
-PSPP-Perl provides an interface to the libraries used by pspp to read and
-write system files.  
-
-=head1 EXPORT
-
-None by default.
-
-=cut
-BEGIN {
-       $PSPP::VERSION='0.7.2';
-       require XSLoader;
-       XSLoader::load('PSPP', $PSPP::VERSION);
-}
-
-PSPP::onBoot($PSPP::VERSION);
-
-=pod
-
-=head1 PROGRAMMER'S INTERFACE
-
-The subroutines in this package return zero or unref on error.
-When errors occur, a string describing the error is written 
-to C<$PSPP::errstr>. 
-
-=cut
-
-package PSPP;
-use POSIX ;
-
-use constant { SYSMIS => -(POSIX::DBL_MAX), 
-              PERL_EPOCH => 12219379200 # Number of seconds between 
-                   # 14th October 1582
-                  # and 
-                  # 1st January 1970 
-              };
-
-
-
-package PSPP::Dict;
-
-=pod
-
-=head2 PSPP::Dict::new
-
-Creates a new dictionary.  This returned dictionary will be empty.
-Returns undef on failure.
-
-=head3 set_documents ($string)
-
-Sets the documents (comments) to C<string>.
-
-=head3 add_document ($string)
-
-Appends C<string> to the documents.
-
-=head3 clear_documents ()
-
-Removes all documents.
-
-=head3 set_weight ($var)
-
-Sets the weighting variable to C<var>.
-
-=cut
-
-sub new
-{
-    my $class = shift;
-    my $self = pxs_dict_new ();
-    bless ($self, $class);
-    return $self;
-}
-
-=pod
-
-=head3 get_var_cnt ()
-
-Returns the number of variables in the dictionary.
-
-=head3 get_var ($idx)
-
-Returns the C<idx>th variable from the dictionary.
-Returns undef if C<idx> is greater than or equal to the number
-of variables in the dictionary.
-
-=cut
-
-sub get_var
-{
-    my $dict = shift;
-    my $idx = shift;
-    my $var = pxs_get_variable ($dict, $idx);
-
-    if ( ref $var ) 
-    {
-       bless ($var, "PSPP::Var");
-    }
-    return $var;
-}
-
-=pod
-
-=head3 get_var_by_name ($name)
-
-Returns the variable from the dictionary whose name is C<name>.
-If there is no such variable, a null reference will be returned.
-
-=cut
-
-sub get_var_by_name
-{
-    my $dict = shift;
-    my $name = shift;
-    my $var = pxs_get_var_by_name ($dict, $name);
-
-    if ( ref $var ) 
-    {
-       bless ($var, "PSPP::Var");
-    }
-    return $var;
-}
-
-
-package PSPP::Fmt;
-
-=pod
-
-=head2 PSPP::Fmt
-
-Contains constants used to denote variable format types.  
-The identifiers are the same as  those used in pspp to denote formats.
-For  example C<PSPP::Fmt::F> defines floating point format, and
-C<PSPP::Fmt::A> denotes string format.
-
-=cut
-
-# These must correspond to the values in src/data/format.h
-use constant {
-    F =>        0,
-    COMMA =>    1,
-    DOT =>      2, 
-    DOLLAR =>   3, 
-    PCT =>      4, 
-    E =>        5, 
-    CCA =>      6, 
-    CCB =>      7, 
-    CCC =>      8, 
-    CCD =>      9, 
-    CCE =>      10, 
-    N =>        11, 
-    Z =>        12, 
-    P =>        13, 
-    PK =>       14, 
-    IB =>       15, 
-    PIB =>      16, 
-    PIBHEX =>   17, 
-    RB =>       18, 
-    RBHEX =>    19, 
-    DATE =>     20, 
-    ADATE =>    21, 
-    EDATE =>    22, 
-    JDATE =>    23, 
-    SDATE =>    24, 
-    QYR =>      25, 
-    MOYR =>     26, 
-    WKYR =>     27, 
-    DATETIME => 28, 
-    TIME =>     29, 
-    DTIME =>    30, 
-    WKDAY =>    31, 
-    MONTH =>    32, 
-    A =>        33, 
-    AHEX =>     34
-};
-
-
-=head2 PSPP::Var
-
-=cut
-
-package PSPP::Var;
-
-=head3 new ($dict, $name, %input_fmt)
-
-Creates and returns a new variable in the dictionary C<dict>.  The 
-new variable will have the name C<name>.
-The input format is set by the C<input_fmt> parameter 
-(See L</PSPP::Fmt>).
-By default, the write and print formats are the same as the input format.
-The write and print formats may be changed (See L</set_write_format>), 
-L</set_print_format>).  The input format may not be changed after
-the variable has been created.
-If the variable cannot be created, undef is returned.
-
-=cut
-
-sub new
-{
-    my $class = shift;
-    my $dict = shift;
-    my $name = shift;
-    my %format = @_;
-    my $self = pxs_dict_create_var ($dict, $name, \%format);
-    if ( ref $self ) 
-    {
-       bless ($self, $class);
-    }
-    return $self;
-}
-
-=pod
-
-=head3 set_label ($label)
-
-Sets the variable label to C<label>.
-
-
-=cut
-
-=pod
-
-=head3 set_write_format (%fmt)
-
-Sets the write format to C<fmt>. <fmt> is a hash containing the keys:
-
-=over 2
-
-=item FMT
-
-A constant denoting the format type.  See L</PSPP::Fmt>.
-
-=item decimals
-
-An integer denoting the number of decimal places for the format.
-
-=item width
-
-An integer denoting the width of the format.
-
-=back
-
-On error the subroutine returns zero.
-
-=cut
-
-sub set_write_format
-{
-    my $var = shift;
-    my %format = @_;
-    pxs_set_write_format ($var, \%format);
-}
-
-=pod
-
-=head3 set_print_format (%fmt)
-
-Sets the print format to C<fmt>.
-On error the subroutine returns zero.
-
-=cut
-
-sub set_print_format
-{
-    my $var = shift;
-    my %format = @_;
-    pxs_set_print_format ($var, \%format);
-}
-
-=pod
-
-
-=head3 get_write_format ()
-
-Returns a reference to a hash containing the write format for the variable.
-
-
-=head3 get_print_format ()
-
-Returns a reference to a hash containing the print format for the variable.
-
-=head3 set_output_format (%fmt)
-
-Sets the write and print formats to C<fmt>.  This is the same as
-calling set_write_format followed by set_print_format.
-On error the subroutine returns zero.
-
-=cut
-
-
-sub set_output_format
-{
-    my $var = shift;
-    my %format = @_;
-    pxs_set_output_format ($var, \%format);
-}
-
-=pod
-
-=head3 clear_value_labels ()
-
-Removes all value labels from the variable.
-
-=cut
-
-
-=pod
-
-=head3 add_value_label ($key, $label)
-
-Adds the value label C<label> to the variable for the value C<key>.
-On error the subroutine returns zero.
-
-=head3 add_value_labels (@array)
-
-=cut
-
-sub add_value_labels
-{
-    my $var = shift;
-    my %values = @_;
-    my @li;
-
-    my $n = 0;
-    while ( @li = each %values ) 
-    {
-       if ( $var->add_value_label ($li[0], "$li[1]") ) 
-       {
-           $n++;
-       }
-    }
-
-    return $n;
-}
-
-=pod
-
-=head3 set_value_labels ($key, $value)
-
-C<Set_value_labels> is identical to calling L</clear_value_labels>
-followed by L</add_value_labels>.
-On error the subroutine returns zero.
-
-=cut
-
-sub set_value_labels
-{
-    my $self = shift;
-    my %labels = @_;
-    $self->clear_value_labels () ;
-    $self->add_value_labels (%labels);
-}
-
-=pod
-
-=head3 set_missing_values ($val1 [, $val2[, $val3] ])
-
-Sets the missing values for the variable.  
-No more than three missing values may be specified.
-
-=head3 get_attributes()
-
-Returns a reference to a hash of the custom variable attributes.
-Each value of the hash is a reference to an array containing the 
-attribute values.
-
-=head3 get_name ()
-
-Returns the name of the variable.
-
-=head3 get_label ()
-
-Returns the label of the variable or undef if there is no label.
-
-=head3 get_value_labels ()
-
-Returns a reference to a hash containing the value labels for the variable.
-The hash is keyed by data values which correpond to the labels.
-
-=cut
-
-package PSPP::Sysfile;
-
-=pod
-
-=head2 PSPP::Sysfile
-
-=head3 new ($filename, $dict [,%opts])
-
-Creates a new system file from the dictionary C<dict>.  The file will
-be written to the file called C<filename>.
-C<opt>, if specified, is a hash containing optional parameters for the
-system file.  Currently, the only supported parameter is
-C<compress>. If C<compress> is non zero, then the system file written
-will be in the compressed format.
-On error, undef is returned.
-
-
-=head3 append_case (@case)
-
-Appends a case to the system file.
-C<Case> is an array of scalars, each of which are the values of 
-the variables in the dictionary corresponding to the system file.
-The special value C<PSPP::SYSMIS> may be used to indicate that a value
-is system missing.
-If the array contains less elements than variables in the dictionary,
-remaining values will be set to system missing.
-
-=cut
-
-sub new
-{
-    my $class = shift;
-    my $filename = shift;
-    my $dict = shift;
-    my $opts = shift;
-
-    my $self  = pxs_create_sysfile ($filename, $dict, $opts);
-
-    if ( ref $self ) 
-    {
-       bless ($self, $class);
-    }
-    return $self;
-}
-
-=pod
-
-=head3 close ()
-
-Closes the system file.
-
-This subroutine closes the system file and flushes it to disk.  No
-further cases may be written once the file has been closed.
-The system file will be automatically closed when it goes out of scope.
-
-=cut
-
-package PSPP::Reader;
-
-=pod
-
-=head2 PSPP::Reader
-
-=cut
-
-sub open
-{
-    my $class = shift;
-    my $filename = shift;
-
-    my $self  = pxs_open_sysfile ($filename);
-
-    if ( ref $self ) 
-    {
-       bless ($self, $class);
-    }
-    return $self;
-}
-
-=pod
-
-=head3 open ($filename)
-
-Opens a system file for reading.
-
-Open is used to read data from an existing system file. 
-It creates and returns a PSPP::Reader object which can be used to read 
-data and dictionary information from C<filename>.
-
-=cut
-
-sub get_dict
-{
-    my $reader = shift;
-
-    my $dict = pxs_get_dict ($reader);
-
-    bless ($dict, "PSPP::Dict");
-
-    return $dict;
-}
-
-=pod
-
-=head3 get_dict ()
-
-Returns the dictionary associated with the reader.
-
-=head3 get_next_case ()
-
-Retrieves the next case from the reader.
-This method returns an array of scalars, each of which are the values of 
-the data in the system file.
-The first call to C<get_next_case> after C<open> has been called retrieves
-the first case in the system file.  Each subsequent call retrieves the next
-case.  If there are no more cases to be read, the function returns an empty
-list.
-
-If the case contains system missing values, these values are set to the 
-empty string.
-
-=head2 Miscellaneous subroutines
-
-The following subroutines provide (hopefully) useful information about the 
-values retrieved from a reader.
-
-=head3 PSPP::format_value ($value, $variable)
-
-Returns a scalar containing a string representing C<value> formatted according 
-to the print format of C<variable>.
-In the most common ussage,  C<value> should be a value of C<variable>.
-
-
-=head3 PSPP::value_is_missing ($value, $variable)
-
-Returns non-zero if C<value> is either system missing, or if it matches the 
-user missing criteria for C<variable>.
-
-=cut
-
-1;
-__END__
-
-
-=head1 AUTHOR
-
-John Darrington, E<lt>john@darrington.wattle.id.auE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright (C) 2007, 2008, 2009 by Free Software Foundation
-
-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 3 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, see <http://www.gnu.org/licenses/>.
-
-=cut
diff --git a/perl-module/lib/PSPP.pm.in b/perl-module/lib/PSPP.pm.in
new file mode 100644 (file)
index 0000000..a99c77d
--- /dev/null
@@ -0,0 +1,562 @@
+use 5.008008;
+use strict;
+use warnings;
+
+=head1 NAME
+
+PSPP-Perl - Perl extension to PSPP
+
+=head1 SYNOPSIS
+
+  use PSPP;
+
+=head1 DESCRIPTION
+
+PSPP-Perl provides an interface to the libraries used by pspp to read and
+write system files.  
+
+=head1 EXPORT
+
+None by default.
+
+=cut
+BEGIN {
+       $PSPP::VERSION='@VERSION_FOR_PERL@';
+       require XSLoader;
+       XSLoader::load('PSPP', $PSPP::VERSION);
+}
+
+PSPP::onBoot($PSPP::VERSION);
+
+=pod
+
+=head1 PROGRAMMER'S INTERFACE
+
+The subroutines in this package return zero or unref on error.
+When errors occur, a string describing the error is written 
+to C<$PSPP::errstr>. 
+
+=cut
+
+package PSPP;
+use POSIX ;
+
+use constant { SYSMIS => -(POSIX::DBL_MAX), 
+              PERL_EPOCH => 12219379200 # Number of seconds between 
+                   # 14th October 1582
+                  # and 
+                  # 1st January 1970 
+              };
+
+
+
+package PSPP::Dict;
+
+=pod
+
+=head2 PSPP::Dict::new
+
+Creates a new dictionary.  This returned dictionary will be empty.
+Returns undef on failure.
+
+=head3 set_documents ($string)
+
+Sets the documents (comments) to C<string>.
+
+=head3 add_document ($string)
+
+Appends C<string> to the documents.
+
+=head3 clear_documents ()
+
+Removes all documents.
+
+=head3 set_weight ($var)
+
+Sets the weighting variable to C<var>.
+
+=cut
+
+sub new
+{
+    my $class = shift;
+    my $self = pxs_dict_new ();
+    bless ($self, $class);
+    return $self;
+}
+
+=pod
+
+=head3 get_var_cnt ()
+
+Returns the number of variables in the dictionary.
+
+=head3 get_var ($idx)
+
+Returns the C<idx>th variable from the dictionary.
+Returns undef if C<idx> is greater than or equal to the number
+of variables in the dictionary.
+
+=cut
+
+sub get_var
+{
+    my $dict = shift;
+    my $idx = shift;
+    my $var = pxs_get_variable ($dict, $idx);
+
+    if ( ref $var ) 
+    {
+       bless ($var, "PSPP::Var");
+    }
+    return $var;
+}
+
+=pod
+
+=head3 get_var_by_name ($name)
+
+Returns the variable from the dictionary whose name is C<name>.
+If there is no such variable, a null reference will be returned.
+
+=cut
+
+sub get_var_by_name
+{
+    my $dict = shift;
+    my $name = shift;
+    my $var = pxs_get_var_by_name ($dict, $name);
+
+    if ( ref $var ) 
+    {
+       bless ($var, "PSPP::Var");
+    }
+    return $var;
+}
+
+
+package PSPP::Fmt;
+
+=pod
+
+=head2 PSPP::Fmt
+
+Contains constants used to denote variable format types.  
+The identifiers are the same as  those used in pspp to denote formats.
+For  example C<PSPP::Fmt::F> defines floating point format, and
+C<PSPP::Fmt::A> denotes string format.
+
+=cut
+
+# These must correspond to the values in src/data/format.h
+use constant {
+    F =>        0,
+    COMMA =>    1,
+    DOT =>      2, 
+    DOLLAR =>   3, 
+    PCT =>      4, 
+    E =>        5, 
+    CCA =>      6, 
+    CCB =>      7, 
+    CCC =>      8, 
+    CCD =>      9, 
+    CCE =>      10, 
+    N =>        11, 
+    Z =>        12, 
+    P =>        13, 
+    PK =>       14, 
+    IB =>       15, 
+    PIB =>      16, 
+    PIBHEX =>   17, 
+    RB =>       18, 
+    RBHEX =>    19, 
+    DATE =>     20, 
+    ADATE =>    21, 
+    EDATE =>    22, 
+    JDATE =>    23, 
+    SDATE =>    24, 
+    QYR =>      25, 
+    MOYR =>     26, 
+    WKYR =>     27, 
+    DATETIME => 28, 
+    TIME =>     29, 
+    DTIME =>    30, 
+    WKDAY =>    31, 
+    MONTH =>    32, 
+    A =>        33, 
+    AHEX =>     34
+};
+
+
+=head2 PSPP::Var
+
+=cut
+
+package PSPP::Var;
+
+=head3 new ($dict, $name, %input_fmt)
+
+Creates and returns a new variable in the dictionary C<dict>.  The 
+new variable will have the name C<name>.  C<name> must be a valid UTF8 string.
+The input format is set by the C<input_fmt> parameter 
+(See L</PSPP::Fmt>).
+By default, the write and print formats are the same as the input format.
+The write and print formats may be changed (See L</set_write_format>), 
+L</set_print_format>).  The input format may not be changed after
+the variable has been created.
+If the variable cannot be created, undef is returned.
+
+=cut
+
+sub new
+{
+    my $class = shift;
+    my $dict = shift;
+    my $name = shift;
+    my %format = @_;
+    my $self = pxs_dict_create_var ($dict, $name, \%format);
+    if ( ref $self ) 
+    {
+       bless ($self, $class);
+    }
+    return $self;
+}
+
+=pod
+
+=head3 set_label ($label)
+
+Sets the variable label to C<label>, which must be a valid UTF8 string.
+
+
+=cut
+
+=pod
+
+=head3 set_write_format (%fmt)
+
+Sets the write format to C<fmt>. <fmt> is a hash containing the keys:
+
+=over 2
+
+=item FMT
+
+A constant denoting the format type.  See L</PSPP::Fmt>.
+
+=item decimals
+
+An integer denoting the number of decimal places for the format.
+
+=item width
+
+An integer denoting the width of the format.
+
+=back
+
+On error the subroutine returns zero.
+
+=cut
+
+sub set_write_format
+{
+    my $var = shift;
+    my %format = @_;
+    pxs_set_write_format ($var, \%format);
+}
+
+=pod
+
+=head3 set_print_format (%fmt)
+
+Sets the print format to C<fmt>.
+On error the subroutine returns zero.
+
+=cut
+
+sub set_print_format
+{
+    my $var = shift;
+    my %format = @_;
+    pxs_set_print_format ($var, \%format);
+}
+
+=pod
+
+
+=head3 get_write_format ()
+
+Returns a reference to a hash containing the write format for the variable.
+
+
+=head3 get_print_format ()
+
+Returns a reference to a hash containing the print format for the variable.
+
+=head3 set_output_format (%fmt)
+
+Sets the write and print formats to C<fmt>.  This is the same as
+calling set_write_format followed by set_print_format.
+On error the subroutine returns zero.
+
+=cut
+
+
+sub set_output_format
+{
+    my $var = shift;
+    my %format = @_;
+    pxs_set_output_format ($var, \%format);
+}
+
+=pod
+
+=head3 clear_value_labels ()
+
+Removes all value labels from the variable.
+
+=cut
+
+
+=pod
+
+=head3 add_value_label ($key, $label)
+
+Adds the value label C<label> to the variable for the value C<key>.
+C<label> must be a valid UTF8 string.
+On error the subroutine returns zero.
+
+=head3 add_value_labels (@array)
+
+=cut
+
+sub add_value_labels
+{
+    my $var = shift;
+    my %values = @_;
+    my @li;
+
+    my $n = 0;
+    while ( @li = each %values ) 
+    {
+       if ( $var->add_value_label ($li[0], "$li[1]") ) 
+       {
+           $n++;
+       }
+    }
+
+    return $n;
+}
+
+=pod
+
+=head3 set_value_labels ($key, $label)
+
+C<Set_value_labels> is identical to calling L</clear_value_labels>
+followed by L</add_value_labels>.
+On error the subroutine returns zero.
+
+=cut
+
+sub set_value_labels
+{
+    my $self = shift;
+    my %labels = @_;
+    $self->clear_value_labels () ;
+    $self->add_value_labels (%labels);
+}
+
+=pod
+
+=head3 set_missing_values ($val1 [, $val2[, $val3] ])
+
+Sets the missing values for the variable.  
+No more than three missing values may be specified.
+
+=head3 get_attributes()
+
+Returns a reference to a hash of the custom variable attributes.
+Each value of the hash is a reference to an array containing the 
+attribute values.
+
+=head3 get_name ()
+
+Returns the name of the variable.
+
+=head3 get_label ()
+
+Returns the label of the variable or undef if there is no label.
+
+=head3 get_value_labels ()
+
+Returns a reference to a hash containing the value labels for the variable.
+The hash is keyed by data values which correpond to the labels.
+
+=cut
+
+package PSPP::Sysfile;
+
+=pod
+
+=head2 PSPP::Sysfile
+
+=head3 new ($filename, $dict [,%opts])
+
+Creates a new system file from the dictionary C<dict>.  The file will
+be written to the file called C<filename>.
+C<opt>, if specified, is a hash containing optional parameters for the
+system file.  Currently, the only supported parameter is
+C<compress>. If C<compress> is non zero, then the system file written
+will be in the compressed format.
+On error, undef is returned.
+
+
+=head3 append_case (@case)
+
+Appends a case to the system file.
+C<Case> is an array of scalars, each of which are the values of 
+the variables in the dictionary corresponding to the system file.
+If the case contains strings, then the strings must be UTF8 encoded.
+The special value C<PSPP::SYSMIS> may be used to indicate that a value
+is system missing.
+If the array contains less elements than variables in the dictionary,
+remaining values will be set to system missing.
+
+=cut
+
+sub new
+{
+    my $class = shift;
+    my $filename = shift;
+    my $dict = shift;
+    my $opts = shift;
+
+    my $self  = pxs_create_sysfile ($filename, $dict, $opts);
+
+    if ( ref $self ) 
+    {
+       bless ($self, $class);
+    }
+    return $self;
+}
+
+=pod
+
+=head3 close ()
+
+Closes the system file.
+
+This subroutine closes the system file and flushes it to disk.  No
+further cases may be written once the file has been closed.
+The system file will be automatically closed when it goes out of scope.
+
+=cut
+
+package PSPP::Reader;
+
+=pod
+
+=head2 PSPP::Reader
+
+=cut
+
+sub open
+{
+    my $class = shift;
+    my $filename = shift;
+
+    my $self  = pxs_open_sysfile ($filename);
+
+    if ( ref $self ) 
+    {
+       bless ($self, $class);
+    }
+    return $self;
+}
+
+=pod
+
+=head3 open ($filename)
+
+Opens a system file for reading.
+
+Open is used to read data from an existing system file. 
+It creates and returns a PSPP::Reader object which can be used to read 
+data and dictionary information from C<filename>.
+
+=cut
+
+sub get_dict
+{
+    my $reader = shift;
+
+    my $dict = pxs_get_dict ($reader);
+
+    bless ($dict, "PSPP::Dict");
+
+    return $dict;
+}
+
+=pod
+
+=head3 get_dict ()
+
+Returns the dictionary associated with the reader.
+
+=head3 get_next_case ()
+
+Retrieves the next case from the reader.
+This method returns an array of scalars, each of which are the values of 
+the data in the system file.
+The first call to C<get_next_case> after C<open> has been called retrieves
+the first case in the system file.  Each subsequent call retrieves the next
+case.  If there are no more cases to be read, the function returns an empty
+list.
+
+If the case contains system missing values, these values are set to the 
+empty string.
+
+=head2 Miscellaneous subroutines
+
+The following subroutines provide (hopefully) useful information about the 
+values retrieved from a reader.
+
+=head3 PSPP::format_value ($value, $variable)
+
+Returns a scalar containing a string representing C<value> formatted according 
+to the print format of C<variable>.
+In the most common usage,  C<value> should be a value of C<variable>.
+
+
+=head3 PSPP::value_is_missing ($value, $variable)
+
+Returns non-zero if C<value> is either system missing, or if it matches the 
+user missing criteria for C<variable>.
+
+=cut
+
+1;
+__END__
+
+
+=head1 AUTHOR
+
+John Darrington, E<lt>john@darrington.wattle.id.auE<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2007, 2008, 2009 by Free Software Foundation
+
+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 3 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, see <http://www.gnu.org/licenses/>.
+
+=cut
index 92180aba9cde097c4409b2d71f6d78c66974504c..d2d473d2209718fe3669464d0f100fe4bb7f28bc 100644 (file)
@@ -40,7 +40,7 @@ sub run_pspp_syntax
     print FH "$syntax";
     close (FH);
 
-    system ("cd $tempdir; $pspp_cmd -o raw-ascii $syntaxfile");
+    system ("cd $tempdir; $pspp_cmd -o pspp.csv $syntaxfile");
 }
 
 sub run_pspp_syntax_cmp
@@ -52,7 +52,7 @@ sub run_pspp_syntax_cmp
 
     run_pspp_syntax ($tempdir, $syntax);
 
-    my $diff =  diff ("$tempdir/pspp.list", \$result);
+    my $diff =  diff ("$tempdir/pspp.csv", \$result);
 
     if ( ! ($diff eq ""))
     {
@@ -175,32 +175,27 @@ sub run_pspp_syntax_cmp
        DISPLAY DOCUMENTS.
        LIST.
 SYNTAX
-1.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|id      |Format: F2.0                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|name    |Format: A20                                |       2|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 20                          |        |
-+--------+-------------------------------------------+--------+
+Variable,Description,,Position
+id,Format: F2.0,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+name,Format: A20,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 20,,
 
 File label:
+
 This is the file label
 
 Documents in the active file:
 
 This is a document line
 
-id                 name
--- --------------------
-21 wheelbarrow          
-
+Table: Data List
+id,name
+21,wheelbarrow         
 RESULT
 
 
@@ -256,40 +251,30 @@ RESULT
 GET FILE='$tempfile'.
 DISPLAY DICTIONARY.
 SYNTAX
-1.1 DISPLAY.  
-+----------+---------------------------------------------+--------+
-|Variable  |Description                                  |Position|
-#==========#=============================================#========#
-|integer   |My Integer                                   |       1|
-|          |Format: F8.0                                 |        |
-|          |Measure: Scale                               |        |
-|          |Display Alignment: Right                     |        |
-|          |Display Width: 8                             |        |
-|          |Missing Values: 9; 99                        |        |
-|          +---------+-----------------------------------+        |
-|          |        0|Zero                               |        |
-|          |        1|Unity                              |        |
-|          |        2|Duality                            |        |
-+----------+---------+-----------------------------------+--------+
-|string    |My String                                    |       2|
-|          |Format: A8                                   |        |
-|          |Measure: Nominal                             |        |
-|          |Display Alignment: Left                      |        |
-|          |Display Width: 8                             |        |
-|          |Missing Values: "this    "; "that    "       |        |
-|          +---------+-----------------------------------+        |
-|          | xx      |foo                                |        |
-|          | yy      |bar                                |        |
-+----------+---------+-----------------------------------+--------+
-|longstring|My Long String                               |       3|
-|          |Format: A9                                   |        |
-|          |Measure: Nominal                             |        |
-|          |Display Alignment: Left                      |        |
-|          |Display Width: 9                             |        |
-|          +---------+-----------------------------------+        |
-|          |xxx      |xfoo                               |        |
-+----------+---------+-----------------------------------+--------+
-
+Variable,Description,,Position
+integer,My Integer,,1
+,Format: F8.0,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+,Missing Values: 9; 99,,
+,0,Zero,
+,1,Unity,
+,2,Duality,
+string,My String,,2
+,Format: A8,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+,"Missing Values: ""this    ""; ""that    """,,
+,xx      ,foo,
+,yy      ,bar,
+longstring,My Long String,,3
+,Format: A9,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 9,,
+,xxx      ,xfoo,
 RESULT
 
   }
@@ -307,7 +292,7 @@ begin data.
 1111 One   1 1/1/1 1   1/1/1+01:01
 2222 Two   2 2/2/2 2   2/2/2+02:02
 3333 Three 3 3/3/3 3   3/3/3+03:03
-.    .     . .         .
+.    .     . .     .   .
 5555 Five  5 5/5/5 5   5/5/5+05:05
 end data.
 
@@ -493,7 +478,7 @@ EOF
 
 SYNTAX
 
- system ("cp $tempdir/pspp.list $tempdir/in.txt");
+ system ("cp $tempdir/pspp.csv $tempdir/in.txt");
 
  run_pspp_syntax ($tempdir, <<SYNTAX);
  get file='$tempdir/out.sav'.
@@ -502,7 +487,7 @@ SYNTAX
 
 SYNTAX
  
- ok (! diff ("$tempdir/pspp.list", "$tempdir/in.txt"), "Streaming of files");
+ ok (! diff ("$tempdir/pspp.csv", "$tempdir/in.txt"), "Streaming of files");
 }
 
 
index 082260ff083ac994c2f29e0a0b072c9e9f2c0187..e9b69f8b1843700251abf65210433472742fe302 100644 (file)
@@ -1,6 +1,4 @@
 Makefile
-Makefile.in
-Makefile.in.in
 Makevars.template
 POTFILES
 POTFILES.in
diff --git a/po/Makefile.in b/po/Makefile.in
new file mode 100644 (file)
index 0000000..24c2657
--- /dev/null
@@ -0,0 +1,11 @@
+# This is a dummy Makefile to reassure Automake.
+
+TARGETS = all distdir install install-data install-exec uninstall      \
+install-dvi install-html install-info install-ps install-pdf           \
+installdirs check installcheck mostlyclean clean distclean             \
+maintainer-clean dvi pdf ps info html tags ctags
+
+$(TARGETS):
+       @# Nothing to do.
+
+.PHONY: $(TARGETS)
index fdb45c8e9111c708a6c4e7acd108a8ad98cdb9d9..4952d35daffae50f21a0858fed0e5e877ae89a67 100644 (file)
@@ -3,9 +3,6 @@
 # Usually the message domain is the same as the package name.
 DOMAIN = $(PACKAGE)
 
-# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ 
-
 # This is the copyright holder that gets inserted into the header of the
 # $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
 # package.  (Note that the msgstr strings, extracted from the package's
index 56715e1ebdc8c8acb5834e56f28c2b2c893987a9..3d68a8f281f963427340794bfef8121ebaa3cfc6 100644 (file)
@@ -4,27 +4,30 @@ XGETTEXT=xgettext
 MSGMERGE=msgmerge
 MSGFMT=msgfmt
 
-POFILES=po/en_GB.po po/nl.po po/pt_BR.po
+POFILES=po/ca.po po/en_GB.po po/es.po po/nl.po po/pt_BR.po
 
 POTFILE=po/$(DOMAIN).pot
 
 TRANSLATABLE_FILES = $(DIST_SOURCES) $(all_q_sources)
 
-$(POTFILE): $(TRANSLATABLE_FILES)
-       @$(MKDIR_P) po
-       $(XGETTEXT) --directory=$(top_srcdir) $(TRANSLATABLE_FILES) \
-       $(XGETTEXT_OPTIONS) \
+XGETTEXT_OPTIONS = \
        --copyright-holder="$(COPYRIGHT_HOLDER)" \
        --package-name=$(PACKAGE) \
        --package-version=$(VERSION) \
        --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) \
-       --add-comments='TRANSLATORS:' \
-       -o $(POTFILE)
+       --add-comments='TRANSLATORS:'
+
+$(POTFILE): $(TRANSLATABLE_FILES) $(UI_FILES)
+       @$(MKDIR_P) po
+       $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS)    $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@
+       $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=glade -o $@
 
 
 $(POFILES): $(POTFILE)
-       $(MSGMERGE) $(top_srcdir)/$* $< -o $@
+       $(MSGMERGE) $(top_srcdir)/$@ $? -o $@
+
 
+SUFFIXES += .po .gmo
 .po.gmo:
        @$(MKDIR_P) `dirname $@`
        $(MSGFMT) $< -o $@
@@ -39,16 +42,23 @@ install-data-hook: $(GMOFILES)
          lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
          $(INSTALL) -D $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
        done
-       
 
 uninstall-hook:
        for f in $(GMOFILES); do \
          lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
-         $(RM) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
+         rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
        done
 
 
 EXTRA_DIST += $(POFILES) $(POTFILE)
 
-CLEANFILES += $(POFILES) $(GMOFILES) $(POTFILE)
+CLEANFILES += $(GMOFILES) $(POTFILE)
 
+# Clean $(POFILES) from build directory but not if that's the same as
+# the source directory.
+po_CLEAN:
+       @if test "$(srcdir)" != .; then \
+               echo rm -f $(POFILES); \
+               rm -f $(POFILES); \
+       fi
+CLEAN_LOCAL += po_CLEAN
diff --git a/po/ca.po b/po/ca.po
new file mode 100644 (file)
index 0000000..a0e3deb
--- /dev/null
+++ b/po/ca.po
@@ -0,0 +1,8027 @@
+# Catalan messages for PSPS
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This file is distributed under the same licence as the pspp package.
+# Francisco J. Miguel Quesada <Miguel.Quesada@uab.cat>, 2009.
+# Palmira Payá Sanchez, 2009.
+# Javier Gómez Serrano, 2009.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pspp-0.7.2-pre1\n"
+"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
+"POT-Creation-Date: 2010-05-21 12:02+0200\n"
+"PO-Revision-Date: 2010-01-24 16:28+0100\n"
+"Last-Translator: Francesc Josep Miguel Quesada <Miguel.Quesada@uab.cat>\n"
+"Language-Team: Catalan <ca@dodds.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: src/ui/gui/psppire-buttonbox.c:275 src/ui/gui/psppire-buttonbox.c:437
+msgid "Continue"
+msgstr "Continuar"
+
+#: src/ui/gui/psppire-buttonbox.c:435
+msgid "OK"
+msgstr "OK"
+
+#: src/ui/gui/psppire-buttonbox.c:436
+msgid "Go To"
+msgstr "Anar a"
+
+#: src/ui/gui/psppire-buttonbox.c:438
+msgid "Cancel"
+msgstr "Cancel·lar"
+
+#: src/ui/gui/psppire-buttonbox.c:439
+msgid "Help"
+msgstr "Ajuda"
+
+#: src/ui/gui/psppire-buttonbox.c:440
+msgid "Reset"
+msgstr "Reiniciar"
+
+#: src/ui/gui/psppire-buttonbox.c:441
+msgid "Paste"
+msgstr "Enganxa"
+
+#: src/ui/gui/psppire-dictview.c:466 src/language/dictionary/split-file.c:82
+#: src/language/dictionary/sys-file-info.c:150
+#: src/language/dictionary/sys-file-info.c:340
+#: src/language/dictionary/sys-file-info.c:664
+#: src/language/stats/descriptives.c:881
+#: src/language/data-io/data-parser.c:649
+#: src/language/data-io/data-parser.c:688 src/language/data-io/print.c:403
+msgid "Variable"
+msgstr "Variable"
+
+#: src/ui/gui/psppire-dictview.c:503
+msgid "Prefer variable labels"
+msgstr "Prefereixo les etiquetes de variable"
+
+#: src/ui/gui/psppire-var-view.c:193
+#, fuzzy, c-format
+msgid "Var%d"
+msgstr "Parell %d"
+
+#: src/data/any-reader.c:56
+#, c-format
+msgid "An error occurred while opening \"%s\": %s."
+msgstr "S'ha produït un error en obrir \"%s\": %s."
+
+#: src/data/any-reader.c:101
+#, c-format
+msgid "\"%s\" is not a system or portable file."
+msgstr "\"%s\" no és un arxiu del sistema o portàtil."
+
+#: src/data/any-reader.c:107 src/data/any-writer.c:63
+msgid "The inline file is not allowed here."
+msgstr "L'arxiu en línia no està permès aquí."
+
+#: src/data/calendar.c:81
+#, c-format
+msgid "Month %d is not in acceptable range of 0 to 13."
+msgstr "El mes %d no està a l'interval acceptable de 0 a 13."
+
+#: src/data/calendar.c:89
+#, c-format
+msgid "Day %d is not in acceptable range of 0 to 31."
+msgstr "El dia %d no hi és a l'interval acceptable de 0 a 31."
+
+#: src/data/calendar.c:96
+#, c-format
+msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
+msgstr ""
+"La data %04d-%d-%d és anterior de la data acceptada més antiga, 1582-10-15."
+
+#: 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 ""
+"Almenys un cas a la lectura de dades tenia un valor de ponderació que és "
+"perdut d'usuari, de sistema, zero o negatiu. Aquest(s) cas(os) van ser "
+"ignorat(s)."
+
+#: src/data/data-in.c:274 src/data/data-in.c:464
+msgid "Field contents are not numeric."
+msgstr "El contingut del camp no és numèric."
+
+#: src/data/data-in.c:276 src/data/data-in.c:466
+msgid "Number followed by garbage."
+msgstr "Nombre seguit per escombraria."
+
+#: src/data/data-in.c:287
+msgid "Invalid numeric syntax."
+msgstr "Sintaxi numèrica no vàlida."
+
+#: src/data/data-in.c:296 src/data/data-in.c:479
+msgid "Too-large number set to system-missing."
+msgstr "Nombre massa gran definit com a perdut del sistema."
+
+#: src/data/data-in.c:301 src/data/data-in.c:484
+msgid "Too-small number set to zero."
+msgstr "Nombre massa petit definit com a zero. "
+
+#: src/data/data-in.c:327
+msgid "All characters in field must be digits."
+msgstr "Tots els caràcters del camp han de ser dígits."
+
+#: src/data/data-in.c:350
+msgid "Unrecognized character in field."
+msgstr "Caràcter no reconegut en el camp."
+
+#: src/data/data-in.c:374 src/data/data-in.c:650
+msgid "Field must have even length."
+msgstr "Camp ha de tenir l'amplada divisible per 2 (parell)."
+
+#: src/data/data-in.c:379 src/data/data-in.c:661
+msgid "Field must contain only hex digits."
+msgstr "Camp ha de contenir només dígits hexadecimals."
+
+#: src/data/data-in.c:700 src/data/data-in.c:747
+msgid "Syntax error in date field."
+msgstr "Error sintàctic en el camp de dades."
+
+#: src/data/data-in.c:716
+#, c-format
+msgid "Day (%ld) must be between 1 and 31."
+msgstr "Dia (%ld) ha de ser entre 1 i 31."
+
+#: src/data/data-in.c:763
+msgid "Delimiter expected between fields in date."
+msgstr "A la data s'espera un delimitador entre els camps."
+
+#: src/data/data-in.c:837
+msgid ""
+"Unrecognized month format.  Months may be specified as Arabic or Roman "
+"numerals or as at least 3 letters of their English names."
+msgstr ""
+"Format de mes no reconegut. Els mesos poden ser especificats com a números "
+"Aràbics o Romans, o com a mínim 3 lletres dels seus noms en Anglès."
+
+#: src/data/data-in.c:864
+#, c-format
+msgid "Year (%ld) must be between 1582 and 19999."
+msgstr "Any (%ld) ha de ser entre 1582 i 19999."
+
+#: src/data/data-in.c:876
+#, c-format
+msgid "Trailing garbage \"%.*s\" following date."
+msgstr "Escombraria  \"%.*s\" darrera de la data."
+
+#: src/data/data-in.c:892
+msgid "Julian day must have exactly three digits."
+msgstr "Dia Julià ha de tenir exactament tres dígits."
+
+#: src/data/data-in.c:897
+#, c-format
+msgid "Julian day (%ld) must be between 1 and 366."
+msgstr "Dia Julià (%ld) ha de ser entre 1 i 366."
+
+#: src/data/data-in.c:921
+#, c-format
+msgid "Quarter (%ld) must be between 1 and 4."
+msgstr "Trimestre (%ld) ha de ser entre 1 i 4."
+
+#: src/data/data-in.c:941
+#, c-format
+msgid "Week (%ld) must be between 1 and 53."
+msgstr "Setmana (%ld) ha de ser entre 1 i 53."
+
+#: src/data/data-in.c:954
+msgid "Delimiter expected between fields in time."
+msgstr "Delimitador esperat entre camps de temps."
+
+#: src/data/data-in.c:974
+#, c-format
+msgid "Minute (%ld) must be between 0 and 59."
+msgstr "Minut (%ld) ha de ser entre 0 i 59."
+
+#: src/data/data-in.c:1014
+msgid ""
+"Unrecognized weekday name.  At least the first two letters of an English "
+"weekday name must be specified."
+msgstr ""
+"Dia de la setmana no reconegut. Al menys s'han d'especificar les dues "
+"primeres lletres del nom en anglès."
+
+#: src/data/data-in.c:1152
+#, c-format
+msgid "`%c' expected in date field."
+msgstr "S'espera `%c' en un camp de dades."
+
+#: src/data/data-in.c:1193
+#, c-format
+msgid "column %d"
+msgstr "columna %d"
+
+#: src/data/data-in.c:1195
+#, c-format
+msgid "columns %d-%d"
+msgstr "columnes %d-%d"
+
+#: src/data/data-in.c:1199
+#, c-format
+msgid "%s field) "
+msgstr "%s camp)"
+
+#: src/data/data-out.c:481
+#, c-format
+msgid "Weekday number %f is not between 1 and 7."
+msgstr "Nombre de dia de la setmana%f no està entre 1 i 7."
+
+#: src/data/data-out.c:502
+#, c-format
+msgid "Month number %f is not between 1 and 12."
+msgstr "Nombre de mes %f no està entre 1 i 12."
+
+#: src/data/dict-class.c:52
+msgid "ordinary"
+msgstr "ordinàri/a"
+
+#: src/data/dict-class.c:54
+msgid "system"
+msgstr "sistema"
+
+#: src/data/dict-class.c:56
+msgid "scratch"
+msgstr "zero"
+
+#: src/data/dictionary.c:980
+msgid ""
+"At least one case in the data file had a weight value that was user-missing, "
+"system-missing, zero, or negative.  These case(s) were ignored."
+msgstr ""
+"Almenys un cas a l'arxiu de dades tenia un valor de ponderació que és perdut "
+"d'usuari, de sistema, zero o negatiu. Aquest(s) cas(os) van ser ignorat(s)."
+
+#: src/data/dictionary.c:1283
+#, c-format
+msgid "Truncating document line to %d bytes."
+msgstr "Línia de document tallada a  %d bytes."
+
+#: src/data/file-handle-def.c:462
+#, c-format
+msgid "Can't read from %s as a %s because it is already being read as a %s."
+msgstr ""
+"No es pot llegir de %s com una %s perquè ja està sent llegit com una %s."
+
+#: src/data/file-handle-def.c:466
+#, c-format
+msgid "Can't write to %s as a %s because it is already being written as a %s."
+msgstr "No es pot escriure en %s com un %s perquè ja està escrit com un %s."
+
+#: src/data/file-handle-def.c:473
+#, c-format
+msgid "Can't re-open %s as a %s."
+msgstr "No es pot tornar a obrir %s com a %s."
+
+#: src/data/file-name.c:168
+#, c-format
+msgid "Not opening pipe file `%s' because SAFER option set."
+msgstr ""
+"No obrir l'arxiu de transferència '%s' perquè l'opció SAFER està activada."
+
+#: src/data/format.c:235
+msgid "Input format"
+msgstr "Format d'entrada"
+
+#: src/data/format.c:235
+msgid "Output format"
+msgstr "Format de sortida"
+
+#: src/data/format.c:244
+#, c-format
+msgid "Format %s may not be used for input."
+msgstr "Format %s no pot ser utilitzat com entrada."
+
+#: src/data/format.c:251
+#, c-format
+msgid "%s specifies width %d, but %s requires an even width."
+msgstr "%s especifica amplada %d, però %s requereix una amplada parell."
+
+#: src/data/format.c:260
+#, c-format
+msgid "%s %s specifies width %d, but %s requires a width between %d and %d."
+msgstr ""
+"%s %s especifica amplada %d, però %s requereix una amplada entre %d i %d."
+
+#: src/data/format.c:269
+#, c-format
+msgid "%s %s specifies %d decimal place, but %s does not allow any decimals."
+msgid_plural ""
+"%s %s specifies %d decimal places, but %s does not allow any decimals."
+msgstr[0] "%s %s especifica %d lloc decimal, però %s no en permet cap."
+msgstr[1] "%s %s especifica %d llocs decimals, però %s no en permet cap."
+
+#: src/data/format.c:280
+#, c-format
+msgid ""
+"%s %s specifies %d decimal place, but the given width allows at most %d "
+"decimals."
+msgid_plural ""
+"%s %s specifies %d decimal places, but the given width allows at most %d "
+"decimals."
+msgstr[0] ""
+"%s %s especifica %d lloc decimal, però l'amplada donada permet com a molt %d "
+"decimals."
+msgstr[1] ""
+"%s %s especifica %d llocs decimals, però l'amplada donada permet com a molt %"
+"d decimals."
+
+#: src/data/format.c:287
+#, c-format
+msgid ""
+"%s %s specifies %d decimal place, but the given width does not allow for any "
+"decimals."
+msgid_plural ""
+"%s %s specifies %d decimal places, but the given width does not allow for "
+"any decimals."
+msgstr[0] ""
+"%s %s especifica %d lloc decimal, però l'amplada donada no en permet cap."
+msgstr[1] ""
+"%s %s especifica %d llocs decimals, però l'amplada donada no en permet cap."
+
+#: src/data/format.c:326
+#, c-format
+msgid "%s variables are not compatible with %s format %s."
+msgstr "Les variables %s no són compatibles amb %s format %s."
+
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:628 src/ui/gui/psppire.ui:1960
+#: src/ui/gui/var-sheet-dialogs.ui:139
+msgid "String"
+msgstr "Cadena"
+
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:621 src/ui/gui/psppire.ui:2040
+#: src/ui/gui/var-sheet-dialogs.ui:27
+msgid "Numeric"
+msgstr "Numèric"
+
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
+#: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
+#: src/language/xforms/recode.c:507
+#: src/language/dictionary/apply-dictionary.c:78
+#: src/language/dictionary/apply-dictionary.c:79
+msgid "numeric"
+msgstr "numèric"
+
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
+#: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
+#: src/language/xforms/recode.c:507
+#: src/language/dictionary/apply-dictionary.c:78
+#: src/language/dictionary/apply-dictionary.c:79
+msgid "string"
+msgstr "cadena"
+
+#: src/data/format.c:346
+#, c-format
+msgid "String variable with width %d is not compatible with format %s."
+msgstr "Variable de cadena amb amplada %d no és compatible amb el format %s."
+
+#: src/data/gnumeric-reader.c:36
+msgid ""
+"Support for Gnumeric files was not compiled into this installation of PSPP"
+msgstr ""
+"Suport per a arxius Gnumeric no va ser compilat en aquesta instal·lació de "
+"PSPP"
+
+#: src/data/gnumeric-reader.c:364
+#, c-format
+msgid "Error opening \"%s\" for reading as a Gnumeric file: %s."
+msgstr "Error en obrir \"%s\" per a la lectura com un arxiu Gnumeric: %s."
+
+#: src/data/gnumeric-reader.c:384
+#, c-format
+msgid "Invalid cell range \"%s\""
+msgstr "Interval de cel·la \"%s\" invàlid"
+
+#: src/data/gnumeric-reader.c:516 src/data/psql-reader.c:187
+#, c-format
+msgid "Cannot create variable name from %s"
+msgstr "No es pot crear el nom de la variable des de %s"
+
+#: src/data/gnumeric-reader.c:528
+#, c-format
+msgid "Selected sheet or range of spreadsheet \"%s\" is empty."
+msgstr "El full o l'interval de fulls de càlcul seleccionats \"%s\" és buit."
+
+#: src/data/make-file.c:68
+#, c-format
+msgid "%s: Creating temporary file: %s."
+msgstr "%s: Creant arxiu temporal: %s"
+
+#: src/data/make-file.c:110
+#, c-format
+msgid "%s: Creating file: %s."
+msgstr "%s: Creant arxiu: %s"
+
+#: src/data/make-file.c:148
+#, c-format
+msgid "Opening %s for writing: %s."
+msgstr "Obrint %s per a escriure: %s."
+
+#: src/data/make-file.c:157
+#, c-format
+msgid "Opening stream for %s: %s."
+msgstr "Obrint flux per a %s: %s."
+
+#: src/data/make-file.c:186
+#, c-format
+msgid "Creating temporary file to replace %s: %s."
+msgstr "Creant arxiu temporal per a substituir %s: %s."
+
+#: src/data/make-file.c:197
+#, c-format
+msgid "Creating temporary file %s: %s."
+msgstr "Creant arxiu temporal %s: %s."
+
+#: src/data/make-file.c:209
+#, c-format
+msgid "Opening stream for temporary file %s: %s."
+msgstr "Obrint flux per a l'arxiu temporal %s: %s."
+
+#: src/data/make-file.c:250
+#, c-format
+msgid "Replacing %s by %s: %s."
+msgstr "Substituint %s per %s: %s."
+
+#: src/data/make-file.c:278
+#, c-format
+msgid "Removing %s: %s."
+msgstr "Eliminant %s: %s."
+
+#: src/data/por-file-reader.c:99
+#, fuzzy, c-format
+msgid "portable file %s corrupt at offset 0x%llx: "
+msgstr "arxiu portàtil %s corromput a la posició 0x%lx: "
+
+#: src/data/por-file-reader.c:128
+#, fuzzy, c-format
+msgid "reading portable file %s at offset 0x%llx: "
+msgstr "llegint l'arxiu portàtil %s en la posició 0x%lx: "
+
+#: src/data/por-file-reader.c:156
+#, c-format
+msgid "Error closing portable file \"%s\": %s."
+msgstr "Error en tancar l'arxiu portàtil \"%s\": %s."
+
+#: src/data/por-file-reader.c:208
+msgid "unexpected end of file"
+msgstr "fi d'arxiu inesperat"
+
+#. TRANSLATORS: this fragment will be interpolated into
+#. messages in fh_lock() that identify types of files.
+#: src/data/por-file-reader.c:267 src/data/por-file-writer.c:149
+msgid "portable file"
+msgstr "arxiu portàtil"
+
+#: src/data/por-file-reader.c:275
+#, c-format
+msgid ""
+"An error occurred while opening \"%s\" for reading as a portable file: %s."
+msgstr "Error en obrir \"%s\" per a la lectura com a arxiu portàtil: %s."
+
+#: src/data/por-file-reader.c:296
+msgid "Data record expected."
+msgstr "Registre de dades esperat."
+
+#: src/data/por-file-reader.c:378
+msgid "Number expected."
+msgstr "Nombre esperat."
+
+#: src/data/por-file-reader.c:406
+msgid "Missing numeric terminator."
+msgstr "Manca de terminació numèrica."
+
+#: src/data/por-file-reader.c:429
+msgid "Invalid integer."
+msgstr "Nombre enter invàlid."
+
+#: src/data/por-file-reader.c:440 src/data/por-file-reader.c:460
+#, c-format
+msgid "Bad string length %d."
+msgstr "Longitud de cadena %d invàlida."
+
+#: src/data/por-file-reader.c:523
+#, c-format
+msgid "%s: Not a portable file."
+msgstr "%s: No és un arxiu portàtil."
+
+#: src/data/por-file-reader.c:540
+#, c-format
+msgid "Unrecognized version code `%c'."
+msgstr "Codi de versió `%c' no reconegut."
+
+#: src/data/por-file-reader.c:549
+#, c-format
+msgid "Bad date string length %zu."
+msgstr "Longitud de cadena de dades %zu invàlida."
+
+#: src/data/por-file-reader.c:551
+#, c-format
+msgid "Bad time string length %zu."
+msgstr "Longitud de cadena de temps %zu invàlida."
+
+#: src/data/por-file-reader.c:593
+#, c-format
+msgid ""
+"%s: Bad format specifier byte (%d).  Variable will be assigned a default "
+"format."
+msgstr ""
+"%s: Byte especificador de format invàlid (%d). S'assignarà el format "
+"predeterminat a la variable."
+
+#: src/data/por-file-reader.c:614
+#, c-format
+msgid "Numeric variable %s has invalid format specifier %s."
+msgstr "La variable numèrica %s té una especificació de format invàlida %s."
+
+#: src/data/por-file-reader.c:618
+#, c-format
+msgid "String variable %s with width %d has invalid format specifier %s."
+msgstr ""
+"La variable en cadena %s amb longitud %d té una especificació de format "
+"invàlida %s."
+
+#: src/data/por-file-reader.c:642
+msgid "Expected variable count record."
+msgstr "Registre de recompte de variables esperat."
+
+#: src/data/por-file-reader.c:646
+#, c-format
+msgid "Invalid number of variables %d."
+msgstr "Número invàlid de variables: %d."
+
+#: src/data/por-file-reader.c:655
+#, c-format
+msgid "Weight variable name (%s) truncated."
+msgstr "Nom de la variable ponderada (%s) truncat."
+
+#: src/data/por-file-reader.c:670
+msgid "Expected variable record."
+msgstr "Registre de variable esperat."
+
+#: src/data/por-file-reader.c:674
+#, c-format
+msgid "Invalid variable width %d."
+msgstr "Amplada de la variable invàlida %d."
+
+#: src/data/por-file-reader.c:681
+#, c-format
+msgid "Invalid variable name `%s' in position %d."
+msgstr "Nom de la variable invàlid `%s' en la posició %d."
+
+#: src/data/por-file-reader.c:685 src/data/sys-file-reader.c:606
+#, c-format
+msgid "Bad width %d for variable %s."
+msgstr "Amplada %d incorrecte per a la variable %s."
+
+#: src/data/por-file-reader.c:700
+#, c-format
+msgid "Duplicate variable name %s in position %d."
+msgstr "Nom de la variable %s duplicat en la posició %d."
+
+#: src/data/por-file-reader.c:701
+#, c-format
+msgid "Duplicate variable name %s in position %d renamed to %s."
+msgstr "Nom de la variable %s duplicat en la posició %d s'ha reanomenat a %s."
+
+#: src/data/por-file-reader.c:750
+#, c-format
+msgid "Weighting variable %s not present in dictionary."
+msgstr "La variable de ponderació %s no està al diccionari."
+
+#: src/data/por-file-reader.c:794
+#, c-format
+msgid "Unknown variable %s while parsing value labels."
+msgstr "Variable %s desconeguda mentre s'analitzaven les etiquetes de valor."
+
+#: src/data/por-file-reader.c:797
+#, c-format
+msgid ""
+"Cannot assign value labels to %s and %s, which have different variable types."
+msgstr ""
+"No es pot assignar etiquetes de valor a %s i %s, que tenen diferent tipus de "
+"variables."
+
+#: src/data/por-file-writer.c:141
+#, c-format
+msgid "Invalid decimal digits count %d.  Treating as %d."
+msgstr "Recompte de dígits decimals %d invàlid. Es tractarà com a %d."
+
+#: src/data/por-file-writer.c:161
+#, c-format
+msgid "Error opening \"%s\" for writing as a portable file: %s."
+msgstr "Error al obrir \"%s\" per a escriure com a arxiu  portàtil: %s."
+
+#: src/data/por-file-writer.c:506
+#, c-format
+msgid "An I/O error occurred writing portable file \"%s\"."
+msgstr "Error I/O en escriure l'arxiu portàtil \"%s\"."
+
+#: src/data/psql-reader.c:46
+msgid ""
+"Support for reading postgres databases was not compiled into this "
+"installation of PSPP"
+msgstr ""
+"El suport per a la lectura de les bases de dades postgres no va ser compilat "
+"en aquesta instal·lació de PSPP"
+
+#: src/data/psql-reader.c:242
+msgid "Memory error whilst opening psql source"
+msgstr "Error de memòria al obrir la font psql"
+
+#: src/data/psql-reader.c:248
+#, c-format
+msgid "Error opening psql source: %s."
+msgstr "Error obrint la font psql: %s."
+
+#: src/data/psql-reader.c:263
+#, c-format
+msgid ""
+"Postgres server is version %s. Reading from versions earlier than 8.0 is not "
+"supported."
+msgstr ""
+"La versió del servidor Postgres és la %s. No es possible la lectura des de "
+"versions anteriors a la 8.0."
+
+#: src/data/psql-reader.c:283
+msgid ""
+"Connection is unencrypted, but unencrypted connections have not been "
+"permitted."
+msgstr ""
+"La connexió no està xifrada, però les connexions sense xifrar no estan "
+"permeses."
+
+#: src/data/psql-reader.c:322 src/data/psql-reader.c:347
+#: src/data/psql-reader.c:357
+#, c-format
+msgid "Error from psql source: %s."
+msgstr "Error des de la font psql: %s."
+
+#: src/data/psql-reader.c:452
+#, c-format
+msgid "Unsupported OID %d.  SYSMIS values will be inserted."
+msgstr "OID %d no admès. Valors SYSMIS seran inserits."
+
+#: src/data/scratch-reader.c:54
+#, c-format
+msgid ""
+"Scratch file handle %s has not yet been written, using SAVE or another "
+"procedure, so it cannot yet be used for reading."
+msgstr ""
+"El manipulador de l'arxius de treball %s encara no s'ha escrit, utilitzant "
+"SAVE o altre procediment, de manera que encara no es pot llegir."
+
+#. TRANSLATORS: this fragment will be interpolated into
+#. messages in fh_lock() that identify types of files.
+#: src/data/scratch-writer.c:66 src/language/data-io/file-handle.q:181
+msgid "scratch file"
+msgstr "arxiu de treball"
+
+#: src/data/settings.c:608
+#, c-format
+msgid ""
+"%s: Custom currency string `%s' does not contain exactly three periods or "
+"commas (or it contains both)."
+msgstr ""
+"%s: Cadena de moneda personalitzada '%s' no conté exactament tres punts o "
+"comes (o els conté ambdós)."
+
+#: src/data/short-names.c:52
+msgid "Variable suffix too large."
+msgstr "Sufix de la variable massa gran."
+
+#: src/data/sys-file-reader.c:226
+#, c-format
+msgid "Recoded variable name duplicates an existing `%s' within system file."
+msgstr ""
+"El nom de la variable recodificada duplica `%s' existent dins de l'arxiu de "
+"sistema."
+
+#. TRANSLATORS: this fragment will be interpolated into
+#. messages in fh_lock() that identify types of files.
+#: src/data/sys-file-reader.c:290 src/data/sys-file-writer.c:207
+msgid "system file"
+msgstr "arxiu de sistema"
+
+#: src/data/sys-file-reader.c:297
+#, c-format
+msgid "Error opening \"%s\" for reading as a system file: %s."
+msgstr "Error al obrir \"%s\" per a la lectura com arxiu de sistema: %s."
+
+#: src/data/sys-file-reader.c:336 tests/dissect-sysfile.c:154
+msgid "Misplaced type 4 record."
+msgstr "Registre de tipus 4 fora de lloc."
+
+#: src/data/sys-file-reader.c:347 tests/dissect-sysfile.c:165
+#, c-format
+msgid "Unrecognized record type %d."
+msgstr "Tipus de registre %d no reconegut."
+
+#: src/data/sys-file-reader.c:388
+#, c-format
+msgid "File header claims %d variable positions but %d were read from file."
+msgstr ""
+"Capçalera de l'arxiu requereix %d posicions de variable, però s'han llegit %"
+"d des de l'arxiu."
+
+#: src/data/sys-file-reader.c:428
+#, c-format
+msgid "Error closing system file \"%s\": %s."
+msgstr "Error al tancar l'arxiu de sistema \"%s\": %s."
+
+#: src/data/sys-file-reader.c:493 src/data/sys-file-reader.c:503
+#: tests/dissect-sysfile.c:202 tests/dissect-sysfile.c:212
+msgid "This is not an SPSS system file."
+msgstr "Això no és un arxiu de sistema de SPSS."
+
+#: src/data/sys-file-reader.c:525 tests/dissect-sysfile.c:227
+msgid ""
+"Compression bias is not the usual value of 100, or system file uses "
+"unrecognized floating-point format."
+msgstr ""
+"El biaix de compressió no és el valor habitual de 100, o l'arxiu de sistema "
+"utilitza un format de punt flotant no reconegut."
+
+#: src/data/sys-file-reader.c:602
+#, c-format
+msgid "Invalid variable name `%s'."
+msgstr "Nom de variable '%s' no vàlid."
+
+#: src/data/sys-file-reader.c:610
+#, c-format
+msgid "Duplicate variable name `%s' within system file."
+msgstr "Nom de variable '%s' duplicat dins de l'arxiu de sistema."
+
+#: src/data/sys-file-reader.c:618 tests/dissect-sysfile.c:356
+msgid "Variable label indicator field is not 0 or 1."
+msgstr "Camp indicador d'etiqueta de variable no és 0 o 1."
+
+#: src/data/sys-file-reader.c:649 tests/dissect-sysfile.c:387
+msgid "Numeric missing value indicator field is not -3, -2, 0, 1, 2, or 3."
+msgstr ""
+"Camp d'indicador de valors perduts numèrics  no és -3, -2, 0, 1, 2 o 3."
+
+#: src/data/sys-file-reader.c:667 tests/dissect-sysfile.c:402
+msgid "String missing value indicator field is not 0, 1, 2, or 3."
+msgstr "Camp d'indicador de valors perduts de cadena no és 0, 1, 2 o 3."
+
+#: src/data/sys-file-reader.c:699
+msgid "Missing string continuation record."
+msgstr "Manca de registre de continuació de cadena."
+
+#: src/data/sys-file-reader.c:733
+#, c-format
+msgid "Unknown variable format %<PRIu8>."
+msgstr "Format de variable %<PRIu8> desconegut."
+
+#: src/data/sys-file-reader.c:751
+#, c-format
+msgid "%s variable %s has invalid %s format %s."
+msgstr "%s variable %s amb un format %s no vàlid %s."
+
+#: src/data/sys-file-reader.c:754
+msgid "print"
+msgstr "imprimir"
+
+#: src/data/sys-file-reader.c:754
+msgid "write"
+msgstr "escriure"
+
+#: src/data/sys-file-reader.c:758
+msgid "Suppressing further invalid format warnings."
+msgstr "Es desactiven les alertes posteriors de format no vàlid."
+
+#: src/data/sys-file-reader.c:776
+msgid "Weighting variable must be numeric."
+msgstr "Variable de ponderació ha de ser numèrica."
+
+#: src/data/sys-file-reader.c:790
+msgid "Multiple type 6 (document) records."
+msgstr "Múltiples registres de tipus 6 (document)."
+
+#: src/data/sys-file-reader.c:794
+#, c-format
+msgid "Number of document lines (%d) must be greater than 0."
+msgstr "Nombre de línies de document (%d) ha de ser major que 0."
+
+#: src/data/sys-file-reader.c:802
+msgid "Document line contains null byte."
+msgstr "Una línia del document conté un byte nul."
+
+#: src/data/sys-file-reader.c:893
+#, c-format
+msgid ""
+"Unrecognized record type 7, subtype %d.  Please send a copy of this file, "
+"and the syntax which created it to %s"
+msgstr ""
+"Registre de tipus 7, subtipus %d , no reconegut. Si us plau envieu una còpia "
+"d'aquest arxiu, així com de la sintaxi que el va crear a %s"
+
+#: src/data/sys-file-reader.c:920 tests/dissect-sysfile.c:594
+#, c-format
+msgid "Bad size (%zu) or count (%zu) field on record type 7, subtype 3."
+msgstr ""
+"Camp de longitud (%zu) o quantitat (%zu) invàlids en el registre tipus 7, "
+"subtipus 3."
+
+#: src/data/sys-file-reader.c:940
+#, c-format
+msgid ""
+"Floating-point representation indicated by system file (%d) differs from "
+"expected (%d)."
+msgstr ""
+"Representació del punt flotant indicat per l'arxiu de sistema (%d) difereix "
+"de l'esperat (%d)."
+
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:110
+#, fuzzy
+msgid "Little Endian"
+msgstr "Little Endian."
+
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:109
+#, fuzzy
+msgid "Big Endian"
+msgstr "Big Endian."
+
+#: src/data/sys-file-reader.c:954
+#, c-format
+msgid ""
+"Integer format indicated by system file (%s) differs from expected (%s)."
+msgstr ""
+"Format enter indicat per l'arxiu de sistema  (%s) difereix de l'esperat (%s)."
+
+#: src/data/sys-file-reader.c:1011 tests/dissect-sysfile.c:625
+#, c-format
+msgid "Bad size (%zu) or count (%zu) on extension 4."
+msgstr "Longitud (%zu) o quantitat (%zu) de l'extensió 4 no vàlid."
+
+#: src/data/sys-file-reader.c:1015 src/data/sys-file-reader.c:1019
+#: src/data/sys-file-reader.c:1023 tests/dissect-sysfile.c:630
+#: tests/dissect-sysfile.c:635 tests/dissect-sysfile.c:640
+#, c-format
+msgid "File specifies unexpected value %g as %s."
+msgstr "L'arxiu especifica un valor inesperat %g com a %s."
+
+#: src/data/sys-file-reader.c:1056
+#, c-format
+msgid "Missing space following 'C' at offset %zu in MRSETS record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1074 tests/dissect-sysfile.c:691
+#, c-format
+msgid "Missing space following 'E' at offset %zu in MRSETS record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1083 tests/dissect-sysfile.c:700
+#, c-format
+msgid ""
+"Unexpected label source value \"%s\" following 'E' at offset %zu in MRSETS "
+"record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1089
+#, c-format
+msgid "Missing 'C', 'D', or 'E' at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1118
+#, c-format
+msgid "Missing new-line parsing variable names at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1129
+#, fuzzy, c-format
+msgid "Duplicate variable name %s at offset %zu in MRSETS record."
+msgstr "Nom de la variable %s duplicat en la posició %d."
+
+#: src/data/sys-file-reader.c:1142
+#, fuzzy, c-format
+msgid "MRSET %s contains both string and numeric variables."
+msgstr ""
+"Ignorant el registre del valor de cadena llarga per a la variable numèrica %"
+"s."
+
+#: src/data/sys-file-reader.c:1157
+#, c-format
+msgid "MRSET %s has only %zu variables."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1194 tests/dissect-sysfile.c:758
+#, c-format
+msgid "Bad size %zu on extension 11."
+msgstr "Longitud no vàlid %zu en l'extensió 11."
+
+#: src/data/sys-file-reader.c:1206 tests/dissect-sysfile.c:770
+#, c-format
+msgid "Extension 11 has bad count %zu (for %zu variables)."
+msgstr "Extensió 11 té un recompte invàlid %zu (per a %zu variables)."
+
+#: src/data/sys-file-reader.c:1227
+#, c-format
+msgid ""
+"Invalid variable display parameters for variable %zu (%s).  Default "
+"parameters substituted."
+msgstr ""
+"Paràmetres de visualització de variable no vàlids per a la variable %zu (%"
+"s). Substitució pels paràmetres per defecte."
+
+#: src/data/sys-file-reader.c:1271
+#, c-format
+msgid "Long variable mapping from %s to invalid variable name `%s'."
+msgstr ""
+"Identificació de variable llarga des de %s cap a un nom de variable invàlid  "
+"'%s'."
+
+#: src/data/sys-file-reader.c:1281
+#, c-format
+msgid "Duplicate long variable name `%s' within system file."
+msgstr "Nom de la variable llarga '%s' duplicat dins de l'arxiu de sistema."
+
+#: src/data/sys-file-reader.c:1334
+#, c-format
+msgid "%s listed as string of invalid length %s in very length string record."
+msgstr ""
+"%s figura com a cadena de longitud no vàlida %s en un registre de cadena "
+"molt llarg."
+
+#: src/data/sys-file-reader.c:1344
+#, c-format
+msgid ""
+"%s listed in very long string record with width %s, which requires only one "
+"segment."
+msgstr ""
+"%s figura en el registre de cadena molt llarga amb longitud %s, que "
+"requereix només un segment."
+
+#: src/data/sys-file-reader.c:1350
+#, c-format
+msgid "Very long string %s overflows dictionary."
+msgstr "Cadena molt llarga %s desborda el diccionari."
+
+#: src/data/sys-file-reader.c:1364
+#, c-format
+msgid ""
+"Very long string with width %ld has segment %d of width %d (expected %d)"
+msgstr ""
+"Cadena molt llarga amb una longitud de %ld té un segment %d de longitud %d "
+"(s'espera %d)"
+
+#: src/data/sys-file-reader.c:1410
+#, c-format
+msgid "Invalid number of labels: %d.  Ignoring labels."
+msgstr "Nombre d'etiquetes invàlid: %d. Ignorant etiquetes."
+
+#: src/data/sys-file-reader.c:1441 tests/dissect-sysfile.c:468
+msgid ""
+"Variable index record (type 4) does not immediately follow value label "
+"record (type 3) as it should."
+msgstr ""
+"Registre d'índex de variable (tipus 4) no és seguit immediatament pel "
+"registre d'etiquetes de valors (tipus 3) com hauria."
+
+#: src/data/sys-file-reader.c:1448
+#, c-format
+msgid ""
+"Number of variables associated with a value label (%d) is not between 1 and "
+"the number of variables (%zu)."
+msgstr ""
+"Nombre de variables associades amb una etiqueta de valors (%d) no està entre "
+"1 i el nombre de variables (%zu)."
+
+#: src/data/sys-file-reader.c:1459
+#, c-format
+msgid ""
+"Value labels may not be added to long string variables (e.g. %s) using "
+"records types 3 and 4."
+msgstr ""
+"No es pot afegir etiquetes dels valors a les variables de cadena llarga (e."
+"g. %s) utilitzant els tipus de registres 3 i 4."
+
+#: src/data/sys-file-reader.c:1468
+#, c-format
+msgid ""
+"Variables associated with value label are not all of identical type.  "
+"Variable %s is %s, but variable %s is %s."
+msgstr ""
+"Les variables associades amb etiqueta de valors no són totes del mateix "
+"tipus.  La variable %s és %s, però la variable %s és %s."
+
+#: src/data/sys-file-reader.c:1502
+#, c-format
+msgid "Duplicate value label for %g on %s."
+msgstr "Etiqueta de valors duplicats per %g en %s."
+
+#: src/data/sys-file-reader.c:1505 src/data/sys-file-reader.c:1686
+#, c-format
+msgid "Duplicate value label for \"%.*s\" on %s."
+msgstr "Etiqueta de valor duplicat per a \"%.*s\" a %s."
+
+#: src/data/sys-file-reader.c:1543
+#, c-format
+msgid "Error parsing attribute value %s[%d]"
+msgstr "Error en analitzar el valor de l'atribut %s[%d]"
+
+#: src/data/sys-file-reader.c:1557
+#, c-format
+msgid "Attribute value %s[%d] is not quoted: %s"
+msgstr "El valor de l'atribut %s[%d] no esta entre cometes: %s"
+
+#: src/data/sys-file-reader.c:1620 tests/dissect-sysfile.c:936
+#, c-format
+msgid ""
+"Variable name length in long string value label record (%d) exceeds %d-byte "
+"limit."
+msgstr ""
+"La longitud del nom de la variable al registre de l'etiqueta del valor de "
+"cadena llarga (%d) supera el límit %d-byte."
+
+#: src/data/sys-file-reader.c:1630
+#, c-format
+msgid "Ignoring long string value record for unknown variable %s."
+msgstr ""
+"Ignorant el registre del valor de cadena llarga per a la variable "
+"desconeguda %s."
+
+#: src/data/sys-file-reader.c:1637
+#, c-format
+msgid "Ignoring long string value record for numeric variable %s."
+msgstr ""
+"Ignorant el registre del valor de cadena llarga per a la variable numèrica %"
+"s."
+
+#: src/data/sys-file-reader.c:1644
+#, c-format
+msgid ""
+"Ignoring long string value record for variable %s because the record's width "
+"(%d) does not match the variable's width (%d)"
+msgstr ""
+"Ignorant el registre del valor de cadena llarga %s ja que l'amplada del "
+"registre (%d) no coincideix amb l'amplada de la variable (%d)"
+
+#: src/data/sys-file-reader.c:1666
+#, c-format
+msgid ""
+"Ignoring long string value %zu for variable %s, with width %d, that has bad "
+"value width %zu."
+msgstr ""
+"Ignorant el valor de cadena llarga %zu per a la variable %s, d'amplada %d, "
+"que té una amplada de valor incorrecta %zu."
+
+#: src/data/sys-file-reader.c:1781
+msgid "File ends in partial case."
+msgstr "L'arxiu acaba en un cas parcial."
+
+#: src/data/sys-file-reader.c:1789
+#, c-format
+msgid "Error reading case from file %s."
+msgstr "Error llegint un cas de l'arxiu %s."
+
+#: src/data/sys-file-reader.c:1890
+msgid ""
+"Possible compressed data corruption: compressed spaces appear in numeric "
+"field."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1943
+#, c-format
+msgid ""
+"Possible compressed data corruption: string contains compressed integer "
+"(opcode %d)"
+msgstr ""
+
+#: src/data/sys-file-reader.c:2035
+#, c-format
+msgid "Variable index %d not in valid range 1...%d."
+msgstr "Índex de la variable %d no en l'interval vàlid de 1...%d."
+
+#: src/data/sys-file-reader.c:2040
+#, c-format
+msgid "Variable index %d refers to long string continuation."
+msgstr ""
+"Índex de la variable %d es refereix a una continuació de cadena llarga."
+
+#: src/data/sys-file-reader.c:2108
+#, c-format
+msgid "Suppressed %d additional related warnings."
+msgstr "Suprimides %d advertències addicionals."
+
+#: src/data/sys-file-reader.c:2153 src/data/sys-file-reader.c:2170
+#, fuzzy, c-format
+msgid "Dictionary record refers to unknown variable %s."
+msgstr "Mapa de la variable es refereix a una variable desconeguda %s."
+
+#: src/data/sys-file-reader.c:2231
+#, c-format
+msgid "Expecting digit at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2238
+#, c-format
+msgid "Expecting space at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2245
+#, c-format
+msgid "%zu-byte string starting at offset %zu exceeds record length %zu."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2255
+#, c-format
+msgid "Expecting space at offset %zu following %zu-byte string."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2347 tests/dissect-sysfile.c:1341
+#, c-format
+msgid "System error: %s."
+msgstr "Error de sistema: %s."
+
+#: src/data/sys-file-reader.c:2349 tests/dissect-sysfile.c:1343
+msgid "Unexpected end of file."
+msgstr "Final d'arxiu inesperat."
+
+#: src/data/sys-file-writer.c:180
+#, c-format
+msgid "Unknown system file version %d. Treating as version %d."
+msgstr "Versió d'arxiu de sistema %d desconeguda. Es tractarà com a versió %d."
+
+#: src/data/sys-file-writer.c:219
+#, c-format
+msgid "Error opening \"%s\" for writing as a system file: %s."
+msgstr "Error en obrir \"%s\" per gravar com arxiu de sistema: %s."
+
+#: src/data/sys-file-writer.c:989
+#, c-format
+msgid "An I/O error occurred writing system file \"%s\"."
+msgstr "S'ha produït un error de E/S al desar l'arxiu de sistema \"%s\"."
+
+#: src/data/variable.c:206
+#, c-format
+msgid ""
+"Character `%c' (in %s) may not appear as the first character in a variable "
+"name."
+msgstr ""
+"Caràcter '%c' (em %s) no pot aparèixer com el primer caràcter en un nom de "
+"variable."
+
+#: src/data/variable.c:218
+#, c-format
+msgid "Character `%c' (in %s) may not appear in a variable name."
+msgstr "Caràcter '%c' (em %s) no pot aparèixer en un nom de variable."
+
+#: src/data/variable.c:244
+msgid "Variable name cannot be empty string."
+msgstr "El nom de la variable no pot ser una cadena buida. "
+
+#: src/data/variable.c:250
+#, c-format
+msgid "Variable name %s exceeds %d-character limit."
+msgstr "El nom de la variable %s supera el límit de %d caràcters."
+
+#: src/data/variable.c:258
+#, c-format
+msgid "`%s' may not be used as a variable name because it is a reserved word."
+msgstr ""
+"'%s' no pot ser utilitzat com a nom de variable perquè es una paraula "
+"reservada."
+
+#: src/language/syntax-file.c:95
+#, c-format
+msgid "Opening `%s': %s."
+msgstr "Obrint `%s': %s."
+
+#: src/language/syntax-file.c:109
+#, c-format
+msgid "Reading `%s': %s."
+msgstr "Llegint `%s': %s."
+
+#: src/language/syntax-file.c:126
+#, c-format
+msgid "Closing `%s': %s."
+msgstr "Tancant `%s': %s."
+
+#: src/language/command.c:205 src/language/expressions/parse.c:1267
+#: src/language/utilities/set.q:213
+#, c-format
+msgid "%s is not yet implemented."
+msgstr "%s encara no està implementat."
+
+#: src/language/command.c:210
+#, c-format
+msgid "%s may be used only in testing mode."
+msgstr "%s només pot ser utilitzat en el mode de prova."
+
+#: src/language/command.c:215
+#, c-format
+msgid "%s may be used only in enhanced syntax mode."
+msgstr "%s només pot ser utilitzat en el mode de sintaxi ampliat."
+
+#: src/language/command.c:239
+msgid "Error encountered while ERROR=STOP is effective."
+msgstr "Detectat un error mentre està actiu ERROR=STOP."
+
+#: src/language/command.c:484
+msgid "expecting command name"
+msgstr "esperant nom de comando"
+
+#: src/language/command.c:498
+#, c-format
+msgid "Unknown command %s."
+msgstr "Comando %s desconegut."
+
+#: src/language/command.c:623
+#, c-format
+msgid "%s is allowed only before the active file has been defined."
+msgstr "%s només es permet abans que l'arxiu actiu s'ha definit."
+
+#: src/language/command.c:627
+#, c-format
+msgid "%s is allowed only after the active file has been defined."
+msgstr "%s només es permet després que l'arxiu actiu s'ha definit."
+
+#: src/language/command.c:631
+#, c-format
+msgid "%s is allowed only inside INPUT PROGRAM."
+msgstr "%s només es permet dins de INPUT PROGRAM."
+
+#: src/language/command.c:635
+#, c-format
+msgid "%s is allowed only inside FILE TYPE."
+msgstr "%s només es permet dins de FILE TYPE."
+
+#: src/language/command.c:642
+#, c-format
+msgid ""
+"%s is allowed only before the active file has been defined or inside INPUT "
+"PROGRAM."
+msgstr ""
+"%s només es permet abans que l'arxiu actiu s'ha definit o dins de INPUT "
+"PROGRAM."
+
+#: src/language/command.c:646
+#, c-format
+msgid ""
+"%s is allowed only before the active file has been defined or inside FILE "
+"TYPE."
+msgstr ""
+"%s només es permet abans que l'arxiu actiu s'ha definit o dins de FILE TYPE."
+
+#: src/language/command.c:650
+#, c-format
+msgid ""
+"%s is allowed only after the active file has been defined or inside INPUT "
+"PROGRAM."
+msgstr ""
+"%s només es permet després que l'arxiu actiu s'ha definit, o dins de INPUT "
+"PROGRAM."
+
+#: src/language/command.c:654
+#, c-format
+msgid ""
+"%s is allowed only after the active file has been defined or inside FILE "
+"TYPE."
+msgstr ""
+"%s només es permet després que l'arxiu actiu s'ha definit, o dins de FILE "
+"TYPE."
+
+#: src/language/command.c:658
+#, c-format
+msgid "%s is allowed only inside INPUT PROGRAM or inside FILE TYPE."
+msgstr "%s només es permet dins de INPUT PROGRAM o FILE TYPE."
+
+#: src/language/command.c:664
+#, c-format
+msgid ""
+"%s is allowed only after the active file has been defined, inside INPUT "
+"PROGRAM, or inside FILE TYPE."
+msgstr ""
+"%s només es permet després que l'arxiu actiu s'ha definit, dins de INPUT "
+"PROGRAM, o FILE TYPE."
+
+#: src/language/command.c:669
+#, c-format
+msgid ""
+"%s is allowed only before the active file has been defined, inside INPUT "
+"PROGRAM, or inside FILE TYPE."
+msgstr ""
+"%s només es permet abans que l'arxiu actiu s'ha definit, dins de INPUT "
+"PROGRAM, o FILE TYPE."
+
+#: src/language/command.c:687 src/language/command.c:689
+#, fuzzy, c-format
+msgid "%s is not allowed inside %s."
+msgstr "%s no es permet dins de FILE TYPE."
+
+#: src/language/command.c:768 src/language/command.c:876
+#: src/language/utilities/permissions.c:98
+msgid "This command not allowed when the SAFER option is set."
+msgstr "Aquesta ordre no està permesa quan l'opció SAFER està activa."
+
+#: src/language/command.c:780
+#, c-format
+msgid "Error removing `%s': %s."
+msgstr "Error d'eliminació de '%s' : %s."
+
+#: src/language/command.c:830
+#, c-format
+msgid "Couldn't fork: %s."
+msgstr "Impossible crear forquilla: %s."
+
+#: src/language/command.c:845
+msgid "Interactive shell not supported on this platform."
+msgstr "Interpret d'ordres interactiu no disponible per a aquesta plataforma."
+
+#: src/language/command.c:857
+msgid "Command shell not supported on this platform."
+msgstr "Intèrpret d'ordres no disponible per aquesta plataforma."
+
+#: src/language/command.c:863
+#, c-format
+msgid "Error executing command: %s."
+msgstr "Error d'execució del comandament: %s."
+
+#: src/language/lexer/lexer.c:284
+#, c-format
+msgid "%s does not form a valid number."
+msgstr "%s no constitueix un número vàlid."
+
+#: src/language/lexer/lexer.c:390
+#, c-format
+msgid "Bad character in input: `%s'."
+msgstr "Caràcter erroni a l'entrada: `%s'."
+
+#: src/language/lexer/lexer.c:427
+#, c-format
+msgid "Subcommand %s may only be specified once."
+msgstr "Subcomando %s només es pot especificar un cop."
+
+#: src/language/lexer/lexer.c:435
+#, c-format
+msgid "missing required subcommand %s"
+msgstr "subordre requerida %s absent"
+
+#: src/language/lexer/lexer.c:464
+#, c-format
+msgid "Syntax error %s at %s."
+msgstr "Error de sintaxi %s a %s."
+
+#: src/language/lexer/lexer.c:467
+#, c-format
+msgid "Syntax error at %s."
+msgstr "Error de sintaxi a %s."
+
+#: src/language/lexer/lexer.c:479 src/language/xforms/select-if.c:60
+#: src/language/stats/autorecode.c:144 src/language/data-io/print-space.c:73
+msgid "expecting end of command"
+msgstr "s'espera el final de l'ordre"
+
+#: src/language/lexer/lexer.c:601 src/language/lexer/lexer.c:618
+#, c-format
+msgid "expecting `%s'"
+msgstr "esperant '%s'"
+
+#: src/language/lexer/lexer.c:632
+msgid "expecting string"
+msgstr "esperant cadena"
+
+#: src/language/lexer/lexer.c:646
+msgid "expecting integer"
+msgstr "esperant sencer"
+
+#: src/language/lexer/lexer.c:659
+msgid "expecting number"
+msgstr "esperant número"
+
+#: src/language/lexer/lexer.c:671
+msgid "expecting identifier"
+msgstr "esperant identificador"
+
+#: src/language/lexer/lexer.c:1065
+msgid "binary"
+msgstr "binari"
+
+#: src/language/lexer/lexer.c:1070
+msgid "octal"
+msgstr "octal"
+
+#: src/language/lexer/lexer.c:1075
+msgid "hex"
+msgstr "hexadecimal"
+
+#: src/language/lexer/lexer.c:1085
+#, c-format
+msgid "String of %s digits has %zu characters, which is not a multiple of %d."
+msgstr "La cadena de %s dígits té %zu caràcters, que no és un múltiple de %d."
+
+#: src/language/lexer/lexer.c:1114
+#, c-format
+msgid "`%c' is not a valid %s digit."
+msgstr "'%c' no és un dígit %s vàlid."
+
+#: src/language/lexer/lexer.c:1148
+msgid "Unterminated string constant."
+msgstr "Constant de cadena inacabada."
+
+#: src/language/lexer/lexer.c:1202
+msgid "Unexpected end of file in string concatenation."
+msgstr "Final d'arxiu inesperat a la concatenació de cadenes."
+
+#: src/language/lexer/lexer.c:1210
+msgid "String expected following `+'."
+msgstr "S'espera una cadena seguida de `+'."
+
+#: src/language/lexer/lexer.c:1223
+#, c-format
+msgid "String exceeds 255 characters in length (%zu characters)."
+msgstr "La cadena supera els 255 caràcters de longitud (%zu caràcters)."
+
+#: src/language/lexer/format-parser.c:88
+msgid "expecting valid format specifier"
+msgstr "esperant especificador de format vàlid"
+
+#: src/language/lexer/format-parser.c:107
+#: src/language/lexer/format-parser.c:126
+#: src/language/data-io/placement-parser.c:226
+#, c-format
+msgid "Unknown format type \"%s\"."
+msgstr "Tipus de format \"%s\" desconegut."
+
+#: src/language/lexer/format-parser.c:121
+msgid "expecting format type"
+msgstr "esperant el tipus de format"
+
+#: src/language/lexer/value-parser.c:60
+#, c-format
+msgid ""
+"Low end of range (%g) is below high end (%g).  The range will be treated as "
+"reversed."
+msgstr ""
+"El límit inferior de l'interval (%g) està per sota del límit superior (%g).  "
+"L' interval serà invertit."
+
+#: src/language/lexer/value-parser.c:68
+#, c-format
+msgid "Ends of range are equal (%g)."
+msgstr "Els límits de l'interval són iguals (%g)."
+
+#: src/language/lexer/value-parser.c:76
+msgid "LO or LOWEST must be part of a range."
+msgstr "LO o LOWEST han de ser part de l'interval."
+
+#: src/language/lexer/value-parser.c:109
+msgid "System-missing value is not valid here."
+msgstr "Valor perdut del sistema no és vàlid aquí."
+
+#: src/language/lexer/value-parser.c:117
+msgid "expecting number or data string"
+msgstr "esperant nombre o cadena de dades"
+
+#: src/language/lexer/variable-parser.c:65
+msgid "expecting variable name"
+msgstr "esperant nom de la variable"
+
+#: src/language/lexer/variable-parser.c:75
+#, c-format
+msgid "%s is not a variable name."
+msgstr "%s no és un nom de variable."
+
+#: src/language/lexer/variable-parser.c:178
+#, c-format
+msgid ""
+"%s is not a numeric variable.  It will not be included in the variable list."
+msgstr ""
+"%s no és una variable numèrica. No serà inclosa a la llista de variables."
+
+#: src/language/lexer/variable-parser.c:181
+#, c-format
+msgid ""
+"%s is not a string variable.  It will not be included in the variable list."
+msgstr ""
+"%s no és una variable de cadena. No serà inclosa a la llista de variables."
+
+#: src/language/lexer/variable-parser.c:185
+#, c-format
+msgid "Scratch variables (such as %s) are not allowed here."
+msgstr "Les variables de treball  (com ara %s) no estan permeses aquí."
+
+#: src/language/lexer/variable-parser.c:189
+#, c-format
+msgid ""
+"%s and %s are not the same type.  All variables in this variable list must "
+"be of the same type.  %s will be omitted from the list."
+msgstr ""
+"%s i %s no són del mateix tipus. Totes les variables d'aquesta llista han de "
+"ser del mateix tipus. %s serà omesa de la llista."
+
+#: src/language/lexer/variable-parser.c:195
+#, c-format
+msgid ""
+"%s and %s are string variables with different widths.  All variables in this "
+"variable list must have the same width.  %s will be omitted from the list."
+msgstr ""
+"%s i %s són variables de cadena amb tamanys diferents. Totes les variables "
+"d'aquesta llista han de tenir la mateixa amplada. %s serà omesa de la llista."
+
+#: src/language/lexer/variable-parser.c:200
+#: src/language/lexer/variable-parser.c:496
+#, c-format
+msgid "Variable %s appears twice in variable list."
+msgstr "La variable %s apareix dues vegades en la llista de variables."
+
+#: src/language/lexer/variable-parser.c:313
+#, c-format
+msgid "%s TO %s is not valid syntax since %s precedes %s in the dictionary."
+msgstr ""
+"%s TO %s no és una sintaxi vàlida atès que %s precedeix %s en el diccionari."
+
+#: src/language/lexer/variable-parser.c:321
+#, c-format
+msgid ""
+"When using the TO keyword to specify several variables, both variables must "
+"be from the same variable dictionaries, of either ordinary, scratch, or "
+"system variables.  %s is a %s variable, whereas %s is %s."
+msgstr ""
+"Quan s'utilitza la paraula clau TO per especificar diverses variables, "
+"ambdues han de ser del mateix diccionari de variables, ja siguin ordinals, "
+"scratch, o variables de sistema. %s és una variable %s, atès que %s és %s."
+
+#: src/language/lexer/variable-parser.c:395
+msgid "incorrect use of TO convention"
+msgstr "ús incorrecte de la convenció TO"
+
+#: src/language/lexer/variable-parser.c:450
+msgid "Scratch variables not allowed here."
+msgstr "Les variables de treball no estan permès aquí."
+
+#: src/language/lexer/variable-parser.c:472
+msgid "Prefixes don't match in use of TO convention."
+msgstr "Els prefixos no coincideixen en l'ús de la convenció TO."
+
+#: src/language/lexer/variable-parser.c:477
+msgid "Bad bounds in use of TO convention."
+msgstr "Límits incorrectes en l'ús de la convenció TO."
+
+#: src/language/xforms/compute.c:149 src/language/xforms/compute.c:203
+#, c-format
+msgid ""
+"When executing COMPUTE: SYSMIS is not a valid value as an index into vector %"
+"s."
+msgstr ""
+"Quan s'executa COMPUTE: SYSMIS no és un valor vàlid com a índex en el vector "
+"%s."
+
+#: src/language/xforms/compute.c:153 src/language/xforms/compute.c:210
+#, c-format
+msgid ""
+"When executing COMPUTE: %g is not a valid value as an index into vector %s."
+msgstr ""
+"Quan s'executa COMPUTE: %g no és un valor vàlid com a índex en el vector %s."
+
+#: src/language/xforms/compute.c:353
+#, c-format
+msgid "There is no vector named %s."
+msgstr "No hi ha cap vector anomenat %s."
+
+#: src/language/xforms/count.c:123
+msgid "Destination cannot be a string variable."
+msgstr "El destí no pot ser una variable de cadena."
+
+#: src/language/xforms/sample.c:76
+msgid "The sampling factor must be between 0 and 1 exclusive."
+msgstr "El factor de mostratge ha d'estar exclusivament entre 0 i 1."
+
+#: src/language/xforms/sample.c:96
+#, c-format
+msgid "Cannot sample %d observations from a population of %d."
+msgstr "No es pot fer una mostra de %d observacions d'una població de %d."
+
+#: src/language/xforms/recode.c:248
+msgid ""
+"Inconsistent target variable types.  Target variables must be all numeric or "
+"all string."
+msgstr ""
+"Tipus inconsistent de variables objectiu.  Les variables objectiu han de ser "
+"totes, o bé de cadena o bé numèriques."
+
+#: src/language/xforms/recode.c:269
+msgid "CONVERT requires string input values and numeric output values."
+msgstr ""
+"CONVERT requereix valors d'entrada de cadena i valors de sortida numèrics. "
+
+#: src/language/xforms/recode.c:324
+msgid "THRU is not allowed with string variables."
+msgstr "THRU no es permet amb variables de cadena."
+
+#: src/language/xforms/recode.c:403
+msgid "expecting output value"
+msgstr "esperant el valor de sortida"
+
+#: src/language/xforms/recode.c:460
+#, c-format
+msgid ""
+"%zu variable(s) cannot be recoded into %zu variable(s).  Specify the same "
+"number of variables as source and target variables."
+msgstr ""
+"%zu variable(s) no poden ser recodificades a %zu variable(s).  Especifiqueu "
+"el mateix nombre de variables com a origen i destinació."
+
+#: src/language/xforms/recode.c:475
+#, c-format
+msgid ""
+"There is no variable named %s.  (All string variables specified on INTO must "
+"already exist.  Use the STRING command to create a string variable.)"
+msgstr ""
+"No existeix cap variable anomenada %s. (Totes les variables de cadena "
+"especificades a INTO ja han d'existir.  Utilitzeu el comandament STRING per "
+"crear una variable de cadena.)"
+
+#: src/language/xforms/recode.c:491
+#, c-format
+msgid "INTO is required with %s input values and %s output values."
+msgstr "INTO és necessari amb %s valors d'entrada i %s valors de sortida."
+
+#: src/language/xforms/recode.c:504
+#, c-format
+msgid "Type mismatch.  Cannot store %s data in %s variable %s."
+msgstr "Desajust de tipus.  No es pot emmagatzemar %s dades a %s variable %s."
+
+#: src/language/xforms/select-if.c:100
+msgid "Syntax error expecting OFF or BY.  Turning off case filtering."
+msgstr "Error de sintaxi esperant OFF o BY. Desactivant el filtratge de casos."
+
+#: src/language/xforms/select-if.c:115
+msgid "The filter variable must be numeric."
+msgstr "La variable de filtre ha de ser numèrica."
+
+#: src/language/xforms/select-if.c:121
+msgid "The filter variable may not be scratch."
+msgstr "La variable de filtre no pot ser zero."
+
+#: src/language/control/control-stack.c:27
+#, c-format
+msgid "%s without %s."
+msgstr "%s sense %s."
+
+#: src/language/control/control-stack.c:55
+#, c-format
+msgid "This command must appear inside %s...%s, without intermediate %s...%s."
+msgstr ""
+"Aquesta ordre ha d'aparèixer dins de %s...%s, sense intermediaris %s...%s."
+
+#: src/language/control/control-stack.c:72
+#, c-format
+msgid "This command cannot appear outside %s...%s."
+msgstr "Aquest comandament no pot aparèixer fora de %s...%s."
+
+#: src/language/control/do-if.c:177
+msgid "This command may not follow ELSE in DO IF...END IF."
+msgstr "Aquest comandament no pot seguir ELSE en DO IF...END IF."
+
+#: src/language/control/loop.c:214
+msgid "Only one index clause may be specified."
+msgstr "Només pot ser especificada una clàusula d'índex."
+
+#: src/language/control/temporary.c:46
+msgid ""
+"This command may only appear once between procedures and procedure-like "
+"commands."
+msgstr ""
+"Aquesta ordre només pot aparèixer una vegada entre les ordres de "
+"procediments i quasi-procediments."
+
+#: src/language/control/repeat.c:172
+#, c-format
+msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
+msgstr ""
+"El nom de la variable fictícia \"%s\" oculta la variable de diccionari \"%s"
+"\"."
+
+#: src/language/control/repeat.c:177
+#, c-format
+msgid "Dummy variable name \"%s\" is given twice."
+msgstr "El nom de la variable fictícia \"%s\" es dóna dues vegades."
+
+#: src/language/control/repeat.c:223
+#, c-format
+msgid ""
+"Dummy variable \"%.*s\" had %d substitutions, so \"%.*s\" must also, but %d "
+"were specified."
+msgstr ""
+"Una variable fictícia \"%.*s\" en te %d substitucions, de manera que \"%.*s"
+"\" també n'hauria de tenir-les, però es van especificar %d."
+
+#: src/language/control/repeat.c:335
+msgid "DO REPEAT may not nest in compatibility mode."
+msgstr "DO REPEAT no pot usar-se recursivament en mode de comptabilitat."
+
+#: src/language/control/repeat.c:437
+msgid "Ranges may only have integer bounds"
+msgstr "Els intervals només poden tenir límits sencers."
+
+#: src/language/control/repeat.c:446
+#, c-format
+msgid "%g TO %g is an invalid range."
+msgstr "%g TO %g és un interval invalid."
+
+#: src/language/control/repeat.c:481
+msgid "String expected."
+msgstr "Cadena esperada."
+
+#: src/language/control/repeat.c:500
+msgid "No matching DO REPEAT."
+msgstr "DO REPEAT no coincideix."
+
+#: src/language/dictionary/attributes.c:108
+msgid "Attribute array index must be between 1 and 65535."
+msgstr "L'índex de la taula d'atributs ha d'estar entre 1 i 65535."
+
+#: src/language/dictionary/attributes.c:189
+msgid "expecting ATTRIBUTE= or DELETE="
+msgstr "esperant ATTRIBUTE= o DELETE="
+
+#: src/language/dictionary/apply-dictionary.c:75
+#, c-format
+msgid "Variable %s is %s in target file, but %s in source file."
+msgstr ""
+"La variable %s és %s en l'arxiu de destinació, però %s en l'arxiu d'origen."
+
+#: src/language/dictionary/apply-dictionary.c:115
+msgid "No matching variables found between the source and target files."
+msgstr ""
+"No s'han trobat coincidències de variables entre els arxius d'origen i de "
+"destinació."
+
+#: src/language/dictionary/delete-variables.c:40
+msgid ""
+"DELETE VARIABLES may not be used after TEMPORARY.  Temporary transformations "
+"will be made permanent."
+msgstr ""
+"DELETE VARIABLES no pot ser utilitzat després de TEMPORARY. Les "
+"transformacions temporals seran permanents."
+
+#: src/language/dictionary/delete-variables.c:48
+msgid ""
+"DELETE VARIABLES may not be used to delete all variables from the active "
+"file dictionary.  Use NEW FILE instead."
+msgstr ""
+"DELETE VARIABLES no pot ser utilitzar per esborrar totes les variables de "
+"l'arxiu de diccionari actiu. Utilitzar NEW FILE en el seu lloc."
+
+#: src/language/dictionary/formats.c:90
+msgid "`(' expected after variable list."
+msgstr "`(' esperat després de la llista de variables."
+
+#: src/language/dictionary/formats.c:100 src/language/dictionary/numeric.c:74
+msgid "`)' expected after output format."
+msgstr "`)' esperat després del format de resultats."
+
+#: src/language/dictionary/missing-values.c:56
+#: src/language/stats/aggregate.c:459
+msgid "expecting `('"
+msgstr "esperant `('"
+
+#: src/language/dictionary/missing-values.c:72
+#, c-format
+msgid ""
+"Cannot mix numeric variables (e.g. %s) and string variables (e.g. %s) within "
+"a single list."
+msgstr ""
+"No es poden barrejar les variables numèriques (e.g. %s) i les variables de "
+"cadena (e.g. %s) dins d'una llista única."
+
+#: src/language/dictionary/missing-values.c:116
+#, c-format
+msgid "Truncating missing value to maximum acceptable length (%d bytes)."
+msgstr "Truncant el valor perdut a la longitud màxima acceptable (%d bytes)."
+
+#: src/language/dictionary/missing-values.c:138
+#, c-format
+msgid "Missing values provided are too long to assign to variable of width %d."
+msgstr ""
+"Els valors perduts donats són massa llargs per assignar a la variable "
+"d'amplada %d."
+
+#: src/language/dictionary/modify-variables.c:92
+msgid ""
+"MODIFY VARS may not be used after TEMPORARY.  Temporary transformations will "
+"be made permanent."
+msgstr ""
+"MODIFY VARS no pot ser utilitzar després de TEMPORARY. Les transformacions "
+"temporals seran permanents."
+
+#: src/language/dictionary/modify-variables.c:114
+#: src/language/dictionary/modify-variables.c:177
+#, fuzzy, c-format
+msgid "%s subcommand may be given at most once."
+msgstr "El subcomando RENAME pot ser utilitzat només una vegada."
+
+#: src/language/dictionary/modify-variables.c:137
+msgid "Cannot specify ALL after specifying a set of variables."
+msgstr ""
+"No es pot especificar ALL després de l'especificació d'un conjunt de "
+"variables."
+
+#: src/language/dictionary/modify-variables.c:147
+#: src/language/dictionary/modify-variables.c:190
+#, fuzzy, c-format
+msgid "`(' expected on %s subcommand."
+msgstr "`(' esperat al subcomando RENAME."
+
+#: src/language/dictionary/modify-variables.c:159
+msgid "`)' expected following variable names on REORDER subcommand."
+msgstr ""
+"`)' s'esperava seguit dels noms de la variable en el subcomando REORDER."
+
+#: src/language/dictionary/modify-variables.c:199
+msgid ""
+"`=' expected between lists of new and old variable names on RENAME "
+"subcommand."
+msgstr ""
+"`=' esperat entre les llistes de noms de variables noves i velles en el "
+"subcomando RENAME."
+
+#: src/language/dictionary/modify-variables.c:208
+#: src/language/dictionary/rename-variables.c:77
+#, c-format
+msgid ""
+"Differing number of variables in old name list (%zu) and in new name list (%"
+"zu)."
+msgstr ""
+"Diferent nombre de variables en la llista de noms antiga (%zu) i en la "
+"llista de noms nova (%zu)."
+
+#: src/language/dictionary/modify-variables.c:219
+msgid "`)' expected after variable lists on RENAME subcommand."
+msgstr ""
+"`)' esperat després de les llistes de variables en el subcomando RENAME."
+
+#: src/language/dictionary/modify-variables.c:233
+msgid ""
+"KEEP subcommand may be given at most once.  It may not be given in "
+"conjunction with the DROP subcommand."
+msgstr ""
+"El subcomando KEEP pot ser emès més d'una vegada. Pot ser que no sigui "
+"facilitada en relació amb el subcomando DROP."
+
+#: src/language/dictionary/modify-variables.c:276
+msgid ""
+"DROP subcommand may be given at most once.  It may not be given in "
+"conjunction with the KEEP subcommand."
+msgstr ""
+"El subcomando DROP pot ser utilitzat només una vegada. No pot ser utilitzat "
+"conjuntament amb el subcomando KEEP."
+
+#: src/language/dictionary/modify-variables.c:302
+#, c-format
+msgid "Unrecognized subcommand name `%s'."
+msgstr "Nom del subcomando no reconegut '%s'."
+
+#: src/language/dictionary/modify-variables.c:304
+msgid "Subcommand name expected."
+msgstr "Nom del subcomando esperat."
+
+#: src/language/dictionary/modify-variables.c:312
+msgid "`/' or `.' expected."
+msgstr "'/' o '.' esperat."
+
+#: src/language/dictionary/mrsets.c:98
+#, c-format
+msgid ""
+"%s is not a valid name for a multiple response set.  Multiple response set "
+"names must begin with `$'."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:120
+#, c-format
+msgid ""
+"VARIABLES specified only variable %s on %s, but at least two variables are "
+"required."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:153
+msgid "Numeric VALUE must be an integer."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:207 src/language/dictionary/mrsets.c:213
+#: src/language/dictionary/mrsets.c:223
+#, c-format
+msgid "Required %s specification missing from %s subcommand."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:231 src/language/dictionary/mrsets.c:269
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies a string VALUE, but the variables "
+"specified for this group are numeric."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:255
+#, c-format
+msgid ""
+"VALUE string on MDGROUP subcommand for group %s is %d bytes long, but it "
+"must be no longer than the narrowest variable in the group, which is %s with "
+"a width of %d bytes."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:281
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies LABELSOURCE=VARLABEL but not "
+"CATEGORYLABELS=COUNTEDVALUES.  Ignoring LABELSOURCE."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:287
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies both LABEL and LABELSOURCE, but "
+"only one of these subcommands may be used at a time.  Ignoring LABELSOURCE."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:327
+#, c-format
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s have "
+"the same variable label.  Categories represented by these variables will not "
+"be distinguishable in output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:357
+#, c-format
+msgid ""
+"Variable %s specified as part of multiple dichotomy group %s (which has "
+"CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value.  "
+"This category will not be distinguishable in output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:370
+#, c-format
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s (which "
+"has CATEGORYLABELS=COUNTEDVALUES) have the same value label for the the "
+"group's counted value.  These categories will not be distinguishable in "
+"output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:427
+#, c-format
+msgid ""
+"Variables specified on MCGROUP should have the same categories, but %s and %"
+"s (and possibly others) in multiple category group %s have different value "
+"labels for value %s."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:484
+#, fuzzy, c-format
+msgid "No multiple response set named %s."
+msgstr "Cap funció o vector anomenat %s."
+
+#: src/language/dictionary/mrsets.c:538
+#, fuzzy
+msgid "The active file dictionary does not contain any multiple response sets."
+msgstr "El diccionari de l'arxiu actiu no conté cap document. "
+
+#: src/language/dictionary/mrsets.c:548
+msgid "Multiple Response Sets"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:549 src/ui/gui/psppire-var-sheet.c:534
+#: src/ui/gui/psppire-var-store.c:832
+msgid "Name"
+msgstr "Nom"
+
+#: src/language/dictionary/mrsets.c:550 src/ui/gui/variable-info.ui:8
+msgid "Variables"
+msgstr "Variables:"
+
+#: src/language/dictionary/mrsets.c:551
+#, fuzzy
+msgid "Details"
+msgstr "Decimals"
+
+#: src/language/dictionary/mrsets.c:565
+msgid "Multiple dichotomy set"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:566
+msgid "Multiple category set"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:568
+#: src/language/dictionary/split-file.c:84
+#: src/language/dictionary/sys-file-info.c:344
+#: src/language/dictionary/sys-file-info.c:583
+#: src/ui/gui/psppire-var-sheet.c:538 src/ui/gui/psppire-var-store.c:836
+#: src/ui/gui/crosstabs.ui:292 src/ui/gui/psppire.ui:1924
+msgid "Label"
+msgstr "Etiqueta"
+
+#: src/language/dictionary/mrsets.c:572
+#, fuzzy
+msgid "Label source"
+msgstr "Etiqueta: %s\n"
+
+#: src/language/dictionary/mrsets.c:574
+#, fuzzy
+msgid "First variable label among variables"
+msgstr "Duplicar el nom de la variable %s entre les variables de destí."
+
+#: src/language/dictionary/mrsets.c:575
+msgid "Provided by user"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:576
+#, fuzzy
+msgid "Counted value"
+msgstr "Copiar els valors antics"
+
+#: src/language/dictionary/mrsets.c:582
+msgid "Category label source"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:584
+#, fuzzy
+msgid "Variable labels"
+msgstr "Prefereixo les etiquetes de variable"
+
+#: src/language/dictionary/mrsets.c:585
+msgid "Value labels of counted value"
+msgstr ""
+
+#: src/language/dictionary/numeric.c:67
+#, c-format
+msgid "Format type %s may not be used with a numeric variable."
+msgstr "Tipus de format %s no pot ser utilitzat amb una variable numèrica."
+
+#: src/language/dictionary/numeric.c:86 src/language/dictionary/numeric.c:155
+#, c-format
+msgid "There is already a variable named %s."
+msgstr "Ja existeix una variable amb el nom %s."
+
+#: src/language/dictionary/numeric.c:140
+#, c-format
+msgid "Format type %s may not be used with a string variable."
+msgstr "Tipus de format %s no pot ser utilitzat amb una variable de cadena. "
+
+#: src/language/dictionary/rename-variables.c:49
+msgid ""
+"RENAME VARS may not be used after TEMPORARY.  Temporary transformations will "
+"be made permanent."
+msgstr ""
+"RENAME VARS no pot ser utilitzat després de TEMPORARY.  Les transformacions "
+"temporals seran permanents."
+
+#: src/language/dictionary/rename-variables.c:59
+msgid "`(' expected."
+msgstr "'(' esperat."
+
+#: src/language/dictionary/rename-variables.c:67
+msgid "`=' expected between lists of new and old variable names."
+msgstr "`=' esperat entre llistes de nous i antics noms de la variable."
+
+#: src/language/dictionary/rename-variables.c:88
+msgid "`)' expected after variable names."
+msgstr "`)' esperat després dels noms de variables."
+
+#: src/language/dictionary/rename-variables.c:98
+#, c-format
+msgid "Renaming would duplicate variable name %s."
+msgstr "Canviar el nom duplicaria el nom de la variable %s."
+
+#: src/language/dictionary/split-file.c:83
+#: src/language/dictionary/sys-file-info.c:429
+#: src/language/dictionary/sys-file-info.c:582
+#: src/language/stats/crosstabs.q:1214 src/language/stats/crosstabs.q:1241
+#: src/language/stats/crosstabs.q:1264 src/language/stats/crosstabs.q:1289
+#: src/language/stats/examine.q:1841 src/language/stats/frequencies.q:813
+#: src/language/stats/reliability.q:568 src/language/stats/reliability.q:579
+msgid "Value"
+msgstr "Valor"
+
+#: src/language/dictionary/sys-file-info.c:95
+msgid "File:"
+msgstr "Arxiu:"
+
+#: src/language/dictionary/sys-file-info.c:97 src/ui/gui/psppire.ui:1862
+#: src/ui/gui/recode.ui:859
+msgid "Label:"
+msgstr "Etiqueta:"
+
+#: src/language/dictionary/sys-file-info.c:101
+msgid "No label."
+msgstr "Sense etiqueta."
+
+#: src/language/dictionary/sys-file-info.c:104
+msgid "Created:"
+msgstr "Creat:"
+
+#: src/language/dictionary/sys-file-info.c:107
+msgid "Integer Format:"
+msgstr "Format Sencer:"
+
+#: src/language/dictionary/sys-file-info.c:111
+#: src/language/dictionary/sys-file-info.c:119
+#: src/language/dictionary/sys-file-info.c:124
+#: src/language/dictionary/sys-file-info.c:143
+msgid "Unknown"
+msgstr "Desconegut"
+
+#: src/language/dictionary/sys-file-info.c:112
+msgid "Real Format:"
+msgstr "Format Real:"
+
+#: src/language/dictionary/sys-file-info.c:114
+msgid "IEEE 754 LE."
+msgstr "IEEE 754 LE."
+
+#: src/language/dictionary/sys-file-info.c:115
+msgid "IEEE 754 BE."
+msgstr "IEE 754 BE."
+
+#: src/language/dictionary/sys-file-info.c:116
+msgid "VAX D."
+msgstr "VAX D."
+
+#: src/language/dictionary/sys-file-info.c:117
+msgid "VAX G."
+msgstr "VAX G."
+
+#: src/language/dictionary/sys-file-info.c:118
+msgid "IBM 390 Hex Long."
+msgstr "IBM 390 Hex Long."
+
+#: src/language/dictionary/sys-file-info.c:120 src/ui/gui/descriptives.ui:85
+#: src/ui/gui/factor.ui:173 src/ui/gui/recode.ui:960
+msgid "Variables:"
+msgstr "Variables:"
+
+#: src/language/dictionary/sys-file-info.c:122
+msgid "Cases:"
+msgstr "Casos:"
+
+#: src/language/dictionary/sys-file-info.c:127
+msgid "Type:"
+msgstr "Tipus:"
+
+#: src/language/dictionary/sys-file-info.c:128
+#: src/ui/gui/psppire-data-window.c:631
+msgid "System File"
+msgstr "Arxiu de Sistema"
+
+#: src/language/dictionary/sys-file-info.c:129
+msgid "Weight:"
+msgstr "Pes:"
+
+#: src/language/dictionary/sys-file-info.c:134
+msgid "Not weighted."
+msgstr "No ponderat."
+
+#: src/language/dictionary/sys-file-info.c:136
+msgid "Mode:"
+msgstr "Mode:"
+
+#: src/language/dictionary/sys-file-info.c:138
+#, c-format
+msgid "Compression %s."
+msgstr "Compressió %s."
+
+#: src/language/dictionary/sys-file-info.c:138
+msgid "on"
+msgstr "activat"
+
+#: src/language/dictionary/sys-file-info.c:138
+msgid "off"
+msgstr "desactivat"
+
+#: src/language/dictionary/sys-file-info.c:141
+msgid "Charset:"
+msgstr "Conjunt de caràcters:"
+
+#: src/language/dictionary/sys-file-info.c:151
+#: src/language/dictionary/sys-file-info.c:344
+msgid "Description"
+msgstr "Descripció"
+
+#: src/language/dictionary/sys-file-info.c:152
+#: src/language/dictionary/sys-file-info.c:346
+#: src/language/dictionary/sys-file-info.c:663
+msgid "Position"
+msgstr "Posició"
+
+#: src/language/dictionary/sys-file-info.c:199
+msgid "The active file does not have a file label."
+msgstr "L'arxiu actiu no té etiqueta d'arxiu."
+
+#: src/language/dictionary/sys-file-info.c:202
+msgid "File label:"
+msgstr "Etiqueta d'arxiu:"
+
+#: src/language/dictionary/sys-file-info.c:277
+msgid "No variables to display."
+msgstr "Cap variable per mostrar."
+
+#: src/language/dictionary/sys-file-info.c:291
+msgid "Macros not supported."
+msgstr "Macros no disponibles."
+
+#: src/language/dictionary/sys-file-info.c:300
+msgid "The active file dictionary does not contain any documents."
+msgstr "El diccionari de l'arxiu actiu no conté cap document. "
+
+#: src/language/dictionary/sys-file-info.c:308
+msgid "Documents in the active file:"
+msgstr "Documents a l'arxiu actiu:"
+
+#: src/language/dictionary/sys-file-info.c:428
+msgid "Attribute"
+msgstr "Atribut"
+
+#: src/language/dictionary/sys-file-info.c:484
+#, c-format
+msgid "Format: %s"
+msgstr "Format: %s"
+
+#: src/language/dictionary/sys-file-info.c:491
+#, c-format
+msgid "Print Format: %s"
+msgstr "Format d'Impressió: %s"
+
+#: src/language/dictionary/sys-file-info.c:495
+#, c-format
+msgid "Write Format: %s"
+msgstr "Format d'Escriptura: %s"
+
+#: src/language/dictionary/sys-file-info.c:508
+#, c-format
+msgid "Measure: %s"
+msgstr "Mesura: %s"
+
+#: src/language/dictionary/sys-file-info.c:509
+#: src/ui/gui/psppire-var-sheet.c:111
+msgid "Nominal"
+msgstr "Nominal"
+
+#: src/language/dictionary/sys-file-info.c:510
+#: src/ui/gui/psppire-var-sheet.c:112
+msgid "Ordinal"
+msgstr "Ordinal"
+
+#: src/language/dictionary/sys-file-info.c:511
+#: src/ui/gui/psppire-var-sheet.c:113
+msgid "Scale"
+msgstr "Escala"
+
+#: src/language/dictionary/sys-file-info.c:514
+#, c-format
+msgid "Display Alignment: %s"
+msgstr "Alineació de la mostra: %s"
+
+#: src/language/dictionary/sys-file-info.c:515
+#: src/ui/gui/psppire-var-sheet.c:104
+msgid "Left"
+msgstr "Esquerra"
+
+#: src/language/dictionary/sys-file-info.c:516
+#: src/ui/gui/psppire-var-sheet.c:106
+msgid "Center"
+msgstr "Centre"
+
+#: src/language/dictionary/sys-file-info.c:517
+#: src/ui/gui/psppire-var-sheet.c:105
+msgid "Right"
+msgstr "Dreta"
+
+#: src/language/dictionary/sys-file-info.c:520
+#, c-format
+msgid "Display Width: %d"
+msgstr "Amplada de la mostra: %d"
+
+#: src/language/dictionary/sys-file-info.c:534
+msgid "Missing Values: "
+msgstr "Valors perduts:"
+
+#: src/language/dictionary/sys-file-info.c:643
+msgid "No vectors defined."
+msgstr "Vectors no definits."
+
+#: src/language/dictionary/sys-file-info.c:662
+msgid "Vector"
+msgstr "Vector"
+
+#: src/language/dictionary/sys-file-info.c:665
+msgid "Print Format"
+msgstr "Format d'Impressió"
+
+#: src/language/dictionary/value-labels.c:150
+msgid "Truncating value label to 60 characters."
+msgstr "Truncant etiqueta de valor a 60 caràcters."
+
+#: src/language/dictionary/variable-label.c:51
+msgid "String expected for variable label."
+msgstr "S'espera una cadena com a etiqueta de variable."
+
+#: src/language/dictionary/variable-label.c:59
+msgid "Truncating variable label to 255 characters."
+msgstr "Truncant la etiqueta de variable a 255 caràcters."
+
+#: src/language/dictionary/vector.c:64
+#, c-format
+msgid "A vector named %s already exists."
+msgstr "Un vector anomenat %s ja existeix."
+
+#: src/language/dictionary/vector.c:72
+#, c-format
+msgid "Vector name %s is given twice."
+msgstr "El nom del vector %s es dóna dues vegades."
+
+#: src/language/dictionary/vector.c:96
+msgid "A slash must separate each vector specification in VECTOR's long form."
+msgstr ""
+"Una barra ha de separar cada especificació de vector en la forma llarga de "
+"VECTOR."
+
+#: src/language/dictionary/vector.c:129
+msgid "Vectors must have at least one element."
+msgstr "Els vectors han de tenir almenys un element."
+
+#: src/language/dictionary/vector.c:150
+msgid "expecting vector length"
+msgstr "esperant longitud del vector"
+
+#: src/language/dictionary/vector.c:166
+#, c-format
+msgid "%s is too long for a variable name."
+msgstr "%s és massa llarg per un nom de variable."
+
+#: src/language/dictionary/vector.c:171
+#, c-format
+msgid "%s is an existing variable name."
+msgstr "%s és un nom de variable existent."
+
+#: src/language/dictionary/variable-display.c:120
+msgid "Variable display width must be a positive integer."
+msgstr "La amplada de la mostra de la variable ha de ser un enter positiu."
+
+#: src/language/dictionary/weight.c:49
+msgid "The weighting variable must be numeric."
+msgstr "La variable de ponderació ha de ser numèrica."
+
+#: src/language/dictionary/weight.c:54
+msgid "The weighting variable may not be scratch."
+msgstr "La variable de ponderació no pot ser zero."
+
+#: src/language/tests/float-format.c:124
+#, c-format
+msgid "%zu-byte string needed but %zu-byte string supplied."
+msgstr "Es necessita cadena de %zu-byte però s'han subministrat de %zu-byte."
+
+#: src/language/tests/float-format.c:136
+msgid "Hexadecimal floating constant too long."
+msgstr "Constant hexadecimal flotant massa llarga."
+
+#: src/language/tests/float-format.c:201
+#, c-format
+msgid ""
+"%s conversion of %s from %s to %s should have produced %s but actually "
+"produced %s."
+msgstr ""
+"conversió %s de %s desde %s a %s s'hauria d'haver produït %s però actualment "
+"ha produït %s."
+
+#: src/language/tests/float-format.c:247
+msgid "Too many values in single command."
+msgstr "Massa valors en el comandament únic."
+
+#: src/language/tests/moments-test.c:47
+msgid "expecting weight value"
+msgstr "esperant el valor de ponderació"
+
+#: src/language/utilities/cd.c:41
+#, c-format
+msgid "Cannot change directory to %s:  %s "
+msgstr "No es pot canviar el directori per %s: %s"
+
+#: src/language/utilities/date.c:32
+msgid "Only USE ALL is currently implemented."
+msgstr "Només USE ALL s'està aplicant actualment."
+
+#: src/language/utilities/title.c:103
+#, c-format
+msgid "   (Entered %s)"
+msgstr "   (Introduït %s)"
+
+#: src/language/utilities/include.c:95
+msgid "Expecting BATCH or INTERACTIVE after SYNTAX."
+msgstr "Esperant BATCH o INTERACTIVE després de SYNTAX."
+
+#: src/language/utilities/include.c:112
+msgid "Expecting YES or NO after CD."
+msgstr "Esperant YES o NO després del CD."
+
+#: src/language/utilities/include.c:129
+msgid "Expecting CONTINUE or STOP after ERROR."
+msgstr "Esperant CONTINUE o bé STOP després de l'ERROR."
+
+#: src/language/utilities/include.c:136
+#, c-format
+msgid "Unexpected token: `%s'."
+msgstr "Testimoni inesperat: `%s'."
+
+#: src/language/utilities/include.c:181
+msgid "expecting file name"
+msgstr "esperant nom d'arxiu"
+
+#: src/language/utilities/include.c:193
+#, c-format
+msgid "Can't find `%s' in include file search path."
+msgstr "No es pot trobar `%s' en la ruta de cerca de l'arxiu d'inclusió."
+
+#: src/language/utilities/include.c:201
+#, c-format
+msgid "Unable to open `%s': %s."
+msgstr "No es pot obrir `%s': %s."
+
+#: src/language/utilities/permissions.c:73
+#, c-format
+msgid "Expecting %s or %s."
+msgstr "Esperant %s o bé %s."
+
+#: src/language/utilities/permissions.c:106
+#, c-format
+msgid "Cannot stat %s: %s"
+msgstr "No es pot dir que %s: %s"
+
+#: src/language/utilities/permissions.c:119
+#, c-format
+msgid "Cannot change mode of %s: %s"
+msgstr "No es pot canviar el mode ed %s: %s"
+
+#: src/language/stats/aggregate.c:220
+msgid "while expecting COLUMNWISE"
+msgstr "mentrestant esperant COLUMNWISE"
+
+#: src/language/stats/aggregate.c:247
+msgid "expecting BREAK"
+msgstr "esperant BREAK"
+
+#: src/language/stats/aggregate.c:252
+msgid ""
+"When PRESORTED is specified, specifying sorting directions with (A) or (D) "
+"has no effect.  Output data will be sorted the same way as the input data."
+msgstr ""
+"Quan s'especifica PRESORTED, donar directives d'ordenació amb  (A) o (D) no "
+"té efecte. Les dades de sortida seran ordenades de la mateixa manera que les "
+"d'entrada."
+
+#: src/language/stats/aggregate.c:424
+msgid "expecting aggregation function"
+msgstr "esperant un funció agregadora"
+
+#: src/language/stats/aggregate.c:442
+#, c-format
+msgid "Unknown aggregation function %s."
+msgstr "Funció desconeguda %s."
+
+#: src/language/stats/aggregate.c:498
+#, c-format
+msgid "Missing argument %zu to %s."
+msgstr "Argument perdut %zu per a %s."
+
+#: src/language/stats/aggregate.c:507
+#, c-format
+msgid "Arguments to %s must be of same type as source variables."
+msgstr ""
+"Els arguments per a %s han de ser del mateix tipus que les variables "
+"d'origen."
+
+#: src/language/stats/aggregate.c:517 src/language/expressions/parse.c:885
+msgid "expecting `)'"
+msgstr "esperant `)'"
+
+#: src/language/stats/aggregate.c:529
+#, c-format
+msgid ""
+"Number of source variables (%zu) does not match number of target variables (%"
+"zu)."
+msgstr ""
+"Nombre de variables d'origen (%zu) no coincideix amb el nombre de variables "
+"de destinació (%zu)."
+
+#: src/language/stats/aggregate.c:545
+#, c-format
+msgid ""
+"The value arguments passed to the %s function are out-of-order.  They will "
+"be treated as if they had been specified in the correct order."
+msgstr ""
+"El valor dels arguments passats a la funció %s estan fora d'ordre. Seran "
+"tractats com si haguessin estat especificats en l'ordre correcte."
+
+#: src/language/stats/aggregate.c:615
+#, c-format
+msgid ""
+"Variable name %s is not unique within the aggregate file dictionary, which "
+"contains the aggregate variables and the break variables."
+msgstr ""
+"El nom de variable %s no és únic dins l'arxiu de diccionari agregat, que "
+"conté les variables agregades i les variables de tall."
+
+#: src/language/stats/autorecode.c:116
+#, c-format
+msgid "Source variable count (%zu) does not match target variable count (%zu)."
+msgstr ""
+"El recompte de la variable d'origen (%zu) no coincideix amb el recompte de "
+"la variable de destí (%zu)."
+
+#: src/language/stats/autorecode.c:128
+#, c-format
+msgid "Target variable %s duplicates existing variable %s."
+msgstr "Variable de destí %s duplica una variable existent %s."
+
+#: src/language/stats/binomial.c:141
+#, c-format
+msgid "Variable %s is not dichotomous"
+msgstr "La variable %s no és dicotòmica"
+
+#: src/language/stats/binomial.c:192 src/ui/gui/binomial.ui:13
+msgid "Binomial Test"
+msgstr "Prova Binomial"
+
+#: src/language/stats/binomial.c:222
+msgid "Group1"
+msgstr "Grup 1"
+
+#: src/language/stats/binomial.c:223
+msgid "Group2"
+msgstr "Grup 2"
+
+#: src/language/stats/binomial.c:224 src/language/stats/chisquare.c:177
+#: src/language/stats/chisquare.c:236 src/language/stats/factor.c:1462
+#: src/language/stats/sign.c:92 src/language/stats/wilcoxon.c:260
+#: src/ui/gui/crosstabs-dialog.c:60 src/language/stats/crosstabs.q:823
+#: src/language/stats/crosstabs.q:1151 src/language/stats/crosstabs.q:1528
+#: src/language/stats/examine.q:1105 src/language/stats/frequencies.q:871
+#: src/language/stats/oneway.q:302 src/language/stats/oneway.q:472
+#: src/language/stats/regression.q:291 src/language/stats/reliability.q:702
+msgid "Total"
+msgstr "Total"
+
+#: src/language/stats/binomial.c:257 src/language/stats/chisquare.c:199
+#: src/language/stats/crosstabs.q:1239 src/language/stats/crosstabs.q:1286
+msgid "Category"
+msgstr "Categoria"
+
+#: src/language/stats/binomial.c:258 src/language/stats/correlations.c:119
+#: src/language/stats/correlations.c:227 src/language/stats/npar-summary.c:122
+#: src/language/stats/sign.c:72 src/language/stats/wilcoxon.c:243
+#: src/language/stats/crosstabs.q:830 src/language/stats/examine.q:1176
+#: src/language/stats/frequencies.q:1034 src/language/stats/oneway.q:385
+#: src/language/stats/reliability.q:705 src/language/stats/t-test.q:505
+#: src/language/stats/t-test.q:525 src/language/stats/t-test.q:625
+#: src/language/stats/t-test.q:1101
+msgid "N"
+msgstr "N"
+
+#: src/language/stats/binomial.c:259
+msgid "Observed Prop."
+msgstr "Prop. Observat"
+
+#: src/language/stats/binomial.c:260
+msgid "Test Prop."
+msgstr "Test Prop."
+
+#: src/language/stats/binomial.c:263
+#, c-format
+msgid "Exact Sig. (%d-tailed)"
+msgstr "Sig. Exact.(%d-tailed)"
+
+#: src/language/stats/chisquare.c:150
+#, c-format
+msgid ""
+"CHISQUARE test specified %d expected values, but %d distinct values were "
+"encountered in variable %s."
+msgstr ""
+"Prova CHISQUARE especifica %d valors esperats, però %d diferents valors es "
+"van trobar a la variable %s."
+
+#: src/language/stats/chisquare.c:161 src/language/stats/chisquare.c:200
+msgid "Observed N"
+msgstr "N observat"
+
+#: src/language/stats/chisquare.c:162 src/language/stats/chisquare.c:201
+msgid "Expected N"
+msgstr "N esperat"
+
+#: src/language/stats/chisquare.c:163 src/language/stats/chisquare.c:202
+#: src/ui/gui/crosstabs-dialog.c:62 src/language/stats/regression.q:290
+msgid "Residual"
+msgstr "Residual"
+
+#: src/language/stats/chisquare.c:195 src/language/stats/sign.c:60
+#: src/ui/gui/frequencies.ui:9 src/ui/gui/frequencies.ui:669
+msgid "Frequencies"
+msgstr "Freqüències"
+
+#: src/language/stats/chisquare.c:249 src/language/stats/sign.c:111
+#: src/language/stats/wilcoxon.c:309
+msgid "Test Statistics"
+msgstr "Proves Estad."
+
+#: src/language/stats/chisquare.c:263
+msgid "Chi-Square"
+msgstr "Chi-quadrat"
+
+#: src/language/stats/chisquare.c:264 src/language/stats/crosstabs.q:1215
+#: src/language/stats/oneway.q:275 src/language/stats/oneway.q:685
+#: src/language/stats/regression.q:284 src/language/stats/t-test.q:752
+#: src/language/stats/t-test.q:923 src/language/stats/t-test.q:1010
+msgid "df"
+msgstr "df"
+
+#: src/language/stats/chisquare.c:265
+msgid "Asymp. Sig."
+msgstr "Sig. Asimpt."
+
+#: src/language/stats/correlations.c:96 src/language/stats/factor.c:1720
+#: src/language/stats/npar-summary.c:108
+msgid "Descriptive Statistics"
+msgstr "Estadístiques Descriptives"
+
+#: src/language/stats/correlations.c:117 src/language/stats/descriptives.c:101
+#: src/language/stats/factor.c:1741 src/language/stats/npar-summary.c:125
+#: src/ui/gui/descriptives-dialog.c:40 src/ui/gui/frequencies-dialog.c:41
+#: src/language/stats/examine.q:1444 src/language/stats/frequencies.q:105
+#: src/language/stats/oneway.q:386 src/language/stats/t-test.q:506
+#: src/language/stats/t-test.q:526 src/language/stats/t-test.q:624
+#: src/language/stats/t-test.q:917
+msgid "Mean"
+msgstr "Mitjana"
+
+#: src/language/stats/correlations.c:118 src/language/stats/factor.c:1742
+#: src/language/stats/npar-summary.c:128 src/language/stats/examine.q:1479
+#: src/language/stats/oneway.q:387 src/language/stats/t-test.q:507
+#: src/language/stats/t-test.q:527 src/language/stats/t-test.q:626
+#: src/language/stats/t-test.q:918
+msgid "Std. Deviation"
+msgstr "Desviació Est."
+
+#: src/language/stats/correlations.c:190 src/language/stats/factor.c:1620
+#, fuzzy
+msgid "Correlations"
+msgstr "Correlació"
+
+#: src/language/stats/correlations.c:216
+#, fuzzy
+msgid "Pearson Correlation"
+msgstr "Correlació de Spearman"
+
+#: src/language/stats/correlations.c:218 src/language/stats/oneway.q:686
+#: src/language/stats/t-test.q:753 src/language/stats/t-test.q:924
+#: src/language/stats/t-test.q:1011
+msgid "Sig. (2-tailed)"
+msgstr "Sig. (2-cues)"
+
+#: src/language/stats/correlations.c:218
+#, fuzzy
+msgid "Sig. (1-tailed)"
+msgstr "Sig. (2-cues)"
+
+#: src/language/stats/correlations.c:222
+msgid "Cross-products"
+msgstr ""
+
+#: src/language/stats/correlations.c:223
+#, fuzzy
+msgid "Covariance"
+msgstr "Covariància"
+
+#: src/language/stats/correlations.c:454 src/language/stats/descriptives.c:361
+#: src/language/data-io/list.q:91
+msgid "No variables specified."
+msgstr "Variables no especificades."
+
+#: src/language/stats/descriptives.c:102 src/language/stats/frequencies.q:106
+#: src/language/stats/t-test.q:508 src/language/stats/t-test.q:528
+#: src/language/stats/t-test.q:627
+msgid "S.E. Mean"
+msgstr "E.E. Mitj."
+
+#: src/language/stats/descriptives.c:103 src/language/stats/frequencies.q:109
+msgid "Std Dev"
+msgstr "Desv.Std."
+
+#: src/language/stats/descriptives.c:104 src/ui/gui/descriptives-dialog.c:47
+#: src/ui/gui/frequencies-dialog.c:46 src/language/stats/examine.q:1474
+#: src/language/stats/frequencies.q:110
+msgid "Variance"
+msgstr "Variància"
+
+#: src/language/stats/descriptives.c:105 src/ui/gui/descriptives-dialog.c:48
+#: src/ui/gui/frequencies-dialog.c:51 src/language/stats/examine.q:1510
+#: src/language/stats/frequencies.q:111
+msgid "Kurtosis"
+msgstr "Curtosi"
+
+#: src/language/stats/descriptives.c:106 src/language/stats/frequencies.q:112
+msgid "S.E. Kurt"
+msgstr "E.E. Curt."
+
+#: src/language/stats/descriptives.c:107 src/ui/gui/descriptives-dialog.c:49
+#: src/ui/gui/frequencies-dialog.c:47 src/language/stats/examine.q:1505
+#: src/language/stats/frequencies.q:113
+msgid "Skewness"
+msgstr "Asimetria"
+
+#: src/language/stats/descriptives.c:108 src/language/stats/frequencies.q:114
+msgid "S.E. Skew"
+msgstr "E.E. Asim."
+
+#: src/language/stats/descriptives.c:109 src/ui/gui/descriptives-dialog.c:44
+#: src/ui/gui/frequencies-dialog.c:49 src/language/stats/examine.q:1494
+#: src/language/stats/frequencies.q:115
+msgid "Range"
+msgstr "Interval"
+
+#: src/language/stats/descriptives.c:110 src/language/stats/npar-summary.c:131
+#: src/ui/gui/descriptives-dialog.c:42 src/ui/gui/frequencies-dialog.c:43
+#: src/language/stats/examine.q:1484 src/language/stats/frequencies.q:116
+#: src/language/stats/oneway.q:400
+msgid "Minimum"
+msgstr "Mínim"
+
+#: src/language/stats/descriptives.c:111 src/language/stats/npar-summary.c:134
+#: src/ui/gui/descriptives-dialog.c:43 src/ui/gui/frequencies-dialog.c:44
+#: src/language/stats/examine.q:1489 src/language/stats/frequencies.q:117
+#: src/language/stats/oneway.q:401
+msgid "Maximum"
+msgstr "Màxim"
+
+#: src/language/stats/descriptives.c:112 src/ui/gui/descriptives-dialog.c:45
+#: src/ui/gui/frequencies-dialog.c:54 src/language/stats/frequencies.q:118
+msgid "Sum"
+msgstr "Suma"
+
+#: src/language/stats/descriptives.c:343
+#, c-format
+msgid "Z-score variable name %s would be a duplicate variable name."
+msgstr "el mom de variable Z %s seria un nom de variable duplicat."
+
+#: src/language/stats/descriptives.c:450
+msgid "expecting statistic name: reverting to default"
+msgstr "esperant nom de l'estadístic: torna a aplicar el defecte"
+
+#: src/language/stats/descriptives.c:523
+msgid ""
+"Ran out of generic names for Z-score variables.  There are only 126 generic "
+"names: ZSC001-ZSC0999, STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09."
+msgstr ""
+"S'han esgotat els noms genèrics per les variables Z.  Només hi ha 126 noms "
+"genèrics: ZSC001-ZSC0999, STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09."
+
+#: src/language/stats/descriptives.c:555
+msgid "Mapping of variables to corresponding Z-scores."
+msgstr "Convertint variables a les puntuacions-Z corresponents."
+
+#: src/language/stats/descriptives.c:559
+msgid "Source"
+msgstr "Font"
+
+#: src/language/stats/descriptives.c:560
+msgid "Target"
+msgstr "Destí"
+
+#: src/language/stats/descriptives.c:670
+#, c-format
+msgid "Z-score of %s"
+msgstr "puntuació-Z de %s"
+
+#: src/language/stats/descriptives.c:884
+msgid "Valid N"
+msgstr "N vàlids"
+
+#: src/language/stats/descriptives.c:885
+msgid "Missing N"
+msgstr "Perduts N"
+
+#: src/language/stats/descriptives.c:913
+#, c-format
+msgid "Valid cases = %g; cases with missing value(s) = %g."
+msgstr "Casos vàlids = %g; casos amb valor(s) perdut(s) = %g."
+
+#: src/language/stats/sort-cases.c:64
+msgid "Buffer limit must be at least 2."
+msgstr "El límit de la memòria intermitja ha de ser almenys de 2."
+
+#: src/language/stats/sort-criteria.c:74
+msgid "`A' or `D' expected inside parentheses."
+msgstr "S'espera `A' or `D' dins del parèntesis."
+
+#: src/language/stats/sort-criteria.c:79
+msgid "`)' expected."
+msgstr "`)' esperat."
+
+#: src/language/stats/sort-criteria.c:92
+#, c-format
+msgid "Variable %s specified twice in sort criteria."
+msgstr "La variable %s s'especifica dues vegades als criteris d'ordenació."
+
+#: src/language/stats/factor.c:803
+msgid "Factor analysis on a single variable is not useful."
+msgstr ""
+
+#: src/language/stats/factor.c:1206
+#, fuzzy
+msgid "Component Number"
+msgstr "Columna Numero: 0"
+
+#: src/language/stats/factor.c:1206
+#, fuzzy
+msgid "Factor Number"
+msgstr "Número de Cas"
+
+#: src/language/stats/factor.c:1237
+#, fuzzy
+msgid "Communalities"
+msgstr "Comentaris:"
+
+#: src/language/stats/factor.c:1243
+msgid "Initial"
+msgstr ""
+
+#: src/language/stats/factor.c:1246
+msgid "Extraction"
+msgstr ""
+
+#: src/language/stats/factor.c:1310 src/language/stats/factor.c:1437
+#, fuzzy
+msgid "Component"
+msgstr "Comentaris:"
+
+#: src/language/stats/factor.c:1315 src/language/stats/factor.c:1439
+#, fuzzy
+msgid "Factor"
+msgstr "_Factor:"
+
+#: src/language/stats/factor.c:1347 src/language/stats/factor.c:1495
+#: src/ui/gui/psppire-data-store.c:755 src/ui/gui/psppire-var-store.c:699
+#: src/ui/gui/psppire-var-store.c:709 src/ui/gui/psppire-var-store.c:719
+#: src/ui/gui/psppire-var-store.c:825
+#, c-format
+msgid "%d"
+msgstr "%d"
+
+#: src/language/stats/factor.c:1412
+msgid "Total Variance Explained"
+msgstr ""
+
+#: src/language/stats/factor.c:1444
+msgid "Initial Eigenvalues"
+msgstr ""
+
+#: src/language/stats/factor.c:1450
+msgid "Extraction Sums of Squared Loadings"
+msgstr ""
+
+#: src/language/stats/factor.c:1456
+msgid "Rotation Sums of Squared Loadings"
+msgstr ""
+
+#: src/language/stats/factor.c:1464
+#, fuzzy, no-c-format
+msgid "% of Variance"
+msgstr "Variància"
+
+#: src/language/stats/factor.c:1465
+msgid "Cumulative %"
+msgstr ""
+
+#: src/language/stats/factor.c:1578
+#, fuzzy
+msgid "Correlation Matrix"
+msgstr "Correlació"
+
+#: src/language/stats/factor.c:1632
+#, fuzzy
+msgid "Sig. 1-tailed"
+msgstr "Sig. (2-cues)"
+
+#: src/language/stats/factor.c:1666
+#, fuzzy
+msgid "Determinant"
+msgstr "Dependent"
+
+#: src/language/stats/factor.c:1743
+msgid "Analysis N"
+msgstr ""
+
+#: src/language/stats/factor.c:1776
+msgid ""
+"The FACTOR criteria result in zero factors extracted. Therefore no analysis "
+"will be performed."
+msgstr ""
+
+#: src/language/stats/factor.c:1782
+msgid ""
+"The FACTOR criteria result in more factors than variables, which is not "
+"meaningful. No analysis will be performed."
+msgstr ""
+
+#: src/language/stats/factor.c:1865
+msgid "Component Matrix"
+msgstr ""
+
+#: src/language/stats/factor.c:1865
+#, fuzzy
+msgid "Factor Matrix"
+msgstr "Llista de Factors:"
+
+#: src/language/stats/factor.c:1871
+msgid "Rotated Component Matrix"
+msgstr ""
+
+#: src/language/stats/factor.c:1871
+#, fuzzy
+msgid "Rotated Factor Matrix"
+msgstr "Llista de Factors:"
+
+#: src/language/stats/flip.c:98
+msgid ""
+"FLIP ignores TEMPORARY.  Temporary transformations will be made permanent."
+msgstr ""
+"FLIP ignora TEMPORARY.  Les transformacions temporals seran permanents."
+
+#: src/language/stats/flip.c:150
+msgid "Could not create temporary file for FLIP."
+msgstr "No s'ha pogut crear l'arxiu temporal per a FLIP."
+
+#: src/language/stats/flip.c:327
+#, c-format
+msgid "Error rewinding FLIP file: %s."
+msgstr "Error reconstruint l'arxiu FLIP: %s."
+
+#: src/language/stats/flip.c:334
+msgid "Error creating FLIP source file."
+msgstr "Error en crear l'arxiu d'origen FLIP."
+
+#: src/language/stats/flip.c:347
+#, c-format
+msgid "Error reading FLIP file: %s."
+msgstr "Error de lectura de l'arxiu FLIP: %s."
+
+#: src/language/stats/flip.c:349
+msgid "Unexpected end of file reading FLIP file."
+msgstr "Final inesperat de la lectura d'arxiu FLIP."
+
+#: src/language/stats/flip.c:365
+#, c-format
+msgid "Error seeking FLIP source file: %s."
+msgstr "Error en cercar l'arxiu font FLIP: %s."
+
+#: src/language/stats/flip.c:373
+#, c-format
+msgid "Error writing FLIP source file: %s."
+msgstr "Error d'escriptura de l'arxiu font FLIP: %s."
+
+#: src/language/stats/flip.c:384
+#, c-format
+msgid "Error closing FLIP source file: %s."
+msgstr "Error de tancament de l'arxiu de font FLIP: %s."
+
+#: src/language/stats/flip.c:392
+#, c-format
+msgid "Error rewinding FLIP source file: %s."
+msgstr "Error reconstruint d'arxiu font FLIP: %s."
+
+#: src/language/stats/flip.c:426
+#, c-format
+msgid "Error reading FLIP temporary file: %s."
+msgstr "Error de lectura de l'arxiu temporal FLIP: %s."
+
+#: src/language/stats/flip.c:429
+msgid "Unexpected end of file reading FLIP temporary file."
+msgstr "Final inesperat de la lectura d'arxiu temporal FLIP."
+
+#: src/language/stats/npar-summary.c:141 src/language/stats/examine.q:1996
+#: src/language/stats/examine.q:2013 src/language/stats/frequencies.q:1050
+#: src/ui/gui/examine.ui:345
+msgid "Percentiles"
+msgstr "Percentils"
+
+#: src/language/stats/npar-summary.c:145
+msgid "25th"
+msgstr "25è"
+
+#: src/language/stats/npar-summary.c:148
+msgid "50th (Median)"
+msgstr "50è (Mediana)"
+
+#: src/language/stats/npar-summary.c:151
+msgid "75th"
+msgstr "75è"
+
+#: src/language/stats/roc.c:932
+msgid "Area Under the Curve"
+msgstr "Àrea Sota la Corba"
+
+#: src/language/stats/roc.c:934
+#, c-format
+msgid "Area Under the Curve (%s)"
+msgstr "Àrea Sota la Corba (%s)"
+
+#: src/language/stats/roc.c:939
+msgid "Area"
+msgstr "Àrea"
+
+#: src/language/stats/roc.c:952 src/language/stats/examine.q:1641
+#: src/language/stats/oneway.q:388 src/language/stats/oneway.q:683
+#: src/language/stats/regression.q:198
+msgid "Std. Error"
+msgstr "Error Est."
+
+#: src/language/stats/roc.c:953
+msgid "Asymptotic Sig."
+msgstr "Signif. Asimpt."
+
+#: src/language/stats/roc.c:955 src/language/stats/examine.q:1455
+#: src/language/stats/oneway.q:397
+msgid "Lower Bound"
+msgstr "Límit Inferior"
+
+#: src/language/stats/roc.c:956 src/language/stats/examine.q:1460
+#: src/language/stats/oneway.q:398
+msgid "Upper Bound"
+msgstr "Límit Superior"
+
+#: src/language/stats/roc.c:960
+#, c-format
+msgid "Asymp. %g%% Confidence Interval"
+msgstr " Interval de Confiança Asimp. %g%%"
+
+#: src/language/stats/roc.c:966
+msgid "Variable under test"
+msgstr "Variable sota prova"
+
+#: src/language/stats/roc.c:1025
+msgid "Case Summary"
+msgstr "Resum del Cas"
+
+#: src/language/stats/roc.c:1045
+msgid "Unweighted"
+msgstr "No ponderat"
+
+#: src/language/stats/roc.c:1046
+msgid "Weighted"
+msgstr "Ponderat"
+
+#: src/language/stats/roc.c:1050
+msgid "Valid N (listwise)"
+msgstr "N Valid (listwise)"
+
+#: src/language/stats/roc.c:1053
+msgid "Positive"
+msgstr "Positiu"
+
+#: src/language/stats/roc.c:1054
+msgid "Negative"
+msgstr "Negatiu"
+
+#: src/language/stats/roc.c:1082
+msgid "Coordinates of the Curve"
+msgstr "Coordenades de la Corba"
+
+#: src/language/stats/roc.c:1084
+#, c-format
+msgid "Coordinates of the Curve (%s)"
+msgstr "Coordenades de la Corba (%s)"
+
+#: src/language/stats/roc.c:1092
+msgid "Test variable"
+msgstr "Variable de prova"
+
+#: src/language/stats/roc.c:1094
+msgid "Positive if greater than or equal to"
+msgstr "Positiu si és major o igual a"
+
+#: src/language/stats/roc.c:1095 src/output/charts/roc-chart-cairo.c:38
+msgid "Sensitivity"
+msgstr "Sensibilitat"
+
+#: src/language/stats/roc.c:1096 src/output/charts/roc-chart-cairo.c:37
+msgid "1 - Specificity"
+msgstr "1 - Especificitat"
+
+#: src/language/stats/sign.c:89
+msgid "Negative Differences"
+msgstr "Diferències Negatives"
+
+#: src/language/stats/sign.c:90
+msgid "Positive Differences"
+msgstr "Diferències Positives"
+
+#: src/language/stats/sign.c:91 src/language/stats/wilcoxon.c:259
+msgid "Ties"
+msgstr "Lligams"
+
+#: src/language/stats/sign.c:130 src/language/stats/wilcoxon.c:327
+msgid "Exact Sig. (2-tailed)"
+msgstr "Sig. Exacta (2-cues)"
+
+#: src/language/stats/sign.c:133 src/language/stats/wilcoxon.c:328
+msgid "Exact Sig. (1-tailed)"
+msgstr "Sig. Exacta (1-cua)"
+
+#: src/language/stats/sign.c:136 src/language/stats/wilcoxon.c:331
+msgid "Point Probability"
+msgstr "Punt de Probabilitat"
+
+#: src/language/stats/wilcoxon.c:230
+msgid "Ranks"
+msgstr "Rangs"
+
+#: src/language/stats/wilcoxon.c:244
+msgid "Mean Rank"
+msgstr "Rang mitjà"
+
+#: src/language/stats/wilcoxon.c:245
+msgid "Sum of Ranks"
+msgstr "Suma de Rangs"
+
+#: src/language/stats/wilcoxon.c:257
+msgid "Negative Ranks"
+msgstr "Rangs Negatius"
+
+#: src/language/stats/wilcoxon.c:258
+msgid "Positive Ranks"
+msgstr "Rangs Positius"
+
+#: src/language/stats/wilcoxon.c:322
+msgid "Z"
+msgstr "Z"
+
+#: src/language/stats/wilcoxon.c:323
+msgid "Asymp. Sig. (2-tailed)"
+msgstr "Sig. Asimp. (2-cues)"
+
+#: src/language/data-io/combine-files.c:210
+msgid "Cannot specify the active file since no active file has been defined."
+msgstr ""
+"No es pot especificar el fitxer actiu ja que cap fitxer actiu ha estat "
+"definit."
+
+#: src/language/data-io/combine-files.c:216
+msgid ""
+"This command may not be used after TEMPORARY when the active file is an "
+"input source.  Temporary transformations will be made permanent."
+msgstr ""
+"Aquest comando no pot ser utilitzat després de TEMPORARY quan l'arxiu actiu "
+"és una font d'entrada.  Les transformacions temporals seran permanents."
+
+#: src/language/data-io/combine-files.c:250
+msgid "Multiple IN subcommands for a single FILE or TABLE."
+msgstr "Múltiples subcomandos IN  per a un únic FILE o TABLE."
+
+#: src/language/data-io/combine-files.c:302
+#, c-format
+msgid "File %s lacks BY variable %s."
+msgstr "L'arxiu %s no té variable BY %s."
+
+#: src/language/data-io/combine-files.c:305
+#, c-format
+msgid "Active file lacks BY variable %s."
+msgstr "Arxiu actiu no té BY variable %s."
+
+#: src/language/data-io/combine-files.c:376
+msgid "The BY subcommand is required."
+msgstr "Es necessita el subcomando BY."
+
+#: src/language/data-io/combine-files.c:381
+#: src/language/data-io/combine-files.c:386
+#, fuzzy, c-format
+msgid "BY is required when %s is specified."
+msgstr "BY és necessari quan SORT s'especifica."
+
+#: src/language/data-io/combine-files.c:513
+msgid ""
+"Combining files with incompatible encodings. String data may not be "
+"represented correctly."
+msgstr ""
+"Combinant arxius amb codificacions incompatibles. Les dades de la cadena no "
+"podran estar representades correctament."
+
+#: src/language/data-io/combine-files.c:545
+#, c-format
+msgid ""
+"Variable %s in file %s has different type or width from the same variable in "
+"earlier file."
+msgstr ""
+"La variable %s a l'arxiu %s és de tipus o amplada diferent respecte de la "
+"mateixa variable en l'arxiu anterior. "
+
+#: src/language/data-io/combine-files.c:551
+#, c-format
+msgid "In file %s, %s is numeric."
+msgstr "A l'arxiu %s, %s és numèric."
+
+#: src/language/data-io/combine-files.c:554
+#, c-format
+msgid "In file %s, %s is a string variable with width %d."
+msgstr "A l'arxiu %s, %s és una variable de cadena amb una amplada de %d."
+
+#: src/language/data-io/combine-files.c:559
+#, c-format
+msgid "In an earlier file, %s was numeric."
+msgstr "En un arxiu anterior, %s era numèric."
+
+#: src/language/data-io/combine-files.c:562
+#, c-format
+msgid "In an earlier file, %s was a string variable with width %d."
+msgstr ""
+"En un arxiu anterior, %s era una variable cadena amb una amplada de %d."
+
+#: src/language/data-io/combine-files.c:601
+#, c-format
+msgid ""
+"Variable name %s specified on %s subcommand duplicates an existing variable "
+"name."
+msgstr ""
+"Nom de la variable %s especificat al subcomando %s duplica el nom de la "
+"variable existent."
+
+#: src/language/data-io/combine-files.c:762
+#, c-format
+msgid "Encountered %zu sets of duplicate cases in the master file."
+msgstr "Trobats %zu conjunts de casos duplicats a l'arxiu principal."
+
+#: src/language/data-io/data-list.c:137
+msgid "The END subcommand may only be used within INPUT PROGRAM."
+msgstr "El subcomando END només pot ser utilitzat dins de INPUT PROGRAM."
+
+#: src/language/data-io/data-list.c:143
+msgid "The END subcommand may only be specified once."
+msgstr "El subcomando END només pot ser especificat una vegada."
+
+#: src/language/data-io/data-list.c:181
+msgid "Only one of FIXED, FREE, or LIST may be specified."
+msgstr "Només un de FIXED, FREE, o LIST pot ser especificat."
+
+#: src/language/data-io/data-list.c:243
+msgid "Encoding should not be specified for inline data. It will be ignored."
+msgstr ""
+"La codificació no ha de ser especificada per les dades en línia. Serà "
+"ignorada."
+
+#: src/language/data-io/data-list.c:254
+msgid "The END subcommand may be used only with DATA LIST FIXED."
+msgstr "El subcomando END només potser utilitzat amb DATA LIST FIXED."
+
+#: src/language/data-io/data-list.c:269
+msgid "At least one variable must be specified."
+msgstr "Al menys una variable ha de ser especificada."
+
+#: src/language/data-io/data-list.c:368 src/language/data-io/data-list.c:457
+#: src/language/data-io/get-data.c:530
+#, c-format
+msgid "%s is a duplicate variable name."
+msgstr "%s és un nom de variable duplicat."
+
+#: src/language/data-io/data-list.c:375
+#, c-format
+msgid "There is already a variable %s of a different type."
+msgstr "Ja existeix una variable %s de diferent tipus."
+
+#: src/language/data-io/data-list.c:382
+#, c-format
+msgid "There is already a string variable %s of a different width."
+msgstr "Ja existeix una cadena de la variable %s d'amplada diferent."
+
+#: src/language/data-io/data-list.c:390
+#, c-format
+msgid "Cannot place variable %s on record %d when RECORDS=%d is specified."
+msgstr ""
+"No es pot posar la variable %s en el registre %d quan RECORDS=%d està "
+"especificat."
+
+#: src/language/data-io/data-parser.c:460
+#: src/language/data-io/data-parser.c:469
+msgid "Quoted string extends beyond end of line."
+msgstr "La cadena entre cometes s'estén més enllà del final de línia."
+
+#: src/language/data-io/data-parser.c:525
+#, c-format
+msgid "Partial case of %d of %d records discarded."
+msgstr "Casos parcials de %d de %d registres descartats."
+
+#: src/language/data-io/data-parser.c:572
+#, c-format
+msgid "Partial case discarded.  The first variable missing was %s."
+msgstr "Cas parcial descartat.  La primera variable que faltava era %s."
+
+#: src/language/data-io/data-parser.c:610
+#, c-format
+msgid ""
+"Missing value(s) for all variables from %s onward.  These will be filled "
+"with the system-missing value or blanks, as appropriate."
+msgstr ""
+"Valor(s) perdut(s) per a totes les variables des de %st.  Aquests s'omplen "
+"amb el valor perdut del sistema o espais en blanc, segons correspongui."
+
+#: src/language/data-io/data-parser.c:630
+msgid "Record ends in data not part of any field."
+msgstr "El registre termina amb dades que no formen part de cap camp."
+
+#: src/language/data-io/data-parser.c:650 src/language/data-io/print.c:404
+msgid "Record"
+msgstr "Registre"
+
+#: src/language/data-io/data-parser.c:651 src/language/data-io/print.c:405
+#: src/ui/gui/psppire-var-sheet.c:541 src/ui/gui/psppire-var-store.c:839
+#: src/ui/gui/crosstabs.ui:89
+msgid "Columns"
+msgstr "Columnes"
+
+#: src/language/data-io/data-parser.c:652
+#: src/language/data-io/data-parser.c:689 src/language/data-io/print.c:406
+msgid "Format"
+msgstr "Format"
+
+#: src/language/data-io/data-parser.c:670
+#, c-format
+msgid "Reading %d record from %s."
+msgid_plural "Reading %d records from %s."
+msgstr[0] "Llegint %d registre de %s."
+msgstr[1] "Llegint %d registres de %s."
+
+#: src/language/data-io/data-parser.c:704
+#, c-format
+msgid "Reading free-form data from %s."
+msgstr "Llegint dades amb format lliure de %s."
+
+#. TRANSLATORS: this fragment will be interpolated into
+#. messages in fh_lock() that identify types of files.
+#: src/language/data-io/data-reader.c:123
+#: src/language/data-io/data-writer.c:58
+msgid "data file"
+msgstr "arxiu de dades"
+
+#: src/language/data-io/data-reader.c:150
+#, c-format
+msgid "Could not open \"%s\" for reading as a data file: %s."
+msgstr "No s'ha pogut obrir \"%s\" per a la lectura com un arxiu de dades: %s."
+
+#: src/language/data-io/data-reader.c:192
+msgid ""
+"Unexpected end-of-file while reading data in BEGIN DATA.  This probably "
+"indicates a missing or misformatted END DATA command.  END DATA must appear "
+"by itself on a single line with exactly one space between words."
+msgstr ""
+"Final d'arxiu inesperat durant la lectura de dades en BEGIN DATA.  Això "
+"probablement indica una pérdua o format erroni del comando END DATA.  END "
+"DATA ha d'aparèixer per si mateix en una sola línia amb exactament un espai "
+"entre les paraules."
+
+#: src/language/data-io/data-reader.c:217
+#, c-format
+msgid "Error reading file %s: %s."
+msgstr "S'ha produït un error en llegir l'arxiu %s: %s."
+
+#: src/language/data-io/data-reader.c:220
+#, c-format
+msgid "Unexpected end of file reading %s."
+msgstr "Final inesperat en la lectura d'arxiu %s."
+
+#: src/language/data-io/data-reader.c:229
+#, c-format
+msgid "Unexpected end of file in partial record reading %s."
+msgstr "Fi d'arxiu inesperat en la lectura del registre parcial %s."
+
+#: src/language/data-io/data-reader.c:289
+#, c-format
+msgid "Corrupt block descriptor word at offset 0x%lx in %s."
+msgstr "Paraula descriptora de bloc malmesa en localització 0x%lx en %s."
+
+#: src/language/data-io/data-reader.c:290
+#, c-format
+msgid "Corrupt record descriptor word at offset 0x%lx in %s."
+msgstr "Paraula descriptora de registre malmesa en localització 0x%lx en %s."
+
+#: src/language/data-io/data-reader.c:303
+#, c-format
+msgid "Corrupt record size at offset 0x%lx in %s."
+msgstr "Longitud de registre malmesa en localització 0x%lx en %s."
+
+#: src/language/data-io/data-reader.c:445
+msgid "Record exceeds remaining block length."
+msgstr "El registre excedeix la longitud de blocs restants."
+
+#: src/language/data-io/data-reader.c:519
+#, c-format
+msgid "Attempt to read beyond end-of-file on file %s."
+msgstr "Intent llegir més enllà de la fi de l'arxiu a %s."
+
+#: src/language/data-io/data-reader.c:522
+msgid "Attempt to read beyond END DATA."
+msgstr "Intent de llegir més enllà de END DATA."
+
+#: src/language/data-io/data-reader.c:708
+msgid ""
+"This command is not valid here since the current input program does not "
+"access the inline file."
+msgstr ""
+"Aquesta ordre no es vàlida ja que el programa d'entrada actual no té accés a "
+"l'arxiu en línia."
+
+#: src/language/data-io/data-writer.c:74
+#, c-format
+msgid "An error occurred while opening \"%s\" for writing as a data file: %s."
+msgstr ""
+"S'ha produït un error en obrir \"%s\" per a escriure'l com un arxiu de "
+"dades: %s."
+
+#: src/language/data-io/data-writer.c:191
+#, c-format
+msgid "I/O error occurred writing data file \"%s\"."
+msgstr "I/O error en escriure les dades del fitxer \"%s\"."
+
+#: src/language/data-io/get-data.c:64
+#, c-format
+msgid "Unsupported TYPE %s"
+msgstr "TYPE %s no admès"
+
+#: src/language/data-io/get-data.c:260
+#, c-format
+msgid ""
+"%s is allowed only with %s arrangement, but %s arrangement was stated or "
+"implied earlier in this command."
+msgstr ""
+"%s només es permet amb configuració %s, però prèviament en aquest comando "
+"s'ha establit la configuració %s."
+
+#: src/language/data-io/get-data.c:315
+msgid "expecting FIXED or DELIMITED"
+msgstr "esperant FIXED o DELIMITED"
+
+#: src/language/data-io/get-data.c:328
+msgid "Value of FIRSTCASE must be 1 or greater."
+msgstr "Valor de FIRSTCASE ha de ser major o igual a 1."
+
+#: src/language/data-io/get-data.c:353
+msgid "expecting LINE or VARIABLES"
+msgstr "esperant LINE o VARIABLES"
+
+#: src/language/data-io/get-data.c:366
+msgid "Value of FIXCASE must be at least 1."
+msgstr "Valor de FIXCASE ha de ser com a mínim 1."
+
+#: src/language/data-io/get-data.c:386
+msgid "Value of FIRST must be at least 1."
+msgstr "Valor de FIRST ha de ser com a mínim 1."
+
+#: src/language/data-io/get-data.c:398
+msgid "Value of PERCENT must be between 1 and 100."
+msgstr "Valor de PERCENT ha de ser entre 1 i 100."
+
+#: src/language/data-io/get-data.c:447
+msgid ""
+"In compatible syntax mode, the QUALIFIER string must contain exactly one "
+"character."
+msgstr ""
+"En el mode de sintaxi compatible, la cadena QUALIFIER ha de contenir "
+"exactament un caràcter."
+
+#: src/language/data-io/get-data.c:462
+msgid "expecting VARIABLES"
+msgstr "esperant VARIABLES"
+
+#: src/language/data-io/get-data.c:484
+#: src/language/data-io/placement-parser.c:378
+#, 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 ""
+"El nombre de registre especificat, %ld, és a o abans del registre anterior, %"
+"d.  Els camps de dades han de ser llistats en ordre incremental del número "
+"de registre."
+
+#: src/language/data-io/get-data.c:493
+#, c-format
+msgid ""
+"The record number specified, %ld, exceeds the number of records per case "
+"specified on FIXCASE, %d."
+msgstr ""
+"El nombre de registre especificat , %ld, excedeix el nombre de registres per "
+"cas especificats a FIXCASE, %d."
+
+#: src/language/data-io/get.c:99
+msgid "expecting COMM or TAPE"
+msgstr "esperant COMM o TAPE"
+
+#: src/language/data-io/inpt-pgm.c:130
+msgid "Unexpected end-of-file within INPUT PROGRAM."
+msgstr "Final d'arxiu inesperat dins INPUT PROGRAM."
+
+#: src/language/data-io/inpt-pgm.c:143
+msgid "Input program did not create any variables."
+msgstr "El programa d'entrada no va crear cap variable."
+
+#: src/language/data-io/inpt-pgm.c:288
+msgid "COLUMN subcommand multiply specified."
+msgstr "subcomando COLUMN especificat múltiples vegades."
+
+#: src/language/data-io/inpt-pgm.c:338
+msgid ""
+"REREAD: Column numbers must be positive finite numbers.  Column set to 1."
+msgstr ""
+"REREAD: Els nombres de columna han de ser nombres positius finits. La "
+"columna s'estableix en 1."
+
+#: src/language/data-io/placement-parser.c:87
+#, c-format
+msgid ""
+"Number of variables specified (%zu) differs from number of variable formats "
+"(%zu)."
+msgstr ""
+"Nombre de variables especificades (%zu) difereix del nombre de formats de la "
+"variable (%zu)."
+
+#: src/language/data-io/placement-parser.c:97
+msgid ""
+"SPSS-like or Fortran-like format specification expected after variable names."
+msgstr ""
+"Després del nom de les variables s'esperen especificacions en format tipus-"
+"SPSS o tipus-Fortran."
+
+#: src/language/data-io/placement-parser.c:119
+#, c-format
+msgid "The %d columns %d-%d can't be evenly divided into %zu fields."
+msgstr ""
+"Les %d columnes %d-%d no poden ser uniformement dividides entre els camps %"
+"zu."
+
+#: src/language/data-io/placement-parser.c:305
+msgid "Column positions for fields must be positive."
+msgstr "Les posicions de columna pels camps han de ser positives."
+
+#: src/language/data-io/placement-parser.c:307
+msgid "Column positions for fields must not be negative."
+msgstr "Les posicions de columnes pels camps no poden ser negatives."
+
+#: src/language/data-io/placement-parser.c:344
+msgid "The ending column for a field must be greater than the starting column."
+msgstr "La columna final d'un camp ha de ser major que la columna d'inici."
+
+#: src/language/data-io/print-space.c:116
+msgid "The expression on PRINT SPACE evaluated to the system-missing value."
+msgstr "L'expressió a PRINT SPACE s'avalua pel sistema de valors perduts."
+
+#: src/language/data-io/print-space.c:119
+#, c-format
+msgid "The expression on PRINT SPACE evaluated to %g."
+msgstr "L'expressió a PRINT SPACE s'avalua a %g."
+
+#: src/language/data-io/print.c:179 src/language/data-io/trim.c:54
+msgid "expecting a valid subcommand"
+msgstr "esperant un subcomando vàlid"
+
+#: src/language/data-io/print.c:267
+#, c-format
+msgid "Output calls for %d records but %zu specified on RECORDS subcommand."
+msgstr ""
+"Resultats obtinguts per a %d registres, però %zu especificats al subcomando "
+"RECORDS."
+
+#: src/language/data-io/print.c:436
+#, fuzzy, c-format
+msgid "Writing %zu record to %s."
+msgid_plural "Writing %zu records to %s."
+msgstr[0] "Escribint %d registre a %s."
+msgstr[1] "Escribint %d registres a %s."
+
+#: src/language/data-io/print.c:440
+#, fuzzy, c-format
+msgid "Writing %zu record."
+msgid_plural "Writing %zu records."
+msgstr[0] "Escribint %d registre."
+msgstr[1] "Escrivint %d registres."
+
+#: src/language/data-io/save.c:223 src/language/data-io/save.c:238
+#: src/language/data-io/save.c:266
+#, c-format
+msgid "expecting %s or %s"
+msgstr "esperant %s o %s"
+
+#: src/language/data-io/trim.c:88
+#, c-format
+msgid ""
+"Cannot rename %s as %s because there already exists a variable named %s.  To "
+"rename variables with overlapping names, use a single RENAME subcommand such "
+"as \"/RENAME (A=B)(B=C)(C=A)\", or equivalently, \"/RENAME (A B C=B C A)\"."
+msgstr ""
+"No es pot canviar el nom %s per %s perquè ja hi ha una variable anomenada %"
+"s.  Per canviar el nom de les variables amb noms superposats, utilitzeu el "
+"subcomando RENAME només com a \"/RENAME (A=B)(B=C)(C=A)\", o equivalentment, "
+"\"/RENAME (A B C=B C A)\"."
+
+#: src/language/data-io/trim.c:114
+msgid "`=' expected after variable list."
+msgstr "`=' esperat després de llista de variables."
+
+#: src/language/data-io/trim.c:122
+#, c-format
+msgid ""
+"Number of variables on left side of `=' (%zu) does not match number of "
+"variables on right side (%zu), in parenthesized group %d of RENAME "
+"subcommand."
+msgstr ""
+"El nombre de variables en el costat esquerre de `=' (%zu) no coincideix amb "
+"el nombre de variables al costat dret (%zu), en el grup entre parèntesi %d "
+"del subcomando RENAME."
+
+#: src/language/data-io/trim.c:135
+#, c-format
+msgid "Requested renaming duplicates variable name %s."
+msgstr "El reanomenament demanat duplica el nom de la variable %s."
+
+#: src/language/data-io/trim.c:166
+msgid "Cannot DROP all variables from dictionary."
+msgstr "Impossible DROP totes les variables del diccionari."
+
+#: src/language/expressions/evaluate.c:155
+msgid "expecting number or string"
+msgstr "esperant nombre o cadena"
+
+#: src/language/expressions/evaluate.c:169
+#, c-format
+msgid "Duplicate variable name %s."
+msgstr "Nom de la variable %s duplicat."
+
+#: src/language/expressions/helpers.c:51
+msgid ""
+"One of the arguments to a DATE function is not an integer.  The result will "
+"be system-missing."
+msgstr ""
+"Un dels arguments per a funció DATE no és un enter. El resultat serà perdut "
+"del sistema."
+
+#: src/language/expressions/helpers.c:73
+msgid ""
+"The week argument to DATE.WKYR is not an integer.  The result will be system-"
+"missing."
+msgstr ""
+"L'argument de setmana per DATE.WKYR no és un enter. El resultat serà perdut "
+"pel sistema."
+
+#: src/language/expressions/helpers.c:79
+msgid ""
+"The week argument to DATE.WKYR is outside the acceptable range of 1 to 53.  "
+"The result will be system-missing."
+msgstr ""
+"L'argument de setmana per DATE.WKYR és fora de l'interval acceptable entre 1 "
+"i 53.  El resultat serà perdut pel sistema."
+
+#: src/language/expressions/helpers.c:101
+msgid ""
+"The day argument to DATE.YRDAY is not an integer.  The result will be system-"
+"missing."
+msgstr ""
+"L'argument de dia per DATE.YRDAY no és un enter.  El resultat serà perdut "
+"pel sistema."
+
+#: src/language/expressions/helpers.c:107
+msgid ""
+"The day argument to DATE.YRDAY is outside the acceptable range of 1 to 366.  "
+"The result will be system-missing."
+msgstr ""
+"L'argument de dia per DATE.YRDAY és fora de l'interval acceptable entre 1 i "
+"366. El resultat serà perdut al sistema."
+
+#: src/language/expressions/helpers.c:129
+msgid ""
+"The year argument to YRMODA is greater than 47516.  The result will be "
+"system-missing."
+msgstr ""
+"L'argument d'any per YRMODA és més gran que 47516. El resultat será  perdut "
+"al sistema."
+
+#: src/language/expressions/helpers.c:182
+#, c-format
+msgid ""
+"Unrecognized date unit \"%.*s\".  Valid date units are \"years\", \"quarters"
+"\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", and \"seconds\"."
+msgstr ""
+"Unitat de dates  \"%.*s\" no reconeguda. Les unitats de data vàlides són "
+"\"anys\", \"trimestres\", \"mesos\", \"setmanes\", \"dies\", \"hores\", "
+"\"minuts\", i \"segons\"."
+
+#: src/language/expressions/helpers.c:332
+msgid ""
+"Invalid DATESUM method.  Valid choices are \"closest\" and \"rollover\"."
+msgstr ""
+"Mètode DATESUM invàlid. Les opcions vàlides són \"propera\" i  \"acomplida\"."
+
+#: src/language/expressions/parse.c:259
+#, c-format
+msgid ""
+"Type mismatch: expression has %s type, but a numeric value is required here."
+msgstr ""
+"Incompatibilitat de tipus: l'expressió té tipus %s, però aquí es demana un "
+"valor numèric."
+
+#: src/language/expressions/parse.c:271
+#, c-format
+msgid ""
+"Type mismatch: expression has %s type, but a string value is required here."
+msgstr ""
+"Incompatibilitat de tipus: l'expressió té tipus %s, però aquí es demana un "
+"valor de cadena."
+
+#: src/language/expressions/parse.c:427
+#, c-format
+msgid "Type mismatch while applying %s operator: cannot convert %s to %s."
+msgstr ""
+"Incompatibilitat dels tipus mentre que s'aplica l'operador %s: no es pot "
+"convertir %s a %s."
+
+#: src/language/expressions/parse.c:643
+msgid ""
+"Chaining relational operators (e.g. \"a < b < c\") will not produce the "
+"mathematically expected result.  Use the AND logical operator to fix the "
+"problem (e.g. \"a < b AND b < c\").  If chaining is really intended, "
+"parentheses will disable this warning (e.g. \"(a < b) < c\".)"
+msgstr ""
+"L'encadenament d'operadors relacionals (p.e. \"a < b < c\") no produirà el "
+"resultat esperat matemàticament. Utilitzar l'operador lògic AND per "
+"solucionar el problema (p.e. \"a < b AND b < c\"). Si l'encadenament és "
+"realment intencionat, els parèntesis desactivaran aquesta alerta (p.e. \"(a "
+"< b) < c\".)"
+
+#: src/language/expressions/parse.c:744
+msgid ""
+"The exponentiation operator (\"**\") is left-associative, even though right-"
+"associative semantics are more useful.  That is, \"a**b**c\" equals \"(a**b)"
+"**c\", not as \"a**(b**c)\".  To disable this warning, insert parentheses."
+msgstr ""
+"L'operador d'exponenciació (\"**\") apareix a l'esquerra, tot i que si "
+"apareix a la dreta és més útil.  És a dir, \"a**b**c\" és igual a \"(a**b)**c"
+"\", no a \"a**(b**c)\". Per desactivar aquesta alerta, insereix parèntesis."
+
+#: src/language/expressions/parse.c:809
+#, c-format
+msgid "Unknown system variable %s."
+msgstr "Variable de sistema desconeguda %s."
+
+#: src/language/expressions/parse.c:857
+#, c-format
+msgid "Unknown identifier %s."
+msgstr "Identificador desconegut %s."
+
+#: src/language/expressions/parse.c:892
+msgid "in expression"
+msgstr "en l'expressió"
+
+#: src/language/expressions/parse.c:1073
+#, c-format
+msgid "%s must have at least %d arguments in list."
+msgstr "%s ha de tenir com a mínim %d arguments a la llista."
+
+#: src/language/expressions/parse.c:1082
+#, c-format
+msgid "%s must have even number of arguments in list."
+msgstr "%s han de tenir un nombre parell d'arguments a la llista."
+
+#: src/language/expressions/parse.c:1085
+#, c-format
+msgid "%s must have multiple of %d arguments in list."
+msgstr "%s ha de tenir un múltiple de %d arguments a la llista."
+
+#: src/language/expressions/parse.c:1095
+#, c-format
+msgid "%s function does not accept a minimum valid argument count."
+msgstr "la funció %s no accepta un mínim recompte d'arguments vàlids."
+
+#: src/language/expressions/parse.c:1104
+#, c-format
+msgid "%s requires at least %d valid arguments in list."
+msgstr "%s requereix com a mínim %d arguments vàlids en la llista."
+
+#: src/language/expressions/parse.c:1110
+#, c-format
+msgid ""
+"With %s, using minimum valid argument count of %d does not make sense when "
+"passing only %d arguments in list."
+msgstr ""
+"Amb %s, utilitzar el mínim recompte d'argument vàlid %d no té sentit quan es "
+"passen només %d arguments en la llista."
+
+#: src/language/expressions/parse.c:1164
+#, c-format
+msgid "Type mismatch invoking %s as "
+msgstr "Incompatibilitats de tipus invocant %s com a"
+
+#: src/language/expressions/parse.c:1169
+msgid "Function invocation "
+msgstr "Invocació de funció"
+
+#: src/language/expressions/parse.c:1171
+msgid " does not match any known function.  Candidates are:"
+msgstr "no coincideix amb cap funció coneguda. Els candidats són:"
+
+#: src/language/expressions/parse.c:1201
+#, c-format
+msgid "No function or vector named %s."
+msgstr "Cap funció o vector anomenat %s."
+
+#: src/language/expressions/parse.c:1244
+#, c-format
+msgid "expecting `,' or `)' invoking %s function"
+msgstr "esperant `,' o `)' invocant la funció %s"
+
+#: src/language/expressions/parse.c:1264
+#, c-format
+msgid "%s is a PSPP extension."
+msgstr "%s és una extensió de PSPP."
+
+#: src/language/expressions/parse.c:1273
+#, c-format
+msgid "%s may not appear after TEMPORARY."
+msgstr "%s no pot aparèixer desprès de TEMPORARY."
+
+#: src/libpspp/hash.c:545
+#, c-format
+msgid "hash table:"
+msgstr "taula hash:"
+
+#: src/libpspp/message.c:128
+msgid "error"
+msgstr "error"
+
+#: src/libpspp/message.c:131
+msgid "warning"
+msgstr "avís"
+
+#: src/libpspp/message.c:135
+#, fuzzy
+msgid "note"
+msgstr "Centre"
+
+#: src/libpspp/tmpfile.c:56
+msgid "failed to create temporary file"
+msgstr "error en crear l'arxiu temporal"
+
+#: src/libpspp/tmpfile.c:97
+msgid "seeking in temporary file"
+msgstr "cercant en l'arxiu temporal"
+
+#: src/libpspp/tmpfile.c:116
+msgid "reading temporary file"
+msgstr "llegint arxiu temporal"
+
+#: src/libpspp/tmpfile.c:118
+msgid "unexpected end of file reading temporary file"
+msgstr "final de fitxer inesperat en llegir l'arxiu temporal"
+
+#: src/libpspp/tmpfile.c:137
+msgid "writing to temporary file"
+msgstr "escrivint a un arxiu temporal"
+
+#: src/libpspp/zip-writer.c:91
+#, fuzzy, c-format
+msgid "%s: error opening output file"
+msgstr "ascii: obrint l'arxiu de resultats \"%s\""
+
+#: src/libpspp/zip-writer.c:224
+#, fuzzy, c-format
+msgid "%s: write failed"
+msgstr "%s: No és un arxiu portàtil."
+
+#: src/math/percentiles.c:36
+msgid "HAverage"
+msgstr "HAverage"
+
+#: src/math/percentiles.c:37
+msgid "Weighted Average"
+msgstr "Mitjana Ponderada"
+
+#: src/math/percentiles.c:38
+msgid "Rounded"
+msgstr "Arrodonit"
+
+#: src/math/percentiles.c:39
+msgid "Empirical"
+msgstr "Empíric"
+
+#: src/math/percentiles.c:40
+msgid "Empirical with averaging"
+msgstr "Empíric amb mitjanes"
+
+#: src/output/ascii.c:278
+#, c-format
+msgid "%s: %s must be positive integer or `auto'"
+msgstr ""
+
+#: src/output/ascii.c:311
+#, fuzzy, c-format
+msgid ""
+"ascii: page excluding margins and headers must be at least %d characters "
+"wide by %d lines long, but as configured is only %d characters by %d lines"
+msgstr ""
+"ascii: la pàgina excloent els marges i encapçalaments ha de ser com a mínim "
+"de 59 caràcters d'ample per 15 línies de llarg, però tal com està "
+"configurada la pàgina només hi ha %d caràcters i %d línies"
+
+#: src/output/ascii.c:360
+#, c-format
+msgid "ascii: closing output file \"%s\""
+msgstr "ascii: tancant l'arxiu de sortida \"%s\""
+
+#: src/output/ascii.c:503
+#, c-format
+msgid "See %s for a chart."
+msgstr ""
+
+#: src/output/ascii.c:806
+#, c-format
+msgid "ascii: opening output file \"%s\""
+msgstr "ascii: obrint l'arxiu de resultats \"%s\""
+
+#: src/output/ascii.c:913 src/output/cairo.c:784
+#, c-format
+msgid "%s - Page %d"
+msgstr "%s - Pàgina %d"
+
+#: src/output/csv.c:87 src/output/html.c:106 src/output/journal.c:93
+#: src/output/msglog.c:66
+#, fuzzy, c-format
+msgid "error opening output file \"%s\""
+msgstr "ascii: obrint l'arxiu de resultats \"%s\""
+
+#: src/output/driver.c:330
+#, c-format
+msgid ""
+"%s is not a valid device type (the choices are \"terminal\" and \"listing\")"
+msgstr ""
+
+#: src/output/driver.c:343
+#, fuzzy, c-format
+msgid "%s: unknown option \"%s\""
+msgstr "ascii: paràmetre desconegut `%s'"
+
+#: src/output/html.c:114
+msgid "PSPP Output"
+msgstr "Resultat de PSPP"
+
+#: src/output/journal.c:67
+#, fuzzy, c-format
+msgid "error writing output file \"%s\""
+msgstr "error en escriure \"%s\""
+
+#: src/output/measure.c:65
+#, c-format
+msgid "`%s' is not a valid length."
+msgstr "`%s' no és una longitud vàlida."
+
+#: src/output/measure.c:93
+#, c-format
+msgid "syntax error in paper size `%s'"
+msgstr "error de sintaxi en la mida de paper `%s'"
+
+#: src/output/measure.c:230
+#, c-format
+msgid "unknown paper type `%.*s'"
+msgstr "tipus de paper desconegut `%.*s'"
+
+#: src/output/measure.c:248
+#, fuzzy, c-format
+msgid "error opening input file \"%s\""
+msgstr "error en obrir \"%s\""
+
+#: src/output/measure.c:259
+#, fuzzy, c-format
+msgid "error reading file \"%s\""
+msgstr "error de lectura \"%s\""
+
+#: src/output/measure.c:276
+#, c-format
+msgid "paper size file \"%s\" does not state a paper size"
+msgstr "l'arxiu de mida de paper \"%s\" no indica una mida de paper"
+
+#: src/output/options.c:113
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but a Boolean value is required"
+msgstr ""
+
+#: src/output/options.c:188
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but one of the following is required: %s"
+msgstr ""
+
+#: src/output/options.c:232
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but a nonnegative integer is required"
+msgstr ""
+
+#: src/output/options.c:236
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but a positive integer is required"
+msgstr ""
+
+#: src/output/options.c:239
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but an integer is required"
+msgstr ""
+
+#: src/output/options.c:242
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but an integer greater than %d is required"
+msgstr ""
+
+#: src/output/options.c:247
+#, c-format
+msgid "%s: \"%s\" is \"%s\"  but an integer between %d and %d is required"
+msgstr ""
+
+#: src/output/options.c:326
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but a file name that contains \"#\" is required."
+msgstr ""
+
+#: src/output/tab.c:206
+#, c-format
+msgid "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
+msgstr "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) a taula de mida (%d,%d)\n"
+
+#: src/output/tab.c:244
+#, fuzzy, c-format
+msgid "bad hline: x=(%d+%d=%d,%d+%d=%d) y=%d+%d=%d in table size (%d,%d)\n"
+msgstr "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) a taula de mida (%d,%d)\n"
+
+#: src/output/tab.c:288
+#, c-format
+msgid ""
+"bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
+msgstr ""
+"bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) en taula amb mida (%d,%d)\n"
+
+#: src/output/cairo.c:295
+#, fuzzy, c-format
+msgid "error opening output file \"%s\": %s"
+msgstr "ascii: obrint l'arxiu de resultats \"%s\""
+
+#: src/output/cairo.c:312
+#, fuzzy, c-format
+msgid ""
+"The defined page is not wide enough to hold at least %d characters in the "
+"default font.  In fact, there's only room for %d characters."
+msgstr ""
+"La pàgina PostScript definida no és prou extensa com per contenir marges i "
+"capçaleres, a més d'almenys 15 línies amb les fonts per defecte. De fet, "
+"només hi ha espai per %d línies de cada font en la mida per defecte de %d.%"
+"03d punts."
+
+#: src/output/cairo.c:322
+#, fuzzy, c-format
+msgid ""
+"The defined page is not long enough to hold margins and headers, plus least %"
+"d lines of the default fonts.  In fact, there's only room for %d lines."
+msgstr ""
+"La pàgina PostScript definida no és prou extensa com per contenir marges i "
+"capçaleres, a més d'almenys 15 línies amb les fonts per defecte. De fet, "
+"només hi ha espai per %d línies de cada font en la mida per defecte de %d.%"
+"03d punts."
+
+#: src/output/cairo.c:376
+#, fuzzy, c-format
+msgid "error drawing output for %s driver: %s"
+msgstr "error de sintaxi analitzant opcions pel controlador \"%s\""
+
+#: src/output/cairo.c:864
+#, c-format
+msgid "\"%s\": bad font specification"
+msgstr "\"%s\": especificació de caràcter no vàlida"
+
+#: src/output/cairo.c:1084
+#, fuzzy, c-format
+msgid "error writing output file \"%s\": %s"
+msgstr "Error en tancar l'arxiu portàtil \"%s\": %s."
+
+#: src/output/charts/np-plot-cairo.c:37
+#, c-format
+msgid "Normal Q-Q Plot of %s"
+msgstr "Gràfica Normal Q-Q de %s"
+
+#: src/output/charts/np-plot-cairo.c:38 src/output/charts/np-plot-cairo.c:66
+msgid "Observed Value"
+msgstr "Valor observat"
+
+#: src/output/charts/np-plot-cairo.c:39
+msgid "Expected Normal"
+msgstr "Normal esperada"
+
+#: src/output/charts/np-plot-cairo.c:64
+#, c-format
+msgid "Detrended Normal Q-Q Plot of %s"
+msgstr "Gràfica Normal Detrended Q-Q de %s"
+
+#: src/output/charts/np-plot-cairo.c:67
+msgid "Dev from Normal"
+msgstr "Desviació de la Normal"
+
+#: src/output/charts/plot-hist-cairo.c:110
+msgid "HISTOGRAM"
+msgstr "HISTOGRAM"
+
+#: src/output/charts/plot-hist-cairo.c:112
+#: src/language/stats/frequencies.q:814
+msgid "Frequency"
+msgstr "Freqüència"
+
+#: src/output/charts/roc-chart-cairo.c:36 src/ui/gui/roc.ui:7
+msgid "ROC Curve"
+msgstr "Corba ROC"
+
+#: src/output/charts/scree-cairo.c:36
+msgid "Scree Plot"
+msgstr ""
+
+#: src/output/charts/scree-cairo.c:38
+msgid "Eigenvalue"
+msgstr ""
+
+#: src/output/odt.c:93
+#, fuzzy
+msgid "error creating temporary file"
+msgstr "llegint arxiu temporal"
+
+#: src/ui/source-init-opts.c:78
+msgid "Algorithm must be either \"compatible\" or \"enhanced\"."
+msgstr "Algorisme ha de ser o \"compatible\" o \"ampliat\"."
+
+#: src/ui/source-init-opts.c:103
+msgid "Syntax must be either \"compatible\" or \"enhanced\"."
+msgstr "La sintaxi ha de ser o \"compatible\" o \"ampliada\"."
+
+#: src/ui/terminal/main.c:128
+msgid ""
+"Stopping syntax file processing here to avoid a cascade of dependent command "
+"failures."
+msgstr ""
+"Aturant el processament de l'arxiu de sintaxi aquí per evitar una cascada "
+"d'errors derivats."
+
+#: src/ui/terminal/msg-ui.c:127
+#, c-format
+msgid "Notes (%d) exceed limit (%d).  Suppressing further notes."
+msgstr ""
+
+#: src/ui/terminal/msg-ui.c:135
+#, c-format
+msgid "Warnings (%d) exceed limit (%d)."
+msgstr "Avisos (%d) excedeixen el límit (%d)."
+
+#: src/ui/terminal/msg-ui.c:138
+#, fuzzy, c-format
+msgid "Errors (%d) exceed limit (%d)."
+msgstr "Errors (%d) excedeixen el límit (%d)."
+
+#: src/ui/terminal/terminal.c:72
+#, c-format
+msgid "could not access definition for terminal `%s'"
+msgstr "no es pot accedir a la definició per a terminal `%s'"
+
+#: src/ui/terminal/terminal-opts.c:119
+#, c-format
+msgid "%s: output option missing `='"
+msgstr ""
+
+#: src/ui/terminal/terminal-opts.c:126
+#, c-format
+msgid "%s: output option specified more than once"
+msgstr ""
+
+#: src/ui/gui/checkbox-treeview.c:92 src/language/stats/crosstabs.q:1213
+#: src/language/stats/crosstabs.q:1240 src/language/stats/crosstabs.q:1263
+#: src/language/stats/crosstabs.q:1287 src/language/stats/examine.q:1638
+msgid "Statistic"
+msgstr "Estatístic"
+
+#: src/ui/gui/comments-dialog.c:58
+#, c-format
+msgid "Column Number: %d"
+msgstr "Número de columna: %d"
+
+#: src/ui/gui/crosstabs-dialog.c:41
+msgid "Chisq"
+msgstr "Chisq"
+
+#: src/ui/gui/crosstabs-dialog.c:42 src/language/stats/crosstabs.q:1774
+msgid "Phi"
+msgstr "Phi"
+
+#: src/ui/gui/crosstabs-dialog.c:43
+msgid "CC"
+msgstr "CC"
+
+#: src/ui/gui/crosstabs-dialog.c:44 src/language/stats/crosstabs.q:1912
+msgid "Lambda"
+msgstr "Lambda"
+
+#: src/ui/gui/crosstabs-dialog.c:45
+msgid "UC"
+msgstr "UC"
+
+#: src/ui/gui/crosstabs-dialog.c:46
+msgid "BTau"
+msgstr "BTau"
+
+#: src/ui/gui/crosstabs-dialog.c:47
+msgid "CTau"
+msgstr "CTau"
+
+#: src/ui/gui/crosstabs-dialog.c:48
+msgid "Risk"
+msgstr "Risc"
+
+#: src/ui/gui/crosstabs-dialog.c:49 src/language/stats/crosstabs.q:1779
+msgid "Gamma"
+msgstr "Gamma"
+
+#: src/ui/gui/crosstabs-dialog.c:50
+msgid "D"
+msgstr "D"
+
+#: src/ui/gui/crosstabs-dialog.c:51 src/language/stats/crosstabs.q:1782
+msgid "Kappa"
+msgstr "Kappa"
+
+#: src/ui/gui/crosstabs-dialog.c:52 src/language/stats/crosstabs.q:1916
+msgid "Eta"
+msgstr "Eta"
+
+#: src/ui/gui/crosstabs-dialog.c:53
+msgid "Corr"
+msgstr "Corr."
+
+#: src/ui/gui/crosstabs-dialog.c:54 src/ui/gui/crosstabs-dialog.c:65
+#: src/ui/gui/crosstabs-dialog.c:100 src/ui/gui/crosstabs-dialog.c:108
+#: src/ui/gui/psppire-var-store.c:612 src/ui/gui/var-display.c:16
+#: src/ui/gui/variable-info-dialog.c:41
+msgid "None"
+msgstr "Cap"
+
+#: src/ui/gui/crosstabs-dialog.c:57
+msgid "Count"
+msgstr "Recompte"
+
+#: src/ui/gui/crosstabs-dialog.c:58
+msgid "Row"
+msgstr "Fila"
+
+#: src/ui/gui/crosstabs-dialog.c:59
+msgid "Column"
+msgstr "Columna"
+
+#: src/ui/gui/crosstabs-dialog.c:61
+msgid "Expected"
+msgstr "Esperat"
+
+#: src/ui/gui/crosstabs-dialog.c:63
+msgid "Std. Residual"
+msgstr "Residu Tipificat"
+
+#: src/ui/gui/crosstabs-dialog.c:64
+msgid "Adjusted Std. Residual"
+msgstr "Residu Tipificat Ajustat"
+
+#: src/ui/gui/descriptives-dialog.c:41 src/ui/gui/frequencies-dialog.c:42
+msgid "Standard deviation"
+msgstr "Desviació Estàndard"
+
+#: src/ui/gui/descriptives-dialog.c:46
+msgid "Standard error"
+msgstr "Error Estàndard"
+
+#: src/ui/gui/find-dialog.c:649
+#, c-format
+msgid "Bad regular expression: %s"
+msgstr "Expressió regular incorrecta: %s"
+
+#: src/ui/gui/factor-dialog.c:344
+#, c-format
+msgid "Eigenvalues over %4.2f times the mean eigenvalue"
+msgstr ""
+
+#: src/ui/gui/frequencies-dialog.c:45
+msgid "Standard error of the mean"
+msgstr "Error estàndard en la mitjana"
+
+#: src/ui/gui/frequencies-dialog.c:48
+msgid "Standard error of the skewness"
+msgstr "Error estàndard de l'asimetria"
+
+#: src/ui/gui/frequencies-dialog.c:50 src/language/stats/frequencies.q:108
+msgid "Mode"
+msgstr "Mode"
+
+#: src/ui/gui/frequencies-dialog.c:52
+msgid "Standard error of the kurtosis"
+msgstr "Error estàndard en la curtosi"
+
+#: src/ui/gui/frequencies-dialog.c:53 src/language/stats/examine.q:1469
+#: src/language/stats/frequencies.q:107
+msgid "Median"
+msgstr "Mediana"
+
+#: src/ui/gui/helper.c:197
+msgid "Sorry. The help system hasn't yet been implemented."
+msgstr "Disculpeu. El sistema d'ajuda encara no ha estat implementat."
+
+#: src/ui/gui/help-menu.c:67
+msgid "A program for the analysis of sampled data"
+msgstr "Un programa per a l'anàlisi de dades de mostreig"
+
+#. TRANSLATORS: Use this string to list the people who have helped with
+#. translation to your language.
+#: src/ui/gui/help-menu.c:77
+msgid "translator-credits"
+msgstr "F.J. Miguel, J. Gómez, P. Payà"
+
+#: src/ui/gui/help-menu.c:98
+#, c-format
+msgid ""
+"Cannot open reference manual: %s.  The PSPP user manual is also available at "
+"http://www.gnu.org/software/pspp/documentation.html"
+msgstr ""
+
+#: src/ui/gui/help-menu.c:117
+msgid "_Help"
+msgstr "Ajut"
+
+#: src/ui/gui/help-menu.c:124
+msgid "_Reference Manual"
+msgstr "Manual de _Referencia"
+
+#: src/ui/gui/missing-val-dialog.c:113 src/ui/gui/missing-val-dialog.c:167
+msgid "Incorrect value for variable type"
+msgstr "Valor incorrecte pel tipus de variable"
+
+#: src/ui/gui/missing-val-dialog.c:134 src/ui/gui/missing-val-dialog.c:143
+msgid "Incorrect range specification"
+msgstr "Especificació d'interval incorrecte"
+
+#: src/ui/gui/oneway-anova-dialog.c:313
+#, c-format
+msgid "Contrast %d of %d"
+msgstr "Contrast %d de %d"
+
+#: src/ui/gui/psppire.c:224
+msgid "_Reset"
+msgstr "_Reiniciar"
+
+#: src/ui/gui/psppire.c:225
+msgid "_Select"
+msgstr "_Selecionar"
+
+#: src/ui/gui/psppire-data-editor.c:951
+msgid "Data View"
+msgstr "Vista de dades"
+
+#: src/ui/gui/psppire-data-editor.c:954
+msgid "Variable View"
+msgstr "Vista de Variables"
+
+#: src/ui/gui/psppire-data-store.c:744
+msgid "var"
+msgstr "var"
+
+#: src/ui/gui/psppire-data-window.c:212
+msgid "Transformations Pending"
+msgstr "Transformacions pendents"
+
+#: src/ui/gui/psppire-data-window.c:228
+msgid "Filter off"
+msgstr "Filtre desactivat"
+
+#: src/ui/gui/psppire-data-window.c:242
+#, c-format
+msgid "Filter by %s"
+msgstr "Filtrat per %s"
+
+#: src/ui/gui/psppire-data-window.c:263
+msgid "No Split"
+msgstr "No dividit"
+
+#: src/ui/gui/psppire-data-window.c:272
+msgid "Split by "
+msgstr "Dividit per "
+
+#: src/ui/gui/psppire-data-window.c:300
+msgid "Weights off"
+msgstr "Sense Ponderar:"
+
+#: src/ui/gui/psppire-data-window.c:314
+#, c-format
+msgid "Weight by %s"
+msgstr "Ponderat per %s"
+
+#: src/ui/gui/psppire-data-window.c:382
+msgid "Open"
+msgstr "Obert"
+
+#: src/ui/gui/psppire-data-window.c:392
+#, fuzzy
+msgid "Data and Syntax Files"
+msgstr "No es pot obrir l'arxiu de sintaxi \"%s\""
+
+#: src/ui/gui/psppire-data-window.c:402 src/ui/gui/psppire-data-window.c:611
+msgid "System Files (*.sav)"
+msgstr "Arxius de Sistema (*.sav)"
+
+#: src/ui/gui/psppire-data-window.c:408 src/ui/gui/psppire-data-window.c:617
+msgid "Portable Files (*.por) "
+msgstr "Arxius Portables (*.por)"
+
+#: src/ui/gui/psppire-data-window.c:414 src/ui/gui/psppire-syntax-window.c:292
+msgid "Syntax Files (*.sps) "
+msgstr "Arxius de Sintàxi (*.sps) "
+
+#: src/ui/gui/psppire-data-window.c:420 src/ui/gui/psppire-data-window.c:623
+#: src/ui/gui/psppire-syntax-window.c:298
+msgid "All Files"
+msgstr "Tots els arxius"
+
+#: src/ui/gui/psppire-data-window.c:603
+msgid "Save"
+msgstr "Desar"
+
+#: src/ui/gui/psppire-data-window.c:636
+msgid "Portable File"
+msgstr "Arxiu Portable"
+
+#: src/ui/gui/psppire-data-window.c:773
+msgid "Font Selection"
+msgstr "Selecció de font"
+
+#: src/ui/gui/psppire-data-window.c:1261
+msgid "Data Editor"
+msgstr "Editor de Dades"
+
+#: src/ui/gui/psppire-output-window.c:458
+msgid "Export Output"
+msgstr ""
+
+#: src/ui/gui/psppire-output-window.c:466
+#, fuzzy
+msgid "PDF Files (*.pdf)"
+msgstr "Arxius Portables (*.por)"
+
+#: src/ui/gui/psppire-output-window.c:467
+msgid "HTML Files (*.html)"
+msgstr ""
+
+#: src/ui/gui/psppire-output-window.c:468
+msgid "OpenDocument Files (*.odt)"
+msgstr ""
+
+#: src/ui/gui/psppire-output-window.c:469
+#, fuzzy
+msgid "Text Files (*.txt)"
+msgstr "Arxius de Sistema (*.sav)"
+
+#: src/ui/gui/psppire-output-window.c:470
+#, fuzzy
+msgid "PostScript Files (*.ps)"
+msgstr "Arxius Portables (*.por)"
+
+#: src/ui/gui/psppire-output-window.c:471
+msgid "Comma-Separated Value Files (*.csv)"
+msgstr ""
+
+#: src/ui/gui/psppire-output-window.c:605
+msgid "Output Viewer"
+msgstr "Vista de resultats"
+
+#: src/ui/gui/psppire-syntax-window.c:265
+#, c-format
+msgid "Saved file \"%s\""
+msgstr "Desat com a arxiu \"%s\""
+
+#: src/ui/gui/psppire-syntax-window.c:284
+msgid "Save Syntax"
+msgstr "Desar sintaxi"
+
+#: src/ui/gui/psppire-syntax-window.c:496
+msgid "Syntax Editor"
+msgstr "Editor de sintaxi"
+
+#: src/ui/gui/psppire-syntax-window.c:510
+#, c-format
+msgid "Cannot load syntax file '%s'"
+msgstr "No es pot obrir l'arxiu de sintaxi \"%s\""
+
+#: src/ui/gui/psppire-var-sheet.c:535 src/ui/gui/psppire-var-store.c:833
+#: src/language/stats/crosstabs.q:1288 src/ui/gui/psppire.ui:2055
+msgid "Type"
+msgstr "Tipus:"
+
+#: src/ui/gui/psppire-var-sheet.c:536 src/ui/gui/psppire-var-store.c:834
+#: src/ui/gui/psppire.ui:1974
+msgid "Width"
+msgstr "Ample"
+
+#: src/ui/gui/psppire-var-sheet.c:537 src/ui/gui/psppire-var-store.c:835
+msgid "Decimals"
+msgstr "Decimals"
+
+#: src/ui/gui/psppire-var-sheet.c:539 src/ui/gui/psppire-var-store.c:837
+msgid "Values"
+msgstr "Valores"
+
+#: src/ui/gui/psppire-var-sheet.c:540 src/ui/gui/psppire-var-store.c:838
+#: src/language/stats/crosstabs.q:822 src/language/stats/examine.q:1104
+#: src/language/stats/frequencies.q:864 src/language/stats/frequencies.q:1036
+msgid "Missing"
+msgstr "Perduts"
+
+#: src/ui/gui/psppire-var-sheet.c:542 src/ui/gui/psppire-var-store.c:840
+msgid "Align"
+msgstr "Aliniament"
+
+#: src/ui/gui/psppire-var-sheet.c:543 src/ui/gui/psppire-var-store.c:841
+msgid "Measure"
+msgstr "Mesura"
+
+#: src/ui/gui/psppire-var-store.c:622 src/ui/gui/var-sheet-dialogs.ui:43
+msgid "Comma"
+msgstr "Coma"
+
+#: src/ui/gui/psppire-var-store.c:623 src/ui/gui/var-sheet-dialogs.ui:59
+msgid "Dot"
+msgstr "Punt"
+
+#: src/ui/gui/psppire-var-store.c:624
+msgid "Scientific"
+msgstr "Científic"
+
+#: src/ui/gui/psppire-var-store.c:625 src/ui/gui/var-sheet-dialogs.ui:91
+msgid "Date"
+msgstr "Data"
+
+#: src/ui/gui/psppire-var-store.c:626 src/ui/gui/var-sheet-dialogs.ui:107
+msgid "Dollar"
+msgstr "Dolar"
+
+#: src/ui/gui/psppire-var-store.c:627
+msgid "Custom"
+msgstr "Usuari"
+
+#: src/ui/gui/psppire-window.c:97
+#, c-format
+msgid "%s %s PSPPIRE %s"
+msgstr "%s %s PSPPIRE %s"
+
+#: src/ui/gui/psppire-window.c:468
+#, c-format
+msgid "Save the changes to \"%s\" before closing?"
+msgstr "Desa el canvis a \"%s\" abans de sortir?"
+
+#: src/ui/gui/psppire-window.c:475
+#, c-format
+msgid ""
+"If you don't save, changes from the last %ld seconds will be permanently "
+"lost."
+msgstr ""
+"Si no es desa, els canvis dels darrers %ld segons es perdran permanentment."
+
+#: src/ui/gui/psppire-window.c:479
+msgid "Close _without saving"
+msgstr "Tancar sense desar"
+
+#: src/ui/gui/recode-dialog.c:911
+msgid "Recode into Different Variables"
+msgstr "Recodifica en variables Diferents"
+
+#: src/ui/gui/recode-dialog.c:914 src/ui/gui/recode.ui:692
+msgid "Recode into Same Variables"
+msgstr "Recodifica en les Mateixes variables"
+
+#: src/ui/gui/recode-dialog.c:929 src/ui/gui/recode-dialog.c:1025
+msgid "New"
+msgstr "Nou"
+
+#: src/ui/gui/recode-dialog.c:944 src/ui/gui/recode-dialog.c:1017
+msgid "Old"
+msgstr "Antic"
+
+#: src/ui/gui/recode-dialog.c:1274
+msgid "Recode into Different Variables: Old and New Values "
+msgstr "Recodifica en variables Diferents: Antcs y Nous valors "
+
+#: src/ui/gui/recode-dialog.c:1275
+msgid "Recode into Same Variables: Old and New Values"
+msgstr "Recodifica en les mateixes variables: Antics y Nous valors"
+
+#: src/ui/gui/regression-dialog.c:42
+msgid "Coeff"
+msgstr "Coef."
+
+#: src/ui/gui/regression-dialog.c:43 src/language/stats/regression.q:155
+msgid "R"
+msgstr "R"
+
+#: src/ui/gui/regression-dialog.c:44
+msgid "Anova"
+msgstr "Anova"
+
+#: src/ui/gui/regression-dialog.c:45
+msgid "Bcov"
+msgstr "Bcov"
+
+#: src/ui/gui/select-cases-dialog.c:82
+#, c-format
+msgid "Approximately %3d%% of all cases."
+msgstr "Aproximadament %3d%% de tots els casos."
+
+#: src/ui/gui/select-cases-dialog.c:83
+#, c-format
+msgid "Exactly %3d cases from the first %3d cases."
+msgstr "Exactament %3d casos dels primers  %3d casos."
+
+#: src/ui/gui/select-cases-dialog.c:223
+#, c-format
+msgid "%d thru %d"
+msgstr "%d fisn a %d"
+
+#: src/ui/gui/text-data-import-dialog.c:461
+#, c-format
+msgid "Could not open \"%s\": %s"
+msgstr "No es pot obrir \"%s\": %s"
+
+#: src/ui/gui/text-data-import-dialog.c:477
+#, c-format
+msgid "Error reading \"%s\": %s"
+msgstr "Error leyendo \"%s\": %s"
+
+#: src/ui/gui/text-data-import-dialog.c:480
+#, c-format
+msgid ""
+"Failed to read \"%s\", because it contains a line over %d bytes long and "
+"therefore appears not to be a text file."
+msgstr ""
+"Error en llegir \"%s\", perquè conté una linia per sobre dels %d bytes i per "
+"tant sembla que no es un arxiu de text."
+
+#: src/ui/gui/text-data-import-dialog.c:494
+#, c-format
+msgid "\"%s\" is empty."
+msgstr "\"%s\" és buit."
+
+#: src/ui/gui/text-data-import-dialog.c:539
+msgid "Import Delimited Text Data"
+msgstr "Importar dades de text delimitat"
+
+#: src/ui/gui/text-data-import-dialog.c:590
+msgid "Importing Delimited Text Data"
+msgstr "Important dades de text deliminatat"
+
+#: src/ui/gui/text-data-import-dialog.c:749
+msgid ""
+"This assistant will guide you through the process of importing data into "
+"PSPP from a text file with one line per case,  in which fields are separated "
+"by tabs, commas, or other delimiters.\n"
+"\n"
+msgstr ""
+"Aquest asistent t'acompanyarà per tot el procés d'importar dades cap al PSPP "
+"a partir d'un arxiu de text amb una linia per cas,  al qual els camps estan "
+"separats per tabuladors, comes, o altres delimitadors.\n"
+"\n"
+
+#: src/ui/gui/text-data-import-dialog.c:755
+#, c-format
+msgid "The selected file contains %zu line of text.  "
+msgid_plural "The selected file contains %zu lines of text.  "
+msgstr[0] "L'arxiu seleccionat conté %zu linies de text.  "
+msgstr[1] "L'arxiu seleccionat conté %zu linies de text.  "
+
+#: src/ui/gui/text-data-import-dialog.c:763
+#, c-format
+msgid "The selected file contains approximately %lu line of text.  "
+msgid_plural "The selected file contains approximately %lu lines of text.  "
+msgstr[0] "L'arxiu seleccionat conté aproximadament %lu linia de text.  "
+msgstr[1] "L'arxiu seleccionat conté aproximadament %lu linies de text.  "
+
+#: src/ui/gui/text-data-import-dialog.c:769
+#, c-format
+msgid ""
+"Only the first %zu line of the file will be shown for preview purposes in "
+"the following screens.  "
+msgid_plural ""
+"Only the first %zu lines of the file will be shown for preview purposes in "
+"the following screens.  "
+msgstr[0] ""
+"Només les primeres %zu linies de l'arxiu es previsualitzaran a les seguents "
+"pantalles.  "
+msgstr[1] ""
+"Només les primeres %zu linies de l'arxiu es previsualitzaran a les seguents "
+"pantalles.  "
+
+#: src/ui/gui/text-data-import-dialog.c:776
+msgid "You may choose below how much of the file should actually be imported."
+msgstr "Pots triar a continuació quina part de l'arxiu ha de ser importat."
+
+#: src/ui/gui/text-data-import-dialog.c:1523
+#: src/ui/gui/text-data-import-dialog.c:1768
+msgid "This input line has too few separators to fill in this field."
+msgstr "Aquesta linia d'entrada no en te prou separadors per emplenar el camp"
+
+#: src/ui/gui/text-data-import-dialog.c:1759
+#, c-format
+msgid "Field content \"%.*s\" cannot be parsed in format %s."
+msgstr "El contingut del camp \"%.*s\" no pot ser analitzat en format %s."
+
+#: src/ui/gui/t-test-options.c:60
+#, c-format
+msgid "Confidence Interval: %2d %%"
+msgstr "Interval de Confiança: %2d %%"
+
+#: src/ui/gui/variable-info-dialog.c:77
+#, c-format
+msgid "Label: %s\n"
+msgstr "Etiqueta: %s\n"
+
+#: src/ui/gui/variable-info-dialog.c:84
+#, c-format
+msgid "Type: %s\n"
+msgstr "Tipus: %s\n"
+
+#: src/ui/gui/variable-info-dialog.c:88
+#, c-format
+msgid "Missing Values: %s\n"
+msgstr "Valors perduts: %s\n"
+
+#: src/ui/gui/variable-info-dialog.c:93
+#, c-format
+msgid "Measurement Level: %s\n"
+msgstr "Nivel de Mesura: %s\n"
+
+#: src/ui/gui/variable-info-dialog.c:106
+msgid "Value Labels:\n"
+msgstr "Etiqueteas de valor:\n"
+
+#: src/ui/gui/variable-info-dialog.c:116
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: src/ui/gui/weight-cases-dialog.c:81 src/ui/gui/psppire.ui:52
+#: src/ui/gui/psppire.ui:155
+msgid "Do not weight cases"
+msgstr "No ponderar casos."
+
+#: src/ui/gui/weight-cases-dialog.c:87
+#, c-format
+msgid "Weight cases by %s"
+msgstr "Pondera casos per %s"
+
+#: tests/dissect-sysfile.c:571
+#, c-format
+msgid "Unrecognized record type 7, subtype %d."
+msgstr "Tipus de registre 7 no reconegut, subtipe %d."
+
+#: tests/dissect-sysfile.c:850
+#, c-format
+msgid "%s: Error parsing attribute value %s[%d]"
+msgstr "%s: Error en analitzar valor de l'atribut %s[%d]"
+
+#: tests/dissect-sysfile.c:856
+#, c-format
+msgid "%s: Attribute value %s[%d] is not quoted: %s"
+msgstr "%s: El valor de l'atribut %s[%d] no esta entre cometes: %s"
+
+#: tests/dissect-sysfile.c:880
+#, fuzzy, c-format
+msgid "Bad size %zu for extended number of cases."
+msgstr "Longitud no vàlid %zu en l'extensió 11."
+
+#: tests/dissect-sysfile.c:886
+#, c-format
+msgid "Bad count %zu for extended number of cases."
+msgstr ""
+
+#: src/language/utilities/set.q:188
+msgid "WORKSPACE must be at least 1MB"
+msgstr "WORKSPACE ha de ser com a mínim 1 Mb"
+
+#: src/language/utilities/set.q:194 src/language/utilities/set.q:196
+#: src/language/utilities/set.q:198 src/language/utilities/set.q:200
+#: src/language/utilities/set.q:202 src/language/utilities/set.q:204
+#: src/language/utilities/set.q:206 src/language/utilities/set.q:208
+#: src/language/utilities/set.q:210
+#, c-format
+msgid "%s is obsolete."
+msgstr "%s és obsolet."
+
+#: src/language/utilities/set.q:216
+msgid "Active file compression is not implemented."
+msgstr "La compressió d'arxius no està implementada."
+
+#: src/language/utilities/set.q:334
+msgid "EPOCH must be 1500 or later."
+msgstr "EPOCH ha de ser 1500 o més tard."
+
+#: src/language/utilities/set.q:341
+msgid "expecting AUTOMATIC or year"
+msgstr "esperant AUTOMATICA o any"
+
+#: src/language/utilities/set.q:369
+msgid "LENGTH must be at least 1."
+msgstr "LENGTH ha de ser com a mínim 1."
+
+#: src/language/utilities/set.q:405
+#, c-format
+msgid "%s is not a recognised encoding or locale name"
+msgstr "%s no és una codificació o un nom local reconegut"
+
+#: src/language/utilities/set.q:467
+msgid "WIDTH must be at least 40."
+msgstr "WIDTH ha de ser com a mínim 40."
+
+#: src/language/utilities/set.q:490
+#, c-format
+msgid ""
+"FORMAT requires numeric output format as an argument.  Specified format %s "
+"is of type string."
+msgstr ""
+"FORMAT requereix format de resultat numeric com a argument.  El format %s "
+"especificat es de tipus cadena."
+
+#: src/language/utilities/set.q:707
+msgid "ISL (32-bit IEEE 754 single, little-endian)"
+msgstr "ISL (32-bit IEEE 754 single, little-endian)"
+
+#: src/language/utilities/set.q:710
+msgid "ISB (32-bit IEEE 754 single, big-endian)"
+msgstr "ISB (32-bit IEEE 754 single, big-endian)"
+
+#: src/language/utilities/set.q:713
+msgid "IDL (64-bit IEEE 754 double, little-endian)"
+msgstr "IDL (64-bit IEEE 754 double, little-endian)"
+
+#: src/language/utilities/set.q:716
+msgid "IDB (64-bit IEEE 754 double, big-endian)"
+msgstr "IDB (64-bit IEEE 754 double, big-endian)"
+
+#: src/language/utilities/set.q:720
+msgid "VF (32-bit VAX F, VAX-endian)"
+msgstr "VF (32-bit VAX F, VAX-endian)"
+
+#: src/language/utilities/set.q:723
+msgid "VD (64-bit VAX D, VAX-endian)"
+msgstr "VD (64-bit VAX D, VAX-endian)"
+
+#: src/language/utilities/set.q:726
+msgid "VG (64-bit VAX G, VAX-endian)"
+msgstr "VG (64-bit VAX G, VAX-endian)"
+
+#: src/language/utilities/set.q:730
+msgid "ZS (32-bit IBM Z hexadecimal short, big-endian)"
+msgstr "ZS (32-bit IBM Z hexadecimal short, big-endian)"
+
+#: src/language/utilities/set.q:733
+msgid "ZL (64-bit IBM Z hexadecimal long, big-endian)"
+msgstr "ZL (64-bit IBM Z hexadecimal long, big-endian)"
+
+#: src/language/utilities/set.q:835
+#, c-format
+msgid "%s is %s."
+msgstr "%s és %s."
+
+#: src/language/stats/crosstabs.q:289
+msgid ""
+"Missing mode REPORT not allowed in general mode.  Assuming MISSING=TABLE."
+msgstr ""
+"L'INFORME de perduts no esta disponible el mode general.  S'assumeix "
+"MISSING=TABLE."
+
+#: src/language/stats/crosstabs.q:399
+msgid "Too many cross-tabulation variables or dimensions."
+msgstr "Massa variables o dimensions per a l'encreuament tabulat."
+
+#: src/language/stats/crosstabs.q:409
+msgid "expecting BY"
+msgstr "esperant BY"
+
+#: src/language/stats/crosstabs.q:466
+msgid "VARIABLES must be specified before TABLES."
+msgstr "Les VARIABLES han de ser especificades abans de TABLES."
+
+#: src/language/stats/crosstabs.q:504
+#, c-format
+msgid "Maximum value (%ld) less than minimum value (%ld)."
+msgstr "El valor màxim (%ld) en menor que el valor mínim (%ld)."
+
+#: src/language/stats/crosstabs.q:818
+msgid "Summary."
+msgstr "Resum."
+
+#: src/language/stats/crosstabs.q:820 src/language/stats/examine.q:1164
+#: src/language/stats/reliability.q:693
+msgid "Cases"
+msgstr "Casos"
+
+#: src/language/stats/crosstabs.q:821 src/language/stats/examine.q:1103
+#: src/language/stats/frequencies.q:1035 src/language/stats/reliability.q:696
+msgid "Valid"
+msgstr "Vàlid"
+
+#: src/language/stats/crosstabs.q:831 src/language/stats/examine.q:1179
+#: src/language/stats/frequencies.q:815
+msgid "Percent"
+msgstr "Percentatge"
+
+#: src/language/stats/crosstabs.q:1109
+msgid "count"
+msgstr "recompte"
+
+#: src/language/stats/crosstabs.q:1110
+msgid "row %"
+msgstr "fila %"
+
+#: src/language/stats/crosstabs.q:1111
+msgid "column %"
+msgstr "columna %"
+
+#: src/language/stats/crosstabs.q:1112
+msgid "total %"
+msgstr "total %"
+
+#: src/language/stats/crosstabs.q:1113
+msgid "expected"
+msgstr "esperat"
+
+#: src/language/stats/crosstabs.q:1114
+msgid "residual"
+msgstr "residual"
+
+#: src/language/stats/crosstabs.q:1115
+msgid "std. resid."
+msgstr "residu tipificat"
+
+#: src/language/stats/crosstabs.q:1116
+msgid "adj. resid."
+msgstr "resid.ajust."
+
+#: src/language/stats/crosstabs.q:1210
+msgid "Chi-square tests."
+msgstr "Proves Chi-quadrat."
+
+#: src/language/stats/crosstabs.q:1217
+msgid "Asymp. Sig. (2-sided)"
+msgstr "Sig. Asimp. (2-cues)"
+
+#: src/language/stats/crosstabs.q:1219
+msgid "Exact Sig. (2-sided)"
+msgstr "Sig. Exacta (2-cues)"
+
+#: src/language/stats/crosstabs.q:1221
+msgid "Exact Sig. (1-sided)"
+msgstr "Sig. Exacta (1-cua)"
+
+#: src/language/stats/crosstabs.q:1236
+msgid "Symmetric measures."
+msgstr "Mesures simètriques."
+
+#: src/language/stats/crosstabs.q:1242 src/language/stats/crosstabs.q:1290
+msgid "Asymp. Std. Error"
+msgstr "Error Est. Asimp."
+
+#: src/language/stats/crosstabs.q:1243 src/language/stats/crosstabs.q:1291
+msgid "Approx. T"
+msgstr "Aprox. T"
+
+#: src/language/stats/crosstabs.q:1244 src/language/stats/crosstabs.q:1292
+msgid "Approx. Sig."
+msgstr "Sig. Aproxim."
+
+#: src/language/stats/crosstabs.q:1258
+msgid "Risk estimate."
+msgstr "Estimador de Risc."
+
+#: src/language/stats/crosstabs.q:1262
+#, c-format
+msgid "95%% Confidence Interval"
+msgstr "Interval de Confiança del 95%%"
+
+#: src/language/stats/crosstabs.q:1265 src/language/stats/t-test.q:756
+#: src/language/stats/t-test.q:920 src/language/stats/t-test.q:1013
+msgid "Lower"
+msgstr "Inferior"
+
+#: src/language/stats/crosstabs.q:1266 src/language/stats/t-test.q:757
+#: src/language/stats/t-test.q:921 src/language/stats/t-test.q:1014
+msgid "Upper"
+msgstr "Superior"
+
+#: src/language/stats/crosstabs.q:1283
+msgid "Directional measures."
+msgstr "Mesures direccionals."
+
+#: src/language/stats/crosstabs.q:1708
+msgid "Pearson Chi-Square"
+msgstr "Chi-quadrat de Pearson"
+
+#: src/language/stats/crosstabs.q:1709
+msgid "Likelihood Ratio"
+msgstr "Raó de Similitut"
+
+#: src/language/stats/crosstabs.q:1710
+msgid "Fisher's Exact Test"
+msgstr "Prova exacta de Fisher"
+
+#: src/language/stats/crosstabs.q:1711
+msgid "Continuity Correction"
+msgstr "Correcció per continuitat"
+
+#: src/language/stats/crosstabs.q:1712
+msgid "Linear-by-Linear Association"
+msgstr "Asociació linear per linear"
+
+#: src/language/stats/crosstabs.q:1747 src/language/stats/crosstabs.q:1822
+#: src/language/stats/crosstabs.q:1887
+msgid "N of Valid Cases"
+msgstr "N de casos vàlids"
+
+#: src/language/stats/crosstabs.q:1766 src/language/stats/crosstabs.q:1905
+msgid "Nominal by Nominal"
+msgstr "Nominal segons Nominal"
+
+#: src/language/stats/crosstabs.q:1767 src/language/stats/crosstabs.q:1906
+msgid "Ordinal by Ordinal"
+msgstr "Ordinal segons Ordinal"
+
+#: src/language/stats/crosstabs.q:1768
+msgid "Interval by Interval"
+msgstr "Interval segons Interval"
+
+#: src/language/stats/crosstabs.q:1769
+msgid "Measure of Agreement"
+msgstr "Mesura d'Acord"
+
+#: src/language/stats/crosstabs.q:1775
+msgid "Cramer's V"
+msgstr "V de Cramer"
+
+#: src/language/stats/crosstabs.q:1776
+msgid "Contingency Coefficient"
+msgstr "Coeficient de Contingencia"
+
+#: src/language/stats/crosstabs.q:1777
+msgid "Kendall's tau-b"
+msgstr "Tau-B de Kendall"
+
+#: src/language/stats/crosstabs.q:1778
+msgid "Kendall's tau-c"
+msgstr "Tau-C de Kendall"
+
+#: src/language/stats/crosstabs.q:1780
+msgid "Spearman Correlation"
+msgstr "Correlació de Spearman"
+
+#: src/language/stats/crosstabs.q:1781
+msgid "Pearson's R"
+msgstr "R de Pearson"
+
+#: src/language/stats/crosstabs.q:1860
+#, c-format
+msgid "Odds Ratio for %s (%g / %g)"
+msgstr "Raó de diferencies per a %s (%g / %g)"
+
+#: src/language/stats/crosstabs.q:1863
+#, c-format
+msgid "Odds Ratio for %s (%.*s / %.*s)"
+msgstr "Raó de diferències per a  %s (%.*s / %.*s)"
+
+#: src/language/stats/crosstabs.q:1871
+#, c-format
+msgid "For cohort %s = %g"
+msgstr "Per cohort %s = %g"
+
+#: src/language/stats/crosstabs.q:1874
+#, c-format
+msgid "For cohort %s = %.*s"
+msgstr "Per cohort %s = %.*s"
+
+#: src/language/stats/crosstabs.q:1907
+msgid "Nominal by Interval"
+msgstr "Nominal segons Interval"
+
+#: src/language/stats/crosstabs.q:1913
+msgid "Goodman and Kruskal tau"
+msgstr "Tau de Kruskal i Goodman"
+
+#: src/language/stats/crosstabs.q:1914
+msgid "Uncertainty Coefficient"
+msgstr "Coeficient d'Incertessa"
+
+#: src/language/stats/crosstabs.q:1915
+msgid "Somers' d"
+msgstr "D de Somers"
+
+#: src/language/stats/crosstabs.q:1921
+msgid "Symmetric"
+msgstr "Simètric"
+
+#: src/language/stats/crosstabs.q:1922 src/language/stats/crosstabs.q:1923
+#, c-format
+msgid "%s Dependent"
+msgstr "%s Dependent"
+
+#: src/language/stats/examine.q:357
+#, fuzzy
+msgid "Not creating NP plot because data set is empty."
+msgstr "No es crea el gràfic perquè el conjunt de dades es buit."
+
+#: src/language/stats/examine.q:442 src/language/stats/examine.q:949
+msgid "Not creating plot because data set is empty."
+msgstr "No es crea el gràfic perquè el conjunt de dades es buit."
+
+#: src/language/stats/examine.q:454
+#, c-format
+msgid "Boxplot of %s vs. %s"
+msgstr "Diagrama de caixa de %s vs. %s"
+
+#: src/language/stats/examine.q:458
+#, c-format
+msgid "Boxplot of %s"
+msgstr "Diagrama de caixa de %s"
+
+#: src/language/stats/examine.q:647 src/language/stats/examine.q:660
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s i %s son mutuament excloents"
+
+#: src/language/stats/examine.q:1159 src/language/stats/reliability.q:670
+msgid "Case Processing Summary"
+msgstr "Resum de processament del Casos"
+
+#: src/language/stats/examine.q:1449 src/language/stats/oneway.q:394
+#, c-format
+msgid "%g%% Confidence Interval for Mean"
+msgstr "Interval de Confiança de Miitjana %g%%"
+
+#: src/language/stats/examine.q:1464
+msgid "5% Trimmed Mean"
+msgstr "Mitjana retallada al 5%"
+
+#: src/language/stats/examine.q:1499
+msgid "Interquartile Range"
+msgstr "Interval inter-quartilic"
+
+#: src/language/stats/examine.q:1635 src/language/stats/oneway.q:404
+#: src/ui/gui/descriptives.ui:8 src/ui/gui/examine.ui:319
+msgid "Descriptives"
+msgstr "Descriptives"
+
+#: src/language/stats/examine.q:1821
+msgid "Highest"
+msgstr "Superior"
+
+#: src/language/stats/examine.q:1826
+msgid "Lowest"
+msgstr "Inferior"
+
+#: src/language/stats/examine.q:1833
+msgid "Extreme Values"
+msgstr "Valor extrems"
+
+#: src/language/stats/examine.q:1837 src/language/data-io/list.q:158
+msgid "Case Number"
+msgstr "Número de Cas"
+
+#: src/language/stats/examine.q:1957
+msgid "Tukey's Hinges"
+msgstr "Bisagras de Tukey"
+
+#: src/language/stats/examine.q:2003
+#, c-format
+msgid "%g"
+msgstr "%g"
+
+#: src/language/stats/frequencies.q:382
+#, fuzzy
+msgid "Bar charts are not implemented."
+msgstr "%s no està implementat."
+
+#: src/language/stats/frequencies.q:399
+#, fuzzy, c-format
+msgid ""
+"MAX for histogram must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
+msgstr ""
+"MAX ha de ser major o igual a MIN, si tots dos s'especifiquen.  Però,  MIN "
+"s'ha especificat com a %g i MAX com a %g.  MIN i MAX son ignorats."
+
+#: src/language/stats/frequencies.q:420
+#, fuzzy, c-format
+msgid ""
+"MAX for pie chart must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
+msgstr ""
+"MAX ha de ser major o igual a MIN, si tots dos s'especifiquen.  Però,  MIN "
+"s'ha especificat com a %g i MAX com a %g.  MIN i MAX son ignorats."
+
+#: src/language/stats/frequencies.q:703
+msgid "`)' expected after GROUPED interval list."
+msgstr "`)' esperat després de la llista de variables GRUPED."
+
+#: src/language/stats/frequencies.q:723
+#, c-format
+msgid "Variables %s specified multiple times on GROUPED subcommand."
+msgstr "La variable %s s'ha especificat més d'una vegada a l'ordre GROUPED."
+
+#: src/language/stats/frequencies.q:733
+#, c-format
+msgid "Variables %s specified on GROUPED but not on VARIABLES."
+msgstr "Variables %s especificades a GROUPED però no a VARIABLES."
+
+#: src/language/stats/frequencies.q:812
+msgid "Value Label"
+msgstr "Etiqueta de Valor"
+
+#: src/language/stats/frequencies.q:816
+#, fuzzy
+msgid "Valid Percent"
+msgstr "Percentatge"
+
+#: src/language/stats/frequencies.q:817
+#, fuzzy
+msgid "Cum Percent"
+msgstr "Percentatge"
+
+#: src/language/stats/frequencies.q:1008
+#, c-format
+msgid "No valid data for variable %s; statistics not displayed."
+msgstr ""
+"No hi ha dades vàlides per a la variable %s; not es mostren estadístiques."
+
+#: src/language/stats/frequencies.q:1054
+msgid "50 (Median)"
+msgstr "50 (Mediana)"
+
+#: src/language/stats/frequencies.q:1209
+#, c-format
+msgid "Omitting pie chart for %s, which has only %d unique values."
+msgstr ""
+
+#: src/language/stats/frequencies.q:1212
+#, c-format
+msgid "Omitting pie chart for %s, which has over 50 unique values."
+msgstr ""
+
+#: src/language/stats/glm.q:248
+msgid "Multivariate GLM not yet supported"
+msgstr "GLM multivariable encara no disponible"
+
+#: src/language/stats/means.q:100
+msgid "Missing required subcommand TABLES."
+msgstr "Falta subordre requerida TABLES"
+
+#: src/language/stats/means.q:134
+msgid "TABLES subcommand may not appear more than once."
+msgstr "El subcomando TABLES no pot apareixer més d'una vegada."
+
+#: src/language/stats/npar.q:111
+msgid "NPAR subcommand not currently implemented."
+msgstr "Actualment no está implenetat el subcomandament NPAR."
+
+#: src/language/stats/npar.q:256
+#, c-format
+msgid ""
+"The specified value of HI (%d) is lower than the specified value of LO (%d)"
+msgstr ""
+"El valor especificatper a HI (%d) és menor que l'especificat per a LO (%d)"
+
+#: src/language/stats/npar.q:311
+#, c-format
+msgid ""
+"%d expected values were given, but the specified range (%d-%d) requires "
+"exactly %d values."
+msgstr ""
+"S'han proporcionat %d valors esperats, però l'interval especificat (%d-%d) "
+"requereix exactament %d valors."
+
+#: src/language/stats/npar.q:453 src/language/stats/t-test.q:380
+#, c-format
+msgid ""
+"PAIRED was specified but the number of variables preceding WITH (%zu) did "
+"not match the number following (%zu)."
+msgstr ""
+"S'ha especificat PAIRED però el nombre de variables abans de WITH (%zu) not "
+"conicideixen amb en nombre de variables seguents (%zu)."
+
+#: src/language/stats/oneway.q:170
+msgid "Number of contrast coefficients must equal the number of groups"
+msgstr ""
+"El nombre de coeficients de contrast ha de ser igual al nombre de grups."
+
+#: src/language/stats/oneway.q:179
+#, c-format
+msgid "Coefficients for contrast %zu do not total zero"
+msgstr "Els coeficients per contrastar %zu no sumen cero."
+
+#: src/language/stats/oneway.q:242
+#, c-format
+msgid "`%s' is not a variable name"
+msgstr "`%s' no és un nom de variable"
+
+#: src/language/stats/oneway.q:274 src/language/stats/regression.q:283
+msgid "Sum of Squares"
+msgstr "Suma de Quadrats"
+
+#: src/language/stats/oneway.q:276 src/language/stats/regression.q:285
+msgid "Mean Square"
+msgstr "Rang mitjà"
+
+#: src/language/stats/oneway.q:277 src/language/stats/regression.q:286
+#: src/language/stats/t-test.q:749
+msgid "F"
+msgstr "F"
+
+#: src/language/stats/oneway.q:278 src/language/stats/oneway.q:535
+#: src/language/stats/regression.q:201 src/language/stats/regression.q:287
+msgid "Significance"
+msgstr "Significativitat"
+
+#: src/language/stats/oneway.q:300
+msgid "Between Groups"
+msgstr "Entre Grups"
+
+#: src/language/stats/oneway.q:301
+msgid "Within Groups"
+msgstr "Intra Grups"
+
+#: src/language/stats/oneway.q:345 src/language/stats/regression.q:312
+msgid "ANOVA"
+msgstr "ANOVA"
+
+#: src/language/stats/oneway.q:532
+msgid "Levene Statistic"
+msgstr "Estatístic de Levene"
+
+#: src/language/stats/oneway.q:533
+msgid "df1"
+msgstr "df1"
+
+#: src/language/stats/oneway.q:534
+msgid "df2"
+msgstr "df2"
+
+#: src/language/stats/oneway.q:537
+msgid "Test of Homogeneity of Variances"
+msgstr "Prova de Homogeneitat de variances"
+
+#: src/language/stats/oneway.q:603
+msgid "Contrast Coefficients"
+msgstr "Coeficinents de Contrast"
+
+#: src/language/stats/oneway.q:605 src/language/stats/oneway.q:681
+msgid "Contrast"
+msgstr "Contrast"
+
+#: src/language/stats/oneway.q:679
+msgid "Contrast Tests"
+msgstr "Proves de contrats"
+
+#: src/language/stats/oneway.q:682
+msgid "Value of Contrast"
+msgstr "Valor de constrast"
+
+#: src/language/stats/oneway.q:684 src/language/stats/regression.q:200
+#: src/language/stats/t-test.q:751 src/language/stats/t-test.q:922
+#: src/language/stats/t-test.q:1009
+msgid "t"
+msgstr "t"
+
+#: src/language/stats/oneway.q:730
+msgid "Assume equal variances"
+msgstr "S'assumeix igualtat de variances"
+
+#: src/language/stats/oneway.q:734
+msgid "Does not assume equal"
+msgstr "No s'assumeix igualtat"
+
+#: src/language/stats/rank.q:220
+#, c-format
+msgid "%s of %s by %s"
+msgstr "%s de %s per %s"
+
+#: src/language/stats/rank.q:225
+#, c-format
+msgid "%s of %s"
+msgstr "%s de %s"
+
+#: src/language/stats/rank.q:600
+msgid "Cannot create new rank variable.  All candidates in use."
+msgstr ""
+"No es pot crear la nova variable de rangs.  Tots els candidats estan en ús."
+
+#: src/language/stats/rank.q:693
+msgid "Variables Created By RANK"
+msgstr "Variables creades per RANK"
+
+#: src/language/stats/rank.q:717
+#, c-format
+msgid "%s into %s(%s of %s using %s BY %s)"
+msgstr "%s en %s(%s de %s utilitzant %s BY %s)"
+
+#: src/language/stats/rank.q:727
+#, c-format
+msgid "%s into %s(%s of %s BY %s)"
+msgstr "%s en %s(%s de %s BY %s)"
+
+#: src/language/stats/rank.q:740
+#, c-format
+msgid "%s into %s(%s of %s using %s)"
+msgstr "%s en %s(%s de %s utilitzant %s)"
+
+#: src/language/stats/rank.q:749
+#, c-format
+msgid "%s into %s(%s of %s)"
+msgstr "%s en %s(%s de %s)"
+
+#: src/language/stats/rank.q:761
+msgid ""
+"FRACTION has been specified, but NORMAL and PROPORTION rank functions have "
+"not been requested.  The FRACTION subcommand will be ignored."
+msgstr ""
+"S'ha especificat FRACTION, però no s'ahn demanat funcions de rang NORMAL o "
+"PROPORTION.  La  subordre FRACTION será ignorada."
+
+#: src/language/stats/rank.q:852
+#, c-format
+msgid "Variable %s already exists."
+msgstr "La variable %s ja existeix."
+
+#: src/language/stats/rank.q:857
+msgid "Too many variables in INTO clause."
+msgstr "Massa variables a la clausula INTO."
+
+#: src/language/stats/regression.q:156
+msgid "R Square"
+msgstr "R Quadrada"
+
+#: src/language/stats/regression.q:157
+msgid "Adjusted R Square"
+msgstr "R Quadrada Ajustada"
+
+#: src/language/stats/regression.q:158
+msgid "Std. Error of the Estimate"
+msgstr "Error estàndard de l'Estimador"
+
+#: src/language/stats/regression.q:163
+msgid "Model Summary"
+msgstr "Resum del model"
+
+#: src/language/stats/regression.q:197
+msgid "B"
+msgstr "B"
+
+#: src/language/stats/regression.q:199
+msgid "Beta"
+msgstr "Beta"
+
+#: src/language/stats/regression.q:202
+msgid "(Constant)"
+msgstr "(Constant)"
+
+#: src/language/stats/regression.q:254
+msgid "Coefficients"
+msgstr "Coeficients"
+
+#: src/language/stats/regression.q:289 src/ui/gui/regression.ui:7
+msgid "Regression"
+msgstr "Regressió"
+
+#: src/language/stats/regression.q:370
+msgid "Model"
+msgstr "Model"
+
+#: src/language/stats/regression.q:371
+msgid "Covariances"
+msgstr "Covariància"
+
+#: src/language/stats/regression.q:386
+msgid "Coefficient Correlations"
+msgstr "Correlacions de Coeficients"
+
+#: src/language/stats/regression.q:793
+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 "
+"meaningless."
+msgstr ""
+"La variable dependiente es igual a la variable independiente. La línea de "
+"minimos cuadrados es por tanto Y=X. Los errores estàndard i els estadistics "
+"relacionats podríen ser irrellevants."
+
+#: src/language/stats/regression.q:891
+msgid "REGRESSION requires numeric variables."
+msgstr ""
+
+#: src/language/stats/regression.q:962
+msgid "No valid data found. This command was skipped."
+msgstr "No s'han trobat dades vàlides. S'gnora aquesta ordre."
+
+#: src/language/stats/reliability.q:421
+msgid "Reliability Statistics"
+msgstr "Estadístiques de fiabilitat"
+
+#: src/language/stats/reliability.q:462
+msgid "Item-Total Statistics"
+msgstr "Estadístiques de total d'Items"
+
+#: src/language/stats/reliability.q:484
+msgid "Scale Mean if Item Deleted"
+msgstr "Escalar la mitjana si s'esborra l'element"
+
+#: src/language/stats/reliability.q:487
+msgid "Scale Variance if Item Deleted"
+msgstr "Escalar la variança si s'esborra l'element"
+
+#: src/language/stats/reliability.q:490
+msgid "Corrected Item-Total Correlation"
+msgstr "Correlació total-item corregida"
+
+#: src/language/stats/reliability.q:493
+msgid "Cronbach's Alpha if Item Deleted"
+msgstr "Cronbach's Alpha si s'esborra l'element"
+
+#: src/language/stats/reliability.q:543 src/language/stats/reliability.q:562
+msgid "Cronbach's Alpha"
+msgstr "Alfa de Cronbach"
+
+#: src/language/stats/reliability.q:546 src/language/stats/reliability.q:571
+#: src/language/stats/reliability.q:582
+msgid "N of Items"
+msgstr "N d'elements"
+
+#: src/language/stats/reliability.q:565
+msgid "Part 1"
+msgstr "Part 1"
+
+#: src/language/stats/reliability.q:576
+msgid "Part 2"
+msgstr "Part 2"
+
+#: src/language/stats/reliability.q:587
+msgid "Total N of Items"
+msgstr "N total d'elements"
+
+#: src/language/stats/reliability.q:590
+msgid "Correlation Between Forms"
+msgstr "Correlación entre formes"
+
+#: src/language/stats/reliability.q:594
+msgid "Spearman-Brown Coefficient"
+msgstr "Coeficient d'Spearman-Brown"
+
+#: src/language/stats/reliability.q:597
+msgid "Equal Length"
+msgstr "Ample igual"
+
+#: src/language/stats/reliability.q:600
+msgid "Unequal Length"
+msgstr "Ample desigual"
+
+#: src/language/stats/reliability.q:604
+msgid "Guttman Split-Half Coefficient"
+msgstr "Coeficient Gutman de DIvisió pel mig"
+
+#: src/language/stats/reliability.q:699
+msgid "Excluded"
+msgstr "Exclós"
+
+#: src/language/stats/reliability.q:707
+msgid "%"
+msgstr "%"
+
+#: src/language/stats/t-test.q:190
+msgid "Exactly one of TESTVAL, GROUPS and PAIRS subcommands must be specified."
+msgstr ""
+"Exactamente un dels subcomanaments TESTVAL, GROUPS y PAIRS ha "
+"d'especificarse."
+
+#: src/language/stats/t-test.q:211
+msgid "VARIABLES subcommand may not be used with PAIRS."
+msgstr "La subordre VARIABLES no pot se utilitzada amb PAIRS."
+
+#: src/language/stats/t-test.q:230
+msgid "One or more VARIABLES must be specified."
+msgstr "Una o més  VARIABLES han de ser especificades."
+
+#: src/language/stats/t-test.q:324
+msgid ""
+"When applying GROUPS to a string variable, two values must be specified."
+msgstr ""
+"Quan s'aplica GROUPS a una variable alfabetica, s'han d'especificar dos "
+"valors."
+
+#: src/language/stats/t-test.q:395
+msgid "At least two variables must be specified on PAIRS."
+msgstr "Al menys dos variables s'han d'especificar a PAIRS."
+
+#: src/language/stats/t-test.q:503
+msgid "One-Sample Statistics"
+msgstr "Estadisticas d'una mostra"
+
+#: src/language/stats/t-test.q:522
+msgid "Group Statistics"
+msgstr "Estadístiques de grup"
+
+#: src/language/stats/t-test.q:621
+msgid "Paired Sample Statistics"
+msgstr "Estadistiques de mostres aparellades"
+
+#: src/language/stats/t-test.q:641 src/language/stats/t-test.q:944
+#: src/language/stats/t-test.q:1111
+#, c-format
+msgid "Pair %d"
+msgstr "Parell %d"
+
+#: src/language/stats/t-test.q:737
+msgid "Independent Samples Test"
+msgstr "Prova per mostres independents"
+
+#: src/language/stats/t-test.q:745
+msgid "Levene's Test for Equality of Variances"
+msgstr "Prova de Levene per a l'igualtat de variancies"
+
+#: src/language/stats/t-test.q:747
+msgid "t-test for Equality of Means"
+msgstr "Prova T per l'igualtat de Mitjanes"
+
+#: src/language/stats/t-test.q:750 src/language/stats/t-test.q:1103
+msgid "Sig."
+msgstr "Sig."
+
+#: src/language/stats/t-test.q:754 src/language/stats/t-test.q:1012
+msgid "Mean Difference"
+msgstr "Diferència Mitjana"
+
+#: src/language/stats/t-test.q:755
+msgid "Std. Error Difference"
+msgstr "Err.Est. de la Diferència"
+
+#: src/language/stats/t-test.q:760 src/language/stats/t-test.q:914
+#: src/language/stats/t-test.q:1004
+#, c-format
+msgid "%g%% Confidence Interval of the Difference"
+msgstr "Interval de confiança de la Diferència %g%%"
+
+#: src/language/stats/t-test.q:814
+msgid "Equal variances assumed"
+msgstr "S'asumeix igualtat de variancies"
+
+#: src/language/stats/t-test.q:860
+msgid "Equal variances not assumed"
+msgstr "Igualtat de variancies no asumida"
+
+#: src/language/stats/t-test.q:904
+msgid "Paired Samples Test"
+msgstr "Prova de mostres aparellades"
+
+#: src/language/stats/t-test.q:907
+msgid "Paired Differences"
+msgstr "Diferències aparellades"
+
+#: src/language/stats/t-test.q:919
+msgid "Std. Error Mean"
+msgstr "Error Est. Mitjana"
+
+#: src/language/stats/t-test.q:993
+msgid "One-Sample Test"
+msgstr "Prova d'una mostra"
+
+#: src/language/stats/t-test.q:998
+#, c-format
+msgid "Test Value = %f"
+msgstr "Valor de prova = %f"
+
+#: src/language/stats/t-test.q:1098
+msgid "Paired Samples Correlations"
+msgstr "Correlacions de mostres aparellades"
+
+#: src/language/stats/t-test.q:1102
+msgid "Correlation"
+msgstr "Correlació"
+
+#: src/language/stats/t-test.q:1113
+#, c-format
+msgid "%s & %s"
+msgstr "%s & %s"
+
+#: src/language/data-io/file-handle.q:65
+#, c-format
+msgid ""
+"File handle %s is already defined.  Use CLOSE FILE HANDLE before redefining "
+"a file handle."
+msgstr ""
+"El manipulador d'arxiu %s ja ha esta definit.  Utilitzar CLOSE FILE HANDLE "
+"abans de redefinir un manipulador d'arxius."
+
+#: src/language/data-io/file-handle.q:120
+msgid "RECFORM must be specified with MODE=360."
+msgstr "RECFORM ha de ser espeficat amb MODE=360."
+
+#: src/language/data-io/file-handle.q:131
+#, fuzzy, c-format
+msgid ""
+"The specified file mode requires LRECL.  Assuming %zu-character records."
+msgstr ""
+"El mode d'arxiu especificat requereix LRECL.  S'asumeix %d-registres de "
+"caracter."
+
+#: src/language/data-io/file-handle.q:135
+#, c-format
+msgid ""
+"Record length (%ld) must be between 1 and %lu bytes.  Assuming %d-character "
+"records."
+msgstr ""
+"L'amplada de registre (%ld) ha d'estar entre  1 i %lu bytes.  S'asumeix %d-"
+"registres de caracter."
+
+#: src/language/data-io/file-handle.q:177
+msgid "file"
+msgstr "arxiu"
+
+#: src/language/data-io/file-handle.q:179
+msgid "inline file"
+msgstr "arxiu en linia"
+
+#: src/language/data-io/file-handle.q:205
+msgid "expecting a file name or handle name"
+msgstr "experant un nom d'arxiu o un manipulador"
+
+#: src/language/data-io/file-handle.q:225
+#, c-format
+msgid "Handle for %s not allowed here."
+msgstr "Aquí no està permès un manipulador per a %s."
+
+#: src/language/data-io/list.q:99
+#, c-format
+msgid ""
+"The first case (%ld) specified precedes the last case (%ld) specified.  The "
+"values will be swapped."
+msgstr ""
+"El primer cas (%ld) especificat precedeix a l'ultim cas (%ld) especificat.  "
+"Els valors s'intercanviaran."
+
+#: src/language/data-io/list.q:107
+#, c-format
+msgid ""
+"The first case (%ld) to list is less than 1.  The value is being reset to 1."
+msgstr ""
+"EL primer cas (%ld) per llistar es menor que 1.  El valor es retorna a 1."
+
+#: src/language/data-io/list.q:113
+#, c-format
+msgid ""
+"The last case (%ld) to list is less than 1.  The value is being reset to 1."
+msgstr ""
+"L'últim cas (%ld) per llistar es menor que 1.  El valor es restaura a 1.."
+
+#: src/language/data-io/list.q:119
+#, c-format
+msgid "The step value %ld is less than 1.  The value is being reset to 1."
+msgstr "El valor del pas %ld es menor que 1.  el valor es retorna a 1."
+
+#: src/ui/gui/binomial.ui:57 src/ui/gui/chi-square.ui:57
+#, fuzzy
+msgid "_Test Variable List:"
+msgstr "Variable(s) de prova:"
+
+#: src/ui/gui/binomial.ui:126 src/ui/gui/chi-square.ui:126
+msgid "_Get from data"
+msgstr ""
+
+#: src/ui/gui/binomial.ui:143 src/ui/gui/t-test.ui:333
+msgid "_Cut point:"
+msgstr "Punt de tall:"
+
+#: src/ui/gui/binomial.ui:178
+msgid "Define Dichotomy"
+msgstr ""
+
+#: src/ui/gui/binomial.ui:197
+#, fuzzy
+msgid "Test _Proportion:"
+msgstr "Test Prop."
+
+#: src/ui/gui/correlation.ui:7
+#, fuzzy
+msgid "Bivariate Correlations"
+msgstr "Correlació de Spearman"
+
+#: src/ui/gui/correlation.ui:108
+#, fuzzy
+msgid "Pearso_n"
+msgstr "R de Pearson"
+
+#: src/ui/gui/correlation.ui:123
+#, fuzzy
+msgid "_Kendall's tau-b"
+msgstr "Tau-B de Kendall"
+
+#: src/ui/gui/correlation.ui:138
+msgid "_Spearman"
+msgstr ""
+
+#: src/ui/gui/correlation.ui:158
+#, fuzzy
+msgid "Correlation Coefficients"
+msgstr "Coeficinents de Contrast"
+
+#: src/ui/gui/correlation.ui:182
+#, fuzzy
+msgid "_Two-tailed"
+msgstr "Total"
+
+#: src/ui/gui/correlation.ui:198
+msgid "One-tai_led"
+msgstr ""
+
+#: src/ui/gui/correlation.ui:220
+#, fuzzy
+msgid "Test of Significance"
+msgstr "Significativitat"
+
+#: src/ui/gui/correlation.ui:232
+#, fuzzy
+msgid "_Flag significant correlations"
+msgstr "Correlacions de Coeficients"
+
+#: src/ui/gui/crosstabs.ui:7
+#, fuzzy
+msgid "Crosstabs"
+msgstr "_Creuaments tabulars"
+
+#: src/ui/gui/crosstabs.ui:50
+msgid "Rows"
+msgstr "Filas"
+
+#: src/ui/gui/crosstabs.ui:124
+msgid "Format..."
+msgstr "Formato..."
+
+#: src/ui/gui/crosstabs.ui:137 src/ui/gui/examine.ui:245
+#: src/ui/gui/regression.ui:27
+msgid "Statistics..."
+msgstr "Estatística"
+
+#: src/ui/gui/crosstabs.ui:150
+msgid "Cells..."
+msgstr "Cel.les..."
+
+#: src/ui/gui/crosstabs.ui:227
+#, fuzzy
+msgid "Crosstabs: Format"
+msgstr "_Creuaments tabulars"
+
+#: src/ui/gui/crosstabs.ui:241
+msgid "Print tables"
+msgstr "Imprimir tablas:"
+
+#: src/ui/gui/crosstabs.ui:254
+msgid "Pivot"
+msgstr "Pivot"
+
+#: src/ui/gui/crosstabs.ui:267 src/ui/gui/sort.ui:130
+msgid "Ascending"
+msgstr "Ascendent"
+
+#: src/ui/gui/crosstabs.ui:304
+msgid "No label"
+msgstr "Sense etiqueta"
+
+#: src/ui/gui/crosstabs.ui:317
+msgid "Suppress value labels"
+msgstr "Suprimides les etiquetes de variable"
+
+#: src/ui/gui/crosstabs.ui:335
+msgid "Labeling"
+msgstr "Etiquetant"
+
+#: src/ui/gui/crosstabs.ui:369
+#, fuzzy
+msgid "Crosstabs: Cells"
+msgstr "_Creuaments tabulars"
+
+#: src/ui/gui/crosstabs.ui:402
+msgid "Cell Display"
+msgstr "Contingut de cel.la"
+
+#: src/ui/gui/crosstabs.ui:430
+#, fuzzy
+msgid "Crosstabs: Statistics"
+msgstr "Proves Estad."
+
+#: src/ui/gui/crosstabs.ui:463 src/ui/gui/oneway.ui:222
+#: src/ui/gui/regression.ui:340
+msgid "Statistics"
+msgstr "Estatísticas"
+
+#: src/ui/gui/chi-square.ui:13
+#, fuzzy
+msgid "Chi-Square Test"
+msgstr "Proves Chi-quadrat."
+
+#: src/ui/gui/chi-square.ui:140
+#, fuzzy
+msgid "Use _specified range"
+msgstr "Utilitza valors especificats:"
+
+#: src/ui/gui/chi-square.ui:162
+#, fuzzy
+msgid "_Lower:"
+msgstr "Inferior"
+
+#: src/ui/gui/chi-square.ui:170
+#, fuzzy
+msgid "_Upper:"
+msgstr "Superior"
+
+#: src/ui/gui/chi-square.ui:214
+#, fuzzy
+msgid "Expected Range:"
+msgstr "N esperat"
+
+#: src/ui/gui/chi-square.ui:240
+msgid "All categor_ies equal"
+msgstr ""
+
+#: src/ui/gui/chi-square.ui:257
+#, fuzzy
+msgid "_Values"
+msgstr "Valores"
+
+#: src/ui/gui/chi-square.ui:301
+#, fuzzy
+msgid "Expected Values:"
+msgstr "Valor extrems"
+
+#: src/ui/gui/descriptives.ui:130 src/ui/gui/frequencies.ui:140
+msgid "Statistics:"
+msgstr "Estadístiques:"
+
+#: src/ui/gui/descriptives.ui:192
+msgid "Exclude entire case if any selected variable is missing"
+msgstr "Excluo el cas sencer si qualsevol variable te valor perdut"
+
+#: src/ui/gui/descriptives.ui:207
+msgid "Include user-missing data in analysis"
+msgstr "Incloure els valors perduts d'usuari a l'anàlisi"
+
+#: src/ui/gui/descriptives.ui:222
+msgid "Save Z-scores of selected variables as new variables"
+msgstr "Desar puntuacions-Z de les variables seleccionades com noves variables"
+
+#: src/ui/gui/descriptives.ui:243
+msgid "Options:"
+msgstr "Opcions:"
+
+#: src/ui/gui/examine.ui:8
+#, fuzzy
+msgid "Explore"
+msgstr "_Explorar"
+
+#: src/ui/gui/examine.ui:51
+msgid "Label Cases by:"
+msgstr "Etiqueta casos per:"
+
+#: src/ui/gui/examine.ui:99
+msgid "Factor List:"
+msgstr "Llista de Factors:"
+
+#: src/ui/gui/examine.ui:146
+msgid "Dependent List:"
+msgstr "Llista de Dependents:"
+
+#: src/ui/gui/examine.ui:259 src/ui/gui/t-test.ui:68 src/ui/gui/t-test.ui:658
+#: src/ui/gui/t-test.ui:819
+msgid "Options..."
+msgstr "Opcions..."
+
+#: src/ui/gui/examine.ui:302
+#, fuzzy
+msgid "Explore: Statistics"
+msgstr "Proves Estad."
+
+#: src/ui/gui/examine.ui:332
+msgid "Extremes"
+msgstr "Extrems"
+
+#: src/ui/gui/examine.ui:381
+msgid "Explore: Options"
+msgstr ""
+
+#: src/ui/gui/examine.ui:405
+msgid "Exclude cases listwise"
+msgstr "Exclou casos segons llista"
+
+#: src/ui/gui/examine.ui:419
+msgid "Exclude cases pairwise"
+msgstr "Excloure casos per parelles"
+
+#: src/ui/gui/examine.ui:434
+msgid "Repeat values"
+msgstr "Repetir valors"
+
+#: src/ui/gui/examine.ui:455 src/ui/gui/t-test.ui:493
+#: src/ui/gui/var-sheet-dialogs.ui:684
+msgid "Missing Values"
+msgstr "Valors perduts"
+
+#: src/ui/gui/factor.ui:21
+#, fuzzy
+msgid "Factor Analysis"
+msgstr "Llista de Factors:"
+
+#: src/ui/gui/factor.ui:47
+#, fuzzy
+msgid "_Descriptives..."
+msgstr "Descriptives"
+
+#: src/ui/gui/factor.ui:60
+#, fuzzy
+msgid "_Extraction..."
+msgstr "Opcions..."
+
+#: src/ui/gui/factor.ui:74
+#, fuzzy
+msgid "_Rotations..."
+msgstr "Opcions..."
+
+#: src/ui/gui/factor.ui:192
+msgid "Factor Analysis: Extraction"
+msgstr ""
+
+#: src/ui/gui/factor.ui:216
+#, fuzzy
+msgid "Method: "
+msgstr "Mode:"
+
+#: src/ui/gui/factor.ui:266
+#, fuzzy
+msgid "Correlation matrix"
+msgstr "Correlació"
+
+#: src/ui/gui/factor.ui:280
+#, fuzzy
+msgid "Covariance matrix"
+msgstr "Covariància"
+
+#: src/ui/gui/factor.ui:300
+#, fuzzy
+msgid "Analyse"
+msgstr "_Analitzar"
+
+#: src/ui/gui/factor.ui:324
+msgid "Unrotatated factor solution"
+msgstr ""
+
+#: src/ui/gui/factor.ui:338
+msgid "Scree plot"
+msgstr ""
+
+#: src/ui/gui/factor.ui:357 src/ui/gui/roc.ui:286
+#, fuzzy
+msgid "Display"
+msgstr "Contingut de cel.la"
+
+#: src/ui/gui/factor.ui:430
+msgid "Number of factors:"
+msgstr ""
+
+#: src/ui/gui/factor.ui:460
+#, fuzzy
+msgid "Extract"
+msgstr "Eta"
+
+#: src/ui/gui/factor.ui:475 src/ui/gui/factor.ui:665
+msgid "Maximum iterations for convergence:"
+msgstr ""
+
+#: src/ui/gui/factor.ui:538
+#, fuzzy
+msgid "Factor Analysis: Rotation"
+msgstr "Llista de Factors:"
+
+#: src/ui/gui/factor.ui:571
+#, fuzzy
+msgid "_None"
+msgstr "Cap"
+
+#: src/ui/gui/factor.ui:582
+#, fuzzy
+msgid "_Varimax"
+msgstr "_Variables:"
+
+#: src/ui/gui/factor.ui:598
+msgid "_Quartimax"
+msgstr ""
+
+#: src/ui/gui/factor.ui:614
+msgid "_Equimax"
+msgstr ""
+
+#: src/ui/gui/factor.ui:637
+#, fuzzy
+msgid "Method"
+msgstr "Mode:"
+
+#: src/ui/gui/factor.ui:648
+#, fuzzy
+msgid "_Display rotated solution"
+msgstr "Mostra _informació de l'arxiu de dades"
+
+#: src/ui/gui/find.ui:8
+#, fuzzy
+msgid "Find Case"
+msgstr "Rang de cassos"
+
+#: src/ui/gui/find.ui:88
+msgid "Variable:"
+msgstr "Variable:"
+
+#: src/ui/gui/find.ui:124 src/ui/gui/recode.ui:173
+#: src/ui/gui/var-sheet-dialogs.ui:531
+msgid "Value:"
+msgstr "Valor:"
+
+#: src/ui/gui/find.ui:147
+msgid "Search value labels"
+msgstr "Cerca etiquetes de valor"
+
+#: src/ui/gui/find.ui:171
+msgid "Regular expression Match"
+msgstr "Expressió regular coincident"
+
+#: src/ui/gui/find.ui:187
+msgid "Search substrings"
+msgstr "Cercar subcadenes"
+
+#: src/ui/gui/find.ui:203
+msgid "Wrap around"
+msgstr "Envolcallar"
+
+#: src/ui/gui/find.ui:218
+msgid "Search backward"
+msgstr "Cerca cap enrrera"
+
+#: src/ui/gui/frequencies.ui:102 src/ui/gui/psppire.ui:282
+#: src/ui/gui/rank.ui:105
+msgid "Variable(s):"
+msgstr "Variable(s):"
+
+#: src/ui/gui/frequencies.ui:151
+#, fuzzy
+msgid "Include missing values"
+msgstr "Sense valors perduts"
+
+#: src/ui/gui/frequencies.ui:189
+#, fuzzy
+msgid "Charts..."
+msgstr "_Contrasts..."
+
+#: src/ui/gui/frequencies.ui:201
+#, fuzzy
+msgid "Frequency Tables..."
+msgstr "Variable de Freqüència"
+
+#: src/ui/gui/frequencies.ui:251
+#, fuzzy
+msgid "Frequencies: Frequency Tables"
+msgstr "Mostrar la taula de freqüències"
+
+#: src/ui/gui/frequencies.ui:281
+msgid "Always"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:297
+#, fuzzy
+msgid "Never"
+msgstr "Negatiu"
+
+#: src/ui/gui/frequencies.ui:316
+msgid "If no more than "
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:347
+#, fuzzy
+msgid "values"
+msgstr "Valores"
+
+#: src/ui/gui/frequencies.ui:368
+#, fuzzy
+msgid "Display frequency tables"
+msgstr "Mostrar la taula de freqüències"
+
+#: src/ui/gui/frequencies.ui:396
+#, fuzzy
+msgid "Ascending value"
+msgstr "Ascendent"
+
+#: src/ui/gui/frequencies.ui:412
+#, fuzzy
+msgid "Descending value"
+msgstr "Descendent"
+
+#: src/ui/gui/frequencies.ui:428
+#, fuzzy
+msgid "Ascending frequency"
+msgstr "Ordre Ascendent"
+
+#: src/ui/gui/frequencies.ui:444
+#, fuzzy
+msgid "Descending frequency"
+msgstr "Ordre Descendent"
+
+#: src/ui/gui/frequencies.ui:466
+msgid "Order by"
+msgstr "Ordenat per"
+
+#: src/ui/gui/frequencies.ui:508
+#, fuzzy
+msgid "Frequencies: Charts"
+msgstr "Freqüències"
+
+#: src/ui/gui/frequencies.ui:536
+#, fuzzy
+msgid "Exclude values below "
+msgstr "Exclou casos segons llista"
+
+#: src/ui/gui/frequencies.ui:571
+#, fuzzy
+msgid "Exclude values above "
+msgstr "Excloure casos per parelles"
+
+#: src/ui/gui/frequencies.ui:609
+#, fuzzy
+msgid "<b>Chart Formatting</b>"
+msgstr "<b>Comilles</b>"
+
+#: src/ui/gui/frequencies.ui:633
+msgid "Draw histograms"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:645
+msgid "Superimpose normal curve"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:661
+#, fuzzy
+msgid "Scale:"
+msgstr "Escala"
+
+#: src/ui/gui/frequencies.ui:682
+#, fuzzy
+msgid "Percentages"
+msgstr "Percentils"
+
+#: src/ui/gui/frequencies.ui:705
+#, fuzzy
+msgid "<b>Histograms</b>"
+msgstr "<b>Separadors</b>"
+
+#: src/ui/gui/frequencies.ui:729
+msgid "Draw pie charts"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:741
+#, fuzzy
+msgid "Include slices for missing values"
+msgstr "Valors perduts _Discrets"
+
+#: src/ui/gui/frequencies.ui:758
+#, fuzzy
+msgid "<b>Pie Charts</b>"
+msgstr "<b>Separadors</b>"
+
+#: src/ui/gui/oneway.ui:8
+#, fuzzy
+msgid "One-Way ANOVA"
+msgstr "_ANOVA d'un factor"
+
+#: src/ui/gui/oneway.ui:31
+msgid "_Factor:"
+msgstr "_Factor:"
+
+#: src/ui/gui/oneway.ui:69
+msgid "Dependent _Variable(s):"
+msgstr "_Variable(s) Depenents:"
+
+#: src/ui/gui/oneway.ui:184 src/ui/gui/data-editor.ui:328
+msgid "_Descriptives"
+msgstr "_Descriptives"
+
+#: src/ui/gui/oneway.ui:200
+msgid "_Homogeneity"
+msgstr "_Homogeneitat"
+
+#: src/ui/gui/oneway.ui:238
+msgid "_Contrasts..."
+msgstr "_Contrasts..."
+
+#: src/ui/gui/oneway.ui:292
+#, fuzzy
+msgid "One-Way ANOVA: Contrasts"
+msgstr "_ANOVA d'un factor"
+
+#: src/ui/gui/oneway.ui:369
+msgid "_Coefficients:"
+msgstr "_Coeficients:"
+
+#: src/ui/gui/oneway.ui:416
+msgid "Coefficient Total: "
+msgstr "Coeficient Total: "
+
+#: src/ui/gui/oneway.ui:452
+msgid "Contrast 1 of 1"
+msgstr "Contrast 1 de 1"
+
+#: src/ui/gui/psppire.ui:7
+msgid "Weight Cases"
+msgstr "Ponderar Cassos"
+
+#: src/ui/gui/psppire.ui:66
+msgid "Weight cases by"
+msgstr "Pondera cassos per"
+
+#: src/ui/gui/psppire.ui:102
+msgid "Frequency Variable"
+msgstr "Variable de Freqüència"
+
+#: src/ui/gui/psppire.ui:145
+msgid "Current Status: "
+msgstr "Estatus actual: "
+
+#: src/ui/gui/psppire.ui:195
+#, fuzzy
+msgid "Transpose"
+msgstr "_Transposar"
+
+#: src/ui/gui/psppire.ui:247
+msgid "Name Variable:"
+msgstr "Nom de Variable:"
+
+#: src/ui/gui/psppire.ui:383
+msgid "Split File"
+msgstr "Divideix Arxiu"
+
+#: src/ui/gui/psppire.ui:443
+msgid "Analyze all cases.  Do not create groups."
+msgstr "Analitzar tots els casos.  No crear grups."
+
+#: src/ui/gui/psppire.ui:459
+msgid "Compare groups."
+msgstr "Comparar grups."
+
+#: src/ui/gui/psppire.ui:475
+msgid "Organize output by groups."
+msgstr "Organitzar els resultats per grups."
+
+#: src/ui/gui/psppire.ui:533
+msgid "Groups based on:"
+msgstr "Grups basats en:"
+
+#: src/ui/gui/psppire.ui:592
+msgid "Sort the file by grouping variables."
+msgstr "Ordena l'arxiu per variables d'agrupació."
+
+#: src/ui/gui/psppire.ui:609
+msgid "File is already sorted."
+msgstr "L'arxiu ja está ordenat."
+
+#: src/ui/gui/psppire.ui:662
+msgid "Current Status : "
+msgstr "Estatus actual : "
+
+#: src/ui/gui/psppire.ui:673
+msgid "Analysis by groups is off"
+msgstr "L'anàlisi per grups està activat"
+
+#: src/ui/gui/psppire.ui:709
+#, fuzzy
+msgid "Compute Variable"
+msgstr "Variables de sortida"
+
+#: src/ui/gui/psppire.ui:742
+msgid "Target Variable:"
+msgstr "Variable objectiu:"
+
+#: src/ui/gui/psppire.ui:771
+msgid "Type & Label"
+msgstr "Tipus y Etiquetes"
+
+#: src/ui/gui/psppire.ui:818
+msgid "="
+msgstr "="
+
+#: src/ui/gui/psppire.ui:872
+msgid "Numeric Expressions:"
+msgstr "Expressions Numeriques:"
+
+#: src/ui/gui/psppire.ui:934
+msgid "Functions:"
+msgstr "Funcions:"
+
+#: src/ui/gui/psppire.ui:999 src/ui/gui/psppire.ui:1422
+#: src/ui/gui/recode.ui:741
+msgid "If..."
+msgstr "si..."
+
+#: src/ui/gui/psppire.ui:1052
+msgid "Select Cases"
+msgstr "Seleccionar casos"
+
+#: src/ui/gui/psppire.ui:1240
+msgid "Use filter variable"
+msgstr "Utilitzar variable de filtre"
+
+#: src/ui/gui/psppire.ui:1299
+msgid "Based on time or case range"
+msgstr "Basat en interval de temps o casos"
+
+#: src/ui/gui/psppire.ui:1311
+msgid "Range..."
+msgstr "Interval..."
+
+#: src/ui/gui/psppire.ui:1355
+msgid "Random sample of cases"
+msgstr "Mostra aleatoria de casos"
+
+#: src/ui/gui/psppire.ui:1368
+msgid "Sample..."
+msgstr "Mostra..."
+
+#: src/ui/gui/psppire.ui:1410
+msgid "If condition is satisfied"
+msgstr "si la condició es satisfà"
+
+#: src/ui/gui/psppire.ui:1462
+msgid "All Cases"
+msgstr "Tots els Casos:"
+
+#: src/ui/gui/psppire.ui:1477
+msgid "Select"
+msgstr "Selecciona"
+
+#: src/ui/gui/psppire.ui:1504
+msgid "Filtered"
+msgstr "Filtrat"
+
+#: src/ui/gui/psppire.ui:1520
+msgid "Deleted"
+msgstr "Eliminat"
+
+#: src/ui/gui/psppire.ui:1543
+msgid "Unselected Cases Are"
+msgstr "Els casos no seleccionats son"
+
+#: src/ui/gui/psppire.ui:1585
+#, fuzzy
+msgid "Data File Comments"
+msgstr "_Comentaris arxiu de dades"
+
+#: src/ui/gui/psppire.ui:1609
+msgid "Comments:"
+msgstr "Comentaris:"
+
+#: src/ui/gui/psppire.ui:1650
+msgid "Display comments in output"
+msgstr "Mostra comentaris al resultat"
+
+#: src/ui/gui/psppire.ui:1669
+msgid "Column Number: 0"
+msgstr "Columna Numero: 0"
+
+#: src/ui/gui/psppire.ui:1703
+#, fuzzy
+msgid "Select Cases: Range"
+msgstr "Seleccionar casos"
+
+#: src/ui/gui/psppire.ui:1750
+msgid "First case"
+msgstr "Primer cas"
+
+#: src/ui/gui/psppire.ui:1763
+msgid "Last case"
+msgstr "Últim cas"
+
+#: src/ui/gui/psppire.ui:1776
+msgid "Observation"
+msgstr "Observació"
+
+#: src/ui/gui/psppire.ui:1808
+msgid "Compute Variable: Type and Label"
+msgstr ""
+
+#: src/ui/gui/psppire.ui:1843
+msgid "Use expression as label"
+msgstr "Utilitza l'expressio com a etiqueta"
+
+#: src/ui/gui/psppire.ui:2088
+#, fuzzy
+msgid "Goto Case"
+msgstr "Anar a"
+
+#: src/ui/gui/psppire.ui:2106
+msgid "Goto Case Number:"
+msgstr "Anar al cas número:"
+
+#: src/ui/gui/psppire.ui:2149
+#, fuzzy
+msgid "Select Cases: Random Sample"
+msgstr "Seleccionar casos"
+
+#: src/ui/gui/psppire.ui:2247
+msgid "Sample Size"
+msgstr "Grandaria de mostra"
+
+#: src/ui/gui/rank.ui:8
+msgid "Rank Cases"
+msgstr "Rang de cassos"
+
+#: src/ui/gui/rank.ui:58
+msgid "By:"
+msgstr "Per:"
+
+#: src/ui/gui/rank.ui:204
+msgid "_Smallest Value"
+msgstr "Valor Inferior"
+
+#: src/ui/gui/rank.ui:221
+msgid "_Largest Value"
+msgstr "Valor Superior"
+
+#: src/ui/gui/rank.ui:245
+msgid "Assign rank 1 to:"
+msgstr "Assigna rang 1 a:"
+
+#: src/ui/gui/rank.ui:261
+msgid "_Display summary tables"
+msgstr "Mostra taules resum"
+
+#: src/ui/gui/rank.ui:279
+msgid "Rank T_ypes"
+msgstr "Tipus de Rangs"
+
+#: src/ui/gui/rank.ui:294
+msgid "_Ties..."
+msgstr "Vincles..."
+
+#: src/ui/gui/rank.ui:346
+#, fuzzy
+msgid "Rank Cases: Types"
+msgstr "Rang de cassos"
+
+#: src/ui/gui/rank.ui:366
+msgid "Sum of case weights"
+msgstr "Suma de casos ponderats"
+
+#: src/ui/gui/rank.ui:382
+msgid "Fractional rank as %"
+msgstr "Rang fracional com %"
+
+#: src/ui/gui/rank.ui:396
+msgid "Fractional rank"
+msgstr "Rang fraccional"
+
+#: src/ui/gui/rank.ui:410
+msgid "Savage score"
+msgstr "Puntuació de Savage"
+
+#: src/ui/gui/rank.ui:424
+msgid "Rank"
+msgstr "Rang"
+
+#: src/ui/gui/rank.ui:438
+msgid "Ntiles"
+msgstr "Ntiles"
+
+#: src/ui/gui/rank.ui:481
+msgid "Proportion Estimates"
+msgstr "Estimació de Proporcions"
+
+#: src/ui/gui/rank.ui:494
+msgid "Normal Scores"
+msgstr "Puntuació Normal"
+
+#: src/ui/gui/rank.ui:529
+msgid "Blom"
+msgstr "Blom"
+
+#: src/ui/gui/rank.ui:543
+msgid "Tukey"
+msgstr "Tukey"
+
+#: src/ui/gui/rank.ui:557
+msgid "Rankit"
+msgstr "Rankit"
+
+#: src/ui/gui/rank.ui:571
+msgid "Van der Wärden"
+msgstr "Van der Wärden"
+
+#: src/ui/gui/rank.ui:591
+msgid "Proportion Estimation Formula"
+msgstr "Formula d'estimació de Porporcións"
+
+#: src/ui/gui/rank.ui:625
+#, fuzzy
+msgid "Rank Cases: Ties"
+msgstr "Rang de cassos"
+
+#: src/ui/gui/rank.ui:651
+msgid "_Mean"
+msgstr "_Mitjana"
+
+#: src/ui/gui/rank.ui:668
+msgid "_Low"
+msgstr "Baix"
+
+#: src/ui/gui/rank.ui:686
+msgid "_High"
+msgstr "Superior"
+
+#: src/ui/gui/rank.ui:709
+msgid "_Sequential ranks to unique values"
+msgstr "Rangs _Sequencials per a valors únics"
+
+#: src/ui/gui/rank.ui:732
+msgid "Rank Assigned to Ties"
+msgstr "Rang assignat a empats"
+
+#: src/ui/gui/sort.ui:8
+#, fuzzy
+msgid "Sort Cases"
+msgstr "_Ordenar Casos"
+
+#: src/ui/gui/sort.ui:79
+msgid "Sort by:"
+msgstr "Ordenat per:"
+
+#: src/ui/gui/sort.ui:146
+msgid "Descending"
+msgstr "Descendent"
+
+#: src/ui/gui/sort.ui:168
+msgid "Sort Order"
+msgstr "Ordre"
+
+#: src/ui/gui/recode.ui:185 src/ui/gui/recode.ui:467
+msgid "System Missing"
+msgstr "Perdut del Sistema"
+
+#: src/ui/gui/recode.ui:199
+#, fuzzy
+msgid "System or User Missing"
+msgstr "Perdut de sistema o d'usuari"
+
+#: src/ui/gui/recode.ui:237
+msgid "through"
+msgstr "fins a"
+
+#: src/ui/gui/recode.ui:275
+msgid "Range, LOWEST thru value"
+msgstr "Interval, MENOR fins al valor"
+
+#: src/ui/gui/recode.ui:289
+msgid "Range, value thru HIGHEST"
+msgstr "Interval, valor fins al SUPERIOR"
+
+#: src/ui/gui/recode.ui:319
+msgid "All other values"
+msgstr "Tota la resta de valors"
+
+#: src/ui/gui/recode.ui:355
+msgid "Range:"
+msgstr "Interval:"
+
+#: src/ui/gui/recode.ui:384
+msgid "Old Value"
+msgstr "Valor antic"
+
+#: src/ui/gui/recode.ui:481
+msgid "Copy old values"
+msgstr "Copiar els valors antics"
+
+#: src/ui/gui/recode.ui:505
+msgid "Value: "
+msgstr "Valor:"
+
+#: src/ui/gui/recode.ui:538
+msgid "New Value"
+msgstr "Nou Valor"
+
+#: src/ui/gui/recode.ui:596
+msgid "Convert numeric strings to numbers ('5' -> 5)"
+msgstr "Convertir cadenes numériques a números ('5' -> 5)"
+
+#: src/ui/gui/recode.ui:614
+msgid "Output variables are strings"
+msgstr "Les variables de sortida son alfabetiques"
+
+#: src/ui/gui/recode.ui:629
+msgid "Width: "
+msgstr "Ample:"
+
+#: src/ui/gui/recode.ui:757
+msgid "(optional case selection condition)"
+msgstr "(condició opcional de selecció de casos)"
+
+#: src/ui/gui/recode.ui:838
+msgid "Name:"
+msgstr "Nom:"
+
+#: src/ui/gui/recode.ui:881
+msgid "Change"
+msgstr "Canvi"
+
+#: src/ui/gui/recode.ui:907
+msgid "Output Variable"
+msgstr "Variables de sortida"
+
+#: src/ui/gui/recode.ui:981
+msgid "Old and New Values"
+msgstr "Valors antics i nous"
+
+#: src/ui/gui/regression.ui:41
+msgid "Save..."
+msgstr "Desar..."
+
+#: src/ui/gui/regression.ui:156
+msgid "Dependent"
+msgstr "Dependent"
+
+#: src/ui/gui/regression.ui:201
+msgid "Independent"
+msgstr "Independent"
+
+#: src/ui/gui/regression.ui:236
+#, fuzzy
+msgid "Regression: Save"
+msgstr "Regressió"
+
+#: src/ui/gui/regression.ui:250
+msgid "Predicted values"
+msgstr "Valors predits"
+
+#: src/ui/gui/regression.ui:263
+msgid "Residuals"
+msgstr "Residuals"
+
+#: src/ui/gui/regression.ui:298
+#, fuzzy
+msgid "Regression: Statistics"
+msgstr "Proves Estad."
+
+#: src/ui/gui/reliability.ui:27
+msgid "Reliability Analysis"
+msgstr "Anàlsisi de fiabilitat"
+
+#: src/ui/gui/reliability.ui:114
+msgid "_Items:"
+msgstr "_Items:"
+
+#: src/ui/gui/reliability.ui:136
+msgid "Model:\t"
+msgstr "Model:\t"
+
+#: src/ui/gui/reliability.ui:175
+msgid "Variables in first split:"
+msgstr "Variables a primera divissió:"
+
+#: src/ui/gui/roc.ui:115
+#, fuzzy
+msgid "_Test Variable:"
+msgstr "Variable(s) de prova:"
+
+#: src/ui/gui/roc.ui:147
+#, fuzzy
+msgid "_State Variable:"
+msgstr "Nom de Variable:"
+
+#: src/ui/gui/roc.ui:172
+#, fuzzy
+msgid "_Value of state variable:"
+msgstr "Utilitzar variable de filtre"
+
+#: src/ui/gui/roc.ui:209
+#, fuzzy
+msgid "ROC C_urve"
+msgstr "Corba ROC"
+
+#: src/ui/gui/roc.ui:227
+msgid "_With diagonal reference line"
+msgstr ""
+
+#: src/ui/gui/roc.ui:251
+#, fuzzy
+msgid "Standard _Error and Confidence Interval"
+msgstr "Interval de Confiança del 95%%"
+
+#: src/ui/gui/roc.ui:266
+#, fuzzy
+msgid "_Coordinate points of the ROC Curve"
+msgstr "Coordenades de la Corba"
+
+#: src/ui/gui/t-test.ui:8
+#, fuzzy
+msgid "Independent-Samples T Test"
+msgstr "Prova T per mostres _Independents"
+
+#: src/ui/gui/t-test.ui:54 src/ui/gui/t-test.ui:175 src/ui/gui/t-test.ui:231
+msgid "Define Groups"
+msgstr "Definir grups"
+
+#: src/ui/gui/t-test.ui:131 src/ui/gui/t-test.ui:584 src/ui/gui/t-test.ui:803
+msgid "Test Variable(s):"
+msgstr "Variable(s) de prova:"
+
+#: src/ui/gui/t-test.ui:271
+msgid "Group_2 value:"
+msgstr "Valor del grup 2:"
+
+#: src/ui/gui/t-test.ui:284
+msgid "Group_1 value:"
+msgstr "Valor del Grup 1:"
+
+#: src/ui/gui/t-test.ui:365
+msgid "_Use specified values:"
+msgstr "Utilitza valors especificats:"
+
+#: src/ui/gui/t-test.ui:420
+#, fuzzy
+msgid "Options"
+msgstr "Opcions:"
+
+#: src/ui/gui/t-test.ui:452
+msgid "Exclude cases _analysis by analysis"
+msgstr "Excloure casos _anàlisi per analìsi"
+
+#: src/ui/gui/t-test.ui:469
+msgid "Exclude cases _listwise"
+msgstr "Exclure casos per _llista"
+
+#: src/ui/gui/t-test.ui:529
+#, fuzzy
+msgid "One - Sample T Test"
+msgstr "Prova T per una mostra"
+
+#: src/ui/gui/t-test.ui:626
+msgid "Test Value: "
+msgstr "Valor de prova: "
+
+#: src/ui/gui/t-test.ui:704
+#, fuzzy
+msgid "Paired Samples T Test"
+msgstr "Prova T per mostres A_parellades"
+
+#: src/ui/gui/text-data-import.ui:8
+msgid "Importing Textual Data"
+msgstr "Important dades textuals"
+
+#: src/ui/gui/text-data-import.ui:19
+msgid ""
+"This assistant will guide you through the process of importing data into "
+"PSPP from a text file with one line per case,  in which fields are separated "
+"by tabs, commas, or other delimiters.\n"
+"\n"
+"The selected file contains N lines of text.  Only the first M of these will "
+"be shown for preview purposes in the following screens.  You may choose "
+"below how much of the file should actually be imported."
+msgstr ""
+"Aquest assitent t'acompanyarà per tot el procés d'importar dades al PSPP des "
+"d'un arxiu de text amb una linia per cas,  al qual els camps estan separats "
+"per tabuladors, comas, o altres delimitadors.\n"
+"\n"
+"L'arxiu seleccionat conté N linies de text.  Només les primeres M seran "
+"mostrades per previsualització a les pantalles seguents.  Pots triar a "
+"continuació quina part de l'arxiu ha de ser importat."
+
+#: src/ui/gui/text-data-import.ui:52
+msgid "All cases"
+msgstr "Tots els casos"
+
+#: src/ui/gui/text-data-import.ui:71 src/ui/gui/text-data-import.ui:128
+msgid "Only first "
+msgstr "Només el primer"
+
+#: src/ui/gui/text-data-import.ui:106
+msgid " cases"
+msgstr " cassos"
+
+#: src/ui/gui/text-data-import.ui:162
+msgid "% of file (approximately)"
+msgstr "% de l'arxiu (aproximadament)"
+
+#: src/ui/gui/text-data-import.ui:183
+msgid "<b>Amount to Import</b>"
+msgstr "<b>Quantitat a importar</b>"
+
+#: src/ui/gui/text-data-import.ui:202
+msgid "Select Data to Import"
+msgstr "Selecionar dades per a importar"
+
+#: src/ui/gui/text-data-import.ui:213
+msgid "Select the first line of the data file that contains data."
+msgstr "Seleccionar la primera linia del'arxiu que conté dades."
+
+#: src/ui/gui/text-data-import.ui:241
+msgid "Line above selected line contains variable names"
+msgstr "La linia sobre la linia seleccionada contè els noms de les variables"
+
+#: src/ui/gui/text-data-import.ui:259
+msgid "Choose Separators"
+msgstr "Triar els separadors"
+
+#: src/ui/gui/text-data-import.ui:305
+msgid "C_ustom"
+msgstr "_Usuari"
+
+#: src/ui/gui/text-data-import.ui:320
+msgid "Slas_h (/)"
+msgstr "Barra (/)"
+
+#: src/ui/gui/text-data-import.ui:337
+msgid "Semicolo_n (;)"
+msgstr "Punt i coma (;)"
+
+#: src/ui/gui/text-data-import.ui:354
+msgid "P_ipe (|)"
+msgstr "Tub (|)"
+
+#: src/ui/gui/text-data-import.ui:369
+msgid "H_yphen (-)"
+msgstr "Guionet (-)"
+
+#: src/ui/gui/text-data-import.ui:386
+msgid "Co_mma (,)"
+msgstr "Coma (,)"
+
+#: src/ui/gui/text-data-import.ui:403
+msgid "_Colon (:)"
+msgstr "Dos punts (:)"
+
+#: src/ui/gui/text-data-import.ui:418
+msgid "Ban_g (!)"
+msgstr "Exclamació (!)"
+
+#: src/ui/gui/text-data-import.ui:433
+msgid "Ta_b"
+msgstr "Tabulador"
+
+#: src/ui/gui/text-data-import.ui:448
+msgid "_Space"
+msgstr "E-spai"
+
+#: src/ui/gui/text-data-import.ui:465
+msgid "<b>Separators</b>"
+msgstr "<b>Separadors</b>"
+
+#: src/ui/gui/text-data-import.ui:495
+msgid "Doubled quote mark treated as escape"
+msgstr "La marca \" es tractada con a ESCAPE"
+
+#: src/ui/gui/text-data-import.ui:524
+msgid "Quote separator characters with"
+msgstr "Separar caracters amb comilla"
+
+#: src/ui/gui/text-data-import.ui:544
+msgid "<b>Quoting</b>"
+msgstr "<b>Comilles</b>"
+
+#: src/ui/gui/text-data-import.ui:592
+msgid "<b>Fields Preview</b>"
+msgstr "<b>Previsualitza camps</b>"
+
+#: src/ui/gui/text-data-import.ui:607
+msgid "Adjust Variable Formats"
+msgstr "Ajustar formats de variables"
+
+#: src/ui/gui/text-data-import.ui:618
+msgid ""
+"Check the data formats displayed below and fix any that are incorrect.  You "
+"may set other variable properties now or later."
+msgstr ""
+"Comprovar les formats de les dades mostrades a continuació i corregir els "
+"problemes.  Es pot asignar altres propietats de les variables ara o més tard."
+
+#: src/ui/gui/text-data-import.ui:662
+msgid "<b>Variables</b>"
+msgstr "<b>Variables</b>"
+
+#: src/ui/gui/text-data-import.ui:705
+msgid "<b>Data Preview</b>"
+msgstr "<b>Previsualització de dades</b>"
+
+#: src/ui/gui/var-sheet-dialogs.ui:7
+msgid "Variable Type"
+msgstr "Tipus de Variable"
+
+#: src/ui/gui/var-sheet-dialogs.ui:75
+msgid "Scientific notation"
+msgstr "Notació científica"
+
+#: src/ui/gui/var-sheet-dialogs.ui:123
+msgid "Custom currency"
+msgstr "Moneda propia"
+
+#: src/ui/gui/var-sheet-dialogs.ui:225
+msgid "positive"
+msgstr "positiu"
+
+#: src/ui/gui/var-sheet-dialogs.ui:234
+msgid "negative"
+msgstr "negatiu"
+
+#: src/ui/gui/var-sheet-dialogs.ui:247
+msgid "Sample"
+msgstr "Mostra"
+
+#: src/ui/gui/var-sheet-dialogs.ui:294
+msgid "Width:"
+msgstr "Ample:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:339
+msgid "Decimal Places:"
+msgstr "Llocs decimals:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:419 src/ui/gui/var-sheet-dialogs.ui:610
+msgid "Value Labels"
+msgstr "Etiquetes de Valor"
+
+#: src/ui/gui/var-sheet-dialogs.ui:518
+msgid "Value Label:"
+msgstr "Etiqueta de Valor:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:711
+msgid "_No missing values"
+msgstr "Sense valors perduts"
+
+#: src/ui/gui/var-sheet-dialogs.ui:782
+msgid "_Discrete missing values"
+msgstr "Valors perduts _Discrets"
+
+#: src/ui/gui/var-sheet-dialogs.ui:816
+msgid "_Low:"
+msgstr "Baix:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:835
+msgid "_High:"
+msgstr "Superior:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:860
+msgid "Di_screte value:"
+msgstr "Valor Di_scret:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:888
+msgid "_Range plus one optional discrete missing value"
+msgstr "Valor perdut discreto ocpional d'interval més un"
+
+#: src/ui/gui/variable-info.ui:50
+msgid "Variable Information:"
+msgstr "Informació de la Variable"
+
+#: src/ui/gui/data-editor.ui:9
+msgid "Sort Ascending"
+msgstr "Ordenació ascendent"
+
+#: src/ui/gui/data-editor.ui:15
+msgid "Sort Descending"
+msgstr "Ordenació descendent"
+
+#: src/ui/gui/data-editor.ui:26 src/ui/gui/output-viewer.ui:9
+#: src/ui/gui/syntax-editor.ui:10
+msgid "_File"
+msgstr "_Arxiu"
+
+#: src/ui/gui/data-editor.ui:38 src/ui/gui/syntax-editor.ui:22
+#: src/ui/gui/syntax-editor.ui:40
+msgid "_Syntax"
+msgstr "_Sintaxi"
+
+#: src/ui/gui/data-editor.ui:44 src/ui/gui/data-editor.ui:217
+#: src/ui/gui/data-editor.ui:229 src/ui/gui/syntax-editor.ui:28
+#: src/ui/gui/syntax-editor.ui:46
+msgid "_Data"
+msgstr "_Dades"
+
+#: src/ui/gui/data-editor.ui:56
+msgid "_Import Delimited Text Data"
+msgstr "_Importar dades de text delimitat"
+
+#: src/ui/gui/data-editor.ui:75
+msgid "D_isplay Data File Information"
+msgstr "Mostra _informació de l'arxiu de dades"
+
+#: src/ui/gui/data-editor.ui:81
+msgid "Working File"
+msgstr "Arxius de treball"
+
+#: src/ui/gui/data-editor.ui:87
+msgid "External File"
+msgstr "Arxiu extern"
+
+#: src/ui/gui/data-editor.ui:93
+msgid "Recently Used Da_ta"
+msgstr "Dades usades recentment"
+
+#: src/ui/gui/data-editor.ui:99
+msgid "Recently Used _Files"
+msgstr "Arxius utilitzats recentment"
+
+#: src/ui/gui/data-editor.ui:111 src/ui/gui/output-viewer.ui:28
+#: src/ui/gui/syntax-editor.ui:70
+msgid "_Edit"
+msgstr "_Editar"
+
+#: src/ui/gui/data-editor.ui:117
+msgid "Insert Variable"
+msgstr "Insertar Variable"
+
+#: src/ui/gui/data-editor.ui:118
+msgid "Create a new variable at the current position"
+msgstr "Crear una nova variable a la posició seleccionada"
+
+#: src/ui/gui/data-editor.ui:125
+msgid "Insert Cases"
+msgstr "Insertar Casos"
+
+#: src/ui/gui/data-editor.ui:126
+msgid "Create a new case at the current position"
+msgstr "Crear un nou cas a la posició actual"
+
+#: src/ui/gui/data-editor.ui:132
+msgid "Go To Case"
+msgstr "Anar a"
+
+#: src/ui/gui/data-editor.ui:134
+#, fuzzy
+msgid "Jump to a case in the data sheet"
+msgstr "Anar a un cas a la Matriu de Dades"
+
+#: src/ui/gui/data-editor.ui:160
+msgid "Cl_ear Variables"
+msgstr "_Eliminar Variables:"
+
+#: src/ui/gui/data-editor.ui:161
+msgid "Delete the variables at the selected position(s)"
+msgstr "Esborra les variables a la posició(ns) selecconada(es)"
+
+#: src/ui/gui/data-editor.ui:169
+msgid "_Clear Cases"
+msgstr "_Eliminar Casos"
+
+#: src/ui/gui/data-editor.ui:170
+msgid "Delete the cases at the selected position(s)"
+msgstr "Esborra els casos a la(es) posició(ns) seleccionada(es)"
+
+#: src/ui/gui/data-editor.ui:182
+msgid "_View"
+msgstr "_Veure"
+
+#: src/ui/gui/data-editor.ui:189
+msgid "_Status Bar"
+msgstr "Barra d'E_stat"
+
+#: src/ui/gui/data-editor.ui:195
+msgid "_Fonts"
+msgstr "_Fonts"
+
+#: src/ui/gui/data-editor.ui:203
+msgid "_Grid Lines"
+msgstr "_Linies divisories"
+
+#: src/ui/gui/data-editor.ui:209
+msgid "Value _Labels"
+msgstr "Etiquetes de _Valors"
+
+#: src/ui/gui/data-editor.ui:210
+msgid "Show/hide value labels"
+msgstr "Mostra/Oculta etiquetes de valor"
+
+#: src/ui/gui/data-editor.ui:223 src/ui/gui/data-editor.ui:430
+msgid "_Variables"
+msgstr "_Variables:"
+
+#: src/ui/gui/data-editor.ui:234
+msgid "_Sort Cases"
+msgstr "_Ordenar Casos"
+
+#: src/ui/gui/data-editor.ui:237
+msgid "Sort cases in the active file"
+msgstr "Ordenar casos a l'arxiu actiu"
+
+#: src/ui/gui/data-editor.ui:244
+msgid "_Transpose"
+msgstr "_Transposar"
+
+#: src/ui/gui/data-editor.ui:245
+msgid "Transpose the cases with the variables"
+msgstr "Transposar casos i variables"
+
+#: src/ui/gui/data-editor.ui:251
+msgid "S_plit File"
+msgstr "Divideix Arxiu"
+
+#: src/ui/gui/data-editor.ui:252
+msgid "Split the active file"
+msgstr "Dividir l'arxius actiu"
+
+#: src/ui/gui/data-editor.ui:259
+msgid "Select _Cases"
+msgstr "Seleccionar _Casos"
+
+#: src/ui/gui/data-editor.ui:265
+msgid "_Weight Cases"
+msgstr "Pondera Cassos"
+
+#: src/ui/gui/data-editor.ui:266
+msgid "Weight cases by variable"
+msgstr "Pondera casos per la variable"
+
+#: src/ui/gui/data-editor.ui:273
+msgid "_Transform"
+msgstr "_Transformar"
+
+#: src/ui/gui/data-editor.ui:279
+msgid "_Compute"
+msgstr "_Calcular"
+
+#: src/ui/gui/data-editor.ui:285
+msgid "Ran_k Cases"
+msgstr "Rang de casos"
+
+#: src/ui/gui/data-editor.ui:291
+msgid "Recode into _Same Variables"
+msgstr "Recodificar a les Mateixe_s Variables"
+
+#: src/ui/gui/data-editor.ui:297
+msgid "Recode into _Different Variables"
+msgstr "Recodificar a variables _Diferents"
+
+#: src/ui/gui/data-editor.ui:303
+msgid "_Run Pending Transforms"
+msgstr "Executa_r Transformacions pendents"
+
+#: src/ui/gui/data-editor.ui:310
+msgid "_Analyze"
+msgstr "_Analitzar"
+
+#: src/ui/gui/data-editor.ui:316
+msgid "_Descriptive Statistics"
+msgstr "Estadística _Descriptiva"
+
+#: src/ui/gui/data-editor.ui:322
+msgid "_Frequencies"
+msgstr "_Freqüències"
+
+#: src/ui/gui/data-editor.ui:334
+msgid "_Explore"
+msgstr "_Explorar"
+
+#: src/ui/gui/data-editor.ui:340
+msgid "_Crosstabs"
+msgstr "_Creuaments tabulars"
+
+#: src/ui/gui/data-editor.ui:346
+msgid "Compare _Means"
+msgstr "Comparar _Mitjanes"
+
+#: src/ui/gui/data-editor.ui:352
+msgid "_One Sample T Test"
+msgstr "Prova T per una mostra"
+
+#: src/ui/gui/data-editor.ui:358
+msgid "_Independent Samples T Test"
+msgstr "Prova T per mostres _Independents"
+
+#: src/ui/gui/data-editor.ui:364
+msgid "_Paired Samples T Test"
+msgstr "Prova T per mostres A_parellades"
+
+#: src/ui/gui/data-editor.ui:370
+msgid "One Way _ANOVA"
+msgstr "_ANOVA d'un factor"
+
+#: src/ui/gui/data-editor.ui:376
+#, fuzzy
+msgid "Bivariate _Correlation..."
+msgstr "Correlació de Spearman"
+
+#: src/ui/gui/data-editor.ui:382
+#, fuzzy
+msgid "Factor _Analysis"
+msgstr "Llista de Factors:"
+
+#: src/ui/gui/data-editor.ui:388
+msgid "Re_liability"
+msgstr "Fiabi_litat"
+
+#: src/ui/gui/data-editor.ui:394
+msgid "Linear _Regression"
+msgstr "_Regressió Linear"
+
+#: src/ui/gui/data-editor.ui:400
+msgid "_Non-Parametric Statistics"
+msgstr "Proves _No-Paramétriques"
+
+#: src/ui/gui/data-editor.ui:406
+msgid "_Chi-Square"
+msgstr "_Chi-quadrat"
+
+#: src/ui/gui/data-editor.ui:412
+msgid "_Binomial"
+msgstr "_Binomial"
+
+#: src/ui/gui/data-editor.ui:418
+#, fuzzy
+msgid "ROC Cur_ve..."
+msgstr "Corba ROC"
+
+#: src/ui/gui/data-editor.ui:424
+msgid "_Utilities"
+msgstr "_Utilitats"
+
+#: src/ui/gui/data-editor.ui:431
+msgid "Jump to variable"
+msgstr "Anar a la variable"
+
+#: src/ui/gui/data-editor.ui:438
+msgid "Data File _Comments"
+msgstr "_Comentaris arxiu de dades"
+
+#: src/ui/gui/data-editor.ui:444 src/ui/gui/output-viewer.ui:40
+#: src/ui/gui/syntax-editor.ui:131
+msgid "_Windows"
+msgstr "Finestres"
+
+#: src/ui/gui/data-editor.ui:450 src/ui/gui/output-viewer.ui:46
+#: src/ui/gui/syntax-editor.ui:137
+msgid "_Minimize All Windows"
+msgstr "_Minimitza totes les finestres"
+
+#: src/ui/gui/data-editor.ui:456
+msgid "_Split"
+msgstr "Divideix"
+
+#: src/ui/gui/data-editor.ui:630
+msgid "Information Area"
+msgstr "Àrea d'Informació"
+
+#: src/ui/gui/data-editor.ui:652
+msgid "Processor Area"
+msgstr "Area del processador"
+
+#: src/ui/gui/data-editor.ui:677
+msgid "Case Counter Area"
+msgstr "Area del Recompte"
+
+#: src/ui/gui/data-editor.ui:702
+msgid "Filter Use Status Area"
+msgstr "Area del Filtre"
+
+#: src/ui/gui/data-editor.ui:728
+msgid "Weight Status Area"
+msgstr "Area de Ponderació"
+
+#: src/ui/gui/data-editor.ui:754
+msgid "Split File Status Area"
+msgstr "Area de Divisió"
+
+#: src/ui/gui/output-viewer.ui:22
+#, fuzzy
+msgid "_Export"
+msgstr "_Explorar"
+
+#: src/ui/gui/syntax-editor.ui:100
+msgid "_Run"
+msgstr "Executa_r"
+
+#: src/ui/gui/syntax-editor.ui:106
+msgid "All"
+msgstr "Tots"
+
+#: src/ui/gui/syntax-editor.ui:112
+msgid "Selection"
+msgstr "Selecció"
+
+#: src/ui/gui/syntax-editor.ui:118
+msgid "Current Line"
+msgstr "Linia actual"
+
+#: src/ui/gui/syntax-editor.ui:125
+msgid "To End"
+msgstr "Fins al final"
+
+#~ msgid "Dependent variable must be numeric."
+#~ msgstr "La variable dependent ha de ser numèrica."
+
+#~ msgid "Variable %s has label of invalid length %zu."
+#~ msgstr "Variable %s té una etiqueta de longitud no vàlida %zu."
+
+#~ msgid "_About"
+#~ msgstr "Qu_ant a..."
+
+#~ msgid "Buttons"
+#~ msgstr "Botons"
+
+#~ msgid "The mask that decides what buttons appear in the button box"
+#~ msgstr "La màscara que decideix quins botons apareixen a la caixa de botons"
+
+#~ msgid "The dictionary to be displayed by this widget"
+#~ msgstr "El diccionari que es mostrarà amb aquest widget"
+
+#~ msgid "A predicate function"
+#~ msgstr "Una funció de predicat"
+
+#~ msgid "How many things can be selected"
+#~ msgstr "Quantes coses es poden seleccionar"
+
+#~ msgid "searching for \"%s\" in path \"%s\""
+#~ msgstr "cercant \"%s\" dins la carpeta \"%s\""
+
+#~ msgid "...found \"%s\""
+#~ msgstr "...\"%s\" trobat"
+
+#~ msgid "...not found"
+#~ msgstr "...no es troba"
+
+#~ msgid "little-endian"
+#~ msgstr "little-endian"
+
+#~ msgid "big-endian"
+#~ msgstr "big-endian"
+
+#~ msgid "Compressed data is corrupt."
+#~ msgstr "Les dades comprimides estan malmeses."
+
+#~ msgid "opening \"%s\" as syntax file"
+#~ msgstr "obrint \"%s\" com a arxiu de sintaxi"
+
+#~ msgid "%s is not allowed inside INPUT PROGRAM."
+#~ msgstr "%s no es permet dins de INPUT PROGRAM."
+
+#~ msgid "REORDER subcommand may be given at most once."
+#~ msgstr "El subcomando REORDER pot ser emès més d'un cop."
+
+#~ msgid "`(' expected on REORDER subcommand."
+#~ msgstr "`(' esperat en el subcomando REORDER."
+
+#~ msgid "Unknown."
+#~ msgstr "Desconegut."
+
+#~ msgid "System File."
+#~ msgstr "Arxiu de Sistema."
+
+#~ msgid "%s: `.' expected after string."
+#~ msgstr "%s: `.' esperat després de la cadena."
+
+#~ msgid "S E Mean"
+#~ msgstr "Mitj. E.E."
+
+#~ msgid "S E Kurt"
+#~ msgstr "Curt.E.E."
+
+#~ msgid "S E Skew"
+#~ msgstr "Asim.E.E."
+
+#~ msgid "BY is required when TABLE is specified."
+#~ msgstr "BY és necessari quan TABLE és especificat."
+
+#~ msgid "opening font metrics file \"%s\""
+#~ msgstr "obrint arxiu de mètriques d'origen \"%s\""
+
+#~ msgid "first line must be StartFontMetrics"
+#~ msgstr "la primera línia ha de ser StarFontMetrics"
+
+#~ msgid "unsupported MappingScheme %d"
+#~ msgstr "MappingScheme %d no suportat"
+
+#~ msgid "required FontName is missing"
+#~ msgstr "Manca el FontName requerit"
+
+#~ msgid "CharMetrics line must start with C or CH"
+#~ msgstr "La línia CharMetrics ha de començar amb C o H"
+
+#~ msgid "reference to unknown character \"%s\""
+#~ msgstr "referència al caràcter desconegut \"%s\""
+
+#~ msgid "expected end of file"
+#~ msgstr "fi d'arxiu esperat"
+
+#~ msgid "syntax error expecting end of line"
+#~ msgstr "error de sintaxi en esperar el final de línia"
+
+#~ msgid "number out of valid range"
+#~ msgstr "número fora de l'interval vàlid"
+
+#~ msgid "invalid numeric syntax"
+#~ msgstr "sintaxi numèrica invàlida"
+
+#~ msgid "syntax error expecting integer"
+#~ msgstr "error de sintaxi tot esperant un sencer"
+
+#~ msgid "syntax error expecting number"
+#~ msgstr "error de sintaxi tot esperant un número"
+
+#~ msgid "syntax error in hex constant"
+#~ msgstr "error de sintaxi en constant hexadecimal"
+
+#~ msgid "syntax error expecting hex constant"
+#~ msgstr "error de sintaxi quan s'esperava un hexadecimal"
+
+#~ msgid "unexpected end of line"
+#~ msgstr "final de línia inesperat"
+
+#~ msgid "unexpected end of line expecting string"
+#~ msgstr "final de línia inesperat quan s'esperava una cadena"
+
+#~ msgid ""
+#~ "ascii: bad index value for `box' key: syntax is box[INDEX], 0 <= INDEX < %"
+#~ "d decimal, with INDEX expressed in base 4"
+#~ msgstr ""
+#~ "ascii: índex de valor defectuós per a la clau `box' : la sintaxi és la box"
+#~ "[INDEX], 0 <= INDEX < %d decimal, amb INDEX expressat en base 4"
+
+#~ msgid "ascii: multiple values for %s"
+#~ msgstr "ascii: valors múltiples per a %s"
+
+#~ msgid "ascii: only screen devices may have `auto' length or width"
+#~ msgstr ""
+#~ "ascii: només els dispositius de pantalla poden tenir longitud o amplada "
+#~ "`auto'"
+
+#~ msgid "ascii: positive integer required as `%s' value"
+#~ msgstr "ascii: enter positiu requerit com a valor `%s'"
+
+#~ msgid "ascii: `emphasis' value must be `bold', `underline', or `none'"
+#~ msgstr ""
+#~ "ascii: el valor d' `emphasis' ha de ser `bold', `underline', o `none'"
+
+#~ msgid "ascii: zero or positive integer required as `%s' value"
+#~ msgstr "ascii: zero o enter positiu requerit com a valor `%s'"
+
+#~ msgid "ascii: boolean value expected for `%s'"
+#~ msgstr "ascii: valor booleà esperat per a `%s'"
+
+#~ msgid "`chart-files' value must contain `#'"
+#~ msgstr "`chart-files' ha de contenir el valor `#'"
+
+#~ msgid "ascii: bad line (%d,%d)-(%d,%d) out of (%d,%d)\n"
+#~ msgstr "ascii: línia defectuosa (%d,%d)-(%d,%d) de (%d,%d)\n"
+
+#~ msgid "opening HTML output file: %s"
+#~ msgstr "obrint arxiu de resultat HTML: %s"
+
+#~ msgid "unknown configuration parameter `%s' for HTML device driver"
+#~ msgstr ""
+#~ "paràmetre de configuració `%s' desconegut per al dispositiu controlador "
+#~ "HTML"
+
+#~ msgid "error creating \"%s\""
+#~ msgstr "error en crear \"%s\""
+
+#~ msgid "unknown output driver `%s'"
+#~ msgstr " controlador de sortida desconegut `%s'"
+
+#~ msgid "output driver `%s' referenced but never defined"
+#~ msgstr "controlador de sortida `%s' referenciat però mai definit"
+
+#~ msgid "using default output driver configuration"
+#~ msgstr "utilitzant controlador de configuració de resultats per defecte"
+
+#~ msgid ""
+#~ "cannot find output initialization file (use `-vv' to view search path)"
+#~ msgstr ""
+#~ "no es pot trobar l'arxiu d'inicialització de resultats (utilitzar `-vv' "
+#~ "per a veure la ruta de cerca)"
+
+#~ msgid "cannot open \"%s\""
+#~ msgstr "no es pot obrir \"%s\""
+
+#~ msgid "reading \"%s\""
+#~ msgstr "llegint \"%s\""
+
+#~ msgid "syntax error"
+#~ msgstr "error de sintaxi"
+
+#~ msgid "error closing \"%s\""
+#~ msgstr "error en tancar \"%s\""
+
+#~ msgid "no active output drivers"
+#~ msgstr "no hi ha controladors de sortida actius"
+
+#~ msgid "error reading device definition file"
+#~ msgstr "error llegint l'arxiu de definició del dispositiu"
+
+#~ msgid ""
+#~ "Driver classes:\n"
+#~ "\t"
+#~ msgstr ""
+#~ "Clases de controlador:\n"
+#~ "\t"
+
+#~ msgid ""
+#~ "reached end of options inside quoted string parsing options for \"%s\" "
+#~ "driver"
+#~ msgstr ""
+#~ "Arribat al final d'opcions dins de la cadena entre cometes tot analitzant "
+#~ "opcions pel controlador \"%s\""
+
+#~ msgid "syntax error in string constant parsing options for \"%s\" driver"
+#~ msgstr ""
+#~ "error de sintaxi en una constant de cadena analitzant opcions pel "
+#~ "controlador \"%s\""
+
+#~ msgid "syntax error expecting `=' parsing options for driver \"%s\""
+#~ msgstr ""
+#~ "error de sintaxi quan s'esperava `=' analitzant les opcions pel "
+#~ "controlador \"%s\""
+
+#~ msgid "unknown output driver class `%.*s'"
+#~ msgstr "controlador de sortida de classe desconeguda `%.*s'"
+
+#~ msgid "unknown device type `%.*s'"
+#~ msgstr "tipus de dispositiu desconegut `%.*s'"
+
+#~ msgid "cannot initialize output driver `%s' of class `%s'"
+#~ msgstr ""
+#~ "no pot inicialitzar el controlador de sortida `%s' de la classe `%s'"
+
+#~ msgid "driver definition line missing driver name or class name"
+#~ msgstr ""
+#~ "línia de definició del controlador sense nom del controlador o nom de la "
+#~ "classe"
+
+#~ msgid "opening PostScript output file \"%s\""
+#~ msgstr "obrir l'arxiu de sortida PostScript \"%s\""
+
+#~ msgid "closing PostScript output file \"%s\""
+#~ msgstr "tanqui l'arxiu de sortida PostScript \"%s\""
+
+#~ msgid "unknown configuration parameter `%s' for PostScript device driver"
+#~ msgstr ""
+#~ "paràmetre de configuració desconegut`%s' pel controlador del dispositiu "
+#~ "PostScript"
+
+#~ msgid ""
+#~ "unknown orientation `%s' (valid orientations are `portrait' and "
+#~ "`landscape')"
+#~ msgstr ""
+#~ "orientació desconeguda `%s' (les orientacions vàlides són `retrat' i "
+#~ "`paisatge')"
+
+#~ msgid "boolean value expected for %s"
+#~ msgstr "valor booleà esperat per a %s"
+
+#~ msgid "positive integer value required for `%s'"
+#~ msgstr "valor enter positiu necessari per a `%s'"
+
+#~ msgid ""
+#~ "default font size must be at least 1 point (value of 1000 for key `%s')"
+#~ msgstr ""
+#~ "la mida de caràcter per defecte ha de ser com a mínim 1 punt (valor de "
+#~ "1000 per la clau `%s')"
+
+#~ msgid "could not find AFM file \"%s\""
+#~ msgstr "no es pot trobar l'arxiu AFM \"%s\""
+
+#~ msgid "could not find font \"%s\""
+#~ msgstr "no es pot trobar el caràcter \"%s\""
+
+#~ msgid "could not find encoding \"%s\""
+#~ msgstr "no es pot trobar la codificació \"%s\""
+
+#~ msgid "cannot open font file \"%s\""
+#~ msgstr "no es pot obrir l'arxiu de caràcter \"%s\""
+
+#~ msgid "reading font file \"%s\""
+#~ msgstr "llegint l'arxiu de caràcter \"%s\""
+
+#~ msgid "cannot open font encoding file \"%s\""
+#~ msgstr "no es pot obrir el fitxer de codificació del caràcter \"%s\""
+
+#~ msgid "invalid numeric format"
+#~ msgstr "format numèric no vàlid"
+
+#~ msgid "closing Postscript encoding \"%s\""
+#~ msgstr "tancament de codificació Postscript \"%s\""
+
+#~ msgid "creating \"%s\""
+#~ msgstr "creant \"%s\""
+
+#~ msgid ""
+#~ "set to `compatible' if you want output calculated from broken algorithms"
+#~ msgstr ""
+#~ "activeu `compatible' si voleu obtenir resultats calculat a partir "
+#~ "d'algorismes trencats"
+
+#~ msgid "Append DIR to include path"
+#~ msgstr "Adjuntar DIR a la ruta d'inclusió"
+
+#~ msgid "Clear include path"
+#~ msgstr "Esborrar la ruta d'inclusió"
+
+#~ msgid "Disable execution of .pspp/rc at startup"
+#~ msgstr "Deshabilitar l'execució de .pspp/rc a l'inici"
+
+#~ msgid "Set configuration directory to DIR"
+#~ msgstr "Establir DIR com a directori de configuració"
+
+#~ msgid "Don't allow some unsafe operations"
+#~ msgstr "No permet algunes operacions insegures"
+
+#~ msgid ""
+#~ "Set to `compatible' if you want only to accept SPSS compatible syntax"
+#~ msgstr ""
+#~ "Activeu `compatible' si només voleu acceptar la sintaxi compatible de "
+#~ "l'SPSS"
+
+#~ msgid "PSPP --- A program for statistical analysis"
+#~ msgstr "PSPP ---Un programa d'anàlisi estadística"
+
+#~ msgid "FILE1, FILE2 ... FILEn"
+#~ msgstr "FILE1, FILE2 ... FILEn"
+
+#~ msgid "Options affecting input and output locations:"
+#~ msgstr "Opcions que afecten a ubicacions d'entrada i sortida:"
+
+#~ msgid "Diagnostic options:"
+#~ msgstr "Opcions de diagnòstic:"
+
+#~ msgid "Options affecting syntax and behavior:"
+#~ msgstr "Opcions que afecten a la sintaxi i al comportament:"
+
+#~ msgid "Cannot open %s (%s). Writing errors to stdout instead.\n"
+#~ msgstr ""
+#~ "No es pot obrir %s (%s). Alternativament, escrivint errors a stdout.\n"
+
+#~ msgid "Terminating execution of syntax file due to error."
+#~ msgstr "Finalitzant l'execució de l'arxiu de sintaxi degut a un error."
+
+#~ msgid "Increase diagnostic verbosity level"
+#~ msgstr "Augmentar el nivell de verbositat del diagnòstic"
+
+#~ msgid "Send error messages to FILE (appended)"
+#~ msgstr "Enviar missatges d'error a FILE (annexa)"
+
+#~ msgid "Select output driver DEVICE and disable defaults"
+#~ msgstr ""
+#~ "Seleccionar el controlador de sortida DEVICE i desactivar els valors per "
+#~ "defecte"
+
+#~ msgid "Print a list of known driver classes, then exit"
+#~ msgstr ""
+#~ "Imprimir una llista de classes de controladors coneguts, després sortir"
+
+#~ msgid "Start an interactive session"
+#~ msgstr "Inici d'una sessió interactiva"
+
+#~ msgid "Style of bevel around the custom entry button"
+#~ msgstr "Estil de bisell al voltant del botó d'entrada personalitzada"
+
+#~ msgid "Cannot open reference manual: %s"
+#~ msgstr "No es pot obrir el manual de referència: %s"
+
+#~ msgid "Don't show the splash screen"
+#~ msgstr "No tornar a mostrar la pantalla de benvinguda"
+
+#~ msgid "PSPPIRE --- A user interface for PSPP"
+#~ msgstr "PSPPIRE --- Una interfície d'usuari per a PSPP"
+
+#~ msgid "Miscellaneous options:"
+#~ msgstr "Diverses opcions:"
+
+#~ msgid "data file error"
+#~ msgstr "Error en l'arxiu de dades"
+
+#~ msgid "PSPP error"
+#~ msgstr "Error de PSPP"
+
+#~ msgid "syntax warning"
+#~ msgstr "avís de sintaxi"
+
+#~ msgid "data file warning"
+#~ msgstr "avís de l'arxiu de dades"
+
+#~ msgid "PSPP warning"
+#~ msgstr "avís de PSPP"
+
+#~ msgid "syntax information"
+#~ msgstr "informació de sintaxi"
+
+#~ msgid "data file information"
+#~ msgstr "informació de l'arxiu de dades"
+
+#~ msgid "PSPP information"
+#~ msgstr "Informació del PSPP"
+
+#~ msgid "The PSPP processing engine reported the following message:"
+#~ msgid_plural "The PSPP processing engine reported the following messages:"
+#~ msgstr[0] "El processador de PSPP ha donat el seguent missatge:"
+#~ msgstr[1] "El processador de PSPP ha donat el seguent missatge:"
+
+#~ msgid "The PSPP processing engine reported %d message."
+#~ msgid_plural "The PSPP processing engine reported %d messages."
+#~ msgstr[0] "El processador de PSPP ha donat el missatge %d."
+#~ msgstr[1] "El processador de PSPP ha donat el missatge %d."
+
+#~ msgid "%d of these messages are displayed below."
+#~ msgid_plural "%d of these messages are displayed below."
+#~ msgstr[0] "%d d'aquests missatges es mostren a continuació."
+#~ msgstr[1] "%d d'aquests missatges es mostren a continuació."
+
+#~ msgid "Clear"
+#~ msgstr "Eliminar"
+
+#~ msgid "Insert Case"
+#~ msgstr "Insertar Cas"
+
+#~ msgid "Open a data file"
+#~ msgstr "Obrir un arxiu de dades"
+
+#~ msgid "New data file"
+#~ msgstr "Nou arxiu de dades"
+
+#~ msgid "Import text data file"
+#~ msgstr "Importar arxiu de  text"
+
+#~ msgid "Save data to file"
+#~ msgstr "Desar dades a arxiu"
+
+#~ msgid "Select cases from the active file"
+#~ msgstr "Seleccionar cassos de l'arxiu actiu"
+
+#~ msgid "Compute new values for a variable"
+#~ msgstr "Calcular nous valors per a la variable"
+
+#~ msgid "Perform one way analysis of variance"
+#~ msgstr "Realitza análisi de la variancia d'un factor"
+
+#~ msgid "Calculate T Test for samples from independent groups"
+#~ msgstr "Calcula proves T per a mostres de grups independents"
+
+#~ msgid "Calculate T Test for paired samples"
+#~ msgstr "Calcula proves T per a mostres aparellades"
+
+#~ msgid "Calculate T Test for sample from a single distribution"
+#~ msgstr "Calcula proves T per a mostra d'una distribució única"
+
+#~ msgid "Commentary text for the data file"
+#~ msgstr "Comentario textual per a l'arxiu de dades"
+
+#~ msgid "Recode values into the same variables"
+#~ msgstr "Recodificar valors en les mateixes variables"
+
+#~ msgid "Recode values into different variables"
+#~ msgstr "Recodificar valors a diferents variables"
+
+#~ msgid "Calculate descriptive statistics (mean, variance, ...)"
+#~ msgstr "Calcular estadístques descriptives (mitjana, variancia,...)"
+
+#~ msgid "Generate frequency statistics"
+#~ msgstr "Generar estadístiques de freqüències"
+
+#~ msgid "Generate crosstabulations"
+#~ msgstr "Generar tabulació encreuada"
+
+#~ msgid "Examine Data by Factors"
+#~ msgstr "Examinar les dades segons Factors"
+
+#~ msgid "Estimate parameters of the linear model"
+#~ msgstr "Estimar parámetres del model lineal"
+
+#~ msgid "Split the window vertically and horizontally"
+#~ msgstr "Dividir la finestra verticalment i horizontalment"
+
+#~ msgid "Open Syntax"
+#~ msgstr "Obrir sintaxi"
+
+#~ msgid "Var 1"
+#~ msgstr "Var 1"
+
+#~ msgid "Var 2"
+#~ msgstr "Var 2"
+
+#~ msgid "gtk-find"
+#~ msgstr "gtk-find"
+
+#~ msgid "Print"
+#~ msgstr "Iimprimir"
+
+#~ msgid "Recall"
+#~ msgstr "Refer"
+
+#~ msgid "Undo"
+#~ msgstr "Desfer"
+
+#~ msgid "Redo"
+#~ msgstr "Re-Fer"
+
+#~ msgid "Find"
+#~ msgstr "Cercar"
+
+#~ msgid "Use Sets"
+#~ msgstr "Utilitzar conjunts"
+
+#~ msgid "Ascending Counts"
+#~ msgstr "Recompte Ascendent"
+
+#~ msgid "Descending Counts"
+#~ msgstr "Recompte Descendent"
+
+#~ msgid "Supress tables with more than N categories"
+#~ msgstr "Suprimir les taules amb més de N categories"
+
+#~ msgid "Maximum no of categories"
+#~ msgstr "Màxim nombre de categories"
+
+#~ msgid "Messages Reported"
+#~ msgstr "S'han generat missatges"
+
+#~ msgid ""
+#~ "The PSPP processor reported # errors.  The first # and last # are shown "
+#~ "below:"
+#~ msgstr ""
+#~ "El processador d'PSPP ha genrat # errors.  Els primers # y els darrers # "
+#~ "es mostren a continuació:"
+
+#~ msgid "gtk-close"
+#~ msgstr "tanca-gtk"
+
+#~ msgid "gtk-go-back"
+#~ msgstr "gtk-go-back"
+
+#~ msgid "gtk-go-forward"
+#~ msgstr "gtk-go-forward"
+
+#~ msgid "gtk-save"
+#~ msgstr "gtk-save"
+
+#~ msgid "gtk-save-as"
+#~ msgstr "gtk-save-as"
+
+#~ msgid "gtk-copy"
+#~ msgstr "gtk-copy"
+
+#~ msgid "System-Missing"
+#~ msgstr "Perduts del sistema"
+
+#~ msgid ""
+#~ "Alpha\n"
+#~ "Split"
+#~ msgstr ""
+#~ "Alpha\n"
+#~ "Dividit"
+
+#~ msgid ""
+#~ "At most one of BARCHART, HISTOGRAM, or HBAR should be given.  HBAR will "
+#~ "be assumed.  Argument values will be given precedence increasing along "
+#~ "the order given."
+#~ msgstr ""
+#~ "Al menys s'ha de donar algun BARCHART, HISTOGRAM o HBAR.  S'assumeix "
+#~ "HBAR.  Els valors d'arguments Argument tindrán preferencia creixent en "
+#~ "aquest mateix ordre)."
+
+#~ msgid "Variable %s specified multiple times on VARIABLES subcommand."
+#~ msgstr ""
+#~ "La variable %s s'ha especificat més d'una vegada a l'ordre VARIABLES."
+
+#~ msgid "Cum"
+#~ msgstr "Acumulat"
+
+#~ msgid "Freq"
+#~ msgstr "Freq"
+
+#~ msgid "Pct"
+#~ msgstr "Pct"
+
+#~ msgid "N of items"
+#~ msgstr "N d'elements"
+
+#~ msgid "SE. Mean"
+#~ msgstr "E.E. Mitj."
+
+#~ msgid "`/FORMAT WEIGHT' specified, but weighting is not on."
+#~ msgstr "`/FORMAT WEIGHT' especificat, però la ponderació no està activada."
+
+#~ msgid "Line"
+#~ msgstr "Linea"
index 9db312669c527f0e248e08a71b99e5d55ba84f3d..4ebdd60b9dae66c1ad45f0b85bd218ac86fe39ad 100644 (file)
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PSPP 0.7.0\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2009-08-30 17:52+0200\n"
+"POT-Creation-Date: 2010-05-21 12:02+0200\n"
 "PO-Revision-Date: 2008-11-05 08:17+0900\n"
 "Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
 "Language-Team: John Darrington <john@darrington.wattle.id.au>\n"
@@ -14,79 +14,64 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/ui/gui/psppire-buttonbox.c:143
-msgid "Buttons"
-msgstr ""
-
-#: src/ui/gui/psppire-buttonbox.c:144
-msgid "The mask that decides what buttons appear in the button box"
-msgstr ""
-
-#: src/ui/gui/psppire-buttonbox.c:273 src/ui/gui/psppire-buttonbox.c:435
+#: src/ui/gui/psppire-buttonbox.c:275 src/ui/gui/psppire-buttonbox.c:437
 msgid "Continue"
 msgstr ""
 
-#: src/ui/gui/psppire-buttonbox.c:433
+#: src/ui/gui/psppire-buttonbox.c:435
 msgid "OK"
 msgstr ""
 
-#: src/ui/gui/psppire-buttonbox.c:434
+#: src/ui/gui/psppire-buttonbox.c:436
 msgid "Go To"
 msgstr ""
 
-#: src/ui/gui/psppire-buttonbox.c:436
+#: src/ui/gui/psppire-buttonbox.c:438
 msgid "Cancel"
 msgstr ""
 
-#: src/ui/gui/psppire-buttonbox.c:437
+#: src/ui/gui/psppire-buttonbox.c:439
 msgid "Help"
 msgstr ""
 
-#: src/ui/gui/psppire-buttonbox.c:438
+#: src/ui/gui/psppire-buttonbox.c:440
 msgid "Reset"
 msgstr ""
 
-#: src/ui/gui/psppire-buttonbox.c:439
+#: src/ui/gui/psppire-buttonbox.c:441
 msgid "Paste"
 msgstr ""
 
-#: src/ui/gui/psppire-dictview.c:207
-msgid "The dictionary to be displayed by this widget"
-msgstr ""
-
-#: src/ui/gui/psppire-dictview.c:214
-msgid "A predicate function"
-msgstr ""
-
-#: src/ui/gui/psppire-dictview.c:221
-msgid "How many things can be selected"
-msgstr ""
-
-#: src/ui/gui/psppire-dictview.c:491 src/language/dictionary/split-file.c:84
-#: src/language/dictionary/sys-file-info.c:169
-#: src/language/dictionary/sys-file-info.c:393
-#: src/language/dictionary/sys-file-info.c:725
-#: src/language/stats/descriptives.c:885
-#: src/language/data-io/data-parser.c:650
-#: src/language/data-io/data-parser.c:691 src/language/data-io/print.c:404
+#: src/ui/gui/psppire-dictview.c:466 src/language/dictionary/split-file.c:82
+#: src/language/dictionary/sys-file-info.c:150
+#: src/language/dictionary/sys-file-info.c:340
+#: src/language/dictionary/sys-file-info.c:664
+#: src/language/stats/descriptives.c:881
+#: src/language/data-io/data-parser.c:649
+#: src/language/data-io/data-parser.c:688 src/language/data-io/print.c:403
 msgid "Variable"
 msgstr ""
 
-#: src/ui/gui/psppire-dictview.c:528
+#: src/ui/gui/psppire-dictview.c:503
 msgid "Prefer variable labels"
 msgstr ""
 
-#: src/data/any-reader.c:57
+#: src/ui/gui/psppire-var-view.c:193
+#, c-format
+msgid "Var%d"
+msgstr ""
+
+#: src/data/any-reader.c:56
 #, c-format
 msgid "An error occurred while opening \"%s\": %s."
 msgstr ""
 
-#: src/data/any-reader.c:93
+#: src/data/any-reader.c:101
 #, c-format
 msgid "\"%s\" is not a system or portable file."
 msgstr ""
 
-#: src/data/any-reader.c:99 src/data/any-writer.c:63
+#: src/data/any-reader.c:107 src/data/any-writer.c:63
 msgid "The inline file is not allowed here."
 msgstr ""
 
@@ -256,13 +241,13 @@ msgstr ""
 msgid "scratch"
 msgstr ""
 
-#: src/data/dictionary.c:940
+#: src/data/dictionary.c:980
 msgid ""
 "At least one case in the data file had a weight value that was user-missing, "
 "system-missing, zero, or negative.  These case(s) were ignored."
 msgstr ""
 
-#: src/data/dictionary.c:1263
+#: src/data/dictionary.c:1283
 #, c-format
 msgid "Truncating document line to %d bytes."
 msgstr ""
@@ -282,21 +267,7 @@ msgstr ""
 msgid "Can't re-open %s as a %s."
 msgstr ""
 
-#: src/data/file-name.c:131
-#, c-format
-msgid "searching for \"%s\" in path \"%s\""
-msgstr ""
-
-#: src/data/file-name.c:146
-#, c-format
-msgid "...found \"%s\""
-msgstr ""
-
-#: src/data/file-name.c:153
-msgid "...not found"
-msgstr ""
-
-#: src/data/file-name.c:243
+#: src/data/file-name.c:168
 #, c-format
 msgid "Not opening pipe file `%s' because SAFER option set."
 msgstr ""
@@ -359,20 +330,20 @@ msgstr[1] ""
 msgid "%s variables are not compatible with %s format %s."
 msgstr ""
 
-#: src/data/format.c:327 src/data/sys-file-reader.c:734
-#: src/ui/gui/psppire-var-store.c:628 src/ui/gui/psppire.glade:2009
-#: src/ui/gui/var-sheet-dialogs.glade:139
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:628 src/ui/gui/psppire.ui:1960
+#: src/ui/gui/var-sheet-dialogs.ui:139
 msgid "String"
 msgstr ""
 
-#: src/data/format.c:327 src/data/sys-file-reader.c:734
-#: src/ui/gui/psppire-var-store.c:621 src/ui/gui/psppire.glade:2084
-#: src/ui/gui/var-sheet-dialogs.glade:28
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:621 src/ui/gui/psppire.ui:2040
+#: src/ui/gui/var-sheet-dialogs.ui:27
 msgid "Numeric"
 msgstr ""
 
-#: src/data/format.c:328 src/data/sys-file-reader.c:1299
-#: src/data/sys-file-reader.c:1301 src/language/xforms/recode.c:493
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
 #: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
 #: src/language/xforms/recode.c:507
 #: src/language/dictionary/apply-dictionary.c:78
@@ -380,8 +351,8 @@ msgstr ""
 msgid "numeric"
 msgstr ""
 
-#: src/data/format.c:328 src/data/sys-file-reader.c:1299
-#: src/data/sys-file-reader.c:1301 src/language/xforms/recode.c:493
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
 #: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
 #: src/language/xforms/recode.c:507
 #: src/language/dictionary/apply-dictionary.c:78
@@ -399,79 +370,79 @@ msgid ""
 "Support for Gnumeric files was not compiled into this installation of PSPP"
 msgstr ""
 
-#: src/data/gnumeric-reader.c:368
+#: src/data/gnumeric-reader.c:364
 #, c-format
 msgid "Error opening \"%s\" for reading as a Gnumeric file: %s."
 msgstr ""
 
-#: src/data/gnumeric-reader.c:388
+#: src/data/gnumeric-reader.c:384
 #, c-format
 msgid "Invalid cell range \"%s\""
 msgstr ""
 
-#: src/data/gnumeric-reader.c:520 src/data/psql-reader.c:187
+#: src/data/gnumeric-reader.c:516 src/data/psql-reader.c:187
 #, c-format
 msgid "Cannot create variable name from %s"
 msgstr ""
 
-#: src/data/gnumeric-reader.c:532
+#: src/data/gnumeric-reader.c:528
 #, c-format
 msgid "Selected sheet or range of spreadsheet \"%s\" is empty."
 msgstr ""
 
-#: src/data/make-file.c:64
+#: src/data/make-file.c:68
 #, c-format
 msgid "%s: Creating temporary file: %s."
 msgstr ""
 
-#: src/data/make-file.c:106
+#: src/data/make-file.c:110
 #, c-format
 msgid "%s: Creating file: %s."
 msgstr ""
 
-#: src/data/make-file.c:144
+#: src/data/make-file.c:148
 #, c-format
 msgid "Opening %s for writing: %s."
 msgstr ""
 
-#: src/data/make-file.c:153
+#: src/data/make-file.c:157
 #, c-format
 msgid "Opening stream for %s: %s."
 msgstr ""
 
-#: src/data/make-file.c:182
+#: src/data/make-file.c:186
 #, c-format
 msgid "Creating temporary file to replace %s: %s."
 msgstr ""
 
-#: src/data/make-file.c:193
+#: src/data/make-file.c:197
 #, c-format
 msgid "Creating temporary file %s: %s."
 msgstr ""
 
-#: src/data/make-file.c:205
+#: src/data/make-file.c:209
 #, c-format
 msgid "Opening stream for temporary file %s: %s."
 msgstr ""
 
-#: src/data/make-file.c:246
+#: src/data/make-file.c:250
 #, c-format
 msgid "Replacing %s by %s: %s."
 msgstr ""
 
-#: src/data/make-file.c:274
+#: src/data/make-file.c:278
 #, c-format
 msgid "Removing %s: %s."
 msgstr ""
 
 #: src/data/por-file-reader.c:99
 #, c-format
-msgid "portable file %s corrupt at offset 0x%lx: "
+msgid "portable file %s corrupt at offset 0x%llx: "
 msgstr ""
 
 #: src/data/por-file-reader.c:128
 #, c-format
-msgid "reading portable file %s at offset 0x%lx: "
+msgid "reading portable file %s at offset 0x%llx: "
 msgstr ""
 
 #: src/data/por-file-reader.c:156
@@ -581,7 +552,7 @@ msgstr ""
 msgid "Invalid variable name `%s' in position %d."
 msgstr ""
 
-#: src/data/por-file-reader.c:685 src/data/sys-file-reader.c:592
+#: src/data/por-file-reader.c:685 src/data/sys-file-reader.c:606
 #, c-format
 msgid "Bad width %d for variable %s."
 msgstr ""
@@ -675,62 +646,62 @@ msgstr ""
 
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
-#: src/data/scratch-writer.c:66
+#: src/data/scratch-writer.c:66 src/language/data-io/file-handle.q:181
 msgid "scratch file"
 msgstr ""
 
-#: src/data/settings.c:686
+#: src/data/settings.c:608
 #, c-format
 msgid ""
 "%s: Custom currency string `%s' does not contain exactly three periods or "
 "commas (or it contains both)."
 msgstr ""
 
-#: src/data/short-names.c:66
+#: src/data/short-names.c:52
 msgid "Variable suffix too large."
 msgstr ""
 
-#: src/data/sys-file-reader.c:213
+#: src/data/sys-file-reader.c:226
 #, c-format
 msgid "Recoded variable name duplicates an existing `%s' within system file."
 msgstr ""
 
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
-#: src/data/sys-file-reader.c:276 src/data/sys-file-writer.c:203
+#: src/data/sys-file-reader.c:290 src/data/sys-file-writer.c:207
 msgid "system file"
 msgstr ""
 
-#: src/data/sys-file-reader.c:283
+#: src/data/sys-file-reader.c:297
 #, c-format
 msgid "Error opening \"%s\" for reading as a system file: %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:322 tests/dissect-sysfile.c:136
+#: src/data/sys-file-reader.c:336 tests/dissect-sysfile.c:154
 msgid "Misplaced type 4 record."
 msgstr ""
 
-#: src/data/sys-file-reader.c:333 tests/dissect-sysfile.c:147
+#: src/data/sys-file-reader.c:347 tests/dissect-sysfile.c:165
 #, c-format
 msgid "Unrecognized record type %d."
 msgstr "Unrecognised record type %d."
 
-#: src/data/sys-file-reader.c:374
+#: src/data/sys-file-reader.c:388
 #, c-format
 msgid "File header claims %d variable positions but %d were read from file."
 msgstr ""
 
-#: src/data/sys-file-reader.c:414
+#: src/data/sys-file-reader.c:428
 #, c-format
 msgid "Error closing system file \"%s\": %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:479 src/data/sys-file-reader.c:489
-#: tests/dissect-sysfile.c:181 tests/dissect-sysfile.c:191
+#: src/data/sys-file-reader.c:493 src/data/sys-file-reader.c:503
+#: tests/dissect-sysfile.c:202 tests/dissect-sysfile.c:212
 msgid "This is not an SPSS system file."
 msgstr ""
 
-#: src/data/sys-file-reader.c:511 tests/dissect-sysfile.c:204
+#: src/data/sys-file-reader.c:525 tests/dissect-sysfile.c:227
 msgid ""
 "Compression bias is not the usual value of 100, or system file uses "
 "unrecognized floating-point format."
@@ -738,581 +709,638 @@ msgstr ""
 "Compression bias is not the usual value of 100, or system file uses \n"
 "unrecognised floating-point format."
 
-#: src/data/sys-file-reader.c:588
+#: src/data/sys-file-reader.c:602
 #, c-format
 msgid "Invalid variable name `%s'."
 msgstr ""
 
-#: src/data/sys-file-reader.c:596
+#: src/data/sys-file-reader.c:610
 #, c-format
 msgid "Duplicate variable name `%s' within system file."
 msgstr ""
 
-#: src/data/sys-file-reader.c:604 tests/dissect-sysfile.c:328
+#: src/data/sys-file-reader.c:618 tests/dissect-sysfile.c:356
 msgid "Variable label indicator field is not 0 or 1."
 msgstr ""
 
-#: src/data/sys-file-reader.c:612 tests/dissect-sysfile.c:337
-#, c-format
-msgid "Variable %s has label of invalid length %zu."
-msgstr ""
-
-#: src/data/sys-file-reader.c:631 tests/dissect-sysfile.c:355
+#: src/data/sys-file-reader.c:649 tests/dissect-sysfile.c:387
 msgid "Numeric missing value indicator field is not -3, -2, 0, 1, 2, or 3."
 msgstr ""
 
-#: src/data/sys-file-reader.c:649 tests/dissect-sysfile.c:370
+#: src/data/sys-file-reader.c:667 tests/dissect-sysfile.c:402
 msgid "String missing value indicator field is not 0, 1, 2, or 3."
 msgstr ""
 
-#: src/data/sys-file-reader.c:681
+#: src/data/sys-file-reader.c:699
 msgid "Missing string continuation record."
 msgstr ""
 
-#: src/data/sys-file-reader.c:715
+#: src/data/sys-file-reader.c:733
 #, c-format
 msgid "Unknown variable format %<PRIu8>."
 msgstr ""
 
-#: src/data/sys-file-reader.c:733
+#: src/data/sys-file-reader.c:751
 #, c-format
 msgid "%s variable %s has invalid %s format %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:736
+#: src/data/sys-file-reader.c:754
 msgid "print"
 msgstr ""
 
-#: src/data/sys-file-reader.c:736
+#: src/data/sys-file-reader.c:754
 msgid "write"
 msgstr ""
 
-#: src/data/sys-file-reader.c:740
+#: src/data/sys-file-reader.c:758
 msgid "Suppressing further invalid format warnings."
 msgstr ""
 
-#: src/data/sys-file-reader.c:758
+#: src/data/sys-file-reader.c:776
 msgid "Weighting variable must be numeric."
 msgstr ""
 
-#: src/data/sys-file-reader.c:772
+#: src/data/sys-file-reader.c:790
 msgid "Multiple type 6 (document) records."
 msgstr ""
 
-#: src/data/sys-file-reader.c:776
+#: src/data/sys-file-reader.c:794
 #, c-format
 msgid "Number of document lines (%d) must be greater than 0."
 msgstr ""
 
-#: src/data/sys-file-reader.c:784
+#: src/data/sys-file-reader.c:802
 msgid "Document line contains null byte."
 msgstr ""
 
-#: src/data/sys-file-reader.c:874
+#: src/data/sys-file-reader.c:893
 #, c-format
 msgid ""
 "Unrecognized record type 7, subtype %d.  Please send a copy of this file, "
 "and the syntax which created it to %s"
 msgstr ""
 
-#: src/data/sys-file-reader.c:901 tests/dissect-sysfile.c:550
+#: src/data/sys-file-reader.c:920 tests/dissect-sysfile.c:594
 #, c-format
 msgid "Bad size (%zu) or count (%zu) field on record type 7, subtype 3."
 msgstr ""
 
-#: src/data/sys-file-reader.c:921
+#: src/data/sys-file-reader.c:940
 #, c-format
 msgid ""
 "Floating-point representation indicated by system file (%d) differs from "
 "expected (%d)."
 msgstr ""
 
-#: src/data/sys-file-reader.c:934
-msgid "little-endian"
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:110
+msgid "Little Endian"
 msgstr ""
 
-#: src/data/sys-file-reader.c:934
-msgid "big-endian"
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:109
+msgid "Big Endian"
 msgstr ""
 
-#: src/data/sys-file-reader.c:935
+#: src/data/sys-file-reader.c:954
 #, c-format
 msgid ""
 "Integer format indicated by system file (%s) differs from expected (%s)."
 msgstr ""
 
-#: src/data/sys-file-reader.c:992 tests/dissect-sysfile.c:581
+#: src/data/sys-file-reader.c:1011 tests/dissect-sysfile.c:625
 #, c-format
 msgid "Bad size (%zu) or count (%zu) on extension 4."
 msgstr ""
 
-#: src/data/sys-file-reader.c:996 src/data/sys-file-reader.c:1000
-#: src/data/sys-file-reader.c:1004 tests/dissect-sysfile.c:586
-#: tests/dissect-sysfile.c:591 tests/dissect-sysfile.c:596
+#: src/data/sys-file-reader.c:1015 src/data/sys-file-reader.c:1019
+#: src/data/sys-file-reader.c:1023 tests/dissect-sysfile.c:630
+#: tests/dissect-sysfile.c:635 tests/dissect-sysfile.c:640
 #, c-format
 msgid "File specifies unexpected value %g as %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1021 tests/dissect-sysfile.c:611
+#: src/data/sys-file-reader.c:1056
+#, c-format
+msgid "Missing space following 'C' at offset %zu in MRSETS record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1074 tests/dissect-sysfile.c:691
+#, c-format
+msgid "Missing space following 'E' at offset %zu in MRSETS record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1083 tests/dissect-sysfile.c:700
+#, c-format
+msgid ""
+"Unexpected label source value \"%s\" following 'E' at offset %zu in MRSETS "
+"record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1089
+#, c-format
+msgid "Missing 'C', 'D', or 'E' at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1118
+#, c-format
+msgid "Missing new-line parsing variable names at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1129
+#, c-format
+msgid "Duplicate variable name %s at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1142
+#, c-format
+msgid "MRSET %s contains both string and numeric variables."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1157
+#, c-format
+msgid "MRSET %s has only %zu variables."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1194 tests/dissect-sysfile.c:758
 #, c-format
 msgid "Bad size %zu on extension 11."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1033 tests/dissect-sysfile.c:623
+#: src/data/sys-file-reader.c:1206 tests/dissect-sysfile.c:770
 #, c-format
 msgid "Extension 11 has bad count %zu (for %zu variables)."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1054
+#: src/data/sys-file-reader.c:1227
 #, c-format
 msgid ""
 "Invalid variable display parameters for variable %zu (%s).  Default "
 "parameters substituted."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1098
+#: src/data/sys-file-reader.c:1271
 #, c-format
 msgid "Long variable mapping from %s to invalid variable name `%s'."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1108
+#: src/data/sys-file-reader.c:1281
 #, c-format
 msgid "Duplicate long variable name `%s' within system file."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1161
+#: src/data/sys-file-reader.c:1334
 #, c-format
 msgid "%s listed as string of invalid length %s in very length string record."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1171
+#: src/data/sys-file-reader.c:1344
 #, c-format
 msgid ""
 "%s listed in very long string record with width %s, which requires only one "
 "segment."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1177
+#: src/data/sys-file-reader.c:1350
 #, c-format
 msgid "Very long string %s overflows dictionary."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1191
+#: src/data/sys-file-reader.c:1364
 #, c-format
 msgid ""
 "Very long string with width %ld has segment %d of width %d (expected %d)"
 msgstr ""
 
-#: src/data/sys-file-reader.c:1237
+#: src/data/sys-file-reader.c:1410
 #, c-format
 msgid "Invalid number of labels: %d.  Ignoring labels."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1268 tests/dissect-sysfile.c:426
+#: src/data/sys-file-reader.c:1441 tests/dissect-sysfile.c:468
 msgid ""
 "Variable index record (type 4) does not immediately follow value label "
 "record (type 3) as it should."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1275
+#: src/data/sys-file-reader.c:1448
 #, c-format
 msgid ""
 "Number of variables associated with a value label (%d) is not between 1 and "
 "the number of variables (%zu)."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1286
+#: src/data/sys-file-reader.c:1459
 #, c-format
 msgid ""
 "Value labels may not be added to long string variables (e.g. %s) using "
 "records types 3 and 4."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1295
+#: src/data/sys-file-reader.c:1468
 #, c-format
 msgid ""
 "Variables associated with value label are not all of identical type.  "
 "Variable %s is %s, but variable %s is %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1329
+#: src/data/sys-file-reader.c:1502
 #, c-format
 msgid "Duplicate value label for %g on %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1332 src/data/sys-file-reader.c:1513
+#: src/data/sys-file-reader.c:1505 src/data/sys-file-reader.c:1686
 #, c-format
 msgid "Duplicate value label for \"%.*s\" on %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1370
+#: src/data/sys-file-reader.c:1543
 #, c-format
 msgid "Error parsing attribute value %s[%d]"
 msgstr ""
 
-#: src/data/sys-file-reader.c:1384
+#: src/data/sys-file-reader.c:1557
 #, c-format
 msgid "Attribute value %s[%d] is not quoted: %s"
 msgstr ""
 
-#: src/data/sys-file-reader.c:1447 tests/dissect-sysfile.c:762
+#: src/data/sys-file-reader.c:1620 tests/dissect-sysfile.c:936
 #, c-format
 msgid ""
 "Variable name length in long string value label record (%d) exceeds %d-byte "
 "limit."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1457
+#: src/data/sys-file-reader.c:1630
 #, c-format
 msgid "Ignoring long string value record for unknown variable %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1464
+#: src/data/sys-file-reader.c:1637
 #, c-format
 msgid "Ignoring long string value record for numeric variable %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1471
+#: src/data/sys-file-reader.c:1644
 #, c-format
 msgid ""
 "Ignoring long string value record for variable %s because the record's width "
 "(%d) does not match the variable's width (%d)"
 msgstr ""
 
-#: src/data/sys-file-reader.c:1493
+#: src/data/sys-file-reader.c:1666
 #, c-format
 msgid ""
 "Ignoring long string value %zu for variable %s, with width %d, that has bad "
 "value width %zu."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1608
+#: src/data/sys-file-reader.c:1781
 msgid "File ends in partial case."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1616
+#: src/data/sys-file-reader.c:1789
 #, c-format
 msgid "Error reading case from file %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1713 src/data/sys-file-reader.c:1749
-msgid "Compressed data is corrupt."
+#: src/data/sys-file-reader.c:1890
+msgid ""
+"Possible compressed data corruption: compressed spaces appear in numeric "
+"field."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1943
+#, c-format
+msgid ""
+"Possible compressed data corruption: string contains compressed integer "
+"(opcode %d)"
 msgstr ""
 
-#: src/data/sys-file-reader.c:1836
+#: src/data/sys-file-reader.c:2035
 #, c-format
 msgid "Variable index %d not in valid range 1...%d."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1841
+#: src/data/sys-file-reader.c:2040
 #, c-format
 msgid "Variable index %d refers to long string continuation."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1909
+#: src/data/sys-file-reader.c:2108
 #, c-format
 msgid "Suppressed %d additional related warnings."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1950
+#: src/data/sys-file-reader.c:2153 src/data/sys-file-reader.c:2170
+#, c-format
+msgid "Dictionary record refers to unknown variable %s."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2231
+#, c-format
+msgid "Expecting digit at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2238
+#, c-format
+msgid "Expecting space at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2245
 #, c-format
-msgid "Variable map refers to unknown variable %s."
+msgid "%zu-byte string starting at offset %zu exceeds record length %zu."
 msgstr ""
 
-#: src/data/sys-file-reader.c:2058 tests/dissect-sysfile.c:959
+#: src/data/sys-file-reader.c:2255
+#, c-format
+msgid "Expecting space at offset %zu following %zu-byte string."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2347 tests/dissect-sysfile.c:1341
 #, c-format
 msgid "System error: %s."
 msgstr ""
 
-#: src/data/sys-file-reader.c:2060 tests/dissect-sysfile.c:961
+#: src/data/sys-file-reader.c:2349 tests/dissect-sysfile.c:1343
 msgid "Unexpected end of file."
 msgstr ""
 
-#: src/data/sys-file-writer.c:176
+#: src/data/sys-file-writer.c:180
 #, c-format
 msgid "Unknown system file version %d. Treating as version %d."
 msgstr ""
 
-#: src/data/sys-file-writer.c:215
+#: src/data/sys-file-writer.c:219
 #, c-format
 msgid "Error opening \"%s\" for writing as a system file: %s."
 msgstr ""
 
-#: src/data/sys-file-writer.c:923
+#: src/data/sys-file-writer.c:989
 #, c-format
 msgid "An I/O error occurred writing system file \"%s\"."
 msgstr ""
 
-#: src/data/variable.c:242
+#: src/data/variable.c:206
 #, c-format
 msgid ""
 "Character `%c' (in %s) may not appear as the first character in a variable "
 "name."
 msgstr ""
 
-#: src/data/variable.c:254
+#: src/data/variable.c:218
 #, c-format
 msgid "Character `%c' (in %s) may not appear in a variable name."
 msgstr ""
 
-#: src/data/variable.c:282
+#: src/data/variable.c:244
 msgid "Variable name cannot be empty string."
 msgstr ""
 
-#: src/data/variable.c:288
+#: src/data/variable.c:250
 #, c-format
 msgid "Variable name %s exceeds %d-character limit."
 msgstr ""
 
-#: src/data/variable.c:296
+#: src/data/variable.c:258
 #, c-format
 msgid "`%s' may not be used as a variable name because it is a reserved word."
 msgstr ""
 
-#: src/language/syntax-file.c:88
-#, c-format
-msgid "opening \"%s\" as syntax file"
-msgstr ""
-
-#: src/language/syntax-file.c:93
+#: src/language/syntax-file.c:95
 #, c-format
 msgid "Opening `%s': %s."
 msgstr ""
 
-#: src/language/syntax-file.c:107
+#: src/language/syntax-file.c:109
 #, c-format
 msgid "Reading `%s': %s."
 msgstr ""
 
-#: src/language/syntax-file.c:127
+#: src/language/syntax-file.c:126
 #, c-format
 msgid "Closing `%s': %s."
 msgstr ""
 
-#: src/language/command.c:208 src/language/expressions/parse.c:1267
+#: src/language/command.c:205 src/language/expressions/parse.c:1267
+#: src/language/utilities/set.q:213
 #, c-format
 msgid "%s is not yet implemented."
 msgstr ""
 
-#: src/language/command.c:214
+#: src/language/command.c:210
 #, c-format
 msgid "%s may be used only in testing mode."
 msgstr ""
 
-#: src/language/command.c:220
+#: src/language/command.c:215
 #, c-format
 msgid "%s may be used only in enhanced syntax mode."
 msgstr ""
 
-#: src/language/command.c:248
+#: src/language/command.c:239
 msgid "Error encountered while ERROR=STOP is effective."
 msgstr ""
 
-#: src/language/command.c:489
+#: src/language/command.c:484
 msgid "expecting command name"
 msgstr ""
 
-#: src/language/command.c:503
+#: src/language/command.c:498
 #, c-format
 msgid "Unknown command %s."
 msgstr ""
 
-#: src/language/command.c:628
+#: src/language/command.c:623
 #, c-format
 msgid "%s is allowed only before the active file has been defined."
 msgstr ""
 
-#: src/language/command.c:632
+#: src/language/command.c:627
 #, c-format
 msgid "%s is allowed only after the active file has been defined."
 msgstr ""
 
-#: src/language/command.c:636
+#: src/language/command.c:631
 #, c-format
 msgid "%s is allowed only inside INPUT PROGRAM."
 msgstr ""
 
-#: src/language/command.c:640
+#: src/language/command.c:635
 #, c-format
 msgid "%s is allowed only inside FILE TYPE."
 msgstr ""
 
-#: src/language/command.c:647
+#: src/language/command.c:642
 #, c-format
 msgid ""
 "%s is allowed only before the active file has been defined or inside INPUT "
 "PROGRAM."
 msgstr ""
 
-#: src/language/command.c:651
+#: src/language/command.c:646
 #, c-format
 msgid ""
 "%s is allowed only before the active file has been defined or inside FILE "
 "TYPE."
 msgstr ""
 
-#: src/language/command.c:655
+#: src/language/command.c:650
 #, c-format
 msgid ""
 "%s is allowed only after the active file has been defined or inside INPUT "
 "PROGRAM."
 msgstr ""
 
-#: src/language/command.c:659
+#: src/language/command.c:654
 #, c-format
 msgid ""
 "%s is allowed only after the active file has been defined or inside FILE "
 "TYPE."
 msgstr ""
 
-#: src/language/command.c:663
+#: src/language/command.c:658
 #, c-format
 msgid "%s is allowed only inside INPUT PROGRAM or inside FILE TYPE."
 msgstr ""
 
-#: src/language/command.c:669
+#: src/language/command.c:664
 #, c-format
 msgid ""
 "%s is allowed only after the active file has been defined, inside INPUT "
 "PROGRAM, or inside FILE TYPE."
 msgstr ""
 
-#: src/language/command.c:674
+#: src/language/command.c:669
 #, c-format
 msgid ""
 "%s is allowed only before the active file has been defined, inside INPUT "
 "PROGRAM, or inside FILE TYPE."
 msgstr ""
 
-#: src/language/command.c:692
+#: src/language/command.c:687 src/language/command.c:689
 #, c-format
-msgid "%s is not allowed inside INPUT PROGRAM."
+msgid "%s is not allowed inside %s."
 msgstr ""
 
-#: src/language/command.c:694
-#, c-format
-msgid "%s is not allowed inside FILE TYPE."
-msgstr ""
-
-#: src/language/command.c:773 src/language/command.c:881
+#: src/language/command.c:768 src/language/command.c:876
 #: src/language/utilities/permissions.c:98
 msgid "This command not allowed when the SAFER option is set."
 msgstr ""
 
-#: src/language/command.c:785
+#: src/language/command.c:780
 #, c-format
 msgid "Error removing `%s': %s."
 msgstr ""
 
-#: src/language/command.c:835
+#: src/language/command.c:830
 #, c-format
 msgid "Couldn't fork: %s."
 msgstr ""
 
-#: src/language/command.c:850
+#: src/language/command.c:845
 msgid "Interactive shell not supported on this platform."
 msgstr ""
 
-#: src/language/command.c:862
+#: src/language/command.c:857
 msgid "Command shell not supported on this platform."
 msgstr ""
 
-#: src/language/command.c:868
+#: src/language/command.c:863
 #, c-format
 msgid "Error executing command: %s."
 msgstr ""
 
-#: src/language/lexer/lexer.c:283
+#: src/language/lexer/lexer.c:284
 #, c-format
 msgid "%s does not form a valid number."
 msgstr ""
 
-#: src/language/lexer/lexer.c:389
+#: src/language/lexer/lexer.c:390
 #, c-format
 msgid "Bad character in input: `%s'."
 msgstr ""
 
-#: src/language/lexer/lexer.c:426
+#: src/language/lexer/lexer.c:427
 #, c-format
 msgid "Subcommand %s may only be specified once."
 msgstr ""
 
-#: src/language/lexer/lexer.c:434
+#: src/language/lexer/lexer.c:435
 #, c-format
 msgid "missing required subcommand %s"
 msgstr ""
 
-#: src/language/lexer/lexer.c:463
+#: src/language/lexer/lexer.c:464
 #, c-format
 msgid "Syntax error %s at %s."
 msgstr ""
 
-#: src/language/lexer/lexer.c:466
+#: src/language/lexer/lexer.c:467
 #, c-format
 msgid "Syntax error at %s."
 msgstr ""
 
-#: src/language/lexer/lexer.c:478 src/language/xforms/select-if.c:60
-#: src/language/stats/autorecode.c:154 src/language/data-io/print-space.c:73
+#: src/language/lexer/lexer.c:479 src/language/xforms/select-if.c:60
+#: src/language/stats/autorecode.c:144 src/language/data-io/print-space.c:73
 msgid "expecting end of command"
 msgstr ""
 
-#: src/language/lexer/lexer.c:600 src/language/lexer/lexer.c:617
+#: src/language/lexer/lexer.c:601 src/language/lexer/lexer.c:618
 #, c-format
 msgid "expecting `%s'"
 msgstr ""
 
-#: src/language/lexer/lexer.c:631
+#: src/language/lexer/lexer.c:632
 msgid "expecting string"
 msgstr ""
 
-#: src/language/lexer/lexer.c:645
+#: src/language/lexer/lexer.c:646
 msgid "expecting integer"
 msgstr ""
 
-#: src/language/lexer/lexer.c:658
+#: src/language/lexer/lexer.c:659
 msgid "expecting number"
 msgstr ""
 
-#: src/language/lexer/lexer.c:670
+#: src/language/lexer/lexer.c:671
 msgid "expecting identifier"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1064
+#: src/language/lexer/lexer.c:1065
 msgid "binary"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1069
+#: src/language/lexer/lexer.c:1070
 msgid "octal"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1074
+#: src/language/lexer/lexer.c:1075
 msgid "hex"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1084
+#: src/language/lexer/lexer.c:1085
 #, c-format
 msgid "String of %s digits has %zu characters, which is not a multiple of %d."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1113
+#: src/language/lexer/lexer.c:1114
 #, c-format
 msgid "`%c' is not a valid %s digit."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1147
+#: src/language/lexer/lexer.c:1148
 msgid "Unterminated string constant."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1201
+#: src/language/lexer/lexer.c:1202
 msgid "Unexpected end of file in string concatenation."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1209
+#: src/language/lexer/lexer.c:1210
 msgid "String expected following `+'."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1222
+#: src/language/lexer/lexer.c:1223
 #, c-format
 msgid "String exceeds 255 characters in length (%zu characters)."
 msgstr ""
@@ -1356,57 +1384,58 @@ msgstr ""
 msgid "expecting number or data string"
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:63
+#: src/language/lexer/variable-parser.c:65
 msgid "expecting variable name"
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:73
+#: src/language/lexer/variable-parser.c:75
 #, c-format
 msgid "%s is not a variable name."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:176
+#: src/language/lexer/variable-parser.c:178
 #, c-format
 msgid ""
 "%s is not a numeric variable.  It will not be included in the variable list."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:179
+#: src/language/lexer/variable-parser.c:181
 #, c-format
 msgid ""
 "%s is not a string variable.  It will not be included in the variable list."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:183
+#: src/language/lexer/variable-parser.c:185
 #, c-format
 msgid "Scratch variables (such as %s) are not allowed here."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:187
+#: src/language/lexer/variable-parser.c:189
 #, c-format
 msgid ""
 "%s and %s are not the same type.  All variables in this variable list must "
 "be of the same type.  %s will be omitted from the list."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:193
+#: src/language/lexer/variable-parser.c:195
 #, c-format
 msgid ""
 "%s and %s are string variables with different widths.  All variables in this "
 "variable list must have the same width.  %s will be omitted from the list."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:198
+#: src/language/lexer/variable-parser.c:200
+#: src/language/lexer/variable-parser.c:496
 #, c-format
 msgid "Variable %s appears twice in variable list."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:311
+#: src/language/lexer/variable-parser.c:313
 #, c-format
 msgid "%s TO %s is not valid syntax since %s precedes %s in the dictionary."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:319
+#: src/language/lexer/variable-parser.c:321
 #, c-format
 msgid ""
 "When using the TO keyword to specify several variables, both variables must "
@@ -1414,19 +1443,19 @@ msgid ""
 "system variables.  %s is a %s variable, whereas %s is %s."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:393
+#: src/language/lexer/variable-parser.c:395
 msgid "incorrect use of TO convention"
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:436
+#: src/language/lexer/variable-parser.c:450
 msgid "Scratch variables not allowed here."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:458
+#: src/language/lexer/variable-parser.c:472
 msgid "Prefixes don't match in use of TO convention."
 msgstr ""
 
-#: src/language/lexer/variable-parser.c:463
+#: src/language/lexer/variable-parser.c:477
 msgid "Bad bounds in use of TO convention."
 msgstr ""
 
@@ -1544,41 +1573,41 @@ msgid ""
 "commands."
 msgstr ""
 
-#: src/language/control/repeat.c:171
+#: src/language/control/repeat.c:172
 #, c-format
 msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
 msgstr ""
 
-#: src/language/control/repeat.c:176
+#: src/language/control/repeat.c:177
 #, c-format
 msgid "Dummy variable name \"%s\" is given twice."
 msgstr ""
 
-#: src/language/control/repeat.c:222
+#: src/language/control/repeat.c:223
 #, c-format
 msgid ""
 "Dummy variable \"%.*s\" had %d substitutions, so \"%.*s\" must also, but %d "
 "were specified."
 msgstr ""
 
-#: src/language/control/repeat.c:334
+#: src/language/control/repeat.c:335
 msgid "DO REPEAT may not nest in compatibility mode."
 msgstr ""
 
-#: src/language/control/repeat.c:436
+#: src/language/control/repeat.c:437
 msgid "Ranges may only have integer bounds"
 msgstr ""
 
-#: src/language/control/repeat.c:445
+#: src/language/control/repeat.c:446
 #, c-format
 msgid "%g TO %g is an invalid range."
 msgstr ""
 
-#: src/language/control/repeat.c:480
+#: src/language/control/repeat.c:481
 msgid "String expected."
 msgstr ""
 
-#: src/language/control/repeat.c:499
+#: src/language/control/repeat.c:500
 msgid "No matching DO REPEAT."
 msgstr ""
 
@@ -1620,7 +1649,7 @@ msgid "`)' expected after output format."
 msgstr ""
 
 #: src/language/dictionary/missing-values.c:56
-#: src/language/stats/aggregate.c:458
+#: src/language/stats/aggregate.c:459
 msgid "expecting `('"
 msgstr ""
 
@@ -1648,7 +1677,9 @@ msgid ""
 msgstr ""
 
 #: src/language/dictionary/modify-variables.c:114
-msgid "REORDER subcommand may be given at most once."
+#: src/language/dictionary/modify-variables.c:177
+#, c-format
+msgid "%s subcommand may be given at most once."
 msgstr ""
 
 #: src/language/dictionary/modify-variables.c:137
@@ -1656,21 +1687,15 @@ msgid "Cannot specify ALL after specifying a set of variables."
 msgstr ""
 
 #: src/language/dictionary/modify-variables.c:147
-msgid "`(' expected on REORDER subcommand."
+#: src/language/dictionary/modify-variables.c:190
+#, c-format
+msgid "`(' expected on %s subcommand."
 msgstr ""
 
 #: src/language/dictionary/modify-variables.c:159
 msgid "`)' expected following variable names on REORDER subcommand."
 msgstr ""
 
-#: src/language/dictionary/modify-variables.c:177
-msgid "RENAME subcommand may be given at most once."
-msgstr ""
-
-#: src/language/dictionary/modify-variables.c:190
-msgid "`(' expected on RENAME subcommand."
-msgstr ""
-
 #: src/language/dictionary/modify-variables.c:199
 msgid ""
 "`=' expected between lists of new and old variable names on RENAME "
@@ -1678,7 +1703,7 @@ msgid ""
 msgstr ""
 
 #: src/language/dictionary/modify-variables.c:208
-#: src/language/dictionary/rename-variables.c:76
+#: src/language/dictionary/rename-variables.c:77
 #, c-format
 msgid ""
 "Differing number of variables in old name list (%zu) and in new name list (%"
@@ -1714,6 +1739,163 @@ msgstr ""
 msgid "`/' or `.' expected."
 msgstr ""
 
+#: src/language/dictionary/mrsets.c:98
+#, c-format
+msgid ""
+"%s is not a valid name for a multiple response set.  Multiple response set "
+"names must begin with `$'."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:120
+#, c-format
+msgid ""
+"VARIABLES specified only variable %s on %s, but at least two variables are "
+"required."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:153
+msgid "Numeric VALUE must be an integer."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:207 src/language/dictionary/mrsets.c:213
+#: src/language/dictionary/mrsets.c:223
+#, c-format
+msgid "Required %s specification missing from %s subcommand."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:231 src/language/dictionary/mrsets.c:269
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies a string VALUE, but the variables "
+"specified for this group are numeric."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:255
+#, c-format
+msgid ""
+"VALUE string on MDGROUP subcommand for group %s is %d bytes long, but it "
+"must be no longer than the narrowest variable in the group, which is %s with "
+"a width of %d bytes."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:281
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies LABELSOURCE=VARLABEL but not "
+"CATEGORYLABELS=COUNTEDVALUES.  Ignoring LABELSOURCE."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:287
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies both LABEL and LABELSOURCE, but "
+"only one of these subcommands may be used at a time.  Ignoring LABELSOURCE."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:327
+#, c-format
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s have "
+"the same variable label.  Categories represented by these variables will not "
+"be distinguishable in output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:357
+#, c-format
+msgid ""
+"Variable %s specified as part of multiple dichotomy group %s (which has "
+"CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value.  "
+"This category will not be distinguishable in output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:370
+#, c-format
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s (which "
+"has CATEGORYLABELS=COUNTEDVALUES) have the same value label for the the "
+"group's counted value.  These categories will not be distinguishable in "
+"output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:427
+#, c-format
+msgid ""
+"Variables specified on MCGROUP should have the same categories, but %s and %"
+"s (and possibly others) in multiple category group %s have different value "
+"labels for value %s."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:484
+#, c-format
+msgid "No multiple response set named %s."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:538
+msgid "The active file dictionary does not contain any multiple response sets."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:548
+msgid "Multiple Response Sets"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:549 src/ui/gui/psppire-var-sheet.c:534
+#: src/ui/gui/psppire-var-store.c:832
+msgid "Name"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:550 src/ui/gui/variable-info.ui:8
+msgid "Variables"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:551
+msgid "Details"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:565
+msgid "Multiple dichotomy set"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:566
+msgid "Multiple category set"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:568
+#: src/language/dictionary/split-file.c:84
+#: src/language/dictionary/sys-file-info.c:344
+#: src/language/dictionary/sys-file-info.c:583
+#: src/ui/gui/psppire-var-sheet.c:538 src/ui/gui/psppire-var-store.c:836
+#: src/ui/gui/crosstabs.ui:292 src/ui/gui/psppire.ui:1924
+msgid "Label"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:572
+msgid "Label source"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:574
+msgid "First variable label among variables"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:575
+msgid "Provided by user"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:576
+msgid "Counted value"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:582
+msgid "Category label source"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:584
+msgid "Variable labels"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:585
+msgid "Value labels of counted value"
+msgstr ""
+
 #: src/language/dictionary/numeric.c:67
 #, c-format
 msgid "Format type %s may not be used with a numeric variable."
@@ -1743,250 +1925,236 @@ msgstr ""
 msgid "`=' expected between lists of new and old variable names."
 msgstr ""
 
-#: src/language/dictionary/rename-variables.c:87
+#: src/language/dictionary/rename-variables.c:88
 msgid "`)' expected after variable names."
 msgstr ""
 
-#: src/language/dictionary/rename-variables.c:97
+#: src/language/dictionary/rename-variables.c:98
 #, c-format
 msgid "Renaming would duplicate variable name %s."
 msgstr ""
 
-#: src/language/dictionary/split-file.c:85
-#: src/language/dictionary/sys-file-info.c:486
-#: src/language/dictionary/sys-file-info.c:641
+#: src/language/dictionary/split-file.c:83
+#: src/language/dictionary/sys-file-info.c:429
+#: src/language/dictionary/sys-file-info.c:582
+#: src/language/stats/crosstabs.q:1214 src/language/stats/crosstabs.q:1241
+#: src/language/stats/crosstabs.q:1264 src/language/stats/crosstabs.q:1289
+#: src/language/stats/examine.q:1841 src/language/stats/frequencies.q:813
+#: src/language/stats/reliability.q:568 src/language/stats/reliability.q:579
 msgid "Value"
 msgstr ""
 
-#: src/language/dictionary/split-file.c:86
-#: src/language/dictionary/sys-file-info.c:397
-#: src/language/dictionary/sys-file-info.c:642
-#: src/ui/gui/psppire-var-sheet.c:537 src/ui/gui/psppire-var-store.c:836
-#: src/ui/gui/crosstabs.glade:275 src/ui/gui/psppire.glade:1974
-msgid "Label"
-msgstr ""
-
-#: src/language/dictionary/sys-file-info.c:113
+#: src/language/dictionary/sys-file-info.c:95
 msgid "File:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:115 src/ui/gui/psppire.glade:1913
-#: src/ui/gui/recode.glade:841
+#: src/language/dictionary/sys-file-info.c:97 src/ui/gui/psppire.ui:1862
+#: src/ui/gui/recode.ui:859
 msgid "Label:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:119
+#: src/language/dictionary/sys-file-info.c:101
 msgid "No label."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:122
+#: src/language/dictionary/sys-file-info.c:104
 msgid "Created:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:125
+#: src/language/dictionary/sys-file-info.c:107
 msgid "Integer Format:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:127
-msgid "Big Endian."
-msgstr ""
-
-#: src/language/dictionary/sys-file-info.c:128
-msgid "Little Endian."
-msgstr ""
-
-#: src/language/dictionary/sys-file-info.c:129
-#: src/language/dictionary/sys-file-info.c:137
-msgid "Unknown."
+#: src/language/dictionary/sys-file-info.c:111
+#: src/language/dictionary/sys-file-info.c:119
+#: src/language/dictionary/sys-file-info.c:124
+#: src/language/dictionary/sys-file-info.c:143
+msgid "Unknown"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:130
+#: src/language/dictionary/sys-file-info.c:112
 msgid "Real Format:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:132
+#: src/language/dictionary/sys-file-info.c:114
 msgid "IEEE 754 LE."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:133
+#: src/language/dictionary/sys-file-info.c:115
 msgid "IEEE 754 BE."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:134
+#: src/language/dictionary/sys-file-info.c:116
 msgid "VAX D."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:135
+#: src/language/dictionary/sys-file-info.c:117
 msgid "VAX G."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:136
+#: src/language/dictionary/sys-file-info.c:118
 msgid "IBM 390 Hex Long."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:138
-#: src/ui/gui/descriptives-dialog.glade:79 src/ui/gui/recode.glade:940
+#: src/language/dictionary/sys-file-info.c:120 src/ui/gui/descriptives.ui:85
+#: src/ui/gui/factor.ui:173 src/ui/gui/recode.ui:960
 msgid "Variables:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:140
+#: src/language/dictionary/sys-file-info.c:122
 msgid "Cases:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:142
-#: src/language/dictionary/sys-file-info.c:160
-msgid "Unknown"
-msgstr ""
-
-#: src/language/dictionary/sys-file-info.c:144
+#: src/language/dictionary/sys-file-info.c:127
 msgid "Type:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:145
-msgid "System File."
+#: src/language/dictionary/sys-file-info.c:128
+#: src/ui/gui/psppire-data-window.c:631
+msgid "System File"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:146
+#: src/language/dictionary/sys-file-info.c:129
 msgid "Weight:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:151
+#: src/language/dictionary/sys-file-info.c:134
 msgid "Not weighted."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:153
+#: src/language/dictionary/sys-file-info.c:136
 msgid "Mode:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:155
+#: src/language/dictionary/sys-file-info.c:138
 #, c-format
 msgid "Compression %s."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:155
+#: src/language/dictionary/sys-file-info.c:138
 msgid "on"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:155
+#: src/language/dictionary/sys-file-info.c:138
 msgid "off"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:158
+#: src/language/dictionary/sys-file-info.c:141
 msgid "Charset:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:170
-#: src/language/dictionary/sys-file-info.c:397
+#: src/language/dictionary/sys-file-info.c:151
+#: src/language/dictionary/sys-file-info.c:344
 msgid "Description"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:171
-#: src/language/dictionary/sys-file-info.c:399
-#: src/language/dictionary/sys-file-info.c:724
+#: src/language/dictionary/sys-file-info.c:152
+#: src/language/dictionary/sys-file-info.c:346
+#: src/language/dictionary/sys-file-info.c:663
 msgid "Position"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:220
+#: src/language/dictionary/sys-file-info.c:199
 msgid "The active file does not have a file label."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:223
+#: src/language/dictionary/sys-file-info.c:202
 msgid "File label:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:298
+#: src/language/dictionary/sys-file-info.c:277
 msgid "No variables to display."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:313
+#: src/language/dictionary/sys-file-info.c:291
 msgid "Macros not supported."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:323
+#: src/language/dictionary/sys-file-info.c:300
 msgid "The active file dictionary does not contain any documents."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:331
+#: src/language/dictionary/sys-file-info.c:308
 msgid "Documents in the active file:"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:485
+#: src/language/dictionary/sys-file-info.c:428
 msgid "Attribute"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:543
+#: src/language/dictionary/sys-file-info.c:484
 #, c-format
 msgid "Format: %s"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:550
+#: src/language/dictionary/sys-file-info.c:491
 #, c-format
 msgid "Print Format: %s"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:554
+#: src/language/dictionary/sys-file-info.c:495
 #, c-format
 msgid "Write Format: %s"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:567
+#: src/language/dictionary/sys-file-info.c:508
 #, c-format
 msgid "Measure: %s"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:568
+#: src/language/dictionary/sys-file-info.c:509
 #: src/ui/gui/psppire-var-sheet.c:111
 msgid "Nominal"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:569
+#: src/language/dictionary/sys-file-info.c:510
 #: src/ui/gui/psppire-var-sheet.c:112
 msgid "Ordinal"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:570
+#: src/language/dictionary/sys-file-info.c:511
 #: src/ui/gui/psppire-var-sheet.c:113
 msgid "Scale"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:573
+#: src/language/dictionary/sys-file-info.c:514
 #, c-format
 msgid "Display Alignment: %s"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:574
+#: src/language/dictionary/sys-file-info.c:515
 #: src/ui/gui/psppire-var-sheet.c:104
 msgid "Left"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:575
+#: src/language/dictionary/sys-file-info.c:516
 #: src/ui/gui/psppire-var-sheet.c:106
 msgid "Center"
 msgstr "Centre"
 
-#: src/language/dictionary/sys-file-info.c:576
+#: src/language/dictionary/sys-file-info.c:517
 #: src/ui/gui/psppire-var-sheet.c:105
 msgid "Right"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:579
+#: src/language/dictionary/sys-file-info.c:520
 #, c-format
 msgid "Display Width: %d"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:593
+#: src/language/dictionary/sys-file-info.c:534
 msgid "Missing Values: "
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:702
+#: src/language/dictionary/sys-file-info.c:643
 msgid "No vectors defined."
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:723
+#: src/language/dictionary/sys-file-info.c:662
 msgid "Vector"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:726
+#: src/language/dictionary/sys-file-info.c:665
 msgid "Print Format"
 msgstr ""
 
@@ -2079,43 +2247,38 @@ msgstr ""
 msgid "Only USE ALL is currently implemented."
 msgstr ""
 
-#: src/language/utilities/title.c:68
-#, c-format
-msgid "%s: `.' expected after string."
-msgstr ""
-
-#: src/language/utilities/title.c:108
+#: src/language/utilities/title.c:103
 #, c-format
 msgid "   (Entered %s)"
 msgstr ""
 
-#: src/language/utilities/include.c:92
+#: src/language/utilities/include.c:95
 msgid "Expecting BATCH or INTERACTIVE after SYNTAX."
 msgstr ""
 
-#: src/language/utilities/include.c:109
+#: src/language/utilities/include.c:112
 msgid "Expecting YES or NO after CD."
 msgstr ""
 
-#: src/language/utilities/include.c:126
+#: src/language/utilities/include.c:129
 msgid "Expecting CONTINUE or STOP after ERROR."
 msgstr ""
 
-#: src/language/utilities/include.c:133
+#: src/language/utilities/include.c:136
 #, c-format
 msgid "Unexpected token: `%s'."
 msgstr ""
 
-#: src/language/utilities/include.c:178
+#: src/language/utilities/include.c:181
 msgid "expecting file name"
 msgstr ""
 
-#: src/language/utilities/include.c:190
+#: src/language/utilities/include.c:193
 #, c-format
 msgid "Can't find `%s' in include file search path."
 msgstr ""
 
-#: src/language/utilities/include.c:198
+#: src/language/utilities/include.c:201
 #, c-format
 msgid "Unable to open `%s': %s."
 msgstr ""
@@ -2135,7 +2298,7 @@ msgstr ""
 msgid "Cannot change mode of %s: %s"
 msgstr ""
 
-#: src/language/stats/aggregate.c:219
+#: src/language/stats/aggregate.c:220
 msgid "while expecting COLUMNWISE"
 msgstr ""
 
@@ -2149,252 +2312,318 @@ msgid ""
 "has no effect.  Output data will be sorted the same way as the input data."
 msgstr ""
 
-#: src/language/stats/aggregate.c:423
+#: src/language/stats/aggregate.c:424
 msgid "expecting aggregation function"
 msgstr ""
 
-#: src/language/stats/aggregate.c:441
+#: src/language/stats/aggregate.c:442
 #, c-format
 msgid "Unknown aggregation function %s."
 msgstr ""
 
-#: src/language/stats/aggregate.c:497
+#: src/language/stats/aggregate.c:498
 #, c-format
 msgid "Missing argument %zu to %s."
 msgstr ""
 
-#: src/language/stats/aggregate.c:506
+#: src/language/stats/aggregate.c:507
 #, c-format
 msgid "Arguments to %s must be of same type as source variables."
 msgstr ""
 
-#: src/language/stats/aggregate.c:516 src/language/expressions/parse.c:885
+#: src/language/stats/aggregate.c:517 src/language/expressions/parse.c:885
 msgid "expecting `)'"
 msgstr ""
 
-#: src/language/stats/aggregate.c:528
+#: src/language/stats/aggregate.c:529
 #, c-format
 msgid ""
 "Number of source variables (%zu) does not match number of target variables (%"
 "zu)."
 msgstr ""
 
-#: src/language/stats/aggregate.c:544
+#: src/language/stats/aggregate.c:545
 #, c-format
 msgid ""
 "The value arguments passed to the %s function are out-of-order.  They will "
 "be treated as if they had been specified in the correct order."
 msgstr ""
 
-#: src/language/stats/aggregate.c:614
+#: src/language/stats/aggregate.c:615
 #, c-format
 msgid ""
 "Variable name %s is not unique within the aggregate file dictionary, which "
 "contains the aggregate variables and the break variables."
 msgstr ""
 
-#: src/language/stats/autorecode.c:136
+#: src/language/stats/autorecode.c:116
 #, c-format
 msgid "Source variable count (%zu) does not match target variable count (%zu)."
 msgstr ""
 
-#: src/language/stats/autorecode.c:164
+#: src/language/stats/autorecode.c:128
 #, c-format
 msgid "Target variable %s duplicates existing variable %s."
 msgstr ""
 
-#: src/language/stats/autorecode.c:171
-#, c-format
-msgid "Duplicate variable name %s among target variables."
-msgstr ""
-
 #: src/language/stats/binomial.c:141
 #, c-format
 msgid "Variable %s is not dichotomous"
 msgstr ""
 
-#: src/language/stats/binomial.c:194
+#: src/language/stats/binomial.c:192 src/ui/gui/binomial.ui:13
 msgid "Binomial Test"
 msgstr ""
 
-#: src/language/stats/binomial.c:224
+#: src/language/stats/binomial.c:222
 msgid "Group1"
 msgstr ""
 
-#: src/language/stats/binomial.c:225
+#: src/language/stats/binomial.c:223
 msgid "Group2"
 msgstr ""
 
-#: src/language/stats/binomial.c:226 src/language/stats/chisquare.c:202
-#: src/language/stats/chisquare.c:262 src/language/stats/sign.c:94
-#: src/language/stats/wilcoxon.c:262 src/ui/gui/crosstabs-dialog.c:59
+#: src/language/stats/binomial.c:224 src/language/stats/chisquare.c:177
+#: src/language/stats/chisquare.c:236 src/language/stats/factor.c:1462
+#: src/language/stats/sign.c:92 src/language/stats/wilcoxon.c:260
+#: src/ui/gui/crosstabs-dialog.c:60 src/language/stats/crosstabs.q:823
+#: src/language/stats/crosstabs.q:1151 src/language/stats/crosstabs.q:1528
+#: src/language/stats/examine.q:1105 src/language/stats/frequencies.q:871
+#: src/language/stats/oneway.q:302 src/language/stats/oneway.q:472
+#: src/language/stats/regression.q:291 src/language/stats/reliability.q:702
 msgid "Total"
 msgstr ""
 
-#: src/language/stats/binomial.c:259 src/language/stats/chisquare.c:225
+#: src/language/stats/binomial.c:257 src/language/stats/chisquare.c:199
+#: src/language/stats/crosstabs.q:1239 src/language/stats/crosstabs.q:1286
 msgid "Category"
 msgstr ""
 
-#: src/language/stats/binomial.c:260 src/language/stats/npar-summary.c:123
-#: src/language/stats/sign.c:74 src/language/stats/wilcoxon.c:245
+#: src/language/stats/binomial.c:258 src/language/stats/correlations.c:119
+#: src/language/stats/correlations.c:227 src/language/stats/npar-summary.c:122
+#: src/language/stats/sign.c:72 src/language/stats/wilcoxon.c:243
+#: src/language/stats/crosstabs.q:830 src/language/stats/examine.q:1176
+#: src/language/stats/frequencies.q:1034 src/language/stats/oneway.q:385
+#: src/language/stats/reliability.q:705 src/language/stats/t-test.q:505
+#: src/language/stats/t-test.q:525 src/language/stats/t-test.q:625
+#: src/language/stats/t-test.q:1101
 msgid "N"
 msgstr ""
 
-#: src/language/stats/binomial.c:261
+#: src/language/stats/binomial.c:259
 msgid "Observed Prop."
 msgstr ""
 
-#: src/language/stats/binomial.c:262
+#: src/language/stats/binomial.c:260
 msgid "Test Prop."
 msgstr ""
 
-#: src/language/stats/binomial.c:265
+#: src/language/stats/binomial.c:263
 #, c-format
 msgid "Exact Sig. (%d-tailed)"
 msgstr ""
 
-#: src/language/stats/chisquare.c:172
+#: src/language/stats/chisquare.c:150
 #, c-format
 msgid ""
 "CHISQUARE test specified %d expected values, but %d distinct values were "
 "encountered in variable %s."
 msgstr ""
 
-#: src/language/stats/chisquare.c:186 src/language/stats/chisquare.c:226
+#: src/language/stats/chisquare.c:161 src/language/stats/chisquare.c:200
 msgid "Observed N"
 msgstr ""
 
-#: src/language/stats/chisquare.c:187 src/language/stats/chisquare.c:227
+#: src/language/stats/chisquare.c:162 src/language/stats/chisquare.c:201
 msgid "Expected N"
 msgstr ""
 
-#: src/language/stats/chisquare.c:188 src/language/stats/chisquare.c:228
-#: src/ui/gui/crosstabs-dialog.c:61
+#: src/language/stats/chisquare.c:163 src/language/stats/chisquare.c:202
+#: src/ui/gui/crosstabs-dialog.c:62 src/language/stats/regression.q:290
 msgid "Residual"
 msgstr ""
 
-#: src/language/stats/chisquare.c:221 src/language/stats/sign.c:62
+#: src/language/stats/chisquare.c:195 src/language/stats/sign.c:60
+#: src/ui/gui/frequencies.ui:9 src/ui/gui/frequencies.ui:669
 msgid "Frequencies"
 msgstr ""
 
-#: src/language/stats/chisquare.c:276 src/language/stats/sign.c:115
-#: src/language/stats/wilcoxon.c:313
+#: src/language/stats/chisquare.c:249 src/language/stats/sign.c:111
+#: src/language/stats/wilcoxon.c:309
 msgid "Test Statistics"
 msgstr ""
 
-#: src/language/stats/chisquare.c:290
+#: src/language/stats/chisquare.c:263
 msgid "Chi-Square"
 msgstr ""
 
-#: src/language/stats/chisquare.c:291
+#: src/language/stats/chisquare.c:264 src/language/stats/crosstabs.q:1215
+#: src/language/stats/oneway.q:275 src/language/stats/oneway.q:685
+#: src/language/stats/regression.q:284 src/language/stats/t-test.q:752
+#: src/language/stats/t-test.q:923 src/language/stats/t-test.q:1010
 msgid "df"
 msgstr ""
 
-#: src/language/stats/chisquare.c:292
+#: src/language/stats/chisquare.c:265
 msgid "Asymp. Sig."
 msgstr ""
 
-#: src/language/stats/descriptives.c:102 src/language/stats/npar-summary.c:126
-#: src/ui/gui/descriptives-dialog.c:39 src/ui/gui/frequencies-dialog.c:40
+#: src/language/stats/correlations.c:96 src/language/stats/factor.c:1720
+#: src/language/stats/npar-summary.c:108
+msgid "Descriptive Statistics"
+msgstr ""
+
+#: src/language/stats/correlations.c:117 src/language/stats/descriptives.c:101
+#: src/language/stats/factor.c:1741 src/language/stats/npar-summary.c:125
+#: src/ui/gui/descriptives-dialog.c:40 src/ui/gui/frequencies-dialog.c:41
+#: src/language/stats/examine.q:1444 src/language/stats/frequencies.q:105
+#: src/language/stats/oneway.q:386 src/language/stats/t-test.q:506
+#: src/language/stats/t-test.q:526 src/language/stats/t-test.q:624
+#: src/language/stats/t-test.q:917
 msgid "Mean"
 msgstr ""
 
-#: src/language/stats/descriptives.c:103
-msgid "S E Mean"
+#: src/language/stats/correlations.c:118 src/language/stats/factor.c:1742
+#: src/language/stats/npar-summary.c:128 src/language/stats/examine.q:1479
+#: src/language/stats/oneway.q:387 src/language/stats/t-test.q:507
+#: src/language/stats/t-test.q:527 src/language/stats/t-test.q:626
+#: src/language/stats/t-test.q:918
+msgid "Std. Deviation"
+msgstr ""
+
+#: src/language/stats/correlations.c:190 src/language/stats/factor.c:1620
+msgid "Correlations"
 msgstr ""
 
-#: src/language/stats/descriptives.c:104
+#: src/language/stats/correlations.c:216
+msgid "Pearson Correlation"
+msgstr ""
+
+#: src/language/stats/correlations.c:218 src/language/stats/oneway.q:686
+#: src/language/stats/t-test.q:753 src/language/stats/t-test.q:924
+#: src/language/stats/t-test.q:1011
+msgid "Sig. (2-tailed)"
+msgstr ""
+
+#: src/language/stats/correlations.c:218
+msgid "Sig. (1-tailed)"
+msgstr ""
+
+#: src/language/stats/correlations.c:222
+msgid "Cross-products"
+msgstr ""
+
+#: src/language/stats/correlations.c:223
+msgid "Covariance"
+msgstr ""
+
+#: src/language/stats/correlations.c:454 src/language/stats/descriptives.c:361
+#: src/language/data-io/list.q:91
+msgid "No variables specified."
+msgstr ""
+
+#: src/language/stats/descriptives.c:102 src/language/stats/frequencies.q:106
+#: src/language/stats/t-test.q:508 src/language/stats/t-test.q:528
+#: src/language/stats/t-test.q:627
+msgid "S.E. Mean"
+msgstr ""
+
+#: src/language/stats/descriptives.c:103 src/language/stats/frequencies.q:109
 msgid "Std Dev"
 msgstr ""
 
-#: src/language/stats/descriptives.c:105 src/ui/gui/descriptives-dialog.c:46
-#: src/ui/gui/frequencies-dialog.c:45
+#: src/language/stats/descriptives.c:104 src/ui/gui/descriptives-dialog.c:47
+#: src/ui/gui/frequencies-dialog.c:46 src/language/stats/examine.q:1474
+#: src/language/stats/frequencies.q:110
 msgid "Variance"
 msgstr ""
 
-#: src/language/stats/descriptives.c:106 src/ui/gui/descriptives-dialog.c:47
-#: src/ui/gui/frequencies-dialog.c:50
+#: src/language/stats/descriptives.c:105 src/ui/gui/descriptives-dialog.c:48
+#: src/ui/gui/frequencies-dialog.c:51 src/language/stats/examine.q:1510
+#: src/language/stats/frequencies.q:111
 msgid "Kurtosis"
 msgstr ""
 
-#: src/language/stats/descriptives.c:107
-msgid "S E Kurt"
+#: src/language/stats/descriptives.c:106 src/language/stats/frequencies.q:112
+msgid "S.E. Kurt"
 msgstr ""
 
-#: src/language/stats/descriptives.c:108 src/ui/gui/descriptives-dialog.c:48
-#: src/ui/gui/frequencies-dialog.c:46
+#: src/language/stats/descriptives.c:107 src/ui/gui/descriptives-dialog.c:49
+#: src/ui/gui/frequencies-dialog.c:47 src/language/stats/examine.q:1505
+#: src/language/stats/frequencies.q:113
 msgid "Skewness"
 msgstr ""
 
-#: src/language/stats/descriptives.c:109
-msgid "S E Skew"
+#: src/language/stats/descriptives.c:108 src/language/stats/frequencies.q:114
+msgid "S.E. Skew"
 msgstr ""
 
-#: src/language/stats/descriptives.c:110 src/ui/gui/descriptives-dialog.c:43
-#: src/ui/gui/frequencies-dialog.c:48
+#: src/language/stats/descriptives.c:109 src/ui/gui/descriptives-dialog.c:44
+#: src/ui/gui/frequencies-dialog.c:49 src/language/stats/examine.q:1494
+#: src/language/stats/frequencies.q:115
 msgid "Range"
 msgstr ""
 
-#: src/language/stats/descriptives.c:111 src/language/stats/npar-summary.c:132
-#: src/ui/gui/descriptives-dialog.c:41 src/ui/gui/frequencies-dialog.c:42
+#: src/language/stats/descriptives.c:110 src/language/stats/npar-summary.c:131
+#: src/ui/gui/descriptives-dialog.c:42 src/ui/gui/frequencies-dialog.c:43
+#: src/language/stats/examine.q:1484 src/language/stats/frequencies.q:116
+#: src/language/stats/oneway.q:400
 msgid "Minimum"
 msgstr ""
 
-#: src/language/stats/descriptives.c:112 src/language/stats/npar-summary.c:135
-#: src/ui/gui/descriptives-dialog.c:42 src/ui/gui/frequencies-dialog.c:43
+#: src/language/stats/descriptives.c:111 src/language/stats/npar-summary.c:134
+#: src/ui/gui/descriptives-dialog.c:43 src/ui/gui/frequencies-dialog.c:44
+#: src/language/stats/examine.q:1489 src/language/stats/frequencies.q:117
+#: src/language/stats/oneway.q:401
 msgid "Maximum"
 msgstr ""
 
-#: src/language/stats/descriptives.c:113 src/ui/gui/descriptives-dialog.c:44
-#: src/ui/gui/frequencies-dialog.c:53
+#: src/language/stats/descriptives.c:112 src/ui/gui/descriptives-dialog.c:45
+#: src/ui/gui/frequencies-dialog.c:54 src/language/stats/frequencies.q:118
 msgid "Sum"
 msgstr ""
 
-#: src/language/stats/descriptives.c:344
+#: src/language/stats/descriptives.c:343
 #, c-format
 msgid "Z-score variable name %s would be a duplicate variable name."
 msgstr ""
 
-#: src/language/stats/descriptives.c:362
-msgid "No variables specified."
-msgstr ""
-
-#: src/language/stats/descriptives.c:451
+#: src/language/stats/descriptives.c:450
 msgid "expecting statistic name: reverting to default"
 msgstr ""
 
-#: src/language/stats/descriptives.c:524
+#: src/language/stats/descriptives.c:523
 msgid ""
 "Ran out of generic names for Z-score variables.  There are only 126 generic "
 "names: ZSC001-ZSC0999, STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09."
 msgstr ""
 
-#: src/language/stats/descriptives.c:556
+#: src/language/stats/descriptives.c:555
 msgid "Mapping of variables to corresponding Z-scores."
 msgstr ""
 
-#: src/language/stats/descriptives.c:561
+#: src/language/stats/descriptives.c:559
 msgid "Source"
 msgstr ""
 
-#: src/language/stats/descriptives.c:562
+#: src/language/stats/descriptives.c:560
 msgid "Target"
 msgstr ""
 
-#: src/language/stats/descriptives.c:673
+#: src/language/stats/descriptives.c:670
 #, c-format
 msgid "Z-score of %s"
 msgstr ""
 
-#: src/language/stats/descriptives.c:888
+#: src/language/stats/descriptives.c:884
 msgid "Valid N"
 msgstr ""
 
-#: src/language/stats/descriptives.c:889
+#: src/language/stats/descriptives.c:885
 msgid "Missing N"
 msgstr ""
 
-#: src/language/stats/descriptives.c:917
+#: src/language/stats/descriptives.c:913
 #, c-format
 msgid "Valid cases = %g; cases with missing value(s) = %g."
 msgstr ""
@@ -2416,18 +2645,127 @@ msgstr ""
 msgid "Variable %s specified twice in sort criteria."
 msgstr ""
 
-#: src/language/stats/flip.c:98
-msgid ""
-"FLIP ignores TEMPORARY.  Temporary transformations will be made permanent."
+#: src/language/stats/factor.c:803
+msgid "Factor analysis on a single variable is not useful."
 msgstr ""
 
-#: src/language/stats/flip.c:150
-msgid "Could not create temporary file for FLIP."
+#: src/language/stats/factor.c:1206
+msgid "Component Number"
 msgstr ""
 
-#: src/language/stats/flip.c:327
-#, c-format
-msgid "Error rewinding FLIP file: %s."
+#: src/language/stats/factor.c:1206
+msgid "Factor Number"
+msgstr ""
+
+#: src/language/stats/factor.c:1237
+msgid "Communalities"
+msgstr ""
+
+#: src/language/stats/factor.c:1243
+msgid "Initial"
+msgstr ""
+
+#: src/language/stats/factor.c:1246
+msgid "Extraction"
+msgstr ""
+
+#: src/language/stats/factor.c:1310 src/language/stats/factor.c:1437
+msgid "Component"
+msgstr ""
+
+#: src/language/stats/factor.c:1315 src/language/stats/factor.c:1439
+msgid "Factor"
+msgstr ""
+
+#: src/language/stats/factor.c:1347 src/language/stats/factor.c:1495
+#: src/ui/gui/psppire-data-store.c:755 src/ui/gui/psppire-var-store.c:699
+#: src/ui/gui/psppire-var-store.c:709 src/ui/gui/psppire-var-store.c:719
+#: src/ui/gui/psppire-var-store.c:825
+#, c-format
+msgid "%d"
+msgstr ""
+
+#: src/language/stats/factor.c:1412
+msgid "Total Variance Explained"
+msgstr ""
+
+#: src/language/stats/factor.c:1444
+msgid "Initial Eigenvalues"
+msgstr ""
+
+#: src/language/stats/factor.c:1450
+msgid "Extraction Sums of Squared Loadings"
+msgstr ""
+
+#: src/language/stats/factor.c:1456
+msgid "Rotation Sums of Squared Loadings"
+msgstr ""
+
+#: src/language/stats/factor.c:1464
+#, no-c-format
+msgid "% of Variance"
+msgstr ""
+
+#: src/language/stats/factor.c:1465
+msgid "Cumulative %"
+msgstr ""
+
+#: src/language/stats/factor.c:1578
+msgid "Correlation Matrix"
+msgstr ""
+
+#: src/language/stats/factor.c:1632
+msgid "Sig. 1-tailed"
+msgstr ""
+
+#: src/language/stats/factor.c:1666
+msgid "Determinant"
+msgstr ""
+
+#: src/language/stats/factor.c:1743
+msgid "Analysis N"
+msgstr ""
+
+#: src/language/stats/factor.c:1776
+msgid ""
+"The FACTOR criteria result in zero factors extracted. Therefore no analysis "
+"will be performed."
+msgstr ""
+
+#: src/language/stats/factor.c:1782
+msgid ""
+"The FACTOR criteria result in more factors than variables, which is not "
+"meaningful. No analysis will be performed."
+msgstr ""
+
+#: src/language/stats/factor.c:1865
+msgid "Component Matrix"
+msgstr ""
+
+#: src/language/stats/factor.c:1865
+msgid "Factor Matrix"
+msgstr ""
+
+#: src/language/stats/factor.c:1871
+msgid "Rotated Component Matrix"
+msgstr ""
+
+#: src/language/stats/factor.c:1871
+msgid "Rotated Factor Matrix"
+msgstr ""
+
+#: src/language/stats/flip.c:98
+msgid ""
+"FLIP ignores TEMPORARY.  Temporary transformations will be made permanent."
+msgstr ""
+
+#: src/language/stats/flip.c:150
+msgid "Could not create temporary file for FLIP."
+msgstr ""
+
+#: src/language/stats/flip.c:327
+#, c-format
+msgid "Error rewinding FLIP file: %s."
 msgstr ""
 
 #: src/language/stats/flip.c:334
@@ -2472,170 +2810,164 @@ msgstr ""
 msgid "Unexpected end of file reading FLIP temporary file."
 msgstr ""
 
-#: src/language/stats/npar-summary.c:109
-msgid "Descriptive Statistics"
-msgstr ""
-
-#: src/language/stats/npar-summary.c:129
-msgid "Std. Deviation"
-msgstr ""
-
-#: src/language/stats/npar-summary.c:142 src/ui/gui/examine.glade:333
+#: src/language/stats/npar-summary.c:141 src/language/stats/examine.q:1996
+#: src/language/stats/examine.q:2013 src/language/stats/frequencies.q:1050
+#: src/ui/gui/examine.ui:345
 msgid "Percentiles"
 msgstr ""
 
-#: src/language/stats/npar-summary.c:146
+#: src/language/stats/npar-summary.c:145
 msgid "25th"
 msgstr ""
 
-#: src/language/stats/npar-summary.c:149
+#: src/language/stats/npar-summary.c:148
 msgid "50th (Median)"
 msgstr ""
 
-#: src/language/stats/npar-summary.c:152
+#: src/language/stats/npar-summary.c:151
 msgid "75th"
 msgstr ""
 
-#: src/language/stats/roc.c:938
+#: src/language/stats/roc.c:932
 msgid "Area Under the Curve"
 msgstr ""
 
-#: src/language/stats/roc.c:940
+#: src/language/stats/roc.c:934
 #, c-format
 msgid "Area Under the Curve (%s)"
 msgstr ""
 
-#: src/language/stats/roc.c:946
+#: src/language/stats/roc.c:939
 msgid "Area"
 msgstr ""
 
-#: src/language/stats/roc.c:959
+#: src/language/stats/roc.c:952 src/language/stats/examine.q:1641
+#: src/language/stats/oneway.q:388 src/language/stats/oneway.q:683
+#: src/language/stats/regression.q:198
 msgid "Std. Error"
 msgstr ""
 
-#: src/language/stats/roc.c:960
+#: src/language/stats/roc.c:953
 msgid "Asymptotic Sig."
 msgstr ""
 
-#: src/language/stats/roc.c:962
+#: src/language/stats/roc.c:955 src/language/stats/examine.q:1455
+#: src/language/stats/oneway.q:397
 msgid "Lower Bound"
 msgstr ""
 
-#: src/language/stats/roc.c:963
+#: src/language/stats/roc.c:956 src/language/stats/examine.q:1460
+#: src/language/stats/oneway.q:398
 msgid "Upper Bound"
 msgstr ""
 
-#: src/language/stats/roc.c:967
+#: src/language/stats/roc.c:960
 #, c-format
 msgid "Asymp. %g%% Confidence Interval"
 msgstr ""
 
-#: src/language/stats/roc.c:973
+#: src/language/stats/roc.c:966
 msgid "Variable under test"
 msgstr ""
 
-#: src/language/stats/roc.c:1032
+#: src/language/stats/roc.c:1025
 msgid "Case Summary"
 msgstr ""
 
-#: src/language/stats/roc.c:1054
+#: src/language/stats/roc.c:1045
 msgid "Unweighted"
 msgstr ""
 
-#: src/language/stats/roc.c:1055
+#: src/language/stats/roc.c:1046
 msgid "Weighted"
 msgstr ""
 
-#: src/language/stats/roc.c:1059
+#: src/language/stats/roc.c:1050
 msgid "Valid N (listwise)"
 msgstr ""
 
-#: src/language/stats/roc.c:1062
+#: src/language/stats/roc.c:1053
 msgid "Positive"
 msgstr ""
 
-#: src/language/stats/roc.c:1063
+#: src/language/stats/roc.c:1054
 msgid "Negative"
 msgstr ""
 
-#: src/language/stats/roc.c:1091
+#: src/language/stats/roc.c:1082
 msgid "Coordinates of the Curve"
 msgstr ""
 
-#: src/language/stats/roc.c:1093
+#: src/language/stats/roc.c:1084
 #, c-format
 msgid "Coordinates of the Curve (%s)"
 msgstr ""
 
-#: src/language/stats/roc.c:1103
+#: src/language/stats/roc.c:1092
 msgid "Test variable"
 msgstr ""
 
-#: src/language/stats/roc.c:1105
+#: src/language/stats/roc.c:1094
 msgid "Positive if greater than or equal to"
 msgstr ""
 
-#: src/language/stats/roc.c:1106 src/language/stats/roc.c:1171
+#: src/language/stats/roc.c:1095 src/output/charts/roc-chart-cairo.c:38
 msgid "Sensitivity"
 msgstr ""
 
-#: src/language/stats/roc.c:1107 src/language/stats/roc.c:1170
+#: src/language/stats/roc.c:1096 src/output/charts/roc-chart-cairo.c:37
 msgid "1 - Specificity"
 msgstr ""
 
-#: src/language/stats/roc.c:1169
-msgid "ROC Curve"
-msgstr ""
-
-#: src/language/stats/sign.c:91
+#: src/language/stats/sign.c:89
 msgid "Negative Differences"
 msgstr ""
 
-#: src/language/stats/sign.c:92
+#: src/language/stats/sign.c:90
 msgid "Positive Differences"
 msgstr ""
 
-#: src/language/stats/sign.c:93 src/language/stats/wilcoxon.c:261
+#: src/language/stats/sign.c:91 src/language/stats/wilcoxon.c:259
 msgid "Ties"
 msgstr ""
 
-#: src/language/stats/sign.c:134 src/language/stats/wilcoxon.c:331
+#: src/language/stats/sign.c:130 src/language/stats/wilcoxon.c:327
 msgid "Exact Sig. (2-tailed)"
 msgstr ""
 
-#: src/language/stats/sign.c:137 src/language/stats/wilcoxon.c:332
+#: src/language/stats/sign.c:133 src/language/stats/wilcoxon.c:328
 msgid "Exact Sig. (1-tailed)"
 msgstr ""
 
-#: src/language/stats/sign.c:140 src/language/stats/wilcoxon.c:335
+#: src/language/stats/sign.c:136 src/language/stats/wilcoxon.c:331
 msgid "Point Probability"
 msgstr ""
 
-#: src/language/stats/wilcoxon.c:232
+#: src/language/stats/wilcoxon.c:230
 msgid "Ranks"
 msgstr ""
 
-#: src/language/stats/wilcoxon.c:246
+#: src/language/stats/wilcoxon.c:244
 msgid "Mean Rank"
 msgstr ""
 
-#: src/language/stats/wilcoxon.c:247
+#: src/language/stats/wilcoxon.c:245
 msgid "Sum of Ranks"
 msgstr ""
 
-#: src/language/stats/wilcoxon.c:259
+#: src/language/stats/wilcoxon.c:257
 msgid "Negative Ranks"
 msgstr ""
 
-#: src/language/stats/wilcoxon.c:260
+#: src/language/stats/wilcoxon.c:258
 msgid "Positive Ranks"
 msgstr ""
 
-#: src/language/stats/wilcoxon.c:326
+#: src/language/stats/wilcoxon.c:322
 msgid "Z"
 msgstr ""
 
-#: src/language/stats/wilcoxon.c:327
+#: src/language/stats/wilcoxon.c:323
 msgid "Asymp. Sig. (2-tailed)"
 msgstr ""
 
@@ -2668,11 +3000,9 @@ msgid "The BY subcommand is required."
 msgstr ""
 
 #: src/language/data-io/combine-files.c:381
-msgid "BY is required when TABLE is specified."
-msgstr ""
-
 #: src/language/data-io/combine-files.c:386
-msgid "BY is required when SORT is specified."
+#, c-format
+msgid "BY is required when %s is specified."
 msgstr ""
 
 #: src/language/data-io/combine-files.c:513
@@ -2791,96 +3121,96 @@ msgstr ""
 msgid "Record ends in data not part of any field."
 msgstr ""
 
-#: src/language/data-io/data-parser.c:651 src/language/data-io/print.c:405
+#: src/language/data-io/data-parser.c:650 src/language/data-io/print.c:404
 msgid "Record"
 msgstr ""
 
-#: src/language/data-io/data-parser.c:652 src/language/data-io/print.c:406
-#: src/ui/gui/psppire-var-sheet.c:540 src/ui/gui/psppire-var-store.c:839
-#: src/ui/gui/crosstabs.glade:92
+#: src/language/data-io/data-parser.c:651 src/language/data-io/print.c:405
+#: src/ui/gui/psppire-var-sheet.c:541 src/ui/gui/psppire-var-store.c:839
+#: src/ui/gui/crosstabs.ui:89
 msgid "Columns"
 msgstr ""
 
-#: src/language/data-io/data-parser.c:653
-#: src/language/data-io/data-parser.c:692 src/language/data-io/print.c:407
+#: src/language/data-io/data-parser.c:652
+#: src/language/data-io/data-parser.c:689 src/language/data-io/print.c:406
 msgid "Format"
 msgstr ""
 
-#: src/language/data-io/data-parser.c:672
+#: src/language/data-io/data-parser.c:670
 #, c-format
 msgid "Reading %d record from %s."
 msgid_plural "Reading %d records from %s."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/language/data-io/data-parser.c:708
+#: src/language/data-io/data-parser.c:704
 #, c-format
 msgid "Reading free-form data from %s."
 msgstr ""
 
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
-#: src/language/data-io/data-reader.c:122
+#: src/language/data-io/data-reader.c:123
 #: src/language/data-io/data-writer.c:58
 msgid "data file"
 msgstr ""
 
-#: src/language/data-io/data-reader.c:149
+#: src/language/data-io/data-reader.c:150
 #, c-format
 msgid "Could not open \"%s\" for reading as a data file: %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:191
+#: src/language/data-io/data-reader.c:192
 msgid ""
 "Unexpected end-of-file while reading data in BEGIN DATA.  This probably "
 "indicates a missing or misformatted END DATA command.  END DATA must appear "
 "by itself on a single line with exactly one space between words."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:216
+#: src/language/data-io/data-reader.c:217
 #, c-format
 msgid "Error reading file %s: %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:219
+#: src/language/data-io/data-reader.c:220
 #, c-format
 msgid "Unexpected end of file reading %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:228
+#: src/language/data-io/data-reader.c:229
 #, c-format
 msgid "Unexpected end of file in partial record reading %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:288
+#: src/language/data-io/data-reader.c:289
 #, c-format
 msgid "Corrupt block descriptor word at offset 0x%lx in %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:289
+#: src/language/data-io/data-reader.c:290
 #, c-format
 msgid "Corrupt record descriptor word at offset 0x%lx in %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:302
+#: src/language/data-io/data-reader.c:303
 #, c-format
 msgid "Corrupt record size at offset 0x%lx in %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:444
+#: src/language/data-io/data-reader.c:445
 msgid "Record exceeds remaining block length."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:518
+#: src/language/data-io/data-reader.c:519
 #, c-format
 msgid "Attempt to read beyond end-of-file on file %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:521
+#: src/language/data-io/data-reader.c:522
 msgid "Attempt to read beyond END DATA."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:707
+#: src/language/data-io/data-reader.c:708
 msgid ""
 "This command is not valid here since the current input program does not "
 "access the inline file."
@@ -3025,17 +3355,17 @@ msgstr ""
 msgid "Output calls for %d records but %zu specified on RECORDS subcommand."
 msgstr ""
 
-#: src/language/data-io/print.c:438
+#: src/language/data-io/print.c:436
 #, c-format
-msgid "Writing %d record to %s."
-msgid_plural "Writing %d records to %s."
+msgid "Writing %zu record to %s."
+msgid_plural "Writing %zu records to %s."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/language/data-io/print.c:442
+#: src/language/data-io/print.c:440
 #, c-format
-msgid "Writing %d record."
-msgid_plural "Writing %d records."
+msgid "Writing %zu record."
+msgid_plural "Writing %zu records."
 msgstr[0] ""
 msgstr[1] ""
 
@@ -3057,7 +3387,7 @@ msgstr ""
 msgid "`=' expected after variable list."
 msgstr ""
 
-#: src/language/data-io/trim.c:121
+#: src/language/data-io/trim.c:122
 #, c-format
 msgid ""
 "Number of variables on left side of `=' (%zu) does not match number of "
@@ -3068,12 +3398,12 @@ msgstr ""
 "variables on right side (%zu), in parenthesised group %d of RENAME \n"
 "subcommand."
 
-#: src/language/data-io/trim.c:134
+#: src/language/data-io/trim.c:135
 #, c-format
 msgid "Requested renaming duplicates variable name %s."
 msgstr ""
 
-#: src/language/data-io/trim.c:165
+#: src/language/data-io/trim.c:166
 msgid "Cannot DROP all variables from dictionary."
 msgstr ""
 
@@ -3254,2512 +3584,3421 @@ msgstr ""
 msgid "hash table:"
 msgstr ""
 
-#: src/libpspp/tmpfile.c:55
+#: src/libpspp/message.c:128
+msgid "error"
+msgstr ""
+
+#: src/libpspp/message.c:131
+msgid "warning"
+msgstr ""
+
+#: src/libpspp/message.c:135
+#, fuzzy
+msgid "note"
+msgstr "Centre"
+
+#: src/libpspp/tmpfile.c:56
 msgid "failed to create temporary file"
 msgstr ""
 
-#: src/libpspp/tmpfile.c:96
+#: src/libpspp/tmpfile.c:97
 msgid "seeking in temporary file"
 msgstr ""
 
-#: src/libpspp/tmpfile.c:115
+#: src/libpspp/tmpfile.c:116
 msgid "reading temporary file"
 msgstr ""
 
-#: src/libpspp/tmpfile.c:117
+#: src/libpspp/tmpfile.c:118
 msgid "unexpected end of file reading temporary file"
 msgstr ""
 
-#: src/libpspp/tmpfile.c:136
+#: src/libpspp/tmpfile.c:137
 msgid "writing to temporary file"
 msgstr ""
 
-#: src/math/percentiles.c:35
-msgid "HAverage"
+#: src/libpspp/zip-writer.c:91
+#, c-format
+msgid "%s: error opening output file"
+msgstr ""
+
+#: src/libpspp/zip-writer.c:224
+#, c-format
+msgid "%s: write failed"
 msgstr ""
 
 #: src/math/percentiles.c:36
-msgid "Weighted Average"
+msgid "HAverage"
 msgstr ""
 
 #: src/math/percentiles.c:37
-msgid "Rounded"
+msgid "Weighted Average"
 msgstr ""
 
 #: src/math/percentiles.c:38
-msgid "Empirical"
+msgid "Rounded"
 msgstr ""
 
 #: src/math/percentiles.c:39
-msgid "Empirical with averaging"
+msgid "Empirical"
 msgstr ""
 
-#: src/output/charts/plot-hist.c:138
-msgid "HISTOGRAM"
+#: src/math/percentiles.c:40
+msgid "Empirical with averaging"
 msgstr ""
 
-#: src/output/charts/plot-hist.c:140
-msgid "Frequency"
+#: src/output/ascii.c:278
+#, c-format
+msgid "%s: %s must be positive integer or `auto'"
 msgstr ""
 
-#: src/output/afm.c:149
+#: src/output/ascii.c:311
 #, c-format
-msgid "opening font metrics file \"%s\""
+msgid ""
+"ascii: page excluding margins and headers must be at least %d characters "
+"wide by %d lines long, but as configured is only %d characters by %d lines"
 msgstr ""
 
-#: src/output/afm.c:239
-msgid "first line must be StartFontMetrics"
+#: src/output/ascii.c:360
+#, c-format
+msgid "ascii: closing output file \"%s\""
 msgstr ""
 
-#: src/output/afm.c:266
+#: src/output/ascii.c:503
 #, c-format
-msgid "unsupported MappingScheme %d"
+msgid "See %s for a chart."
 msgstr ""
 
-#: src/output/afm.c:287
-msgid "required FontName is missing"
+#: src/output/ascii.c:806
+#, c-format
+msgid "ascii: opening output file \"%s\""
 msgstr ""
 
-#: src/output/afm.c:394
-msgid "CharMetrics line must start with C or CH"
+#: src/output/ascii.c:913 src/output/cairo.c:784
+#, c-format
+msgid "%s - Page %d"
 msgstr ""
 
-#: src/output/afm.c:535
+#: src/output/csv.c:87 src/output/html.c:106 src/output/journal.c:93
+#: src/output/msglog.c:66
 #, c-format
-msgid "reference to unknown character \"%s\""
+msgid "error opening output file \"%s\""
 msgstr ""
 
-#: src/output/afm.c:593
-msgid "expected end of file"
+#: src/output/driver.c:330
+#, c-format
+msgid ""
+"%s is not a valid device type (the choices are \"terminal\" and \"listing\")"
 msgstr ""
 
-#: src/output/afm.c:605
-msgid "syntax error expecting end of line"
+#: src/output/driver.c:343
+#, c-format
+msgid "%s: unknown option \"%s\""
 msgstr ""
 
-#: src/output/afm.c:623 src/output/afm.c:660
-msgid "number out of valid range"
+#: src/output/html.c:114
+msgid "PSPP Output"
 msgstr ""
 
-#: src/output/afm.c:625 src/output/afm.c:662
-msgid "invalid numeric syntax"
+#: src/output/journal.c:67
+#, c-format
+msgid "error writing output file \"%s\""
 msgstr ""
 
-#: src/output/afm.c:641
-msgid "syntax error expecting integer"
+#: src/output/measure.c:65
+#, c-format
+msgid "`%s' is not a valid length."
 msgstr ""
 
-#: src/output/afm.c:679
-msgid "syntax error expecting number"
+#: src/output/measure.c:93
+#, c-format
+msgid "syntax error in paper size `%s'"
 msgstr ""
 
-#: src/output/afm.c:692
-msgid "syntax error in hex constant"
+#: src/output/measure.c:230
+#, c-format
+msgid "unknown paper type `%.*s'"
 msgstr ""
 
-#: src/output/afm.c:707
-msgid "syntax error expecting hex constant"
+#: src/output/measure.c:248
+#, c-format
+msgid "error opening input file \"%s\""
 msgstr ""
 
-#: src/output/afm.c:745
-msgid "unexpected end of line"
+#: src/output/measure.c:259
+#, c-format
+msgid "error reading file \"%s\""
 msgstr ""
 
-#: src/output/afm.c:795
-msgid "unexpected end of line expecting string"
+#: src/output/measure.c:276
+#, c-format
+msgid "paper size file \"%s\" does not state a paper size"
 msgstr ""
 
-#: src/output/ascii.c:251
+#: src/output/options.c:113
 #, c-format
-msgid ""
-"ascii: page excluding margins and headers must be at least 59 characters "
-"wide by 15 lines long, but as configured is only %d characters by %d lines"
+msgid "%s: \"%s\" is \"%s\" but a Boolean value is required"
 msgstr ""
 
-#: src/output/ascii.c:329
+#: src/output/options.c:188
 #, c-format
-msgid ""
-"ascii: bad index value for `box' key: syntax is box[INDEX], 0 <= INDEX < %d "
-"decimal, with INDEX expressed in base 4"
+msgid "%s: \"%s\" is \"%s\" but one of the following is required: %s"
 msgstr ""
 
-#: src/output/ascii.c:336
+#: src/output/options.c:232
 #, c-format
-msgid "ascii: multiple values for %s"
+msgid "%s: \"%s\" is \"%s\" but a nonnegative integer is required"
 msgstr ""
 
-#: src/output/ascii.c:344
+#: src/output/options.c:236
 #, c-format
-msgid "ascii: unknown parameter `%s'"
+msgid "%s: \"%s\" is \"%s\" but a positive integer is required"
 msgstr ""
 
-#: src/output/ascii.c:360
-msgid "ascii: only screen devices may have `auto' length or width"
+#: src/output/options.c:239
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but an integer is required"
 msgstr ""
 
-#: src/output/ascii.c:374
+#: src/output/options.c:242
 #, c-format
-msgid "ascii: positive integer required as `%s' value"
+msgid "%s: \"%s\" is \"%s\" but an integer greater than %d is required"
 msgstr ""
 
-#: src/output/ascii.c:402
-msgid "ascii: `emphasis' value must be `bold', `underline', or `none'"
+#: src/output/options.c:247
+#, c-format
+msgid "%s: \"%s\" is \"%s\"  but an integer between %d and %d is required"
 msgstr ""
 
-#: src/output/ascii.c:415
+#: src/output/options.c:326
 #, c-format
-msgid "ascii: zero or positive integer required as `%s' value"
+msgid "%s: \"%s\" is \"%s\" but a file name that contains \"#\" is required."
 msgstr ""
 
-#: src/output/ascii.c:446
+#: src/output/tab.c:206
 #, c-format
-msgid "ascii: boolean value expected for `%s'"
+msgid "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
 msgstr ""
 
-#: src/output/ascii.c:478 src/output/html.c:187
-msgid "`chart-files' value must contain `#'"
+#: src/output/tab.c:244
+#, c-format
+msgid "bad hline: x=(%d+%d=%d,%d+%d=%d) y=%d+%d=%d in table size (%d,%d)\n"
 msgstr ""
 
-#: src/output/ascii.c:524
+#: src/output/tab.c:288
 #, c-format
-msgid "ascii: opening output file \"%s\""
+msgid ""
+"bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
 msgstr ""
 
-#: src/output/ascii.c:587
+#: src/output/cairo.c:295
 #, c-format
-msgid "ascii: bad line (%d,%d)-(%d,%d) out of (%d,%d)\n"
+msgid "error opening output file \"%s\": %s"
 msgstr ""
 
-#: src/output/ascii.c:809 src/output/postscript.c:826
+#: src/output/cairo.c:312
 #, c-format
-msgid "%s - Page %d"
+msgid ""
+"The defined page is not wide enough to hold at least %d characters in the "
+"default font.  In fact, there's only room for %d characters."
 msgstr ""
 
-#: src/output/ascii.c:861
+#: src/output/cairo.c:322
 #, c-format
-msgid "ascii: closing output file \"%s\""
+msgid ""
+"The defined page is not long enough to hold margins and headers, plus least %"
+"d lines of the default fonts.  In fact, there's only room for %d lines."
 msgstr ""
 
-#: src/output/html.c:71
+#: src/output/cairo.c:376
 #, c-format
-msgid "opening HTML output file: %s"
+msgid "error drawing output for %s driver: %s"
 msgstr ""
 
-#: src/output/html.c:82
-msgid "PSPP Output"
+#: src/output/cairo.c:864
+#, c-format
+msgid "\"%s\": bad font specification"
 msgstr ""
 
-#: src/output/html.c:170
+#: src/output/cairo.c:1084
 #, c-format
-msgid "unknown configuration parameter `%s' for HTML device driver"
+msgid "error writing output file \"%s\": %s"
 msgstr ""
 
-#: src/output/journal.c:69
+#: src/output/charts/np-plot-cairo.c:37
 #, c-format
-msgid "error writing \"%s\""
+msgid "Normal Q-Q Plot of %s"
 msgstr ""
 
-#: src/output/journal.c:94
-#, c-format
-msgid "error creating \"%s\""
+#: src/output/charts/np-plot-cairo.c:38 src/output/charts/np-plot-cairo.c:66
+msgid "Observed Value"
 msgstr ""
 
-#: src/output/output.c:168
-#, c-format
-msgid "unknown output driver `%s'"
+#: src/output/charts/np-plot-cairo.c:39
+msgid "Expected Normal"
 msgstr ""
 
-#: src/output/output.c:170
+#: src/output/charts/np-plot-cairo.c:64
 #, c-format
-msgid "output driver `%s' referenced but never defined"
+msgid "Detrended Normal Q-Q Plot of %s"
 msgstr ""
 
-#: src/output/output.c:261
-msgid "using default output driver configuration"
+#: src/output/charts/np-plot-cairo.c:67
+msgid "Dev from Normal"
 msgstr ""
 
-#: src/output/output.c:290
-msgid "cannot find output initialization file (use `-vv' to view search path)"
+#: src/output/charts/plot-hist-cairo.c:110
+msgid "HISTOGRAM"
 msgstr ""
 
-#: src/output/output.c:298
-#, c-format
-msgid "cannot open \"%s\""
+#: src/output/charts/plot-hist-cairo.c:112
+#: src/language/stats/frequencies.q:814
+msgid "Frequency"
 msgstr ""
 
-#: src/output/output.c:310
-#, c-format
-msgid "reading \"%s\""
+#: src/output/charts/roc-chart-cairo.c:36 src/ui/gui/roc.ui:7
+msgid "ROC Curve"
 msgstr ""
 
-#: src/output/output.c:332 src/ui/gui/message-dialog.c:99
-msgid "syntax error"
+#: src/output/charts/scree-cairo.c:36
+msgid "Scree Plot"
 msgstr ""
 
-#: src/output/output.c:341
-#, c-format
-msgid "error closing \"%s\""
+#: src/output/charts/scree-cairo.c:38
+msgid "Eigenvalue"
 msgstr ""
 
-#: src/output/output.c:349
-msgid "no active output drivers"
+#: src/output/odt.c:93
+msgid "error creating temporary file"
 msgstr ""
 
-#: src/output/output.c:352
-msgid "error reading device definition file"
+#: src/ui/source-init-opts.c:78
+msgid "Algorithm must be either \"compatible\" or \"enhanced\"."
 msgstr ""
 
-#: src/output/output.c:470
-#, c-format
-msgid ""
-"Driver classes:\n"
-"\t"
+#: src/ui/source-init-opts.c:103
+msgid "Syntax must be either \"compatible\" or \"enhanced\"."
 msgstr ""
 
-#: src/output/output.c:502
-#, c-format
-msgid "syntax error parsing options for \"%s\" driver"
+#: src/ui/terminal/main.c:128
+msgid ""
+"Stopping syntax file processing here to avoid a cascade of dependent command "
+"failures."
 msgstr ""
 
-#: src/output/output.c:518
+#: src/ui/terminal/msg-ui.c:127
 #, c-format
-msgid ""
-"reached end of options inside quoted string parsing options for \"%s\" driver"
+msgid "Notes (%d) exceed limit (%d).  Suppressing further notes."
 msgstr ""
 
-#: src/output/output.c:588
+#: src/ui/terminal/msg-ui.c:135
 #, c-format
-msgid "syntax error in string constant parsing options for \"%s\" driver"
+msgid "Warnings (%d) exceed limit (%d)."
 msgstr ""
 
-#: src/output/output.c:636
+#: src/ui/terminal/msg-ui.c:138
 #, c-format
-msgid "syntax error expecting `=' parsing options for driver \"%s\""
+msgid "Errors (%d) exceed limit (%d)."
 msgstr ""
 
-#: src/output/output.c:687
+#: src/ui/terminal/terminal.c:72
 #, c-format
-msgid "unknown output driver class `%.*s'"
+msgid "could not access definition for terminal `%s'"
 msgstr ""
 
-#: src/output/output.c:702
+#: src/ui/terminal/terminal-opts.c:119
 #, c-format
-msgid "unknown device type `%.*s'"
+msgid "%s: output option missing `='"
 msgstr ""
 
-#: src/output/output.c:719
+#: src/ui/terminal/terminal-opts.c:126
 #, c-format
-msgid "cannot initialize output driver `%s' of class `%s'"
-msgstr "cannot initialise output driver `%s' of class `%s'"
-
-#: src/output/output.c:765
-msgid "driver definition line missing driver name or class name"
+msgid "%s: output option specified more than once"
 msgstr ""
 
-#: src/output/output.c:868
-#, c-format
-msgid "`%s' is not a valid length."
+#: src/ui/gui/checkbox-treeview.c:92 src/language/stats/crosstabs.q:1213
+#: src/language/stats/crosstabs.q:1240 src/language/stats/crosstabs.q:1263
+#: src/language/stats/crosstabs.q:1287 src/language/stats/examine.q:1638
+msgid "Statistic"
 msgstr ""
 
-#: src/output/output.c:960
+#: src/ui/gui/comments-dialog.c:58
 #, c-format
-msgid "unknown paper type `%.*s'"
+msgid "Column Number: %d"
 msgstr ""
 
-#: src/output/output.c:978
-#, c-format
-msgid "error opening \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:41
+msgid "Chisq"
 msgstr ""
 
-#: src/output/output.c:989
-#, c-format
-msgid "error reading \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:42 src/language/stats/crosstabs.q:1774
+msgid "Phi"
 msgstr ""
 
-#: src/output/output.c:1006
-#, c-format
-msgid "paper size file \"%s\" does not state a paper size"
+#: src/ui/gui/crosstabs-dialog.c:43
+msgid "CC"
 msgstr ""
 
-#: src/output/output.c:1066
-#, c-format
-msgid "syntax error in paper size `%s'"
+#: src/ui/gui/crosstabs-dialog.c:44 src/language/stats/crosstabs.q:1912
+msgid "Lambda"
 msgstr ""
 
-#: src/output/postscript.c:158
-#, c-format
-msgid "opening PostScript output file \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:45
+msgid "UC"
 msgstr ""
 
-#: src/output/postscript.c:196
-#, c-format
-msgid ""
-"The defined PostScript page is not long enough to hold margins and headers, "
-"plus least 15 lines of the default fonts.  In fact, there's only room for %d "
-"lines of each font at the default size of %d.%03d points."
+#: src/ui/gui/crosstabs-dialog.c:46
+msgid "BTau"
 msgstr ""
 
-#: src/output/postscript.c:246
-#, c-format
-msgid "closing PostScript output file \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:47
+msgid "CTau"
 msgstr ""
 
-#: src/output/postscript.c:309
-#, c-format
-msgid "unknown configuration parameter `%s' for PostScript device driver"
+#: src/ui/gui/crosstabs-dialog.c:48
+msgid "Risk"
 msgstr ""
 
-#: src/output/postscript.c:325
-#, c-format
-msgid ""
-"unknown orientation `%s' (valid orientations are `portrait' and `landscape')"
+#: src/ui/gui/crosstabs-dialog.c:49 src/language/stats/crosstabs.q:1779
+msgid "Gamma"
 msgstr ""
 
-#: src/output/postscript.c:337
-#, c-format
-msgid "boolean value expected for %s"
+#: src/ui/gui/crosstabs-dialog.c:50
+msgid "D"
 msgstr ""
 
-#: src/output/postscript.c:350
-#, c-format
-msgid "positive integer value required for `%s'"
+#: src/ui/gui/crosstabs-dialog.c:51 src/language/stats/crosstabs.q:1782
+msgid "Kappa"
 msgstr ""
 
-#: src/output/postscript.c:355
-#, c-format
-msgid "default font size must be at least 1 point (value of 1000 for key `%s')"
+#: src/ui/gui/crosstabs-dialog.c:52 src/language/stats/crosstabs.q:1916
+msgid "Eta"
 msgstr ""
 
-#: src/output/postscript.c:1176
-#, c-format
-msgid "\"%s\": bad font specification"
+#: src/ui/gui/crosstabs-dialog.c:53
+msgid "Corr"
 msgstr ""
 
-#: src/output/postscript.c:1184
-#, c-format
-msgid "could not find AFM file \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:54 src/ui/gui/crosstabs-dialog.c:65
+#: src/ui/gui/crosstabs-dialog.c:100 src/ui/gui/crosstabs-dialog.c:108
+#: src/ui/gui/psppire-var-store.c:612 src/ui/gui/var-display.c:16
+#: src/ui/gui/variable-info-dialog.c:41
+msgid "None"
 msgstr ""
 
-#: src/output/postscript.c:1198
-#, c-format
-msgid "could not find font \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:57
+msgid "Count"
 msgstr ""
 
-#: src/output/postscript.c:1207
-#, c-format
-msgid "could not find encoding \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:58
+msgid "Row"
 msgstr ""
 
-#: src/output/postscript.c:1307
-#, c-format
-msgid "cannot open font file \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:59
+msgid "Column"
 msgstr ""
 
-#: src/output/postscript.c:1348
-#, c-format
-msgid "reading font file \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:61
+msgid "Expected"
 msgstr ""
 
-#: src/output/postscript.c:1370
-#, c-format
-msgid "cannot open font encoding file \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:63
+msgid "Std. Residual"
 msgstr ""
 
-#: src/output/postscript.c:1399
-msgid "invalid numeric format"
+#: src/ui/gui/crosstabs-dialog.c:64
+msgid "Adjusted Std. Residual"
 msgstr ""
 
-#: src/output/postscript.c:1421
-#, c-format
-msgid "closing Postscript encoding \"%s\""
+#: src/ui/gui/descriptives-dialog.c:41 src/ui/gui/frequencies-dialog.c:42
+msgid "Standard deviation"
 msgstr ""
 
-#: src/output/table.c:237
-#, c-format
-msgid "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
+#: src/ui/gui/descriptives-dialog.c:46
+msgid "Standard error"
 msgstr ""
 
-#: src/output/table.c:308
+#: src/ui/gui/find-dialog.c:649
 #, c-format
-msgid ""
-"bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
+msgid "Bad regular expression: %s"
 msgstr ""
 
-#: src/output/chart.c:154
+#: src/ui/gui/factor-dialog.c:344
 #, c-format
-msgid "creating \"%s\""
+msgid "Eigenvalues over %4.2f times the mean eigenvalue"
 msgstr ""
 
-#: src/ui/source-init-opts.c:42
-msgid ""
-"set to `compatible' if you want output calculated from broken algorithms"
+#: src/ui/gui/frequencies-dialog.c:45
+msgid "Standard error of the mean"
 msgstr ""
 
-#: src/ui/source-init-opts.c:43
-msgid "Append DIR to include path"
+#: src/ui/gui/frequencies-dialog.c:48
+msgid "Standard error of the skewness"
 msgstr ""
 
-#: src/ui/source-init-opts.c:44
-msgid "Clear include path"
+#: src/ui/gui/frequencies-dialog.c:50 src/language/stats/frequencies.q:108
+msgid "Mode"
 msgstr ""
 
-#: src/ui/source-init-opts.c:45
-msgid "Disable execution of .pspp/rc at startup"
+#: src/ui/gui/frequencies-dialog.c:52
+msgid "Standard error of the kurtosis"
 msgstr ""
 
-#: src/ui/source-init-opts.c:46
-msgid "Set configuration directory to DIR"
+#: src/ui/gui/frequencies-dialog.c:53 src/language/stats/examine.q:1469
+#: src/language/stats/frequencies.q:107
+msgid "Median"
 msgstr ""
 
-#: src/ui/source-init-opts.c:47
-msgid "Don't allow some unsafe operations"
+#: src/ui/gui/helper.c:197
+msgid "Sorry. The help system hasn't yet been implemented."
 msgstr ""
 
-#: src/ui/source-init-opts.c:48
-msgid "Set to `compatible' if you want only to accept SPSS compatible syntax"
+#: src/ui/gui/help-menu.c:67
+msgid "A program for the analysis of sampled data"
 msgstr ""
 
-#: src/ui/source-init-opts.c:83
-msgid "Algorithm must be either \"compatible\" or \"enhanced\"."
-msgstr ""
+#. TRANSLATORS: Use this string to list the people who have helped with
+#. translation to your language.
+#: src/ui/gui/help-menu.c:77
+msgid "translator-credits"
+msgstr "John Darrington"
 
-#: src/ui/source-init-opts.c:124
-msgid "Syntax must be either \"compatible\" or \"enhanced\"."
+#: src/ui/gui/help-menu.c:98
+#, c-format
+msgid ""
+"Cannot open reference manual: %s.  The PSPP user manual is also available at "
+"http://www.gnu.org/software/pspp/documentation.html"
+msgstr ""
+
+#: src/ui/gui/help-menu.c:117
+msgid "_Help"
 msgstr ""
 
-#: src/ui/terminal/main.c:115
-msgid "PSPP --- A program for statistical analysis"
+#: src/ui/gui/help-menu.c:124
+msgid "_Reference Manual"
 msgstr ""
 
-#: src/ui/terminal/main.c:116
-msgid "FILE1, FILE2 ... FILEn"
+#: src/ui/gui/missing-val-dialog.c:113 src/ui/gui/missing-val-dialog.c:167
+msgid "Incorrect value for variable type"
 msgstr ""
 
-#: src/ui/terminal/main.c:119 src/ui/terminal/terminal-opts.c:177
-msgid "Options affecting input and output locations:"
+#: src/ui/gui/missing-val-dialog.c:134 src/ui/gui/missing-val-dialog.c:143
+msgid "Incorrect range specification"
 msgstr ""
 
-#: src/ui/terminal/main.c:122 src/ui/terminal/terminal-opts.c:178
-msgid "Diagnostic options:"
+#: src/ui/gui/oneway-anova-dialog.c:313
+#, c-format
+msgid "Contrast %d of %d"
 msgstr ""
 
-#: src/ui/terminal/main.c:125 src/ui/gui/main.c:177
-msgid "Options affecting syntax and behavior:"
-msgstr "Options affecting syntax and behaviour:"
+#: src/ui/gui/psppire.c:224
+msgid "_Reset"
+msgstr ""
 
-#: src/ui/terminal/main.c:156
-msgid ""
-"Stopping syntax file processing here to avoid a cascade of dependent command "
-"failures."
+#: src/ui/gui/psppire.c:225
+msgid "_Select"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:67
-#, c-format
-msgid "Cannot open %s (%s). Writing errors to stdout instead.\n"
+#: src/ui/gui/psppire-data-editor.c:951
+msgid "Data View"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:94
-msgid "Terminating execution of syntax file due to error."
+#: src/ui/gui/psppire-data-editor.c:954
+msgid "Variable View"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:96
-#, c-format
-msgid "Errors (%d) exceeds limit (%d)."
+#: src/ui/gui/psppire-data-store.c:744
+msgid "var"
+msgstr ""
+
+#: src/ui/gui/psppire-data-window.c:212
+msgid "Transformations Pending"
+msgstr ""
+
+#: src/ui/gui/psppire-data-window.c:228
+msgid "Filter off"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:99
+#: src/ui/gui/psppire-data-window.c:242
 #, c-format
-msgid "Warnings (%d) exceed limit (%d)."
+msgid "Filter by %s"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:150
-msgid "error"
+#: src/ui/gui/psppire-data-window.c:263
+msgid "No Split"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:151
-msgid "warning"
+#: src/ui/gui/psppire-data-window.c:272
+msgid "Split by "
 msgstr ""
 
-#: src/ui/terminal/terminal.c:72
+#: src/ui/gui/psppire-data-window.c:300
+msgid "Weights off"
+msgstr ""
+
+#: src/ui/gui/psppire-data-window.c:314
 #, c-format
-msgid "could not access definition for terminal `%s'"
+msgid "Weight by %s"
 msgstr ""
 
-#: src/ui/terminal/terminal-opts.c:41
-msgid "Increase diagnostic verbosity level"
+#: src/ui/gui/psppire-data-window.c:382
+msgid "Open"
 msgstr ""
 
-#: src/ui/terminal/terminal-opts.c:68
-msgid "Send error messages to FILE (appended)"
+#: src/ui/gui/psppire-data-window.c:392
+msgid "Data and Syntax Files"
 msgstr ""
 
-#: src/ui/terminal/terminal-opts.c:71
-msgid "Select output driver DEVICE and disable defaults"
+#: src/ui/gui/psppire-data-window.c:402 src/ui/gui/psppire-data-window.c:611
+msgid "System Files (*.sav)"
 msgstr ""
 
-#: src/ui/terminal/terminal-opts.c:74
-msgid "Print a list of known driver classes, then exit"
+#: src/ui/gui/psppire-data-window.c:408 src/ui/gui/psppire-data-window.c:617
+msgid "Portable Files (*.por) "
 msgstr ""
 
-#: src/ui/terminal/terminal-opts.c:76
-msgid "Start an interactive session"
+#: src/ui/gui/psppire-data-window.c:414 src/ui/gui/psppire-syntax-window.c:292
+msgid "Syntax Files (*.sps) "
 msgstr ""
 
-#: src/ui/gui/about.c:64
-msgid "A program for the analysis of sampled data"
+#: src/ui/gui/psppire-data-window.c:420 src/ui/gui/psppire-data-window.c:623
+#: src/ui/gui/psppire-syntax-window.c:298
+msgid "All Files"
 msgstr ""
 
-#. TRANSLATORS: Use this string to list the people who have helped with
-#. translation to your language.
-#: src/ui/gui/about.c:74
-msgid "translator-credits"
-msgstr "John Darrington"
+#: src/ui/gui/psppire-data-window.c:603
+msgid "Save"
+msgstr ""
 
-#: src/ui/gui/checkbox-treeview.c:92
-msgid "Statistic"
+#: src/ui/gui/psppire-data-window.c:636
+msgid "Portable File"
 msgstr ""
 
-#: src/ui/gui/comments-dialog.c:58
-#, c-format
-msgid "Column Number: %d"
+#: src/ui/gui/psppire-data-window.c:773
+msgid "Font Selection"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:40
-msgid "Chisq"
+#: src/ui/gui/psppire-data-window.c:1261
+msgid "Data Editor"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:41
-msgid "Phi"
+#: src/ui/gui/psppire-output-window.c:458
+msgid "Export Output"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:42
-msgid "CC"
+#: src/ui/gui/psppire-output-window.c:466
+msgid "PDF Files (*.pdf)"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:43
-msgid "Lambda"
+#: src/ui/gui/psppire-output-window.c:467
+msgid "HTML Files (*.html)"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:44
-msgid "UC"
+#: src/ui/gui/psppire-output-window.c:468
+msgid "OpenDocument Files (*.odt)"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:45
-msgid "BTau"
+#: src/ui/gui/psppire-output-window.c:469
+msgid "Text Files (*.txt)"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:46
-msgid "CTau"
+#: src/ui/gui/psppire-output-window.c:470
+msgid "PostScript Files (*.ps)"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:47
-msgid "Risk"
+#: src/ui/gui/psppire-output-window.c:471
+msgid "Comma-Separated Value Files (*.csv)"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:48
-msgid "Gamma"
+#: src/ui/gui/psppire-output-window.c:605
+msgid "Output Viewer"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:49
-msgid "D"
+#: src/ui/gui/psppire-syntax-window.c:265
+#, c-format
+msgid "Saved file \"%s\""
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:50
-msgid "Kappa"
+#: src/ui/gui/psppire-syntax-window.c:284
+msgid "Save Syntax"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:51
-msgid "Eta"
+#: src/ui/gui/psppire-syntax-window.c:496
+msgid "Syntax Editor"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:52
-msgid "Corr"
+#: src/ui/gui/psppire-syntax-window.c:510
+#, c-format
+msgid "Cannot load syntax file '%s'"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:53 src/ui/gui/crosstabs-dialog.c:64
-#: src/ui/gui/crosstabs-dialog.c:99 src/ui/gui/crosstabs-dialog.c:107
-#: src/ui/gui/psppire-var-store.c:612 src/ui/gui/var-display.c:16
-#: src/ui/gui/variable-info-dialog.c:40
-msgid "None"
+#: src/ui/gui/psppire-var-sheet.c:535 src/ui/gui/psppire-var-store.c:833
+#: src/language/stats/crosstabs.q:1288 src/ui/gui/psppire.ui:2055
+msgid "Type"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:56
-msgid "Count"
+#: src/ui/gui/psppire-var-sheet.c:536 src/ui/gui/psppire-var-store.c:834
+#: src/ui/gui/psppire.ui:1974
+msgid "Width"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:57
-msgid "Row"
+#: src/ui/gui/psppire-var-sheet.c:537 src/ui/gui/psppire-var-store.c:835
+msgid "Decimals"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:58
-msgid "Column"
+#: src/ui/gui/psppire-var-sheet.c:539 src/ui/gui/psppire-var-store.c:837
+msgid "Values"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:60
-msgid "Expected"
+#: src/ui/gui/psppire-var-sheet.c:540 src/ui/gui/psppire-var-store.c:838
+#: src/language/stats/crosstabs.q:822 src/language/stats/examine.q:1104
+#: src/language/stats/frequencies.q:864 src/language/stats/frequencies.q:1036
+msgid "Missing"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:62
-msgid "Std. Residual"
+#: src/ui/gui/psppire-var-sheet.c:542 src/ui/gui/psppire-var-store.c:840
+msgid "Align"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:63
-msgid "Adjusted Std. Residual"
+#: src/ui/gui/psppire-var-sheet.c:543 src/ui/gui/psppire-var-store.c:841
+msgid "Measure"
 msgstr ""
 
-#: src/ui/gui/customentry.c:334
-msgid "Style of bevel around the custom entry button"
+#: src/ui/gui/psppire-var-store.c:622 src/ui/gui/var-sheet-dialogs.ui:43
+msgid "Comma"
 msgstr ""
 
-#: src/ui/gui/descriptives-dialog.c:40 src/ui/gui/frequencies-dialog.c:41
-msgid "Standard deviation"
+#: src/ui/gui/psppire-var-store.c:623 src/ui/gui/var-sheet-dialogs.ui:59
+msgid "Dot"
 msgstr ""
 
-#: src/ui/gui/descriptives-dialog.c:45
-msgid "Standard error"
+#: src/ui/gui/psppire-var-store.c:624
+msgid "Scientific"
+msgstr ""
+
+#: src/ui/gui/psppire-var-store.c:625 src/ui/gui/var-sheet-dialogs.ui:91
+msgid "Date"
+msgstr ""
+
+#: src/ui/gui/psppire-var-store.c:626 src/ui/gui/var-sheet-dialogs.ui:107
+msgid "Dollar"
+msgstr ""
+
+#: src/ui/gui/psppire-var-store.c:627
+msgid "Custom"
 msgstr ""
 
-#: src/ui/gui/find-dialog.c:652
+#: src/ui/gui/psppire-window.c:97
 #, c-format
-msgid "Bad regular expression: %s"
+msgid "%s %s PSPPIRE %s"
 msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:44
-msgid "Standard error of the mean"
+#: src/ui/gui/psppire-window.c:468
+#, c-format
+msgid "Save the changes to \"%s\" before closing?"
 msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:47
-msgid "Standard error of the skewness"
+#: src/ui/gui/psppire-window.c:475
+#, c-format
+msgid ""
+"If you don't save, changes from the last %ld seconds will be permanently "
+"lost."
 msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:49
-msgid "Mode"
+#: src/ui/gui/psppire-window.c:479
+msgid "Close _without saving"
 msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:51
-msgid "Standard error of the kurtosis"
+#: src/ui/gui/recode-dialog.c:911
+msgid "Recode into Different Variables"
 msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:52
-msgid "Median"
+#: src/ui/gui/recode-dialog.c:914 src/ui/gui/recode.ui:692
+msgid "Recode into Same Variables"
 msgstr ""
 
-#: src/ui/gui/helper.c:197
-msgid "Sorry. The help system hasn't yet been implemented."
+#: src/ui/gui/recode-dialog.c:929 src/ui/gui/recode-dialog.c:1025
+msgid "New"
 msgstr ""
 
-#: src/ui/gui/helper.c:242
-#, c-format
-msgid "Cannot open reference manual: %s"
+#: src/ui/gui/recode-dialog.c:944 src/ui/gui/recode-dialog.c:1017
+msgid "Old"
+msgstr ""
+
+#: src/ui/gui/recode-dialog.c:1274
+msgid "Recode into Different Variables: Old and New Values "
+msgstr ""
+
+#: src/ui/gui/recode-dialog.c:1275
+msgid "Recode into Same Variables: Old and New Values"
+msgstr ""
+
+#: src/ui/gui/regression-dialog.c:42
+msgid "Coeff"
+msgstr ""
+
+#: src/ui/gui/regression-dialog.c:43 src/language/stats/regression.q:155
+msgid "R"
+msgstr ""
+
+#: src/ui/gui/regression-dialog.c:44
+msgid "Anova"
 msgstr ""
 
-#: src/ui/gui/main.c:43
-msgid "Don't show the splash screen"
+#: src/ui/gui/regression-dialog.c:45
+msgid "Bcov"
 msgstr ""
 
-#: src/ui/gui/main.c:173
-msgid "PSPPIRE --- A user interface for PSPP"
+#: src/ui/gui/select-cases-dialog.c:82
+#, c-format
+msgid "Approximately %3d%% of all cases."
 msgstr ""
 
-#: src/ui/gui/main.c:175
-msgid "Miscellaneous options:"
+#: src/ui/gui/select-cases-dialog.c:83
+#, c-format
+msgid "Exactly %3d cases from the first %3d cases."
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:103
-msgid "data file error"
+#: src/ui/gui/select-cases-dialog.c:223
+#, c-format
+msgid "%d thru %d"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:108
-msgid "PSPP error"
+#: src/ui/gui/text-data-import-dialog.c:461
+#, c-format
+msgid "Could not open \"%s\": %s"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:116
-msgid "syntax warning"
+#: src/ui/gui/text-data-import-dialog.c:477
+#, c-format
+msgid "Error reading \"%s\": %s"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:120
-msgid "data file warning"
+#: src/ui/gui/text-data-import-dialog.c:480
+#, c-format
+msgid ""
+"Failed to read \"%s\", because it contains a line over %d bytes long and "
+"therefore appears not to be a text file."
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:125
-msgid "PSPP warning"
+#: src/ui/gui/text-data-import-dialog.c:494
+#, c-format
+msgid "\"%s\" is empty."
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:134
-msgid "syntax information"
+#: src/ui/gui/text-data-import-dialog.c:539
+msgid "Import Delimited Text Data"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:138
-msgid "data file information"
+#: src/ui/gui/text-data-import-dialog.c:590
+msgid "Importing Delimited Text Data"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:143
-msgid "PSPP information"
+#: src/ui/gui/text-data-import-dialog.c:749
+msgid ""
+"This assistant will guide you through the process of importing data into "
+"PSPP from a text file with one line per case,  in which fields are separated "
+"by tabs, commas, or other delimiters.\n"
+"\n"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:222
-msgid "The PSPP processing engine reported the following message:"
-msgid_plural "The PSPP processing engine reported the following messages:"
+#: src/ui/gui/text-data-import-dialog.c:755
+#, c-format
+msgid "The selected file contains %zu line of text.  "
+msgid_plural "The selected file contains %zu lines of text.  "
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/ui/gui/message-dialog.c:229
+#: src/ui/gui/text-data-import-dialog.c:763
 #, c-format
-msgid "The PSPP processing engine reported %d message."
-msgid_plural "The PSPP processing engine reported %d messages."
+msgid "The selected file contains approximately %lu line of text.  "
+msgid_plural "The selected file contains approximately %lu lines of text.  "
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/ui/gui/message-dialog.c:236
+#: src/ui/gui/text-data-import-dialog.c:769
 #, c-format
-msgid "%d of these messages are displayed below."
-msgid_plural "%d of these messages are displayed below."
+msgid ""
+"Only the first %zu line of the file will be shown for preview purposes in "
+"the following screens.  "
+msgid_plural ""
+"Only the first %zu lines of the file will be shown for preview purposes in "
+"the following screens.  "
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/ui/gui/missing-val-dialog.c:113 src/ui/gui/missing-val-dialog.c:167
-msgid "Incorrect value for variable type"
+#: src/ui/gui/text-data-import-dialog.c:776
+msgid "You may choose below how much of the file should actually be imported."
 msgstr ""
 
-#: src/ui/gui/missing-val-dialog.c:134 src/ui/gui/missing-val-dialog.c:143
-msgid "Incorrect range specification"
+#: src/ui/gui/text-data-import-dialog.c:1523
+#: src/ui/gui/text-data-import-dialog.c:1768
+msgid "This input line has too few separators to fill in this field."
 msgstr ""
 
-#: src/ui/gui/oneway-anova-dialog.c:331
+#: src/ui/gui/text-data-import-dialog.c:1759
 #, c-format
-msgid "Contrast %d of %d"
+msgid "Field content \"%.*s\" cannot be parsed in format %s."
 msgstr ""
 
-#: src/ui/gui/psppire.c:247
-msgid "_Reset"
+#: src/ui/gui/t-test-options.c:60
+#, c-format
+msgid "Confidence Interval: %2d %%"
 msgstr ""
 
-#: src/ui/gui/psppire.c:248
-msgid "_Select"
+#: src/ui/gui/variable-info-dialog.c:77
+#, c-format
+msgid "Label: %s\n"
 msgstr ""
 
-#: src/ui/gui/psppire-data-editor.c:951
-msgid "Data View"
+#: src/ui/gui/variable-info-dialog.c:84
+#, c-format
+msgid "Type: %s\n"
+msgstr ""
+
+#: src/ui/gui/variable-info-dialog.c:88
+#, c-format
+msgid "Missing Values: %s\n"
+msgstr ""
+
+#: src/ui/gui/variable-info-dialog.c:93
+#, c-format
+msgid "Measurement Level: %s\n"
+msgstr ""
+
+#: src/ui/gui/variable-info-dialog.c:106
+msgid "Value Labels:\n"
+msgstr ""
+
+#: src/ui/gui/variable-info-dialog.c:116
+#, c-format
+msgid "%s %s\n"
+msgstr ""
+
+#: src/ui/gui/weight-cases-dialog.c:81 src/ui/gui/psppire.ui:52
+#: src/ui/gui/psppire.ui:155
+msgid "Do not weight cases"
+msgstr ""
+
+#: src/ui/gui/weight-cases-dialog.c:87
+#, c-format
+msgid "Weight cases by %s"
+msgstr ""
+
+#: tests/dissect-sysfile.c:571
+#, c-format
+msgid "Unrecognized record type 7, subtype %d."
+msgstr "Unrecognised record type 7, subtype %d."
+
+#: tests/dissect-sysfile.c:850
+#, c-format
+msgid "%s: Error parsing attribute value %s[%d]"
+msgstr ""
+
+#: tests/dissect-sysfile.c:856
+#, c-format
+msgid "%s: Attribute value %s[%d] is not quoted: %s"
+msgstr ""
+
+#: tests/dissect-sysfile.c:880
+#, c-format
+msgid "Bad size %zu for extended number of cases."
+msgstr ""
+
+#: tests/dissect-sysfile.c:886
+#, c-format
+msgid "Bad count %zu for extended number of cases."
+msgstr ""
+
+#: src/language/utilities/set.q:188
+msgid "WORKSPACE must be at least 1MB"
+msgstr ""
+
+#: src/language/utilities/set.q:194 src/language/utilities/set.q:196
+#: src/language/utilities/set.q:198 src/language/utilities/set.q:200
+#: src/language/utilities/set.q:202 src/language/utilities/set.q:204
+#: src/language/utilities/set.q:206 src/language/utilities/set.q:208
+#: src/language/utilities/set.q:210
+#, c-format
+msgid "%s is obsolete."
+msgstr ""
+
+#: src/language/utilities/set.q:216
+msgid "Active file compression is not implemented."
+msgstr ""
+
+#: src/language/utilities/set.q:334
+msgid "EPOCH must be 1500 or later."
+msgstr ""
+
+#: src/language/utilities/set.q:341
+msgid "expecting AUTOMATIC or year"
+msgstr ""
+
+#: src/language/utilities/set.q:369
+msgid "LENGTH must be at least 1."
+msgstr ""
+
+#: src/language/utilities/set.q:405
+#, c-format
+msgid "%s is not a recognised encoding or locale name"
+msgstr ""
+
+#: src/language/utilities/set.q:467
+msgid "WIDTH must be at least 40."
+msgstr ""
+
+#: src/language/utilities/set.q:490
+#, c-format
+msgid ""
+"FORMAT requires numeric output format as an argument.  Specified format %s "
+"is of type string."
+msgstr ""
+
+#: src/language/utilities/set.q:707
+msgid "ISL (32-bit IEEE 754 single, little-endian)"
+msgstr ""
+
+#: src/language/utilities/set.q:710
+msgid "ISB (32-bit IEEE 754 single, big-endian)"
+msgstr ""
+
+#: src/language/utilities/set.q:713
+msgid "IDL (64-bit IEEE 754 double, little-endian)"
+msgstr ""
+
+#: src/language/utilities/set.q:716
+msgid "IDB (64-bit IEEE 754 double, big-endian)"
+msgstr ""
+
+#: src/language/utilities/set.q:720
+msgid "VF (32-bit VAX F, VAX-endian)"
+msgstr ""
+
+#: src/language/utilities/set.q:723
+msgid "VD (64-bit VAX D, VAX-endian)"
+msgstr ""
+
+#: src/language/utilities/set.q:726
+msgid "VG (64-bit VAX G, VAX-endian)"
+msgstr ""
+
+#: src/language/utilities/set.q:730
+msgid "ZS (32-bit IBM Z hexadecimal short, big-endian)"
+msgstr ""
+
+#: src/language/utilities/set.q:733
+msgid "ZL (64-bit IBM Z hexadecimal long, big-endian)"
+msgstr ""
+
+#: src/language/utilities/set.q:835
+#, c-format
+msgid "%s is %s."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:289
+msgid ""
+"Missing mode REPORT not allowed in general mode.  Assuming MISSING=TABLE."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:399
+msgid "Too many cross-tabulation variables or dimensions."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:409
+msgid "expecting BY"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:466
+msgid "VARIABLES must be specified before TABLES."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:504
+#, c-format
+msgid "Maximum value (%ld) less than minimum value (%ld)."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:818
+msgid "Summary."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:820 src/language/stats/examine.q:1164
+#: src/language/stats/reliability.q:693
+msgid "Cases"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:821 src/language/stats/examine.q:1103
+#: src/language/stats/frequencies.q:1035 src/language/stats/reliability.q:696
+msgid "Valid"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:831 src/language/stats/examine.q:1179
+#: src/language/stats/frequencies.q:815
+msgid "Percent"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1109
+msgid "count"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1110
+msgid "row %"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1111
+msgid "column %"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1112
+msgid "total %"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1113
+msgid "expected"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1114
+msgid "residual"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1115
+msgid "std. resid."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1116
+msgid "adj. resid."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1210
+msgid "Chi-square tests."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1217
+msgid "Asymp. Sig. (2-sided)"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1219
+msgid "Exact Sig. (2-sided)"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1221
+msgid "Exact Sig. (1-sided)"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1236
+msgid "Symmetric measures."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1242 src/language/stats/crosstabs.q:1290
+msgid "Asymp. Std. Error"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1243 src/language/stats/crosstabs.q:1291
+msgid "Approx. T"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1244 src/language/stats/crosstabs.q:1292
+msgid "Approx. Sig."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1258
+msgid "Risk estimate."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1262
+#, c-format
+msgid "95%% Confidence Interval"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1265 src/language/stats/t-test.q:756
+#: src/language/stats/t-test.q:920 src/language/stats/t-test.q:1013
+msgid "Lower"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1266 src/language/stats/t-test.q:757
+#: src/language/stats/t-test.q:921 src/language/stats/t-test.q:1014
+msgid "Upper"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1283
+msgid "Directional measures."
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1708
+msgid "Pearson Chi-Square"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1709
+msgid "Likelihood Ratio"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1710
+msgid "Fisher's Exact Test"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1711
+msgid "Continuity Correction"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1712
+msgid "Linear-by-Linear Association"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1747 src/language/stats/crosstabs.q:1822
+#: src/language/stats/crosstabs.q:1887
+msgid "N of Valid Cases"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1766 src/language/stats/crosstabs.q:1905
+msgid "Nominal by Nominal"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1767 src/language/stats/crosstabs.q:1906
+msgid "Ordinal by Ordinal"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1768
+msgid "Interval by Interval"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1769
+msgid "Measure of Agreement"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1775
+msgid "Cramer's V"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1776
+msgid "Contingency Coefficient"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1777
+msgid "Kendall's tau-b"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1778
+msgid "Kendall's tau-c"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1780
+msgid "Spearman Correlation"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1781
+msgid "Pearson's R"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1860
+#, c-format
+msgid "Odds Ratio for %s (%g / %g)"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1863
+#, c-format
+msgid "Odds Ratio for %s (%.*s / %.*s)"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1871
+#, c-format
+msgid "For cohort %s = %g"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1874
+#, c-format
+msgid "For cohort %s = %.*s"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1907
+msgid "Nominal by Interval"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1913
+msgid "Goodman and Kruskal tau"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1914
+msgid "Uncertainty Coefficient"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1915
+msgid "Somers' d"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1921
+msgid "Symmetric"
+msgstr ""
+
+#: src/language/stats/crosstabs.q:1922 src/language/stats/crosstabs.q:1923
+#, c-format
+msgid "%s Dependent"
+msgstr ""
+
+#: src/language/stats/examine.q:357
+msgid "Not creating NP plot because data set is empty."
+msgstr ""
+
+#: src/language/stats/examine.q:442 src/language/stats/examine.q:949
+msgid "Not creating plot because data set is empty."
+msgstr ""
+
+#: src/language/stats/examine.q:454
+#, c-format
+msgid "Boxplot of %s vs. %s"
+msgstr ""
+
+#: src/language/stats/examine.q:458
+#, c-format
+msgid "Boxplot of %s"
+msgstr ""
+
+#: src/language/stats/examine.q:647 src/language/stats/examine.q:660
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr ""
+
+#: src/language/stats/examine.q:1159 src/language/stats/reliability.q:670
+msgid "Case Processing Summary"
+msgstr ""
+
+#: src/language/stats/examine.q:1449 src/language/stats/oneway.q:394
+#, c-format
+msgid "%g%% Confidence Interval for Mean"
+msgstr ""
+
+#: src/language/stats/examine.q:1464
+msgid "5% Trimmed Mean"
+msgstr ""
+
+#: src/language/stats/examine.q:1499
+msgid "Interquartile Range"
+msgstr ""
+
+#: src/language/stats/examine.q:1635 src/language/stats/oneway.q:404
+#: src/ui/gui/descriptives.ui:8 src/ui/gui/examine.ui:319
+msgid "Descriptives"
+msgstr ""
+
+#: src/language/stats/examine.q:1821
+msgid "Highest"
+msgstr ""
+
+#: src/language/stats/examine.q:1826
+msgid "Lowest"
+msgstr ""
+
+#: src/language/stats/examine.q:1833
+msgid "Extreme Values"
+msgstr ""
+
+#: src/language/stats/examine.q:1837 src/language/data-io/list.q:158
+msgid "Case Number"
+msgstr ""
+
+#: src/language/stats/examine.q:1957
+msgid "Tukey's Hinges"
+msgstr ""
+
+#: src/language/stats/examine.q:2003
+#, c-format
+msgid "%g"
+msgstr ""
+
+#: src/language/stats/frequencies.q:382
+msgid "Bar charts are not implemented."
+msgstr ""
+
+#: src/language/stats/frequencies.q:399
+#, c-format
+msgid ""
+"MAX for histogram must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
+msgstr ""
+
+#: src/language/stats/frequencies.q:420
+#, c-format
+msgid ""
+"MAX for pie chart must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
+msgstr ""
+
+#: src/language/stats/frequencies.q:703
+msgid "`)' expected after GROUPED interval list."
+msgstr ""
+
+#: src/language/stats/frequencies.q:723
+#, c-format
+msgid "Variables %s specified multiple times on GROUPED subcommand."
+msgstr ""
+
+#: src/language/stats/frequencies.q:733
+#, c-format
+msgid "Variables %s specified on GROUPED but not on VARIABLES."
+msgstr ""
+
+#: src/language/stats/frequencies.q:812
+msgid "Value Label"
+msgstr ""
+
+#: src/language/stats/frequencies.q:816
+msgid "Valid Percent"
+msgstr ""
+
+#: src/language/stats/frequencies.q:817
+msgid "Cum Percent"
+msgstr ""
+
+#: src/language/stats/frequencies.q:1008
+#, c-format
+msgid "No valid data for variable %s; statistics not displayed."
+msgstr ""
+
+#: src/language/stats/frequencies.q:1054
+msgid "50 (Median)"
+msgstr ""
+
+#: src/language/stats/frequencies.q:1209
+#, c-format
+msgid "Omitting pie chart for %s, which has only %d unique values."
+msgstr ""
+
+#: src/language/stats/frequencies.q:1212
+#, c-format
+msgid "Omitting pie chart for %s, which has over 50 unique values."
+msgstr ""
+
+#: src/language/stats/glm.q:248
+msgid "Multivariate GLM not yet supported"
+msgstr ""
+
+#: src/language/stats/means.q:100
+msgid "Missing required subcommand TABLES."
+msgstr ""
+
+#: src/language/stats/means.q:134
+msgid "TABLES subcommand may not appear more than once."
+msgstr ""
+
+#: src/language/stats/npar.q:111
+msgid "NPAR subcommand not currently implemented."
+msgstr ""
+
+#: src/language/stats/npar.q:256
+#, c-format
+msgid ""
+"The specified value of HI (%d) is lower than the specified value of LO (%d)"
+msgstr ""
+
+#: src/language/stats/npar.q:311
+#, c-format
+msgid ""
+"%d expected values were given, but the specified range (%d-%d) requires "
+"exactly %d values."
+msgstr ""
+
+#: src/language/stats/npar.q:453 src/language/stats/t-test.q:380
+#, c-format
+msgid ""
+"PAIRED was specified but the number of variables preceding WITH (%zu) did "
+"not match the number following (%zu)."
+msgstr ""
+
+#: src/language/stats/oneway.q:170
+msgid "Number of contrast coefficients must equal the number of groups"
+msgstr ""
+
+#: src/language/stats/oneway.q:179
+#, c-format
+msgid "Coefficients for contrast %zu do not total zero"
+msgstr ""
+
+#: src/language/stats/oneway.q:242
+#, c-format
+msgid "`%s' is not a variable name"
+msgstr ""
+
+#: src/language/stats/oneway.q:274 src/language/stats/regression.q:283
+msgid "Sum of Squares"
+msgstr ""
+
+#: src/language/stats/oneway.q:276 src/language/stats/regression.q:285
+msgid "Mean Square"
+msgstr ""
+
+#: src/language/stats/oneway.q:277 src/language/stats/regression.q:286
+#: src/language/stats/t-test.q:749
+msgid "F"
+msgstr ""
+
+#: src/language/stats/oneway.q:278 src/language/stats/oneway.q:535
+#: src/language/stats/regression.q:201 src/language/stats/regression.q:287
+msgid "Significance"
+msgstr ""
+
+#: src/language/stats/oneway.q:300
+msgid "Between Groups"
+msgstr ""
+
+#: src/language/stats/oneway.q:301
+msgid "Within Groups"
+msgstr ""
+
+#: src/language/stats/oneway.q:345 src/language/stats/regression.q:312
+msgid "ANOVA"
+msgstr ""
+
+#: src/language/stats/oneway.q:532
+msgid "Levene Statistic"
+msgstr ""
+
+#: src/language/stats/oneway.q:533
+msgid "df1"
+msgstr ""
+
+#: src/language/stats/oneway.q:534
+msgid "df2"
+msgstr ""
+
+#: src/language/stats/oneway.q:537
+msgid "Test of Homogeneity of Variances"
+msgstr ""
+
+#: src/language/stats/oneway.q:603
+msgid "Contrast Coefficients"
+msgstr ""
+
+#: src/language/stats/oneway.q:605 src/language/stats/oneway.q:681
+msgid "Contrast"
+msgstr ""
+
+#: src/language/stats/oneway.q:679
+msgid "Contrast Tests"
+msgstr ""
+
+#: src/language/stats/oneway.q:682
+msgid "Value of Contrast"
+msgstr ""
+
+#: src/language/stats/oneway.q:684 src/language/stats/regression.q:200
+#: src/language/stats/t-test.q:751 src/language/stats/t-test.q:922
+#: src/language/stats/t-test.q:1009
+msgid "t"
+msgstr ""
+
+#: src/language/stats/oneway.q:730
+msgid "Assume equal variances"
+msgstr ""
+
+#: src/language/stats/oneway.q:734
+msgid "Does not assume equal"
+msgstr ""
+
+#: src/language/stats/rank.q:220
+#, c-format
+msgid "%s of %s by %s"
+msgstr ""
+
+#: src/language/stats/rank.q:225
+#, c-format
+msgid "%s of %s"
+msgstr ""
+
+#: src/language/stats/rank.q:600
+msgid "Cannot create new rank variable.  All candidates in use."
+msgstr ""
+
+#: src/language/stats/rank.q:693
+msgid "Variables Created By RANK"
+msgstr ""
+
+#: src/language/stats/rank.q:717
+#, c-format
+msgid "%s into %s(%s of %s using %s BY %s)"
+msgstr ""
+
+#: src/language/stats/rank.q:727
+#, c-format
+msgid "%s into %s(%s of %s BY %s)"
+msgstr ""
+
+#: src/language/stats/rank.q:740
+#, c-format
+msgid "%s into %s(%s of %s using %s)"
+msgstr ""
+
+#: src/language/stats/rank.q:749
+#, c-format
+msgid "%s into %s(%s of %s)"
+msgstr ""
+
+#: src/language/stats/rank.q:761
+msgid ""
+"FRACTION has been specified, but NORMAL and PROPORTION rank functions have "
+"not been requested.  The FRACTION subcommand will be ignored."
+msgstr ""
+
+#: src/language/stats/rank.q:852
+#, c-format
+msgid "Variable %s already exists."
+msgstr ""
+
+#: src/language/stats/rank.q:857
+msgid "Too many variables in INTO clause."
+msgstr ""
+
+#: src/language/stats/regression.q:156
+msgid "R Square"
+msgstr ""
+
+#: src/language/stats/regression.q:157
+msgid "Adjusted R Square"
+msgstr ""
+
+#: src/language/stats/regression.q:158
+msgid "Std. Error of the Estimate"
+msgstr ""
+
+#: src/language/stats/regression.q:163
+msgid "Model Summary"
+msgstr ""
+
+#: src/language/stats/regression.q:197
+msgid "B"
+msgstr ""
+
+#: src/language/stats/regression.q:199
+msgid "Beta"
+msgstr ""
+
+#: src/language/stats/regression.q:202
+msgid "(Constant)"
+msgstr ""
+
+#: src/language/stats/regression.q:254
+msgid "Coefficients"
+msgstr ""
+
+#: src/language/stats/regression.q:289 src/ui/gui/regression.ui:7
+msgid "Regression"
+msgstr ""
+
+#: src/language/stats/regression.q:370
+msgid "Model"
+msgstr ""
+
+#: src/language/stats/regression.q:371
+msgid "Covariances"
+msgstr ""
+
+#: src/language/stats/regression.q:386
+msgid "Coefficient Correlations"
+msgstr ""
+
+#: src/language/stats/regression.q:793
+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 "
+"meaningless."
+msgstr ""
+
+#: src/language/stats/regression.q:891
+msgid "REGRESSION requires numeric variables."
+msgstr ""
+
+#: src/language/stats/regression.q:962
+msgid "No valid data found. This command was skipped."
+msgstr ""
+
+#: src/language/stats/reliability.q:421
+msgid "Reliability Statistics"
+msgstr ""
+
+#: src/language/stats/reliability.q:462
+msgid "Item-Total Statistics"
+msgstr ""
+
+#: src/language/stats/reliability.q:484
+msgid "Scale Mean if Item Deleted"
+msgstr ""
+
+#: src/language/stats/reliability.q:487
+msgid "Scale Variance if Item Deleted"
+msgstr ""
+
+#: src/language/stats/reliability.q:490
+msgid "Corrected Item-Total Correlation"
+msgstr ""
+
+#: src/language/stats/reliability.q:493
+msgid "Cronbach's Alpha if Item Deleted"
+msgstr ""
+
+#: src/language/stats/reliability.q:543 src/language/stats/reliability.q:562
+msgid "Cronbach's Alpha"
+msgstr ""
+
+#: src/language/stats/reliability.q:546 src/language/stats/reliability.q:571
+#: src/language/stats/reliability.q:582
+msgid "N of Items"
+msgstr ""
+
+#: src/language/stats/reliability.q:565
+msgid "Part 1"
+msgstr ""
+
+#: src/language/stats/reliability.q:576
+msgid "Part 2"
+msgstr ""
+
+#: src/language/stats/reliability.q:587
+msgid "Total N of Items"
+msgstr ""
+
+#: src/language/stats/reliability.q:590
+msgid "Correlation Between Forms"
+msgstr ""
+
+#: src/language/stats/reliability.q:594
+msgid "Spearman-Brown Coefficient"
+msgstr ""
+
+#: src/language/stats/reliability.q:597
+msgid "Equal Length"
+msgstr ""
+
+#: src/language/stats/reliability.q:600
+msgid "Unequal Length"
+msgstr ""
+
+#: src/language/stats/reliability.q:604
+msgid "Guttman Split-Half Coefficient"
+msgstr ""
+
+#: src/language/stats/reliability.q:699
+msgid "Excluded"
+msgstr ""
+
+#: src/language/stats/reliability.q:707
+msgid "%"
+msgstr ""
+
+#: src/language/stats/t-test.q:190
+msgid "Exactly one of TESTVAL, GROUPS and PAIRS subcommands must be specified."
+msgstr ""
+
+#: src/language/stats/t-test.q:211
+msgid "VARIABLES subcommand may not be used with PAIRS."
+msgstr ""
+
+#: src/language/stats/t-test.q:230
+msgid "One or more VARIABLES must be specified."
+msgstr ""
+
+#: src/language/stats/t-test.q:324
+msgid ""
+"When applying GROUPS to a string variable, two values must be specified."
+msgstr ""
+
+#: src/language/stats/t-test.q:395
+msgid "At least two variables must be specified on PAIRS."
+msgstr ""
+
+#: src/language/stats/t-test.q:503
+msgid "One-Sample Statistics"
+msgstr ""
+
+#: src/language/stats/t-test.q:522
+msgid "Group Statistics"
+msgstr ""
+
+#: src/language/stats/t-test.q:621
+msgid "Paired Sample Statistics"
+msgstr ""
+
+#: src/language/stats/t-test.q:641 src/language/stats/t-test.q:944
+#: src/language/stats/t-test.q:1111
+#, c-format
+msgid "Pair %d"
+msgstr ""
+
+#: src/language/stats/t-test.q:737
+msgid "Independent Samples Test"
 msgstr ""
 
-#: src/ui/gui/psppire-data-editor.c:954
-msgid "Variable View"
+#: src/language/stats/t-test.q:745
+msgid "Levene's Test for Equality of Variances"
 msgstr ""
 
-#: src/ui/gui/psppire-data-store.c:744
-msgid "var"
+#: src/language/stats/t-test.q:747
+msgid "t-test for Equality of Means"
 msgstr ""
 
-#: src/ui/gui/psppire-data-store.c:755 src/ui/gui/psppire-var-store.c:699
-#: src/ui/gui/psppire-var-store.c:709 src/ui/gui/psppire-var-store.c:719
-#: src/ui/gui/psppire-var-store.c:825
-#, c-format
-msgid "%d"
+#: src/language/stats/t-test.q:750 src/language/stats/t-test.q:1103
+msgid "Sig."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:213
-msgid "Transformations Pending"
+#: src/language/stats/t-test.q:754 src/language/stats/t-test.q:1012
+msgid "Mean Difference"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:229
-msgid "Filter off"
+#: src/language/stats/t-test.q:755
+msgid "Std. Error Difference"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:243
+#: src/language/stats/t-test.q:760 src/language/stats/t-test.q:914
+#: src/language/stats/t-test.q:1004
 #, c-format
-msgid "Filter by %s"
+msgid "%g%% Confidence Interval of the Difference"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:264
-msgid "No Split"
+#: src/language/stats/t-test.q:814
+msgid "Equal variances assumed"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:273
-msgid "Split by "
+#: src/language/stats/t-test.q:860
+msgid "Equal variances not assumed"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:301
-msgid "Weights off"
+#: src/language/stats/t-test.q:904
+msgid "Paired Samples Test"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:315
-#, c-format
-msgid "Weight by %s"
+#: src/language/stats/t-test.q:907
+msgid "Paired Differences"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:383 src/ui/gui/data-editor.glade:702
-msgid "Open"
+#: src/language/stats/t-test.q:919
+msgid "Std. Error Mean"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:391 src/ui/gui/psppire-data-window.c:593
-msgid "System Files (*.sav)"
+#: src/language/stats/t-test.q:993
+msgid "One-Sample Test"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:397 src/ui/gui/psppire-data-window.c:599
-msgid "Portable Files (*.por) "
+#: src/language/stats/t-test.q:998
+#, c-format
+msgid "Test Value = %f"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:403 src/ui/gui/psppire-data-window.c:605
-#: src/ui/gui/psppire-syntax-window.c:298
-#: src/ui/gui/psppire-syntax-window.c:385
-msgid "All Files"
+#: src/language/stats/t-test.q:1098
+msgid "Paired Samples Correlations"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:585 src/ui/gui/data-editor.glade:712
-msgid "Save"
+#: src/language/stats/t-test.q:1102
+msgid "Correlation"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:613
-msgid "System File"
+#: src/language/stats/t-test.q:1113
+#, c-format
+msgid "%s & %s"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:618
-msgid "Portable File"
+#: src/language/data-io/file-handle.q:65
+#, c-format
+msgid ""
+"File handle %s is already defined.  Use CLOSE FILE HANDLE before redefining "
+"a file handle."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:768
-msgid "Font Selection"
+#: src/language/data-io/file-handle.q:120
+msgid "RECFORM must be specified with MODE=360."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:836
-msgid "Sort Ascending"
+#: src/language/data-io/file-handle.q:131
+#, c-format
+msgid ""
+"The specified file mode requires LRECL.  Assuming %zu-character records."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:842
-msgid "Sort Descending"
+#: src/language/data-io/file-handle.q:135
+#, c-format
+msgid ""
+"Record length (%ld) must be between 1 and %lu bytes.  Assuming %d-character "
+"records."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:847 src/ui/gui/psppire-data-window.c:937
-#: src/ui/gui/data-editor.glade:174 src/ui/gui/data-editor.glade:843
-msgid "Insert Variable"
+#: src/language/data-io/file-handle.q:177
+msgid "file"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:850 src/ui/gui/psppire-data-window.c:904
-#: src/ui/gui/psppire-data-window.c:940 src/ui/gui/psppire-data-window.c:1307
-#: src/ui/gui/psppire-data-window.c:1325
-msgid "Clear"
+#: src/language/data-io/file-handle.q:179
+msgid "inline file"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:901 src/ui/gui/data-editor.glade:831
-msgid "Insert Case"
+#: src/language/data-io/file-handle.q:205
+msgid "expecting a file name or handle name"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1185
-msgid "Open a data file"
+#: src/language/data-io/file-handle.q:225
+#, c-format
+msgid "Handle for %s not allowed here."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1203
-msgid "New data file"
+#: src/language/data-io/list.q:99
+#, c-format
+msgid ""
+"The first case (%ld) specified precedes the last case (%ld) specified.  The "
+"values will be swapped."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1218
-msgid "Import text data file"
+#: src/language/data-io/list.q:107
+#, c-format
+msgid ""
+"The first case (%ld) to list is less than 1.  The value is being reset to 1."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1234 src/ui/gui/psppire-data-window.c:1250
-msgid "Save data to file"
+#: src/language/data-io/list.q:113
+#, c-format
+msgid ""
+"The last case (%ld) to list is less than 1.  The value is being reset to 1."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1288
-msgid "Show/hide value labels"
+#: src/language/data-io/list.q:119
+#, c-format
+msgid "The step value %ld is less than 1.  The value is being reset to 1."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1308
-msgid "Delete the cases at the selected position(s)"
+#: src/ui/gui/binomial.ui:57 src/ui/gui/chi-square.ui:57
+msgid "_Test Variable List:"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1326
-msgid "Delete the variables at the selected position(s)"
+#: src/ui/gui/binomial.ui:126 src/ui/gui/chi-square.ui:126
+msgid "_Get from data"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1344
-msgid "Create a new variable at the current position"
+#: src/ui/gui/binomial.ui:143 src/ui/gui/t-test.ui:333
+msgid "_Cut point:"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1359
-msgid "Create a new case at the current position"
+#: src/ui/gui/binomial.ui:178
+msgid "Define Dichotomy"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1375
-msgid "Jump to a Case in the Data Sheet"
+#: src/ui/gui/binomial.ui:197
+msgid "Test _Proportion:"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1391
-msgid "Weight cases by variable"
+#: src/ui/gui/correlation.ui:7
+msgid "Bivariate Correlations"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1405
-msgid "Transpose the cases with the variables"
+#: src/ui/gui/correlation.ui:108
+msgid "Pearso_n"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1419
-msgid "Split the active file"
+#: src/ui/gui/correlation.ui:123
+msgid "_Kendall's tau-b"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1434
-msgid "Sort cases in the active file"
+#: src/ui/gui/correlation.ui:138
+msgid "_Spearman"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1448
-msgid "Select cases from the active file"
+#: src/ui/gui/correlation.ui:158
+msgid "Correlation Coefficients"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1462
-msgid "Compute new values for a variable"
+#: src/ui/gui/correlation.ui:182
+msgid "_Two-tailed"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1476
-msgid "Perform one way analysis of variance"
+#: src/ui/gui/correlation.ui:198
+msgid "One-tai_led"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1491
-msgid "Calculate T Test for samples from independent groups"
+#: src/ui/gui/correlation.ui:220
+msgid "Test of Significance"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1505
-msgid "Calculate T Test for paired samples"
+#: src/ui/gui/correlation.ui:232
+msgid "_Flag significant correlations"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1519
-msgid "Calculate T Test for sample from a single distribution"
+#: src/ui/gui/crosstabs.ui:7
+msgid "Crosstabs"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1534
-msgid "Commentary text for the data file"
+#: src/ui/gui/crosstabs.ui:50
+msgid "Rows"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1560
-msgid "Rank Cases"
+#: src/ui/gui/crosstabs.ui:124
+msgid "Format..."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1574
-msgid "Recode values into the same variables"
+#: src/ui/gui/crosstabs.ui:137 src/ui/gui/examine.ui:245
+#: src/ui/gui/regression.ui:27
+msgid "Statistics..."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1588
-msgid "Recode values into different variables"
+#: src/ui/gui/crosstabs.ui:150
+msgid "Cells..."
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1602
-msgid "Jump to variable"
+#: src/ui/gui/crosstabs.ui:227
+msgid "Crosstabs: Format"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1615
-msgid "Calculate descriptive statistics (mean, variance, ...)"
+#: src/ui/gui/crosstabs.ui:241
+msgid "Print tables"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1629
-msgid "Generate frequency statistics"
+#: src/ui/gui/crosstabs.ui:254
+msgid "Pivot"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1643
-msgid "Generate crosstabulations"
+#: src/ui/gui/crosstabs.ui:267 src/ui/gui/sort.ui:130
+msgid "Ascending"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1658
-msgid "Examine Data by Factors"
+#: src/ui/gui/crosstabs.ui:304
+msgid "No label"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1672
-msgid "Estimate parameters of the linear model"
+#: src/ui/gui/crosstabs.ui:317
+msgid "Suppress value labels"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1686 src/ui/gui/reliability.glade:7
-msgid "Reliability Analysis"
+#: src/ui/gui/crosstabs.ui:335
+msgid "Labeling"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1849
-msgid "Split the window vertically and horizontally"
+#: src/ui/gui/crosstabs.ui:369
+msgid "Crosstabs: Cells"
 msgstr ""
 
-#: src/ui/gui/psppire-data-window.c:1891
-msgid "Data Editor"
+#: src/ui/gui/crosstabs.ui:402
+msgid "Cell Display"
 msgstr ""
 
-#: src/ui/gui/psppire-output-window.c:269
-msgid "Output Viewer"
+#: src/ui/gui/crosstabs.ui:430
+msgid "Crosstabs: Statistics"
 msgstr ""
 
-#: src/ui/gui/psppire-syntax-window.c:265
-#, c-format
-msgid "Saved file \"%s\""
+#: src/ui/gui/crosstabs.ui:463 src/ui/gui/oneway.ui:222
+#: src/ui/gui/regression.ui:340
+msgid "Statistics"
 msgstr ""
 
-#: src/ui/gui/psppire-syntax-window.c:284
-msgid "Save Syntax"
+#: src/ui/gui/chi-square.ui:13
+msgid "Chi-Square Test"
 msgstr ""
 
-#: src/ui/gui/psppire-syntax-window.c:292
-#: src/ui/gui/psppire-syntax-window.c:379
-msgid "Syntax Files (*.sps) "
+#: src/ui/gui/chi-square.ui:140
+msgid "Use _specified range"
 msgstr ""
 
-#: src/ui/gui/psppire-syntax-window.c:371
-msgid "Open Syntax"
+#: src/ui/gui/chi-square.ui:162
+msgid "_Lower:"
 msgstr ""
 
-#: src/ui/gui/psppire-syntax-window.c:551
-msgid "Syntax Editor"
+#: src/ui/gui/chi-square.ui:170
+msgid "_Upper:"
 msgstr ""
 
-#: src/ui/gui/psppire-syntax-window.c:565
-#, c-format
-msgid "Cannot load syntax file '%s'"
+#: src/ui/gui/chi-square.ui:214
+msgid "Expected Range:"
 msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:533 src/ui/gui/psppire-var-store.c:832
-msgid "Name"
+#: src/ui/gui/chi-square.ui:240
+msgid "All categor_ies equal"
 msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:534 src/ui/gui/psppire-var-store.c:833
-#: src/ui/gui/psppire.glade:2099
-msgid "Type"
+#: src/ui/gui/chi-square.ui:257
+msgid "_Values"
 msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:535 src/ui/gui/psppire-var-store.c:834
-#: src/ui/gui/psppire.glade:2020
-msgid "Width"
+#: src/ui/gui/chi-square.ui:301
+msgid "Expected Values:"
 msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:536 src/ui/gui/psppire-var-store.c:835
-msgid "Decimals"
+#: src/ui/gui/descriptives.ui:130 src/ui/gui/frequencies.ui:140
+msgid "Statistics:"
 msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:538 src/ui/gui/psppire-var-store.c:837
-msgid "Values"
+#: src/ui/gui/descriptives.ui:192
+msgid "Exclude entire case if any selected variable is missing"
 msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:539 src/ui/gui/psppire-var-store.c:838
-msgid "Missing"
+#: src/ui/gui/descriptives.ui:207
+msgid "Include user-missing data in analysis"
 msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:541 src/ui/gui/psppire-var-store.c:840
-msgid "Align"
+#: src/ui/gui/descriptives.ui:222
+msgid "Save Z-scores of selected variables as new variables"
 msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:542 src/ui/gui/psppire-var-store.c:841
-msgid "Measure"
+#: src/ui/gui/descriptives.ui:243
+msgid "Options:"
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:622 src/ui/gui/var-sheet-dialogs.glade:43
-msgid "Comma"
+#: src/ui/gui/examine.ui:8
+msgid "Explore"
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:623 src/ui/gui/var-sheet-dialogs.glade:59
-msgid "Dot"
+#: src/ui/gui/examine.ui:51
+msgid "Label Cases by:"
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:624
-msgid "Scientific"
+#: src/ui/gui/examine.ui:99
+msgid "Factor List:"
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:625 src/ui/gui/var-sheet-dialogs.glade:91
-msgid "Date"
+#: src/ui/gui/examine.ui:146
+msgid "Dependent List:"
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:626 src/ui/gui/var-sheet-dialogs.glade:107
-msgid "Dollar"
+#: src/ui/gui/examine.ui:259 src/ui/gui/t-test.ui:68 src/ui/gui/t-test.ui:658
+#: src/ui/gui/t-test.ui:819
+msgid "Options..."
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:627
-msgid "Custom"
+#: src/ui/gui/examine.ui:302
+msgid "Explore: Statistics"
 msgstr ""
 
-#: src/ui/gui/psppire-window.c:97
-#, c-format
-msgid "%s %s PSPPIRE %s"
+#: src/ui/gui/examine.ui:332
+msgid "Extremes"
 msgstr ""
 
-#: src/ui/gui/psppire-window.c:480
-#, c-format
-msgid "Save the changes to \"%s\" before closing?"
+#: src/ui/gui/examine.ui:381
+msgid "Explore: Options"
 msgstr ""
 
-#: src/ui/gui/psppire-window.c:487
-#, c-format
-msgid ""
-"If you don't save, changes from the last %ld seconds will be permanently "
-"lost."
+#: src/ui/gui/examine.ui:405
+msgid "Exclude cases listwise"
 msgstr ""
 
-#: src/ui/gui/psppire-window.c:491
-msgid "Close _without saving"
+#: src/ui/gui/examine.ui:419
+msgid "Exclude cases pairwise"
 msgstr ""
 
-#: src/ui/gui/recode-dialog.c:881
-msgid "Recode into Different Variables"
+#: src/ui/gui/examine.ui:434
+msgid "Repeat values"
 msgstr ""
 
-#: src/ui/gui/recode-dialog.c:884
-msgid "Recode into Same Variables"
+#: src/ui/gui/examine.ui:455 src/ui/gui/t-test.ui:493
+#: src/ui/gui/var-sheet-dialogs.ui:684
+msgid "Missing Values"
 msgstr ""
 
-#: src/ui/gui/recode-dialog.c:912 src/ui/gui/recode-dialog.c:1014
-msgid "Old"
+#: src/ui/gui/factor.ui:21
+msgid "Factor Analysis"
 msgstr ""
 
-#: src/ui/gui/recode-dialog.c:927 src/ui/gui/recode-dialog.c:1022
-msgid "New"
+#: src/ui/gui/factor.ui:47
+msgid "_Descriptives..."
 msgstr ""
 
-#: src/ui/gui/recode-dialog.c:1270
-msgid "Recode into Different Variables: Old and New Values "
+#: src/ui/gui/factor.ui:60
+msgid "_Extraction..."
 msgstr ""
 
-#: src/ui/gui/recode-dialog.c:1271
-msgid "Recode into Same Variables: Old and New Values"
+#: src/ui/gui/factor.ui:74
+msgid "_Rotations..."
 msgstr ""
 
-#: src/ui/gui/regression-dialog.c:41
-msgid "Coeff"
+#: src/ui/gui/factor.ui:192
+msgid "Factor Analysis: Extraction"
 msgstr ""
 
-#: src/ui/gui/regression-dialog.c:42
-msgid "R"
+#: src/ui/gui/factor.ui:216
+msgid "Method: "
 msgstr ""
 
-#: src/ui/gui/regression-dialog.c:43
-msgid "Anova"
+#: src/ui/gui/factor.ui:266
+msgid "Correlation matrix"
 msgstr ""
 
-#: src/ui/gui/regression-dialog.c:44
-msgid "Bcov"
+#: src/ui/gui/factor.ui:280
+msgid "Covariance matrix"
 msgstr ""
 
-#: src/ui/gui/select-cases-dialog.c:82
-#, c-format
-msgid "Approximately %3d%% of all cases."
-msgstr ""
+#: src/ui/gui/factor.ui:300
+#, fuzzy
+msgid "Analyse"
+msgstr "_Analyse"
 
-#: src/ui/gui/select-cases-dialog.c:83
-#, c-format
-msgid "Exactly %3d cases from the first %3d cases."
+#: src/ui/gui/factor.ui:324
+msgid "Unrotatated factor solution"
 msgstr ""
 
-#: src/ui/gui/select-cases-dialog.c:223
-#, c-format
-msgid "%d thru %d"
+#: src/ui/gui/factor.ui:338
+msgid "Scree plot"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:461
-#, c-format
-msgid "Could not open \"%s\": %s"
+#: src/ui/gui/factor.ui:357 src/ui/gui/roc.ui:286
+msgid "Display"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:477
-#, c-format
-msgid "Error reading \"%s\": %s"
+#: src/ui/gui/factor.ui:430
+msgid "Number of factors:"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:480
-#, c-format
-msgid ""
-"Failed to read \"%s\", because it contains a line over %d bytes long and "
-"therefore appears not to be a text file."
+#: src/ui/gui/factor.ui:460
+msgid "Extract"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:494
-#, c-format
-msgid "\"%s\" is empty."
+#: src/ui/gui/factor.ui:475 src/ui/gui/factor.ui:665
+msgid "Maximum iterations for convergence:"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:539
-msgid "Import Delimited Text Data"
+#: src/ui/gui/factor.ui:538
+msgid "Factor Analysis: Rotation"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:590
-msgid "Importing Delimited Text Data"
+#: src/ui/gui/factor.ui:571
+msgid "_None"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:749
-msgid ""
-"This assistant will guide you through the process of importing data into "
-"PSPP from a text file with one line per case,  in which fields are separated "
-"by tabs, commas, or other delimiters.\n"
-"\n"
+#: src/ui/gui/factor.ui:582
+msgid "_Varimax"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:755
-#, c-format
-msgid "The selected file contains %zu line of text.  "
-msgid_plural "The selected file contains %zu lines of text.  "
-msgstr[0] ""
-msgstr[1] ""
+#: src/ui/gui/factor.ui:598
+msgid "_Quartimax"
+msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:763
-#, c-format
-msgid "The selected file contains approximately %lu line of text.  "
-msgid_plural "The selected file contains approximately %lu lines of text.  "
-msgstr[0] ""
-msgstr[1] ""
+#: src/ui/gui/factor.ui:614
+msgid "_Equimax"
+msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:769
-#, c-format
-msgid ""
-"Only the first %zu line of the file will be shown for preview purposes in "
-"the following screens.  "
-msgid_plural ""
-"Only the first %zu lines of the file will be shown for preview purposes in "
-"the following screens.  "
-msgstr[0] ""
-msgstr[1] ""
+#: src/ui/gui/factor.ui:637
+msgid "Method"
+msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:776
-msgid "You may choose below how much of the file should actually be imported."
+#: src/ui/gui/factor.ui:648
+msgid "_Display rotated solution"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:1523
-#: src/ui/gui/text-data-import-dialog.c:1768
-msgid "This input line has too few separators to fill in this field."
+#: src/ui/gui/find.ui:8
+msgid "Find Case"
 msgstr ""
 
-#: src/ui/gui/text-data-import-dialog.c:1759
-#, c-format
-msgid "Field content \"%.*s\" cannot be parsed in format %s."
+#: src/ui/gui/find.ui:88
+msgid "Variable:"
 msgstr ""
 
-#: src/ui/gui/t-test-options.c:60
-#, c-format
-msgid "Confidence Interval: %2d %%"
+#: src/ui/gui/find.ui:124 src/ui/gui/recode.ui:173
+#: src/ui/gui/var-sheet-dialogs.ui:531
+msgid "Value:"
 msgstr ""
 
-#: src/ui/gui/t-test-paired-samples.c:226
-msgid "Var 1"
+#: src/ui/gui/find.ui:147
+msgid "Search value labels"
 msgstr ""
 
-#: src/ui/gui/t-test-paired-samples.c:227
-msgid "Var 2"
+#: src/ui/gui/find.ui:171
+msgid "Regular expression Match"
 msgstr ""
 
-#: src/ui/gui/variable-info-dialog.c:76
-#, c-format
-msgid "Label: %s\n"
+#: src/ui/gui/find.ui:187
+msgid "Search substrings"
 msgstr ""
 
-#: src/ui/gui/variable-info-dialog.c:83
-#, c-format
-msgid "Type: %s\n"
+#: src/ui/gui/find.ui:203
+msgid "Wrap around"
 msgstr ""
 
-#: src/ui/gui/variable-info-dialog.c:87
-#, c-format
-msgid "Missing Values: %s\n"
+#: src/ui/gui/find.ui:218
+msgid "Search backward"
 msgstr ""
 
-#: src/ui/gui/variable-info-dialog.c:92
-#, c-format
-msgid "Measurement Level: %s\n"
+#: src/ui/gui/frequencies.ui:102 src/ui/gui/psppire.ui:282
+#: src/ui/gui/rank.ui:105
+msgid "Variable(s):"
 msgstr ""
 
-#: src/ui/gui/variable-info-dialog.c:107
-msgid "Value Labels:\n"
+#: src/ui/gui/frequencies.ui:151
+msgid "Include missing values"
 msgstr ""
 
-#: src/ui/gui/variable-info-dialog.c:117
-#, c-format
-msgid "%s %s\n"
+#: src/ui/gui/frequencies.ui:189
+msgid "Charts..."
 msgstr ""
 
-#: src/ui/gui/weight-cases-dialog.c:79 src/ui/gui/psppire.glade:47
-#: src/ui/gui/psppire.glade:130
-msgid "Do not weight cases"
+#: src/ui/gui/frequencies.ui:201
+msgid "Frequency Tables..."
 msgstr ""
 
-#: src/ui/gui/weight-cases-dialog.c:85
-#, c-format
-msgid "Weight cases by %s"
+#: src/ui/gui/frequencies.ui:251
+msgid "Frequencies: Frequency Tables"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:50
-msgid "Rows"
+#: src/ui/gui/frequencies.ui:281
+msgid "Always"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:131 src/ui/gui/frequencies.glade:185
-msgid "Format..."
+#: src/ui/gui/frequencies.ui:297
+msgid "Never"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:138 src/ui/gui/examine.glade:247
-#: src/ui/gui/regression.glade:31
-msgid "Statistics..."
+#: src/ui/gui/frequencies.ui:316
+msgid "If no more than "
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:148
-msgid "Cells..."
+#: src/ui/gui/frequencies.ui:347
+msgid "values"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:230
-msgid "Print tables"
+#: src/ui/gui/frequencies.ui:368
+msgid "Display frequency tables"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:240
-msgid "Pivot"
+#: src/ui/gui/frequencies.ui:396
+msgid "Ascending value"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:253 src/ui/gui/psppire.glade:756
-msgid "Ascending"
+#: src/ui/gui/frequencies.ui:412
+msgid "Descending value"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:283
-msgid "No label"
+#: src/ui/gui/frequencies.ui:428
+msgid "Ascending frequency"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:295
-msgid "Suppress value labels"
+#: src/ui/gui/frequencies.ui:444
+msgid "Descending frequency"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:311
-msgid "Labeling"
+#: src/ui/gui/frequencies.ui:466
+msgid "Order by"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:378
-msgid "Cell Display"
+#: src/ui/gui/frequencies.ui:508
+msgid "Frequencies: Charts"
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:439 src/ui/gui/oneway.glade:207
-#: src/ui/gui/regression.glade:322
-msgid "Statistics"
+#: src/ui/gui/frequencies.ui:536
+msgid "Exclude values below "
 msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:122 src/ui/gui/frequencies.glade:139
-msgid "Statistics:"
+#: src/ui/gui/frequencies.ui:571
+msgid "Exclude values above "
 msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:184
-msgid "Exclude entire case if any selected variable is missing"
+#: src/ui/gui/frequencies.ui:609
+msgid "<b>Chart Formatting</b>"
 msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:194
-msgid "Include user-missing data in analysis"
+#: src/ui/gui/frequencies.ui:633
+msgid "Draw histograms"
 msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:207
-msgid "Save Z-scores of selected variables as new variables"
+#: src/ui/gui/frequencies.ui:645
+msgid "Superimpose normal curve"
 msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:223
-msgid "Options:"
+#: src/ui/gui/frequencies.ui:661
+msgid "Scale:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:10 src/ui/gui/output-viewer.glade:22
-#: src/ui/gui/syntax-editor.glade:14
-msgid "_File"
+#: src/ui/gui/frequencies.ui:682
+msgid "Percentages"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:25 src/ui/gui/data-editor.glade:51
-#: src/ui/gui/syntax-editor.glade:32 src/ui/gui/syntax-editor.glade:62
-msgid "_Syntax"
+#: src/ui/gui/frequencies.ui:705
+msgid "<b>Histograms</b>"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:32 src/ui/gui/data-editor.glade:58
-#: src/ui/gui/data-editor.glade:311 src/ui/gui/data-editor.glade:329
-#: src/ui/gui/syntax-editor.glade:41 src/ui/gui/syntax-editor.glade:71
-msgid "_Data"
+#: src/ui/gui/frequencies.ui:729
+msgid "Draw pie charts"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:70
-msgid "_Import Delimited Text Data"
+#: src/ui/gui/frequencies.ui:741
+msgid "Include slices for missing values"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:103
-msgid "D_isplay Data File Information"
+#: src/ui/gui/frequencies.ui:758
+msgid "<b>Pie Charts</b>"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:112
-msgid "Working File"
+#: src/ui/gui/oneway.ui:8
+msgid "One-Way ANOVA"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:119
-msgid "External File"
+#: src/ui/gui/oneway.ui:31
+msgid "_Factor:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:135
-msgid "Recently Used Da_ta"
+#: src/ui/gui/oneway.ui:69
+msgid "Dependent _Variable(s):"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:142
-msgid "Recently Used _Files"
+#: src/ui/gui/oneway.ui:184 src/ui/gui/data-editor.ui:328
+msgid "_Descriptives"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:166 src/ui/gui/output-viewer.glade:55
-#: src/ui/gui/syntax-editor.glade:118
-msgid "_Edit"
+#: src/ui/gui/oneway.ui:200
+msgid "_Homogeneity"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:182
-msgid "Insert Cases"
+#: src/ui/gui/oneway.ui:238
+msgid "_Contrasts..."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:190 src/ui/gui/data-editor.glade:780
-msgid "Go To Case"
+#: src/ui/gui/oneway.ui:292
+msgid "One-Way ANOVA: Contrasts"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:231
-msgid "Cl_ear Variables"
+#: src/ui/gui/oneway.ui:369
+msgid "_Coefficients:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:239
-msgid "_Clear Cases"
+#: src/ui/gui/oneway.ui:416
+msgid "Coefficient Total: "
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:252
-msgid "gtk-find"
+#: src/ui/gui/oneway.ui:452
+msgid "Contrast 1 of 1"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:264
-msgid "_View"
+#: src/ui/gui/psppire.ui:7
+msgid "Weight Cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:271
-msgid "_Status Bar"
+#: src/ui/gui/psppire.ui:66
+msgid "Weight cases by"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:284
-msgid "_Fonts"
+#: src/ui/gui/psppire.ui:102
+msgid "Frequency Variable"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:291
-msgid "_Grid Lines"
+#: src/ui/gui/psppire.ui:145
+msgid "Current Status: "
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:299
-msgid "Value _Labels"
+#: src/ui/gui/psppire.ui:195
+msgid "Transpose"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:318 src/ui/gui/data-editor.glade:613
-msgid "_Variables"
+#: src/ui/gui/psppire.ui:247
+msgid "Name Variable:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:336
-msgid "_Sort Cases"
+#: src/ui/gui/psppire.ui:383
+msgid "Split File"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:350
-msgid "_Transpose"
+#: src/ui/gui/psppire.ui:443
+msgid "Analyze all cases.  Do not create groups."
+msgstr "Analyse all cases.  Do not create groups."
+
+#: src/ui/gui/psppire.ui:459
+msgid "Compare groups."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:363
-msgid "S_plit File"
+#: src/ui/gui/psppire.ui:475
+msgid "Organize output by groups."
+msgstr "Organise output by groups."
+
+#: src/ui/gui/psppire.ui:533
+msgid "Groups based on:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:371
-msgid "Select _Cases"
+#: src/ui/gui/psppire.ui:592
+msgid "Sort the file by grouping variables."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:378
-msgid "_Weight Cases"
+#: src/ui/gui/psppire.ui:609
+msgid "File is already sorted."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:390
-msgid "_Transform"
+#: src/ui/gui/psppire.ui:662
+msgid "Current Status : "
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:400
-msgid "_Compute"
+#: src/ui/gui/psppire.ui:673
+msgid "Analysis by groups is off"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:408
-msgid "Ran_k Cases"
+#: src/ui/gui/psppire.ui:709
+msgid "Compute Variable"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:420
-msgid "Recode into _Same Variables"
+#: src/ui/gui/psppire.ui:742
+msgid "Target Variable:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:427
-msgid "Recode into _Different Variables"
+#: src/ui/gui/psppire.ui:771
+msgid "Type & Label"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:440
-msgid "_Run Pending Transforms"
+#: src/ui/gui/psppire.ui:818
+msgid "="
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:453
-msgid "_Analyze"
-msgstr "_Analyse"
+#: src/ui/gui/psppire.ui:872
+msgid "Numeric Expressions:"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:463
-msgid "_Descriptive Statistics"
+#: src/ui/gui/psppire.ui:934
+msgid "Functions:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:473
-msgid "_Frequencies"
+#: src/ui/gui/psppire.ui:999 src/ui/gui/psppire.ui:1422
+#: src/ui/gui/recode.ui:741
+msgid "If..."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:481 src/ui/gui/oneway.glade:179
-msgid "_Descriptives"
+#: src/ui/gui/psppire.ui:1052
+msgid "Select Cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:489
-msgid "_Explore"
+#: src/ui/gui/psppire.ui:1240
+msgid "Use filter variable"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:497
-msgid "_Crosstabs"
+#: src/ui/gui/psppire.ui:1299
+msgid "Based on time or case range"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:509
-msgid "Compare _Means"
+#: src/ui/gui/psppire.ui:1311
+msgid "Range..."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:519
-msgid "_One Sample T Test"
+#: src/ui/gui/psppire.ui:1355
+msgid "Random sample of cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:527
-msgid "_Independent Samples T Test"
+#: src/ui/gui/psppire.ui:1368
+msgid "Sample..."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:535
-msgid "_Paired Samples T Test"
+#: src/ui/gui/psppire.ui:1410
+msgid "If condition is satisfied"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:543
-msgid "One Way _ANOVA"
+#: src/ui/gui/psppire.ui:1462
+msgid "All Cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:554
-msgid "Re_liability"
+#: src/ui/gui/psppire.ui:1477
+msgid "Select"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:562
-msgid "Linear _Regression"
+#: src/ui/gui/psppire.ui:1504
+msgid "Filtered"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:569
-msgid "_Non-Parametric Statistics"
+#: src/ui/gui/psppire.ui:1520
+msgid "Deleted"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:579
-msgid "_Chi-Square"
+#: src/ui/gui/psppire.ui:1543
+msgid "Unselected Cases Are"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:587
-msgid "_Binomial"
+#: src/ui/gui/psppire.ui:1585
+msgid "Data File Comments"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:603
-msgid "_Utilities"
+#: src/ui/gui/psppire.ui:1609
+msgid "Comments:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:622
-msgid "Data File _Comments"
+#: src/ui/gui/psppire.ui:1650
+msgid "Display comments in output"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:633 src/ui/gui/output-viewer.glade:78
-#: src/ui/gui/syntax-editor.glade:209
-msgid "_Windows"
+#: src/ui/gui/psppire.ui:1669
+msgid "Column Number: 0"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:640 src/ui/gui/output-viewer.glade:88
-#: src/ui/gui/syntax-editor.glade:218
-msgid "_Minimize All Windows"
-msgstr "_Minimise All Windows"
+#: src/ui/gui/psppire.ui:1703
+msgid "Select Cases: Range"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:647
-msgid "_Split"
+#: src/ui/gui/psppire.ui:1750
+msgid "First case"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:658 src/ui/gui/output-viewer.glade:99
-#: src/ui/gui/syntax-editor.glade:229
-msgid "_Help"
+#: src/ui/gui/psppire.ui:1763
+msgid "Last case"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:665 src/ui/gui/output-viewer.glade:106
-#: src/ui/gui/syntax-editor.glade:237
-msgid "_Reference Manual"
+#: src/ui/gui/psppire.ui:1776
+msgid "Observation"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:678 src/ui/gui/output-viewer.glade:113
-#: src/ui/gui/syntax-editor.glade:244
-msgid "_About"
+#: src/ui/gui/psppire.ui:1808
+msgid "Compute Variable: Type and Label"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:722
-msgid "Print"
+#: src/ui/gui/psppire.ui:1843
+msgid "Use expression as label"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:732
-msgid "Recall"
+#: src/ui/gui/psppire.ui:2088
+msgid "Goto Case"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:750
-msgid "Undo"
+#: src/ui/gui/psppire.ui:2106
+msgid "Goto Case Number:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:760
-msgid "Redo"
+#: src/ui/gui/psppire.ui:2149
+msgid "Select Cases: Random Sample"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:790
-msgid "Variables"
+#: src/ui/gui/psppire.ui:2247
+msgid "Sample Size"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:811
-msgid "Find"
+#: src/ui/gui/rank.ui:8
+msgid "Rank Cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:863
-msgid "Split File"
+#: src/ui/gui/rank.ui:58
+msgid "By:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:874
-msgid "Weight Cases"
+#: src/ui/gui/rank.ui:204
+msgid "_Smallest Value"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:886
-msgid "Select Cases"
+#: src/ui/gui/rank.ui:221
+msgid "_Largest Value"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:906 src/ui/gui/var-sheet-dialogs.glade:401
-#: src/ui/gui/var-sheet-dialogs.glade:582
-msgid "Value Labels"
+#: src/ui/gui/rank.ui:245
+msgid "Assign rank 1 to:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:917
-msgid "Use Sets"
+#: src/ui/gui/rank.ui:261
+msgid "_Display summary tables"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:938
-msgid "Information Area"
+#: src/ui/gui/rank.ui:279
+msgid "Rank T_ypes"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:957
-msgid "Processor Area"
+#: src/ui/gui/rank.ui:294
+msgid "_Ties..."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:982
-msgid "Case Counter Area"
+#: src/ui/gui/rank.ui:346
+msgid "Rank Cases: Types"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1007
-msgid "Filter Use Status Area"
+#: src/ui/gui/rank.ui:366
+msgid "Sum of case weights"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1033
-msgid "Weight Status Area"
+#: src/ui/gui/rank.ui:382
+msgid "Fractional rank as %"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1059
-msgid "Split File Status Area"
+#: src/ui/gui/rank.ui:396
+msgid "Fractional rank"
 msgstr ""
 
-#: src/ui/gui/examine.glade:49
-msgid "Label Cases by:"
+#: src/ui/gui/rank.ui:410
+msgid "Savage score"
 msgstr ""
 
-#: src/ui/gui/examine.glade:100
-msgid "Factor List:"
+#: src/ui/gui/rank.ui:424
+msgid "Rank"
 msgstr ""
 
-#: src/ui/gui/examine.glade:150
-msgid "Dependent List:"
+#: src/ui/gui/rank.ui:438
+msgid "Ntiles"
 msgstr ""
 
-#: src/ui/gui/examine.glade:257 src/ui/gui/t-test.glade:69
-#: src/ui/gui/t-test.glade:629 src/ui/gui/t-test.glade:780
-msgid "Options..."
+#: src/ui/gui/rank.ui:481
+msgid "Proportion Estimates"
 msgstr ""
 
-#: src/ui/gui/examine.glade:310
-msgid "Descriptives"
+#: src/ui/gui/rank.ui:494
+msgid "Normal Scores"
 msgstr ""
 
-#: src/ui/gui/examine.glade:320
-msgid "Extremes"
+#: src/ui/gui/rank.ui:529
+msgid "Blom"
 msgstr ""
 
-#: src/ui/gui/examine.glade:388
-msgid "Exclude cases listwise"
+#: src/ui/gui/rank.ui:543
+msgid "Tukey"
 msgstr ""
 
-#: src/ui/gui/examine.glade:399
-msgid "Exclude cases pairwise"
+#: src/ui/gui/rank.ui:557
+msgid "Rankit"
 msgstr ""
 
-#: src/ui/gui/examine.glade:414
-msgid "Repeat values"
+#: src/ui/gui/rank.ui:571
+msgid "Van der Wärden"
 msgstr ""
 
-#: src/ui/gui/examine.glade:432 src/ui/gui/t-test.glade:460
-#: src/ui/gui/var-sheet-dialogs.glade:649
-msgid "Missing Values"
+#: src/ui/gui/rank.ui:591
+msgid "Proportion Estimation Formula"
 msgstr ""
 
-#: src/ui/gui/find.glade:80
-msgid "Variable:"
+#: src/ui/gui/rank.ui:625
+msgid "Rank Cases: Ties"
 msgstr ""
 
-#: src/ui/gui/find.glade:111 src/ui/gui/recode.glade:185
-#: src/ui/gui/var-sheet-dialogs.glade:512
-msgid "Value:"
+#: src/ui/gui/rank.ui:651
+msgid "_Mean"
 msgstr ""
 
-#: src/ui/gui/find.glade:137
-msgid "Search value labels"
+#: src/ui/gui/rank.ui:668
+msgid "_Low"
 msgstr ""
 
-#: src/ui/gui/find.glade:161
-msgid "Regular expression Match"
+#: src/ui/gui/rank.ui:686
+msgid "_High"
 msgstr ""
 
-#: src/ui/gui/find.glade:172
-msgid "Search substrings"
+#: src/ui/gui/rank.ui:709
+msgid "_Sequential ranks to unique values"
 msgstr ""
 
-#: src/ui/gui/find.glade:185
-msgid "Wrap around"
+#: src/ui/gui/rank.ui:732
+msgid "Rank Assigned to Ties"
 msgstr ""
 
-#: src/ui/gui/find.glade:198
-msgid "Search backward"
+#: src/ui/gui/sort.ui:8
+msgid "Sort Cases"
 msgstr ""
 
-#: src/ui/gui/frequencies.glade:98 src/ui/gui/psppire.glade:252
-#: src/ui/gui/rank.glade:103
-msgid "Variable(s):"
+#: src/ui/gui/sort.ui:79
+msgid "Sort by:"
 msgstr ""
 
-#: src/ui/gui/frequencies.glade:168
-msgid "Display Frequency Table"
+#: src/ui/gui/sort.ui:146
+msgid "Descending"
 msgstr ""
 
-#: src/ui/gui/frequencies.glade:264
-msgid "Ascending Order"
+#: src/ui/gui/sort.ui:168
+msgid "Sort Order"
 msgstr ""
 
-#: src/ui/gui/frequencies.glade:275
-msgid "Descending Order"
+#: src/ui/gui/recode.ui:185 src/ui/gui/recode.ui:467
+msgid "System Missing"
 msgstr ""
 
-#: src/ui/gui/frequencies.glade:290
-msgid "Ascending Counts"
+#: src/ui/gui/recode.ui:199
+msgid "System or User Missing"
 msgstr ""
 
-#: src/ui/gui/frequencies.glade:305
-msgid "Descending Counts"
+#: src/ui/gui/recode.ui:237
+msgid "through"
 msgstr ""
 
-#: src/ui/gui/frequencies.glade:323
-msgid "Order by"
+#: src/ui/gui/recode.ui:275
+msgid "Range, LOWEST thru value"
 msgstr ""
 
-#: src/ui/gui/frequencies.glade:355
-msgid "Supress tables with more than N categories"
+#: src/ui/gui/recode.ui:289
+msgid "Range, value thru HIGHEST"
 msgstr ""
 
-#: src/ui/gui/frequencies.glade:371
-msgid "Maximum no of categories"
+#: src/ui/gui/recode.ui:319
+msgid "All other values"
 msgstr ""
 
-#: src/ui/gui/message-dialog.glade:10
-msgid "Messages Reported"
+#: src/ui/gui/recode.ui:355
+msgid "Range:"
 msgstr ""
 
-#: src/ui/gui/message-dialog.glade:47
-msgid ""
-"The PSPP processor reported # errors.  The first # and last # are shown "
-"below:"
+#: src/ui/gui/recode.ui:384
+msgid "Old Value"
 msgstr ""
 
-#: src/ui/gui/message-dialog.glade:101
-msgid "gtk-close"
+#: src/ui/gui/recode.ui:481
+msgid "Copy old values"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:58
-msgid "Weight cases by"
+#: src/ui/gui/recode.ui:505
+msgid "Value: "
 msgstr ""
 
-#: src/ui/gui/psppire.glade:83
-msgid "Frequency Variable"
+#: src/ui/gui/recode.ui:538
+msgid "New Value"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:123
-msgid "Current Status: "
+#: src/ui/gui/recode.ui:596
+msgid "Convert numeric strings to numbers ('5' -> 5)"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:219
-msgid "Name Variable:"
+#: src/ui/gui/recode.ui:614
+msgid "Output variables are strings"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:404
-msgid "Analyze all cases.  Do not create groups."
-msgstr "Analyse all cases.  Do not create groups."
+#: src/ui/gui/recode.ui:629
+msgid "Width: "
+msgstr ""
 
-#: src/ui/gui/psppire.glade:415
-msgid "Compare groups."
+#: src/ui/gui/recode.ui:757
+msgid "(optional case selection condition)"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:429
-msgid "Organize output by groups."
-msgstr "Organise output by groups."
+#: src/ui/gui/recode.ui:838
+msgid "Name:"
+msgstr ""
 
-#: src/ui/gui/psppire.glade:477
-msgid "Groups based on:"
+#: src/ui/gui/recode.ui:881
+msgid "Change"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:540
-msgid "Sort the file by grouping variables."
+#: src/ui/gui/recode.ui:907
+msgid "Output Variable"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:552
-msgid "File is already sorted."
+#: src/ui/gui/recode.ui:981
+msgid "Old and New Values"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:597
-msgid "Current Status : "
+#: src/ui/gui/regression.ui:41
+msgid "Save..."
 msgstr ""
 
-#: src/ui/gui/psppire.glade:605
-msgid "Analysis by groups is off"
+#: src/ui/gui/regression.ui:156
+msgid "Dependent"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:704
-msgid "Sort by:"
+#: src/ui/gui/regression.ui:201
+msgid "Independent"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:767
-msgid "Descending"
+#: src/ui/gui/regression.ui:236
+msgid "Regression: Save"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:784
-msgid "Sort Order"
+#: src/ui/gui/regression.ui:250
+msgid "Predicted values"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:853
-msgid "Target Variable:"
+#: src/ui/gui/regression.ui:263
+msgid "Residuals"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:884
-msgid "Type & Label"
+#: src/ui/gui/regression.ui:298
+msgid "Regression: Statistics"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:924
-msgid "="
+#: src/ui/gui/reliability.ui:27
+msgid "Reliability Analysis"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:970
-msgid "Numeric Expressions:"
+#: src/ui/gui/reliability.ui:114
+msgid "_Items:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1024
-msgid "Functions:"
+#: src/ui/gui/reliability.ui:136
+msgid "Model:\t"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1087 src/ui/gui/psppire.glade:1491
-#: src/ui/gui/recode.glade:731
-msgid "If..."
+#: src/ui/gui/reliability.ui:175
+msgid "Variables in first split:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1320
-msgid "Use filter variable"
+#: src/ui/gui/roc.ui:115
+msgid "_Test Variable:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1373
-msgid "Based on time or case range"
+#: src/ui/gui/roc.ui:147
+msgid "_State Variable:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1386
-msgid "Range..."
+#: src/ui/gui/roc.ui:172
+msgid "_Value of state variable:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1425
-msgid "Random sample of cases"
+#: src/ui/gui/roc.ui:209
+msgid "ROC C_urve"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1439
-msgid "Sample..."
+#: src/ui/gui/roc.ui:227
+msgid "_With diagonal reference line"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1477
-msgid "If condition is satisfied"
+#: src/ui/gui/roc.ui:251
+msgid "Standard _Error and Confidence Interval"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1526
-msgid "All Cases"
+#: src/ui/gui/roc.ui:266
+msgid "_Coordinate points of the ROC Curve"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1541
-msgid "Select"
+#: src/ui/gui/t-test.ui:8
+msgid "Independent-Samples T Test"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1570
-msgid "Filtered"
+#: src/ui/gui/t-test.ui:54 src/ui/gui/t-test.ui:175 src/ui/gui/t-test.ui:231
+msgid "Define Groups"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1581
-msgid "Deleted"
+#: src/ui/gui/t-test.ui:131 src/ui/gui/t-test.ui:584 src/ui/gui/t-test.ui:803
+msgid "Test Variable(s):"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1599
-msgid "Unselected Cases Are"
+#: src/ui/gui/t-test.ui:271
+msgid "Group_2 value:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1664
-msgid "Comments:"
+#: src/ui/gui/t-test.ui:284
+msgid "Group_1 value:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1706
-msgid "Display comments in output"
+#: src/ui/gui/t-test.ui:365
+msgid "_Use specified values:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1721
-msgid "Column Number: 0"
+#: src/ui/gui/t-test.ui:420
+msgid "Options"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1804
-msgid "First case"
+#: src/ui/gui/t-test.ui:452
+msgid "Exclude cases _analysis by analysis"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1817
-msgid "Last case"
+#: src/ui/gui/t-test.ui:469
+msgid "Exclude cases _listwise"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1830
-msgid "Observation"
+#: src/ui/gui/t-test.ui:529
+msgid "One - Sample T Test"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1894
-msgid "Use expression as label"
+#: src/ui/gui/t-test.ui:626
+msgid "Test Value: "
 msgstr ""
 
-#: src/ui/gui/psppire.glade:2150
-msgid "Goto Case Number:"
+#: src/ui/gui/t-test.ui:704
+msgid "Paired Samples T Test"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:2287
-msgid "Sample Size"
+#: src/ui/gui/text-data-import.ui:8
+msgid "Importing Textual Data"
 msgstr ""
 
-#: src/ui/gui/oneway.glade:30
-msgid "_Factor:"
+#: src/ui/gui/text-data-import.ui:19
+msgid ""
+"This assistant will guide you through the process of importing data into "
+"PSPP from a text file with one line per case,  in which fields are separated "
+"by tabs, commas, or other delimiters.\n"
+"\n"
+"The selected file contains N lines of text.  Only the first M of these will "
+"be shown for preview purposes in the following screens.  You may choose "
+"below how much of the file should actually be imported."
 msgstr ""
 
-#: src/ui/gui/oneway.glade:66
-msgid "Dependent _Variable(s):"
+#: src/ui/gui/text-data-import.ui:52
+msgid "All cases"
 msgstr ""
 
-#: src/ui/gui/oneway.glade:190
-msgid "_Homogeneity"
+#: src/ui/gui/text-data-import.ui:71 src/ui/gui/text-data-import.ui:128
+msgid "Only first "
 msgstr ""
 
-#: src/ui/gui/oneway.glade:226
-msgid "_Contrasts..."
+#: src/ui/gui/text-data-import.ui:106
+msgid " cases"
 msgstr ""
 
-#: src/ui/gui/oneway.glade:309
-msgid "gtk-go-back"
+#: src/ui/gui/text-data-import.ui:162
+msgid "% of file (approximately)"
 msgstr ""
 
-#: src/ui/gui/oneway.glade:320
-msgid "gtk-go-forward"
+#: src/ui/gui/text-data-import.ui:183
+msgid "<b>Amount to Import</b>"
 msgstr ""
 
-#: src/ui/gui/oneway.glade:343
-msgid "_Coefficients:"
+#: src/ui/gui/text-data-import.ui:202
+msgid "Select Data to Import"
 msgstr ""
 
-#: src/ui/gui/oneway.glade:389
-msgid "Coefficient Total: "
+#: src/ui/gui/text-data-import.ui:213
+msgid "Select the first line of the data file that contains data."
 msgstr ""
 
-#: src/ui/gui/oneway.glade:422
-msgid "Contrast 1 of 1"
+#: src/ui/gui/text-data-import.ui:241
+msgid "Line above selected line contains variable names"
 msgstr ""
 
-#: src/ui/gui/output-viewer.glade:32
-msgid "gtk-save"
+#: src/ui/gui/text-data-import.ui:259
+msgid "Choose Separators"
 msgstr ""
 
-#: src/ui/gui/output-viewer.glade:41
-msgid "gtk-save-as"
+#: src/ui/gui/text-data-import.ui:305
+msgid "C_ustom"
 msgstr ""
 
-#: src/ui/gui/output-viewer.glade:65
-msgid "gtk-copy"
+#: src/ui/gui/text-data-import.ui:320
+msgid "Slas_h (/)"
 msgstr ""
 
-#: src/ui/gui/rank.glade:57
-msgid "By:"
+#: src/ui/gui/text-data-import.ui:337
+msgid "Semicolo_n (;)"
 msgstr ""
 
-#: src/ui/gui/rank.glade:196
-msgid "_Smallest Value"
+#: src/ui/gui/text-data-import.ui:354
+msgid "P_ipe (|)"
 msgstr ""
 
-#: src/ui/gui/rank.glade:208
-msgid "_Largest Value"
+#: src/ui/gui/text-data-import.ui:369
+msgid "H_yphen (-)"
 msgstr ""
 
-#: src/ui/gui/rank.glade:227
-msgid "Assign rank 1 to:"
+#: src/ui/gui/text-data-import.ui:386
+msgid "Co_mma (,)"
 msgstr ""
 
-#: src/ui/gui/rank.glade:245
-msgid "_Display summary tables"
+#: src/ui/gui/text-data-import.ui:403
+msgid "_Colon (:)"
 msgstr ""
 
-#: src/ui/gui/rank.glade:261
-msgid "Rank T_ypes"
+#: src/ui/gui/text-data-import.ui:418
+msgid "Ban_g (!)"
 msgstr ""
 
-#: src/ui/gui/rank.glade:272
-msgid "_Ties..."
+#: src/ui/gui/text-data-import.ui:433
+msgid "Ta_b"
 msgstr ""
 
-#: src/ui/gui/rank.glade:339
-msgid "Sum of case weights"
+#: src/ui/gui/text-data-import.ui:448
+msgid "_Space"
 msgstr ""
 
-#: src/ui/gui/rank.glade:355
-msgid "Fractional rank as %"
+#: src/ui/gui/text-data-import.ui:465
+msgid "<b>Separators</b>"
 msgstr ""
 
-#: src/ui/gui/rank.glade:369
-msgid "Fractional rank"
+#: src/ui/gui/text-data-import.ui:495
+msgid "Doubled quote mark treated as escape"
 msgstr ""
 
-#: src/ui/gui/rank.glade:383
-msgid "Savage score"
+#: src/ui/gui/text-data-import.ui:524
+msgid "Quote separator characters with"
 msgstr ""
 
-#: src/ui/gui/rank.glade:397
-msgid "Rank"
+#: src/ui/gui/text-data-import.ui:544
+msgid "<b>Quoting</b>"
 msgstr ""
 
-#: src/ui/gui/rank.glade:411
-msgid "Ntiles"
+#: src/ui/gui/text-data-import.ui:592
+msgid "<b>Fields Preview</b>"
 msgstr ""
 
-#: src/ui/gui/rank.glade:450
-msgid "Proportion Estimates"
+#: src/ui/gui/text-data-import.ui:607
+msgid "Adjust Variable Formats"
 msgstr ""
 
-#: src/ui/gui/rank.glade:460
-msgid "Normal Scores"
+#: src/ui/gui/text-data-import.ui:618
+msgid ""
+"Check the data formats displayed below and fix any that are incorrect.  You "
+"may set other variable properties now or later."
 msgstr ""
 
-#: src/ui/gui/rank.glade:494
-msgid "Blom"
+#: src/ui/gui/text-data-import.ui:662
+msgid "<b>Variables</b>"
 msgstr ""
 
-#: src/ui/gui/rank.glade:505
-msgid "Tukey"
+#: src/ui/gui/text-data-import.ui:705
+msgid "<b>Data Preview</b>"
 msgstr ""
 
-#: src/ui/gui/rank.glade:519
-msgid "Rankit"
+#: src/ui/gui/var-sheet-dialogs.ui:7
+msgid "Variable Type"
 msgstr ""
 
-#: src/ui/gui/rank.glade:533
-msgid "Van der Wärden"
+#: src/ui/gui/var-sheet-dialogs.ui:75
+msgid "Scientific notation"
 msgstr ""
 
-#: src/ui/gui/rank.glade:550
-msgid "Proportion Estimation Formula"
+#: src/ui/gui/var-sheet-dialogs.ui:123
+msgid "Custom currency"
 msgstr ""
 
-#: src/ui/gui/rank.glade:612
-msgid "_Mean"
+#: src/ui/gui/var-sheet-dialogs.ui:225
+msgid "positive"
 msgstr ""
 
-#: src/ui/gui/rank.glade:624
-msgid "_Low"
+#: src/ui/gui/var-sheet-dialogs.ui:234
+msgid "negative"
 msgstr ""
 
-#: src/ui/gui/rank.glade:640
-msgid "_High"
+#: src/ui/gui/var-sheet-dialogs.ui:247
+msgid "Sample"
 msgstr ""
 
-#: src/ui/gui/rank.glade:658
-msgid "_Sequential ranks to unique values"
+#: src/ui/gui/var-sheet-dialogs.ui:294
+msgid "Width:"
 msgstr ""
 
-#: src/ui/gui/rank.glade:678
-msgid "Rank Assigned to Ties"
+#: src/ui/gui/var-sheet-dialogs.ui:339
+msgid "Decimal Places:"
 msgstr ""
 
-#: src/ui/gui/recode.glade:197
-msgid "System-Missing"
+#: src/ui/gui/var-sheet-dialogs.ui:419 src/ui/gui/var-sheet-dialogs.ui:610
+msgid "Value Labels"
 msgstr ""
 
-#: src/ui/gui/recode.glade:211
-msgid "System-or user-missing"
+#: src/ui/gui/var-sheet-dialogs.ui:518
+msgid "Value Label:"
 msgstr ""
 
-#: src/ui/gui/recode.glade:245
-msgid "through"
+#: src/ui/gui/var-sheet-dialogs.ui:711
+msgid "_No missing values"
 msgstr ""
 
-#: src/ui/gui/recode.glade:283
-msgid "Range, LOWEST thru value"
+#: src/ui/gui/var-sheet-dialogs.ui:782
+msgid "_Discrete missing values"
 msgstr ""
 
-#: src/ui/gui/recode.glade:297
-msgid "Range, value thru HIGHEST"
+#: src/ui/gui/var-sheet-dialogs.ui:816
+msgid "_Low:"
 msgstr ""
 
-#: src/ui/gui/recode.glade:327
-msgid "All other values"
+#: src/ui/gui/var-sheet-dialogs.ui:835
+msgid "_High:"
 msgstr ""
 
-#: src/ui/gui/recode.glade:363
-msgid "Range:"
+#: src/ui/gui/var-sheet-dialogs.ui:860
+msgid "Di_screte value:"
 msgstr ""
 
-#: src/ui/gui/recode.glade:380
-msgid "Old Value"
+#: src/ui/gui/var-sheet-dialogs.ui:888
+msgid "_Range plus one optional discrete missing value"
 msgstr ""
 
-#: src/ui/gui/recode.glade:462
-msgid "System Missing"
+#: src/ui/gui/variable-info.ui:50
+msgid "Variable Information:"
 msgstr ""
 
-#: src/ui/gui/recode.glade:476
-msgid "Copy old values"
+#: src/ui/gui/data-editor.ui:9
+msgid "Sort Ascending"
 msgstr ""
 
-#: src/ui/gui/recode.glade:500
-msgid "Value: "
+#: src/ui/gui/data-editor.ui:15
+msgid "Sort Descending"
 msgstr ""
 
-#: src/ui/gui/recode.glade:530
-msgid "New Value"
+#: src/ui/gui/data-editor.ui:26 src/ui/gui/output-viewer.ui:9
+#: src/ui/gui/syntax-editor.ui:10
+msgid "_File"
 msgstr ""
 
-#: src/ui/gui/recode.glade:590
-msgid "Convert numeric strings to numbers ('5' -> 5)"
+#: src/ui/gui/data-editor.ui:38 src/ui/gui/syntax-editor.ui:22
+#: src/ui/gui/syntax-editor.ui:40
+msgid "_Syntax"
 msgstr ""
 
-#: src/ui/gui/recode.glade:608
-msgid "Output variables are strings"
+#: src/ui/gui/data-editor.ui:44 src/ui/gui/data-editor.ui:217
+#: src/ui/gui/data-editor.ui:229 src/ui/gui/syntax-editor.ui:28
+#: src/ui/gui/syntax-editor.ui:46
+msgid "_Data"
 msgstr ""
 
-#: src/ui/gui/recode.glade:620
-msgid "Width: "
+#: src/ui/gui/data-editor.ui:56
+msgid "_Import Delimited Text Data"
 msgstr ""
 
-#: src/ui/gui/recode.glade:743
-msgid "(optional case selection condition)"
+#: src/ui/gui/data-editor.ui:75
+msgid "D_isplay Data File Information"
 msgstr ""
 
-#: src/ui/gui/recode.glade:823
-msgid "Name:"
+#: src/ui/gui/data-editor.ui:81
+msgid "Working File"
 msgstr ""
 
-#: src/ui/gui/recode.glade:867
-msgid "Change"
+#: src/ui/gui/data-editor.ui:87
+msgid "External File"
 msgstr ""
 
-#: src/ui/gui/recode.glade:885
-msgid "Output Variable"
+#: src/ui/gui/data-editor.ui:93
+msgid "Recently Used Da_ta"
 msgstr ""
 
-#: src/ui/gui/recode.glade:965
-msgid "Old and New Values"
+#: src/ui/gui/data-editor.ui:99
+msgid "Recently Used _Files"
 msgstr ""
 
-#: src/ui/gui/regression.glade:40
-msgid "Save..."
+#: src/ui/gui/data-editor.ui:111 src/ui/gui/output-viewer.ui:28
+#: src/ui/gui/syntax-editor.ui:70
+msgid "_Edit"
 msgstr ""
 
-#: src/ui/gui/regression.glade:145
-msgid "Dependent"
+#: src/ui/gui/data-editor.ui:117
+msgid "Insert Variable"
 msgstr ""
 
-#: src/ui/gui/regression.glade:193
-msgid "Independent"
+#: src/ui/gui/data-editor.ui:118
+msgid "Create a new variable at the current position"
 msgstr ""
 
-#: src/ui/gui/regression.glade:243
-msgid "Predicted values"
+#: src/ui/gui/data-editor.ui:125
+msgid "Insert Cases"
 msgstr ""
 
-#: src/ui/gui/regression.glade:252
-msgid "Residuals"
+#: src/ui/gui/data-editor.ui:126
+msgid "Create a new case at the current position"
 msgstr ""
 
-#: src/ui/gui/reliability.glade:89
-msgid "_Items:"
+#: src/ui/gui/data-editor.ui:132
+msgid "Go To Case"
 msgstr ""
 
-#: src/ui/gui/reliability.glade:111
-msgid "Model:\t"
+#: src/ui/gui/data-editor.ui:134
+msgid "Jump to a case in the data sheet"
 msgstr ""
 
-#: src/ui/gui/reliability.glade:122
-msgid ""
-"Alpha\n"
-"Split"
+#: src/ui/gui/data-editor.ui:160
+msgid "Cl_ear Variables"
 msgstr ""
 
-#: src/ui/gui/reliability.glade:144
-msgid "Variables in first split:"
+#: src/ui/gui/data-editor.ui:161
+msgid "Delete the variables at the selected position(s)"
 msgstr ""
 
-#: src/ui/gui/syntax-editor.glade:163
-msgid "_Run"
+#: src/ui/gui/data-editor.ui:169
+msgid "_Clear Cases"
 msgstr ""
 
-#: src/ui/gui/syntax-editor.glade:172
-msgid "All"
+#: src/ui/gui/data-editor.ui:170
+msgid "Delete the cases at the selected position(s)"
 msgstr ""
 
-#: src/ui/gui/syntax-editor.glade:180
-msgid "Selection"
+#: src/ui/gui/data-editor.ui:182
+msgid "_View"
 msgstr ""
 
-#: src/ui/gui/syntax-editor.glade:188
-msgid "Current Line"
+#: src/ui/gui/data-editor.ui:189
+msgid "_Status Bar"
 msgstr ""
 
-#: src/ui/gui/syntax-editor.glade:197
-msgid "To End"
+#: src/ui/gui/data-editor.ui:195
+msgid "_Fonts"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:8
-msgid "Importing Textual Data"
+#: src/ui/gui/data-editor.ui:203
+msgid "_Grid Lines"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:18
-msgid ""
-"This assistant will guide you through the process of importing data into "
-"PSPP from a text file with one line per case,  in which fields are separated "
-"by tabs, commas, or other delimiters.\n"
-"\n"
-"The selected file contains N lines of text.  Only the first M of these will "
-"be shown for preview purposes in the following screens.  You may choose "
-"below how much of the file should actually be imported."
+#: src/ui/gui/data-editor.ui:209
+msgid "Value _Labels"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:50
-msgid "All cases"
+#: src/ui/gui/data-editor.ui:210
+msgid "Show/hide value labels"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:66 src/ui/gui/text-data-import.glade:122
-msgid "Only first "
+#: src/ui/gui/data-editor.ui:223 src/ui/gui/data-editor.ui:430
+msgid "_Variables"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:97
-msgid " cases"
+#: src/ui/gui/data-editor.ui:234
+msgid "_Sort Cases"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:152
-msgid "% of file (approximately)"
+#: src/ui/gui/data-editor.ui:237
+msgid "Sort cases in the active file"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:173
-msgid "<b>Amount to Import</b>"
+#: src/ui/gui/data-editor.ui:244
+msgid "_Transpose"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:195
-msgid "Select Data to Import"
+#: src/ui/gui/data-editor.ui:245
+msgid "Transpose the cases with the variables"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:205
-msgid "Select the first line of the data file that contains data."
+#: src/ui/gui/data-editor.ui:251
+msgid "S_plit File"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:236
-msgid "Line above selected line contains variable names"
+#: src/ui/gui/data-editor.ui:252
+msgid "Split the active file"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:251
-msgid "Choose Separators"
+#: src/ui/gui/data-editor.ui:259
+msgid "Select _Cases"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:299
-msgid "C_ustom"
+#: src/ui/gui/data-editor.ui:265
+msgid "_Weight Cases"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:314
-msgid "Slas_h (/)"
+#: src/ui/gui/data-editor.ui:266
+msgid "Weight cases by variable"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:331
-msgid "Semicolo_n (;)"
+#: src/ui/gui/data-editor.ui:273
+msgid "_Transform"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:348
-msgid "P_ipe (|)"
+#: src/ui/gui/data-editor.ui:279
+msgid "_Compute"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:363
-msgid "H_yphen (-)"
+#: src/ui/gui/data-editor.ui:285
+msgid "Ran_k Cases"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:380
-msgid "Co_mma (,)"
+#: src/ui/gui/data-editor.ui:291
+msgid "Recode into _Same Variables"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:397
-msgid "_Colon (:)"
+#: src/ui/gui/data-editor.ui:297
+msgid "Recode into _Different Variables"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:412
-msgid "Ban_g (!)"
+#: src/ui/gui/data-editor.ui:303
+msgid "_Run Pending Transforms"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:427
-msgid "Ta_b"
-msgstr ""
+#: src/ui/gui/data-editor.ui:310
+msgid "_Analyze"
+msgstr "_Analyse"
 
-#: src/ui/gui/text-data-import.glade:442
-msgid "_Space"
+#: src/ui/gui/data-editor.ui:316
+msgid "_Descriptive Statistics"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:456
-msgid "<b>Separators</b>"
+#: src/ui/gui/data-editor.ui:322
+msgid "_Frequencies"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:489
-msgid "Doubled quote mark treated as escape"
+#: src/ui/gui/data-editor.ui:334
+msgid "_Explore"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:526
-msgid "Quote separator characters with"
+#: src/ui/gui/data-editor.ui:340
+msgid "_Crosstabs"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:543
-msgid "<b>Quoting</b>"
+#: src/ui/gui/data-editor.ui:346
+msgid "Compare _Means"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:594
-msgid "<b>Fields Preview</b>"
+#: src/ui/gui/data-editor.ui:352
+msgid "_One Sample T Test"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:612
-msgid "Adjust Variable Formats"
+#: src/ui/gui/data-editor.ui:358
+msgid "_Independent Samples T Test"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:622
-msgid ""
-"Check the data formats displayed below and fix any that are incorrect.  You "
-"may set other variable properties now or later."
+#: src/ui/gui/data-editor.ui:364
+msgid "_Paired Samples T Test"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:665
-msgid "<b>Variables</b>"
+#: src/ui/gui/data-editor.ui:370
+msgid "One Way _ANOVA"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:712
-msgid "<b>Data Preview</b>"
+#: src/ui/gui/data-editor.ui:376
+msgid "Bivariate _Correlation..."
 msgstr ""
 
-#: src/ui/gui/t-test.glade:56 src/ui/gui/t-test.glade:165
-msgid "Define Groups"
+#: src/ui/gui/data-editor.ui:382
+msgid "Factor _Analysis"
 msgstr ""
 
-#: src/ui/gui/t-test.glade:123 src/ui/gui/t-test.glade:549
-#: src/ui/gui/t-test.glade:761
-msgid "Test Variable(s):"
+#: src/ui/gui/data-editor.ui:388
+msgid "Re_liability"
 msgstr ""
 
-#: src/ui/gui/t-test.glade:258
-msgid "Group_2 value:"
+#: src/ui/gui/data-editor.ui:394
+msgid "Linear _Regression"
 msgstr ""
 
-#: src/ui/gui/t-test.glade:271
-msgid "Group_1 value:"
+#: src/ui/gui/data-editor.ui:400
+msgid "_Non-Parametric Statistics"
 msgstr ""
 
-#: src/ui/gui/t-test.glade:320
-msgid "_Cut point:"
+#: src/ui/gui/data-editor.ui:406
+msgid "_Chi-Square"
 msgstr ""
 
-#: src/ui/gui/t-test.glade:349
-msgid "_Use specified values:"
+#: src/ui/gui/data-editor.ui:412
+msgid "_Binomial"
 msgstr ""
 
-#: src/ui/gui/t-test.glade:431
-msgid "Exclude cases _analysis by analysis"
+#: src/ui/gui/data-editor.ui:418
+msgid "ROC Cur_ve..."
 msgstr ""
 
-#: src/ui/gui/t-test.glade:442
-msgid "Exclude cases _listwise"
+#: src/ui/gui/data-editor.ui:424
+msgid "_Utilities"
 msgstr ""
 
-#: src/ui/gui/t-test.glade:594
-msgid "Test Value: "
+#: src/ui/gui/data-editor.ui:431
+msgid "Jump to variable"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:7
-msgid "Variable Type"
+#: src/ui/gui/data-editor.ui:438
+msgid "Data File _Comments"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:75
-msgid "Scientific notation"
+#: src/ui/gui/data-editor.ui:444 src/ui/gui/output-viewer.ui:40
+#: src/ui/gui/syntax-editor.ui:131
+msgid "_Windows"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:123
-msgid "Custom currency"
-msgstr ""
+#: src/ui/gui/data-editor.ui:450 src/ui/gui/output-viewer.ui:46
+#: src/ui/gui/syntax-editor.ui:137
+msgid "_Minimize All Windows"
+msgstr "_Minimise All Windows"
 
-#: src/ui/gui/var-sheet-dialogs.glade:217
-msgid "positive"
+#: src/ui/gui/data-editor.ui:456
+msgid "_Split"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:223
-msgid "negative"
+#: src/ui/gui/data-editor.ui:630
+msgid "Information Area"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:236
-msgid "Sample"
+#: src/ui/gui/data-editor.ui:652
+msgid "Processor Area"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:286
-msgid "Width:"
+#: src/ui/gui/data-editor.ui:677
+msgid "Case Counter Area"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:330
-msgid "Decimal Places:"
+#: src/ui/gui/data-editor.ui:702
+msgid "Filter Use Status Area"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:499
-msgid "Value Label:"
+#: src/ui/gui/data-editor.ui:728
+msgid "Weight Status Area"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:677
-msgid "_No missing values"
+#: src/ui/gui/data-editor.ui:754
+msgid "Split File Status Area"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:747
-msgid "_Discrete missing values"
+#: src/ui/gui/output-viewer.ui:22
+msgid "_Export"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:782
-msgid "_Low:"
+#: src/ui/gui/syntax-editor.ui:100
+msgid "_Run"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:801
-msgid "_High:"
+#: src/ui/gui/syntax-editor.ui:106
+msgid "All"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:826
-msgid "Di_screte value:"
+#: src/ui/gui/syntax-editor.ui:112
+msgid "Selection"
 msgstr ""
 
-#: src/ui/gui/var-sheet-dialogs.glade:856
-msgid "_Range plus one optional discrete missing value"
+#: src/ui/gui/syntax-editor.ui:118
+msgid "Current Line"
 msgstr ""
 
-#: src/ui/gui/variable-info-dialog.glade:49
-msgid "Variable Information:"
+#: src/ui/gui/syntax-editor.ui:125
+msgid "To End"
 msgstr ""
 
-#: tests/dissect-sysfile.c:528
-#, c-format
-msgid "Unrecognized record type 7, subtype %d."
-msgstr "Unrecognised record type 7, subtype %d."
-
-#: tests/dissect-sysfile.c:701
-#, c-format
-msgid "%s: Error parsing attribute value %s[%d]"
-msgstr ""
+#~ msgid "cannot initialize output driver `%s' of class `%s'"
+#~ msgstr "cannot initialise output driver `%s' of class `%s'"
 
-#: tests/dissect-sysfile.c:707
-#, c-format
-msgid "%s: Attribute value %s[%d] is not quoted: %s"
-msgstr ""
+#~ msgid "Options affecting syntax and behavior:"
+#~ msgstr "Options affecting syntax and behaviour:"
 
 #~ msgid ""
 #~ "   This program is free software: you can redistribute it and/or modify\n"
diff --git a/po/es.po b/po/es.po
new file mode 100644 (file)
index 0000000..b00f742
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,8065 @@
+# Spanish messages for PSPP
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same licence as the pspp package.
+# Palmira Payá Sanchez, 2009.
+# Javier Gómez Serrano, 2009.
+# Francesc Josep Miguel Quesada <Miguel.Quesada@uab.cat>, 2010.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pspp-0.7.2-pre1\n"
+"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
+"POT-Creation-Date: 2010-05-21 12:02+0200\n"
+"PO-Revision-Date: 2010-02-03 20:19+0100\n"
+"Last-Translator: Francesc Josep Miguel Quesada <Miguel.Quesada@uab.cat>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
+
+#: src/ui/gui/psppire-buttonbox.c:275 src/ui/gui/psppire-buttonbox.c:437
+msgid "Continue"
+msgstr "Continuar"
+
+#: src/ui/gui/psppire-buttonbox.c:435
+msgid "OK"
+msgstr "Ok"
+
+#: src/ui/gui/psppire-buttonbox.c:436
+msgid "Go To"
+msgstr "Ir a"
+
+#: src/ui/gui/psppire-buttonbox.c:438
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: src/ui/gui/psppire-buttonbox.c:439
+msgid "Help"
+msgstr "Ayuda"
+
+#: src/ui/gui/psppire-buttonbox.c:440
+msgid "Reset"
+msgstr "Reiniciar"
+
+#: src/ui/gui/psppire-buttonbox.c:441
+msgid "Paste"
+msgstr "Pegar"
+
+#: src/ui/gui/psppire-dictview.c:466 src/language/dictionary/split-file.c:82
+#: src/language/dictionary/sys-file-info.c:150
+#: src/language/dictionary/sys-file-info.c:340
+#: src/language/dictionary/sys-file-info.c:664
+#: src/language/stats/descriptives.c:881
+#: src/language/data-io/data-parser.c:649
+#: src/language/data-io/data-parser.c:688 src/language/data-io/print.c:403
+msgid "Variable"
+msgstr "Variable"
+
+#: src/ui/gui/psppire-dictview.c:503
+msgid "Prefer variable labels"
+msgstr "Prefiero las etiquetas de variable"
+
+#: src/ui/gui/psppire-var-view.c:193
+#, fuzzy, c-format
+msgid "Var%d"
+msgstr "Pareja %d"
+
+#: src/data/any-reader.c:56
+#, c-format
+msgid "An error occurred while opening \"%s\": %s."
+msgstr "Se ha producido un error en abrir \"%s\": %s."
+
+#: src/data/any-reader.c:101
+#, c-format
+msgid "\"%s\" is not a system or portable file."
+msgstr "\"%s\" no es un archivo del sistema o portátil."
+
+#: src/data/any-reader.c:107 src/data/any-writer.c:63
+msgid "The inline file is not allowed here."
+msgstr "El archivo en línea no está permitido aquí."
+
+#: src/data/calendar.c:81
+#, c-format
+msgid "Month %d is not in acceptable range of 0 to 13."
+msgstr "El mes %d no está en el intervalo válido de 0 a 13."
+
+#: src/data/calendar.c:89
+#, c-format
+msgid "Day %d is not in acceptable range of 0 to 31."
+msgstr "El día %d no está en el intervalo válido de 0 a 31."
+
+#: src/data/calendar.c:96
+#, c-format
+msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
+msgstr ""
+"La fecha %04d-%d-%d es anterior a la fecha aceptada más antigua, 1582-10-15."
+
+#: 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 ""
+"Al menos un caso en la lectura de datos tenia un valor de ponderación que es "
+"perdido del usuari, del sistema, cero o negativo. Este(os) caso(s) fueron "
+"ignorado(s)."
+
+#: src/data/data-in.c:274 src/data/data-in.c:464
+msgid "Field contents are not numeric."
+msgstr "El contenido del campo no es numérico."
+
+#: src/data/data-in.c:276 src/data/data-in.c:466
+msgid "Number followed by garbage."
+msgstr "Número seguido por desecho."
+
+#: src/data/data-in.c:287
+msgid "Invalid numeric syntax."
+msgstr "Sintaxis numérica no válida."
+
+#: src/data/data-in.c:296 src/data/data-in.c:479
+msgid "Too-large number set to system-missing."
+msgstr "Número demasiado grande definido como perdido del sistema."
+
+#: src/data/data-in.c:301 src/data/data-in.c:484
+msgid "Too-small number set to zero."
+msgstr "Número demasiado pequeño definido como cero."
+
+#: src/data/data-in.c:327
+msgid "All characters in field must be digits."
+msgstr "Todos los carácteres del campo tienen que ser dígitos."
+
+#: src/data/data-in.c:350
+msgid "Unrecognized character in field."
+msgstr "Carácter no reconocido en el campo."
+
+#: src/data/data-in.c:374 src/data/data-in.c:650
+msgid "Field must have even length."
+msgstr "Campo debe tener la anchura divisible por 2 (par)."
+
+#: src/data/data-in.c:379 src/data/data-in.c:661
+msgid "Field must contain only hex digits."
+msgstr "Campo debe contener únicamente dígitos hexadecimales."
+
+#: src/data/data-in.c:700 src/data/data-in.c:747
+msgid "Syntax error in date field."
+msgstr "Error sintáctico en el campo de datos."
+
+#: src/data/data-in.c:716
+#, c-format
+msgid "Day (%ld) must be between 1 and 31."
+msgstr "Día (%ld) debe estar entre 1 y 31."
+
+#: src/data/data-in.c:763
+msgid "Delimiter expected between fields in date."
+msgstr "En la fecha se espera un delimitador entre los campos."
+
+#: src/data/data-in.c:837
+msgid ""
+"Unrecognized month format.  Months may be specified as Arabic or Roman "
+"numerals or as at least 3 letters of their English names."
+msgstr ""
+"Formato de mes no reconocido. Los meses pueden ser especificados como "
+"números Arábicos o Romanos, o como mínimo 3 letras de sus nombres en Inglés."
+
+#: src/data/data-in.c:864
+#, c-format
+msgid "Year (%ld) must be between 1582 and 19999."
+msgstr "Año (%ld) debe estar entre 1582 y 19999."
+
+#: src/data/data-in.c:876
+#, c-format
+msgid "Trailing garbage \"%.*s\" following date."
+msgstr "Basura \"%.*s\" detrás de la fecha."
+
+#: src/data/data-in.c:892
+msgid "Julian day must have exactly three digits."
+msgstr "Un Día Juliano debe tener exactamente tres dígitos."
+
+#: src/data/data-in.c:897
+#, c-format
+msgid "Julian day (%ld) must be between 1 and 366."
+msgstr "El Día Juliano (%ld) debe estar entre 1 y 366."
+
+#: src/data/data-in.c:921
+#, c-format
+msgid "Quarter (%ld) must be between 1 and 4."
+msgstr "Trimestre (%ld) debe estar entre 1 y 4."
+
+#: src/data/data-in.c:941
+#, c-format
+msgid "Week (%ld) must be between 1 and 53."
+msgstr "Semana (%ld) debe estar entre 1 y 53."
+
+#: src/data/data-in.c:954
+msgid "Delimiter expected between fields in time."
+msgstr "Se espera un delimitador entre campos de tiempo."
+
+#: src/data/data-in.c:974
+#, c-format
+msgid "Minute (%ld) must be between 0 and 59."
+msgstr "Minuto (%ld) debe estar entre 0 y 59."
+
+#: src/data/data-in.c:1014
+msgid ""
+"Unrecognized weekday name.  At least the first two letters of an English "
+"weekday name must be specified."
+msgstr ""
+"Día de la semana no reconocido. Al menos se deben especificar las dos "
+"primeras letras del nombre en inglés."
+
+#: src/data/data-in.c:1152
+#, c-format
+msgid "`%c' expected in date field."
+msgstr "Se espera `%c' en un campo de datos."
+
+#: src/data/data-in.c:1193
+#, c-format
+msgid "column %d"
+msgstr "columna %d"
+
+#: src/data/data-in.c:1195
+#, c-format
+msgid "columns %d-%d"
+msgstr "columnas %d-%d"
+
+#: src/data/data-in.c:1199
+#, c-format
+msgid "%s field) "
+msgstr "%s campo)"
+
+#: src/data/data-out.c:481
+#, c-format
+msgid "Weekday number %f is not between 1 and 7."
+msgstr "Número del día de la semana %f no está entre 1 y 7."
+
+#: src/data/data-out.c:502
+#, c-format
+msgid "Month number %f is not between 1 and 12."
+msgstr "Número del mes %f no está entre 1 y 12."
+
+#: src/data/dict-class.c:52
+msgid "ordinary"
+msgstr "ordinaria"
+
+#: src/data/dict-class.c:54
+msgid "system"
+msgstr "sistema"
+
+#: src/data/dict-class.c:56
+msgid "scratch"
+msgstr "cero"
+
+#: src/data/dictionary.c:980
+msgid ""
+"At least one case in the data file had a weight value that was user-missing, "
+"system-missing, zero, or negative.  These case(s) were ignored."
+msgstr ""
+"Al menos un caso del archivo de datos tenía un valor de ponderación perdido "
+"de usuario, de sistema, cero o negativo. Estos caso(s) fueron ignorado(s)."
+
+#: src/data/dictionary.c:1283
+#, c-format
+msgid "Truncating document line to %d bytes."
+msgstr "Linea de documento truncada a  %d bytes."
+
+#: src/data/file-handle-def.c:462
+#, c-format
+msgid "Can't read from %s as a %s because it is already being read as a %s."
+msgstr ""
+"No se puede leer de %s como una %s porque ya esta siendo leída como una %s."
+
+#: src/data/file-handle-def.c:466
+#, c-format
+msgid "Can't write to %s as a %s because it is already being written as a %s."
+msgstr ""
+"No se puede escribir en %s como una %s porque ya esta siendo escrita como "
+"una %s."
+
+#: src/data/file-handle-def.c:473
+#, c-format
+msgid "Can't re-open %s as a %s."
+msgstr "No se puede re-abrir %s como %s."
+
+#: src/data/file-name.c:168
+#, c-format
+msgid "Not opening pipe file `%s' because SAFER option set."
+msgstr ""
+"No abrir el archivo de transferencia '%s' porque la opción SAFER esta "
+"activada."
+
+#: src/data/format.c:235
+msgid "Input format"
+msgstr "Formato de entrada"
+
+#: src/data/format.c:235
+msgid "Output format"
+msgstr "Formato de salida"
+
+#: src/data/format.c:244
+#, c-format
+msgid "Format %s may not be used for input."
+msgstr "Formato %s no puede ser utilizado como entrada."
+
+# anchura o longitud o..
+#: src/data/format.c:251
+#, c-format
+msgid "%s specifies width %d, but %s requires an even width."
+msgstr "%s especifica %d anchura, pero %s requiere una anchura par."
+
+#: src/data/format.c:260
+#, c-format
+msgid "%s %s specifies width %d, but %s requires a width between %d and %d."
+msgstr ""
+"%s %s especifica anchura %d, pero %s requiere una anchura entre %d y %d."
+
+#: src/data/format.c:269
+#, c-format
+msgid "%s %s specifies %d decimal place, but %s does not allow any decimals."
+msgid_plural ""
+"%s %s specifies %d decimal places, but %s does not allow any decimals."
+msgstr[0] "%s %s especifica %d lugar decimal, pero %s no permite ninguno."
+msgstr[1] "%s %s especifica %d lugares decimales, pero %s no permite ninguno."
+
+#: src/data/format.c:280
+#, c-format
+msgid ""
+"%s %s specifies %d decimal place, but the given width allows at most %d "
+"decimals."
+msgid_plural ""
+"%s %s specifies %d decimal places, but the given width allows at most %d "
+"decimals."
+msgstr[0] ""
+"%s %s especifica %d lugar decimal, pero la anchura dada permite como mucho %"
+"d decimales."
+msgstr[1] ""
+"%s %s especifica %d lugares decimales, pero la anchura dada permite como "
+"mucho %d decimales."
+
+#: src/data/format.c:287
+#, c-format
+msgid ""
+"%s %s specifies %d decimal place, but the given width does not allow for any "
+"decimals."
+msgid_plural ""
+"%s %s specifies %d decimal places, but the given width does not allow for "
+"any decimals."
+msgstr[0] ""
+"%s %s especifica %d lugar decimal, pero la anchura dada no permite ninguno."
+msgstr[1] ""
+"%s %s especifica %d lugares decimales, pero la anchura dada no permite "
+"ninguno."
+
+#: src/data/format.c:326
+#, c-format
+msgid "%s variables are not compatible with %s format %s."
+msgstr "Las variables %s no son compatibles con %s formato %s."
+
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:628 src/ui/gui/psppire.ui:1960
+#: src/ui/gui/var-sheet-dialogs.ui:139
+msgid "String"
+msgstr "Cadena"
+
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:621 src/ui/gui/psppire.ui:2040
+#: src/ui/gui/var-sheet-dialogs.ui:27
+msgid "Numeric"
+msgstr "Numérico"
+
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
+#: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
+#: src/language/xforms/recode.c:507
+#: src/language/dictionary/apply-dictionary.c:78
+#: src/language/dictionary/apply-dictionary.c:79
+msgid "numeric"
+msgstr "numérico"
+
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
+#: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
+#: src/language/xforms/recode.c:507
+#: src/language/dictionary/apply-dictionary.c:78
+#: src/language/dictionary/apply-dictionary.c:79
+msgid "string"
+msgstr "cadena"
+
+# amplitud, ancho?
+#: src/data/format.c:346
+#, c-format
+msgid "String variable with width %d is not compatible with format %s."
+msgstr "Variable de cadena con ancho %d no es compatible con el formato %s."
+
+#: src/data/gnumeric-reader.c:36
+msgid ""
+"Support for Gnumeric files was not compiled into this installation of PSPP"
+msgstr ""
+"Soporte para archivos Gnumeric no fue compilado en esta instalación de PSPP"
+
+#: src/data/gnumeric-reader.c:364
+#, c-format
+msgid "Error opening \"%s\" for reading as a Gnumeric file: %s."
+msgstr "Error en abrir \"%s\" para la lectura como archivo Gnumeric: %s."
+
+#: src/data/gnumeric-reader.c:384
+#, c-format
+msgid "Invalid cell range \"%s\""
+msgstr "Intervalo de celda \"%s\" inválido"
+
+#: src/data/gnumeric-reader.c:516 src/data/psql-reader.c:187
+#, c-format
+msgid "Cannot create variable name from %s"
+msgstr "No se puede crear el nombre de la variable desde %s"
+
+#: src/data/gnumeric-reader.c:528
+#, c-format
+msgid "Selected sheet or range of spreadsheet \"%s\" is empty."
+msgstr ""
+"La hoja o el intervalo de hojas de cálculo seleccionadas \"%s\" está vacía."
+
+#: src/data/make-file.c:68
+#, c-format
+msgid "%s: Creating temporary file: %s."
+msgstr "%s: Creando archivo temporal: %s."
+
+#: src/data/make-file.c:110
+#, c-format
+msgid "%s: Creating file: %s."
+msgstr "%s: Creando archivo: %s."
+
+#: src/data/make-file.c:148
+#, c-format
+msgid "Opening %s for writing: %s."
+msgstr "Abriendo %s para escribir: %s."
+
+#: src/data/make-file.c:157
+#, c-format
+msgid "Opening stream for %s: %s."
+msgstr "Abriendo flujo para %s: %s."
+
+#: src/data/make-file.c:186
+#, c-format
+msgid "Creating temporary file to replace %s: %s."
+msgstr "Creando archivo temporal para sustituir %s: %s."
+
+#: src/data/make-file.c:197
+#, c-format
+msgid "Creating temporary file %s: %s."
+msgstr "Creando archivo temporal %s: %s."
+
+#: src/data/make-file.c:209
+#, c-format
+msgid "Opening stream for temporary file %s: %s."
+msgstr "Abriendo flujo para el archivo temporal %s: %s."
+
+#: src/data/make-file.c:250
+#, c-format
+msgid "Replacing %s by %s: %s."
+msgstr "Sustituyendo %s por %s: %s."
+
+#: src/data/make-file.c:278
+#, c-format
+msgid "Removing %s: %s."
+msgstr "Eliminando %s: %s."
+
+#: src/data/por-file-reader.c:99
+#, fuzzy, c-format
+msgid "portable file %s corrupt at offset 0x%llx: "
+msgstr "archivo portátil %s corrompido a la posición 0x%lx: "
+
+#: src/data/por-file-reader.c:128
+#, fuzzy, c-format
+msgid "reading portable file %s at offset 0x%llx: "
+msgstr "leyendo el archivo portátil %s en la posición 0x%lx: "
+
+#: src/data/por-file-reader.c:156
+#, c-format
+msgid "Error closing portable file \"%s\": %s."
+msgstr "Error en cerrar el archivo portátil \"%s\": %s."
+
+#: src/data/por-file-reader.c:208
+msgid "unexpected end of file"
+msgstr "fin de archivo inesperado"
+
+#. TRANSLATORS: this fragment will be interpolated into
+#. messages in fh_lock() that identify types of files.
+#: src/data/por-file-reader.c:267 src/data/por-file-writer.c:149
+msgid "portable file"
+msgstr "archivo portátil"
+
+#: src/data/por-file-reader.c:275
+#, c-format
+msgid ""
+"An error occurred while opening \"%s\" for reading as a portable file: %s."
+msgstr "Error en abrir \"%s\" para la lectura como archivo portátil: %s."
+
+#: src/data/por-file-reader.c:296
+msgid "Data record expected."
+msgstr "Registro de datos esperado."
+
+#: src/data/por-file-reader.c:378
+msgid "Number expected."
+msgstr "Número esperado."
+
+# Falta, ausencia?
+#: src/data/por-file-reader.c:406
+msgid "Missing numeric terminator."
+msgstr "Falta la terminación numérica."
+
+#: src/data/por-file-reader.c:429
+msgid "Invalid integer."
+msgstr "Número entero inválido."
+
+#: src/data/por-file-reader.c:440 src/data/por-file-reader.c:460
+#, c-format
+msgid "Bad string length %d."
+msgstr "Longitud de cadena %d inválida."
+
+#: src/data/por-file-reader.c:523
+#, c-format
+msgid "%s: Not a portable file."
+msgstr "%s: No es un archivo portátil."
+
+#: src/data/por-file-reader.c:540
+#, c-format
+msgid "Unrecognized version code `%c'."
+msgstr "Código de versión no reconocido `%c'."
+
+#: src/data/por-file-reader.c:549
+#, c-format
+msgid "Bad date string length %zu."
+msgstr "Longitud de cadena de datos %zu inválida."
+
+#: src/data/por-file-reader.c:551
+#, c-format
+msgid "Bad time string length %zu."
+msgstr "Longitud de cadena de tiempo %zu inválida."
+
+#: src/data/por-file-reader.c:593
+#, c-format
+msgid ""
+"%s: Bad format specifier byte (%d).  Variable will be assigned a default "
+"format."
+msgstr ""
+"%s: Byte especificador de formato inválido (%d). Se asignará formato "
+"predeterminado a la variable."
+
+#: src/data/por-file-reader.c:614
+#, c-format
+msgid "Numeric variable %s has invalid format specifier %s."
+msgstr ""
+"La variable numérica %s tiene una especificación de formato inválida %s."
+
+#: src/data/por-file-reader.c:618
+#, c-format
+msgid "String variable %s with width %d has invalid format specifier %s."
+msgstr ""
+"La variable en cadena %s con longitud %d tiene una especificación de formato "
+"inválida %s."
+
+#: src/data/por-file-reader.c:642
+msgid "Expected variable count record."
+msgstr "Registro de recuento de variables esperado."
+
+#: src/data/por-file-reader.c:646
+#, c-format
+msgid "Invalid number of variables %d."
+msgstr "Número inválido de variables: %d."
+
+#: src/data/por-file-reader.c:655
+#, c-format
+msgid "Weight variable name (%s) truncated."
+msgstr "Nombre de la variable ponderada (%s) truncado."
+
+#: src/data/por-file-reader.c:670
+msgid "Expected variable record."
+msgstr "Registro de variable esperado."
+
+# ancho?
+#: src/data/por-file-reader.c:674
+#, c-format
+msgid "Invalid variable width %d."
+msgstr "Ancho de variable inválida %d."
+
+#: src/data/por-file-reader.c:681
+#, c-format
+msgid "Invalid variable name `%s' in position %d."
+msgstr "Nombre de la variable inválido `%s' en la posición %d."
+
+#: src/data/por-file-reader.c:685 src/data/sys-file-reader.c:606
+#, c-format
+msgid "Bad width %d for variable %s."
+msgstr "Ancho %d incorrecto para la variable %s."
+
+#: src/data/por-file-reader.c:700
+#, c-format
+msgid "Duplicate variable name %s in position %d."
+msgstr "Nombre de la variable %s duplicado en la posición %d."
+
+#: src/data/por-file-reader.c:701
+#, c-format
+msgid "Duplicate variable name %s in position %d renamed to %s."
+msgstr ""
+"Nombre de la variable %s duplicado en la posición %d se ha renombrado a %s."
+
+#: src/data/por-file-reader.c:750
+#, c-format
+msgid "Weighting variable %s not present in dictionary."
+msgstr "La variable de ponderación %s no está en el diccionario."
+
+#: src/data/por-file-reader.c:794
+#, c-format
+msgid "Unknown variable %s while parsing value labels."
+msgstr "Variable %s desconocida mientras se analizaban las etiquetas de valor."
+
+#: src/data/por-file-reader.c:797
+#, c-format
+msgid ""
+"Cannot assign value labels to %s and %s, which have different variable types."
+msgstr ""
+"No se puede asignar etiquetas de valor a %s y %s, que tienen diferentes "
+"tipos de variables."
+
+#: src/data/por-file-writer.c:141
+#, c-format
+msgid "Invalid decimal digits count %d.  Treating as %d."
+msgstr "Recuento de dígitos decimales %d inválido. Se tratarà como %d."
+
+#: src/data/por-file-writer.c:161
+#, c-format
+msgid "Error opening \"%s\" for writing as a portable file: %s."
+msgstr "Error en abrir \"%s\" para escribir como archivo portátil: %s."
+
+#: src/data/por-file-writer.c:506
+#, c-format
+msgid "An I/O error occurred writing portable file \"%s\"."
+msgstr "Error I/O en escribir el archivo portátil \"%s\"."
+
+#: src/data/psql-reader.c:46
+msgid ""
+"Support for reading postgres databases was not compiled into this "
+"installation of PSPP"
+msgstr ""
+"El soporte para la lectura de las bases de datos postgres no fue compilado "
+"en esta instalación de PSPP"
+
+#: src/data/psql-reader.c:242
+msgid "Memory error whilst opening psql source"
+msgstr "Error de memoria en abrir la fuente psql"
+
+#: src/data/psql-reader.c:248
+#, c-format
+msgid "Error opening psql source: %s."
+msgstr "Error abriendo la fuente psql: %s."
+
+#: src/data/psql-reader.c:263
+#, c-format
+msgid ""
+"Postgres server is version %s. Reading from versions earlier than 8.0 is not "
+"supported."
+msgstr ""
+"La versión del servidor Postgres es la %s. No es posible la lectura desde "
+"versiones anteriores a la 8.0."
+
+#: src/data/psql-reader.c:283
+msgid ""
+"Connection is unencrypted, but unencrypted connections have not been "
+"permitted."
+msgstr ""
+"La conexión no está cifrada, pero las conexiones sin cifrar no están "
+"permitidas."
+
+#: src/data/psql-reader.c:322 src/data/psql-reader.c:347
+#: src/data/psql-reader.c:357
+#, c-format
+msgid "Error from psql source: %s."
+msgstr "Error desde la fuente psql: %s."
+
+#: src/data/psql-reader.c:452
+#, c-format
+msgid "Unsupported OID %d.  SYSMIS values will be inserted."
+msgstr "OID %d no admitido. Valores SYSMIS serán insertados."
+
+#: src/data/scratch-reader.c:54
+#, c-format
+msgid ""
+"Scratch file handle %s has not yet been written, using SAVE or another "
+"procedure, so it cannot yet be used for reading."
+msgstr ""
+"El manipulador de archivos de trabajo %s aún no se ha escrito, utilizando "
+"SAVE u otro procedimiento, de forma que aún no se puede leer."
+
+#. TRANSLATORS: this fragment will be interpolated into
+#. messages in fh_lock() that identify types of files.
+#: src/data/scratch-writer.c:66 src/language/data-io/file-handle.q:181
+msgid "scratch file"
+msgstr "archivo de trabajo"
+
+#: src/data/settings.c:608
+#, c-format
+msgid ""
+"%s: Custom currency string `%s' does not contain exactly three periods or "
+"commas (or it contains both)."
+msgstr ""
+"%s: La cadena de moneda personalizada '%s' no contiene exactamente tres "
+"puntos o comas (o contiene ambos)."
+
+#: src/data/short-names.c:52
+msgid "Variable suffix too large."
+msgstr "Sufijo de la variable demasiado grande."
+
+#: src/data/sys-file-reader.c:226
+#, c-format
+msgid "Recoded variable name duplicates an existing `%s' within system file."
+msgstr ""
+"El nombre de la variable recodificada duplica `%s' existente dentro del "
+"archivo del sistema."
+
+#. TRANSLATORS: this fragment will be interpolated into
+#. messages in fh_lock() that identify types of files.
+#: src/data/sys-file-reader.c:290 src/data/sys-file-writer.c:207
+msgid "system file"
+msgstr "archivo de sistema"
+
+#: src/data/sys-file-reader.c:297
+#, c-format
+msgid "Error opening \"%s\" for reading as a system file: %s."
+msgstr "Error en abrir \"%s\" para la lectura como archivo de sistema: %s."
+
+#: src/data/sys-file-reader.c:336 tests/dissect-sysfile.c:154
+msgid "Misplaced type 4 record."
+msgstr "Registro de tipo 4 fuera de lugar."
+
+#: src/data/sys-file-reader.c:347 tests/dissect-sysfile.c:165
+#, c-format
+msgid "Unrecognized record type %d."
+msgstr "Tipo de registro %d no reconocido."
+
+#: src/data/sys-file-reader.c:388
+#, c-format
+msgid "File header claims %d variable positions but %d were read from file."
+msgstr ""
+"Cabecera del archivo requiere %d posiciones de variable, per se han leído %d "
+"desde el archivo."
+
+#: src/data/sys-file-reader.c:428
+#, c-format
+msgid "Error closing system file \"%s\": %s."
+msgstr "Error en cerrar el archivo de sistema \"%s\": %s."
+
+#: src/data/sys-file-reader.c:493 src/data/sys-file-reader.c:503
+#: tests/dissect-sysfile.c:202 tests/dissect-sysfile.c:212
+msgid "This is not an SPSS system file."
+msgstr "Esto no es un archivo de sistema de SPSS."
+
+#: src/data/sys-file-reader.c:525 tests/dissect-sysfile.c:227
+msgid ""
+"Compression bias is not the usual value of 100, or system file uses "
+"unrecognized floating-point format."
+msgstr ""
+"El sesgo de compresión no es el valor habitual de 100, o el archivo de "
+"sistema utiliza un formato de punto flotante no reconocido."
+
+#: src/data/sys-file-reader.c:602
+#, c-format
+msgid "Invalid variable name `%s'."
+msgstr "Nombre de variable '%s' no válido."
+
+#: src/data/sys-file-reader.c:610
+#, c-format
+msgid "Duplicate variable name `%s' within system file."
+msgstr "Nombre de variable '%s' duplicado dentro del archivo de sistema."
+
+#: src/data/sys-file-reader.c:618 tests/dissect-sysfile.c:356
+msgid "Variable label indicator field is not 0 or 1."
+msgstr "Campo indicador de etiqueta de variable no es 0 o 1."
+
+#: src/data/sys-file-reader.c:649 tests/dissect-sysfile.c:387
+msgid "Numeric missing value indicator field is not -3, -2, 0, 1, 2, or 3."
+msgstr ""
+"Campo de indicador de valores perdidos numéricos no es -3, -2, 0, 1, 2 o 3."
+
+#: src/data/sys-file-reader.c:667 tests/dissect-sysfile.c:402
+msgid "String missing value indicator field is not 0, 1, 2, or 3."
+msgstr "Campo de indicador de valores perdidos de cadena no es 0, 1, 2 o 3."
+
+#: src/data/sys-file-reader.c:699
+msgid "Missing string continuation record."
+msgstr "Falta de registro de continuación de cadena."
+
+#: src/data/sys-file-reader.c:733
+#, c-format
+msgid "Unknown variable format %<PRIu8>."
+msgstr "Formato de variable %<PRIu8> desconocido."
+
+#: src/data/sys-file-reader.c:751
+#, c-format
+msgid "%s variable %s has invalid %s format %s."
+msgstr "%s variable %s con formato %s no válido %s."
+
+#: src/data/sys-file-reader.c:754
+msgid "print"
+msgstr "imprimir"
+
+#: src/data/sys-file-reader.c:754
+msgid "write"
+msgstr "escribir"
+
+#: src/data/sys-file-reader.c:758
+msgid "Suppressing further invalid format warnings."
+msgstr "Se desactivan las alertas posteriores de formato no válido."
+
+#: src/data/sys-file-reader.c:776
+msgid "Weighting variable must be numeric."
+msgstr "Variable de ponderación tiene que ser numérica."
+
+#: src/data/sys-file-reader.c:790
+msgid "Multiple type 6 (document) records."
+msgstr "Múltiples registros de tipo 6 (document)."
+
+#: src/data/sys-file-reader.c:794
+#, c-format
+msgid "Number of document lines (%d) must be greater than 0."
+msgstr "Número de líneas de documento (%d) tiene que ser mayor que 0."
+
+#: src/data/sys-file-reader.c:802
+msgid "Document line contains null byte."
+msgstr "Una línea del documento contiene un byte nulo."
+
+#: src/data/sys-file-reader.c:893
+#, c-format
+msgid ""
+"Unrecognized record type 7, subtype %d.  Please send a copy of this file, "
+"and the syntax which created it to %s"
+msgstr ""
+"Registro de tipo 7, subtipo %d , no reconocido. Por favor envíe una copia de "
+"este archivo, así como de la sintaxis que lo creó en %s"
+
+#: src/data/sys-file-reader.c:920 tests/dissect-sysfile.c:594
+#, c-format
+msgid "Bad size (%zu) or count (%zu) field on record type 7, subtype 3."
+msgstr ""
+"Campo de longitud (%zu) o cantidad (%zu) inválidos en el registro tipo 7, "
+"subtipo 3."
+
+#: src/data/sys-file-reader.c:940
+#, c-format
+msgid ""
+"Floating-point representation indicated by system file (%d) differs from "
+"expected (%d)."
+msgstr ""
+"Representación del punto flotante indicado por el archivo de sistema (%d) "
+"difiere de lo esperado (%d)."
+
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:110
+#, fuzzy
+msgid "Little Endian"
+msgstr "Little Endian."
+
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:109
+#, fuzzy
+msgid "Big Endian"
+msgstr "Big Endian."
+
+#: src/data/sys-file-reader.c:954
+#, c-format
+msgid ""
+"Integer format indicated by system file (%s) differs from expected (%s)."
+msgstr ""
+"Formato entero indicado por el archivo de sistema  (%s) difiere de lo "
+"esperado (%s)."
+
+#: src/data/sys-file-reader.c:1011 tests/dissect-sysfile.c:625
+#, c-format
+msgid "Bad size (%zu) or count (%zu) on extension 4."
+msgstr "Longitud (%zu) o cantidad (%zu) de la extensión 4 no válida."
+
+#: src/data/sys-file-reader.c:1015 src/data/sys-file-reader.c:1019
+#: src/data/sys-file-reader.c:1023 tests/dissect-sysfile.c:630
+#: tests/dissect-sysfile.c:635 tests/dissect-sysfile.c:640
+#, c-format
+msgid "File specifies unexpected value %g as %s."
+msgstr "El archivo especifica un valor inesperado %g como %s."
+
+#: src/data/sys-file-reader.c:1056
+#, c-format
+msgid "Missing space following 'C' at offset %zu in MRSETS record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1074 tests/dissect-sysfile.c:691
+#, c-format
+msgid "Missing space following 'E' at offset %zu in MRSETS record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1083 tests/dissect-sysfile.c:700
+#, c-format
+msgid ""
+"Unexpected label source value \"%s\" following 'E' at offset %zu in MRSETS "
+"record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1089
+#, c-format
+msgid "Missing 'C', 'D', or 'E' at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1118
+#, c-format
+msgid "Missing new-line parsing variable names at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1129
+#, fuzzy, c-format
+msgid "Duplicate variable name %s at offset %zu in MRSETS record."
+msgstr "Nombre de la variable %s duplicado en la posición %d."
+
+#: src/data/sys-file-reader.c:1142
+#, fuzzy, c-format
+msgid "MRSET %s contains both string and numeric variables."
+msgstr ""
+"Ignorando el registro del valor de cadena larga para la variable numérica %s."
+
+#: src/data/sys-file-reader.c:1157
+#, c-format
+msgid "MRSET %s has only %zu variables."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1194 tests/dissect-sysfile.c:758
+#, c-format
+msgid "Bad size %zu on extension 11."
+msgstr "Longitud no válida %zu en la extensión 11."
+
+#: src/data/sys-file-reader.c:1206 tests/dissect-sysfile.c:770
+#, c-format
+msgid "Extension 11 has bad count %zu (for %zu variables)."
+msgstr "Extensión 11 tiene un recuento inválido %zu (para %zu variables)."
+
+#: src/data/sys-file-reader.c:1227
+#, c-format
+msgid ""
+"Invalid variable display parameters for variable %zu (%s).  Default "
+"parameters substituted."
+msgstr ""
+"Parámetros de visualización de variable no válidos para la variable %zu (%"
+"s). Sustitución de parámetros por defecto."
+
+#: src/data/sys-file-reader.c:1271
+#, c-format
+msgid "Long variable mapping from %s to invalid variable name `%s'."
+msgstr ""
+"Identificación de variable larga desde %s hacia un nombre de variable "
+"inválido '%s'."
+
+#: src/data/sys-file-reader.c:1281
+#, c-format
+msgid "Duplicate long variable name `%s' within system file."
+msgstr ""
+"Nombre de la variable larga '%s' duplicada dentro del archivo de sistema."
+
+#: src/data/sys-file-reader.c:1334
+#, c-format
+msgid "%s listed as string of invalid length %s in very length string record."
+msgstr ""
+"%s figura como cadena de longitud no válida %s en un registro de cadena muy "
+"largo."
+
+#: src/data/sys-file-reader.c:1344
+#, c-format
+msgid ""
+"%s listed in very long string record with width %s, which requires only one "
+"segment."
+msgstr ""
+"%s figura en el registro de cadena muy larga con longitud %s, que requiere "
+"solo un segmento."
+
+#: src/data/sys-file-reader.c:1350
+#, c-format
+msgid "Very long string %s overflows dictionary."
+msgstr "Cadena muy larga %s desborda el diccionario."
+
+#: src/data/sys-file-reader.c:1364
+#, c-format
+msgid ""
+"Very long string with width %ld has segment %d of width %d (expected %d)"
+msgstr ""
+"Cadena muy larga con una longitud de %ld tiene un segmento %d de longitud %d "
+"(se espera %d)"
+
+#: src/data/sys-file-reader.c:1410
+#, c-format
+msgid "Invalid number of labels: %d.  Ignoring labels."
+msgstr "Número de etiquetas inválido: %d. Ignorando etiquetas."
+
+#: src/data/sys-file-reader.c:1441 tests/dissect-sysfile.c:468
+msgid ""
+"Variable index record (type 4) does not immediately follow value label "
+"record (type 3) as it should."
+msgstr ""
+"Registro de índice de variable (tipo 4) no está seguido inmediatament, como "
+"debería, por el registro de etiquetas de valores (tipo 3) ."
+
+#: src/data/sys-file-reader.c:1448
+#, c-format
+msgid ""
+"Number of variables associated with a value label (%d) is not between 1 and "
+"the number of variables (%zu)."
+msgstr ""
+"Número de variables asociadas con una etiqueta de valores (%d) no está entre "
+"1 y el número de variables (%zu)."
+
+#: src/data/sys-file-reader.c:1459
+#, c-format
+msgid ""
+"Value labels may not be added to long string variables (e.g. %s) using "
+"records types 3 and 4."
+msgstr ""
+"No se pueden añadir etiquetas de valor a las variables de cadena larga (e.g. "
+"%s) utilizando los tipos de registro 3 y 4."
+
+#: src/data/sys-file-reader.c:1468
+#, c-format
+msgid ""
+"Variables associated with value label are not all of identical type.  "
+"Variable %s is %s, but variable %s is %s."
+msgstr ""
+"Las variables asociadas con etiqueta de valores no son todas del mismo "
+"tipo.  La variable %s es %s, pero la variable %s es %s."
+
+#: src/data/sys-file-reader.c:1502
+#, c-format
+msgid "Duplicate value label for %g on %s."
+msgstr "Etiqueta de valor duplicad para %g en %s."
+
+#: src/data/sys-file-reader.c:1505 src/data/sys-file-reader.c:1686
+#, c-format
+msgid "Duplicate value label for \"%.*s\" on %s."
+msgstr "Etiqueta de valor duplicada para \"%.*s\" en %s."
+
+#: src/data/sys-file-reader.c:1543
+#, c-format
+msgid "Error parsing attribute value %s[%d]"
+msgstr "Error al analizar el valor del atributo %s[%d]"
+
+#: src/data/sys-file-reader.c:1557
+#, c-format
+msgid "Attribute value %s[%d] is not quoted: %s"
+msgstr "El valor del atributo %s[%d] no está entre comillas: %s"
+
+#: src/data/sys-file-reader.c:1620 tests/dissect-sysfile.c:936
+#, c-format
+msgid ""
+"Variable name length in long string value label record (%d) exceeds %d-byte "
+"limit."
+msgstr ""
+"La longitud del nombre de la variable en el registro de la etiqueta del "
+"valor de cadena larga (%d) supera el límite %d-byte."
+
+#: src/data/sys-file-reader.c:1630
+#, c-format
+msgid "Ignoring long string value record for unknown variable %s."
+msgstr ""
+"Ignorando el registro del valor de cadena larga para la variable desconocida "
+"%s."
+
+#: src/data/sys-file-reader.c:1637
+#, c-format
+msgid "Ignoring long string value record for numeric variable %s."
+msgstr ""
+"Ignorando el registro del valor de cadena larga para la variable numérica %s."
+
+#: src/data/sys-file-reader.c:1644
+#, c-format
+msgid ""
+"Ignoring long string value record for variable %s because the record's width "
+"(%d) does not match the variable's width (%d)"
+msgstr ""
+"Ignorando el registro del valor de cadena larga %s ya que el ancho del "
+"registro (%d) no coincide con el ancho de la variable (%d)"
+
+#: src/data/sys-file-reader.c:1666
+#, c-format
+msgid ""
+"Ignoring long string value %zu for variable %s, with width %d, that has bad "
+"value width %zu."
+msgstr ""
+"Ignorando el valor de cadena larga %zu para la variable %s, de ancho %d, que "
+"tiene un ancho de valor incorrecto %zu."
+
+#: src/data/sys-file-reader.c:1781
+msgid "File ends in partial case."
+msgstr "El archivo acaba en un caso parcial."
+
+#: src/data/sys-file-reader.c:1789
+#, c-format
+msgid "Error reading case from file %s."
+msgstr "Error leyendo un caso del archivo %s."
+
+#: src/data/sys-file-reader.c:1890
+msgid ""
+"Possible compressed data corruption: compressed spaces appear in numeric "
+"field."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1943
+#, c-format
+msgid ""
+"Possible compressed data corruption: string contains compressed integer "
+"(opcode %d)"
+msgstr ""
+
+#: src/data/sys-file-reader.c:2035
+#, c-format
+msgid "Variable index %d not in valid range 1...%d."
+msgstr "Índice de la variable %d no en el intervalo válido de 1...%d."
+
+#: src/data/sys-file-reader.c:2040
+#, c-format
+msgid "Variable index %d refers to long string continuation."
+msgstr ""
+"Índice de la variable %d se refiere a una continuación de cadena larga."
+
+#: src/data/sys-file-reader.c:2108
+#, c-format
+msgid "Suppressed %d additional related warnings."
+msgstr "Suprimidas %d advertencias adicionales."
+
+#: src/data/sys-file-reader.c:2153 src/data/sys-file-reader.c:2170
+#, fuzzy, c-format
+msgid "Dictionary record refers to unknown variable %s."
+msgstr "Mapa de la variable se refiere a una variable desconocida %s."
+
+#: src/data/sys-file-reader.c:2231
+#, c-format
+msgid "Expecting digit at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2238
+#, c-format
+msgid "Expecting space at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2245
+#, c-format
+msgid "%zu-byte string starting at offset %zu exceeds record length %zu."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2255
+#, c-format
+msgid "Expecting space at offset %zu following %zu-byte string."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2347 tests/dissect-sysfile.c:1341
+#, c-format
+msgid "System error: %s."
+msgstr "Error de sistema: %s."
+
+#: src/data/sys-file-reader.c:2349 tests/dissect-sysfile.c:1343
+msgid "Unexpected end of file."
+msgstr "Final de archivo inesperado."
+
+#: src/data/sys-file-writer.c:180
+#, c-format
+msgid "Unknown system file version %d. Treating as version %d."
+msgstr ""
+"Versión de archivo de sistema %d desconocida.Se tratará como versión %d."
+
+#: src/data/sys-file-writer.c:219
+#, c-format
+msgid "Error opening \"%s\" for writing as a system file: %s."
+msgstr "Error al abrir \"%s\" para grabar com archivo de sistema: %s."
+
+#: src/data/sys-file-writer.c:989
+#, c-format
+msgid "An I/O error occurred writing system file \"%s\"."
+msgstr "Error de E/S al guardar el archivo de sistema \"%s\"."
+
+#: src/data/variable.c:206
+#, c-format
+msgid ""
+"Character `%c' (in %s) may not appear as the first character in a variable "
+"name."
+msgstr ""
+"Carácter '%c' (en %s) no puede aparecer como el primer carácter en un nombre "
+"de variable."
+
+#: src/data/variable.c:218
+#, c-format
+msgid "Character `%c' (in %s) may not appear in a variable name."
+msgstr "Carácter '%c' (en %s) no puede aparecer en un nombre de variable."
+
+#: src/data/variable.c:244
+msgid "Variable name cannot be empty string."
+msgstr "El nombre de la variable no puede ser una cadena vacía."
+
+#: src/data/variable.c:250
+#, c-format
+msgid "Variable name %s exceeds %d-character limit."
+msgstr "El nombre de la variable %s supera el límite de %d caracteres."
+
+#: src/data/variable.c:258
+#, c-format
+msgid "`%s' may not be used as a variable name because it is a reserved word."
+msgstr ""
+"'%s' no puede ser utilizado como nombre de variable porque es una palabra "
+"reservada."
+
+#: src/language/syntax-file.c:95
+#, c-format
+msgid "Opening `%s': %s."
+msgstr "Abriendo `%s': %s."
+
+#: src/language/syntax-file.c:109
+#, c-format
+msgid "Reading `%s': %s."
+msgstr "Leyendo `%s': %s."
+
+#: src/language/syntax-file.c:126
+#, c-format
+msgid "Closing `%s': %s."
+msgstr "Cerrando `%s': %s."
+
+#: src/language/command.c:205 src/language/expressions/parse.c:1267
+#: src/language/utilities/set.q:213
+#, c-format
+msgid "%s is not yet implemented."
+msgstr "%s aún no está implementado."
+
+#: src/language/command.c:210
+#, c-format
+msgid "%s may be used only in testing mode."
+msgstr "%s sólo puede ser utilizado en el modo de prueba."
+
+#: src/language/command.c:215
+#, c-format
+msgid "%s may be used only in enhanced syntax mode."
+msgstr "%s sólo puede ser utilizado en modo de sintaxis ampliado."
+
+#: src/language/command.c:239
+msgid "Error encountered while ERROR=STOP is effective."
+msgstr "Error detectado mientras está activo ERROR=STOP."
+
+#: src/language/command.c:484
+msgid "expecting command name"
+msgstr "esperando nombre de comando"
+
+#: src/language/command.c:498
+#, c-format
+msgid "Unknown command %s."
+msgstr "Comando %s desconocido."
+
+#: src/language/command.c:623
+#, c-format
+msgid "%s is allowed only before the active file has been defined."
+msgstr "%s sólo se permite antes que el archivo activo se ha definido."
+
+#: src/language/command.c:627
+#, c-format
+msgid "%s is allowed only after the active file has been defined."
+msgstr "%s sólo se permite después que el archivo activo se ha definido."
+
+#: src/language/command.c:631
+#, c-format
+msgid "%s is allowed only inside INPUT PROGRAM."
+msgstr "%s sólo se permite dentro de INPUT PROGRAM."
+
+#: src/language/command.c:635
+#, c-format
+msgid "%s is allowed only inside FILE TYPE."
+msgstr "%s sólo se permite dentro de FILE TYPE."
+
+#: src/language/command.c:642
+#, c-format
+msgid ""
+"%s is allowed only before the active file has been defined or inside INPUT "
+"PROGRAM."
+msgstr ""
+"%s sólo se permite antes que el archivo activo se ha definido, o dentro de "
+"INPUT PROGRAM."
+
+#: src/language/command.c:646
+#, c-format
+msgid ""
+"%s is allowed only before the active file has been defined or inside FILE "
+"TYPE."
+msgstr ""
+"%s sólo se permite antes que el archivo activo se ha definido, o dentro de "
+"FILE TYPE."
+
+#: src/language/command.c:650
+#, c-format
+msgid ""
+"%s is allowed only after the active file has been defined or inside INPUT "
+"PROGRAM."
+msgstr ""
+"%s sólo se permite después que el archivo activo se ha definido, o dentro de "
+"INPUT PROGRAM."
+
+#: src/language/command.c:654
+#, c-format
+msgid ""
+"%s is allowed only after the active file has been defined or inside FILE "
+"TYPE."
+msgstr ""
+"%s sólo se permite después que el archivo activo se ha definido, o dentro de "
+"FILE TYPE."
+
+#: src/language/command.c:658
+#, c-format
+msgid "%s is allowed only inside INPUT PROGRAM or inside FILE TYPE."
+msgstr "%s sólo se permite dentro de INPUT PROGRAM o FILE TYPE."
+
+#: src/language/command.c:664
+#, c-format
+msgid ""
+"%s is allowed only after the active file has been defined, inside INPUT "
+"PROGRAM, or inside FILE TYPE."
+msgstr ""
+"%s sólo se permite después que el archivo activo se ha definido, dentro de "
+"INPUT PROGRAM, o FILE TYPE."
+
+#: src/language/command.c:669
+#, c-format
+msgid ""
+"%s is allowed only before the active file has been defined, inside INPUT "
+"PROGRAM, or inside FILE TYPE."
+msgstr ""
+"%s sólo se permite antes que el archivo activo se ha definido, dentro de "
+"INPUT PROGRAM, o FILE TYPE."
+
+#: src/language/command.c:687 src/language/command.c:689
+#, fuzzy, c-format
+msgid "%s is not allowed inside %s."
+msgstr "%s no se permite dentro de FILE TYPE."
+
+#: src/language/command.c:768 src/language/command.c:876
+#: src/language/utilities/permissions.c:98
+msgid "This command not allowed when the SAFER option is set."
+msgstr "Esta orden no está permitida cuando la opción SAFER está activa."
+
+#: src/language/command.c:780
+#, c-format
+msgid "Error removing `%s': %s."
+msgstr "Error de eliminación de '%s' : %s."
+
+#: src/language/command.c:830
+#, c-format
+msgid "Couldn't fork: %s."
+msgstr "Imposible crear fork: %s."
+
+#: src/language/command.c:845
+msgid "Interactive shell not supported on this platform."
+msgstr "Intérprete de órdenes interactivo no disponible para esta plataforma."
+
+#: src/language/command.c:857
+msgid "Command shell not supported on this platform."
+msgstr "Intérprete de órdenes no disponible para esta plataforma."
+
+#: src/language/command.c:863
+#, c-format
+msgid "Error executing command: %s."
+msgstr "Error de ejecución del comando: %s."
+
+#: src/language/lexer/lexer.c:284
+#, c-format
+msgid "%s does not form a valid number."
+msgstr "%s no constituye un número vàlido."
+
+#: src/language/lexer/lexer.c:390
+#, c-format
+msgid "Bad character in input: `%s'."
+msgstr "Carácter erróneo en la entrada: `%s'."
+
+#: src/language/lexer/lexer.c:427
+#, c-format
+msgid "Subcommand %s may only be specified once."
+msgstr "Subcomando %s sólo se puede especificar una vez."
+
+#: src/language/lexer/lexer.c:435
+#, c-format
+msgid "missing required subcommand %s"
+msgstr "suborden requerida %s ausente"
+
+#: src/language/lexer/lexer.c:464
+#, c-format
+msgid "Syntax error %s at %s."
+msgstr "Error de sintaxis %s en %s."
+
+#: src/language/lexer/lexer.c:467
+#, c-format
+msgid "Syntax error at %s."
+msgstr "Error de sintaxis en %s."
+
+#: src/language/lexer/lexer.c:479 src/language/xforms/select-if.c:60
+#: src/language/stats/autorecode.c:144 src/language/data-io/print-space.c:73
+msgid "expecting end of command"
+msgstr "se espera el final de la orden"
+
+#: src/language/lexer/lexer.c:601 src/language/lexer/lexer.c:618
+#, c-format
+msgid "expecting `%s'"
+msgstr "esperando '%s'"
+
+#: src/language/lexer/lexer.c:632
+msgid "expecting string"
+msgstr "esperando cadena"
+
+#: src/language/lexer/lexer.c:646
+msgid "expecting integer"
+msgstr "esperando entero"
+
+#: src/language/lexer/lexer.c:659
+msgid "expecting number"
+msgstr "esperando número"
+
+#: src/language/lexer/lexer.c:671
+msgid "expecting identifier"
+msgstr "esperando identificador"
+
+#: src/language/lexer/lexer.c:1065
+msgid "binary"
+msgstr "binario"
+
+#: src/language/lexer/lexer.c:1070
+msgid "octal"
+msgstr "octal"
+
+#: src/language/lexer/lexer.c:1075
+msgid "hex"
+msgstr "hexadecimal"
+
+#: src/language/lexer/lexer.c:1085
+#, c-format
+msgid "String of %s digits has %zu characters, which is not a multiple of %d."
+msgstr ""
+"La cadena de %s dígitos tiene %zu caracteres, que no es un múltiplo de %d."
+
+#: src/language/lexer/lexer.c:1114
+#, c-format
+msgid "`%c' is not a valid %s digit."
+msgstr "'%c' no es un dígito %s válido."
+
+#: src/language/lexer/lexer.c:1148
+msgid "Unterminated string constant."
+msgstr "Constante de cadena inacabada."
+
+#: src/language/lexer/lexer.c:1202
+msgid "Unexpected end of file in string concatenation."
+msgstr "Final de archivo inesperado en la concatenación de cadenas."
+
+#: src/language/lexer/lexer.c:1210
+msgid "String expected following `+'."
+msgstr "Se espera una cadena seguida de `+'."
+
+#: src/language/lexer/lexer.c:1223
+#, c-format
+msgid "String exceeds 255 characters in length (%zu characters)."
+msgstr "La cadena supera los 255 carácteres de longitud (%zu carácteres)."
+
+#: src/language/lexer/format-parser.c:88
+msgid "expecting valid format specifier"
+msgstr "esperando especificador de formato válido"
+
+#: src/language/lexer/format-parser.c:107
+#: src/language/lexer/format-parser.c:126
+#: src/language/data-io/placement-parser.c:226
+#, c-format
+msgid "Unknown format type \"%s\"."
+msgstr "Tipo de formato \"%s\" desconocido."
+
+#: src/language/lexer/format-parser.c:121
+msgid "expecting format type"
+msgstr "esperando el tipo de formato"
+
+#: src/language/lexer/value-parser.c:60
+#, c-format
+msgid ""
+"Low end of range (%g) is below high end (%g).  The range will be treated as "
+"reversed."
+msgstr ""
+"El límite inferior del intervalo (%g) está por debajo del límite superior (%"
+"g). El intervalo será invertido."
+
+#: src/language/lexer/value-parser.c:68
+#, c-format
+msgid "Ends of range are equal (%g)."
+msgstr "Los límites del intervalo son iguales (%g)."
+
+#: src/language/lexer/value-parser.c:76
+msgid "LO or LOWEST must be part of a range."
+msgstr "LO o LOWEST tienen que ser parte del intervalo."
+
+#: src/language/lexer/value-parser.c:109
+msgid "System-missing value is not valid here."
+msgstr "Valor perdido del sistema no es válido aquí."
+
+#: src/language/lexer/value-parser.c:117
+msgid "expecting number or data string"
+msgstr "esperando nombre o cadena de datos"
+
+#: src/language/lexer/variable-parser.c:65
+msgid "expecting variable name"
+msgstr "esperando nombre de la variable"
+
+#: src/language/lexer/variable-parser.c:75
+#, c-format
+msgid "%s is not a variable name."
+msgstr "%s no es un nombre de variable."
+
+#: src/language/lexer/variable-parser.c:178
+#, c-format
+msgid ""
+"%s is not a numeric variable.  It will not be included in the variable list."
+msgstr ""
+"%s no es una variable numérica. No será incluida en la lista de variables."
+
+#: src/language/lexer/variable-parser.c:181
+#, c-format
+msgid ""
+"%s is not a string variable.  It will not be included in the variable list."
+msgstr ""
+"%s no es una variable de cadena. No será incluida en la lista de variables."
+
+#: src/language/lexer/variable-parser.c:185
+#, c-format
+msgid "Scratch variables (such as %s) are not allowed here."
+msgstr "Las variables de trabajol  (como %s) no están permitidas aquí."
+
+#: src/language/lexer/variable-parser.c:189
+#, c-format
+msgid ""
+"%s and %s are not the same type.  All variables in this variable list must "
+"be of the same type.  %s will be omitted from the list."
+msgstr ""
+"%s y %s no son del mismo tipo. Todas las variables de esta lista tienen que "
+"ser del mismo tipo. %s será omitida de la lista."
+
+#: src/language/lexer/variable-parser.c:195
+#, c-format
+msgid ""
+"%s and %s are string variables with different widths.  All variables in this "
+"variable list must have the same width.  %s will be omitted from the list."
+msgstr ""
+"%s y %s son variables de cadena con tamaños diferentes. Todas las variables "
+"de esta lista deben tener el mismo tamaño. %s será omitida de la lista."
+
+#: src/language/lexer/variable-parser.c:200
+#: src/language/lexer/variable-parser.c:496
+#, c-format
+msgid "Variable %s appears twice in variable list."
+msgstr "La variable %s aparece dos veces en la lista de variables."
+
+#: src/language/lexer/variable-parser.c:313
+#, c-format
+msgid "%s TO %s is not valid syntax since %s precedes %s in the dictionary."
+msgstr ""
+"%s TO %s no es una sintaxis válida debido a que %s precede %s en el "
+"diccionario."
+
+#: src/language/lexer/variable-parser.c:321
+#, c-format
+msgid ""
+"When using the TO keyword to specify several variables, both variables must "
+"be from the same variable dictionaries, of either ordinary, scratch, or "
+"system variables.  %s is a %s variable, whereas %s is %s."
+msgstr ""
+"Cuando se utiliza la palabra clave TO para especificar diversas variables, "
+"ambas tienen que ser del mismo diccionario de variables, ya sean ordinales, "
+"scratch, o variables de sistema. %s es una variable %s, debido a que %s es %"
+"s."
+
+#: src/language/lexer/variable-parser.c:395
+msgid "incorrect use of TO convention"
+msgstr "uso incorrecto de la convención TO"
+
+#: src/language/lexer/variable-parser.c:450
+msgid "Scratch variables not allowed here."
+msgstr "Las variables de trabajo no están permitidas aquí."
+
+#: src/language/lexer/variable-parser.c:472
+msgid "Prefixes don't match in use of TO convention."
+msgstr "Los prefijos no coinciden en el uso de la convención TO."
+
+#: src/language/lexer/variable-parser.c:477
+msgid "Bad bounds in use of TO convention."
+msgstr "Límites incorrectos en el uso de la convención TO."
+
+#: src/language/xforms/compute.c:149 src/language/xforms/compute.c:203
+#, c-format
+msgid ""
+"When executing COMPUTE: SYSMIS is not a valid value as an index into vector %"
+"s."
+msgstr ""
+"Cuando se ejecuta COMPUTE: SYSMIS no es un valor válido como índice en el "
+"vector %s."
+
+#: src/language/xforms/compute.c:153 src/language/xforms/compute.c:210
+#, c-format
+msgid ""
+"When executing COMPUTE: %g is not a valid value as an index into vector %s."
+msgstr ""
+"Cuando se ejecuta COMPUTE: %g no es un valor válid como índice en el vector %"
+"s."
+
+#: src/language/xforms/compute.c:353
+#, c-format
+msgid "There is no vector named %s."
+msgstr "No hay ningún vector llamado %s."
+
+#: src/language/xforms/count.c:123
+msgid "Destination cannot be a string variable."
+msgstr "El destino no puede ser una variable de cadena."
+
+#: src/language/xforms/sample.c:76
+msgid "The sampling factor must be between 0 and 1 exclusive."
+msgstr "El factor de mostreo tiene que estar exclusivamente entre 0 y 1."
+
+#: src/language/xforms/sample.c:96
+#, c-format
+msgid "Cannot sample %d observations from a population of %d."
+msgstr ""
+"No se puede hacer una muestra de %d observaciones de una población de %d."
+
+#: src/language/xforms/recode.c:248
+msgid ""
+"Inconsistent target variable types.  Target variables must be all numeric or "
+"all string."
+msgstr ""
+"Tipo inconsistente de variables objetivo.  Las variables objetivo tienen que "
+"ser todas, o bien de cadena o bien numéricas."
+
+#: src/language/xforms/recode.c:269
+msgid "CONVERT requires string input values and numeric output values."
+msgstr ""
+"CONVERT requiere valores de entrada de cadena y valores de salida numéricos."
+
+#: src/language/xforms/recode.c:324
+msgid "THRU is not allowed with string variables."
+msgstr "THRU no es permitido con variables de cadena."
+
+#: src/language/xforms/recode.c:403
+msgid "expecting output value"
+msgstr "esperando el valor de salida"
+
+#: src/language/xforms/recode.c:460
+#, c-format
+msgid ""
+"%zu variable(s) cannot be recoded into %zu variable(s).  Specify the same "
+"number of variables as source and target variables."
+msgstr ""
+"%zu variable(s) no pueden ser recodificadas en %zu variable(s).  Especifique "
+"el mismo número de variables como origen y destino."
+
+#: src/language/xforms/recode.c:475
+#, c-format
+msgid ""
+"There is no variable named %s.  (All string variables specified on INTO must "
+"already exist.  Use the STRING command to create a string variable.)"
+msgstr ""
+"No existe ninguna variable llamada %s. (Todas las variables de cadena "
+"especificadas en INTO tienen que existir. Utilice el comando STRING para "
+"crear una variable de cadena.)"
+
+#: src/language/xforms/recode.c:491
+#, c-format
+msgid "INTO is required with %s input values and %s output values."
+msgstr "INTO es necesario con %s valores de entrada y %s valores de salida."
+
+#: src/language/xforms/recode.c:504
+#, c-format
+msgid "Type mismatch.  Cannot store %s data in %s variable %s."
+msgstr "Desajuste de tipo. No se puede almacenar %s datos en %s variable %s."
+
+#: src/language/xforms/select-if.c:100
+msgid "Syntax error expecting OFF or BY.  Turning off case filtering."
+msgstr ""
+"Error de sintaxis esperando OFF o BY. Desactivando el filtraje de casos."
+
+#: src/language/xforms/select-if.c:115
+msgid "The filter variable must be numeric."
+msgstr "La variable de filtro tiene que ser numérica."
+
+#: src/language/xforms/select-if.c:121
+msgid "The filter variable may not be scratch."
+msgstr "La variable de filtro no puede ser cero."
+
+#: src/language/control/control-stack.c:27
+#, c-format
+msgid "%s without %s."
+msgstr "%s sin %s."
+
+#: src/language/control/control-stack.c:55
+#, c-format
+msgid "This command must appear inside %s...%s, without intermediate %s...%s."
+msgstr ""
+"Esta orden tiene que aparecer dentro de %s...%s, sin intermediarios %s...%s."
+
+#: src/language/control/control-stack.c:72
+#, c-format
+msgid "This command cannot appear outside %s...%s."
+msgstr "Este comando no puede aparecer fuera de %s...%s."
+
+#: src/language/control/do-if.c:177
+msgid "This command may not follow ELSE in DO IF...END IF."
+msgstr "Este comando no puede seguir ELSE en DO IF...END IF."
+
+#: src/language/control/loop.c:214
+msgid "Only one index clause may be specified."
+msgstr "Únicamente puede ser especificada una cláusula del índice."
+
+#: src/language/control/temporary.c:46
+msgid ""
+"This command may only appear once between procedures and procedure-like "
+"commands."
+msgstr ""
+"Esta orden únicamente puede aparecer una vez entre las órdenes de "
+"procedimientos y casi-procedimientos."
+
+#: src/language/control/repeat.c:172
+#, c-format
+msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
+msgstr ""
+"El nombre de la variable ficticia \"%s\" oculta la variable de diccionario "
+"\"%s\"."
+
+#: src/language/control/repeat.c:177
+#, c-format
+msgid "Dummy variable name \"%s\" is given twice."
+msgstr "El nombre de la variable ficticia \"%s\" se da dos veces."
+
+#: src/language/control/repeat.c:223
+#, c-format
+msgid ""
+"Dummy variable \"%.*s\" had %d substitutions, so \"%.*s\" must also, but %d "
+"were specified."
+msgstr ""
+"Una variable ficticia \"%.*s\" tiene %d substituciones, de forma tal que \"%."
+"*s\" también tendría que tenerlas, pero se especificaron %d."
+
+# recursivamente? recurridamente? repetidamente?
+#: src/language/control/repeat.c:335
+msgid "DO REPEAT may not nest in compatibility mode."
+msgstr "DO REPEAT no puede usarse recursivamente en modo compatibilidad."
+
+#: src/language/control/repeat.c:437
+msgid "Ranges may only have integer bounds"
+msgstr "Los intervalos únicamente pueden tener límites enteros"
+
+#: src/language/control/repeat.c:446
+#, c-format
+msgid "%g TO %g is an invalid range."
+msgstr "%g TO %g es un intervalo inválido."
+
+#: src/language/control/repeat.c:481
+msgid "String expected."
+msgstr "Cadena esperada."
+
+#: src/language/control/repeat.c:500
+msgid "No matching DO REPEAT."
+msgstr "DO REPEAT no coincide."
+
+#: src/language/dictionary/attributes.c:108
+msgid "Attribute array index must be between 1 and 65535."
+msgstr "El índice de la tabla de atributos tiene que estar entre 1 y 65535."
+
+#: src/language/dictionary/attributes.c:189
+msgid "expecting ATTRIBUTE= or DELETE="
+msgstr "esperando ATTRIBUTE= o DELETE="
+
+#: src/language/dictionary/apply-dictionary.c:75
+#, c-format
+msgid "Variable %s is %s in target file, but %s in source file."
+msgstr ""
+"La variable %s es %s en el archivo de destino, pero %s en el archivo de "
+"origen."
+
+#: src/language/dictionary/apply-dictionary.c:115
+msgid "No matching variables found between the source and target files."
+msgstr ""
+"No se han encontrado coincidencias de variables entre los archivos de origen "
+"y de destino."
+
+#: src/language/dictionary/delete-variables.c:40
+msgid ""
+"DELETE VARIABLES may not be used after TEMPORARY.  Temporary transformations "
+"will be made permanent."
+msgstr ""
+"DELETE VARIABLES no puede ser utilizado después de TEMPORARY. Las "
+"transformaciones temporales serán permanentes."
+
+#: src/language/dictionary/delete-variables.c:48
+msgid ""
+"DELETE VARIABLES may not be used to delete all variables from the active "
+"file dictionary.  Use NEW FILE instead."
+msgstr ""
+"DELETE VARIABLES no puede ser utilizado para borrar todas las variables del "
+"archivo de diccionario activo. Utilizar NEW FILE en su lugar."
+
+#: src/language/dictionary/formats.c:90
+msgid "`(' expected after variable list."
+msgstr "`(' esperado después de la lista de variables."
+
+#: src/language/dictionary/formats.c:100 src/language/dictionary/numeric.c:74
+msgid "`)' expected after output format."
+msgstr "`)' esperado después del formato de resultados."
+
+#: src/language/dictionary/missing-values.c:56
+#: src/language/stats/aggregate.c:459
+msgid "expecting `('"
+msgstr "esperando `('"
+
+#: src/language/dictionary/missing-values.c:72
+#, c-format
+msgid ""
+"Cannot mix numeric variables (e.g. %s) and string variables (e.g. %s) within "
+"a single list."
+msgstr ""
+"No se pueden mezclar las variables numéricas (e.g. %s) y las variables de "
+"cadena (e.g. %s) dentro de una lista única."
+
+#: src/language/dictionary/missing-values.c:116
+#, c-format
+msgid "Truncating missing value to maximum acceptable length (%d bytes)."
+msgstr "Truncando el valor perdido a la longitud máxima aceptable (%d bytes)."
+
+#: src/language/dictionary/missing-values.c:138
+#, c-format
+msgid "Missing values provided are too long to assign to variable of width %d."
+msgstr ""
+"Los valores perdidos proporcionados son demasiado largos para asignar a una "
+"variable de ancho %d."
+
+#: src/language/dictionary/modify-variables.c:92
+msgid ""
+"MODIFY VARS may not be used after TEMPORARY.  Temporary transformations will "
+"be made permanent."
+msgstr ""
+"MODIFY VARS no puede ser utilizado después de TEMPORARY. Las "
+"transformaciones temporales serán permanentes."
+
+#: src/language/dictionary/modify-variables.c:114
+#: src/language/dictionary/modify-variables.c:177
+#, fuzzy, c-format
+msgid "%s subcommand may be given at most once."
+msgstr "El subcomando RENAME puede ser utilizado únicamente una vez."
+
+#: src/language/dictionary/modify-variables.c:137
+msgid "Cannot specify ALL after specifying a set of variables."
+msgstr ""
+"No se puede especificar ALL después de la especificación de un conjunto de "
+"variables."
+
+#: src/language/dictionary/modify-variables.c:147
+#: src/language/dictionary/modify-variables.c:190
+#, fuzzy, c-format
+msgid "`(' expected on %s subcommand."
+msgstr "`(' esperado en subcomando RENAME."
+
+#: src/language/dictionary/modify-variables.c:159
+msgid "`)' expected following variable names on REORDER subcommand."
+msgstr ""
+"`)' se esperaba seguido de los nombres de la variable en el subcomando "
+"REORDER."
+
+#: src/language/dictionary/modify-variables.c:199
+msgid ""
+"`=' expected between lists of new and old variable names on RENAME "
+"subcommand."
+msgstr ""
+"`=' esperado entre las listas de nombres de variables nuevas y viejas en el "
+"subcomando RENAME."
+
+#: src/language/dictionary/modify-variables.c:208
+#: src/language/dictionary/rename-variables.c:77
+#, c-format
+msgid ""
+"Differing number of variables in old name list (%zu) and in new name list (%"
+"zu)."
+msgstr ""
+"Diferente número de variables en la lista de nombres antigua (%zu) y en la "
+"lista de nombres nueva (%zu)."
+
+#: src/language/dictionary/modify-variables.c:219
+msgid "`)' expected after variable lists on RENAME subcommand."
+msgstr ""
+"`)' esperado después de las listas de variables en el subcomando RENAME."
+
+#: src/language/dictionary/modify-variables.c:233
+msgid ""
+"KEEP subcommand may be given at most once.  It may not be given in "
+"conjunction with the DROP subcommand."
+msgstr ""
+"El subcomando KEEP puede ser emitido más de una vez. Puede ser que no sea "
+"facilitado en relación con el subcomando DROP."
+
+#: src/language/dictionary/modify-variables.c:276
+msgid ""
+"DROP subcommand may be given at most once.  It may not be given in "
+"conjunction with the KEEP subcommand."
+msgstr ""
+"El subcomando DROP puede ser utilizado únicamente una vez. No puede ser "
+"utilizado juntamente con el subcomando KEEP."
+
+#: src/language/dictionary/modify-variables.c:302
+#, c-format
+msgid "Unrecognized subcommand name `%s'."
+msgstr "Nombre del subcomando no reconocido '%s'."
+
+#: src/language/dictionary/modify-variables.c:304
+msgid "Subcommand name expected."
+msgstr "Nombre del subcomando esperado."
+
+#: src/language/dictionary/modify-variables.c:312
+msgid "`/' or `.' expected."
+msgstr "'/' o '.' esperado."
+
+#: src/language/dictionary/mrsets.c:98
+#, c-format
+msgid ""
+"%s is not a valid name for a multiple response set.  Multiple response set "
+"names must begin with `$'."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:120
+#, c-format
+msgid ""
+"VARIABLES specified only variable %s on %s, but at least two variables are "
+"required."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:153
+msgid "Numeric VALUE must be an integer."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:207 src/language/dictionary/mrsets.c:213
+#: src/language/dictionary/mrsets.c:223
+#, c-format
+msgid "Required %s specification missing from %s subcommand."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:231 src/language/dictionary/mrsets.c:269
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies a string VALUE, but the variables "
+"specified for this group are numeric."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:255
+#, c-format
+msgid ""
+"VALUE string on MDGROUP subcommand for group %s is %d bytes long, but it "
+"must be no longer than the narrowest variable in the group, which is %s with "
+"a width of %d bytes."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:281
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies LABELSOURCE=VARLABEL but not "
+"CATEGORYLABELS=COUNTEDVALUES.  Ignoring LABELSOURCE."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:287
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies both LABEL and LABELSOURCE, but "
+"only one of these subcommands may be used at a time.  Ignoring LABELSOURCE."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:327
+#, c-format
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s have "
+"the same variable label.  Categories represented by these variables will not "
+"be distinguishable in output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:357
+#, c-format
+msgid ""
+"Variable %s specified as part of multiple dichotomy group %s (which has "
+"CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value.  "
+"This category will not be distinguishable in output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:370
+#, c-format
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s (which "
+"has CATEGORYLABELS=COUNTEDVALUES) have the same value label for the the "
+"group's counted value.  These categories will not be distinguishable in "
+"output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:427
+#, c-format
+msgid ""
+"Variables specified on MCGROUP should have the same categories, but %s and %"
+"s (and possibly others) in multiple category group %s have different value "
+"labels for value %s."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:484
+#, fuzzy, c-format
+msgid "No multiple response set named %s."
+msgstr "Ninguna función o vector nombrado %s."
+
+#: src/language/dictionary/mrsets.c:538
+#, fuzzy
+msgid "The active file dictionary does not contain any multiple response sets."
+msgstr "El diccionario del archivo activo no contiene ningún documento."
+
+#: src/language/dictionary/mrsets.c:548
+msgid "Multiple Response Sets"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:549 src/ui/gui/psppire-var-sheet.c:534
+#: src/ui/gui/psppire-var-store.c:832
+msgid "Name"
+msgstr "Nombre"
+
+#: src/language/dictionary/mrsets.c:550 src/ui/gui/variable-info.ui:8
+msgid "Variables"
+msgstr "Variables"
+
+#: src/language/dictionary/mrsets.c:551
+#, fuzzy
+msgid "Details"
+msgstr "Decimales"
+
+#: src/language/dictionary/mrsets.c:565
+msgid "Multiple dichotomy set"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:566
+msgid "Multiple category set"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:568
+#: src/language/dictionary/split-file.c:84
+#: src/language/dictionary/sys-file-info.c:344
+#: src/language/dictionary/sys-file-info.c:583
+#: src/ui/gui/psppire-var-sheet.c:538 src/ui/gui/psppire-var-store.c:836
+#: src/ui/gui/crosstabs.ui:292 src/ui/gui/psppire.ui:1924
+msgid "Label"
+msgstr "Etiqueta"
+
+#: src/language/dictionary/mrsets.c:572
+#, fuzzy
+msgid "Label source"
+msgstr "Etiqueta: %s\n"
+
+#: src/language/dictionary/mrsets.c:574
+#, fuzzy
+msgid "First variable label among variables"
+msgstr "Duplicar el nombre de la variable %s entre las variables de destino."
+
+#: src/language/dictionary/mrsets.c:575
+msgid "Provided by user"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:576
+#, fuzzy
+msgid "Counted value"
+msgstr "Copiar los valores anteriores"
+
+#: src/language/dictionary/mrsets.c:582
+msgid "Category label source"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:584
+#, fuzzy
+msgid "Variable labels"
+msgstr "Prefiero las etiquetas de variable"
+
+#: src/language/dictionary/mrsets.c:585
+msgid "Value labels of counted value"
+msgstr ""
+
+#: src/language/dictionary/numeric.c:67
+#, c-format
+msgid "Format type %s may not be used with a numeric variable."
+msgstr "Tipo de formato %s no puede ser utilizado con una variable numérica."
+
+#: src/language/dictionary/numeric.c:86 src/language/dictionary/numeric.c:155
+#, c-format
+msgid "There is already a variable named %s."
+msgstr "Ya existe una variable con nombre %s."
+
+#: src/language/dictionary/numeric.c:140
+#, c-format
+msgid "Format type %s may not be used with a string variable."
+msgstr "El tipo de formato %s no puede utilizarse con variable de cadena."
+
+#: src/language/dictionary/rename-variables.c:49
+msgid ""
+"RENAME VARS may not be used after TEMPORARY.  Temporary transformations will "
+"be made permanent."
+msgstr ""
+"RENAME VARS no puede ser utilizado después de TEMPORARY.  Las "
+"transformaciones temporales serán permanentes."
+
+#: src/language/dictionary/rename-variables.c:59
+msgid "`(' expected."
+msgstr "'(' esperado."
+
+#: src/language/dictionary/rename-variables.c:67
+msgid "`=' expected between lists of new and old variable names."
+msgstr "`=' esperado entre listas de nuevos y antiguos nombres de la variable."
+
+#: src/language/dictionary/rename-variables.c:88
+msgid "`)' expected after variable names."
+msgstr "`)' esperado después de los nombres de variables."
+
+#: src/language/dictionary/rename-variables.c:98
+#, c-format
+msgid "Renaming would duplicate variable name %s."
+msgstr "Cambiar el nombre duplicaría el nombre de la variable %s."
+
+#: src/language/dictionary/split-file.c:83
+#: src/language/dictionary/sys-file-info.c:429
+#: src/language/dictionary/sys-file-info.c:582
+#: src/language/stats/crosstabs.q:1214 src/language/stats/crosstabs.q:1241
+#: src/language/stats/crosstabs.q:1264 src/language/stats/crosstabs.q:1289
+#: src/language/stats/examine.q:1841 src/language/stats/frequencies.q:813
+#: src/language/stats/reliability.q:568 src/language/stats/reliability.q:579
+msgid "Value"
+msgstr "Valor"
+
+#: src/language/dictionary/sys-file-info.c:95
+msgid "File:"
+msgstr "Archivo:"
+
+#: src/language/dictionary/sys-file-info.c:97 src/ui/gui/psppire.ui:1862
+#: src/ui/gui/recode.ui:859
+msgid "Label:"
+msgstr "Etiqueta:"
+
+#: src/language/dictionary/sys-file-info.c:101
+msgid "No label."
+msgstr "Sin etiqueta."
+
+#: src/language/dictionary/sys-file-info.c:104
+msgid "Created:"
+msgstr "Creado:"
+
+#: src/language/dictionary/sys-file-info.c:107
+msgid "Integer Format:"
+msgstr "Formato Entero:"
+
+#: src/language/dictionary/sys-file-info.c:111
+#: src/language/dictionary/sys-file-info.c:119
+#: src/language/dictionary/sys-file-info.c:124
+#: src/language/dictionary/sys-file-info.c:143
+msgid "Unknown"
+msgstr "Desconocido"
+
+#: src/language/dictionary/sys-file-info.c:112
+msgid "Real Format:"
+msgstr "Formato Real:"
+
+#: src/language/dictionary/sys-file-info.c:114
+msgid "IEEE 754 LE."
+msgstr "IEEE 754 LE."
+
+#: src/language/dictionary/sys-file-info.c:115
+msgid "IEEE 754 BE."
+msgstr "IEE 754 BE."
+
+#: src/language/dictionary/sys-file-info.c:116
+msgid "VAX D."
+msgstr "VAX D."
+
+#: src/language/dictionary/sys-file-info.c:117
+msgid "VAX G."
+msgstr "VAX G."
+
+#: src/language/dictionary/sys-file-info.c:118
+msgid "IBM 390 Hex Long."
+msgstr "IBM 390 Hex Long."
+
+#: src/language/dictionary/sys-file-info.c:120 src/ui/gui/descriptives.ui:85
+#: src/ui/gui/factor.ui:173 src/ui/gui/recode.ui:960
+msgid "Variables:"
+msgstr "Variables:"
+
+#: src/language/dictionary/sys-file-info.c:122
+msgid "Cases:"
+msgstr "Casos:"
+
+#: src/language/dictionary/sys-file-info.c:127
+msgid "Type:"
+msgstr "Tipo:"
+
+#: src/language/dictionary/sys-file-info.c:128
+#: src/ui/gui/psppire-data-window.c:631
+msgid "System File"
+msgstr "Archivo de Sistema"
+
+#: src/language/dictionary/sys-file-info.c:129
+msgid "Weight:"
+msgstr "Peso:"
+
+#: src/language/dictionary/sys-file-info.c:134
+msgid "Not weighted."
+msgstr "No ponderado."
+
+#: src/language/dictionary/sys-file-info.c:136
+msgid "Mode:"
+msgstr "Modo:"
+
+#: src/language/dictionary/sys-file-info.c:138
+#, c-format
+msgid "Compression %s."
+msgstr "Compresión %s."
+
+#: src/language/dictionary/sys-file-info.c:138
+msgid "on"
+msgstr "activado"
+
+#: src/language/dictionary/sys-file-info.c:138
+msgid "off"
+msgstr "desactivado"
+
+#: src/language/dictionary/sys-file-info.c:141
+msgid "Charset:"
+msgstr "Conjunto de carácteres:"
+
+#: src/language/dictionary/sys-file-info.c:151
+#: src/language/dictionary/sys-file-info.c:344
+msgid "Description"
+msgstr "Descripción"
+
+#: src/language/dictionary/sys-file-info.c:152
+#: src/language/dictionary/sys-file-info.c:346
+#: src/language/dictionary/sys-file-info.c:663
+msgid "Position"
+msgstr "Posición"
+
+#: src/language/dictionary/sys-file-info.c:199
+msgid "The active file does not have a file label."
+msgstr "El archivo activo no tiene etiqueta de archivo."
+
+#: src/language/dictionary/sys-file-info.c:202
+msgid "File label:"
+msgstr "Etiqueta de archivo:"
+
+#: src/language/dictionary/sys-file-info.c:277
+msgid "No variables to display."
+msgstr "Ninguna variable para mostrar."
+
+#: src/language/dictionary/sys-file-info.c:291
+msgid "Macros not supported."
+msgstr "Macros no disponibles."
+
+#: src/language/dictionary/sys-file-info.c:300
+msgid "The active file dictionary does not contain any documents."
+msgstr "El diccionario del archivo activo no contiene ningún documento."
+
+#: src/language/dictionary/sys-file-info.c:308
+msgid "Documents in the active file:"
+msgstr "Documentos en el archivo activo:"
+
+#: src/language/dictionary/sys-file-info.c:428
+msgid "Attribute"
+msgstr "Atributo"
+
+#: src/language/dictionary/sys-file-info.c:484
+#, c-format
+msgid "Format: %s"
+msgstr "Formato: %s"
+
+#: src/language/dictionary/sys-file-info.c:491
+#, c-format
+msgid "Print Format: %s"
+msgstr "Formato de Impresión: %s"
+
+#: src/language/dictionary/sys-file-info.c:495
+#, c-format
+msgid "Write Format: %s"
+msgstr "Formato de Escritura: %s"
+
+#: src/language/dictionary/sys-file-info.c:508
+#, c-format
+msgid "Measure: %s"
+msgstr "Medida: %s"
+
+#: src/language/dictionary/sys-file-info.c:509
+#: src/ui/gui/psppire-var-sheet.c:111
+msgid "Nominal"
+msgstr "Nominal"
+
+#: src/language/dictionary/sys-file-info.c:510
+#: src/ui/gui/psppire-var-sheet.c:112
+msgid "Ordinal"
+msgstr "Ordinal"
+
+#: src/language/dictionary/sys-file-info.c:511
+#: src/ui/gui/psppire-var-sheet.c:113
+msgid "Scale"
+msgstr "Escala"
+
+#: src/language/dictionary/sys-file-info.c:514
+#, c-format
+msgid "Display Alignment: %s"
+msgstr "Alineación de la muestra: %s"
+
+#: src/language/dictionary/sys-file-info.c:515
+#: src/ui/gui/psppire-var-sheet.c:104
+msgid "Left"
+msgstr "Izquierda"
+
+#: src/language/dictionary/sys-file-info.c:516
+#: src/ui/gui/psppire-var-sheet.c:106
+msgid "Center"
+msgstr "Centro"
+
+#: src/language/dictionary/sys-file-info.c:517
+#: src/ui/gui/psppire-var-sheet.c:105
+msgid "Right"
+msgstr "Derecha"
+
+#: src/language/dictionary/sys-file-info.c:520
+#, c-format
+msgid "Display Width: %d"
+msgstr "Ancho de la muestra: %d"
+
+#: src/language/dictionary/sys-file-info.c:534
+msgid "Missing Values: "
+msgstr "Valores perdidos: "
+
+#: src/language/dictionary/sys-file-info.c:643
+msgid "No vectors defined."
+msgstr "Vectores no definidos."
+
+#: src/language/dictionary/sys-file-info.c:662
+msgid "Vector"
+msgstr "Vector"
+
+#: src/language/dictionary/sys-file-info.c:665
+msgid "Print Format"
+msgstr "Formato de Impresión"
+
+#: src/language/dictionary/value-labels.c:150
+msgid "Truncating value label to 60 characters."
+msgstr "Truncando etiqueta de valor a 60 caracteres."
+
+#: src/language/dictionary/variable-label.c:51
+msgid "String expected for variable label."
+msgstr "Se espera una cadena como etiqueta de variable."
+
+#: src/language/dictionary/variable-label.c:59
+msgid "Truncating variable label to 255 characters."
+msgstr "Truncando la etiqueta de variable a 255 caracteres."
+
+#: src/language/dictionary/vector.c:64
+#, c-format
+msgid "A vector named %s already exists."
+msgstr "Un vector llamado %s ya existe."
+
+#: src/language/dictionary/vector.c:72
+#, c-format
+msgid "Vector name %s is given twice."
+msgstr "El nombre del vector %s se da dos veces."
+
+#: src/language/dictionary/vector.c:96
+msgid "A slash must separate each vector specification in VECTOR's long form."
+msgstr ""
+"Una barra debe separar cada especificación de vector en la forma larga de "
+"VECTOR."
+
+#: src/language/dictionary/vector.c:129
+msgid "Vectors must have at least one element."
+msgstr "Los vectores deben tener al menos un elemento."
+
+#: src/language/dictionary/vector.c:150
+msgid "expecting vector length"
+msgstr "esperando longitud del vector"
+
+#: src/language/dictionary/vector.c:166
+#, c-format
+msgid "%s is too long for a variable name."
+msgstr "%s es demasiado largo para un nombre de variable."
+
+#: src/language/dictionary/vector.c:171
+#, c-format
+msgid "%s is an existing variable name."
+msgstr "%s es un nombre de variable existente."
+
+#: src/language/dictionary/variable-display.c:120
+msgid "Variable display width must be a positive integer."
+msgstr "El tamaño de la visualización de variable debe ser un entero positivo."
+
+#: src/language/dictionary/weight.c:49
+msgid "The weighting variable must be numeric."
+msgstr "La variable de ponderación debe ser numérica."
+
+#: src/language/dictionary/weight.c:54
+msgid "The weighting variable may not be scratch."
+msgstr "La variable de ponderación no puede ser cero."
+
+#: src/language/tests/float-format.c:124
+#, c-format
+msgid "%zu-byte string needed but %zu-byte string supplied."
+msgstr "Se necesita cadena de %zu-byte pero se han suministrado de %zu-byte."
+
+#: src/language/tests/float-format.c:136
+msgid "Hexadecimal floating constant too long."
+msgstr "Constante hexadecimal flotante demasiado larga."
+
+#: src/language/tests/float-format.c:201
+#, c-format
+msgid ""
+"%s conversion of %s from %s to %s should have produced %s but actually "
+"produced %s."
+msgstr ""
+"conversión %s de %s desde %s en %s debería haber producido %s pero "
+"actualmente ha producido %s."
+
+#: src/language/tests/float-format.c:247
+msgid "Too many values in single command."
+msgstr "Demasiados valores en un sólo comando."
+
+#: src/language/tests/moments-test.c:47
+msgid "expecting weight value"
+msgstr "esperando valor de ponderación"
+
+#: src/language/utilities/cd.c:41
+#, c-format
+msgid "Cannot change directory to %s:  %s "
+msgstr "No se puede cambiar el directorio para %s: %s"
+
+#: src/language/utilities/date.c:32
+msgid "Only USE ALL is currently implemented."
+msgstr "Sólo USE ALL se está aplicando actualmente."
+
+#: src/language/utilities/title.c:103
+#, c-format
+msgid "   (Entered %s)"
+msgstr "   (Introducido %s)"
+
+#: src/language/utilities/include.c:95
+msgid "Expecting BATCH or INTERACTIVE after SYNTAX."
+msgstr "Esperando BATCH o INTERACTIVE después de SYNTAX."
+
+#: src/language/utilities/include.c:112
+msgid "Expecting YES or NO after CD."
+msgstr "Esperando YES o NO después del CD."
+
+#: src/language/utilities/include.c:129
+msgid "Expecting CONTINUE or STOP after ERROR."
+msgstr "Esperando CONTINUE o bien STOP después del ERROR."
+
+#: src/language/utilities/include.c:136
+#, c-format
+msgid "Unexpected token: `%s'."
+msgstr "Testimonio inesperado: `%s'."
+
+#: src/language/utilities/include.c:181
+msgid "expecting file name"
+msgstr "esperando nombre de archivo"
+
+#: src/language/utilities/include.c:193
+#, c-format
+msgid "Can't find `%s' in include file search path."
+msgstr ""
+"No se puede encontrar `%s' en la ruta de búsqueda del archivo de inclusión."
+
+#: src/language/utilities/include.c:201
+#, c-format
+msgid "Unable to open `%s': %s."
+msgstr "No se puede abrir `%s': %s."
+
+#: src/language/utilities/permissions.c:73
+#, c-format
+msgid "Expecting %s or %s."
+msgstr "Esperando %s o bien %s."
+
+#: src/language/utilities/permissions.c:106
+#, c-format
+msgid "Cannot stat %s: %s"
+msgstr "No se puede decir que %s: %s"
+
+#: src/language/utilities/permissions.c:119
+#, c-format
+msgid "Cannot change mode of %s: %s"
+msgstr "No se puede cambiar el modo de %s: %s"
+
+#: src/language/stats/aggregate.c:220
+msgid "while expecting COLUMNWISE"
+msgstr "mientras tanto esperando COLUMNWISE"
+
+#: src/language/stats/aggregate.c:247
+msgid "expecting BREAK"
+msgstr "esperando BREAK"
+
+#: src/language/stats/aggregate.c:252
+msgid ""
+"When PRESORTED is specified, specifying sorting directions with (A) or (D) "
+"has no effect.  Output data will be sorted the same way as the input data."
+msgstr ""
+"Cuando se especifica PRESORTED, dar directivas de ordenación con (A) o (D) "
+"no tiene efecto. Los datos de salida serán ordenados de la misma manera que "
+"los de entrada."
+
+#: src/language/stats/aggregate.c:424
+msgid "expecting aggregation function"
+msgstr "esperando una función agregadora"
+
+#: src/language/stats/aggregate.c:442
+#, c-format
+msgid "Unknown aggregation function %s."
+msgstr "Función agregadora desconocida %s."
+
+#: src/language/stats/aggregate.c:498
+#, c-format
+msgid "Missing argument %zu to %s."
+msgstr "Argumento perdido %zu para %s."
+
+#: src/language/stats/aggregate.c:507
+#, c-format
+msgid "Arguments to %s must be of same type as source variables."
+msgstr ""
+"Los argumentos para %s deben ser del mismo tipo que las variables de origen."
+
+#: src/language/stats/aggregate.c:517 src/language/expressions/parse.c:885
+msgid "expecting `)'"
+msgstr "esperando ')'"
+
+#: src/language/stats/aggregate.c:529
+#, c-format
+msgid ""
+"Number of source variables (%zu) does not match number of target variables (%"
+"zu)."
+msgstr ""
+"Número de variables de origen (%zu) no coincide con el número de variables "
+"de destino (%zu)."
+
+#: src/language/stats/aggregate.c:545
+#, c-format
+msgid ""
+"The value arguments passed to the %s function are out-of-order.  They will "
+"be treated as if they had been specified in the correct order."
+msgstr ""
+"El valor de los argumentos pasados en la función %s están fuera de orden. "
+"Serán tratatos como si hubieran sido especificados en el orden correcto."
+
+#: src/language/stats/aggregate.c:615
+#, c-format
+msgid ""
+"Variable name %s is not unique within the aggregate file dictionary, which "
+"contains the aggregate variables and the break variables."
+msgstr ""
+"El nombre de variable %s no es único dentro del archivo de diccionario "
+"agregado, que contiene las variables agregadas y las variables de corte."
+
+#: src/language/stats/autorecode.c:116
+#, c-format
+msgid "Source variable count (%zu) does not match target variable count (%zu)."
+msgstr ""
+"El recuento de la variable de origen (%zu) no coincide con el recuento de la "
+"variable de destino (%zu)."
+
+#: src/language/stats/autorecode.c:128
+#, c-format
+msgid "Target variable %s duplicates existing variable %s."
+msgstr "Variable de destino %s duplica una variable existente %s."
+
+#: src/language/stats/binomial.c:141
+#, c-format
+msgid "Variable %s is not dichotomous"
+msgstr "La variable %s no es dicotómica"
+
+#: src/language/stats/binomial.c:192 src/ui/gui/binomial.ui:13
+msgid "Binomial Test"
+msgstr "Prueba Binomial"
+
+#: src/language/stats/binomial.c:222
+msgid "Group1"
+msgstr "Grupo 1"
+
+#: src/language/stats/binomial.c:223
+msgid "Group2"
+msgstr "Grupo 2"
+
+#: src/language/stats/binomial.c:224 src/language/stats/chisquare.c:177
+#: src/language/stats/chisquare.c:236 src/language/stats/factor.c:1462
+#: src/language/stats/sign.c:92 src/language/stats/wilcoxon.c:260
+#: src/ui/gui/crosstabs-dialog.c:60 src/language/stats/crosstabs.q:823
+#: src/language/stats/crosstabs.q:1151 src/language/stats/crosstabs.q:1528
+#: src/language/stats/examine.q:1105 src/language/stats/frequencies.q:871
+#: src/language/stats/oneway.q:302 src/language/stats/oneway.q:472
+#: src/language/stats/regression.q:291 src/language/stats/reliability.q:702
+msgid "Total"
+msgstr "Total"
+
+#: src/language/stats/binomial.c:257 src/language/stats/chisquare.c:199
+#: src/language/stats/crosstabs.q:1239 src/language/stats/crosstabs.q:1286
+msgid "Category"
+msgstr "Categoría"
+
+#: src/language/stats/binomial.c:258 src/language/stats/correlations.c:119
+#: src/language/stats/correlations.c:227 src/language/stats/npar-summary.c:122
+#: src/language/stats/sign.c:72 src/language/stats/wilcoxon.c:243
+#: src/language/stats/crosstabs.q:830 src/language/stats/examine.q:1176
+#: src/language/stats/frequencies.q:1034 src/language/stats/oneway.q:385
+#: src/language/stats/reliability.q:705 src/language/stats/t-test.q:505
+#: src/language/stats/t-test.q:525 src/language/stats/t-test.q:625
+#: src/language/stats/t-test.q:1101
+msgid "N"
+msgstr "N"
+
+#: src/language/stats/binomial.c:259
+msgid "Observed Prop."
+msgstr "Prop. Observada"
+
+#: src/language/stats/binomial.c:260
+msgid "Test Prop."
+msgstr "Prop. Test"
+
+#: src/language/stats/binomial.c:263
+#, c-format
+msgid "Exact Sig. (%d-tailed)"
+msgstr "Sig. Exact.(%d-tailed)"
+
+#: src/language/stats/chisquare.c:150
+#, c-format
+msgid ""
+"CHISQUARE test specified %d expected values, but %d distinct values were "
+"encountered in variable %s."
+msgstr ""
+"Prueba CHISQUARE especifica %d valores esperados, pero %d diferentes valores "
+"se encontraron la variable %s."
+
+#: src/language/stats/chisquare.c:161 src/language/stats/chisquare.c:200
+msgid "Observed N"
+msgstr "N observado"
+
+#: src/language/stats/chisquare.c:162 src/language/stats/chisquare.c:201
+msgid "Expected N"
+msgstr "N esperado"
+
+#: src/language/stats/chisquare.c:163 src/language/stats/chisquare.c:202
+#: src/ui/gui/crosstabs-dialog.c:62 src/language/stats/regression.q:290
+msgid "Residual"
+msgstr "Residual"
+
+#: src/language/stats/chisquare.c:195 src/language/stats/sign.c:60
+#: src/ui/gui/frequencies.ui:9 src/ui/gui/frequencies.ui:669
+msgid "Frequencies"
+msgstr "Frecuencias"
+
+#: src/language/stats/chisquare.c:249 src/language/stats/sign.c:111
+#: src/language/stats/wilcoxon.c:309
+msgid "Test Statistics"
+msgstr "Pruebas Estadísticas"
+
+#: src/language/stats/chisquare.c:263
+msgid "Chi-Square"
+msgstr "Chi-cuadrado"
+
+#: src/language/stats/chisquare.c:264 src/language/stats/crosstabs.q:1215
+#: src/language/stats/oneway.q:275 src/language/stats/oneway.q:685
+#: src/language/stats/regression.q:284 src/language/stats/t-test.q:752
+#: src/language/stats/t-test.q:923 src/language/stats/t-test.q:1010
+msgid "df"
+msgstr "df"
+
+#: src/language/stats/chisquare.c:265
+msgid "Asymp. Sig."
+msgstr "Sign. Asint."
+
+#: src/language/stats/correlations.c:96 src/language/stats/factor.c:1720
+#: src/language/stats/npar-summary.c:108
+msgid "Descriptive Statistics"
+msgstr "Estadísticos Descriptivos"
+
+#: src/language/stats/correlations.c:117 src/language/stats/descriptives.c:101
+#: src/language/stats/factor.c:1741 src/language/stats/npar-summary.c:125
+#: src/ui/gui/descriptives-dialog.c:40 src/ui/gui/frequencies-dialog.c:41
+#: src/language/stats/examine.q:1444 src/language/stats/frequencies.q:105
+#: src/language/stats/oneway.q:386 src/language/stats/t-test.q:506
+#: src/language/stats/t-test.q:526 src/language/stats/t-test.q:624
+#: src/language/stats/t-test.q:917
+msgid "Mean"
+msgstr "Media"
+
+#: src/language/stats/correlations.c:118 src/language/stats/factor.c:1742
+#: src/language/stats/npar-summary.c:128 src/language/stats/examine.q:1479
+#: src/language/stats/oneway.q:387 src/language/stats/t-test.q:507
+#: src/language/stats/t-test.q:527 src/language/stats/t-test.q:626
+#: src/language/stats/t-test.q:918
+msgid "Std. Deviation"
+msgstr "Desviación Estándar"
+
+#: src/language/stats/correlations.c:190 src/language/stats/factor.c:1620
+#, fuzzy
+msgid "Correlations"
+msgstr "Correlación"
+
+#: src/language/stats/correlations.c:216
+#, fuzzy
+msgid "Pearson Correlation"
+msgstr "Correlación de Spearman"
+
+#: src/language/stats/correlations.c:218 src/language/stats/oneway.q:686
+#: src/language/stats/t-test.q:753 src/language/stats/t-test.q:924
+#: src/language/stats/t-test.q:1011
+msgid "Sig. (2-tailed)"
+msgstr "Sign. (2-colas)"
+
+#: src/language/stats/correlations.c:218
+#, fuzzy
+msgid "Sig. (1-tailed)"
+msgstr "Sign. (2-colas)"
+
+#: src/language/stats/correlations.c:222
+msgid "Cross-products"
+msgstr ""
+
+#: src/language/stats/correlations.c:223
+#, fuzzy
+msgid "Covariance"
+msgstr "Covarianza"
+
+#: src/language/stats/correlations.c:454 src/language/stats/descriptives.c:361
+#: src/language/data-io/list.q:91
+msgid "No variables specified."
+msgstr "Variables no especificadas."
+
+#: src/language/stats/descriptives.c:102 src/language/stats/frequencies.q:106
+#: src/language/stats/t-test.q:508 src/language/stats/t-test.q:528
+#: src/language/stats/t-test.q:627
+msgid "S.E. Mean"
+msgstr "Err.Est.Media"
+
+#: src/language/stats/descriptives.c:103 src/language/stats/frequencies.q:109
+msgid "Std Dev"
+msgstr "Desv Std"
+
+#: src/language/stats/descriptives.c:104 src/ui/gui/descriptives-dialog.c:47
+#: src/ui/gui/frequencies-dialog.c:46 src/language/stats/examine.q:1474
+#: src/language/stats/frequencies.q:110
+msgid "Variance"
+msgstr "Varianza"
+
+#: src/language/stats/descriptives.c:105 src/ui/gui/descriptives-dialog.c:48
+#: src/ui/gui/frequencies-dialog.c:51 src/language/stats/examine.q:1510
+#: src/language/stats/frequencies.q:111
+msgid "Kurtosis"
+msgstr "Curtosis"
+
+#: src/language/stats/descriptives.c:106 src/language/stats/frequencies.q:112
+msgid "S.E. Kurt"
+msgstr "Err.Est.Curt."
+
+#: src/language/stats/descriptives.c:107 src/ui/gui/descriptives-dialog.c:49
+#: src/ui/gui/frequencies-dialog.c:47 src/language/stats/examine.q:1505
+#: src/language/stats/frequencies.q:113
+msgid "Skewness"
+msgstr "Asimetría"
+
+#: src/language/stats/descriptives.c:108 src/language/stats/frequencies.q:114
+msgid "S.E. Skew"
+msgstr "Err.Est.Asim."
+
+#: src/language/stats/descriptives.c:109 src/ui/gui/descriptives-dialog.c:44
+#: src/ui/gui/frequencies-dialog.c:49 src/language/stats/examine.q:1494
+#: src/language/stats/frequencies.q:115
+msgid "Range"
+msgstr "Intervalo"
+
+#: src/language/stats/descriptives.c:110 src/language/stats/npar-summary.c:131
+#: src/ui/gui/descriptives-dialog.c:42 src/ui/gui/frequencies-dialog.c:43
+#: src/language/stats/examine.q:1484 src/language/stats/frequencies.q:116
+#: src/language/stats/oneway.q:400
+msgid "Minimum"
+msgstr "Mínimo"
+
+#: src/language/stats/descriptives.c:111 src/language/stats/npar-summary.c:134
+#: src/ui/gui/descriptives-dialog.c:43 src/ui/gui/frequencies-dialog.c:44
+#: src/language/stats/examine.q:1489 src/language/stats/frequencies.q:117
+#: src/language/stats/oneway.q:401
+msgid "Maximum"
+msgstr "Máximo"
+
+#: src/language/stats/descriptives.c:112 src/ui/gui/descriptives-dialog.c:45
+#: src/ui/gui/frequencies-dialog.c:54 src/language/stats/frequencies.q:118
+msgid "Sum"
+msgstr "Suma"
+
+#: src/language/stats/descriptives.c:343
+#, c-format
+msgid "Z-score variable name %s would be a duplicate variable name."
+msgstr "el nombre de variable Z %s sería un nombre de variable duplicado."
+
+#: src/language/stats/descriptives.c:450
+msgid "expecting statistic name: reverting to default"
+msgstr "esperando nombre del estadístico: vuelve a aplicar el defecto"
+
+#: src/language/stats/descriptives.c:523
+msgid ""
+"Ran out of generic names for Z-score variables.  There are only 126 generic "
+"names: ZSC001-ZSC0999, STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09."
+msgstr ""
+"Se han agotado los nombres genéricos para las variables Z.  Sólo hay 126 "
+"nombres genéricos: ZSC001-ZSC0999, STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-"
+"ZQZQ09."
+
+#: src/language/stats/descriptives.c:555
+msgid "Mapping of variables to corresponding Z-scores."
+msgstr "Convirtiendo variables a las puntuaciones-Z correspondientes."
+
+#: src/language/stats/descriptives.c:559
+msgid "Source"
+msgstr "Fuente"
+
+#: src/language/stats/descriptives.c:560
+msgid "Target"
+msgstr "Destino"
+
+#: src/language/stats/descriptives.c:670
+#, c-format
+msgid "Z-score of %s"
+msgstr "puntuación-Z de %s"
+
+#: src/language/stats/descriptives.c:884
+msgid "Valid N"
+msgstr "N válido"
+
+#: src/language/stats/descriptives.c:885
+msgid "Missing N"
+msgstr "N Perdidos"
+
+#: src/language/stats/descriptives.c:913
+#, c-format
+msgid "Valid cases = %g; cases with missing value(s) = %g."
+msgstr "Casos válidos = %g; casos con valor(es) perdido(s) = %g."
+
+#: src/language/stats/sort-cases.c:64
+msgid "Buffer limit must be at least 2."
+msgstr "El límite de la memoria intermedia debe ser al menos de 2."
+
+#: src/language/stats/sort-criteria.c:74
+msgid "`A' or `D' expected inside parentheses."
+msgstr "Se espera `A' o `D' dentro del paréntesis."
+
+#: src/language/stats/sort-criteria.c:79
+msgid "`)' expected."
+msgstr "`)' esperado."
+
+#: src/language/stats/sort-criteria.c:92
+#, c-format
+msgid "Variable %s specified twice in sort criteria."
+msgstr "La variable %s se especifica dos veces en los criterios de ordenación."
+
+#: src/language/stats/factor.c:803
+msgid "Factor analysis on a single variable is not useful."
+msgstr ""
+
+#: src/language/stats/factor.c:1206
+#, fuzzy
+msgid "Component Number"
+msgstr "Columna Número: 0"
+
+#: src/language/stats/factor.c:1206
+#, fuzzy
+msgid "Factor Number"
+msgstr "Número de Caso"
+
+#: src/language/stats/factor.c:1237
+#, fuzzy
+msgid "Communalities"
+msgstr "Comentarios:"
+
+#: src/language/stats/factor.c:1243
+msgid "Initial"
+msgstr ""
+
+#: src/language/stats/factor.c:1246
+msgid "Extraction"
+msgstr ""
+
+#: src/language/stats/factor.c:1310 src/language/stats/factor.c:1437
+#, fuzzy
+msgid "Component"
+msgstr "Comentarios:"
+
+#: src/language/stats/factor.c:1315 src/language/stats/factor.c:1439
+#, fuzzy
+msgid "Factor"
+msgstr "_Factor:"
+
+#: src/language/stats/factor.c:1347 src/language/stats/factor.c:1495
+#: src/ui/gui/psppire-data-store.c:755 src/ui/gui/psppire-var-store.c:699
+#: src/ui/gui/psppire-var-store.c:709 src/ui/gui/psppire-var-store.c:719
+#: src/ui/gui/psppire-var-store.c:825
+#, c-format
+msgid "%d"
+msgstr "%d"
+
+#: src/language/stats/factor.c:1412
+msgid "Total Variance Explained"
+msgstr ""
+
+#: src/language/stats/factor.c:1444
+msgid "Initial Eigenvalues"
+msgstr ""
+
+#: src/language/stats/factor.c:1450
+msgid "Extraction Sums of Squared Loadings"
+msgstr ""
+
+#: src/language/stats/factor.c:1456
+msgid "Rotation Sums of Squared Loadings"
+msgstr ""
+
+#: src/language/stats/factor.c:1464
+#, fuzzy, no-c-format
+msgid "% of Variance"
+msgstr "Varianza"
+
+#: src/language/stats/factor.c:1465
+msgid "Cumulative %"
+msgstr ""
+
+#: src/language/stats/factor.c:1578
+#, fuzzy
+msgid "Correlation Matrix"
+msgstr "Correlación"
+
+#: src/language/stats/factor.c:1632
+#, fuzzy
+msgid "Sig. 1-tailed"
+msgstr "Sign. (2-colas)"
+
+#: src/language/stats/factor.c:1666
+#, fuzzy
+msgid "Determinant"
+msgstr "Dependiente"
+
+#: src/language/stats/factor.c:1743
+msgid "Analysis N"
+msgstr ""
+
+#: src/language/stats/factor.c:1776
+msgid ""
+"The FACTOR criteria result in zero factors extracted. Therefore no analysis "
+"will be performed."
+msgstr ""
+
+#: src/language/stats/factor.c:1782
+msgid ""
+"The FACTOR criteria result in more factors than variables, which is not "
+"meaningful. No analysis will be performed."
+msgstr ""
+
+#: src/language/stats/factor.c:1865
+msgid "Component Matrix"
+msgstr ""
+
+#: src/language/stats/factor.c:1865
+#, fuzzy
+msgid "Factor Matrix"
+msgstr "Lista de Factores:"
+
+#: src/language/stats/factor.c:1871
+msgid "Rotated Component Matrix"
+msgstr ""
+
+#: src/language/stats/factor.c:1871
+#, fuzzy
+msgid "Rotated Factor Matrix"
+msgstr "Lista de Factores:"
+
+#: src/language/stats/flip.c:98
+msgid ""
+"FLIP ignores TEMPORARY.  Temporary transformations will be made permanent."
+msgstr ""
+"FLIP ignora TEMPORARY.  Las transformaciones temporales serán permanentes."
+
+#: src/language/stats/flip.c:150
+msgid "Could not create temporary file for FLIP."
+msgstr "No se ha podido crear el archivo temporal para FLIP."
+
+#: src/language/stats/flip.c:327
+#, c-format
+msgid "Error rewinding FLIP file: %s."
+msgstr "Error reconstruyendo el archivo FLIP: %s."
+
+#: src/language/stats/flip.c:334
+msgid "Error creating FLIP source file."
+msgstr "Error al crear el archivo de origen FLIP."
+
+#: src/language/stats/flip.c:347
+#, c-format
+msgid "Error reading FLIP file: %s."
+msgstr "Error de lectura del archivo FLIP: %s."
+
+#: src/language/stats/flip.c:349
+msgid "Unexpected end of file reading FLIP file."
+msgstr "Final inesperado de la lectura del archivo FLIP."
+
+#: src/language/stats/flip.c:365
+#, c-format
+msgid "Error seeking FLIP source file: %s."
+msgstr "Error al buscar el archivo fuente FLIP: %s."
+
+#: src/language/stats/flip.c:373
+#, c-format
+msgid "Error writing FLIP source file: %s."
+msgstr "Error de escritura del archivo fuente FLIP: %s."
+
+#: src/language/stats/flip.c:384
+#, c-format
+msgid "Error closing FLIP source file: %s."
+msgstr "Error de cierre del archivo de fuente FLIP: %s."
+
+#: src/language/stats/flip.c:392
+#, c-format
+msgid "Error rewinding FLIP source file: %s."
+msgstr "Error reconstruyendo el archivo fuente FLIP: %s."
+
+#: src/language/stats/flip.c:426
+#, c-format
+msgid "Error reading FLIP temporary file: %s."
+msgstr "Error de lectura del archivo temporal FLIP: %s."
+
+#: src/language/stats/flip.c:429
+msgid "Unexpected end of file reading FLIP temporary file."
+msgstr "Final inesperado de la lectura del archivo temporal FLIP."
+
+#: src/language/stats/npar-summary.c:141 src/language/stats/examine.q:1996
+#: src/language/stats/examine.q:2013 src/language/stats/frequencies.q:1050
+#: src/ui/gui/examine.ui:345
+msgid "Percentiles"
+msgstr "Percentiles"
+
+#: src/language/stats/npar-summary.c:145
+msgid "25th"
+msgstr "25º"
+
+#: src/language/stats/npar-summary.c:148
+msgid "50th (Median)"
+msgstr "50º (Mediana)"
+
+#: src/language/stats/npar-summary.c:151
+msgid "75th"
+msgstr "75º"
+
+#: src/language/stats/roc.c:932
+msgid "Area Under the Curve"
+msgstr "Área Bajo la Curva"
+
+#: src/language/stats/roc.c:934
+#, c-format
+msgid "Area Under the Curve (%s)"
+msgstr "Área Bajo la Curva (%s)"
+
+#: src/language/stats/roc.c:939
+msgid "Area"
+msgstr "Área"
+
+#: src/language/stats/roc.c:952 src/language/stats/examine.q:1641
+#: src/language/stats/oneway.q:388 src/language/stats/oneway.q:683
+#: src/language/stats/regression.q:198
+msgid "Std. Error"
+msgstr "Error Estándar"
+
+#: src/language/stats/roc.c:953
+msgid "Asymptotic Sig."
+msgstr "Sig. Asintótica"
+
+#: src/language/stats/roc.c:955 src/language/stats/examine.q:1455
+#: src/language/stats/oneway.q:397
+msgid "Lower Bound"
+msgstr "Límite Inferior"
+
+#: src/language/stats/roc.c:956 src/language/stats/examine.q:1460
+#: src/language/stats/oneway.q:398
+msgid "Upper Bound"
+msgstr "Límite Superior"
+
+#: src/language/stats/roc.c:960
+#, c-format
+msgid "Asymp. %g%% Confidence Interval"
+msgstr "Asymp. %g%% Intervalo de Confianza"
+
+#: src/language/stats/roc.c:966
+msgid "Variable under test"
+msgstr "Variable a prueba"
+
+#: src/language/stats/roc.c:1025
+msgid "Case Summary"
+msgstr "Resumen del Caso"
+
+#: src/language/stats/roc.c:1045
+msgid "Unweighted"
+msgstr "No ponderado"
+
+#: src/language/stats/roc.c:1046
+msgid "Weighted"
+msgstr "Ponderado"
+
+#: src/language/stats/roc.c:1050
+msgid "Valid N (listwise)"
+msgstr "N Válido (listwise)"
+
+#: src/language/stats/roc.c:1053
+msgid "Positive"
+msgstr "Positivo"
+
+#: src/language/stats/roc.c:1054
+msgid "Negative"
+msgstr "Negativo"
+
+#: src/language/stats/roc.c:1082
+msgid "Coordinates of the Curve"
+msgstr "Coordenadas de la Curva"
+
+#: src/language/stats/roc.c:1084
+#, c-format
+msgid "Coordinates of the Curve (%s)"
+msgstr "Coordenadas de la Curva (%s)"
+
+#: src/language/stats/roc.c:1092
+msgid "Test variable"
+msgstr "Variable de prueba"
+
+#: src/language/stats/roc.c:1094
+msgid "Positive if greater than or equal to"
+msgstr "Positivo si es mayor o igual a"
+
+#: src/language/stats/roc.c:1095 src/output/charts/roc-chart-cairo.c:38
+msgid "Sensitivity"
+msgstr "Sensibilidad"
+
+#: src/language/stats/roc.c:1096 src/output/charts/roc-chart-cairo.c:37
+msgid "1 - Specificity"
+msgstr "1 - Especificitado"
+
+#: src/language/stats/sign.c:89
+msgid "Negative Differences"
+msgstr "Diferencias Negativas"
+
+#: src/language/stats/sign.c:90
+msgid "Positive Differences"
+msgstr "Diferencias Positivas"
+
+#: src/language/stats/sign.c:91 src/language/stats/wilcoxon.c:259
+msgid "Ties"
+msgstr "Vínculos"
+
+#: src/language/stats/sign.c:130 src/language/stats/wilcoxon.c:327
+msgid "Exact Sig. (2-tailed)"
+msgstr "Sig. Exacta (2-colas)"
+
+#: src/language/stats/sign.c:133 src/language/stats/wilcoxon.c:328
+msgid "Exact Sig. (1-tailed)"
+msgstr "Sig. Exacta (1-cola)"
+
+#: src/language/stats/sign.c:136 src/language/stats/wilcoxon.c:331
+msgid "Point Probability"
+msgstr "Punto de Probabilidad"
+
+#: src/language/stats/wilcoxon.c:230
+msgid "Ranks"
+msgstr "Rangos"
+
+#: src/language/stats/wilcoxon.c:244
+msgid "Mean Rank"
+msgstr " Rango medio"
+
+#: src/language/stats/wilcoxon.c:245
+msgid "Sum of Ranks"
+msgstr "Suma de Rangos"
+
+#: src/language/stats/wilcoxon.c:257
+msgid "Negative Ranks"
+msgstr "Rangos Negativos"
+
+#: src/language/stats/wilcoxon.c:258
+msgid "Positive Ranks"
+msgstr "Rangos Positivos"
+
+#: src/language/stats/wilcoxon.c:322
+msgid "Z"
+msgstr "Z"
+
+#: src/language/stats/wilcoxon.c:323
+msgid "Asymp. Sig. (2-tailed)"
+msgstr "Sig. Asint. (2-colas)"
+
+#: src/language/data-io/combine-files.c:210
+msgid "Cannot specify the active file since no active file has been defined."
+msgstr ""
+"No se puede especificar el fichero activo ya que ningún fichero activo ha "
+"sido definido."
+
+#: src/language/data-io/combine-files.c:216
+msgid ""
+"This command may not be used after TEMPORARY when the active file is an "
+"input source.  Temporary transformations will be made permanent."
+msgstr ""
+"Este comando no puede ser utilizado después de TEMPORARY cuando el archivo "
+"activo es una fuente de entrada. Las transformaciones temporales serán "
+"permanentes."
+
+#: src/language/data-io/combine-files.c:250
+msgid "Multiple IN subcommands for a single FILE or TABLE."
+msgstr "Múltiples subcomandos IN  per a un único FILE o TABLE."
+
+#: src/language/data-io/combine-files.c:302
+#, c-format
+msgid "File %s lacks BY variable %s."
+msgstr "El archivo %s no tiene variable BY %s."
+
+#: src/language/data-io/combine-files.c:305
+#, c-format
+msgid "Active file lacks BY variable %s."
+msgstr "Archivo activo no tiene BY variable %s."
+
+#: src/language/data-io/combine-files.c:376
+msgid "The BY subcommand is required."
+msgstr "Se necesita el subcomando BY."
+
+#: src/language/data-io/combine-files.c:381
+#: src/language/data-io/combine-files.c:386
+#, fuzzy, c-format
+msgid "BY is required when %s is specified."
+msgstr "BY es necesario cuando SORT se especifica."
+
+#: src/language/data-io/combine-files.c:513
+msgid ""
+"Combining files with incompatible encodings. String data may not be "
+"represented correctly."
+msgstr ""
+"Combinando archivos con codificaciones incompatibles. Los datos de la cadena "
+"no podrán estar representados correctamente."
+
+#: src/language/data-io/combine-files.c:545
+#, c-format
+msgid ""
+"Variable %s in file %s has different type or width from the same variable in "
+"earlier file."
+msgstr ""
+"La variable %s en el archivo %s es de tipo o tamaño diferente respecto de la "
+"misma variable en un archivo anterior."
+
+#: src/language/data-io/combine-files.c:551
+#, c-format
+msgid "In file %s, %s is numeric."
+msgstr "En el archivo %s, %s es numérico."
+
+#: src/language/data-io/combine-files.c:554
+#, c-format
+msgid "In file %s, %s is a string variable with width %d."
+msgstr "En el archivo %s, %s es una variable de cadena con ancho %d."
+
+#: src/language/data-io/combine-files.c:559
+#, c-format
+msgid "In an earlier file, %s was numeric."
+msgstr "En un archivo anterior, %s era numérico."
+
+#: src/language/data-io/combine-files.c:562
+#, c-format
+msgid "In an earlier file, %s was a string variable with width %d."
+msgstr ""
+"En un archivo anterior, %s era una variable de cadena con un tamaño de %d."
+
+#: src/language/data-io/combine-files.c:601
+#, c-format
+msgid ""
+"Variable name %s specified on %s subcommand duplicates an existing variable "
+"name."
+msgstr ""
+"Nombre de la variable %s especificado en el subcomando %s duplica el nombre "
+"de la variable existente."
+
+#: src/language/data-io/combine-files.c:762
+#, c-format
+msgid "Encountered %zu sets of duplicate cases in the master file."
+msgstr "Encontrados %zu conjuntos de casos duplicados en el archivo principal."
+
+#: src/language/data-io/data-list.c:137
+msgid "The END subcommand may only be used within INPUT PROGRAM."
+msgstr "El subcomando END sólo puede ser utilizado dentro de INPUT PROGRAM."
+
+#: src/language/data-io/data-list.c:143
+msgid "The END subcommand may only be specified once."
+msgstr "El subcomando END sólo puede ser especificado una vez."
+
+#: src/language/data-io/data-list.c:181
+msgid "Only one of FIXED, FREE, or LIST may be specified."
+msgstr "Sólo uno de FIXED, FREE, o LIST puede ser especificado."
+
+#: src/language/data-io/data-list.c:243
+msgid "Encoding should not be specified for inline data. It will be ignored."
+msgstr ""
+"La codificación no debe ser especificada por los datos en línea. Será "
+"ignorada."
+
+#: src/language/data-io/data-list.c:254
+msgid "The END subcommand may be used only with DATA LIST FIXED."
+msgstr "El subcomando END sólo puede ser utilizado con DATA LIST FIXED."
+
+#: src/language/data-io/data-list.c:269
+msgid "At least one variable must be specified."
+msgstr "Al menos una variable debe ser especificada."
+
+#: src/language/data-io/data-list.c:368 src/language/data-io/data-list.c:457
+#: src/language/data-io/get-data.c:530
+#, c-format
+msgid "%s is a duplicate variable name."
+msgstr "%s es un nombre de variable duplicado."
+
+#: src/language/data-io/data-list.c:375
+#, c-format
+msgid "There is already a variable %s of a different type."
+msgstr "Ya existe una variable %s de diferente tipo."
+
+#: src/language/data-io/data-list.c:382
+#, c-format
+msgid "There is already a string variable %s of a different width."
+msgstr "Existe ya una variable de cadena %s con ancho diferente."
+
+#: src/language/data-io/data-list.c:390
+#, c-format
+msgid "Cannot place variable %s on record %d when RECORDS=%d is specified."
+msgstr ""
+"No se puede poner la variable %s en el registro %d cuando RECORDS=%d está "
+"especificado."
+
+#: src/language/data-io/data-parser.c:460
+#: src/language/data-io/data-parser.c:469
+msgid "Quoted string extends beyond end of line."
+msgstr "La cadena entre comillas se extiende más allá del final de línea."
+
+#: src/language/data-io/data-parser.c:525
+#, c-format
+msgid "Partial case of %d of %d records discarded."
+msgstr "Casos parciales de %d de %d registros descartados."
+
+#: src/language/data-io/data-parser.c:572
+#, c-format
+msgid "Partial case discarded.  The first variable missing was %s."
+msgstr "Caso parcial descartado.  La primera variable que faltaba era %s."
+
+#: src/language/data-io/data-parser.c:610
+#, c-format
+msgid ""
+"Missing value(s) for all variables from %s onward.  These will be filled "
+"with the system-missing value or blanks, as appropriate."
+msgstr ""
+"Valor(es) perdido(s) para todas las variables desde %st.  Éstos se llenan "
+"con el valor perdido del sistema o espacios en blanco, según corresponda."
+
+#: src/language/data-io/data-parser.c:630
+msgid "Record ends in data not part of any field."
+msgstr "El registro termina con datos que no forman parte de ningún campo."
+
+#: src/language/data-io/data-parser.c:650 src/language/data-io/print.c:404
+msgid "Record"
+msgstr "Registro"
+
+#: src/language/data-io/data-parser.c:651 src/language/data-io/print.c:405
+#: src/ui/gui/psppire-var-sheet.c:541 src/ui/gui/psppire-var-store.c:839
+#: src/ui/gui/crosstabs.ui:89
+msgid "Columns"
+msgstr "Columnas"
+
+#: src/language/data-io/data-parser.c:652
+#: src/language/data-io/data-parser.c:689 src/language/data-io/print.c:406
+msgid "Format"
+msgstr "Formato"
+
+#: src/language/data-io/data-parser.c:670
+#, c-format
+msgid "Reading %d record from %s."
+msgid_plural "Reading %d records from %s."
+msgstr[0] "Leyendo %d registro de %s."
+msgstr[1] "Leyendo %d registros de %s."
+
+#: src/language/data-io/data-parser.c:704
+#, c-format
+msgid "Reading free-form data from %s."
+msgstr "Leyendo datos con formato libre de %s."
+
+#. TRANSLATORS: this fragment will be interpolated into
+#. messages in fh_lock() that identify types of files.
+#: src/language/data-io/data-reader.c:123
+#: src/language/data-io/data-writer.c:58
+msgid "data file"
+msgstr "archivo de datos"
+
+#: src/language/data-io/data-reader.c:150
+#, c-format
+msgid "Could not open \"%s\" for reading as a data file: %s."
+msgstr ""
+"No se ha podido abrir \"%s\" para la lectura como un archivo de datos: %s."
+
+#: src/language/data-io/data-reader.c:192
+msgid ""
+"Unexpected end-of-file while reading data in BEGIN DATA.  This probably "
+"indicates a missing or misformatted END DATA command.  END DATA must appear "
+"by itself on a single line with exactly one space between words."
+msgstr ""
+"Final de archivo inesperado durante la lectura de datos en BEGIN DATA.  Esto "
+"probablemente indica una pérdida o formato erróneo del comando END DATA.  "
+"END DATA debe aparecer por sí misma en una sola línea con exactamente un "
+"espacio entre las palabras."
+
+#: src/language/data-io/data-reader.c:217
+#, c-format
+msgid "Error reading file %s: %s."
+msgstr "Se ha producido un error al leer el archivo %s: %s."
+
+#: src/language/data-io/data-reader.c:220
+#, c-format
+msgid "Unexpected end of file reading %s."
+msgstr "Final inesperado en la lectura de archivo %s."
+
+#: src/language/data-io/data-reader.c:229
+#, c-format
+msgid "Unexpected end of file in partial record reading %s."
+msgstr "Final de archivo inesperado en la lectura del registro parcial %s."
+
+#: src/language/data-io/data-reader.c:289
+#, c-format
+msgid "Corrupt block descriptor word at offset 0x%lx in %s."
+msgstr "Palabra descriptiva de bloque dañada en localización 0x%lx en %s."
+
+#: src/language/data-io/data-reader.c:290
+#, c-format
+msgid "Corrupt record descriptor word at offset 0x%lx in %s."
+msgstr "Palabra descriptora de registro dañada en localización 0x%lx en %s."
+
+#: src/language/data-io/data-reader.c:303
+#, c-format
+msgid "Corrupt record size at offset 0x%lx in %s."
+msgstr "Longitud de registro dañada en localización 0x%lx en %s."
+
+#: src/language/data-io/data-reader.c:445
+msgid "Record exceeds remaining block length."
+msgstr "El registro excede la longitud del resto de bloques."
+
+#: src/language/data-io/data-reader.c:519
+#, c-format
+msgid "Attempt to read beyond end-of-file on file %s."
+msgstr "Intento de leer más allá del final de archivo en %s."
+
+#: src/language/data-io/data-reader.c:522
+msgid "Attempt to read beyond END DATA."
+msgstr "Intento de leer más allá de END DATA."
+
+#: src/language/data-io/data-reader.c:708
+msgid ""
+"This command is not valid here since the current input program does not "
+"access the inline file."
+msgstr ""
+"Esta orden no es válida ya que el programa de entrada actual no tiene acceso "
+"al archivo en línea."
+
+#: src/language/data-io/data-writer.c:74
+#, c-format
+msgid "An error occurred while opening \"%s\" for writing as a data file: %s."
+msgstr ""
+"Se ha producido un error al abrir \"%s\" para escribirlo como un archivo de "
+"datos: %s."
+
+#: src/language/data-io/data-writer.c:191
+#, c-format
+msgid "I/O error occurred writing data file \"%s\"."
+msgstr "I/O error al escribir los datos del fichero \"%s\"."
+
+#: src/language/data-io/get-data.c:64
+#, c-format
+msgid "Unsupported TYPE %s"
+msgstr "TYPE %s no admitido"
+
+#: src/language/data-io/get-data.c:260
+#, c-format
+msgid ""
+"%s is allowed only with %s arrangement, but %s arrangement was stated or "
+"implied earlier in this command."
+msgstr ""
+"%s sólo se permite con configuración %s, pero previamente en este comando se "
+"ha establecido la configuración %s."
+
+#: src/language/data-io/get-data.c:315
+msgid "expecting FIXED or DELIMITED"
+msgstr "esperando FIXED o DELIMITED"
+
+#: src/language/data-io/get-data.c:328
+msgid "Value of FIRSTCASE must be 1 or greater."
+msgstr "Valor de FIRSTCASE debe ser mayor o igual a 1."
+
+#: src/language/data-io/get-data.c:353
+msgid "expecting LINE or VARIABLES"
+msgstr "esperando LINE o VARIABLES"
+
+#: src/language/data-io/get-data.c:366
+msgid "Value of FIXCASE must be at least 1."
+msgstr "Valor de FIXCASE debe ser como mínimo 1."
+
+#: src/language/data-io/get-data.c:386
+msgid "Value of FIRST must be at least 1."
+msgstr "Valor de FIRST debe ser como mínimo 1."
+
+#: src/language/data-io/get-data.c:398
+msgid "Value of PERCENT must be between 1 and 100."
+msgstr "Valor de PERCENT debe estar entre 1 y 100."
+
+#: src/language/data-io/get-data.c:447
+msgid ""
+"In compatible syntax mode, the QUALIFIER string must contain exactly one "
+"character."
+msgstr ""
+"En el modo de sintaxis compatible, la cadena QUALIFIER debe contener "
+"exactamente un carácter."
+
+#: src/language/data-io/get-data.c:462
+msgid "expecting VARIABLES"
+msgstr "esperando VARIABLES"
+
+#: src/language/data-io/get-data.c:484
+#: src/language/data-io/placement-parser.c:378
+#, 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 ""
+"El número de registro especificado, %ld, es en o antes del registro "
+"anterior, %d.  Los campos de datos deben ser listados en orden incremental "
+"del número de registro."
+
+#: src/language/data-io/get-data.c:493
+#, c-format
+msgid ""
+"The record number specified, %ld, exceeds the number of records per case "
+"specified on FIXCASE, %d."
+msgstr ""
+"El número de registro especificado, %ld, excede el número de registros para "
+"casos especificados en FIXCASE, %d."
+
+#: src/language/data-io/get.c:99
+msgid "expecting COMM or TAPE"
+msgstr "esperando COMM o TAPE"
+
+#: src/language/data-io/inpt-pgm.c:130
+msgid "Unexpected end-of-file within INPUT PROGRAM."
+msgstr "Final de archivo inesperado dentro de INPUT PROGRAM."
+
+#: src/language/data-io/inpt-pgm.c:143
+msgid "Input program did not create any variables."
+msgstr "El programa de entrada no creó ninguna variable."
+
+#: src/language/data-io/inpt-pgm.c:288
+msgid "COLUMN subcommand multiply specified."
+msgstr "subcomando COLUMN especificado múltiples veces."
+
+#: src/language/data-io/inpt-pgm.c:338
+msgid ""
+"REREAD: Column numbers must be positive finite numbers.  Column set to 1."
+msgstr ""
+"REREAD: Los números de columna tienen que ser números positivos finitos. La "
+"columna se establece en 1."
+
+#: src/language/data-io/placement-parser.c:87
+#, c-format
+msgid ""
+"Number of variables specified (%zu) differs from number of variable formats "
+"(%zu)."
+msgstr ""
+"Número de variables especificadas (%zu) difiere del número de formatos de la "
+"variable (%zu)."
+
+#: src/language/data-io/placement-parser.c:97
+msgid ""
+"SPSS-like or Fortran-like format specification expected after variable names."
+msgstr ""
+"Después del nombre de las variables se esperan especificaciones en formato "
+"tipo-SPSS o tipo-Fortran."
+
+#: src/language/data-io/placement-parser.c:119
+#, c-format
+msgid "The %d columns %d-%d can't be evenly divided into %zu fields."
+msgstr ""
+"Las %d columnas %d-%d no pueden ser uniformemente dividas entre los campos %"
+"zu."
+
+#: src/language/data-io/placement-parser.c:305
+msgid "Column positions for fields must be positive."
+msgstr "Las posiciones de columna para los campos tienen que ser positivas."
+
+#: src/language/data-io/placement-parser.c:307
+msgid "Column positions for fields must not be negative."
+msgstr "Las posiciones de columnas para los campos no pueden ser negativas."
+
+#: src/language/data-io/placement-parser.c:344
+msgid "The ending column for a field must be greater than the starting column."
+msgstr ""
+"La columna final de un campo tiene que ser mayor que la columna de inicio."
+
+#: src/language/data-io/print-space.c:116
+msgid "The expression on PRINT SPACE evaluated to the system-missing value."
+msgstr ""
+"La expresión en PRINT SPACE se evalúa por el sistema de valores perdidos."
+
+#: src/language/data-io/print-space.c:119
+#, c-format
+msgid "The expression on PRINT SPACE evaluated to %g."
+msgstr "La expresión en PRINT SPACE se evalúa en %g."
+
+#: src/language/data-io/print.c:179 src/language/data-io/trim.c:54
+msgid "expecting a valid subcommand"
+msgstr "esperando un subcomando válido"
+
+#: src/language/data-io/print.c:267
+#, c-format
+msgid "Output calls for %d records but %zu specified on RECORDS subcommand."
+msgstr ""
+"Resultados obtenidos para %d registros, pero %zu especificados en el "
+"subcomando RECORDS."
+
+#: src/language/data-io/print.c:436
+#, fuzzy, c-format
+msgid "Writing %zu record to %s."
+msgid_plural "Writing %zu records to %s."
+msgstr[0] "Escribiendo %d registro en %s."
+msgstr[1] "Escribiendot %d registros en %s."
+
+#: src/language/data-io/print.c:440
+#, fuzzy, c-format
+msgid "Writing %zu record."
+msgid_plural "Writing %zu records."
+msgstr[0] "Escribiendo %d registro."
+msgstr[1] "Escribiendo %d registros."
+
+#: src/language/data-io/save.c:223 src/language/data-io/save.c:238
+#: src/language/data-io/save.c:266
+#, c-format
+msgid "expecting %s or %s"
+msgstr "esperando %s o %s"
+
+#: src/language/data-io/trim.c:88
+#, c-format
+msgid ""
+"Cannot rename %s as %s because there already exists a variable named %s.  To "
+"rename variables with overlapping names, use a single RENAME subcommand such "
+"as \"/RENAME (A=B)(B=C)(C=A)\", or equivalently, \"/RENAME (A B C=B C A)\"."
+msgstr ""
+"No se puede cambiar el nombre %s por %s porque ya hay una variable nombrada %"
+"s.  Para cambiar el nombre de las variables con nombre superpuesto, utilitce "
+"el subcomando RENAME únicamente como \"/RENAME (A=B)(B=C)(C=A)\", o "
+"equivalentemente, \"/RENAME (A B C=B C A)\"."
+
+#: src/language/data-io/trim.c:114
+msgid "`=' expected after variable list."
+msgstr "`=' esperado después de lista de variables."
+
+#: src/language/data-io/trim.c:122
+#, c-format
+msgid ""
+"Number of variables on left side of `=' (%zu) does not match number of "
+"variables on right side (%zu), in parenthesized group %d of RENAME "
+"subcommand."
+msgstr ""
+"El número de variables en el lado izquierdo de `=' (%zu) no coincide con el "
+"número de variables en el lado derecho (%zu), en el grupo entre paréntesis %"
+"d del subcomando RENAME."
+
+#: src/language/data-io/trim.c:135
+#, c-format
+msgid "Requested renaming duplicates variable name %s."
+msgstr "El renombramiento pedido duplica el nombre de la variable %s."
+
+#: src/language/data-io/trim.c:166
+msgid "Cannot DROP all variables from dictionary."
+msgstr "Imposible DROP todas las variables del diccionario."
+
+#: src/language/expressions/evaluate.c:155
+msgid "expecting number or string"
+msgstr "esperando número o cadena"
+
+#: src/language/expressions/evaluate.c:169
+#, c-format
+msgid "Duplicate variable name %s."
+msgstr "Nombre de la variable %s duplicado."
+
+#: src/language/expressions/helpers.c:51
+msgid ""
+"One of the arguments to a DATE function is not an integer.  The result will "
+"be system-missing."
+msgstr ""
+"Uno de los argumentos para función DATE no es un entero.  El resultado será "
+"perdido por el sistema."
+
+#: src/language/expressions/helpers.c:73
+msgid ""
+"The week argument to DATE.WKYR is not an integer.  The result will be system-"
+"missing."
+msgstr ""
+"El argumento de semana para DATE.WKYR no es un entero. El resultado será "
+"perdido del sistema."
+
+#: src/language/expressions/helpers.c:79
+msgid ""
+"The week argument to DATE.WKYR is outside the acceptable range of 1 to 53.  "
+"The result will be system-missing."
+msgstr ""
+"El argumento de semana para DATE.WKYR está fuera del intervalo aceptable "
+"entre 1 y 53.  El resultado será perdido del sistema."
+
+#: src/language/expressions/helpers.c:101
+msgid ""
+"The day argument to DATE.YRDAY is not an integer.  The result will be system-"
+"missing."
+msgstr ""
+"El argumento de día para DATE.YRDAY no es un entero.  El resultado será "
+"perdido del sistema."
+
+#: src/language/expressions/helpers.c:107
+msgid ""
+"The day argument to DATE.YRDAY is outside the acceptable range of 1 to 366.  "
+"The result will be system-missing."
+msgstr ""
+"El argumento de día para DATE.YRDAY está fuera del intervalo aceptable entre "
+"1 y 366. El resultado será perdido del sistema."
+
+#: src/language/expressions/helpers.c:129
+msgid ""
+"The year argument to YRMODA is greater than 47516.  The result will be "
+"system-missing."
+msgstr ""
+"El argumento año para YRMODA es más grande que 47516. El resultado será "
+"perdido del sistema."
+
+#: src/language/expressions/helpers.c:182
+#, c-format
+msgid ""
+"Unrecognized date unit \"%.*s\".  Valid date units are \"years\", \"quarters"
+"\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", and \"seconds\"."
+msgstr ""
+"Unidad de fecha \"%.*s\" no reconocida. Las unidades de fecha válidas son "
+"\"años\", \"trimestres\", \"meses\", \"semanas\", \"días\", \"horas\", "
+"\"minutos\", y \"segundos\"."
+
+#: src/language/expressions/helpers.c:332
+msgid ""
+"Invalid DATESUM method.  Valid choices are \"closest\" and \"rollover\"."
+msgstr ""
+"Método DATESUM inválido. Las opciones válidas son \"cercana\" y  \"cumplida"
+"\"."
+
+#: src/language/expressions/parse.c:259
+#, c-format
+msgid ""
+"Type mismatch: expression has %s type, but a numeric value is required here."
+msgstr ""
+"Incompatibilidad de tipo: la expresión tiene tipo %s, pero aquí se pide un "
+"valor numérico."
+
+#: src/language/expressions/parse.c:271
+#, c-format
+msgid ""
+"Type mismatch: expression has %s type, but a string value is required here."
+msgstr ""
+"Incompatibilidad de tipo: la expresión tiene tipo %s, pero aquí se pide un "
+"valor de cadena."
+
+#: src/language/expressions/parse.c:427
+#, c-format
+msgid "Type mismatch while applying %s operator: cannot convert %s to %s."
+msgstr ""
+"Incompatibilidad de los tipos mientras se aplica el operador %s: no se puede "
+"convertir %s en %s."
+
+#: src/language/expressions/parse.c:643
+msgid ""
+"Chaining relational operators (e.g. \"a < b < c\") will not produce the "
+"mathematically expected result.  Use the AND logical operator to fix the "
+"problem (e.g. \"a < b AND b < c\").  If chaining is really intended, "
+"parentheses will disable this warning (e.g. \"(a < b) < c\".)"
+msgstr ""
+"El encadenamiento de operadores relacionales (p.e. \"a < b < c\") no "
+"producirà el resultado esperado matemáticamente. Utilizar el operador lógico "
+"AND para solucionar el problema (p.e. \"a < b AND b < c\"). Si el "
+"encadenamiento es realmente intencionado, los paréntesis desactivaran esta "
+"alerta (p.e. \"(a < b) < c\".)"
+
+#: src/language/expressions/parse.c:744
+msgid ""
+"The exponentiation operator (\"**\") is left-associative, even though right-"
+"associative semantics are more useful.  That is, \"a**b**c\" equals \"(a**b)"
+"**c\", not as \"a**(b**c)\".  To disable this warning, insert parentheses."
+msgstr ""
+"El operador de exponenciación (\"**\") aparece a la izquierda, aunque si "
+"aparece a la derecha es más útil.  Es decir, \"a**b**c\" es igual a \"(a**b)"
+"**c\", no a \"a**(b**c)\". Para desactivar esta alerta, insertar paréntesis."
+
+#: src/language/expressions/parse.c:809
+#, c-format
+msgid "Unknown system variable %s."
+msgstr "Variable de sistema desconocida %s."
+
+#: src/language/expressions/parse.c:857
+#, c-format
+msgid "Unknown identifier %s."
+msgstr "Identificador desconocido %s."
+
+#: src/language/expressions/parse.c:892
+msgid "in expression"
+msgstr "en la expresión"
+
+#: src/language/expressions/parse.c:1073
+#, c-format
+msgid "%s must have at least %d arguments in list."
+msgstr "%s debe tener como mínimo %d argumentos en la lista."
+
+#: src/language/expressions/parse.c:1082
+#, c-format
+msgid "%s must have even number of arguments in list."
+msgstr "%s tienen que tener un número par de argumentos en la lista."
+
+#: src/language/expressions/parse.c:1085
+#, c-format
+msgid "%s must have multiple of %d arguments in list."
+msgstr "%s tiene que tener un múltiplo de %d argumentos en la lista."
+
+#: src/language/expressions/parse.c:1095
+#, c-format
+msgid "%s function does not accept a minimum valid argument count."
+msgstr "la función %s no acepta un mínimo recuento de argumentos válidos."
+
+#: src/language/expressions/parse.c:1104
+#, c-format
+msgid "%s requires at least %d valid arguments in list."
+msgstr "%s requiere como mínimo %d argumentos válidos en la lista."
+
+#: src/language/expressions/parse.c:1110
+#, c-format
+msgid ""
+"With %s, using minimum valid argument count of %d does not make sense when "
+"passing only %d arguments in list."
+msgstr ""
+"Con %s, no tiene sentido utilizar %d como recuento mínimo de argumento "
+"válido si se pasan únicamente %d argumentos en la lista."
+
+#: src/language/expressions/parse.c:1164
+#, c-format
+msgid "Type mismatch invoking %s as "
+msgstr "Incompatibilidad de tipo al invocar %s como"
+
+#: src/language/expressions/parse.c:1169
+msgid "Function invocation "
+msgstr "Invocación de función"
+
+#: src/language/expressions/parse.c:1171
+msgid " does not match any known function.  Candidates are:"
+msgstr "no coincide con ninguna función conocida. Los candidatos son:"
+
+#: src/language/expressions/parse.c:1201
+#, c-format
+msgid "No function or vector named %s."
+msgstr "Ninguna función o vector nombrado %s."
+
+#: src/language/expressions/parse.c:1244
+#, c-format
+msgid "expecting `,' or `)' invoking %s function"
+msgstr "esperando `,' o `)' al invocar la función %s"
+
+#: src/language/expressions/parse.c:1264
+#, c-format
+msgid "%s is a PSPP extension."
+msgstr "%s es una extensión de PSPP."
+
+#: src/language/expressions/parse.c:1273
+#, c-format
+msgid "%s may not appear after TEMPORARY."
+msgstr "%s no puede aparecer después de TEMPORARY."
+
+#: src/libpspp/hash.c:545
+#, c-format
+msgid "hash table:"
+msgstr "tabla hash:"
+
+#: src/libpspp/message.c:128
+msgid "error"
+msgstr "error"
+
+#: src/libpspp/message.c:131
+msgid "warning"
+msgstr "aviso"
+
+#: src/libpspp/message.c:135
+#, fuzzy
+msgid "note"
+msgstr "Centro"
+
+#: src/libpspp/tmpfile.c:56
+msgid "failed to create temporary file"
+msgstr "error en crear el archivo temporal"
+
+#: src/libpspp/tmpfile.c:97
+msgid "seeking in temporary file"
+msgstr "buscando en el archivo temporal"
+
+#: src/libpspp/tmpfile.c:116
+msgid "reading temporary file"
+msgstr "leyendo archivo temporal"
+
+#: src/libpspp/tmpfile.c:118
+msgid "unexpected end of file reading temporary file"
+msgstr "final de fichero inesperado en leer el archivo temporal"
+
+#: src/libpspp/tmpfile.c:137
+msgid "writing to temporary file"
+msgstr "escribiendo en un archivo temporal"
+
+#: src/libpspp/zip-writer.c:91
+#, fuzzy, c-format
+msgid "%s: error opening output file"
+msgstr "ascii: abriendo el archivo de resultados \"%s\""
+
+#: src/libpspp/zip-writer.c:224
+#, fuzzy, c-format
+msgid "%s: write failed"
+msgstr "%s: No es un archivo portátil."
+
+#: src/math/percentiles.c:36
+msgid "HAverage"
+msgstr "HAverage"
+
+#: src/math/percentiles.c:37
+msgid "Weighted Average"
+msgstr "Media Ponderada"
+
+#: src/math/percentiles.c:38
+msgid "Rounded"
+msgstr "Redondeado"
+
+#: src/math/percentiles.c:39
+msgid "Empirical"
+msgstr "Empírico"
+
+#: src/math/percentiles.c:40
+msgid "Empirical with averaging"
+msgstr "Empírico promediado"
+
+#: src/output/ascii.c:278
+#, c-format
+msgid "%s: %s must be positive integer or `auto'"
+msgstr ""
+
+#: src/output/ascii.c:311
+#, fuzzy, c-format
+msgid ""
+"ascii: page excluding margins and headers must be at least %d characters "
+"wide by %d lines long, but as configured is only %d characters by %d lines"
+msgstr ""
+"ascii: excluyendo los márgenes y encabezamientos la página tiene que ser "
+"como mínimo de 59 carácteres de ancho por 15 líneas de largo, pero tal como "
+"está configurada la página únicamente tiene %d carácteres y %d líneas"
+
+#: src/output/ascii.c:360
+#, c-format
+msgid "ascii: closing output file \"%s\""
+msgstr "ascii: cerrando el archivo de salida \"%s\""
+
+#: src/output/ascii.c:503
+#, c-format
+msgid "See %s for a chart."
+msgstr ""
+
+#: src/output/ascii.c:806
+#, c-format
+msgid "ascii: opening output file \"%s\""
+msgstr "ascii: abriendo el archivo de resultados \"%s\""
+
+#: src/output/ascii.c:913 src/output/cairo.c:784
+#, c-format
+msgid "%s - Page %d"
+msgstr "%s - Página %d"
+
+#: src/output/csv.c:87 src/output/html.c:106 src/output/journal.c:93
+#: src/output/msglog.c:66
+#, fuzzy, c-format
+msgid "error opening output file \"%s\""
+msgstr "ascii: abriendo el archivo de resultados \"%s\""
+
+#: src/output/driver.c:330
+#, c-format
+msgid ""
+"%s is not a valid device type (the choices are \"terminal\" and \"listing\")"
+msgstr ""
+
+#: src/output/driver.c:343
+#, fuzzy, c-format
+msgid "%s: unknown option \"%s\""
+msgstr "ascii: parámetro desconocido `%s'"
+
+#: src/output/html.c:114
+msgid "PSPP Output"
+msgstr "Resultado de PSPP"
+
+#: src/output/journal.c:67
+#, fuzzy, c-format
+msgid "error writing output file \"%s\""
+msgstr "error en escribir \"%s\""
+
+#: src/output/measure.c:65
+#, c-format
+msgid "`%s' is not a valid length."
+msgstr "`%s' no es una longitud válida."
+
+#: src/output/measure.c:93
+#, c-format
+msgid "syntax error in paper size `%s'"
+msgstr "error de sintaxis en la medida de papel `%s'"
+
+#: src/output/measure.c:230
+#, c-format
+msgid "unknown paper type `%.*s'"
+msgstr "tipo de papel desconocido `%.*s'"
+
+#: src/output/measure.c:248
+#, fuzzy, c-format
+msgid "error opening input file \"%s\""
+msgstr "error en abrir \"%s\""
+
+#: src/output/measure.c:259
+#, fuzzy, c-format
+msgid "error reading file \"%s\""
+msgstr "error de lectura \"%s\""
+
+#: src/output/measure.c:276
+#, c-format
+msgid "paper size file \"%s\" does not state a paper size"
+msgstr "el archivo de medida de papel \"%s\" no indica una medida de papel"
+
+#: src/output/options.c:113
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but a Boolean value is required"
+msgstr ""
+
+#: src/output/options.c:188
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but one of the following is required: %s"
+msgstr ""
+
+#: src/output/options.c:232
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but a nonnegative integer is required"
+msgstr ""
+
+#: src/output/options.c:236
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but a positive integer is required"
+msgstr ""
+
+#: src/output/options.c:239
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but an integer is required"
+msgstr ""
+
+#: src/output/options.c:242
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but an integer greater than %d is required"
+msgstr ""
+
+#: src/output/options.c:247
+#, c-format
+msgid "%s: \"%s\" is \"%s\"  but an integer between %d and %d is required"
+msgstr ""
+
+#: src/output/options.c:326
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but a file name that contains \"#\" is required."
+msgstr ""
+
+#: src/output/tab.c:206
+#, c-format
+msgid "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
+msgstr "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) a taula de mida (%d,%d)\n"
+
+#: src/output/tab.c:244
+#, fuzzy, c-format
+msgid "bad hline: x=(%d+%d=%d,%d+%d=%d) y=%d+%d=%d in table size (%d,%d)\n"
+msgstr "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) a taula de mida (%d,%d)\n"
+
+#: src/output/tab.c:288
+#, c-format
+msgid ""
+"bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
+msgstr ""
+"bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) en taula amb mida (%d,%d)\n"
+
+#: src/output/cairo.c:295
+#, fuzzy, c-format
+msgid "error opening output file \"%s\": %s"
+msgstr "ascii: abriendo el archivo de resultados \"%s\""
+
+#: src/output/cairo.c:312
+#, fuzzy, c-format
+msgid ""
+"The defined page is not wide enough to hold at least %d characters in the "
+"default font.  In fact, there's only room for %d characters."
+msgstr ""
+"La página PostScript definida no es suficientemente extensa como para "
+"contener márgenes y encabezamientos, además de almenos 15 líneas con las "
+"fuentes por defecto.  De hecho, únicamente hay espacio para %d líneas de "
+"cada fuente en la medida por defecto de %d.%03d puntos."
+
+#: src/output/cairo.c:322
+#, fuzzy, c-format
+msgid ""
+"The defined page is not long enough to hold margins and headers, plus least %"
+"d lines of the default fonts.  In fact, there's only room for %d lines."
+msgstr ""
+"La página PostScript definida no es suficientemente extensa como para "
+"contener márgenes y encabezamientos, además de almenos 15 líneas con las "
+"fuentes por defecto.  De hecho, únicamente hay espacio para %d líneas de "
+"cada fuente en la medida por defecto de %d.%03d puntos."
+
+#: src/output/cairo.c:376
+#, fuzzy, c-format
+msgid "error drawing output for %s driver: %s"
+msgstr "error de sintaxis analitzando opciones para el controlador \"%s\""
+
+#: src/output/cairo.c:864
+#, c-format
+msgid "\"%s\": bad font specification"
+msgstr "\"%s\": especificación de carácter no válida"
+
+#: src/output/cairo.c:1084
+#, fuzzy, c-format
+msgid "error writing output file \"%s\": %s"
+msgstr "Error en cerrar el archivo portátil \"%s\": %s."
+
+#: src/output/charts/np-plot-cairo.c:37
+#, c-format
+msgid "Normal Q-Q Plot of %s"
+msgstr "Gráfica Normal Q-Q de %s"
+
+#: src/output/charts/np-plot-cairo.c:38 src/output/charts/np-plot-cairo.c:66
+msgid "Observed Value"
+msgstr "Valor Observado"
+
+#: src/output/charts/np-plot-cairo.c:39
+msgid "Expected Normal"
+msgstr "Normal Esperada"
+
+#: src/output/charts/np-plot-cairo.c:64
+#, c-format
+msgid "Detrended Normal Q-Q Plot of %s"
+msgstr "Gráfica Normal Adireccional Q-Q de %s"
+
+#: src/output/charts/np-plot-cairo.c:67
+msgid "Dev from Normal"
+msgstr "Desv. de la Normal"
+
+#: src/output/charts/plot-hist-cairo.c:110
+msgid "HISTOGRAM"
+msgstr "HISTOGRAM"
+
+#: src/output/charts/plot-hist-cairo.c:112
+#: src/language/stats/frequencies.q:814
+msgid "Frequency"
+msgstr "Frecuencia"
+
+#: src/output/charts/roc-chart-cairo.c:36 src/ui/gui/roc.ui:7
+msgid "ROC Curve"
+msgstr "Curva ROC"
+
+#: src/output/charts/scree-cairo.c:36
+msgid "Scree Plot"
+msgstr ""
+
+#: src/output/charts/scree-cairo.c:38
+msgid "Eigenvalue"
+msgstr ""
+
+#: src/output/odt.c:93
+#, fuzzy
+msgid "error creating temporary file"
+msgstr "leyendo archivo temporal"
+
+#: src/ui/source-init-opts.c:78
+msgid "Algorithm must be either \"compatible\" or \"enhanced\"."
+msgstr "Algoritmo tiene que ser o \"compatible\" o \"ampliado\"."
+
+#: src/ui/source-init-opts.c:103
+msgid "Syntax must be either \"compatible\" or \"enhanced\"."
+msgstr "La sintaxis tiene que ser o \"compatible\" o \"ampliada\"."
+
+#: src/ui/terminal/main.c:128
+msgid ""
+"Stopping syntax file processing here to avoid a cascade of dependent command "
+"failures."
+msgstr ""
+"Deteniendo el procesamiento del archivo de sintaxis aquí para evitar una "
+"cascada de errores derivados."
+
+#: src/ui/terminal/msg-ui.c:127
+#, c-format
+msgid "Notes (%d) exceed limit (%d).  Suppressing further notes."
+msgstr ""
+
+#: src/ui/terminal/msg-ui.c:135
+#, c-format
+msgid "Warnings (%d) exceed limit (%d)."
+msgstr "Avisos (%d) exceden el límite (%d)."
+
+#: src/ui/terminal/msg-ui.c:138
+#, fuzzy, c-format
+msgid "Errors (%d) exceed limit (%d)."
+msgstr "Errores (%d) exceden el límite (%d)."
+
+#: src/ui/terminal/terminal.c:72
+#, c-format
+msgid "could not access definition for terminal `%s'"
+msgstr "no se puede acceder a la definición para terminal `%s'"
+
+#: src/ui/terminal/terminal-opts.c:119
+#, c-format
+msgid "%s: output option missing `='"
+msgstr ""
+
+#: src/ui/terminal/terminal-opts.c:126
+#, c-format
+msgid "%s: output option specified more than once"
+msgstr ""
+
+#: src/ui/gui/checkbox-treeview.c:92 src/language/stats/crosstabs.q:1213
+#: src/language/stats/crosstabs.q:1240 src/language/stats/crosstabs.q:1263
+#: src/language/stats/crosstabs.q:1287 src/language/stats/examine.q:1638
+msgid "Statistic"
+msgstr "Estadístico"
+
+#: src/ui/gui/comments-dialog.c:58
+#, c-format
+msgid "Column Number: %d"
+msgstr "Número de columna: %d"
+
+#: src/ui/gui/crosstabs-dialog.c:41
+msgid "Chisq"
+msgstr "Chi-C."
+
+#: src/ui/gui/crosstabs-dialog.c:42 src/language/stats/crosstabs.q:1774
+msgid "Phi"
+msgstr "Phi"
+
+#: src/ui/gui/crosstabs-dialog.c:43
+msgid "CC"
+msgstr "CC"
+
+#: src/ui/gui/crosstabs-dialog.c:44 src/language/stats/crosstabs.q:1912
+msgid "Lambda"
+msgstr "Lambda"
+
+#: src/ui/gui/crosstabs-dialog.c:45
+msgid "UC"
+msgstr "UC"
+
+#: src/ui/gui/crosstabs-dialog.c:46
+msgid "BTau"
+msgstr "BTau"
+
+#: src/ui/gui/crosstabs-dialog.c:47
+msgid "CTau"
+msgstr "CTau"
+
+#: src/ui/gui/crosstabs-dialog.c:48
+msgid "Risk"
+msgstr "Riesgo"
+
+#: src/ui/gui/crosstabs-dialog.c:49 src/language/stats/crosstabs.q:1779
+msgid "Gamma"
+msgstr "Gamma"
+
+#: src/ui/gui/crosstabs-dialog.c:50
+msgid "D"
+msgstr "D"
+
+#: src/ui/gui/crosstabs-dialog.c:51 src/language/stats/crosstabs.q:1782
+msgid "Kappa"
+msgstr "Kappa"
+
+#: src/ui/gui/crosstabs-dialog.c:52 src/language/stats/crosstabs.q:1916
+msgid "Eta"
+msgstr "Eta"
+
+#: src/ui/gui/crosstabs-dialog.c:53
+msgid "Corr"
+msgstr "Corr"
+
+#: src/ui/gui/crosstabs-dialog.c:54 src/ui/gui/crosstabs-dialog.c:65
+#: src/ui/gui/crosstabs-dialog.c:100 src/ui/gui/crosstabs-dialog.c:108
+#: src/ui/gui/psppire-var-store.c:612 src/ui/gui/var-display.c:16
+#: src/ui/gui/variable-info-dialog.c:41
+msgid "None"
+msgstr "Ninguno"
+
+#: src/ui/gui/crosstabs-dialog.c:57
+msgid "Count"
+msgstr "Recuento"
+
+#: src/ui/gui/crosstabs-dialog.c:58
+msgid "Row"
+msgstr "Fila"
+
+#: src/ui/gui/crosstabs-dialog.c:59
+msgid "Column"
+msgstr "Columna"
+
+#: src/ui/gui/crosstabs-dialog.c:61
+msgid "Expected"
+msgstr "Esperado"
+
+#: src/ui/gui/crosstabs-dialog.c:63
+msgid "Std. Residual"
+msgstr "Residual Tipificado"
+
+#: src/ui/gui/crosstabs-dialog.c:64
+msgid "Adjusted Std. Residual"
+msgstr "Residual Tipificado Ajustado"
+
+#: src/ui/gui/descriptives-dialog.c:41 src/ui/gui/frequencies-dialog.c:42
+msgid "Standard deviation"
+msgstr "Desviación Estándar"
+
+#: src/ui/gui/descriptives-dialog.c:46
+msgid "Standard error"
+msgstr "Error Estándar"
+
+#: src/ui/gui/find-dialog.c:649
+#, c-format
+msgid "Bad regular expression: %s"
+msgstr "Expresión regular incorrecta: %s"
+
+#: src/ui/gui/factor-dialog.c:344
+#, c-format
+msgid "Eigenvalues over %4.2f times the mean eigenvalue"
+msgstr ""
+
+#: src/ui/gui/frequencies-dialog.c:45
+msgid "Standard error of the mean"
+msgstr "Error estándar en la media"
+
+#: src/ui/gui/frequencies-dialog.c:48
+msgid "Standard error of the skewness"
+msgstr "Error estándar de la asimetría"
+
+#: src/ui/gui/frequencies-dialog.c:50 src/language/stats/frequencies.q:108
+msgid "Mode"
+msgstr "Modo"
+
+#: src/ui/gui/frequencies-dialog.c:52
+msgid "Standard error of the kurtosis"
+msgstr "Error estándar en la curtosis"
+
+#: src/ui/gui/frequencies-dialog.c:53 src/language/stats/examine.q:1469
+#: src/language/stats/frequencies.q:107
+msgid "Median"
+msgstr "Mediana"
+
+#: src/ui/gui/helper.c:197
+msgid "Sorry. The help system hasn't yet been implemented."
+msgstr "Disculpen. El sistema de ayuda todavía no ha sido implementado."
+
+#: src/ui/gui/help-menu.c:67
+msgid "A program for the analysis of sampled data"
+msgstr "Un programa para el análisis de datos de muestreo"
+
+#. TRANSLATORS: Use this string to list the people who have helped with
+#. translation to your language.
+#: src/ui/gui/help-menu.c:77
+msgid "translator-credits"
+msgstr "F.J. Miguel, J. Gómez, P. Payà"
+
+#: src/ui/gui/help-menu.c:98
+#, c-format
+msgid ""
+"Cannot open reference manual: %s.  The PSPP user manual is also available at "
+"http://www.gnu.org/software/pspp/documentation.html"
+msgstr ""
+
+#: src/ui/gui/help-menu.c:117
+msgid "_Help"
+msgstr "Ayuda"
+
+#: src/ui/gui/help-menu.c:124
+msgid "_Reference Manual"
+msgstr "Manual de _Referencia"
+
+#: src/ui/gui/missing-val-dialog.c:113 src/ui/gui/missing-val-dialog.c:167
+msgid "Incorrect value for variable type"
+msgstr "Valor incorrecto para el tipo de variable"
+
+#: src/ui/gui/missing-val-dialog.c:134 src/ui/gui/missing-val-dialog.c:143
+msgid "Incorrect range specification"
+msgstr "Especificación de intervalo incorrecta"
+
+#: src/ui/gui/oneway-anova-dialog.c:313
+#, c-format
+msgid "Contrast %d of %d"
+msgstr "Contraste %d de %d"
+
+#: src/ui/gui/psppire.c:224
+msgid "_Reset"
+msgstr "_Reiniciar"
+
+#: src/ui/gui/psppire.c:225
+msgid "_Select"
+msgstr "_Selecionar"
+
+#: src/ui/gui/psppire-data-editor.c:951
+msgid "Data View"
+msgstr "Vista de Datos"
+
+#: src/ui/gui/psppire-data-editor.c:954
+msgid "Variable View"
+msgstr "Vista de Variables"
+
+#: src/ui/gui/psppire-data-store.c:744
+msgid "var"
+msgstr "var"
+
+#: src/ui/gui/psppire-data-window.c:212
+msgid "Transformations Pending"
+msgstr "Transformaciones pendientes"
+
+#: src/ui/gui/psppire-data-window.c:228
+msgid "Filter off"
+msgstr "SIN Filtro"
+
+#: src/ui/gui/psppire-data-window.c:242
+#, c-format
+msgid "Filter by %s"
+msgstr "Filtrado por %s"
+
+#: src/ui/gui/psppire-data-window.c:263
+msgid "No Split"
+msgstr "NO Dividido"
+
+#: src/ui/gui/psppire-data-window.c:272
+msgid "Split by "
+msgstr "Dividido por "
+
+#: src/ui/gui/psppire-data-window.c:300
+msgid "Weights off"
+msgstr "SIN Ponderar"
+
+#: src/ui/gui/psppire-data-window.c:314
+#, c-format
+msgid "Weight by %s"
+msgstr "Ponderado por %s"
+
+#: src/ui/gui/psppire-data-window.c:382
+msgid "Open"
+msgstr "Abrir"
+
+#: src/ui/gui/psppire-data-window.c:392
+#, fuzzy
+msgid "Data and Syntax Files"
+msgstr "No se puede abrir el archivo de sintaxis \"%s\""
+
+#: src/ui/gui/psppire-data-window.c:402 src/ui/gui/psppire-data-window.c:611
+msgid "System Files (*.sav)"
+msgstr "Archivos de Sistema (*.sav)"
+
+#: src/ui/gui/psppire-data-window.c:408 src/ui/gui/psppire-data-window.c:617
+msgid "Portable Files (*.por) "
+msgstr "Archivos Portátiles (*.por)"
+
+#: src/ui/gui/psppire-data-window.c:414 src/ui/gui/psppire-syntax-window.c:292
+msgid "Syntax Files (*.sps) "
+msgstr "Archivos de Sintàxis (*.sps) "
+
+#: src/ui/gui/psppire-data-window.c:420 src/ui/gui/psppire-data-window.c:623
+#: src/ui/gui/psppire-syntax-window.c:298
+msgid "All Files"
+msgstr "Todos los archivos"
+
+#: src/ui/gui/psppire-data-window.c:603
+msgid "Save"
+msgstr "Guardar"
+
+#: src/ui/gui/psppire-data-window.c:636
+msgid "Portable File"
+msgstr "Archivo Portátil"
+
+#: src/ui/gui/psppire-data-window.c:773
+msgid "Font Selection"
+msgstr "Selección de fuente"
+
+#: src/ui/gui/psppire-data-window.c:1261
+msgid "Data Editor"
+msgstr "Editor de Datos"
+
+#: src/ui/gui/psppire-output-window.c:458
+msgid "Export Output"
+msgstr ""
+
+#: src/ui/gui/psppire-output-window.c:466
+#, fuzzy
+msgid "PDF Files (*.pdf)"
+msgstr "Archivos Portátiles (*.por)"
+
+#: src/ui/gui/psppire-output-window.c:467
+msgid "HTML Files (*.html)"
+msgstr ""
+
+#: src/ui/gui/psppire-output-window.c:468
+msgid "OpenDocument Files (*.odt)"
+msgstr ""
+
+#: src/ui/gui/psppire-output-window.c:469
+#, fuzzy
+msgid "Text Files (*.txt)"
+msgstr "Archivos de Sistema (*.sav)"
+
+#: src/ui/gui/psppire-output-window.c:470
+#, fuzzy
+msgid "PostScript Files (*.ps)"
+msgstr "Archivos Portátiles (*.por)"
+
+#: src/ui/gui/psppire-output-window.c:471
+msgid "Comma-Separated Value Files (*.csv)"
+msgstr ""
+
+#: src/ui/gui/psppire-output-window.c:605
+msgid "Output Viewer"
+msgstr "Visor de resultados"
+
+#: src/ui/gui/psppire-syntax-window.c:265
+#, c-format
+msgid "Saved file \"%s\""
+msgstr "Guardado archivo \"%s\""
+
+#: src/ui/gui/psppire-syntax-window.c:284
+msgid "Save Syntax"
+msgstr "Guardar sintaxis"
+
+#: src/ui/gui/psppire-syntax-window.c:496
+msgid "Syntax Editor"
+msgstr "Editor de sintaxis"
+
+#: src/ui/gui/psppire-syntax-window.c:510
+#, c-format
+msgid "Cannot load syntax file '%s'"
+msgstr "No se puede abrir el archivo de sintaxis \"%s\""
+
+#: src/ui/gui/psppire-var-sheet.c:535 src/ui/gui/psppire-var-store.c:833
+#: src/language/stats/crosstabs.q:1288 src/ui/gui/psppire.ui:2055
+msgid "Type"
+msgstr "Tipo"
+
+#: src/ui/gui/psppire-var-sheet.c:536 src/ui/gui/psppire-var-store.c:834
+#: src/ui/gui/psppire.ui:1974
+msgid "Width"
+msgstr "Ancho"
+
+#: src/ui/gui/psppire-var-sheet.c:537 src/ui/gui/psppire-var-store.c:835
+msgid "Decimals"
+msgstr "Decimales"
+
+#: src/ui/gui/psppire-var-sheet.c:539 src/ui/gui/psppire-var-store.c:837
+msgid "Values"
+msgstr "Valores"
+
+#: src/ui/gui/psppire-var-sheet.c:540 src/ui/gui/psppire-var-store.c:838
+#: src/language/stats/crosstabs.q:822 src/language/stats/examine.q:1104
+#: src/language/stats/frequencies.q:864 src/language/stats/frequencies.q:1036
+msgid "Missing"
+msgstr "Perdidos"
+
+#: src/ui/gui/psppire-var-sheet.c:542 src/ui/gui/psppire-var-store.c:840
+msgid "Align"
+msgstr "Alineación"
+
+#: src/ui/gui/psppire-var-sheet.c:543 src/ui/gui/psppire-var-store.c:841
+msgid "Measure"
+msgstr "Medida"
+
+#: src/ui/gui/psppire-var-store.c:622 src/ui/gui/var-sheet-dialogs.ui:43
+msgid "Comma"
+msgstr "Coma"
+
+#: src/ui/gui/psppire-var-store.c:623 src/ui/gui/var-sheet-dialogs.ui:59
+msgid "Dot"
+msgstr "Punto"
+
+#: src/ui/gui/psppire-var-store.c:624
+msgid "Scientific"
+msgstr "Científico"
+
+#: src/ui/gui/psppire-var-store.c:625 src/ui/gui/var-sheet-dialogs.ui:91
+msgid "Date"
+msgstr "Fecha"
+
+#: src/ui/gui/psppire-var-store.c:626 src/ui/gui/var-sheet-dialogs.ui:107
+msgid "Dollar"
+msgstr "Dolar"
+
+#: src/ui/gui/psppire-var-store.c:627
+msgid "Custom"
+msgstr "De usuario"
+
+#: src/ui/gui/psppire-window.c:97
+#, c-format
+msgid "%s %s PSPPIRE %s"
+msgstr "%s %s PSPPIRE %s"
+
+#: src/ui/gui/psppire-window.c:468
+#, c-format
+msgid "Save the changes to \"%s\" before closing?"
+msgstr "Guarda los cambios en \"%s\" antes de salir?"
+
+#: src/ui/gui/psppire-window.c:475
+#, c-format
+msgid ""
+"If you don't save, changes from the last %ld seconds will be permanently "
+"lost."
+msgstr ""
+"Si no se guarda ahora, los cambios de los últims %ld segundos se perderan "
+"permanentemente."
+
+#: src/ui/gui/psppire-window.c:479
+msgid "Close _without saving"
+msgstr "Cerrar sin guardar"
+
+#: src/ui/gui/recode-dialog.c:911
+msgid "Recode into Different Variables"
+msgstr "Recodificar en variables Diferentes"
+
+#: src/ui/gui/recode-dialog.c:914 src/ui/gui/recode.ui:692
+msgid "Recode into Same Variables"
+msgstr "Recodificar en las Mismas variables"
+
+#: src/ui/gui/recode-dialog.c:929 src/ui/gui/recode-dialog.c:1025
+msgid "New"
+msgstr "Nuevo"
+
+#: src/ui/gui/recode-dialog.c:944 src/ui/gui/recode-dialog.c:1017
+msgid "Old"
+msgstr "Anterior"
+
+#: src/ui/gui/recode-dialog.c:1274
+msgid "Recode into Different Variables: Old and New Values "
+msgstr "Recodifica en variables Diferentes: Anteriores y Nuevos valores "
+
+#: src/ui/gui/recode-dialog.c:1275
+msgid "Recode into Same Variables: Old and New Values"
+msgstr "Recodifica en las mismas variables: Anteriores y Nuevos valores"
+
+#: src/ui/gui/regression-dialog.c:42
+msgid "Coeff"
+msgstr "Coef"
+
+#: src/ui/gui/regression-dialog.c:43 src/language/stats/regression.q:155
+msgid "R"
+msgstr "R"
+
+#: src/ui/gui/regression-dialog.c:44
+msgid "Anova"
+msgstr "Anova"
+
+#: src/ui/gui/regression-dialog.c:45
+msgid "Bcov"
+msgstr "Bcov"
+
+#: src/ui/gui/select-cases-dialog.c:82
+#, c-format
+msgid "Approximately %3d%% of all cases."
+msgstr "Aproximadamente %3d%% de todos los casos."
+
+#: src/ui/gui/select-cases-dialog.c:83
+#, c-format
+msgid "Exactly %3d cases from the first %3d cases."
+msgstr "Exactamente %3d casos de los primeros %3d casos."
+
+#: src/ui/gui/select-cases-dialog.c:223
+#, c-format
+msgid "%d thru %d"
+msgstr "%d hasta %d"
+
+#: src/ui/gui/text-data-import-dialog.c:461
+#, c-format
+msgid "Could not open \"%s\": %s"
+msgstr "No se puede abrir \"%s\": %s"
+
+#: src/ui/gui/text-data-import-dialog.c:477
+#, c-format
+msgid "Error reading \"%s\": %s"
+msgstr "Error leyendo \"%s\": %s"
+
+#: src/ui/gui/text-data-import-dialog.c:480
+#, c-format
+msgid ""
+"Failed to read \"%s\", because it contains a line over %d bytes long and "
+"therefore appears not to be a text file."
+msgstr ""
+"Error leyendo \"%s\", porque contiene una linea más allá de %d bytes y por "
+"tanto parece que no es un archivo de texto."
+
+#: src/ui/gui/text-data-import-dialog.c:494
+#, c-format
+msgid "\"%s\" is empty."
+msgstr "\"%s\" esta vacío."
+
+#: src/ui/gui/text-data-import-dialog.c:539
+msgid "Import Delimited Text Data"
+msgstr "Importar datos de texto delimitado"
+
+#: src/ui/gui/text-data-import-dialog.c:590
+msgid "Importing Delimited Text Data"
+msgstr "Importando datos de texto delimitado"
+
+#: src/ui/gui/text-data-import-dialog.c:749
+msgid ""
+"This assistant will guide you through the process of importing data into "
+"PSPP from a text file with one line per case,  in which fields are separated "
+"by tabs, commas, or other delimiters.\n"
+"\n"
+msgstr ""
+"Este asistente te quiará a lo largo del proceso de importar datos en PSPP "
+"desde un archivo de texto con una línea por caso,  en el que los campos "
+"estan separados por tabuladores, comas, u otros delimitadores.\n"
+"\n"
+
+#: src/ui/gui/text-data-import-dialog.c:755
+#, c-format
+msgid "The selected file contains %zu line of text.  "
+msgid_plural "The selected file contains %zu lines of text.  "
+msgstr[0] "L'arxiu seleccionat conté %zu linies de text.  "
+msgstr[1] "El archivo seleccionado contiene %zu línias de texto.  "
+
+#: src/ui/gui/text-data-import-dialog.c:763
+#, c-format
+msgid "The selected file contains approximately %lu line of text.  "
+msgid_plural "The selected file contains approximately %lu lines of text.  "
+msgstr[0] ""
+"El archivo seleccionado contiene aproximadamente %lu línea de texto.  "
+msgstr[1] ""
+"El archivo seleccionado contiene aproximadamente %lu líneas de texto.  "
+
+#: src/ui/gui/text-data-import-dialog.c:769
+#, c-format
+msgid ""
+"Only the first %zu line of the file will be shown for preview purposes in "
+"the following screens.  "
+msgid_plural ""
+"Only the first %zu lines of the file will be shown for preview purposes in "
+"the following screens.  "
+msgstr[0] ""
+"Únicamente la primera %zu líneas del archivo se previsualizaran en las "
+"siguientes pantallas.  "
+msgstr[1] ""
+"Únicamente las primeras %zu líneas del archivo se previsualizaran en las "
+"siguientes pantallas.  "
+
+#: src/ui/gui/text-data-import-dialog.c:776
+msgid "You may choose below how much of the file should actually be imported."
+msgstr ""
+"Puedes escoger a continuación que parte del archivo va a ser importado."
+
+#: src/ui/gui/text-data-import-dialog.c:1523
+#: src/ui/gui/text-data-import-dialog.c:1768
+msgid "This input line has too few separators to fill in this field."
+msgstr ""
+"Esta línea de entrada no tiene suficientes separadores para llenar el campo."
+
+#: src/ui/gui/text-data-import-dialog.c:1759
+#, c-format
+msgid "Field content \"%.*s\" cannot be parsed in format %s."
+msgstr "El contenido del campo \"%.*s\" no puede ser analizado en formato %s."
+
+#: src/ui/gui/t-test-options.c:60
+#, c-format
+msgid "Confidence Interval: %2d %%"
+msgstr "Intervalo de Confianza: %2d %%"
+
+#: src/ui/gui/variable-info-dialog.c:77
+#, c-format
+msgid "Label: %s\n"
+msgstr "Etiqueta: %s\n"
+
+#: src/ui/gui/variable-info-dialog.c:84
+#, c-format
+msgid "Type: %s\n"
+msgstr "Tipo: %s\n"
+
+#: src/ui/gui/variable-info-dialog.c:88
+#, c-format
+msgid "Missing Values: %s\n"
+msgstr "Valores perdidos: %s\n"
+
+#: src/ui/gui/variable-info-dialog.c:93
+#, c-format
+msgid "Measurement Level: %s\n"
+msgstr "Nivel de Medida: %s\n"
+
+#: src/ui/gui/variable-info-dialog.c:106
+msgid "Value Labels:\n"
+msgstr "Etiquetas de valor:\n"
+
+#: src/ui/gui/variable-info-dialog.c:116
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: src/ui/gui/weight-cases-dialog.c:81 src/ui/gui/psppire.ui:52
+#: src/ui/gui/psppire.ui:155
+msgid "Do not weight cases"
+msgstr "No ponderar los casos"
+
+#: src/ui/gui/weight-cases-dialog.c:87
+#, c-format
+msgid "Weight cases by %s"
+msgstr "Ponderar los casos por %s"
+
+#: tests/dissect-sysfile.c:571
+#, c-format
+msgid "Unrecognized record type 7, subtype %d."
+msgstr "Tipo de registro 7 no reconocido, subtipo %d."
+
+#: tests/dissect-sysfile.c:850
+#, c-format
+msgid "%s: Error parsing attribute value %s[%d]"
+msgstr "%s: Error al analizar el valor del atributo %s[%d]"
+
+#: tests/dissect-sysfile.c:856
+#, c-format
+msgid "%s: Attribute value %s[%d] is not quoted: %s"
+msgstr "%s: El valor del atributo %s[%d] no está entre comillas: %s"
+
+#: tests/dissect-sysfile.c:880
+#, fuzzy, c-format
+msgid "Bad size %zu for extended number of cases."
+msgstr "Longitud no válida %zu en la extensión 11."
+
+#: tests/dissect-sysfile.c:886
+#, c-format
+msgid "Bad count %zu for extended number of cases."
+msgstr ""
+
+#: src/language/utilities/set.q:188
+msgid "WORKSPACE must be at least 1MB"
+msgstr "WORKSPACE debe ser como mínimo 1 Mb"
+
+#: src/language/utilities/set.q:194 src/language/utilities/set.q:196
+#: src/language/utilities/set.q:198 src/language/utilities/set.q:200
+#: src/language/utilities/set.q:202 src/language/utilities/set.q:204
+#: src/language/utilities/set.q:206 src/language/utilities/set.q:208
+#: src/language/utilities/set.q:210
+#, c-format
+msgid "%s is obsolete."
+msgstr "%s está obsoleto."
+
+#: src/language/utilities/set.q:216
+msgid "Active file compression is not implemented."
+msgstr "La compresión de archivos no está implementada."
+
+#: src/language/utilities/set.q:334
+msgid "EPOCH must be 1500 or later."
+msgstr "EPOCH debe ser 1500 o posterior."
+
+#: src/language/utilities/set.q:341
+msgid "expecting AUTOMATIC or year"
+msgstr "esperando AUTOMATICA o año"
+
+#: src/language/utilities/set.q:369
+msgid "LENGTH must be at least 1."
+msgstr "LENGTH debe ser como mínimo 1."
+
+#: src/language/utilities/set.q:405
+#, c-format
+msgid "%s is not a recognised encoding or locale name"
+msgstr "%s no es una codificación o un nombre local reconocido"
+
+#: src/language/utilities/set.q:467
+msgid "WIDTH must be at least 40."
+msgstr "WIDTH debe ser como mínimo 40."
+
+#: src/language/utilities/set.q:490
+#, c-format
+msgid ""
+"FORMAT requires numeric output format as an argument.  Specified format %s "
+"is of type string."
+msgstr ""
+"FORMAT requiere formato de resultado numérico como argumento.  El formato %s "
+"especificado es de tipo cadena."
+
+#: src/language/utilities/set.q:707
+msgid "ISL (32-bit IEEE 754 single, little-endian)"
+msgstr "ISL (32-bit IEEE 754 single, little-endian)"
+
+#: src/language/utilities/set.q:710
+msgid "ISB (32-bit IEEE 754 single, big-endian)"
+msgstr "ISB (32-bit IEEE 754 single, big-endian)"
+
+#: src/language/utilities/set.q:713
+msgid "IDL (64-bit IEEE 754 double, little-endian)"
+msgstr "IDL (64-bit IEEE 754 double, little-endian)"
+
+#: src/language/utilities/set.q:716
+msgid "IDB (64-bit IEEE 754 double, big-endian)"
+msgstr "IDB (64-bit IEEE 754 double, big-endian)"
+
+#: src/language/utilities/set.q:720
+msgid "VF (32-bit VAX F, VAX-endian)"
+msgstr "VF (32-bit VAX F, VAX-endian)"
+
+#: src/language/utilities/set.q:723
+msgid "VD (64-bit VAX D, VAX-endian)"
+msgstr "VD (64-bit VAX D, VAX-endian)"
+
+#: src/language/utilities/set.q:726
+msgid "VG (64-bit VAX G, VAX-endian)"
+msgstr "VG (64-bit VAX G, VAX-endian)"
+
+#: src/language/utilities/set.q:730
+msgid "ZS (32-bit IBM Z hexadecimal short, big-endian)"
+msgstr "ZS (32-bit IBM Z hexadecimal short, big-endian)"
+
+#: src/language/utilities/set.q:733
+msgid "ZL (64-bit IBM Z hexadecimal long, big-endian)"
+msgstr "ZL (64-bit IBM Z hexadecimal long, big-endian)"
+
+#: src/language/utilities/set.q:835
+#, c-format
+msgid "%s is %s."
+msgstr "%s es %s."
+
+#: src/language/stats/crosstabs.q:289
+msgid ""
+"Missing mode REPORT not allowed in general mode.  Assuming MISSING=TABLE."
+msgstr ""
+"El INFORME de perdidos no está disponible en el modo general.  Se asume "
+"MISSING=TABLE."
+
+#: src/language/stats/crosstabs.q:399
+msgid "Too many cross-tabulation variables or dimensions."
+msgstr "Demasiadas variables o dimensiones para una Tabla Cruzada."
+
+#: src/language/stats/crosstabs.q:409
+msgid "expecting BY"
+msgstr "esperando BY"
+
+#: src/language/stats/crosstabs.q:466
+msgid "VARIABLES must be specified before TABLES."
+msgstr "Las VARIABLES tienen que ser especificadas antes de TABLES."
+
+#: src/language/stats/crosstabs.q:504
+#, c-format
+msgid "Maximum value (%ld) less than minimum value (%ld)."
+msgstr "El valor máximo (%ld) en menor que el valor mínimo (%ld)."
+
+#: src/language/stats/crosstabs.q:818
+msgid "Summary."
+msgstr "Resumen."
+
+#: src/language/stats/crosstabs.q:820 src/language/stats/examine.q:1164
+#: src/language/stats/reliability.q:693
+msgid "Cases"
+msgstr "Casos"
+
+#: src/language/stats/crosstabs.q:821 src/language/stats/examine.q:1103
+#: src/language/stats/frequencies.q:1035 src/language/stats/reliability.q:696
+msgid "Valid"
+msgstr "Válido"
+
+#: src/language/stats/crosstabs.q:831 src/language/stats/examine.q:1179
+#: src/language/stats/frequencies.q:815
+msgid "Percent"
+msgstr "Porcentaje"
+
+#: src/language/stats/crosstabs.q:1109
+msgid "count"
+msgstr "recuento"
+
+#: src/language/stats/crosstabs.q:1110
+msgid "row %"
+msgstr "fila %"
+
+#: src/language/stats/crosstabs.q:1111
+msgid "column %"
+msgstr "columna %"
+
+#: src/language/stats/crosstabs.q:1112
+msgid "total %"
+msgstr "total %"
+
+#: src/language/stats/crosstabs.q:1113
+msgid "expected"
+msgstr "esperado"
+
+#: src/language/stats/crosstabs.q:1114
+msgid "residual"
+msgstr "residual"
+
+#: src/language/stats/crosstabs.q:1115
+msgid "std. resid."
+msgstr "residuo std."
+
+#: src/language/stats/crosstabs.q:1116
+msgid "adj. resid."
+msgstr "resid.ajust."
+
+#: src/language/stats/crosstabs.q:1210
+msgid "Chi-square tests."
+msgstr "Pruebas Chi-cuadrado."
+
+#: src/language/stats/crosstabs.q:1217
+msgid "Asymp. Sig. (2-sided)"
+msgstr "Sign. Asint. (2-colas)"
+
+#: src/language/stats/crosstabs.q:1219
+msgid "Exact Sig. (2-sided)"
+msgstr "Sign. Exacta (2-colas)"
+
+#: src/language/stats/crosstabs.q:1221
+msgid "Exact Sig. (1-sided)"
+msgstr "Sign. Exacta (1-cola)"
+
+#: src/language/stats/crosstabs.q:1236
+msgid "Symmetric measures."
+msgstr "Medidas simétricas."
+
+#: src/language/stats/crosstabs.q:1242 src/language/stats/crosstabs.q:1290
+msgid "Asymp. Std. Error"
+msgstr "Err. Est. Asint."
+
+#: src/language/stats/crosstabs.q:1243 src/language/stats/crosstabs.q:1291
+msgid "Approx. T"
+msgstr "T Aproxim."
+
+#: src/language/stats/crosstabs.q:1244 src/language/stats/crosstabs.q:1292
+msgid "Approx. Sig."
+msgstr "Sign. Aproxim."
+
+#: src/language/stats/crosstabs.q:1258
+msgid "Risk estimate."
+msgstr "Estimador de Riesgo."
+
+#: src/language/stats/crosstabs.q:1262
+#, c-format
+msgid "95%% Confidence Interval"
+msgstr "Intervalo de Confianza del 95%%"
+
+#: src/language/stats/crosstabs.q:1265 src/language/stats/t-test.q:756
+#: src/language/stats/t-test.q:920 src/language/stats/t-test.q:1013
+msgid "Lower"
+msgstr "Inferior"
+
+#: src/language/stats/crosstabs.q:1266 src/language/stats/t-test.q:757
+#: src/language/stats/t-test.q:921 src/language/stats/t-test.q:1014
+msgid "Upper"
+msgstr "Superior"
+
+#: src/language/stats/crosstabs.q:1283
+msgid "Directional measures."
+msgstr "Medidas direccionales."
+
+#: src/language/stats/crosstabs.q:1708
+msgid "Pearson Chi-Square"
+msgstr "Chi-cuadrado de Pearson"
+
+#
+#: src/language/stats/crosstabs.q:1709
+msgid "Likelihood Ratio"
+msgstr "Razón de Semejanza"
+
+#: src/language/stats/crosstabs.q:1710
+msgid "Fisher's Exact Test"
+msgstr "Prueba exacta de Fisher"
+
+#: src/language/stats/crosstabs.q:1711
+msgid "Continuity Correction"
+msgstr "Corrección de continuidad"
+
+#: src/language/stats/crosstabs.q:1712
+msgid "Linear-by-Linear Association"
+msgstr "Asociación Lineal-by-Lineal"
+
+#: src/language/stats/crosstabs.q:1747 src/language/stats/crosstabs.q:1822
+#: src/language/stats/crosstabs.q:1887
+msgid "N of Valid Cases"
+msgstr "N de casos válidos"
+
+#: src/language/stats/crosstabs.q:1766 src/language/stats/crosstabs.q:1905
+msgid "Nominal by Nominal"
+msgstr "Nominal según Nominal"
+
+#: src/language/stats/crosstabs.q:1767 src/language/stats/crosstabs.q:1906
+msgid "Ordinal by Ordinal"
+msgstr "Ordinal según Ordinal"
+
+#: src/language/stats/crosstabs.q:1768
+msgid "Interval by Interval"
+msgstr "Intervalo según Intervalo"
+
+#: src/language/stats/crosstabs.q:1769
+msgid "Measure of Agreement"
+msgstr "Medida de Acuerdo"
+
+#: src/language/stats/crosstabs.q:1775
+msgid "Cramer's V"
+msgstr "V de Cramer"
+
+#: src/language/stats/crosstabs.q:1776
+msgid "Contingency Coefficient"
+msgstr "Coeficiente de Contingencia"
+
+#: src/language/stats/crosstabs.q:1777
+msgid "Kendall's tau-b"
+msgstr "Tau-B de Kendall"
+
+#: src/language/stats/crosstabs.q:1778
+msgid "Kendall's tau-c"
+msgstr "Tau-C de Kendall"
+
+#: src/language/stats/crosstabs.q:1780
+msgid "Spearman Correlation"
+msgstr "Correlación de Spearman"
+
+#: src/language/stats/crosstabs.q:1781
+msgid "Pearson's R"
+msgstr "R de Pearson"
+
+#: src/language/stats/crosstabs.q:1860
+#, c-format
+msgid "Odds Ratio for %s (%g / %g)"
+msgstr "Razón de diferencias para %s (%g / %g)"
+
+#: src/language/stats/crosstabs.q:1863
+#, c-format
+msgid "Odds Ratio for %s (%.*s / %.*s)"
+msgstr "Razón de diferencias para  %s (%.*s / %.*s)"
+
+#: src/language/stats/crosstabs.q:1871
+#, c-format
+msgid "For cohort %s = %g"
+msgstr "Para la cohorte %s = %g"
+
+#: src/language/stats/crosstabs.q:1874
+#, c-format
+msgid "For cohort %s = %.*s"
+msgstr "Para la cohorte %s = %.*s"
+
+#: src/language/stats/crosstabs.q:1907
+msgid "Nominal by Interval"
+msgstr "Nominal según Intervalo"
+
+#: src/language/stats/crosstabs.q:1913
+msgid "Goodman and Kruskal tau"
+msgstr "Tau de Kruskal y Goodman"
+
+#: src/language/stats/crosstabs.q:1914
+msgid "Uncertainty Coefficient"
+msgstr "Coeficiente de Incertidumbre"
+
+#: src/language/stats/crosstabs.q:1915
+msgid "Somers' d"
+msgstr "D de Somers"
+
+#: src/language/stats/crosstabs.q:1921
+msgid "Symmetric"
+msgstr "Simétrico"
+
+#: src/language/stats/crosstabs.q:1922 src/language/stats/crosstabs.q:1923
+#, c-format
+msgid "%s Dependent"
+msgstr "%s Dependiente"
+
+#: src/language/stats/examine.q:357
+#, fuzzy
+msgid "Not creating NP plot because data set is empty."
+msgstr "No se crea el gráfico porque el conjunto de datos está vacío."
+
+#: src/language/stats/examine.q:442 src/language/stats/examine.q:949
+msgid "Not creating plot because data set is empty."
+msgstr "No se crea el gráfico porque el conjunto de datos está vacío."
+
+#: src/language/stats/examine.q:454
+#, c-format
+msgid "Boxplot of %s vs. %s"
+msgstr "Diagrama de caja de %s vs. %s"
+
+#: src/language/stats/examine.q:458
+#, c-format
+msgid "Boxplot of %s"
+msgstr "Diagrama de caja de %s"
+
+#: src/language/stats/examine.q:647 src/language/stats/examine.q:660
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s i %s son mútuamente excluyentes"
+
+#: src/language/stats/examine.q:1159 src/language/stats/reliability.q:670
+msgid "Case Processing Summary"
+msgstr "Resumen del proceso de casos"
+
+#: src/language/stats/examine.q:1449 src/language/stats/oneway.q:394
+#, c-format
+msgid "%g%% Confidence Interval for Mean"
+msgstr "Intervalo de Confianza %g%% para la Media"
+
+#: src/language/stats/examine.q:1464
+msgid "5% Trimmed Mean"
+msgstr "Media recortada al 5%"
+
+#: src/language/stats/examine.q:1499
+msgid "Interquartile Range"
+msgstr "Intervalo intercuartílico"
+
+#: src/language/stats/examine.q:1635 src/language/stats/oneway.q:404
+#: src/ui/gui/descriptives.ui:8 src/ui/gui/examine.ui:319
+msgid "Descriptives"
+msgstr "Descriptivos"
+
+#: src/language/stats/examine.q:1821
+msgid "Highest"
+msgstr "Máximo"
+
+#: src/language/stats/examine.q:1826
+msgid "Lowest"
+msgstr "Mínimo"
+
+#: src/language/stats/examine.q:1833
+msgid "Extreme Values"
+msgstr "Valores extremos"
+
+#: src/language/stats/examine.q:1837 src/language/data-io/list.q:158
+msgid "Case Number"
+msgstr "Número de Caso"
+
+#: src/language/stats/examine.q:1957
+msgid "Tukey's Hinges"
+msgstr "Bisagras de Tukey"
+
+#: src/language/stats/examine.q:2003
+#, c-format
+msgid "%g"
+msgstr "%g"
+
+#: src/language/stats/frequencies.q:382
+#, fuzzy
+msgid "Bar charts are not implemented."
+msgstr "%s no está implementado."
+
+#: src/language/stats/frequencies.q:399
+#, fuzzy, c-format
+msgid ""
+"MAX for histogram must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
+msgstr ""
+"MAX debe ser mayor o igual a MIN, si ambos se especifican.  Pero, MIN se "
+"debe especificar como %g y MAX como %g.  MIN y MAX serán ignorados."
+
+#: src/language/stats/frequencies.q:420
+#, fuzzy, c-format
+msgid ""
+"MAX for pie chart must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
+msgstr ""
+"MAX debe ser mayor o igual a MIN, si ambos se especifican.  Pero, MIN se "
+"debe especificar como %g y MAX como %g.  MIN y MAX serán ignorados."
+
+#: src/language/stats/frequencies.q:703
+msgid "`)' expected after GROUPED interval list."
+msgstr "`)' esperada después de la lista de variables GRUPED."
+
+#: src/language/stats/frequencies.q:723
+#, c-format
+msgid "Variables %s specified multiple times on GROUPED subcommand."
+msgstr ""
+"La variable %s se ha especificado más de una vez en el subcomando GROUPED."
+
+#: src/language/stats/frequencies.q:733
+#, c-format
+msgid "Variables %s specified on GROUPED but not on VARIABLES."
+msgstr "Variables %s especificadas en GROUPED pero no en VARIABLES."
+
+#: src/language/stats/frequencies.q:812
+msgid "Value Label"
+msgstr "Etiqueta de Valor"
+
+#: src/language/stats/frequencies.q:816
+#, fuzzy
+msgid "Valid Percent"
+msgstr "Porcentaje"
+
+#: src/language/stats/frequencies.q:817
+#, fuzzy
+msgid "Cum Percent"
+msgstr "Porcentaje"
+
+#: src/language/stats/frequencies.q:1008
+#, c-format
+msgid "No valid data for variable %s; statistics not displayed."
+msgstr "No hay datos válidos para la variable %s; no se muestran estadísticas."
+
+#: src/language/stats/frequencies.q:1054
+msgid "50 (Median)"
+msgstr "50 (Mediana)"
+
+#: src/language/stats/frequencies.q:1209
+#, c-format
+msgid "Omitting pie chart for %s, which has only %d unique values."
+msgstr ""
+
+#: src/language/stats/frequencies.q:1212
+#, c-format
+msgid "Omitting pie chart for %s, which has over 50 unique values."
+msgstr ""
+
+#: src/language/stats/glm.q:248
+msgid "Multivariate GLM not yet supported"
+msgstr "GLM multivariable todavía no disponible"
+
+#: src/language/stats/means.q:100
+msgid "Missing required subcommand TABLES."
+msgstr "Falta el subcomando requerido TABLES."
+
+#: src/language/stats/means.q:134
+msgid "TABLES subcommand may not appear more than once."
+msgstr "El subcomando TABLES no puede aparecer más de una vez."
+
+#: src/language/stats/npar.q:111
+msgid "NPAR subcommand not currently implemented."
+msgstr "Actualmente no está implementado el subcomando NPAR."
+
+#: src/language/stats/npar.q:256
+#, c-format
+msgid ""
+"The specified value of HI (%d) is lower than the specified value of LO (%d)"
+msgstr ""
+"El valor especificado para HI (%d) es menor que el especificado para LO (%d)"
+
+#: src/language/stats/npar.q:311
+#, c-format
+msgid ""
+"%d expected values were given, but the specified range (%d-%d) requires "
+"exactly %d values."
+msgstr ""
+"Se han proporcionado %d valores esperados, pero el intervalo especificado (%"
+"d-%d) requiere exactamente %d valores."
+
+#: src/language/stats/npar.q:453 src/language/stats/t-test.q:380
+#, c-format
+msgid ""
+"PAIRED was specified but the number of variables preceding WITH (%zu) did "
+"not match the number following (%zu)."
+msgstr ""
+"Se ha especificado PAIRED pero el número de variables antes de WITH (%zu) no "
+"coincide con el número de variables posterior (%zu)."
+
+#: src/language/stats/oneway.q:170
+msgid "Number of contrast coefficients must equal the number of groups"
+msgstr ""
+"El número de coeficientes de contraste debe ser igual al número de grupos"
+
+#: src/language/stats/oneway.q:179
+#, c-format
+msgid "Coefficients for contrast %zu do not total zero"
+msgstr "Los coeficientes para contrastar %zu no suman cero"
+
+#: src/language/stats/oneway.q:242
+#, c-format
+msgid "`%s' is not a variable name"
+msgstr "`%s' no es un nombre de variable"
+
+#: src/language/stats/oneway.q:274 src/language/stats/regression.q:283
+msgid "Sum of Squares"
+msgstr "Suma de Cuadrados"
+
+#: src/language/stats/oneway.q:276 src/language/stats/regression.q:285
+msgid "Mean Square"
+msgstr "Cuadrado medio"
+
+#: src/language/stats/oneway.q:277 src/language/stats/regression.q:286
+#: src/language/stats/t-test.q:749
+msgid "F"
+msgstr "F"
+
+#: src/language/stats/oneway.q:278 src/language/stats/oneway.q:535
+#: src/language/stats/regression.q:201 src/language/stats/regression.q:287
+msgid "Significance"
+msgstr "Significatividad"
+
+#: src/language/stats/oneway.q:300
+msgid "Between Groups"
+msgstr "Entre Grupos"
+
+#: src/language/stats/oneway.q:301
+msgid "Within Groups"
+msgstr "Intra Grupos"
+
+#: src/language/stats/oneway.q:345 src/language/stats/regression.q:312
+msgid "ANOVA"
+msgstr "ANOVA"
+
+#: src/language/stats/oneway.q:532
+msgid "Levene Statistic"
+msgstr "Estadístico de Levene"
+
+#: src/language/stats/oneway.q:533
+msgid "df1"
+msgstr "df1"
+
+#: src/language/stats/oneway.q:534
+msgid "df2"
+msgstr "df2"
+
+#: src/language/stats/oneway.q:537
+msgid "Test of Homogeneity of Variances"
+msgstr "Prueba de Homogeneidad de Varianzas"
+
+#: src/language/stats/oneway.q:603
+msgid "Contrast Coefficients"
+msgstr "Coeficientes de Contraste"
+
+#: src/language/stats/oneway.q:605 src/language/stats/oneway.q:681
+msgid "Contrast"
+msgstr "Contraste"
+
+#: src/language/stats/oneway.q:679
+msgid "Contrast Tests"
+msgstr "Pruebas de contrate"
+
+#: src/language/stats/oneway.q:682
+msgid "Value of Contrast"
+msgstr "Valor de constraste"
+
+#: src/language/stats/oneway.q:684 src/language/stats/regression.q:200
+#: src/language/stats/t-test.q:751 src/language/stats/t-test.q:922
+#: src/language/stats/t-test.q:1009
+msgid "t"
+msgstr "t"
+
+#: src/language/stats/oneway.q:730
+msgid "Assume equal variances"
+msgstr "Se asume igualdad de varianzas"
+
+#: src/language/stats/oneway.q:734
+msgid "Does not assume equal"
+msgstr "No se asume igualdad"
+
+#: src/language/stats/rank.q:220
+#, c-format
+msgid "%s of %s by %s"
+msgstr "%s de %s para %s"
+
+#: src/language/stats/rank.q:225
+#, c-format
+msgid "%s of %s"
+msgstr "%s de %s"
+
+#: src/language/stats/rank.q:600
+msgid "Cannot create new rank variable.  All candidates in use."
+msgstr ""
+"No se puede crear la nueva variable de rangos.  Todos los candidatos están "
+"en uso."
+
+#: src/language/stats/rank.q:693
+msgid "Variables Created By RANK"
+msgstr "Variables creadas para RANK"
+
+#: src/language/stats/rank.q:717
+#, c-format
+msgid "%s into %s(%s of %s using %s BY %s)"
+msgstr "%s en %s(%s de %s utilizando %s BY %s)"
+
+#: src/language/stats/rank.q:727
+#, c-format
+msgid "%s into %s(%s of %s BY %s)"
+msgstr "%s en %s(%s de %s BY %s)"
+
+#: src/language/stats/rank.q:740
+#, c-format
+msgid "%s into %s(%s of %s using %s)"
+msgstr "%s en %s(%s de %s utilizando %s)"
+
+#: src/language/stats/rank.q:749
+#, c-format
+msgid "%s into %s(%s of %s)"
+msgstr "%s en %s(%s de %s)"
+
+#: src/language/stats/rank.q:761
+msgid ""
+"FRACTION has been specified, but NORMAL and PROPORTION rank functions have "
+"not been requested.  The FRACTION subcommand will be ignored."
+msgstr ""
+"Se ha especificado FRACTION, pero no se han pedido funciones de rango NORMAL "
+"o PROPORTION.  La suborden FRACTION será ignorada."
+
+#: src/language/stats/rank.q:852
+#, c-format
+msgid "Variable %s already exists."
+msgstr "La variable %s ya existe."
+
+#: src/language/stats/rank.q:857
+msgid "Too many variables in INTO clause."
+msgstr "Demasiadas variables a la cláusula INTO."
+
+#: src/language/stats/regression.q:156
+msgid "R Square"
+msgstr "R Cuadrada"
+
+#: src/language/stats/regression.q:157
+msgid "Adjusted R Square"
+msgstr "R Cuadrada Ajustada"
+
+#: src/language/stats/regression.q:158
+msgid "Std. Error of the Estimate"
+msgstr "Error estándard del Estimador"
+
+#: src/language/stats/regression.q:163
+msgid "Model Summary"
+msgstr "Resumen del modelo"
+
+#: src/language/stats/regression.q:197
+msgid "B"
+msgstr "B"
+
+#: src/language/stats/regression.q:199
+msgid "Beta"
+msgstr "Beta"
+
+#: src/language/stats/regression.q:202
+msgid "(Constant)"
+msgstr "(Constant)"
+
+#: src/language/stats/regression.q:254
+msgid "Coefficients"
+msgstr "Coeficientes"
+
+#: src/language/stats/regression.q:289 src/ui/gui/regression.ui:7
+msgid "Regression"
+msgstr "Regresión"
+
+#: src/language/stats/regression.q:370
+msgid "Model"
+msgstr "Modelo"
+
+#: src/language/stats/regression.q:371
+msgid "Covariances"
+msgstr "Covarianza"
+
+#: src/language/stats/regression.q:386
+msgid "Coefficient Correlations"
+msgstr "Correlaciones de Coeficientes"
+
+#: src/language/stats/regression.q:793
+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 "
+"meaningless."
+msgstr ""
+"La variable dependiente es igual a la variable independiente. La línea de "
+"minimos cuadrados es por tanto Y=X. Los errores estándard y los estadísticos "
+"relacionados podrian ser irrelevantes."
+
+#: src/language/stats/regression.q:891
+msgid "REGRESSION requires numeric variables."
+msgstr ""
+
+#: src/language/stats/regression.q:962
+msgid "No valid data found. This command was skipped."
+msgstr "No se han encontrado datos válidos. Se ignora esta orden."
+
+#: src/language/stats/reliability.q:421
+msgid "Reliability Statistics"
+msgstr "Estadísticas de fiabilidad"
+
+#: src/language/stats/reliability.q:462
+msgid "Item-Total Statistics"
+msgstr "Estadísticas de total de Ítems"
+
+#: src/language/stats/reliability.q:484
+msgid "Scale Mean if Item Deleted"
+msgstr "Escalar la mediana si se borra el elemento"
+
+#: src/language/stats/reliability.q:487
+msgid "Scale Variance if Item Deleted"
+msgstr "Escalar la varianza si se borra el elemento"
+
+#: src/language/stats/reliability.q:490
+msgid "Corrected Item-Total Correlation"
+msgstr "Correlación total-ítem corregida"
+
+#: src/language/stats/reliability.q:493
+msgid "Cronbach's Alpha if Item Deleted"
+msgstr "Alfa de Cronbach si se borra el elemento"
+
+#: src/language/stats/reliability.q:543 src/language/stats/reliability.q:562
+msgid "Cronbach's Alpha"
+msgstr "Alfa de Cronbach"
+
+#: src/language/stats/reliability.q:546 src/language/stats/reliability.q:571
+#: src/language/stats/reliability.q:582
+msgid "N of Items"
+msgstr "N de elementos"
+
+#: src/language/stats/reliability.q:565
+msgid "Part 1"
+msgstr "Parte 1"
+
+#: src/language/stats/reliability.q:576
+msgid "Part 2"
+msgstr "Parte 2"
+
+#: src/language/stats/reliability.q:587
+msgid "Total N of Items"
+msgstr "N total de elementos"
+
+#
+#: src/language/stats/reliability.q:590
+msgid "Correlation Between Forms"
+msgstr "Correlación entre formas"
+
+#: src/language/stats/reliability.q:594
+msgid "Spearman-Brown Coefficient"
+msgstr "Coeficiente de Spearman-Brown"
+
+#: src/language/stats/reliability.q:597
+msgid "Equal Length"
+msgstr "Ancho igual"
+
+#: src/language/stats/reliability.q:600
+msgid "Unequal Length"
+msgstr "Ancho desigual"
+
+#: src/language/stats/reliability.q:604
+msgid "Guttman Split-Half Coefficient"
+msgstr "Coeficiente Guttman de División en Mitades"
+
+#: src/language/stats/reliability.q:699
+msgid "Excluded"
+msgstr "Excluido"
+
+#: src/language/stats/reliability.q:707
+msgid "%"
+msgstr "%"
+
+#: src/language/stats/t-test.q:190
+msgid "Exactly one of TESTVAL, GROUPS and PAIRS subcommands must be specified."
+msgstr ""
+"Debe especificarse sólo uno de los subcomandos TESTVAL, GROUPS y PAIRS."
+
+#: src/language/stats/t-test.q:211
+msgid "VARIABLES subcommand may not be used with PAIRS."
+msgstr "La suborden VARIABLES no puede ser utilizada con PAIRS."
+
+#: src/language/stats/t-test.q:230
+msgid "One or more VARIABLES must be specified."
+msgstr "Una o más VARIABLES deben ser especificadas."
+
+#: src/language/stats/t-test.q:324
+msgid ""
+"When applying GROUPS to a string variable, two values must be specified."
+msgstr ""
+"Cuando se aplica GROUPS a una variable alfabética, se deben especificar dos "
+"valores."
+
+#: src/language/stats/t-test.q:395
+msgid "At least two variables must be specified on PAIRS."
+msgstr "Al menos dos variables se deben especificar en PAIRS."
+
+#: src/language/stats/t-test.q:503
+msgid "One-Sample Statistics"
+msgstr "Estadísticas de una muestra"
+
+#: src/language/stats/t-test.q:522
+msgid "Group Statistics"
+msgstr "Estadísticas de grupo"
+
+#: src/language/stats/t-test.q:621
+msgid "Paired Sample Statistics"
+msgstr "Estadísticas de muestras emparejadas"
+
+#: src/language/stats/t-test.q:641 src/language/stats/t-test.q:944
+#: src/language/stats/t-test.q:1111
+#, c-format
+msgid "Pair %d"
+msgstr "Pareja %d"
+
+#: src/language/stats/t-test.q:737
+msgid "Independent Samples Test"
+msgstr "Prueba para muestras independientes"
+
+#: src/language/stats/t-test.q:745
+msgid "Levene's Test for Equality of Variances"
+msgstr "Prueba de Levene para la igualdad de varianzas"
+
+#: src/language/stats/t-test.q:747
+msgid "t-test for Equality of Means"
+msgstr "Prueba T para la Igualdad de Medias"
+
+#: src/language/stats/t-test.q:750 src/language/stats/t-test.q:1103
+msgid "Sig."
+msgstr "Sign."
+
+#: src/language/stats/t-test.q:754 src/language/stats/t-test.q:1012
+msgid "Mean Difference"
+msgstr "Diferencia Media"
+
+#: src/language/stats/t-test.q:755
+msgid "Std. Error Difference"
+msgstr "Err.Est. de la Diferencia"
+
+#: src/language/stats/t-test.q:760 src/language/stats/t-test.q:914
+#: src/language/stats/t-test.q:1004
+#, c-format
+msgid "%g%% Confidence Interval of the Difference"
+msgstr "Intervalo de confianza %g%% de la Diferencia"
+
+#: src/language/stats/t-test.q:814
+msgid "Equal variances assumed"
+msgstr "Se asume igualdad de varianzas"
+
+#: src/language/stats/t-test.q:860
+msgid "Equal variances not assumed"
+msgstr "Igualdad de varianzas no asumida"
+
+#: src/language/stats/t-test.q:904
+msgid "Paired Samples Test"
+msgstr "Prueba de muestras emparejadas"
+
+#: src/language/stats/t-test.q:907
+msgid "Paired Differences"
+msgstr "Diferencias emparejadas"
+
+#: src/language/stats/t-test.q:919
+msgid "Std. Error Mean"
+msgstr "Error Est. Media"
+
+#: src/language/stats/t-test.q:993
+msgid "One-Sample Test"
+msgstr "Prueba de una muestra"
+
+#: src/language/stats/t-test.q:998
+#, c-format
+msgid "Test Value = %f"
+msgstr "Valor de prueba = %f"
+
+#: src/language/stats/t-test.q:1098
+msgid "Paired Samples Correlations"
+msgstr "Correlaciones de muestras emparejadas"
+
+#: src/language/stats/t-test.q:1102
+msgid "Correlation"
+msgstr "Correlación"
+
+#: src/language/stats/t-test.q:1113
+#, c-format
+msgid "%s & %s"
+msgstr "%s & %s"
+
+#: src/language/data-io/file-handle.q:65
+#, c-format
+msgid ""
+"File handle %s is already defined.  Use CLOSE FILE HANDLE before redefining "
+"a file handle."
+msgstr ""
+"El manipulador de archivo %s ya está definido.  Usar CLOSE FILE HANDLE antes "
+"de redefinir un manipulador de archivos."
+
+#: src/language/data-io/file-handle.q:120
+msgid "RECFORM must be specified with MODE=360."
+msgstr "RECFORM debe ser especificado con MODE=360."
+
+#: src/language/data-io/file-handle.q:131
+#, fuzzy, c-format
+msgid ""
+"The specified file mode requires LRECL.  Assuming %zu-character records."
+msgstr ""
+"El modo de archivo especificado requiere LRECL.  Se asume %d-registros de "
+"carácter."
+
+#: src/language/data-io/file-handle.q:135
+#, c-format
+msgid ""
+"Record length (%ld) must be between 1 and %lu bytes.  Assuming %d-character "
+"records."
+msgstr ""
+"El tamaño de registro (%ld) debe estar entre  1 y %lu bytes.  Se asume %d-"
+"registros de carácter."
+
+#: src/language/data-io/file-handle.q:177
+msgid "file"
+msgstr "archivo"
+
+#: src/language/data-io/file-handle.q:179
+msgid "inline file"
+msgstr "archivo en línea"
+
+#: src/language/data-io/file-handle.q:205
+msgid "expecting a file name or handle name"
+msgstr "esperando un nombre de archivo o un manipulador"
+
+#: src/language/data-io/file-handle.q:225
+#, c-format
+msgid "Handle for %s not allowed here."
+msgstr "Aquí no está permitido un manipulador para %s."
+
+#: src/language/data-io/list.q:99
+#, c-format
+msgid ""
+"The first case (%ld) specified precedes the last case (%ld) specified.  The "
+"values will be swapped."
+msgstr ""
+"El primer caso (%ld) especificado precede al último caso (%ld) "
+"especificado.  Los valores se intercanviarán."
+
+#: src/language/data-io/list.q:107
+#, c-format
+msgid ""
+"The first case (%ld) to list is less than 1.  The value is being reset to 1."
+msgstr "EL primer caso (%ld) a listar es menor que 1.  El valor se ajusta a 1."
+
+#: src/language/data-io/list.q:113
+#, c-format
+msgid ""
+"The last case (%ld) to list is less than 1.  The value is being reset to 1."
+msgstr "El último caso (%ld) a listar es menor que 1.  El valor se ajusta a 1."
+
+#: src/language/data-io/list.q:119
+#, c-format
+msgid "The step value %ld is less than 1.  The value is being reset to 1."
+msgstr "El valor de paso %ld es menor que 1.  El valor se ajusta a 1."
+
+#: src/ui/gui/binomial.ui:57 src/ui/gui/chi-square.ui:57
+#, fuzzy
+msgid "_Test Variable List:"
+msgstr "Variable(s) de contraste:"
+
+#: src/ui/gui/binomial.ui:126 src/ui/gui/chi-square.ui:126
+msgid "_Get from data"
+msgstr ""
+
+#: src/ui/gui/binomial.ui:143 src/ui/gui/t-test.ui:333
+msgid "_Cut point:"
+msgstr "Punto de corte:"
+
+#: src/ui/gui/binomial.ui:178
+msgid "Define Dichotomy"
+msgstr ""
+
+#: src/ui/gui/binomial.ui:197
+#, fuzzy
+msgid "Test _Proportion:"
+msgstr "Prop. Test"
+
+#: src/ui/gui/correlation.ui:7
+#, fuzzy
+msgid "Bivariate Correlations"
+msgstr "Correlación de Spearman"
+
+#: src/ui/gui/correlation.ui:108
+#, fuzzy
+msgid "Pearso_n"
+msgstr "R de Pearson"
+
+#: src/ui/gui/correlation.ui:123
+#, fuzzy
+msgid "_Kendall's tau-b"
+msgstr "Tau-B de Kendall"
+
+#: src/ui/gui/correlation.ui:138
+msgid "_Spearman"
+msgstr ""
+
+#: src/ui/gui/correlation.ui:158
+#, fuzzy
+msgid "Correlation Coefficients"
+msgstr "Coeficientes de Contraste"
+
+#: src/ui/gui/correlation.ui:182
+#, fuzzy
+msgid "_Two-tailed"
+msgstr "Total"
+
+#: src/ui/gui/correlation.ui:198
+msgid "One-tai_led"
+msgstr ""
+
+#: src/ui/gui/correlation.ui:220
+#, fuzzy
+msgid "Test of Significance"
+msgstr "Significatividad"
+
+#: src/ui/gui/correlation.ui:232
+#, fuzzy
+msgid "_Flag significant correlations"
+msgstr "Correlaciones de Coeficientes"
+
+#: src/ui/gui/crosstabs.ui:7
+#, fuzzy
+msgid "Crosstabs"
+msgstr "Tablas _Cruzadas"
+
+#: src/ui/gui/crosstabs.ui:50
+msgid "Rows"
+msgstr "Filas"
+
+#: src/ui/gui/crosstabs.ui:124
+msgid "Format..."
+msgstr "Formato..."
+
+#: src/ui/gui/crosstabs.ui:137 src/ui/gui/examine.ui:245
+#: src/ui/gui/regression.ui:27
+msgid "Statistics..."
+msgstr "Estadísticos..."
+
+#: src/ui/gui/crosstabs.ui:150
+msgid "Cells..."
+msgstr "Celdas..."
+
+#: src/ui/gui/crosstabs.ui:227
+#, fuzzy
+msgid "Crosstabs: Format"
+msgstr "Tablas _Cruzadas"
+
+#: src/ui/gui/crosstabs.ui:241
+msgid "Print tables"
+msgstr "Imprimir tablas"
+
+#: src/ui/gui/crosstabs.ui:254
+msgid "Pivot"
+msgstr "Pivot"
+
+#: src/ui/gui/crosstabs.ui:267 src/ui/gui/sort.ui:130
+msgid "Ascending"
+msgstr "Ascendente"
+
+#: src/ui/gui/crosstabs.ui:304
+msgid "No label"
+msgstr "Sin etiqueta"
+
+#: src/ui/gui/crosstabs.ui:317
+msgid "Suppress value labels"
+msgstr "Suprimir etiquetas de variable"
+
+#: src/ui/gui/crosstabs.ui:335
+msgid "Labeling"
+msgstr "Etiquetando"
+
+#: src/ui/gui/crosstabs.ui:369
+#, fuzzy
+msgid "Crosstabs: Cells"
+msgstr "Tablas _Cruzadas"
+
+#: src/ui/gui/crosstabs.ui:402
+msgid "Cell Display"
+msgstr "Contenido de celda"
+
+#: src/ui/gui/crosstabs.ui:430
+#, fuzzy
+msgid "Crosstabs: Statistics"
+msgstr "Pruebas Estadísticas"
+
+#: src/ui/gui/crosstabs.ui:463 src/ui/gui/oneway.ui:222
+#: src/ui/gui/regression.ui:340
+msgid "Statistics"
+msgstr "Estadísticas"
+
+#: src/ui/gui/chi-square.ui:13
+#, fuzzy
+msgid "Chi-Square Test"
+msgstr "Pruebas Chi-cuadrado."
+
+#: src/ui/gui/chi-square.ui:140
+#, fuzzy
+msgid "Use _specified range"
+msgstr "Utiliza valores especificados:"
+
+#: src/ui/gui/chi-square.ui:162
+#, fuzzy
+msgid "_Lower:"
+msgstr "Inferior"
+
+#: src/ui/gui/chi-square.ui:170
+#, fuzzy
+msgid "_Upper:"
+msgstr "Superior"
+
+#: src/ui/gui/chi-square.ui:214
+#, fuzzy
+msgid "Expected Range:"
+msgstr "N esperado"
+
+#: src/ui/gui/chi-square.ui:240
+msgid "All categor_ies equal"
+msgstr ""
+
+#: src/ui/gui/chi-square.ui:257
+#, fuzzy
+msgid "_Values"
+msgstr "Valores"
+
+#: src/ui/gui/chi-square.ui:301
+#, fuzzy
+msgid "Expected Values:"
+msgstr "Valores extremos"
+
+#: src/ui/gui/descriptives.ui:130 src/ui/gui/frequencies.ui:140
+msgid "Statistics:"
+msgstr "Estadísticas:"
+
+#: src/ui/gui/descriptives.ui:192
+msgid "Exclude entire case if any selected variable is missing"
+msgstr "Excluir todo el caso si cualquier variable tiene valor perdido"
+
+#: src/ui/gui/descriptives.ui:207
+msgid "Include user-missing data in analysis"
+msgstr "Incluir los valores perdidos de usuario en el análisis"
+
+#: src/ui/gui/descriptives.ui:222
+msgid "Save Z-scores of selected variables as new variables"
+msgstr ""
+"Guardar puntuaciones-Z de las variables seleccionadas como nuevas variables"
+
+#: src/ui/gui/descriptives.ui:243
+msgid "Options:"
+msgstr "Opciones:"
+
+#: src/ui/gui/examine.ui:8
+#, fuzzy
+msgid "Explore"
+msgstr "_Explorar"
+
+#: src/ui/gui/examine.ui:51
+msgid "Label Cases by:"
+msgstr "Etiquetar casos con:"
+
+#: src/ui/gui/examine.ui:99
+msgid "Factor List:"
+msgstr "Lista de Factores:"
+
+#: src/ui/gui/examine.ui:146
+msgid "Dependent List:"
+msgstr "Lista de Dependientes:"
+
+#: src/ui/gui/examine.ui:259 src/ui/gui/t-test.ui:68 src/ui/gui/t-test.ui:658
+#: src/ui/gui/t-test.ui:819
+msgid "Options..."
+msgstr "Opciones..."
+
+#: src/ui/gui/examine.ui:302
+#, fuzzy
+msgid "Explore: Statistics"
+msgstr "Pruebas Estadísticas"
+
+#: src/ui/gui/examine.ui:332
+msgid "Extremes"
+msgstr "Extremos"
+
+#: src/ui/gui/examine.ui:381
+msgid "Explore: Options"
+msgstr ""
+
+#: src/ui/gui/examine.ui:405
+msgid "Exclude cases listwise"
+msgstr "Excluir casos según lista"
+
+#: src/ui/gui/examine.ui:419
+msgid "Exclude cases pairwise"
+msgstr "Excluir casos por parejas"
+
+#: src/ui/gui/examine.ui:434
+msgid "Repeat values"
+msgstr "Repetir valores"
+
+#: src/ui/gui/examine.ui:455 src/ui/gui/t-test.ui:493
+#: src/ui/gui/var-sheet-dialogs.ui:684
+msgid "Missing Values"
+msgstr "Valores perdidos"
+
+#: src/ui/gui/factor.ui:21
+#, fuzzy
+msgid "Factor Analysis"
+msgstr "Lista de Factores:"
+
+#: src/ui/gui/factor.ui:47
+#, fuzzy
+msgid "_Descriptives..."
+msgstr "Descriptivos"
+
+#: src/ui/gui/factor.ui:60
+#, fuzzy
+msgid "_Extraction..."
+msgstr "Opciones..."
+
+#: src/ui/gui/factor.ui:74
+#, fuzzy
+msgid "_Rotations..."
+msgstr "Opciones..."
+
+#: src/ui/gui/factor.ui:192
+msgid "Factor Analysis: Extraction"
+msgstr ""
+
+#: src/ui/gui/factor.ui:216
+#, fuzzy
+msgid "Method: "
+msgstr "Modo:"
+
+#: src/ui/gui/factor.ui:266
+#, fuzzy
+msgid "Correlation matrix"
+msgstr "Correlación"
+
+#: src/ui/gui/factor.ui:280
+#, fuzzy
+msgid "Covariance matrix"
+msgstr "Covarianza"
+
+#: src/ui/gui/factor.ui:300
+#, fuzzy
+msgid "Analyse"
+msgstr "_Analizar"
+
+#: src/ui/gui/factor.ui:324
+msgid "Unrotatated factor solution"
+msgstr ""
+
+#: src/ui/gui/factor.ui:338
+msgid "Scree plot"
+msgstr ""
+
+#: src/ui/gui/factor.ui:357 src/ui/gui/roc.ui:286
+#, fuzzy
+msgid "Display"
+msgstr "Contenido de celda"
+
+#: src/ui/gui/factor.ui:430
+msgid "Number of factors:"
+msgstr ""
+
+#: src/ui/gui/factor.ui:460
+#, fuzzy
+msgid "Extract"
+msgstr "Eta"
+
+#: src/ui/gui/factor.ui:475 src/ui/gui/factor.ui:665
+msgid "Maximum iterations for convergence:"
+msgstr ""
+
+#: src/ui/gui/factor.ui:538
+#, fuzzy
+msgid "Factor Analysis: Rotation"
+msgstr "Lista de Factores:"
+
+#: src/ui/gui/factor.ui:571
+#, fuzzy
+msgid "_None"
+msgstr "Ninguno"
+
+#: src/ui/gui/factor.ui:582
+#, fuzzy
+msgid "_Varimax"
+msgstr "_Variables"
+
+#: src/ui/gui/factor.ui:598
+msgid "_Quartimax"
+msgstr ""
+
+#: src/ui/gui/factor.ui:614
+msgid "_Equimax"
+msgstr ""
+
+#: src/ui/gui/factor.ui:637
+#, fuzzy
+msgid "Method"
+msgstr "Modo:"
+
+#: src/ui/gui/factor.ui:648
+#, fuzzy
+msgid "_Display rotated solution"
+msgstr "Muestra _información del archivo de datos"
+
+#: src/ui/gui/find.ui:8
+#, fuzzy
+msgid "Find Case"
+msgstr "Rango de Casos"
+
+#: src/ui/gui/find.ui:88
+msgid "Variable:"
+msgstr "Variable:"
+
+#: src/ui/gui/find.ui:124 src/ui/gui/recode.ui:173
+#: src/ui/gui/var-sheet-dialogs.ui:531
+msgid "Value:"
+msgstr "Valor:"
+
+#: src/ui/gui/find.ui:147
+msgid "Search value labels"
+msgstr "Buscar etiquetas de valor"
+
+#: src/ui/gui/find.ui:171
+msgid "Regular expression Match"
+msgstr "Expresión regular coincidente"
+
+#: src/ui/gui/find.ui:187
+msgid "Search substrings"
+msgstr "Buscar subcadenas"
+
+#: src/ui/gui/find.ui:203
+msgid "Wrap around"
+msgstr "Envolver"
+
+#: src/ui/gui/find.ui:218
+msgid "Search backward"
+msgstr "Buscar hacia atrás"
+
+#: src/ui/gui/frequencies.ui:102 src/ui/gui/psppire.ui:282
+#: src/ui/gui/rank.ui:105
+msgid "Variable(s):"
+msgstr "Variable(s):"
+
+#: src/ui/gui/frequencies.ui:151
+#, fuzzy
+msgid "Include missing values"
+msgstr "Si_n valores perdidos"
+
+#: src/ui/gui/frequencies.ui:189
+#, fuzzy
+msgid "Charts..."
+msgstr "_Contrastes..."
+
+#: src/ui/gui/frequencies.ui:201
+#, fuzzy
+msgid "Frequency Tables..."
+msgstr "Variable de Frecuencia"
+
+#: src/ui/gui/frequencies.ui:251
+#, fuzzy
+msgid "Frequencies: Frequency Tables"
+msgstr "Mostrar la tabla de frecuencias"
+
+#: src/ui/gui/frequencies.ui:281
+msgid "Always"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:297
+#, fuzzy
+msgid "Never"
+msgstr "Negativo"
+
+#: src/ui/gui/frequencies.ui:316
+msgid "If no more than "
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:347
+#, fuzzy
+msgid "values"
+msgstr "Valores"
+
+#: src/ui/gui/frequencies.ui:368
+#, fuzzy
+msgid "Display frequency tables"
+msgstr "Mostrar la tabla de frecuencias"
+
+#: src/ui/gui/frequencies.ui:396
+#, fuzzy
+msgid "Ascending value"
+msgstr "Ascendente"
+
+#: src/ui/gui/frequencies.ui:412
+#, fuzzy
+msgid "Descending value"
+msgstr "Descendente"
+
+#: src/ui/gui/frequencies.ui:428
+#, fuzzy
+msgid "Ascending frequency"
+msgstr "Orden Ascendente"
+
+#: src/ui/gui/frequencies.ui:444
+#, fuzzy
+msgid "Descending frequency"
+msgstr "Orden Descendente"
+
+#: src/ui/gui/frequencies.ui:466
+msgid "Order by"
+msgstr "Ordenado por"
+
+#: src/ui/gui/frequencies.ui:508
+#, fuzzy
+msgid "Frequencies: Charts"
+msgstr "Frecuencias"
+
+#: src/ui/gui/frequencies.ui:536
+#, fuzzy
+msgid "Exclude values below "
+msgstr "Excluir casos según lista"
+
+#: src/ui/gui/frequencies.ui:571
+#, fuzzy
+msgid "Exclude values above "
+msgstr "Excluir casos por parejas"
+
+#: src/ui/gui/frequencies.ui:609
+#, fuzzy
+msgid "<b>Chart Formatting</b>"
+msgstr "<b>Comillas</b>"
+
+#: src/ui/gui/frequencies.ui:633
+msgid "Draw histograms"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:645
+msgid "Superimpose normal curve"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:661
+#, fuzzy
+msgid "Scale:"
+msgstr "Escala"
+
+#: src/ui/gui/frequencies.ui:682
+#, fuzzy
+msgid "Percentages"
+msgstr "Percentiles"
+
+#: src/ui/gui/frequencies.ui:705
+#, fuzzy
+msgid "<b>Histograms</b>"
+msgstr "<b>Separadores</b>"
+
+#: src/ui/gui/frequencies.ui:729
+msgid "Draw pie charts"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:741
+#, fuzzy
+msgid "Include slices for missing values"
+msgstr "Valores perdidos _Discretos"
+
+#: src/ui/gui/frequencies.ui:758
+#, fuzzy
+msgid "<b>Pie Charts</b>"
+msgstr "<b>Separadores</b>"
+
+#: src/ui/gui/oneway.ui:8
+#, fuzzy
+msgid "One-Way ANOVA"
+msgstr "_ANOVA de un factor"
+
+#: src/ui/gui/oneway.ui:31
+msgid "_Factor:"
+msgstr "_Factor:"
+
+#: src/ui/gui/oneway.ui:69
+msgid "Dependent _Variable(s):"
+msgstr "_Variable(s) Dependientes:"
+
+#: src/ui/gui/oneway.ui:184 src/ui/gui/data-editor.ui:328
+msgid "_Descriptives"
+msgstr "_Descriptivos"
+
+#: src/ui/gui/oneway.ui:200
+msgid "_Homogeneity"
+msgstr "_Homogeneidad"
+
+#: src/ui/gui/oneway.ui:238
+msgid "_Contrasts..."
+msgstr "_Contrastes..."
+
+#: src/ui/gui/oneway.ui:292
+#, fuzzy
+msgid "One-Way ANOVA: Contrasts"
+msgstr "_ANOVA de un factor"
+
+#: src/ui/gui/oneway.ui:369
+msgid "_Coefficients:"
+msgstr "_Coeficientes:"
+
+#: src/ui/gui/oneway.ui:416
+msgid "Coefficient Total: "
+msgstr "Coeficiente Total: "
+
+#: src/ui/gui/oneway.ui:452
+msgid "Contrast 1 of 1"
+msgstr "Contraste 1 de 1"
+
+#: src/ui/gui/psppire.ui:7
+msgid "Weight Cases"
+msgstr "Ponderar Casos"
+
+#: src/ui/gui/psppire.ui:66
+msgid "Weight cases by"
+msgstr "Ponderar casos por"
+
+#: src/ui/gui/psppire.ui:102
+msgid "Frequency Variable"
+msgstr "Variable de Frecuencia"
+
+#: src/ui/gui/psppire.ui:145
+msgid "Current Status: "
+msgstr "Estatus actual: "
+
+#: src/ui/gui/psppire.ui:195
+#, fuzzy
+msgid "Transpose"
+msgstr "_Trasponer"
+
+#: src/ui/gui/psppire.ui:247
+msgid "Name Variable:"
+msgstr "Nombre de Variable:"
+
+#: src/ui/gui/psppire.ui:383
+msgid "Split File"
+msgstr "Dividir Archivo"
+
+#: src/ui/gui/psppire.ui:443
+msgid "Analyze all cases.  Do not create groups."
+msgstr "Analizar todos los casos.  No crear grupos."
+
+#: src/ui/gui/psppire.ui:459
+msgid "Compare groups."
+msgstr "Comparar grupos."
+
+#: src/ui/gui/psppire.ui:475
+msgid "Organize output by groups."
+msgstr "Organizar los resultados por grupos."
+
+#: src/ui/gui/psppire.ui:533
+msgid "Groups based on:"
+msgstr "Grupos basados en:"
+
+#: src/ui/gui/psppire.ui:592
+msgid "Sort the file by grouping variables."
+msgstr "Ordenar el archivo por variables de agrupación."
+
+#: src/ui/gui/psppire.ui:609
+msgid "File is already sorted."
+msgstr "EL archivo ya está ordenado."
+
+#: src/ui/gui/psppire.ui:662
+msgid "Current Status : "
+msgstr "Estatus actual : "
+
+#: src/ui/gui/psppire.ui:673
+msgid "Analysis by groups is off"
+msgstr "El análisis por grupos está activado"
+
+#: src/ui/gui/psppire.ui:709
+#, fuzzy
+msgid "Compute Variable"
+msgstr "Variables de salida"
+
+#: src/ui/gui/psppire.ui:742
+msgid "Target Variable:"
+msgstr "Variable objetivo:"
+
+#: src/ui/gui/psppire.ui:771
+msgid "Type & Label"
+msgstr "Tipos y Etiquetas"
+
+#: src/ui/gui/psppire.ui:818
+msgid "="
+msgstr "="
+
+#: src/ui/gui/psppire.ui:872
+msgid "Numeric Expressions:"
+msgstr "Expresiones Numéricas:"
+
+#: src/ui/gui/psppire.ui:934
+msgid "Functions:"
+msgstr "Funciones:"
+
+#: src/ui/gui/psppire.ui:999 src/ui/gui/psppire.ui:1422
+#: src/ui/gui/recode.ui:741
+msgid "If..."
+msgstr "Si..."
+
+#: src/ui/gui/psppire.ui:1052
+msgid "Select Cases"
+msgstr "Seleccionar casos"
+
+#: src/ui/gui/psppire.ui:1240
+msgid "Use filter variable"
+msgstr "Utilizar variable de filtro"
+
+#: src/ui/gui/psppire.ui:1299
+msgid "Based on time or case range"
+msgstr "Basado en intervalo de tiempos o casos"
+
+#: src/ui/gui/psppire.ui:1311
+msgid "Range..."
+msgstr "Intervalo..."
+
+#: src/ui/gui/psppire.ui:1355
+msgid "Random sample of cases"
+msgstr "Muestra aleatoria de casos"
+
+#: src/ui/gui/psppire.ui:1368
+msgid "Sample..."
+msgstr "Muestra..."
+
+#: src/ui/gui/psppire.ui:1410
+msgid "If condition is satisfied"
+msgstr "Si la condición se satisface"
+
+#: src/ui/gui/psppire.ui:1462
+msgid "All Cases"
+msgstr "Todos los Casos"
+
+#: src/ui/gui/psppire.ui:1477
+msgid "Select"
+msgstr "Seleccionar"
+
+#: src/ui/gui/psppire.ui:1504
+msgid "Filtered"
+msgstr "Filtrado"
+
+#: src/ui/gui/psppire.ui:1520
+msgid "Deleted"
+msgstr "Eliminado"
+
+#: src/ui/gui/psppire.ui:1543
+msgid "Unselected Cases Are"
+msgstr "Los casos no seleccionados són"
+
+#: src/ui/gui/psppire.ui:1585
+#, fuzzy
+msgid "Data File Comments"
+msgstr "_Comentarios al archivo de datos"
+
+#: src/ui/gui/psppire.ui:1609
+msgid "Comments:"
+msgstr "Comentarios:"
+
+#: src/ui/gui/psppire.ui:1650
+msgid "Display comments in output"
+msgstr "Mostrar comentarios en el resultado"
+
+#: src/ui/gui/psppire.ui:1669
+msgid "Column Number: 0"
+msgstr "Columna Número: 0"
+
+#: src/ui/gui/psppire.ui:1703
+#, fuzzy
+msgid "Select Cases: Range"
+msgstr "Seleccionar casos"
+
+#: src/ui/gui/psppire.ui:1750
+msgid "First case"
+msgstr "Primer caso"
+
+#: src/ui/gui/psppire.ui:1763
+msgid "Last case"
+msgstr "Último caso"
+
+#: src/ui/gui/psppire.ui:1776
+msgid "Observation"
+msgstr "Observación"
+
+#: src/ui/gui/psppire.ui:1808
+msgid "Compute Variable: Type and Label"
+msgstr ""
+
+#: src/ui/gui/psppire.ui:1843
+msgid "Use expression as label"
+msgstr "Utilizar la expresión como etiqueta"
+
+#: src/ui/gui/psppire.ui:2088
+#, fuzzy
+msgid "Goto Case"
+msgstr "Ir al Caso"
+
+#: src/ui/gui/psppire.ui:2106
+msgid "Goto Case Number:"
+msgstr "Ir al caso número:"
+
+#: src/ui/gui/psppire.ui:2149
+#, fuzzy
+msgid "Select Cases: Random Sample"
+msgstr "Seleccionar casos"
+
+#: src/ui/gui/psppire.ui:2247
+msgid "Sample Size"
+msgstr "Tamaño de muestra"
+
+#: src/ui/gui/rank.ui:8
+msgid "Rank Cases"
+msgstr "Rango de Casos"
+
+#: src/ui/gui/rank.ui:58
+msgid "By:"
+msgstr "Por:"
+
+#: src/ui/gui/rank.ui:204
+msgid "_Smallest Value"
+msgstr "Valor Inferior"
+
+#: src/ui/gui/rank.ui:221
+msgid "_Largest Value"
+msgstr "Valor Superior"
+
+#: src/ui/gui/rank.ui:245
+msgid "Assign rank 1 to:"
+msgstr "Asigna rango 1 a:"
+
+#: src/ui/gui/rank.ui:261
+msgid "_Display summary tables"
+msgstr "Muestra tablas resumen"
+
+#: src/ui/gui/rank.ui:279
+msgid "Rank T_ypes"
+msgstr "Tipos de Rango"
+
+#: src/ui/gui/rank.ui:294
+msgid "_Ties..."
+msgstr "Vínculos..."
+
+#: src/ui/gui/rank.ui:346
+#, fuzzy
+msgid "Rank Cases: Types"
+msgstr "Rango de Casos"
+
+#: src/ui/gui/rank.ui:366
+msgid "Sum of case weights"
+msgstr "Suma de casos ponderados"
+
+#: src/ui/gui/rank.ui:382
+msgid "Fractional rank as %"
+msgstr "Rango fraccional como %"
+
+#: src/ui/gui/rank.ui:396
+msgid "Fractional rank"
+msgstr "Rango fraccional"
+
+#: src/ui/gui/rank.ui:410
+msgid "Savage score"
+msgstr "Puntuación Savage"
+
+#: src/ui/gui/rank.ui:424
+msgid "Rank"
+msgstr "Rango"
+
+#: src/ui/gui/rank.ui:438
+msgid "Ntiles"
+msgstr "Ntiles"
+
+#: src/ui/gui/rank.ui:481
+msgid "Proportion Estimates"
+msgstr "Estimación de Proporciones"
+
+#: src/ui/gui/rank.ui:494
+msgid "Normal Scores"
+msgstr "Puntuación Normal"
+
+#: src/ui/gui/rank.ui:529
+msgid "Blom"
+msgstr "Blom"
+
+#: src/ui/gui/rank.ui:543
+msgid "Tukey"
+msgstr "Tukey"
+
+#: src/ui/gui/rank.ui:557
+msgid "Rankit"
+msgstr "Rankit"
+
+#: src/ui/gui/rank.ui:571
+msgid "Van der Wärden"
+msgstr "Van der Wärden"
+
+#: src/ui/gui/rank.ui:591
+msgid "Proportion Estimation Formula"
+msgstr "Fórmula de estimación de Proporciones"
+
+#: src/ui/gui/rank.ui:625
+#, fuzzy
+msgid "Rank Cases: Ties"
+msgstr "Rango de Casos"
+
+#: src/ui/gui/rank.ui:651
+msgid "_Mean"
+msgstr "_Media"
+
+#: src/ui/gui/rank.ui:668
+msgid "_Low"
+msgstr "Bajo"
+
+#: src/ui/gui/rank.ui:686
+msgid "_High"
+msgstr "Superior"
+
+#: src/ui/gui/rank.ui:709
+msgid "_Sequential ranks to unique values"
+msgstr "Rangos _Secuenciales para valores únicos"
+
+#: src/ui/gui/rank.ui:732
+msgid "Rank Assigned to Ties"
+msgstr "Rango asignado a empates"
+
+#: src/ui/gui/sort.ui:8
+#, fuzzy
+msgid "Sort Cases"
+msgstr "Ordenar Caso_s"
+
+#: src/ui/gui/sort.ui:79
+msgid "Sort by:"
+msgstr "Ordenado por:"
+
+#: src/ui/gui/sort.ui:146
+msgid "Descending"
+msgstr "Descendente"
+
+#: src/ui/gui/sort.ui:168
+msgid "Sort Order"
+msgstr "Ordenación"
+
+#: src/ui/gui/recode.ui:185 src/ui/gui/recode.ui:467
+msgid "System Missing"
+msgstr "Perdido del Sistema"
+
+#: src/ui/gui/recode.ui:199
+#, fuzzy
+msgid "System or User Missing"
+msgstr "Perdido de sistema o de usuario"
+
+#: src/ui/gui/recode.ui:237
+msgid "through"
+msgstr "hasta"
+
+#: src/ui/gui/recode.ui:275
+msgid "Range, LOWEST thru value"
+msgstr "Intervalo, del MÍNIMO hasta el valor"
+
+#: src/ui/gui/recode.ui:289
+msgid "Range, value thru HIGHEST"
+msgstr "Intervalo, del valor hasta el SUPREMO"
+
+#: src/ui/gui/recode.ui:319
+msgid "All other values"
+msgstr "El resto de valores"
+
+#: src/ui/gui/recode.ui:355
+msgid "Range:"
+msgstr "Intervalo:"
+
+#: src/ui/gui/recode.ui:384
+msgid "Old Value"
+msgstr "Valor anterior"
+
+#: src/ui/gui/recode.ui:481
+msgid "Copy old values"
+msgstr "Copiar los valores anteriores"
+
+#: src/ui/gui/recode.ui:505
+msgid "Value: "
+msgstr "Valor: "
+
+#: src/ui/gui/recode.ui:538
+msgid "New Value"
+msgstr "Nuevo Valor"
+
+#: src/ui/gui/recode.ui:596
+msgid "Convert numeric strings to numbers ('5' -> 5)"
+msgstr "Convertir cadenas numéricas a números ('5' -> 5)"
+
+#: src/ui/gui/recode.ui:614
+msgid "Output variables are strings"
+msgstr "Las variables de salida son alfabéticas"
+
+#: src/ui/gui/recode.ui:629
+msgid "Width: "
+msgstr "Ancho: "
+
+#: src/ui/gui/recode.ui:757
+msgid "(optional case selection condition)"
+msgstr "(condición opcional de selección de casos)"
+
+#: src/ui/gui/recode.ui:838
+msgid "Name:"
+msgstr "Nombre:"
+
+#: src/ui/gui/recode.ui:881
+msgid "Change"
+msgstr "Cambio"
+
+#: src/ui/gui/recode.ui:907
+msgid "Output Variable"
+msgstr "Variables de salida"
+
+#: src/ui/gui/recode.ui:981
+msgid "Old and New Values"
+msgstr "Valores anteriores y nuevos"
+
+#: src/ui/gui/regression.ui:41
+msgid "Save..."
+msgstr "Guardar..."
+
+#: src/ui/gui/regression.ui:156
+msgid "Dependent"
+msgstr "Dependiente"
+
+#: src/ui/gui/regression.ui:201
+msgid "Independent"
+msgstr "Independiente"
+
+#: src/ui/gui/regression.ui:236
+#, fuzzy
+msgid "Regression: Save"
+msgstr "Regresión"
+
+#: src/ui/gui/regression.ui:250
+msgid "Predicted values"
+msgstr "Valores predichos"
+
+#: src/ui/gui/regression.ui:263
+msgid "Residuals"
+msgstr "Residuales"
+
+#: src/ui/gui/regression.ui:298
+#, fuzzy
+msgid "Regression: Statistics"
+msgstr "Pruebas Estadísticas"
+
+#: src/ui/gui/reliability.ui:27
+msgid "Reliability Analysis"
+msgstr "Análisis de Fiabilidad"
+
+#: src/ui/gui/reliability.ui:114
+msgid "_Items:"
+msgstr "_Items:"
+
+#: src/ui/gui/reliability.ui:136
+msgid "Model:\t"
+msgstr "Modelo:\t"
+
+#: src/ui/gui/reliability.ui:175
+msgid "Variables in first split:"
+msgstr "Variables a primera división:"
+
+#: src/ui/gui/roc.ui:115
+#, fuzzy
+msgid "_Test Variable:"
+msgstr "Variable(s) de contraste:"
+
+#: src/ui/gui/roc.ui:147
+#, fuzzy
+msgid "_State Variable:"
+msgstr "Nombre de Variable:"
+
+#: src/ui/gui/roc.ui:172
+#, fuzzy
+msgid "_Value of state variable:"
+msgstr "Utilizar variable de filtro"
+
+#: src/ui/gui/roc.ui:209
+#, fuzzy
+msgid "ROC C_urve"
+msgstr "Curva ROC"
+
+#: src/ui/gui/roc.ui:227
+msgid "_With diagonal reference line"
+msgstr ""
+
+#: src/ui/gui/roc.ui:251
+#, fuzzy
+msgid "Standard _Error and Confidence Interval"
+msgstr "Intervalo de Confianza del 95%%"
+
+#: src/ui/gui/roc.ui:266
+#, fuzzy
+msgid "_Coordinate points of the ROC Curve"
+msgstr "Coordenadas de la Curva"
+
+#: src/ui/gui/t-test.ui:8
+#, fuzzy
+msgid "Independent-Samples T Test"
+msgstr "Prueba T para muestras _Independientes"
+
+#: src/ui/gui/t-test.ui:54 src/ui/gui/t-test.ui:175 src/ui/gui/t-test.ui:231
+msgid "Define Groups"
+msgstr "Definir Grupos"
+
+#: src/ui/gui/t-test.ui:131 src/ui/gui/t-test.ui:584 src/ui/gui/t-test.ui:803
+msgid "Test Variable(s):"
+msgstr "Variable(s) de contraste:"
+
+#: src/ui/gui/t-test.ui:271
+msgid "Group_2 value:"
+msgstr "Valor del grupo 2:"
+
+#: src/ui/gui/t-test.ui:284
+msgid "Group_1 value:"
+msgstr "Valor del Grupo 1:"
+
+#: src/ui/gui/t-test.ui:365
+msgid "_Use specified values:"
+msgstr "Utiliza valores especificados:"
+
+#: src/ui/gui/t-test.ui:420
+#, fuzzy
+msgid "Options"
+msgstr "Opciones:"
+
+#: src/ui/gui/t-test.ui:452
+msgid "Exclude cases _analysis by analysis"
+msgstr "Excluir casos _análisis por análìsis"
+
+#: src/ui/gui/t-test.ui:469
+msgid "Exclude cases _listwise"
+msgstr "Excluir casos según _lista"
+
+#: src/ui/gui/t-test.ui:529
+#, fuzzy
+msgid "One - Sample T Test"
+msgstr "Prueba T para una muestra"
+
+#: src/ui/gui/t-test.ui:626
+msgid "Test Value: "
+msgstr "Valor de Contraste: "
+
+#: src/ui/gui/t-test.ui:704
+#, fuzzy
+msgid "Paired Samples T Test"
+msgstr "Prueba T para muestras Em_parejadas"
+
+#: src/ui/gui/text-data-import.ui:8
+msgid "Importing Textual Data"
+msgstr "Importando datos textuales"
+
+#: src/ui/gui/text-data-import.ui:19
+msgid ""
+"This assistant will guide you through the process of importing data into "
+"PSPP from a text file with one line per case,  in which fields are separated "
+"by tabs, commas, or other delimiters.\n"
+"\n"
+"The selected file contains N lines of text.  Only the first M of these will "
+"be shown for preview purposes in the following screens.  You may choose "
+"below how much of the file should actually be imported."
+msgstr ""
+"Este asistente te quiará a lo largo del proceso de importar datos al PSPP "
+"desde un archivo de texto con una línea por caso,  en el cual los campos "
+"están separados por tabuladores, comas, u otros delimitadores.\n"
+"\n"
+"El archivo seleccionado contiene N líneas de texto.  Solo las primeras M se "
+"mostrarán como previsualización en las pantallas siguientes.  Puedes escoger "
+"a continuación qué parte del archivo ha de ser importado."
+
+#: src/ui/gui/text-data-import.ui:52
+msgid "All cases"
+msgstr "Todos los casos"
+
+#: src/ui/gui/text-data-import.ui:71 src/ui/gui/text-data-import.ui:128
+msgid "Only first "
+msgstr "Solo el primero"
+
+#: src/ui/gui/text-data-import.ui:106
+msgid " cases"
+msgstr " casos"
+
+#: src/ui/gui/text-data-import.ui:162
+msgid "% of file (approximately)"
+msgstr "% del archivo (aproximadamente)"
+
+#: src/ui/gui/text-data-import.ui:183
+msgid "<b>Amount to Import</b>"
+msgstr "<b>Cantidad a importar</b>"
+
+#: src/ui/gui/text-data-import.ui:202
+msgid "Select Data to Import"
+msgstr "Seleccionar datos para importar"
+
+#: src/ui/gui/text-data-import.ui:213
+msgid "Select the first line of the data file that contains data."
+msgstr "Seleccionar la primera línea del archivo que contiene datos."
+
+#: src/ui/gui/text-data-import.ui:241
+msgid "Line above selected line contains variable names"
+msgstr ""
+"La línea por encima de la seleccionada contiene los nombres de las variables"
+
+#: src/ui/gui/text-data-import.ui:259
+msgid "Choose Separators"
+msgstr "Escoger los separadores"
+
+#: src/ui/gui/text-data-import.ui:305
+msgid "C_ustom"
+msgstr "_Usuario"
+
+#: src/ui/gui/text-data-import.ui:320
+msgid "Slas_h (/)"
+msgstr "Barra (/)"
+
+#: src/ui/gui/text-data-import.ui:337
+msgid "Semicolo_n (;)"
+msgstr "Punto y coma (;)"
+
+#: src/ui/gui/text-data-import.ui:354
+msgid "P_ipe (|)"
+msgstr "Tub (|)"
+
+#: src/ui/gui/text-data-import.ui:369
+msgid "H_yphen (-)"
+msgstr "Guión (-)"
+
+#: src/ui/gui/text-data-import.ui:386
+msgid "Co_mma (,)"
+msgstr "Coma (,)"
+
+#: src/ui/gui/text-data-import.ui:403
+msgid "_Colon (:)"
+msgstr "Dos puntos (:)"
+
+#: src/ui/gui/text-data-import.ui:418
+msgid "Ban_g (!)"
+msgstr "Exclamación (!)"
+
+#: src/ui/gui/text-data-import.ui:433
+msgid "Ta_b"
+msgstr "Tabulador"
+
+#: src/ui/gui/text-data-import.ui:448
+msgid "_Space"
+msgstr "E_spacio"
+
+#: src/ui/gui/text-data-import.ui:465
+msgid "<b>Separators</b>"
+msgstr "<b>Separadores</b>"
+
+#: src/ui/gui/text-data-import.ui:495
+msgid "Doubled quote mark treated as escape"
+msgstr "Las dobles-comillas se tratan como ESCAPE"
+
+#: src/ui/gui/text-data-import.ui:524
+msgid "Quote separator characters with"
+msgstr "Anchura de caracteres separadores con comillas"
+
+#: src/ui/gui/text-data-import.ui:544
+msgid "<b>Quoting</b>"
+msgstr "<b>Comillas</b>"
+
+#: src/ui/gui/text-data-import.ui:592
+msgid "<b>Fields Preview</b>"
+msgstr "<b>Previsualizar Campos</b>"
+
+#: src/ui/gui/text-data-import.ui:607
+msgid "Adjust Variable Formats"
+msgstr "Ajustar formato de variables"
+
+#: src/ui/gui/text-data-import.ui:618
+msgid ""
+"Check the data formats displayed below and fix any that are incorrect.  You "
+"may set other variable properties now or later."
+msgstr ""
+"Comprueba los formatos de los datos mostrados a continuación y corrige los "
+"problemas.  Se pueden asignar propiedades de las variables ahora o más "
+"adelante."
+
+#: src/ui/gui/text-data-import.ui:662
+msgid "<b>Variables</b>"
+msgstr "<b>Variables</b>"
+
+#: src/ui/gui/text-data-import.ui:705
+msgid "<b>Data Preview</b>"
+msgstr "<b>Previsualización de datos</b>"
+
+#: src/ui/gui/var-sheet-dialogs.ui:7
+msgid "Variable Type"
+msgstr "Tipo de Variable"
+
+#: src/ui/gui/var-sheet-dialogs.ui:75
+msgid "Scientific notation"
+msgstr "Notación científica"
+
+#: src/ui/gui/var-sheet-dialogs.ui:123
+msgid "Custom currency"
+msgstr "Moneda propia"
+
+#: src/ui/gui/var-sheet-dialogs.ui:225
+msgid "positive"
+msgstr "positivo"
+
+#: src/ui/gui/var-sheet-dialogs.ui:234
+msgid "negative"
+msgstr "negativo"
+
+#: src/ui/gui/var-sheet-dialogs.ui:247
+msgid "Sample"
+msgstr "Muestra"
+
+#: src/ui/gui/var-sheet-dialogs.ui:294
+msgid "Width:"
+msgstr "Ancho:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:339
+msgid "Decimal Places:"
+msgstr "Lugares decimales:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:419 src/ui/gui/var-sheet-dialogs.ui:610
+msgid "Value Labels"
+msgstr "Etiquetas de Valor"
+
+#: src/ui/gui/var-sheet-dialogs.ui:518
+msgid "Value Label:"
+msgstr "Etiqueta de Valor:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:711
+msgid "_No missing values"
+msgstr "Si_n valores perdidos"
+
+#: src/ui/gui/var-sheet-dialogs.ui:782
+msgid "_Discrete missing values"
+msgstr "Valores perdidos _Discretos"
+
+#: src/ui/gui/var-sheet-dialogs.ui:816
+msgid "_Low:"
+msgstr "Inferior:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:835
+msgid "_High:"
+msgstr "Superior:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:860
+msgid "Di_screte value:"
+msgstr "Valor Di_screto:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:888
+msgid "_Range plus one optional discrete missing value"
+msgstr "Intervalo más un valor perdido discreto ocpional"
+
+#: src/ui/gui/variable-info.ui:50
+msgid "Variable Information:"
+msgstr "Información de la Variable:"
+
+#: src/ui/gui/data-editor.ui:9
+msgid "Sort Ascending"
+msgstr "Ordenación Ascendente"
+
+#: src/ui/gui/data-editor.ui:15
+msgid "Sort Descending"
+msgstr "Ordenación Descendente"
+
+#: src/ui/gui/data-editor.ui:26 src/ui/gui/output-viewer.ui:9
+#: src/ui/gui/syntax-editor.ui:10
+msgid "_File"
+msgstr "_Archivo"
+
+#: src/ui/gui/data-editor.ui:38 src/ui/gui/syntax-editor.ui:22
+#: src/ui/gui/syntax-editor.ui:40
+msgid "_Syntax"
+msgstr "_Sintaxis"
+
+#: src/ui/gui/data-editor.ui:44 src/ui/gui/data-editor.ui:217
+#: src/ui/gui/data-editor.ui:229 src/ui/gui/syntax-editor.ui:28
+#: src/ui/gui/syntax-editor.ui:46
+msgid "_Data"
+msgstr "_Datos"
+
+#: src/ui/gui/data-editor.ui:56
+msgid "_Import Delimited Text Data"
+msgstr "_Importar datos de texto delimitados"
+
+#: src/ui/gui/data-editor.ui:75
+msgid "D_isplay Data File Information"
+msgstr "Muestra _información del archivo de datos"
+
+#: src/ui/gui/data-editor.ui:81
+msgid "Working File"
+msgstr "Archivos de trabajo"
+
+#: src/ui/gui/data-editor.ui:87
+msgid "External File"
+msgstr "Archivo externo"
+
+#: src/ui/gui/data-editor.ui:93
+msgid "Recently Used Da_ta"
+msgstr "Datos utilizados recientemente"
+
+#: src/ui/gui/data-editor.ui:99
+msgid "Recently Used _Files"
+msgstr "Archivos utilizados recientemente"
+
+#: src/ui/gui/data-editor.ui:111 src/ui/gui/output-viewer.ui:28
+#: src/ui/gui/syntax-editor.ui:70
+msgid "_Edit"
+msgstr "_Editar"
+
+#: src/ui/gui/data-editor.ui:117
+msgid "Insert Variable"
+msgstr "Insertar Variable"
+
+#: src/ui/gui/data-editor.ui:118
+msgid "Create a new variable at the current position"
+msgstr "Crear una nueva variable en la posición seleccionada"
+
+#: src/ui/gui/data-editor.ui:125
+msgid "Insert Cases"
+msgstr "Insertar Casos"
+
+#: src/ui/gui/data-editor.ui:126
+msgid "Create a new case at the current position"
+msgstr "Crear un nuevo caso en la posición actual"
+
+#: src/ui/gui/data-editor.ui:132
+msgid "Go To Case"
+msgstr "Ir al Caso"
+
+#: src/ui/gui/data-editor.ui:134
+#, fuzzy
+msgid "Jump to a case in the data sheet"
+msgstr "Ir a un caso en la Matriz de Datos"
+
+#: src/ui/gui/data-editor.ui:160
+msgid "Cl_ear Variables"
+msgstr "_Eliminar Variables"
+
+#: src/ui/gui/data-editor.ui:161
+msgid "Delete the variables at the selected position(s)"
+msgstr "Borra las variables en la posición(es) seleccionada(s)"
+
+#: src/ui/gui/data-editor.ui:169
+msgid "_Clear Cases"
+msgstr "Eliminar _Casos"
+
+#: src/ui/gui/data-editor.ui:170
+msgid "Delete the cases at the selected position(s)"
+msgstr "Borra los casos en la(s) posición(es) seleccionada(s)"
+
+#: src/ui/gui/data-editor.ui:182
+msgid "_View"
+msgstr "_Vista"
+
+#: src/ui/gui/data-editor.ui:189
+msgid "_Status Bar"
+msgstr "Barra de E_stado"
+
+#: src/ui/gui/data-editor.ui:195
+msgid "_Fonts"
+msgstr "_Fuentes"
+
+#: src/ui/gui/data-editor.ui:203
+msgid "_Grid Lines"
+msgstr "Línias divisorias"
+
+#: src/ui/gui/data-editor.ui:209
+msgid "Value _Labels"
+msgstr "Etiquetas de Valor"
+
+#: src/ui/gui/data-editor.ui:210
+msgid "Show/hide value labels"
+msgstr "Muestra/Oculta etiquetas de valor"
+
+#: src/ui/gui/data-editor.ui:223 src/ui/gui/data-editor.ui:430
+msgid "_Variables"
+msgstr "_Variables"
+
+#: src/ui/gui/data-editor.ui:234
+msgid "_Sort Cases"
+msgstr "Ordenar Caso_s"
+
+#: src/ui/gui/data-editor.ui:237
+msgid "Sort cases in the active file"
+msgstr "Ordenar casos en el archivo activo"
+
+#: src/ui/gui/data-editor.ui:244
+msgid "_Transpose"
+msgstr "_Trasponer"
+
+#: src/ui/gui/data-editor.ui:245
+msgid "Transpose the cases with the variables"
+msgstr "Transponer casos y variables"
+
+#: src/ui/gui/data-editor.ui:251
+msgid "S_plit File"
+msgstr "Dividir Archivo"
+
+#: src/ui/gui/data-editor.ui:252
+msgid "Split the active file"
+msgstr "Dividir archivo activo"
+
+#: src/ui/gui/data-editor.ui:259
+msgid "Select _Cases"
+msgstr "Seleccionar _Casos"
+
+#: src/ui/gui/data-editor.ui:265
+msgid "_Weight Cases"
+msgstr "Ponderar Casos"
+
+#: src/ui/gui/data-editor.ui:266
+msgid "Weight cases by variable"
+msgstr "Pondera casos por la variable"
+
+#: src/ui/gui/data-editor.ui:273
+msgid "_Transform"
+msgstr "_Transformar"
+
+#: src/ui/gui/data-editor.ui:279
+msgid "_Compute"
+msgstr "_Calcular"
+
+#: src/ui/gui/data-editor.ui:285
+msgid "Ran_k Cases"
+msgstr "Rango de casos"
+
+#: src/ui/gui/data-editor.ui:291
+msgid "Recode into _Same Variables"
+msgstr "Recodificar en las Misma_s Variables"
+
+#: src/ui/gui/data-editor.ui:297
+msgid "Recode into _Different Variables"
+msgstr "Recodificar en variables _Diferentes"
+
+#: src/ui/gui/data-editor.ui:303
+msgid "_Run Pending Transforms"
+msgstr "Ejecuta_r Transformaciones pendientes"
+
+#: src/ui/gui/data-editor.ui:310
+msgid "_Analyze"
+msgstr "_Analizar"
+
+#: src/ui/gui/data-editor.ui:316
+msgid "_Descriptive Statistics"
+msgstr "Estadística _Descriptiva"
+
+#: src/ui/gui/data-editor.ui:322
+msgid "_Frequencies"
+msgstr "_Frecuencias"
+
+#: src/ui/gui/data-editor.ui:334
+msgid "_Explore"
+msgstr "_Explorar"
+
+#: src/ui/gui/data-editor.ui:340
+msgid "_Crosstabs"
+msgstr "Tablas _Cruzadas"
+
+#: src/ui/gui/data-editor.ui:346
+msgid "Compare _Means"
+msgstr "Comparar _Medias"
+
+#: src/ui/gui/data-editor.ui:352
+msgid "_One Sample T Test"
+msgstr "Prueba T para una muestra"
+
+#: src/ui/gui/data-editor.ui:358
+msgid "_Independent Samples T Test"
+msgstr "Prueba T para muestras _Independientes"
+
+#: src/ui/gui/data-editor.ui:364
+msgid "_Paired Samples T Test"
+msgstr "Prueba T para muestras Em_parejadas"
+
+#: src/ui/gui/data-editor.ui:370
+msgid "One Way _ANOVA"
+msgstr "_ANOVA de un factor"
+
+#: src/ui/gui/data-editor.ui:376
+#, fuzzy
+msgid "Bivariate _Correlation..."
+msgstr "Correlación de Spearman"
+
+#: src/ui/gui/data-editor.ui:382
+#, fuzzy
+msgid "Factor _Analysis"
+msgstr "Lista de Factores:"
+
+#: src/ui/gui/data-editor.ui:388
+msgid "Re_liability"
+msgstr "Fiabi_lidad"
+
+#: src/ui/gui/data-editor.ui:394
+msgid "Linear _Regression"
+msgstr "_Regresión Lineal"
+
+#: src/ui/gui/data-editor.ui:400
+msgid "_Non-Parametric Statistics"
+msgstr "Pruebas _No-Paramétricas"
+
+#: src/ui/gui/data-editor.ui:406
+msgid "_Chi-Square"
+msgstr "_Chi-cuadrado"
+
+#: src/ui/gui/data-editor.ui:412
+msgid "_Binomial"
+msgstr "_Binomial"
+
+#: src/ui/gui/data-editor.ui:418
+#, fuzzy
+msgid "ROC Cur_ve..."
+msgstr "Curva ROC"
+
+#: src/ui/gui/data-editor.ui:424
+msgid "_Utilities"
+msgstr "_Utilidades"
+
+#: src/ui/gui/data-editor.ui:431
+msgid "Jump to variable"
+msgstr "Ir a la variable"
+
+#: src/ui/gui/data-editor.ui:438
+msgid "Data File _Comments"
+msgstr "_Comentarios al archivo de datos"
+
+#: src/ui/gui/data-editor.ui:444 src/ui/gui/output-viewer.ui:40
+#: src/ui/gui/syntax-editor.ui:131
+msgid "_Windows"
+msgstr "_Ventanas"
+
+#: src/ui/gui/data-editor.ui:450 src/ui/gui/output-viewer.ui:46
+#: src/ui/gui/syntax-editor.ui:137
+msgid "_Minimize All Windows"
+msgstr "_Minimizar todas las ventanas"
+
+#: src/ui/gui/data-editor.ui:456
+msgid "_Split"
+msgstr "Dividir"
+
+#: src/ui/gui/data-editor.ui:630
+msgid "Information Area"
+msgstr "Área de Información"
+
+#: src/ui/gui/data-editor.ui:652
+msgid "Processor Area"
+msgstr "Área del procesador"
+
+#: src/ui/gui/data-editor.ui:677
+msgid "Case Counter Area"
+msgstr "Área de Recuento"
+
+#: src/ui/gui/data-editor.ui:702
+msgid "Filter Use Status Area"
+msgstr "Área de uso de Filtro"
+
+#: src/ui/gui/data-editor.ui:728
+msgid "Weight Status Area"
+msgstr "Área de Ponderación"
+
+#: src/ui/gui/data-editor.ui:754
+msgid "Split File Status Area"
+msgstr "Área de División de Archivo"
+
+#: src/ui/gui/output-viewer.ui:22
+#, fuzzy
+msgid "_Export"
+msgstr "_Explorar"
+
+#: src/ui/gui/syntax-editor.ui:100
+msgid "_Run"
+msgstr "Ejecuta_r"
+
+#: src/ui/gui/syntax-editor.ui:106
+msgid "All"
+msgstr "Todos"
+
+#: src/ui/gui/syntax-editor.ui:112
+msgid "Selection"
+msgstr "Selección"
+
+#: src/ui/gui/syntax-editor.ui:118
+msgid "Current Line"
+msgstr "Línea actual"
+
+#: src/ui/gui/syntax-editor.ui:125
+msgid "To End"
+msgstr "Hasta el final"
+
+#~ msgid "Dependent variable must be numeric."
+#~ msgstr "La variable dependiente debe ser numérica."
+
+#~ msgid "Variable %s has label of invalid length %zu."
+#~ msgstr "Variable %s tiene una etiqueta de longitud no válida %zu."
+
+#~ msgid "_About"
+#~ msgstr "Sobre..."
+
+#~ msgid "Buttons"
+#~ msgstr "Botones"
+
+#~ msgid "The mask that decides what buttons appear in the button box"
+#~ msgstr "La máscara que decide qué botones aparecen en la caja de botones"
+
+#~ msgid "The dictionary to be displayed by this widget"
+#~ msgstr "El diccionario que se mostrará con este widget"
+
+#~ msgid "A predicate function"
+#~ msgstr "Una función de predicado"
+
+#~ msgid "How many things can be selected"
+#~ msgstr "Cuantas cosas se pueden seleccionar"
+
+#~ msgid "searching for \"%s\" in path \"%s\""
+#~ msgstr "buscando \"%s\" dentro de la carpeta \"%s\""
+
+#~ msgid "...found \"%s\""
+#~ msgstr "...\"%s\" encontrado"
+
+#~ msgid "...not found"
+#~ msgstr "...no se encuentra"
+
+#~ msgid "little-endian"
+#~ msgstr "little-endian"
+
+#~ msgid "big-endian"
+#~ msgstr "big-endian"
+
+#~ msgid "Compressed data is corrupt."
+#~ msgstr "Los datos comprimidos están dañados."
+
+#~ msgid "opening \"%s\" as syntax file"
+#~ msgstr "abriendo \"%s\" como archivo de sintaxis"
+
+#~ msgid "%s is not allowed inside INPUT PROGRAM."
+#~ msgstr "%s no se permite dentro de INPUT PROGRAM."
+
+#~ msgid "REORDER subcommand may be given at most once."
+#~ msgstr "El subcomando REORDER puede ser emitido más de una vez."
+
+#~ msgid "`(' expected on REORDER subcommand."
+#~ msgstr "`(' esperado en el subcomando REORDER."
+
+#~ msgid "Unknown."
+#~ msgstr "Desconocido."
+
+#~ msgid "System File."
+#~ msgstr "Archivo de Sistema."
+
+#~ msgid "%s: `.' expected after string."
+#~ msgstr "%s: `.' esperado después de la cadena."
+
+#~ msgid "S E Mean"
+#~ msgstr "Mitj. E E"
+
+#~ msgid "S E Kurt"
+#~ msgstr "Err.Est. Curt."
+
+#~ msgid "S E Skew"
+#~ msgstr "Err.Est. Asim."
+
+#~ msgid "BY is required when TABLE is specified."
+#~ msgstr "BY es necesario cuando TABLE se especifica."
+
+#~ msgid "opening font metrics file \"%s\""
+#~ msgstr "abriendo archivo de métricas de origen \"%s\""
+
+#~ msgid "first line must be StartFontMetrics"
+#~ msgstr "la primera línea tiene que ser StarFontMetrics"
+
+#~ msgid "unsupported MappingScheme %d"
+#~ msgstr "MappingScheme %d no soportado"
+
+#~ msgid "required FontName is missing"
+#~ msgstr "Falta de FontName requerido"
+
+#~ msgid "CharMetrics line must start with C or CH"
+#~ msgstr "La línea CharMetrics tiene que comenzar con C o H"
+
+#~ msgid "reference to unknown character \"%s\""
+#~ msgstr "referencia al carácter desconocido \"%s\""
+
+#~ msgid "expected end of file"
+#~ msgstr "final de archivo esperado"
+
+#~ msgid "syntax error expecting end of line"
+#~ msgstr "error de sintaxis en esperar el final de línea"
+
+#~ msgid "number out of valid range"
+#~ msgstr "número fuera del intervalo válido"
+
+#~ msgid "invalid numeric syntax"
+#~ msgstr "sintaxis numérica inválida"
+
+#~ msgid "syntax error expecting integer"
+#~ msgstr "error de sintaxis esperando un entero"
+
+#~ msgid "syntax error expecting number"
+#~ msgstr "error de sintaxis esperando un número"
+
+#~ msgid "syntax error in hex constant"
+#~ msgstr "error de sintaxis en constante hexadecimal"
+
+#~ msgid "syntax error expecting hex constant"
+#~ msgstr "error de sintaxis cuando se esperaba un hexadecimal"
+
+#~ msgid "unexpected end of line"
+#~ msgstr "final de línea inesperado"
+
+#~ msgid "unexpected end of line expecting string"
+#~ msgstr "final de línea inesperado cuando se esperaba una cadena"
+
+#~ msgid ""
+#~ "ascii: bad index value for `box' key: syntax is box[INDEX], 0 <= INDEX < %"
+#~ "d decimal, with INDEX expressed in base 4"
+#~ msgstr ""
+#~ "ascii: índice de valor defectuoso para la clave `box' : la sintaxis es la "
+#~ "box[INDEX], 0 <= INDEX < %d decimal, con INDEX expresado en base 4"
+
+#~ msgid "ascii: multiple values for %s"
+#~ msgstr "ascii: valores múltiples para %s"
+
+#~ msgid "ascii: only screen devices may have `auto' length or width"
+#~ msgstr ""
+#~ "ascii: únicamente los dispositivos de pantalla pueden tener largo o ancho "
+#~ "`auto'"
+
+#~ msgid "ascii: positive integer required as `%s' value"
+#~ msgstr "ascii: entero positivo requerido como valor `%s'"
+
+#~ msgid "ascii: `emphasis' value must be `bold', `underline', or `none'"
+#~ msgstr ""
+#~ "ascii: el valor de `emphasis' tiene que ser `bold', `underline', o `none'"
+
+#~ msgid "ascii: zero or positive integer required as `%s' value"
+#~ msgstr "ascii: cero o entero positivo requerido como valor `%s'"
+
+#~ msgid "ascii: boolean value expected for `%s'"
+#~ msgstr "ascii: valor booleano esperado para `%s'"
+
+#~ msgid "`chart-files' value must contain `#'"
+#~ msgstr "`chart-files' tiene que contener el valor `#'"
+
+#~ msgid "ascii: bad line (%d,%d)-(%d,%d) out of (%d,%d)\n"
+#~ msgstr "ascii: línea defectuosa (%d,%d)-(%d,%d) de (%d,%d)\n"
+
+#~ msgid "opening HTML output file: %s"
+#~ msgstr "abriendo archivo de resultado HTML: %s"
+
+#~ msgid "unknown configuration parameter `%s' for HTML device driver"
+#~ msgstr ""
+#~ "parámetro de configuración `%s' desconocido para el dispositivo "
+#~ "controlador HTML"
+
+#~ msgid "error creating \"%s\""
+#~ msgstr "error en crear \"%s\""
+
+#~ msgid "unknown output driver `%s'"
+#~ msgstr "driver de resultado desconocido `%s'"
+
+#~ msgid "output driver `%s' referenced but never defined"
+#~ msgstr "controlador de salida `%s' referenciado pero nunca definido"
+
+#~ msgid "using default output driver configuration"
+#~ msgstr "utilizando driver de configuración de resultados por defecto"
+
+#~ msgid ""
+#~ "cannot find output initialization file (use `-vv' to view search path)"
+#~ msgstr ""
+#~ "no se puede encontrar el archivo de inicialización de resultados "
+#~ "(utilizar `-vv' para ver la ruta de búsqueda)"
+
+#~ msgid "cannot open \"%s\""
+#~ msgstr "no se puede abrir \"%s\""
+
+#~ msgid "reading \"%s\""
+#~ msgstr "leyendo \"%s\""
+
+#~ msgid "syntax error"
+#~ msgstr "error de sintaxis"
+
+#~ msgid "error closing \"%s\""
+#~ msgstr "error en cerrar \"%s\""
+
+#~ msgid "no active output drivers"
+#~ msgstr "no hay controladores de salida activos"
+
+#~ msgid "error reading device definition file"
+#~ msgstr "error leyendo el archivo de definición del dispositivo"
+
+#~ msgid ""
+#~ "Driver classes:\n"
+#~ "\t"
+#~ msgstr ""
+#~ "Clases de controlador:\n"
+#~ "\t"
+
+#~ msgid ""
+#~ "reached end of options inside quoted string parsing options for \"%s\" "
+#~ "driver"
+#~ msgstr ""
+#~ "Llegado al final de opciones dentro de la cadena entre comillas "
+#~ "analitzando opciones para el controlador \"%s\""
+
+#~ msgid "syntax error in string constant parsing options for \"%s\" driver"
+#~ msgstr ""
+#~ "error de sintaxis en una constante de cadena analizando opciones para el "
+#~ "controlador \"%s\""
+
+#~ msgid "syntax error expecting `=' parsing options for driver \"%s\""
+#~ msgstr ""
+#~ "error de sintaxis cuando se esperaba `=' analizando las opciones para el "
+#~ "controlador \"%s\""
+
+#~ msgid "unknown output driver class `%.*s'"
+#~ msgstr "controlador de salida de clase desconocida `%.*s'"
+
+#~ msgid "unknown device type `%.*s'"
+#~ msgstr "tipo de dispositivo desconocido `%.*s'"
+
+#~ msgid "cannot initialize output driver `%s' of class `%s'"
+#~ msgstr "no puede inicializar el controlador de salida `%s' de la clase `%s'"
+
+#~ msgid "driver definition line missing driver name or class name"
+#~ msgstr ""
+#~ "línea de definición del controlador sin nombre del controlador o nombre "
+#~ "de la clase"
+
+#~ msgid "opening PostScript output file \"%s\""
+#~ msgstr "abriendo el archivo de salida PostScript \"%s\""
+
+#~ msgid "closing PostScript output file \"%s\""
+#~ msgstr "cierre el archivo de salida PostScript \"%s\""
+
+#~ msgid "unknown configuration parameter `%s' for PostScript device driver"
+#~ msgstr ""
+#~ "parámetro de configuración desconocido`%s' para el controlador del "
+#~ "dispositivo PostScript"
+
+#~ msgid ""
+#~ "unknown orientation `%s' (valid orientations are `portrait' and "
+#~ "`landscape')"
+#~ msgstr ""
+#~ "orientación desconocida `%s' (las orientaciones válidas son `retrato' i "
+#~ "`paisaje')"
+
+#~ msgid "boolean value expected for %s"
+#~ msgstr "valor booleano esperado para %s"
+
+#~ msgid "positive integer value required for `%s'"
+#~ msgstr "valor entero positivo necesario para `%s'"
+
+#~ msgid ""
+#~ "default font size must be at least 1 point (value of 1000 for key `%s')"
+#~ msgstr ""
+#~ "la medida de carácter por defecto tiene que ser como mínimo 1 punto "
+#~ "(valor de 1000 por la clave `%s')"
+
+#~ msgid "could not find AFM file \"%s\""
+#~ msgstr "no se puede encontrar el archivo AFM \"%s\""
+
+#~ msgid "could not find font \"%s\""
+#~ msgstr "no se puede encontrar el carácter \"%s\""
+
+#~ msgid "could not find encoding \"%s\""
+#~ msgstr "no se puede encontrar la codificación \"%s\""
+
+#~ msgid "cannot open font file \"%s\""
+#~ msgstr "no se puede abrir el archivo de carácter \"%s\""
+
+#~ msgid "reading font file \"%s\""
+#~ msgstr "leyendo el archivo de carácter \"%s\""
+
+#~ msgid "cannot open font encoding file \"%s\""
+#~ msgstr "no se puede abrir el fichero de codificación del carácter \"%s\""
+
+#~ msgid "invalid numeric format"
+#~ msgstr "formato numérico no válido"
+
+#~ msgid "closing Postscript encoding \"%s\""
+#~ msgstr "cierre de codificación Postscript \"%s\""
+
+#~ msgid "creating \"%s\""
+#~ msgstr "creando \"%s\""
+
+#~ msgid ""
+#~ "set to `compatible' if you want output calculated from broken algorithms"
+#~ msgstr ""
+#~ "active `compatible' si quiere obtener resultados calculados a partir de "
+#~ "algoritmos rotos"
+
+#~ msgid "Append DIR to include path"
+#~ msgstr "Adjuntar DIR en la ruta de inclusión"
+
+#~ msgid "Clear include path"
+#~ msgstr "Borrar la ruta de inclusión"
+
+#~ msgid "Disable execution of .pspp/rc at startup"
+#~ msgstr "Deshabilitar la ejecución de .pspp/rc en el inicio"
+
+#~ msgid "Set configuration directory to DIR"
+#~ msgstr "Establecer DIR como directorio de configuración"
+
+#~ msgid "Don't allow some unsafe operations"
+#~ msgstr "No permite algunas operaciones inseguras"
+
+#~ msgid ""
+#~ "Set to `compatible' if you want only to accept SPSS compatible syntax"
+#~ msgstr ""
+#~ "Active `compatible' si únicamente quiere aceptar la sintaxis compatible "
+#~ "de SPSS"
+
+#~ msgid "PSPP --- A program for statistical analysis"
+#~ msgstr "PSPP ---Un programa de análisis estadístico"
+
+#~ msgid "FILE1, FILE2 ... FILEn"
+#~ msgstr "FILE1, FILE2 ... FILEn"
+
+#~ msgid "Options affecting input and output locations:"
+#~ msgstr "Opciones que afecten a ubicaciones de entrada y salida:"
+
+#~ msgid "Diagnostic options:"
+#~ msgstr "Opciones de diagnóstico:"
+
+#~ msgid "Options affecting syntax and behavior:"
+#~ msgstr "Opciones que afectan a la sintaxis y al comportamiento:"
+
+#~ msgid "Cannot open %s (%s). Writing errors to stdout instead.\n"
+#~ msgstr ""
+#~ "No se puede abrir %s (%s). Alternativamente, escribiendo errores a "
+#~ "stdout.\n"
+
+#~ msgid "Terminating execution of syntax file due to error."
+#~ msgstr "Finalizando la ejecución del archivo de sintaxis debido a un error."
+
+#~ msgid "Increase diagnostic verbosity level"
+#~ msgstr "Aumentar el nivel de verbosidad del diagnóstico"
+
+#~ msgid "Send error messages to FILE (appended)"
+#~ msgstr "Enviar mensajes de error a FILE (anexa)"
+
+#~ msgid "Select output driver DEVICE and disable defaults"
+#~ msgstr ""
+#~ "Seleccionar el controlador de salida DEVICE y desactivar los valores por "
+#~ "defecto"
+
+#~ msgid "Print a list of known driver classes, then exit"
+#~ msgstr ""
+#~ "Imprimir una lista de clases de controladores conocidos, después salir"
+
+#~ msgid "Start an interactive session"
+#~ msgstr "Inicio de una sesión interactiva"
+
+#~ msgid "Style of bevel around the custom entry button"
+#~ msgstr "Estilo de bisel en del botón de entrada personalizado"
+
+#~ msgid "Cannot open reference manual: %s"
+#~ msgstr "No se puede abrir el manual de referencia: %s"
+
+#~ msgid "Don't show the splash screen"
+#~ msgstr "No volver a mostrar la pantalla de bienvenida"
+
+#~ msgid "PSPPIRE --- A user interface for PSPP"
+#~ msgstr "PSPPIRE --- Una interfaz de usuario para PSPP"
+
+#~ msgid "Miscellaneous options:"
+#~ msgstr "Diversas opciones:"
+
+#~ msgid "data file error"
+#~ msgstr "Error en el archivo de datos"
+
+#~ msgid "PSPP error"
+#~ msgstr "Error de PSPP"
+
+#~ msgid "syntax warning"
+#~ msgstr "aviso de sintaxis"
+
+#~ msgid "data file warning"
+#~ msgstr "aviso del archivo de datos"
+
+#~ msgid "PSPP warning"
+#~ msgstr "aviso de PSPP"
+
+#~ msgid "syntax information"
+#~ msgstr "información de sintaxis"
+
+#~ msgid "data file information"
+#~ msgstr "información del archivo de datos"
+
+#~ msgid "PSPP information"
+#~ msgstr "Información de PSPP"
+
+#
+#~ msgid "The PSPP processing engine reported the following message:"
+#~ msgid_plural "The PSPP processing engine reported the following messages:"
+#~ msgstr[0] "El procesador de PSPP ha dado el siguiente mensaje:"
+#~ msgstr[1] "El procesador de PSPP ha dado los siguientes mensajes:"
+
+#~ msgid "The PSPP processing engine reported %d message."
+#~ msgid_plural "The PSPP processing engine reported %d messages."
+#~ msgstr[0] "El procesador de PSPP ha dado %d mensaje."
+#~ msgstr[1] "El procesador de PSPP ha dado %d mensajes."
+
+#~ msgid "%d of these messages are displayed below."
+#~ msgid_plural "%d of these messages are displayed below."
+#~ msgstr[0] "%d de estos mensajes se muestran a continuación."
+#~ msgstr[1] "%d de estos mensajes se muestran a continuación."
+
+#~ msgid "Clear"
+#~ msgstr "Limpiar"
+
+#~ msgid "Insert Case"
+#~ msgstr "Insertar Caso"
+
+#~ msgid "Open a data file"
+#~ msgstr "Abrir un archivo de datos"
+
+#~ msgid "New data file"
+#~ msgstr "Nuevo archivo de datos"
+
+#~ msgid "Import text data file"
+#~ msgstr "Importar archivo de texto"
+
+#~ msgid "Save data to file"
+#~ msgstr "Guardar datos en archivo"
+
+#~ msgid "Select cases from the active file"
+#~ msgstr "Seleccionar casos del archivo activo"
+
+#~ msgid "Compute new values for a variable"
+#~ msgstr "Calcular nuevos valores para la variable"
+
+#~ msgid "Perform one way analysis of variance"
+#~ msgstr "Realizar análisis de la variancia de un factor"
+
+#~ msgid "Calculate T Test for samples from independent groups"
+#~ msgstr "Calcular pruebas T para muestras de grupos independientes"
+
+#~ msgid "Calculate T Test for paired samples"
+#~ msgstr "Calcular pruebas T para muestras emparejadas"
+
+#~ msgid "Calculate T Test for sample from a single distribution"
+#~ msgstr "Calcular pruebas T para muestra de una distribución única"
+
+#~ msgid "Commentary text for the data file"
+#~ msgstr "Comentario textual para el archivo de datos"
+
+#~ msgid "Recode values into the same variables"
+#~ msgstr "Recodificar valores en las mismas variables"
+
+#~ msgid "Recode values into different variables"
+#~ msgstr "Recodificar valores en diferentes variables"
+
+#~ msgid "Calculate descriptive statistics (mean, variance, ...)"
+#~ msgstr "Calcular estadísticos descriptivos (mediana, variancia,...)"
+
+#~ msgid "Generate frequency statistics"
+#~ msgstr "Generar estadísticos de frecuencias"
+
+#~ msgid "Generate crosstabulations"
+#~ msgstr "Generar tabulación cruzada"
+
+#~ msgid "Examine Data by Factors"
+#~ msgstr "Examinar los datos segun Factores"
+
+#~ msgid "Estimate parameters of the linear model"
+#~ msgstr "Estimar parámetros del modelo lineal"
+
+#~ msgid "Split the window vertically and horizontally"
+#~ msgstr "Dividir la ventana vertical y horizontalmente"
+
+#~ msgid "Open Syntax"
+#~ msgstr "Abrir sintaxis"
+
+#~ msgid "Var 1"
+#~ msgstr "Var 1"
+
+#~ msgid "Var 2"
+#~ msgstr "Var 2"
+
+#~ msgid "gtk-find"
+#~ msgstr "gtk-find"
+
+#~ msgid "Print"
+#~ msgstr "Imprimir"
+
+#~ msgid "Recall"
+#~ msgstr "Regresar"
+
+#~ msgid "Undo"
+#~ msgstr "Deshacer"
+
+#~ msgid "Redo"
+#~ msgstr "Rehacer"
+
+#~ msgid "Find"
+#~ msgstr "Buscar"
+
+#~ msgid "Use Sets"
+#~ msgstr "Utilizar conjuntos"
+
+#~ msgid "Ascending Counts"
+#~ msgstr "Recuento Ascendente"
+
+#~ msgid "Descending Counts"
+#~ msgstr "Recuento Descendente"
+
+#~ msgid "Supress tables with more than N categories"
+#~ msgstr "Suprimir las tablas con más de N categorias"
+
+#~ msgid "Maximum no of categories"
+#~ msgstr "Máximo número de categorias"
+
+#~ msgid "Messages Reported"
+#~ msgstr "Se han generado mensajes"
+
+#~ msgid ""
+#~ "The PSPP processor reported # errors.  The first # and last # are shown "
+#~ "below:"
+#~ msgstr ""
+#~ "El procesador de PSPP ha generado # errores.  Los # primeros y los # "
+#~ "últimos se muestran a continuación:"
+
+#~ msgid "gtk-close"
+#~ msgstr "gtk-close"
+
+#~ msgid "gtk-go-back"
+#~ msgstr "gtk-go-back"
+
+#~ msgid "gtk-go-forward"
+#~ msgstr "gtk-go-forward"
+
+#~ msgid "gtk-save"
+#~ msgstr "gtk-save"
+
+#~ msgid "gtk-save-as"
+#~ msgstr "gtk-save-as"
+
+#~ msgid "gtk-copy"
+#~ msgstr "gtk-copy"
+
+#~ msgid "System-Missing"
+#~ msgstr "Perdidos del sistema"
+
+#~ msgid ""
+#~ "Alpha\n"
+#~ "Split"
+#~ msgstr ""
+#~ "Alpha\n"
+#~ "Dividido"
+
+#~ msgid ""
+#~ "At most one of BARCHART, HISTOGRAM, or HBAR should be given.  HBAR will "
+#~ "be assumed.  Argument values will be given precedence increasing along "
+#~ "the order given."
+#~ msgstr ""
+#~ "Al menos se ha de declarar un tipo de entre BARCHART, HISTOGRAM o HBAR.  "
+#~ "Se asume HBAR.  (Argument values will be given precedence increasing "
+#~ "along the order given)."
+
+#~ msgid "Variable %s specified multiple times on VARIABLES subcommand."
+#~ msgstr ""
+#~ "La variable %s se ha especificado más de una vez en el subcomando "
+#~ "VARIABLES."
+
+#~ msgid "Cum"
+#~ msgstr "Acum."
+
+#~ msgid "Freq"
+#~ msgstr "Frec."
+
+#~ msgid "Pct"
+#~ msgstr "Pct"
+
+#~ msgid "N of items"
+#~ msgstr "N de elementos"
+
+#~ msgid "SE. Mean"
+#~ msgstr "Err.Est.Media"
+
+#~ msgid "`/FORMAT WEIGHT' specified, but weighting is not on."
+#~ msgstr ""
+#~ "`/FORMAT WEIGHT' especificado, pero la ponderación no está activada."
+
+#~ msgid "Line"
+#~ msgstr "Línea"
index bd1972812962668069cf39d9ee0554e0825ae8c6..e8bcc632f62c57b1d8294fa02d734bf9d57008ba 100644 (file)
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,13 +1,11 @@
-# translation of nl.po to Dutch
-# Dutch translations for PSPP
+# translation of pspp-0.7.4-pre1.po to Dutch
 # Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
-# This file is distributed under the same licence as the PSPP package.
-#
-#
+# This file is distributed under the same licence as the PSPP package.#
 #
 # Vertaalde woorden:
 #  Bad        = Foutief
 #  Case       = Case
+#  Character  = Teken
 #  Cell       = Cel
 #  Command    = Opdracht
 #  Display    = Toon
 #  Required   = vereist
 #  Ranking    = Ordenen
 #  Rename     = Hernoemd
-#  Range      = Range
+#  Range      = Bereik
 #  Rank       = Rang/Rangschik
 #  Specififed = Opgegeven
 #  Stream     = Stream
-#  String     = String
+#  String     = Tekenreeks
 #  Ties       = ??
 #  View       = Beeld/Weergave
 #  Window     = venster
 #  Weighting  = Weging
 #
-# pspp <pspp@sjpaes.nl>, 2009.
+# Harry Thijssen <pspp@sjpaes.nl>, 2009, 2010.
 msgid ""
 msgstr ""
-"Project-Id-Version: nl\n"
+"Project-Id-Version: pspp-0.7.4-pre1\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2009-08-30 17:52+0200\n"
-"PO-Revision-Date: 2009-05-15 18:24+0200\n"
-"Last-Translator:  <pspp@sjpaes.nl>\n"
-"Language-Team: Dutch\n"
+"POT-Creation-Date: 2010-05-21 12:02+0200\n"
+"PO-Revision-Date: 2010-05-11 11:54+0200\n"
+"Last-Translator: Harry Thijssen <pspp@sjpaes.nl>\n"
+"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: KBabel 1.11.4\n"
-
-#: src/ui/gui/psppire-buttonbox.c:143
-msgid "Buttons"
-msgstr "Knoppen"
-
-#: src/ui/gui/psppire-buttonbox.c:144
-msgid "The mask that decides what buttons appear in the button box"
-msgstr "Het masker dat beslist welke knoppen in de knop box zichtbaar zijn"
+"X-Generator: Lokalize 1.0\n"
 
-#: src/ui/gui/psppire-buttonbox.c:273 src/ui/gui/psppire-buttonbox.c:435
+#: src/ui/gui/psppire-buttonbox.c:275 src/ui/gui/psppire-buttonbox.c:437
 msgid "Continue"
 msgstr "Verder"
 
-#: src/ui/gui/psppire-buttonbox.c:433
+#: src/ui/gui/psppire-buttonbox.c:435
 msgid "OK"
-msgstr ""
+msgstr "OK"
 
-#: src/ui/gui/psppire-buttonbox.c:434
+#: src/ui/gui/psppire-buttonbox.c:436
 msgid "Go To"
-msgstr "Ga Naar"
+msgstr "Ga naar"
 
-#: src/ui/gui/psppire-buttonbox.c:436
+#: src/ui/gui/psppire-buttonbox.c:438
 msgid "Cancel"
 msgstr "Afbreken"
 
-#: src/ui/gui/psppire-buttonbox.c:437
+#: src/ui/gui/psppire-buttonbox.c:439
 msgid "Help"
-msgstr ""
+msgstr "Help"
 
-#: src/ui/gui/psppire-buttonbox.c:438
+#: src/ui/gui/psppire-buttonbox.c:440
 msgid "Reset"
-msgstr "Standaard"
+msgstr "Herstel"
 
-#: src/ui/gui/psppire-buttonbox.c:439
+#: src/ui/gui/psppire-buttonbox.c:441
 msgid "Paste"
 msgstr "Plak"
 
-#: src/ui/gui/psppire-dictview.c:207
-msgid "The dictionary to be displayed by this widget"
-msgstr ""
-
-#: src/ui/gui/psppire-dictview.c:214
-msgid "A predicate function"
-msgstr ""
-
-#: src/ui/gui/psppire-dictview.c:221
-msgid "How many things can be selected"
-msgstr "Hoeveel dingen kunnen worden geselecteerd"
-
-#: src/ui/gui/psppire-dictview.c:491 src/language/dictionary/split-file.c:84
-#: src/language/dictionary/sys-file-info.c:169
-#: src/language/dictionary/sys-file-info.c:393
-#: src/language/dictionary/sys-file-info.c:725
-#: src/language/stats/descriptives.c:885
-#: src/language/data-io/data-parser.c:650
-#: src/language/data-io/data-parser.c:691 src/language/data-io/print.c:404
+#: src/ui/gui/psppire-dictview.c:466 src/language/dictionary/split-file.c:82
+#: src/language/dictionary/sys-file-info.c:150
+#: src/language/dictionary/sys-file-info.c:340
+#: src/language/dictionary/sys-file-info.c:664
+#: src/language/stats/descriptives.c:881
+#: src/language/data-io/data-parser.c:649
+#: src/language/data-io/data-parser.c:688 src/language/data-io/print.c:403
 msgid "Variable"
 msgstr "Variabele"
 
-#: src/ui/gui/psppire-dictview.c:528
+#: src/ui/gui/psppire-dictview.c:503
 msgid "Prefer variable labels"
-msgstr "Prefereer variabele labels"
+msgstr "Prefereer variable labels"
+
+#: src/ui/gui/psppire-var-view.c:193
+#, c-format
+msgid "Var%d"
+msgstr "Var%d"
 
-#: src/data/any-reader.c:57
+#: src/data/any-reader.c:56
 #, c-format
 msgid "An error occurred while opening \"%s\": %s."
-msgstr "Er is een fout opgetreden tijdens het openen van \"%s\": %s."
+msgstr "Fout opgetreden bij openen van \"%s\": %s."
 
-#: src/data/any-reader.c:93
+#: src/data/any-reader.c:101
 #, c-format
 msgid "\"%s\" is not a system or portable file."
-msgstr "\"%s\" is geen systeem of overdraagbaar (portable) bestand."
+msgstr "\"%s\" is geen systeem of overdraagbaar bestand."
 
-#: src/data/any-reader.c:99 src/data/any-writer.c:63
+#: src/data/any-reader.c:107 src/data/any-writer.c:63
 msgid "The inline file is not allowed here."
-msgstr "Het 'inline' bestand is hier niet toegestaan."
+msgstr "Het inline-bestand is hier niet toegestaan."
 
 #: src/data/calendar.c:81
 #, c-format
 msgid "Month %d is not in acceptable range of 0 to 13."
-msgstr "Maand %d valt niet in de acceptabele range van 0 tot 13."
+msgstr "Maand %d valt niet in het acceptabele bereik van 0 tot 13."
 
 #: src/data/calendar.c:89
 #, c-format
 msgid "Day %d is not in acceptable range of 0 to 31."
-msgstr "Dag %d valt niet in de acceptabele range van 0 tot 31."
+msgstr "Dag %d valt niet in het acceptabele bereik van 0 tot 31."
 
 #: src/data/calendar.c:96
 #, c-format
 msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
-msgstr "Datum %04d-%d-%d is voor de eerste acceptabele datum van 1582-10-15."
+msgstr "Datum %04d-%d-%d ligt voor de eerste acceptabele datum van 1582-10-15."
 
 #: 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 ""
-"Ten minste een case in de gelezen data heeft een gewicht waarde 'user-"
+"Tenminste een case in de gelezen gegevens heeft een gewichtwaarde 'user-"
 "missing, system-missing, zero, of negatief.  Deze case(s) zijn genegeerd."
 
 #: src/data/data-in.c:274 src/data/data-in.c:464
 msgid "Field contents are not numeric."
-msgstr "Veld inhoud is niet numeriek."
+msgstr "Veldinhoud is niet numeriek."
 
 #: src/data/data-in.c:276 src/data/data-in.c:466
 msgid "Number followed by garbage."
@@ -163,11 +146,11 @@ msgstr "Te klein getal, is op nul gezet."
 
 #: src/data/data-in.c:327
 msgid "All characters in field must be digits."
-msgstr "Alle karakters in veld moeten cijfers zijn."
+msgstr "Alle tekens in veld moeten cijfers zijn."
 
 #: src/data/data-in.c:350
 msgid "Unrecognized character in field."
-msgstr "Onherkenbaar karakter in veld."
+msgstr "Niet herkenbaar teken in veld."
 
 #: src/data/data-in.c:374 src/data/data-in.c:650
 msgid "Field must have even length."
@@ -175,16 +158,16 @@ msgstr "Veld moet een even lengte hebben."
 
 #: src/data/data-in.c:379 src/data/data-in.c:661
 msgid "Field must contain only hex digits."
-msgstr "Veld mag alleen hex cijfers bevatten."
+msgstr "Veld mag alleen hexadecimale cijfers bevatten."
 
 #: src/data/data-in.c:700 src/data/data-in.c:747
 msgid "Syntax error in date field."
-msgstr "Syntax fout in datum veld."
+msgstr "Syntaxfout in datumveld."
 
 #: src/data/data-in.c:716
 #, c-format
 msgid "Day (%ld) must be between 1 and 31."
-msgstr "Dag (%ld) moet tussen 1 en 31 zijn."
+msgstr "Dag (%ld) moet tussen 1 en 31 liggen."
 
 #: src/data/data-in.c:763
 msgid "Delimiter expected between fields in date."
@@ -195,14 +178,14 @@ msgid ""
 "Unrecognized month format.  Months may be specified as Arabic or Roman "
 "numerals or as at least 3 letters of their English names."
 msgstr ""
-"Niet herkend maand formaat.  Maanden mogen gespecificeerd zijn als Arabisch "
+"Niet-herkende maand opmaak.  Maanden mogen gespecificeerd zijn als Arabisch "
 "of Romeins numeriek of als tenminste de eerste 3 letters van hun Engelse "
 "naam."
 
 #: src/data/data-in.c:864
 #, c-format
 msgid "Year (%ld) must be between 1582 and 19999."
-msgstr "Jaar (%ld) moet tussen 1582 en 19999 zijn."
+msgstr "Jaar (%ld) moet tussen 1582 en 19999 liggen."
 
 #: src/data/data-in.c:876
 #, c-format
@@ -242,13 +225,13 @@ msgid ""
 "Unrecognized weekday name.  At least the first two letters of an English "
 "weekday name must be specified."
 msgstr ""
-"Niet herkende weekdag naam.  Tenminste de eerste 2 letters van een Engelse "
-"weekdag naam moeten opgegeven worden."
+"Niet-herkende weekdagnaam.  Tenminste de eerste 2 letters van een Engelse "
+"weekdagnaam moeten opgegeven worden."
 
 #: src/data/data-in.c:1152
 #, c-format
 msgid "`%c' expected in date field."
-msgstr "`%c' verwacht in datum veld."
+msgstr "'%c' verwacht in datumveld."
 
 #: src/data/data-in.c:1193
 #, c-format
@@ -268,12 +251,12 @@ msgstr "%s veld) "
 #: src/data/data-out.c:481
 #, c-format
 msgid "Weekday number %f is not between 1 and 7."
-msgstr "Weekdag nummer %f is niet tussen 1 en 7."
+msgstr "Weekdagnummer %f ligt niet tussen 1 en 7."
 
 #: src/data/data-out.c:502
 #, c-format
 msgid "Month number %f is not between 1 and 12."
-msgstr "Maand nummer %f is niet tussen 1 en 12."
+msgstr "Maandnummer %f is niet tussen 1 en 12."
 
 #: src/data/dict-class.c:52
 msgid "ordinary"
@@ -285,20 +268,20 @@ msgstr "systeem"
 
 #: src/data/dict-class.c:56
 msgid "scratch"
-msgstr ""
+msgstr "scratch"
 
-#: src/data/dictionary.c:940
+#: src/data/dictionary.c:980
 msgid ""
 "At least one case in the data file had a weight value that was user-missing, "
 "system-missing, zero, or negative.  These case(s) were ignored."
 msgstr ""
-"Op zijn minst een case in het data bestand heeft een gewicht waarde user-"
+"Op zijn minst een case in het gegevensbestand heeft een gewichtwaarde user-"
 "missing, system-missing, nul, of negatief.  Deze case(s) zijn genegeerd."
 
-#: src/data/dictionary.c:1263
+#: src/data/dictionary.c:1283
 #, c-format
 msgid "Truncating document line to %d bytes."
-msgstr "Document regel afgekapt tot %d bytes."
+msgstr "Documentregel afgekapt tot %d bytes."
 
 #: src/data/file-handle-def.c:462
 #, c-format
@@ -318,37 +301,23 @@ msgstr ""
 msgid "Can't re-open %s as a %s."
 msgstr "Kan %s niet heropenen als een %s."
 
-#: src/data/file-name.c:131
-#, c-format
-msgid "searching for \"%s\" in path \"%s\""
-msgstr "zoeken naar \"%s\" in pad \"%s\""
-
-#: src/data/file-name.c:146
-#, c-format
-msgid "...found \"%s\""
-msgstr "...gevonden \"%s\""
-
-#: src/data/file-name.c:153
-msgid "...not found"
-msgstr "...niet gevonden"
-
-#: src/data/file-name.c:243
+#: src/data/file-name.c:168
 #, c-format
 msgid "Not opening pipe file `%s' because SAFER option set."
-msgstr ""
+msgstr "Pijpbestand '%s' wordt niet geopend omdat de SAFER optie is gezet."
 
 #: src/data/format.c:235
 msgid "Input format"
-msgstr "Invoer formaat"
+msgstr "Invoerindeling"
 
 #: src/data/format.c:235
 msgid "Output format"
-msgstr "Uitvoer formaat"
+msgstr "Uitvoerindeling"
 
 #: src/data/format.c:244
 #, c-format
 msgid "Format %s may not be used for input."
-msgstr "Formaat %s mag niet gebruikt worden voor invoer."
+msgstr "Indeling %s mag niet gebruikt worden voor invoer."
 
 #: src/data/format.c:251
 #, c-format
@@ -366,8 +335,7 @@ msgstr ""
 msgid "%s %s specifies %d decimal place, but %s does not allow any decimals."
 msgid_plural ""
 "%s %s specifies %d decimal places, but %s does not allow any decimals."
-msgstr[0] ""
-"%s %s specificeert %d decima(a)l(en), maar %s staat geen decimalen toe."
+msgstr[0] "%s %s specificeert %d decimaal, maar %s staat geen decimalen toe."
 msgstr[1] "%s %s specificeert %d decimalen, maar %s staat geen decimalen toe."
 
 #: src/data/format.c:280
@@ -379,11 +347,11 @@ msgid_plural ""
 "%s %s specifies %d decimal places, but the given width allows at most %d "
 "decimals."
 msgstr[0] ""
-"%s %s specificeert %d decimalen, maar de opgegeven breedte staat maximaal %d "
-"decimalentoe."
+"%s %s specificeert %d decimaal, maar de opgegeven breedte staat maximaal %d "
+"decimalen toe."
 msgstr[1] ""
 "%s %s specificeert %d decimalen, maar de opgegeven breedte staat maximaal %d "
-"toe."
+"decimalen toe."
 
 #: src/data/format.c:287
 #, c-format
@@ -394,7 +362,7 @@ msgid_plural ""
 "%s %s specifies %d decimal places, but the given width does not allow for "
 "any decimals."
 msgstr[0] ""
-"%s %s specificeert %d decima(a)l(en), maar de opgegeven breedte staat geen "
+"%s %s specificeert %d decimaal, maar de opgegeven breedte staat geen "
 "decimalen toe."
 msgstr[1] ""
 "%s %s specificeert %d decimalen, maar de opgegeven breedte staat geen "
@@ -403,22 +371,22 @@ msgstr[1] ""
 #: src/data/format.c:326
 #, c-format
 msgid "%s variables are not compatible with %s format %s."
-msgstr "%s variabelen zijn niet compatibel met %s formaat %s."
+msgstr "%s variabelen zijn niet overeenkomstig met %s opmaak %s."
 
-#: src/data/format.c:327 src/data/sys-file-reader.c:734
-#: src/ui/gui/psppire-var-store.c:628 src/ui/gui/psppire.glade:2009
-#: src/ui/gui/var-sheet-dialogs.glade:139
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:628 src/ui/gui/psppire.ui:1960
+#: src/ui/gui/var-sheet-dialogs.ui:139
 msgid "String"
-msgstr ""
+msgstr "Tekenreeks"
 
-#: src/data/format.c:327 src/data/sys-file-reader.c:734
-#: src/ui/gui/psppire-var-store.c:621 src/ui/gui/psppire.glade:2084
-#: src/ui/gui/var-sheet-dialogs.glade:28
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:621 src/ui/gui/psppire.ui:2040
+#: src/ui/gui/var-sheet-dialogs.ui:27
 msgid "Numeric"
 msgstr "Numeriek"
 
-#: src/data/format.c:328 src/data/sys-file-reader.c:1299
-#: src/data/sys-file-reader.c:1301 src/language/xforms/recode.c:493
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
 #: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
 #: src/language/xforms/recode.c:507
 #: src/language/dictionary/apply-dictionary.c:78
@@ -426,130 +394,130 @@ msgstr "Numeriek"
 msgid "numeric"
 msgstr "numeriek"
 
-#: src/data/format.c:328 src/data/sys-file-reader.c:1299
-#: src/data/sys-file-reader.c:1301 src/language/xforms/recode.c:493
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
 #: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
 #: src/language/xforms/recode.c:507
 #: src/language/dictionary/apply-dictionary.c:78
 #: src/language/dictionary/apply-dictionary.c:79
 msgid "string"
-msgstr ""
+msgstr "tekenreeks"
 
 #: src/data/format.c:346
 #, c-format
 msgid "String variable with width %d is not compatible with format %s."
-msgstr "String variabele met breedte %d is niet compatibel met formaat %s."
+msgstr ""
+"Tekenreeksvariabele met breedte %d is niet overeenkomstig met opmaaak %s."
 
 #: src/data/gnumeric-reader.c:36
 msgid ""
 "Support for Gnumeric files was not compiled into this installation of PSPP"
 msgstr ""
-"Ondersteuning voor Gnumeric bestanden is niet gecompileerd in deze "
+"Ondersteuning voor Gnumeric-bestanden is niet gecompileerd in deze "
 "installatie van PSPP"
 
-#: src/data/gnumeric-reader.c:368
-#, fuzzy, c-format
+#: src/data/gnumeric-reader.c:364
+#, c-format
 msgid "Error opening \"%s\" for reading as a Gnumeric file: %s."
 msgstr ""
-"Fout bij het openen van \"%s\" voor het lezen als een gnumeric bestand: %s."
+"Fout bij het openen van \"%s\" voor het lezen als een Gnumeric-bestand: %s."
 
-#: src/data/gnumeric-reader.c:388
+#: src/data/gnumeric-reader.c:384
 #, c-format
 msgid "Invalid cell range \"%s\""
-msgstr "Ongeldige cel range \"%s\""
+msgstr "Ongeldig celbereik \"%s\""
 
-#: src/data/gnumeric-reader.c:520 src/data/psql-reader.c:187
+#: src/data/gnumeric-reader.c:516 src/data/psql-reader.c:187
 #, c-format
 msgid "Cannot create variable name from %s"
-msgstr "Kan geen variabele naam creëren van %s"
+msgstr "Kan geen variabelennaam creëren van %s"
 
-#: src/data/gnumeric-reader.c:532
+#: src/data/gnumeric-reader.c:528
 #, c-format
 msgid "Selected sheet or range of spreadsheet \"%s\" is empty."
-msgstr "Geselecteerd blad of range van werkblad \"%s\" is leeg."
+msgstr "Geselecteerd blad of bereik van werkblad \"%s\" is leeg."
 
-#: src/data/make-file.c:64
+#: src/data/make-file.c:68
 #, c-format
 msgid "%s: Creating temporary file: %s."
 msgstr "%s: Aanmaken tijdelijk bestand: %s."
 
-#: src/data/make-file.c:106
+#: src/data/make-file.c:110
 #, c-format
 msgid "%s: Creating file: %s."
 msgstr "%s: Aanmaken bestand: %s."
 
-#: src/data/make-file.c:144
+#: src/data/make-file.c:148
 #, c-format
 msgid "Opening %s for writing: %s."
 msgstr "Openen %s voor schrijven: %s."
 
-#: src/data/make-file.c:153
+#: src/data/make-file.c:157
 #, c-format
 msgid "Opening stream for %s: %s."
 msgstr "Openen stream voor %s: %s."
 
-#: src/data/make-file.c:182
+#: src/data/make-file.c:186
 #, c-format
 msgid "Creating temporary file to replace %s: %s."
 msgstr "Aanmaken tijdelijk bestand voor het vervangen van %s: %s."
 
-#: src/data/make-file.c:193
+#: src/data/make-file.c:197
 #, c-format
 msgid "Creating temporary file %s: %s."
 msgstr "Aanmaken tijdelijk bestand %s: %s."
 
-#: src/data/make-file.c:205
+#: src/data/make-file.c:209
 #, c-format
 msgid "Opening stream for temporary file %s: %s."
 msgstr "Openen stream voor tijdelijk bestand %s: %s."
 
-#: src/data/make-file.c:246
+#: src/data/make-file.c:250
 #, c-format
 msgid "Replacing %s by %s: %s."
 msgstr "Vervangen %s door %s: %s."
 
-#: src/data/make-file.c:274
+#: src/data/make-file.c:278
 #, c-format
 msgid "Removing %s: %s."
 msgstr "Verwijderen %s: %s."
 
 #: src/data/por-file-reader.c:99
-#, c-format
-msgid "portable file %s corrupt at offset 0x%lx: "
-msgstr "overdraagbaar (portable) bestand %s corrupt op offset 0x%lx: "
+#, fuzzy, c-format
+msgid "portable file %s corrupt at offset 0x%llx: "
+msgstr "overdraagbaar-bestand %s beschadigd op positie 0x%llx: "
 
 #: src/data/por-file-reader.c:128
-#, c-format
-msgid "reading portable file %s at offset 0x%lx: "
-msgstr "lezen overdraagbaar (portable) bestand %s op offset 0x%lx: "
+#, fuzzy, c-format
+msgid "reading portable file %s at offset 0x%llx: "
+msgstr "lezen overdraagbaar bestand %s op positie 0x%llx: "
 
 #: src/data/por-file-reader.c:156
 #, c-format
 msgid "Error closing portable file \"%s\": %s."
-msgstr ""
-"Fout bij het afsluiten van overdraagbaar (portable) bestand \"%s\": %s."
+msgstr "Fout bij het afsluiten van overdraagbaar bestand \"%s\": %s."
 
 #: src/data/por-file-reader.c:208
 msgid "unexpected end of file"
-msgstr "onverwacht einde bestand"
+msgstr "onverwacht einde-bestand"
 
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
 #: src/data/por-file-reader.c:267 src/data/por-file-writer.c:149
 msgid "portable file"
-msgstr "overdraagbaar (portable) bestand"
+msgstr "overdraagbaar bestand"
 
 #: src/data/por-file-reader.c:275
 #, c-format
 msgid ""
 "An error occurred while opening \"%s\" for reading as a portable file: %s."
 msgstr ""
-"Er is een fout opgetreden tijdens het openen van \"%s\" voor het lezen als "
-"overdraagbaar (portable) bestand: %s."
+"Fout opgetreden tijdens het openen van \"%s\" voor het lezen als "
+"overdraagbaar bestand: %s."
 
 #: src/data/por-file-reader.c:296
 msgid "Data record expected."
-msgstr "Data record verwacht."
+msgstr "Gegevensrecord verwacht."
 
 #: src/data/por-file-reader.c:378
 msgid "Number expected."
@@ -566,27 +534,27 @@ msgstr "Ongeldige integer."
 #: src/data/por-file-reader.c:440 src/data/por-file-reader.c:460
 #, c-format
 msgid "Bad string length %d."
-msgstr "Foutieve string lengte %d."
+msgstr "Onjuiste tekenreekslengte %d."
 
 #: src/data/por-file-reader.c:523
 #, c-format
 msgid "%s: Not a portable file."
-msgstr "%s: Geen overdraagbaar (portable) bestand."
+msgstr "%s: Geen overdraagbaar bestand."
 
 #: src/data/por-file-reader.c:540
 #, c-format
 msgid "Unrecognized version code `%c'."
-msgstr "Niet herkende versie code `%c'."
+msgstr "Niet-herkende versiecode '%c'."
 
 #: src/data/por-file-reader.c:549
 #, c-format
 msgid "Bad date string length %zu."
-msgstr "Foutieve datum string lengte %zu."
+msgstr "Onjuiste datum-tekenreekslengte %zu."
 
 #: src/data/por-file-reader.c:551
 #, c-format
 msgid "Bad time string length %zu."
-msgstr "Foutieve tijd string lengte %zu."
+msgstr "Onjuiste tijd-tekenreekslengte %zu."
 
 #: src/data/por-file-reader.c:593
 #, c-format
@@ -594,23 +562,22 @@ msgid ""
 "%s: Bad format specifier byte (%d).  Variable will be assigned a default "
 "format."
 msgstr ""
-"%s: Foutief formaat specificatie byte (%d). Variabele krijgt een default "
-"formaat."
+"%s: Onjuist opmaakspecificatie byte (%d). Variabele krijgt een verstekopmaak."
 
 #: src/data/por-file-reader.c:614
 #, c-format
 msgid "Numeric variable %s has invalid format specifier %s."
-msgstr "Numerieke variabele %s heeft een ongeldige formaat specificatie %s."
+msgstr "Numerieke variabele %s heeft een ongeldig opmaakspecificatie %s."
 
 #: src/data/por-file-reader.c:618
 #, c-format
 msgid "String variable %s with width %d has invalid format specifier %s."
 msgstr ""
-"String variabele %s met breedte %d heeft ongeldige formaat specificatie %s."
+"Tekenreeksvariabele %s met breedte %d heeft ongeldig opmaakspecificatie %s."
 
 #: src/data/por-file-reader.c:642
 msgid "Expected variable count record."
-msgstr "Variabele teller record verwacht."
+msgstr "Variabelenteller record verwacht."
 
 #: src/data/por-file-reader.c:646
 #, c-format
@@ -620,54 +587,54 @@ msgstr "Ongeldig aantal variabelen %d."
 #: src/data/por-file-reader.c:655
 #, c-format
 msgid "Weight variable name (%s) truncated."
-msgstr "Weging variabele naam (%s) afgekapt."
+msgstr "Wegingsvariabelennaam (%s) is afgekapt."
 
 #: src/data/por-file-reader.c:670
 msgid "Expected variable record."
-msgstr "Variabel record verwacht."
+msgstr "Variabelenrecord verwacht."
 
 #: src/data/por-file-reader.c:674
 #, c-format
 msgid "Invalid variable width %d."
-msgstr "Ongeldige variabele breedte %d."
+msgstr "Ongeldige variabelenbreedte %d."
 
 #: src/data/por-file-reader.c:681
 #, c-format
 msgid "Invalid variable name `%s' in position %d."
-msgstr "Ongeldige variabele naam '%s' in positie %d."
+msgstr "Ongeldige variabelennaam '%s' op positie %d."
 
-#: src/data/por-file-reader.c:685 src/data/sys-file-reader.c:592
+#: src/data/por-file-reader.c:685 src/data/sys-file-reader.c:606
 #, c-format
 msgid "Bad width %d for variable %s."
-msgstr "Foutieve breedte %d voor variabele %s."
+msgstr "Onjuiste breedte %d voor variabele %s."
 
 #: src/data/por-file-reader.c:700
 #, c-format
 msgid "Duplicate variable name %s in position %d."
-msgstr "Dubbele variabele naam %s in positie %d."
+msgstr "Dubbele variabelennaam %s op positie %d."
 
 #: src/data/por-file-reader.c:701
 #, c-format
 msgid "Duplicate variable name %s in position %d renamed to %s."
-msgstr "Dubbele variabele naam %s in positie %d hernoemd naar %s."
+msgstr "Dubbele variabelennaam %s op positie %d is hernoemd naar %s."
 
 #: src/data/por-file-reader.c:750
 #, c-format
 msgid "Weighting variable %s not present in dictionary."
-msgstr "Weging variabele %s niet aanwezig in woordenboek."
+msgstr "Wegingvariabele %s niet aanwezig in woordenboek."
 
 #: src/data/por-file-reader.c:794
 #, c-format
 msgid "Unknown variable %s while parsing value labels."
-msgstr "Onbekende variabele %s tijdens het ontleden van waarde labels."
+msgstr "Onbekende variabele %s tijdens het ontleden van waardelabels."
 
 #: src/data/por-file-reader.c:797
 #, c-format
 msgid ""
 "Cannot assign value labels to %s and %s, which have different variable types."
 msgstr ""
-"Kan geen waarde labels toekennen aan %s en %s, die verschillende variabele "
-"types hebben."
+"Kan geen waardelabels toekennen aan %s en %s, die verschillende "
+"variabelentypes hebben."
 
 #: src/data/por-file-writer.c:141
 #, c-format
@@ -678,15 +645,15 @@ msgstr "Ongeldige decimaal cijfers teller %d. Behandeld als %d."
 #, c-format
 msgid "Error opening \"%s\" for writing as a portable file: %s."
 msgstr ""
-"Fout tijdens openen \"%s\" voor het schrijven als een overdraagbaar "
-"(portable) bestand: %s."
+"Fout tijdens openen \"%s\" voor het schrijven als een overdraagbaar bestand: "
+"%s."
 
 #: src/data/por-file-writer.c:506
 #, c-format
 msgid "An I/O error occurred writing portable file \"%s\"."
 msgstr ""
-"Een I/O fout opgetreden tijdens het schrijven van overdraagbaar (portable) "
-"bestand \"%s\"."
+"Een I/O fout opgetreden tijdens het schrijven van overdraagbaar bestand \"%s"
+"\"."
 
 #: src/data/psql-reader.c:46
 msgid ""
@@ -698,7 +665,7 @@ msgstr ""
 
 #: src/data/psql-reader.c:242
 msgid "Memory error whilst opening psql source"
-msgstr "Geheugen fout tijdens het openen van psql source"
+msgstr "Geheugenfout tijdens het openen van psql source"
 
 #: src/data/psql-reader.c:248
 #, c-format
@@ -742,501 +709,562 @@ msgstr ""
 
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
-#: src/data/scratch-writer.c:66
+#: src/data/scratch-writer.c:66 src/language/data-io/file-handle.q:181
 msgid "scratch file"
-msgstr "scratch bestand"
+msgstr "scratchbestand"
 
-#: src/data/settings.c:686
+#: src/data/settings.c:608
 #, c-format
 msgid ""
 "%s: Custom currency string `%s' does not contain exactly three periods or "
 "commas (or it contains both)."
 msgstr ""
-"%s: Aangepaste waarde string `%s' bevat niet exact drie punten of komma's "
-"(of het bevat beiden). "
+"%s: Aangepaste munt-tekenreeks '%s' bevat niet exact drie punten of komma's "
+"(of het bevat beiden)."
 
-#: src/data/short-names.c:66
+#: src/data/short-names.c:52
 msgid "Variable suffix too large."
-msgstr "Variabele achtervoegsel te lang."
+msgstr "Variabelen-achtervoegsel te lang."
 
-#: src/data/sys-file-reader.c:213
-#, fuzzy, c-format
+#: src/data/sys-file-reader.c:226
+#, c-format
 msgid "Recoded variable name duplicates an existing `%s' within system file."
-msgstr "Dubbele variabele naam '%s' binnen system file."
+msgstr ""
+"Gehercodeerde variabelennaam dupliceert een bestaande '%s' binnen "
+"systeembestand."
 
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
-#: src/data/sys-file-reader.c:276 src/data/sys-file-writer.c:203
+#: src/data/sys-file-reader.c:290 src/data/sys-file-writer.c:207
 msgid "system file"
-msgstr "systeem bestand"
+msgstr "systeembestand"
 
-#: src/data/sys-file-reader.c:283
+#: src/data/sys-file-reader.c:297
 #, c-format
 msgid "Error opening \"%s\" for reading as a system file: %s."
 msgstr ""
-"Fout bij het openen van \"%s\" voor het lezen als een systeem file: %s."
+"Fout bij het openen van \"%s\" voor het lezen als een systeembestand: %s."
 
-#: src/data/sys-file-reader.c:322 tests/dissect-sysfile.c:136
+#: src/data/sys-file-reader.c:336 tests/dissect-sysfile.c:154
 msgid "Misplaced type 4 record."
-msgstr "Verkeerd geplaatst type 4 record. "
+msgstr "Verkeerd geplaatst type 4 record."
 
-#: src/data/sys-file-reader.c:333 tests/dissect-sysfile.c:147
+#: src/data/sys-file-reader.c:347 tests/dissect-sysfile.c:165
 #, c-format
 msgid "Unrecognized record type %d."
-msgstr "Niet herkend record type %d."
+msgstr "Niet-herkend recordtype %d."
 
-#: src/data/sys-file-reader.c:374
+#: src/data/sys-file-reader.c:388
 #, c-format
 msgid "File header claims %d variable positions but %d were read from file."
 msgstr ""
-"Bestand kop claimt %d variabele posities maar er zijn er %d gelezen van het "
+"Bestandskop claimt %d variabelenposities maar er zijn er %d gelezen van het "
 "bestand."
 
-#: src/data/sys-file-reader.c:414
+#: src/data/sys-file-reader.c:428
 #, c-format
 msgid "Error closing system file \"%s\": %s."
-msgstr "Fout bij het sluiten van system file \"%s\": %s."
+msgstr "Fout bij het sluiten van systeembestand \"%s\": %s."
 
-#: src/data/sys-file-reader.c:479 src/data/sys-file-reader.c:489
-#: tests/dissect-sysfile.c:181 tests/dissect-sysfile.c:191
+#: src/data/sys-file-reader.c:493 src/data/sys-file-reader.c:503
+#: tests/dissect-sysfile.c:202 tests/dissect-sysfile.c:212
 msgid "This is not an SPSS system file."
-msgstr "Dit is geen SPSS systeem bestand."
+msgstr "Dit is geen SPSS-systeembestand."
 
-#: src/data/sys-file-reader.c:511 tests/dissect-sysfile.c:204
+#: src/data/sys-file-reader.c:525 tests/dissect-sysfile.c:227
 msgid ""
 "Compression bias is not the usual value of 100, or system file uses "
 "unrecognized floating-point format."
 msgstr ""
 
-#: src/data/sys-file-reader.c:588
+#: src/data/sys-file-reader.c:602
 #, c-format
 msgid "Invalid variable name `%s'."
-msgstr "Ongeldige variabele naam '%s'."
+msgstr "Ongeldige variabelennaam '%s'."
 
-#: src/data/sys-file-reader.c:596
+#: src/data/sys-file-reader.c:610
 #, c-format
 msgid "Duplicate variable name `%s' within system file."
-msgstr "Dubbele variabele naam '%s' binnen system file."
+msgstr "Dubbele variabelennaam '%s' binnen systeembestand."
 
-#: src/data/sys-file-reader.c:604 tests/dissect-sysfile.c:328
+#: src/data/sys-file-reader.c:618 tests/dissect-sysfile.c:356
 msgid "Variable label indicator field is not 0 or 1."
-msgstr "Variabel label indicator veld is niet 0 of 1."
-
-#: src/data/sys-file-reader.c:612 tests/dissect-sysfile.c:337
-#, c-format
-msgid "Variable %s has label of invalid length %zu."
-msgstr "Variabele %s heeft label van ongeldige lengte %zu."
+msgstr "Variabelen-labelindicatorveld is niet 0 of 1."
 
-#: src/data/sys-file-reader.c:631 tests/dissect-sysfile.c:355
+#: src/data/sys-file-reader.c:649 tests/dissect-sysfile.c:387
 msgid "Numeric missing value indicator field is not -3, -2, 0, 1, 2, or 3."
 msgstr ""
-"Numeriek ontbrekende waarde indicator veld is niet -3, -2, 0, 1, 2, of 3."
+"Numeriek ontbrekende-waarde indicatorveld is niet -3, -2, 0, 1, 2, of 3."
 
-#: src/data/sys-file-reader.c:649 tests/dissect-sysfile.c:370
+#: src/data/sys-file-reader.c:667 tests/dissect-sysfile.c:402
 msgid "String missing value indicator field is not 0, 1, 2, or 3."
-msgstr "String missing waarde indicator veld is niet 0, 1, 2, of 3."
+msgstr "Tekenreeks ontbrekende-waarde indicatorveld is niet 0, 1, 2, of 3."
 
-#: src/data/sys-file-reader.c:681
+#: src/data/sys-file-reader.c:699
 msgid "Missing string continuation record."
-msgstr "Mis string continuering record."
+msgstr "Mis tekenreeks continuering record."
 
-#: src/data/sys-file-reader.c:715
+#: src/data/sys-file-reader.c:733
 #, c-format
 msgid "Unknown variable format %<PRIu8>."
-msgstr "Onbekend variabele formaat %<PRIu8>."
+msgstr "Onbekend variabelenopmaak %<PRIu8>."
 
-#: src/data/sys-file-reader.c:733
+#: src/data/sys-file-reader.c:751
 #, c-format
 msgid "%s variable %s has invalid %s format %s."
-msgstr "%s variabele %s heeft ongeldig %s formaat %s."
+msgstr "%s variabele %s heeft ongeldig %s opmaak %s."
 
-#: src/data/sys-file-reader.c:736
+#: src/data/sys-file-reader.c:754
 msgid "print"
 msgstr "afdrukken"
 
-#: src/data/sys-file-reader.c:736
+#: src/data/sys-file-reader.c:754
 msgid "write"
 msgstr "schrijf"
 
-#: src/data/sys-file-reader.c:740
+#: src/data/sys-file-reader.c:758
 msgid "Suppressing further invalid format warnings."
-msgstr "Onderdrukt verdere ongeldige formaat waarschuwingen."
+msgstr "Onderdrukt verdere ongeldig indelingswaarschuwingen."
 
-#: src/data/sys-file-reader.c:758
+#: src/data/sys-file-reader.c:776
 msgid "Weighting variable must be numeric."
-msgstr "Weging variabele moet numeriek zijn."
+msgstr "Wegingvariabele moet numeriek zijn."
 
-#: src/data/sys-file-reader.c:772
+#: src/data/sys-file-reader.c:790
 msgid "Multiple type 6 (document) records."
 msgstr "Meerdere type 6 (document) records."
 
-#: src/data/sys-file-reader.c:776
+#: src/data/sys-file-reader.c:794
 #, c-format
 msgid "Number of document lines (%d) must be greater than 0."
-msgstr "Aantal document regels (%d) moet groter dan 0 zijn."
+msgstr "Aantal documentregels (%d) moet groter dan 0 zijn."
 
-#: src/data/sys-file-reader.c:784
+#: src/data/sys-file-reader.c:802
 msgid "Document line contains null byte."
-msgstr "Document regel bevat null byte."
+msgstr "Documentregel bevat null byte."
 
-#: src/data/sys-file-reader.c:874
+#: src/data/sys-file-reader.c:893
 #, c-format
 msgid ""
 "Unrecognized record type 7, subtype %d.  Please send a copy of this file, "
 "and the syntax which created it to %s"
 msgstr ""
-"Niet herkend type 7, subtype %d.  Stuur s.v.p. een kopie van dit bestand en "
+"Niet-herkend type 7, subtype %d.  Stuur s.v.p. een kopie van dit bestand en "
 "de syntax waarmee het is aangemaakt naar %s "
 
-#: src/data/sys-file-reader.c:901 tests/dissect-sysfile.c:550
+#: src/data/sys-file-reader.c:920 tests/dissect-sysfile.c:594
 #, c-format
 msgid "Bad size (%zu) or count (%zu) field on record type 7, subtype 3."
-msgstr ""
-"Foutieve lengte (%zu) of aantal (%zu) veld in record type 7, subtype 3."
+msgstr "Onjuiste lengte (%zu) of aantal (%zu) veld in recordtype 7, subtype 3."
 
-#: src/data/sys-file-reader.c:921
+#: src/data/sys-file-reader.c:940
 #, c-format
 msgid ""
 "Floating-point representation indicated by system file (%d) differs from "
 "expected (%d)."
 msgstr ""
-"Drijvende komma representatie aangegeven door systeem bestand %d verschilt "
+"Drijvende komma representatie aangegeven door systeembestand %d verschilt "
 "van verwachting (%d)."
 
-#: src/data/sys-file-reader.c:934
-msgid "little-endian"
-msgstr ""
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:110
+msgid "Little Endian"
+msgstr "Little Endian"
 
-#: src/data/sys-file-reader.c:934
-msgid "big-endian"
-msgstr ""
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:109
+msgid "Big Endian"
+msgstr "Big Endian"
 
-#: src/data/sys-file-reader.c:935
+#: src/data/sys-file-reader.c:954
 #, c-format
 msgid ""
 "Integer format indicated by system file (%s) differs from expected (%s)."
 msgstr ""
-"Integer formaat aangegeven door systeem bestand (%s) verschilt van verwacht "
-"(%s). "
+"Integer indeling aangegeven door systeembestand (%s) verschilt van verwacht "
+"(%s)."
 
-#: src/data/sys-file-reader.c:992 tests/dissect-sysfile.c:581
+#: src/data/sys-file-reader.c:1011 tests/dissect-sysfile.c:625
 #, c-format
 msgid "Bad size (%zu) or count (%zu) on extension 4."
-msgstr "Foutieve lengte (%zu) of aantal (%zu) bij extensie 4."
+msgstr "Onjuiste lengte (%zu) of aantal (%zu) bij extensie 4."
 
-#: src/data/sys-file-reader.c:996 src/data/sys-file-reader.c:1000
-#: src/data/sys-file-reader.c:1004 tests/dissect-sysfile.c:586
-#: tests/dissect-sysfile.c:591 tests/dissect-sysfile.c:596
-#, fuzzy, c-format
+#: src/data/sys-file-reader.c:1015 src/data/sys-file-reader.c:1019
+#: src/data/sys-file-reader.c:1023 tests/dissect-sysfile.c:630
+#: tests/dissect-sysfile.c:635 tests/dissect-sysfile.c:640
+#, c-format
 msgid "File specifies unexpected value %g as %s."
-msgstr "Bestand specificeert onverwachte waarde %g als SYSMIS."
+msgstr "Bestand specificeert onverwachte waarde %g als %s."
+
+#: src/data/sys-file-reader.c:1056
+#, fuzzy, c-format
+msgid "Missing space following 'C' at offset %zu in MRSETS record"
+msgstr "Dubbele variabelenaam %s op offset %zu in MRSETS record."
+
+#: src/data/sys-file-reader.c:1074 tests/dissect-sysfile.c:691
+#, fuzzy, c-format
+msgid "Missing space following 'E' at offset %zu in MRSETS record"
+msgstr "Dubbele variabelenaam %s op offset %zu in MRSETS record."
+
+#: src/data/sys-file-reader.c:1083 tests/dissect-sysfile.c:700
+#, fuzzy, c-format
+msgid ""
+"Unexpected label source value \"%s\" following 'E' at offset %zu in MRSETS "
+"record"
+msgstr "Dubbele variabelenaam %s op offset %zu in MRSETS record."
+
+#: src/data/sys-file-reader.c:1089
+#, fuzzy, c-format
+msgid "Missing 'C', 'D', or 'E' at offset %zu in MRSETS record."
+msgstr "Dubbele variabelenaam %s op offset %zu in MRSETS record."
+
+#: src/data/sys-file-reader.c:1118
+#, fuzzy, c-format
+msgid "Missing new-line parsing variable names at offset %zu in MRSETS record."
+msgstr "Dubbele variabelenaam %s op offset %zu in MRSETS record."
+
+#: src/data/sys-file-reader.c:1129
+#, c-format
+msgid "Duplicate variable name %s at offset %zu in MRSETS record."
+msgstr "Dubbele variabelenaam %s op offset %zu in MRSETS record."
+
+#: src/data/sys-file-reader.c:1142
+#, c-format
+msgid "MRSET %s contains both string and numeric variables."
+msgstr "MRSET %s bevat zowel tekenreeks als numerieke variabelen."
+
+#: src/data/sys-file-reader.c:1157
+#, fuzzy, c-format
+msgid "MRSET %s has only %zu variables."
+msgstr "MRSET %s bevat zowel tekenreeks als numerieke variabelen."
 
-#: src/data/sys-file-reader.c:1021 tests/dissect-sysfile.c:611
+#: src/data/sys-file-reader.c:1194 tests/dissect-sysfile.c:758
 #, c-format
 msgid "Bad size %zu on extension 11."
-msgstr "Foutieve lengte %zu voor extensie 11."
+msgstr "Onjuiste lengte %zu voor extensie 11."
 
-#: src/data/sys-file-reader.c:1033 tests/dissect-sysfile.c:623
+#: src/data/sys-file-reader.c:1206 tests/dissect-sysfile.c:770
 #, c-format
 msgid "Extension 11 has bad count %zu (for %zu variables)."
 msgstr "Extensie 11 heeft een foutief aantal %zu (voor %zu variabelen)."
 
-#: src/data/sys-file-reader.c:1054
+#: src/data/sys-file-reader.c:1227
 #, c-format
 msgid ""
 "Invalid variable display parameters for variable %zu (%s).  Default "
 "parameters substituted."
 msgstr ""
-"Ongeldige variabele toon parameters voor variabele %zu (%s).  Default "
+"Ongeldige variabelen-toon-parameters voor variabele %zu (%s).  Verstek "
 "parameters ingevuld."
 
-#: src/data/sys-file-reader.c:1098
+#: src/data/sys-file-reader.c:1271
 #, c-format
 msgid "Long variable mapping from %s to invalid variable name `%s'."
-msgstr "Lange variabele afbeelding van %s tot ongeldige naam '%s'. "
+msgstr "Lange variabele afbeelding van %s tot ongeldige naam '%s'."
 
-#: src/data/sys-file-reader.c:1108
+#: src/data/sys-file-reader.c:1281
 #, c-format
 msgid "Duplicate long variable name `%s' within system file."
-msgstr "Dubbele lange variabele naam `%s' binnen systeem bestand."
+msgstr "Dubbele lange variabelennaam '%s' binnen systeembestand."
 
-#: src/data/sys-file-reader.c:1161
+#: src/data/sys-file-reader.c:1334
 #, c-format
 msgid "%s listed as string of invalid length %s in very length string record."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1171
+#: src/data/sys-file-reader.c:1344
 #, c-format
 msgid ""
 "%s listed in very long string record with width %s, which requires only one "
 "segment."
 msgstr ""
-"%s vermeld in erg lang string record met breedte %s, dat slechts een segment "
-"vereist."
+"%s vermeld in erg lang tekenreeks-record met breedte %s, dat slechts een "
+"segment vereist."
 
-#: src/data/sys-file-reader.c:1177
+#: src/data/sys-file-reader.c:1350
 #, c-format
 msgid "Very long string %s overflows dictionary."
-msgstr "Erg lange string %s is te groot voor woordenboek."
+msgstr "Erg lange-tekenreeks %s is te groot voor woordenboek."
 
-#: src/data/sys-file-reader.c:1191
+#: src/data/sys-file-reader.c:1364
 #, c-format
 msgid ""
 "Very long string with width %ld has segment %d of width %d (expected %d)"
 msgstr ""
-"Erg lange string met breedte %ld heeft segment %d van breedte %d (verwacht %"
-"d)"
+"Erg lange-tekenreeks met breedte %ld heeft segment %d van breedte %d "
+"(verwacht %d)"
 
-#: src/data/sys-file-reader.c:1237
+#: src/data/sys-file-reader.c:1410
 #, c-format
 msgid "Invalid number of labels: %d.  Ignoring labels."
 msgstr "Ongeldig aantal labels: %d. Labels worden genegeerd."
 
-#: src/data/sys-file-reader.c:1268 tests/dissect-sysfile.c:426
+#: src/data/sys-file-reader.c:1441 tests/dissect-sysfile.c:468
 msgid ""
 "Variable index record (type 4) does not immediately follow value label "
 "record (type 3) as it should."
 msgstr ""
-"Variabele index record (type 4) volgt niet onmiddellijk waarde label record "
+"Variabele index record (type 4) volgt niet onmiddellijk waardelabel record "
 "(type 3) zoals het moet."
 
-#: src/data/sys-file-reader.c:1275
+#: src/data/sys-file-reader.c:1448
 #, c-format
 msgid ""
 "Number of variables associated with a value label (%d) is not between 1 and "
 "the number of variables (%zu)."
 msgstr ""
-"Aantal variabelen geassocieerd aan waarde label (%d) is niet tussen 1 en het "
+"Aantal variabelen geassocieerd aan waardelabel (%d) is niet tussen 1 en het "
 "aantal variabelen (%zu)."
 
-#: src/data/sys-file-reader.c:1286
-#, fuzzy, c-format
+#: src/data/sys-file-reader.c:1459
+#, c-format
 msgid ""
 "Value labels may not be added to long string variables (e.g. %s) using "
 "records types 3 and 4."
-msgstr "Waarde labels zijn niet toegestaan bij lange string variabelen (%s)."
+msgstr ""
+"Waardelabels mogen niet toegevoegd aan lange tekenreeks-variabelen (bv %s) "
+"bij het gebruik van records types 3 en 4."
 
-#: src/data/sys-file-reader.c:1295
+#: src/data/sys-file-reader.c:1468
 #, c-format
 msgid ""
 "Variables associated with value label are not all of identical type.  "
 "Variable %s is %s, but variable %s is %s."
 msgstr ""
-"Variabelen geassocieerd met waarde label zijn niet allemaal van het "
-"identieke type.  Variabele %s is %s, maar variabele %s is %s."
+"Variabelen geassocieerd met waardelabel zijn niet allemaal van het identieke "
+"type.  Variabele %s is %s, maar variabele %s is %s."
 
-#: src/data/sys-file-reader.c:1329
+#: src/data/sys-file-reader.c:1502
 #, c-format
 msgid "Duplicate value label for %g on %s."
-msgstr "Dubbel waarde label voor %g op %s."
+msgstr "Dubbel waardelabel voor %g in %s."
 
-#: src/data/sys-file-reader.c:1332 src/data/sys-file-reader.c:1513
+#: src/data/sys-file-reader.c:1505 src/data/sys-file-reader.c:1686
 #, c-format
 msgid "Duplicate value label for \"%.*s\" on %s."
-msgstr "Dubbel waarde label voor \"%.*s\" on %s."
+msgstr "Dubbel waardelabel voor \"%.*s\" in %s."
 
-#: src/data/sys-file-reader.c:1370
+#: src/data/sys-file-reader.c:1543
 #, c-format
 msgid "Error parsing attribute value %s[%d]"
-msgstr "Fout bij het ontleden van attribuut waarde %s[%d]"
+msgstr "Fout tijdens ontleden attribuut waarde %s[%d]"
 
-#: src/data/sys-file-reader.c:1384
+#: src/data/sys-file-reader.c:1557
 #, c-format
 msgid "Attribute value %s[%d] is not quoted: %s"
 msgstr "Attribuut waarde %s[%d] is niet geciteerd: %s"
 
-#: src/data/sys-file-reader.c:1447 tests/dissect-sysfile.c:762
+#: src/data/sys-file-reader.c:1620 tests/dissect-sysfile.c:936
 #, c-format
 msgid ""
 "Variable name length in long string value label record (%d) exceeds %d-byte "
 "limit."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1457
-#, fuzzy, c-format
+#: src/data/sys-file-reader.c:1630
+#, c-format
 msgid "Ignoring long string value record for unknown variable %s."
-msgstr "Variabele afbeelding refereert aan onbekende variabele %s."
+msgstr "Negeren lange tekenreeks waarde record voor onbekende variabele %s."
 
-#: src/data/sys-file-reader.c:1464
-#, fuzzy, c-format
+#: src/data/sys-file-reader.c:1637
+#, c-format
 msgid "Ignoring long string value record for numeric variable %s."
-msgstr ""
-"Kan missing values uit bron bestand niet toepassen op lange string variabele "
-"%s."
+msgstr "Negeren lange tekenreeks waarde record voor numerieke variabele %s."
 
-#: src/data/sys-file-reader.c:1471
+#: src/data/sys-file-reader.c:1644
 #, c-format
 msgid ""
 "Ignoring long string value record for variable %s because the record's width "
 "(%d) does not match the variable's width (%d)"
 msgstr ""
 
-#: src/data/sys-file-reader.c:1493
+#: src/data/sys-file-reader.c:1666
 #, c-format
 msgid ""
 "Ignoring long string value %zu for variable %s, with width %d, that has bad "
 "value width %zu."
 msgstr ""
 
-#: src/data/sys-file-reader.c:1608
+#: src/data/sys-file-reader.c:1781
 msgid "File ends in partial case."
 msgstr "Bestand eindigt in gedeeltelijke case."
 
-#: src/data/sys-file-reader.c:1616
+#: src/data/sys-file-reader.c:1789
 #, c-format
 msgid "Error reading case from file %s."
 msgstr "Fout tijdens lezen case van bestand %s."
 
-#: src/data/sys-file-reader.c:1713 src/data/sys-file-reader.c:1749
-msgid "Compressed data is corrupt."
-msgstr "Gecomprimeerde data is corrupt."
+#: src/data/sys-file-reader.c:1890
+msgid ""
+"Possible compressed data corruption: compressed spaces appear in numeric "
+"field."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1943
+#, c-format
+msgid ""
+"Possible compressed data corruption: string contains compressed integer "
+"(opcode %d)"
+msgstr ""
 
-#: src/data/sys-file-reader.c:1836
+#: src/data/sys-file-reader.c:2035
 #, c-format
 msgid "Variable index %d not in valid range 1...%d."
-msgstr "Variabele index %d niet in geldige range 1...%d."
+msgstr "Variabele index %d niet in geldig bereik 1...%d."
 
-#: src/data/sys-file-reader.c:1841
+#: src/data/sys-file-reader.c:2040
 #, c-format
 msgid "Variable index %d refers to long string continuation."
-msgstr "Variabele index %d verwijst naar lange string voortzetting."
+msgstr "Variabele index %d verwijst naar lange-tekenreeks voortzetting."
 
-#: src/data/sys-file-reader.c:1909
+#: src/data/sys-file-reader.c:2108
 #, c-format
 msgid "Suppressed %d additional related warnings."
 msgstr "Onderdrukt %d extra gerelateerde waarschuwingen."
 
-#: src/data/sys-file-reader.c:1950
-#, c-format
-msgid "Variable map refers to unknown variable %s."
+#: src/data/sys-file-reader.c:2153 src/data/sys-file-reader.c:2170
+#, fuzzy, c-format
+msgid "Dictionary record refers to unknown variable %s."
 msgstr "Variabele afbeelding refereert aan onbekende variabele %s."
 
-#: src/data/sys-file-reader.c:2058 tests/dissect-sysfile.c:959
+#: src/data/sys-file-reader.c:2231
+#, fuzzy, c-format
+msgid "Expecting digit at offset %zu in MRSETS record."
+msgstr "Dubbele variabelenaam %s op offset %zu in MRSETS record."
+
+#: src/data/sys-file-reader.c:2238
+#, fuzzy, c-format
+msgid "Expecting space at offset %zu in MRSETS record."
+msgstr "Dubbele variabelenaam %s op offset %zu in MRSETS record."
+
+#: src/data/sys-file-reader.c:2245
+#, c-format
+msgid "%zu-byte string starting at offset %zu exceeds record length %zu."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2255
+#, c-format
+msgid "Expecting space at offset %zu following %zu-byte string."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2347 tests/dissect-sysfile.c:1341
 #, c-format
 msgid "System error: %s."
-msgstr "Systeem fout: %s."
+msgstr "Systeemfout: %s."
 
-#: src/data/sys-file-reader.c:2060 tests/dissect-sysfile.c:961
+#: src/data/sys-file-reader.c:2349 tests/dissect-sysfile.c:1343
 msgid "Unexpected end of file."
-msgstr "Onverwacht bestand einde."
+msgstr "Onverwacht einde-bestand."
 
-#: src/data/sys-file-writer.c:176
+#: src/data/sys-file-writer.c:180
 #, c-format
 msgid "Unknown system file version %d. Treating as version %d."
-msgstr "Onbekende systeem bestand versie %d. Behandeld als versie %d."
+msgstr "Onbekende systeembestand versie %d. Behandeld als versie %d."
 
-#: src/data/sys-file-writer.c:215
+#: src/data/sys-file-writer.c:219
 #, c-format
 msgid "Error opening \"%s\" for writing as a system file: %s."
 msgstr ""
-"Fout bij het openen van \"%s\" voor het schrijven als een systeem bestand: %"
-"s."
+"Fout bij het openen van \"%s\" voor het schrijven als een systeembestand: %s."
 
-#: src/data/sys-file-writer.c:923
+#: src/data/sys-file-writer.c:989
 #, c-format
 msgid "An I/O error occurred writing system file \"%s\"."
 msgstr ""
-"Een I/O fout is opgetreden tijdens het schrijven van systeem bestand \"%s\"."
+"Een I/O fout is opgetreden tijdens het schrijven van systeembestand \"%s\"."
 
-#: src/data/variable.c:242
+#: src/data/variable.c:206
 #, c-format
 msgid ""
 "Character `%c' (in %s) may not appear as the first character in a variable "
 "name."
 msgstr ""
-"Karakter '%c' (in %s) mag niet als eerste karakter in een variabele naam "
-"voorkomen. "
+"Teken '%c' (in %s) mag niet als eerste teken in een variabelennaam voorkomen."
 
-#: src/data/variable.c:254
+#: src/data/variable.c:218
 #, c-format
 msgid "Character `%c' (in %s) may not appear in a variable name."
-msgstr "Karakter '%c' (in %s) mag niet in een variabele naam voorkomen."
+msgstr "Teken '%c' (in %s) mag niet in een variabelennaam voorkomen."
 
-#: src/data/variable.c:282
+#: src/data/variable.c:244
 msgid "Variable name cannot be empty string."
-msgstr "Variabele naam kan geen lege string zijn."
+msgstr "Variabelennaam kan geen lege tekenreeks zijn."
 
-#: src/data/variable.c:288
+#: src/data/variable.c:250
 #, c-format
 msgid "Variable name %s exceeds %d-character limit."
-msgstr "Variabele naam %s overschrijdt de limiet van %d-karakters."
+msgstr "Variabelennaam %s overschrijdt de limiet van %d tekens."
 
-#: src/data/variable.c:296
+#: src/data/variable.c:258
 #, c-format
 msgid "`%s' may not be used as a variable name because it is a reserved word."
 msgstr ""
-"'%s' mag niet gebruikt worden als variabele naam omdat het een gereserveerd "
+"'%s' mag niet gebruikt worden als variabelennaam omdat het een gereserveerd "
 "woord is."
 
-#: src/language/syntax-file.c:88
-#, c-format
-msgid "opening \"%s\" as syntax file"
-msgstr "openen \"%s\" als syntax bestand"
-
-#: src/language/syntax-file.c:93
+#: src/language/syntax-file.c:95
 #, c-format
 msgid "Opening `%s': %s."
 msgstr "Openen '%s': %s."
 
-#: src/language/syntax-file.c:107
+#: src/language/syntax-file.c:109
 #, c-format
 msgid "Reading `%s': %s."
 msgstr "Lezen '%s': %s."
 
-#: src/language/syntax-file.c:127
+#: src/language/syntax-file.c:126
 #, c-format
 msgid "Closing `%s': %s."
 msgstr "Sluiten '%s': %s."
 
-#: src/language/command.c:208 src/language/expressions/parse.c:1267
+#: src/language/command.c:205 src/language/expressions/parse.c:1267
+#: src/language/utilities/set.q:213
 #, c-format
 msgid "%s is not yet implemented."
 msgstr "%s is nog niet geïmplementeerd."
 
-#: src/language/command.c:214
+#: src/language/command.c:210
 #, c-format
 msgid "%s may be used only in testing mode."
-msgstr "%s mag alleen in test modus gebruikt worden."
+msgstr "%s mag alleen in testmodus gebruikt worden."
 
-#: src/language/command.c:220
+#: src/language/command.c:215
 #, c-format
 msgid "%s may be used only in enhanced syntax mode."
-msgstr "%s mag alleen in uitgebreide syntax modus gebruikt worden."
+msgstr "%s mag alleen in uitgebreide syntaxmodus gebruikt worden."
 
-#: src/language/command.c:248
+#: src/language/command.c:239
 msgid "Error encountered while ERROR=STOP is effective."
 msgstr "Fout tegengekomen terwijl ERROR=STOP is actief."
 
-#: src/language/command.c:489
+#: src/language/command.c:484
 msgid "expecting command name"
-msgstr "opdracht naam verwacht"
+msgstr "opdrachtnaam verwacht"
 
-#: src/language/command.c:503
+#: src/language/command.c:498
 #, c-format
 msgid "Unknown command %s."
 msgstr "Onbekende opdracht %s."
 
-#: src/language/command.c:628
+#: src/language/command.c:623
 #, c-format
 msgid "%s is allowed only before the active file has been defined."
 msgstr "%s is alleen toegestaan voordat het actieve bestand is gedefinieerd."
 
-#: src/language/command.c:632
+#: src/language/command.c:627
 #, c-format
 msgid "%s is allowed only after the active file has been defined."
 msgstr "%s is alleen toegestaan nadat het actieve bestand is gedefinieerd."
 
-#: src/language/command.c:636
+#: src/language/command.c:631
 #, c-format
 msgid "%s is allowed only inside INPUT PROGRAM."
 msgstr "%s is alleen toegestaan binnen INPUT PROGRAM."
 
-#: src/language/command.c:640
+#: src/language/command.c:635
 #, c-format
 msgid "%s is allowed only inside FILE TYPE."
 msgstr "%s is alleen toegestaan binnen FILE TYPE."
 
-#: src/language/command.c:647
+#: src/language/command.c:642
 #, c-format
 msgid ""
 "%s is allowed only before the active file has been defined or inside INPUT "
@@ -1245,7 +1273,7 @@ msgstr ""
 "%s is alleen toegestaan voordat het actieve bestand is gedefinieerd of "
 "binnen INPUT PROGRAMMA."
 
-#: src/language/command.c:651
+#: src/language/command.c:646
 #, c-format
 msgid ""
 "%s is allowed only before the active file has been defined or inside FILE "
@@ -1254,7 +1282,7 @@ msgstr ""
 "%s is alleen toegestaan voordat het actieve bestand is gedefinieerd of "
 "binnen FILE TYPE."
 
-#: src/language/command.c:655
+#: src/language/command.c:650
 #, c-format
 msgid ""
 "%s is allowed only after the active file has been defined or inside INPUT "
@@ -1263,7 +1291,7 @@ msgstr ""
 "%s is alleen toegestaan nadat het actieve bestand is gedefinieerd of binnen "
 "INPUT PROGRAMMA."
 
-#: src/language/command.c:659
+#: src/language/command.c:654
 #, c-format
 msgid ""
 "%s is allowed only after the active file has been defined or inside FILE "
@@ -1272,12 +1300,12 @@ msgstr ""
 "%s is alleen toegestaan nadat het actieve bestand is gedefinieerd of binnen "
 "FILE TYPE."
 
-#: src/language/command.c:663
+#: src/language/command.c:658
 #, c-format
 msgid "%s is allowed only inside INPUT PROGRAM or inside FILE TYPE."
 msgstr "%s is alleen toegestaan binnen INPUT PROGRAM of binnen FILE TYPE."
 
-#: src/language/command.c:669
+#: src/language/command.c:664
 #, c-format
 msgid ""
 "%s is allowed only after the active file has been defined, inside INPUT "
@@ -1286,7 +1314,7 @@ msgstr ""
 "%s is alleen toegestaan nadat het actieve bestand is gedefinieerd, binnen "
 "INPUT PROGRAM of binnen FILE TYPE."
 
-#: src/language/command.c:674
+#: src/language/command.c:669
 #, c-format
 msgid ""
 "%s is allowed only before the active file has been defined, inside INPUT "
@@ -1295,154 +1323,150 @@ msgstr ""
 "%s is alleen toegestaan voordat het actieve bestand is gedefinieerd, binnen "
 "INPUT PROGRAM of binnen FILE TYPE."
 
-#: src/language/command.c:692
-#, c-format
-msgid "%s is not allowed inside INPUT PROGRAM."
-msgstr "%s is niet toegestaan binnen INPUT PROGRAM."
-
-#: src/language/command.c:694
+#: src/language/command.c:687 src/language/command.c:689
 #, c-format
-msgid "%s is not allowed inside FILE TYPE."
-msgstr "%s is niet toegestaan binnen FILE TYPE."
+msgid "%s is not allowed inside %s."
+msgstr "%s is niet toegestaan binnen %s."
 
-#: src/language/command.c:773 src/language/command.c:881
+#: src/language/command.c:768 src/language/command.c:876
 #: src/language/utilities/permissions.c:98
 msgid "This command not allowed when the SAFER option is set."
 msgstr "Deze opdracht is niet toegestaan als de SAFER optie is gezet."
 
-#: src/language/command.c:785
+#: src/language/command.c:780
 #, c-format
 msgid "Error removing `%s': %s."
 msgstr "Fout bij verwijderen '%s': %s."
 
-#: src/language/command.c:835
+#: src/language/command.c:830
 #, c-format
 msgid "Couldn't fork: %s."
 msgstr ""
 
-#: src/language/command.c:850
+#: src/language/command.c:845
 msgid "Interactive shell not supported on this platform."
-msgstr "Interactieve shell niet ondersteunt op dit platform."
+msgstr "Interactieve-shell niet ondersteund op dit platform."
 
-#: src/language/command.c:862
+#: src/language/command.c:857
 msgid "Command shell not supported on this platform."
-msgstr "Opdracht shell niet ondersteunt op dit platform."
+msgstr "Opdracht-shell niet ondersteund op dit platform."
 
-#: src/language/command.c:868
+#: src/language/command.c:863
 #, c-format
 msgid "Error executing command: %s."
 msgstr "Fout tijdens uitvoeren opdracht: %s."
 
-#: src/language/lexer/lexer.c:283
+#: src/language/lexer/lexer.c:284
 #, c-format
 msgid "%s does not form a valid number."
 msgstr "%s vormt geen geldig nummer."
 
-#: src/language/lexer/lexer.c:389
-#, fuzzy, c-format
+#: src/language/lexer/lexer.c:390
+#, c-format
 msgid "Bad character in input: `%s'."
-msgstr "Fout karakter in input: '%c'."
+msgstr "Foutief teken in invoer: '%s'."
 
-#: src/language/lexer/lexer.c:426
+#: src/language/lexer/lexer.c:427
 #, c-format
 msgid "Subcommand %s may only be specified once."
 msgstr "Subopdracht %s mag slechts een keer gespecificeerd worden."
 
-#: src/language/lexer/lexer.c:434
+#: src/language/lexer/lexer.c:435
 #, c-format
 msgid "missing required subcommand %s"
-msgstr "mis verplichte subopdracht %s"
+msgstr "mis vereiste subopdracht %s"
 
-#: src/language/lexer/lexer.c:463
+#: src/language/lexer/lexer.c:464
 #, c-format
 msgid "Syntax error %s at %s."
-msgstr "Syntax fout %s op %s."
+msgstr "Syntaxfout %s op %s."
 
-#: src/language/lexer/lexer.c:466
+#: src/language/lexer/lexer.c:467
 #, c-format
 msgid "Syntax error at %s."
-msgstr "Syntax fout op %s."
+msgstr "Syntaxfout op %s."
 
-#: src/language/lexer/lexer.c:478 src/language/xforms/select-if.c:60
-#: src/language/stats/autorecode.c:154 src/language/data-io/print-space.c:73
+#: src/language/lexer/lexer.c:479 src/language/xforms/select-if.c:60
+#: src/language/stats/autorecode.c:144 src/language/data-io/print-space.c:73
 msgid "expecting end of command"
-msgstr "verwacht einde van opdracht "
+msgstr "verwacht einde-van-opdracht "
 
-#: src/language/lexer/lexer.c:600 src/language/lexer/lexer.c:617
+#: src/language/lexer/lexer.c:601 src/language/lexer/lexer.c:618
 #, c-format
 msgid "expecting `%s'"
 msgstr "verwacht '%s'"
 
-#: src/language/lexer/lexer.c:631
+#: src/language/lexer/lexer.c:632
 msgid "expecting string"
-msgstr "string verwacht"
+msgstr "tekenreeks verwacht"
 
-#: src/language/lexer/lexer.c:645
+#: src/language/lexer/lexer.c:646
 msgid "expecting integer"
 msgstr "verwacht integer"
 
-#: src/language/lexer/lexer.c:658
+#: src/language/lexer/lexer.c:659
 msgid "expecting number"
 msgstr "nummer verwacht"
 
-#: src/language/lexer/lexer.c:670
+#: src/language/lexer/lexer.c:671
 msgid "expecting identifier"
 msgstr "verwacht herkenningsteken"
 
-#: src/language/lexer/lexer.c:1064
+#: src/language/lexer/lexer.c:1065
 msgid "binary"
 msgstr "binair"
 
-#: src/language/lexer/lexer.c:1069
+#: src/language/lexer/lexer.c:1070
 msgid "octal"
 msgstr "octaal"
 
-#: src/language/lexer/lexer.c:1074
+#: src/language/lexer/lexer.c:1075
 msgid "hex"
-msgstr ""
+msgstr "hexadecimaal"
 
-#: src/language/lexer/lexer.c:1084
+#: src/language/lexer/lexer.c:1085
 #, c-format
 msgid "String of %s digits has %zu characters, which is not a multiple of %d."
 msgstr ""
-"String van %s cijfers heeft %zu karakters, wat geen meervoud van %d is."
+"Tekenreeks van %s cijfers bestaat uit %zu tekens, dat geen meervoud van %d "
+"is."
 
-#: src/language/lexer/lexer.c:1113
+#: src/language/lexer/lexer.c:1114
 #, c-format
 msgid "`%c' is not a valid %s digit."
 msgstr "'%c' is geen geldig %s cijfer."
 
-#: src/language/lexer/lexer.c:1147
+#: src/language/lexer/lexer.c:1148
 msgid "Unterminated string constant."
-msgstr "Geen einde aan string constante."
+msgstr "Geen einde aan tekenreeksconstante."
 
-#: src/language/lexer/lexer.c:1201
+#: src/language/lexer/lexer.c:1202
 msgid "Unexpected end of file in string concatenation."
-msgstr "Onverwacht bestandseinde in string samenvoeging."
+msgstr "Onverwacht bestandseinde in tekenreeks samenvoeging."
 
-#: src/language/lexer/lexer.c:1209
+#: src/language/lexer/lexer.c:1210
 msgid "String expected following `+'."
-msgstr "String verwacht achter '+'."
+msgstr "Tekenreeks verwacht achter '+'."
 
-#: src/language/lexer/lexer.c:1222
+#: src/language/lexer/lexer.c:1223
 #, c-format
 msgid "String exceeds 255 characters in length (%zu characters)."
-msgstr "String overschrijdt de lengte van 255 karakters (%zu karakters)."
+msgstr "Tekenreeks overschrijdt de lengte van 255 tekens (%zu tekens)."
 
 #: src/language/lexer/format-parser.c:88
 msgid "expecting valid format specifier"
-msgstr "verwacht geldige formaat specificator"
+msgstr "verwacht geldige indelingsspecificator"
 
 #: src/language/lexer/format-parser.c:107
 #: src/language/lexer/format-parser.c:126
 #: src/language/data-io/placement-parser.c:226
 #, c-format
 msgid "Unknown format type \"%s\"."
-msgstr "Onbekend formaat type \"%s\"."
+msgstr "Onbekend opmaaktype \"%s\"."
 
 #: src/language/lexer/format-parser.c:121
 msgid "expecting format type"
-msgstr "verwacht formaat type"
+msgstr "verwacht opmaaktype"
 
 #: src/language/lexer/value-parser.c:60
 #, c-format
@@ -1450,17 +1474,17 @@ msgid ""
 "Low end of range (%g) is below high end (%g).  The range will be treated as "
 "reversed."
 msgstr ""
-"Ondergrens van range (%g) is lager dan bovengrens (%g). De range wordt "
+"Ondergrens van bereik (%g) is lager dan bovengrens (%g). Het bereik wordt "
 "behandeld als omgekeerd."
 
 #: src/language/lexer/value-parser.c:68
 #, c-format
 msgid "Ends of range are equal (%g)."
-msgstr "Eindes van range zijn gelijk (%g)."
+msgstr "Eindes van bereik zijn gelijk (%g)."
 
 #: src/language/lexer/value-parser.c:76
 msgid "LO or LOWEST must be part of a range."
-msgstr "LO of LOWEST moet een onderdeel van een range zijn."
+msgstr "LO of LOWEST moet een onderdeel van een bereik zijn."
 
 #: src/language/lexer/value-parser.c:109
 msgid "System-missing value is not valid here."
@@ -1468,69 +1492,71 @@ msgstr "System-missing waarde is hier niet geldig."
 
 #: src/language/lexer/value-parser.c:117
 msgid "expecting number or data string"
-msgstr "nummer of data string verwacht"
+msgstr "nummer of gegevenstekenreeks verwacht"
 
-#: src/language/lexer/variable-parser.c:63
+#: src/language/lexer/variable-parser.c:65
 msgid "expecting variable name"
-msgstr "variabele naam verwacht"
+msgstr "variabelennaam werd verwacht"
 
-#: src/language/lexer/variable-parser.c:73
+#: src/language/lexer/variable-parser.c:75
 #, c-format
 msgid "%s is not a variable name."
-msgstr "%s is geen variabele naam."
+msgstr "%s is geen variabelennaam."
 
-#: src/language/lexer/variable-parser.c:176
+#: src/language/lexer/variable-parser.c:178
 #, c-format
 msgid ""
 "%s is not a numeric variable.  It will not be included in the variable list."
 msgstr ""
-"%s is geen numerieke variabele. Het wordt niet opgenomen in de variabele "
-"lijst."
+"%s is geen numerieke variabele. Het wordt niet opgenomen in de "
+"variabelenlijst."
 
-#: src/language/lexer/variable-parser.c:179
+#: src/language/lexer/variable-parser.c:181
 #, c-format
 msgid ""
 "%s is not a string variable.  It will not be included in the variable list."
 msgstr ""
-"%s is geen string variabele. Het wordt niet opgenomen in de variabele lijst."
+"%s is geen tekenreeksvariabele. Het wordt niet opgenomen in de "
+"variabelenlijst."
 
-#: src/language/lexer/variable-parser.c:183
+#: src/language/lexer/variable-parser.c:185
 #, c-format
 msgid "Scratch variables (such as %s) are not allowed here."
 msgstr "Scratch variabelen (zoals %s) zijn hier niet toegestaan."
 
-#: src/language/lexer/variable-parser.c:187
+#: src/language/lexer/variable-parser.c:189
 #, c-format
 msgid ""
 "%s and %s are not the same type.  All variables in this variable list must "
 "be of the same type.  %s will be omitted from the list."
 msgstr ""
-"%s en %s zijn niet van hetzelfde type. Alle variabelen in deze variabele "
-"lijst dienen van hetzelfde type te zijn.  %s wordt overgeslagen voor de "
-"lijst."
+"%s en %s zijn niet van hetzelfde type. Alle variabelen in deze "
+"variabelenlijst dienen van hetzelfde type te zijn.  %s wordt overgeslagen "
+"voor de lijst."
 
-#: src/language/lexer/variable-parser.c:193
+#: src/language/lexer/variable-parser.c:195
 #, c-format
 msgid ""
 "%s and %s are string variables with different widths.  All variables in this "
 "variable list must have the same width.  %s will be omitted from the list."
 msgstr ""
-"%s en %s hebben verschillende breedtes. Alle variabelen in deze variabele "
-"lijst dienen dezelfde breedte te hebben.  %s wordt overgeslagen voor de "
-"lijst."
+"%s en %s hebben verschillende breedtes. Alle variabelen in deze "
+"variabelenlijst dienen dezelfde breedte te hebben.  %s wordt overgeslagen "
+"voor de lijst."
 
-#: src/language/lexer/variable-parser.c:198
+#: src/language/lexer/variable-parser.c:200
+#: src/language/lexer/variable-parser.c:496
 #, c-format
 msgid "Variable %s appears twice in variable list."
-msgstr "Variabele %s komt 2 keer in de variabele lijst voor."
+msgstr "Variabele %s komt 2 keer in de variabelenlijst voor."
 
-#: src/language/lexer/variable-parser.c:311
+#: src/language/lexer/variable-parser.c:313
 #, c-format
 msgid "%s TO %s is not valid syntax since %s precedes %s in the dictionary."
 msgstr ""
 "%s TO %s is geen geldige syntax omdat %s voor %s in het woordenboek staat."
 
-#: src/language/lexer/variable-parser.c:319
+#: src/language/lexer/variable-parser.c:321
 #, c-format
 msgid ""
 "When using the TO keyword to specify several variables, both variables must "
@@ -1538,23 +1564,23 @@ msgid ""
 "system variables.  %s is a %s variable, whereas %s is %s."
 msgstr ""
 "Wanneer het sleutelwoord TO wordt gebruikt om verscheidene variabelen te "
-"specificeren, moeten beide variabelen van het zelfde variabele "
-"woordenboeken, of gewone, scratch, of systeem variabelen zijn. %s is een %s "
-"variabele, terwijl %s %s. is. "
+"specificeren, moeten beide variabelen van het zelfde "
+"variabelenwoordenboeken, of gewone- scratch- of systeemvariabelen zijn. %s "
+"is een %s variabele, terwijl %s %s. is."
 
-#: src/language/lexer/variable-parser.c:393
+#: src/language/lexer/variable-parser.c:395
 msgid "incorrect use of TO convention"
 msgstr "foutief gebruik van TO conventie"
 
-#: src/language/lexer/variable-parser.c:436
+#: src/language/lexer/variable-parser.c:450
 msgid "Scratch variables not allowed here."
 msgstr "Scratch variabelen niet toegestaan hier."
 
-#: src/language/lexer/variable-parser.c:458
+#: src/language/lexer/variable-parser.c:472
 msgid "Prefixes don't match in use of TO convention."
-msgstr "Prefixen komen niet overeen in het gebruik van TO conventie. "
+msgstr "Prefixen komen niet overeen in het gebruik van TO conventie."
 
-#: src/language/lexer/variable-parser.c:463
+#: src/language/lexer/variable-parser.c:477
 msgid "Bad bounds in use of TO convention."
 msgstr "Slechte grenzen in het gebruik van TO conventie."
 
@@ -1582,7 +1608,7 @@ msgstr "Er is geen vector genaamd %s."
 
 #: src/language/xforms/count.c:123
 msgid "Destination cannot be a string variable."
-msgstr "Bestemming kan geen string variabele zijn."
+msgstr "Bestemming kan geen tekenreeksvariabele zijn."
 
 #: src/language/xforms/sample.c:76
 msgid "The sampling factor must be between 0 and 1 exclusive."
@@ -1598,20 +1624,20 @@ msgid ""
 "Inconsistent target variable types.  Target variables must be all numeric or "
 "all string."
 msgstr ""
-"Inconsistent doel variabele types.  Doel variabelen moeten allemaal numeriek "
-"of allemaal string zijn. "
+"Inconsistent doelvariabelen-types.  Doelvariabelen moeten allemaal numeriek "
+"of allemaal tekenreeks zijn."
 
 #: src/language/xforms/recode.c:269
 msgid "CONVERT requires string input values and numeric output values."
-msgstr "CONVERT vereist string invoer waardes en numerieke uitvoer waardes."
+msgstr "CONVERT vereist tekenreeks invoerwaardes en numerieke uitvoerwaardes."
 
 #: src/language/xforms/recode.c:324
 msgid "THRU is not allowed with string variables."
-msgstr "THRU is niet toegestaan met string variabelen."
+msgstr "THRU is niet toegestaan met tekenreeksvariabelen."
 
 #: src/language/xforms/recode.c:403
 msgid "expecting output value"
-msgstr "verwacht uitvoer waarde"
+msgstr "verwacht uitvoerwaarde"
 
 #: src/language/xforms/recode.c:460
 #, c-format
@@ -1620,7 +1646,7 @@ msgid ""
 "number of variables as source and target variables."
 msgstr ""
 "%zu variabel(en) kunnen niet gehercodeerd worden in %zu variabel(en).  "
-"Specificeer hetzelfde aantal variabelen als bron en als doel variabelen."
+"Specificeer hetzelfde aantal variabelen als bron- en als doelvariabelen."
 
 #: src/language/xforms/recode.c:475
 #, c-format
@@ -1628,31 +1654,31 @@ msgid ""
 "There is no variable named %s.  (All string variables specified on INTO must "
 "already exist.  Use the STRING command to create a string variable.)"
 msgstr ""
-"Er is geen variabele genaamd %s.  (Alle string variabelen gespecificeerd bij "
-"INTO dienen al te bestaan.  Gebruik de STRING opdracht om een string "
+"Er is geen variabele genaamd %s.  (Alle tekenreeksvariabelen gespecificeerd "
+"bij INTO dienen al te bestaan.  Gebruik de STRING opdracht om een tekenreeks "
 "variabele aan te maken.)"
 
 #: src/language/xforms/recode.c:491
 #, c-format
 msgid "INTO is required with %s input values and %s output values."
-msgstr "INTO is vereist met %s invoer waardes en %s uitvoer waardes."
+msgstr "INTO is vereist met %s invoerwaardes en %s uitvoerwaardes."
 
 #: src/language/xforms/recode.c:504
 #, c-format
 msgid "Type mismatch.  Cannot store %s data in %s variable %s."
-msgstr "Type fout. Kan %s data niet in %s variabele %s opslaan. "
+msgstr "Type fout. Kan %s gegevens niet in %s variabele %s opslaan."
 
 #: src/language/xforms/select-if.c:100
 msgid "Syntax error expecting OFF or BY.  Turning off case filtering."
-msgstr "Syntax fout verwacht OFF of BY. Schakelt case filtering uit. "
+msgstr "Syntaxfout verwacht OFF of BY. Schakelt case filtering uit."
 
 #: src/language/xforms/select-if.c:115
 msgid "The filter variable must be numeric."
-msgstr "De filter variabele moet numeriek zijn."
+msgstr "De filtervariabele moet numeriek zijn."
 
 #: src/language/xforms/select-if.c:121
 msgid "The filter variable may not be scratch."
-msgstr "De filter variabele mag niet scratch zijn."
+msgstr "De filtervariabele mag niet scratch zijn."
 
 #: src/language/control/control-stack.c:27
 #, c-format
@@ -1686,63 +1712,63 @@ msgstr ""
 "Deze opdracht mag slechts 1 keer voorkomen tussen procedures en procedure-"
 "achtige opdrachten."
 
-#: src/language/control/repeat.c:171
+#: src/language/control/repeat.c:172
 #, c-format
 msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
-msgstr "Dummy variabele naam \"%s\" verbergt woordenboek variabele \"%s\"."
+msgstr "Dummy-variabelennaam \"%s\" verbergt woordenboekvariabele \"%s\"."
 
-#: src/language/control/repeat.c:176
+#: src/language/control/repeat.c:177
 #, c-format
 msgid "Dummy variable name \"%s\" is given twice."
-msgstr "Dummy variabele naam \"%s\"is 2 keer opgegeven."
+msgstr "Dummy-variabelennaam \"%s\" is twee keer opgegeven."
 
-#: src/language/control/repeat.c:222
+#: src/language/control/repeat.c:223
 #, c-format
 msgid ""
 "Dummy variable \"%.*s\" had %d substitutions, so \"%.*s\" must also, but %d "
 "were specified."
 msgstr ""
-"Dummy variabele \"%.*s\" heeft %d substituties, dus \"%.*s\" moet dat ook, "
+"Dummy variabele \"%.*s\" heeft %d vervangingen, dus \"%.*s\" moet dat ook, "
 "maar %d zijn er gespecificeerd."
 
-#: src/language/control/repeat.c:334
+#: src/language/control/repeat.c:335
 msgid "DO REPEAT may not nest in compatibility mode."
-msgstr "DO REPEAT mag niet nesten in compatibiliteit mode."
+msgstr "DO REPEAT mag niet nesten in compatibiliteitsmodus."
 
-#: src/language/control/repeat.c:436
+#: src/language/control/repeat.c:437
 msgid "Ranges may only have integer bounds"
-msgstr "Ranges mogen alleen integer grenzen hebben"
+msgstr "Bereiken mogen alleen integer grenzen hebben"
 
-#: src/language/control/repeat.c:445
+#: src/language/control/repeat.c:446
 #, c-format
 msgid "%g TO %g is an invalid range."
-msgstr "%g TO %g is een ongeldige range."
+msgstr "%g TO %g is een ongeldig bereik."
 
-#: src/language/control/repeat.c:480
+#: src/language/control/repeat.c:481
 msgid "String expected."
-msgstr "String verwacht."
+msgstr "Tekenreeks verwacht."
 
-#: src/language/control/repeat.c:499
+#: src/language/control/repeat.c:500
 msgid "No matching DO REPEAT."
 msgstr "Geen overeenkomende DO REPEAT."
 
 #: src/language/dictionary/attributes.c:108
 msgid "Attribute array index must be between 1 and 65535."
-msgstr "Attribuut array index moet tussen 1 en 65535 liggen."
+msgstr "Attribuut tabel index moet minimaal 1 en maximaal 65535 zijn."
 
 #: src/language/dictionary/attributes.c:189
 msgid "expecting ATTRIBUTE= or DELETE="
-msgstr "ATTRIBUTE= of DELETE= verwacht"
+msgstr "verwacht ATTRIBUTE= of DELETE="
 
 #: src/language/dictionary/apply-dictionary.c:75
 #, c-format
 msgid "Variable %s is %s in target file, but %s in source file."
-msgstr "Variabele %s is %s in doel bestand, maar %s in bron bestand."
+msgstr "Variabele %s is %s in doelbestand, maar %s in bronbestand."
 
 #: src/language/dictionary/apply-dictionary.c:115
 msgid "No matching variables found between the source and target files."
 msgstr ""
-"Geen overeenkomende variabelen gevonden tussen het bron en het doel bestand."
+"Geen overeenkomende variabelen gevonden tussen het bron- en het doelbestand."
 
 #: src/language/dictionary/delete-variables.c:40
 msgid ""
@@ -1758,18 +1784,18 @@ msgid ""
 "file dictionary.  Use NEW FILE instead."
 msgstr ""
 "DELETE VARIABLES mag niet gebruikt om alle variabelen van het actieve "
-"bestand woordenboek te verwijderen. Gebruik NEW FILE in de plaats."
+"bestandwoordenboek te verwijderen. Gebruik NEW FILE in de plaats."
 
 #: src/language/dictionary/formats.c:90
 msgid "`(' expected after variable list."
-msgstr "'(' verwacht na variabele lijst."
+msgstr "'(' verwacht na variabelenlijst."
 
 #: src/language/dictionary/formats.c:100 src/language/dictionary/numeric.c:74
 msgid "`)' expected after output format."
-msgstr "')' verwacht na output formaat."
+msgstr "')' verwacht na uitvoerindeling."
 
 #: src/language/dictionary/missing-values.c:56
-#: src/language/stats/aggregate.c:458
+#: src/language/stats/aggregate.c:459
 msgid "expecting `('"
 msgstr "'(' verwacht"
 
@@ -1779,20 +1805,21 @@ msgid ""
 "Cannot mix numeric variables (e.g. %s) and string variables (e.g. %s) within "
 "a single list."
 msgstr ""
-"Kan numerieke variabelen (b.v. %s) en string variabelen (b.v. %s) niet mixen "
-"binnen een enkele lijst."
+"Kan numerieke variabelen (b.v. %s) en tekenreeksvariabelen (b.v. %s) niet "
+"mixen binnen een enkele lijst."
 
 #: src/language/dictionary/missing-values.c:116
-#, fuzzy, c-format
+#, c-format
 msgid "Truncating missing value to maximum acceptable length (%d bytes)."
-msgstr "Afkappen missing value naar short string lengte (%d karakters)."
+msgstr ""
+"Afkappen ontbrekende-waarde naar maximale acceptabele lengte (%d bytes)."
 
 #: src/language/dictionary/missing-values.c:138
 #, c-format
 msgid "Missing values provided are too long to assign to variable of width %d."
 msgstr ""
-"De opgegeven missing values zijn te lang om toe te kennen aan een variabele "
-"van breedte %d."
+"De opgegeven ontbrekende-waarde zijn te lang om toe te kennen aan een "
+"variabele van breedte %d."
 
 #: src/language/dictionary/modify-variables.c:92
 msgid ""
@@ -1803,58 +1830,54 @@ msgstr ""
 "zullen permanent gemaakt worden."
 
 #: src/language/dictionary/modify-variables.c:114
-msgid "REORDER subcommand may be given at most once."
-msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/language/dictionary/modify-variables.c:177
+#, c-format
+msgid "%s subcommand may be given at most once."
+msgstr "%s-subopdracht mag maximaal 1 keer gegeven worden."
 
 #: src/language/dictionary/modify-variables.c:137
 msgid "Cannot specify ALL after specifying a set of variables."
 msgstr "Kan niet ALL opgeven na het specificeren van een set van variabelen."
 
 #: src/language/dictionary/modify-variables.c:147
-msgid "`(' expected on REORDER subcommand."
-msgstr "'(' verwacht bij REORDER subopdracht."
+#: src/language/dictionary/modify-variables.c:190
+#, c-format
+msgid "`(' expected on %s subcommand."
+msgstr "'(' verwacht in %s-subopdracht."
 
 #: src/language/dictionary/modify-variables.c:159
 msgid "`)' expected following variable names on REORDER subcommand."
-msgstr "')' verwacht achter variabele namen bij REORDER subopdracht."
-
-#: src/language/dictionary/modify-variables.c:177
-msgid "RENAME subcommand may be given at most once."
-msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
-
-#: src/language/dictionary/modify-variables.c:190
-msgid "`(' expected on RENAME subcommand."
-msgstr "'(' verwacht bij RENAME subopdracht."
+msgstr "')' verwacht achter variabelennamen in REORDER-subopdracht."
 
 #: src/language/dictionary/modify-variables.c:199
 msgid ""
 "`=' expected between lists of new and old variable names on RENAME "
 "subcommand."
 msgstr ""
-"'=' verwacht tussen lijst van nieuwe en oude variabele namen bij RENAME "
-"subopdracht. "
+"'=' verwacht tussen lijst van nieuwe en oude variabelennamen in RENAME-"
+"subopdracht."
 
 #: src/language/dictionary/modify-variables.c:208
-#: src/language/dictionary/rename-variables.c:76
+#: src/language/dictionary/rename-variables.c:77
 #, c-format
 msgid ""
 "Differing number of variables in old name list (%zu) and in new name list (%"
 "zu)."
 msgstr ""
-"Verschillend aantal variabelen in oude naam lijst (%zu) en in de nieuwe naam "
-"lijst (%zu)."
+"Verschillend aantal variabelen in oude naamlijst (%zu) en in de nieuwe "
+"naamlijst (%zu)."
 
 #: src/language/dictionary/modify-variables.c:219
 msgid "`)' expected after variable lists on RENAME subcommand."
-msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+msgstr "')' verwacht na variabelenlijst in RENAME-subopdracht."
 
 #: src/language/dictionary/modify-variables.c:233
 msgid ""
 "KEEP subcommand may be given at most once.  It may not be given in "
 "conjunction with the DROP subcommand."
 msgstr ""
-"KEEP subopdracht mag slechts eenmaal gegeven worden. Het mag niet gegeven "
-"worden in combinatie met de DROP subopdracht."
+"KEEP-subopdracht mag slechts eenmaal gegeven worden. Het mag niet gegeven "
+"worden in combinatie met de DROP-subopdracht."
 
 #: src/language/dictionary/modify-variables.c:276
 msgid ""
@@ -1862,25 +1885,185 @@ msgid ""
 "conjunction with the KEEP subcommand."
 msgstr ""
 "DROP subopdracht mag slechts eenmaal gegeven worden. Het mag niet gegeven "
-"worden in combinatie met de KEEP subopdracht."
+"worden in combinatie met de KEEP-subopdracht."
 
 #: src/language/dictionary/modify-variables.c:302
 #, c-format
 msgid "Unrecognized subcommand name `%s'."
-msgstr "Niet herkende subopdracht naam `%s'."
+msgstr "Niet-herkende subopdrachtnaam '%s'."
 
 #: src/language/dictionary/modify-variables.c:304
 msgid "Subcommand name expected."
-msgstr "Subopdracht naam verwacht."
+msgstr "Subopdrachtnaam verwacht."
 
 #: src/language/dictionary/modify-variables.c:312
 msgid "`/' or `.' expected."
 msgstr "'/' of '.' verwacht."
 
+#: src/language/dictionary/mrsets.c:98
+#, c-format
+msgid ""
+"%s is not a valid name for a multiple response set.  Multiple response set "
+"names must begin with `$'."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:120
+#, c-format
+msgid ""
+"VARIABLES specified only variable %s on %s, but at least two variables are "
+"required."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:153
+msgid "Numeric VALUE must be an integer."
+msgstr "Numerieke VALUE moet een integer zijn ."
+
+#: src/language/dictionary/mrsets.c:207 src/language/dictionary/mrsets.c:213
+#: src/language/dictionary/mrsets.c:223
+#, c-format
+msgid "Required %s specification missing from %s subcommand."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:231 src/language/dictionary/mrsets.c:269
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies a string VALUE, but the variables "
+"specified for this group are numeric."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:255
+#, c-format
+msgid ""
+"VALUE string on MDGROUP subcommand for group %s is %d bytes long, but it "
+"must be no longer than the narrowest variable in the group, which is %s with "
+"a width of %d bytes."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:281
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies LABELSOURCE=VARLABEL but not "
+"CATEGORYLABELS=COUNTEDVALUES.  Ignoring LABELSOURCE."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:287
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies both LABEL and LABELSOURCE, but "
+"only one of these subcommands may be used at a time.  Ignoring LABELSOURCE."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:327
+#, c-format
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s have "
+"the same variable label.  Categories represented by these variables will not "
+"be distinguishable in output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:357
+#, c-format
+msgid ""
+"Variable %s specified as part of multiple dichotomy group %s (which has "
+"CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value.  "
+"This category will not be distinguishable in output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:370
+#, c-format
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s (which "
+"has CATEGORYLABELS=COUNTEDVALUES) have the same value label for the the "
+"group's counted value.  These categories will not be distinguishable in "
+"output."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:427
+#, c-format
+msgid ""
+"Variables specified on MCGROUP should have the same categories, but %s and %"
+"s (and possibly others) in multiple category group %s have different value "
+"labels for value %s."
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:484
+#, fuzzy, c-format
+msgid "No multiple response set named %s."
+msgstr "Geen functie of vector genaamd %s."
+
+#: src/language/dictionary/mrsets.c:538
+#, fuzzy
+msgid "The active file dictionary does not contain any multiple response sets."
+msgstr "Het actieve bestandwoordenboek bevat geen documenten."
+
+#: src/language/dictionary/mrsets.c:548
+#, fuzzy
+msgid "Multiple Response Sets"
+msgstr "Geen functie of vector genaamd %s."
+
+#: src/language/dictionary/mrsets.c:549 src/ui/gui/psppire-var-sheet.c:534
+#: src/ui/gui/psppire-var-store.c:832
+msgid "Name"
+msgstr "Naam"
+
+#: src/language/dictionary/mrsets.c:550 src/ui/gui/variable-info.ui:8
+msgid "Variables"
+msgstr "Variabelen"
+
+#: src/language/dictionary/mrsets.c:551
+msgid "Details"
+msgstr "Aflopende frequentie "
+
+#: src/language/dictionary/mrsets.c:565
+msgid "Multiple dichotomy set"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:566
+msgid "Multiple category set"
+msgstr ""
+
+#: src/language/dictionary/mrsets.c:568
+#: src/language/dictionary/split-file.c:84
+#: src/language/dictionary/sys-file-info.c:344
+#: src/language/dictionary/sys-file-info.c:583
+#: src/ui/gui/psppire-var-sheet.c:538 src/ui/gui/psppire-var-store.c:836
+#: src/ui/gui/crosstabs.ui:292 src/ui/gui/psppire.ui:1924
+msgid "Label"
+msgstr "Label"
+
+#: src/language/dictionary/mrsets.c:572
+msgid "Label source"
+msgstr "Label bron"
+
+#: src/language/dictionary/mrsets.c:574
+msgid "First variable label among variables"
+msgstr "Eerste variabele label tussen variabelen"
+
+#: src/language/dictionary/mrsets.c:575
+msgid "Provided by user"
+msgstr "Verstrekt door gebruiker"
+
+#: src/language/dictionary/mrsets.c:576
+msgid "Counted value"
+msgstr "Getelde waarde "
+
+#: src/language/dictionary/mrsets.c:582
+#, fuzzy
+msgid "Category label source"
+msgstr "Label bron"
+
+#: src/language/dictionary/mrsets.c:584
+msgid "Variable labels"
+msgstr "Variabelelabels"
+
+#: src/language/dictionary/mrsets.c:585
+msgid "Value labels of counted value"
+msgstr ""
+
 #: src/language/dictionary/numeric.c:67
 #, c-format
 msgid "Format type %s may not be used with a numeric variable."
-msgstr "Formaat type %s mag niet gebruikt worden met een numerieke variabele."
+msgstr "Opmaaktype %s mag niet gebruikt worden met een numerieke variabele."
 
 #: src/language/dictionary/numeric.c:86 src/language/dictionary/numeric.c:155
 #, c-format
@@ -1890,7 +2073,7 @@ msgstr "Er bestaat al een variabele genaamd %s."
 #: src/language/dictionary/numeric.c:140
 #, c-format
 msgid "Format type %s may not be used with a string variable."
-msgstr "Formaat type %s mag niet gebruikt worden met een string variabele."
+msgstr "Opmaaktype %s mag niet gebruikt worden met een tekenreeksvariabele."
 
 #: src/language/dictionary/rename-variables.c:49
 msgid ""
@@ -1906,266 +2089,252 @@ msgstr "'(' verwacht."
 
 #: src/language/dictionary/rename-variables.c:67
 msgid "`=' expected between lists of new and old variable names."
-msgstr "'=' verwacht tussen lijst met nieuwe en oude variabele namen."
+msgstr "'=' verwacht tussen lijst met nieuwe en oude variabelennamen."
 
-#: src/language/dictionary/rename-variables.c:87
+#: src/language/dictionary/rename-variables.c:88
 msgid "`)' expected after variable names."
-msgstr "')' verwacht achter variabele namen."
+msgstr "')' verwacht achter variabelennamen."
 
-#: src/language/dictionary/rename-variables.c:97
+#: src/language/dictionary/rename-variables.c:98
 #, c-format
 msgid "Renaming would duplicate variable name %s."
-msgstr "Hernoemen zou variabele naam %s dupliceren."
-
-#: src/language/dictionary/split-file.c:85
-#: src/language/dictionary/sys-file-info.c:486
-#: src/language/dictionary/sys-file-info.c:641
+msgstr "Hernoemen zou variabelennaam %s dupliceren."
+
+#: src/language/dictionary/split-file.c:83
+#: src/language/dictionary/sys-file-info.c:429
+#: src/language/dictionary/sys-file-info.c:582
+#: src/language/stats/crosstabs.q:1214 src/language/stats/crosstabs.q:1241
+#: src/language/stats/crosstabs.q:1264 src/language/stats/crosstabs.q:1289
+#: src/language/stats/examine.q:1841 src/language/stats/frequencies.q:813
+#: src/language/stats/reliability.q:568 src/language/stats/reliability.q:579
 msgid "Value"
 msgstr "Waarde"
 
-#: src/language/dictionary/split-file.c:86
-#: src/language/dictionary/sys-file-info.c:397
-#: src/language/dictionary/sys-file-info.c:642
-#: src/ui/gui/psppire-var-sheet.c:537 src/ui/gui/psppire-var-store.c:836
-#: src/ui/gui/crosstabs.glade:275 src/ui/gui/psppire.glade:1974
-msgid "Label"
-msgstr ""
-
-#: src/language/dictionary/sys-file-info.c:113
+#: src/language/dictionary/sys-file-info.c:95
 msgid "File:"
 msgstr "Bestand:"
 
-#: src/language/dictionary/sys-file-info.c:115 src/ui/gui/psppire.glade:1913
-#: src/ui/gui/recode.glade:841
+#: src/language/dictionary/sys-file-info.c:97 src/ui/gui/psppire.ui:1862
+#: src/ui/gui/recode.ui:859
 msgid "Label:"
-msgstr ""
+msgstr "Label:"
 
-#: src/language/dictionary/sys-file-info.c:119
+#: src/language/dictionary/sys-file-info.c:101
 msgid "No label."
 msgstr "Geen label."
 
-#: src/language/dictionary/sys-file-info.c:122
+#: src/language/dictionary/sys-file-info.c:104
 msgid "Created:"
 msgstr "Aangemaakt:"
 
-#: src/language/dictionary/sys-file-info.c:125
+#: src/language/dictionary/sys-file-info.c:107
 msgid "Integer Format:"
-msgstr "Integer Formaat:"
-
-#: src/language/dictionary/sys-file-info.c:127
-msgid "Big Endian."
-msgstr ""
-
-#: src/language/dictionary/sys-file-info.c:128
-msgid "Little Endian."
-msgstr ""
+msgstr "Integeropmaak"
 
-#: src/language/dictionary/sys-file-info.c:129
-#: src/language/dictionary/sys-file-info.c:137
-msgid "Unknown."
-msgstr "Onbekend."
+#: src/language/dictionary/sys-file-info.c:111
+#: src/language/dictionary/sys-file-info.c:119
+#: src/language/dictionary/sys-file-info.c:124
+#: src/language/dictionary/sys-file-info.c:143
+msgid "Unknown"
+msgstr "Onbekend"
 
-#: src/language/dictionary/sys-file-info.c:130
+#: src/language/dictionary/sys-file-info.c:112
 msgid "Real Format:"
-msgstr ""
+msgstr "Realopmaak:"
 
-#: src/language/dictionary/sys-file-info.c:132
+#: src/language/dictionary/sys-file-info.c:114
 msgid "IEEE 754 LE."
-msgstr ""
+msgstr "IEEE 754 LE."
 
-#: src/language/dictionary/sys-file-info.c:133
+#: src/language/dictionary/sys-file-info.c:115
 msgid "IEEE 754 BE."
-msgstr ""
+msgstr "IEEE 754 BE."
 
-#: src/language/dictionary/sys-file-info.c:134
+#: src/language/dictionary/sys-file-info.c:116
 msgid "VAX D."
-msgstr ""
+msgstr "VAX D."
 
-#: src/language/dictionary/sys-file-info.c:135
+#: src/language/dictionary/sys-file-info.c:117
 msgid "VAX G."
-msgstr ""
+msgstr "VAX G."
 
-#: src/language/dictionary/sys-file-info.c:136
+#: src/language/dictionary/sys-file-info.c:118
 msgid "IBM 390 Hex Long."
-msgstr ""
+msgstr "IBM 390 Hex Long."
 
-#: src/language/dictionary/sys-file-info.c:138
-#: src/ui/gui/descriptives-dialog.glade:79 src/ui/gui/recode.glade:940
+#: src/language/dictionary/sys-file-info.c:120 src/ui/gui/descriptives.ui:85
+#: src/ui/gui/factor.ui:173 src/ui/gui/recode.ui:960
 msgid "Variables:"
 msgstr "Variabelen:"
 
-#: src/language/dictionary/sys-file-info.c:140
+#: src/language/dictionary/sys-file-info.c:122
 msgid "Cases:"
-msgstr ""
-
-#: src/language/dictionary/sys-file-info.c:142
-#: src/language/dictionary/sys-file-info.c:160
-msgid "Unknown"
-msgstr "Onbekend"
+msgstr "Cases:"
 
-#: src/language/dictionary/sys-file-info.c:144
+#: src/language/dictionary/sys-file-info.c:127
 msgid "Type:"
-msgstr ""
+msgstr "Type:"
 
-#: src/language/dictionary/sys-file-info.c:145
-msgid "System File."
-msgstr "Systeem Bestand."
+#: src/language/dictionary/sys-file-info.c:128
+#: src/ui/gui/psppire-data-window.c:631
+msgid "System File"
+msgstr "Systeembestand"
 
-#: src/language/dictionary/sys-file-info.c:146
+#: src/language/dictionary/sys-file-info.c:129
 msgid "Weight:"
 msgstr "Gewicht:"
 
-#: src/language/dictionary/sys-file-info.c:151
+#: src/language/dictionary/sys-file-info.c:134
 msgid "Not weighted."
 msgstr "Niet gewogen."
 
-#: src/language/dictionary/sys-file-info.c:153
+#: src/language/dictionary/sys-file-info.c:136
 msgid "Mode:"
 msgstr "Modus:"
 
-#: src/language/dictionary/sys-file-info.c:155
+#: src/language/dictionary/sys-file-info.c:138
 #, c-format
 msgid "Compression %s."
 msgstr "Compressie %s."
 
-#: src/language/dictionary/sys-file-info.c:155
+#: src/language/dictionary/sys-file-info.c:138
 msgid "on"
 msgstr "aan"
 
-#: src/language/dictionary/sys-file-info.c:155
+#: src/language/dictionary/sys-file-info.c:138
 msgid "off"
 msgstr "uit"
 
-#: src/language/dictionary/sys-file-info.c:158
+#: src/language/dictionary/sys-file-info.c:141
 msgid "Charset:"
-msgstr "Karakterset:"
+msgstr "Tekenset:"
 
-#: src/language/dictionary/sys-file-info.c:170
-#: src/language/dictionary/sys-file-info.c:397
+#: src/language/dictionary/sys-file-info.c:151
+#: src/language/dictionary/sys-file-info.c:344
 msgid "Description"
 msgstr "Omschrijving"
 
-#: src/language/dictionary/sys-file-info.c:171
-#: src/language/dictionary/sys-file-info.c:399
-#: src/language/dictionary/sys-file-info.c:724
+#: src/language/dictionary/sys-file-info.c:152
+#: src/language/dictionary/sys-file-info.c:346
+#: src/language/dictionary/sys-file-info.c:663
 msgid "Position"
 msgstr "Positie"
 
-#: src/language/dictionary/sys-file-info.c:220
+#: src/language/dictionary/sys-file-info.c:199
 msgid "The active file does not have a file label."
-msgstr "Het actieve bestand heeft geen bestand label."
+msgstr "Het actieve bestand heeft geen bestandlabel."
 
-#: src/language/dictionary/sys-file-info.c:223
+#: src/language/dictionary/sys-file-info.c:202
 msgid "File label:"
-msgstr "Bestand label:"
+msgstr "Bestandlabel:"
 
-#: src/language/dictionary/sys-file-info.c:298
+#: src/language/dictionary/sys-file-info.c:277
 msgid "No variables to display."
 msgstr "Geen variabelen om te tonen."
 
-#: src/language/dictionary/sys-file-info.c:313
+#: src/language/dictionary/sys-file-info.c:291
 msgid "Macros not supported."
-msgstr "Macros worden niet ondersteunt."
+msgstr "Macro's worden niet ondersteund."
 
-#: src/language/dictionary/sys-file-info.c:323
+#: src/language/dictionary/sys-file-info.c:300
 msgid "The active file dictionary does not contain any documents."
-msgstr "Het actieve bestand woordenboek bevat geen documenten."
+msgstr "Het actieve bestandwoordenboek bevat geen documenten."
 
-#: src/language/dictionary/sys-file-info.c:331
+#: src/language/dictionary/sys-file-info.c:308
 msgid "Documents in the active file:"
 msgstr "Documenten in het actieve bestand:"
 
-#: src/language/dictionary/sys-file-info.c:485
+#: src/language/dictionary/sys-file-info.c:428
 msgid "Attribute"
 msgstr "Attribuut"
 
-#: src/language/dictionary/sys-file-info.c:543
+#: src/language/dictionary/sys-file-info.c:484
 #, c-format
 msgid "Format: %s"
-msgstr "Formaat: %s"
+msgstr "Indeling: %s"
 
-#: src/language/dictionary/sys-file-info.c:550
+#: src/language/dictionary/sys-file-info.c:491
 #, c-format
 msgid "Print Format: %s"
-msgstr "Print Formaat: %s"
+msgstr "Afdrukindeling: %s"
 
-#: src/language/dictionary/sys-file-info.c:554
+#: src/language/dictionary/sys-file-info.c:495
 #, c-format
 msgid "Write Format: %s"
-msgstr "Schrijf Formaat: %s"
+msgstr "Schrijfindeling: %s"
 
-#: src/language/dictionary/sys-file-info.c:567
+#: src/language/dictionary/sys-file-info.c:508
 #, c-format
 msgid "Measure: %s"
 msgstr "Meting: %s"
 
-#: src/language/dictionary/sys-file-info.c:568
+#: src/language/dictionary/sys-file-info.c:509
 #: src/ui/gui/psppire-var-sheet.c:111
 msgid "Nominal"
 msgstr "Nominaal"
 
-#: src/language/dictionary/sys-file-info.c:569
+#: src/language/dictionary/sys-file-info.c:510
 #: src/ui/gui/psppire-var-sheet.c:112
 msgid "Ordinal"
 msgstr "Ordinaal"
 
-#: src/language/dictionary/sys-file-info.c:570
+#: src/language/dictionary/sys-file-info.c:511
 #: src/ui/gui/psppire-var-sheet.c:113
 msgid "Scale"
 msgstr "Schaal"
 
-#: src/language/dictionary/sys-file-info.c:573
+#: src/language/dictionary/sys-file-info.c:514
 #, c-format
 msgid "Display Alignment: %s"
-msgstr "Toon Groepering: %s"
+msgstr "Toongroepering: %s"
 
-#: src/language/dictionary/sys-file-info.c:574
+#: src/language/dictionary/sys-file-info.c:515
 #: src/ui/gui/psppire-var-sheet.c:104
 msgid "Left"
 msgstr "Links"
 
-#: src/language/dictionary/sys-file-info.c:575
+#: src/language/dictionary/sys-file-info.c:516
 #: src/ui/gui/psppire-var-sheet.c:106
 msgid "Center"
 msgstr "Centreer"
 
-#: src/language/dictionary/sys-file-info.c:576
+#: src/language/dictionary/sys-file-info.c:517
 #: src/ui/gui/psppire-var-sheet.c:105
 msgid "Right"
 msgstr "Rechts"
 
-#: src/language/dictionary/sys-file-info.c:579
+#: src/language/dictionary/sys-file-info.c:520
 #, c-format
 msgid "Display Width: %d"
 msgstr "Toonbreedte: %d"
 
-#: src/language/dictionary/sys-file-info.c:593
+#: src/language/dictionary/sys-file-info.c:534
 msgid "Missing Values: "
-msgstr "Ontbrekende Waardes:"
+msgstr "Ontbrekende waardes: "
 
-#: src/language/dictionary/sys-file-info.c:702
+#: src/language/dictionary/sys-file-info.c:643
 msgid "No vectors defined."
 msgstr "Geen vectoren gedefinieerd."
 
-#: src/language/dictionary/sys-file-info.c:723
+#: src/language/dictionary/sys-file-info.c:662
 msgid "Vector"
-msgstr ""
+msgstr "Vector"
 
-#: src/language/dictionary/sys-file-info.c:726
+#: src/language/dictionary/sys-file-info.c:665
 msgid "Print Format"
-msgstr "Print Formaat"
+msgstr "Afdrukindeling"
 
 #: src/language/dictionary/value-labels.c:150
 msgid "Truncating value label to 60 characters."
-msgstr "Afkappen waarde label tot 60 karakters."
+msgstr "Waardelabel is afgekapt tot 60 tekens."
 
 #: src/language/dictionary/variable-label.c:51
 msgid "String expected for variable label."
-msgstr "String verwacht voor variabele label."
+msgstr "Tekenreeks verwacht voor variabelenlabel."
 
 #: src/language/dictionary/variable-label.c:59
 msgid "Truncating variable label to 255 characters."
-msgstr "Afkappen variabele label tot 255 karakters."
+msgstr "Variabelenlabel is afgekapt tot 255 tekens."
 
 #: src/language/dictionary/vector.c:64
 #, c-format
@@ -2183,42 +2352,42 @@ msgstr "Een '/' moet elke vector specificatie scheiden in VECTOR's lange vorm."
 
 #: src/language/dictionary/vector.c:129
 msgid "Vectors must have at least one element."
-msgstr "Vectoren moeten ten minste 1 element bevatten."
+msgstr "Vectoren moeten tenminste 1 element bevatten."
 
 #: src/language/dictionary/vector.c:150
 msgid "expecting vector length"
-msgstr "vector lengte verwacht"
+msgstr "vectorlengte verwacht"
 
 #: src/language/dictionary/vector.c:166
 #, c-format
 msgid "%s is too long for a variable name."
-msgstr "%s is te lang voor een variabele naam."
+msgstr "%s is te lang voor een variabelennaam."
 
 #: src/language/dictionary/vector.c:171
 #, c-format
 msgid "%s is an existing variable name."
-msgstr "%s is een bestaande variabele naam."
+msgstr "%s is een bestaande variabelennaam."
 
 #: src/language/dictionary/variable-display.c:120
 msgid "Variable display width must be a positive integer."
-msgstr "Variabele toonbreedte moet een positieve integer zijn."
+msgstr "Variabelen-toonbreedte moet een positieve integer zijn."
 
 #: src/language/dictionary/weight.c:49
 msgid "The weighting variable must be numeric."
-msgstr "De weging variabele moet numeriek zijn."
+msgstr "De wegingvariabele moet numeriek zijn."
 
 #: src/language/dictionary/weight.c:54
 msgid "The weighting variable may not be scratch."
-msgstr "De weging variabele mag geen scratch zijn."
+msgstr "De wegingvariabele mag geen scratch zijn."
 
 #: src/language/tests/float-format.c:124
 #, c-format
 msgid "%zu-byte string needed but %zu-byte string supplied."
-msgstr "%zu-byte string nodig maar %zu-byte string gegeven."
+msgstr "%zu-byte tekenreeks nodig maar %zu-byte tekenreeks gegeven."
 
 #: src/language/tests/float-format.c:136
 msgid "Hexadecimal floating constant too long."
-msgstr ""
+msgstr "Hexadecimale drijvende constante te lang."
 
 #: src/language/tests/float-format.c:201
 #, c-format
@@ -2235,7 +2404,7 @@ msgstr "Te veel waardes in enkele opdracht."
 
 #: src/language/tests/moments-test.c:47
 msgid "expecting weight value"
-msgstr "verwacht weging waarde"
+msgstr "verwacht wegingwaarde"
 
 #: src/language/utilities/cd.c:41
 #, c-format
@@ -2246,43 +2415,38 @@ msgstr "Kan map niet veranderen in %s: %s "
 msgid "Only USE ALL is currently implemented."
 msgstr "Alleen USE ALL is op dit moment geïmplementeerd."
 
-#: src/language/utilities/title.c:68
-#, c-format
-msgid "%s: `.' expected after string."
-msgstr "%s: `.' verwacht na string."
-
-#: src/language/utilities/title.c:108
+#: src/language/utilities/title.c:103
 #, c-format
 msgid "   (Entered %s)"
 msgstr "   (Ingevoerd %s)"
 
-#: src/language/utilities/include.c:92
+#: src/language/utilities/include.c:95
 msgid "Expecting BATCH or INTERACTIVE after SYNTAX."
 msgstr "BATCH of INTERACTIVE verwacht na SYNTAX."
 
-#: src/language/utilities/include.c:109
+#: src/language/utilities/include.c:112
 msgid "Expecting YES or NO after CD."
 msgstr "YES of NO verwacht na CD."
 
-#: src/language/utilities/include.c:126
+#: src/language/utilities/include.c:129
 msgid "Expecting CONTINUE or STOP after ERROR."
 msgstr "CONTINUE of STOP verwacht na ERROR."
 
-#: src/language/utilities/include.c:133
+#: src/language/utilities/include.c:136
 #, c-format
 msgid "Unexpected token: `%s'."
 msgstr "Onverwacht symbool: '%s'."
 
-#: src/language/utilities/include.c:178
+#: src/language/utilities/include.c:181
 msgid "expecting file name"
 msgstr "bestandsnaam verwacht"
 
-#: src/language/utilities/include.c:190
+#: src/language/utilities/include.c:193
 #, c-format
 msgid "Can't find `%s' in include file search path."
-msgstr "Kan '%s' niet vinden in include bestand zoek pad."
+msgstr "Kan '%s' niet vinden in include-bestand zoekpad."
 
-#: src/language/utilities/include.c:198
+#: src/language/utilities/include.c:201
 #, c-format
 msgid "Unable to open `%s': %s."
 msgstr "Onmogelijk om te openen '%s': %s."
@@ -2300,9 +2464,9 @@ msgstr ""
 #: src/language/utilities/permissions.c:119
 #, c-format
 msgid "Cannot change mode of %s: %s"
-msgstr "Kan mode van %s niet veranderen: %s"
+msgstr "Kan modus van %s niet veranderen: %s"
 
-#: src/language/stats/aggregate.c:219
+#: src/language/stats/aggregate.c:220
 msgid "while expecting COLUMNWISE"
 msgstr "terwijl COLUMNWISE verwacht werd"
 
@@ -2315,43 +2479,43 @@ msgid ""
 "When PRESORTED is specified, specifying sorting directions with (A) or (D) "
 "has no effect.  Output data will be sorted the same way as the input data."
 msgstr ""
-"Als PRESORTED is gespecificeerd, heeft specificeren van sorteer volgorde met "
-"(A) of (D) geen effect. Uitvoer data is hetzelfde gesorteerd als de invoer "
-"data."
+"Als PRESORTED is gespecificeerd, heeft specificeren van sorteervolgorde met "
+"(A) of (D) geen effect. Uitvoergegevens zullen hetzelfde gesorteerd zijn als "
+"de invoergegevens."
 
-#: src/language/stats/aggregate.c:423
+#: src/language/stats/aggregate.c:424
 msgid "expecting aggregation function"
-msgstr "aggregatie functie verwacht"
+msgstr "aggregatie-functie verwacht"
 
-#: src/language/stats/aggregate.c:441
+#: src/language/stats/aggregate.c:442
 #, c-format
 msgid "Unknown aggregation function %s."
 msgstr "Onbekende aggregatie functie %s."
 
-#: src/language/stats/aggregate.c:497
+#: src/language/stats/aggregate.c:498
 #, c-format
 msgid "Missing argument %zu to %s."
-msgstr "Missend argument %zu naar %s."
+msgstr "Mis argument %zu naar %s."
 
-#: src/language/stats/aggregate.c:506
+#: src/language/stats/aggregate.c:507
 #, c-format
 msgid "Arguments to %s must be of same type as source variables."
-msgstr "Argumenten naar %s moeten van hetzelfde type zijn als bron variabelen."
+msgstr "Argumenten naar %s moeten van hetzelfde type zijn als bronvariabelen."
 
-#: src/language/stats/aggregate.c:516 src/language/expressions/parse.c:885
+#: src/language/stats/aggregate.c:517 src/language/expressions/parse.c:885
 msgid "expecting `)'"
 msgstr "')' verwacht"
 
-#: src/language/stats/aggregate.c:528
+#: src/language/stats/aggregate.c:529
 #, c-format
 msgid ""
 "Number of source variables (%zu) does not match number of target variables (%"
 "zu)."
 msgstr ""
-"Aantal bron variabelen (%zu) komt niet overeen met aantal doel variabelen (%"
+"Aantal bronvariabelen (%zu) komt niet overeen met aantal doelvariabelen (%"
 "zu)."
 
-#: src/language/stats/aggregate.c:544
+#: src/language/stats/aggregate.c:545
 #, c-format
 msgid ""
 "The value arguments passed to the %s function are out-of-order.  They will "
@@ -2360,78 +2524,85 @@ msgstr ""
 "De volgorde van de geldige argumenten doorgegeven aan de %s functie klopt "
 "niet. Ze worden behandeld alsof ze in de correcte volgorde waren opgegeven."
 
-#: src/language/stats/aggregate.c:614
+#: src/language/stats/aggregate.c:615
 #, c-format
 msgid ""
 "Variable name %s is not unique within the aggregate file dictionary, which "
 "contains the aggregate variables and the break variables."
 msgstr ""
-"Variabele naam %s is niet uniek binnen het aggregate bestand woordenboek, "
-"dat de aggregate variabelen en de break variabelen bevat."
+"Variabelennaam %s is niet uniek binnen het aggregate-bestandwoordenboek, dat "
+"de aggregate- en break-variabelen bevat."
 
-#: src/language/stats/autorecode.c:136
+#: src/language/stats/autorecode.c:116
 #, c-format
 msgid "Source variable count (%zu) does not match target variable count (%zu)."
 msgstr ""
-"Bron variabele teller (%zu) komt niet overeen met doel variabele teller (%"
+"Bron-variabelenteller (%zu) komt niet overeen met doel-variabelenteller (%"
 "zu)."
 
-#: src/language/stats/autorecode.c:164
+#: src/language/stats/autorecode.c:128
 #, c-format
 msgid "Target variable %s duplicates existing variable %s."
-msgstr "Doel variabele %s dupliceert bestaande variabele %s."
-
-#: src/language/stats/autorecode.c:171
-#, c-format
-msgid "Duplicate variable name %s among target variables."
-msgstr "Dubbele variabele naam %s tussen doel variabelen."
+msgstr "Doelvariabele %s dupliceert bestaande variabele %s."
 
 #: src/language/stats/binomial.c:141
 #, c-format
 msgid "Variable %s is not dichotomous"
 msgstr "Variabele %s is niet dichotomisch "
 
-#: src/language/stats/binomial.c:194
+#: src/language/stats/binomial.c:192 src/ui/gui/binomial.ui:13
 msgid "Binomial Test"
-msgstr ""
+msgstr "Binomiaal Test"
 
-#: src/language/stats/binomial.c:224
+#: src/language/stats/binomial.c:222
 msgid "Group1"
 msgstr "Groep1 "
 
-#: src/language/stats/binomial.c:225
+#: src/language/stats/binomial.c:223
 msgid "Group2"
 msgstr "Groep2"
 
-#: src/language/stats/binomial.c:226 src/language/stats/chisquare.c:202
-#: src/language/stats/chisquare.c:262 src/language/stats/sign.c:94
-#: src/language/stats/wilcoxon.c:262 src/ui/gui/crosstabs-dialog.c:59
+#: src/language/stats/binomial.c:224 src/language/stats/chisquare.c:177
+#: src/language/stats/chisquare.c:236 src/language/stats/factor.c:1462
+#: src/language/stats/sign.c:92 src/language/stats/wilcoxon.c:260
+#: src/ui/gui/crosstabs-dialog.c:60 src/language/stats/crosstabs.q:823
+#: src/language/stats/crosstabs.q:1151 src/language/stats/crosstabs.q:1528
+#: src/language/stats/examine.q:1105 src/language/stats/frequencies.q:871
+#: src/language/stats/oneway.q:302 src/language/stats/oneway.q:472
+#: src/language/stats/regression.q:291 src/language/stats/reliability.q:702
 msgid "Total"
 msgstr "Totaal"
 
-#: src/language/stats/binomial.c:259 src/language/stats/chisquare.c:225
+#: src/language/stats/binomial.c:257 src/language/stats/chisquare.c:199
+#: src/language/stats/crosstabs.q:1239 src/language/stats/crosstabs.q:1286
 msgid "Category"
 msgstr "Categorie"
 
-#: src/language/stats/binomial.c:260 src/language/stats/npar-summary.c:123
-#: src/language/stats/sign.c:74 src/language/stats/wilcoxon.c:245
+#: src/language/stats/binomial.c:258 src/language/stats/correlations.c:119
+#: src/language/stats/correlations.c:227 src/language/stats/npar-summary.c:122
+#: src/language/stats/sign.c:72 src/language/stats/wilcoxon.c:243
+#: src/language/stats/crosstabs.q:830 src/language/stats/examine.q:1176
+#: src/language/stats/frequencies.q:1034 src/language/stats/oneway.q:385
+#: src/language/stats/reliability.q:705 src/language/stats/t-test.q:505
+#: src/language/stats/t-test.q:525 src/language/stats/t-test.q:625
+#: src/language/stats/t-test.q:1101
 msgid "N"
-msgstr ""
+msgstr "N"
 
-#: src/language/stats/binomial.c:261
+#: src/language/stats/binomial.c:259
 msgid "Observed Prop."
 msgstr ""
 
-#: src/language/stats/binomial.c:262
+#: src/language/stats/binomial.c:260
 msgid "Test Prop."
 msgstr ""
 
-#: src/language/stats/binomial.c:265
+#: src/language/stats/binomial.c:263
 #, c-format
 msgid "Exact Sig. (%d-tailed)"
 msgstr ""
 
-#: src/language/stats/chisquare.c:172
+#: src/language/stats/chisquare.c:150
 #, c-format
 msgid ""
 "CHISQUARE test specified %d expected values, but %d distinct values were "
@@ -2440,150 +2611,209 @@ msgstr ""
 "CHISQUARE test specificeert %d verwachte waardes, maar %d verschillende "
 "waardes werden gevonden in variabele %s."
 
-#: src/language/stats/chisquare.c:186 src/language/stats/chisquare.c:226
+#: src/language/stats/chisquare.c:161 src/language/stats/chisquare.c:200
 msgid "Observed N"
 msgstr "Waargenomen N"
 
-#: src/language/stats/chisquare.c:187 src/language/stats/chisquare.c:227
+#: src/language/stats/chisquare.c:162 src/language/stats/chisquare.c:201
 msgid "Expected N"
 msgstr "Verwacht N"
 
-#: src/language/stats/chisquare.c:188 src/language/stats/chisquare.c:228
-#: src/ui/gui/crosstabs-dialog.c:61
+#: src/language/stats/chisquare.c:163 src/language/stats/chisquare.c:202
+#: src/ui/gui/crosstabs-dialog.c:62 src/language/stats/regression.q:290
 msgid "Residual"
 msgstr "Overblijvend"
 
-#: src/language/stats/chisquare.c:221 src/language/stats/sign.c:62
+#: src/language/stats/chisquare.c:195 src/language/stats/sign.c:60
+#: src/ui/gui/frequencies.ui:9 src/ui/gui/frequencies.ui:669
 msgid "Frequencies"
 msgstr "Frequenties"
 
-#: src/language/stats/chisquare.c:276 src/language/stats/sign.c:115
-#: src/language/stats/wilcoxon.c:313
+#: src/language/stats/chisquare.c:249 src/language/stats/sign.c:111
+#: src/language/stats/wilcoxon.c:309
 msgid "Test Statistics"
-msgstr ""
+msgstr "Test Statistieken"
 
-#: src/language/stats/chisquare.c:290
+#: src/language/stats/chisquare.c:263
 msgid "Chi-Square"
-msgstr ""
+msgstr "Chi-Square"
 
-#: src/language/stats/chisquare.c:291
+#: src/language/stats/chisquare.c:264 src/language/stats/crosstabs.q:1215
+#: src/language/stats/oneway.q:275 src/language/stats/oneway.q:685
+#: src/language/stats/regression.q:284 src/language/stats/t-test.q:752
+#: src/language/stats/t-test.q:923 src/language/stats/t-test.q:1010
 msgid "df"
-msgstr ""
+msgstr "df"
 
-#: src/language/stats/chisquare.c:292
+#: src/language/stats/chisquare.c:265
 msgid "Asymp. Sig."
 msgstr ""
 
-#: src/language/stats/descriptives.c:102 src/language/stats/npar-summary.c:126
-#: src/ui/gui/descriptives-dialog.c:39 src/ui/gui/frequencies-dialog.c:40
-msgid "Mean"
-msgstr "Gemiddeld"
+#: src/language/stats/correlations.c:96 src/language/stats/factor.c:1720
+#: src/language/stats/npar-summary.c:108
+msgid "Descriptive Statistics"
+msgstr "Descriptieve Statistieken"
 
-#: src/language/stats/descriptives.c:103
-msgid "S E Mean"
+#: src/language/stats/correlations.c:117 src/language/stats/descriptives.c:101
+#: src/language/stats/factor.c:1741 src/language/stats/npar-summary.c:125
+#: src/ui/gui/descriptives-dialog.c:40 src/ui/gui/frequencies-dialog.c:41
+#: src/language/stats/examine.q:1444 src/language/stats/frequencies.q:105
+#: src/language/stats/oneway.q:386 src/language/stats/t-test.q:506
+#: src/language/stats/t-test.q:526 src/language/stats/t-test.q:624
+#: src/language/stats/t-test.q:917
+msgid "Mean"
+msgstr "Gemiddelde "
+
+#: src/language/stats/correlations.c:118 src/language/stats/factor.c:1742
+#: src/language/stats/npar-summary.c:128 src/language/stats/examine.q:1479
+#: src/language/stats/oneway.q:387 src/language/stats/t-test.q:507
+#: src/language/stats/t-test.q:527 src/language/stats/t-test.q:626
+#: src/language/stats/t-test.q:918
+msgid "Std. Deviation"
+msgstr "Std. Deviatie"
+
+#: src/language/stats/correlations.c:190 src/language/stats/factor.c:1620
+msgid "Correlations"
+msgstr "Correlatie"
+
+#: src/language/stats/correlations.c:216
+msgid "Pearson Correlation"
+msgstr "Pearson Correlatie"
+
+#: src/language/stats/correlations.c:218 src/language/stats/oneway.q:686
+#: src/language/stats/t-test.q:753 src/language/stats/t-test.q:924
+#: src/language/stats/t-test.q:1011
+msgid "Sig. (2-tailed)"
 msgstr ""
 
-#: src/language/stats/descriptives.c:104
-msgid "Std Dev"
+#: src/language/stats/correlations.c:218
+msgid "Sig. (1-tailed)"
 msgstr ""
 
-#: src/language/stats/descriptives.c:105 src/ui/gui/descriptives-dialog.c:46
-#: src/ui/gui/frequencies-dialog.c:45
-msgid "Variance"
+#: src/language/stats/correlations.c:222
+msgid "Cross-products"
 msgstr ""
 
-#: src/language/stats/descriptives.c:106 src/ui/gui/descriptives-dialog.c:47
-#: src/ui/gui/frequencies-dialog.c:50
+#: src/language/stats/correlations.c:223
+msgid "Covariance"
+msgstr "Covariantie"
+
+#: src/language/stats/correlations.c:454 src/language/stats/descriptives.c:361
+#: src/language/data-io/list.q:91
+msgid "No variables specified."
+msgstr "Geen variabelen gespecificeerd."
+
+#: src/language/stats/descriptives.c:102 src/language/stats/frequencies.q:106
+#: src/language/stats/t-test.q:508 src/language/stats/t-test.q:528
+#: src/language/stats/t-test.q:627
+msgid "S.E. Mean"
+msgstr "S.E. Mean"
+
+#: src/language/stats/descriptives.c:103 src/language/stats/frequencies.q:109
+msgid "Std Dev"
+msgstr "Std Dev"
+
+#: src/language/stats/descriptives.c:104 src/ui/gui/descriptives-dialog.c:47
+#: src/ui/gui/frequencies-dialog.c:46 src/language/stats/examine.q:1474
+#: src/language/stats/frequencies.q:110
+msgid "Variance"
+msgstr "Variatie"
+
+#: src/language/stats/descriptives.c:105 src/ui/gui/descriptives-dialog.c:48
+#: src/ui/gui/frequencies-dialog.c:51 src/language/stats/examine.q:1510
+#: src/language/stats/frequencies.q:111
 msgid "Kurtosis"
-msgstr ""
+msgstr "Kurtosis"
 
-#: src/language/stats/descriptives.c:107
-msgid "S E Kurt"
-msgstr ""
+#: src/language/stats/descriptives.c:106 src/language/stats/frequencies.q:112
+msgid "S.E. Kurt"
+msgstr "S.E. Kurt"
 
-#: src/language/stats/descriptives.c:108 src/ui/gui/descriptives-dialog.c:48
-#: src/ui/gui/frequencies-dialog.c:46
+#: src/language/stats/descriptives.c:107 src/ui/gui/descriptives-dialog.c:49
+#: src/ui/gui/frequencies-dialog.c:47 src/language/stats/examine.q:1505
+#: src/language/stats/frequencies.q:113
 msgid "Skewness"
-msgstr ""
+msgstr "Skewness"
 
-#: src/language/stats/descriptives.c:109
-msgid "S E Skew"
-msgstr ""
+#: src/language/stats/descriptives.c:108 src/language/stats/frequencies.q:114
+msgid "S.E. Skew"
+msgstr "S.E. Skew"
 
-#: src/language/stats/descriptives.c:110 src/ui/gui/descriptives-dialog.c:43
-#: src/ui/gui/frequencies-dialog.c:48
+#: src/language/stats/descriptives.c:109 src/ui/gui/descriptives-dialog.c:44
+#: src/ui/gui/frequencies-dialog.c:49 src/language/stats/examine.q:1494
+#: src/language/stats/frequencies.q:115
 msgid "Range"
-msgstr ""
+msgstr "Bereik"
 
-#: src/language/stats/descriptives.c:111 src/language/stats/npar-summary.c:132
-#: src/ui/gui/descriptives-dialog.c:41 src/ui/gui/frequencies-dialog.c:42
+#: src/language/stats/descriptives.c:110 src/language/stats/npar-summary.c:131
+#: src/ui/gui/descriptives-dialog.c:42 src/ui/gui/frequencies-dialog.c:43
+#: src/language/stats/examine.q:1484 src/language/stats/frequencies.q:116
+#: src/language/stats/oneway.q:400
 msgid "Minimum"
-msgstr ""
+msgstr "Minimum"
 
-#: src/language/stats/descriptives.c:112 src/language/stats/npar-summary.c:135
-#: src/ui/gui/descriptives-dialog.c:42 src/ui/gui/frequencies-dialog.c:43
+#: src/language/stats/descriptives.c:111 src/language/stats/npar-summary.c:134
+#: src/ui/gui/descriptives-dialog.c:43 src/ui/gui/frequencies-dialog.c:44
+#: src/language/stats/examine.q:1489 src/language/stats/frequencies.q:117
+#: src/language/stats/oneway.q:401
 msgid "Maximum"
-msgstr ""
+msgstr "Maximum"
 
-#: src/language/stats/descriptives.c:113 src/ui/gui/descriptives-dialog.c:44
-#: src/ui/gui/frequencies-dialog.c:53
+#: src/language/stats/descriptives.c:112 src/ui/gui/descriptives-dialog.c:45
+#: src/ui/gui/frequencies-dialog.c:54 src/language/stats/frequencies.q:118
 msgid "Sum"
 msgstr "Som"
 
-#: src/language/stats/descriptives.c:344
+#: src/language/stats/descriptives.c:343
 #, c-format
 msgid "Z-score variable name %s would be a duplicate variable name."
-msgstr "Z-score variabele naam %s zou een dubbele variabele naam zijn."
-
-#: src/language/stats/descriptives.c:362
-msgid "No variables specified."
-msgstr "Geen variabelen gespecificeerd."
+msgstr "Z-score-variabelennaam %s zou een dubbele variabelennaam zijn."
 
-#: src/language/stats/descriptives.c:451
+#: src/language/stats/descriptives.c:450
 msgid "expecting statistic name: reverting to default"
-msgstr "statistische naam verwacht: teruggezet op default"
+msgstr "statistische naam verwacht: teruggezet op verstekwaarde"
 
-#: src/language/stats/descriptives.c:524
+#: src/language/stats/descriptives.c:523
 msgid ""
 "Ran out of generic names for Z-score variables.  There are only 126 generic "
 "names: ZSC001-ZSC0999, STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09."
 msgstr ""
-"Generieke namen voor Z-score variabelen zijn uitgeput.  Er zijn slechts 126 "
+"Generieke namen voor Z-score-variabelen zijn uitgeput.  Er zijn slechts 126 "
 "generieke namen: ZSC001-ZSC0999, STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09."
 
-#: src/language/stats/descriptives.c:556
+#: src/language/stats/descriptives.c:555
 msgid "Mapping of variables to corresponding Z-scores."
-msgstr "Mappen van variabelen naar corresponderen Z-scores."
+msgstr "Mappen van variabelen naar corresponderende Z-scores."
 
-#: src/language/stats/descriptives.c:561
+#: src/language/stats/descriptives.c:559
 msgid "Source"
 msgstr "Bron"
 
-#: src/language/stats/descriptives.c:562
+#: src/language/stats/descriptives.c:560
 msgid "Target"
 msgstr "Doel"
 
-#: src/language/stats/descriptives.c:673
+#: src/language/stats/descriptives.c:670
 #, c-format
 msgid "Z-score of %s"
 msgstr "Z-score van %s"
 
-#: src/language/stats/descriptives.c:888
+#: src/language/stats/descriptives.c:884
 msgid "Valid N"
-msgstr ""
+msgstr "Geldige N"
 
-#: src/language/stats/descriptives.c:889
+#: src/language/stats/descriptives.c:885
 msgid "Missing N"
-msgstr ""
+msgstr "Missende N"
 
-#: src/language/stats/descriptives.c:917
+#: src/language/stats/descriptives.c:913
 #, c-format
 msgid "Valid cases = %g; cases with missing value(s) = %g."
-msgstr "Geldige cases = %g; cases met missing value(s) = %g."
+msgstr "Geldige cases = %g; cases met ontbrekende-waarde(s) = %g."
 
 #: src/language/stats/sort-cases.c:64
 msgid "Buffer limit must be at least 2."
-msgstr "Buffer limiet moet tenminste 2 zijn."
+msgstr "Bufferlimiet moet tenminste 2 zijn."
 
 #: src/language/stats/sort-criteria.c:74
 msgid "`A' or `D' expected inside parentheses."
@@ -2596,7 +2826,118 @@ msgstr "')' verwacht."
 #: src/language/stats/sort-criteria.c:92
 #, c-format
 msgid "Variable %s specified twice in sort criteria."
-msgstr "Variabele %s 2 keer opgegeven in sort criteria."
+msgstr "Variabele %s 2 keer opgegeven in sorteer criteria."
+
+#: src/language/stats/factor.c:803
+msgid "Factor analysis on a single variable is not useful."
+msgstr "Factor analyse op een enkele variabele is niet zinvol."
+
+#: src/language/stats/factor.c:1206
+msgid "Component Number"
+msgstr "Component-nummer "
+
+#: src/language/stats/factor.c:1206
+msgid "Factor Number"
+msgstr "Factor Nummer"
+
+#: src/language/stats/factor.c:1237
+msgid "Communalities"
+msgstr ""
+
+#: src/language/stats/factor.c:1243
+msgid "Initial"
+msgstr "Initieel "
+
+#: src/language/stats/factor.c:1246
+msgid "Extraction"
+msgstr ""
+
+#: src/language/stats/factor.c:1310 src/language/stats/factor.c:1437
+msgid "Component"
+msgstr "Component"
+
+#: src/language/stats/factor.c:1315 src/language/stats/factor.c:1439
+msgid "Factor"
+msgstr "Factor"
+
+#: src/language/stats/factor.c:1347 src/language/stats/factor.c:1495
+#: src/ui/gui/psppire-data-store.c:755 src/ui/gui/psppire-var-store.c:699
+#: src/ui/gui/psppire-var-store.c:709 src/ui/gui/psppire-var-store.c:719
+#: src/ui/gui/psppire-var-store.c:825
+#, c-format
+msgid "%d"
+msgstr "%d"
+
+#: src/language/stats/factor.c:1412
+msgid "Total Variance Explained"
+msgstr ""
+
+#: src/language/stats/factor.c:1444
+msgid "Initial Eigenvalues"
+msgstr ""
+
+#: src/language/stats/factor.c:1450
+msgid "Extraction Sums of Squared Loadings"
+msgstr ""
+
+#: src/language/stats/factor.c:1456
+msgid "Rotation Sums of Squared Loadings"
+msgstr ""
+
+#: src/language/stats/factor.c:1464
+#, no-c-format
+msgid "% of Variance"
+msgstr "% van Variatie"
+
+#: src/language/stats/factor.c:1465
+msgid "Cumulative %"
+msgstr "Cumulatieve %"
+
+#: src/language/stats/factor.c:1578
+msgid "Correlation Matrix"
+msgstr "Correlatie-Matrix"
+
+#: src/language/stats/factor.c:1632
+msgid "Sig. 1-tailed"
+msgstr ""
+
+#: src/language/stats/factor.c:1666
+msgid "Determinant"
+msgstr "Determinant"
+
+#: src/language/stats/factor.c:1743
+msgid "Analysis N"
+msgstr "Analyses N"
+
+#: src/language/stats/factor.c:1776
+msgid ""
+"The FACTOR criteria result in zero factors extracted. Therefore no analysis "
+"will be performed."
+msgstr ""
+
+#: src/language/stats/factor.c:1782
+msgid ""
+"The FACTOR criteria result in more factors than variables, which is not "
+"meaningful. No analysis will be performed."
+msgstr ""
+
+#: src/language/stats/factor.c:1865
+msgid "Component Matrix"
+msgstr "Component-Matrix"
+
+#: src/language/stats/factor.c:1865
+msgid "Factor Matrix"
+msgstr "Factor-Matrix:"
+
+#: src/language/stats/factor.c:1871
+#, fuzzy
+msgid "Rotated Component Matrix"
+msgstr "Component-Matrix"
+
+#: src/language/stats/factor.c:1871
+#, fuzzy
+msgid "Rotated Factor Matrix"
+msgstr "Factor-Matrix:"
 
 #: src/language/stats/flip.c:98
 msgid ""
@@ -2615,7 +2956,7 @@ msgstr "Fout tijdens terugdraaien FLIP bestand: %s."
 
 #: src/language/stats/flip.c:334
 msgid "Error creating FLIP source file."
-msgstr "Fout tijdens het creëren van FLIP bron bestand."
+msgstr "Fout tijdens het creëren van FLIP bronbestand."
 
 #: src/language/stats/flip.c:347
 #, c-format
@@ -2624,27 +2965,27 @@ msgstr "Fout tijdens lezen FLIP bestand: %s."
 
 #: src/language/stats/flip.c:349
 msgid "Unexpected end of file reading FLIP file."
-msgstr "Onverwacht einde bestand tijdens lezen FLIP bestand."
+msgstr "Onverwacht einde-bestand tijdens lezen FLIP bestand."
 
 #: src/language/stats/flip.c:365
 #, c-format
 msgid "Error seeking FLIP source file: %s."
-msgstr "Fout tijdens zoeken FLIP bron bestand: %s."
+msgstr "Fout tijdens zoeken FLIP bronbestand: %s."
 
 #: src/language/stats/flip.c:373
 #, c-format
 msgid "Error writing FLIP source file: %s."
-msgstr "Fout tijdens schrijven FLIP bron bestand: %s."
+msgstr "Fout tijdens schrijven FLIP bronbestand: %s."
 
 #: src/language/stats/flip.c:384
 #, c-format
 msgid "Error closing FLIP source file: %s."
-msgstr "Fout tijdens sluiten FLIP bron bestand: %s."
+msgstr "Fout tijdens sluiten FLIP bronbestand: %s."
 
 #: src/language/stats/flip.c:392
 #, c-format
 msgid "Error rewinding FLIP source file: %s."
-msgstr "Fout tijdens terugdraaien FLIP bron bestand: %s."
+msgstr "Fout tijdens terugdraaien FLIP bronbestand: %s."
 
 #: src/language/stats/flip.c:426
 #, c-format
@@ -2653,179 +2994,166 @@ msgstr "Fout tijdens lezen FLIP tijdelijk bestand: %s."
 
 #: src/language/stats/flip.c:429
 msgid "Unexpected end of file reading FLIP temporary file."
-msgstr "Onverwacht einde bestand tijdens lezen FLIP tijdelijk bestand."
-
-#: src/language/stats/npar-summary.c:109
-msgid "Descriptive Statistics"
-msgstr "Descriptive Statistieken"
-
-#: src/language/stats/npar-summary.c:129
-msgid "Std. Deviation"
-msgstr ""
+msgstr "Onverwacht einde-bestand tijdens lezen FLIP tijdelijk bestand."
 
-#: src/language/stats/npar-summary.c:142 src/ui/gui/examine.glade:333
+#: src/language/stats/npar-summary.c:141 src/language/stats/examine.q:1996
+#: src/language/stats/examine.q:2013 src/language/stats/frequencies.q:1050
+#: src/ui/gui/examine.ui:345
 msgid "Percentiles"
-msgstr ""
+msgstr "Percentiles"
 
-#: src/language/stats/npar-summary.c:146
+#: src/language/stats/npar-summary.c:145
 msgid "25th"
-msgstr ""
+msgstr "25ste"
 
-#: src/language/stats/npar-summary.c:149
+#: src/language/stats/npar-summary.c:148
 msgid "50th (Median)"
-msgstr ""
+msgstr "50ste (Mediaan)"
 
-#: src/language/stats/npar-summary.c:152
+#: src/language/stats/npar-summary.c:151
 msgid "75th"
-msgstr ""
+msgstr "75ste"
 
-#: src/language/stats/roc.c:938
+#: src/language/stats/roc.c:932
 msgid "Area Under the Curve"
 msgstr ""
 
-#: src/language/stats/roc.c:940
+#: src/language/stats/roc.c:934
 #, c-format
 msgid "Area Under the Curve (%s)"
 msgstr ""
 
-#: src/language/stats/roc.c:946
+#: src/language/stats/roc.c:939
 msgid "Area"
 msgstr ""
 
-#: src/language/stats/roc.c:959
+#: src/language/stats/roc.c:952 src/language/stats/examine.q:1641
+#: src/language/stats/oneway.q:388 src/language/stats/oneway.q:683
+#: src/language/stats/regression.q:198
 msgid "Std. Error"
-msgstr ""
+msgstr "Std. Fout"
 
-#: src/language/stats/roc.c:960
+#: src/language/stats/roc.c:953
 msgid "Asymptotic Sig."
 msgstr ""
 
-#: src/language/stats/roc.c:962
+#: src/language/stats/roc.c:955 src/language/stats/examine.q:1455
+#: src/language/stats/oneway.q:397
 msgid "Lower Bound"
-msgstr "Beneden Grens"
+msgstr "Benedengrens"
 
-#: src/language/stats/roc.c:963
+#: src/language/stats/roc.c:956 src/language/stats/examine.q:1460
+#: src/language/stats/oneway.q:398
 msgid "Upper Bound"
-msgstr "Boven Grens"
+msgstr "Bovengrens"
 
-#: src/language/stats/roc.c:967
+#: src/language/stats/roc.c:960
 #, c-format
 msgid "Asymp. %g%% Confidence Interval"
-msgstr ""
+msgstr "Asymp. %g%% Betrouwbaarheidsinterval"
 
-#: src/language/stats/roc.c:973
-#, fuzzy
+#: src/language/stats/roc.c:966
 msgid "Variable under test"
-msgstr "Variabelen"
+msgstr ""
 
-#: src/language/stats/roc.c:1032
-#, fuzzy
+#: src/language/stats/roc.c:1025
 msgid "Case Summary"
-msgstr "Overzicht."
+msgstr "Case Overzicht"
 
-#: src/language/stats/roc.c:1054
-#, fuzzy
+#: src/language/stats/roc.c:1045
 msgid "Unweighted"
-msgstr "Niet gewogen."
+msgstr "Niet gewogen"
 
-#: src/language/stats/roc.c:1055
-#, fuzzy
+#: src/language/stats/roc.c:1046
 msgid "Weighted"
-msgstr "Gewicht:"
+msgstr "Gewicht"
 
-#: src/language/stats/roc.c:1059
+#: src/language/stats/roc.c:1050
 msgid "Valid N (listwise)"
 msgstr ""
 
-#: src/language/stats/roc.c:1062
-#, fuzzy
+#: src/language/stats/roc.c:1053
 msgid "Positive"
-msgstr "positief"
+msgstr "Positief"
 
-#: src/language/stats/roc.c:1063
-#, fuzzy
+#: src/language/stats/roc.c:1054
 msgid "Negative"
-msgstr "negatief"
+msgstr "Negatief"
 
-#: src/language/stats/roc.c:1091
+#: src/language/stats/roc.c:1082
 msgid "Coordinates of the Curve"
 msgstr ""
 
-#: src/language/stats/roc.c:1093
+#: src/language/stats/roc.c:1084
 #, c-format
 msgid "Coordinates of the Curve (%s)"
 msgstr ""
 
-#: src/language/stats/roc.c:1103
-#, fuzzy
+#: src/language/stats/roc.c:1092
 msgid "Test variable"
-msgstr "Test Variabel(en):"
+msgstr "Testvariabele(n)"
 
-#: src/language/stats/roc.c:1105
+#: src/language/stats/roc.c:1094
 msgid "Positive if greater than or equal to"
-msgstr ""
+msgstr "Positief als grote dan of gelijk aan"
 
-#: src/language/stats/roc.c:1106 src/language/stats/roc.c:1171
+#: src/language/stats/roc.c:1095 src/output/charts/roc-chart-cairo.c:38
 msgid "Sensitivity"
-msgstr ""
+msgstr "Gevoeligheid"
 
-#: src/language/stats/roc.c:1107 src/language/stats/roc.c:1170
+#: src/language/stats/roc.c:1096 src/output/charts/roc-chart-cairo.c:37
 msgid "1 - Specificity"
 msgstr ""
 
-#: src/language/stats/roc.c:1169
-msgid "ROC Curve"
-msgstr ""
-
-#: src/language/stats/sign.c:91
+#: src/language/stats/sign.c:89
 msgid "Negative Differences"
 msgstr "Negatieve Verschillen"
 
-#: src/language/stats/sign.c:92
+#: src/language/stats/sign.c:90
 msgid "Positive Differences"
 msgstr "Positieve Verschillen"
 
-#: src/language/stats/sign.c:93 src/language/stats/wilcoxon.c:261
+#: src/language/stats/sign.c:91 src/language/stats/wilcoxon.c:259
 msgid "Ties"
 msgstr ""
 
-#: src/language/stats/sign.c:134 src/language/stats/wilcoxon.c:331
+#: src/language/stats/sign.c:130 src/language/stats/wilcoxon.c:327
 msgid "Exact Sig. (2-tailed)"
 msgstr ""
 
-#: src/language/stats/sign.c:137 src/language/stats/wilcoxon.c:332
+#: src/language/stats/sign.c:133 src/language/stats/wilcoxon.c:328
 msgid "Exact Sig. (1-tailed)"
 msgstr ""
 
-#: src/language/stats/sign.c:140 src/language/stats/wilcoxon.c:335
+#: src/language/stats/sign.c:136 src/language/stats/wilcoxon.c:331
 msgid "Point Probability"
 msgstr ""
 
-#: src/language/stats/wilcoxon.c:232
+#: src/language/stats/wilcoxon.c:230
 msgid "Ranks"
-msgstr "Rangen"
+msgstr "Rangschikking"
 
-#: src/language/stats/wilcoxon.c:246
+#: src/language/stats/wilcoxon.c:244
 msgid "Mean Rank"
-msgstr "Gemiddelde Rang"
+msgstr ""
 
-#: src/language/stats/wilcoxon.c:247
+#: src/language/stats/wilcoxon.c:245
 msgid "Sum of Ranks"
-msgstr "Totaal van de Rangen"
+msgstr "Som van Rangen"
 
-#: src/language/stats/wilcoxon.c:259
+#: src/language/stats/wilcoxon.c:257
 msgid "Negative Ranks"
 msgstr "Negatieve Rangen"
 
-#: src/language/stats/wilcoxon.c:260
+#: src/language/stats/wilcoxon.c:258
 msgid "Positive Ranks"
 msgstr "Positieve Rangen"
 
-#: src/language/stats/wilcoxon.c:326
+#: src/language/stats/wilcoxon.c:322
 msgid "Z"
-msgstr ""
+msgstr "Z"
 
-#: src/language/stats/wilcoxon.c:327
+#: src/language/stats/wilcoxon.c:323
 msgid "Asymp. Sig. (2-tailed)"
 msgstr ""
 
@@ -2859,23 +3187,21 @@ msgstr "Actief bestand mist BY variabele %s."
 
 #: src/language/data-io/combine-files.c:376
 msgid "The BY subcommand is required."
-msgstr "De BY subopdracht is nodig."
+msgstr "De BY subopdracht is verplicht."
 
 #: src/language/data-io/combine-files.c:381
-msgid "BY is required when TABLE is specified."
-msgstr "BY is noodzakelijk als TABLE is gespecificeerd."
-
 #: src/language/data-io/combine-files.c:386
-msgid "BY is required when SORT is specified."
-msgstr "BY is noodzakelijk als SORT is gespecificeerd."
+#, c-format
+msgid "BY is required when %s is specified."
+msgstr "BY is noodzakelijk als %s is gespecificeerd."
 
 #: src/language/data-io/combine-files.c:513
 msgid ""
 "Combining files with incompatible encodings. String data may not be "
 "represented correctly."
 msgstr ""
-"Combineren bestanden met incompatibele codering. String data wordt misschien "
-"niet correct weergegeven."
+"Combineren van bestanden met incompatibele codering. Tekenreeks gegevens "
+"worden mogelijk niet correct weergegeven."
 
 #: src/language/data-io/combine-files.c:545
 #, c-format
@@ -2883,7 +3209,7 @@ msgid ""
 "Variable %s in file %s has different type or width from the same variable in "
 "earlier file."
 msgstr ""
-"Variabele %s in bestand %s heeft een ander type of de breedte dan dezelfde "
+"Variabele %s in bestand %s heeft een ander type of breedte dan dezelfde "
 "variabele in eerder bestand."
 
 #: src/language/data-io/combine-files.c:551
@@ -2894,17 +3220,17 @@ msgstr "In bestand %s, %s is numeriek."
 #: src/language/data-io/combine-files.c:554
 #, c-format
 msgid "In file %s, %s is a string variable with width %d."
-msgstr "In bestand %s, %s is een string variabele met breedte %d."
+msgstr "In bestand %s, %s is een tekenreeksvariabele met breedte %d."
 
 #: src/language/data-io/combine-files.c:559
 #, c-format
 msgid "In an earlier file, %s was numeric."
-msgstr "In eerder bestand, %s was numeriek."
+msgstr "In een eerder bestand, %s was numeriek."
 
 #: src/language/data-io/combine-files.c:562
 #, c-format
 msgid "In an earlier file, %s was a string variable with width %d."
-msgstr "In een eerder bestand, %s was een string variabele met breedte %d."
+msgstr "In een eerder bestand, %s was een tekenreeks met breedte %d."
 
 #: src/language/data-io/combine-files.c:601
 #, c-format
@@ -2912,21 +3238,21 @@ msgid ""
 "Variable name %s specified on %s subcommand duplicates an existing variable "
 "name."
 msgstr ""
-"Variabele naam %s gespecificeerd op %s subopdracht dupliceert een bestaande "
-"variabele naam."
+"Variabelennaam %s gespecificeerd in %s-subopdracht dupliceert een bestaande "
+"variabelennaam."
 
 #: src/language/data-io/combine-files.c:762
 #, c-format
 msgid "Encountered %zu sets of duplicate cases in the master file."
-msgstr "Ontmoet %zu sets van dubbele cases in het master bestand. "
+msgstr "Gevonden% zu sets van dubbele cases in het master-bestand."
 
 #: src/language/data-io/data-list.c:137
 msgid "The END subcommand may only be used within INPUT PROGRAM."
-msgstr "De END subopdracht mag alleen binnen INPUT PROGRAM gebruikt worden."
+msgstr "De END-subopdracht mag alleen binnen INPUT PROGRAM gebruikt worden."
 
 #: src/language/data-io/data-list.c:143
 msgid "The END subcommand may only be specified once."
-msgstr "De END subopdracht mag slechts 1 keer gespecificeerd worden."
+msgstr "De END-subopdracht mag slechts 1 keer gespecificeerd worden."
 
 #: src/language/data-io/data-list.c:181
 msgid "Only one of FIXED, FREE, or LIST may be specified."
@@ -2935,11 +3261,12 @@ msgstr "Slechts 1 van FIXED, FREE of LIST mag gespecificeerd worden."
 #: src/language/data-io/data-list.c:243
 msgid "Encoding should not be specified for inline data. It will be ignored."
 msgstr ""
-"Coderen dient niet opgegeven te worden voor inline date. Het wordt genegeerd."
+"Codering dient niet opgegeven te worden voor inline-gegevens. Het wordt "
+"genegeerd."
 
 #: src/language/data-io/data-list.c:254
 msgid "The END subcommand may be used only with DATA LIST FIXED."
-msgstr "De END subopdracht mag allen gebruikt worden met DATA LIST FIXED."
+msgstr "De END-subopdracht mag alleen gebruikt worden met DATA LIST FIXED."
 
 #: src/language/data-io/data-list.c:269
 msgid "At least one variable must be specified."
@@ -2949,7 +3276,7 @@ msgstr "Tenminste 1 variabele moet gespecificeerd worden."
 #: src/language/data-io/get-data.c:530
 #, c-format
 msgid "%s is a duplicate variable name."
-msgstr "%s is een dubbele variabele naam."
+msgstr "%s is een dubbele variabelennaam."
 
 #: src/language/data-io/data-list.c:375
 #, c-format
@@ -2959,7 +3286,7 @@ msgstr "Er is al een variabele %s van een ander type."
 #: src/language/data-io/data-list.c:382
 #, c-format
 msgid "There is already a string variable %s of a different width."
-msgstr "Er is al een string variabele %s van een andere breedte."
+msgstr "Er is al een tekenreeksvariabele %s van een andere breedte."
 
 #: src/language/data-io/data-list.c:390
 #, c-format
@@ -2970,7 +3297,7 @@ msgstr ""
 #: src/language/data-io/data-parser.c:460
 #: src/language/data-io/data-parser.c:469
 msgid "Quoted string extends beyond end of line."
-msgstr "Geciteerde string loopt door na regeleinde."
+msgstr "Geciteerde tekenreeks loopt door na regeleinde."
 
 #: src/language/data-io/data-parser.c:525
 #, c-format
@@ -2988,130 +3315,130 @@ msgid ""
 "Missing value(s) for all variables from %s onward.  These will be filled "
 "with the system-missing value or blanks, as appropriate."
 msgstr ""
-"Missing value(s) voor alle variabelen vanaf %s. Deze worden gevuld met de "
-"geschikte system-missing waarde of spatie."
+"Ontbrekende-waarde(s) voor alle variabelen vanaf %s. Deze worden gevuld met "
+"de geschikte system-missing waarde of spatie."
 
 #: src/language/data-io/data-parser.c:630
 msgid "Record ends in data not part of any field."
-msgstr "Record eindigd in data die geen onderdeel is van een veld."
+msgstr "Record eindigt in gegeven dat geen onderdeel is van een veld."
 
-#: src/language/data-io/data-parser.c:651 src/language/data-io/print.c:405
+#: src/language/data-io/data-parser.c:650 src/language/data-io/print.c:404
 msgid "Record"
-msgstr ""
+msgstr "Record"
 
-#: src/language/data-io/data-parser.c:652 src/language/data-io/print.c:406
-#: src/ui/gui/psppire-var-sheet.c:540 src/ui/gui/psppire-var-store.c:839
-#: src/ui/gui/crosstabs.glade:92
+#: src/language/data-io/data-parser.c:651 src/language/data-io/print.c:405
+#: src/ui/gui/psppire-var-sheet.c:541 src/ui/gui/psppire-var-store.c:839
+#: src/ui/gui/crosstabs.ui:89
 msgid "Columns"
 msgstr "Kolommen"
 
-#: src/language/data-io/data-parser.c:653
-#: src/language/data-io/data-parser.c:692 src/language/data-io/print.c:407
+#: src/language/data-io/data-parser.c:652
+#: src/language/data-io/data-parser.c:689 src/language/data-io/print.c:406
 msgid "Format"
-msgstr "Formaat"
+msgstr "Indeling"
 
-#: src/language/data-io/data-parser.c:672
+#: src/language/data-io/data-parser.c:670
 #, c-format
 msgid "Reading %d record from %s."
 msgid_plural "Reading %d records from %s."
 msgstr[0] "Lezen %d record van %s."
 msgstr[1] "Lezen %d records van %s."
 
-#: src/language/data-io/data-parser.c:708
+#: src/language/data-io/data-parser.c:704
 #, c-format
 msgid "Reading free-form data from %s."
-msgstr "Lezen vrij-formaat data van %s."
+msgstr "Lezen vrije-vorm gegeven van %s."
 
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
-#: src/language/data-io/data-reader.c:122
+#: src/language/data-io/data-reader.c:123
 #: src/language/data-io/data-writer.c:58
 msgid "data file"
-msgstr "data bestand"
+msgstr "gegevensbestand"
 
-#: src/language/data-io/data-reader.c:149
+#: src/language/data-io/data-reader.c:150
 #, c-format
 msgid "Could not open \"%s\" for reading as a data file: %s."
-msgstr "Kon \"%s\"niet openen voor het lezen als data bestand: %s."
+msgstr "Kon \"%s\" niet openen voor het lezen als gegevensbestand: %s."
 
-#: src/language/data-io/data-reader.c:191
+#: src/language/data-io/data-reader.c:192
 msgid ""
 "Unexpected end-of-file while reading data in BEGIN DATA.  This probably "
 "indicates a missing or misformatted END DATA command.  END DATA must appear "
 "by itself on a single line with exactly one space between words."
 msgstr ""
-"Onverwacht einde-bestand tijdens het lezen van data in BEGIN DATA. Dit geeft "
-"waarschijnlijk aan dat de END DATA opdracht ontbreekt of verkeerd geschreven "
-"is. END DATA dient alleen op 1 regel met precies 1 spatie tussen de woorden "
-"voor te komen."
+"Onverwacht einde-bestand tijdens het lezen van gegevens in BEGIN DATA. Dit "
+"geeft waarschijnlijk aan dat de END DATA opdracht ontbreekt of verkeerd "
+"geschreven is. END DATA dient alleen op één regel met precies één spatie "
+"tussen de woorden voor te komen."
 
-#: src/language/data-io/data-reader.c:216
+#: src/language/data-io/data-reader.c:217
 #, c-format
 msgid "Error reading file %s: %s."
 msgstr "Fout tijdens lezen bestand %s: %s."
 
-#: src/language/data-io/data-reader.c:219
+#: src/language/data-io/data-reader.c:220
 #, c-format
 msgid "Unexpected end of file reading %s."
 msgstr "Onverwacht einde tijdens lezen van bestand %s."
 
-#: src/language/data-io/data-reader.c:228
+#: src/language/data-io/data-reader.c:229
 #, c-format
 msgid "Unexpected end of file in partial record reading %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:288
+#: src/language/data-io/data-reader.c:289
 #, c-format
 msgid "Corrupt block descriptor word at offset 0x%lx in %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:289
+#: src/language/data-io/data-reader.c:290
 #, c-format
 msgid "Corrupt record descriptor word at offset 0x%lx in %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:302
+#: src/language/data-io/data-reader.c:303
 #, c-format
 msgid "Corrupt record size at offset 0x%lx in %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:444
+#: src/language/data-io/data-reader.c:445
 msgid "Record exceeds remaining block length."
-msgstr "Record overschrijdt resterend blok lengte."
+msgstr "Record overschrijdt resterende bloklengte."
 
-#: src/language/data-io/data-reader.c:518
+#: src/language/data-io/data-reader.c:519
 #, c-format
 msgid "Attempt to read beyond end-of-file on file %s."
-msgstr "Poging om te lezen na einde-bestand op bestand %s."
+msgstr "Poging om te lezen na einde-bestand in bestand %s."
 
-#: src/language/data-io/data-reader.c:521
+#: src/language/data-io/data-reader.c:522
 msgid "Attempt to read beyond END DATA."
 msgstr "Poging om te lezen na END DATA."
 
-#: src/language/data-io/data-reader.c:707
+#: src/language/data-io/data-reader.c:708
 msgid ""
 "This command is not valid here since the current input program does not "
 "access the inline file."
 msgstr ""
-"Deze opdracht is hier niet geldig omdat het huidige invoer programma het "
-"inline bestand niet benaderd."
+"Deze opdracht is hier niet geldig omdat het huidige invoerprogramma het "
+"inline-bestand niet benaderd."
 
 #: src/language/data-io/data-writer.c:74
 #, c-format
 msgid "An error occurred while opening \"%s\" for writing as a data file: %s."
 msgstr ""
-"Een fout is opgetreden tijdens het openen van \"%s\" voor schrijven als data "
-"bestand: %s."
+"Een fout is opgetreden tijdens het openen van \"%s\" voor schrijven als "
+"gegevensbestand: %s."
 
 #: src/language/data-io/data-writer.c:191
 #, c-format
 msgid "I/O error occurred writing data file \"%s\"."
-msgstr "I/O fout opgetreden tijdens schrijven data bestand \"%s\"."
+msgstr "I/O fout opgetreden tijdens schrijven gegevensbestand \"%s\"."
 
 #: src/language/data-io/get-data.c:64
 #, c-format
 msgid "Unsupported TYPE %s"
-msgstr "Niet ondersteunt TYPE %s"
+msgstr "Niet ondersteund TYPE %s"
 
 #: src/language/data-io/get-data.c:260
 #, c-format
@@ -3151,8 +3478,8 @@ msgid ""
 "In compatible syntax mode, the QUALIFIER string must contain exactly one "
 "character."
 msgstr ""
-"In compatibele syntax modus, the QUALIFIER string moet precies 1 karakter "
-"bevatten."
+"In compatibele syntaxmodus, dient de QUALIFIER tekenreeks precies één teken "
+"te bevatten."
 
 #: src/language/data-io/get-data.c:462
 msgid "expecting VARIABLES"
@@ -3165,8 +3492,8 @@ 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 ""
-"Het opgegeven record nummer, %ld, is op of voor het huidige record, %d. Data "
-"velden dienen opgegeven te worden in oplopende recordnummer volgorde."
+"Het opgegeven recordnummer, %ld, is op of voor het huidige record, %d. "
+"Gegevensvelden dienen opgegeven te worden in oplopende recordnummer volgorde."
 
 #: src/language/data-io/get-data.c:493
 #, c-format
@@ -3174,7 +3501,7 @@ msgid ""
 "The record number specified, %ld, exceeds the number of records per case "
 "specified on FIXCASE, %d."
 msgstr ""
-"Het gespecificeerde record nummer, %ld, overschrijdt het aantal records per "
+"Het gespecificeerde recordnummer, %ld, overschrijdt het aantal records per "
 "case zoals gespecificeerd in FIXCASE, %d."
 
 #: src/language/data-io/get.c:99
@@ -3187,17 +3514,17 @@ msgstr "Onverwacht einde-bestand binnen INPUT PROGRAM."
 
 #: src/language/data-io/inpt-pgm.c:143
 msgid "Input program did not create any variables."
-msgstr "Input program heeft geen variabelen gecreëerd."
+msgstr "Invoerprogramma heeft geen variabelen gecreëerd."
 
 #: src/language/data-io/inpt-pgm.c:288
 msgid "COLUMN subcommand multiply specified."
-msgstr "COLUMN subopdracht meerdere keren gespecificeerd."
+msgstr "COLUMN-subopdracht meerdere keren gespecificeerd."
 
 #: src/language/data-io/inpt-pgm.c:338
 msgid ""
 "REREAD: Column numbers must be positive finite numbers.  Column set to 1."
 msgstr ""
-"REREAD: Kolom nummers moeten positieve eindige nummers zijn. Kolom is op 1 "
+"REREAD: Kolomnummers moeten positieve eindige nummers zijn. Kolom is op 1 "
 "gezet."
 
 #: src/language/data-io/placement-parser.c:87
@@ -3207,14 +3534,13 @@ msgid ""
 "(%zu)."
 msgstr ""
 "Aantal gespecificeerde variabelen (%zu) verschilt van aantal variabele "
-"formaten (%zu)."
+"formats (%zu)."
 
 #: src/language/data-io/placement-parser.c:97
 msgid ""
 "SPSS-like or Fortran-like format specification expected after variable names."
 msgstr ""
-"SPSS-achtig of Fortran-achtig formaat specificatie verwacht na variabele "
-"naam."
+"SPSS-achtig of Fortran-achtig format-specificatie verwacht na variabele naam."
 
 #: src/language/data-io/placement-parser.c:119
 #, c-format
@@ -3223,15 +3549,15 @@ msgstr "De %d kolommen %d-%d kunnen niet gelijk verdeeld worden in %zu velden."
 
 #: src/language/data-io/placement-parser.c:305
 msgid "Column positions for fields must be positive."
-msgstr "Kolom posities voor velden moet positief zijn."
+msgstr "Kolomposities voor velden moeten positief zijn."
 
 #: src/language/data-io/placement-parser.c:307
 msgid "Column positions for fields must not be negative."
-msgstr "Kolom posities voor velden mogen niet negatief zijn."
+msgstr "Kolomposities voor velden mogen niet negatief zijn."
 
 #: src/language/data-io/placement-parser.c:344
 msgid "The ending column for a field must be greater than the starting column."
-msgstr "De eind kolom van een veld moet groter zijn dan de start kolom."
+msgstr "De eindkolom van een veld moet groter zijn dan de startkolom."
 
 #: src/language/data-io/print-space.c:116
 msgid "The expression on PRINT SPACE evaluated to the system-missing value."
@@ -3244,27 +3570,27 @@ msgstr "De expressie bij PRINT SPACE evalueerde tot %g."
 
 #: src/language/data-io/print.c:179 src/language/data-io/trim.c:54
 msgid "expecting a valid subcommand"
-msgstr "een geldig subopdracht verwacht"
+msgstr "een geldige subopdracht werd verwacht"
 
 #: src/language/data-io/print.c:267
 #, c-format
 msgid "Output calls for %d records but %zu specified on RECORDS subcommand."
 msgstr ""
-"De output vraagt %d records maar %zu gespecificeerd bij RECORDS subopdracht. "
+"De uitvoer vraagt %d records maar %zu gespecificeerd in RECORDS-subopdracht."
 
-#: src/language/data-io/print.c:438
+#: src/language/data-io/print.c:436
 #, c-format
-msgid "Writing %d record to %s."
-msgid_plural "Writing %d records to %s."
-msgstr[0] "Schrijven van %d record naar %s."
-msgstr[1] "Schrijven van %d records naar %s."
+msgid "Writing %zu record to %s."
+msgid_plural "Writing %zu records to %s."
+msgstr[0] "Schrijven van %zu record naar %s."
+msgstr[1] "Schrijven van %zu records naar %s."
 
-#: src/language/data-io/print.c:442
+#: src/language/data-io/print.c:440
 #, c-format
-msgid "Writing %d record."
-msgid_plural "Writing %d records."
-msgstr[0] "Schrijven van %d record."
-msgstr[1] "Schrijven van %d records."
+msgid "Writing %zu record."
+msgid_plural "Writing %zu records."
+msgstr[0] "Schrijven van %zu record."
+msgstr[1] "Schrijven van %zu records."
 
 #: src/language/data-io/save.c:223 src/language/data-io/save.c:238
 #: src/language/data-io/save.c:266
@@ -3281,14 +3607,14 @@ msgid ""
 msgstr ""
 "Kan %s niet hernoemen naar  %s omdat er al een variabele met de naam %s "
 "bestaat.  Om variabelen met overlappende naam te hernoemen gebruik een enkel "
-"RENAME subopdracht zoals \"/RENAME (A=B)(B=C)(C=A)\", of equivalent achtig, "
+"RENAME-subopdracht zoals \"/RENAME (A=B)(B=C)(C=A)\", of equivalent achtig, "
 "\"/RENAME (A B C=B C A)\"."
 
 #: src/language/data-io/trim.c:114
 msgid "`=' expected after variable list."
-msgstr "'=' verwacht na variabele lijst."
+msgstr "'=' verwacht na variabelenlijst."
 
-#: src/language/data-io/trim.c:121
+#: src/language/data-io/trim.c:122
 #, c-format
 msgid ""
 "Number of variables on left side of `=' (%zu) does not match number of "
@@ -3297,25 +3623,25 @@ msgid ""
 msgstr ""
 "Aantal variabelen aan linker zijde van `=' (%zu) komt niet overeen met het "
 "aantal variabelen aan rechter zijde (%zu), in tussengevoegde groep %d van "
-"RENAME subopdracht."
+"RENAME-subopdracht."
 
-#: src/language/data-io/trim.c:134
+#: src/language/data-io/trim.c:135
 #, c-format
 msgid "Requested renaming duplicates variable name %s."
-msgstr "Gevraagde hernoeming dupliceert variabele naam %s."
+msgstr "Gevraagde hernoeming dupliceert variabelennaam %s."
 
-#: src/language/data-io/trim.c:165
+#: src/language/data-io/trim.c:166
 msgid "Cannot DROP all variables from dictionary."
 msgstr "Kan niet alle variabelen DROP-en uit woordenboek."
 
 #: src/language/expressions/evaluate.c:155
 msgid "expecting number or string"
-msgstr "verwacht nummer of string"
+msgstr "verwacht nummer of tekenreeks"
 
 #: src/language/expressions/evaluate.c:169
 #, c-format
 msgid "Duplicate variable name %s."
-msgstr "Dubbele variabele naam %s."
+msgstr "Dubbele variabelennaam %s."
 
 #: src/language/expressions/helpers.c:51
 msgid ""
@@ -3338,7 +3664,7 @@ msgid ""
 "The week argument to DATE.WKYR is outside the acceptable range of 1 to 53.  "
 "The result will be system-missing."
 msgstr ""
-"Het week argument voor DATE.WKYR is buiten de acceptabele range van 1 tot "
+"Het week argument voor DATE.WKYR is buiten het acceptabele bereik van 1 tot "
 "53.  Het resultaat zal system-missing zijn."
 
 #: src/language/expressions/helpers.c:101
@@ -3354,7 +3680,7 @@ msgid ""
 "The day argument to DATE.YRDAY is outside the acceptable range of 1 to 366.  "
 "The result will be system-missing."
 msgstr ""
-"Het dag argument voor DATE.WKYR is buiten de acceptabele range van 1 tot "
+"Het dag argument voor DATE.WKYR is buiten het acceptabele bereik van 1 tot "
 "366.  Het resultaat zal system-missing zijn."
 
 #: src/language/expressions/helpers.c:129
@@ -3371,7 +3697,7 @@ msgid ""
 "Unrecognized date unit \"%.*s\".  Valid date units are \"years\", \"quarters"
 "\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", and \"seconds\"."
 msgstr ""
-"Niet herkende datum eenheid \"%.*s\".  Geldige datum eenheden zijn \"years"
+"Niet-herkende datum eenheid \"%.*s\".  Geldige datum eenheden zijn \"years"
 "\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", "
 "en \"seconds\"."
 
@@ -3387,15 +3713,15 @@ msgid ""
 "Type mismatch: expression has %s type, but a numeric value is required here."
 msgstr ""
 "Type ongelijk: expressie heeft type %s, maar een numerieke waarde is hier "
-"noodzakelijk."
+"vereist."
 
 #: src/language/expressions/parse.c:271
 #, c-format
 msgid ""
 "Type mismatch: expression has %s type, but a string value is required here."
 msgstr ""
-"Type ongelijk: expressie heeft type %s, maar een string waarde is hier "
-"noodzakelijk."
+"Type ongelijk: expressie heeft type %s, maar een tekenreeks waarde is hier "
+"vereist."
 
 #: src/language/expressions/parse.c:427
 #, c-format
@@ -3422,7 +3748,7 @@ msgstr ""
 #: src/language/expressions/parse.c:809
 #, c-format
 msgid "Unknown system variable %s."
-msgstr "Onbekende systeem variabele %s."
+msgstr "Onbekende systeemvariabele %s."
 
 #: src/language/expressions/parse.c:857
 #, c-format
@@ -3465,7 +3791,7 @@ msgid ""
 "passing only %d arguments in list."
 msgstr ""
 "Met %s, heeft het gebruik van de minimum geldige argumenttelling van %d geen "
-"zin wanneer een lijst van slechts %d wordt doorgegeven. "
+"zin wanneer een lijst van slechts %d wordt doorgegeven."
 
 #: src/language/expressions/parse.c:1164
 #, c-format
@@ -3474,7 +3800,7 @@ msgstr "Type ongelijk bij aanroep %s als "
 
 #: src/language/expressions/parse.c:1169
 msgid "Function invocation "
-msgstr "Functie aanroep "
+msgstr "Functieaanroep "
 
 #: src/language/expressions/parse.c:1171
 msgid " does not match any known function.  Candidates are:"
@@ -3503,1120 +3829,705 @@ msgstr "%s mag niet voorkomen na TEMPORARY."
 #: src/libpspp/hash.c:545
 #, c-format
 msgid "hash table:"
-msgstr "hash tabel:"
+msgstr "hash-tabel:"
+
+#: src/libpspp/message.c:128
+msgid "error"
+msgstr "fout"
 
-#: src/libpspp/tmpfile.c:55
+#: src/libpspp/message.c:131
+msgid "warning"
+msgstr "waarschuwing"
+
+#: src/libpspp/message.c:135
+msgid "note"
+msgstr "aantekening"
+
+#: src/libpspp/tmpfile.c:56
 msgid "failed to create temporary file"
-msgstr "aanmaken van een tijdelijk bestand is mislukt"
+msgstr "aanmaken van tijdelijk bestand is mislukt"
 
-#: src/libpspp/tmpfile.c:96
+#: src/libpspp/tmpfile.c:97
 msgid "seeking in temporary file"
 msgstr "zoeken in tijdelijk bestand"
 
-#: src/libpspp/tmpfile.c:115
+#: src/libpspp/tmpfile.c:116
 msgid "reading temporary file"
 msgstr "lezen tijdelijk bestand"
 
-#: src/libpspp/tmpfile.c:117
+#: src/libpspp/tmpfile.c:118
 msgid "unexpected end of file reading temporary file"
-msgstr "onverwacht einde bestand bij het lezen van tijdelijk bestand"
+msgstr "onverwacht einde-bestand bij het lezen van tijdelijk bestand"
 
-#: src/libpspp/tmpfile.c:136
+#: src/libpspp/tmpfile.c:137
 msgid "writing to temporary file"
 msgstr "schrijven naar tijdelijk bestand"
 
-#: src/math/percentiles.c:35
+#: src/libpspp/zip-writer.c:91
+#, c-format
+msgid "%s: error opening output file"
+msgstr "%s: tijdens openen uitvoerbestand"
+
+#: src/libpspp/zip-writer.c:224
+#, c-format
+msgid "%s: write failed"
+msgstr "%s: schrijven mislukt"
+
+#: src/math/percentiles.c:36
 msgid "HAverage"
 msgstr ""
 
-#: src/math/percentiles.c:36
+#: src/math/percentiles.c:37
 msgid "Weighted Average"
-msgstr "Gewogen Gemiddelde"
+msgstr "Gewogen gemiddelde"
 
-#: src/math/percentiles.c:37
+#: src/math/percentiles.c:38
 msgid "Rounded"
 msgstr "Afgerond"
 
-#: src/math/percentiles.c:38
+#: src/math/percentiles.c:39
 msgid "Empirical"
-msgstr ""
+msgstr "Empirisch"
 
-#: src/math/percentiles.c:39
+#: src/math/percentiles.c:40
 msgid "Empirical with averaging"
-msgstr ""
-
-#: src/output/charts/plot-hist.c:138
-msgid "HISTOGRAM"
-msgstr ""
+msgstr "Empirisch met gemiddelde"
 
-#: src/output/charts/plot-hist.c:140
-msgid "Frequency"
-msgstr "Frequenties"
+#: src/output/ascii.c:278
+#, c-format
+msgid "%s: %s must be positive integer or `auto'"
+msgstr "%s: %s dient positief integer of 'auto' te zijn"
 
-#: src/output/afm.c:149
+#: src/output/ascii.c:311
 #, c-format
-msgid "opening font metrics file \"%s\""
+msgid ""
+"ascii: page excluding margins and headers must be at least %d characters "
+"wide by %d lines long, but as configured is only %d characters by %d lines"
 msgstr ""
+"ascii: pagina exclusief marges en koppen moet tenminste %d tekens breed en %"
+"d regels lang zijn, maar geconfigureerd is slechts %d tekens bij %d regels"
 
-#: src/output/afm.c:239
-msgid "first line must be StartFontMetrics"
-msgstr "eerste regel moet zijn StartFontMetrics"
-
-#: src/output/afm.c:266
+#: src/output/ascii.c:360
 #, c-format
-msgid "unsupported MappingScheme %d"
-msgstr "niet ondersteunt MappingSchema %d"
-
-#: src/output/afm.c:287
-msgid "required FontName is missing"
-msgstr "vereiste FontNaam ontbreekt"
-
-#: src/output/afm.c:394
-msgid "CharMetrics line must start with C or CH"
-msgstr "CharMetrics regel moet beginnen met C of CH"
+msgid "ascii: closing output file \"%s\""
+msgstr "ascii: sluiten uitvoerbestand \"%s\""
 
-#: src/output/afm.c:535
+#: src/output/ascii.c:503
 #, c-format
-msgid "reference to unknown character \"%s\""
-msgstr "referentie naar onbekend karakter \"%s\""
-
-#: src/output/afm.c:593
-msgid "expected end of file"
-msgstr "einde bestand verwacht"
-
-#: src/output/afm.c:605
-msgid "syntax error expecting end of line"
-msgstr "syntax fout einde regel verwacht"
-
-#: src/output/afm.c:623 src/output/afm.c:660
-msgid "number out of valid range"
-msgstr "nummer buiten geldige range"
-
-#: src/output/afm.c:625 src/output/afm.c:662
-msgid "invalid numeric syntax"
-msgstr "ongeldige numerieke syntax"
-
-#: src/output/afm.c:641
-msgid "syntax error expecting integer"
-msgstr "syntax fout integer verwacht"
-
-#: src/output/afm.c:679
-msgid "syntax error expecting number"
-msgstr "syntax fout nummer verwacht"
-
-#: src/output/afm.c:692
-msgid "syntax error in hex constant"
-msgstr "syntax fout in hex constante"
-
-#: src/output/afm.c:707
-msgid "syntax error expecting hex constant"
-msgstr "syntax fout hex constante verwacht"
+msgid "See %s for a chart."
+msgstr ""
 
-#: src/output/afm.c:745
-msgid "unexpected end of line"
-msgstr "onverwacht regel einde"
+#: src/output/ascii.c:806
+#, c-format
+msgid "ascii: opening output file \"%s\""
+msgstr "ascii: openen uitvoerbestand \"%s\""
 
-#: src/output/afm.c:795
-msgid "unexpected end of line expecting string"
-msgstr "onverwacht regeleinde string verwacht"
+#: src/output/ascii.c:913 src/output/cairo.c:784
+#, c-format
+msgid "%s - Page %d"
+msgstr "%s - Pagina %d"
 
-#: src/output/ascii.c:251
+#: src/output/csv.c:87 src/output/html.c:106 src/output/journal.c:93
+#: src/output/msglog.c:66
 #, c-format
-msgid ""
-"ascii: page excluding margins and headers must be at least 59 characters "
-"wide by 15 lines long, but as configured is only %d characters by %d lines"
-msgstr ""
-"ascii: pagina exclusief marges en koppen moet tenminste 59 karakters breed "
-"en 15 regels lang zijn, maar geconfigureerd is slechts %d karakters bij %d "
-"regels"
+msgid "error opening output file \"%s\""
+msgstr "fout tijdens openen uitvoerbestand \"%s\""
 
-#: src/output/ascii.c:329
+#: src/output/driver.c:330
 #, c-format
 msgid ""
-"ascii: bad index value for `box' key: syntax is box[INDEX], 0 <= INDEX < %d "
-"decimal, with INDEX expressed in base 4"
+"%s is not a valid device type (the choices are \"terminal\" and \"listing\")"
 msgstr ""
+"%s is geen valide apparaattype (de keuzes zijn \"terminal\" en \"listing\")"
 
-#: src/output/ascii.c:336
-#, c-format
-msgid "ascii: multiple values for %s"
-msgstr "ascii: meerdere waardes voor %s"
-
-#: src/output/ascii.c:344
+#: src/output/driver.c:343
 #, c-format
-msgid "ascii: unknown parameter `%s'"
-msgstr "ascii: onbekende parameter `%s'"
+msgid "%s: unknown option \"%s\""
+msgstr "%s: onbekende optie \"%s\""
 
-#: src/output/ascii.c:360
-msgid "ascii: only screen devices may have `auto' length or width"
-msgstr "ascii: alleen scherm apparaten mogen 'auto' lengte of breedte hebben"
+#: src/output/html.c:114
+msgid "PSPP Output"
+msgstr "PSPP-uitvoer"
 
-#: src/output/ascii.c:374
+#: src/output/journal.c:67
 #, c-format
-msgid "ascii: positive integer required as `%s' value"
-msgstr "ascii: positieve integer vereist als `%s' waarde"
+msgid "error writing output file \"%s\""
+msgstr "fout bij schrijven van \"%s\""
 
-#: src/output/ascii.c:402
-msgid "ascii: `emphasis' value must be `bold', `underline', or `none'"
-msgstr "ascii: `emphasis' waarde moet `bold', `underline', of `none' zijn"
-
-#: src/output/ascii.c:415
+#: src/output/measure.c:65
 #, c-format
-msgid "ascii: zero or positive integer required as `%s' value"
-msgstr "ascii: nul of positieve integer vereist als `%s' waarde"
+msgid "`%s' is not a valid length."
+msgstr "'%s' is geen geldige lengte."
 
-#: src/output/ascii.c:446
+#: src/output/measure.c:93
 #, c-format
-msgid "ascii: boolean value expected for `%s'"
-msgstr "ascii: boolean waarde verwacht voor `%s'"
-
-#: src/output/ascii.c:478 src/output/html.c:187
-msgid "`chart-files' value must contain `#'"
-msgstr "`chart-files' waarde moet `#' bevatten"
+msgid "syntax error in paper size `%s'"
+msgstr "syntaxfout in papiergrootte '%s' "
 
-#: src/output/ascii.c:524
+#: src/output/measure.c:230
 #, c-format
-msgid "ascii: opening output file \"%s\""
-msgstr "ascii: openen uitvoer bestand \"%s\""
+msgid "unknown paper type `%.*s'"
+msgstr "onbekend papiertype '%.*s'"
 
-#: src/output/ascii.c:587
+#: src/output/measure.c:248
 #, c-format
-msgid "ascii: bad line (%d,%d)-(%d,%d) out of (%d,%d)\n"
-msgstr ""
+msgid "error opening input file \"%s\""
+msgstr "fout tijdens openen \"%s\" "
 
-#: src/output/ascii.c:809 src/output/postscript.c:826
+#: src/output/measure.c:259
 #, c-format
-msgid "%s - Page %d"
-msgstr "%s - Pagina %d"
+msgid "error reading file \"%s\""
+msgstr "fout tijdens lezen \"%s\""
 
-#: src/output/ascii.c:861
+#: src/output/measure.c:276
 #, c-format
-msgid "ascii: closing output file \"%s\""
-msgstr "ascii: sluiten uitvoer bestand \"%s\""
+msgid "paper size file \"%s\" does not state a paper size"
+msgstr "papier grootte bestand \"%s\" geeft geen papier grootte aan"
 
-#: src/output/html.c:71
+#: src/output/options.c:113
 #, c-format
-msgid "opening HTML output file: %s"
-msgstr "openen HTML uitvoer bestand: %s"
-
-#: src/output/html.c:82
-msgid "PSPP Output"
-msgstr "PSPP Uitvoer"
+msgid "%s: \"%s\" is \"%s\" but a Boolean value is required"
+msgstr "%s: \"%s\" is \"%s\" maar een Boolean waarde is noodzakelijk"
 
-#: src/output/html.c:170
+#: src/output/options.c:188
 #, c-format
-msgid "unknown configuration parameter `%s' for HTML device driver"
-msgstr "onbekende configuratie parameter '%s' voor HTML device driver"
+msgid "%s: \"%s\" is \"%s\" but one of the following is required: %s"
+msgstr "%s: \"%s\" is \"%s\" maar een van de volgende is noodzakelijk: %s"
 
-#: src/output/journal.c:69
+#: src/output/options.c:232
 #, c-format
-msgid "error writing \"%s\""
-msgstr "fout bij schrijven \"%s\""
+msgid "%s: \"%s\" is \"%s\" but a nonnegative integer is required"
+msgstr "%s: \"%s\" is \"%s\" maar een niet negatieve integer is noodzakelijk"
 
-#: src/output/journal.c:94
+#: src/output/options.c:236
 #, c-format
-msgid "error creating \"%s\""
-msgstr "fout bij aanmaken \"%s\""
+msgid "%s: \"%s\" is \"%s\" but a positive integer is required"
+msgstr "%s: \"%s\" is \"%s\" maar een positieve integer is noodzakelijk"
 
-#: src/output/output.c:168
+#: src/output/options.c:239
 #, c-format
-msgid "unknown output driver `%s'"
-msgstr "onbekende uitvoer driver %s"
+msgid "%s: \"%s\" is \"%s\" but an integer is required"
+msgstr "%s: \"%s\" is \"%s\" maar een integer is noodzakelijk"
 
-#: src/output/output.c:170
+#: src/output/options.c:242
 #, c-format
-msgid "output driver `%s' referenced but never defined"
-msgstr "uitvoer driver '%s' gerefereerd maar nooit gedefinieerd"
-
-#: src/output/output.c:261
-msgid "using default output driver configuration"
-msgstr "gebruik default uitvoer driver configuratie"
-
-#: src/output/output.c:290
-msgid "cannot find output initialization file (use `-vv' to view search path)"
-msgstr ""
-"kan uitvoer initialisatie bestand niet vinden (gebruik -vv om zoekpad te "
-"zien)"
+msgid "%s: \"%s\" is \"%s\" but an integer greater than %d is required"
+msgstr "%s: \"%s\" is \"%s\" maar een integer groter dan %d is noodzakelijk"
 
-#: src/output/output.c:298
+#: src/output/options.c:247
 #, c-format
-msgid "cannot open \"%s\""
-msgstr "kan \"%s\" niet openen"
+msgid "%s: \"%s\" is \"%s\"  but an integer between %d and %d is required"
+msgstr "%s: \"%s\" is \"%s\"  maar een integer tussen %d en %d is noodzakelijk"
 
-#: src/output/output.c:310
+#: src/output/options.c:326
 #, c-format
-msgid "reading \"%s\""
-msgstr "lezen \"%s\""
-
-#: src/output/output.c:332 src/ui/gui/message-dialog.c:99
-msgid "syntax error"
-msgstr "syntax fout"
+msgid "%s: \"%s\" is \"%s\" but a file name that contains \"#\" is required."
+msgstr ""
+"%s: \"%s\" is \"%s\" maar een bestandsnaam die  \"#\" bevat is noodzakelijk."
 
-#: src/output/output.c:341
+#: src/output/tab.c:206
 #, c-format
-msgid "error closing \"%s\""
-msgstr "fout bij sluiten \"%s\""
-
-#: src/output/output.c:349
-msgid "no active output drivers"
-msgstr "geen actieve uitvoer drivers"
+msgid "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
+msgstr ""
 
-#: src/output/output.c:352
-msgid "error reading device definition file"
-msgstr "fout tijdens lezen device definitie bestand"
+#: src/output/tab.c:244
+#, c-format
+msgid "bad hline: x=(%d+%d=%d,%d+%d=%d) y=%d+%d=%d in table size (%d,%d)\n"
+msgstr ""
 
-#: src/output/output.c:470
+#: src/output/tab.c:288
 #, c-format
 msgid ""
-"Driver classes:\n"
-"\t"
+"bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
 msgstr ""
 
-#: src/output/output.c:502
+#: src/output/cairo.c:295
 #, c-format
-msgid "syntax error parsing options for \"%s\" driver"
-msgstr "syntax fout bij het ontleden van opties voor \"%s\" driver"
+msgid "error opening output file \"%s\": %s"
+msgstr "fout tijdens openen uitvoerbestand \"%s\": %s"
 
-#: src/output/output.c:518
+#: src/output/cairo.c:312
 #, c-format
 msgid ""
-"reached end of options inside quoted string parsing options for \"%s\" driver"
+"The defined page is not wide enough to hold at least %d characters in the "
+"default font.  In fact, there's only room for %d characters."
 msgstr ""
-"einde opties bereikt binnen geciteerde string tijdens ontleden van opties "
-"voor \"%s\" driver"
+"De gedefinieerde pagina is niet breed om ten minste %d tekens in het verstek "
+"font te bevatten. In feite is er slechts plaats voor %d tekens."
 
-#: src/output/output.c:588
+#: src/output/cairo.c:322
 #, c-format
-msgid "syntax error in string constant parsing options for \"%s\" driver"
+msgid ""
+"The defined page is not long enough to hold margins and headers, plus least %"
+"d lines of the default fonts.  In fact, there's only room for %d lines."
 msgstr ""
-"syntax fout in string constante tijdens ontleden opties voor \"%s\" driver"
+"De gedefinieerde pagina is niet lang genoeg om marges en koppen, plus "
+"tenminste %d regels van het verstek font te bevatten.  In feite is er "
+"slechts plaats voor %d regels."
 
-#: src/output/output.c:636
+#: src/output/cairo.c:376
 #, c-format
-msgid "syntax error expecting `=' parsing options for driver \"%s\""
-msgstr "syntax fout verwacht `=' tijdens ontleden opties voor driver \"%s\""
+msgid "error drawing output for %s driver: %s"
+msgstr "fout tijdens tekenen uitvoer voor %s driver: %s "
 
-#: src/output/output.c:687
+#: src/output/cairo.c:864
 #, c-format
-msgid "unknown output driver class `%.*s'"
-msgstr "onbekende uitvoer driver class `%.*s'"
+msgid "\"%s\": bad font specification"
+msgstr "\"%s\": slechte fontspecificatie"
 
-#: src/output/output.c:702
+#: src/output/cairo.c:1084
 #, c-format
-msgid "unknown device type `%.*s'"
-msgstr "onbekend apparaat type `%.*s'"
+msgid "error writing output file \"%s\": %s"
+msgstr "fout tijdens schrijven uitvoerbestand \"%s\": %s"
 
-#: src/output/output.c:719
+#: src/output/charts/np-plot-cairo.c:37
 #, c-format
-msgid "cannot initialize output driver `%s' of class `%s'"
-msgstr ""
+msgid "Normal Q-Q Plot of %s"
+msgstr "Normal Q-Q Plot van %s"
 
-#: src/output/output.c:765
-msgid "driver definition line missing driver name or class name"
-msgstr "driver definitie regel mist driver naam of class naam"
+#: src/output/charts/np-plot-cairo.c:38 src/output/charts/np-plot-cairo.c:66
+msgid "Observed Value"
+msgstr "Waargenomen Waarde"
 
-#: src/output/output.c:868
-#, c-format
-msgid "`%s' is not a valid length."
-msgstr "`%s' is geen geldige lengte."
+#: src/output/charts/np-plot-cairo.c:39
+msgid "Expected Normal"
+msgstr ""
 
-#: src/output/output.c:960
+#: src/output/charts/np-plot-cairo.c:64
 #, c-format
-msgid "unknown paper type `%.*s'"
-msgstr "onbekend papier type `%.*s'"
+msgid "Detrended Normal Q-Q Plot of %s"
+msgstr "Detrended Normal Q-Q Plot van %s"
 
-#: src/output/output.c:978
-#, c-format
-msgid "error opening \"%s\""
-msgstr "fout tijdens openen \"%s\""
+#: src/output/charts/np-plot-cairo.c:67
+msgid "Dev from Normal"
+msgstr ""
 
-#: src/output/output.c:989
-#, c-format
-msgid "error reading \"%s\""
-msgstr "fout tijdens lezen \"%s\""
+#: src/output/charts/plot-hist-cairo.c:110
+msgid "HISTOGRAM"
+msgstr "HISTOGRAM"
 
-#: src/output/output.c:1006
-#, c-format
-msgid "paper size file \"%s\" does not state a paper size"
-msgstr "papier grootte bestand \"%s\" geeft geen papier grootte aan"
+#: src/output/charts/plot-hist-cairo.c:112
+#: src/language/stats/frequencies.q:814
+msgid "Frequency"
+msgstr "Frequenties"
 
-#: src/output/output.c:1066
-#, c-format
-msgid "syntax error in paper size `%s'"
-msgstr "syntax fout in papier grootte '%s' "
+#: src/output/charts/roc-chart-cairo.c:36 src/ui/gui/roc.ui:7
+msgid "ROC Curve"
+msgstr "ROC Curve"
 
-#: src/output/postscript.c:158
-#, c-format
-msgid "opening PostScript output file \"%s\""
-msgstr "Openen PostScript uitvoer bestand \"%s\""
+#: src/output/charts/scree-cairo.c:36
+msgid "Scree Plot"
+msgstr ""
 
-#: src/output/postscript.c:196
-#, c-format
-msgid ""
-"The defined PostScript page is not long enough to hold margins and headers, "
-"plus least 15 lines of the default fonts.  In fact, there's only room for %d "
-"lines of each font at the default size of %d.%03d points."
+#: src/output/charts/scree-cairo.c:38
+msgid "Eigenvalue"
 msgstr ""
-"De gedefinieerde PostScript pagina is niet lang genoeg om marges en koppen, "
-"plus tenminste 15 regels van het default font te bevatten.  In feite is er "
-"slechts plaats voor %d regels van elk font bij de default grootte van %d.%"
-"03d punten."
 
-#: src/output/postscript.c:246
-#, c-format
-msgid "closing PostScript output file \"%s\""
-msgstr "sluiten PostScript uitvoer bestand \"%s\""
+#: src/output/odt.c:93
+msgid "error creating temporary file"
+msgstr "fout tijdens aanmaken tijdelijk bestand"
 
-#: src/output/postscript.c:309
-#, c-format
-msgid "unknown configuration parameter `%s' for PostScript device driver"
-msgstr "onbekende configuratie parameter `%s' voor PostScript device driver"
+#: src/ui/source-init-opts.c:78
+msgid "Algorithm must be either \"compatible\" or \"enhanced\"."
+msgstr "Algoritme moet of \"compatible\" of \"enhanced\" zijn."
 
-#: src/output/postscript.c:325
-#, c-format
+#: src/ui/source-init-opts.c:103
+msgid "Syntax must be either \"compatible\" or \"enhanced\"."
+msgstr "Syntax moet of \"compatible\" of \"enhanced\" zijn."
+
+#: src/ui/terminal/main.c:128
 msgid ""
-"unknown orientation `%s' (valid orientations are `portrait' and `landscape')"
+"Stopping syntax file processing here to avoid a cascade of dependent command "
+"failures."
 msgstr ""
-"onbekende oriëntatie '%s' (geldige oriëntaties zijn 'portrait'en 'landscape')"
+"Stop syntaxbestand uitvoering hier om een cascade van afhankelijke "
+"opdrachtfouten te voorkomen."
 
-#: src/output/postscript.c:337
+#: src/ui/terminal/msg-ui.c:127
 #, c-format
-msgid "boolean value expected for %s"
-msgstr "boolean waarde verwacht voor %s"
+msgid "Notes (%d) exceed limit (%d).  Suppressing further notes."
+msgstr "Notities (%d) overschrijdt limiet (%d).  Onderdruk verdere notitties."
 
-#: src/output/postscript.c:350
+#: src/ui/terminal/msg-ui.c:135
 #, c-format
-msgid "positive integer value required for `%s'"
-msgstr "positieve integer waarde vereist voor '%s'"
+msgid "Warnings (%d) exceed limit (%d)."
+msgstr "Waarschuwingen (%d) overschrijden limiet (%d)."
 
-#: src/output/postscript.c:355
+#: src/ui/terminal/msg-ui.c:138
 #, c-format
-msgid "default font size must be at least 1 point (value of 1000 for key `%s')"
-msgstr ""
-"default font grootte moet tenminste 1 punt zijn (waarde 1000 voor sleutel '%"
-"s')"
+msgid "Errors (%d) exceed limit (%d)."
+msgstr "Fouten (%d) overschrijden limiet (%d)."
 
-#: src/output/postscript.c:1176
+#: src/ui/terminal/terminal.c:72
 #, c-format
-msgid "\"%s\": bad font specification"
-msgstr "\"%s\": slechte font specificatie"
+msgid "could not access definition for terminal `%s'"
+msgstr "kon definitie voor terminal '%s' niet benaderen"
 
-#: src/output/postscript.c:1184
+#: src/ui/terminal/terminal-opts.c:119
 #, c-format
-msgid "could not find AFM file \"%s\""
-msgstr "kon AFM bestand \"%s\" niet vinden"
+msgid "%s: output option missing `='"
+msgstr "%s: ontbrekende uitvoer-optie '='"
 
-#: src/output/postscript.c:1198
-#, c-format
-msgid "could not find font \"%s\""
-msgstr "kon font \"%s\" niet vinden"
+#: src/ui/terminal/terminal-opts.c:126
+#, fuzzy, c-format
+msgid "%s: output option specified more than once"
+msgstr "%s: uitvoer-optie meer dan 1 keer gespecificeerd"
 
-#: src/output/postscript.c:1207
-#, c-format
-msgid "could not find encoding \"%s\""
-msgstr "kon codering \"%s\" niet vinden"
+#: src/ui/gui/checkbox-treeview.c:92 src/language/stats/crosstabs.q:1213
+#: src/language/stats/crosstabs.q:1240 src/language/stats/crosstabs.q:1263
+#: src/language/stats/crosstabs.q:1287 src/language/stats/examine.q:1638
+msgid "Statistic"
+msgstr "Statistiek"
 
-#: src/output/postscript.c:1307
+#: src/ui/gui/comments-dialog.c:58
 #, c-format
-msgid "cannot open font file \"%s\""
-msgstr "kan font bestand \"%s\" niet openen"
+msgid "Column Number: %d"
+msgstr "Kolomnummer: %d"
 
-#: src/output/postscript.c:1348
-#, c-format
-msgid "reading font file \"%s\""
-msgstr "lezen font bestand \"%s\""
+#: src/ui/gui/crosstabs-dialog.c:41
+msgid "Chisq"
+msgstr "Chisq"
 
-#: src/output/postscript.c:1370
-#, c-format
-msgid "cannot open font encoding file \"%s\""
-msgstr "kan font codering bestand \"%s\" niet openen"
+#: src/ui/gui/crosstabs-dialog.c:42 src/language/stats/crosstabs.q:1774
+msgid "Phi"
+msgstr "Phi"
 
-#: src/output/postscript.c:1399
-msgid "invalid numeric format"
-msgstr "ongeldig numeriek formaat"
+#: src/ui/gui/crosstabs-dialog.c:43
+msgid "CC"
+msgstr "CC"
 
-#: src/output/postscript.c:1421
-#, c-format
-msgid "closing Postscript encoding \"%s\""
-msgstr "sluiten Postscript codering \"%s\""
-
-#: src/output/table.c:237
-#, c-format
-msgid "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
-msgstr ""
-
-#: src/output/table.c:308
-#, c-format
-msgid ""
-"bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
-msgstr ""
-
-#: src/output/chart.c:154
-#, c-format
-msgid "creating \"%s\""
-msgstr "aanmaken \"%s\""
-
-#: src/ui/source-init-opts.c:42
-msgid ""
-"set to `compatible' if you want output calculated from broken algorithms"
-msgstr ""
-"zet op 'compatible' als je uitvoer wilt die door 'broken algorithms' wordt "
-"berekend"
-
-#: src/ui/source-init-opts.c:43
-msgid "Append DIR to include path"
-msgstr "Voeg DIR toe aan include pad"
-
-#: src/ui/source-init-opts.c:44
-msgid "Clear include path"
-msgstr "Maak include pad leeg"
-
-#: src/ui/source-init-opts.c:45
-msgid "Disable execution of .pspp/rc at startup"
-msgstr "Schakel uitvoeren van .pspp/rc bij het opstarten uit"
-
-#: src/ui/source-init-opts.c:46
-msgid "Set configuration directory to DIR"
-msgstr "Zet configuratie directory op DIR"
-
-#: src/ui/source-init-opts.c:47
-msgid "Don't allow some unsafe operations"
-msgstr "Sta sommige onveilige operaties niet toe"
-
-#: src/ui/source-init-opts.c:48
-msgid "Set to `compatible' if you want only to accept SPSS compatible syntax"
-msgstr ""
-"Zet op 'compatible' als je alleen SPSS compatible syntax wilt accepteren"
-
-#: src/ui/source-init-opts.c:83
-msgid "Algorithm must be either \"compatible\" or \"enhanced\"."
-msgstr "Algoritme moet zijn \"compatible\" of \"enhanced\"."
-
-#: src/ui/source-init-opts.c:124
-msgid "Syntax must be either \"compatible\" or \"enhanced\"."
-msgstr "Syntax moet zijn \"compatible\" of \"enhanced\"."
-
-#: src/ui/terminal/main.c:115
-msgid "PSPP --- A program for statistical analysis"
-msgstr "PSPP -- Een programma voor statistische analyse"
-
-#: src/ui/terminal/main.c:116
-msgid "FILE1, FILE2 ... FILEn"
-msgstr ""
-
-#: src/ui/terminal/main.c:119 src/ui/terminal/terminal-opts.c:177
-msgid "Options affecting input and output locations:"
-msgstr "Opties die invoer en uitvoer locaties beinvloeden:"
-
-#: src/ui/terminal/main.c:122 src/ui/terminal/terminal-opts.c:178
-msgid "Diagnostic options:"
-msgstr "Diagnose opties:"
-
-#: src/ui/terminal/main.c:125 src/ui/gui/main.c:177
-msgid "Options affecting syntax and behavior:"
-msgstr "Opties die de syntax en het gedrag beinvloeden:"
-
-#: src/ui/terminal/main.c:156
-msgid ""
-"Stopping syntax file processing here to avoid a cascade of dependent command "
-"failures."
-msgstr ""
-"Stop syntax bestand uitvoering hier om een cascade van afhankelijke opdracht "
-"fouten te voorkomen."
-
-#: src/ui/terminal/msg-ui.c:67
-#, c-format
-msgid "Cannot open %s (%s). Writing errors to stdout instead.\n"
-msgstr "Kan %s (%s) niet openen. Schrijf fouten naar stdout inplaats.\n"
-
-#: src/ui/terminal/msg-ui.c:94
-msgid "Terminating execution of syntax file due to error."
-msgstr "Breek uitvoering van syntax bestand af vanwege fout."
-
-#: src/ui/terminal/msg-ui.c:96
-#, c-format
-msgid "Errors (%d) exceeds limit (%d)."
-msgstr "Fouten (%d) overschrijdt limiet (%d)."
-
-#: src/ui/terminal/msg-ui.c:99
-#, c-format
-msgid "Warnings (%d) exceed limit (%d)."
-msgstr "Waarschuwings (%d) overschrijdt limiet (%d)."
-
-#: src/ui/terminal/msg-ui.c:150
-msgid "error"
-msgstr "fout"
-
-#: src/ui/terminal/msg-ui.c:151
-msgid "warning"
-msgstr "waarschuwing"
-
-#: src/ui/terminal/terminal.c:72
-#, c-format
-msgid "could not access definition for terminal `%s'"
-msgstr "kon definitie voor terminal '%s' niet benaderen"
-
-#: src/ui/terminal/terminal-opts.c:41
-msgid "Increase diagnostic verbosity level"
-msgstr "Verhoog diagnose zichtbaarheids niveau"
-
-#: src/ui/terminal/terminal-opts.c:68
-msgid "Send error messages to FILE (appended)"
-msgstr "Stuur fout meldingen naar FILE (aanvullend)"
-
-#: src/ui/terminal/terminal-opts.c:71
-msgid "Select output driver DEVICE and disable defaults"
-msgstr "Selecteer uitvoer driver DEVICE en schakel defaults uit"
-
-#: src/ui/terminal/terminal-opts.c:74
-msgid "Print a list of known driver classes, then exit"
-msgstr "Print een lijst van bekende driver classes en eindig daarna"
-
-#: src/ui/terminal/terminal-opts.c:76
-msgid "Start an interactive session"
-msgstr "Start een interactieve sessie"
-
-#: src/ui/gui/about.c:64
-msgid "A program for the analysis of sampled data"
-msgstr ""
-
-#. TRANSLATORS: Use this string to list the people who have helped with
-#. translation to your language.
-#: src/ui/gui/about.c:74
-msgid "translator-credits"
-msgstr ""
-
-#: src/ui/gui/checkbox-treeview.c:92
-msgid "Statistic"
-msgstr ""
-
-#: src/ui/gui/comments-dialog.c:58
-#, c-format
-msgid "Column Number: %d"
-msgstr "Kolom Nummer: %d"
-
-#: src/ui/gui/crosstabs-dialog.c:40
-msgid "Chisq"
-msgstr ""
-
-#: src/ui/gui/crosstabs-dialog.c:41
-msgid "Phi"
-msgstr ""
-
-#: src/ui/gui/crosstabs-dialog.c:42
-msgid "CC"
-msgstr ""
-
-#: src/ui/gui/crosstabs-dialog.c:43
+#: src/ui/gui/crosstabs-dialog.c:44 src/language/stats/crosstabs.q:1912
 msgid "Lambda"
-msgstr ""
+msgstr "Lambda"
 
-#: src/ui/gui/crosstabs-dialog.c:44
+#: src/ui/gui/crosstabs-dialog.c:45
 msgid "UC"
-msgstr ""
+msgstr "UC"
 
-#: src/ui/gui/crosstabs-dialog.c:45
+#: src/ui/gui/crosstabs-dialog.c:46
 msgid "BTau"
-msgstr ""
+msgstr "BTau"
 
-#: src/ui/gui/crosstabs-dialog.c:46
+#: src/ui/gui/crosstabs-dialog.c:47
 msgid "CTau"
-msgstr ""
+msgstr "CTau"
 
-#: src/ui/gui/crosstabs-dialog.c:47
+#: src/ui/gui/crosstabs-dialog.c:48
 msgid "Risk"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:48
+#: src/ui/gui/crosstabs-dialog.c:49 src/language/stats/crosstabs.q:1779
 msgid "Gamma"
-msgstr ""
+msgstr "Gamma"
 
-#: src/ui/gui/crosstabs-dialog.c:49
+#: src/ui/gui/crosstabs-dialog.c:50
 msgid "D"
-msgstr ""
+msgstr "D"
 
-#: src/ui/gui/crosstabs-dialog.c:50
+#: src/ui/gui/crosstabs-dialog.c:51 src/language/stats/crosstabs.q:1782
 msgid "Kappa"
-msgstr ""
+msgstr "Kappa"
 
-#: src/ui/gui/crosstabs-dialog.c:51
+#: src/ui/gui/crosstabs-dialog.c:52 src/language/stats/crosstabs.q:1916
 msgid "Eta"
-msgstr ""
+msgstr "Eta"
 
-#: src/ui/gui/crosstabs-dialog.c:52
+#: src/ui/gui/crosstabs-dialog.c:53
 msgid "Corr"
-msgstr ""
+msgstr "Corr"
 
-#: src/ui/gui/crosstabs-dialog.c:53 src/ui/gui/crosstabs-dialog.c:64
-#: src/ui/gui/crosstabs-dialog.c:99 src/ui/gui/crosstabs-dialog.c:107
+#: src/ui/gui/crosstabs-dialog.c:54 src/ui/gui/crosstabs-dialog.c:65
+#: src/ui/gui/crosstabs-dialog.c:100 src/ui/gui/crosstabs-dialog.c:108
 #: src/ui/gui/psppire-var-store.c:612 src/ui/gui/var-display.c:16
-#: src/ui/gui/variable-info-dialog.c:40
+#: src/ui/gui/variable-info-dialog.c:41
 msgid "None"
 msgstr "Geen"
 
-#: src/ui/gui/crosstabs-dialog.c:56
+#: src/ui/gui/crosstabs-dialog.c:57
 msgid "Count"
 msgstr "Aantal"
 
-#: src/ui/gui/crosstabs-dialog.c:57
+#: src/ui/gui/crosstabs-dialog.c:58
 msgid "Row"
 msgstr "Rij"
 
-#: src/ui/gui/crosstabs-dialog.c:58
+#: src/ui/gui/crosstabs-dialog.c:59
 msgid "Column"
 msgstr "Kolom"
 
-#: src/ui/gui/crosstabs-dialog.c:60
+#: src/ui/gui/crosstabs-dialog.c:61
 msgid "Expected"
 msgstr "Verwacht"
 
-#: src/ui/gui/crosstabs-dialog.c:62
+#: src/ui/gui/crosstabs-dialog.c:63
 msgid "Std. Residual"
 msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:63
+#: src/ui/gui/crosstabs-dialog.c:64
 msgid "Adjusted Std. Residual"
 msgstr ""
 
-#: src/ui/gui/customentry.c:334
-msgid "Style of bevel around the custom entry button"
-msgstr ""
-
-#: src/ui/gui/descriptives-dialog.c:40 src/ui/gui/frequencies-dialog.c:41
+#: src/ui/gui/descriptives-dialog.c:41 src/ui/gui/frequencies-dialog.c:42
 msgid "Standard deviation"
-msgstr "Standaard deviatie"
+msgstr "Standaarddeviatie"
 
-#: src/ui/gui/descriptives-dialog.c:45
+#: src/ui/gui/descriptives-dialog.c:46
 msgid "Standard error"
-msgstr "Standaard fout"
+msgstr "Standaardfout"
 
-#: src/ui/gui/find-dialog.c:652
+#: src/ui/gui/find-dialog.c:649
 #, c-format
 msgid "Bad regular expression: %s"
-msgstr "Foutieve regulaire expressie: %s"
+msgstr "Onjuiste regulaire expressie: %s"
+
+#: src/ui/gui/factor-dialog.c:344
+#, c-format
+msgid "Eigenvalues over %4.2f times the mean eigenvalue"
+msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:44
+#: src/ui/gui/frequencies-dialog.c:45
 msgid "Standard error of the mean"
 msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:47
+#: src/ui/gui/frequencies-dialog.c:48
 msgid "Standard error of the skewness"
 msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:49
+#: src/ui/gui/frequencies-dialog.c:50 src/language/stats/frequencies.q:108
 msgid "Mode"
-msgstr ""
+msgstr "Modus"
 
-#: src/ui/gui/frequencies-dialog.c:51
+#: src/ui/gui/frequencies-dialog.c:52
 msgid "Standard error of the kurtosis"
 msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:52
+#: src/ui/gui/frequencies-dialog.c:53 src/language/stats/examine.q:1469
+#: src/language/stats/frequencies.q:107
 msgid "Median"
-msgstr ""
+msgstr "Mediaan"
 
 #: src/ui/gui/helper.c:197
 msgid "Sorry. The help system hasn't yet been implemented."
 msgstr "Sorry. Het help systeem is nog niet geïmplementeerd."
 
-#: src/ui/gui/helper.c:242
-#, c-format
-msgid "Cannot open reference manual: %s"
-msgstr "Kan de handleiding niet openen: %s"
-
-#: src/ui/gui/main.c:43
-msgid "Don't show the splash screen"
-msgstr "Toon het splash scherm niet"
-
-#: src/ui/gui/main.c:173
-msgid "PSPPIRE --- A user interface for PSPP"
-msgstr "PSPPIRE --- Een gebruikers interface voor PSPP"
-
-#: src/ui/gui/main.c:175
-msgid "Miscellaneous options:"
-msgstr "Diverse opties:"
-
-#: src/ui/gui/message-dialog.c:103
-msgid "data file error"
-msgstr "data bestand fout"
-
-#: src/ui/gui/message-dialog.c:108
-msgid "PSPP error"
-msgstr "PSPP fout"
-
-#: src/ui/gui/message-dialog.c:116
-msgid "syntax warning"
-msgstr "syntax waarschuwing"
-
-#: src/ui/gui/message-dialog.c:120
-msgid "data file warning"
-msgstr "data bestand waarschuwing"
-
-#: src/ui/gui/message-dialog.c:125
-msgid "PSPP warning"
-msgstr "PSPP waarschuwing"
-
-#: src/ui/gui/message-dialog.c:134
-msgid "syntax information"
-msgstr "syntax informatie"
-
-#: src/ui/gui/message-dialog.c:138
-msgid "data file information"
-msgstr "data bestand informatie"
-
-#: src/ui/gui/message-dialog.c:143
-msgid "PSPP information"
-msgstr "PSPP informatie"
+#: src/ui/gui/help-menu.c:67
+msgid "A program for the analysis of sampled data"
+msgstr "Een programma voor de analyse van bemonsterde gegevens"
 
-#: src/ui/gui/message-dialog.c:222
-msgid "The PSPP processing engine reported the following message:"
-msgid_plural "The PSPP processing engine reported the following messages:"
-msgstr[0] "De PSPP processor rapporteert de volgende melding:"
-msgstr[1] "De PSPP processor rapporteert de volgende meldingen:"
+#. TRANSLATORS: Use this string to list the people who have helped with
+#. translation to your language.
+#: src/ui/gui/help-menu.c:77
+msgid "translator-credits"
+msgstr "Harry Thijssen"
 
-#: src/ui/gui/message-dialog.c:229
+#: src/ui/gui/help-menu.c:98
 #, c-format
-msgid "The PSPP processing engine reported %d message."
-msgid_plural "The PSPP processing engine reported %d messages."
-msgstr[0] "De PSPP processor rapporteert %d melding."
-msgstr[1] "De PSPP processor rapporteert %d meldingen."
+msgid ""
+"Cannot open reference manual: %s.  The PSPP user manual is also available at "
+"http://www.gnu.org/software/pspp/documentation.html"
+msgstr ""
+"Kan de handleiding niet openen: %s.  De PSPP gebruikers handleiding is ook "
+"beschikbaar op http://www.gnu.org/software/pspp/documentation.html"
 
-#: src/ui/gui/message-dialog.c:236
-#, c-format
-msgid "%d of these messages are displayed below."
-msgid_plural "%d of these messages are displayed below."
-msgstr[0] "%d van deze meldingen worden hier onder getoond."
-msgstr[1] "%d van deze meldingen worden hier onder getoond."
+#: src/ui/gui/help-menu.c:117
+msgid "_Help"
+msgstr "_Hulp"
+
+#: src/ui/gui/help-menu.c:124
+msgid "_Reference Manual"
+msgstr "_Handleiding"
 
 #: src/ui/gui/missing-val-dialog.c:113 src/ui/gui/missing-val-dialog.c:167
 msgid "Incorrect value for variable type"
-msgstr "Foutieve waarde voor variabele type"
+msgstr "Onjuiste waarde voor variabelentype"
 
 #: src/ui/gui/missing-val-dialog.c:134 src/ui/gui/missing-val-dialog.c:143
 msgid "Incorrect range specification"
-msgstr "Foutieve range specificatie"
+msgstr "Onjuiste bereikspecificatie"
 
-#: src/ui/gui/oneway-anova-dialog.c:331
+#: src/ui/gui/oneway-anova-dialog.c:313
 #, c-format
 msgid "Contrast %d of %d"
 msgstr ""
 
-#: src/ui/gui/psppire.c:247
+#: src/ui/gui/psppire.c:224
 msgid "_Reset"
-msgstr "_Standaard"
+msgstr "_Herstel"
 
-#: src/ui/gui/psppire.c:248
+#: src/ui/gui/psppire.c:225
 msgid "_Select"
 msgstr "_Selecteer"
 
 #: src/ui/gui/psppire-data-editor.c:951
 msgid "Data View"
-msgstr "Data Weergave"
+msgstr "Gegevensweergave"
 
 #: src/ui/gui/psppire-data-editor.c:954
 msgid "Variable View"
-msgstr "Variabele Weergave"
+msgstr "Variabelenweergave"
 
 #: src/ui/gui/psppire-data-store.c:744
 msgid "var"
-msgstr ""
-
-#: src/ui/gui/psppire-data-store.c:755 src/ui/gui/psppire-var-store.c:699
-#: src/ui/gui/psppire-var-store.c:709 src/ui/gui/psppire-var-store.c:719
-#: src/ui/gui/psppire-var-store.c:825
-#, c-format
-msgid "%d"
-msgstr ""
+msgstr "var"
 
-#: src/ui/gui/psppire-data-window.c:213
+#: src/ui/gui/psppire-data-window.c:212
 msgid "Transformations Pending"
-msgstr "Transformaties Uitstaand"
+msgstr "Transformaties uitstaand"
 
-#: src/ui/gui/psppire-data-window.c:229
+#: src/ui/gui/psppire-data-window.c:228
 msgid "Filter off"
 msgstr "Filter uit"
 
-#: src/ui/gui/psppire-data-window.c:243
+#: src/ui/gui/psppire-data-window.c:242
 #, c-format
 msgid "Filter by %s"
 msgstr "Filter op %s"
 
-#: src/ui/gui/psppire-data-window.c:264
+#: src/ui/gui/psppire-data-window.c:263
 msgid "No Split"
-msgstr "Geen Splits"
+msgstr "Geen splits"
 
-#: src/ui/gui/psppire-data-window.c:273
+#: src/ui/gui/psppire-data-window.c:272
 msgid "Split by "
 msgstr "Splits op "
 
-#: src/ui/gui/psppire-data-window.c:301
+#: src/ui/gui/psppire-data-window.c:300
 msgid "Weights off"
 msgstr "Weging uit"
 
-#: src/ui/gui/psppire-data-window.c:315
+#: src/ui/gui/psppire-data-window.c:314
 #, c-format
 msgid "Weight by %s"
 msgstr "Weeg op %s"
 
-#: src/ui/gui/psppire-data-window.c:383 src/ui/gui/data-editor.glade:702
+#: src/ui/gui/psppire-data-window.c:382
 msgid "Open"
-msgstr ""
+msgstr "Open"
+
+#: src/ui/gui/psppire-data-window.c:392
+msgid "Data and Syntax Files"
+msgstr "Gegevens- en Syntax-bestanden"
 
-#: src/ui/gui/psppire-data-window.c:391 src/ui/gui/psppire-data-window.c:593
+#: src/ui/gui/psppire-data-window.c:402 src/ui/gui/psppire-data-window.c:611
 msgid "System Files (*.sav)"
-msgstr "Systeem Bestand (*.sav)"
+msgstr "Systeembestanden (*.sav)"
 
-#: src/ui/gui/psppire-data-window.c:397 src/ui/gui/psppire-data-window.c:599
+#: src/ui/gui/psppire-data-window.c:408 src/ui/gui/psppire-data-window.c:617
 msgid "Portable Files (*.por) "
-msgstr "Overdraagbaar (Portable) Bestand (*.por)"
+msgstr "Overdraagbaar (Portable) bestanden (*.por)"
+
+#: src/ui/gui/psppire-data-window.c:414 src/ui/gui/psppire-syntax-window.c:292
+msgid "Syntax Files (*.sps) "
+msgstr "Syntaxbestanden (*.sps)"
 
-#: src/ui/gui/psppire-data-window.c:403 src/ui/gui/psppire-data-window.c:605
+#: src/ui/gui/psppire-data-window.c:420 src/ui/gui/psppire-data-window.c:623
 #: src/ui/gui/psppire-syntax-window.c:298
-#: src/ui/gui/psppire-syntax-window.c:385
 msgid "All Files"
 msgstr "Alle bestanden"
 
-#: src/ui/gui/psppire-data-window.c:585 src/ui/gui/data-editor.glade:712
+#: src/ui/gui/psppire-data-window.c:603
 msgid "Save"
 msgstr "Opslaan"
 
-#: src/ui/gui/psppire-data-window.c:613
-msgid "System File"
-msgstr "Systeem Bestand"
-
-#: src/ui/gui/psppire-data-window.c:618
+#: src/ui/gui/psppire-data-window.c:636
 msgid "Portable File"
-msgstr "Overdraagbaar (Portable) Bestand"
+msgstr "Overdraagbaar bestand"
 
-#: src/ui/gui/psppire-data-window.c:768
+#: src/ui/gui/psppire-data-window.c:773
 msgid "Font Selection"
-msgstr "Font Selectie"
-
-#: src/ui/gui/psppire-data-window.c:836
-msgid "Sort Ascending"
-msgstr "Sorteer oplopend"
-
-#: src/ui/gui/psppire-data-window.c:842
-msgid "Sort Descending"
-msgstr "Sorteer aflopend"
-
-#: src/ui/gui/psppire-data-window.c:847 src/ui/gui/psppire-data-window.c:937
-#: src/ui/gui/data-editor.glade:174 src/ui/gui/data-editor.glade:843
-msgid "Insert Variable"
-msgstr "Invoegen Variabele"
-
-#: src/ui/gui/psppire-data-window.c:850 src/ui/gui/psppire-data-window.c:904
-#: src/ui/gui/psppire-data-window.c:940 src/ui/gui/psppire-data-window.c:1307
-#: src/ui/gui/psppire-data-window.c:1325
-msgid "Clear"
-msgstr "Ruimop"
-
-#: src/ui/gui/psppire-data-window.c:901 src/ui/gui/data-editor.glade:831
-msgid "Insert Case"
-msgstr "Invoegen Case"
-
-#: src/ui/gui/psppire-data-window.c:1185
-msgid "Open a data file"
-msgstr "Open een data bestand"
-
-#: src/ui/gui/psppire-data-window.c:1203
-msgid "New data file"
-msgstr "Nieuw data bestand"
-
-#: src/ui/gui/psppire-data-window.c:1218
-msgid "Import text data file"
-msgstr "Importeer text data bestand"
-
-#: src/ui/gui/psppire-data-window.c:1234 src/ui/gui/psppire-data-window.c:1250
-msgid "Save data to file"
-msgstr "Data opslaan als bestand"
-
-#: src/ui/gui/psppire-data-window.c:1288
-msgid "Show/hide value labels"
-msgstr "Show/verberg waarde labels"
-
-#: src/ui/gui/psppire-data-window.c:1308
-msgid "Delete the cases at the selected position(s)"
-msgstr "Verwijder de cases op de geselecteerde positie(s)"
-
-#: src/ui/gui/psppire-data-window.c:1326
-msgid "Delete the variables at the selected position(s)"
-msgstr "Verwijder de variabele op de geselecteerde positie(s)"
-
-#: src/ui/gui/psppire-data-window.c:1344
-msgid "Create a new variable at the current position"
-msgstr "Creëer een nieuwe variabele op de huidige positie"
-
-#: src/ui/gui/psppire-data-window.c:1359
-msgid "Create a new case at the current position"
-msgstr "Creëer een nieuwe case op de huidige positie"
-
-#: src/ui/gui/psppire-data-window.c:1375
-msgid "Jump to a Case in the Data Sheet"
-msgstr "Spring naar een Case in het Data Blad"
-
-#: src/ui/gui/psppire-data-window.c:1391
-msgid "Weight cases by variable"
-msgstr "Weeg cases per variabele"
-
-#: src/ui/gui/psppire-data-window.c:1405
-msgid "Transpose the cases with the variables"
-msgstr "Herschik de cases met de variabelen"
-
-#: src/ui/gui/psppire-data-window.c:1419
-msgid "Split the active file"
-msgstr "Splits het actieve bestand"
-
-#: src/ui/gui/psppire-data-window.c:1434
-msgid "Sort cases in the active file"
-msgstr "Sorteer cases in het actieve bestand"
-
-#: src/ui/gui/psppire-data-window.c:1448
-msgid "Select cases from the active file"
-msgstr "Selecteer cases van het actieve bestand"
-
-#: src/ui/gui/psppire-data-window.c:1462
-msgid "Compute new values for a variable"
-msgstr "Bereken nieuwe waardes voor een variabele"
-
-#: src/ui/gui/psppire-data-window.c:1476
-msgid "Perform one way analysis of variance"
-msgstr ""
-
-#: src/ui/gui/psppire-data-window.c:1491
-msgid "Calculate T Test for samples from independent groups"
-msgstr ""
-
-#: src/ui/gui/psppire-data-window.c:1505
-msgid "Calculate T Test for paired samples"
-msgstr ""
-
-#: src/ui/gui/psppire-data-window.c:1519
-msgid "Calculate T Test for sample from a single distribution"
-msgstr ""
-
-#: src/ui/gui/psppire-data-window.c:1534
-msgid "Commentary text for the data file"
-msgstr "Commentaar tekst voor het data bestand"
-
-#: src/ui/gui/psppire-data-window.c:1560
-msgid "Rank Cases"
-msgstr "Rangschik Cases"
-
-#: src/ui/gui/psppire-data-window.c:1574
-msgid "Recode values into the same variables"
-msgstr "Hercodeer waardes in dezelfde Variabelen"
-
-#: src/ui/gui/psppire-data-window.c:1588
-msgid "Recode values into different variables"
-msgstr "Hercodeer waardes in andere Variabelen"
-
-#: src/ui/gui/psppire-data-window.c:1602
-msgid "Jump to variable"
-msgstr "Spring naar Variabele"
+msgstr "Font selectie"
 
-#: src/ui/gui/psppire-data-window.c:1615
-msgid "Calculate descriptive statistics (mean, variance, ...)"
-msgstr "Bereken descriptive statistieken (mean, variance, ...)"
+#: src/ui/gui/psppire-data-window.c:1261
+msgid "Data Editor"
+msgstr "Gegevensbewerker"
 
-#: src/ui/gui/psppire-data-window.c:1629
-msgid "Generate frequency statistics"
-msgstr "Genereer frequentie statistieken"
+#: src/ui/gui/psppire-output-window.c:458
+msgid "Export Output"
+msgstr "Exporteer Uitvoer"
 
-#: src/ui/gui/psppire-data-window.c:1643
-msgid "Generate crosstabulations"
-msgstr ""
+#: src/ui/gui/psppire-output-window.c:466
+msgid "PDF Files (*.pdf)"
+msgstr "PDF-bestanden (*.pdf)"
 
-#: src/ui/gui/psppire-data-window.c:1658
-msgid "Examine Data by Factors"
-msgstr ""
+#: src/ui/gui/psppire-output-window.c:467
+msgid "HTML Files (*.html)"
+msgstr "HTML-bestanden (*.html)"
 
-#: src/ui/gui/psppire-data-window.c:1672
-msgid "Estimate parameters of the linear model"
-msgstr ""
+#: src/ui/gui/psppire-output-window.c:468
+msgid "OpenDocument Files (*.odt)"
+msgstr "OpenDocument-bestanden (*.odt)"
 
-#: src/ui/gui/psppire-data-window.c:1686 src/ui/gui/reliability.glade:7
-msgid "Reliability Analysis"
-msgstr ""
+#: src/ui/gui/psppire-output-window.c:469
+msgid "Text Files (*.txt)"
+msgstr "Textbestanden (*.txt)"
 
-#: src/ui/gui/psppire-data-window.c:1849
-msgid "Split the window vertically and horizontally"
-msgstr "Splits het venster verticaal en horizontaal"
+#: src/ui/gui/psppire-output-window.c:470
+msgid "PostScript Files (*.ps)"
+msgstr "PostScript-bestanden (*.ps)"
 
-#: src/ui/gui/psppire-data-window.c:1891
-msgid "Data Editor"
-msgstr ""
+#: src/ui/gui/psppire-output-window.c:471
+msgid "Comma-Separated Value Files (*.csv)"
+msgstr "Komma-Gescheiden-Waarde-bestanden (*.csv)"
 
-#: src/ui/gui/psppire-output-window.c:269
+#: src/ui/gui/psppire-output-window.c:605
 msgid "Output Viewer"
 msgstr "Uitvoer Viewer"
 
 #: src/ui/gui/psppire-syntax-window.c:265
 #, c-format
 msgid "Saved file \"%s\""
-msgstr "Opgeslagen bestand \"%s\""
+msgstr "Opslaan bestand \"%s\""
 
 #: src/ui/gui/psppire-syntax-window.c:284
 msgid "Save Syntax"
 msgstr "Sla Syntax op"
 
-#: src/ui/gui/psppire-syntax-window.c:292
-#: src/ui/gui/psppire-syntax-window.c:379
-msgid "Syntax Files (*.sps) "
-msgstr "Syntax Bestand (*.sps)"
-
-#: src/ui/gui/psppire-syntax-window.c:371
-msgid "Open Syntax"
-msgstr ""
-
-#: src/ui/gui/psppire-syntax-window.c:551
+#: src/ui/gui/psppire-syntax-window.c:496
 msgid "Syntax Editor"
-msgstr ""
+msgstr "Syntaxbewerker"
 
-#: src/ui/gui/psppire-syntax-window.c:565
+#: src/ui/gui/psppire-syntax-window.c:510
 #, c-format
 msgid "Cannot load syntax file '%s'"
-msgstr "Kan syntax bestand \"%s\" niet laden"
-
-#: src/ui/gui/psppire-var-sheet.c:533 src/ui/gui/psppire-var-store.c:832
-msgid "Name"
-msgstr "Naam"
+msgstr "Kan syntaxbestand '%s' niet laden"
 
-#: src/ui/gui/psppire-var-sheet.c:534 src/ui/gui/psppire-var-store.c:833
-#: src/ui/gui/psppire.glade:2099
+#: src/ui/gui/psppire-var-sheet.c:535 src/ui/gui/psppire-var-store.c:833
+#: src/language/stats/crosstabs.q:1288 src/ui/gui/psppire.ui:2055
 msgid "Type"
-msgstr ""
+msgstr "Type"
 
-#: src/ui/gui/psppire-var-sheet.c:535 src/ui/gui/psppire-var-store.c:834
-#: src/ui/gui/psppire.glade:2020
+#: src/ui/gui/psppire-var-sheet.c:536 src/ui/gui/psppire-var-store.c:834
+#: src/ui/gui/psppire.ui:1974
 msgid "Width"
 msgstr "Breedte"
 
-#: src/ui/gui/psppire-var-sheet.c:536 src/ui/gui/psppire-var-store.c:835
+#: src/ui/gui/psppire-var-sheet.c:537 src/ui/gui/psppire-var-store.c:835
 msgid "Decimals"
 msgstr "Decimalen"
 
-#: src/ui/gui/psppire-var-sheet.c:538 src/ui/gui/psppire-var-store.c:837
+#: src/ui/gui/psppire-var-sheet.c:539 src/ui/gui/psppire-var-store.c:837
 msgid "Values"
 msgstr "Waardes"
 
-#: src/ui/gui/psppire-var-sheet.c:539 src/ui/gui/psppire-var-store.c:838
+#: src/ui/gui/psppire-var-sheet.c:540 src/ui/gui/psppire-var-store.c:838
+#: src/language/stats/crosstabs.q:822 src/language/stats/examine.q:1104
+#: src/language/stats/frequencies.q:864 src/language/stats/frequencies.q:1036
 msgid "Missing"
 msgstr "Ontbrekend"
 
-#: src/ui/gui/psppire-var-sheet.c:541 src/ui/gui/psppire-var-store.c:840
+#: src/ui/gui/psppire-var-sheet.c:542 src/ui/gui/psppire-var-store.c:840
 msgid "Align"
 msgstr "Uitlijnen"
 
-#: src/ui/gui/psppire-var-sheet.c:542 src/ui/gui/psppire-var-store.c:841
+#: src/ui/gui/psppire-var-sheet.c:543 src/ui/gui/psppire-var-store.c:841
 msgid "Measure"
 msgstr "Meting"
 
-#: src/ui/gui/psppire-var-store.c:622 src/ui/gui/var-sheet-dialogs.glade:43
+#: src/ui/gui/psppire-var-store.c:622 src/ui/gui/var-sheet-dialogs.ui:43
 msgid "Comma"
 msgstr "Komma"
 
-#: src/ui/gui/psppire-var-store.c:623 src/ui/gui/var-sheet-dialogs.glade:59
+#: src/ui/gui/psppire-var-store.c:623 src/ui/gui/var-sheet-dialogs.ui:59
 msgid "Dot"
 msgstr "Punt"
 
@@ -4624,11 +4535,11 @@ msgstr "Punt"
 msgid "Scientific"
 msgstr "Wetenschappelijk"
 
-#: src/ui/gui/psppire-var-store.c:625 src/ui/gui/var-sheet-dialogs.glade:91
+#: src/ui/gui/psppire-var-store.c:625 src/ui/gui/var-sheet-dialogs.ui:91
 msgid "Date"
 msgstr "Datum"
 
-#: src/ui/gui/psppire-var-store.c:626 src/ui/gui/var-sheet-dialogs.glade:107
+#: src/ui/gui/psppire-var-store.c:626 src/ui/gui/var-sheet-dialogs.ui:107
 msgid "Dollar"
 msgstr "Euro"
 
@@ -4639,65 +4550,65 @@ msgstr "Aangepast"
 #: src/ui/gui/psppire-window.c:97
 #, c-format
 msgid "%s %s PSPPIRE %s"
-msgstr ""
+msgstr "%s %s PSPPIRE %s"
 
-#: src/ui/gui/psppire-window.c:480
+#: src/ui/gui/psppire-window.c:468
 #, c-format
 msgid "Save the changes to \"%s\" before closing?"
-msgstr "De veranderingen van \"%s\" opslaan voor afsluiten?"
+msgstr "Opslaan van de aanpassingen in \"%s\" voor het afsluiten?"
 
-#: src/ui/gui/psppire-window.c:487
+#: src/ui/gui/psppire-window.c:475
 #, c-format
 msgid ""
 "If you don't save, changes from the last %ld seconds will be permanently "
 "lost."
 msgstr ""
-"Als je niet opslaat gaan de aanpassingen van de laatste %ld seconden "
-"definitief verloren."
+"Als u niet opslaat zullen de aanpassingen van de laatste %ld seconden "
+"permanent verloren gaan."
 
-#: src/ui/gui/psppire-window.c:491
+#: src/ui/gui/psppire-window.c:479
 msgid "Close _without saving"
 msgstr "Sluit _zonder opslaan"
 
-#: src/ui/gui/recode-dialog.c:881
+#: src/ui/gui/recode-dialog.c:911
 msgid "Recode into Different Variables"
 msgstr "Hercodeer in Andere Variabelen"
 
-#: src/ui/gui/recode-dialog.c:884
+#: src/ui/gui/recode-dialog.c:914 src/ui/gui/recode.ui:692
 msgid "Recode into Same Variables"
 msgstr "Hercodeer in Zelfde Variabelen"
 
-#: src/ui/gui/recode-dialog.c:912 src/ui/gui/recode-dialog.c:1014
-msgid "Old"
-msgstr "Oud"
-
-#: src/ui/gui/recode-dialog.c:927 src/ui/gui/recode-dialog.c:1022
+#: src/ui/gui/recode-dialog.c:929 src/ui/gui/recode-dialog.c:1025
 msgid "New"
 msgstr "Nieuw"
 
-#: src/ui/gui/recode-dialog.c:1270
+#: src/ui/gui/recode-dialog.c:944 src/ui/gui/recode-dialog.c:1017
+msgid "Old"
+msgstr "Oud"
+
+#: src/ui/gui/recode-dialog.c:1274
 msgid "Recode into Different Variables: Old and New Values "
 msgstr "Hercodeer in Andere Variabelen: Oude en Nieuwe Waardes "
 
-#: src/ui/gui/recode-dialog.c:1271
+#: src/ui/gui/recode-dialog.c:1275
 msgid "Recode into Same Variables: Old and New Values"
 msgstr "Hercodeer in Zelfde Variabelen: Oude en Nieuwe Waardes "
 
-#: src/ui/gui/regression-dialog.c:41
+#: src/ui/gui/regression-dialog.c:42
 msgid "Coeff"
-msgstr ""
+msgstr "Coeff"
 
-#: src/ui/gui/regression-dialog.c:42
+#: src/ui/gui/regression-dialog.c:43 src/language/stats/regression.q:155
 msgid "R"
-msgstr ""
+msgstr "R"
 
-#: src/ui/gui/regression-dialog.c:43
+#: src/ui/gui/regression-dialog.c:44
 msgid "Anova"
-msgstr ""
+msgstr "Anova"
 
-#: src/ui/gui/regression-dialog.c:44
+#: src/ui/gui/regression-dialog.c:45
 msgid "Bcov"
-msgstr ""
+msgstr "Bcov"
 
 #: src/ui/gui/select-cases-dialog.c:82
 #, c-format
@@ -4731,7 +4642,7 @@ msgid ""
 "therefore appears not to be a text file."
 msgstr ""
 "Lezen van \"%s\" mislukt omdat het een regel bevat die meer dan %d bytes "
-"lang is en daarom is het geen tekst bestand."
+"lang is en daarom is het geen tekstbestand."
 
 #: src/ui/gui/text-data-import-dialog.c:494
 #, c-format
@@ -4740,11 +4651,11 @@ msgstr "\"%s\" is leeg."
 
 #: src/ui/gui/text-data-import-dialog.c:539
 msgid "Import Delimited Text Data"
-msgstr "Importeer Delimited Text Data"
+msgstr "Importeer Gescheiden Tekstgegevens"
 
 #: src/ui/gui/text-data-import-dialog.c:590
 msgid "Importing Delimited Text Data"
-msgstr "Importeren Delimited Text Data"
+msgstr "Importeren Gescheiden Tekstgegevens"
 
 #: src/ui/gui/text-data-import-dialog.c:749
 msgid ""
@@ -4753,23 +4664,23 @@ msgid ""
 "by tabs, commas, or other delimiters.\n"
 "\n"
 msgstr ""
-"De assistent zal je begeleiden door het proces van het importeren van data "
-"in PSPP van een tekst bestand met 1 regel per case, waarin velden zijn "
-"gescheiden door tabs, kommas of andere scheidingstekens.\n"
+"De assistent zal je begeleiden door het proces van het importeren van "
+"gegevens in PSPP van een tekstbestand met 1 regel per case, waarin velden "
+"zijn gescheiden door tabs, komma's of andere scheidingstekens.\n"
 
 #: src/ui/gui/text-data-import-dialog.c:755
 #, c-format
 msgid "The selected file contains %zu line of text.  "
 msgid_plural "The selected file contains %zu lines of text.  "
-msgstr[0] "Het geselecteerde bestand bevat %zu regel text.  "
-msgstr[1] "Het geselecteerde bestand bevat %zu regels text. "
+msgstr[0] "Het geselecteerde bestand bevat %zu regel tekst.  "
+msgstr[1] "Het geselecteerde bestand bevat %zu regels tekst. "
 
 #: src/ui/gui/text-data-import-dialog.c:763
 #, c-format
 msgid "The selected file contains approximately %lu line of text.  "
 msgid_plural "The selected file contains approximately %lu lines of text.  "
-msgstr[0] "Het geselecteerde bestand bevat ongeveer %lu regel text. "
-msgstr[1] "Het geselecteerde bestand bevat ongeveer %lu regels text. "
+msgstr[0] "Het geselecteerde bestand bevat ongeveer %lu regel tekst. "
+msgstr[1] "Het geselecteerde bestand bevat ongeveer %lu regels tekst. "
 
 #: src/ui/gui/text-data-import-dialog.c:769
 #, c-format
@@ -4780,11 +4691,11 @@ msgid_plural ""
 "Only the first %zu lines of the file will be shown for preview purposes in "
 "the following screens.  "
 msgstr[0] ""
-"Alleen de eerste %zu regel van het bestand worden getoond voor preview "
-"doeleinden in de volgende schermen."
+"Alleen de eerste %zu regel van het bestand worden getoond voor voorbeeld "
+"doeleinden in de volgende schermen.  "
 msgstr[1] ""
-"Alleen de eerste %zu regels van het bestand worden getoond voor preview "
-"doeleinden in de volgende schermen."
+"Alleen de eerste %zu regels van het bestand worden getoond voor voorbeeld "
+"doeleinden in de volgende schermen.  "
 
 #: src/ui/gui/text-data-import-dialog.c:776
 msgid "You may choose below how much of the file should actually be imported."
@@ -4796,1020 +4707,2102 @@ msgstr ""
 #: src/ui/gui/text-data-import-dialog.c:1768
 msgid "This input line has too few separators to fill in this field."
 msgstr ""
-"Deze invoer regel heeft te weinig scheidingstekens om dit veld te vullen."
+"Deze invoerregel heeft te weinig scheidingstekens om dit veld te vullen."
 
 #: src/ui/gui/text-data-import-dialog.c:1759
 #, c-format
 msgid "Field content \"%.*s\" cannot be parsed in format %s."
-msgstr "Veld inhoud \"%.*s\" kan niet ontleed worden in formaat %s."
+msgstr "Veldinhoud \"%.*s\" kan niet opgedeeld worden in opmaak %s."
 
 #: src/ui/gui/t-test-options.c:60
 #, c-format
 msgid "Confidence Interval: %2d %%"
-msgstr ""
-
-#: src/ui/gui/t-test-paired-samples.c:226
-msgid "Var 1"
-msgstr ""
+msgstr "Betrouwbaarheidsinterval: %2d %%"
 
-#: src/ui/gui/t-test-paired-samples.c:227
-msgid "Var 2"
-msgstr ""
-
-#: src/ui/gui/variable-info-dialog.c:76
+#: src/ui/gui/variable-info-dialog.c:77
 #, c-format
 msgid "Label: %s\n"
-msgstr ""
+msgstr "Label: %s\n"
 
-#: src/ui/gui/variable-info-dialog.c:83
+#: src/ui/gui/variable-info-dialog.c:84
 #, c-format
 msgid "Type: %s\n"
-msgstr ""
+msgstr "Type: %s\n"
 
-#: src/ui/gui/variable-info-dialog.c:87
+#: src/ui/gui/variable-info-dialog.c:88
 #, c-format
 msgid "Missing Values: %s\n"
-msgstr "Ontbrekende Waardes: %s\n"
+msgstr "Ontbrekende-Waardes: %s\n"
 
-#: src/ui/gui/variable-info-dialog.c:92
+#: src/ui/gui/variable-info-dialog.c:93
 #, c-format
 msgid "Measurement Level: %s\n"
 msgstr "Meetniveau: %s\n"
 
-#: src/ui/gui/variable-info-dialog.c:107
+#: src/ui/gui/variable-info-dialog.c:106
 msgid "Value Labels:\n"
-msgstr "Waarde Labels:\n"
+msgstr "Waardelabels:\n"
 
-#: src/ui/gui/variable-info-dialog.c:117
+#: src/ui/gui/variable-info-dialog.c:116
 #, c-format
 msgid "%s %s\n"
-msgstr ""
+msgstr "%s %s\n"
 
-#: src/ui/gui/weight-cases-dialog.c:79 src/ui/gui/psppire.glade:47
-#: src/ui/gui/psppire.glade:130
+#: src/ui/gui/weight-cases-dialog.c:81 src/ui/gui/psppire.ui:52
+#: src/ui/gui/psppire.ui:155
 msgid "Do not weight cases"
 msgstr "Weeg cases niet"
 
-#: src/ui/gui/weight-cases-dialog.c:85
+#: src/ui/gui/weight-cases-dialog.c:87
 #, c-format
 msgid "Weight cases by %s"
-msgstr "Weeg cases by %s"
+msgstr "Weeg cases per %s"
 
-#: src/ui/gui/crosstabs.glade:50
-msgid "Rows"
-msgstr "Rijen"
+#: tests/dissect-sysfile.c:571
+#, c-format
+msgid "Unrecognized record type 7, subtype %d."
+msgstr "Niet-herkend recordtype 7, subtype %d."
 
-#: src/ui/gui/crosstabs.glade:131 src/ui/gui/frequencies.glade:185
-msgid "Format..."
-msgstr "Formaat..."
+#: tests/dissect-sysfile.c:850
+#, c-format
+msgid "%s: Error parsing attribute value %s[%d]"
+msgstr "%s: Fout bij het ontleden van attribuut waarde %s[%d]"
 
-#: src/ui/gui/crosstabs.glade:138 src/ui/gui/examine.glade:247
-#: src/ui/gui/regression.glade:31
-msgid "Statistics..."
-msgstr "Statistieken..."
+#: tests/dissect-sysfile.c:856
+#, c-format
+msgid "%s: Attribute value %s[%d] is not quoted: %s"
+msgstr "%s: Attribuut waarde %s[%d] is niet geciteerd: %s"
 
-#: src/ui/gui/crosstabs.glade:148
-msgid "Cells..."
-msgstr "Cellen..."
+#: tests/dissect-sysfile.c:880
+#, fuzzy, c-format
+msgid "Bad size %zu for extended number of cases."
+msgstr "Onjuiste lengte %zu voor extensie 11."
 
-#: src/ui/gui/crosstabs.glade:230
-msgid "Print tables"
-msgstr "Print tabellen"
+#: tests/dissect-sysfile.c:886
+#, fuzzy, c-format
+msgid "Bad count %zu for extended number of cases."
+msgstr "Onjuiste lengte %zu voor extensie 11."
 
-#: src/ui/gui/crosstabs.glade:240
-msgid "Pivot"
+#: src/language/utilities/set.q:188
+msgid "WORKSPACE must be at least 1MB"
+msgstr "WORKSPACE moet minstens 1MB zijn"
+
+#: src/language/utilities/set.q:194 src/language/utilities/set.q:196
+#: src/language/utilities/set.q:198 src/language/utilities/set.q:200
+#: src/language/utilities/set.q:202 src/language/utilities/set.q:204
+#: src/language/utilities/set.q:206 src/language/utilities/set.q:208
+#: src/language/utilities/set.q:210
+#, c-format
+msgid "%s is obsolete."
+msgstr "%s is verouderd."
+
+#: src/language/utilities/set.q:216
+msgid "Active file compression is not implemented."
+msgstr "Actief bestand compressie is niet geïmplementeerd."
+
+#: src/language/utilities/set.q:334
+msgid "EPOCH must be 1500 or later."
+msgstr "EPOCH moet 1500 of later zijn."
+
+#: src/language/utilities/set.q:341
+msgid "expecting AUTOMATIC or year"
+msgstr "AUTOMATIC of jaar verwacht"
+
+#: src/language/utilities/set.q:369
+msgid "LENGTH must be at least 1."
+msgstr "LENGTH moet tenminste 1 zijn."
+
+#: src/language/utilities/set.q:405
+#, c-format
+msgid "%s is not a recognised encoding or locale name"
+msgstr "%s is geen herkende codering of lokale naam"
+
+#: src/language/utilities/set.q:467
+msgid "WIDTH must be at least 40."
+msgstr "WIDTH moet tenminste 40 zijn."
+
+#: src/language/utilities/set.q:490
+#, c-format
+msgid ""
+"FORMAT requires numeric output format as an argument.  Specified format %s "
+"is of type string."
 msgstr ""
+"FORMAT vereist numerieke uitvoeropmaak als een argument. Opgegeven opmaak %s "
+"is van het type tekenreeks."
 
-#: src/ui/gui/crosstabs.glade:253 src/ui/gui/psppire.glade:756
-msgid "Ascending"
-msgstr "Oplopend"
+#: src/language/utilities/set.q:707
+msgid "ISL (32-bit IEEE 754 single, little-endian)"
+msgstr "ISL (32-bit IEEE 754 single, little-endian)"
 
-#: src/ui/gui/crosstabs.glade:283
-msgid "No label"
-msgstr "Geen label"
+#: src/language/utilities/set.q:710
+msgid "ISB (32-bit IEEE 754 single, big-endian)"
+msgstr "ISB (32-bit IEEE 754 single, big-endian)"
 
-#: src/ui/gui/crosstabs.glade:295
-msgid "Suppress value labels"
-msgstr "Onderdruk waarde labels"
+#: src/language/utilities/set.q:713
+msgid "IDL (64-bit IEEE 754 double, little-endian)"
+msgstr "IDL (64-bit IEEE 754 double, little-endian)"
 
-#: src/ui/gui/crosstabs.glade:311
-msgid "Labeling"
+#: src/language/utilities/set.q:716
+msgid "IDB (64-bit IEEE 754 double, big-endian)"
+msgstr "IDB (64-bit IEEE 754 double, big-endian)"
+
+#: src/language/utilities/set.q:720
+msgid "VF (32-bit VAX F, VAX-endian)"
+msgstr "VF (32-bit VAX F, VAX-endian)"
+
+#: src/language/utilities/set.q:723
+msgid "VD (64-bit VAX D, VAX-endian)"
+msgstr "VD (64-bit VAX D, VAX-endian)"
+
+#: src/language/utilities/set.q:726
+msgid "VG (64-bit VAX G, VAX-endian)"
+msgstr "VG (64-bit VAX G, VAX-endian)"
+
+#: src/language/utilities/set.q:730
+msgid "ZS (32-bit IBM Z hexadecimal short, big-endian)"
+msgstr "ZS (32-bit IBM Z hexadecimal short, big-endian)"
+
+#: src/language/utilities/set.q:733
+msgid "ZL (64-bit IBM Z hexadecimal long, big-endian)"
+msgstr "ZL (64-bit IBM Z hexadecimal long, big-endian)"
+
+#: src/language/utilities/set.q:835
+#, c-format
+msgid "%s is %s."
+msgstr "%s van %s."
+
+#: src/language/stats/crosstabs.q:289
+msgid ""
+"Missing mode REPORT not allowed in general mode.  Assuming MISSING=TABLE."
 msgstr ""
+"Missing modus REPORT niet toegestaan in algemene modus.  MISSING=TABLE "
+"aangenomen."
 
-#: src/ui/gui/crosstabs.glade:378
-msgid "Cell Display"
+#: src/language/stats/crosstabs.q:399
+msgid "Too many cross-tabulation variables or dimensions."
+msgstr "Te veel cross-tabulation variabelen of dimensies."
+
+#: src/language/stats/crosstabs.q:409
+msgid "expecting BY"
+msgstr "BY verwacht"
+
+#: src/language/stats/crosstabs.q:466
+msgid "VARIABLES must be specified before TABLES."
+msgstr "VARIABLES dient voor TABLES gespecificeerd te worden."
+
+#: src/language/stats/crosstabs.q:504
+#, c-format
+msgid "Maximum value (%ld) less than minimum value (%ld)."
+msgstr "Maximumwaarde (%ld) is kleiner dan minimumwaarde (%ld)."
+
+#: src/language/stats/crosstabs.q:818
+msgid "Summary."
+msgstr "Overzicht."
+
+#: src/language/stats/crosstabs.q:820 src/language/stats/examine.q:1164
+#: src/language/stats/reliability.q:693
+msgid "Cases"
+msgstr "Cases"
+
+#: src/language/stats/crosstabs.q:821 src/language/stats/examine.q:1103
+#: src/language/stats/frequencies.q:1035 src/language/stats/reliability.q:696
+msgid "Valid"
+msgstr "Geldig"
+
+#: src/language/stats/crosstabs.q:831 src/language/stats/examine.q:1179
+#: src/language/stats/frequencies.q:815
+msgid "Percent"
+msgstr "Percentage"
+
+#: src/language/stats/crosstabs.q:1109
+msgid "count"
+msgstr "aantal"
+
+#: src/language/stats/crosstabs.q:1110
+msgid "row %"
+msgstr "rij %"
+
+#: src/language/stats/crosstabs.q:1111
+msgid "column %"
+msgstr "kolom %"
+
+#: src/language/stats/crosstabs.q:1112
+msgid "total %"
+msgstr "totaal %"
+
+#: src/language/stats/crosstabs.q:1113
+msgid "expected"
+msgstr "verwacht"
+
+#: src/language/stats/crosstabs.q:1114
+msgid "residual"
+msgstr "overblijvend"
+
+#: src/language/stats/crosstabs.q:1115
+msgid "std. resid."
 msgstr ""
 
-#: src/ui/gui/crosstabs.glade:439 src/ui/gui/oneway.glade:207
-#: src/ui/gui/regression.glade:322
-msgid "Statistics"
-msgstr "Statistieken"
+#: src/language/stats/crosstabs.q:1116
+msgid "adj. resid."
+msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:122 src/ui/gui/frequencies.glade:139
-msgid "Statistics:"
-msgstr "Statistieken:"
+#: src/language/stats/crosstabs.q:1210
+msgid "Chi-square tests."
+msgstr "Chi-square tests."
 
-#: src/ui/gui/descriptives-dialog.glade:184
-msgid "Exclude entire case if any selected variable is missing"
-msgstr "Sluit gehele case uit indien een geselecteerde variabele ontbreekt"
+#: src/language/stats/crosstabs.q:1217
+msgid "Asymp. Sig. (2-sided)"
+msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:194
-msgid "Include user-missing data in analysis"
-msgstr "Inclusief user-missing data in analyse"
+#: src/language/stats/crosstabs.q:1219
+msgid "Exact Sig. (2-sided)"
+msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:207
-msgid "Save Z-scores of selected variables as new variables"
-msgstr "Sla Z_Scores van geselecteerde variabelen op als nieuwe variabelen"
+#: src/language/stats/crosstabs.q:1221
+msgid "Exact Sig. (1-sided)"
+msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:223
-msgid "Options:"
-msgstr "Opties:"
+#: src/language/stats/crosstabs.q:1236
+msgid "Symmetric measures."
+msgstr "Symmetrische metingen."
 
-#: src/ui/gui/data-editor.glade:10 src/ui/gui/output-viewer.glade:22
-#: src/ui/gui/syntax-editor.glade:14
-msgid "_File"
-msgstr "_Bestand"
+#: src/language/stats/crosstabs.q:1242 src/language/stats/crosstabs.q:1290
+msgid "Asymp. Std. Error"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:25 src/ui/gui/data-editor.glade:51
-#: src/ui/gui/syntax-editor.glade:32 src/ui/gui/syntax-editor.glade:62
-msgid "_Syntax"
+#: src/language/stats/crosstabs.q:1243 src/language/stats/crosstabs.q:1291
+msgid "Approx. T"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:32 src/ui/gui/data-editor.glade:58
-#: src/ui/gui/data-editor.glade:311 src/ui/gui/data-editor.glade:329
-#: src/ui/gui/syntax-editor.glade:41 src/ui/gui/syntax-editor.glade:71
-msgid "_Data"
+#: src/language/stats/crosstabs.q:1244 src/language/stats/crosstabs.q:1292
+msgid "Approx. Sig."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:70
-msgid "_Import Delimited Text Data"
-msgstr "_Importeer Delimited Text Data"
+#: src/language/stats/crosstabs.q:1258
+msgid "Risk estimate."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:103
-msgid "D_isplay Data File Information"
-msgstr "_Toon Data Bestand Informatie"
+#: src/language/stats/crosstabs.q:1262
+#, c-format
+msgid "95%% Confidence Interval"
+msgstr "95%% Betrouwbaarheidsinterval"
 
-#: src/ui/gui/data-editor.glade:112
-msgid "Working File"
-msgstr "Werk Bestand"
+#: src/language/stats/crosstabs.q:1265 src/language/stats/t-test.q:756
+#: src/language/stats/t-test.q:920 src/language/stats/t-test.q:1013
+msgid "Lower"
+msgstr "Lager"
 
-#: src/ui/gui/data-editor.glade:119
-msgid "External File"
-msgstr "Extern Bestand"
+#: src/language/stats/crosstabs.q:1266 src/language/stats/t-test.q:757
+#: src/language/stats/t-test.q:921 src/language/stats/t-test.q:1014
+msgid "Upper"
+msgstr "Hoger"
 
-#: src/ui/gui/data-editor.glade:135
-msgid "Recently Used Da_ta"
-msgstr "Recent Gebruikte Da_ta"
+#: src/language/stats/crosstabs.q:1283
+msgid "Directional measures."
+msgstr "Directionele metingen."
 
-#: src/ui/gui/data-editor.glade:142
-msgid "Recently Used _Files"
-msgstr "Recent Gebruikte _Bestanden"
+#: src/language/stats/crosstabs.q:1708
+msgid "Pearson Chi-Square"
+msgstr "Pearson Chi-Square"
 
-#: src/ui/gui/data-editor.glade:166 src/ui/gui/output-viewer.glade:55
-#: src/ui/gui/syntax-editor.glade:118
-msgid "_Edit"
+#: src/language/stats/crosstabs.q:1709
+msgid "Likelihood Ratio"
+msgstr "Waarschijnlijkheidsratio"
+
+#: src/language/stats/crosstabs.q:1710
+msgid "Fisher's Exact Test"
+msgstr "Fisher's Exact Test"
+
+#: src/language/stats/crosstabs.q:1711
+msgid "Continuity Correction"
+msgstr "Continuïteitscorrectie"
+
+#: src/language/stats/crosstabs.q:1712
+msgid "Linear-by-Linear Association"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:182
-msgid "Insert Cases"
-msgstr "Invoegen Cases"
+#: src/language/stats/crosstabs.q:1747 src/language/stats/crosstabs.q:1822
+#: src/language/stats/crosstabs.q:1887
+msgid "N of Valid Cases"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:190 src/ui/gui/data-editor.glade:780
-msgid "Go To Case"
-msgstr "Ga Naar Case"
+#: src/language/stats/crosstabs.q:1766 src/language/stats/crosstabs.q:1905
+msgid "Nominal by Nominal"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:231
-msgid "Cl_ear Variables"
-msgstr "V_erwijder Variabelen"
+#: src/language/stats/crosstabs.q:1767 src/language/stats/crosstabs.q:1906
+msgid "Ordinal by Ordinal"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:239
-msgid "_Clear Cases"
-msgstr "_Verwijder Cases"
+#: src/language/stats/crosstabs.q:1768
+msgid "Interval by Interval"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:252
-msgid "gtk-find"
+#: src/language/stats/crosstabs.q:1769
+msgid "Measure of Agreement"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:264
-msgid "_View"
-msgstr "Bee_ld"
+#: src/language/stats/crosstabs.q:1775
+msgid "Cramer's V"
+msgstr "Cramer's V"
 
-#: src/ui/gui/data-editor.glade:271
-msgid "_Status Bar"
-msgstr "_Status Balk"
+#: src/language/stats/crosstabs.q:1776
+msgid "Contingency Coefficient"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:284
-msgid "_Fonts"
+#: src/language/stats/crosstabs.q:1777
+msgid "Kendall's tau-b"
+msgstr "Kendall's tau-b"
+
+#: src/language/stats/crosstabs.q:1778
+msgid "Kendall's tau-c"
+msgstr "Kendall's tau-c"
+
+#: src/language/stats/crosstabs.q:1780
+msgid "Spearman Correlation"
+msgstr "Spearman Correlatie"
+
+#: src/language/stats/crosstabs.q:1781
+msgid "Pearson's R"
+msgstr "Pearson's R"
+
+#: src/language/stats/crosstabs.q:1860
+#, c-format
+msgid "Odds Ratio for %s (%g / %g)"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:291
-msgid "_Grid Lines"
-msgstr "_Grid Lijnen"
+#: src/language/stats/crosstabs.q:1863
+#, c-format
+msgid "Odds Ratio for %s (%.*s / %.*s)"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:299
-msgid "Value _Labels"
-msgstr "Waarde _Labels"
+#: src/language/stats/crosstabs.q:1871
+#, c-format
+msgid "For cohort %s = %g"
+msgstr "Voor cohort %s = %g"
 
-#: src/ui/gui/data-editor.glade:318 src/ui/gui/data-editor.glade:613
-msgid "_Variables"
-msgstr "_Variabele"
+#: src/language/stats/crosstabs.q:1874
+#, c-format
+msgid "For cohort %s = %.*s"
+msgstr "Voor cohort %s = %.*s"
 
-#: src/ui/gui/data-editor.glade:336
-msgid "_Sort Cases"
-msgstr "_Sorteer Cases"
+#: src/language/stats/crosstabs.q:1907
+msgid "Nominal by Interval"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:350
-msgid "_Transpose"
-msgstr "_Herschik"
+#: src/language/stats/crosstabs.q:1913
+msgid "Goodman and Kruskal tau"
+msgstr "Goodman and Kruskal tau"
 
-#: src/ui/gui/data-editor.glade:363
-msgid "S_plit File"
-msgstr "S_plits Bestand"
+#: src/language/stats/crosstabs.q:1914
+msgid "Uncertainty Coefficient"
+msgstr "Onzekerheidscoëfficiënt"
 
-#: src/ui/gui/data-editor.glade:371
-msgid "Select _Cases"
-msgstr "Selecteer _Cases"
+#: src/language/stats/crosstabs.q:1915
+msgid "Somers' d"
+msgstr "Somers' d"
 
-#: src/ui/gui/data-editor.glade:378
-msgid "_Weight Cases"
-msgstr "_Weeg Cases"
+#: src/language/stats/crosstabs.q:1921
+msgid "Symmetric"
+msgstr "Symmetrisch"
 
-#: src/ui/gui/data-editor.glade:390
-msgid "_Transform"
-msgstr "_Transformeer"
+#: src/language/stats/crosstabs.q:1922 src/language/stats/crosstabs.q:1923
+#, c-format
+msgid "%s Dependent"
+msgstr "%s Afhankelijk"
 
-#: src/ui/gui/data-editor.glade:400
-msgid "_Compute"
-msgstr "_Bereken"
+#: src/language/stats/examine.q:357
+msgid "Not creating NP plot because data set is empty."
+msgstr "Niet aanmaken van NP plot omdat gegevens set leeg is."
 
-#: src/ui/gui/data-editor.glade:408
-msgid "Ran_k Cases"
-msgstr "Rangschi_k Cases"
+#: src/language/stats/examine.q:442 src/language/stats/examine.q:949
+msgid "Not creating plot because data set is empty."
+msgstr "Niet aanmaken van plot omdat gegevens set leeg is."
 
-#: src/ui/gui/data-editor.glade:420
-msgid "Recode into _Same Variables"
-msgstr "Hercodeer in _Zelfde Variabelen"
+#: src/language/stats/examine.q:454
+#, c-format
+msgid "Boxplot of %s vs. %s"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:427
-msgid "Recode into _Different Variables"
-msgstr "Hercodeer in _Andere Variabelen"
+#: src/language/stats/examine.q:458
+#, c-format
+msgid "Boxplot of %s"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:440
-msgid "_Run Pending Transforms"
-msgstr "_Run uitstaande Transformaties"
+#: src/language/stats/examine.q:647 src/language/stats/examine.q:660
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s en %s zijn wederzijds exclusief"
 
-#: src/ui/gui/data-editor.glade:453
-msgid "_Analyze"
-msgstr "_Analyseer"
+#: src/language/stats/examine.q:1159 src/language/stats/reliability.q:670
+msgid "Case Processing Summary"
+msgstr "Case Bewerkingsoverzicht"
 
-#: src/ui/gui/data-editor.glade:463
-msgid "_Descriptive Statistics"
-msgstr "_Descriptieve Statistieken"
+#: src/language/stats/examine.q:1449 src/language/stats/oneway.q:394
+#, c-format
+msgid "%g%% Confidence Interval for Mean"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:473
-msgid "_Frequencies"
-msgstr "_Frequenties"
+#: src/language/stats/examine.q:1464
+msgid "5% Trimmed Mean"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:481 src/ui/gui/oneway.glade:179
-msgid "_Descriptives"
+#: src/language/stats/examine.q:1499
+msgid "Interquartile Range"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:489
-msgid "_Explore"
-msgstr "_Exploreer"
+#: src/language/stats/examine.q:1635 src/language/stats/oneway.q:404
+#: src/ui/gui/descriptives.ui:8 src/ui/gui/examine.ui:319
+msgid "Descriptives"
+msgstr "Descriptieve"
 
-#: src/ui/gui/data-editor.glade:497
-msgid "_Crosstabs"
+#: src/language/stats/examine.q:1821
+msgid "Highest"
+msgstr "Hoogste"
+
+#: src/language/stats/examine.q:1826
+msgid "Lowest"
+msgstr "Laagste"
+
+#: src/language/stats/examine.q:1833
+msgid "Extreme Values"
+msgstr "Extreme Waardes"
+
+#: src/language/stats/examine.q:1837 src/language/data-io/list.q:158
+msgid "Case Number"
+msgstr "Case Nummer"
+
+#: src/language/stats/examine.q:1957
+msgid "Tukey's Hinges"
+msgstr "Tukey's Hinges"
+
+#: src/language/stats/examine.q:2003
+#, c-format
+msgid "%g"
+msgstr "%g"
+
+#: src/language/stats/frequencies.q:382
+msgid "Bar charts are not implemented."
+msgstr "Staafgrafieken nog niet geïmplementeerd."
+
+#: src/language/stats/frequencies.q:399
+#, fuzzy, c-format
+msgid ""
+"MAX for histogram must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
 msgstr ""
+"MAX moet groter of gelijk zijn aan MIN, als beiden zijn opgegeven. Maar, MIN "
+"was opgegeven als %g en MAX als %g. MIN en MAX worden genegeerd."
 
-#: src/ui/gui/data-editor.glade:509
-msgid "Compare _Means"
-msgstr "_Vergelijk Gemiddelde"
+#: src/language/stats/frequencies.q:420
+#, fuzzy, c-format
+msgid ""
+"MAX for pie chart must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
+msgstr ""
+"MAX moet groter of gelijk zijn aan MIN, als beiden zijn opgegeven. Maar, MIN "
+"was opgegeven als %g en MAX als %g. MIN en MAX worden genegeerd."
 
-#: src/ui/gui/data-editor.glade:519
-msgid "_One Sample T Test"
+#: src/language/stats/frequencies.q:703
+msgid "`)' expected after GROUPED interval list."
+msgstr "')' verwacht na GROUPED interval lijst."
+
+#: src/language/stats/frequencies.q:723
+#, c-format
+msgid "Variables %s specified multiple times on GROUPED subcommand."
+msgstr "Variabele %s is meerdere keren gespecificeerd in GROUPED-subopdracht."
+
+#: src/language/stats/frequencies.q:733
+#, c-format
+msgid "Variables %s specified on GROUPED but not on VARIABLES."
+msgstr "Variabele %s gespecificeerd bij GROUPED maar niet bij VARIABLES."
+
+#: src/language/stats/frequencies.q:812
+msgid "Value Label"
+msgstr "Waardelabel"
+
+#: src/language/stats/frequencies.q:816
+msgid "Valid Percent"
+msgstr "Geldig Percentage"
+
+#: src/language/stats/frequencies.q:817
+msgid "Cum Percent"
+msgstr "Cum Percentage"
+
+#: src/language/stats/frequencies.q:1008
+#, c-format
+msgid "No valid data for variable %s; statistics not displayed."
 msgstr ""
+"Geen geldige gegevens voor variabele %s; statistieken worden niet getoond."
 
-#: src/ui/gui/data-editor.glade:527
-msgid "_Independent Samples T Test"
+#: src/language/stats/frequencies.q:1054
+msgid "50 (Median)"
+msgstr "50 (Mediaan)"
+
+#: src/language/stats/frequencies.q:1209
+#, c-format
+msgid "Omitting pie chart for %s, which has only %d unique values."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:535
-msgid "_Paired Samples T Test"
+#: src/language/stats/frequencies.q:1212
+#, c-format
+msgid "Omitting pie chart for %s, which has over 50 unique values."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:543
-msgid "One Way _ANOVA"
+#: src/language/stats/glm.q:248
+msgid "Multivariate GLM not yet supported"
+msgstr "Mutivariante GLM wordt nog niet ondersteund"
+
+#: src/language/stats/means.q:100
+msgid "Missing required subcommand TABLES."
+msgstr "Mis vereiste subopdracht TABLES."
+
+#: src/language/stats/means.q:134
+msgid "TABLES subcommand may not appear more than once."
+msgstr "TABLES-subopdracht mag niet meer dan 1 keer voorkomen."
+
+#: src/language/stats/npar.q:111
+msgid "NPAR subcommand not currently implemented."
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:554
-msgid "Re_liability"
+#: src/language/stats/npar.q:256
+#, c-format
+msgid ""
+"The specified value of HI (%d) is lower than the specified value of LO (%d)"
 msgstr ""
+"De opgegeven waarde van HI (%d) is lager dan de opgegeven waarde van LO (%d)"
 
-#: src/ui/gui/data-editor.glade:562
-msgid "Linear _Regression"
+#: src/language/stats/npar.q:311
+#, c-format
+msgid ""
+"%d expected values were given, but the specified range (%d-%d) requires "
+"exactly %d values."
 msgstr ""
+"%d verwachte waardes waren opgegeven, maar het opgegeven bereik (%d-%d) "
+"vereist precies %d waardes."
 
-#: src/ui/gui/data-editor.glade:569
-msgid "_Non-Parametric Statistics"
+#: src/language/stats/npar.q:453 src/language/stats/t-test.q:380
+#, c-format
+msgid ""
+"PAIRED was specified but the number of variables preceding WITH (%zu) did "
+"not match the number following (%zu)."
 msgstr ""
+"PAIRED was opgegeven maar het aantal variabelen voor WITH (%zu) komt niet "
+"overeen met het aantal er achter (%zu)."
 
-#: src/ui/gui/data-editor.glade:579
-msgid "_Chi-Square"
+#: src/language/stats/oneway.q:170
+msgid "Number of contrast coefficients must equal the number of groups"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:587
-msgid "_Binomial"
+#: src/language/stats/oneway.q:179
+#, c-format
+msgid "Coefficients for contrast %zu do not total zero"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:603
-msgid "_Utilities"
-msgstr "E_xtra"
+#: src/language/stats/oneway.q:242
+#, c-format
+msgid "`%s' is not a variable name"
+msgstr "'%s' is geen variabelennaam"
 
-#: src/ui/gui/data-editor.glade:622
-msgid "Data File _Comments"
-msgstr "Data Bestand _Commentaren"
+#: src/language/stats/oneway.q:274 src/language/stats/regression.q:283
+msgid "Sum of Squares"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:633 src/ui/gui/output-viewer.glade:78
-#: src/ui/gui/syntax-editor.glade:209
-msgid "_Windows"
-msgstr "_Vensters"
+#: src/language/stats/oneway.q:276 src/language/stats/regression.q:285
+msgid "Mean Square"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:640 src/ui/gui/output-viewer.glade:88
-#: src/ui/gui/syntax-editor.glade:218
-msgid "_Minimize All Windows"
-msgstr "_Minimalizeer Alle Vensters"
+#: src/language/stats/oneway.q:277 src/language/stats/regression.q:286
+#: src/language/stats/t-test.q:749
+msgid "F"
+msgstr "F"
 
-#: src/ui/gui/data-editor.glade:647
-msgid "_Split"
-msgstr "_Splits"
+#: src/language/stats/oneway.q:278 src/language/stats/oneway.q:535
+#: src/language/stats/regression.q:201 src/language/stats/regression.q:287
+msgid "Significance"
+msgstr "Significantie "
 
-#: src/ui/gui/data-editor.glade:658 src/ui/gui/output-viewer.glade:99
-#: src/ui/gui/syntax-editor.glade:229
-msgid "_Help"
+#: src/language/stats/oneway.q:300
+msgid "Between Groups"
+msgstr "Tussen groepen"
+
+#: src/language/stats/oneway.q:301
+msgid "Within Groups"
+msgstr "Binnen groepen"
+
+#: src/language/stats/oneway.q:345 src/language/stats/regression.q:312
+msgid "ANOVA"
+msgstr "ANOVA"
+
+#: src/language/stats/oneway.q:532
+msgid "Levene Statistic"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:665 src/ui/gui/output-viewer.glade:106
-#: src/ui/gui/syntax-editor.glade:237
-msgid "_Reference Manual"
-msgstr "_Handboek"
+#: src/language/stats/oneway.q:533
+msgid "df1"
+msgstr "df1"
 
-#: src/ui/gui/data-editor.glade:678 src/ui/gui/output-viewer.glade:113
-#: src/ui/gui/syntax-editor.glade:244
-msgid "_About"
-msgstr "_Over"
+#: src/language/stats/oneway.q:534
+msgid "df2"
+msgstr "df2"
 
-#: src/ui/gui/data-editor.glade:722
-msgid "Print"
-msgstr "Afdrukken"
+#: src/language/stats/oneway.q:537
+msgid "Test of Homogeneity of Variances"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:732
-msgid "Recall"
-msgstr "Opnieuw"
+#: src/language/stats/oneway.q:603
+msgid "Contrast Coefficients"
+msgstr "Contrastcoëfficiënten"
 
-#: src/ui/gui/data-editor.glade:750
-msgid "Undo"
-msgstr "Ongedaan maken"
+#: src/language/stats/oneway.q:605 src/language/stats/oneway.q:681
+msgid "Contrast"
+msgstr "Contrast"
 
-#: src/ui/gui/data-editor.glade:760
-msgid "Redo"
-msgstr "Herstellen"
+#: src/language/stats/oneway.q:679
+msgid "Contrast Tests"
+msgstr "Contrasttesten"
 
-#: src/ui/gui/data-editor.glade:790
-msgid "Variables"
-msgstr "Variabelen"
+#: src/language/stats/oneway.q:682
+msgid "Value of Contrast"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:811
-msgid "Find"
-msgstr "Vind"
+#: src/language/stats/oneway.q:684 src/language/stats/regression.q:200
+#: src/language/stats/t-test.q:751 src/language/stats/t-test.q:922
+#: src/language/stats/t-test.q:1009
+msgid "t"
+msgstr "t"
 
-#: src/ui/gui/data-editor.glade:863
-msgid "Split File"
-msgstr "Splits Bestand"
+#: src/language/stats/oneway.q:730
+msgid "Assume equal variances"
+msgstr "Veronderstelt gelijke variantie"
 
-#: src/ui/gui/data-editor.glade:874
-msgid "Weight Cases"
-msgstr "Weeg Cases"
+#: src/language/stats/oneway.q:734
+msgid "Does not assume equal"
+msgstr "Veronderstelt niet gelijk"
 
-#: src/ui/gui/data-editor.glade:886
-msgid "Select Cases"
-msgstr "Selecteer Cases"
+#: src/language/stats/rank.q:220
+#, c-format
+msgid "%s of %s by %s"
+msgstr "%s van %s per %s"
 
-#: src/ui/gui/data-editor.glade:906 src/ui/gui/var-sheet-dialogs.glade:401
-#: src/ui/gui/var-sheet-dialogs.glade:582
-msgid "Value Labels"
-msgstr "Waarde Labels"
+#: src/language/stats/rank.q:225
+#, c-format
+msgid "%s of %s"
+msgstr "%s van %s"
 
-#: src/ui/gui/data-editor.glade:917
-msgid "Use Sets"
-msgstr "Gebruik Sets"
+#: src/language/stats/rank.q:600
+msgid "Cannot create new rank variable.  All candidates in use."
+msgstr "Kan geen rang variabele creëren. Alle kandidaten zijn in gebruik."
 
-#: src/ui/gui/data-editor.glade:938
-msgid "Information Area"
-msgstr "Informatie Gebied"
+#: src/language/stats/rank.q:693
+msgid "Variables Created By RANK"
+msgstr "Variabelen gecreëerd door RANK"
 
-#: src/ui/gui/data-editor.glade:957
-msgid "Processor Area"
-msgstr "Processor Gebied"
+#: src/language/stats/rank.q:717
+#, c-format
+msgid "%s into %s(%s of %s using %s BY %s)"
+msgstr "%s in %s(%s van %s gebruikt %s PER %s)"
 
-#: src/ui/gui/data-editor.glade:982
-msgid "Case Counter Area"
-msgstr "Case Teller Gebied"
+#: src/language/stats/rank.q:727
+#, c-format
+msgid "%s into %s(%s of %s BY %s)"
+msgstr "%s in %s(%s van %s PER %s)"
 
-#: src/ui/gui/data-editor.glade:1007
-msgid "Filter Use Status Area"
-msgstr "Filter Gebruik Status Gebied"
+#: src/language/stats/rank.q:740
+#, c-format
+msgid "%s into %s(%s of %s using %s)"
+msgstr "%s in %s(%s van %s gebruikt %s"
 
-#: src/ui/gui/data-editor.glade:1033
-msgid "Weight Status Area"
-msgstr "Weging Status Gebied"
+#: src/language/stats/rank.q:749
+#, c-format
+msgid "%s into %s(%s of %s)"
+msgstr "%s in %s(%s van %s)"
 
-#: src/ui/gui/data-editor.glade:1059
-msgid "Split File Status Area"
-msgstr "Splits Bestand Status Gebied"
+#: src/language/stats/rank.q:761
+msgid ""
+"FRACTION has been specified, but NORMAL and PROPORTION rank functions have "
+"not been requested.  The FRACTION subcommand will be ignored."
+msgstr ""
+"FRACTION is gespecificeerd maar NORMAL en PROPORTION rangschik functies zijn "
+"niet gevraagd. De FRACTION-subopdracht wordt genegeerd."
 
-#: src/ui/gui/examine.glade:49
-msgid "Label Cases by:"
+#: src/language/stats/rank.q:852
+#, c-format
+msgid "Variable %s already exists."
+msgstr "Variabele %s bestaat al."
+
+#: src/language/stats/rank.q:857
+msgid "Too many variables in INTO clause."
+msgstr "Te veel variabelen in INTO clausule."
+
+#: src/language/stats/regression.q:156
+msgid "R Square"
+msgstr "R Square"
+
+#: src/language/stats/regression.q:157
+msgid "Adjusted R Square"
 msgstr ""
 
-#: src/ui/gui/examine.glade:100
-msgid "Factor List:"
+#: src/language/stats/regression.q:158
+msgid "Std. Error of the Estimate"
 msgstr ""
 
-#: src/ui/gui/examine.glade:150
-msgid "Dependent List:"
+#: src/language/stats/regression.q:163
+msgid "Model Summary"
 msgstr ""
 
-#: src/ui/gui/examine.glade:257 src/ui/gui/t-test.glade:69
-#: src/ui/gui/t-test.glade:629 src/ui/gui/t-test.glade:780
+#: src/language/stats/regression.q:197
+msgid "B"
+msgstr "B"
+
+#: src/language/stats/regression.q:199
+msgid "Beta"
+msgstr "Beta"
+
+#: src/language/stats/regression.q:202
+msgid "(Constant)"
+msgstr "(Constante)"
+
+#: src/language/stats/regression.q:254
+msgid "Coefficients"
+msgstr "Coëfficiënten"
+
+#: src/language/stats/regression.q:289 src/ui/gui/regression.ui:7
+msgid "Regression"
+msgstr "Regressie"
+
+#: src/language/stats/regression.q:370
+msgid "Model"
+msgstr "Model"
+
+#: src/language/stats/regression.q:371
+msgid "Covariances"
+msgstr "Covarianties"
+
+#: src/language/stats/regression.q:386
+msgid "Coefficient Correlations"
+msgstr "Coëfficiëntcorrelaties"
+
+#: src/language/stats/regression.q:793
+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 "
+"meaningless."
+msgstr ""
+
+#: src/language/stats/regression.q:891
+msgid "REGRESSION requires numeric variables."
+msgstr ""
+
+#: src/language/stats/regression.q:962
+msgid "No valid data found. This command was skipped."
+msgstr "Geen geldige gegevens gevonden. Deze opdracht is overgeslagen."
+
+#: src/language/stats/reliability.q:421
+msgid "Reliability Statistics"
+msgstr "Betrouwbaarheids Statistieken"
+
+#: src/language/stats/reliability.q:462
+msgid "Item-Total Statistics"
+msgstr "Item-Totaal Statistieken"
+
+#: src/language/stats/reliability.q:484
+msgid "Scale Mean if Item Deleted"
+msgstr ""
+
+#: src/language/stats/reliability.q:487
+msgid "Scale Variance if Item Deleted"
+msgstr ""
+
+#: src/language/stats/reliability.q:490
+msgid "Corrected Item-Total Correlation"
+msgstr ""
+
+#: src/language/stats/reliability.q:493
+msgid "Cronbach's Alpha if Item Deleted"
+msgstr ""
+
+#: src/language/stats/reliability.q:543 src/language/stats/reliability.q:562
+msgid "Cronbach's Alpha"
+msgstr "Cronbach's Alpha"
+
+#: src/language/stats/reliability.q:546 src/language/stats/reliability.q:571
+#: src/language/stats/reliability.q:582
+msgid "N of Items"
+msgstr "N van Items"
+
+#: src/language/stats/reliability.q:565
+msgid "Part 1"
+msgstr "Deel 1"
+
+#: src/language/stats/reliability.q:576
+msgid "Part 2"
+msgstr "Deel 2"
+
+#: src/language/stats/reliability.q:587
+msgid "Total N of Items"
+msgstr "Totaal N van Items"
+
+#: src/language/stats/reliability.q:590
+msgid "Correlation Between Forms"
+msgstr "Correlatie Tussen Formulieren"
+
+#: src/language/stats/reliability.q:594
+msgid "Spearman-Brown Coefficient"
+msgstr "Spearman-Brown Coefficient"
+
+#: src/language/stats/reliability.q:597
+msgid "Equal Length"
+msgstr "Gelijke lengte"
+
+#: src/language/stats/reliability.q:600
+msgid "Unequal Length"
+msgstr "Ongelijke lengte"
+
+#: src/language/stats/reliability.q:604
+msgid "Guttman Split-Half Coefficient"
+msgstr "Guttman Split-Half Coëfficiënt"
+
+#: src/language/stats/reliability.q:699
+msgid "Excluded"
+msgstr "Uitgesloten"
+
+#: src/language/stats/reliability.q:707
+msgid "%"
+msgstr "%"
+
+#: src/language/stats/t-test.q:190
+msgid "Exactly one of TESTVAL, GROUPS and PAIRS subcommands must be specified."
+msgstr ""
+"Precies 1 van de TESTVAL-, GROUPS- en PAIRS-subopdrachten moet zijn "
+"gespecificeerd."
+
+#: src/language/stats/t-test.q:211
+msgid "VARIABLES subcommand may not be used with PAIRS."
+msgstr "VARIABLES-subopdracht mag niet gebruikt worden met PAIRS."
+
+#: src/language/stats/t-test.q:230
+msgid "One or more VARIABLES must be specified."
+msgstr "Een of meer VARIABLES moeten gespecificeerd zijn."
+
+#: src/language/stats/t-test.q:324
+msgid ""
+"When applying GROUPS to a string variable, two values must be specified."
+msgstr ""
+"Bij het toepassen van GROUPS op een tekenreeksvariabele moeten twee waardes "
+"opgegeven zijn."
+
+#: src/language/stats/t-test.q:395
+msgid "At least two variables must be specified on PAIRS."
+msgstr "Tenminste 2 variabelen moeten opgegeven worden bij PAIRS."
+
+#: src/language/stats/t-test.q:503
+msgid "One-Sample Statistics"
+msgstr ""
+
+#: src/language/stats/t-test.q:522
+msgid "Group Statistics"
+msgstr ""
+
+#: src/language/stats/t-test.q:621
+msgid "Paired Sample Statistics"
+msgstr ""
+
+#: src/language/stats/t-test.q:641 src/language/stats/t-test.q:944
+#: src/language/stats/t-test.q:1111
+#, c-format
+msgid "Pair %d"
+msgstr ""
+
+#: src/language/stats/t-test.q:737
+msgid "Independent Samples Test"
+msgstr ""
+
+#: src/language/stats/t-test.q:745
+msgid "Levene's Test for Equality of Variances"
+msgstr ""
+
+#: src/language/stats/t-test.q:747
+msgid "t-test for Equality of Means"
+msgstr ""
+
+#: src/language/stats/t-test.q:750 src/language/stats/t-test.q:1103
+msgid "Sig."
+msgstr ""
+
+#: src/language/stats/t-test.q:754 src/language/stats/t-test.q:1012
+msgid "Mean Difference"
+msgstr "Gemiddeld verschil"
+
+#: src/language/stats/t-test.q:755
+msgid "Std. Error Difference"
+msgstr ""
+
+#: src/language/stats/t-test.q:760 src/language/stats/t-test.q:914
+#: src/language/stats/t-test.q:1004
+#, c-format
+msgid "%g%% Confidence Interval of the Difference"
+msgstr ""
+
+#: src/language/stats/t-test.q:814
+msgid "Equal variances assumed"
+msgstr ""
+
+#: src/language/stats/t-test.q:860
+msgid "Equal variances not assumed"
+msgstr ""
+
+#: src/language/stats/t-test.q:904
+msgid "Paired Samples Test"
+msgstr ""
+
+#: src/language/stats/t-test.q:907
+msgid "Paired Differences"
+msgstr ""
+
+#: src/language/stats/t-test.q:919
+msgid "Std. Error Mean"
+msgstr ""
+
+#: src/language/stats/t-test.q:993
+msgid "One-Sample Test"
+msgstr "One-Sample Test"
+
+#: src/language/stats/t-test.q:998
+#, c-format
+msgid "Test Value = %f"
+msgstr "Testwaarde = %f"
+
+#: src/language/stats/t-test.q:1098
+msgid "Paired Samples Correlations"
+msgstr ""
+
+#: src/language/stats/t-test.q:1102
+msgid "Correlation"
+msgstr "Correlatie"
+
+#: src/language/stats/t-test.q:1113
+#, c-format
+msgid "%s & %s"
+msgstr "%s & %s"
+
+#: src/language/data-io/file-handle.q:65
+#, c-format
+msgid ""
+"File handle %s is already defined.  Use CLOSE FILE HANDLE before redefining "
+"a file handle."
+msgstr ""
+"Bestands-handle %s is al gedefinieerd. Gebruik CLOSE FILE HANDLE voor het "
+"opnieuw definiëren van een bestands-handle."
+
+#: src/language/data-io/file-handle.q:120
+msgid "RECFORM must be specified with MODE=360."
+msgstr "RECFORM moet opgegeven worden met MODE=360."
+
+#: src/language/data-io/file-handle.q:131
+#, c-format
+msgid ""
+"The specified file mode requires LRECL.  Assuming %zu-character records."
+msgstr ""
+"De gespecificeerd bestandsmodus vereist LRECL. Records van %zu-teken worden "
+"verondersteld."
+
+#: src/language/data-io/file-handle.q:135
+#, c-format
+msgid ""
+"Record length (%ld) must be between 1 and %lu bytes.  Assuming %d-character "
+"records."
+msgstr ""
+"Recordlengte (%ld) moet tussen 1 en %lu bytes zijn. Records van %d tekens "
+"worden verondersteld."
+
+#: src/language/data-io/file-handle.q:177
+msgid "file"
+msgstr "bestand"
+
+#: src/language/data-io/file-handle.q:179
+msgid "inline file"
+msgstr "inline-bestand"
+
+#: src/language/data-io/file-handle.q:205
+msgid "expecting a file name or handle name"
+msgstr "bestands- of handle-naam verwacht"
+
+#: src/language/data-io/file-handle.q:225
+#, c-format
+msgid "Handle for %s not allowed here."
+msgstr "Handle voor %s is hier niet toegestaan."
+
+#: src/language/data-io/list.q:99
+#, c-format
+msgid ""
+"The first case (%ld) specified precedes the last case (%ld) specified.  The "
+"values will be swapped."
+msgstr ""
+"De eerste gespecificeerde case (%ld) gaat vooraf aan de laatste "
+"gespecificeerde case (%ld). De waardes worden verwisseld."
+
+#: src/language/data-io/list.q:107
+#, c-format
+msgid ""
+"The first case (%ld) to list is less than 1.  The value is being reset to 1."
+msgstr ""
+"De eerste case (%ld) om weer te geven is kleiner dan 1. De waarde is op 1 "
+"gezet."
+
+#: src/language/data-io/list.q:113
+#, c-format
+msgid ""
+"The last case (%ld) to list is less than 1.  The value is being reset to 1."
+msgstr ""
+"De laatste case (%ld) om weer te geven is kleiner dan 1. De waarde is op 1 "
+"gezet."
+
+#: src/language/data-io/list.q:119
+#, c-format
+msgid "The step value %ld is less than 1.  The value is being reset to 1."
+msgstr "De stap waarde %ld is kleiner dan 1. De waarde is op 1 gezet."
+
+#: src/ui/gui/binomial.ui:57 src/ui/gui/chi-square.ui:57
+#, fuzzy
+msgid "_Test Variable List:"
+msgstr "Testvariabele:"
+
+#: src/ui/gui/binomial.ui:126 src/ui/gui/chi-square.ui:126
+msgid "_Get from data"
+msgstr ""
+
+#: src/ui/gui/binomial.ui:143 src/ui/gui/t-test.ui:333
+msgid "_Cut point:"
+msgstr "_Knippunt:"
+
+#: src/ui/gui/binomial.ui:178
+msgid "Define Dichotomy"
+msgstr ""
+
+#: src/ui/gui/binomial.ui:197
+msgid "Test _Proportion:"
+msgstr ""
+
+#: src/ui/gui/correlation.ui:7
+msgid "Bivariate Correlations"
+msgstr "Bivariate Correlaties"
+
+#: src/ui/gui/correlation.ui:108
+msgid "Pearso_n"
+msgstr "Pearso_n"
+
+#: src/ui/gui/correlation.ui:123
+msgid "_Kendall's tau-b"
+msgstr "_Kendall's tau-b"
+
+#: src/ui/gui/correlation.ui:138
+msgid "_Spearman"
+msgstr "_Spearman"
+
+#: src/ui/gui/correlation.ui:158
+msgid "Correlation Coefficients"
+msgstr "Correlatie-Coëfficiënt"
+
+#: src/ui/gui/correlation.ui:182
+msgid "_Two-tailed"
+msgstr ""
+
+#: src/ui/gui/correlation.ui:198
+msgid "One-tai_led"
+msgstr ""
+
+#: src/ui/gui/correlation.ui:220
+msgid "Test of Significance"
+msgstr "Test van Significantie "
+
+#: src/ui/gui/correlation.ui:232
+msgid "_Flag significant correlations"
+msgstr ""
+
+#: src/ui/gui/crosstabs.ui:7
+msgid "Crosstabs"
+msgstr "Kruistabellen"
+
+#: src/ui/gui/crosstabs.ui:50
+msgid "Rows"
+msgstr "Rijen"
+
+#: src/ui/gui/crosstabs.ui:124
+msgid "Format..."
+msgstr "Opmaak..."
+
+#: src/ui/gui/crosstabs.ui:137 src/ui/gui/examine.ui:245
+#: src/ui/gui/regression.ui:27
+msgid "Statistics..."
+msgstr "Statistieken..."
+
+#: src/ui/gui/crosstabs.ui:150
+msgid "Cells..."
+msgstr "Cellen..."
+
+#: src/ui/gui/crosstabs.ui:227
+msgid "Crosstabs: Format"
+msgstr "Kruistabellen: Opmaak"
+
+#: src/ui/gui/crosstabs.ui:241
+msgid "Print tables"
+msgstr "Print tabellen"
+
+#: src/ui/gui/crosstabs.ui:254
+msgid "Pivot"
+msgstr ""
+
+#: src/ui/gui/crosstabs.ui:267 src/ui/gui/sort.ui:130
+msgid "Ascending"
+msgstr "Oplopend"
+
+#: src/ui/gui/crosstabs.ui:304
+msgid "No label"
+msgstr "Geen label"
+
+#: src/ui/gui/crosstabs.ui:317
+msgid "Suppress value labels"
+msgstr "Waardelabels onderdrukken"
+
+#: src/ui/gui/crosstabs.ui:335
+msgid "Labeling"
+msgstr "labellen"
+
+#: src/ui/gui/crosstabs.ui:369
+msgid "Crosstabs: Cells"
+msgstr "Kruistabellen: cellen"
+
+#: src/ui/gui/crosstabs.ui:402
+msgid "Cell Display"
+msgstr "Cel-scherm"
+
+#: src/ui/gui/crosstabs.ui:430
+msgid "Crosstabs: Statistics"
+msgstr "Kruistabel: Satistieken"
+
+#: src/ui/gui/crosstabs.ui:463 src/ui/gui/oneway.ui:222
+#: src/ui/gui/regression.ui:340
+msgid "Statistics"
+msgstr "Statistieken"
+
+#: src/ui/gui/chi-square.ui:13
+#, fuzzy
+msgid "Chi-Square Test"
+msgstr "Chi-square tests."
+
+#: src/ui/gui/chi-square.ui:140
+#, fuzzy
+msgid "Use _specified range"
+msgstr "_Gebruik gespecificeerde waardes:"
+
+#: src/ui/gui/chi-square.ui:162
+#, fuzzy
+msgid "_Lower:"
+msgstr "Lager"
+
+#: src/ui/gui/chi-square.ui:170
+#, fuzzy
+msgid "_Upper:"
+msgstr "Hoger"
+
+#: src/ui/gui/chi-square.ui:214
+#, fuzzy
+msgid "Expected Range:"
+msgstr "Verwacht N"
+
+#: src/ui/gui/chi-square.ui:240
+msgid "All categor_ies equal"
+msgstr ""
+
+#: src/ui/gui/chi-square.ui:257
+#, fuzzy
+msgid "_Values"
+msgstr "Waardes"
+
+#: src/ui/gui/chi-square.ui:301
+#, fuzzy
+msgid "Expected Values:"
+msgstr "Extreme Waardes"
+
+#: src/ui/gui/descriptives.ui:130 src/ui/gui/frequencies.ui:140
+msgid "Statistics:"
+msgstr "Statistieken:"
+
+#: src/ui/gui/descriptives.ui:192
+msgid "Exclude entire case if any selected variable is missing"
+msgstr "Sluit gehele case uit indien een geselecteerde variabele ontbreekt"
+
+#: src/ui/gui/descriptives.ui:207
+msgid "Include user-missing data in analysis"
+msgstr "Inclusief user-missing gegevens in analyse"
+
+#: src/ui/gui/descriptives.ui:222
+msgid "Save Z-scores of selected variables as new variables"
+msgstr "Sla Z-Scores van geselecteerde variabelen op als nieuwe variabelen"
+
+#: src/ui/gui/descriptives.ui:243
+msgid "Options:"
+msgstr "Opties:"
+
+#: src/ui/gui/examine.ui:8
+msgid "Explore"
+msgstr "Onderzoek"
+
+#: src/ui/gui/examine.ui:51
+msgid "Label Cases by:"
+msgstr "Label Cases per:"
+
+#: src/ui/gui/examine.ui:99
+msgid "Factor List:"
+msgstr "Factorenlijst:"
+
+#: src/ui/gui/examine.ui:146
+msgid "Dependent List:"
+msgstr "Afhankelijkenlijst:"
+
+#: src/ui/gui/examine.ui:259 src/ui/gui/t-test.ui:68 src/ui/gui/t-test.ui:658
+#: src/ui/gui/t-test.ui:819
 msgid "Options..."
 msgstr "Opties..."
 
-#: src/ui/gui/examine.glade:310
-msgid "Descriptives"
-msgstr ""
+#: src/ui/gui/examine.ui:302
+msgid "Explore: Statistics"
+msgstr "Onderzoek: Statistieken"
 
-#: src/ui/gui/examine.glade:320
+#: src/ui/gui/examine.ui:332
 msgid "Extremes"
-msgstr ""
+msgstr "Extremen"
 
-#: src/ui/gui/examine.glade:388
+#: src/ui/gui/examine.ui:381
+msgid "Explore: Options"
+msgstr "Onderzoek: Opties"
+
+#: src/ui/gui/examine.ui:405
 msgid "Exclude cases listwise"
 msgstr ""
 
-#: src/ui/gui/examine.glade:399
+#: src/ui/gui/examine.ui:419
 msgid "Exclude cases pairwise"
 msgstr ""
 
-#: src/ui/gui/examine.glade:414
+#: src/ui/gui/examine.ui:434
 msgid "Repeat values"
-msgstr "Herhaal waardes"
+msgstr "Waardes herhalen"
+
+#: src/ui/gui/examine.ui:455 src/ui/gui/t-test.ui:493
+#: src/ui/gui/var-sheet-dialogs.ui:684
+msgid "Missing Values"
+msgstr "Ontbrekende waardes"
+
+#: src/ui/gui/factor.ui:21
+msgid "Factor Analysis"
+msgstr "Factoranalyse"
+
+#: src/ui/gui/factor.ui:47
+#, fuzzy
+msgid "_Descriptives..."
+msgstr "Descriptieven..."
+
+#: src/ui/gui/factor.ui:60
+#, fuzzy
+msgid "_Extraction..."
+msgstr "Extractie..."
+
+#: src/ui/gui/factor.ui:74
+#, fuzzy
+msgid "_Rotations..."
+msgstr "Opties..."
+
+#: src/ui/gui/factor.ui:192
+msgid "Factor Analysis: Extraction"
+msgstr ""
+
+#: src/ui/gui/factor.ui:216
+msgid "Method: "
+msgstr "Methode:"
+
+#: src/ui/gui/factor.ui:266
+msgid "Correlation matrix"
+msgstr "Correlatie-matrix"
+
+#: src/ui/gui/factor.ui:280
+msgid "Covariance matrix"
+msgstr "Covariantie-matrix"
+
+#: src/ui/gui/factor.ui:300
+msgid "Analyse"
+msgstr "Analyseer"
+
+#: src/ui/gui/factor.ui:324
+msgid "Unrotatated factor solution"
+msgstr ""
+
+#: src/ui/gui/factor.ui:338
+msgid "Scree plot"
+msgstr ""
+
+#: src/ui/gui/factor.ui:357 src/ui/gui/roc.ui:286
+msgid "Display"
+msgstr "Scherm"
+
+#: src/ui/gui/factor.ui:430
+msgid "Number of factors:"
+msgstr "Aantal van factoren:"
+
+#: src/ui/gui/factor.ui:460
+msgid "Extract"
+msgstr ""
+
+#: src/ui/gui/factor.ui:475 src/ui/gui/factor.ui:665
+msgid "Maximum iterations for convergence:"
+msgstr ""
+
+#: src/ui/gui/factor.ui:538
+#, fuzzy
+msgid "Factor Analysis: Rotation"
+msgstr "Factoranalyse"
+
+#: src/ui/gui/factor.ui:571
+#, fuzzy
+msgid "_None"
+msgstr "Geen"
+
+#: src/ui/gui/factor.ui:582
+#, fuzzy
+msgid "_Varimax"
+msgstr "_Variabelen"
+
+#: src/ui/gui/factor.ui:598
+msgid "_Quartimax"
+msgstr ""
+
+#: src/ui/gui/factor.ui:614
+msgid "_Equimax"
+msgstr ""
+
+#: src/ui/gui/factor.ui:637
+#, fuzzy
+msgid "Method"
+msgstr "Methode:"
+
+#: src/ui/gui/factor.ui:648
+#, fuzzy
+msgid "_Display rotated solution"
+msgstr "Gegevensbestand_informatie tonen"
 
-#: src/ui/gui/examine.glade:432 src/ui/gui/t-test.glade:460
-#: src/ui/gui/var-sheet-dialogs.glade:649
-msgid "Missing Values"
-msgstr "Ontbrekende Waardes"
+#: src/ui/gui/find.ui:8
+msgid "Find Case"
+msgstr "Vind case"
 
-#: src/ui/gui/find.glade:80
+#: src/ui/gui/find.ui:88
 msgid "Variable:"
 msgstr "Variabele:"
 
-#: src/ui/gui/find.glade:111 src/ui/gui/recode.glade:185
-#: src/ui/gui/var-sheet-dialogs.glade:512
+#: src/ui/gui/find.ui:124 src/ui/gui/recode.ui:173
+#: src/ui/gui/var-sheet-dialogs.ui:531
 msgid "Value:"
 msgstr "Waarde:"
 
-#: src/ui/gui/find.glade:137
+#: src/ui/gui/find.ui:147
 msgid "Search value labels"
-msgstr "Zoek waarde labels"
+msgstr "Zoek waardelabels"
 
-#: src/ui/gui/find.glade:161
+#: src/ui/gui/find.ui:171
 msgid "Regular expression Match"
 msgstr ""
 
-#: src/ui/gui/find.glade:172
+#: src/ui/gui/find.ui:187
 msgid "Search substrings"
-msgstr "Zoek substrings"
+msgstr "Zoek subtekenreeksen"
 
-#: src/ui/gui/find.glade:185
+#: src/ui/gui/find.ui:203
 msgid "Wrap around"
 msgstr "Tekstterugloop"
 
-#: src/ui/gui/find.glade:198
+#: src/ui/gui/find.ui:218
 msgid "Search backward"
 msgstr "Zoek achterwaarts"
 
-#: src/ui/gui/frequencies.glade:98 src/ui/gui/psppire.glade:252
-#: src/ui/gui/rank.glade:103
+#: src/ui/gui/frequencies.ui:102 src/ui/gui/psppire.ui:282
+#: src/ui/gui/rank.ui:105
 msgid "Variable(s):"
 msgstr "Variabele(n):"
 
-#: src/ui/gui/frequencies.glade:168
-msgid "Display Frequency Table"
-msgstr "Toon Frequentie Tabel"
+#: src/ui/gui/frequencies.ui:151
+msgid "Include missing values"
+msgstr "Inclusief ontbrekende waardes"
+
+#: src/ui/gui/frequencies.ui:189
+msgid "Charts..."
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:201
+msgid "Frequency Tables..."
+msgstr "Frequentie tabellen..."
+
+#: src/ui/gui/frequencies.ui:251
+msgid "Frequencies: Frequency Tables"
+msgstr "Frequenties: Frequentietabellen"
+
+#: src/ui/gui/frequencies.ui:281
+msgid "Always"
+msgstr "Altijd "
+
+#: src/ui/gui/frequencies.ui:297
+msgid "Never"
+msgstr "Nooit "
 
-#: src/ui/gui/frequencies.glade:264
-msgid "Ascending Order"
-msgstr "Oplopende Volgorde"
+#: src/ui/gui/frequencies.ui:316
+msgid "If no more than "
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:347
+msgid "values"
+msgstr "waardes"
+
+#: src/ui/gui/frequencies.ui:368
+#, fuzzy
+msgid "Display frequency tables"
+msgstr "Toon frequentietabel"
 
-#: src/ui/gui/frequencies.glade:275
-msgid "Descending Order"
-msgstr "Aflopende Volgorde"
+#: src/ui/gui/frequencies.ui:396
+msgid "Ascending value"
+msgstr "Oplopende waarde"
 
-#: src/ui/gui/frequencies.glade:290
-msgid "Ascending Counts"
-msgstr "Oplopend Aantal"
+#: src/ui/gui/frequencies.ui:412
+msgid "Descending value"
+msgstr "Aflopende waarde"
 
-#: src/ui/gui/frequencies.glade:305
-msgid "Descending Counts"
-msgstr "Aflopend Aantal"
+#: src/ui/gui/frequencies.ui:428
+msgid "Ascending frequency"
+msgstr "Oplopende frequentie"
 
-#: src/ui/gui/frequencies.glade:323
+#: src/ui/gui/frequencies.ui:444
+msgid "Descending frequency"
+msgstr "Aflopende frequentie"
+
+#: src/ui/gui/frequencies.ui:466
 msgid "Order by"
 msgstr "Sorteer op"
 
-#: src/ui/gui/frequencies.glade:355
-msgid "Supress tables with more than N categories"
-msgstr "Onderdruk tabellen met meer dan N categorieën"
+#: src/ui/gui/frequencies.ui:508
+msgid "Frequencies: Charts"
+msgstr "Frequenties: Grafieken "
+
+#: src/ui/gui/frequencies.ui:536
+msgid "Exclude values below "
+msgstr "Sluit onderstaande waardes uit"
 
-#: src/ui/gui/frequencies.glade:371
-msgid "Maximum no of categories"
-msgstr "Maximaal aantal categorieën"
+#: src/ui/gui/frequencies.ui:571
+#, fuzzy
+msgid "Exclude values above "
+msgstr "Sluit onderstaande waardes uit"
 
-#: src/ui/gui/message-dialog.glade:10
-msgid "Messages Reported"
-msgstr "Meldingen Gerapporteerd"
+#: src/ui/gui/frequencies.ui:609
+msgid "<b>Chart Formatting</b>"
+msgstr "<b>Grafiek opmaken</b>"
 
-#: src/ui/gui/message-dialog.glade:47
-msgid ""
-"The PSPP processor reported # errors.  The first # and last # are shown "
-"below:"
+#: src/ui/gui/frequencies.ui:633
+msgid "Draw histograms"
+msgstr "Teken histogrammen"
+
+#: src/ui/gui/frequencies.ui:645
+msgid "Superimpose normal curve"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:661
+msgid "Scale:"
+msgstr "Schaal: "
+
+#: src/ui/gui/frequencies.ui:682
+msgid "Percentages"
+msgstr "Percentages"
+
+#: src/ui/gui/frequencies.ui:705
+msgid "<b>Histograms</b>"
+msgstr "<b>Histogrammen</b>"
+
+#: src/ui/gui/frequencies.ui:729
+msgid "Draw pie charts"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:741
+#, fuzzy
+msgid "Include slices for missing values"
+msgstr "_Discrete missende waardes"
+
+#: src/ui/gui/frequencies.ui:758
+msgid "<b>Pie Charts</b>"
+msgstr "<b>Taartgrafieken</b>"
+
+#: src/ui/gui/oneway.ui:8
+msgid "One-Way ANOVA"
+msgstr ""
+
+#: src/ui/gui/oneway.ui:31
+msgid "_Factor:"
+msgstr "_Factor:"
+
+#: src/ui/gui/oneway.ui:69
+msgid "Dependent _Variable(s):"
+msgstr "Afhankelijke _Variabel(en):"
+
+#: src/ui/gui/oneway.ui:184 src/ui/gui/data-editor.ui:328
+msgid "_Descriptives"
+msgstr "_Descriptieven"
+
+#: src/ui/gui/oneway.ui:200
+msgid "_Homogeneity"
+msgstr "_Homogeniteit"
+
+#: src/ui/gui/oneway.ui:238
+msgid "_Contrasts..."
+msgstr ""
+
+#: src/ui/gui/oneway.ui:292
+msgid "One-Way ANOVA: Contrasts"
 msgstr ""
-"De PSPP processor rapporteerde # fouten.  De eerste # en de laatste # worden "
-"hier onder getoond:"
 
-#: src/ui/gui/message-dialog.glade:101
-msgid "gtk-close"
+#: src/ui/gui/oneway.ui:369
+msgid "_Coefficients:"
+msgstr "_Coëfficiënten:"
+
+#: src/ui/gui/oneway.ui:416
+msgid "Coefficient Total: "
+msgstr "Coëfficiënt Totaal: "
+
+#: src/ui/gui/oneway.ui:452
+msgid "Contrast 1 of 1"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:58
+#: src/ui/gui/psppire.ui:7
+msgid "Weight Cases"
+msgstr "Weeg cases"
+
+#: src/ui/gui/psppire.ui:66
 msgid "Weight cases by"
 msgstr "Weeg cases op"
 
-#: src/ui/gui/psppire.glade:83
+#: src/ui/gui/psppire.ui:102
 msgid "Frequency Variable"
-msgstr "Frequencie Variabele"
+msgstr "Frequentievariabele"
 
-#: src/ui/gui/psppire.glade:123
+#: src/ui/gui/psppire.ui:145
 msgid "Current Status: "
-msgstr "Huidige Status:"
+msgstr "Huidige Status: "
+
+#: src/ui/gui/psppire.ui:195
+msgid "Transpose"
+msgstr "Omzetten"
 
-#: src/ui/gui/psppire.glade:219
+#: src/ui/gui/psppire.ui:247
 msgid "Name Variable:"
 msgstr "Naam Variabele:"
 
-#: src/ui/gui/psppire.glade:404
+#: src/ui/gui/psppire.ui:383
+msgid "Split File"
+msgstr "Splits bestand"
+
+#: src/ui/gui/psppire.ui:443
 msgid "Analyze all cases.  Do not create groups."
 msgstr "Analyseer alle cases.  Creëer geen groepen."
 
-#: src/ui/gui/psppire.glade:415
+#: src/ui/gui/psppire.ui:459
 msgid "Compare groups."
 msgstr "Vergelijk groepen."
 
-#: src/ui/gui/psppire.glade:429
+#: src/ui/gui/psppire.ui:475
 msgid "Organize output by groups."
 msgstr "Organiseer uitvoer per groepen."
 
-#: src/ui/gui/psppire.glade:477
+#: src/ui/gui/psppire.ui:533
 msgid "Groups based on:"
 msgstr "Groepen gebaseerd op:"
 
-#: src/ui/gui/psppire.glade:540
+#: src/ui/gui/psppire.ui:592
 msgid "Sort the file by grouping variables."
-msgstr "Sorteer bestand op groepering variabelen."
+msgstr "Sorteer bestand op groeperingsvariabelen."
 
-#: src/ui/gui/psppire.glade:552
+#: src/ui/gui/psppire.ui:609
 msgid "File is already sorted."
 msgstr "Bestand is al gesorteerd."
 
-#: src/ui/gui/psppire.glade:597
+#: src/ui/gui/psppire.ui:662
 msgid "Current Status : "
 msgstr "Huidige Status : "
 
-#: src/ui/gui/psppire.glade:605
+#: src/ui/gui/psppire.ui:673
 msgid "Analysis by groups is off"
 msgstr "Analyseer per groep is uit"
 
-#: src/ui/gui/psppire.glade:704
-msgid "Sort by:"
-msgstr "Sorteer op:"
-
-#: src/ui/gui/psppire.glade:767
-msgid "Descending"
-msgstr "Aflopend"
-
-#: src/ui/gui/psppire.glade:784
-msgid "Sort Order"
-msgstr "Sorteer Volgorde"
+#: src/ui/gui/psppire.ui:709
+msgid "Compute Variable"
+msgstr "Berekenvariabele"
 
-#: src/ui/gui/psppire.glade:853
+#: src/ui/gui/psppire.ui:742
 msgid "Target Variable:"
-msgstr "Doel Variabele:"
+msgstr "Doelvariabele:"
 
-#: src/ui/gui/psppire.glade:884
+#: src/ui/gui/psppire.ui:771
 msgid "Type & Label"
-msgstr ""
+msgstr "Type & Label"
 
-#: src/ui/gui/psppire.glade:924
+#: src/ui/gui/psppire.ui:818
 msgid "="
-msgstr ""
+msgstr "="
 
-#: src/ui/gui/psppire.glade:970
+#: src/ui/gui/psppire.ui:872
 msgid "Numeric Expressions:"
 msgstr "Numerieke Expressies:"
 
-#: src/ui/gui/psppire.glade:1024
+#: src/ui/gui/psppire.ui:934
 msgid "Functions:"
 msgstr "Functies:"
 
-#: src/ui/gui/psppire.glade:1087 src/ui/gui/psppire.glade:1491
-#: src/ui/gui/recode.glade:731
+#: src/ui/gui/psppire.ui:999 src/ui/gui/psppire.ui:1422
+#: src/ui/gui/recode.ui:741
 msgid "If..."
 msgstr "Als..."
 
-#: src/ui/gui/psppire.glade:1320
+#: src/ui/gui/psppire.ui:1052
+msgid "Select Cases"
+msgstr "Selecteer cases"
+
+#: src/ui/gui/psppire.ui:1240
 msgid "Use filter variable"
-msgstr "Gebruik filter variabele"
+msgstr "Gebruik filtervariabele"
 
-#: src/ui/gui/psppire.glade:1373
+#: src/ui/gui/psppire.ui:1299
 msgid "Based on time or case range"
-msgstr "Gebaseerd op tijd of case volgorde"
+msgstr "Gebaseerd op tijd of case bereik"
 
-#: src/ui/gui/psppire.glade:1386
+#: src/ui/gui/psppire.ui:1311
 msgid "Range..."
-msgstr ""
+msgstr "Bereik..."
 
-#: src/ui/gui/psppire.glade:1425
+#: src/ui/gui/psppire.ui:1355
 msgid "Random sample of cases"
-msgstr "Random steekproef van cases"
+msgstr "Willekeurige steekproef van cases"
 
-#: src/ui/gui/psppire.glade:1439
+#: src/ui/gui/psppire.ui:1368
 msgid "Sample..."
 msgstr "Steekproef..."
 
-#: src/ui/gui/psppire.glade:1477
+#: src/ui/gui/psppire.ui:1410
 msgid "If condition is satisfied"
 msgstr "Aan If conditie is voldaan"
 
-#: src/ui/gui/psppire.glade:1526
+#: src/ui/gui/psppire.ui:1462
 msgid "All Cases"
 msgstr "Alle Cases"
 
-#: src/ui/gui/psppire.glade:1541
+#: src/ui/gui/psppire.ui:1477
 msgid "Select"
 msgstr "Selecteer"
 
-#: src/ui/gui/psppire.glade:1570
+#: src/ui/gui/psppire.ui:1504
 msgid "Filtered"
 msgstr "Gefilterd"
 
-#: src/ui/gui/psppire.glade:1581
+#: src/ui/gui/psppire.ui:1520
 msgid "Deleted"
 msgstr "Verwijderd"
 
-#: src/ui/gui/psppire.glade:1599
+#: src/ui/gui/psppire.ui:1543
 msgid "Unselected Cases Are"
 msgstr "Niet geselecteerde Cases zijn"
 
-#: src/ui/gui/psppire.glade:1664
+#: src/ui/gui/psppire.ui:1585
+msgid "Data File Comments"
+msgstr "Gegevensbestand _commentaren"
+
+#: src/ui/gui/psppire.ui:1609
 msgid "Comments:"
 msgstr "Commentaren:"
 
-#: src/ui/gui/psppire.glade:1706
+#: src/ui/gui/psppire.ui:1650
 msgid "Display comments in output"
 msgstr "Toon commentaren in uitvoer"
 
-#: src/ui/gui/psppire.glade:1721
+#: src/ui/gui/psppire.ui:1669
 msgid "Column Number: 0"
-msgstr "Kolom Nummer: 0"
+msgstr "Kolomnummer: 0"
+
+#: src/ui/gui/psppire.ui:1703
+#, fuzzy
+msgid "Select Cases: Range"
+msgstr "Selecteer cases"
 
-#: src/ui/gui/psppire.glade:1804
+#: src/ui/gui/psppire.ui:1750
 msgid "First case"
 msgstr "Eerste case"
 
-#: src/ui/gui/psppire.glade:1817
+#: src/ui/gui/psppire.ui:1763
 msgid "Last case"
 msgstr "Laatste case"
 
-#: src/ui/gui/psppire.glade:1830
+#: src/ui/gui/psppire.ui:1776
 msgid "Observation"
 msgstr "Observatie"
 
-#: src/ui/gui/psppire.glade:1894
+#: src/ui/gui/psppire.ui:1808
+#, fuzzy
+msgid "Compute Variable: Type and Label"
+msgstr "Berekenvariabele"
+
+#: src/ui/gui/psppire.ui:1843
 msgid "Use expression as label"
 msgstr "Gebruik expressie als label"
 
-#: src/ui/gui/psppire.glade:2150
+#: src/ui/gui/psppire.ui:2088
+msgid "Goto Case"
+msgstr "Ga naar case"
+
+#: src/ui/gui/psppire.ui:2106
 msgid "Goto Case Number:"
 msgstr "Ga naar Case Nummer:"
 
-#: src/ui/gui/psppire.glade:2287
+#: src/ui/gui/psppire.ui:2149
+#, fuzzy
+msgid "Select Cases: Random Sample"
+msgstr "Selecteer cases"
+
+#: src/ui/gui/psppire.ui:2247
 msgid "Sample Size"
 msgstr "Steekproef Grootte"
 
-#: src/ui/gui/oneway.glade:30
-msgid "_Factor:"
-msgstr ""
-
-#: src/ui/gui/oneway.glade:66
-msgid "Dependent _Variable(s):"
-msgstr ""
-
-#: src/ui/gui/oneway.glade:190
-msgid "_Homogeneity"
-msgstr ""
-
-#: src/ui/gui/oneway.glade:226
-msgid "_Contrasts..."
-msgstr ""
-
-#: src/ui/gui/oneway.glade:309
-msgid "gtk-go-back"
-msgstr ""
-
-#: src/ui/gui/oneway.glade:320
-msgid "gtk-go-forward"
-msgstr ""
-
-#: src/ui/gui/oneway.glade:343
-msgid "_Coefficients:"
-msgstr ""
-
-#: src/ui/gui/oneway.glade:389
-msgid "Coefficient Total: "
-msgstr ""
-
-#: src/ui/gui/oneway.glade:422
-msgid "Contrast 1 of 1"
-msgstr ""
-
-#: src/ui/gui/output-viewer.glade:32
-msgid "gtk-save"
-msgstr ""
-
-#: src/ui/gui/output-viewer.glade:41
-msgid "gtk-save-as"
-msgstr ""
-
-#: src/ui/gui/output-viewer.glade:65
-msgid "gtk-copy"
-msgstr ""
+#: src/ui/gui/rank.ui:8
+msgid "Rank Cases"
+msgstr "Rangschik Cases"
 
-#: src/ui/gui/rank.glade:57
+#: src/ui/gui/rank.ui:58
 msgid "By:"
 msgstr "Per:"
 
-#: src/ui/gui/rank.glade:196
+#: src/ui/gui/rank.ui:204
 msgid "_Smallest Value"
 msgstr "_Kleinste Waarde"
 
-#: src/ui/gui/rank.glade:208
+#: src/ui/gui/rank.ui:221
 msgid "_Largest Value"
 msgstr "_Grootste Waarde"
 
-#: src/ui/gui/rank.glade:227
+#: src/ui/gui/rank.ui:245
 msgid "Assign rank 1 to:"
 msgstr "Ken rang 1 toe aan:"
 
-#: src/ui/gui/rank.glade:245
+#: src/ui/gui/rank.ui:261
 msgid "_Display summary tables"
 msgstr "_Toon totalen tabellen"
 
-#: src/ui/gui/rank.glade:261
+#: src/ui/gui/rank.ui:279
 msgid "Rank T_ypes"
 msgstr "Rangschik T_ypes"
 
-#: src/ui/gui/rank.glade:272
+#: src/ui/gui/rank.ui:294
 msgid "_Ties..."
 msgstr ""
 
-#: src/ui/gui/rank.glade:339
+#: src/ui/gui/rank.ui:346
+#, fuzzy
+msgid "Rank Cases: Types"
+msgstr "Rangschik Cases"
+
+#: src/ui/gui/rank.ui:366
 msgid "Sum of case weights"
 msgstr "Totaal van case gewichten"
 
-#: src/ui/gui/rank.glade:355
+#: src/ui/gui/rank.ui:382
 msgid "Fractional rank as %"
 msgstr ""
 
-#: src/ui/gui/rank.glade:369
+#: src/ui/gui/rank.ui:396
 msgid "Fractional rank"
 msgstr ""
 
-#: src/ui/gui/rank.glade:383
+#: src/ui/gui/rank.ui:410
 msgid "Savage score"
 msgstr ""
 
-#: src/ui/gui/rank.glade:397
+#: src/ui/gui/rank.ui:424
 msgid "Rank"
 msgstr ""
 
-#: src/ui/gui/rank.glade:411
+#: src/ui/gui/rank.ui:438
 msgid "Ntiles"
-msgstr ""
+msgstr "Ntiles"
 
-#: src/ui/gui/rank.glade:450
+#: src/ui/gui/rank.ui:481
 msgid "Proportion Estimates"
 msgstr ""
 
-#: src/ui/gui/rank.glade:460
+#: src/ui/gui/rank.ui:494
 msgid "Normal Scores"
 msgstr ""
 
-#: src/ui/gui/rank.glade:494
+#: src/ui/gui/rank.ui:529
 msgid "Blom"
-msgstr ""
+msgstr "Blom"
 
-#: src/ui/gui/rank.glade:505
+#: src/ui/gui/rank.ui:543
 msgid "Tukey"
-msgstr ""
+msgstr "Tukey"
 
-#: src/ui/gui/rank.glade:519
+#: src/ui/gui/rank.ui:557
 msgid "Rankit"
-msgstr ""
+msgstr "Rankit"
 
-#: src/ui/gui/rank.glade:533
+#: src/ui/gui/rank.ui:571
 msgid "Van der Wärden"
-msgstr ""
+msgstr "Van der Wärden"
 
-#: src/ui/gui/rank.glade:550
+#: src/ui/gui/rank.ui:591
 msgid "Proportion Estimation Formula"
 msgstr ""
 
-#: src/ui/gui/rank.glade:612
+#: src/ui/gui/rank.ui:625
+#, fuzzy
+msgid "Rank Cases: Ties"
+msgstr "Rangschik Cases"
+
+#: src/ui/gui/rank.ui:651
 msgid "_Mean"
 msgstr "_Gemiddeld"
 
-#: src/ui/gui/rank.glade:624
+#: src/ui/gui/rank.ui:668
 msgid "_Low"
 msgstr "_Laag"
 
-#: src/ui/gui/rank.glade:640
+#: src/ui/gui/rank.ui:686
 msgid "_High"
 msgstr "_Hoog"
 
-#: src/ui/gui/rank.glade:658
+#: src/ui/gui/rank.ui:709
 msgid "_Sequential ranks to unique values"
-msgstr "_Sequentiele rangen naar unieke waardes"
+msgstr "_Sequentiële rangen naar unieke waardes"
 
-#: src/ui/gui/rank.glade:678
+#: src/ui/gui/rank.ui:732
 msgid "Rank Assigned to Ties"
 msgstr ""
 
-#: src/ui/gui/recode.glade:197
-msgid "System-Missing"
-msgstr ""
+#: src/ui/gui/sort.ui:8
+msgid "Sort Cases"
+msgstr "Sorteer cases"
+
+#: src/ui/gui/sort.ui:79
+msgid "Sort by:"
+msgstr "Sorteer op:"
+
+#: src/ui/gui/sort.ui:146
+msgid "Descending"
+msgstr "Aflopend"
 
-#: src/ui/gui/recode.glade:211
-msgid "System-or user-missing"
+#: src/ui/gui/sort.ui:168
+msgid "Sort Order"
+msgstr "Sorteervolgorde"
+
+#: src/ui/gui/recode.ui:185 src/ui/gui/recode.ui:467
+msgid "System Missing"
+msgstr "Ontbrekende waarde"
+
+#: src/ui/gui/recode.ui:199
+msgid "System or User Missing"
 msgstr ""
 
-#: src/ui/gui/recode.glade:245
+#: src/ui/gui/recode.ui:237
 msgid "through"
 msgstr "tot"
 
-#: src/ui/gui/recode.glade:283
+#: src/ui/gui/recode.ui:275
 msgid "Range, LOWEST thru value"
-msgstr "Range, LAAGSTE tot waarde"
+msgstr "Bereik, LAAGSTE tot waarde"
 
-#: src/ui/gui/recode.glade:297
+#: src/ui/gui/recode.ui:289
 msgid "Range, value thru HIGHEST"
-msgstr "Range, waarde tot HOOGSTE"
+msgstr "Bereik, waarde tot HOOGSTE"
 
-#: src/ui/gui/recode.glade:327
+#: src/ui/gui/recode.ui:319
 msgid "All other values"
 msgstr "Alle andere waardes"
 
-#: src/ui/gui/recode.glade:363
+#: src/ui/gui/recode.ui:355
 msgid "Range:"
-msgstr ""
+msgstr "Bereik:"
 
-#: src/ui/gui/recode.glade:380
+#: src/ui/gui/recode.ui:384
 msgid "Old Value"
 msgstr "Oude Waarde"
 
-#: src/ui/gui/recode.glade:462
-msgid "System Missing"
-msgstr ""
-
-#: src/ui/gui/recode.glade:476
+#: src/ui/gui/recode.ui:481
 msgid "Copy old values"
 msgstr "Kopieer oude waardes"
 
-#: src/ui/gui/recode.glade:500
+#: src/ui/gui/recode.ui:505
 msgid "Value: "
 msgstr "Waarde: "
 
-#: src/ui/gui/recode.glade:530
+#: src/ui/gui/recode.ui:538
 msgid "New Value"
 msgstr "Nieuwe Waarde"
 
-#: src/ui/gui/recode.glade:590
+#: src/ui/gui/recode.ui:596
 msgid "Convert numeric strings to numbers ('5' -> 5)"
-msgstr "Converteer numerieke strings naar nummers ('5' -> 5)"
+msgstr "Converteer numerieke tekenreeksen naar nummers ('5' -> 5)"
 
-#: src/ui/gui/recode.glade:608
+#: src/ui/gui/recode.ui:614
 msgid "Output variables are strings"
-msgstr "Uitvoer variabelen zijn strings"
+msgstr "Uitvoervariabelen zijn tekenreeksen"
 
-#: src/ui/gui/recode.glade:620
+#: src/ui/gui/recode.ui:629
 msgid "Width: "
 msgstr "Breedte: "
 
-#: src/ui/gui/recode.glade:743
+#: src/ui/gui/recode.ui:757
 msgid "(optional case selection condition)"
 msgstr "(optionele case selectie conditie)"
 
-#: src/ui/gui/recode.glade:823
+#: src/ui/gui/recode.ui:838
 msgid "Name:"
 msgstr "Naam:"
 
-#: src/ui/gui/recode.glade:867
+#: src/ui/gui/recode.ui:881
 msgid "Change"
 msgstr "Wijzig"
 
-#: src/ui/gui/recode.glade:885
+#: src/ui/gui/recode.ui:907
 msgid "Output Variable"
-msgstr "Uitvoer Variabele"
+msgstr "Uitvoervariabele"
 
-#: src/ui/gui/recode.glade:965
+#: src/ui/gui/recode.ui:981
 msgid "Old and New Values"
 msgstr "Oude en Nieuwe Waardes"
 
-#: src/ui/gui/regression.glade:40
+#: src/ui/gui/regression.ui:41
 msgid "Save..."
 msgstr "Opslaan..."
 
-#: src/ui/gui/regression.glade:145
+#: src/ui/gui/regression.ui:156
 msgid "Dependent"
 msgstr "Afhankelijk"
 
-#: src/ui/gui/regression.glade:193
+#: src/ui/gui/regression.ui:201
 msgid "Independent"
 msgstr "Onafhankelijk"
 
-#: src/ui/gui/regression.glade:243
+#: src/ui/gui/regression.ui:236
+msgid "Regression: Save"
+msgstr "Regressie: Opslaan"
+
+#: src/ui/gui/regression.ui:250
 msgid "Predicted values"
 msgstr "Voorspelde waardes"
 
-#: src/ui/gui/regression.glade:252
+#: src/ui/gui/regression.ui:263
 msgid "Residuals"
 msgstr "Restant"
 
-#: src/ui/gui/reliability.glade:89
+#: src/ui/gui/regression.ui:298
+msgid "Regression: Statistics"
+msgstr "Regressie: Statistieken"
+
+#: src/ui/gui/reliability.ui:27
+msgid "Reliability Analysis"
+msgstr "Betrouwbaarheids Analyses"
+
+#: src/ui/gui/reliability.ui:114
 msgid "_Items:"
-msgstr ""
+msgstr "_Items:"
 
-#: src/ui/gui/reliability.glade:111
+#: src/ui/gui/reliability.ui:136
 msgid "Model:\t"
+msgstr "Model:\t"
+
+#: src/ui/gui/reliability.ui:175
+msgid "Variables in first split:"
+msgstr "Variabelen in eerste splitsing:"
+
+#: src/ui/gui/roc.ui:115
+msgid "_Test Variable:"
+msgstr "Testvariabele:"
+
+#: src/ui/gui/roc.ui:147
+msgid "_State Variable:"
 msgstr ""
 
-#: src/ui/gui/reliability.glade:122
-msgid ""
-"Alpha\n"
-"Split"
+#: src/ui/gui/roc.ui:172
+msgid "_Value of state variable:"
 msgstr ""
-"Alpha\n"
-"Splits"
 
-#: src/ui/gui/reliability.glade:144
-msgid "Variables in first split:"
-msgstr "Variabelen in eerste splits:"
+#: src/ui/gui/roc.ui:209
+msgid "ROC C_urve"
+msgstr "ROC C_urve"
 
-#: src/ui/gui/syntax-editor.glade:163
-msgid "_Run"
+#: src/ui/gui/roc.ui:227
+msgid "_With diagonal reference line"
 msgstr ""
 
-#: src/ui/gui/syntax-editor.glade:172
-msgid "All"
-msgstr "Alles"
+#: src/ui/gui/roc.ui:251
+msgid "Standard _Error and Confidence Interval"
+msgstr ""
 
-#: src/ui/gui/syntax-editor.glade:180
-msgid "Selection"
-msgstr "Selectie"
+#: src/ui/gui/roc.ui:266
+msgid "_Coordinate points of the ROC Curve"
+msgstr ""
 
-#: src/ui/gui/syntax-editor.glade:188
-msgid "Current Line"
-msgstr "Huidige Regel"
+#: src/ui/gui/t-test.ui:8
+msgid "Independent-Samples T Test"
+msgstr "Independent-Samples T Test"
 
-#: src/ui/gui/syntax-editor.glade:197
-msgid "To End"
-msgstr "Naar Einde"
+#: src/ui/gui/t-test.ui:54 src/ui/gui/t-test.ui:175 src/ui/gui/t-test.ui:231
+msgid "Define Groups"
+msgstr "Definieer Groepen"
+
+#: src/ui/gui/t-test.ui:131 src/ui/gui/t-test.ui:584 src/ui/gui/t-test.ui:803
+msgid "Test Variable(s):"
+msgstr "Testvariabele(n):"
+
+#: src/ui/gui/t-test.ui:271
+msgid "Group_2 value:"
+msgstr "Groep_2 waarde:"
+
+#: src/ui/gui/t-test.ui:284
+msgid "Group_1 value:"
+msgstr "Groep_1 waarde:"
+
+#: src/ui/gui/t-test.ui:365
+msgid "_Use specified values:"
+msgstr "_Gebruik gespecificeerde waardes:"
+
+#: src/ui/gui/t-test.ui:420
+msgid "Options"
+msgstr "Opties "
+
+#: src/ui/gui/t-test.ui:452
+msgid "Exclude cases _analysis by analysis"
+msgstr "Sluit cases _analysis by analysis uit"
+
+#: src/ui/gui/t-test.ui:469
+msgid "Exclude cases _listwise"
+msgstr "Sluit cases _listwise uit"
 
-#: src/ui/gui/text-data-import.glade:8
+#: src/ui/gui/t-test.ui:529
+msgid "One - Sample T Test"
+msgstr "One - Sample T Test"
+
+#: src/ui/gui/t-test.ui:626
+msgid "Test Value: "
+msgstr "Testwaarde: "
+
+#: src/ui/gui/t-test.ui:704
+msgid "Paired Samples T Test"
+msgstr "Paired Samples T Test"
+
+#: src/ui/gui/text-data-import.ui:8
 msgid "Importing Textual Data"
-msgstr ""
+msgstr "Importeren Textuele Gegevens"
 
-#: src/ui/gui/text-data-import.glade:18
+#: src/ui/gui/text-data-import.ui:19
 msgid ""
 "This assistant will guide you through the process of importing data into "
 "PSPP from a text file with one line per case,  in which fields are separated "
@@ -5819,1101 +6812,1082 @@ msgid ""
 "be shown for preview purposes in the following screens.  You may choose "
 "below how much of the file should actually be imported."
 msgstr ""
-"Deze assistant zal je assisteren bij het proces van het importeren van data "
-"in PSPP vanuit een text bestand met een regel per case en velden gescheiden "
-"met tabs, kommas of andere scheiders.\n"
+"Deze assistent zal je assisteren bij het proces van het importeren van "
+"gegevens in PSPP vanuit een tekstbestand met een regel per case en velden "
+"gescheiden met tabs, komma's of andere scheiders.\n"
 " \n"
-"Het geselecteerde bestand bevat N regels text.  Alleen de eerste  M hiervan "
+"Het geselecteerde bestand bevat N regels tekst.  Alleen de eerste  M hiervan "
 "zullen getoond worden voor voorbeeld doeleinden in de volgende schermen.  Je "
 "kunt hieronder kiezen hoeveel van het bestand daadwerkelijk geïmporteerd "
 "moet worden."
 
-#: src/ui/gui/text-data-import.glade:50
+#: src/ui/gui/text-data-import.ui:52
 msgid "All cases"
 msgstr "Alle cases"
 
-#: src/ui/gui/text-data-import.glade:66 src/ui/gui/text-data-import.glade:122
+#: src/ui/gui/text-data-import.ui:71 src/ui/gui/text-data-import.ui:128
 msgid "Only first "
 msgstr "Alleen eerste "
 
-#: src/ui/gui/text-data-import.glade:97
+#: src/ui/gui/text-data-import.ui:106
 msgid " cases"
-msgstr ""
+msgstr " cases"
 
-#: src/ui/gui/text-data-import.glade:152
+#: src/ui/gui/text-data-import.ui:162
 msgid "% of file (approximately)"
 msgstr "% van bestand (ongeveer)"
 
-#: src/ui/gui/text-data-import.glade:173
+#: src/ui/gui/text-data-import.ui:183
 msgid "<b>Amount to Import</b>"
 msgstr "<b>Aantal te Importeren</b>"
 
-#: src/ui/gui/text-data-import.glade:195
+#: src/ui/gui/text-data-import.ui:202
 msgid "Select Data to Import"
-msgstr "Selecteer Data om te Importeren"
+msgstr "Selecteer Gegevens om te Importeren"
 
-#: src/ui/gui/text-data-import.glade:205
+#: src/ui/gui/text-data-import.ui:213
 msgid "Select the first line of the data file that contains data."
-msgstr "Selecteer de eerste regel van het data bestand die data bevat."
+msgstr "Selecteer de eerste regel van het gegevensbestand die gegevens bevat."
 
-#: src/ui/gui/text-data-import.glade:236
+#: src/ui/gui/text-data-import.ui:241
 msgid "Line above selected line contains variable names"
-msgstr "De regel boven de geselecteerde data regel bevat de variabele namen"
+msgstr "De regel boven de geselecteerde gegevensregel bevat de variabelennamen"
 
-#: src/ui/gui/text-data-import.glade:251
+#: src/ui/gui/text-data-import.ui:259
 msgid "Choose Separators"
 msgstr "Kies scheidingstekens"
 
-#: src/ui/gui/text-data-import.glade:299
+#: src/ui/gui/text-data-import.ui:305
 msgid "C_ustom"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:314
+#: src/ui/gui/text-data-import.ui:320
 msgid "Slas_h (/)"
-msgstr ""
+msgstr "Sc_huine streep (/)"
 
-#: src/ui/gui/text-data-import.glade:331
+#: src/ui/gui/text-data-import.ui:337
 msgid "Semicolo_n (;)"
-msgstr "Pu_ntkomma(;)"
+msgstr "Pu_ntkomma (;)"
 
-#: src/ui/gui/text-data-import.glade:348
+#: src/ui/gui/text-data-import.ui:354
 msgid "P_ipe (|)"
-msgstr ""
+msgstr "P_ijp (|)"
 
-#: src/ui/gui/text-data-import.glade:363
+#: src/ui/gui/text-data-import.ui:369
 msgid "H_yphen (-)"
-msgstr ""
+msgstr "Streep (-)"
 
-#: src/ui/gui/text-data-import.glade:380
+#: src/ui/gui/text-data-import.ui:386
 msgid "Co_mma (,)"
 msgstr "Ko_mma (,)"
 
-#: src/ui/gui/text-data-import.glade:397
+#: src/ui/gui/text-data-import.ui:403
 msgid "_Colon (:)"
-msgstr "_Dubbele punt (:)"
+msgstr "_Dubbelepunt (:)"
 
-#: src/ui/gui/text-data-import.glade:412
+#: src/ui/gui/text-data-import.ui:418
 msgid "Ban_g (!)"
-msgstr "Uitroepteken(!)"
+msgstr "Uitroepteken (!)"
 
-#: src/ui/gui/text-data-import.glade:427
+#: src/ui/gui/text-data-import.ui:433
 msgid "Ta_b"
-msgstr ""
+msgstr "Ta_b"
 
-#: src/ui/gui/text-data-import.glade:442
+#: src/ui/gui/text-data-import.ui:448
 msgid "_Space"
 msgstr "_Spatie"
 
-#: src/ui/gui/text-data-import.glade:456
+#: src/ui/gui/text-data-import.ui:465
 msgid "<b>Separators</b>"
 msgstr "<b>Scheiders</b>"
 
-#: src/ui/gui/text-data-import.glade:489
+#: src/ui/gui/text-data-import.ui:495
 msgid "Doubled quote mark treated as escape"
 msgstr ""
 
-#: src/ui/gui/text-data-import.glade:526
+#: src/ui/gui/text-data-import.ui:524
 msgid "Quote separator characters with"
 msgstr "Citeer scheidingstekens met"
 
-#: src/ui/gui/text-data-import.glade:543
+#: src/ui/gui/text-data-import.ui:544
 msgid "<b>Quoting</b>"
 msgstr "<b>Citeren</b>"
 
-#: src/ui/gui/text-data-import.glade:594
+#: src/ui/gui/text-data-import.ui:592
 msgid "<b>Fields Preview</b>"
-msgstr "<b>Velden Voorbeeld</b>"
+msgstr "<b>Veldenvoorbeeld</b>"
 
-#: src/ui/gui/text-data-import.glade:612
+#: src/ui/gui/text-data-import.ui:607
 msgid "Adjust Variable Formats"
-msgstr "Pas Variabele Formaat aan"
+msgstr "Pas Variabelenopmaak aan"
 
-#: src/ui/gui/text-data-import.glade:622
+#: src/ui/gui/text-data-import.ui:618
 msgid ""
 "Check the data formats displayed below and fix any that are incorrect.  You "
 "may set other variable properties now or later."
 msgstr ""
-"Controleer de data formaten hieronder en verbeter degene die foutief zijn. "
-"Je mag andere variabele opties nu of later zetten."
+"Controleer de gegevensopmaak hieronder en verbeter degene die foutief zijn. "
+"Je mag andere variabelenopties nu of later zetten."
 
-#: src/ui/gui/text-data-import.glade:665
+#: src/ui/gui/text-data-import.ui:662
 msgid "<b>Variables</b>"
 msgstr "<b>Variabelen</b>"
 
-#: src/ui/gui/text-data-import.glade:712
+#: src/ui/gui/text-data-import.ui:705
 msgid "<b>Data Preview</b>"
-msgstr "<b>Data Voorbeeld</b>"
-
-#: src/ui/gui/t-test.glade:56 src/ui/gui/t-test.glade:165
-msgid "Define Groups"
-msgstr "Definieer Groepen"
-
-#: src/ui/gui/t-test.glade:123 src/ui/gui/t-test.glade:549
-#: src/ui/gui/t-test.glade:761
-msgid "Test Variable(s):"
-msgstr "Test Variabel(en):"
-
-#: src/ui/gui/t-test.glade:258
-msgid "Group_2 value:"
-msgstr "Groep_2 waarde:"
-
-#: src/ui/gui/t-test.glade:271
-msgid "Group_1 value:"
-msgstr "Groep_1 waarde:"
-
-#: src/ui/gui/t-test.glade:320
-msgid "_Cut point:"
-msgstr "_Knip punt:"
-
-#: src/ui/gui/t-test.glade:349
-msgid "_Use specified values:"
-msgstr "_Gebruik gespecificeerde waardes:"
-
-#: src/ui/gui/t-test.glade:431
-msgid "Exclude cases _analysis by analysis"
-msgstr "Sluit cases _analysis by analysis uit"
-
-#: src/ui/gui/t-test.glade:442
-msgid "Exclude cases _listwise"
-msgstr "Sluit cases _listwise uit"
+msgstr "<b>Gegevensvoorbeeld</b>"
 
-#: src/ui/gui/t-test.glade:594
-msgid "Test Value: "
-msgstr "Test Waarde:"
-
-#: src/ui/gui/var-sheet-dialogs.glade:7
+#: src/ui/gui/var-sheet-dialogs.ui:7
 msgid "Variable Type"
-msgstr "Variabele Type"
+msgstr "Variabelentype"
 
-#: src/ui/gui/var-sheet-dialogs.glade:75
+#: src/ui/gui/var-sheet-dialogs.ui:75
 msgid "Scientific notation"
 msgstr "Wetenschappelijke notatie"
 
-#: src/ui/gui/var-sheet-dialogs.glade:123
+#: src/ui/gui/var-sheet-dialogs.ui:123
 msgid "Custom currency"
 msgstr "Aangepaste waarde"
 
-#: src/ui/gui/var-sheet-dialogs.glade:217
+#: src/ui/gui/var-sheet-dialogs.ui:225
 msgid "positive"
 msgstr "positief"
 
-#: src/ui/gui/var-sheet-dialogs.glade:223
+#: src/ui/gui/var-sheet-dialogs.ui:234
 msgid "negative"
 msgstr "negatief"
 
-#: src/ui/gui/var-sheet-dialogs.glade:236
+#: src/ui/gui/var-sheet-dialogs.ui:247
 msgid "Sample"
 msgstr "Steekproef"
 
-#: src/ui/gui/var-sheet-dialogs.glade:286
+#: src/ui/gui/var-sheet-dialogs.ui:294
 msgid "Width:"
 msgstr "Breedte:"
 
-#: src/ui/gui/var-sheet-dialogs.glade:330
+#: src/ui/gui/var-sheet-dialogs.ui:339
 msgid "Decimal Places:"
 msgstr "Decimalen:"
 
-#: src/ui/gui/var-sheet-dialogs.glade:499
+#: src/ui/gui/var-sheet-dialogs.ui:419 src/ui/gui/var-sheet-dialogs.ui:610
+msgid "Value Labels"
+msgstr "Waardelabels"
+
+#: src/ui/gui/var-sheet-dialogs.ui:518
 msgid "Value Label:"
-msgstr "Waarde Label:"
+msgstr "Waardelabel:"
 
-#: src/ui/gui/var-sheet-dialogs.glade:677
+#: src/ui/gui/var-sheet-dialogs.ui:711
 msgid "_No missing values"
-msgstr ""
+msgstr "Geen missende waardes"
 
-#: src/ui/gui/var-sheet-dialogs.glade:747
+#: src/ui/gui/var-sheet-dialogs.ui:782
 msgid "_Discrete missing values"
-msgstr ""
+msgstr "_Discrete missende waardes"
 
-#: src/ui/gui/var-sheet-dialogs.glade:782
+#: src/ui/gui/var-sheet-dialogs.ui:816
 msgid "_Low:"
 msgstr "_Laag:"
 
-#: src/ui/gui/var-sheet-dialogs.glade:801
+#: src/ui/gui/var-sheet-dialogs.ui:835
 msgid "_High:"
 msgstr "_Hoog:"
 
-#: src/ui/gui/var-sheet-dialogs.glade:826
+#: src/ui/gui/var-sheet-dialogs.ui:860
 msgid "Di_screte value:"
-msgstr ""
+msgstr "Di_screte waarde:"
 
-#: src/ui/gui/var-sheet-dialogs.glade:856
+#: src/ui/gui/var-sheet-dialogs.ui:888
 msgid "_Range plus one optional discrete missing value"
 msgstr ""
 
-#: src/ui/gui/variable-info-dialog.glade:49
+#: src/ui/gui/variable-info.ui:50
 msgid "Variable Information:"
-msgstr "Variabele Informatie:"
+msgstr "Variabeleninformatie:"
 
-#: tests/dissect-sysfile.c:528
-#, fuzzy, c-format
-msgid "Unrecognized record type 7, subtype %d."
-msgstr "Niet herkend record type %d."
+#: src/ui/gui/data-editor.ui:9
+msgid "Sort Ascending"
+msgstr "Sorteer oplopend"
 
-#: tests/dissect-sysfile.c:701
-#, fuzzy, c-format
-msgid "%s: Error parsing attribute value %s[%d]"
-msgstr "Fout bij het ontleden van attribuut waarde %s[%d]"
+#: src/ui/gui/data-editor.ui:15
+msgid "Sort Descending"
+msgstr "Sorteer aflopend"
 
-#: tests/dissect-sysfile.c:707
-#, fuzzy, c-format
-msgid "%s: Attribute value %s[%d] is not quoted: %s"
-msgstr "Attribuut waarde %s[%d] is niet geciteerd: %s"
+#: src/ui/gui/data-editor.ui:26 src/ui/gui/output-viewer.ui:9
+#: src/ui/gui/syntax-editor.ui:10
+msgid "_File"
+msgstr "_Bestand"
 
-#, fuzzy
-#~ msgid "NAME subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:38 src/ui/gui/syntax-editor.ui:22
+#: src/ui/gui/syntax-editor.ui:40
+msgid "_Syntax"
+msgstr "_Syntax"
 
-#, fuzzy
-#~ msgid "LRECL subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:44 src/ui/gui/data-editor.ui:217
+#: src/ui/gui/data-editor.ui:229 src/ui/gui/syntax-editor.ui:28
+#: src/ui/gui/syntax-editor.ui:46
+msgid "_Data"
+msgstr "_Gegevens"
 
-#, fuzzy
-#~ msgid "TABWIDTH subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:56
+msgid "_Import Delimited Text Data"
+msgstr "Gescheiden tekstgegevens _importeren"
 
-#, fuzzy
-#~ msgid "MODE subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:75
+msgid "D_isplay Data File Information"
+msgstr "Gegevensbestand_informatie tonen"
 
-#, fuzzy
-#~ msgid "RECFORM subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:81
+msgid "Working File"
+msgstr "Werkbestand"
 
-#~ msgid ""
-#~ "File handle %s is already defined.  Use CLOSE FILE HANDLE before "
-#~ "redefining a file handle."
-#~ msgstr ""
-#~ "Bestand 'handle' %s is al gedefinieerd. Gebruik CLOSE FILE HANDLE voor "
-#~ "het opnieuw definiëren van een bestand 'handle'."
+#: src/ui/gui/data-editor.ui:87
+msgid "External File"
+msgstr "Extern bestand"
 
-#~ msgid "RECFORM must be specified with MODE=360."
-#~ msgstr "RECFORM moet opgegeven worden met MODE=360."
+#: src/ui/gui/data-editor.ui:93
+msgid "Recently Used Da_ta"
+msgstr "Recent gebruikte _gegevens"
 
-#~ msgid ""
-#~ "The specified file mode requires LRECL.  Assuming %d-character records."
-#~ msgstr ""
-#~ "De gespecificeerd bestandsmodus vereist LRECL. %d-karakter records "
-#~ "veronderstelt."
+#: src/ui/gui/data-editor.ui:99
+msgid "Recently Used _Files"
+msgstr "Recent gebruikte _bestanden"
 
-#~ msgid ""
-#~ "Record length (%ld) must be between 1 and %lu bytes.  Assuming %d-"
-#~ "character records."
-#~ msgstr ""
-#~ "Record lengte (%ld) moet tussen 1 en %lu bytes zijn. Veronderstel %d-"
-#~ "karakters records."
+# Standaard snelleter voor Bewerken is de w.
+#: src/ui/gui/data-editor.ui:111 src/ui/gui/output-viewer.ui:28
+#: src/ui/gui/syntax-editor.ui:70
+msgid "_Edit"
+msgstr "Be_werken"
+
+#: src/ui/gui/data-editor.ui:117
+msgid "Insert Variable"
+msgstr "Invoegen variabele"
+
+#: src/ui/gui/data-editor.ui:118
+msgid "Create a new variable at the current position"
+msgstr "Creëer een nieuwe variabele op de huidige positie"
+
+#: src/ui/gui/data-editor.ui:125
+msgid "Insert Cases"
+msgstr "Invoegen cases"
+
+#: src/ui/gui/data-editor.ui:126
+msgid "Create a new case at the current position"
+msgstr "Creëer een nieuwe case op de huidige positie"
+
+#: src/ui/gui/data-editor.ui:132
+msgid "Go To Case"
+msgstr "Ga naar case"
+
+#: src/ui/gui/data-editor.ui:134
+#, fuzzy
+msgid "Jump to a case in the data sheet"
+msgstr "Spring naar een Case in het Gegevensblad"
+
+#: src/ui/gui/data-editor.ui:160
+msgid "Cl_ear Variables"
+msgstr "Wis _variabelen"
 
-#~ msgid "file"
-#~ msgstr "bestand"
+#: src/ui/gui/data-editor.ui:161
+msgid "Delete the variables at the selected position(s)"
+msgstr "Verwijder de variabele op de geselecteerde positie(s)"
 
-#~ msgid "inline file"
-#~ msgstr "inline bestand"
+#: src/ui/gui/data-editor.ui:169
+msgid "_Clear Cases"
+msgstr "Wis _cases"
 
-#~ msgid "expecting a file name or handle name"
-#~ msgstr "file naam of 'handle' naam verwacht"
+#: src/ui/gui/data-editor.ui:170
+msgid "Delete the cases at the selected position(s)"
+msgstr "Verwijder de cases op de geselecteerde positie(s)"
 
-#~ msgid "Handle for %s not allowed here."
-#~ msgstr "'Handle' voor %s is hier niet toegestaan."
+#: src/ui/gui/data-editor.ui:182
+msgid "_View"
+msgstr "Beel_d"
 
-#, fuzzy
-#~ msgid "VARIABLES subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:189
+msgid "_Status Bar"
+msgstr "_Statusbalk"
 
-#, fuzzy
-#~ msgid "CASES subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:195
+msgid "_Fonts"
+msgstr "_Fonts"
 
-#~ msgid ""
-#~ "The first case (%ld) specified precedes the last case (%ld) specified.  "
-#~ "The values will be swapped."
-#~ msgstr ""
-#~ "De eerste gespecificeerde case (%ld) gaat vooraf aan de laatste "
-#~ "gespecificeerde case (%ld). De waardes worden verwisseld."
+#: src/ui/gui/data-editor.ui:203
+msgid "_Grid Lines"
+msgstr "_Rasterlijnen"
 
-#~ msgid ""
-#~ "The first case (%ld) to list is less than 1.  The value is being reset to "
-#~ "1."
-#~ msgstr ""
-#~ "De eerste case (%ld) om weer te geven is kleiner dan 1. De waarde is "
-#~ "teruggezet op 1."
+#: src/ui/gui/data-editor.ui:209
+msgid "Value _Labels"
+msgstr "Waarde_labels"
 
-#~ msgid ""
-#~ "The last case (%ld) to list is less than 1.  The value is being reset to "
-#~ "1."
-#~ msgstr ""
-#~ "De laatste case (%ld) om weer te geven is kleiner dan 1. De waarde is "
-#~ "teruggezet op 1."
+#: src/ui/gui/data-editor.ui:210
+msgid "Show/hide value labels"
+msgstr "Toon/verberg waardelabels"
 
-#~ msgid "The step value %ld is less than 1.  The value is being reset to 1."
-#~ msgstr "De stap waarde %ld is kleiner dan 1. De waarde is teruggezet op 1."
+#: src/ui/gui/data-editor.ui:223 src/ui/gui/data-editor.ui:430
+msgid "_Variables"
+msgstr "_Variabelen"
 
-#~ msgid "`/FORMAT WEIGHT' specified, but weighting is not on."
-#~ msgstr "'/FORMAT WEIGHT' gespecificeerd, maar weging is niet aan."
+#: src/ui/gui/data-editor.ui:234
+msgid "_Sort Cases"
+msgstr "_Sorteer Cases"
 
-#~ msgid "Line"
-#~ msgstr "Regel"
+#: src/ui/gui/data-editor.ui:237
+msgid "Sort cases in the active file"
+msgstr "Sorteer cases in het actieve bestand"
 
-#, fuzzy
-#~ msgid "BLANKS subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:244
+msgid "_Transpose"
+msgstr "_Herschikken"
 
-#, fuzzy
-#~ msgid "BLOCK subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:245
+msgid "Transpose the cases with the variables"
+msgstr "Herschik de cases met de variabelen"
 
-#, fuzzy
-#~ msgid "BOXSTRING subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:251
+msgid "S_plit File"
+msgstr "S_plits bestand"
 
-#, fuzzy
-#~ msgid "CASE subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:252
+msgid "Split the active file"
+msgstr "Splits het actieve bestand"
 
-#, fuzzy
-#~ msgid "CCA subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:259
+msgid "Select _Cases"
+msgstr "Selecteer _cases"
 
-#, fuzzy
-#~ msgid "CCB subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:265
+msgid "_Weight Cases"
+msgstr "_Weeg cases"
 
-#, fuzzy
-#~ msgid "CCC subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:266
+msgid "Weight cases by variable"
+msgstr "Weeg cases per variabele"
 
-#, fuzzy
-#~ msgid "CCD subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:273
+msgid "_Transform"
+msgstr "_Transformeren"
 
-#, fuzzy
-#~ msgid "CCE subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:279
+msgid "_Compute"
+msgstr "_Berekenen"
 
-#, fuzzy
-#~ msgid "COMPRESSION subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:285
+msgid "Ran_k Cases"
+msgstr "Rangschi_k cases"
 
-#, fuzzy
-#~ msgid "CPI subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:291
+msgid "Recode into _Same Variables"
+msgstr "Hercodeer in _Zelfde Variabelen"
 
-#, fuzzy
-#~ msgid "CPROMPT subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:297
+msgid "Recode into _Different Variables"
+msgstr "Hercodeer in _Andere Variabelen"
 
-#, fuzzy
-#~ msgid "DECIMAL subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:303
+msgid "_Run Pending Transforms"
+msgstr "_uitvoeren uitstaande Transformaties"
 
-#, fuzzy
-#~ msgid "DISK subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:310
+msgid "_Analyze"
+msgstr "_Analyseer"
 
-#, fuzzy
-#~ msgid "DPROMPT subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:316
+msgid "_Descriptive Statistics"
+msgstr "_Descriptieve statistieken"
 
-#, fuzzy
-#~ msgid "ECHO subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:322
+msgid "_Frequencies"
+msgstr "_Frequenties"
 
-#, fuzzy
-#~ msgid "ENDCMD subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:334
+msgid "_Explore"
+msgstr "_Exploreer"
 
-#, fuzzy
-#~ msgid "EPOCH subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:340
+msgid "_Crosstabs"
+msgstr "_Kruistabellen"
 
-#, fuzzy
-#~ msgid "ERRORBREAK subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:346
+msgid "Compare _Means"
+msgstr ""
 
-#, fuzzy
-#~ msgid "ERRORS subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:352
+msgid "_One Sample T Test"
+msgstr ""
 
-#, fuzzy
-#~ msgid "FORMAT subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:358
+msgid "_Independent Samples T Test"
+msgstr ""
 
-#, fuzzy
-#~ msgid "HEADERS subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:364
+msgid "_Paired Samples T Test"
+msgstr ""
 
-#, fuzzy
-#~ msgid "HIGHRES subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:370
+msgid "One Way _ANOVA"
+msgstr ""
 
-#, fuzzy
-#~ msgid "HISTOGRAM subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:376
+msgid "Bivariate _Correlation..."
+msgstr "Bivariate _correlatie..."
 
-#, fuzzy
-#~ msgid "INCLUDE subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:382
+msgid "Factor _Analysis"
+msgstr "Factor _analyses"
 
-#, fuzzy
-#~ msgid "JOURNAL subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:388
+msgid "Re_liability"
+msgstr "Betrouwbaarheid"
 
-#, fuzzy
-#~ msgid "LOG subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:394
+msgid "Linear _Regression"
+msgstr "Lineare _regressie"
 
-#, fuzzy
-#~ msgid "LENGTH subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:400
+msgid "_Non-Parametric Statistics"
+msgstr ""
 
-#, fuzzy
-#~ msgid "LOCALE subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:406
+msgid "_Chi-Square"
+msgstr "_Chi-Square"
 
-#, fuzzy
-#~ msgid "LISTING subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:412
+msgid "_Binomial"
+msgstr "_Binomiaal"
 
-#, fuzzy
-#~ msgid "LOWRES subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:418
+msgid "ROC Cur_ve..."
+msgstr "ROC Cur_ve..."
 
-#, fuzzy
-#~ msgid "LPI subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:424
+msgid "_Utilities"
+msgstr "E_xtra"
 
-#, fuzzy
-#~ msgid "MENUS subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:431
+msgid "Jump to variable"
+msgstr "Spring naar variabele"
 
-#, fuzzy
-#~ msgid "MESSAGES subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:438
+msgid "Data File _Comments"
+msgstr "Gegevensbestand _commentaren"
 
-#, fuzzy
-#~ msgid "MEXPAND subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:444 src/ui/gui/output-viewer.ui:40
+#: src/ui/gui/syntax-editor.ui:131
+msgid "_Windows"
+msgstr "_Vensters"
 
-#, fuzzy
-#~ msgid "MITERATE subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:450 src/ui/gui/output-viewer.ui:46
+#: src/ui/gui/syntax-editor.ui:137
+msgid "_Minimize All Windows"
+msgstr "_Minimaliseer alle vensters"
 
-#, fuzzy
-#~ msgid "MNEST subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:456
+msgid "_Split"
+msgstr "_Splitsen"
 
-#, fuzzy
-#~ msgid "MPRINT subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:630
+msgid "Information Area"
+msgstr "Informatiegebied"
 
-#, fuzzy
-#~ msgid "MXERRS subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:652
+msgid "Processor Area"
+msgstr "Processorgebied"
 
-#, fuzzy
-#~ msgid "MXLOOPS subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:677
+msgid "Case Counter Area"
+msgstr "Case-tellergebied"
 
-#, fuzzy
-#~ msgid "MXMEMORY subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:702
+msgid "Filter Use Status Area"
+msgstr "Filtergebruik statusgebied"
 
-#, fuzzy
-#~ msgid "MXWARNS subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:728
+msgid "Weight Status Area"
+msgstr "Weging statusgebied"
 
-#, fuzzy
-#~ msgid "NULLINE subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/data-editor.ui:754
+msgid "Split File Status Area"
+msgstr "Splitsbestand statusgebied"
 
-#, fuzzy
-#~ msgid "PRINTBACK subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/output-viewer.ui:22
+msgid "_Export"
+msgstr "_Exporteer"
 
-#, fuzzy
-#~ msgid "PROMPT subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/syntax-editor.ui:100
+msgid "_Run"
+msgstr "Uitvoe_ren"
 
-#, fuzzy
-#~ msgid "RESULTS subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/syntax-editor.ui:106
+msgid "All"
+msgstr "Alles"
 
-#, fuzzy
-#~ msgid "RIB subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/syntax-editor.ui:112
+msgid "Selection"
+msgstr "Selectie"
 
-#, fuzzy
-#~ msgid "RRB subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/syntax-editor.ui:118
+msgid "Current Line"
+msgstr "Huidige regel"
 
-#, fuzzy
-#~ msgid "SAFER subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#: src/ui/gui/syntax-editor.ui:125
+msgid "To End"
+msgstr "Naar einde"
 
-#, fuzzy
-#~ msgid "SCOMPRESSION subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Dependent variable must be numeric."
+#~ msgstr "Afhankelijke variabele moet numeriek zijn."
 
-#, fuzzy
-#~ msgid "SCRIPTTAB subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Variable %s has label of invalid length %zu."
+#~ msgstr "Variabele %s heeft label van ongeldige lengte %zu."
 
 #, fuzzy
-#~ msgid "SEED subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Duplicate variable name %s among target variables."
+#~ msgstr "Dubbele variabelennaam '%s' binnen systeembestand."
 
-#, fuzzy
-#~ msgid "TB1 subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Cannot open reference manual: %s"
+#~ msgstr "Kan de handleiding niet openen: %s"
 
-#, fuzzy
-#~ msgid "TBFONTS subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Clear"
+#~ msgstr "Ruimop"
 
-#, fuzzy
-#~ msgid "UNDEFINED subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Insert Case"
+#~ msgstr "Invoegen case"
 
-#, fuzzy
-#~ msgid "WIB subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Open a data file"
+#~ msgstr "Open een gegevensbestand"
 
-#, fuzzy
-#~ msgid "WRB subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "New data file"
+#~ msgstr "Nieuw gegevensbestand"
 
-#, fuzzy
-#~ msgid "WIDTH subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Import text data file"
+#~ msgstr "Importeer tekstgegevensbestand"
 
-#, fuzzy
-#~ msgid "WORKSPACE subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Save data to file"
+#~ msgstr "Gegevens opslaan als bestand"
 
-#, fuzzy
-#~ msgid "XSORT subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Select cases from the active file"
+#~ msgstr "Selecteer cases van het actieve bestand"
+
+#~ msgid "Compute new values for a variable"
+#~ msgstr "Bereken nieuwe waardes voor een variabele"
 
-#~ msgid "WORKSPACE must be at least 1MB"
-#~ msgstr "WORKSPACE moet minstens 1MB zijn"
+#~ msgid "Commentary text for the data file"
+#~ msgstr "Commentaar tekst voor het gegevensbestand"
 
-#~ msgid "%s is obsolete."
-#~ msgstr "%s is verouderd."
+#~ msgid "Recode values into the same variables"
+#~ msgstr "Hercodeer waardes in dezelfde variabelen"
 
-#~ msgid "%s is not implemented."
-#~ msgstr "%s is niet geïmplementeerd."
+#~ msgid "Recode values into different variables"
+#~ msgstr "Hercodeer waardes in andere variabelen"
 
-#~ msgid "Active file compression is not implemented."
-#~ msgstr "Actief bestand compressie is niet geïmplementeerd."
+#~ msgid "Calculate descriptive statistics (mean, variance, ...)"
+#~ msgstr "Bereken descriptieve statistieken (mean, variance, ...)"
 
-#~ msgid "EPOCH must be 1500 or later."
-#~ msgstr "EPOCH moet 1500 of later zijn."
+#~ msgid "Generate frequency statistics"
+#~ msgstr "Frequentiestatistieken genereren"
 
-#~ msgid "expecting AUTOMATIC or year"
-#~ msgstr "AUTOMATIC of jaar verwacht"
+#~ msgid "Generate crosstabulations"
+#~ msgstr "Kruistabellen genereren"
 
-#~ msgid "LENGTH must be at least 1."
-#~ msgstr "LENGTH moet tenminste 1 zijn."
+#~ msgid "Bivariate Correlation"
+#~ msgstr "Bivariate Correlatie"
 
-#~ msgid "%s is not a recognised encoding or locale name"
-#~ msgstr "%s is geen herkende codering of lokale naam"
+#~ msgid "Split the window vertically and horizontally"
+#~ msgstr "Splits het scherm verticaal en horizontaal"
 
-#~ msgid "WIDTH must be at least 40."
-#~ msgstr "WIDTH moet tenminste 40 zijn."
+#~ msgid "Open Syntax"
+#~ msgstr "Open Syntax"
 
 #~ msgid ""
-#~ "FORMAT requires numeric output format as an argument.  Specified format %"
-#~ "s is of type string."
+#~ "At most one of BARCHART, HISTOGRAM, or HBAR should be given.  HBAR will "
+#~ "be assumed.  Argument values will be given precedence increasing along "
+#~ "the order given."
 #~ msgstr ""
-#~ "FORMAT vereist numeriek uitvoer formaat als een argument. Opgegeven "
-#~ "formaat %s is van het type string."
-
-#, fuzzy
-#~ msgid "%s is %s."
-#~ msgstr "%s van %s"
-
-#, fuzzy
-#~ msgid "TABLES subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
-
-#, fuzzy
-#~ msgid "MISSING subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ "Maximaal een van BARCHART, HISTOGRAM, of HBAR mag opgegeven worden. HBAR "
+#~ "wordt aangenomen.  Argument waardes zullen gebruikt worden in opgegeven "
+#~ "volgorde."
 
 #, fuzzy
-#~ msgid "TABLES subcommand must be given."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
-
 #~ msgid ""
-#~ "Missing mode REPORT not allowed in general mode.  Assuming MISSING=TABLE."
+#~ "MAX must be greater than or equal to MIN, if both are specified.  "
+#~ "However, MIN was specified as %g and MAX as %g.  MIN and MAX will be "
+#~ "ignored."
 #~ msgstr ""
-#~ "Missing modus REPORT niet toegestaan in algemene modus.  MISSING=TABLE "
-#~ "aangenomen."
-
-#~ msgid "Too many cross-tabulation variables or dimensions."
-#~ msgstr "Te veel cross-tabulation variabelen of dimensies."
+#~ "MAX moet groter of gelijk zijn aan MIN, als beiden zijn opgegeven. Maar, "
+#~ "MIN was opgegeven als %g en MAX als %g. MIN en MAX worden genegeerd."
 
-#~ msgid "expecting BY"
-#~ msgstr "BY verwacht"
+#~ msgid "Variable %s specified multiple times on VARIABLES subcommand."
+#~ msgstr "Variabele %s is meerdere keren opgegeven in VARIABLES-subopdracht."
 
-#~ msgid "VARIABLES must be specified before TABLES."
-#~ msgstr "VARIABLES dient voor TABLES gespecificeerd te worden."
+#~ msgid "Freq"
+#~ msgstr "Freq"
 
-#~ msgid "Maximum value (%ld) less than minimum value (%ld)."
-#~ msgstr "Maximum waarde (%ld) is kleiner dan minimum waarde (%ld)."
+#~ msgid "Pct"
+#~ msgstr "Pct"
 
-#~ msgid "Summary."
-#~ msgstr "Overzicht."
+#~ msgid "Cum"
+#~ msgstr "Cum"
 
-#~ msgid "Valid"
-#~ msgstr "Geldig"
+#, fuzzy
+#~ msgid "Ascending Order"
+#~ msgstr "Oplopend"
 
-#~ msgid "Percent"
-#~ msgstr "Procent"
+#, fuzzy
+#~ msgid "Descending Order"
+#~ msgstr "Aflopend"
 
-#~ msgid "count"
-#~ msgstr "aantal"
+#~ msgid "Ascending Counts"
+#~ msgstr "Oplopend Aantal"
 
-#~ msgid "row %"
-#~ msgstr "rij %"
+#~ msgid "Descending Counts"
+#~ msgstr "Aflopend Aantal"
 
-#~ msgid "column %"
-#~ msgstr "kolom %"
+#~ msgid "Supress tables with more than N categories"
+#~ msgstr "Onderdruk tabellen met meer dan N categorieën"
 
-#~ msgid "total %"
-#~ msgstr "totaal %"
+#~ msgid "Maximum no of categories"
+#~ msgstr "Maximaal aantal categorieën"
 
-#~ msgid "expected"
-#~ msgstr "verwacht"
+#~ msgid "Print"
+#~ msgstr "Afdrukken"
 
-#~ msgid "residual"
-#~ msgstr "overblijvend"
+#~ msgid "Recall"
+#~ msgstr "Opnieuw"
 
-#~ msgid "Symmetric measures."
-#~ msgstr "Symmetrische metingen."
+#~ msgid "Undo"
+#~ msgstr "Ongedaan maken"
 
-#~ msgid "Lower"
-#~ msgstr "Lager"
+#~ msgid "Redo"
+#~ msgstr "Herstellen"
 
-#~ msgid "Upper"
-#~ msgstr "Hoger"
+#~ msgid "Find"
+#~ msgstr "V_ind"
 
-#~ msgid "Directional measures."
-#~ msgstr "Directioneel metingen."
+#~ msgid "Use Sets"
+#~ msgstr "Gebruik sets"
 
-#~ msgid "For cohort %s = %g"
-#~ msgstr "Voor cohort %s = %g"
+#~ msgid "_About"
+#~ msgstr "_Over"
 
-#~ msgid "For cohort %s = %.*s"
-#~ msgstr "Voor cohort %s = %.*s"
+#~ msgid "N of items"
+#~ msgstr "N van items"
 
-#, fuzzy
-#~ msgid "VARIABLES subcommand must be given."
-#~ msgstr "VARIABLES subprogramma is niet het juiste met PAIRS"
+#~ msgid "Buttons"
+#~ msgstr "Knoppen"
 
-#~ msgid "Not creating plot because data set is empty."
-#~ msgstr "Er wordt geen plot aangemaakt omdat de data set leeg is."
+#~ msgid "The mask that decides what buttons appear in the button box"
+#~ msgstr "Het masker dat beslist welke knoppen in de knop box zichtbaar zijn"
 
-#~ msgid "Normal Q-Q Plot of %s"
-#~ msgstr "Normal Q-Q Plot van %s"
+#~ msgid "A predicate function"
+#~ msgstr "Een predicaat functie"
 
-#~ msgid "Observed Value"
-#~ msgstr "Waargenomen Waarde"
+#~ msgid "How many things can be selected"
+#~ msgstr "Hoeveel dingen kunnen geselecteerd worden"
 
-#~ msgid "Detrended Normal Q-Q Plot of %s"
-#~ msgstr "Detrended Normal Q-Q Plot van %s"
+#~ msgid "searching for \"%s\" in path \"%s\""
+#~ msgstr "zoeken naar \"%s\" in pad \"%s\""
 
-#~ msgid "%s and %s are mutually exclusive"
-#~ msgstr "%s en %s zijn wederzijds exclusief"
+#~ msgid "...found \"%s\""
+#~ msgstr "...gevonden \"%s\""
 
-#~ msgid "Case Processing Summary"
-#~ msgstr "Case Bewerkings Overzicht"
+#~ msgid "...not found"
+#~ msgstr "...niet gevonden"
 
-#~ msgid "Highest"
-#~ msgstr "Hoogste"
+#~ msgid "little-endian"
+#~ msgstr "little-endian"
 
-#~ msgid "Lowest"
-#~ msgstr "Laagste"
+#~ msgid "big-endian"
+#~ msgstr "big-endian"
 
-#~ msgid "Extreme Values"
-#~ msgstr "Extreme Waardes"
+#~ msgid "Compressed data is corrupt."
+#~ msgstr "Gecomprimeerde gegevens zijn beschadigd."
 
-#~ msgid "Case Number"
-#~ msgstr "Case Nummer"
+#~ msgid "opening \"%s\" as syntax file"
+#~ msgstr "openen \"%s\" als syntaxbestand"
 
 #, fuzzy
-#~ msgid "`(' expected after LIMIT specifier of FORMAT subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "%s is not allowed inside INPUT PROGRAM."
+#~ msgstr "%s is alleen toegestaan binnen INPUT PROGRAM."
 
 #, fuzzy
-#~ msgid "BARCHART subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "%s is not allowed inside FILE TYPE."
+#~ msgstr "%s is alleen toegestaan binnen FILE TYPE."
 
 #, fuzzy
-#~ msgid "`(' expected after MINIMUM specifier of BARCHART subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "REORDER subcommand may be given at most once."
+#~ msgstr "%s subopdracht mag maximaal 1 keer gegeven worden."
 
 #, fuzzy
-#~ msgid "`(' expected after MAXIMUM specifier of BARCHART subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "`(' expected on REORDER subcommand."
+#~ msgstr "'(' verwacht bij %s subopdracht."
 
 #, fuzzy
-#~ msgid "PIECHART subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "Unknown."
+#~ msgstr "Onbekend"
 
 #, fuzzy
-#~ msgid "`(' expected after MINIMUM specifier of PIECHART subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "System File."
+#~ msgstr "Systeembestand"
 
-#, fuzzy
-#~ msgid "`(' expected after MAXIMUM specifier of PIECHART subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "%s: `.' expected after string."
+#~ msgstr "%s: `.' verwacht na tekenreeks."
 
 #, fuzzy
-#~ msgid "`(' expected after MINIMUM specifier of HISTOGRAM subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "S E Mean"
+#~ msgstr "_Gemiddeld"
 
 #, fuzzy
-#~ msgid "Number expected after MINIMUM specifier of HISTOGRAM subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "S E Kurt"
+#~ msgstr "S.E. Kurt"
 
 #, fuzzy
-#~ msgid "`(' expected after MAXIMUM specifier of HISTOGRAM subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "S E Skew"
+#~ msgstr "S.E. Skew"
 
 #, fuzzy
-#~ msgid "Number expected after MAXIMUM specifier of HISTOGRAM subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "BY is required when TABLE is specified."
+#~ msgstr "BY is noodzakelijk als %s is gespecificeerd."
 
-#, fuzzy
-#~ msgid "`(' expected after INCREMENT specifier of HISTOGRAM subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "first line must be StartFontMetrics"
+#~ msgstr "eerste regel moet zijn StartFontMetrics"
 
-#, fuzzy
-#~ msgid "HBAR subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "unsupported MappingScheme %d"
+#~ msgstr "niet ondersteund MappingSchema %d"
 
-#, fuzzy
-#~ msgid "`(' expected after MINIMUM specifier of HBAR subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "required FontName is missing"
+#~ msgstr "vereiste FontNaam ontbreekt"
 
-#, fuzzy
-#~ msgid "`(' expected after MAXIMUM specifier of HBAR subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "CharMetrics line must start with C or CH"
+#~ msgstr "CharMetrics regel moet beginnen met C of CH"
 
-#, fuzzy
-#~ msgid "`)' expected after argument for FREQ specifier of HBAR."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "reference to unknown character \"%s\""
+#~ msgstr "referentie naar onbekend karakter \"%s\""
 
-#, fuzzy
-#~ msgid "`)' expected after argument for PERCENT specifier of HBAR."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "expected end of file"
+#~ msgstr "einde-bestand verwacht"
 
-#, fuzzy
-#~ msgid "`(' expected after INCREMENT specifier of HBAR subcommand."
-#~ msgstr "'(' verwacht bij RENAME subopdracht."
+#~ msgid "syntax error expecting end of line"
+#~ msgstr "syntaxfout regeleinde verwacht"
 
-#, fuzzy
-#~ msgid "`)' expected after argument for INCREMENT specifier of HBAR."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "number out of valid range"
+#~ msgstr "nummer buiten geldig bereik"
 
-#~ msgid ""
-#~ "At most one of BARCHART, HISTOGRAM, or HBAR should be given.  HBAR will "
-#~ "be assumed.  Argument values will be given precedence increasing along "
-#~ "the order given."
-#~ msgstr ""
-#~ "Op zijn meest een van BARCHART, HISTOGRAM, of HBAR moet opgegeven "
-#~ "worden.  HBAR wordt aangenomen.  Argument waardes zullen gebruikt worden "
-#~ "in opgegeven volgorde."
+#~ msgid "invalid numeric syntax"
+#~ msgstr "ongeldige numerieke syntax"
 
-#~ msgid ""
-#~ "MAX must be greater than or equal to MIN, if both are specified.  "
-#~ "However, MIN was specified as %g and MAX as %g.  MIN and MAX will be "
-#~ "ignored."
-#~ msgstr ""
-#~ "MAX moet groter of gelijk zijn aan MIN, als beiden zijn opgegeven. Maar, "
-#~ "MIN was opgegeven als %g en MAX als %g. MIN en MAX worden genegeerd."
+#~ msgid "syntax error expecting integer"
+#~ msgstr "syntaxfout integer verwacht"
 
-#~ msgid "Variable %s specified multiple times on VARIABLES subcommand."
-#~ msgstr "Variabele %s is meerdere keren opgegeven bij VARIABLES subopdracht."
+#~ msgid "syntax error expecting number"
+#~ msgstr "syntaxfout nummer verwacht"
 
-#~ msgid "`)' expected after GROUPED interval list."
-#~ msgstr "')' verwacht na GROUPED interval lijst."
+#~ msgid "syntax error in hex constant"
+#~ msgstr "syntaxfout in hexadecimale constante"
 
-#~ msgid "Variables %s specified on GROUPED but not on VARIABLES."
-#~ msgstr "Variabele %s gespecificeerd bij GROUPED maar niet bij VARIABLES."
+#~ msgid "syntax error expecting hex constant"
+#~ msgstr "syntaxfout hexadecimale constante verwacht"
 
-#~ msgid "Variables %s specified multiple times on GROUPED subcommand."
-#~ msgstr ""
-#~ "Variabele %s is meerdere keren gespecificeerd bij GROUPED subopdracht."
+#~ msgid "unexpected end of line"
+#~ msgstr "onverwacht regeleinde"
 
-#~ msgid "Value Label"
-#~ msgstr "Waarde Label"
+#~ msgid "unexpected end of line expecting string"
+#~ msgstr "onverwacht regeleinde, tekenreeks verwacht"
 
-#~ msgid "No valid data for variable %s; statistics not displayed."
-#~ msgstr ""
-#~ "Geen geldige data voor variabele %s; statistieken worden niet getoond."
+#~ msgid "ascii: multiple values for %s"
+#~ msgstr "ascii: meerdere waardes voor %s"
 
-#, fuzzy
-#~ msgid "DEPENDENT subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "ascii: only screen devices may have `auto' length or width"
+#~ msgstr "ascii: alleen schermapparaten mogen 'auto' lengte of breedte hebben"
 
-#, fuzzy
-#~ msgid "BY subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "ascii: positive integer required as `%s' value"
+#~ msgstr "ascii: positieve integer vereist als `%s' waarde"
 
-#, fuzzy
-#~ msgid "WITH subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "ascii: `emphasis' value must be `bold', `underline', or `none'"
+#~ msgstr "ascii: `emphasis' waarde moet `bold', `underline', of `none' zijn"
 
-#~ msgid "No valid data found. This command was skipped."
-#~ msgstr "Geen geldige data gevonden. Deze opdracht is overgeslagen."
+#~ msgid "ascii: zero or positive integer required as `%s' value"
+#~ msgstr "ascii: nul of positieve integer vereist als `%s' waarde"
 
-#~ msgid "Missing required subcommand TABLES."
-#~ msgstr "Missing vereist subopdracht TABLES."
+#~ msgid "ascii: boolean value expected for `%s'"
+#~ msgstr "ascii: boolean waarde verwacht voor `%s'"
 
-#~ msgid "TABLES subcommand may not appear more than once."
-#~ msgstr "TABLES subopdracht mag niet meer dan 1 keer voorkomen."
+#~ msgid "`chart-files' value must contain `#'"
+#~ msgstr "`chart-files' waarde moet `#' bevatten"
 
-#, fuzzy
-#~ msgid "METHOD subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "opening HTML output file: %s"
+#~ msgstr "openen HTML uitvoerbestand: %s"
 
-#~ msgid ""
-#~ "The specified value of HI (%d) is lower than the specified value of LO (%"
-#~ "d)"
+#~ msgid "unknown configuration parameter `%s' for HTML device driver"
 #~ msgstr ""
-#~ "De opgegeven waarde van HI (%d) is lager dan de opgegeven waarde van LO (%"
-#~ "d)"
+#~ "onbekende configuratieparameter '%s' voor HTML apparaat-stuurprogramma"
 
-#~ msgid ""
-#~ "%d expected values were given, but the specified range (%d-%d) requires "
-#~ "exactly %d values."
-#~ msgstr ""
-#~ "%d verwachte waardes waren opgegeven, maar de opgegeven range (%d-%d) "
-#~ "vereist precies %d waardes."
+#~ msgid "error creating \"%s\""
+#~ msgstr "fout bij aanmaken \"%s\""
+
+#~ msgid "unknown output driver `%s'"
+#~ msgstr "onbekend uitvoerstuurprogramma %s"
+
+#~ msgid "output driver `%s' referenced but never defined"
+#~ msgstr "uitvoerstuurprogramma '%s' gerefereerd maar nooit gedefinieerd"
+
+#~ msgid "using default output driver configuration"
+#~ msgstr "gebruik verstek uitvoerstuurprogramma-configuratie"
 
 #~ msgid ""
-#~ "PAIRED was specified but the number of variables preceding WITH (%zu) did "
-#~ "not match the number following (%zu)."
+#~ "cannot find output initialization file (use `-vv' to view search path)"
 #~ msgstr ""
-#~ "PAIRED was opgegeven maar het aantal variabelen voor WITH (%zu) komt niet "
-#~ "overeen met het aantal er achter (%zu)."
+#~ "kan uitvoer-initialisatiebestand niet vinden (gebruik -vv om zoekpad te "
+#~ "zien)"
+
+#~ msgid "cannot open \"%s\""
+#~ msgstr "kan \"%s\" niet openen"
+
+#~ msgid "reading \"%s\""
+#~ msgstr "lezen \"%s\""
 
-#~ msgid "`%s' is not a variable name"
-#~ msgstr "'%s' is geen variabele naam"
+#~ msgid "syntax error"
+#~ msgstr "syntaxfout"
 
-#~ msgid "Significance"
-#~ msgstr "Significantie "
+#~ msgid "error closing \"%s\""
+#~ msgstr "fout bij sluiten \"%s\""
 
-#~ msgid "Between Groups"
-#~ msgstr "Tussen Groepen"
+#~ msgid "no active output drivers"
+#~ msgstr "geen actieve uitvoerstuurprogramma's"
 
-#~ msgid "Within Groups"
-#~ msgstr "Binnen Groepen"
+#~ msgid "error reading device definition file"
+#~ msgstr "fout tijdens lezen apparaat-definitiebestand"
 
-#~ msgid "Assume equal variances"
-#~ msgstr "Veronderstelt gelijke variantie"
+#~ msgid ""
+#~ "Driver classes:\n"
+#~ "\t"
+#~ msgstr ""
+#~ "Stuurprogramma-klassen:\n"
+#~ "\t"
 
-#~ msgid "Does not assume equal"
-#~ msgstr "Veronderstelt niet gelijk"
+#~ msgid ""
+#~ "reached end of options inside quoted string parsing options for \"%s\" "
+#~ "driver"
+#~ msgstr ""
+#~ "einde opties bereikt binnen geciteerde tekenreeks tijdens ontleden van "
+#~ "opties voor \"%s\" stuurprogramma"
 
-#~ msgid "%s of %s by %s"
-#~ msgstr "%s van %s per %s"
+#~ msgid "syntax error in string constant parsing options for \"%s\" driver"
+#~ msgstr ""
+#~ "syntaxfout in tekenreeksconstante tijdens ontleden opties voor \"%s\" "
+#~ "stuurprogramma"
 
-#~ msgid "%s of %s"
-#~ msgstr "%s van %s"
+#~ msgid "syntax error expecting `=' parsing options for driver \"%s\""
+#~ msgstr ""
+#~ "syntaxfout verwacht `=' tijdens ontleden opties voor stuurprogramma \"%s\""
 
-#~ msgid "Cannot create new rank variable.  All candidates in use."
-#~ msgstr "Kan geen rang variabele creëren. Alle kandidaten zijn in gebruik."
+#~ msgid "unknown output driver class `%.*s'"
+#~ msgstr "onbekende uitvoerstuurprogramma-klasse `%.*s'"
 
-#~ msgid "Variables Created By RANK"
-#~ msgstr "Variabelen gecreëerd door RANK"
+#~ msgid "unknown device type `%.*s'"
+#~ msgstr "onbekend apparaattype `%.*s'"
 
-#~ msgid "%s into %s(%s of %s using %s BY %s)"
-#~ msgstr "%s in %s(%s van %s gebruikt %s PER %s)"
+#~ msgid "driver definition line missing driver name or class name"
+#~ msgstr "stuurprogramma definitieregel mist stuurprogramma- of klasse-naam"
 
-#~ msgid "%s into %s(%s of %s BY %s)"
-#~ msgstr "%s in %s(%s van %s PER %s)"
+#~ msgid "opening PostScript output file \"%s\""
+#~ msgstr "Openen PostScript-uitvoerbestand \"%s\""
 
-#~ msgid "%s into %s(%s of %s using %s)"
-#~ msgstr "%s in %s(%s van %s gebruikt %s"
+#~ msgid "closing PostScript output file \"%s\""
+#~ msgstr "sluiten PostScript-uitvoerbestand \"%s\""
 
-#~ msgid "%s into %s(%s of %s)"
-#~ msgstr "%s in %s(%s van %s)"
+#~ msgid "unknown configuration parameter `%s' for PostScript device driver"
+#~ msgstr ""
+#~ "onbekende configuratieparameter `%s' voor PostScript-"
+#~ "apparaatstuurprogramma"
 
 #~ msgid ""
-#~ "FRACTION has been specified, but NORMAL and PROPORTION rank functions "
-#~ "have not been requested.  The FRACTION subcommand will be ignored."
+#~ "unknown orientation `%s' (valid orientations are `portrait' and "
+#~ "`landscape')"
 #~ msgstr ""
-#~ "FRACTION is gespecificeerd maar NORMAL en PROPORTION rangschik functies "
-#~ "ziin niet gevraagd. De FRACTION subopdracht wordt genegeerd."
+#~ "onbekende oriëntatie '%s' (geldige oriëntaties zijn 'portrait' en "
+#~ "'landscape')"
 
-#~ msgid "Variable %s already exists."
-#~ msgstr "Variabele %s bestaat al."
+#~ msgid "boolean value expected for %s"
+#~ msgstr "boolean waarde verwacht voor %s"
 
-#~ msgid "Too many variables in INTO clause."
-#~ msgstr "Te veel variabelen in INTO clause."
+#~ msgid "positive integer value required for `%s'"
+#~ msgstr "positieve integer waarde vereist voor '%s'"
 
-#, fuzzy
-#~ msgid "DEPENDENT subcommand must be given."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid ""
+#~ "default font size must be at least 1 point (value of 1000 for key `%s')"
+#~ msgstr ""
+#~ "verstek fontgrootte moet tenminste 1 punt zijn (waarde 1000 voor sleutel "
+#~ "'%s')"
 
-#~ msgid "Dependent variable must be numeric."
-#~ msgstr "Afhankelijke variabele moet numeriek zijn."
+#~ msgid "could not find AFM file \"%s\""
+#~ msgstr "kon AFM bestand \"%s\" niet vinden"
 
-#, fuzzy
-#~ msgid "SCALE subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "could not find font \"%s\""
+#~ msgstr "kon font \"%s\" niet vinden"
 
-#, fuzzy
-#~ msgid "MODEL subcommand may be given only once."
-#~ msgstr "REORDER subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "could not find encoding \"%s\""
+#~ msgstr "kon codering \"%s\" niet vinden"
 
-#~ msgid "Part 1"
-#~ msgstr "Deel 1"
+#~ msgid "cannot open font file \"%s\""
+#~ msgstr "kan fontbestand \"%s\" niet openen"
 
-#~ msgid "Part 2"
-#~ msgstr "Deel 2"
+#~ msgid "reading font file \"%s\""
+#~ msgstr "lezen fontbestand \"%s\""
 
-#~ msgid "Equal Length"
-#~ msgstr "Gelijke Lengte"
+#~ msgid "cannot open font encoding file \"%s\""
+#~ msgstr "kan fontcodering-bestand \"%s\" niet openen"
 
-#~ msgid "Unequal Length"
-#~ msgstr "Ongelijke Lengte"
+#~ msgid "invalid numeric format"
+#~ msgstr "ongeldig numeriek-format"
 
-#~ msgid "Excluded"
-#~ msgstr "Uitgesloten"
+#~ msgid "closing Postscript encoding \"%s\""
+#~ msgstr "sluiten Postscript codering \"%s\""
 
-#, fuzzy
-#~ msgid "TESTVAL subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid "creating \"%s\""
+#~ msgstr "aanmaken \"%s\""
 
-#, fuzzy
-#~ msgid "CRITERIA subcommand may be given only once."
-#~ msgstr "RENAME subopdracht mag maximaal 1 keer gegeven worden."
+#~ msgid ""
+#~ "set to `compatible' if you want output calculated from broken algorithms"
+#~ msgstr ""
+#~ "zet op 'compatible' als u wilt dat de output door defecte algoritmes "
+#~ "wordt berekend "
 
-#, fuzzy
-#~ msgid "`(' expected after CIN specifier of CRITERIA subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "Disable execution of .pspp/rc at startup"
+#~ msgstr "Schakel executie van .pspp/rc tijdens opstarten uit"
 
-#, fuzzy
-#~ msgid "Number expected after CIN specifier of CRITERIA subcommand."
-#~ msgstr "')' verwacht na variabele lijst bij RENAME subopdracht."
+#~ msgid "Set configuration directory to DIR"
+#~ msgstr "Zet configuratie folder op DIR"
+
+#~ msgid "Don't allow some unsafe operations"
+#~ msgstr "Sta geen onveilige operaties toe"
 
-#, fuzzy
 #~ msgid ""
-#~ "Exactly one of TESTVAL, GROUPS and PAIRS subcommands must be specified."
-#~ msgstr "TESTVAL, GROUPS en PAIRS subopdracht zijn wederzijds uitsluitend."
+#~ "Set to `compatible' if you want only to accept SPSS compatible syntax"
+#~ msgstr ""
+#~ "Zet op 'compatible' als u alleen SPSS compatibele syntax wilt accepteren"
 
-#, fuzzy
-#~ msgid "VARIABLES subcommand may not be used with PAIRS."
-#~ msgstr "VARIABLES subprogramma is niet het juiste met PAIRS"
+#~ msgid "PSPP --- A program for statistical analysis"
+#~ msgstr "PSPP --- Een programma voor statistische analyse"
 
-#~ msgid "One or more VARIABLES must be specified."
-#~ msgstr "Een of meer VARIABLES moeten gespecificeerd zijn."
+#~ msgid "FILE1, FILE2 ... FILEn"
+#~ msgstr "BESTAND1, BESTAND2 ... BESTANDn"
 
-#~ msgid ""
-#~ "When applying GROUPS to a string variable, two values must be specified."
-#~ msgstr ""
-#~ "By het toepassen van GROUPS op een string variabele moeten twee waardes "
-#~ "opgegeven zijn."
+#~ msgid "Diagnostic options:"
+#~ msgstr "Diagnostische opties:"
 
-#~ msgid "At least two variables must be specified on PAIRS."
-#~ msgstr "Ten minste 2 variabelen moeten opgegeven worden bij PAIRS."
+#~ msgid "Options affecting syntax and behavior:"
+#~ msgstr "Opties die syntax en gedrag beïnvloeden:"
 
-#~ msgid "Mean Difference"
-#~ msgstr "Gemiddelde Verschil"
+#~ msgid "Cannot open %s (%s). Writing errors to stdout instead.\n"
+#~ msgstr "Kan %s (%s) niet openen. Schrijf fouten naar stdout inplaats.\n"
 
-#~ msgid "Correlation"
-#~ msgstr "Correlatie"
+#~ msgid "Terminating execution of syntax file due to error."
+#~ msgstr "Breek uitvoering van syntaxbestand af vanwege fout."
 
-#~ msgid "Save As"
-#~ msgstr "Opslaan Als"
+#~ msgid "Increase diagnostic verbosity level"
+#~ msgstr "Verhoog diagnostische breedsprakigheid niveau"
 
-#~ msgid "Bad variable width %d."
-#~ msgstr "Foutieve variabele breedte %d."
+#~ msgid "Send error messages to FILE (appended)"
+#~ msgstr "Zend foutmeldingen naar BESTAND (toevoegen)"
 
-#~ msgid "File specifies unexpected value %g as HIGHEST."
-#~ msgstr "Bestand specificeert onverwachte waarde %g als HIGHEST."
+#~ msgid "Start an interactive session"
+#~ msgstr "Start een interactieve sessie"
 
-#~ msgid "File specifies unexpected value %g as LOWEST."
-#~ msgstr "Bestand specificeert onverwachte waarde %g als LOWEST."
+#~ msgid "Don't show the splash screen"
+#~ msgstr "Toon het splash scherm niet"
 
-#~ msgid "%s is unimplemented."
-#~ msgstr "%s is niet geïmplementeerd."
+#~ msgid "PSPPIRE --- A user interface for PSPP"
+#~ msgstr "PSPPIRE --- Een gebruikers interface voor PSPP"
 
-#~ msgid "Bad character in input: `\\%o'."
-#~ msgstr "Fout karakter in input: '\\%o'."
+#~ msgid "Miscellaneous options:"
+#~ msgstr "Diverse opties:"
 
-#~ msgid "WEIGHT is off."
-#~ msgstr "WEGING is uit."
+#~ msgid "data file error"
+#~ msgstr "gegevensbestand fout"
 
-#~ msgid "WEIGHT is variable %s."
-#~ msgstr "WEGING is variabele %s."
+#~ msgid "PSPP error"
+#~ msgstr "PSPP fout"
 
-#~ msgid "WIDTH is %d."
-#~ msgstr "BREEDTE is %d."
+#~ msgid "syntax warning"
+#~ msgstr "syntax waarschuwing"
 
-#~ msgid ""
-#~ "Ignoring missing values on long string variable %s, which PSPP does not "
-#~ "yet support."
-#~ msgstr ""
-#~ "Negeren van missing values voor lange string variabele %s, wat PSPP nog "
-#~ "niet ondersteunt."
+#~ msgid "data file warning"
+#~ msgstr "gegevensbestand waarschuwing"
 
-#~ msgid ""
-#~ "Ignoring value labels for long string variables, which PSPP does not yet "
-#~ "support."
-#~ msgstr ""
-#~ "Negeer waarde labels voor lange string variabelen, die door PSPP nog niet "
-#~ "ondersteund worden."
+#~ msgid "PSPP warning"
+#~ msgstr "PSPP waarschuwing"
 
-#~ msgid "Cannot add value labels from source file to long string variable %s."
-#~ msgstr ""
-#~ "Kan geen value labels van bron bestand toevoegen aan lange string "
-#~ "variabele %s."
+#~ msgid "syntax information"
+#~ msgstr "syntax informatie"
 
-#~ msgid ""
-#~ "It is not possible to assign value labels to long string variables such "
-#~ "as %s."
-#~ msgstr ""
-#~ "Het is niet mogelijk om waarde labels aan lange string variabelen als %s "
-#~ "toe te kennen."
+#~ msgid "data file information"
+#~ msgstr "gegevensbestand-informatie"
 
-#~ msgid "Write mode ALL not allowed in general mode.  Assuming WRITE=CELLS."
-#~ msgstr ""
-#~ "Write modus ALL niet toegestaan in algemen modus.  WRITE=CELLS aangenomen."
+#~ msgid "PSPP information"
+#~ msgstr "PSPP informatie"
+
+#~ msgid "The PSPP processing engine reported the following message:"
+#~ msgid_plural "The PSPP processing engine reported the following messages:"
+#~ msgstr[0] "De PSPP processor rapporteert de volgende melding:"
+#~ msgstr[1] "De PSPP processor rapporteert de volgende meldingen:"
 
-#~ msgid "Error writing FLIP file: %s."
-#~ msgstr "Fout tijdens het schrijven van FLIP bestand: %s."
+#~ msgid "The PSPP processing engine reported %d message."
+#~ msgid_plural "The PSPP processing engine reported %d messages."
+#~ msgstr[0] "De PSPP processor rapporteert %d melding."
+#~ msgstr[1] "De PSPP processor rapporteert %d meldingen."
 
-#~ msgid "Could not create acceptable variant for variable %s."
-#~ msgstr "Kon geen acceptabele variant voor variabele %s creëren."
+#~ msgid "%d of these messages are displayed below."
+#~ msgid_plural "%d of these messages are displayed below."
+#~ msgstr[0] "%d van deze meldingen worden hieronder getoond."
+#~ msgstr[1] "%d van deze meldingen worden hieronder getoond."
 
-#~ msgid "Cannot create more than 99999 variable names."
-#~ msgstr "Kan niet meer dan 99999 variabele namen creëren."
+#~ msgid "Var 2"
+#~ msgstr "Var 2"
 
-#~ msgid "Long string variable %s is not valid here."
-#~ msgstr "Lange string variabele %s is niet geldig hier."
+#~ msgid "gtk-find"
+#~ msgstr "gtk-find"
 
-#~ msgid "PATH and SEARCH subcommands are mutually exclusive.  Ignoring PATH."
+#~ msgid "Messages Reported"
+#~ msgstr "Meldingen Gerapporteerd"
+
+#~ msgid ""
+#~ "The PSPP processor reported # errors.  The first # and last # are shown "
+#~ "below:"
 #~ msgstr ""
-#~ "PATH en SEARCH subopdrachten zijn wederzijds uitsluitend. PATH genegeerd. "
+#~ "De PSPP processor rapporteerde # fouten.  De eerste # en de laatste # "
+#~ "worden hieronder getoond:"
+
+#~ msgid "gtk-close"
+#~ msgstr "gtk-sluit"
+
+#~ msgid "gtk-go-back"
+#~ msgstr "gtk-ga-terug"
 
-#~ msgid "At least one value must be specified on PATH."
-#~ msgstr "Tenminste 1 waarde dient bij PATH opgegeven te zijn."
+#~ msgid "gtk-go-forward"
+#~ msgstr "gtk-ga-vooruit"
 
-#~ msgid "Hash bits adjusted to %d."
-#~ msgstr "Hash bits aangepast naar %d."
+#~ msgid "gtk-save"
+#~ msgstr "gtk-opslaan"
 
-#~ msgid "error opening \"%s\" for writing"
-#~ msgstr "fout bij openen \"%s\" voor schrijven"
+#~ msgid "gtk-save-as"
+#~ msgstr "gtk-opslaan-als"
+
+#~ msgid "gtk-copy"
+#~ msgstr "gtk-kopie"
 
 #~ msgid ""
-#~ "This is beta status software.  Please report bugs to bug-gnu-pspp@gnu.org"
+#~ "Alpha\n"
+#~ "Split"
 #~ msgstr ""
-#~ "Dit is beta status software. Rapporteer bugs s.v.p. bij bug-gnu-pspp@gnu."
-#~ "org"
+#~ "Alpha\n"
+#~ "Splits"
 
-#~ msgid "Diagnositic options:"
-#~ msgstr "Diagnostische opties:"
+#, fuzzy
+#~ msgid "SE. Mean"
+#~ msgstr "_Gemiddeld"
+
+#~ msgid "`/FORMAT WEIGHT' specified, but weighting is not on."
+#~ msgstr "'/FORMAT WEIGHT' gespecificeerd, maar weging staat niet aan."
+
+#~ msgid "Line"
+#~ msgstr "Regel"
index 9cfe8f1b7c27ce51fff6a80ad8bb852800293e41..513c2e3bfb49274e9e216a55e355f273c5efa273 100644 (file)
@@ -6,26 +6,74 @@ msgid ""
 msgstr ""
 "Project-Id-Version: pspp-0.6.2-pre4\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2009-07-08 20:24-0700\n"
-"PO-Revision-Date: 2009-09-07 02:30-0300\n"
+"POT-Creation-Date: 2010-05-21 12:02+0200\n"
+"PO-Revision-Date: 2009-09-10 01:15-0300\n"
 "Last-Translator: Michel Almada de Castro Boaventura <michel@cecaps.ufmg.br>\n"
 "Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/data/any-reader.c:57
+#: src/ui/gui/psppire-buttonbox.c:275 src/ui/gui/psppire-buttonbox.c:437
+msgid "Continue"
+msgstr "Continuar"
+
+#: src/ui/gui/psppire-buttonbox.c:435
+msgid "OK"
+msgstr "OK"
+
+#: src/ui/gui/psppire-buttonbox.c:436
+msgid "Go To"
+msgstr "Ir Para"
+
+#: src/ui/gui/psppire-buttonbox.c:438
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: src/ui/gui/psppire-buttonbox.c:439
+msgid "Help"
+msgstr "Ajuda"
+
+#: src/ui/gui/psppire-buttonbox.c:440
+msgid "Reset"
+msgstr "Reiniciar"
+
+#: src/ui/gui/psppire-buttonbox.c:441
+msgid "Paste"
+msgstr "Colar"
+
+#: src/ui/gui/psppire-dictview.c:466 src/language/dictionary/split-file.c:82
+#: src/language/dictionary/sys-file-info.c:150
+#: src/language/dictionary/sys-file-info.c:340
+#: src/language/dictionary/sys-file-info.c:664
+#: src/language/stats/descriptives.c:881
+#: src/language/data-io/data-parser.c:649
+#: src/language/data-io/data-parser.c:688 src/language/data-io/print.c:403
+msgid "Variable"
+msgstr "Variável"
+
+#: src/ui/gui/psppire-dictview.c:503
+#, fuzzy
+msgid "Prefer variable labels"
+msgstr "Procurar por rótulos de valores"
+
+#: src/ui/gui/psppire-var-view.c:193
+#, fuzzy, c-format
+msgid "Var%d"
+msgstr "Valido"
+
+#: src/data/any-reader.c:56
 #, c-format
 msgid "An error occurred while opening \"%s\": %s."
 msgstr "Ocorreu um erro ao abrir \"%s\": %s."
 
-#: src/data/any-reader.c:93
+#: src/data/any-reader.c:101
 #, c-format
 msgid "\"%s\" is not a system or portable file."
 msgstr "\"%s\" não é um arquivo de sistema ou portátil."
 
 # Inline?
-#: src/data/any-reader.c:99 src/data/any-writer.c:63
+#: src/data/any-reader.c:107 src/data/any-writer.c:63
 msgid "The inline file is not allowed here."
 msgstr "O arquivo inline não é permitido aqui."
 
@@ -44,157 +92,145 @@ msgstr "O dia %d não está no intervalo aceitável de 0 a 31."
 msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
 msgstr "A data %04d-%d-%d é anterior à data mais antiga aceitável, 1582-10-15."
 
-#: src/data/case-tmpfile.c:57
-#, c-format
-msgid "failed to create temporary file"
-msgstr "falha ao criar arquivo temporário."
-
-#: src/data/case-tmpfile.c:131
-#, c-format
-msgid "seeking in temporary file"
-msgstr "procurando no arquivo temporário."
-
-#: src/data/case-tmpfile.c:153
-#, c-format
-msgid "reading temporary file"
-msgstr "lendo arquivo temporário."
-
-#: src/data/case-tmpfile.c:155
-#, c-format
-msgid "unexpected end of file reading temporary file"
-msgstr "fim inesperado ao ler arquivo temporário"
-
-#: src/data/case-tmpfile.c:175
-#, c-format
-msgid "writing to temporary file"
-msgstr "escrevendo no arquivo temporário."
-
 #: 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 "Pelo menos um caso nos dados lidos tinha uma ponderação que era user-missing, system-missing, zero ou negativo. Este(s) caso(s) foi(foram) ignorado(s)."
+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 ""
+"Pelo menos um caso nos dados lidos tinha uma ponderação que era user-"
+"missing, system-missing, zero ou negativo. Este(s) caso(s) foi(foram) "
+"ignorado(s)."
 
-#: src/data/data-in.c:262 src/data/data-in.c:452
+#: src/data/data-in.c:274 src/data/data-in.c:464
 msgid "Field contents are not numeric."
 msgstr "Os conteúdo do campo não são numéricos."
 
-#: src/data/data-in.c:264 src/data/data-in.c:454
+#: src/data/data-in.c:276 src/data/data-in.c:466
 msgid "Number followed by garbage."
 msgstr "Número seguido por lixo."
 
-#: src/data/data-in.c:275
+#: src/data/data-in.c:287
 msgid "Invalid numeric syntax."
 msgstr "Sintaxe numérica inválida."
 
-#: src/data/data-in.c:284 src/data/data-in.c:467
+#: src/data/data-in.c:296 src/data/data-in.c:479
 msgid "Too-large number set to system-missing."
 msgstr "Número muito grande definido como system-missing."
 
-#: src/data/data-in.c:289 src/data/data-in.c:472
+#: src/data/data-in.c:301 src/data/data-in.c:484
 msgid "Too-small number set to zero."
 msgstr "Número muito pequeno definido como zero."
 
-#: src/data/data-in.c:315
+#: src/data/data-in.c:327
 msgid "All characters in field must be digits."
 msgstr "Todos os caracteres no campo devem ser dígitos."
 
-#: src/data/data-in.c:338
+#: src/data/data-in.c:350
 msgid "Unrecognized character in field."
 msgstr "Caractere não reconhecido no campo."
 
-#: src/data/data-in.c:362 src/data/data-in.c:636
+#: src/data/data-in.c:374 src/data/data-in.c:650
 msgid "Field must have even length."
 msgstr "Campo deve ter tamanho par."
 
-#: src/data/data-in.c:367 src/data/data-in.c:647
+#: src/data/data-in.c:379 src/data/data-in.c:661
 msgid "Field must contain only hex digits."
 msgstr "Campo deve conter apenas dígitos hexadecimais."
 
-#: src/data/data-in.c:686 src/data/data-in.c:733
+#: src/data/data-in.c:700 src/data/data-in.c:747
 msgid "Syntax error in date field."
 msgstr "Erro de sintaxe no campo de data."
 
-#: src/data/data-in.c:702
+#: src/data/data-in.c:716
 #, c-format
 msgid "Day (%ld) must be between 1 and 31."
 msgstr "Dia (%ld) deve estar entre 1 e 31."
 
-#: src/data/data-in.c:749
+#: src/data/data-in.c:763
 msgid "Delimiter expected between fields in date."
 msgstr "Delimitador esperado entre campos na data."
 
-#: src/data/data-in.c:823
-msgid "Unrecognized month format.  Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names."
-msgstr "Formato de mês não reconhecido. Meses devem ser especificados como números Arábicos ou Romanos, ou com pelo menos 3 letras de seus nomes em Inglês."
+#: src/data/data-in.c:837
+msgid ""
+"Unrecognized month format.  Months may be specified as Arabic or Roman "
+"numerals or as at least 3 letters of their English names."
+msgstr ""
+"Formato de mês não reconhecido. Meses devem ser especificados como números "
+"Arábicos ou Romanos, ou com pelo menos 3 letras de seus nomes em Inglês."
 
-#: src/data/data-in.c:850
+#: src/data/data-in.c:864
 #, c-format
 msgid "Year (%ld) must be between 1582 and 19999."
 msgstr "Ano (%ld) deve estar entre 1582 e 19999."
 
 # duvida na tradução.
-#: src/data/data-in.c:862
+#: src/data/data-in.c:876
 #, c-format
 msgid "Trailing garbage \"%.*s\" following date."
 msgstr "Procurando na lixeira \"%.*s\" seguindo por data."
 
-#: src/data/data-in.c:878
+#: src/data/data-in.c:892
 msgid "Julian day must have exactly three digits."
 msgstr "Dia Juliano deve ter exatamente três dígitos."
 
-#: src/data/data-in.c:883
+#: src/data/data-in.c:897
 #, c-format
 msgid "Julian day (%ld) must be between 1 and 366."
 msgstr "Dia Juliano (%ld) deve estar entre 1 e 366."
 
-#: src/data/data-in.c:907
+#: src/data/data-in.c:921
 #, c-format
 msgid "Quarter (%ld) must be between 1 and 4."
 msgstr "Quartil (%ld) deve estar entre 1 e 4."
 
-#: src/data/data-in.c:927
+#: src/data/data-in.c:941
 #, c-format
 msgid "Week (%ld) must be between 1 and 53."
 msgstr "Semana (%ld) deve estar entre 1 e 53."
 
-#: src/data/data-in.c:940
+#: src/data/data-in.c:954
 msgid "Delimiter expected between fields in time."
 msgstr "Delimitador esperado entre campos de tempo."
 
-#: src/data/data-in.c:960
+#: src/data/data-in.c:974
 #, c-format
 msgid "Minute (%ld) must be between 0 and 59."
 msgstr "Minute (%ld) deve estar entre 0 e 59."
 
-#: src/data/data-in.c:1000
-msgid "Unrecognized weekday name.  At least the first two letters of an English weekday name must be specified."
-msgstr "Dia da semana não reconhecido. Pelo menos duas letras do nome em inglês devem ser especificadas."
+#: src/data/data-in.c:1014
+msgid ""
+"Unrecognized weekday name.  At least the first two letters of an English "
+"weekday name must be specified."
+msgstr ""
+"Dia da semana não reconhecido. Pelo menos duas letras do nome em inglês "
+"devem ser especificadas."
 
-#: src/data/data-in.c:1138
+#: src/data/data-in.c:1152
 #, c-format
 msgid "`%c' expected in date field."
 msgstr "`%c' esperado no campo de data."
 
-#: src/data/data-in.c:1179
+#: src/data/data-in.c:1193
 #, c-format
 msgid "column %d"
 msgstr "coluna %d"
 
-#: src/data/data-in.c:1181
+#: src/data/data-in.c:1195
 #, c-format
 msgid "columns %d-%d"
 msgstr "colunas %d-%d"
 
-#: src/data/data-in.c:1185
+#: src/data/data-in.c:1199
 #, c-format
 msgid "%s field) "
 msgstr "%s campo)"
 
-#: src/data/data-out.c:446
+#: src/data/data-out.c:481
 #, c-format
 msgid "Weekday number %f is not between 1 and 7."
 msgstr "Numero do dia na semana %f não está entre 1 e 7."
 
-#: src/data/data-out.c:467
+#: src/data/data-out.c:502
 #, c-format
 msgid "Month number %f is not between 1 and 12."
 msgstr "Número do mês %f não está entre 1 e 12."
@@ -211,11 +247,16 @@ msgstr "system"
 msgid "scratch"
 msgstr "rascunho"
 
-#: src/data/dictionary.c:882
-msgid "At least one case in the data file had a weight value that was user-missing, system-missing, zero, or negative.  These case(s) were ignored."
-msgstr "Pelo menos um caso no arquivo de dados tinha um valor de ponderação que era user-missing, system-missing, zero ou negativo. Este(s) caso(s) foi(foram) ignorado(s)."
+#: src/data/dictionary.c:980
+msgid ""
+"At least one case in the data file had a weight value that was user-missing, "
+"system-missing, zero, or negative.  These case(s) were ignored."
+msgstr ""
+"Pelo menos um caso no arquivo de dados tinha um valor de ponderação que era "
+"user-missing, system-missing, zero ou negativo. Este(s) caso(s) foi(foram) "
+"ignorado(s)."
 
-#: src/data/dictionary.c:1180
+#: src/data/dictionary.c:1283
 #, c-format
 msgid "Truncating document line to %d bytes."
 msgstr "Linha do documento truncada para %d bytes."
@@ -223,33 +264,21 @@ msgstr "Linha do documento truncada para %d bytes."
 #: src/data/file-handle-def.c:462
 #, c-format
 msgid "Can't read from %s as a %s because it is already being read as a %s."
-msgstr "Impossível ler de %s como uma %s porque ela já está sendo lida como uma %s."
+msgstr ""
+"Impossível ler de %s como uma %s porque ela já está sendo lida como uma %s."
 
 #: src/data/file-handle-def.c:466
 #, c-format
 msgid "Can't write to %s as a %s because it is already being written as a %s."
-msgstr "Impossível gravar em %s como um %s porque ele já está sendo gravado em um %s."
+msgstr ""
+"Impossível gravar em %s como um %s porque ele já está sendo gravado em um %s."
 
 #: src/data/file-handle-def.c:473
 #, c-format
 msgid "Can't re-open %s as a %s."
 msgstr "Impossível reabrir %s como %s."
 
-#: src/data/file-name.c:131
-#, c-format
-msgid "searching for \"%s\" in path \"%s\""
-msgstr "Procurando \"%s\" no caminho \"%s\""
-
-#: src/data/file-name.c:146
-#, c-format
-msgid "...found \"%s\""
-msgstr "...\"%s\" encontrado"
-
-#: src/data/file-name.c:153
-msgid "...not found"
-msgstr "...não encontrado"
-
-#: src/data/file-name.c:243
+#: src/data/file-name.c:168
 #, c-format
 msgid "Not opening pipe file `%s' because SAFER option set."
 msgstr "Não abrindo arquivo pipe '%s' porque a opção SAFER está ativada."
@@ -270,31 +299,42 @@ msgstr "Formato %s não pode ser utilizado como entrada."
 #: src/data/format.c:251
 #, c-format
 msgid "%s specifies width %d, but %s requires an even width."
-msgstr "%s especifica comprimento %d, mas %s requer um comprimento de tamanho par."
+msgstr ""
+"%s especifica comprimento %d, mas %s requer um comprimento de tamanho par."
 
 #: src/data/format.c:260
 #, c-format
 msgid "%s %s specifies width %d, but %s requires a width between %d and %d."
-msgstr "%s %s especifica comprimento %d, mas %s requer um comprimento entre %d e %d."
+msgstr ""
+"%s %s especifica comprimento %d, mas %s requer um comprimento entre %d e %d."
 
 #: src/data/format.c:269
 #, c-format
 msgid "%s %s specifies %d decimal place, but %s does not allow any decimals."
-msgid_plural "%s %s specifies %d decimal places, but %s does not allow any decimals."
+msgid_plural ""
+"%s %s specifies %d decimal places, but %s does not allow any decimals."
 msgstr[0] ""
 msgstr[1] ""
 
 #: src/data/format.c:280
 #, c-format
-msgid "%s %s specifies %d decimal place, but the given width allows at most %d decimals."
-msgid_plural "%s %s specifies %d decimal places, but the given width allows at most %d decimals."
+msgid ""
+"%s %s specifies %d decimal place, but the given width allows at most %d "
+"decimals."
+msgid_plural ""
+"%s %s specifies %d decimal places, but the given width allows at most %d "
+"decimals."
 msgstr[0] ""
 msgstr[1] ""
 
 #: src/data/format.c:287
 #, c-format
-msgid "%s %s specifies %d decimal place, but the given width does not allow for any decimals."
-msgid_plural "%s %s specifies %d decimal places, but the given width does not allow for any decimals."
+msgid ""
+"%s %s specifies %d decimal place, but the given width does not allow for any "
+"decimals."
+msgid_plural ""
+"%s %s specifies %d decimal places, but the given width does not allow for "
+"any decimals."
 msgstr[0] ""
 msgstr[1] ""
 
@@ -303,33 +343,33 @@ msgstr[1] ""
 msgid "%s variables are not compatible with %s format %s."
 msgstr "%s variáveis não são compatíveis com %s formato %s."
 
-#: src/data/format.c:327 src/data/sys-file-reader.c:651
-#: src/ui/gui/data-editor.glade:1190 src/ui/gui/psppire-var-store.c:605
-#: src/ui/gui/psppire.glade:2176
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:628 src/ui/gui/psppire.ui:1960
+#: src/ui/gui/var-sheet-dialogs.ui:139
 msgid "String"
 msgstr "String"
 
-#: src/data/format.c:327 src/data/sys-file-reader.c:651
-#: src/ui/gui/data-editor.glade:1079 src/ui/gui/psppire-var-store.c:598
-#: src/ui/gui/psppire.glade:2131
+#: src/data/format.c:327 src/data/sys-file-reader.c:752
+#: src/ui/gui/psppire-var-store.c:621 src/ui/gui/psppire.ui:2040
+#: src/ui/gui/var-sheet-dialogs.ui:27
 msgid "Numeric"
 msgstr "Numérico"
 
-#: src/data/format.c:328 src/data/sys-file-reader.c:1162
-#: src/data/sys-file-reader.c:1164
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
+#: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
+#: src/language/xforms/recode.c:507
 #: src/language/dictionary/apply-dictionary.c:78
 #: src/language/dictionary/apply-dictionary.c:79
-#: src/language/xforms/recode.c:472 src/language/xforms/recode.c:473
-#: src/language/xforms/recode.c:485 src/language/xforms/recode.c:486
 msgid "numeric"
 msgstr "numérico"
 
-#: src/data/format.c:328 src/data/sys-file-reader.c:1162
-#: src/data/sys-file-reader.c:1164
+#: src/data/format.c:328 src/data/sys-file-reader.c:1472
+#: src/data/sys-file-reader.c:1474 src/language/xforms/recode.c:493
+#: src/language/xforms/recode.c:494 src/language/xforms/recode.c:506
+#: src/language/xforms/recode.c:507
 #: src/language/dictionary/apply-dictionary.c:78
 #: src/language/dictionary/apply-dictionary.c:79
-#: src/language/xforms/recode.c:472 src/language/xforms/recode.c:473
-#: src/language/xforms/recode.c:485 src/language/xforms/recode.c:486
 msgid "string"
 msgstr "string"
 
@@ -338,83 +378,85 @@ msgstr "string"
 msgid "String variable with width %d is not compatible with format %s."
 msgstr "String de tamanho %d não é compatível com o formato %s"
 
-#: src/data/gnumeric-reader.c:33
-msgid "Support for Gnumeric files was not compiled into this installation of PSPP"
-msgstr "Suporte para arquivos Gnumeric não foi compilado nesta instalação do PSPP."
+#: src/data/gnumeric-reader.c:36
+msgid ""
+"Support for Gnumeric files was not compiled into this installation of PSPP"
+msgstr ""
+"Suporte para arquivos Gnumeric não foi compilado nesta instalação do PSPP."
 
-#: src/data/gnumeric-reader.c:366
-#, c-format
-msgid "Error opening \"%s\" for reading as a gnumeric file: %s."
+#: src/data/gnumeric-reader.c:364
+#, fuzzy, c-format
+msgid "Error opening \"%s\" for reading as a Gnumeric file: %s."
 msgstr "Ocorreu um erro ao abrir \"%s\" para ler como arquivo gnumeric: %s."
 
-#: src/data/gnumeric-reader.c:386
+#: src/data/gnumeric-reader.c:384
 #, c-format
 msgid "Invalid cell range \"%s\""
 msgstr "Intervalo de células \"%s\" inválido"
 
-#: src/data/gnumeric-reader.c:523 src/data/psql-reader.c:184
+#: src/data/gnumeric-reader.c:516 src/data/psql-reader.c:187
 #, c-format
 msgid "Cannot create variable name from %s"
 msgstr "Impossível criar nome de variável para %s"
 
-#: src/data/gnumeric-reader.c:535
+#: src/data/gnumeric-reader.c:528
 #, c-format
 msgid "Selected sheet or range of spreadsheet \"%s\" is empty."
 msgstr ""
 
-#: src/data/make-file.c:64
+#: src/data/make-file.c:68
 #, c-format
 msgid "%s: Creating temporary file: %s."
 msgstr "%s: Criando arquivo temporário: %s"
 
-#: src/data/make-file.c:106
+#: src/data/make-file.c:110
 #, c-format
 msgid "%s: Creating file: %s."
 msgstr "%s: Criando arquivo: %s"
 
-#: src/data/make-file.c:144
+#: src/data/make-file.c:148
 #, c-format
 msgid "Opening %s for writing: %s."
 msgstr "Abrindo %s para gravação: %s."
 
-#: src/data/make-file.c:153
+#: src/data/make-file.c:157
 #, c-format
 msgid "Opening stream for %s: %s."
 msgstr "Abrindo stream para %s: %s."
 
-#: src/data/make-file.c:182
+#: src/data/make-file.c:186
 #, c-format
 msgid "Creating temporary file to replace %s: %s."
 msgstr "Criando arquivo temporário para substituir %s: %s."
 
-#: src/data/make-file.c:193
+#: src/data/make-file.c:197
 #, c-format
 msgid "Creating temporary file %s: %s."
 msgstr "Criando arquivo temporário %s: %s."
 
-#: src/data/make-file.c:205
+#: src/data/make-file.c:209
 #, c-format
 msgid "Opening stream for temporary file %s: %s."
 msgstr "Abrindo stream para arquivo temporário %s: %s."
 
-#: src/data/make-file.c:246
+#: src/data/make-file.c:250
 #, c-format
 msgid "Replacing %s by %s: %s."
 msgstr "Substituindo %s por %s: %s."
 
-#: src/data/make-file.c:274
+#: src/data/make-file.c:278
 #, c-format
 msgid "Removing %s: %s."
 msgstr "Removendo %s: %s."
 
 #: src/data/por-file-reader.c:99
-#, c-format
-msgid "portable file %s corrupt at offset 0x%lx: "
+#, fuzzy, c-format
+msgid "portable file %s corrupt at offset 0x%llx: "
 msgstr "arquivo portable %s corrompido no offset 0x%lx: "
 
 #: src/data/por-file-reader.c:128
-#, c-format
-msgid "reading portable file %s at offset 0x%lx: "
+#, fuzzy, c-format
+msgid "reading portable file %s at offset 0x%llx: "
 msgstr "lendo arquivo portable %s no offset 0x%lx: "
 
 #: src/data/por-file-reader.c:156
@@ -428,1283 +470,1527 @@ msgstr "fim de arquivo inesperado"
 
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
-#: src/data/por-file-reader.c:268 src/data/por-file-writer.c:148
+#: src/data/por-file-reader.c:267 src/data/por-file-writer.c:149
 msgid "portable file"
 msgstr "arquivo portável"
 
-#: src/data/por-file-reader.c:276
+#: src/data/por-file-reader.c:275
 #, c-format
-msgid "An error occurred while opening \"%s\" for reading as a portable file: %s."
+msgid ""
+"An error occurred while opening \"%s\" for reading as a portable file: %s."
 msgstr "Ocorreu um erro ao abrir \"%s\" para ler como arquivo portable: %s."
 
-#: src/data/por-file-reader.c:297
+#: src/data/por-file-reader.c:296
 msgid "Data record expected."
 msgstr "Registro de dados esperado."
 
-#: src/data/por-file-reader.c:379
+#: src/data/por-file-reader.c:378
 msgid "Number expected."
 msgstr "Número esperado."
 
-#: src/data/por-file-reader.c:407
+#: src/data/por-file-reader.c:406
 msgid "Missing numeric terminator."
 msgstr "Terminador de número ausente."
 
-#: src/data/por-file-reader.c:430
+#: src/data/por-file-reader.c:429
 msgid "Invalid integer."
 msgstr "Inteiro inválido."
 
-#: src/data/por-file-reader.c:441
+#: src/data/por-file-reader.c:440 src/data/por-file-reader.c:460
 #, c-format
 msgid "Bad string length %d."
 msgstr "Tamanho de string %d incorreto."
 
-#: src/data/por-file-reader.c:502
+#: src/data/por-file-reader.c:523
 #, c-format
 msgid "%s: Not a portable file."
 msgstr "%s: Não é um arquivo portável."
 
-#: src/data/por-file-reader.c:519
+#: src/data/por-file-reader.c:540
 #, c-format
 msgid "Unrecognized version code `%c'."
 msgstr "Versão de código '%c' não reconhecida."
 
-#: src/data/por-file-reader.c:528
+#: src/data/por-file-reader.c:549
 #, c-format
 msgid "Bad date string length %zu."
 msgstr "Comprimento %zu de string de data inválido"
 
-#: src/data/por-file-reader.c:530
+#: src/data/por-file-reader.c:551
 #, c-format
 msgid "Bad time string length %zu."
 msgstr "Comprimento de String de tempo %zu errado."
 
-#: src/data/por-file-reader.c:572
+#: src/data/por-file-reader.c:593
 #, c-format
-msgid "%s: Bad format specifier byte (%d).  Variable will be assigned a default format."
-msgstr "%s: Byte especificador de formato inválido (%d). Variável será definida com um formato padrão."
+msgid ""
+"%s: Bad format specifier byte (%d).  Variable will be assigned a default "
+"format."
+msgstr ""
+"%s: Byte especificador de formato inválido (%d). Variável será definida com "
+"um formato padrão."
 
-#: src/data/por-file-reader.c:593
+#: src/data/por-file-reader.c:614
 #, c-format
 msgid "Numeric variable %s has invalid format specifier %s."
 msgstr "Variável numérica %s tem um especificador de formato inválido: %s."
 
-#: src/data/por-file-reader.c:597
+#: src/data/por-file-reader.c:618
 #, c-format
 msgid "String variable %s with width %d has invalid format specifier %s."
-msgstr "Variável string %s com tamanho %d tem um especificador de formato inválido %s."
+msgstr ""
+"Variável string %s com tamanho %d tem um especificador de formato inválido %"
+"s."
 
-#: src/data/por-file-reader.c:621
+#: src/data/por-file-reader.c:642
 msgid "Expected variable count record."
 msgstr "Registro de quantidade de variáveis esperado."
 
-#: src/data/por-file-reader.c:625
+#: src/data/por-file-reader.c:646
 #, c-format
 msgid "Invalid number of variables %d."
 msgstr "Número de variáveis inválido: %d."
 
-#: src/data/por-file-reader.c:635
+#: src/data/por-file-reader.c:655
 #, c-format
 msgid "Weight variable name (%s) truncated."
 msgstr "Nome da variável de ponderação (%s) truncado."
 
-#: src/data/por-file-reader.c:650
+#: src/data/por-file-reader.c:670
 msgid "Expected variable record."
 msgstr "Registro de variável esperado."
 
-#: src/data/por-file-reader.c:654
+#: src/data/por-file-reader.c:674
 #, c-format
 msgid "Invalid variable width %d."
 msgstr "Comprimento %d de variável inválido."
 
-#: src/data/por-file-reader.c:662
+#: src/data/por-file-reader.c:681
 #, c-format
 msgid "Invalid variable name `%s' in position %d."
 msgstr "Nome de variável '%s' inválido na posição %d."
 
-#: src/data/por-file-reader.c:666
+#: src/data/por-file-reader.c:685 src/data/sys-file-reader.c:606
 #, c-format
 msgid "Bad width %d for variable %s."
 msgstr "Comprimento %d incorreto para variável %s."
 
-#: src/data/por-file-reader.c:681
+#: src/data/por-file-reader.c:700
 #, c-format
 msgid "Duplicate variable name %s in position %d."
 msgstr "Nome de variável %s duplicado na posição %d."
 
-#: src/data/por-file-reader.c:682
+#: src/data/por-file-reader.c:701
 #, c-format
 msgid "Duplicate variable name %s in position %d renamed to %s."
 msgstr "Nome de variável %s duplicado na posição %d renomeado para %s."
 
-#: src/data/por-file-reader.c:725
+#: src/data/por-file-reader.c:750
 #, c-format
 msgid "Weighting variable %s not present in dictionary."
 msgstr "Variável de ponderação %s ausente no dicionário."
 
-#: src/data/por-file-reader.c:772
+#: src/data/por-file-reader.c:794
 #, c-format
 msgid "Unknown variable %s while parsing value labels."
 msgstr "Variável %s desconhecida ao analisar rótulos dos valores."
 
-#: src/data/por-file-reader.c:775
+#: src/data/por-file-reader.c:797
 #, c-format
-msgid "Cannot assign value labels to %s and %s, which have different variable types."
-msgstr "Impossível atribuir rótulos de valores para %s e %s, as quais possuem diferentes tipos."
+msgid ""
+"Cannot assign value labels to %s and %s, which have different variable types."
+msgstr ""
+"Impossível atribuir rótulos de valores para %s e %s, as quais possuem "
+"diferentes tipos."
 
-#: src/data/por-file-writer.c:140
+#: src/data/por-file-writer.c:141
 #, c-format
 msgid "Invalid decimal digits count %d.  Treating as %d."
 msgstr "Quantidade %d de dígitos decimais inválida. Tratando como %d."
 
-#: src/data/por-file-writer.c:160
+#: src/data/por-file-writer.c:161
 #, c-format
 msgid "Error opening \"%s\" for writing as a portable file: %s."
 msgstr "Erro ao abrir \"%s\" para escrever como arquivo portátil: %s."
 
-#: src/data/por-file-writer.c:500
+#: src/data/por-file-writer.c:506
 #, c-format
 msgid "An I/O error occurred writing portable file \"%s\"."
 msgstr "Um erro de E/S ocorreu ao escrever no arquivo portátil \"%s\"."
 
-#: src/data/psql-reader.c:42
-msgid "Support for reading postgres databases was not compiled into this installation of PSPP"
-msgstr "Suporte para ler bancos de dados postgres não foi compilado nesta instalação do PSPP"
+#: src/data/psql-reader.c:46
+msgid ""
+"Support for reading postgres databases was not compiled into this "
+"installation of PSPP"
+msgstr ""
+"Suporte para ler bancos de dados postgres não foi compilado nesta instalação "
+"do PSPP"
 
-#: src/data/psql-reader.c:239
+#: src/data/psql-reader.c:242
 msgid "Memory error whilst opening psql source"
 msgstr "Erro de memória ao abrir fonte psql"
 
-#: src/data/psql-reader.c:245
+#: src/data/psql-reader.c:248
 #, c-format
 msgid "Error opening psql source: %s."
 msgstr "Erro abrindo fonte psql: %s."
 
-#: src/data/psql-reader.c:260
+#: src/data/psql-reader.c:263
 #, c-format
-msgid "Postgres server is version %s. Reading from versions earlier than 8.0 is not supported."
-msgstr "A versão do Postgres é %s. Ler de versões anteriores à 8.0 não é suportado."
+msgid ""
+"Postgres server is version %s. Reading from versions earlier than 8.0 is not "
+"supported."
+msgstr ""
+"A versão do Postgres é %s. Ler de versões anteriores à 8.0 não é suportado."
 
-#: src/data/psql-reader.c:280
-msgid "Connection is unencrypted, but unencrypted connections have not been permitted."
-msgstr "Conexão está descriptografada, mas conexões descriptografadas não foram permitidas."
+#: src/data/psql-reader.c:283
+msgid ""
+"Connection is unencrypted, but unencrypted connections have not been "
+"permitted."
+msgstr ""
+"Conexão está descriptografada, mas conexões descriptografadas não foram "
+"permitidas."
 
-#: src/data/psql-reader.c:307 src/data/psql-reader.c:332
-#: src/data/psql-reader.c:342
+#: src/data/psql-reader.c:322 src/data/psql-reader.c:347
+#: src/data/psql-reader.c:357
 #, c-format
 msgid "Error from psql source: %s."
 msgstr "Erro do destino psql: %s."
 
-#: src/data/psql-reader.c:437
+#: src/data/psql-reader.c:452
 #, c-format
 msgid "Unsupported OID %d.  SYSMIS values will be inserted."
 msgstr "OID %d não suportado. Valor SYSMIS será inserido."
 
 #: src/data/scratch-reader.c:54
 #, c-format
-msgid "Scratch file handle %s has not yet been written, using SAVE or another procedure, so it cannot yet be used for reading."
-msgstr "Arquivo de rascunho de identificador %s não foi ainda escrito, usando SAVE ou outro procedimento, portanto não pode ser usado ainda para leitura."
+msgid ""
+"Scratch file handle %s has not yet been written, using SAVE or another "
+"procedure, so it cannot yet be used for reading."
+msgstr ""
+"Arquivo de rascunho de identificador %s não foi ainda escrito, usando SAVE "
+"ou outro procedimento, portanto não pode ser usado ainda para leitura."
 
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
-#: src/data/scratch-writer.c:67 src/language/data-io/file-handle.q:181
+#: src/data/scratch-writer.c:66 src/language/data-io/file-handle.q:181
 msgid "scratch file"
 msgstr "arquivo de rascunho"
 
-#: src/data/settings.c:685
+#: src/data/settings.c:608
 #, c-format
-msgid "%s: Custom currency string `%s' does not contain exactly three periods or commas (or it contains both)."
-msgstr "%s: String de moeda personalizada '%s' não contem exatamente três pontos ou vírgulas (ou ela contém ambos)."
+msgid ""
+"%s: Custom currency string `%s' does not contain exactly three periods or "
+"commas (or it contains both)."
+msgstr ""
+"%s: String de moeda personalizada '%s' não contem exatamente três pontos ou "
+"vírgulas (ou ela contém ambos)."
 
-#: src/data/short-names.c:66
+#: src/data/short-names.c:52
 msgid "Variable suffix too large."
 msgstr "Sufixo de variável muito grande."
 
+#: src/data/sys-file-reader.c:226
+#, fuzzy, c-format
+msgid "Recoded variable name duplicates an existing `%s' within system file."
+msgstr "Nome de variável '%s' duplicado dentro do arquivo de sistema."
+
 #. TRANSLATORS: this fragment will be interpolated into
 #. messages in fh_lock() that identify types of files.
-#: src/data/sys-file-reader.c:198 src/data/sys-file-writer.c:190
+#: src/data/sys-file-reader.c:290 src/data/sys-file-writer.c:207
 msgid "system file"
 msgstr "arquivo de sistema"
 
-#: src/data/sys-file-reader.c:205
+#: src/data/sys-file-reader.c:297
 #, c-format
 msgid "Error opening \"%s\" for reading as a system file: %s."
 msgstr "Erro ao abrir \"%s\" para leitura como arquivo de sistema: %s."
 
-#: src/data/sys-file-reader.c:244
+#: src/data/sys-file-reader.c:336 tests/dissect-sysfile.c:154
 msgid "Misplaced type 4 record."
 msgstr "Registro de tipo 4 fora do lugar."
 
-#: src/data/sys-file-reader.c:255
+#: src/data/sys-file-reader.c:347 tests/dissect-sysfile.c:165
 #, c-format
 msgid "Unrecognized record type %d."
 msgstr "Registro de tipo %d não reconhecido."
 
-#: src/data/sys-file-reader.c:294
+#: src/data/sys-file-reader.c:388
 #, c-format
 msgid "File header claims %d variable positions but %d were read from file."
-msgstr "Cabeçalho do arquivo requer %d posições de variáveis, mas %d foram lidas do arquivo."
+msgstr ""
+"Cabeçalho do arquivo requer %d posições de variáveis, mas %d foram lidas do "
+"arquivo."
 
-#: src/data/sys-file-reader.c:334
+#: src/data/sys-file-reader.c:428
 #, c-format
 msgid "Error closing system file \"%s\": %s."
 msgstr "Erro ao fechar arquivo de sistema \"%s\": %s."
 
-#: src/data/sys-file-reader.c:399 src/data/sys-file-reader.c:409
+#: src/data/sys-file-reader.c:493 src/data/sys-file-reader.c:503
+#: tests/dissect-sysfile.c:202 tests/dissect-sysfile.c:212
 msgid "This is not an SPSS system file."
 msgstr "Este não é um arquivo de sistema do SPSS."
 
-#: src/data/sys-file-reader.c:431
-msgid "Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format."
+#: src/data/sys-file-reader.c:525 tests/dissect-sysfile.c:227
+msgid ""
+"Compression bias is not the usual value of 100, or system file uses "
+"unrecognized floating-point format."
 msgstr ""
 
-#: src/data/sys-file-reader.c:508
+#: src/data/sys-file-reader.c:602
 #, c-format
 msgid "Invalid variable name `%s'."
 msgstr "Nome de variável '%s' inválido."
 
-#: src/data/sys-file-reader.c:512
-#, c-format
-msgid "Bad variable width %d."
-msgstr "Comprimento %d de variável inválido."
-
-#: src/data/sys-file-reader.c:516
+#: src/data/sys-file-reader.c:610
 #, c-format
 msgid "Duplicate variable name `%s' within system file."
 msgstr "Nome de variável '%s' duplicado dentro do arquivo de sistema."
 
-#: src/data/sys-file-reader.c:524
+#: src/data/sys-file-reader.c:618 tests/dissect-sysfile.c:356
 msgid "Variable label indicator field is not 0 or 1."
 msgstr "Campo indicador de rótulo de variável não é 0 ou 1."
 
-#: src/data/sys-file-reader.c:532
-#, c-format
-msgid "Variable %s has label of invalid length %zu."
-msgstr "Variável %s tem um rótulo de tamanho inválido %zu."
-
-#: src/data/sys-file-reader.c:551
+#: src/data/sys-file-reader.c:649 tests/dissect-sysfile.c:387
 msgid "Numeric missing value indicator field is not -3, -2, 0, 1, 2, or 3."
 msgstr "Campo de indicador de missing numérico não é -3, -3, 0, 1, 2 ou 3."
 
-#: src/data/sys-file-reader.c:566
+#: src/data/sys-file-reader.c:667 tests/dissect-sysfile.c:402
 msgid "String missing value indicator field is not 0, 1, 2, or 3."
 msgstr "Campo de indicação de valores ausentes de string não é 0, 1, 2 ou 3."
 
-#: src/data/sys-file-reader.c:569
-#, c-format
-msgid "Ignoring missing values on long string variable %s, which PSPP does not yet support."
-msgstr "Ignorando valores missing na variável de string longa %s, os quais PSPP não suporta ainda."
-
-#: src/data/sys-file-reader.c:598
+#: src/data/sys-file-reader.c:699
 msgid "Missing string continuation record."
 msgstr "Faltando registro de continuação de string."
 
-#: src/data/sys-file-reader.c:632
+#: src/data/sys-file-reader.c:733
 #, c-format
 msgid "Unknown variable format %<PRIu8>."
 msgstr "Variável de formato %<PRIu8> desconhecida."
 
-#: src/data/sys-file-reader.c:650
+#: src/data/sys-file-reader.c:751
 #, c-format
 msgid "%s variable %s has invalid %s format %s."
 msgstr "%s variável %s tem um inválido %s formato %s."
 
-#: src/data/sys-file-reader.c:653
+#: src/data/sys-file-reader.c:754
 msgid "print"
 msgstr "imprimir"
 
-#: src/data/sys-file-reader.c:653
+#: src/data/sys-file-reader.c:754
 msgid "write"
 msgstr "escrever"
 
-#: src/data/sys-file-reader.c:657
+#: src/data/sys-file-reader.c:758
 msgid "Suppressing further invalid format warnings."
 msgstr "Ocultando avisos de formato inválido subsequentes."
 
-#: src/data/sys-file-reader.c:675
+#: src/data/sys-file-reader.c:776
 msgid "Weighting variable must be numeric."
 msgstr "Variável de ponderação deve ser numérica."
 
-#: src/data/sys-file-reader.c:689
+#: src/data/sys-file-reader.c:790
 msgid "Multiple type 6 (document) records."
 msgstr "Múltiplos registros de tipo 6 (documento)."
 
-#: src/data/sys-file-reader.c:693
+#: src/data/sys-file-reader.c:794
 #, c-format
 msgid "Number of document lines (%d) must be greater than 0."
 msgstr "Número de linhas do documento (%d) precisa ser maior que 0."
 
-#: src/data/sys-file-reader.c:701
+#: src/data/sys-file-reader.c:802
 msgid "Document line contains null byte."
 msgstr "Linha do documento contém byte nulo."
 
-#: src/data/sys-file-reader.c:779
-msgid "Ignoring value labels for long string variables, which PSPP does not yet support."
-msgstr "Ignorando rótulos de valores para variável de string longa, os quais PSPP ainda não suporta."
-
-#: src/data/sys-file-reader.c:784
+#: src/data/sys-file-reader.c:893
 #, c-format
-msgid "Unrecognized record type 7, subtype %d.  Please send a copy of this file, and the syntax which created it to %s"
-msgstr "Registro de tipo 7 e subtipo %d não reconhecido. Por favor, envie uma cópia deste arquivo bem como da sintaxe que o criou para %s"
+msgid ""
+"Unrecognized record type 7, subtype %d.  Please send a copy of this file, "
+"and the syntax which created it to %s"
+msgstr ""
+"Registro de tipo 7 e subtipo %d não reconhecido. Por favor, envie uma cópia "
+"deste arquivo bem como da sintaxe que o criou para %s"
 
-#: src/data/sys-file-reader.c:810
+#: src/data/sys-file-reader.c:920 tests/dissect-sysfile.c:594
 #, c-format
 msgid "Bad size (%zu) or count (%zu) field on record type 7, subtype 3."
-msgstr "Tamanho (%zu) ou quantidade (%zu) inválidos de registro tipo 7, subtipo 3."
+msgstr ""
+"Tamanho (%zu) ou quantidade (%zu) inválidos de registro tipo 7, subtipo 3."
 
-#: src/data/sys-file-reader.c:830
+#: src/data/sys-file-reader.c:940
 #, c-format
-msgid "Floating-point representation indicated by system file (%d) differs from expected (%d)."
-msgstr "Representação de ponto flutuante indicado pelo arquivo de sistema (%d) difere do esperado (%d)."
+msgid ""
+"Floating-point representation indicated by system file (%d) differs from "
+"expected (%d)."
+msgstr ""
+"Representação de ponto flutuante indicado pelo arquivo de sistema (%d) "
+"difere do esperado (%d)."
 
-#: src/data/sys-file-reader.c:843
-msgid "little-endian"
-msgstr "little-endian"
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:110
+#, fuzzy
+msgid "Little Endian"
+msgstr "Little Endian."
 
-#: src/data/sys-file-reader.c:843
-msgid "big-endian"
-msgstr "big-endian"
+#: src/data/sys-file-reader.c:953 src/language/dictionary/sys-file-info.c:109
+#, fuzzy
+msgid "Big Endian"
+msgstr "Big Endian."
 
-#: src/data/sys-file-reader.c:844
+#: src/data/sys-file-reader.c:954
 #, c-format
-msgid "Integer format indicated by system file (%s) differs from expected (%s)."
-msgstr "Formato inteiro indicado pelo arquivo de sistema (%s) difere do esperado (%s)."
+msgid ""
+"Integer format indicated by system file (%s) differs from expected (%s)."
+msgstr ""
+"Formato inteiro indicado pelo arquivo de sistema (%s) difere do esperado (%"
+"s)."
 
-#: src/data/sys-file-reader.c:860
+#: src/data/sys-file-reader.c:1011 tests/dissect-sysfile.c:625
 #, c-format
 msgid "Bad size (%zu) or count (%zu) on extension 4."
 msgstr "Tamanho (%zu) ou quantidade (%zu) da extensão 4 inválido."
 
-#: src/data/sys-file-reader.c:864
-#, c-format
-msgid "File specifies unexpected value %g as SYSMIS."
+#: src/data/sys-file-reader.c:1015 src/data/sys-file-reader.c:1019
+#: src/data/sys-file-reader.c:1023 tests/dissect-sysfile.c:630
+#: tests/dissect-sysfile.c:635 tests/dissect-sysfile.c:640
+#, fuzzy, c-format
+msgid "File specifies unexpected value %g as %s."
 msgstr "Arquivo especifica valor inesperado %g como SYSMIS."
 
-#: src/data/sys-file-reader.c:866
+#: src/data/sys-file-reader.c:1056
+#, c-format
+msgid "Missing space following 'C' at offset %zu in MRSETS record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1074 tests/dissect-sysfile.c:691
+#, c-format
+msgid "Missing space following 'E' at offset %zu in MRSETS record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1083 tests/dissect-sysfile.c:700
+#, c-format
+msgid ""
+"Unexpected label source value \"%s\" following 'E' at offset %zu in MRSETS "
+"record"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1089
+#, c-format
+msgid "Missing 'C', 'D', or 'E' at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1118
 #, c-format
-msgid "File specifies unexpected value %g as HIGHEST."
-msgstr "Arquivo especifica valor inesperado %g como HIGHEST."
+msgid "Missing new-line parsing variable names at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1129
+#, fuzzy, c-format
+msgid "Duplicate variable name %s at offset %zu in MRSETS record."
+msgstr "Nome de variável %s duplicado na posição %d."
+
+#: src/data/sys-file-reader.c:1142
+#, c-format
+msgid "MRSET %s contains both string and numeric variables."
+msgstr ""
 
-#: src/data/sys-file-reader.c:868
+#: src/data/sys-file-reader.c:1157
 #, c-format
-msgid "File specifies unexpected value %g as LOWEST."
-msgstr "Arquivo especifica valor inesperado %g como LOWEST."
+msgid "MRSET %s has only %zu variables."
+msgstr ""
 
-#: src/data/sys-file-reader.c:884
+#: src/data/sys-file-reader.c:1194 tests/dissect-sysfile.c:758
 #, c-format
 msgid "Bad size %zu on extension 11."
 msgstr "Tamanho %zu inválido da extensão 11."
 
-#: src/data/sys-file-reader.c:896
+#: src/data/sys-file-reader.c:1206 tests/dissect-sysfile.c:770
 #, c-format
 msgid "Extension 11 has bad count %zu (for %zu variables)."
 msgstr "Extensão 11 tem uma quantidade inválida %zu (para %zu variáveis)."
 
-#: src/data/sys-file-reader.c:917
+#: src/data/sys-file-reader.c:1227
 #, c-format
-msgid "Invalid variable display parameters for variable %zu (%s).  Default parameters substituted."
-msgstr "Parâmetro de exibição de variáveis inválido para a variável %zu (%s). Parâmetros substituídos pelo padrão."
+msgid ""
+"Invalid variable display parameters for variable %zu (%s).  Default "
+"parameters substituted."
+msgstr ""
+"Parâmetro de exibição de variáveis inválido para a variável %zu (%s). "
+"Parâmetros substituídos pelo padrão."
 
-#: src/data/sys-file-reader.c:963
+#: src/data/sys-file-reader.c:1271
 #, c-format
 msgid "Long variable mapping from %s to invalid variable name `%s'."
 msgstr "Variável longa mapeando de %s para um nome de variável inválido '%s'."
 
-#: src/data/sys-file-reader.c:973
+#: src/data/sys-file-reader.c:1281
 #, c-format
 msgid "Duplicate long variable name `%s' within system file."
 msgstr "Nome longo de variável '%s' duplicado dentro do arquivo de sistema."
 
-#: src/data/sys-file-reader.c:1028
+#: src/data/sys-file-reader.c:1334
 #, c-format
 msgid "%s listed as string of invalid length %s in very length string record."
-msgstr "%s listada como string de tamanho inválido %s em um registro de string muito longo."
+msgstr ""
+"%s listada como string de tamanho inválido %s em um registro de string muito "
+"longo."
 
-#: src/data/sys-file-reader.c:1038
+#: src/data/sys-file-reader.c:1344
 #, c-format
-msgid "%s listed in very long string record with width %s, which requires only one segment."
-msgstr "%s listado em registro de string muito longa com comprimento %s, o que requer apenas um segmento."
+msgid ""
+"%s listed in very long string record with width %s, which requires only one "
+"segment."
+msgstr ""
+"%s listado em registro de string muito longa com comprimento %s, o que "
+"requer apenas um segmento."
 
-#: src/data/sys-file-reader.c:1044
+#: src/data/sys-file-reader.c:1350
 #, c-format
 msgid "Very long string %s overflows dictionary."
 msgstr "String muito longa %s estoura dicionário."
 
-#: src/data/sys-file-reader.c:1058
+#: src/data/sys-file-reader.c:1364
 #, c-format
-msgid "Very long string with width %ld has segment %d of width %d (expected %d)"
-msgstr "String muito longa de tamanho %ld tem segmento %d de tamanho %d (esperado %d)"
+msgid ""
+"Very long string with width %ld has segment %d of width %d (expected %d)"
+msgstr ""
+"String muito longa de tamanho %ld tem segmento %d de tamanho %d (esperado %d)"
 
-#: src/data/sys-file-reader.c:1103
+#: src/data/sys-file-reader.c:1410
 #, c-format
 msgid "Invalid number of labels: %d.  Ignoring labels."
 msgstr "Número de rótulos inválido: %d. Ignorando rótulos."
 
-#: src/data/sys-file-reader.c:1134
-msgid "Variable index record (type 4) does not immediately follow value label record (type 3) as it should."
-msgstr "Índice do registro da variável (tipo 4) não foi seguido imediatamente por um registro de rótulo de valores (tipo 3) como deveria."
+#: src/data/sys-file-reader.c:1441 tests/dissect-sysfile.c:468
+msgid ""
+"Variable index record (type 4) does not immediately follow value label "
+"record (type 3) as it should."
+msgstr ""
+"Índice do registro da variável (tipo 4) não foi seguido imediatamente por um "
+"registro de rótulo de valores (tipo 3) como deveria."
 
-#: src/data/sys-file-reader.c:1141
+#: src/data/sys-file-reader.c:1448
 #, c-format
-msgid "Number of variables associated with a value label (%d) is not between 1 and the number of variables (%zu)."
-msgstr "Número de variáveis associadas com um rótulo de valores (%d) não está entre 1 e o número de variáveis (%zu)."
+msgid ""
+"Number of variables associated with a value label (%d) is not between 1 and "
+"the number of variables (%zu)."
+msgstr ""
+"Número de variáveis associadas com um rótulo de valores (%d) não está entre "
+"1 e o número de variáveis (%zu)."
 
-#: src/data/sys-file-reader.c:1151
-#, c-format
-msgid "Value labels are not allowed on long string variables (%s)."
+#: src/data/sys-file-reader.c:1459
+#, fuzzy, c-format
+msgid ""
+"Value labels may not be added to long string variables (e.g. %s) using "
+"records types 3 and 4."
 msgstr "Rótulos de valores não são permitidos em variáveis string longas (%s)."
 
-#: src/data/sys-file-reader.c:1158
+#: src/data/sys-file-reader.c:1468
 #, c-format
-msgid "Variables associated with value label are not all of identical type.  Variable %s is %s, but variable %s is %s."
-msgstr "Variáveis associadas com rótulo de valores não são todas do mesmo tipo. Variável %s é %s, mas variável %s é %s."
+msgid ""
+"Variables associated with value label are not all of identical type.  "
+"Variable %s is %s, but variable %s is %s."
+msgstr ""
+"Variáveis associadas com rótulo de valores não são todas do mesmo tipo. "
+"Variável %s é %s, mas variável %s é %s."
 
-#: src/data/sys-file-reader.c:1191
+#: src/data/sys-file-reader.c:1502
 #, c-format
 msgid "Duplicate value label for %g on %s."
 msgstr "Rótulo de valores duplicados para %g em %s."
 
-#: src/data/sys-file-reader.c:1194
+#: src/data/sys-file-reader.c:1505 src/data/sys-file-reader.c:1686
 #, c-format
 msgid "Duplicate value label for \"%.*s\" on %s."
 msgstr "Rótulo de valores duplicados para \"%.*s\" em %s."
 
-#: src/data/sys-file-reader.c:1272
+#: src/data/sys-file-reader.c:1543
+#, c-format
+msgid "Error parsing attribute value %s[%d]"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1557
+#, c-format
+msgid "Attribute value %s[%d] is not quoted: %s"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1620 tests/dissect-sysfile.c:936
+#, c-format
+msgid ""
+"Variable name length in long string value label record (%d) exceeds %d-byte "
+"limit."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1630
+#, fuzzy, c-format
+msgid "Ignoring long string value record for unknown variable %s."
+msgstr "Mapeamento de variável se refere a uma variável desconhecida %s."
+
+#: src/data/sys-file-reader.c:1637
+#, c-format
+msgid "Ignoring long string value record for numeric variable %s."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1644
+#, c-format
+msgid ""
+"Ignoring long string value record for variable %s because the record's width "
+"(%d) does not match the variable's width (%d)"
+msgstr ""
+
+#: src/data/sys-file-reader.c:1666
+#, c-format
+msgid ""
+"Ignoring long string value %zu for variable %s, with width %d, that has bad "
+"value width %zu."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1781
 msgid "File ends in partial case."
 msgstr "Arquivo termina em um caso parcial."
 
-#: src/data/sys-file-reader.c:1280
+#: src/data/sys-file-reader.c:1789
 #, c-format
 msgid "Error reading case from file %s."
 msgstr "Erro lendo caso do arquivo %s."
 
-#: src/data/sys-file-reader.c:1377 src/data/sys-file-reader.c:1413
-msgid "Compressed data is corrupt."
-msgstr "Dado compactado está corrompido."
+#: src/data/sys-file-reader.c:1890
+msgid ""
+"Possible compressed data corruption: compressed spaces appear in numeric "
+"field."
+msgstr ""
+
+#: src/data/sys-file-reader.c:1943
+#, c-format
+msgid ""
+"Possible compressed data corruption: string contains compressed integer "
+"(opcode %d)"
+msgstr ""
 
-#: src/data/sys-file-reader.c:1500
+#: src/data/sys-file-reader.c:2035
 #, c-format
 msgid "Variable index %d not in valid range 1...%d."
 msgstr "Índice de variável %d não está no intervalo válido de 1...%d."
 
-#: src/data/sys-file-reader.c:1505
+#: src/data/sys-file-reader.c:2040
 #, c-format
 msgid "Variable index %d refers to long string continuation."
 msgstr "Variável de índice %d se refere a uma continuação de uma string longa."
 
-#: src/data/sys-file-reader.c:1591
-#, c-format
-msgid "Suppressed %d additional variable map warnings."
+#: src/data/sys-file-reader.c:2108
+#, fuzzy, c-format
+msgid "Suppressed %d additional related warnings."
 msgstr "Ocultados %d avisos adicionais de mapeamento de variável."
 
-#: src/data/sys-file-reader.c:1604
-#, c-format
-msgid "Variable map refers to unknown variable %s."
+#: src/data/sys-file-reader.c:2153 src/data/sys-file-reader.c:2170
+#, fuzzy, c-format
+msgid "Dictionary record refers to unknown variable %s."
 msgstr "Mapeamento de variável se refere a uma variável desconhecida %s."
 
-#: src/data/sys-file-reader.c:1680
+#: src/data/sys-file-reader.c:2231
+#, c-format
+msgid "Expecting digit at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2238
+#, c-format
+msgid "Expecting space at offset %zu in MRSETS record."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2245
+#, c-format
+msgid "%zu-byte string starting at offset %zu exceeds record length %zu."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2255
+#, c-format
+msgid "Expecting space at offset %zu following %zu-byte string."
+msgstr ""
+
+#: src/data/sys-file-reader.c:2347 tests/dissect-sysfile.c:1341
 #, c-format
 msgid "System error: %s."
 msgstr "Erro de sistema: %s."
 
-#: src/data/sys-file-reader.c:1682
+#: src/data/sys-file-reader.c:2349 tests/dissect-sysfile.c:1343
 msgid "Unexpected end of file."
 msgstr "Fim de arquivo inesperado."
 
-#: src/data/sys-file-writer.c:163
+#: src/data/sys-file-writer.c:180
 #, c-format
 msgid "Unknown system file version %d. Treating as version %d."
-msgstr "Arquivo de sistema de versão %d desconhecido. Tratando-o como versão %d."
+msgstr ""
+"Arquivo de sistema de versão %d desconhecido. Tratando-o como versão %d."
 
-#: src/data/sys-file-writer.c:202
+#: src/data/sys-file-writer.c:219
 #, c-format
 msgid "Error opening \"%s\" for writing as a system file: %s."
 msgstr "Erro ao abrir \"%s\" para gravação como arquivo de sistema: %s."
 
-#: src/data/sys-file-writer.c:737
+#: src/data/sys-file-writer.c:989
 #, c-format
 msgid "An I/O error occurred writing system file \"%s\"."
 msgstr "Um erro de E/S ocorreu ao gravar arquivo de sistema \"%s\"."
 
-#: src/data/variable.c:209
+#: src/data/variable.c:206
 #, c-format
-msgid "Character `%c' (in %s) may not appear as the first character in a variable name."
-msgstr "Caractere '%c' (em %s) não pode aparecer como o primeiro caractere no nome de uma variável."
+msgid ""
+"Character `%c' (in %s) may not appear as the first character in a variable "
+"name."
+msgstr ""
+"Caractere '%c' (em %s) não pode aparecer como o primeiro caractere no nome "
+"de uma variável."
 
-#: src/data/variable.c:221
+#: src/data/variable.c:218
 #, c-format
 msgid "Character `%c' (in %s) may not appear in a variable name."
 msgstr "Caractere '%c' (em %s) não pode aparecer em um nome de variável."
 
-#: src/data/variable.c:249
+#: src/data/variable.c:244
 msgid "Variable name cannot be empty string."
 msgstr "Nome de variável não pode ser uma string vazia."
 
-#: src/data/variable.c:255
+#: src/data/variable.c:250
 #, c-format
 msgid "Variable name %s exceeds %d-character limit."
 msgstr "Nome de variável %s excede o limite de %d caracteres."
 
-#: src/data/variable.c:263
+#: src/data/variable.c:258
 #, c-format
 msgid "`%s' may not be used as a variable name because it is a reserved word."
-msgstr "'%s' não pode ser usada como nome de variável por ser uma palavra reservada."
+msgstr ""
+"'%s' não pode ser usada como nome de variável por ser uma palavra reservada."
 
-#: src/language/command.c:208
+#: src/language/syntax-file.c:95
 #, c-format
-msgid "%s is unimplemented."
-msgstr "%s não está implementado."
+msgid "Opening `%s': %s."
+msgstr ""
+
+#: src/language/syntax-file.c:109
+#, c-format
+msgid "Reading `%s': %s."
+msgstr ""
+
+#: src/language/syntax-file.c:126
+#, c-format
+msgid "Closing `%s': %s."
+msgstr ""
+
+#: src/language/command.c:205 src/language/expressions/parse.c:1267
+#: src/language/utilities/set.q:213
+#, c-format
+msgid "%s is not yet implemented."
+msgstr ""
 
-#: src/language/command.c:214
+#: src/language/command.c:210
 #, c-format
 msgid "%s may be used only in testing mode."
 msgstr "%s só pode ser utilizado no modo de teste."
 
-#: src/language/command.c:220
+#: src/language/command.c:215
 #, c-format
 msgid "%s may be used only in enhanced syntax mode."
 msgstr "%s só pode ser utilizado no modo de sintaxe otimizado."
 
-#: src/language/command.c:248
+#: src/language/command.c:239
 msgid "Error encountered while ERROR=STOP is effective."
 msgstr "Erro encontrado enquanto ERROR=STOP está ativo."
 
-#: src/language/command.c:489
+#: src/language/command.c:484
 msgid "expecting command name"
 msgstr "esperando nome de comando"
 
-#: src/language/command.c:503
+#: src/language/command.c:498
 #, c-format
 msgid "Unknown command %s."
 msgstr "Comando %s desconhecido."
 
-#: src/language/command.c:628
+#: src/language/command.c:623
 #, c-format
 msgid "%s is allowed only before the active file has been defined."
 msgstr "%s é permitido somente após o arquivo ativo ser definido."
 
-#: src/language/command.c:632
+#: src/language/command.c:627
 #, c-format
 msgid "%s is allowed only after the active file has been defined."
 msgstr "%s é permitido somente antes do arquivo ativo ser definido."
 
-#: src/language/command.c:636
+#: src/language/command.c:631
 #, c-format
 msgid "%s is allowed only inside INPUT PROGRAM."
 msgstr "%s é permitido somente dentro de INPUT PROGRAM."
 
-#: src/language/command.c:640
+#: src/language/command.c:635
 #, c-format
 msgid "%s is allowed only inside FILE TYPE."
 msgstr "%s é permitido apenas dentro de FILE TYPE."
 
-#: src/language/command.c:647
+#: src/language/command.c:642
 #, c-format
-msgid "%s is allowed only before the active file has been defined or inside INPUT PROGRAM."
-msgstr "%s é permitido apenas após o arquivo ativo ser definido, ou dentro de INPUT PROGRAM."
+msgid ""
+"%s is allowed only before the active file has been defined or inside INPUT "
+"PROGRAM."
+msgstr ""
+"%s é permitido apenas após o arquivo ativo ser definido, ou dentro de INPUT "
+"PROGRAM."
 
-#: src/language/command.c:651
+#: src/language/command.c:646
 #, c-format
-msgid "%s is allowed only before the active file has been defined or inside FILE TYPE."
-msgstr "%s é permitido apenas após o arquivo ativo ser definido, ou dentro de FILE TYPE."
+msgid ""
+"%s is allowed only before the active file has been defined or inside FILE "
+"TYPE."
+msgstr ""
+"%s é permitido apenas após o arquivo ativo ser definido, ou dentro de FILE "
+"TYPE."
 
-#: src/language/command.c:655
+#: src/language/command.c:650
 #, c-format
-msgid "%s is allowed only after the active file has been defined or inside INPUT PROGRAM."
-msgstr "%s é permitido apenas após o arquivo ativo ser definido, ou dentro de INPUT PROGRAM."
+msgid ""
+"%s is allowed only after the active file has been defined or inside INPUT "
+"PROGRAM."
+msgstr ""
+"%s é permitido apenas após o arquivo ativo ser definido, ou dentro de INPUT "
+"PROGRAM."
 
-#: src/language/command.c:659
+#: src/language/command.c:654
 #, c-format
-msgid "%s is allowed only after the active file has been defined or inside FILE TYPE."
-msgstr "%s é permitido apenas antes do arquivo ativo ser definido, ou dentro de FILE TYPE."
+msgid ""
+"%s is allowed only after the active file has been defined or inside FILE "
+"TYPE."
+msgstr ""
+"%s é permitido apenas antes do arquivo ativo ser definido, ou dentro de FILE "
+"TYPE."
 
-#: src/language/command.c:663
+#: src/language/command.c:658
 #, c-format
 msgid "%s is allowed only inside INPUT PROGRAM or inside FILE TYPE."
 msgstr "%s é permitido apenas dentro de INPUT PROGRAM ou FILE TYPE."
 
-#: src/language/command.c:669
-#, c-format
-msgid "%s is allowed only after the active file has been defined, inside INPUT PROGRAM, or inside FILE TYPE."
-msgstr "%s é permitido apenas antes do arquivo ativo ser definido, dentro de INPUT PROGRAM, ou FILE TYPE."
-
-#: src/language/command.c:674
+#: src/language/command.c:664
 #, c-format
-msgid "%s is allowed only before the active file has been defined, inside INPUT PROGRAM, or inside FILE TYPE."
-msgstr "%s é permitido apenas após o arquivo ativo ser definido, dentro de INPUT PROGRAM, ou FILE TYPE."
+msgid ""
+"%s is allowed only after the active file has been defined, inside INPUT "
+"PROGRAM, or inside FILE TYPE."
+msgstr ""
+"%s é permitido apenas antes do arquivo ativo ser definido, dentro de INPUT "
+"PROGRAM, ou FILE TYPE."
 
-#: src/language/command.c:692
+#: src/language/command.c:669
 #, c-format
-msgid "%s is not allowed inside INPUT PROGRAM."
-msgstr "%s não é permitido dentro de INPUT PROGRAM."
+msgid ""
+"%s is allowed only before the active file has been defined, inside INPUT "
+"PROGRAM, or inside FILE TYPE."
+msgstr ""
+"%s é permitido apenas após o arquivo ativo ser definido, dentro de INPUT "
+"PROGRAM, ou FILE TYPE."
 
-#: src/language/command.c:694
-#, c-format
-msgid "%s is not allowed inside FILE TYPE."
+#: src/language/command.c:687 src/language/command.c:689
+#, fuzzy, c-format
+msgid "%s is not allowed inside %s."
 msgstr "%s não é permitido dentro de FILE TYPE."
 
-#: src/language/command.c:773 src/language/command.c:881
+#: src/language/command.c:768 src/language/command.c:876
 #: src/language/utilities/permissions.c:98
 msgid "This command not allowed when the SAFER option is set."
 msgstr "Este comando não é permitido quando a opção SAFER está ativa."
 
-#: src/language/command.c:785
+#: src/language/command.c:780
 #, c-format
 msgid "Error removing `%s': %s."
 msgstr "Erro removendo '%s' : %s."
 
-#: src/language/command.c:835
+#: src/language/command.c:830
 #, c-format
 msgid "Couldn't fork: %s."
 msgstr "Impossível criar fork: %s."
 
-#: src/language/command.c:850
+#: src/language/command.c:845
 msgid "Interactive shell not supported on this platform."
 msgstr "Shell interativo não é suportado nesta plataforma."
 
-#: src/language/command.c:862
+#: src/language/command.c:857
 msgid "Command shell not supported on this platform."
 msgstr "Shell de comando não é suportado nesta plataforma."
 
-#: src/language/command.c:868
+#: src/language/command.c:863
 #, c-format
 msgid "Error executing command: %s."
 msgstr "Erro executando comando: %s."
 
-#: src/language/control/control-stack.c:27
+#: src/language/lexer/lexer.c:284
 #, c-format
-msgid "%s without %s."
-msgstr "%s sem %s."
+msgid "%s does not form a valid number."
+msgstr "%s não forma um número válido."
 
-#: src/language/control/control-stack.c:55
-#, c-format
-msgid "This command must appear inside %s...%s, without intermediate %s...%s."
-msgstr "Este comando deve aparecer dentro de %s...%s sem %s...%s intermediário."
+#: src/language/lexer/lexer.c:390
+#, fuzzy, c-format
+msgid "Bad character in input: `%s'."
+msgstr "Caractere inválido na entrada: '%c'."
 
-#: src/language/control/control-stack.c:72
+#: src/language/lexer/lexer.c:427
 #, c-format
-msgid "This command cannot appear outside %s...%s."
-msgstr "Este comando não pode aparecer fora de %s...%s."
-
-#: src/language/control/do-if.c:177
-msgid "This command may not follow ELSE in DO IF...END IF."
-msgstr "Este comando não pode seguir ELSE em um DO IF...END IF."
-
-#: src/language/control/loop.c:214
-msgid "Only one index clause may be specified."
-msgstr "Apenas um índice de cláusula pode ser especificado."
+msgid "Subcommand %s may only be specified once."
+msgstr "Subcomando %s só pode ser especificado uma vez."
 
-#: src/language/control/repeat.c:171
+#: src/language/lexer/lexer.c:435
 #, c-format
-msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
-msgstr "Nome de variável dummy \"%s\" oculta variável de dicionário \"%s\"."
+msgid "missing required subcommand %s"
+msgstr "subcomando necessário %s ausente"
 
-#: src/language/control/repeat.c:176
+#: src/language/lexer/lexer.c:464
 #, c-format
-msgid "Dummy variable name \"%s\" is given twice."
-msgstr "Variável dummy de nome \"%s\" foi informada duas vezes."
+msgid "Syntax error %s at %s."
+msgstr "Erro de sintaxe %s em %s."
 
-#: src/language/control/repeat.c:222
+#: src/language/lexer/lexer.c:467
 #, c-format
-msgid "Dummy variable \"%.*s\" had %d substitutions, so \"%.*s\" must also, but %d were specified."
-msgstr "Variável dummy \"%.*s\" tinha %d substituições, portanto \"%.*s\"também deveria ter, porém %d foram especificadas."
-
-#: src/language/control/repeat.c:334
-msgid "DO REPEAT may not nest in compatibility mode."
-msgstr "DO REPEAT não pode estar aninhado no modo de compatibilidade."
+msgid "Syntax error at %s."
+msgstr "Erro de sintaxe em %s."
 
-#: src/language/control/repeat.c:436
-msgid "Ranges may only have integer bounds"
-msgstr "Intervalos podem ter somente intervalos inteiros"
+#: src/language/lexer/lexer.c:479 src/language/xforms/select-if.c:60
+#: src/language/stats/autorecode.c:144 src/language/data-io/print-space.c:73
+msgid "expecting end of command"
+msgstr "esperando fim do comando"
 
-#: src/language/control/repeat.c:445
+#: src/language/lexer/lexer.c:601 src/language/lexer/lexer.c:618
 #, c-format
-msgid "%g TO %g is an invalid range."
-msgstr "%g TO %g é um intervalo inválido."
-
-#: src/language/control/repeat.c:480
-msgid "String expected."
-msgstr "String esperada."
+msgid "expecting `%s'"
+msgstr "esperando '%s'"
 
-#: src/language/control/repeat.c:499
-msgid "No matching DO REPEAT."
-msgstr "DO REPEAT não coincidindo."
+#: src/language/lexer/lexer.c:632
+msgid "expecting string"
+msgstr "esperando string"
 
-#: src/language/control/temporary.c:46
-msgid "This command may only appear once between procedures and procedure-like commands."
-msgstr ""
+#: src/language/lexer/lexer.c:646
+msgid "expecting integer"
+msgstr "esperando inteiro"
 
-#: src/language/data-io/data-list.c:128
-msgid "The END subcommand may only be used within INPUT PROGRAM."
-msgstr "O subcomando END só pode ser usado dentro de INPUT PROGRAM."
+#: src/language/lexer/lexer.c:659
+msgid "expecting number"
+msgstr "esperando número"
 
-#: src/language/data-io/data-list.c:134
-msgid "The END subcommand may only be specified once."
-msgstr "O subcomando END só pode ser especificado uma vez."
+#: src/language/lexer/lexer.c:671
+msgid "expecting identifier"
+msgstr "esperando identificador"
 
-#: src/language/data-io/data-list.c:172
-msgid "Only one of FIXED, FREE, or LIST may be specified."
-msgstr "Apenas um FIXED, FREE ou LIST pode ser especificado."
+#: src/language/lexer/lexer.c:1065
+msgid "binary"
+msgstr "binário"
 
-#: src/language/data-io/data-list.c:237
-msgid "The END subcommand may be used only with DATA LIST FIXED."
-msgstr "O subcomando END só pode ser usado com DATA LIST FIXED."
+#: src/language/lexer/lexer.c:1070
+msgid "octal"
+msgstr "octal"
 
-#: src/language/data-io/data-list.c:252
-msgid "At least one variable must be specified."
-msgstr "Pelo menos uma variável deve ser especificada."
+#: src/language/lexer/lexer.c:1075
+msgid "hex"
+msgstr "hexa"
 
-#: src/language/data-io/data-list.c:349 src/language/data-io/data-list.c:438
-#: src/language/data-io/get-data.c:528
+#: src/language/lexer/lexer.c:1085
 #, c-format
-msgid "%s is a duplicate variable name."
-msgstr "%s é um nome de variável duplicado."
+msgid "String of %s digits has %zu characters, which is not a multiple of %d."
+msgstr "String de %s dígitos tem %zu caracteres, o que não é múltiplo de %d."
 
-#: src/language/data-io/data-list.c:356
+#: src/language/lexer/lexer.c:1114
 #, c-format
-msgid "There is already a variable %s of a different type."
-msgstr "Já existe uma variável %s de um tipo diferente."
+msgid "`%c' is not a valid %s digit."
+msgstr "'%c' não é um dígito %s válido."
 
-#: src/language/data-io/data-list.c:363
-#, c-format
-msgid "There is already a string variable %s of a different width."
-msgstr "Já existe uma variável string %s de comprimento diferente."
+#: src/language/lexer/lexer.c:1148
+msgid "Unterminated string constant."
+msgstr "Constante string não terminada."
 
-#: src/language/data-io/data-list.c:371
-#, c-format
-msgid "Cannot place variable %s on record %d when RECORDS=%d is specified."
-msgstr "Impossível colocar variável %s no registro %d quando RECORDS=%d está especificado."
+#: src/language/lexer/lexer.c:1202
+msgid "Unexpected end of file in string concatenation."
+msgstr "Fim de arquivo inesperado na concatenação da string."
 
-#: src/language/data-io/data-parser.c:455
-#: src/language/data-io/data-parser.c:464
-msgid "Quoted string extends beyond end of line."
-msgstr "String entre aspas se estende além do fim da linha."
+#: src/language/lexer/lexer.c:1210
+msgid "String expected following `+'."
+msgstr "String esperada seguindo '+'."
 
-#: src/language/data-io/data-parser.c:520
+#: src/language/lexer/lexer.c:1223
 #, c-format
-msgid "Partial case of %d of %d records discarded."
-msgstr "Caso parcial dos registros %d a %d descartados."
+msgid "String exceeds 255 characters in length (%zu characters)."
+msgstr "String excedeu 255 caracteres de comprimento (%zu caracteres)."
+
+#: src/language/lexer/format-parser.c:88
+msgid "expecting valid format specifier"
+msgstr "esperando especificador de formato válido"
 
-#: src/language/data-io/data-parser.c:566
+#: src/language/lexer/format-parser.c:107
+#: src/language/lexer/format-parser.c:126
+#: src/language/data-io/placement-parser.c:226
 #, c-format
-msgid "Partial case discarded.  The first variable missing was %s."
-msgstr "Casos parciais descartados. A primeira variável ausente foi %s."
+msgid "Unknown format type \"%s\"."
+msgstr "Tipo de formato \"%s\" desconhecido."
+
+#: src/language/lexer/format-parser.c:121
+msgid "expecting format type"
+msgstr "esperando formato de tipo"
 
-#: src/language/data-io/data-parser.c:603
+#: src/language/lexer/value-parser.c:60
 #, c-format
-msgid "Missing value(s) for all variables from %s onward.  These will be filled with the system-missing value or blanks, as appropriate."
+msgid ""
+"Low end of range (%g) is below high end (%g).  The range will be treated as "
+"reversed."
 msgstr ""
+"Limite inferior do intervalo (%g) é maior que o limite superior (%g). O "
+"intervalo será invertido."
 
-#: src/language/data-io/data-parser.c:622
-msgid "Record ends in data not part of any field."
-msgstr "Registro termina em dados que não fazem parte de nenhum campo."
+#: src/language/lexer/value-parser.c:68
+#, c-format
+msgid "Ends of range are equal (%g)."
+msgstr "Limites do intervalo são iguais (%g)."
 
-#: src/language/data-io/data-parser.c:642
-#: src/language/data-io/data-parser.c:683 src/language/data-io/print.c:403
-#: src/language/dictionary/split-file.c:84
-#: src/language/dictionary/sys-file-info.c:161
-#: src/language/dictionary/sys-file-info.c:390
-#: src/language/dictionary/sys-file-info.c:634
-#: src/language/stats/descriptives.c:883 src/ui/gui/dict-display.c:245
-msgid "Variable"
-msgstr "Variável"
+#: src/language/lexer/value-parser.c:76
+msgid "LO or LOWEST must be part of a range."
+msgstr "LO ou LOWEST deve ser parte do intervalo."
 
-#: src/language/data-io/data-parser.c:643 src/language/data-io/print.c:404
-msgid "Record"
-msgstr "Registro"
+#: src/language/lexer/value-parser.c:109
+msgid "System-missing value is not valid here."
+msgstr "Valor system-missing não é válido aqui."
 
-#: src/language/data-io/data-parser.c:644 src/language/data-io/print.c:405
-#: src/ui/gui/crosstabs.glade:92 src/ui/gui/psppire-var-sheet.c:107
-msgid "Columns"
-msgstr "Colunas"
+#: src/language/lexer/value-parser.c:117
+msgid "expecting number or data string"
+msgstr "esperando número ou string de data"
 
-#: src/language/data-io/data-parser.c:645
-#: src/language/data-io/data-parser.c:684 src/language/data-io/print.c:406
-msgid "Format"
-msgstr "Formato"
+#: src/language/lexer/variable-parser.c:65
+msgid "expecting variable name"
+msgstr "esperando nome de variável"
 
-#: src/language/data-io/data-parser.c:664
+#: src/language/lexer/variable-parser.c:75
 #, c-format
-msgid "Reading %d record from %s."
-msgid_plural "Reading %d records from %s."
-msgstr[0] ""
-msgstr[1] ""
+msgid "%s is not a variable name."
+msgstr "%s não é um nome válido."
 
-#: src/language/data-io/data-parser.c:700
+#: src/language/lexer/variable-parser.c:178
 #, c-format
-msgid "Reading free-form data from %s."
+msgid ""
+"%s is not a numeric variable.  It will not be included in the variable list."
 msgstr ""
+"%s não é uma variável válida. Ela não será incluída na lista de variáveis."
 
-#. TRANSLATORS: this fragment will be interpolated into
-#. messages in fh_lock() that identify types of files.
-#: src/language/data-io/data-reader.c:122
-#: src/language/data-io/data-writer.c:58
-msgid "data file"
-msgstr "arquivo de dados"
-
-#: src/language/data-io/data-reader.c:149
+#: src/language/lexer/variable-parser.c:181
 #, c-format
-msgid "Could not open \"%s\" for reading as a data file: %s."
-msgstr "Impossível abrir \"%s\" para leitura como um arquivo de dados: %s."
-
-#: src/language/data-io/data-reader.c:191
-msgid "Unexpected end-of-file while reading data in BEGIN DATA.  This probably indicates a missing or misformatted END DATA command.  END DATA must appear by itself on a single line with exactly one space between words."
-msgstr "Fim-de-arquivo inesperado ao ler dados com BEGIN DATA. Isto provavelmente indica um END DATA ausente ou mal formatado. END DATA deve aparecer sozinho em uma única linha com exatamente um espaço entre as palavras."
+msgid ""
+"%s is not a string variable.  It will not be included in the variable list."
+msgstr ""
+"%s não é uma variável string. Ela não será incluída na lista de variáveis."
 
-#: src/language/data-io/data-reader.c:216
+#: src/language/lexer/variable-parser.c:185
 #, c-format
-msgid "Error reading file %s: %s."
-msgstr "Erro lendo arquivo %s: %s."
+msgid "Scratch variables (such as %s) are not allowed here."
+msgstr "Variáveis rascunho (como %s) não são permitidas aqui."
 
-#: src/language/data-io/data-reader.c:219
+#: src/language/lexer/variable-parser.c:189
 #, c-format
-msgid "Unexpected end of file reading %s."
-msgstr "Fim de arquivo não esperado lendo %s."
+msgid ""
+"%s and %s are not the same type.  All variables in this variable list must "
+"be of the same type.  %s will be omitted from the list."
+msgstr ""
+"%s e %s não são do mesmo tipo. Todas as variáveis nesta lista devem ser do "
+"mesmo tipo. %s será omitida da lista."
 
-#: src/language/data-io/data-reader.c:228
+#: src/language/lexer/variable-parser.c:195
 #, c-format
-msgid "Unexpected end of file in partial record reading %s."
-msgstr "Fim de arquivo inesperado em registro parcial ao ler %s."
+msgid ""
+"%s and %s are string variables with different widths.  All variables in this "
+"variable list must have the same width.  %s will be omitted from the list."
+msgstr ""
+"%s e %s são variáveis strings de tamanho diferente. Todas as variáveis nesta "
+"lista devem ter o mesmo tamanho. %s será omitida da lista."
 
-#: src/language/data-io/data-reader.c:288
+#: src/language/lexer/variable-parser.c:200
+#: src/language/lexer/variable-parser.c:496
 #, c-format
-msgid "Corrupt block descriptor word at offset 0x%lx in %s."
-msgstr "Palavra descritora de bloco corrompida no offset 0x%lx em %s."
+msgid "Variable %s appears twice in variable list."
+msgstr "Variável %s apareceu duas vezes na lista de variáveis."
 
-#: src/language/data-io/data-reader.c:289
+#: src/language/lexer/variable-parser.c:313
 #, c-format
-msgid "Corrupt record descriptor word at offset 0x%lx in %s."
-msgstr "Palavra descritora de registro corrompida no offset 0x%lx em %s."
+msgid "%s TO %s is not valid syntax since %s precedes %s in the dictionary."
+msgstr "%s TO %s não é uma sintaxe válida pois %s precede %s no dicionário."
 
-#: src/language/data-io/data-reader.c:302
+#: src/language/lexer/variable-parser.c:321
 #, c-format
-msgid "Corrupt record size at offset 0x%lx in %s."
-msgstr "Tamanho de registro corrompido no offset 0x%lx em %s."
+msgid ""
+"When using the TO keyword to specify several variables, both variables must "
+"be from the same variable dictionaries, of either ordinary, scratch, or "
+"system variables.  %s is a %s variable, whereas %s is %s."
+msgstr ""
+"Ao usar a palavra-chave TO para especificar várias variáveis, ambas devem "
+"ser do mesmo dicionário de variáveis, ordinárias, rascunho ou variáveis de "
+"sistema. %s é uma variável %s, enquanto %s é %s."
 
-#: src/language/data-io/data-reader.c:444
-msgid "Record exceeds remaining block length."
-msgstr "Registro excede tamanho restante de bloco."
+#: src/language/lexer/variable-parser.c:395
+msgid "incorrect use of TO convention"
+msgstr "uso incorreto da convenção TO."
 
-#: src/language/data-io/data-reader.c:518
-#, c-format
-msgid "Attempt to read beyond end-of-file on file %s."
-msgstr "Tentativa de ler arquivo %s além de seu fim."
+#: src/language/lexer/variable-parser.c:450
+msgid "Scratch variables not allowed here."
+msgstr "Variáveis rascunho não permitidas aqui."
 
-#: src/language/data-io/data-reader.c:521
-msgid "Attempt to read beyond END DATA."
-msgstr "Tentativa de ler além de END DATA."
+#: src/language/lexer/variable-parser.c:472
+msgid "Prefixes don't match in use of TO convention."
+msgstr "Prefixos não coincidem no uso da convenção TO."
 
-# inline?
-#: src/language/data-io/data-reader.c:707
-msgid "This command is not valid here since the current input program does not access the inline file."
-msgstr "Este comando não é válido aqui, pois a entrada do programa atual não acessa arquivo inline."
+#: src/language/lexer/variable-parser.c:477
+msgid "Bad bounds in use of TO convention."
+msgstr "Intervalos incorretos no uso da convenção TO."
 
-#: src/language/data-io/data-writer.c:74
+#: src/language/xforms/compute.c:149 src/language/xforms/compute.c:203
 #, c-format
-msgid "An error occurred while opening \"%s\" for writing as a data file: %s."
-msgstr "Um erro ocorreu ao abrir \"%s\" para gravação como um arquivo de dados: %s."
+msgid ""
+"When executing COMPUTE: SYSMIS is not a valid value as an index into vector %"
+"s."
+msgstr ""
 
-#: src/language/data-io/data-writer.c:191
+#: src/language/xforms/compute.c:153 src/language/xforms/compute.c:210
 #, c-format
-msgid "I/O error occurred writing data file \"%s\"."
-msgstr "Ocorreu um erro de E/S gravando no arquivo de dados \"%s\"."
+msgid ""
+"When executing COMPUTE: %g is not a valid value as an index into vector %s."
+msgstr ""
 
-#: src/language/data-io/file-handle.q:65
+#: src/language/xforms/compute.c:353
 #, c-format
-msgid "File handle %s is already defined.  Use CLOSE FILE HANDLE before redefining a file handle."
-msgstr "Manipulador de arquivo %s já está definido. Use CLOSE FILE HANDLER antes de redefinir um manipulador."
+msgid "There is no vector named %s."
+msgstr "Não existe vetor de nome %s."
 
-#: src/language/data-io/file-handle.q:120
-msgid "RECFORM must be specified with MODE=360."
-msgstr "RECFORM deve ser especificado com MODE=360"
+#: src/language/xforms/count.c:123
+msgid "Destination cannot be a string variable."
+msgstr "Destino não pode ser uma variável string."
 
-#: src/language/data-io/file-handle.q:131
-#, c-format
-msgid "The specified file mode requires LRECL.  Assuming %d-character records."
-msgstr "O modo de arquivo especificado requer LRECL. Assumindo registros de %d caracteres."
+#: src/language/xforms/sample.c:76
+msgid "The sampling factor must be between 0 and 1 exclusive."
+msgstr ""
 
-#: src/language/data-io/file-handle.q:135
+#: src/language/xforms/sample.c:96
 #, c-format
-msgid "Record length (%ld) must be between 1 and %lu bytes.  Assuming %d-character records."
-msgstr "Tamanho de registro (%ld) deve ser entre 1 e %lu bytes. Assumindo registros de %d caracteres."
+msgid "Cannot sample %d observations from a population of %d."
+msgstr ""
 
-#: src/language/data-io/file-handle.q:177
-msgid "file"
-msgstr "arquivo"
+#: src/language/xforms/recode.c:248
+msgid ""
+"Inconsistent target variable types.  Target variables must be all numeric or "
+"all string."
+msgstr ""
 
-#: src/language/data-io/file-handle.q:179
-msgid "inline file"
-msgstr "arquivo inline"
+#: src/language/xforms/recode.c:269
+msgid "CONVERT requires string input values and numeric output values."
+msgstr ""
 
-#: src/language/data-io/file-handle.q:205
-msgid "expecting a file name or handle name"
-msgstr "esperando nome de arquivo ou de manipulador"
+#: src/language/xforms/recode.c:324
+msgid "THRU is not allowed with string variables."
+msgstr "THRU não é permitido com variáveis string."
 
-#: src/language/data-io/file-handle.q:225
-#, c-format
-msgid "Handle for %s not allowed here."
-msgstr "Manipulador para %s não é permitido aqui."
+#: src/language/xforms/recode.c:403
+msgid "expecting output value"
+msgstr ""
 
-#: src/language/data-io/get-data.c:62
+#: src/language/xforms/recode.c:460
 #, c-format
-msgid "Unsupported TYPE %s"
-msgstr "TYPE %s não suportado"
+msgid ""
+"%zu variable(s) cannot be recoded into %zu variable(s).  Specify the same "
+"number of variables as source and target variables."
+msgstr ""
 
-#: src/language/data-io/get-data.c:258
+#: src/language/xforms/recode.c:475
 #, c-format
-msgid "%s is allowed only with %s arrangement, but %s arrangement was stated or implied earlier in this command."
+msgid ""
+"There is no variable named %s.  (All string variables specified on INTO must "
+"already exist.  Use the STRING command to create a string variable.)"
 msgstr ""
+"Não existe variável de nome %s. (Todas as variáveis strings especificadas em "
+"INTO devem existir previamente.  Use o comando STRING para criar uma "
+"variável string.)"
 
-#: src/language/data-io/get-data.c:313
-msgid "expecting FIXED or DELIMITED"
-msgstr "esperando FIXED ou DELIMITED"
-
-#: src/language/data-io/get-data.c:326
-msgid "Value of FIRSTCASE must be 1 or greater."
-msgstr "Valor de FIRSTCASE deve ser maior ou igual a 1."
-
-#: src/language/data-io/get-data.c:351
-msgid "expecting LINE or VARIABLES"
-msgstr "esperando LINE ou VARIABLES"
-
-#: src/language/data-io/get-data.c:364
-msgid "Value of FIXCASE must be at least 1."
-msgstr "Valor de FIXCASE deve ser pelo menos 1."
-
-#: src/language/data-io/get-data.c:384
-msgid "Value of FIRST must be at least 1."
-msgstr "Valor de FIRST deve ser pelo menos 1."
-
-#: src/language/data-io/get-data.c:396
-msgid "Value of PERCENT must be between 1 and 100."
-msgstr "Valor de PERCENT deve estar entre 1 e 100."
-
-#: src/language/data-io/get-data.c:445
-msgid "In compatible syntax mode, the QUALIFIER string must contain exactly one character."
-msgstr "No modo de sintaxe compatível, a strint QUALIFIER deve conter exatamente um caractere."
-
-#: src/language/data-io/get-data.c:460
-msgid "expecting VARIABLES"
-msgstr "esperando VARIABLES"
-
-#: src/language/data-io/get-data.c:482
-#: src/language/data-io/placement-parser.c:378
+#: src/language/xforms/recode.c:491
 #, 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."
+msgid "INTO is required with %s input values and %s output values."
 msgstr ""
 
-#: src/language/data-io/get-data.c:491
+#: src/language/xforms/recode.c:504
 #, c-format
-msgid "The record number specified, %ld, exceeds the number of records per case specified on FIXCASE, %d."
+msgid "Type mismatch.  Cannot store %s data in %s variable %s."
 msgstr ""
 
-#: src/language/data-io/get.c:99
-msgid "expecting COMM or TAPE"
-msgstr "esperando COMM ou TAPE"
+#: src/language/xforms/select-if.c:100
+msgid "Syntax error expecting OFF or BY.  Turning off case filtering."
+msgstr ""
 
-#: src/language/data-io/get.c:272 src/language/data-io/get.c:286
-#: src/language/data-io/get.c:311
-#, c-format
-msgid "expecting %s or %s"
-msgstr "esperando %s ou %s"
-
-#: src/language/data-io/get.c:506 src/language/data-io/print.c:178
-msgid "expecting a valid subcommand"
-msgstr "esperando um subcomando válido"
+#: src/language/xforms/select-if.c:115
+msgid "The filter variable must be numeric."
+msgstr ""
 
-#: src/language/data-io/get.c:539
-#, c-format
-msgid "Cannot rename %s as %s because there already exists a variable named %s.  To rename variables with overlapping names, use a single RENAME subcommand such as \"/RENAME (A=B)(B=C)(C=A)\", or equivalently, \"/RENAME (A B C=B C A)\"."
+#: src/language/xforms/select-if.c:121
+msgid "The filter variable may not be scratch."
 msgstr ""
 
-#: src/language/data-io/get.c:565
-msgid "`=' expected after variable list."
-msgstr "'=' esperado após lista de variáveis."
+#: src/language/control/control-stack.c:27
+#, c-format
+msgid "%s without %s."
+msgstr "%s sem %s."
 
-#: src/language/data-io/get.c:572
+#: src/language/control/control-stack.c:55
 #, c-format
-msgid "Number of variables on left side of `=' (%zu) does not match number of variables on right side (%zu), in parenthesized group %d of RENAME subcommand."
+msgid "This command must appear inside %s...%s, without intermediate %s...%s."
 msgstr ""
+"Este comando deve aparecer dentro de %s...%s sem %s...%s intermediário."
 
-#: src/language/data-io/get.c:585
+#: src/language/control/control-stack.c:72
 #, c-format
-msgid "Requested renaming duplicates variable name %s."
-msgstr ""
+msgid "This command cannot appear outside %s...%s."
+msgstr "Este comando não pode aparecer fora de %s...%s."
 
-#: src/language/data-io/get.c:615
-msgid "Cannot DROP all variables from dictionary."
-msgstr "DROP de todas as variáveis do dicionário impossível."
+#: src/language/control/do-if.c:177
+msgid "This command may not follow ELSE in DO IF...END IF."
+msgstr "Este comando não pode seguir ELSE em um DO IF...END IF."
 
-#: src/language/data-io/get.c:788
-msgid "Cannot specify the active file since no active file has been defined."
-msgstr "Impossível especificar o arquivo ativo uma vez que nenhum arquivo ativo foi definido."
+#: src/language/control/loop.c:214
+msgid "Only one index clause may be specified."
+msgstr "Apenas um índice de cláusula pode ser especificado."
 
-#: src/language/data-io/get.c:795
-msgid "MATCH FILES may not be used after TEMPORARY when the active file is an input source.  Temporary transformations will be made permanent."
+#: src/language/control/temporary.c:46
+msgid ""
+"This command may only appear once between procedures and procedure-like "
+"commands."
 msgstr ""
 
-#: src/language/data-io/get.c:829
-msgid "Multiple IN subcommands for a single FILE or TABLE."
-msgstr "Múltiplos subcomandos IN para um único FILE ou TABLE"
+#: src/language/control/repeat.c:172
+#, c-format
+msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
+msgstr "Nome de variável dummy \"%s\" oculta variável de dicionário \"%s\"."
 
-#: src/language/data-io/get.c:873
+#: src/language/control/repeat.c:177
 #, c-format
-msgid "File %s lacks BY variable %s."
-msgstr "Arquivo %s não possui variável BY %s."
+msgid "Dummy variable name \"%s\" is given twice."
+msgstr "Variável dummy de nome \"%s\" foi informada duas vezes."
 
-#: src/language/data-io/get.c:876
+#: src/language/control/repeat.c:223
 #, c-format
-msgid "Active file lacks BY variable %s."
+msgid ""
+"Dummy variable \"%.*s\" had %d substitutions, so \"%.*s\" must also, but %d "
+"were specified."
 msgstr ""
+"Variável dummy \"%.*s\" tinha %d substituições, portanto \"%.*s\"também "
+"deveria ter, porém %d foram especificadas."
 
-#: src/language/data-io/get.c:946
-msgid "BY is required when TABLE is specified."
-msgstr "BY é necessário quando TABLE é especificado."
+#: src/language/control/repeat.c:335
+msgid "DO REPEAT may not nest in compatibility mode."
+msgstr "DO REPEAT não pode estar aninhado no modo de compatibilidade."
 
-#: src/language/data-io/get.c:951
-msgid "BY is required when IN is specified."
-msgstr "BY é necessário quando IN é especificado."
+#: src/language/control/repeat.c:437
+msgid "Ranges may only have integer bounds"
+msgstr "Intervalos podem ter somente intervalos inteiros"
 
-#: src/language/data-io/get.c:1056
+#: src/language/control/repeat.c:446
 #, c-format
-msgid "Variable name %s specified on %s subcommand duplicates an existing variable name."
-msgstr ""
+msgid "%g TO %g is an invalid range."
+msgstr "%g TO %g é um intervalo inválido."
+
+#: src/language/control/repeat.c:481
+msgid "String expected."
+msgstr "String esperada."
+
+#: src/language/control/repeat.c:500
+msgid "No matching DO REPEAT."
+msgstr "DO REPEAT não coincidindo."
+
+#: src/language/dictionary/attributes.c:108
+#, fuzzy
+msgid "Attribute array index must be between 1 and 65535."
+msgstr "Dia (%ld) deve estar entre 1 e 31."
+
+#: src/language/dictionary/attributes.c:189
+#, fuzzy
+msgid "expecting ATTRIBUTE= or DELETE="
+msgstr "esperando FIXED ou DELIMITED"
 
-#: src/language/data-io/get.c:1303
+#: src/language/dictionary/apply-dictionary.c:75
 #, c-format
-msgid "Variable %s in file %s (%s) has different type or width from the same variable in earlier file (%s)."
-msgstr ""
+msgid "Variable %s is %s in target file, but %s in source file."
+msgstr "Variável %s é %s no arquivo de destino, mas %s no arquivo de origem."
 
-#: src/language/data-io/inpt-pgm.c:129
-msgid "Unexpected end-of-file within INPUT PROGRAM."
+#: src/language/dictionary/apply-dictionary.c:115
+msgid "No matching variables found between the source and target files."
 msgstr ""
+"Nenhuma coincidência de variáveis encontrada entre os arquivos de origem e "
+"destino."
 
-#: src/language/data-io/inpt-pgm.c:142
-msgid "Input program did not create any variables."
+#: src/language/dictionary/delete-variables.c:40
+msgid ""
+"DELETE VARIABLES may not be used after TEMPORARY.  Temporary transformations "
+"will be made permanent."
 msgstr ""
 
-#: src/language/data-io/inpt-pgm.c:287
-msgid "COLUMN subcommand multiply specified."
+#: src/language/dictionary/delete-variables.c:48
+msgid ""
+"DELETE VARIABLES may not be used to delete all variables from the active "
+"file dictionary.  Use NEW FILE instead."
 msgstr ""
 
-#: src/language/data-io/inpt-pgm.c:337
-msgid "REREAD: Column numbers must be positive finite numbers.  Column set to 1."
+#: src/language/dictionary/formats.c:90
+msgid "`(' expected after variable list."
 msgstr ""
 
-#: src/language/data-io/list.q:157 src/language/stats/descriptives.c:362
-msgid "No variables specified."
+#: src/language/dictionary/formats.c:100 src/language/dictionary/numeric.c:74
+msgid "`)' expected after output format."
 msgstr ""
 
-#: src/language/data-io/list.q:165
-#, c-format
-msgid "The first case (%ld) specified precedes the last case (%ld) specified.  The values will be swapped."
-msgstr ""
+#: src/language/dictionary/missing-values.c:56
+#: src/language/stats/aggregate.c:459
+msgid "expecting `('"
+msgstr "esperando '('"
 
-#: src/language/data-io/list.q:173
+#: src/language/dictionary/missing-values.c:72
 #, c-format
-msgid "The first case (%ld) to list is less than 1.  The value is being reset to 1."
+msgid ""
+"Cannot mix numeric variables (e.g. %s) and string variables (e.g. %s) within "
+"a single list."
 msgstr ""
+"Não é possível misturar variáveis numéricas (e.g. %s) e strings (e.g. %s) "
+"dentro de uma única lista."
 
-#: src/language/data-io/list.q:179
+#: src/language/dictionary/missing-values.c:116
 #, c-format
-msgid "The last case (%ld) to list is less than 1.  The value is being reset to 1."
+msgid "Truncating missing value to maximum acceptable length (%d bytes)."
 msgstr ""
 
-#: src/language/data-io/list.q:185
+#: src/language/dictionary/missing-values.c:138
 #, c-format
-msgid "The step value %ld is less than 1.  The value is being reset to 1."
+msgid "Missing values provided are too long to assign to variable of width %d."
 msgstr ""
 
-#: src/language/data-io/list.q:211
-msgid "`/FORMAT WEIGHT' specified, but weighting is not on."
-msgstr "'/FORMAT WEIGHT' especificado, mas ponderação está desabilitada."
-
-#: src/language/data-io/list.q:467
-msgid "Line"
-msgstr "Linha"
-
-#: src/language/data-io/placement-parser.c:87
-#, c-format
-msgid "Number of variables specified (%zu) differs from number of variable formats (%zu)."
+#: src/language/dictionary/modify-variables.c:92
+msgid ""
+"MODIFY VARS may not be used after TEMPORARY.  Temporary transformations will "
+"be made permanent."
 msgstr ""
 
-#: src/language/data-io/placement-parser.c:97
-msgid "SPSS-like or Fortran-like format specification expected after variable names."
-msgstr ""
+#: src/language/dictionary/modify-variables.c:114
+#: src/language/dictionary/modify-variables.c:177
+#, fuzzy, c-format
+msgid "%s subcommand may be given at most once."
+msgstr "Subcomando RENAME só pode ser dado uma vez."
 
-#: src/language/data-io/placement-parser.c:119
-#, c-format
-msgid "The %d columns %d-%d can't be evenly divided into %zu fields."
+#: src/language/dictionary/modify-variables.c:137
+msgid "Cannot specify ALL after specifying a set of variables."
 msgstr ""
 
-#: src/language/data-io/placement-parser.c:226
-#: src/language/lexer/format-parser.c:107
-#: src/language/lexer/format-parser.c:126
-#, c-format
-msgid "Unknown format type \"%s\"."
-msgstr "Tipo de formato \"%s\" desconhecido."
+#: src/language/dictionary/modify-variables.c:147
+#: src/language/dictionary/modify-variables.c:190
+#, fuzzy, c-format
+msgid "`(' expected on %s subcommand."
+msgstr "'(' esperado no subcomando RENAME."
 
-#: src/language/data-io/placement-parser.c:305
-msgid "Column positions for fields must be positive."
+#: src/language/dictionary/modify-variables.c:159
+msgid "`)' expected following variable names on REORDER subcommand."
 msgstr ""
 
-#: src/language/data-io/placement-parser.c:307
-msgid "Column positions for fields must not be negative."
+#: src/language/dictionary/modify-variables.c:199
+msgid ""
+"`=' expected between lists of new and old variable names on RENAME "
+"subcommand."
 msgstr ""
 
-#: src/language/data-io/placement-parser.c:344
-msgid "The ending column for a field must be greater than the starting column."
+#: src/language/dictionary/modify-variables.c:208
+#: src/language/dictionary/rename-variables.c:77
+#, c-format
+msgid ""
+"Differing number of variables in old name list (%zu) and in new name list (%"
+"zu)."
 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 "esperando fim do comando"
-
-#: src/language/data-io/print-space.c:116
-msgid "The expression on PRINT SPACE evaluated to the system-missing value."
+#: src/language/dictionary/modify-variables.c:219
+msgid "`)' expected after variable lists on RENAME subcommand."
 msgstr ""
 
-#: src/language/data-io/print-space.c:119
-#, c-format
-msgid "The expression on PRINT SPACE evaluated to %g."
+#: src/language/dictionary/modify-variables.c:233
+msgid ""
+"KEEP subcommand may be given at most once.  It may not be given in "
+"conjunction with the DROP subcommand."
 msgstr ""
 
-#: src/language/data-io/print.c:266
-#, c-format
-msgid "Output calls for %d records but %zu specified on RECORDS subcommand."
+#: src/language/dictionary/modify-variables.c:276
+msgid ""
+"DROP subcommand may be given at most once.  It may not be given in "
+"conjunction with the KEEP subcommand."
 msgstr ""
 
-#: src/language/data-io/print.c:436
+#: src/language/dictionary/modify-variables.c:302
 #, c-format
-msgid "Writing %d record to %s."
-msgid_plural "Writing %d records to %s."
-msgstr[0] ""
-msgstr[1] ""
+msgid "Unrecognized subcommand name `%s'."
+msgstr "Subcomando de nome '%s' não reconhecido."
 
-#: src/language/data-io/print.c:440
-#, c-format
-msgid "Writing %d record."
-msgid_plural "Writing %d records."
-msgstr[0] ""
-msgstr[1] ""
+#: src/language/dictionary/modify-variables.c:304
+msgid "Subcommand name expected."
+msgstr "Nome de Subcomando esperado."
 
-#: src/language/dictionary/apply-dictionary.c:75
-#, c-format
-msgid "Variable %s is %s in target file, but %s in source file."
-msgstr "Variável %s é %s no arquivo de destino, mas %s no arquivo de origem."
+#: src/language/dictionary/modify-variables.c:312
+msgid "`/' or `.' expected."
+msgstr "'/' ou '.' esperado."
 
-#: src/language/dictionary/apply-dictionary.c:99
+#: src/language/dictionary/mrsets.c:98
 #, c-format
-msgid "Cannot add value labels from source file to long string variable %s."
+msgid ""
+"%s is not a valid name for a multiple response set.  Multiple response set "
+"names must begin with `$'."
 msgstr ""
 
-#: src/language/dictionary/apply-dictionary.c:113
+#: src/language/dictionary/mrsets.c:120
 #, c-format
-msgid "Cannot apply missing values from source file to long string variable %s."
+msgid ""
+"VARIABLES specified only variable %s on %s, but at least two variables are "
+"required."
 msgstr ""
 
-#: src/language/dictionary/apply-dictionary.c:126
-msgid "No matching variables found between the source and target files."
-msgstr "Nenhuma coincidência de variáveis encontrada entre os arquivos de origem e destino."
-
-#: src/language/dictionary/delete-variables.c:40
-msgid "DELETE VARIABLES may not be used after TEMPORARY.  Temporary transformations will be made permanent."
+#: src/language/dictionary/mrsets.c:153
+msgid "Numeric VALUE must be an integer."
 msgstr ""
 
-#: src/language/dictionary/delete-variables.c:48
-msgid "DELETE VARIABLES may not be used to delete all variables from the active file dictionary.  Use NEW FILE instead."
+#: src/language/dictionary/mrsets.c:207 src/language/dictionary/mrsets.c:213
+#: src/language/dictionary/mrsets.c:223
+#, c-format
+msgid "Required %s specification missing from %s subcommand."
 msgstr ""
 
-#: src/language/dictionary/formats.c:90
-msgid "`(' expected after variable list."
+#: src/language/dictionary/mrsets.c:231 src/language/dictionary/mrsets.c:269
+#, c-format
+msgid ""
+"MDGROUP subcommand for group %s specifies a string VALUE, but the variables "
+"specified for this group are numeric."
 msgstr ""
 
-#: src/language/dictionary/formats.c:100 src/language/dictionary/numeric.c:74
-msgid "`)' expected after output format."
+#: src/language/dictionary/mrsets.c:255
+#, c-format
+msgid ""
+"VALUE string on MDGROUP subcommand for group %s is %d bytes long, but it "
+"must be no longer than the narrowest variable in the group, which is %s with "
+"a width of %d bytes."
 msgstr ""
 
-#: src/language/dictionary/missing-values.c:56
-#: src/language/stats/aggregate.c:451
-msgid "expecting `('"
-msgstr "esperando '('"
-
-#: src/language/dictionary/missing-values.c:72
+#: src/language/dictionary/mrsets.c:281
 #, c-format
-msgid "Cannot mix numeric variables (e.g. %s) and string variables (e.g. %s) within a single list."
-msgstr "Não é possível misturar variáveis numéricas (e.g. %s) e strings (e.g. %s) dentro de uma única lista."
+msgid ""
+"MDGROUP subcommand for group %s specifies LABELSOURCE=VARLABEL but not "
+"CATEGORYLABELS=COUNTEDVALUES.  Ignoring LABELSOURCE."
+msgstr ""
 
-#: src/language/dictionary/missing-values.c:117
+#: src/language/dictionary/mrsets.c:287
 #, c-format
-msgid "Truncating missing value to short string length (%d characters)."
+msgid ""
+"MDGROUP subcommand for group %s specifies both LABEL and LABELSOURCE, but "
+"only one of these subcommands may be used at a time.  Ignoring LABELSOURCE."
 msgstr ""
 
-#: src/language/dictionary/missing-values.c:139
+#: src/language/dictionary/mrsets.c:327
 #, c-format
-msgid "Missing values provided are too long to assign to variable of width %d."
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s have "
+"the same variable label.  Categories represented by these variables will not "
+"be distinguishable in output."
 msgstr ""
 
-#: src/language/dictionary/modify-variables.c:92
-msgid "MODIFY VARS may not be used after TEMPORARY.  Temporary transformations will be made permanent."
+#: src/language/dictionary/mrsets.c:357
+#, c-format
+msgid ""
+"Variable %s specified as part of multiple dichotomy group %s (which has "
+"CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value.  "
+"This category will not be distinguishable in output."
 msgstr ""
 
-#: src/language/dictionary/modify-variables.c:114
-msgid "REORDER subcommand may be given at most once."
+#: src/language/dictionary/mrsets.c:370
+#, c-format
+msgid ""
+"Variables %s and %s specified as part of multiple dichotomy group %s (which "
+"has CATEGORYLABELS=COUNTEDVALUES) have the same value label for the the "
+"group's counted value.  These categories will not be distinguishable in "
+"output."
 msgstr ""
 
-#: src/language/dictionary/modify-variables.c:137
-msgid "Cannot specify ALL after specifying a set of variables."
+#: src/language/dictionary/mrsets.c:427
+#, c-format
+msgid ""
+"Variables specified on MCGROUP should have the same categories, but %s and %"
+"s (and possibly others) in multiple category group %s have different value "
+"labels for value %s."
 msgstr ""
 
-#: src/language/dictionary/modify-variables.c:147
-msgid "`(' expected on REORDER subcommand."
-msgstr ""
+#: src/language/dictionary/mrsets.c:484
+#, fuzzy, c-format
+msgid "No multiple response set named %s."
+msgstr "Nenhuma função ou vetor de nome %s."
 
-#: src/language/dictionary/modify-variables.c:159
-msgid "`)' expected following variable names on REORDER subcommand."
+#: src/language/dictionary/mrsets.c:538
+#, fuzzy
+msgid "The active file dictionary does not contain any multiple response sets."
+msgstr "O arquivo de dicionário ativo não contém nenhum documento."
+
+#: src/language/dictionary/mrsets.c:548
+msgid "Multiple Response Sets"
 msgstr ""
 
-#: src/language/dictionary/modify-variables.c:177
-msgid "RENAME subcommand may be given at most once."
-msgstr "Subcomando RENAME só pode ser dado uma vez."
+#: src/language/dictionary/mrsets.c:549 src/ui/gui/psppire-var-sheet.c:534
+#: src/ui/gui/psppire-var-store.c:832
+msgid "Name"
+msgstr "Nome"
 
-#: src/language/dictionary/modify-variables.c:190
-msgid "`(' expected on RENAME subcommand."
-msgstr "'(' esperado no subcomando RENAME."
+#: src/language/dictionary/mrsets.c:550 src/ui/gui/variable-info.ui:8
+msgid "Variables"
+msgstr "Variáveis"
 
-#: src/language/dictionary/modify-variables.c:199
-msgid "`=' expected between lists of new and old variable names on RENAME subcommand."
-msgstr ""
+#: src/language/dictionary/mrsets.c:551
+#, fuzzy
+msgid "Details"
+msgstr "Decimais"
 
-#: src/language/dictionary/modify-variables.c:208
-#: src/language/dictionary/rename-variables.c:76
-#, c-format
-msgid "Differing number of variables in old name list (%zu) and in new name list (%zu)."
+#: src/language/dictionary/mrsets.c:565
+msgid "Multiple dichotomy set"
 msgstr ""
 
-#: src/language/dictionary/modify-variables.c:219
-msgid "`)' expected after variable lists on RENAME subcommand."
+#: src/language/dictionary/mrsets.c:566
+msgid "Multiple category set"
 msgstr ""
 
-#: src/language/dictionary/modify-variables.c:233
-msgid "KEEP subcommand may be given at most once.  It may not be given in conjunction with the DROP subcommand."
-msgstr ""
+#: src/language/dictionary/mrsets.c:568
+#: src/language/dictionary/split-file.c:84
+#: src/language/dictionary/sys-file-info.c:344
+#: src/language/dictionary/sys-file-info.c:583
+#: src/ui/gui/psppire-var-sheet.c:538 src/ui/gui/psppire-var-store.c:836
+#: src/ui/gui/crosstabs.ui:292 src/ui/gui/psppire.ui:1924
+msgid "Label"
+msgstr "Rótulo"
 
-#: src/language/dictionary/modify-variables.c:276
-msgid "DROP subcommand may be given at most once.  It may not be given in conjunction with the KEEP subcommand."
+#: src/language/dictionary/mrsets.c:572
+#, fuzzy
+msgid "Label source"
+msgstr "Rótulo: %s\n"
+
+#: src/language/dictionary/mrsets.c:574
+#, fuzzy
+msgid "First variable label among variables"
+msgstr "Variável de destino %s duplica variável existente %s."
+
+#: src/language/dictionary/mrsets.c:575
+msgid "Provided by user"
 msgstr ""
 
-#: src/language/dictionary/modify-variables.c:302
-#, c-format
-msgid "Unrecognized subcommand name `%s'."
-msgstr "Subcomando de nome '%s' não reconhecido."
+#: src/language/dictionary/mrsets.c:576
+#, fuzzy
+msgid "Counted value"
+msgstr "Copiar valores antigos"
 
-#: src/language/dictionary/modify-variables.c:304
-msgid "Subcommand name expected."
-msgstr "Nome de Subcomando esperado."
+#: src/language/dictionary/mrsets.c:582
+msgid "Category label source"
+msgstr ""
 
-#: src/language/dictionary/modify-variables.c:312
-msgid "`/' or `.' expected."
-msgstr "'/' ou '.' esperado."
+#: src/language/dictionary/mrsets.c:584
+#, fuzzy
+msgid "Variable labels"
+msgstr "Variáveis"
+
+#: src/language/dictionary/mrsets.c:585
+msgid "Value labels of counted value"
+msgstr ""
 
 #: src/language/dictionary/numeric.c:67
 #, c-format
@@ -1722,7 +2008,9 @@ msgid "Format type %s may not be used with a string variable."
 msgstr "Formato tipo %s não pode ser usado como uma variável string."
 
 #: src/language/dictionary/rename-variables.c:49
-msgid "RENAME VARS may not be used after TEMPORARY.  Temporary transformations will be made permanent."
+msgid ""
+"RENAME VARS may not be used after TEMPORARY.  Temporary transformations will "
+"be made permanent."
 msgstr ""
 
 #: src/language/dictionary/rename-variables.c:59
@@ -1733,272 +2021,244 @@ msgstr "'(' esperado."
 msgid "`=' expected between lists of new and old variable names."
 msgstr "'=' esperado entre listas dos novos e velhos nomes de variável"
 
-#: src/language/dictionary/rename-variables.c:87
+#: src/language/dictionary/rename-variables.c:88
 msgid "`)' expected after variable names."
 msgstr "')' esperado após nome de variável."
 
-#: src/language/dictionary/rename-variables.c:97
+#: src/language/dictionary/rename-variables.c:98
 #, c-format
 msgid "Renaming would duplicate variable name %s."
 msgstr ""
 
-#: src/language/dictionary/split-file.c:85
-#: src/language/dictionary/sys-file-info.c:563
-#: src/language/stats/crosstabs.q:1169 src/language/stats/crosstabs.q:1196
-#: src/language/stats/crosstabs.q:1216 src/language/stats/crosstabs.q:1238
-#: src/language/stats/examine.q:1215 src/language/stats/frequencies.q:1063
-#: src/language/stats/frequencies.q:1188
+#: src/language/dictionary/split-file.c:83
+#: src/language/dictionary/sys-file-info.c:429
+#: src/language/dictionary/sys-file-info.c:582
+#: src/language/stats/crosstabs.q:1214 src/language/stats/crosstabs.q:1241
+#: src/language/stats/crosstabs.q:1264 src/language/stats/crosstabs.q:1289
+#: src/language/stats/examine.q:1841 src/language/stats/frequencies.q:813
+#: src/language/stats/reliability.q:568 src/language/stats/reliability.q:579
 msgid "Value"
 msgstr "Valor"
 
-#: src/language/dictionary/split-file.c:86
-#: src/language/dictionary/sys-file-info.c:397
-#: src/language/dictionary/sys-file-info.c:564 src/ui/gui/crosstabs.glade:275
-#: src/ui/gui/psppire-var-sheet.c:104 src/ui/gui/psppire.glade:2099
-msgid "Label"
-msgstr "Label"
-
-#: src/language/dictionary/sys-file-info.c:110
+#: src/language/dictionary/sys-file-info.c:95
 msgid "File:"
 msgstr "Arquivo:"
 
-#: src/language/dictionary/sys-file-info.c:112 src/ui/gui/psppire.glade:2052
-#: src/ui/gui/recode.glade:841
+#: src/language/dictionary/sys-file-info.c:97 src/ui/gui/psppire.ui:1862
+#: src/ui/gui/recode.ui:859
 msgid "Label:"
-msgstr "Label:"
+msgstr "Rótulo:"
 
-#: src/language/dictionary/sys-file-info.c:116
+#: src/language/dictionary/sys-file-info.c:101
 msgid "No label."
 msgstr "Sem rótulo."
 
-#: src/language/dictionary/sys-file-info.c:119
+#: src/language/dictionary/sys-file-info.c:104
 msgid "Created:"
 msgstr "Criado:"
 
-#: src/language/dictionary/sys-file-info.c:122
+#: src/language/dictionary/sys-file-info.c:107
 msgid "Integer Format:"
 msgstr "Formato inteiro:"
 
+#: src/language/dictionary/sys-file-info.c:111
+#: src/language/dictionary/sys-file-info.c:119
 #: src/language/dictionary/sys-file-info.c:124
-msgid "Big Endian."
-msgstr "Big Endian."
-
-#: src/language/dictionary/sys-file-info.c:125
-msgid "Little Endian."
-msgstr "Little Endian."
-
-#: src/language/dictionary/sys-file-info.c:126
-#: src/language/dictionary/sys-file-info.c:134
-msgid "Unknown."
-msgstr "Desconhecido."
+#: src/language/dictionary/sys-file-info.c:143
+msgid "Unknown"
+msgstr "Desconhecido"
 
-#: src/language/dictionary/sys-file-info.c:127
+#: src/language/dictionary/sys-file-info.c:112
 msgid "Real Format:"
 msgstr "Formato Real:"
 
-#: src/language/dictionary/sys-file-info.c:129
+#: src/language/dictionary/sys-file-info.c:114
 msgid "IEEE 754 LE."
 msgstr "IEEE 754 LE."
 
-#: src/language/dictionary/sys-file-info.c:130
+#: src/language/dictionary/sys-file-info.c:115
 msgid "IEEE 754 BE."
 msgstr "IEE 754 BE."
 
-#: src/language/dictionary/sys-file-info.c:131
+#: src/language/dictionary/sys-file-info.c:116
 msgid "VAX D."
 msgstr "VAX D."
 
-#: src/language/dictionary/sys-file-info.c:132
+#: src/language/dictionary/sys-file-info.c:117
 msgid "VAX G."
 msgstr "VAX G."
 
-#: src/language/dictionary/sys-file-info.c:133
+#: src/language/dictionary/sys-file-info.c:118
 msgid "IBM 390 Hex Long."
 msgstr "IBM 390 Hex Long."
 
-#: src/language/dictionary/sys-file-info.c:135
-#: src/ui/gui/descriptives-dialog.glade:79 src/ui/gui/recode.glade:940
+#: src/language/dictionary/sys-file-info.c:120 src/ui/gui/descriptives.ui:85
+#: src/ui/gui/factor.ui:173 src/ui/gui/recode.ui:960
 msgid "Variables:"
 msgstr "Variáveis:"
 
-#: src/language/dictionary/sys-file-info.c:137
+#: src/language/dictionary/sys-file-info.c:122
 msgid "Cases:"
 msgstr "Casos:"
 
-#: src/language/dictionary/sys-file-info.c:139
-msgid "Unknown"
-msgstr "Desconhecido"
-
-#: src/language/dictionary/sys-file-info.c:141
+#: src/language/dictionary/sys-file-info.c:127
 msgid "Type:"
 msgstr "Tipo:"
 
-#: src/language/dictionary/sys-file-info.c:142
-msgid "System File."
-msgstr "Arquivo de sistema."
+#: src/language/dictionary/sys-file-info.c:128
+#: src/ui/gui/psppire-data-window.c:631
+msgid "System File"
+msgstr "Arquivos de Sistema"
 
-#: src/language/dictionary/sys-file-info.c:143
+#: src/language/dictionary/sys-file-info.c:129
 msgid "Weight:"
-msgstr "Peso:"
+msgstr "Ponderação:"
 
-#: src/language/dictionary/sys-file-info.c:148
+#: src/language/dictionary/sys-file-info.c:134
 msgid "Not weighted."
 msgstr "Sem ponderação."
 
-#: src/language/dictionary/sys-file-info.c:150
+#: src/language/dictionary/sys-file-info.c:136
 msgid "Mode:"
 msgstr "Modo:"
 
-#: src/language/dictionary/sys-file-info.c:152
+#: src/language/dictionary/sys-file-info.c:138
 #, c-format
 msgid "Compression %s."
 msgstr "Compressão %s."
 
-#: src/language/dictionary/sys-file-info.c:152
+#: src/language/dictionary/sys-file-info.c:138
 msgid "on"
 msgstr "Ligado"
 
-#: src/language/dictionary/sys-file-info.c:152
+#: src/language/dictionary/sys-file-info.c:138
 msgid "off"
 msgstr "Desligado"
 
-#: src/language/dictionary/sys-file-info.c:162
-#: src/language/dictionary/sys-file-info.c:395
+#: src/language/dictionary/sys-file-info.c:141
+#, fuzzy
+msgid "Charset:"
+msgstr "Casos:"
+
+#: src/language/dictionary/sys-file-info.c:151
+#: src/language/dictionary/sys-file-info.c:344
 msgid "Description"
 msgstr "Descrição"
 
-#: src/language/dictionary/sys-file-info.c:163
-#: src/language/dictionary/sys-file-info.c:393
-#: src/language/dictionary/sys-file-info.c:633
+#: src/language/dictionary/sys-file-info.c:152
+#: src/language/dictionary/sys-file-info.c:346
+#: src/language/dictionary/sys-file-info.c:663
 msgid "Position"
 msgstr "Posição"
 
-#: src/language/dictionary/sys-file-info.c:222
+#: src/language/dictionary/sys-file-info.c:199
 msgid "The active file does not have a file label."
 msgstr "O arquivo ativo não possui um rótulo de arquivo."
 
-#: src/language/dictionary/sys-file-info.c:225
+#: src/language/dictionary/sys-file-info.c:202
 msgid "File label:"
 msgstr "Rótulo de arquivo:"
 
-#: src/language/dictionary/sys-file-info.c:288
+#: src/language/dictionary/sys-file-info.c:277
 msgid "No variables to display."
 msgstr "Nenhuma variável para exibir."
 
-#: src/language/dictionary/sys-file-info.c:307
+#: src/language/dictionary/sys-file-info.c:291
 msgid "Macros not supported."
 msgstr "Macros não suportadas."
 
-#: src/language/dictionary/sys-file-info.c:317
+#: src/language/dictionary/sys-file-info.c:300
 msgid "The active file dictionary does not contain any documents."
 msgstr "O arquivo de dicionário ativo não contém nenhum documento."
 
-#: src/language/dictionary/sys-file-info.c:325
+#: src/language/dictionary/sys-file-info.c:308
 msgid "Documents in the active file:"
 msgstr "Documentos no arquivo ativo:"
 
-#: src/language/dictionary/sys-file-info.c:477
+#: src/language/dictionary/sys-file-info.c:428
+msgid "Attribute"
+msgstr ""
+
+#: src/language/dictionary/sys-file-info.c:484
 #, c-format
 msgid "Format: %s"
 msgstr "Formato: %s"
 
-#: src/language/dictionary/sys-file-info.c:485
+#: src/language/dictionary/sys-file-info.c:491
 #, c-format
 msgid "Print Format: %s"
 msgstr "Formato de Impressão: %s"
 
-#: src/language/dictionary/sys-file-info.c:488
+#: src/language/dictionary/sys-file-info.c:495
 #, c-format
 msgid "Write Format: %s"
 msgstr "Formato de Escrita: %s"
 
-#: src/language/dictionary/sys-file-info.c:494
+#: src/language/dictionary/sys-file-info.c:508
 #, c-format
 msgid "Measure: %s"
 msgstr "Medida: %s"
 
-#: src/language/dictionary/sys-file-info.c:495
-#: src/ui/gui/psppire-var-sheet.c:123
+#: src/language/dictionary/sys-file-info.c:509
+#: src/ui/gui/psppire-var-sheet.c:111
 msgid "Nominal"
 msgstr "Nominal"
 
-#: src/language/dictionary/sys-file-info.c:496
-#: src/ui/gui/psppire-var-sheet.c:124
+#: src/language/dictionary/sys-file-info.c:510
+#: src/ui/gui/psppire-var-sheet.c:112
 msgid "Ordinal"
 msgstr "Ordinal"
 
-#: src/language/dictionary/sys-file-info.c:497
-#: src/ui/gui/psppire-var-sheet.c:125
+#: src/language/dictionary/sys-file-info.c:511
+#: src/ui/gui/psppire-var-sheet.c:113
 msgid "Scale"
 msgstr "Escalar"
 
-#: src/language/dictionary/sys-file-info.c:500
+#: src/language/dictionary/sys-file-info.c:514
 #, c-format
 msgid "Display Alignment: %s"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:501
-#: src/ui/gui/psppire-var-sheet.c:116
+#: src/language/dictionary/sys-file-info.c:515
+#: src/ui/gui/psppire-var-sheet.c:104
 msgid "Left"
 msgstr "Esquerda"
 
-#: src/language/dictionary/sys-file-info.c:502
-#: src/ui/gui/psppire-var-sheet.c:118
+#: src/language/dictionary/sys-file-info.c:516
+#: src/ui/gui/psppire-var-sheet.c:106
 msgid "Center"
 msgstr "Centro"
 
-#: src/language/dictionary/sys-file-info.c:503
-#: src/ui/gui/psppire-var-sheet.c:117
+#: src/language/dictionary/sys-file-info.c:517
+#: src/ui/gui/psppire-var-sheet.c:105
 msgid "Right"
 msgstr "Direita"
 
-#: src/language/dictionary/sys-file-info.c:506
+#: src/language/dictionary/sys-file-info.c:520
 #, c-format
 msgid "Display Width: %d"
 msgstr ""
 
-#: src/language/dictionary/sys-file-info.c:517
+#: src/language/dictionary/sys-file-info.c:534
 msgid "Missing Values: "
-msgstr "Missing Values:"
+msgstr "Valores ausentes:"
 
-#: src/language/dictionary/sys-file-info.c:611
+#: src/language/dictionary/sys-file-info.c:643
 msgid "No vectors defined."
 msgstr "Vetor não definido."
 
-#: src/language/dictionary/sys-file-info.c:632
+#: src/language/dictionary/sys-file-info.c:662
 msgid "Vector"
 msgstr "Vetor"
 
-#: src/language/dictionary/sys-file-info.c:635
+#: src/language/dictionary/sys-file-info.c:665
 msgid "Print Format"
 msgstr "Formato de Impressão"
 
-#: src/language/dictionary/value-labels.c:121
-#, c-format
-msgid "It is not possible to assign value labels to long string variables such as %s."
-msgstr ""
-
-#: src/language/dictionary/value-labels.c:157 src/language/lexer/lexer.c:629
-msgid "expecting string"
-msgstr "esperando string"
-
-#: src/language/dictionary/value-labels.c:166 src/language/lexer/lexer.c:643
-msgid "expecting integer"
-msgstr "esperando inteiro"
-
-#: src/language/dictionary/value-labels.c:170
-#, c-format
-msgid "Value label `%g' is not integer."
-msgstr ""
-
-#: src/language/dictionary/value-labels.c:184
+#: src/language/dictionary/value-labels.c:150
 msgid "Truncating value label to 60 characters."
 msgstr "Truncando rótulo de valores para 60 caracteres."
 
-#: src/language/dictionary/variable-display.c:119
-msgid "Variable display width must be a positive integer."
-msgstr ""
-
 #: src/language/dictionary/variable-label.c:51
 msgid "String expected for variable label."
 msgstr "Esperada string como rotulo de variável."
@@ -2019,7 +2279,8 @@ msgstr "O nome do vetor %s foi informado duas vezes"
 
 #: src/language/dictionary/vector.c:96
 msgid "A slash must separate each vector specification in VECTOR's long form."
-msgstr "Uma barra deve separar cada especificação de vetor na forma longa de VECTOR."
+msgstr ""
+"Uma barra deve separar cada especificação de vetor na forma longa de VECTOR."
 
 #: src/language/dictionary/vector.c:129
 msgid "Vectors must have at least one element."
@@ -2039,6 +2300,10 @@ msgstr "%s é muito longo para um nome de variável."
 msgid "%s is an existing variable name."
 msgstr "%s é um nome de variável existente."
 
+#: src/language/dictionary/variable-display.c:120
+msgid "Variable display width must be a positive integer."
+msgstr ""
+
 #: src/language/dictionary/weight.c:49
 msgid "The weighting variable must be numeric."
 msgstr "A variável de ponderação deve ser numérica."
@@ -2047,4340 +2312,5462 @@ msgstr "A variável de ponderação deve ser numérica."
 msgid "The weighting variable may not be scratch."
 msgstr "A variável de ponderação não deve ser rascunho."
 
-#: src/language/expressions/evaluate.c:154
-msgid "expecting number or string"
-msgstr "esperando número ou string"
-
-#: src/language/expressions/evaluate.c:168
+#: src/language/tests/float-format.c:124
 #, c-format
-msgid "Duplicate variable name %s."
-msgstr "Nome de variável %s duplicado."
-
-#: src/language/expressions/helpers.c:51
-msgid "One of the arguments to a DATE function is not an integer.  The result will be system-missing."
-msgstr "Um dos argumentos para a função DATE não é um inteiro. O resultado será um system-missing."
-
-#: src/language/expressions/helpers.c:73
-msgid "The week argument to DATE.WKYR is not an integer.  The result will be system-missing."
-msgstr "O argumento semana para DATE.WKYR não é um inteiro. O resultado será um system-missing."
-
-#: src/language/expressions/helpers.c:79
-msgid "The week argument to DATE.WKYR is outside the acceptable range of 1 to 53.  The result will be system-missing."
-msgstr "O argumento semana para DATE.WKYR está fora do intervalo aceitável entre 1 e 53. O resultado será um system-missing."
-
-#: src/language/expressions/helpers.c:101
-msgid "The day argument to DATE.YRDAY is not an integer.  The result will be system-missing."
-msgstr "O argumento dia para DATE.YRDAY não é um inteiro. O resultado será um system-missing."
-
-#: src/language/expressions/helpers.c:107
-msgid "The day argument to DATE.YRDAY is outside the acceptable range of 1 to 366.  The result will be system-missing."
-msgstr "O argumento dia para DATE.YRDAY está fora do intervalo aceitável entre 1 e 366. O resultado será um system-missing."
+msgid "%zu-byte string needed but %zu-byte string supplied."
+msgstr ""
 
-#: src/language/expressions/helpers.c:129
-msgid "The year argument to YRMODA is greater than 47516.  The result will be system-missing."
-msgstr "O argumento ano para YRMODA é maior que 47516. O resultado será um system-missing."
+#: src/language/tests/float-format.c:136
+msgid "Hexadecimal floating constant too long."
+msgstr ""
 
-#: src/language/expressions/helpers.c:182
+#: src/language/tests/float-format.c:201
 #, c-format
-msgid "Unrecognized date unit \"%.*s\".  Valid date units are \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", and \"seconds\"."
-msgstr "Unidade de data não reconhecido \"%.*s\". Valores válidos de unidade são \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", and \"seconds\"."
-
-#: src/language/expressions/helpers.c:332
-msgid "Invalid DATESUM method.  Valid choices are \"closest\" and \"rollover\"."
-msgstr "Método DATESUM inválido. Escolhas válidas são \"closest\" and \"rollover\"."
+msgid ""
+"%s conversion of %s from %s to %s should have produced %s but actually "
+"produced %s."
+msgstr ""
 
-#: src/language/expressions/parse.c:259
-#, c-format
-msgid "Type mismatch: expression has %s type, but a numeric value is required here."
-msgstr "Incompatibilidade de tipos: expressão tem tipo %s, mas um valor numérico é requerido aqui."
+#: src/language/tests/float-format.c:247
+msgid "Too many values in single command."
+msgstr "Muitos valores em um único comando."
 
-#: src/language/expressions/parse.c:271
-#, c-format
-msgid "Type mismatch: expression has %s type, but a string value is required here."
-msgstr "Incompatibilidade de tipos: expressão tem tipo %s, mas um valor string é requerido aqui."
+#: src/language/tests/moments-test.c:47
+msgid "expecting weight value"
+msgstr "esperando valor de ponderação"
 
-#: src/language/expressions/parse.c:427
+#: src/language/utilities/cd.c:41
 #, c-format
-msgid "Type mismatch while applying %s operator: cannot convert %s to %s."
-msgstr "Incompatibilidade de tipos ao aplicar o operador %s: não é possível converter %s para %s."
-
-#: src/language/expressions/parse.c:643
-msgid "Chaining relational operators (e.g. \"a < b < c\") will not produce the mathematically expected result.  Use the AND logical operator to fix the problem (e.g. \"a < b AND b < c\").  If chaining is really intended, parentheses will disable this warning (e.g. \"(a < b) < c\".)"
-msgstr "Encadear operadores relacionais (i.e. \"a < b < c\") não irá produzir o resultado esperado. Use o operador lógico AND para corrigir o problema (i.e. \"a < b AND b < c\"). Se o encadeamento é intencional, o uso de parênteses irá desabilitar este aviso (i.e. \"(a < b) < c\".)"
+msgid "Cannot change directory to %s:  %s "
+msgstr "Não é possível mudar diretório para %s: %s"
 
-#: src/language/expressions/parse.c:744
-msgid "The exponentiation operator (\"**\") is left-associative, even though right-associative semantics are more useful.  That is, \"a**b**c\" equals \"(a**b)**c\", not as \"a**(b**c)\".  To disable this warning, insert parentheses."
-msgstr "O operador exponencial (\"**\") é associativo à esquerda, mesmo que a semântica associativa a direita seja mais útil.Ou seja, \"a**b**c\" equivale a \"(a**b)**c\", não a \"a**(b**c)\". Para desabilitar este aviso, insira parênteses."
+#: src/language/utilities/date.c:32
+msgid "Only USE ALL is currently implemented."
+msgstr ""
 
-#: src/language/expressions/parse.c:809
+#: src/language/utilities/title.c:103
 #, c-format
-msgid "Unknown system variable %s."
-msgstr "Variável de sistema %s desconhecida."
+msgid "   (Entered %s)"
+msgstr ""
 
-#: src/language/expressions/parse.c:857
-#, c-format
-msgid "Unknown identifier %s."
-msgstr "Identificador %s desconhecido."
+#: src/language/utilities/include.c:95
+msgid "Expecting BATCH or INTERACTIVE after SYNTAX."
+msgstr ""
 
-#: src/language/expressions/parse.c:885 src/language/stats/aggregate.c:509
-msgid "expecting `)'"
-msgstr "esperando ')'"
+#: src/language/utilities/include.c:112
+msgid "Expecting YES or NO after CD."
+msgstr ""
 
-#: src/language/expressions/parse.c:892
-msgid "in expression"
-msgstr "na expressão"
+#: src/language/utilities/include.c:129
+msgid "Expecting CONTINUE or STOP after ERROR."
+msgstr ""
 
-#: src/language/expressions/parse.c:1073
+#: src/language/utilities/include.c:136
 #, c-format
-msgid "%s must have at least %d arguments in list."
-msgstr "%s deve ter pelo menos %d argumentos na lista."
+msgid "Unexpected token: `%s'."
+msgstr ""
 
-#: src/language/expressions/parse.c:1082
-#, c-format
-msgid "%s must have even number of arguments in list."
-msgstr "%s deve ter um número par de argumentos na lista."
+#: src/language/utilities/include.c:181
+msgid "expecting file name"
+msgstr ""
 
-#: src/language/expressions/parse.c:1085
+#: src/language/utilities/include.c:193
 #, c-format
-msgid "%s must have multiple of %d arguments in list."
-msgstr "%s deve ter um número de argumentos múltiplo de %d na lista."
+msgid "Can't find `%s' in include file search path."
+msgstr ""
 
-#: src/language/expressions/parse.c:1095
+#: src/language/utilities/include.c:201
 #, c-format
-msgid "%s function does not accept a minimum valid argument count."
+msgid "Unable to open `%s': %s."
 msgstr ""
 
-#: src/language/expressions/parse.c:1104
+#: src/language/utilities/permissions.c:73
 #, c-format
-msgid "%s requires at least %d valid arguments in list."
+msgid "Expecting %s or %s."
 msgstr ""
 
-#: src/language/expressions/parse.c:1110
+#: src/language/utilities/permissions.c:106
 #, c-format
-msgid "With %s, using minimum valid argument count of %d does not make sense when passing only %d arguments in list."
+msgid "Cannot stat %s: %s"
 msgstr ""
 
-#: src/language/expressions/parse.c:1164
+#: src/language/utilities/permissions.c:119
 #, c-format
-msgid "Type mismatch invoking %s as "
-msgstr "Incompatibilidade de tipos invocando %s como "
+msgid "Cannot change mode of %s: %s"
+msgstr ""
 
-#: src/language/expressions/parse.c:1169
-msgid "Function invocation "
-msgstr "Invocação de função"
+#: src/language/stats/aggregate.c:220
+msgid "while expecting COLUMNWISE"
+msgstr "ao esperar COLUMNWISE"
 
-#: src/language/expressions/parse.c:1171
-msgid " does not match any known function.  Candidates are:"
-msgstr " não combina com nenhuma função conhecida. Candidatas são:"
+#: src/language/stats/aggregate.c:247
+msgid "expecting BREAK"
+msgstr "esperando BREAK"
 
-#: src/language/expressions/parse.c:1201
-#, c-format
-msgid "No function or vector named %s."
-msgstr "Nenhuma função ou vetor de nome %s."
+#: src/language/stats/aggregate.c:252
+msgid ""
+"When PRESORTED is specified, specifying sorting directions with (A) or (D) "
+"has no effect.  Output data will be sorted the same way as the input data."
+msgstr ""
+"Quando PRESORTED é especificado, definir uma direção de ordenamento com (A) "
+"ou (D) não tem efeito. Dados de saída serão ordenadores da mesma forma que "
+"os de entrada."
 
-#: src/language/expressions/parse.c:1244
-#, c-format
-msgid "expecting `,' or `)' invoking %s function"
-msgstr "esperando ',' ou ')' invocando função %s"
+#: src/language/stats/aggregate.c:424
+msgid "expecting aggregation function"
+msgstr "esperando função agregadora"
 
-#: src/language/expressions/parse.c:1264
+#: src/language/stats/aggregate.c:442
 #, c-format
-msgid "%s is a PSPP extension."
-msgstr "%s é uma extensão do PSPP."
+msgid "Unknown aggregation function %s."
+msgstr "Função agregadora desconhecida %s."
 
-#: src/language/expressions/parse.c:1267 src/ui/terminal/command-line.c:127
-#: src/ui/terminal/command-line.c:146 src/ui/terminal/command-line.c:158
+#: src/language/stats/aggregate.c:498
 #, c-format
-msgid "%s is not yet implemented."
-msgstr ""
+msgid "Missing argument %zu to %s."
+msgstr "Faltando argumento %zu para %s."
 
-#: src/language/expressions/parse.c:1273
+#: src/language/stats/aggregate.c:507
 #, c-format
-msgid "%s may not appear after TEMPORARY."
-msgstr "%s não pode aparecer após TEMPORARY."
-
-#: src/language/lexer/format-parser.c:88
-msgid "expecting valid format specifier"
-msgstr "esperando especificador de formato válido"
+msgid "Arguments to %s must be of same type as source variables."
+msgstr "Argumento para %s deve ser do mesmo tipo que as variáveis de origem."
 
-#: src/language/lexer/format-parser.c:121
-msgid "expecting format type"
-msgstr "esperando formato de tipo"
+#: src/language/stats/aggregate.c:517 src/language/expressions/parse.c:885
+msgid "expecting `)'"
+msgstr "esperando ')'"
 
-#: src/language/lexer/lexer.c:282
+#: src/language/stats/aggregate.c:529
 #, c-format
-msgid "%s does not form a valid number."
-msgstr "%s não forma um número válido."
+msgid ""
+"Number of source variables (%zu) does not match number of target variables (%"
+"zu)."
+msgstr ""
+"Número de variáveis de origem (%zu) não combinam com o número de variáveis "
+"algo (%zu)."
 
-#: src/language/lexer/lexer.c:386
+#: src/language/stats/aggregate.c:545
 #, c-format
-msgid "Bad character in input: `%c'."
-msgstr "Caractere inválido na entrada: '%c'."
+msgid ""
+"The value arguments passed to the %s function are out-of-order.  They will "
+"be treated as if they had been specified in the correct order."
+msgstr ""
 
-#: src/language/lexer/lexer.c:388
+#: src/language/stats/aggregate.c:615
 #, c-format
-msgid "Bad character in input: `\\%o'."
-msgstr "Caractere inválido na entrada: '\\%o'."
+msgid ""
+"Variable name %s is not unique within the aggregate file dictionary, which "
+"contains the aggregate variables and the break variables."
+msgstr ""
 
-#: src/language/lexer/lexer.c:424
+#: src/language/stats/autorecode.c:116
 #, c-format
-msgid "Subcommand %s may only be specified once."
-msgstr "Subcomando %s só pode ser especificado uma vez."
+msgid "Source variable count (%zu) does not match target variable count (%zu)."
+msgstr ""
 
-#: src/language/lexer/lexer.c:432
+#: src/language/stats/autorecode.c:128
 #, c-format
-msgid "missing required subcommand %s"
-msgstr "subcomando necessário %s ausente"
+msgid "Target variable %s duplicates existing variable %s."
+msgstr "Variável de destino %s duplica variável existente %s."
 
-#: src/language/lexer/lexer.c:461
+#: src/language/stats/binomial.c:141
 #, c-format
-msgid "Syntax error %s at %s."
-msgstr "Erro de sintaxe %s em %s."
+msgid "Variable %s is not dichotomous"
+msgstr "Variável %s não é dicotômica"
 
-#: src/language/lexer/lexer.c:464
-#, c-format
-msgid "Syntax error at %s."
-msgstr "Erro de sintaxe em %s."
+#: src/language/stats/binomial.c:192 src/ui/gui/binomial.ui:13
+msgid "Binomial Test"
+msgstr "Teste Binomial"
 
-#: src/language/lexer/lexer.c:598 src/language/lexer/lexer.c:615
-#, c-format
-msgid "expecting `%s'"
-msgstr "esperando '%s'"
+#: src/language/stats/binomial.c:222
+msgid "Group1"
+msgstr "Grupo 1"
 
-#: src/language/lexer/lexer.c:656
-msgid "expecting number"
-msgstr "esperando número"
+#: src/language/stats/binomial.c:223
+msgid "Group2"
+msgstr "Grupo 2"
 
-#: src/language/lexer/lexer.c:668
-msgid "expecting identifier"
-msgstr "esperando identificador"
+#: src/language/stats/binomial.c:224 src/language/stats/chisquare.c:177
+#: src/language/stats/chisquare.c:236 src/language/stats/factor.c:1462
+#: src/language/stats/sign.c:92 src/language/stats/wilcoxon.c:260
+#: src/ui/gui/crosstabs-dialog.c:60 src/language/stats/crosstabs.q:823
+#: src/language/stats/crosstabs.q:1151 src/language/stats/crosstabs.q:1528
+#: src/language/stats/examine.q:1105 src/language/stats/frequencies.q:871
+#: src/language/stats/oneway.q:302 src/language/stats/oneway.q:472
+#: src/language/stats/regression.q:291 src/language/stats/reliability.q:702
+msgid "Total"
+msgstr "Total"
 
-#: src/language/lexer/lexer.c:1062
-msgid "binary"
-msgstr "binário"
+#: src/language/stats/binomial.c:257 src/language/stats/chisquare.c:199
+#: src/language/stats/crosstabs.q:1239 src/language/stats/crosstabs.q:1286
+msgid "Category"
+msgstr "Categoria"
 
-#: src/language/lexer/lexer.c:1067
-msgid "octal"
-msgstr "octal"
+#: src/language/stats/binomial.c:258 src/language/stats/correlations.c:119
+#: src/language/stats/correlations.c:227 src/language/stats/npar-summary.c:122
+#: src/language/stats/sign.c:72 src/language/stats/wilcoxon.c:243
+#: src/language/stats/crosstabs.q:830 src/language/stats/examine.q:1176
+#: src/language/stats/frequencies.q:1034 src/language/stats/oneway.q:385
+#: src/language/stats/reliability.q:705 src/language/stats/t-test.q:505
+#: src/language/stats/t-test.q:525 src/language/stats/t-test.q:625
+#: src/language/stats/t-test.q:1101
+msgid "N"
+msgstr "N"
 
-#: src/language/lexer/lexer.c:1072
-msgid "hex"
-msgstr "hexa"
+#: src/language/stats/binomial.c:259
+msgid "Observed Prop."
+msgstr ""
 
-#: src/language/lexer/lexer.c:1082
+#: src/language/stats/binomial.c:260
+msgid "Test Prop."
+msgstr ""
+
+#: src/language/stats/binomial.c:263
 #, c-format
-msgid "String of %s digits has %zu characters, which is not a multiple of %d."
-msgstr "String de %s dígitos tem %zu caracteres, o que não é múltiplo de %d."
+msgid "Exact Sig. (%d-tailed)"
+msgstr ""
 
-#: src/language/lexer/lexer.c:1111
+#: src/language/stats/chisquare.c:150
 #, c-format
-msgid "`%c' is not a valid %s digit."
-msgstr "'%c' não é um dígito %s válido."
+msgid ""
+"CHISQUARE test specified %d expected values, but %d distinct values were "
+"encountered in variable %s."
+msgstr ""
 
-#: src/language/lexer/lexer.c:1145
-msgid "Unterminated string constant."
-msgstr "Constante string não terminada."
+#: src/language/stats/chisquare.c:161 src/language/stats/chisquare.c:200
+msgid "Observed N"
+msgstr "N observado"
 
-#: src/language/lexer/lexer.c:1199
-msgid "Unexpected end of file in string concatenation."
-msgstr "Fim de arquivo inesperado na concatenação da string."
+#: src/language/stats/chisquare.c:162 src/language/stats/chisquare.c:201
+msgid "Expected N"
+msgstr "N esperado"
 
-#: src/language/lexer/lexer.c:1207
-msgid "String expected following `+'."
-msgstr "String esperada seguindo '+'."
+#: src/language/stats/chisquare.c:163 src/language/stats/chisquare.c:202
+#: src/ui/gui/crosstabs-dialog.c:62 src/language/stats/regression.q:290
+msgid "Residual"
+msgstr "Resíduo"
 
-#: src/language/lexer/lexer.c:1220
-#, c-format
-msgid "String exceeds 255 characters in length (%zu characters)."
-msgstr "String excedeu 255 caracteres de comprimento (%zu caracteres)."
+#: src/language/stats/chisquare.c:195 src/language/stats/sign.c:60
+#: src/ui/gui/frequencies.ui:9 src/ui/gui/frequencies.ui:669
+msgid "Frequencies"
+msgstr "Frequência"
 
-#: src/language/lexer/range-parser.c:60
-#, c-format
-msgid "Low end of range (%g) is below high end (%g).  The range will be treated as reversed."
-msgstr "Limite inferior do intervalo (%g) é maior que o limite superior (%g). O intervalo será invertido."
+#: src/language/stats/chisquare.c:249 src/language/stats/sign.c:111
+#: src/language/stats/wilcoxon.c:309
+msgid "Test Statistics"
+msgstr "Testes estatísticos"
 
-#: src/language/lexer/range-parser.c:68
-#, c-format
-msgid "Ends of range are equal (%g)."
-msgstr "Limites do intervalo são iguais (%g)."
+#: src/language/stats/chisquare.c:263
+msgid "Chi-Square"
+msgstr "Chi-quadrado"
 
-#: src/language/lexer/range-parser.c:76
-msgid "LO or LOWEST must be part of a range."
-msgstr "LO ou LOWEST deve ser parte do intervalo."
+#: src/language/stats/chisquare.c:264 src/language/stats/crosstabs.q:1215
+#: src/language/stats/oneway.q:275 src/language/stats/oneway.q:685
+#: src/language/stats/regression.q:284 src/language/stats/t-test.q:752
+#: src/language/stats/t-test.q:923 src/language/stats/t-test.q:1010
+msgid "df"
+msgstr "df"
 
-#: src/language/lexer/range-parser.c:108
-msgid "System-missing value is not valid here."
-msgstr "Valor system-missing não é válido aqui."
+#: src/language/stats/chisquare.c:265
+msgid "Asymp. Sig."
+msgstr "Asymp. Sig."
 
-#: src/language/lexer/range-parser.c:116
-msgid "expecting number or data string"
-msgstr "esperando número ou string de data"
+#: src/language/stats/correlations.c:96 src/language/stats/factor.c:1720
+#: src/language/stats/npar-summary.c:108
+msgid "Descriptive Statistics"
+msgstr ""
 
-#: src/language/lexer/variable-parser.c:63
-msgid "expecting variable name"
-msgstr "esperando nome de variável"
+#: src/language/stats/correlations.c:117 src/language/stats/descriptives.c:101
+#: src/language/stats/factor.c:1741 src/language/stats/npar-summary.c:125
+#: src/ui/gui/descriptives-dialog.c:40 src/ui/gui/frequencies-dialog.c:41
+#: src/language/stats/examine.q:1444 src/language/stats/frequencies.q:105
+#: src/language/stats/oneway.q:386 src/language/stats/t-test.q:506
+#: src/language/stats/t-test.q:526 src/language/stats/t-test.q:624
+#: src/language/stats/t-test.q:917
+msgid "Mean"
+msgstr "Média"
 
-#: src/language/lexer/variable-parser.c:73
-#, c-format
-msgid "%s is not a variable name."
-msgstr "%s não é um nome válido."
+#: src/language/stats/correlations.c:118 src/language/stats/factor.c:1742
+#: src/language/stats/npar-summary.c:128 src/language/stats/examine.q:1479
+#: src/language/stats/oneway.q:387 src/language/stats/t-test.q:507
+#: src/language/stats/t-test.q:527 src/language/stats/t-test.q:626
+#: src/language/stats/t-test.q:918
+msgid "Std. Deviation"
+msgstr "Desvio padrão"
 
-#: src/language/lexer/variable-parser.c:176
-#, c-format
-msgid "%s is not a numeric variable.  It will not be included in the variable list."
-msgstr "%s não é uma variável válida. Ela não será incluída na lista de variáveis."
+#: src/language/stats/correlations.c:190 src/language/stats/factor.c:1620
+#, fuzzy
+msgid "Correlations"
+msgstr "_Correlação Bivariada"
 
-#: src/language/lexer/variable-parser.c:179
-#, c-format
-msgid "%s is not a string variable.  It will not be included in the variable list."
-msgstr "%s não é uma variável string. Ela não será incluída na lista de variáveis."
+#: src/language/stats/correlations.c:216
+#, fuzzy
+msgid "Pearson Correlation"
+msgstr "_Correlação Bivariada"
 
-#: src/language/lexer/variable-parser.c:183
-#, c-format
-msgid "Scratch variables (such as %s) are not allowed here."
-msgstr "Variáveis rascunho (como %s) não são permitidas aqui."
+#: src/language/stats/correlations.c:218 src/language/stats/oneway.q:686
+#: src/language/stats/t-test.q:753 src/language/stats/t-test.q:924
+#: src/language/stats/t-test.q:1011
+msgid "Sig. (2-tailed)"
+msgstr ""
 
-#: src/language/lexer/variable-parser.c:187
-#, c-format
-msgid "%s and %s are not the same type.  All variables in this variable list must be of the same type.  %s will be omitted from the list."
-msgstr "%s e %s não são do mesmo tipo. Todas as variáveis nesta lista devem ser do mesmo tipo. %s será omitida da lista."
+#: src/language/stats/correlations.c:218
+#, fuzzy
+msgid "Sig. (1-tailed)"
+msgstr "Sig. exata (uni-caudal)"
 
-#: src/language/lexer/variable-parser.c:193
-#, c-format
-msgid "%s and %s are string variables with different widths.  All variables in this variable list must have the same width.  %s will be omitted from the list."
-msgstr "%s e %s são variáveis strings de tamanho diferente. Todas as variáveis nesta lista devem ter o mesmo tamanho. %s será omitida da lista."
+#: src/language/stats/correlations.c:222
+msgid "Cross-products"
+msgstr ""
 
-#: src/language/lexer/variable-parser.c:198
-#, c-format
-msgid "Variable %s appears twice in variable list."
-msgstr "Variável %s apareceu duas vezes na lista de variáveis."
+#: src/language/stats/correlations.c:223
+#, fuzzy
+msgid "Covariance"
+msgstr "Co-variança"
 
-#: src/language/lexer/variable-parser.c:311
-#, c-format
-msgid "%s TO %s is not valid syntax since %s precedes %s in the dictionary."
-msgstr "%s TO %s não é uma sintaxe válida pois %s precede %s no dicionário."
+#: src/language/stats/correlations.c:454 src/language/stats/descriptives.c:361
+#: src/language/data-io/list.q:91
+msgid "No variables specified."
+msgstr ""
 
-#: src/language/lexer/variable-parser.c:319
-#, c-format
-msgid "When using the TO keyword to specify several variables, both variables must be from the same variable dictionaries, of either ordinary, scratch, or system variables.  %s is a %s variable, whereas %s is %s."
-msgstr "Ao usar a palavra-chave TO para especificar várias variáveis, ambas devem ser do mesmo dicionário de variáveis, ordinárias, rascunho ou variáveis de sistema. %s é uma variável %s, enquanto %s é %s."
+#: src/language/stats/descriptives.c:102 src/language/stats/frequencies.q:106
+#: src/language/stats/t-test.q:508 src/language/stats/t-test.q:528
+#: src/language/stats/t-test.q:627
+msgid "S.E. Mean"
+msgstr ""
 
-#: src/language/lexer/variable-parser.c:393
-msgid "incorrect use of TO convention"
-msgstr "uso incorreto da convenção TO."
+#: src/language/stats/descriptives.c:103 src/language/stats/frequencies.q:109
+msgid "Std Dev"
+msgstr "Std Dev"
 
-#: src/language/lexer/variable-parser.c:436
-msgid "Scratch variables not allowed here."
-msgstr "Variáveis rascunho não permitidas aqui."
+#: src/language/stats/descriptives.c:104 src/ui/gui/descriptives-dialog.c:47
+#: src/ui/gui/frequencies-dialog.c:46 src/language/stats/examine.q:1474
+#: src/language/stats/frequencies.q:110
+msgid "Variance"
+msgstr "Variança"
 
-#: src/language/lexer/variable-parser.c:458
-msgid "Prefixes don't match in use of TO convention."
-msgstr "Prefixos não coincidem no uso da convenção TO."
+#: src/language/stats/descriptives.c:105 src/ui/gui/descriptives-dialog.c:48
+#: src/ui/gui/frequencies-dialog.c:51 src/language/stats/examine.q:1510
+#: src/language/stats/frequencies.q:111
+msgid "Kurtosis"
+msgstr ""
 
-#: src/language/lexer/variable-parser.c:463
-msgid "Bad bounds in use of TO convention."
-msgstr "Intervalos incorretos no uso da convenção TO."
+#: src/language/stats/descriptives.c:106 src/language/stats/frequencies.q:112
+msgid "S.E. Kurt"
+msgstr ""
 
-#: src/language/stats/aggregate.c:209
-msgid "while expecting COLUMNWISE"
-msgstr "ao esperar COLUMNWISE"
+#: src/language/stats/descriptives.c:107 src/ui/gui/descriptives-dialog.c:49
+#: src/ui/gui/frequencies-dialog.c:47 src/language/stats/examine.q:1505
+#: src/language/stats/frequencies.q:113
+msgid "Skewness"
+msgstr ""
 
-#: src/language/stats/aggregate.c:240
-msgid "expecting BREAK"
-msgstr "esperando BREAK"
+#: src/language/stats/descriptives.c:108 src/language/stats/frequencies.q:114
+msgid "S.E. Skew"
+msgstr ""
 
-#: src/language/stats/aggregate.c:245
-msgid "When PRESORTED is specified, specifying sorting directions with (A) or (D) has no effect.  Output data will be sorted the same way as the input data."
-msgstr "Quando PRESORTED é especificado, definir uma direção de ordenamento com (A) ou (D) não tem efeito. Dados de saída serão ordenadores da mesma forma que os de entrada."
+#: src/language/stats/descriptives.c:109 src/ui/gui/descriptives-dialog.c:44
+#: src/ui/gui/frequencies-dialog.c:49 src/language/stats/examine.q:1494
+#: src/language/stats/frequencies.q:115
+msgid "Range"
+msgstr "Intervalo"
 
-#: src/language/stats/aggregate.c:416
-msgid "expecting aggregation function"
-msgstr "esperando função agregadora"
+#: src/language/stats/descriptives.c:110 src/language/stats/npar-summary.c:131
+#: src/ui/gui/descriptives-dialog.c:42 src/ui/gui/frequencies-dialog.c:43
+#: src/language/stats/examine.q:1484 src/language/stats/frequencies.q:116
+#: src/language/stats/oneway.q:400
+msgid "Minimum"
+msgstr "Mínimo"
 
-#: src/language/stats/aggregate.c:434
-#, c-format
-msgid "Unknown aggregation function %s."
-msgstr "Função agregadora desconhecida %s."
+#: src/language/stats/descriptives.c:111 src/language/stats/npar-summary.c:134
+#: src/ui/gui/descriptives-dialog.c:43 src/ui/gui/frequencies-dialog.c:44
+#: src/language/stats/examine.q:1489 src/language/stats/frequencies.q:117
+#: src/language/stats/oneway.q:401
+msgid "Maximum"
+msgstr "Máximo"
 
-#: src/language/stats/aggregate.c:490
-#, c-format
-msgid "Missing argument %zu to %s."
-msgstr "Faltando argumento %zu para %s."
+#: src/language/stats/descriptives.c:112 src/ui/gui/descriptives-dialog.c:45
+#: src/ui/gui/frequencies-dialog.c:54 src/language/stats/frequencies.q:118
+msgid "Sum"
+msgstr "Soma"
 
-#: src/language/stats/aggregate.c:499
+#: src/language/stats/descriptives.c:343
 #, c-format
-msgid "Arguments to %s must be of same type as source variables."
-msgstr "Argumento para %s deve ser do mesmo tipo que as variáveis de origem."
+msgid "Z-score variable name %s would be a duplicate variable name."
+msgstr ""
 
-#: src/language/stats/aggregate.c:521
-#, c-format
-msgid "Number of source variables (%zu) does not match number of target variables (%zu)."
-msgstr "Número de variáveis de origem (%zu) não combinam com o número de variáveis algo (%zu)."
+#: src/language/stats/descriptives.c:450
+msgid "expecting statistic name: reverting to default"
+msgstr "nome de estatística esperado: revertendo para o padrão"
 
-#: src/language/stats/aggregate.c:537
-#, c-format
-msgid "The value arguments passed to the %s function are out-of-order.  They will be treated as if they had been specified in the correct order."
+#: src/language/stats/descriptives.c:523
+msgid ""
+"Ran out of generic names for Z-score variables.  There are only 126 generic "
+"names: ZSC001-ZSC0999, STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09."
 msgstr ""
 
-#: src/language/stats/aggregate.c:607
-#, c-format
-msgid "Variable name %s is not unique within the aggregate file dictionary, which contains the aggregate variables and the break variables."
+#: src/language/stats/descriptives.c:555
+msgid "Mapping of variables to corresponding Z-scores."
 msgstr ""
 
-#: src/language/stats/autorecode.c:136
-#, c-format
-msgid "Source variable count (%zu) does not match target variable count (%zu)."
-msgstr ""
+#: src/language/stats/descriptives.c:559
+msgid "Source"
+msgstr "Fonte"
 
-#: src/language/stats/autorecode.c:164
-#, c-format
-msgid "Target variable %s duplicates existing variable %s."
-msgstr "Variável de destino %s duplica variável existente %s."
+#: src/language/stats/descriptives.c:560
+msgid "Target"
+msgstr "Destino"
 
-#: src/language/stats/autorecode.c:171
+#: src/language/stats/descriptives.c:670
 #, c-format
-msgid "Duplicate variable name %s among target variables."
+msgid "Z-score of %s"
 msgstr ""
 
-#: src/language/stats/binomial.c:133
-#, c-format
-msgid "Variable %s is not dichotomous"
-msgstr "Variável %s não é dicotômica"
-
-#: src/language/stats/binomial.c:183
-msgid "Binomial Test"
-msgstr "Teste Binomial"
-
-#: src/language/stats/binomial.c:207
-msgid "Group1"
-msgstr "Grupo 1"
-
-#: src/language/stats/binomial.c:208
-msgid "Group2"
-msgstr "Grupo 2"
+#: src/language/stats/descriptives.c:884
+msgid "Valid N"
+msgstr "N válidos"
 
-#: src/language/stats/binomial.c:209 src/language/stats/chisquare.c:224
-#: src/language/stats/chisquare.c:284 src/language/stats/crosstabs.q:870
-#: src/language/stats/crosstabs.q:1076 src/language/stats/crosstabs.q:1799
-#: src/language/stats/examine.q:924 src/language/stats/frequencies.q:1140
-#: src/language/stats/oneway.q:307 src/language/stats/oneway.q:479
-#: src/language/stats/regression.q:309 src/ui/gui/crosstabs-dialog.c:59
-msgid "Total"
-msgstr "Total"
+#: src/language/stats/descriptives.c:885
+msgid "Missing N"
+msgstr "Missing N"
 
-#: src/language/stats/binomial.c:242 src/language/stats/chisquare.c:247
-#: src/language/stats/crosstabs.q:1194 src/language/stats/crosstabs.q:1235
-msgid "Category"
-msgstr "Categoria"
+#: src/language/stats/descriptives.c:913
+#, c-format
+msgid "Valid cases = %g; cases with missing value(s) = %g."
+msgstr ""
 
-#: src/language/stats/binomial.c:243 src/language/stats/crosstabs.q:880
-#: src/language/stats/examine.q:999 src/language/stats/frequencies.q:1411
-#: src/language/stats/npar-summary.c:128 src/language/stats/oneway.q:394
-#: src/language/stats/t-test.q:700 src/language/stats/t-test.q:724
-#: src/language/stats/t-test.q:863 src/language/stats/t-test.q:1425
-msgid "N"
-msgstr "N"
+#: src/language/stats/sort-cases.c:64
+msgid "Buffer limit must be at least 2."
+msgstr ""
 
-#: src/language/stats/binomial.c:244
-msgid "Observed Prop."
+#: src/language/stats/sort-criteria.c:74
+msgid "`A' or `D' expected inside parentheses."
 msgstr ""
 
-#: src/language/stats/binomial.c:245
-msgid "Test Prop."
+#: src/language/stats/sort-criteria.c:79
+msgid "`)' expected."
 msgstr ""
 
-#: src/language/stats/binomial.c:248
+#: src/language/stats/sort-criteria.c:92
 #, c-format
-msgid "Exact Sig. (%d-tailed)"
+msgid "Variable %s specified twice in sort criteria."
 msgstr ""
 
-#: src/language/stats/chisquare.c:194
-#, c-format
-msgid "CHISQUARE test specified %d expected values, but %d distinct values were encountered in variable %s."
+#: src/language/stats/factor.c:803
+msgid "Factor analysis on a single variable is not useful."
 msgstr ""
 
-#: src/language/stats/chisquare.c:208 src/language/stats/chisquare.c:248
-msgid "Observed N"
-msgstr "N observado"
+#: src/language/stats/factor.c:1206
+#, fuzzy
+msgid "Component Number"
+msgstr "Número da Coluna: 0"
 
-#: src/language/stats/chisquare.c:209 src/language/stats/chisquare.c:249
-msgid "Expected N"
-msgstr "N esperado"
+#: src/language/stats/factor.c:1206
+#, fuzzy
+msgid "Factor Number"
+msgstr "Número do caso"
 
-#: src/language/stats/chisquare.c:210 src/language/stats/chisquare.c:250
-#: src/language/stats/regression.q:308 src/ui/gui/crosstabs-dialog.c:61
-msgid "Residual"
-msgstr "Resíduo"
+#: src/language/stats/factor.c:1237
+#, fuzzy
+msgid "Communalities"
+msgstr "Comentários:"
 
-#: src/language/stats/chisquare.c:243
-msgid "Frequencies"
-msgstr "Frequência"
+#: src/language/stats/factor.c:1243
+msgid "Initial"
+msgstr ""
 
-#: src/language/stats/chisquare.c:298
-msgid "Test Statistics"
-msgstr "Testes estatísticos"
+#: src/language/stats/factor.c:1246
+msgid "Extraction"
+msgstr ""
 
-#: src/language/stats/chisquare.c:312
-msgid "Chi-Square"
-msgstr "Chi-quadrado"
+#: src/language/stats/factor.c:1310 src/language/stats/factor.c:1437
+#, fuzzy
+msgid "Component"
+msgstr "Comentários:"
 
-#: src/language/stats/chisquare.c:313 src/language/stats/crosstabs.q:1170
-#: src/language/stats/oneway.q:280 src/language/stats/oneway.q:695
-#: src/language/stats/regression.q:302 src/language/stats/t-test.q:1026
-#: src/language/stats/t-test.q:1219 src/language/stats/t-test.q:1316
-msgid "df"
-msgstr "df"
+#: src/language/stats/factor.c:1315 src/language/stats/factor.c:1439
+#, fuzzy
+msgid "Factor"
+msgstr "_Fator:"
 
-#: src/language/stats/chisquare.c:314
-msgid "Asymp. Sig."
-msgstr "Asymp. Sig."
+#: src/language/stats/factor.c:1347 src/language/stats/factor.c:1495
+#: src/ui/gui/psppire-data-store.c:755 src/ui/gui/psppire-var-store.c:699
+#: src/ui/gui/psppire-var-store.c:709 src/ui/gui/psppire-var-store.c:719
+#: src/ui/gui/psppire-var-store.c:825
+#, c-format
+msgid "%d"
+msgstr "%d"
 
-#: src/language/stats/crosstabs.q:284
-msgid "Missing mode REPORT not allowed in general mode.  Assuming MISSING=TABLE."
+#: src/language/stats/factor.c:1412
+msgid "Total Variance Explained"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:294
-msgid "Write mode ALL not allowed in general mode.  Assuming WRITE=CELLS."
+#: src/language/stats/factor.c:1444
+msgid "Initial Eigenvalues"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:370
-msgid "Too many cross-tabulation variables or dimensions."
-msgstr "Excessivo número de variáveis ou dimensões para crosstab."
-
-#: src/language/stats/crosstabs.q:380
-msgid "expecting BY"
-msgstr "esperando BY"
-
-#: src/language/stats/crosstabs.q:447
-msgid "VARIABLES must be specified before TABLES."
+#: src/language/stats/factor.c:1450
+msgid "Extraction Sums of Squared Loadings"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:485
-#, c-format
-msgid "Maximum value (%ld) less than minimum value (%ld)."
+#: src/language/stats/factor.c:1456
+msgid "Rotation Sums of Squared Loadings"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:865
-msgid "Summary."
-msgstr "Sumário."
-
-#: src/language/stats/crosstabs.q:867 src/language/stats/examine.q:987
-msgid "Cases"
-msgstr "Casos"
+#: src/language/stats/factor.c:1464
+#, fuzzy, no-c-format
+msgid "% of Variance"
+msgstr "Variança"
 
-#: src/language/stats/crosstabs.q:868 src/language/stats/examine.q:922
-#: src/language/stats/frequencies.q:1061 src/language/stats/frequencies.q:1412
-msgid "Valid"
-msgstr "Valido"
+#: src/language/stats/factor.c:1465
+msgid "Cumulative %"
+msgstr ""
 
-#: src/language/stats/crosstabs.q:869 src/language/stats/examine.q:923
-#: src/language/stats/frequencies.q:1131 src/language/stats/frequencies.q:1413
-#: src/ui/gui/psppire-var-sheet.c:106
-msgid "Missing"
-msgstr "Missing"
+#: src/language/stats/factor.c:1578
+msgid "Correlation Matrix"
+msgstr ""
 
-#: src/language/stats/crosstabs.q:881 src/language/stats/examine.q:1002
-#: src/language/stats/frequencies.q:1065 src/language/stats/frequencies.q:1066
-#: src/language/stats/frequencies.q:1067
-msgid "Percent"
-msgstr "Percentual"
+#: src/language/stats/factor.c:1632
+msgid "Sig. 1-tailed"
+msgstr ""
 
-#: src/language/stats/crosstabs.q:1128
-msgid "count"
-msgstr "contagem"
+#: src/language/stats/factor.c:1666
+#, fuzzy
+msgid "Determinant"
+msgstr "Dependente"
 
-#: src/language/stats/crosstabs.q:1129
-msgid "row %"
-msgstr "linha %"
+#: src/language/stats/factor.c:1743
+msgid "Analysis N"
+msgstr ""
 
-#: src/language/stats/crosstabs.q:1130
-msgid "column %"
-msgstr "coluna %"
+#: src/language/stats/factor.c:1776
+msgid ""
+"The FACTOR criteria result in zero factors extracted. Therefore no analysis "
+"will be performed."
+msgstr ""
 
-#: src/language/stats/crosstabs.q:1131
-msgid "total %"
-msgstr "total %"
+#: src/language/stats/factor.c:1782
+msgid ""
+"The FACTOR criteria result in more factors than variables, which is not "
+"meaningful. No analysis will be performed."
+msgstr ""
 
-#: src/language/stats/crosstabs.q:1132
-msgid "expected"
-msgstr "esperado"
+#: src/language/stats/factor.c:1865
+msgid "Component Matrix"
+msgstr ""
 
-#: src/language/stats/crosstabs.q:1133
-msgid "residual"
-msgstr "residual"
+#: src/language/stats/factor.c:1865
+#, fuzzy
+msgid "Factor Matrix"
+msgstr "Lista de Fator:"
 
-#: src/language/stats/crosstabs.q:1134
-msgid "std. resid."
+#: src/language/stats/factor.c:1871
+msgid "Rotated Component Matrix"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1135
-msgid "adj. resid."
+#: src/language/stats/factor.c:1871
+#, fuzzy
+msgid "Rotated Factor Matrix"
+msgstr "Lista de Fator:"
+
+#: src/language/stats/flip.c:98
+msgid ""
+"FLIP ignores TEMPORARY.  Temporary transformations will be made permanent."
 msgstr ""
+"FLIP ignora TEMPORARY. Transformações temporárias serão feitas permanentes."
 
-#: src/language/stats/crosstabs.q:1165
-msgid "Chi-square tests."
-msgstr "Teste Chi-quadrado"
+#: src/language/stats/flip.c:150
+msgid "Could not create temporary file for FLIP."
+msgstr "Não foi possível criar arquivo temporário para FLIP."
 
-#: src/language/stats/crosstabs.q:1168 src/language/stats/crosstabs.q:1195
-#: src/language/stats/crosstabs.q:1215 src/language/stats/crosstabs.q:1236
-#: src/language/stats/examine.q:1462 src/ui/gui/checkbox-treeview.c:94
-msgid "Statistic"
-msgstr "Estatística"
-
-#: src/language/stats/crosstabs.q:1172
-msgid "Asymp. Sig. (2-sided)"
+#: src/language/stats/flip.c:327
+#, c-format
+msgid "Error rewinding FLIP file: %s."
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1174
-msgid "Exact. Sig. (2-sided)"
-msgstr ""
+#: src/language/stats/flip.c:334
+msgid "Error creating FLIP source file."
+msgstr "Erro ao criar arquivo de origem FLIP"
 
-#: src/language/stats/crosstabs.q:1176
-msgid "Exact. Sig. (1-sided)"
+#: src/language/stats/flip.c:347
+#, c-format
+msgid "Error reading FLIP file: %s."
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1191
-msgid "Symmetric measures."
-msgstr "Medidas simétricas."
-
-#: src/language/stats/crosstabs.q:1197 src/language/stats/crosstabs.q:1239
-msgid "Asymp. Std. Error"
+#: src/language/stats/flip.c:349
+msgid "Unexpected end of file reading FLIP file."
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1198 src/language/stats/crosstabs.q:1240
-msgid "Approx. T"
+#: src/language/stats/flip.c:365
+#, c-format
+msgid "Error seeking FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1199 src/language/stats/crosstabs.q:1241
-msgid "Approx. Sig."
+#: src/language/stats/flip.c:373
+#, c-format
+msgid "Error writing FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1210
-msgid "Risk estimate."
+#: src/language/stats/flip.c:384
+#, c-format
+msgid "Error closing FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1214
+#: src/language/stats/flip.c:392
 #, c-format
-msgid "95%% Confidence Interval"
-msgstr "Intervalo de confiança de 95%%"
-
-#: src/language/stats/crosstabs.q:1217 src/language/stats/t-test.q:1030
-#: src/language/stats/t-test.q:1216 src/language/stats/t-test.q:1319
-msgid "Lower"
+msgid "Error rewinding FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1218 src/language/stats/t-test.q:1031
-#: src/language/stats/t-test.q:1217 src/language/stats/t-test.q:1320
-msgid "Upper"
+#: src/language/stats/flip.c:426
+#, c-format
+msgid "Error reading FLIP temporary file: %s."
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1232
-msgid "Directional measures."
+#: src/language/stats/flip.c:429
+msgid "Unexpected end of file reading FLIP temporary file."
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1237 src/ui/gui/psppire-var-sheet.c:101
-#: src/ui/gui/psppire.glade:2223
-msgid "Type"
-msgstr "Tipo"
-
-#: src/language/stats/crosstabs.q:1993
-msgid "Pearson Chi-Square"
-msgstr "Chi-quadrado de Pearson"
+#: src/language/stats/npar-summary.c:141 src/language/stats/examine.q:1996
+#: src/language/stats/examine.q:2013 src/language/stats/frequencies.q:1050
+#: src/ui/gui/examine.ui:345
+msgid "Percentiles"
+msgstr "Percentis"
 
-#: src/language/stats/crosstabs.q:1994
-msgid "Likelihood Ratio"
+#: src/language/stats/npar-summary.c:145
+msgid "25th"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1995
-msgid "Fisher's Exact Test"
+#: src/language/stats/npar-summary.c:148
+msgid "50th (Median)"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1996
-msgid "Continuity Correction"
+#: src/language/stats/npar-summary.c:151
+msgid "75th"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:1997
-msgid "Linear-by-Linear Association"
+#: src/language/stats/roc.c:932
+msgid "Area Under the Curve"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2034 src/language/stats/crosstabs.q:2107
-#: src/language/stats/crosstabs.q:2169
-msgid "N of Valid Cases"
-msgstr "N de casos válidos"
-
-#: src/language/stats/crosstabs.q:2053 src/language/stats/crosstabs.q:2185
-msgid "Nominal by Nominal"
+#: src/language/stats/roc.c:934
+#, c-format
+msgid "Area Under the Curve (%s)"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2054 src/language/stats/crosstabs.q:2186
-msgid "Ordinal by Ordinal"
+#: src/language/stats/roc.c:939
+msgid "Area"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2055
-msgid "Interval by Interval"
-msgstr ""
+#: src/language/stats/roc.c:952 src/language/stats/examine.q:1641
+#: src/language/stats/oneway.q:388 src/language/stats/oneway.q:683
+#: src/language/stats/regression.q:198
+msgid "Std. Error"
+msgstr "Erro padrão"
 
-#: src/language/stats/crosstabs.q:2056
-msgid "Measure of Agreement"
-msgstr ""
+#: src/language/stats/roc.c:953
+#, fuzzy
+msgid "Asymptotic Sig."
+msgstr "Asymp. Sig."
 
-#: src/language/stats/crosstabs.q:2061 src/ui/gui/crosstabs-dialog.c:41
-msgid "Phi"
-msgstr ""
+#: src/language/stats/roc.c:955 src/language/stats/examine.q:1455
+#: src/language/stats/oneway.q:397
+msgid "Lower Bound"
+msgstr "Intervalo inferior"
 
-#: src/language/stats/crosstabs.q:2062
-msgid "Cramer's V"
-msgstr ""
+#: src/language/stats/roc.c:956 src/language/stats/examine.q:1460
+#: src/language/stats/oneway.q:398
+msgid "Upper Bound"
+msgstr "Intervalo superior"
 
-#: src/language/stats/crosstabs.q:2063
-msgid "Contingency Coefficient"
-msgstr ""
+#: src/language/stats/roc.c:960
+#, fuzzy, c-format
+msgid "Asymp. %g%% Confidence Interval"
+msgstr "Intervalo de confiança de 95%%"
 
-#: src/language/stats/crosstabs.q:2064
-msgid "Kendall's tau-b"
-msgstr ""
+#: src/language/stats/roc.c:966
+#, fuzzy
+msgid "Variable under test"
+msgstr "Variáveis"
 
-#: src/language/stats/crosstabs.q:2065
-msgid "Kendall's tau-c"
-msgstr ""
+#: src/language/stats/roc.c:1025
+#, fuzzy
+msgid "Case Summary"
+msgstr "Sumário."
 
-#: src/language/stats/crosstabs.q:2066 src/ui/gui/crosstabs-dialog.c:48
-msgid "Gamma"
-msgstr "Gamma"
+#: src/language/stats/roc.c:1045
+#, fuzzy
+msgid "Unweighted"
+msgstr "Sem ponderação."
 
-#: src/language/stats/crosstabs.q:2067
-msgid "Spearman Correlation"
+#: src/language/stats/roc.c:1046
+#, fuzzy
+msgid "Weighted"
+msgstr "Ponderação:"
+
+#: src/language/stats/roc.c:1050
+msgid "Valid N (listwise)"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2068
-msgid "Pearson's R"
-msgstr "R de Pearson"
+#: src/language/stats/roc.c:1053
+#, fuzzy
+msgid "Positive"
+msgstr "positivo"
 
-#: src/language/stats/crosstabs.q:2069 src/ui/gui/crosstabs-dialog.c:50
-msgid "Kappa"
-msgstr "Kappa"
+#: src/language/stats/roc.c:1054
+#, fuzzy
+msgid "Negative"
+msgstr "negativo"
 
-#: src/language/stats/crosstabs.q:2142
-#, c-format
-msgid "Odds Ratio for %s (%g / %g)"
+#: src/language/stats/roc.c:1082
+msgid "Coordinates of the Curve"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2145
+#: src/language/stats/roc.c:1084
 #, c-format
-msgid "Odds Ratio for %s (%.*s / %.*s)"
+msgid "Coordinates of the Curve (%s)"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2153
-#, c-format
-msgid "For cohort %s = %g"
-msgstr ""
+#: src/language/stats/roc.c:1092
+#, fuzzy
+msgid "Test variable"
+msgstr "Variável(is) de teste:"
 
-#: src/language/stats/crosstabs.q:2156
-#, c-format
-msgid "For cohort %s = %.*s"
+#: src/language/stats/roc.c:1094
+msgid "Positive if greater than or equal to"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2187
-msgid "Nominal by Interval"
+#: src/language/stats/roc.c:1095 src/output/charts/roc-chart-cairo.c:38
+msgid "Sensitivity"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2192 src/ui/gui/crosstabs-dialog.c:43
-msgid "Lambda"
-msgstr "Lambda"
-
-#: src/language/stats/crosstabs.q:2193
-msgid "Goodman and Kruskal tau"
+#: src/language/stats/roc.c:1096 src/output/charts/roc-chart-cairo.c:37
+msgid "1 - Specificity"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2194
-msgid "Uncertainty Coefficient"
+#: src/language/stats/sign.c:89
+msgid "Negative Differences"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2195
-msgid "Somers' d"
+#: src/language/stats/sign.c:90
+msgid "Positive Differences"
 msgstr ""
 
-#: src/language/stats/crosstabs.q:2196 src/ui/gui/crosstabs-dialog.c:51
-msgid "Eta"
-msgstr ""
+#: src/language/stats/sign.c:91 src/language/stats/wilcoxon.c:259
+#, fuzzy
+msgid "Ties"
+msgstr "Ntiles"
 
-#: src/language/stats/crosstabs.q:2201
-msgid "Symmetric"
-msgstr "Simétrico"
+#: src/language/stats/sign.c:130 src/language/stats/wilcoxon.c:327
+#, fuzzy
+msgid "Exact Sig. (2-tailed)"
+msgstr "Sig. exata (bi-caudal)"
 
-#: src/language/stats/crosstabs.q:2202 src/language/stats/crosstabs.q:2203
-#, c-format
-msgid "%s Dependent"
-msgstr "%s Dependente"
+#: src/language/stats/sign.c:133 src/language/stats/wilcoxon.c:328
+#, fuzzy
+msgid "Exact Sig. (1-tailed)"
+msgstr "Sig. exata (uni-caudal)"
 
-#: src/language/stats/descriptives.c:102 src/language/stats/examine.q:1579
-#: src/language/stats/frequencies.q:123 src/language/stats/npar-summary.c:131
-#: src/language/stats/oneway.q:395 src/language/stats/t-test.q:701
-#: src/language/stats/t-test.q:725 src/language/stats/t-test.q:862
-#: src/language/stats/t-test.q:1213 src/ui/gui/descriptives-dialog.c:39
-#: src/ui/gui/frequencies-dialog.c:40
-msgid "Mean"
+#: src/language/stats/sign.c:136 src/language/stats/wilcoxon.c:331
+msgid "Point Probability"
+msgstr ""
+
+#: src/language/stats/wilcoxon.c:230
+#, fuzzy
+msgid "Ranks"
+msgstr "Ordenamento"
+
+#: src/language/stats/wilcoxon.c:244
+#, fuzzy
+msgid "Mean Rank"
 msgstr "Média"
 
-#: src/language/stats/descriptives.c:103
-msgid "S E Mean"
-msgstr ""
+#: src/language/stats/wilcoxon.c:245
+#, fuzzy
+msgid "Sum of Ranks"
+msgstr "Soma dos quadrados"
 
-#: src/language/stats/descriptives.c:104 src/language/stats/frequencies.q:127
-msgid "Std Dev"
-msgstr "Std Dev"
+#: src/language/stats/wilcoxon.c:257
+#, fuzzy
+msgid "Negative Ranks"
+msgstr "negativo"
 
-#: src/language/stats/descriptives.c:105 src/language/stats/examine.q:1659
-#: src/language/stats/frequencies.q:128 src/ui/gui/descriptives-dialog.c:46
-#: src/ui/gui/frequencies-dialog.c:45
-msgid "Variance"
-msgstr "Variança"
+#: src/language/stats/wilcoxon.c:258
+#, fuzzy
+msgid "Positive Ranks"
+msgstr "Posição"
 
-#: src/language/stats/descriptives.c:106 src/language/stats/examine.q:1760
-#: src/language/stats/frequencies.q:129 src/ui/gui/descriptives-dialog.c:47
-#: src/ui/gui/frequencies-dialog.c:50
-msgid "Kurtosis"
+#: src/language/stats/wilcoxon.c:322
+msgid "Z"
 msgstr ""
 
-#: src/language/stats/descriptives.c:107
-msgid "S E Kurt"
-msgstr ""
+#: src/language/stats/wilcoxon.c:323
+#, fuzzy
+msgid "Asymp. Sig. (2-tailed)"
+msgstr "Sig. assintótica (bi-caudal)"
 
-#: src/language/stats/descriptives.c:108 src/language/stats/examine.q:1741
-#: src/language/stats/frequencies.q:131 src/ui/gui/descriptives-dialog.c:48
-#: src/ui/gui/frequencies-dialog.c:46
-msgid "Skewness"
+#: src/language/data-io/combine-files.c:210
+msgid "Cannot specify the active file since no active file has been defined."
 msgstr ""
+"Impossível especificar o arquivo ativo uma vez que nenhum arquivo ativo foi "
+"definido."
 
-#: src/language/stats/descriptives.c:109
-msgid "S E Skew"
+#: src/language/data-io/combine-files.c:216
+#, fuzzy
+msgid ""
+"This command may not be used after TEMPORARY when the active file is an "
+"input source.  Temporary transformations will be made permanent."
 msgstr ""
+"FLIP ignora TEMPORARY. Transformações temporárias serão feitas permanentes."
 
-#: src/language/stats/descriptives.c:110 src/language/stats/examine.q:1704
-#: src/language/stats/frequencies.q:133 src/ui/gui/descriptives-dialog.c:43
-#: src/ui/gui/frequencies-dialog.c:48
-msgid "Range"
-msgstr "Intervalo"
-
-#: src/language/stats/descriptives.c:111 src/language/stats/examine.q:1684
-#: src/language/stats/frequencies.q:134 src/language/stats/npar-summary.c:137
-#: src/language/stats/oneway.q:407 src/ui/gui/descriptives-dialog.c:41
-#: src/ui/gui/frequencies-dialog.c:42
-msgid "Minimum"
-msgstr "Mínimo"
-
-#: src/language/stats/descriptives.c:112 src/language/stats/examine.q:1694
-#: src/language/stats/frequencies.q:135 src/language/stats/npar-summary.c:140
-#: src/language/stats/oneway.q:408 src/ui/gui/descriptives-dialog.c:42
-#: src/ui/gui/frequencies-dialog.c:43
-msgid "Maximum"
-msgstr "Máximo"
+#: src/language/data-io/combine-files.c:250
+msgid "Multiple IN subcommands for a single FILE or TABLE."
+msgstr "Múltiplos subcomandos IN para um único FILE ou TABLE"
 
-#: src/language/stats/descriptives.c:113 src/language/stats/frequencies.q:136
-#: src/ui/gui/descriptives-dialog.c:44 src/ui/gui/frequencies-dialog.c:53
-msgid "Sum"
-msgstr "Soma"
+#: src/language/data-io/combine-files.c:302
+#, c-format
+msgid "File %s lacks BY variable %s."
+msgstr "Arquivo %s não possui variável BY %s."
 
-#: src/language/stats/descriptives.c:344
+#: src/language/data-io/combine-files.c:305
 #, c-format
-msgid "Z-score variable name %s would be a duplicate variable name."
+msgid "Active file lacks BY variable %s."
 msgstr ""
 
-#: src/language/stats/descriptives.c:451
-msgid "expecting statistic name: reverting to default"
-msgstr "nome de estatística esperado: revertendo para o padrão"
+#: src/language/data-io/combine-files.c:376
+msgid "The BY subcommand is required."
+msgstr ""
 
-#: src/language/stats/descriptives.c:524
-msgid "Ran out of generic names for Z-score variables.  There are only 126 generic names: ZSC001-ZSC0999, STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09."
+#: src/language/data-io/combine-files.c:381
+#: src/language/data-io/combine-files.c:386
+#, fuzzy, c-format
+msgid "BY is required when %s is specified."
+msgstr "BY é necessário quando IN é especificado."
+
+#: src/language/data-io/combine-files.c:513
+msgid ""
+"Combining files with incompatible encodings. String data may not be "
+"represented correctly."
 msgstr ""
 
-#: src/language/stats/descriptives.c:556
-msgid "Mapping of variables to corresponding Z-scores."
+#: src/language/data-io/combine-files.c:545
+#, c-format
+msgid ""
+"Variable %s in file %s has different type or width from the same variable in "
+"earlier file."
 msgstr ""
 
-#: src/language/stats/descriptives.c:561
-msgid "Source"
-msgstr "Fonte"
+#: src/language/data-io/combine-files.c:551
+#, c-format
+msgid "In file %s, %s is numeric."
+msgstr ""
 
-#: src/language/stats/descriptives.c:562
-msgid "Target"
-msgstr "Destino"
+#: src/language/data-io/combine-files.c:554
+#, fuzzy, c-format
+msgid "In file %s, %s is a string variable with width %d."
+msgstr "Comprimento %d de variável inválido."
 
-#: src/language/stats/descriptives.c:672
+#: src/language/data-io/combine-files.c:559
 #, c-format
-msgid "Z-score of %s"
+msgid "In an earlier file, %s was numeric."
 msgstr ""
 
-#: src/language/stats/descriptives.c:886
-msgid "Valid N"
-msgstr "N válidos"
+#: src/language/data-io/combine-files.c:562
+#, fuzzy, c-format
+msgid "In an earlier file, %s was a string variable with width %d."
+msgstr "Já existe uma variável string %s de comprimento diferente."
 
-#: src/language/stats/descriptives.c:887
-msgid "Missing N"
+#: src/language/data-io/combine-files.c:601
+#, c-format
+msgid ""
+"Variable name %s specified on %s subcommand duplicates an existing variable "
+"name."
 msgstr ""
 
-#: src/language/stats/descriptives.c:915
+#: src/language/data-io/combine-files.c:762
 #, c-format
-msgid "Valid cases = %g; cases with missing value(s) = %g."
+msgid "Encountered %zu sets of duplicate cases in the master file."
 msgstr ""
 
-#: src/language/stats/examine.q:290 src/language/stats/examine.q:293
-#, c-format
-msgid "%s is not currently supported."
-msgstr "%s não é atualmente suportada."
+#: src/language/data-io/data-list.c:137
+msgid "The END subcommand may only be used within INPUT PROGRAM."
+msgstr "O subcomando END só pode ser usado dentro de INPUT PROGRAM."
 
-#: src/language/stats/examine.q:503 src/language/stats/examine.q:516
-#, c-format
-msgid "%s and %s are mutually exclusive"
-msgstr "%s e %s são mutualmente excludentes"
+#: src/language/data-io/data-list.c:143
+msgid "The END subcommand may only be specified once."
+msgstr "O subcomando END só pode ser especificado uma vez."
 
-#: src/language/stats/examine.q:982
-msgid "Case Processing Summary"
-msgstr "Sumário de processamento de casos"
+#: src/language/data-io/data-list.c:181
+msgid "Only one of FIXED, FREE, or LIST may be specified."
+msgstr "Apenas um FIXED, FREE ou LIST pode ser especificado."
 
-#: src/language/stats/examine.q:1200
-msgid "Extreme Values"
+#: src/language/data-io/data-list.c:243
+msgid "Encoding should not be specified for inline data. It will be ignored."
 msgstr ""
 
-#: src/language/stats/examine.q:1216
-msgid "Case Number"
-msgstr "Número do caso"
+#: src/language/data-io/data-list.c:254
+msgid "The END subcommand may be used only with DATA LIST FIXED."
+msgstr "O subcomando END só pode ser usado com DATA LIST FIXED."
 
-#: src/language/stats/examine.q:1317
-msgid "Highest"
-msgstr "Maior"
+#: src/language/data-io/data-list.c:269
+msgid "At least one variable must be specified."
+msgstr "Pelo menos uma variável deve ser especificada."
 
-#: src/language/stats/examine.q:1322
-msgid "Lowest"
-msgstr "Menor"
+#: src/language/data-io/data-list.c:368 src/language/data-io/data-list.c:457
+#: src/language/data-io/get-data.c:530
+#, c-format
+msgid "%s is a duplicate variable name."
+msgstr "%s é um nome de variável duplicado."
 
-#: src/language/stats/examine.q:1463 src/language/stats/oneway.q:397
-#: src/language/stats/oneway.q:693 src/language/stats/regression.q:203
-msgid "Std. Error"
-msgstr "Erro padrão"
+#: src/language/data-io/data-list.c:375
+#, c-format
+msgid "There is already a variable %s of a different type."
+msgstr "Já existe uma variável %s de um tipo diferente."
 
-#: src/language/stats/examine.q:1465 src/language/stats/oneway.q:411
-#: src/ui/gui/examine.glade:307
-msgid "Descriptives"
-msgstr "Descritivas"
+#: src/language/data-io/data-list.c:382
+#, c-format
+msgid "There is already a string variable %s of a different width."
+msgstr "Já existe uma variável string %s de comprimento diferente."
 
-#: src/language/stats/examine.q:1597 src/language/stats/oneway.q:402
+#: src/language/data-io/data-list.c:390
 #, c-format
-msgid "%g%% Confidence Interval for Mean"
+msgid "Cannot place variable %s on record %d when RECORDS=%d is specified."
 msgstr ""
+"Impossível colocar variável %s no registro %d quando RECORDS=%d está "
+"especificado."
 
-#: src/language/stats/examine.q:1603 src/language/stats/oneway.q:404
-msgid "Lower Bound"
-msgstr "Intervalo inferior"
+#: src/language/data-io/data-parser.c:460
+#: src/language/data-io/data-parser.c:469
+msgid "Quoted string extends beyond end of line."
+msgstr "String entre aspas se estende além do fim da linha."
 
-#: src/language/stats/examine.q:1614 src/language/stats/oneway.q:405
-msgid "Upper Bound"
-msgstr "Intervalo superior"
+#: src/language/data-io/data-parser.c:525
+#, c-format
+msgid "Partial case of %d of %d records discarded."
+msgstr "Caso parcial dos registros %d a %d descartados."
 
-#: src/language/stats/examine.q:1626
+#: src/language/data-io/data-parser.c:572
 #, c-format
-msgid "5%% Trimmed Mean"
-msgstr ""
+msgid "Partial case discarded.  The first variable missing was %s."
+msgstr "Casos parciais descartados. A primeira variável ausente foi %s."
 
-#: src/language/stats/examine.q:1637 src/language/stats/frequencies.q:125
-#: src/ui/gui/frequencies-dialog.c:52
-msgid "Median"
+#: src/language/data-io/data-parser.c:610
+#, c-format
+msgid ""
+"Missing value(s) for all variables from %s onward.  These will be filled "
+"with the system-missing value or blanks, as appropriate."
 msgstr ""
 
-#: src/language/stats/examine.q:1671 src/language/stats/npar-summary.c:134
-#: src/language/stats/oneway.q:396 src/language/stats/t-test.q:702
-#: src/language/stats/t-test.q:726 src/language/stats/t-test.q:864
-#: src/language/stats/t-test.q:1214
-msgid "Std. Deviation"
-msgstr "Desvio padrão"
+#: src/language/data-io/data-parser.c:630
+msgid "Record ends in data not part of any field."
+msgstr "Registro termina em dados que não fazem parte de nenhum campo."
 
-#: src/language/stats/examine.q:1716
-msgid "Interquartile Range"
-msgstr ""
+#: src/language/data-io/data-parser.c:650 src/language/data-io/print.c:404
+msgid "Record"
+msgstr "Registro"
 
-#: src/language/stats/examine.q:1870
-#, c-format
-msgid "Boxplot of %s vs. %s"
-msgstr "Boxplot de %s por %s"
+#: src/language/data-io/data-parser.c:651 src/language/data-io/print.c:405
+#: src/ui/gui/psppire-var-sheet.c:541 src/ui/gui/psppire-var-store.c:839
+#: src/ui/gui/crosstabs.ui:89
+msgid "Columns"
+msgstr "Colunas"
 
-#: src/language/stats/examine.q:1897
-msgid "Boxplot"
-msgstr "Boxplot"
+#: src/language/data-io/data-parser.c:652
+#: src/language/data-io/data-parser.c:689 src/language/data-io/print.c:406
+msgid "Format"
+msgstr "Formato"
 
-#: src/language/stats/examine.q:1939
+#: src/language/data-io/data-parser.c:670
 #, c-format
-msgid "Normal Q-Q Plot of %s"
-msgstr ""
+msgid "Reading %d record from %s."
+msgid_plural "Reading %d records from %s."
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/language/stats/examine.q:1940 src/language/stats/examine.q:1946
-msgid "Observed Value"
+#: src/language/data-io/data-parser.c:704
+#, c-format
+msgid "Reading free-form data from %s."
 msgstr ""
 
-#: src/language/stats/examine.q:1941
-msgid "Expected Normal"
-msgstr ""
+#. TRANSLATORS: this fragment will be interpolated into
+#. messages in fh_lock() that identify types of files.
+#: src/language/data-io/data-reader.c:123
+#: src/language/data-io/data-writer.c:58
+msgid "data file"
+msgstr "arquivo de dados"
 
-#: src/language/stats/examine.q:1944
+#: src/language/data-io/data-reader.c:150
 #, c-format
-msgid "Detrended Normal Q-Q Plot of %s"
-msgstr ""
-
-#: src/language/stats/examine.q:1947
-msgid "Dev from Normal"
-msgstr ""
-
-#: src/language/stats/examine.q:2066 src/language/stats/examine.q:2088
-#: src/language/stats/frequencies.q:1422 src/language/stats/npar-summary.c:147
-#: src/ui/gui/examine.glade:328
-msgid "Percentiles"
-msgstr "Percentis"
+msgid "Could not open \"%s\" for reading as a data file: %s."
+msgstr "Impossível abrir \"%s\" para leitura como um arquivo de dados: %s."
 
-#: src/language/stats/examine.q:2221
-msgid "Tukey's Hinges"
+#: src/language/data-io/data-reader.c:192
+msgid ""
+"Unexpected end-of-file while reading data in BEGIN DATA.  This probably "
+"indicates a missing or misformatted END DATA command.  END DATA must appear "
+"by itself on a single line with exactly one space between words."
 msgstr ""
+"Fim-de-arquivo inesperado ao ler dados com BEGIN DATA. Isto provavelmente "
+"indica um END DATA ausente ou mal formatado. END DATA deve aparecer sozinho "
+"em uma única linha com exatamente um espaço entre as palavras."
 
-#: src/language/stats/flip.c:96
-msgid "FLIP ignores TEMPORARY.  Temporary transformations will be made permanent."
-msgstr "FLIP ignora TEMPORARY. Transformações temporárias serão feitas permanentes."
+#: src/language/data-io/data-reader.c:217
+#, c-format
+msgid "Error reading file %s: %s."
+msgstr "Erro lendo arquivo %s: %s."
 
-#: src/language/stats/flip.c:151
-msgid "Could not create temporary file for FLIP."
-msgstr "Não foi possível criar arquivo temporário para FLIP."
+#: src/language/data-io/data-reader.c:220
+#, c-format
+msgid "Unexpected end of file reading %s."
+msgstr "Fim de arquivo não esperado lendo %s."
 
-#: src/language/stats/flip.c:162
+#: src/language/data-io/data-reader.c:229
 #, c-format
-msgid "Error writing FLIP file: %s."
-msgstr "Erro escrevendo em arquivo FLIP: %s."
+msgid "Unexpected end of file in partial record reading %s."
+msgstr "Fim de arquivo inesperado em registro parcial ao ler %s."
 
-#: src/language/stats/flip.c:262
+#: src/language/data-io/data-reader.c:289
 #, c-format
-msgid "Could not create acceptable variant for variable %s."
-msgstr "Não foi possível criar variança aceitável para variável %s."
+msgid "Corrupt block descriptor word at offset 0x%lx in %s."
+msgstr "Palavra descritora de bloco corrompida no offset 0x%lx em %s."
 
-#: src/language/stats/flip.c:278
-msgid "Cannot create more than 99999 variable names."
-msgstr "Impossível criar mais que 99999 nomes de variáve."
+#: src/language/data-io/data-reader.c:290
+#, c-format
+msgid "Corrupt record descriptor word at offset 0x%lx in %s."
+msgstr "Palavra descritora de registro corrompida no offset 0x%lx em %s."
 
-#: src/language/stats/flip.c:394
+#: src/language/data-io/data-reader.c:303
 #, c-format
-msgid "Error rewinding FLIP file: %s."
-msgstr ""
+msgid "Corrupt record size at offset 0x%lx in %s."
+msgstr "Tamanho de registro corrompido no offset 0x%lx em %s."
 
-#: src/language/stats/flip.c:401
-msgid "Error creating FLIP source file."
-msgstr "Erro ao criar arquivo de origem FLIP"
+#: src/language/data-io/data-reader.c:445
+msgid "Record exceeds remaining block length."
+msgstr "Registro excede tamanho restante de bloco."
 
-#: src/language/stats/flip.c:414
+#: src/language/data-io/data-reader.c:519
 #, c-format
-msgid "Error reading FLIP file: %s."
-msgstr ""
+msgid "Attempt to read beyond end-of-file on file %s."
+msgstr "Tentativa de ler arquivo %s além de seu fim."
 
-#: src/language/stats/flip.c:416
-msgid "Unexpected end of file reading FLIP file."
-msgstr ""
+#: src/language/data-io/data-reader.c:522
+msgid "Attempt to read beyond END DATA."
+msgstr "Tentativa de ler além de END DATA."
 
-#: src/language/stats/flip.c:432
-#, c-format
-msgid "Error seeking FLIP source file: %s."
+# inline?
+#: src/language/data-io/data-reader.c:708
+msgid ""
+"This command is not valid here since the current input program does not "
+"access the inline file."
 msgstr ""
+"Este comando não é válido aqui, pois a entrada do programa atual não acessa "
+"arquivo inline."
 
-#: src/language/stats/flip.c:440
+#: src/language/data-io/data-writer.c:74
 #, c-format
-msgid "Error writing FLIP source file: %s."
+msgid "An error occurred while opening \"%s\" for writing as a data file: %s."
 msgstr ""
+"Um erro ocorreu ao abrir \"%s\" para gravação como um arquivo de dados: %s."
 
-#: src/language/stats/flip.c:451
+#: src/language/data-io/data-writer.c:191
 #, c-format
-msgid "Error closing FLIP source file: %s."
-msgstr ""
+msgid "I/O error occurred writing data file \"%s\"."
+msgstr "Ocorreu um erro de E/S gravando no arquivo de dados \"%s\"."
 
-#: src/language/stats/flip.c:459
+#: src/language/data-io/get-data.c:64
 #, c-format
-msgid "Error rewinding FLIP source file: %s."
-msgstr ""
+msgid "Unsupported TYPE %s"
+msgstr "TYPE %s não suportado"
 
-#: src/language/stats/flip.c:488
+#: src/language/data-io/get-data.c:260
 #, c-format
-msgid "Error reading FLIP temporary file: %s."
-msgstr ""
-
-#: src/language/stats/flip.c:491
-msgid "Unexpected end of file reading FLIP temporary file."
+msgid ""
+"%s is allowed only with %s arrangement, but %s arrangement was stated or "
+"implied earlier in this command."
 msgstr ""
 
-#: src/language/stats/frequencies.q:124
-msgid "S.E. Mean"
-msgstr ""
+#: src/language/data-io/get-data.c:315
+msgid "expecting FIXED or DELIMITED"
+msgstr "esperando FIXED ou DELIMITED"
 
-#: src/language/stats/frequencies.q:126 src/ui/gui/frequencies-dialog.c:49
-msgid "Mode"
-msgstr ""
+#: src/language/data-io/get-data.c:328
+msgid "Value of FIRSTCASE must be 1 or greater."
+msgstr "Valor de FIRSTCASE deve ser maior ou igual a 1."
 
-#: src/language/stats/frequencies.q:130
-msgid "S.E. Kurt"
-msgstr ""
+#: src/language/data-io/get-data.c:353
+msgid "expecting LINE or VARIABLES"
+msgstr "esperando LINE ou VARIABLES"
 
-#: src/language/stats/frequencies.q:132
-msgid "S.E. Skew"
-msgstr ""
+#: src/language/data-io/get-data.c:366
+msgid "Value of FIXCASE must be at least 1."
+msgstr "Valor de FIXCASE deve ser pelo menos 1."
 
-#: src/language/stats/frequencies.q:409
-msgid "At most one of BARCHART, HISTOGRAM, or HBAR should be given.  HBAR will be assumed.  Argument values will be given precedence increasing along the order given."
-msgstr ""
+#: src/language/data-io/get-data.c:386
+msgid "Value of FIRST must be at least 1."
+msgstr "Valor de FIRST deve ser pelo menos 1."
 
-#: src/language/stats/frequencies.q:492
-#, c-format
-msgid "MAX must be greater than or equal to MIN, if both are specified.  However, MIN was specified as %g and MAX as %g.  MIN and MAX will be ignored."
-msgstr ""
+#: src/language/data-io/get-data.c:398
+msgid "Value of PERCENT must be between 1 and 100."
+msgstr "Valor de PERCENT deve estar entre 1 e 100."
 
-#: src/language/stats/frequencies.q:761
-#, c-format
-msgid "Variable %s specified multiple times on VARIABLES subcommand."
+#: src/language/data-io/get-data.c:447
+msgid ""
+"In compatible syntax mode, the QUALIFIER string must contain exactly one "
+"character."
 msgstr ""
+"No modo de sintaxe compatível, a strint QUALIFIER deve conter exatamente um "
+"caractere."
 
-#: src/language/stats/frequencies.q:824
-msgid "`)' expected after GROUPED interval list."
-msgstr "')' esperado após lista de intervalo do GROUPED"
+#: src/language/data-io/get-data.c:462
+msgid "expecting VARIABLES"
+msgstr "esperando VARIABLES"
 
-#: src/language/stats/frequencies.q:836
+#: src/language/data-io/get-data.c:484
+#: src/language/data-io/placement-parser.c:378
 #, c-format
-msgid "Variables %s specified on GROUPED but not on VARIABLES."
+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/stats/frequencies.q:843
+#: src/language/data-io/get-data.c:493
 #, c-format
-msgid "Variables %s specified multiple times on GROUPED subcommand."
+msgid ""
+"The record number specified, %ld, exceeds the number of records per case "
+"specified on FIXCASE, %d."
 msgstr ""
 
-#: src/language/stats/frequencies.q:1062 src/language/stats/frequencies.q:1155
-#: src/language/stats/frequencies.q:1156 src/language/stats/frequencies.q:1191
-msgid "Cum"
-msgstr ""
+#: src/language/data-io/get.c:99
+msgid "expecting COMM or TAPE"
+msgstr "esperando COMM ou TAPE"
 
-#: src/language/stats/frequencies.q:1064 src/output/charts/plot-hist.c:125
-msgid "Frequency"
-msgstr "Frequência"
+#: src/language/data-io/inpt-pgm.c:130
+msgid "Unexpected end-of-file within INPUT PROGRAM."
+msgstr ""
 
-#: src/language/stats/frequencies.q:1085
-msgid "Value Label"
+#: src/language/data-io/inpt-pgm.c:143
+msgid "Input program did not create any variables."
 msgstr ""
 
-#: src/language/stats/frequencies.q:1189
-msgid "Freq"
+#: src/language/data-io/inpt-pgm.c:288
+msgid "COLUMN subcommand multiply specified."
 msgstr ""
 
-#: src/language/stats/frequencies.q:1190 src/language/stats/frequencies.q:1192
-msgid "Pct"
+#: src/language/data-io/inpt-pgm.c:338
+msgid ""
+"REREAD: Column numbers must be positive finite numbers.  Column set to 1."
 msgstr ""
 
-#: src/language/stats/frequencies.q:1385
+#: src/language/data-io/placement-parser.c:87
 #, c-format
-msgid "No valid data for variable %s; statistics not displayed."
+msgid ""
+"Number of variables specified (%zu) differs from number of variable formats "
+"(%zu)."
 msgstr ""
 
-#: src/language/stats/frequencies.q:1426
-msgid "50 (Median)"
+#: src/language/data-io/placement-parser.c:97
+msgid ""
+"SPSS-like or Fortran-like format specification expected after variable names."
 msgstr ""
 
-#: src/language/stats/glm.q:148
-msgid "Multivariate GLM not yet supported"
+#: src/language/data-io/placement-parser.c:119
+#, c-format
+msgid "The %d columns %d-%d can't be evenly divided into %zu fields."
 msgstr ""
 
-#: src/language/stats/glm.q:356 src/language/stats/regression.q:1026
-msgid "No valid data found. This command was skipped."
+#: src/language/data-io/placement-parser.c:305
+msgid "Column positions for fields must be positive."
 msgstr ""
 
-#: src/language/stats/means.q:100
-msgid "Missing required subcommand TABLES."
+#: src/language/data-io/placement-parser.c:307
+msgid "Column positions for fields must not be negative."
 msgstr ""
 
-#: src/language/stats/means.q:134
-msgid "TABLES subcommand may not appear more than once."
+#: src/language/data-io/placement-parser.c:344
+msgid "The ending column for a field must be greater than the starting column."
 msgstr ""
 
-#: src/language/stats/npar-summary.c:114
-msgid "Descriptive Statistics"
+#: src/language/data-io/print-space.c:116
+msgid "The expression on PRINT SPACE evaluated to the system-missing value."
 msgstr ""
 
-#: src/language/stats/npar-summary.c:151
-msgid "25th"
+#: src/language/data-io/print-space.c:119
+#, c-format
+msgid "The expression on PRINT SPACE evaluated to %g."
 msgstr ""
 
-#: src/language/stats/npar-summary.c:154
-msgid "50th (Median)"
-msgstr ""
+#: src/language/data-io/print.c:179 src/language/data-io/trim.c:54
+msgid "expecting a valid subcommand"
+msgstr "esperando um subcomando válido"
 
-#: src/language/stats/npar-summary.c:157
-msgid "75th"
+#: src/language/data-io/print.c:267
+#, c-format
+msgid "Output calls for %d records but %zu specified on RECORDS subcommand."
 msgstr ""
 
-#: src/language/stats/npar.q:98
-msgid "NPAR subcommand not currently implemented."
-msgstr ""
+#: src/language/data-io/print.c:436
+#, c-format
+msgid "Writing %zu record to %s."
+msgid_plural "Writing %zu records to %s."
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/language/stats/npar.q:236
+#: src/language/data-io/print.c:440
 #, c-format
-msgid "The specified value of HI (%d) is lower than the specified value of LO (%d)"
-msgstr ""
+msgid "Writing %zu record."
+msgid_plural "Writing %zu records."
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/language/stats/npar.q:291
+#: src/language/data-io/save.c:223 src/language/data-io/save.c:238
+#: src/language/data-io/save.c:266
 #, c-format
-msgid "%d expected values were given, but the specified range (%d-%d) requires exactly %d values."
-msgstr ""
+msgid "expecting %s or %s"
+msgstr "esperando %s ou %s"
 
-#: src/language/stats/npar.q:425 src/language/stats/t-test.q:501
+#: src/language/data-io/trim.c:88
 #, c-format
-msgid "PAIRED was specified but the number of variables preceding WITH (%zu) did not match the number following (%zu)."
+msgid ""
+"Cannot rename %s as %s because there already exists a variable named %s.  To "
+"rename variables with overlapping names, use a single RENAME subcommand such "
+"as \"/RENAME (A=B)(B=C)(C=A)\", or equivalently, \"/RENAME (A B C=B C A)\"."
 msgstr ""
 
-#: src/language/stats/oneway.q:170
-msgid "Number of contrast coefficients must equal the number of groups"
-msgstr ""
+#: src/language/data-io/trim.c:114
+msgid "`=' expected after variable list."
+msgstr "'=' esperado após lista de variáveis."
 
-#: src/language/stats/oneway.q:179
+#: src/language/data-io/trim.c:122
 #, c-format
-msgid "Coefficients for contrast %zu do not total zero"
+msgid ""
+"Number of variables on left side of `=' (%zu) does not match number of "
+"variables on right side (%zu), in parenthesized group %d of RENAME "
+"subcommand."
 msgstr ""
 
-#: src/language/stats/oneway.q:245
+#: src/language/data-io/trim.c:135
 #, c-format
-msgid "`%s' is not a variable name"
+msgid "Requested renaming duplicates variable name %s."
 msgstr ""
 
-#: src/language/stats/oneway.q:279 src/language/stats/regression.q:301
-msgid "Sum of Squares"
-msgstr "Soma dos quadrados"
-
-#: src/language/stats/oneway.q:281 src/language/stats/regression.q:303
-msgid "Mean Square"
-msgstr ""
+#: src/language/data-io/trim.c:166
+msgid "Cannot DROP all variables from dictionary."
+msgstr "DROP de todas as variáveis do dicionário impossível."
 
-#: src/language/stats/oneway.q:282 src/language/stats/regression.q:304
-#: src/language/stats/t-test.q:1023
-msgid "F"
-msgstr ""
+#: src/language/expressions/evaluate.c:155
+msgid "expecting number or string"
+msgstr "esperando número ou string"
 
-#: src/language/stats/oneway.q:283 src/language/stats/oneway.q:543
-#: src/language/stats/regression.q:206 src/language/stats/regression.q:305
-msgid "Significance"
-msgstr ""
+#: src/language/expressions/evaluate.c:169
+#, c-format
+msgid "Duplicate variable name %s."
+msgstr "Nome de variável %s duplicado."
 
-#: src/language/stats/oneway.q:305
-msgid "Between Groups"
+#: src/language/expressions/helpers.c:51
+msgid ""
+"One of the arguments to a DATE function is not an integer.  The result will "
+"be system-missing."
 msgstr ""
+"Um dos argumentos para a função DATE não é um inteiro. O resultado será um "
+"system-missing."
 
-#: src/language/stats/oneway.q:306
-msgid "Within Groups"
+#: src/language/expressions/helpers.c:73
+msgid ""
+"The week argument to DATE.WKYR is not an integer.  The result will be system-"
+"missing."
 msgstr ""
+"O argumento semana para DATE.WKYR não é um inteiro. O resultado será um "
+"system-missing."
 
-#: src/language/stats/oneway.q:353 src/language/stats/regression.q:330
-msgid "ANOVA"
-msgstr "ANOVA"
-
-#: src/language/stats/oneway.q:540
-msgid "Levene Statistic"
-msgstr "Estatística de Levene"
-
-#: src/language/stats/oneway.q:541
-msgid "df1"
+#: src/language/expressions/helpers.c:79
+msgid ""
+"The week argument to DATE.WKYR is outside the acceptable range of 1 to 53.  "
+"The result will be system-missing."
 msgstr ""
+"O argumento semana para DATE.WKYR está fora do intervalo aceitável entre 1 e "
+"53. O resultado será um system-missing."
 
-#: src/language/stats/oneway.q:542
-msgid "df2"
+#: src/language/expressions/helpers.c:101
+msgid ""
+"The day argument to DATE.YRDAY is not an integer.  The result will be system-"
+"missing."
 msgstr ""
+"O argumento dia para DATE.YRDAY não é um inteiro. O resultado será um system-"
+"missing."
 
-#: src/language/stats/oneway.q:546
-msgid "Test of Homogeneity of Variances"
+#: src/language/expressions/helpers.c:107
+msgid ""
+"The day argument to DATE.YRDAY is outside the acceptable range of 1 to 366.  "
+"The result will be system-missing."
 msgstr ""
+"O argumento dia para DATE.YRDAY está fora do intervalo aceitável entre 1 e "
+"366. O resultado será um system-missing."
 
-#: src/language/stats/oneway.q:614
-msgid "Contrast Coefficients"
+#: src/language/expressions/helpers.c:129
+msgid ""
+"The year argument to YRMODA is greater than 47516.  The result will be "
+"system-missing."
 msgstr ""
+"O argumento ano para YRMODA é maior que 47516. O resultado será um system-"
+"missing."
 
-#: src/language/stats/oneway.q:616 src/language/stats/oneway.q:691
-msgid "Contrast"
+#: src/language/expressions/helpers.c:182
+#, c-format
+msgid ""
+"Unrecognized date unit \"%.*s\".  Valid date units are \"years\", \"quarters"
+"\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", and \"seconds\"."
 msgstr ""
+"Unidade de data não reconhecido \"%.*s\". Valores válidos de unidade são "
+"\"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", "
+"\"minutes\", and \"seconds\"."
 
-#: src/language/stats/oneway.q:689
-msgid "Contrast Tests"
+#: src/language/expressions/helpers.c:332
+msgid ""
+"Invalid DATESUM method.  Valid choices are \"closest\" and \"rollover\"."
 msgstr ""
+"Método DATESUM inválido. Escolhas válidas são \"closest\" and \"rollover\"."
 
-#: src/language/stats/oneway.q:692
-msgid "Value of Contrast"
+#: src/language/expressions/parse.c:259
+#, c-format
+msgid ""
+"Type mismatch: expression has %s type, but a numeric value is required here."
 msgstr ""
+"Incompatibilidade de tipos: expressão tem tipo %s, mas um valor numérico é "
+"requerido aqui."
 
-#: src/language/stats/oneway.q:694 src/language/stats/regression.q:205
-#: src/language/stats/t-test.q:1025 src/language/stats/t-test.q:1218
-#: src/language/stats/t-test.q:1315
-msgid "t"
+#: src/language/expressions/parse.c:271
+#, c-format
+msgid ""
+"Type mismatch: expression has %s type, but a string value is required here."
 msgstr ""
+"Incompatibilidade de tipos: expressão tem tipo %s, mas um valor string é "
+"requerido aqui."
 
-#: src/language/stats/oneway.q:696 src/language/stats/t-test.q:1027
-#: src/language/stats/t-test.q:1220 src/language/stats/t-test.q:1317
-msgid "Sig. (2-tailed)"
+#: src/language/expressions/parse.c:427
+#, c-format
+msgid "Type mismatch while applying %s operator: cannot convert %s to %s."
 msgstr ""
+"Incompatibilidade de tipos ao aplicar o operador %s: não é possível "
+"converter %s para %s."
 
-#: src/language/stats/oneway.q:740
-msgid "Assume equal variances"
+#: src/language/expressions/parse.c:643
+msgid ""
+"Chaining relational operators (e.g. \"a < b < c\") will not produce the "
+"mathematically expected result.  Use the AND logical operator to fix the "
+"problem (e.g. \"a < b AND b < c\").  If chaining is really intended, "
+"parentheses will disable this warning (e.g. \"(a < b) < c\".)"
 msgstr ""
+"Encadear operadores relacionais (i.e. \"a < b < c\") não irá produzir o "
+"resultado esperado. Use o operador lógico AND para corrigir o problema (i.e. "
+"\"a < b AND b < c\"). Se o encadeamento é intencional, o uso de parênteses "
+"irá desabilitar este aviso (i.e. \"(a < b) < c\".)"
 
-#: src/language/stats/oneway.q:744
-msgid "Does not assume equal"
+#: src/language/expressions/parse.c:744
+msgid ""
+"The exponentiation operator (\"**\") is left-associative, even though right-"
+"associative semantics are more useful.  That is, \"a**b**c\" equals \"(a**b)"
+"**c\", not as \"a**(b**c)\".  To disable this warning, insert parentheses."
 msgstr ""
+"O operador exponencial (\"**\") é associativo à esquerda, mesmo que a "
+"semântica associativa a direita seja mais útil.Ou seja, \"a**b**c\" equivale "
+"a \"(a**b)**c\", não a \"a**(b**c)\". Para desabilitar este aviso, insira "
+"parênteses."
 
-#: src/language/stats/rank.q:221
+#: src/language/expressions/parse.c:809
 #, c-format
-msgid "%s of %s by %s"
-msgstr ""
+msgid "Unknown system variable %s."
+msgstr "Variável de sistema %s desconhecida."
 
-#: src/language/stats/rank.q:226
+#: src/language/expressions/parse.c:857
 #, c-format
-msgid "%s of %s"
-msgstr ""
-
-#: src/language/stats/rank.q:602
-msgid "Cannot create new rank variable.  All candidates in use."
-msgstr ""
+msgid "Unknown identifier %s."
+msgstr "Identificador %s desconhecido."
 
-#: src/language/stats/rank.q:695
-msgid "Variables Created By RANK"
-msgstr ""
+#: src/language/expressions/parse.c:892
+msgid "in expression"
+msgstr "na expressão"
 
-#: src/language/stats/rank.q:719
+#: src/language/expressions/parse.c:1073
 #, c-format
-msgid "%s into %s(%s of %s using %s BY %s)"
-msgstr ""
+msgid "%s must have at least %d arguments in list."
+msgstr "%s deve ter pelo menos %d argumentos na lista."
 
-#: src/language/stats/rank.q:730
+#: src/language/expressions/parse.c:1082
 #, c-format
-msgid "%s into %s(%s of %s BY %s)"
-msgstr ""
+msgid "%s must have even number of arguments in list."
+msgstr "%s deve ter um número par de argumentos na lista."
 
-#: src/language/stats/rank.q:744
+#: src/language/expressions/parse.c:1085
 #, c-format
-msgid "%s into %s(%s of %s using %s)"
-msgstr ""
+msgid "%s must have multiple of %d arguments in list."
+msgstr "%s deve ter um número de argumentos múltiplo de %d na lista."
 
-#: src/language/stats/rank.q:754
+#: src/language/expressions/parse.c:1095
 #, c-format
-msgid "%s into %s(%s of %s)"
-msgstr ""
-
-#: src/language/stats/rank.q:767
-msgid "FRACTION has been specified, but NORMAL and PROPORTION rank functions have not been requested.  The FRACTION subcommand will be ignored."
+msgid "%s function does not accept a minimum valid argument count."
 msgstr ""
 
-#: src/language/stats/rank.q:860
+#: src/language/expressions/parse.c:1104
 #, c-format
-msgid "Variable %s already exists."
+msgid "%s requires at least %d valid arguments in list."
 msgstr ""
 
-#: src/language/stats/rank.q:865
-msgid "Too many variables in INTO clause."
+#: src/language/expressions/parse.c:1110
+#, c-format
+msgid ""
+"With %s, using minimum valid argument count of %d does not make sense when "
+"passing only %d arguments in list."
 msgstr ""
 
-#: src/language/stats/regression.q:159 src/ui/gui/regression-dialog.c:41
-msgid "R"
-msgstr ""
+#: src/language/expressions/parse.c:1164
+#, c-format
+msgid "Type mismatch invoking %s as "
+msgstr "Incompatibilidade de tipos invocando %s como "
 
-#: src/language/stats/regression.q:160
-msgid "R Square"
-msgstr ""
+#: src/language/expressions/parse.c:1169
+msgid "Function invocation "
+msgstr "Invocação de função"
 
-#: src/language/stats/regression.q:161
-msgid "Adjusted R Square"
-msgstr ""
+#: src/language/expressions/parse.c:1171
+msgid " does not match any known function.  Candidates are:"
+msgstr " não combina com nenhuma função conhecida. Candidatas são:"
 
-#: src/language/stats/regression.q:162
-msgid "Std. Error of the Estimate"
-msgstr ""
+#: src/language/expressions/parse.c:1201
+#, c-format
+msgid "No function or vector named %s."
+msgstr "Nenhuma função ou vetor de nome %s."
 
-#: src/language/stats/regression.q:167
-msgid "Model Summary"
-msgstr ""
+#: src/language/expressions/parse.c:1244
+#, c-format
+msgid "expecting `,' or `)' invoking %s function"
+msgstr "esperando ',' ou ')' invocando função %s"
 
-#: src/language/stats/regression.q:202
-msgid "B"
-msgstr ""
+#: src/language/expressions/parse.c:1264
+#, c-format
+msgid "%s is a PSPP extension."
+msgstr "%s é uma extensão do PSPP."
 
-#: src/language/stats/regression.q:204
-msgid "Beta"
-msgstr ""
+#: src/language/expressions/parse.c:1273
+#, c-format
+msgid "%s may not appear after TEMPORARY."
+msgstr "%s não pode aparecer após TEMPORARY."
 
-#: src/language/stats/regression.q:207
-msgid "(Constant)"
-msgstr ""
+#: src/libpspp/hash.c:545
+#, c-format
+msgid "hash table:"
+msgstr "tabela hash:"
 
-#: src/language/stats/regression.q:271
-msgid "Coefficients"
-msgstr "Coeficientes"
+#: src/libpspp/message.c:128
+msgid "error"
+msgstr "erro"
 
-#: src/language/stats/regression.q:307
-msgid "Regression"
-msgstr "Regressão"
+#: src/libpspp/message.c:131
+msgid "warning"
+msgstr "aviso"
 
-#: src/language/stats/regression.q:389
-msgid "Model"
-msgstr "Modelo"
+#: src/libpspp/message.c:135
+#, fuzzy
+msgid "note"
+msgstr "Centro"
 
-#: src/language/stats/regression.q:390
-msgid "Covariances"
-msgstr "Co-variança"
+#: src/libpspp/tmpfile.c:56
+msgid "failed to create temporary file"
+msgstr "falha ao criar arquivo temporário."
 
-#: src/language/stats/regression.q:405
-msgid "Coefficient Correlations"
-msgstr ""
+#: src/libpspp/tmpfile.c:97
+msgid "seeking in temporary file"
+msgstr "procurando no arquivo temporário."
 
-#: src/language/stats/regression.q:807
-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 meaningless."
-msgstr ""
+#: src/libpspp/tmpfile.c:116
+msgid "reading temporary file"
+msgstr "lendo arquivo temporário."
 
-#: src/language/stats/regression.q:931
-msgid "Dependent variable must be numeric."
-msgstr "Variável dependente precisa ser numérica"
+#: src/libpspp/tmpfile.c:118
+msgid "unexpected end of file reading temporary file"
+msgstr "fim inesperado ao ler arquivo temporário"
 
-#: src/language/stats/sort-cases.c:64
-msgid "Buffer limit must be at least 2."
-msgstr ""
+#: src/libpspp/tmpfile.c:137
+msgid "writing to temporary file"
+msgstr "escrevendo no arquivo temporário."
 
-#: src/language/stats/sort-criteria.c:69
-msgid "`A' or `D' expected inside parentheses."
+#: src/libpspp/zip-writer.c:91
+#, c-format
+msgid "%s: error opening output file"
 msgstr ""
 
-#: src/language/stats/sort-criteria.c:74
-msgid "`)' expected."
-msgstr ""
+#: src/libpspp/zip-writer.c:224
+#, fuzzy, c-format
+msgid "%s: write failed"
+msgstr "%s: Não é um arquivo portável."
 
-#: src/language/stats/sort-criteria.c:85
-#, c-format
-msgid "Variable %s specified twice in sort criteria."
+#: src/math/percentiles.c:36
+msgid "HAverage"
 msgstr ""
 
-#: src/language/stats/t-test.q:280
-msgid "TESTVAL, GROUPS and PAIRS subcommands are mutually exclusive."
-msgstr "TESTVAL, GROUPS e PAIRS subcomandos são mutualmente excludentes."
+#: src/math/percentiles.c:37
+msgid "Weighted Average"
+msgstr "Média ponderada"
 
-#: src/language/stats/t-test.q:298
-msgid "VARIABLES subcommand is not appropriate with PAIRS"
+#: src/math/percentiles.c:38
+msgid "Rounded"
 msgstr ""
 
-#: src/language/stats/t-test.q:336
-msgid "One or more VARIABLES must be specified."
+#: src/math/percentiles.c:39
+msgid "Empirical"
 msgstr ""
 
-#: src/language/stats/t-test.q:386
-#, c-format
-msgid "Long string variable %s is not valid here."
-msgstr "Variável string longa %s não é válida aqui."
-
-#: src/language/stats/t-test.q:406 src/language/stats/t-test.q:420
-msgid "When applying GROUPS to a string variable, two values must be specified."
+#: src/math/percentiles.c:40
+msgid "Empirical with averaging"
 msgstr ""
 
-#: src/language/stats/t-test.q:518
-msgid "At least two variables must be specified on PAIRS."
+#: src/output/ascii.c:278
+#, c-format
+msgid "%s: %s must be positive integer or `auto'"
 msgstr ""
 
-#: src/language/stats/t-test.q:698
-msgid "One-Sample Statistics"
+#: src/output/ascii.c:311
+#, c-format
+msgid ""
+"ascii: page excluding margins and headers must be at least %d characters "
+"wide by %d lines long, but as configured is only %d characters by %d lines"
 msgstr ""
 
-#: src/language/stats/t-test.q:703 src/language/stats/t-test.q:727
-#: src/language/stats/t-test.q:865
-msgid "SE. Mean"
+#: src/output/ascii.c:360
+#, c-format
+msgid "ascii: closing output file \"%s\""
 msgstr ""
 
-#: src/language/stats/t-test.q:722
-msgid "Group Statistics"
+#: src/output/ascii.c:503
+#, c-format
+msgid "See %s for a chart."
 msgstr ""
 
-#: src/language/stats/t-test.q:859
-msgid "Paired Sample Statistics"
+#: src/output/ascii.c:806
+#, c-format
+msgid "ascii: opening output file \"%s\""
 msgstr ""
 
-#: src/language/stats/t-test.q:885 src/language/stats/t-test.q:1243
-#: src/language/stats/t-test.q:1442
+#: src/output/ascii.c:913 src/output/cairo.c:784
 #, c-format
-msgid "Pair %d"
+msgid "%s - Page %d"
 msgstr ""
 
-#: src/language/stats/t-test.q:1011
-msgid "Independent Samples Test"
-msgstr "Teste de Amostras Independentes"
-
-#: src/language/stats/t-test.q:1019
-msgid "Levene's Test for Equality of Variances"
-msgstr "Teste de Levene para Igualdade de Varianças"
-
-#: src/language/stats/t-test.q:1021
-msgid "t-test for Equality of Means"
-msgstr "teste t para Igualdade de Médias"
+#: src/output/csv.c:87 src/output/html.c:106 src/output/journal.c:93
+#: src/output/msglog.c:66
+#, fuzzy, c-format
+msgid "error opening output file \"%s\""
+msgstr "lendo arquivo de fonte \"%s\""
 
-#: src/language/stats/t-test.q:1024 src/language/stats/t-test.q:1427
-msgid "Sig."
+#: src/output/driver.c:330
+#, c-format
+msgid ""
+"%s is not a valid device type (the choices are \"terminal\" and \"listing\")"
 msgstr ""
 
-#: src/language/stats/t-test.q:1028 src/language/stats/t-test.q:1318
-msgid "Mean Difference"
+#: src/output/driver.c:343
+#, c-format
+msgid "%s: unknown option \"%s\""
 msgstr ""
 
-#: src/language/stats/t-test.q:1029
-msgid "Std. Error Difference"
+#: src/output/html.c:114
+msgid "PSPP Output"
 msgstr ""
 
-#: src/language/stats/t-test.q:1034 src/language/stats/t-test.q:1210
-#: src/language/stats/t-test.q:1310
-#, c-format
-msgid "%g%% Confidence Interval of the Difference"
-msgstr ""
+#: src/output/journal.c:67
+#, fuzzy, c-format
+msgid "error writing output file \"%s\""
+msgstr "Erro escrevendo em arquivo FLIP: %s."
 
-#: src/language/stats/t-test.q:1090
-msgid "Equal variances assumed"
+#: src/output/measure.c:65
+#, c-format
+msgid "`%s' is not a valid length."
 msgstr ""
 
-#: src/language/stats/t-test.q:1142
-msgid "Equal variances not assumed"
+#: src/output/measure.c:93
+#, c-format
+msgid "syntax error in paper size `%s'"
 msgstr ""
 
-#: src/language/stats/t-test.q:1200
-msgid "Paired Samples Test"
+#: src/output/measure.c:230
+#, c-format
+msgid "unknown paper type `%.*s'"
 msgstr ""
 
-#: src/language/stats/t-test.q:1203
-msgid "Paired Differences"
-msgstr ""
+#: src/output/measure.c:248
+#, fuzzy, c-format
+msgid "error opening input file \"%s\""
+msgstr "lendo arquivo de fonte \"%s\""
 
-#: src/language/stats/t-test.q:1215
-msgid "Std. Error Mean"
-msgstr ""
+#: src/output/measure.c:259
+#, fuzzy, c-format
+msgid "error reading file \"%s\""
+msgstr "Erro lendo arquivo %s: %s."
 
-#: src/language/stats/t-test.q:1299
-msgid "One-Sample Test"
+#: src/output/measure.c:276
+#, c-format
+msgid "paper size file \"%s\" does not state a paper size"
 msgstr ""
 
-#: src/language/stats/t-test.q:1304
+#: src/output/options.c:113
 #, c-format
-msgid "Test Value = %f"
+msgid "%s: \"%s\" is \"%s\" but a Boolean value is required"
 msgstr ""
 
-#: src/language/stats/t-test.q:1422
-msgid "Paired Samples Correlations"
+#: src/output/options.c:188
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but one of the following is required: %s"
 msgstr ""
 
-#: src/language/stats/t-test.q:1426
-msgid "Correlation"
+#: src/output/options.c:232
+#, c-format
+msgid "%s: \"%s\" is \"%s\" but a nonnegative integer is required"
 msgstr ""
 
-#: src/language/stats/t-test.q:1445
+#: src/output/options.c:236
 #, c-format
-msgid "%s & %s"
+msgid "%s: \"%s\" is \"%s\" but a positive integer is required"
 msgstr ""
 
-#: src/language/syntax-file.c:88
+#: src/output/options.c:239
 #, c-format
-msgid "opening \"%s\" as syntax file"
+msgid "%s: \"%s\" is \"%s\" but an integer is required"
 msgstr ""
 
-#: src/language/syntax-file.c:93
+#: src/output/options.c:242
 #, c-format
-msgid "Opening `%s': %s."
+msgid "%s: \"%s\" is \"%s\" but an integer greater than %d is required"
 msgstr ""
 
-#: src/language/syntax-file.c:106
+#: src/output/options.c:247
 #, c-format
-msgid "Reading `%s': %s."
+msgid "%s: \"%s\" is \"%s\"  but an integer between %d and %d is required"
 msgstr ""
 
-#: src/language/syntax-file.c:126
+#: src/output/options.c:326
 #, c-format
-msgid "Closing `%s': %s."
+msgid "%s: \"%s\" is \"%s\" but a file name that contains \"#\" is required."
 msgstr ""
 
-#: src/language/tests/check-model.q:138
-msgid "PATH and SEARCH subcommands are mutually exclusive.  Ignoring PATH."
+#: src/output/tab.c:206
+#, c-format
+msgid "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
 msgstr ""
+"problema na vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) no tamanho da tabela (%d,"
+"%d)\n"
 
-#: src/language/tests/check-model.q:156
-msgid "At least one value must be specified on PATH."
+#: src/output/tab.c:244
+#, fuzzy, c-format
+msgid "bad hline: x=(%d+%d=%d,%d+%d=%d) y=%d+%d=%d in table size (%d,%d)\n"
 msgstr ""
+"problema na vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) no tamanho da tabela (%d,"
+"%d)\n"
 
-#: src/language/tests/check-model.q:167
+#: src/output/tab.c:288
 #, c-format
-msgid "Hash bits adjusted to %d."
+msgid ""
+"bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
 msgstr ""
+"problema na caixa: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) no tamanho da "
+"tabela (%d,%d)\n"
 
-#: src/language/tests/check-model.q:208
-#, c-format
-msgid "error opening \"%s\" for writing"
-msgstr "erro ao abrir \"%s\" para gravação"
+#: src/output/cairo.c:295
+#, fuzzy, c-format
+msgid "error opening output file \"%s\": %s"
+msgstr "Erro ao fechar arquivo portável \"%s\": %s."
 
-#: src/language/tests/float-format.c:124
+#: src/output/cairo.c:312
 #, c-format
-msgid "%zu-byte string needed but %zu-byte string supplied."
+msgid ""
+"The defined page is not wide enough to hold at least %d characters in the "
+"default font.  In fact, there's only room for %d characters."
 msgstr ""
 
-#: src/language/tests/float-format.c:136
-msgid "Hexadecimal floating constant too long."
+#: src/output/cairo.c:322
+#, c-format
+msgid ""
+"The defined page is not long enough to hold margins and headers, plus least %"
+"d lines of the default fonts.  In fact, there's only room for %d lines."
 msgstr ""
 
-#: src/language/tests/float-format.c:201
+#: src/output/cairo.c:376
 #, c-format
-msgid "%s conversion of %s from %s to %s should have produced %s but actually produced %s."
+msgid "error drawing output for %s driver: %s"
 msgstr ""
 
-#: src/language/tests/float-format.c:247
-msgid "Too many values in single command."
-msgstr "Muitos valores em um único comando."
+#: src/output/cairo.c:864
+#, c-format
+msgid "\"%s\": bad font specification"
+msgstr "\"%s\": especificação de fonte inválida"
 
-#: src/language/tests/moments-test.c:47
-msgid "expecting weight value"
-msgstr "esperando valor de ponderação"
+#: src/output/cairo.c:1084
+#, fuzzy, c-format
+msgid "error writing output file \"%s\": %s"
+msgstr "Erro escrevendo em arquivo FLIP: %s."
 
-#: src/language/utilities/cd.c:41
+#: src/output/charts/np-plot-cairo.c:37
 #, c-format
-msgid "Cannot change directory to %s:  %s "
-msgstr "Não é possível mudar diretório para %s: %s"
-
-#: src/language/utilities/date.c:32
-msgid "Only USE ALL is currently implemented."
+msgid "Normal Q-Q Plot of %s"
 msgstr ""
 
-#: src/language/utilities/include.c:93
-msgid "Expecting BATCH or INTERACTIVE after SYNTAX."
+#: src/output/charts/np-plot-cairo.c:38 src/output/charts/np-plot-cairo.c:66
+msgid "Observed Value"
 msgstr ""
 
-#: src/language/utilities/include.c:110
-msgid "Expecting YES or NO after CD."
+#: src/output/charts/np-plot-cairo.c:39
+msgid "Expected Normal"
 msgstr ""
 
-#: src/language/utilities/include.c:127
-msgid "Expecting CONTINUE or STOP after ERROR."
+#: src/output/charts/np-plot-cairo.c:64
+#, c-format
+msgid "Detrended Normal Q-Q Plot of %s"
 msgstr ""
 
-#: src/language/utilities/include.c:134
-#, c-format
-msgid "Unexpected token: `%s'."
+#: src/output/charts/np-plot-cairo.c:67
+msgid "Dev from Normal"
 msgstr ""
 
-#: src/language/utilities/include.c:179
-msgid "expecting file name"
+#: src/output/charts/plot-hist-cairo.c:110
+msgid "HISTOGRAM"
 msgstr ""
 
-#: src/language/utilities/include.c:191
-#, c-format
-msgid "Can't find `%s' in include file search path."
+#: src/output/charts/plot-hist-cairo.c:112
+#: src/language/stats/frequencies.q:814
+msgid "Frequency"
+msgstr "Frequência"
+
+#: src/output/charts/roc-chart-cairo.c:36 src/ui/gui/roc.ui:7
+msgid "ROC Curve"
 msgstr ""
 
-#: src/language/utilities/include.c:199
-#, c-format
-msgid "Unable to open `%s': %s."
+#: src/output/charts/scree-cairo.c:36
+msgid "Scree Plot"
 msgstr ""
 
-#: src/language/utilities/permissions.c:73
-#, c-format
-msgid "Expecting %s or %s."
+#: src/output/charts/scree-cairo.c:38
+msgid "Eigenvalue"
 msgstr ""
 
-#: src/language/utilities/permissions.c:106
-#, c-format
-msgid "Cannot stat %s: %s"
+#: src/output/odt.c:93
+#, fuzzy
+msgid "error creating temporary file"
+msgstr "lendo arquivo temporário."
+
+#: src/ui/source-init-opts.c:78
+msgid "Algorithm must be either \"compatible\" or \"enhanced\"."
 msgstr ""
 
-#: src/language/utilities/permissions.c:119
-#, c-format
-msgid "Cannot change mode of %s: %s"
+#: src/ui/source-init-opts.c:103
+msgid "Syntax must be either \"compatible\" or \"enhanced\"."
 msgstr ""
 
-#: src/language/utilities/set.q:200
-msgid "WORKSPACE must be at least 1MB"
+#: src/ui/terminal/main.c:128
+msgid ""
+"Stopping syntax file processing here to avoid a cascade of dependent command "
+"failures."
 msgstr ""
+"Interrompendo processamento do arquivo de sintaxe para evitar falha uma "
+"cascata de falhas de comandos."
 
-#: src/language/utilities/set.q:206 src/language/utilities/set.q:208
-#: src/language/utilities/set.q:210 src/language/utilities/set.q:212
-#: src/language/utilities/set.q:214 src/language/utilities/set.q:216
-#: src/language/utilities/set.q:218 src/language/utilities/set.q:220
-#: src/language/utilities/set.q:222
+#: src/ui/terminal/msg-ui.c:127
 #, c-format
-msgid "%s is obsolete."
-msgstr "%s é obsoleto."
+msgid "Notes (%d) exceed limit (%d).  Suppressing further notes."
+msgstr ""
 
-#: src/language/utilities/set.q:225
+#: src/ui/terminal/msg-ui.c:135
 #, c-format
-msgid "%s is not implemented."
-msgstr "%s não está implementado."
-
-#: src/language/utilities/set.q:228
-msgid "Active file compression is not implemented."
-msgstr "Compressão de arquivo ativo não está implementado."
-
-#: src/language/utilities/set.q:323
-msgid "EPOCH must be 1500 or later."
-msgstr ""
-
-#: src/language/utilities/set.q:330
-msgid "expecting AUTOMATIC or year"
-msgstr "esperando AUTOMATIC ou ano"
-
-#: src/language/utilities/set.q:351
-msgid "LENGTH must be at least 1."
-msgstr "LENGTH deve ser pelo menos 1."
+msgid "Warnings (%d) exceed limit (%d)."
+msgstr "(%d) avisos excederam o limite (%d)."
 
-#: src/language/utilities/set.q:395
-msgid "WIDTH must be at least 40."
-msgstr "WIDTH deve ser pelo menos 40."
+#: src/ui/terminal/msg-ui.c:138
+#, fuzzy, c-format
+msgid "Errors (%d) exceed limit (%d)."
+msgstr "(%d) erros excederam o limite (%d)."
 
-#: src/language/utilities/set.q:418
+#: src/ui/terminal/terminal.c:72
 #, c-format
-msgid "FORMAT requires numeric output format as an argument.  Specified format %s is of type string."
-msgstr ""
+msgid "could not access definition for terminal `%s'"
+msgstr "não foi possível acessar definição para o terminal '%s'"
 
-#: src/language/utilities/set.q:485
-msgid "BLANKS is SYSMIS."
+#: src/ui/terminal/terminal-opts.c:119
+#, c-format
+msgid "%s: output option missing `='"
 msgstr ""
 
-#: src/language/utilities/set.q:487
+#: src/ui/terminal/terminal-opts.c:126
 #, c-format
-msgid "BLANKS is %g."
+msgid "%s: output option specified more than once"
 msgstr ""
 
-#: src/language/utilities/set.q:522
-#, c-format
-msgid "%s is \"%s\"."
-msgstr "%s é \"%s\"."
+#: src/ui/gui/checkbox-treeview.c:92 src/language/stats/crosstabs.q:1213
+#: src/language/stats/crosstabs.q:1240 src/language/stats/crosstabs.q:1263
+#: src/language/stats/crosstabs.q:1287 src/language/stats/examine.q:1638
+msgid "Statistic"
+msgstr "Estatística"
 
-#: src/language/utilities/set.q:558
+#: src/ui/gui/comments-dialog.c:58
 #, c-format
-msgid "DECIMAL is \"%c\"."
-msgstr ""
+msgid "Column Number: %d"
+msgstr "Número da coluna: %d"
 
-#: src/language/utilities/set.q:564
-#, c-format
-msgid "ENDCMD is \"%c\"."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:41
+msgid "Chisq"
+msgstr "Chisq"
 
-#: src/language/utilities/set.q:572
-#, c-format
-msgid "ERRORS is \"%s\"."
+#: src/ui/gui/crosstabs-dialog.c:42 src/language/stats/crosstabs.q:1774
+msgid "Phi"
 msgstr ""
 
-#: src/language/utilities/set.q:583
-#, c-format
-msgid "FORMAT is %s."
-msgstr "FORMAT é %s."
+#: src/ui/gui/crosstabs-dialog.c:43
+msgid "CC"
+msgstr "CC"
 
-#: src/language/utilities/set.q:589
-#, c-format
-msgid "LENGTH is %d."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:44 src/language/stats/crosstabs.q:1912
+msgid "Lambda"
+msgstr "Lambda"
 
-#: src/language/utilities/set.q:595
-#, c-format
-msgid "MXERRS is %d."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:45
+msgid "UC"
+msgstr "UC"
 
-#: src/language/utilities/set.q:601
-#, c-format
-msgid "MXLOOPS is %d."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:46
+msgid "BTau"
+msgstr "BTau"
 
-#: src/language/utilities/set.q:607
-#, c-format
-msgid "MXWARNS is %d."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:47
+msgid "CTau"
+msgstr "CTau"
 
-#: src/language/utilities/set.q:614 src/language/utilities/set.q:665
-#, c-format
-msgid "%s is %s (%s)."
-msgstr "%s é %s (%s)."
+#: src/ui/gui/crosstabs-dialog.c:48
+msgid "Risk"
+msgstr "Risk"
 
-#: src/language/utilities/set.q:686
-msgid "SCOMPRESSION is ON."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:49 src/language/stats/crosstabs.q:1779
+msgid "Gamma"
+msgstr "Gamma"
 
-#: src/language/utilities/set.q:688
-msgid "SCOMPRESSION is OFF."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:50
+msgid "D"
+msgstr "D"
 
-#: src/language/utilities/set.q:695
-msgid "UNDEFINED is WARN."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:51 src/language/stats/crosstabs.q:1782
+msgid "Kappa"
+msgstr "Kappa"
 
-#: src/language/utilities/set.q:697
-msgid "UNDEFINED is NOWARN."
+#: src/ui/gui/crosstabs-dialog.c:52 src/language/stats/crosstabs.q:1916
+msgid "Eta"
 msgstr ""
 
-#: src/language/utilities/set.q:705
-msgid "WEIGHT is off."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:53
+msgid "Corr"
+msgstr "Corr"
 
-#: src/language/utilities/set.q:707
-#, c-format
-msgid "WEIGHT is variable %s."
-msgstr "WEIGHT é a variável %s."
+#: src/ui/gui/crosstabs-dialog.c:54 src/ui/gui/crosstabs-dialog.c:65
+#: src/ui/gui/crosstabs-dialog.c:100 src/ui/gui/crosstabs-dialog.c:108
+#: src/ui/gui/psppire-var-store.c:612 src/ui/gui/var-display.c:16
+#: src/ui/gui/variable-info-dialog.c:41
+msgid "None"
+msgstr "Nenhum"
 
-#: src/language/utilities/set.q:725
-#, c-format
-msgid "WIDTH is %d."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:57
+msgid "Count"
+msgstr "Contagem"
 
-#: src/language/utilities/title.c:68
-#, c-format
-msgid "%s: `.' expected after string."
-msgstr "%s: '.' esperado após string."
+#: src/ui/gui/crosstabs-dialog.c:58
+msgid "Row"
+msgstr "Linha"
 
-#: src/language/utilities/title.c:108
-#, c-format
-msgid "   (Entered %s)"
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:59
+msgid "Column"
+msgstr "Coluna"
 
-#: src/language/xforms/compute.c:146 src/language/xforms/compute.c:194
-#, c-format
-msgid "When executing COMPUTE: SYSMIS is not a valid value as an index into vector %s."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:61
+msgid "Expected"
+msgstr "Esperado"
 
-#: src/language/xforms/compute.c:150 src/language/xforms/compute.c:201
-#, c-format
-msgid "When executing COMPUTE: %g is not a valid value as an index into vector %s."
-msgstr ""
+#: src/ui/gui/crosstabs-dialog.c:63
+msgid "Std. Residual"
+msgstr "Resíduo padrão"
 
-#: src/language/xforms/compute.c:344
-#, c-format
-msgid "There is no vector named %s."
-msgstr "Não existe vetor de nome %s."
+#: src/ui/gui/crosstabs-dialog.c:64
+msgid "Adjusted Std. Residual"
+msgstr "Resíduo padrão ajustado"
 
-#: src/language/xforms/count.c:123
-msgid "Destination cannot be a string variable."
-msgstr "Destino não pode ser uma variável string."
+#: src/ui/gui/descriptives-dialog.c:41 src/ui/gui/frequencies-dialog.c:42
+msgid "Standard deviation"
+msgstr "Desvio padrão"
 
-#: src/language/xforms/recode.c:246
-msgid "Inconsistent target variable types.  Target variables must be all numeric or all string."
-msgstr ""
+#: src/ui/gui/descriptives-dialog.c:46
+msgid "Standard error"
+msgstr "Erro padrão"
 
-#: src/language/xforms/recode.c:267
-msgid "CONVERT requires string input values and numeric output values."
+#: src/ui/gui/find-dialog.c:649
+#, c-format
+msgid "Bad regular expression: %s"
+msgstr "Expressão regular mal formada: %s"
+
+#: src/ui/gui/factor-dialog.c:344
+#, c-format
+msgid "Eigenvalues over %4.2f times the mean eigenvalue"
 msgstr ""
 
-#: src/language/xforms/recode.c:317
-msgid "THRU is not allowed with string variables."
-msgstr "THRU não é permitido com variáveis string."
+#: src/ui/gui/frequencies-dialog.c:45
+msgid "Standard error of the mean"
+msgstr "Erro padrão da média"
 
-#: src/language/xforms/recode.c:391
-msgid "expecting output value"
-msgstr ""
+#: src/ui/gui/frequencies-dialog.c:48
+msgid "Standard error of the skewness"
+msgstr "Erro padrão do skewness"
 
-#: src/language/xforms/recode.c:440
-#, c-format
-msgid "%zu variable(s) cannot be recoded into %zu variable(s).  Specify the same number of variables as source and target variables."
+#: src/ui/gui/frequencies-dialog.c:50 src/language/stats/frequencies.q:108
+msgid "Mode"
 msgstr ""
 
-#: src/language/xforms/recode.c:455
-#, c-format
-msgid "There is no variable named %s.  (All string variables specified on INTO must already exist.  Use the STRING command to create a string variable.)"
-msgstr "Não existe variável de nome %s. (Todas as variáveis strings especificadas em INTO devem existir previamente.  Use o comando STRING para criar uma variável string.)"
+#: src/ui/gui/frequencies-dialog.c:52
+msgid "Standard error of the kurtosis"
+msgstr "Erro padrão do kurtosis"
 
-#: src/language/xforms/recode.c:470
-#, c-format
-msgid "INTO is required with %s input values and %s output values."
+#: src/ui/gui/frequencies-dialog.c:53 src/language/stats/examine.q:1469
+#: src/language/stats/frequencies.q:107
+msgid "Median"
 msgstr ""
 
-#: src/language/xforms/recode.c:483
-#, c-format
-msgid "Type mismatch.  Cannot store %s data in %s variable %s."
+#: src/ui/gui/helper.c:197
+msgid "Sorry. The help system hasn't yet been implemented."
+msgstr "Desculpe. O sistema de ajuda ainda não foi implementado."
+
+#: src/ui/gui/help-menu.c:67
+msgid "A program for the analysis of sampled data"
 msgstr ""
 
-#: src/language/xforms/sample.c:76
-msgid "The sampling factor must be between 0 and 1 exclusive."
+#. TRANSLATORS: Use this string to list the people who have helped with
+#. translation to your language.
+#: src/ui/gui/help-menu.c:77
+msgid "translator-credits"
 msgstr ""
 
-#: src/language/xforms/sample.c:96
+#: src/ui/gui/help-menu.c:98
 #, c-format
-msgid "Cannot sample %d observations from a population of %d."
+msgid ""
+"Cannot open reference manual: %s.  The PSPP user manual is also available at "
+"http://www.gnu.org/software/pspp/documentation.html"
 msgstr ""
 
-#: src/language/xforms/select-if.c:100
-msgid "Syntax error expecting OFF or BY.  Turning off case filtering."
-msgstr ""
+#: src/ui/gui/help-menu.c:117
+msgid "_Help"
+msgstr "A_juda"
 
-#: src/language/xforms/select-if.c:115
-msgid "The filter variable must be numeric."
-msgstr ""
+#: src/ui/gui/help-menu.c:124
+msgid "_Reference Manual"
+msgstr "_Manual de Referência"
 
-#: src/language/xforms/select-if.c:121
-msgid "The filter variable may not be scratch."
-msgstr ""
+#: src/ui/gui/missing-val-dialog.c:113 src/ui/gui/missing-val-dialog.c:167
+msgid "Incorrect value for variable type"
+msgstr "Valor incorreto para tipo de variável"
 
-#: src/libpspp/hash.c:614
+#: src/ui/gui/missing-val-dialog.c:134 src/ui/gui/missing-val-dialog.c:143
+msgid "Incorrect range specification"
+msgstr "Especificação incorreta de intervalo"
+
+#: src/ui/gui/oneway-anova-dialog.c:313
 #, c-format
-msgid "hash table:"
-msgstr "tabela hash:"
+msgid "Contrast %d of %d"
+msgstr "Contraste %d de %d"
 
-#: src/math/percentiles.c:41
-msgid "HAverage"
-msgstr ""
+#: src/ui/gui/psppire.c:224
+msgid "_Reset"
+msgstr "_Reiniciar"
 
-#: src/math/percentiles.c:42
-msgid "Weighted Average"
-msgstr "Média ponderada"
+#: src/ui/gui/psppire.c:225
+msgid "_Select"
+msgstr "_Selecionar"
 
-#: src/math/percentiles.c:43
-msgid "Rounded"
-msgstr ""
+#: src/ui/gui/psppire-data-editor.c:951
+msgid "Data View"
+msgstr "Visualização de dados"
 
-#: src/math/percentiles.c:44
-msgid "Empirical"
-msgstr ""
+#: src/ui/gui/psppire-data-editor.c:954
+msgid "Variable View"
+msgstr "Visualização de variáveis"
 
-#: src/math/percentiles.c:45
-msgid "Empirical with averaging"
-msgstr ""
+#: src/ui/gui/psppire-data-store.c:744
+msgid "var"
+msgstr "var"
 
-#: src/output/afm.c:149
-#, c-format
-msgid "opening font metrics file \"%s\""
-msgstr ""
+#: src/ui/gui/psppire-data-window.c:212
+msgid "Transformations Pending"
+msgstr "Transformação Pendente"
 
-#: src/output/afm.c:239
-msgid "first line must be StartFontMetrics"
-msgstr ""
+#: src/ui/gui/psppire-data-window.c:228
+msgid "Filter off"
+msgstr "Sem Filtro"
 
-#: src/output/afm.c:266
+#: src/ui/gui/psppire-data-window.c:242
 #, c-format
-msgid "unsupported MappingScheme %d"
-msgstr ""
+msgid "Filter by %s"
+msgstr "Filtrar por %s"
 
-#: src/output/afm.c:287
-msgid "required FontName is missing"
-msgstr ""
+#: src/ui/gui/psppire-data-window.c:263
+msgid "No Split"
+msgstr "Sem divisão"
 
-#: src/output/afm.c:394
-msgid "CharMetrics line must start with C or CH"
-msgstr ""
+#: src/ui/gui/psppire-data-window.c:272
+msgid "Split by "
+msgstr "Dividido por "
+
+#: src/ui/gui/psppire-data-window.c:300
+msgid "Weights off"
+msgstr "Sem ponderação"
 
-#: src/output/afm.c:535
+#: src/ui/gui/psppire-data-window.c:314
 #, c-format
-msgid "reference to unknown character \"%s\""
-msgstr ""
+msgid "Weight by %s"
+msgstr "Ponderar por %s"
 
-#: src/output/afm.c:593
-msgid "expected end of file"
-msgstr "fim de arquivo esperado"
+#: src/ui/gui/psppire-data-window.c:382
+msgid "Open"
+msgstr "Abrir"
 
-#: src/output/afm.c:605
-msgid "syntax error expecting end of line"
+#: src/ui/gui/psppire-data-window.c:392
+msgid "Data and Syntax Files"
 msgstr ""
 
-#: src/output/afm.c:623 src/output/afm.c:660
-msgid "number out of valid range"
-msgstr "número fora do intervalo válido"
+#: src/ui/gui/psppire-data-window.c:402 src/ui/gui/psppire-data-window.c:611
+msgid "System Files (*.sav)"
+msgstr "Arquivo de Sistema (*.sav)"
 
-#: src/output/afm.c:625 src/output/afm.c:662
-msgid "invalid numeric syntax"
-msgstr "sintaxe numérica inválida"
+#: src/ui/gui/psppire-data-window.c:408 src/ui/gui/psppire-data-window.c:617
+msgid "Portable Files (*.por) "
+msgstr "Arquivo Portável (*.por) "
 
-#: src/output/afm.c:641
-msgid "syntax error expecting integer"
-msgstr "erro de sintaxe esperando inteiro"
+#: src/ui/gui/psppire-data-window.c:414 src/ui/gui/psppire-syntax-window.c:292
+msgid "Syntax Files (*.sps) "
+msgstr "Arquivo de Sintaxe (*.sps) "
 
-#: src/output/afm.c:679
-msgid "syntax error expecting number"
-msgstr "erro de sintaxe esperando número"
+#: src/ui/gui/psppire-data-window.c:420 src/ui/gui/psppire-data-window.c:623
+#: src/ui/gui/psppire-syntax-window.c:298
+msgid "All Files"
+msgstr "Todos os Arquivos"
 
-#: src/output/afm.c:692
-msgid "syntax error in hex constant"
-msgstr "erro de sintaxe em constante hexa"
+#: src/ui/gui/psppire-data-window.c:603
+msgid "Save"
+msgstr "Salvar"
 
-#: src/output/afm.c:707
-msgid "syntax error expecting hex constant"
-msgstr "erro de sintaxe esperando constante hexa"
+#: src/ui/gui/psppire-data-window.c:636
+msgid "Portable File"
+msgstr "Arquivo portátil"
 
-#: src/output/afm.c:745
-msgid "unexpected end of line"
-msgstr "fim de linha inesperado"
+#: src/ui/gui/psppire-data-window.c:773
+msgid "Font Selection"
+msgstr "Seleção de fonte"
 
-#: src/output/afm.c:795
-msgid "unexpected end of line expecting string"
-msgstr "fim de linha inesperado esperando string"
+#: src/ui/gui/psppire-data-window.c:1261
+#, fuzzy
+msgid "Data Editor"
+msgstr "%s --- Editor de Dados do PSPP"
 
-#: src/output/ascii.c:251
-#, c-format
-msgid "ascii: page excluding margins and headers must be at least 59 characters wide by 15 lines long, but as configured is only %d characters by %d lines"
+#: src/ui/gui/psppire-output-window.c:458
+msgid "Export Output"
 msgstr ""
 
-#: src/output/ascii.c:329
-#, c-format
-msgid "ascii: bad index value for `box' key: syntax is box[INDEX], 0 <= INDEX < %d decimal, with INDEX expressed in base 4"
-msgstr ""
+#: src/ui/gui/psppire-output-window.c:466
+#, fuzzy
+msgid "PDF Files (*.pdf)"
+msgstr "Arquivo Portável (*.por) "
 
-#: src/output/ascii.c:336
-#, c-format
-msgid "ascii: multiple values for %s"
+#: src/ui/gui/psppire-output-window.c:467
+msgid "HTML Files (*.html)"
 msgstr ""
 
-#: src/output/ascii.c:344
-#, c-format
-msgid "ascii: unknown parameter `%s'"
+#: src/ui/gui/psppire-output-window.c:468
+msgid "OpenDocument Files (*.odt)"
 msgstr ""
 
-#: src/output/ascii.c:360
-#, c-format
-msgid "ascii: only screen devices may have `auto' length or width"
-msgstr ""
+#: src/ui/gui/psppire-output-window.c:469
+#, fuzzy
+msgid "Text Files (*.txt)"
+msgstr "Arquivo de Sistema (*.sav)"
 
-#: src/output/ascii.c:374
-#, c-format
-msgid "ascii: positive integer required as `%s' value"
-msgstr ""
+#: src/ui/gui/psppire-output-window.c:470
+#, fuzzy
+msgid "PostScript Files (*.ps)"
+msgstr "Arquivo Portável (*.por) "
 
-#: src/output/ascii.c:402
-#, c-format
-msgid "ascii: `emphasis' value must be `bold', `underline', or `none'"
+#: src/ui/gui/psppire-output-window.c:471
+msgid "Comma-Separated Value Files (*.csv)"
 msgstr ""
 
-#: src/output/ascii.c:415
-#, c-format
-msgid "ascii: zero or positive integer required as `%s' value"
-msgstr ""
+#: src/ui/gui/psppire-output-window.c:605
+#, fuzzy
+msgid "Output Viewer"
+msgstr "Variável de Saída"
 
-#: src/output/ascii.c:446
-#, c-format
-msgid "ascii: boolean value expected for `%s'"
-msgstr ""
+#: src/ui/gui/psppire-syntax-window.c:265
+#, fuzzy, c-format
+msgid "Saved file \"%s\""
+msgstr "lendo arquivo de fonte \"%s\""
 
-#: src/output/ascii.c:478 src/output/html.c:187
-#, c-format
-msgid "`chart-files' value must contain `#'"
-msgstr ""
+#: src/ui/gui/psppire-syntax-window.c:284
+msgid "Save Syntax"
+msgstr "Salvar Sintaxe"
 
-#: src/output/ascii.c:524
-#, c-format
-msgid "ascii: opening output file \"%s\""
-msgstr ""
+#: src/ui/gui/psppire-syntax-window.c:496
+#, fuzzy
+msgid "Syntax Editor"
+msgstr "Editor de Sintaxe do PSPP"
 
-#: src/output/ascii.c:587
-#, c-format
-msgid "ascii: bad line (%d,%d)-(%d,%d) out of (%d,%d)\n"
-msgstr ""
+#: src/ui/gui/psppire-syntax-window.c:510
+#, fuzzy, c-format
+msgid "Cannot load syntax file '%s'"
+msgstr "impossível abrir arquivo de fonte \"%s\""
+
+#: src/ui/gui/psppire-var-sheet.c:535 src/ui/gui/psppire-var-store.c:833
+#: src/language/stats/crosstabs.q:1288 src/ui/gui/psppire.ui:2055
+msgid "Type"
+msgstr "Tipo"
+
+#: src/ui/gui/psppire-var-sheet.c:536 src/ui/gui/psppire-var-store.c:834
+#: src/ui/gui/psppire.ui:1974
+msgid "Width"
+msgstr "Tamanho"
+
+#: src/ui/gui/psppire-var-sheet.c:537 src/ui/gui/psppire-var-store.c:835
+msgid "Decimals"
+msgstr "Decimais"
+
+#: src/ui/gui/psppire-var-sheet.c:539 src/ui/gui/psppire-var-store.c:837
+msgid "Values"
+msgstr "Valores"
+
+#: src/ui/gui/psppire-var-sheet.c:540 src/ui/gui/psppire-var-store.c:838
+#: src/language/stats/crosstabs.q:822 src/language/stats/examine.q:1104
+#: src/language/stats/frequencies.q:864 src/language/stats/frequencies.q:1036
+msgid "Missing"
+msgstr "Missing"
+
+#: src/ui/gui/psppire-var-sheet.c:542 src/ui/gui/psppire-var-store.c:840
+msgid "Align"
+msgstr "Alinhamento"
+
+#: src/ui/gui/psppire-var-sheet.c:543 src/ui/gui/psppire-var-store.c:841
+msgid "Measure"
+msgstr "Medida"
+
+#: src/ui/gui/psppire-var-store.c:622 src/ui/gui/var-sheet-dialogs.ui:43
+msgid "Comma"
+msgstr "Vírgula"
+
+#: src/ui/gui/psppire-var-store.c:623 src/ui/gui/var-sheet-dialogs.ui:59
+msgid "Dot"
+msgstr "Ponto"
+
+#: src/ui/gui/psppire-var-store.c:624
+msgid "Scientific"
+msgstr "Científica"
+
+#: src/ui/gui/psppire-var-store.c:625 src/ui/gui/var-sheet-dialogs.ui:91
+msgid "Date"
+msgstr "Data"
+
+#: src/ui/gui/psppire-var-store.c:626 src/ui/gui/var-sheet-dialogs.ui:107
+msgid "Dollar"
+msgstr "Moeda"
+
+#: src/ui/gui/psppire-var-store.c:627
+msgid "Custom"
+msgstr "Personalizado"
 
-#: src/output/ascii.c:809 src/output/postscript.c:826
+#: src/ui/gui/psppire-window.c:97
 #, c-format
-msgid "%s - Page %d"
+msgid "%s %s PSPPIRE %s"
 msgstr ""
 
-#: src/output/ascii.c:861
+#: src/ui/gui/psppire-window.c:468
 #, c-format
-msgid "ascii: closing output file \"%s\""
+msgid "Save the changes to \"%s\" before closing?"
 msgstr ""
 
-#: src/output/chart.c:145
+#: src/ui/gui/psppire-window.c:475
 #, c-format
-msgid "creating \"%s\""
+msgid ""
+"If you don't save, changes from the last %ld seconds will be permanently "
+"lost."
 msgstr ""
 
-#: src/output/charts/plot-hist.c:123
-msgid "HISTOGRAM"
-msgstr ""
+#: src/ui/gui/psppire-window.c:479
+#, fuzzy
+msgid "Close _without saving"
+msgstr "%s sem %s."
 
-#: src/output/html.c:71
-#, c-format
-msgid "opening HTML output file: %s"
-msgstr ""
+#: src/ui/gui/recode-dialog.c:911
+msgid "Recode into Different Variables"
+msgstr "Transformar para Variáveis Diferentes"
 
-#: src/output/html.c:82
-msgid "PSPP Output"
+#: src/ui/gui/recode-dialog.c:914 src/ui/gui/recode.ui:692
+msgid "Recode into Same Variables"
+msgstr "Transformar para a Mesma Variável"
+
+#: src/ui/gui/recode-dialog.c:929 src/ui/gui/recode-dialog.c:1025
+msgid "New"
+msgstr "Novo"
+
+#: src/ui/gui/recode-dialog.c:944 src/ui/gui/recode-dialog.c:1017
+msgid "Old"
+msgstr "Antigo"
+
+#: src/ui/gui/recode-dialog.c:1274
+msgid "Recode into Different Variables: Old and New Values "
+msgstr "Transformar Para Diferentes Variáveis: Antigos e Novos Valores "
+
+#: src/ui/gui/recode-dialog.c:1275
+msgid "Recode into Same Variables: Old and New Values"
+msgstr "Transformar Para a Mesma Variável: Antigos e Novos Valores"
+
+#: src/ui/gui/regression-dialog.c:42
+msgid "Coeff"
+msgstr "Coeff"
+
+#: src/ui/gui/regression-dialog.c:43 src/language/stats/regression.q:155
+msgid "R"
 msgstr ""
 
-#: src/output/html.c:170
+#: src/ui/gui/regression-dialog.c:44
+msgid "Anova"
+msgstr "Anova"
+
+#: src/ui/gui/regression-dialog.c:45
+msgid "Bcov"
+msgstr "Bcov"
+
+#: src/ui/gui/select-cases-dialog.c:82
 #, c-format
-msgid "unknown configuration parameter `%s' for HTML device driver"
-msgstr ""
+msgid "Approximately %3d%% of all cases."
+msgstr "Aproximadamente %3d%% de todos os casos."
 
-#: src/output/journal.c:69
+#: src/ui/gui/select-cases-dialog.c:83
 #, c-format
-msgid "error writing \"%s\""
-msgstr ""
+msgid "Exactly %3d cases from the first %3d cases."
+msgstr "Exatamente %3d casos dos primeiros %3d casos."
 
-#: src/output/journal.c:94
+#: src/ui/gui/select-cases-dialog.c:223
 #, c-format
-msgid "error creating \"%s\""
-msgstr ""
+msgid "%d thru %d"
+msgstr "%d até %d"
 
-#: src/output/output.c:168
+#: src/ui/gui/text-data-import-dialog.c:461
 #, c-format
-msgid "unknown output driver `%s'"
-msgstr ""
+msgid "Could not open \"%s\": %s"
+msgstr "Impossível abrir \"%s\": %s"
 
-#: src/output/output.c:170
+#: src/ui/gui/text-data-import-dialog.c:477
 #, c-format
-msgid "output driver `%s' referenced but never defined"
-msgstr ""
+msgid "Error reading \"%s\": %s"
+msgstr "Erro lendo \"%s\": %s"
 
-#: src/output/output.c:261
+#: src/ui/gui/text-data-import-dialog.c:480
 #, c-format
-msgid "using default output driver configuration"
+msgid ""
+"Failed to read \"%s\", because it contains a line over %d bytes long and "
+"therefore appears not to be a text file."
 msgstr ""
+"Falha ao ler \"%s\", porque ele contém uma linha com mais de %d bytes d"
 
-#: src/output/output.c:290
+#: src/ui/gui/text-data-import-dialog.c:494
 #, c-format
-msgid "cannot find output initialization file (use `-vv' to view search path)"
+msgid "\"%s\" is empty."
+msgstr "\"%s\" está vazio."
+
+#: src/ui/gui/text-data-import-dialog.c:539
+msgid "Import Delimited Text Data"
+msgstr "Importar Dados Textuais Delimitados"
+
+#: src/ui/gui/text-data-import-dialog.c:590
+msgid "Importing Delimited Text Data"
+msgstr "Importando dados textuais delimitados"
+
+#: src/ui/gui/text-data-import-dialog.c:749
+msgid ""
+"This assistant will guide you through the process of importing data into "
+"PSPP from a text file with one line per case,  in which fields are separated "
+"by tabs, commas, or other delimiters.\n"
+"\n"
 msgstr ""
+"Este assistente irá acompanhá-lo durante o processo de importar dados para o "
+"PSPP de um arquivo de texto com um caso por linha, no qual campos são "
+"separados por tabulações, vírgulas ou outros delimitadores.\n"
 
-#: src/output/output.c:298
+#: src/ui/gui/text-data-import-dialog.c:755
 #, c-format
-msgid "cannot open \"%s\""
-msgstr ""
+msgid "The selected file contains %zu line of text.  "
+msgid_plural "The selected file contains %zu lines of text.  "
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/output/output.c:310
+#: src/ui/gui/text-data-import-dialog.c:763
 #, c-format
-msgid "reading \"%s\""
-msgstr ""
+msgid "The selected file contains approximately %lu line of text.  "
+msgid_plural "The selected file contains approximately %lu lines of text.  "
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/output/output.c:332 src/ui/gui/message-dialog.c:97
+#: src/ui/gui/text-data-import-dialog.c:769
 #, c-format
-msgid "syntax error"
+msgid ""
+"Only the first %zu line of the file will be shown for preview purposes in "
+"the following screens.  "
+msgid_plural ""
+"Only the first %zu lines of the file will be shown for preview purposes in "
+"the following screens.  "
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/ui/gui/text-data-import-dialog.c:776
+msgid "You may choose below how much of the file should actually be imported."
 msgstr ""
+"Você pode escolher abaixo quanto do arquivo será efetivamente importado."
 
-#: src/output/output.c:341
-#, c-format
-msgid "error closing \"%s\""
+#: src/ui/gui/text-data-import-dialog.c:1523
+#: src/ui/gui/text-data-import-dialog.c:1768
+msgid "This input line has too few separators to fill in this field."
 msgstr ""
+"Esta linha de entrada tem poucos separadores para preencher este campo."
 
-#: src/output/output.c:349
+#: src/ui/gui/text-data-import-dialog.c:1759
 #, c-format
-msgid "no active output drivers"
-msgstr ""
+msgid "Field content \"%.*s\" cannot be parsed in format %s."
+msgstr "Campo contendo \"%.*s\" não pode ser analisado no formato %s."
 
-#: src/output/output.c:352
+#: src/ui/gui/t-test-options.c:60
 #, c-format
-msgid "error reading device definition file"
-msgstr ""
+msgid "Confidence Interval: %2d %%"
+msgstr "Intervalo de confiança: %2d %%"
 
-#: src/output/output.c:470
+#: src/ui/gui/variable-info-dialog.c:77
 #, c-format
-msgid ""
-"Driver classes:\n"
-"\t"
-msgstr ""
+msgid "Label: %s\n"
+msgstr "Rótulo: %s\n"
 
-#: src/output/output.c:502
+#: src/ui/gui/variable-info-dialog.c:84
 #, c-format
-msgid "syntax error parsing options for \"%s\" driver"
-msgstr ""
+msgid "Type: %s\n"
+msgstr "Tipo: %s\n"
 
-#: src/output/output.c:518
+#: src/ui/gui/variable-info-dialog.c:88
 #, c-format
-msgid "reached end of options inside quoted string parsing options for \"%s\" driver"
-msgstr ""
+msgid "Missing Values: %s\n"
+msgstr "Valores missing: %s\n"
 
-#: src/output/output.c:588
+#: src/ui/gui/variable-info-dialog.c:93
 #, c-format
-msgid "syntax error in string constant parsing options for \"%s\" driver"
-msgstr ""
+msgid "Measurement Level: %s\n"
+msgstr "Nível de medida: %s\n"
+
+#: src/ui/gui/variable-info-dialog.c:106
+msgid "Value Labels:\n"
+msgstr "Rótulos de valores:\n"
 
-#: src/output/output.c:636
+#: src/ui/gui/variable-info-dialog.c:116
 #, c-format
-msgid "syntax error expecting `=' parsing options for driver \"%s\""
+msgid "%s %s\n"
 msgstr ""
 
-#: src/output/output.c:687
+#: src/ui/gui/weight-cases-dialog.c:81 src/ui/gui/psppire.ui:52
+#: src/ui/gui/psppire.ui:155
+msgid "Do not weight cases"
+msgstr "Não ponderar casos"
+
+#: src/ui/gui/weight-cases-dialog.c:87
 #, c-format
-msgid "unknown output driver class `%.*s'"
-msgstr ""
+msgid "Weight cases by %s"
+msgstr "Pesar casos por %s"
+
+#: tests/dissect-sysfile.c:571
+#, fuzzy, c-format
+msgid "Unrecognized record type 7, subtype %d."
+msgstr "Registro de tipo %d não reconhecido."
 
-#: src/output/output.c:702
+#: tests/dissect-sysfile.c:850
 #, c-format
-msgid "unknown device type `%.*s'"
+msgid "%s: Error parsing attribute value %s[%d]"
 msgstr ""
 
-#: src/output/output.c:719
+#: tests/dissect-sysfile.c:856
 #, c-format
-msgid "cannot initialize output driver `%s' of class `%s'"
+msgid "%s: Attribute value %s[%d] is not quoted: %s"
 msgstr ""
 
-#: src/output/output.c:765
+#: tests/dissect-sysfile.c:880
+#, fuzzy, c-format
+msgid "Bad size %zu for extended number of cases."
+msgstr "Tamanho %zu inválido da extensão 11."
+
+#: tests/dissect-sysfile.c:886
 #, c-format
-msgid "driver definition line missing driver name or class name"
+msgid "Bad count %zu for extended number of cases."
 msgstr ""
 
-#: src/output/output.c:868
-#, c-format
-msgid "`%s' is not a valid length."
+#: src/language/utilities/set.q:188
+msgid "WORKSPACE must be at least 1MB"
 msgstr ""
 
-#: src/output/output.c:960
+#: src/language/utilities/set.q:194 src/language/utilities/set.q:196
+#: src/language/utilities/set.q:198 src/language/utilities/set.q:200
+#: src/language/utilities/set.q:202 src/language/utilities/set.q:204
+#: src/language/utilities/set.q:206 src/language/utilities/set.q:208
+#: src/language/utilities/set.q:210
 #, c-format
-msgid "unknown paper type `%.*s'"
+msgid "%s is obsolete."
+msgstr "%s é obsoleto."
+
+#: src/language/utilities/set.q:216
+msgid "Active file compression is not implemented."
+msgstr "Compressão de arquivo ativo não está implementado."
+
+#: src/language/utilities/set.q:334
+msgid "EPOCH must be 1500 or later."
 msgstr ""
 
-#: src/output/output.c:978
+#: src/language/utilities/set.q:341
+msgid "expecting AUTOMATIC or year"
+msgstr "esperando AUTOMATIC ou ano"
+
+#: src/language/utilities/set.q:369
+msgid "LENGTH must be at least 1."
+msgstr "LENGTH deve ser pelo menos 1."
+
+#: src/language/utilities/set.q:405
+#, fuzzy, c-format
+msgid "%s is not a recognised encoding or locale name"
+msgstr "%s é um nome de variável existente."
+
+#: src/language/utilities/set.q:467
+msgid "WIDTH must be at least 40."
+msgstr "WIDTH deve ser pelo menos 40."
+
+#: src/language/utilities/set.q:490
 #, c-format
-msgid "error opening \"%s\""
+msgid ""
+"FORMAT requires numeric output format as an argument.  Specified format %s "
+"is of type string."
 msgstr ""
 
-#: src/output/output.c:989
-#, c-format
-msgid "error reading \"%s\""
+#: src/language/utilities/set.q:707
+msgid "ISL (32-bit IEEE 754 single, little-endian)"
 msgstr ""
 
-#: src/output/output.c:1006
-#, c-format
-msgid "paper size file \"%s\" does not state a paper size"
+#: src/language/utilities/set.q:710
+msgid "ISB (32-bit IEEE 754 single, big-endian)"
 msgstr ""
 
-#: src/output/output.c:1066
-#, c-format
-msgid "syntax error in paper size `%s'"
+#: src/language/utilities/set.q:713
+msgid "IDL (64-bit IEEE 754 double, little-endian)"
 msgstr ""
 
-#: src/output/postscript.c:158
-#, c-format
-msgid "opening PostScript output file \"%s\""
+#: src/language/utilities/set.q:716
+msgid "IDB (64-bit IEEE 754 double, big-endian)"
 msgstr ""
 
-#: src/output/postscript.c:196
-#, c-format
-msgid "The defined PostScript page is not long enough to hold margins and headers, plus least 15 lines of the default fonts.  In fact, there's only room for %d lines of each font at the default size of %d.%03d points."
+#: src/language/utilities/set.q:720
+msgid "VF (32-bit VAX F, VAX-endian)"
 msgstr ""
 
-#: src/output/postscript.c:246
-#, c-format
-msgid "closing PostScript output file \"%s\""
+#: src/language/utilities/set.q:723
+msgid "VD (64-bit VAX D, VAX-endian)"
 msgstr ""
 
-#: src/output/postscript.c:309
-#, c-format
-msgid "unknown configuration parameter `%s' for PostScript device driver"
+#: src/language/utilities/set.q:726
+msgid "VG (64-bit VAX G, VAX-endian)"
 msgstr ""
 
-#: src/output/postscript.c:325
-#, c-format
-msgid "unknown orientation `%s' (valid orientations are `portrait' and `landscape')"
-msgstr "orientação desconhecida '%s' (orientações válidas são 'retrato' e 'paisagem')"
+#: src/language/utilities/set.q:730
+msgid "ZS (32-bit IBM Z hexadecimal short, big-endian)"
+msgstr ""
 
-#: src/output/postscript.c:337
-#, c-format
-msgid "boolean value expected for %s"
-msgstr "valor booleano esperado para %s"
+#: src/language/utilities/set.q:733
+msgid "ZL (64-bit IBM Z hexadecimal long, big-endian)"
+msgstr ""
 
-#: src/output/postscript.c:350
-#, c-format
-msgid "positive integer value required for `%s'"
-msgstr "valor inteiro positivo requerido para '%s'"
+#: src/language/utilities/set.q:835
+#, fuzzy, c-format
+msgid "%s is %s."
+msgstr "%s é \"%s\"."
 
-#: src/output/postscript.c:355
-#, c-format
-msgid "default font size must be at least 1 point (value of 1000 for key `%s')"
-msgstr "tamanho padrão de fonte precisa ser pelo menos de 1 ponto (valor de 1000 para chave '%s')"
+#: src/language/stats/crosstabs.q:289
+msgid ""
+"Missing mode REPORT not allowed in general mode.  Assuming MISSING=TABLE."
+msgstr ""
 
-#: src/output/postscript.c:1176
-#, c-format
-msgid "\"%s\": bad font specification"
-msgstr "\"%s\": especificação de fonte inválida"
+#: src/language/stats/crosstabs.q:399
+msgid "Too many cross-tabulation variables or dimensions."
+msgstr "Excessivo número de variáveis ou dimensões para crosstab."
 
-#: src/output/postscript.c:1184
-#, c-format
-msgid "could not find AFM file \"%s\""
-msgstr "impossível encontrar arquivo AFM \"%s\""
+#: src/language/stats/crosstabs.q:409
+msgid "expecting BY"
+msgstr "esperando BY"
 
-#: src/output/postscript.c:1198
-#, c-format
-msgid "could not find font \"%s\""
-msgstr "impossível encontrar fonte \"%s\""
+#: src/language/stats/crosstabs.q:466
+msgid "VARIABLES must be specified before TABLES."
+msgstr "VARIABLES deve ser especificado antes de TABLES."
 
-#: src/output/postscript.c:1207
+#: src/language/stats/crosstabs.q:504
 #, c-format
-msgid "could not find encoding \"%s\""
-msgstr "impossível abrir codificação \"%s\""
+msgid "Maximum value (%ld) less than minimum value (%ld)."
+msgstr "O valor máximo (%ld) é menor que o mínimo (%ld)."
 
-#: src/output/postscript.c:1307
-#, c-format
-msgid "cannot open font file \"%s\""
-msgstr "impossível abrir arquivo de fonte \"%s\""
+#: src/language/stats/crosstabs.q:818
+msgid "Summary."
+msgstr "Sumário."
 
-#: src/output/postscript.c:1348
-#, c-format
-msgid "reading font file \"%s\""
-msgstr "lendo arquivo de fonte \"%s\""
+#: src/language/stats/crosstabs.q:820 src/language/stats/examine.q:1164
+#: src/language/stats/reliability.q:693
+msgid "Cases"
+msgstr "Casos"
 
-#: src/output/postscript.c:1370
-#, c-format
-msgid "cannot open font encoding file \"%s\""
-msgstr "impossível abrir arquivo de codificação de fonte \"%s\""
+#: src/language/stats/crosstabs.q:821 src/language/stats/examine.q:1103
+#: src/language/stats/frequencies.q:1035 src/language/stats/reliability.q:696
+msgid "Valid"
+msgstr "Valido"
 
-#: src/output/postscript.c:1399
-#, c-format
-msgid "invalid numeric format"
-msgstr "formato numérico inválido"
+#: src/language/stats/crosstabs.q:831 src/language/stats/examine.q:1179
+#: src/language/stats/frequencies.q:815
+msgid "Percent"
+msgstr "Percentual"
 
-#: src/output/postscript.c:1421
-#, c-format
-msgid "closing Postscript encoding \"%s\""
-msgstr "fechando codificação \"%s\" Postscript"
+#: src/language/stats/crosstabs.q:1109
+msgid "count"
+msgstr "contagem"
 
-#: src/output/table.c:236
-#, c-format
-msgid "bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
-msgstr "problema na vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) no tamanho da tabela (%d,%d)\n"
+#: src/language/stats/crosstabs.q:1110
+msgid "row %"
+msgstr "linha %"
 
-#: src/output/table.c:307
-#, c-format
-msgid "bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n"
-msgstr "problema na caixa: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) no tamanho da tabela (%d,%d)\n"
+#: src/language/stats/crosstabs.q:1111
+msgid "column %"
+msgstr "coluna %"
 
-#: src/ui/gui/comments-dialog.c:58
-#, c-format
-msgid "Column Number: %d"
-msgstr "Número da coluna: %d"
+#: src/language/stats/crosstabs.q:1112
+msgid "total %"
+msgstr "total %"
 
-#: src/ui/gui/crosstabs-dialog.c:40
-msgid "Chisq"
-msgstr "Chisq"
+#: src/language/stats/crosstabs.q:1113
+msgid "expected"
+msgstr "esperado"
 
-#: src/ui/gui/crosstabs-dialog.c:42
-msgid "CC"
-msgstr "CC"
+#: src/language/stats/crosstabs.q:1114
+msgid "residual"
+msgstr "residual"
 
-#: src/ui/gui/crosstabs-dialog.c:44
-msgid "UC"
-msgstr "UC"
+#: src/language/stats/crosstabs.q:1115
+msgid "std. resid."
+msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:45
-msgid "BTau"
-msgstr "BTau"
+#: src/language/stats/crosstabs.q:1116
+msgid "adj. resid."
+msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:46
-msgid "CTau"
-msgstr "CTau"
+#: src/language/stats/crosstabs.q:1210
+msgid "Chi-square tests."
+msgstr "Teste Chi-quadrado"
 
-#: src/ui/gui/crosstabs-dialog.c:47
-msgid "Risk"
-msgstr "Risk"
+#: src/language/stats/crosstabs.q:1217
+msgid "Asymp. Sig. (2-sided)"
+msgstr "Sig. assintótica (bi-caudal)"
 
-#: src/ui/gui/crosstabs-dialog.c:49
-msgid "D"
-msgstr "D"
+#: src/language/stats/crosstabs.q:1219
+#, fuzzy
+msgid "Exact Sig. (2-sided)"
+msgstr "Sig. exata (bi-caudal)"
 
-#: src/ui/gui/crosstabs-dialog.c:52
-msgid "Corr"
-msgstr "Corr"
+#: src/language/stats/crosstabs.q:1221
+#, fuzzy
+msgid "Exact Sig. (1-sided)"
+msgstr "Sig. exata (uni-caudal)"
 
-#: src/ui/gui/crosstabs-dialog.c:53 src/ui/gui/crosstabs-dialog.c:64
-#: src/ui/gui/crosstabs-dialog.c:99 src/ui/gui/crosstabs-dialog.c:107
-#: src/ui/gui/psppire-var-store.c:591 src/ui/gui/var-display.c:14
-msgid "None"
-msgstr "Nenhum"
+#: src/language/stats/crosstabs.q:1236
+msgid "Symmetric measures."
+msgstr "Medidas simétricas."
 
-#: src/ui/gui/crosstabs-dialog.c:56
-msgid "Count"
-msgstr "Contagem"
+#: src/language/stats/crosstabs.q:1242 src/language/stats/crosstabs.q:1290
+msgid "Asymp. Std. Error"
+msgstr "Erro padrão assintótico"
 
-#: src/ui/gui/crosstabs-dialog.c:57
-msgid "Row"
-msgstr "Linha"
+#: src/language/stats/crosstabs.q:1243 src/language/stats/crosstabs.q:1291
+msgid "Approx. T"
+msgstr "T aproximado"
 
-#: src/ui/gui/crosstabs-dialog.c:58
-msgid "Column"
-msgstr "Coluna"
+#: src/language/stats/crosstabs.q:1244 src/language/stats/crosstabs.q:1292
+msgid "Approx. Sig."
+msgstr "Sig. aproximada"
 
-#: src/ui/gui/crosstabs-dialog.c:60
-msgid "Expected"
-msgstr "Esperado"
+#: src/language/stats/crosstabs.q:1258
+msgid "Risk estimate."
+msgstr ""
 
-#: src/ui/gui/crosstabs-dialog.c:62
-msgid "Std. Residual"
-msgstr "Resíduo padrão"
+#: src/language/stats/crosstabs.q:1262
+#, c-format
+msgid "95%% Confidence Interval"
+msgstr "Intervalo de confiança de 95%%"
 
-#: src/ui/gui/crosstabs-dialog.c:63
-msgid "Adjusted Std. Residual"
-msgstr "Resíduo padrão ajustado"
+#: src/language/stats/crosstabs.q:1265 src/language/stats/t-test.q:756
+#: src/language/stats/t-test.q:920 src/language/stats/t-test.q:1013
+msgid "Lower"
+msgstr "Mínimo"
 
-#: src/ui/gui/crosstabs.glade:50
-msgid "Rows"
-msgstr "Linhas"
+#: src/language/stats/crosstabs.q:1266 src/language/stats/t-test.q:757
+#: src/language/stats/t-test.q:921 src/language/stats/t-test.q:1014
+msgid "Upper"
+msgstr "Máximo"
 
-#: src/ui/gui/crosstabs.glade:131 src/ui/gui/frequencies.glade:185
-msgid "Format..."
-msgstr "Formato..."
+#: src/language/stats/crosstabs.q:1283
+msgid "Directional measures."
+msgstr ""
 
-#: src/ui/gui/crosstabs.glade:138 src/ui/gui/examine.glade:246
-#: src/ui/gui/regression.glade:31
-msgid "Statistics..."
-msgstr "Estatísticas..."
+#: src/language/stats/crosstabs.q:1708
+msgid "Pearson Chi-Square"
+msgstr "Chi-quadrado de Pearson"
 
-#: src/ui/gui/crosstabs.glade:148
-msgid "Cells..."
-msgstr "Células..."
+#: src/language/stats/crosstabs.q:1709
+msgid "Likelihood Ratio"
+msgstr ""
 
-#: src/ui/gui/crosstabs.glade:230
-msgid "Print tables"
-msgstr "Imprimir tabelas"
+#: src/language/stats/crosstabs.q:1710
+msgid "Fisher's Exact Test"
+msgstr "Teste exato de Fisher"
 
-#: src/ui/gui/crosstabs.glade:240
-msgid "Pivot"
-msgstr "Pivô"
+#: src/language/stats/crosstabs.q:1711
+msgid "Continuity Correction"
+msgstr ""
 
-#: src/ui/gui/crosstabs.glade:253 src/ui/gui/psppire.glade:778
-msgid "Ascending"
-msgstr "Ascendente"
+#: src/language/stats/crosstabs.q:1712
+msgid "Linear-by-Linear Association"
+msgstr ""
 
-#: src/ui/gui/crosstabs.glade:283
-msgid "No label"
-msgstr "Sem rótulo"
+#: src/language/stats/crosstabs.q:1747 src/language/stats/crosstabs.q:1822
+#: src/language/stats/crosstabs.q:1887
+msgid "N of Valid Cases"
+msgstr "N de casos válidos"
 
-#: src/ui/gui/crosstabs.glade:295
-msgid "Suppress value labels"
-msgstr "Ocultar rótulos de valores"
+#: src/language/stats/crosstabs.q:1766 src/language/stats/crosstabs.q:1905
+msgid "Nominal by Nominal"
+msgstr ""
 
-#: src/ui/gui/crosstabs.glade:311
-msgid "Labeling"
-msgstr "Rotulando"
+#: src/language/stats/crosstabs.q:1767 src/language/stats/crosstabs.q:1906
+msgid "Ordinal by Ordinal"
+msgstr ""
 
-#: src/ui/gui/crosstabs.glade:378
-msgid "Cell Display"
-msgstr "Visualizar Célula"
+#: src/language/stats/crosstabs.q:1768
+msgid "Interval by Interval"
+msgstr ""
 
-#: src/ui/gui/crosstabs.glade:439 src/ui/gui/oneway.glade:207
-#: src/ui/gui/regression.glade:322
-msgid "Statistics"
-msgstr "Estatísticas"
+#: src/language/stats/crosstabs.q:1769
+msgid "Measure of Agreement"
+msgstr ""
 
-#: src/ui/gui/customentry.c:334
-msgid "Style of bevel around the custom entry button"
+#: src/language/stats/crosstabs.q:1775
+msgid "Cramer's V"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:150
-msgid "Transformations Pending"
-msgstr "Transformação Pendente"
+#: src/language/stats/crosstabs.q:1776
+msgid "Contingency Coefficient"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:323
-msgid "_Labels"
-msgstr "_Label"
+#: src/language/stats/crosstabs.q:1777
+msgid "Kendall's tau-b"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:324
-msgid "Show/hide value labels"
-msgstr "Exibir/ocultar rótulos de valores"
+#: src/language/stats/crosstabs.q:1778
+msgid "Kendall's tau-c"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:342 src/ui/gui/data-editor.c:361
-#: src/ui/gui/data-editor.c:1512 src/ui/gui/data-editor.c:1566
-msgid "Clear"
-msgstr "Limpar"
+#: src/language/stats/crosstabs.q:1780
+msgid "Spearman Correlation"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:343
-msgid "Delete the cases at the selected position(s)"
-msgstr "Deletar o caso na posição(ões) selecionada(s)"
+#: src/language/stats/crosstabs.q:1781
+msgid "Pearson's R"
+msgstr "R de Pearson"
 
-#: src/ui/gui/data-editor.c:362
-msgid "Delete the variables at the selected position(s)"
-msgstr "Deletar as variáveis na posição(ões) selecionada(s)"
+#: src/language/stats/crosstabs.q:1860
+#, c-format
+msgid "Odds Ratio for %s (%g / %g)"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:377
-msgid "Insert _Variable"
-msgstr "Inserir _Variáveis"
+#: src/language/stats/crosstabs.q:1863
+#, c-format
+msgid "Odds Ratio for %s (%.*s / %.*s)"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:378
-msgid "Create a new variable at the current position"
-msgstr "Criar uma variável na posição atual"
+#: src/language/stats/crosstabs.q:1871
+#, c-format
+msgid "For cohort %s = %g"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:396
-msgid "Insert Ca_se"
-msgstr "Inserir Ca_so"
+#: src/language/stats/crosstabs.q:1874
+#, c-format
+msgid "For cohort %s = %.*s"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:397
-msgid "Create a new case at the current position"
-msgstr "Criar um caso na posição atual"
+#: src/language/stats/crosstabs.q:1907
+msgid "Nominal by Interval"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:417
-msgid "_Goto Case"
-msgstr "_Ir para Caso"
+#: src/language/stats/crosstabs.q:1913
+msgid "Goodman and Kruskal tau"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:418
-msgid "Jump to a Case in the Data Sheet"
-msgstr "Pular para o Caso na matriz de dados"
+#: src/language/stats/crosstabs.q:1914
+msgid "Uncertainty Coefficient"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:437
-msgid "_Weights"
-msgstr "_Ponderação"
+#: src/language/stats/crosstabs.q:1915
+msgid "Somers' d"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:438
-msgid "Weight cases by variable"
-msgstr "Pondera casos pela variável"
+#: src/language/stats/crosstabs.q:1921
+msgid "Symmetric"
+msgstr "Simétrico"
 
-#: src/ui/gui/data-editor.c:447 src/ui/gui/data-editor.glade:319
-msgid "_Transpose"
-msgstr "_Transpor"
+#: src/language/stats/crosstabs.q:1922 src/language/stats/crosstabs.q:1923
+#, c-format
+msgid "%s Dependent"
+msgstr "%s Dependente"
 
-#: src/ui/gui/data-editor.c:448
-msgid "Transpose the cases with the variables"
-msgstr "Transpor os casos com as variáveis"
+#: src/language/stats/examine.q:357
+msgid "Not creating NP plot because data set is empty."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:459
-msgid "S_plit"
-msgstr "_Dividir"
+#: src/language/stats/examine.q:442 src/language/stats/examine.q:949
+msgid "Not creating plot because data set is empty."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:460
-msgid "Split the active file"
-msgstr "Dividir o arquivo ativo"
+#: src/language/stats/examine.q:454
+#, c-format
+msgid "Boxplot of %s vs. %s"
+msgstr "Boxplot de %s por %s"
 
-#: src/ui/gui/data-editor.c:470
-msgid "_Sort"
-msgstr "_Ordenar"
+#: src/language/stats/examine.q:458
+#, fuzzy, c-format
+msgid "Boxplot of %s"
+msgstr "Boxplot de %s por %s"
 
-#: src/ui/gui/data-editor.c:471
-msgid "Sort cases in the active file"
-msgstr "Ordenar casos no arquivo ativo"
+#: src/language/stats/examine.q:647 src/language/stats/examine.q:660
+#, c-format
+msgid "%s and %s are mutually exclusive"
+msgstr "%s e %s são mutualmente excludentes"
 
-#: src/ui/gui/data-editor.c:479 src/ui/gui/data-editor.glade:340
-msgid "Select _Cases"
-msgstr "Selecionar _Casos"
+#: src/language/stats/examine.q:1159 src/language/stats/reliability.q:670
+msgid "Case Processing Summary"
+msgstr "Sumário de processamento de casos"
 
-#: src/ui/gui/data-editor.c:480
-msgid "Select cases from the active file"
-msgstr "Selecionar casos do arquivo ativo"
+#: src/language/stats/examine.q:1449 src/language/stats/oneway.q:394
+#, c-format
+msgid "%g%% Confidence Interval for Mean"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:489 src/ui/gui/data-editor.glade:369
-msgid "_Compute"
-msgstr "_Computar"
+#: src/language/stats/examine.q:1464
+msgid "5% Trimmed Mean"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:490
-msgid "Compute new values for a variable"
-msgstr "Computar novos valores de uma variável"
+#: src/language/stats/examine.q:1499
+msgid "Interquartile Range"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:498
-msgid "Oneway _ANOVA"
-msgstr "_ANOVA de Um Fator"
+#: src/language/stats/examine.q:1635 src/language/stats/oneway.q:404
+#: src/ui/gui/descriptives.ui:8 src/ui/gui/examine.ui:319
+msgid "Descriptives"
+msgstr "Descritivas"
 
-#: src/ui/gui/data-editor.c:499
-msgid "Perform one way analysis of variance"
-msgstr "Fazer análise one way de variância"
+#: src/language/stats/examine.q:1821
+msgid "Highest"
+msgstr "Maior"
 
-#: src/ui/gui/data-editor.c:507 src/ui/gui/data-editor.glade:496
-msgid "_Independent Samples T Test"
-msgstr "Teste T para Amostras _Independentes"
+#: src/language/stats/examine.q:1826
+msgid "Lowest"
+msgstr "Menor"
 
-#: src/ui/gui/data-editor.c:508
-msgid "Calculate T Test for samples from independent groups"
-msgstr "Calcular Teste T para amostrar de grupos independentes"
+#: src/language/stats/examine.q:1833
+msgid "Extreme Values"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:517 src/ui/gui/data-editor.glade:504
-msgid "_Paired Samples T Test"
-msgstr "Teste T para amostras em_parelhadas"
+#: src/language/stats/examine.q:1837 src/language/data-io/list.q:158
+msgid "Case Number"
+msgstr "Número do caso"
 
-#: src/ui/gui/data-editor.c:518
-msgid "Calculate T Test for paired samples"
-msgstr "Calcular Teste T para amostras emparelhadas"
+#: src/language/stats/examine.q:1957
+msgid "Tukey's Hinges"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:527
-msgid "One _Sample T Test"
-msgstr "Teste T Para Uma Am_ostra"
+#: src/language/stats/examine.q:2003
+#, c-format
+msgid "%g"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:528
-msgid "Calculate T Test for sample from a single distribution"
-msgstr "Calcular Teste T para amostra de uma distribuição única"
+#: src/language/stats/frequencies.q:382
+#, fuzzy
+msgid "Bar charts are not implemented."
+msgstr "%s não está implementado."
 
-#: src/ui/gui/data-editor.c:537 src/ui/gui/data-editor.glade:593
-msgid "Data File _Comments"
-msgstr "_Comentários do Arquivo de Dados"
+#: src/language/stats/frequencies.q:399
+#, c-format
+msgid ""
+"MAX for histogram must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:538
-msgid "Commentary text for the data file"
-msgstr "Comentário do arquivo de dados"
+#: src/language/stats/frequencies.q:420
+#, c-format
+msgid ""
+"MAX for pie chart must be greater than or equal to MIN, but MIN was "
+"specified as %.15g and MAX as %.15g.  MIN and MAX will be ignored."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:546 src/ui/gui/data-editor.glade:228
-msgid "_Find"
-msgstr "_Localizar"
+#: src/language/stats/frequencies.q:703
+msgid "`)' expected after GROUPED interval list."
+msgstr "')' esperado após lista de intervalo do GROUPED"
 
-#: src/ui/gui/data-editor.c:547
-msgid "Find Case"
-msgstr "Localizar Casos"
+#: src/language/stats/frequencies.q:723
+#, c-format
+msgid "Variables %s specified multiple times on GROUPED subcommand."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:556 src/ui/gui/data-editor.glade:377
-msgid "Ran_k Cases"
-msgstr "Classificar Casos"
+#: src/language/stats/frequencies.q:733
+#, c-format
+msgid "Variables %s specified on GROUPED but not on VARIABLES."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:557
-msgid "Rank Cases"
-msgstr "Ordenamento de Casos"
+#: src/language/stats/frequencies.q:812
+msgid "Value Label"
+msgstr "Rótulo de valor"
 
-#: src/ui/gui/data-editor.c:566 src/ui/gui/data-editor.glade:389
-msgid "Recode into _Same Variables"
-msgstr "Recodificar na _Mesma Variável"
+#: src/language/stats/frequencies.q:816
+#, fuzzy
+msgid "Valid Percent"
+msgstr "Percentual"
 
-#: src/ui/gui/data-editor.c:567
-msgid "Recode values into the same Variables"
-msgstr "Recodificar valores na mesma variável"
+#: src/language/stats/frequencies.q:817
+#, fuzzy
+msgid "Cum Percent"
+msgstr "Percentual"
 
-#: src/ui/gui/data-editor.c:576 src/ui/gui/data-editor.glade:396
-msgid "Recode into _Different Variables"
-msgstr "Recodificar em uma Variável _Diferente"
+#: src/language/stats/frequencies.q:1008
+#, c-format
+msgid "No valid data for variable %s; statistics not displayed."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:577
-msgid "Recode values into different Variables"
-msgstr "Recodificar valores em variáveis diferentes"
+#: src/language/stats/frequencies.q:1054
+msgid "50 (Median)"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:586 src/ui/gui/data-editor.glade:293
-#: src/ui/gui/data-editor.glade:584
-msgid "_Variables"
-msgstr "_Variáveis"
+#: src/language/stats/frequencies.q:1209
+#, c-format
+msgid "Omitting pie chart for %s, which has only %d unique values."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:587
-msgid "Jump to Variable"
-msgstr "Pular para variável"
+#: src/language/stats/frequencies.q:1212
+#, c-format
+msgid "Omitting pie chart for %s, which has over 50 unique values."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:595 src/ui/gui/data-editor.glade:450
-#: src/ui/gui/oneway.glade:179
-msgid "_Descriptives"
-msgstr "_Descritivas"
+#: src/language/stats/glm.q:248
+msgid "Multivariate GLM not yet supported"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:596
-msgid "Calculate descriptive statistics (mean, variance, ...)"
-msgstr "Calcular estatísticas descritivas (média, variância, ...)"
+#: src/language/stats/means.q:100
+msgid "Missing required subcommand TABLES."
+msgstr "Faltando subcomando necessário TABLES."
 
-#: src/ui/gui/data-editor.c:605 src/ui/gui/data-editor.glade:442
-msgid "_Frequencies"
-msgstr "_Frequências"
+#: src/language/stats/means.q:134
+msgid "TABLES subcommand may not appear more than once."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:606
-msgid "Generate frequency statistics"
-msgstr "Gerar estatísticas de frequência"
+#: src/language/stats/npar.q:111
+msgid "NPAR subcommand not currently implemented."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:614 src/ui/gui/data-editor.glade:466
-msgid "_Crosstabs"
-msgstr "_Crosstabs"
+#: src/language/stats/npar.q:256
+#, c-format
+msgid ""
+"The specified value of HI (%d) is lower than the specified value of LO (%d)"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:615
-msgid "Generate crosstabulations"
-msgstr "Gerar crosstabs"
+#: src/language/stats/npar.q:311
+#, c-format
+msgid ""
+"%d expected values were given, but the specified range (%d-%d) requires "
+"exactly %d values."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:624 src/ui/gui/data-editor.glade:458
-msgid "_Explore"
-msgstr "_Explorar"
+#: src/language/stats/npar.q:453 src/language/stats/t-test.q:380
+#, c-format
+msgid ""
+"PAIRED was specified but the number of variables preceding WITH (%zu) did "
+"not match the number following (%zu)."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:625
-msgid "Examine Data by Factors"
-msgstr "Examina dados pelos fatores"
+#: src/language/stats/oneway.q:170
+msgid "Number of contrast coefficients must equal the number of groups"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:634 src/ui/gui/data-editor.glade:532
-msgid "Linear _Regression"
-msgstr "Regressão Linear"
+#: src/language/stats/oneway.q:179
+#, c-format
+msgid "Coefficients for contrast %zu do not total zero"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:635
-msgid "Estimate parameters of the linear model"
-msgstr "Estima parâmetros do modelo linear"
+#: src/language/stats/oneway.q:242
+#, c-format
+msgid "`%s' is not a variable name"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1027
-msgid "Font Selection"
-msgstr "Seleção de fonte"
+#: src/language/stats/oneway.q:274 src/language/stats/regression.q:283
+msgid "Sum of Squares"
+msgstr "Soma dos quadrados"
 
-#: src/ui/gui/data-editor.c:1099
-msgid "No Split"
-msgstr "Sem divisão"
+#: src/language/stats/oneway.q:276 src/language/stats/regression.q:285
+msgid "Mean Square"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1108
-msgid "Split by "
-msgstr "Dividido por "
+#: src/language/stats/oneway.q:277 src/language/stats/regression.q:286
+#: src/language/stats/t-test.q:749
+msgid "F"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1133
-msgid "Filter off"
-msgstr "Sem Filtro"
+#: src/language/stats/oneway.q:278 src/language/stats/oneway.q:535
+#: src/language/stats/regression.q:201 src/language/stats/regression.q:287
+msgid "Significance"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1145
-#, c-format
-msgid "Filter by %s"
-msgstr "Filtrar por %s"
+#: src/language/stats/oneway.q:300
+msgid "Between Groups"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1163
-msgid "Weights off"
-msgstr "Sem Pesos"
+#: src/language/stats/oneway.q:301
+msgid "Within Groups"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1175
-#, c-format
-msgid "Weight by %s"
-msgstr "Peso por %s"
+#: src/language/stats/oneway.q:345 src/language/stats/regression.q:312
+msgid "ANOVA"
+msgstr "ANOVA"
 
-#: src/ui/gui/data-editor.c:1198 src/ui/gui/data-editor.c:1445
-#: src/ui/gui/data-editor.glade:660
-msgid "Open"
-msgstr "Abrir"
+#: src/language/stats/oneway.q:532
+msgid "Levene Statistic"
+msgstr "Estatística de Levene"
 
-#: src/ui/gui/data-editor.c:1199
-msgid "Open a data file"
-msgstr "Abrir arquivo de dados"
+#: src/language/stats/oneway.q:533
+msgid "df1"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1207 src/ui/gui/data-editor.c:1323
-#: src/ui/gui/data-editor.glade:670
-msgid "Save"
-msgstr "Salvar"
+#: src/language/stats/oneway.q:534
+msgid "df2"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1208 src/ui/gui/data-editor.c:1218
-msgid "Save data to file"
-msgstr "Salvar dados para arquivo"
+#: src/language/stats/oneway.q:537
+msgid "Test of Homogeneity of Variances"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1217
-msgid "Save As"
-msgstr "Salvar Como"
+#: src/language/stats/oneway.q:603
+msgid "Contrast Coefficients"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1226 src/ui/gui/recode-dialog.c:928
-#: src/ui/gui/recode-dialog.c:1023
-msgid "New"
-msgstr "Novo"
+#: src/language/stats/oneway.q:605 src/language/stats/oneway.q:681
+msgid "Contrast"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1227
-msgid "New data file"
-msgstr "Novo arquivo de dados"
+#: src/language/stats/oneway.q:679
+msgid "Contrast Tests"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1235
-msgid "_Import Text Data"
-msgstr "_Importar dados textuais"
+#: src/language/stats/oneway.q:682
+msgid "Value of Contrast"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1236
-msgid "Import text data file"
-msgstr "Importar arquivo de dados textuais"
+#: src/language/stats/oneway.q:684 src/language/stats/regression.q:200
+#: src/language/stats/t-test.q:751 src/language/stats/t-test.q:922
+#: src/language/stats/t-test.q:1009
+msgid "t"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1331 src/ui/gui/data-editor.c:1453
-msgid "System Files (*.sav)"
-msgstr "Arquivo de Sistema (*.sav)"
+#: src/language/stats/oneway.q:730
+msgid "Assume equal variances"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1337 src/ui/gui/data-editor.c:1459
-msgid "Portable Files (*.por) "
-msgstr "Arquivo Portável (*.por) "
+#: src/language/stats/oneway.q:734
+msgid "Does not assume equal"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1343 src/ui/gui/data-editor.c:1465
-#: src/ui/gui/syntax-editor.c:138 src/ui/gui/syntax-editor.c:522
-msgid "All Files"
-msgstr "Todos os Arquivos"
+#: src/language/stats/rank.q:220
+#, c-format
+msgid "%s of %s by %s"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1351
-msgid "System File"
-msgstr "Arquivos de Sistema"
+#: src/language/stats/rank.q:225
+#, c-format
+msgid "%s of %s"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1356
-msgid "Portable File"
-msgstr "Arquivo portátil"
+#: src/language/stats/rank.q:600
+msgid "Cannot create new rank variable.  All candidates in use."
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1503
-msgid "Sort Ascending"
-msgstr "Ordenar Ascendentemente "
+#: src/language/stats/rank.q:693
+msgid "Variables Created By RANK"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1506
-msgid "Sort Descending"
-msgstr "Ordenar Descendentemente"
+#: src/language/stats/rank.q:717
+#, c-format
+msgid "%s into %s(%s of %s using %s BY %s)"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1509 src/ui/gui/data-editor.glade:150
-#: src/ui/gui/data-editor.glade:801
-msgid "Insert Variable"
-msgstr "Inserir Variáveis"
+#: src/language/stats/rank.q:727
+#, c-format
+msgid "%s into %s(%s of %s BY %s)"
+msgstr ""
 
-#: src/ui/gui/data-editor.c:1563 src/ui/gui/data-editor.glade:789
-msgid "Insert Case"
-msgstr "Inserir Caso"
+#: src/language/stats/rank.q:740
+#, c-format
+msgid "%s into %s(%s of %s using %s)"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:18 src/ui/gui/output-viewer.glade:22
-#: src/ui/gui/syntax-editor.glade:39
-msgid "_File"
-msgstr "_Arquivo"
+#: src/language/stats/rank.q:749
+#, c-format
+msgid "%s into %s(%s of %s)"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:33 src/ui/gui/data-editor.glade:59
-#: src/ui/gui/syntax-editor.glade:57 src/ui/gui/syntax-editor.glade:87
-msgid "_Syntax"
-msgstr "_Sintaxe"
+#: src/language/stats/rank.q:761
+msgid ""
+"FRACTION has been specified, but NORMAL and PROPORTION rank functions have "
+"not been requested.  The FRACTION subcommand will be ignored."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:40 src/ui/gui/data-editor.glade:66
-#: src/ui/gui/data-editor.glade:286 src/ui/gui/data-editor.glade:304
-#: src/ui/gui/syntax-editor.glade:66 src/ui/gui/syntax-editor.glade:96
-msgid "_Data"
-msgstr "_Dados"
+#: src/language/stats/rank.q:852
+#, c-format
+msgid "Variable %s already exists."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:78
-msgid "_Import Delimited Text Data"
-msgstr "_Importar Dados Textuais Delimitados"
+#: src/language/stats/rank.q:857
+msgid "Too many variables in INTO clause."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:111
-msgid "Recently Used Da_ta"
-msgstr "Dados Recen_temente usados"
+#: src/language/stats/regression.q:156
+msgid "R Square"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:118
-msgid "Recently Used _Files"
-msgstr "Arquivos _Recentemente Usados"
+#: src/language/stats/regression.q:157
+msgid "Adjusted R Square"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:142 src/ui/gui/output-viewer.glade:55
-#: src/ui/gui/syntax-editor.glade:143
-msgid "_Edit"
-msgstr "_Editar"
+#: src/language/stats/regression.q:158
+msgid "Std. Error of the Estimate"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:158
-msgid "Insert Cases"
-msgstr "Inserir Casos"
+#: src/language/stats/regression.q:163
+msgid "Model Summary"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:166 src/ui/gui/data-editor.glade:738
-msgid "Go To Case"
-msgstr "Ir para Caso"
+#: src/language/stats/regression.q:197
+msgid "B"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:207
-msgid "Cl_ear Variables"
-msgstr "Limpar Variáv_eis"
+#: src/language/stats/regression.q:199
+msgid "Beta"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:215
-msgid "_Clear Cases"
-msgstr "Limpar _Casos"
+#: src/language/stats/regression.q:202
+msgid "(Constant)"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:239
-msgid "_View"
-msgstr "_Ver"
+#: src/language/stats/regression.q:254
+msgid "Coefficients"
+msgstr "Coeficientes"
 
-#: src/ui/gui/data-editor.glade:246
-msgid "_Status Bar"
-msgstr "_Barra de Status"
+#: src/language/stats/regression.q:289 src/ui/gui/regression.ui:7
+msgid "Regression"
+msgstr "Regressão"
 
-#: src/ui/gui/data-editor.glade:259
-msgid "_Fonts"
-msgstr "_Fontes"
+#: src/language/stats/regression.q:370
+msgid "Model"
+msgstr "Modelo"
 
-#: src/ui/gui/data-editor.glade:266
-msgid "_Grid Lines"
-msgstr "_Linhas da Grade"
+#: src/language/stats/regression.q:371
+msgid "Covariances"
+msgstr "Co-variança"
 
-#: src/ui/gui/data-editor.glade:274
-msgid "Value _Labels"
-msgstr "_Labels"
+#: src/language/stats/regression.q:386
+msgid "Coefficient Correlations"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:311
-msgid "_Sort Cases"
-msgstr "_Ordenar Casos"
+#: src/language/stats/regression.q:793
+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 "
+"meaningless."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:332
-msgid "S_plit File"
-msgstr "_Dividir Arquivo"
+#: src/language/stats/regression.q:891
+msgid "REGRESSION requires numeric variables."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:347
-msgid "_Weight Cases"
-msgstr "Dar _Peso aos Casos"
+#: src/language/stats/regression.q:962
+msgid "No valid data found. This command was skipped."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:359
-msgid "_Transform"
-msgstr "_Transformar"
+#: src/language/stats/reliability.q:421
+#, fuzzy
+msgid "Reliability Statistics"
+msgstr "Testes estatísticos"
 
-#: src/ui/gui/data-editor.glade:409
-msgid "_Run Pending Transforms"
-msgstr "_Executar Transformações Pendentes"
+#: src/language/stats/reliability.q:462
+#, fuzzy
+msgid "Item-Total Statistics"
+msgstr "Testes estatísticos"
 
-#: src/ui/gui/data-editor.glade:422
-msgid "_Analyze"
-msgstr "A_nalisar"
+#: src/language/stats/reliability.q:484
+msgid "Scale Mean if Item Deleted"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:432
-msgid "_Descriptive Statistics"
-msgstr "Estatísticas _Descritivas"
+#: src/language/stats/reliability.q:487
+msgid "Scale Variance if Item Deleted"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:478
-msgid "Compare _Means"
-msgstr "Comparar _Médias"
+#: src/language/stats/reliability.q:490
+msgid "Corrected Item-Total Correlation"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:488
-msgid "_One Sample T Test"
-msgstr "Teste T Para Uma Am_ostra"
+#: src/language/stats/reliability.q:493
+msgid "Cronbach's Alpha if Item Deleted"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:512
-msgid "One Way _ANOVA"
-msgstr "_ANOVA de Um Fator"
+#: src/language/stats/reliability.q:543 src/language/stats/reliability.q:562
+msgid "Cronbach's Alpha"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:524
-msgid "Bivariate _Correlation"
-msgstr "_Correlação Bivariada"
+#: src/language/stats/reliability.q:546 src/language/stats/reliability.q:571
+#: src/language/stats/reliability.q:582
+msgid "N of Items"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:540
-msgid "_Non-Parametric Statistics"
-msgstr "Estatísticas Não-Paramétricas"
+#: src/language/stats/reliability.q:565
+#, fuzzy
+msgid "Part 1"
+msgstr "Var 1"
 
-#: src/ui/gui/data-editor.glade:550
-msgid "_Chi-Square"
-msgstr "_Chi-Quadrado"
+#: src/language/stats/reliability.q:576
+#, fuzzy
+msgid "Part 2"
+msgstr "Var 2"
 
-#: src/ui/gui/data-editor.glade:558
-msgid "_Binomial"
-msgstr "_Binomial"
+#: src/language/stats/reliability.q:587
+msgid "Total N of Items"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:574
-msgid "_Utilities"
-msgstr "_Utilidades"
+#: src/language/stats/reliability.q:590
+msgid "Correlation Between Forms"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:604 src/ui/gui/output-viewer.glade:78
-#: src/ui/gui/syntax-editor.glade:234
-msgid "_Windows"
-msgstr "_Janelas"
+#: src/language/stats/reliability.q:594
+msgid "Spearman-Brown Coefficient"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:611 src/ui/gui/output-viewer.glade:88
-#: src/ui/gui/syntax-editor.glade:243
-msgid "_Minimize All Windows"
-msgstr "_Minimizar Todas as Janelas"
+#: src/language/stats/reliability.q:597
+msgid "Equal Length"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:622 src/ui/gui/output-viewer.glade:99
-#: src/ui/gui/syntax-editor.glade:254
-msgid "_Help"
-msgstr "A_juda"
+#: src/language/stats/reliability.q:600
+msgid "Unequal Length"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:629 src/ui/gui/output-viewer.glade:106
-#: src/ui/gui/syntax-editor.glade:262
-msgid "_Reference Manual"
-msgstr "_Manual de Referência"
+#: src/language/stats/reliability.q:604
+msgid "Guttman Split-Half Coefficient"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:636 src/ui/gui/output-viewer.glade:113
-#: src/ui/gui/syntax-editor.glade:269
-msgid "_About"
-msgstr "_Sobre"
+#: src/language/stats/reliability.q:699
+#, fuzzy
+msgid "Excluded"
+msgstr "Esperado"
 
-#: src/ui/gui/data-editor.glade:680
-msgid "Print"
-msgstr "Imprimir"
+#: src/language/stats/reliability.q:707
+#, fuzzy
+msgid "%"
+msgstr "%d"
 
-#: src/ui/gui/data-editor.glade:690
-msgid "Recall"
-msgstr "Recall"
+#: src/language/stats/t-test.q:190
+#, fuzzy
+msgid "Exactly one of TESTVAL, GROUPS and PAIRS subcommands must be specified."
+msgstr "TESTVAL, GROUPS e PAIRS subcomandos são mutualmente excludentes."
 
-#: src/ui/gui/data-editor.glade:708
-msgid "Undo"
-msgstr "Desfazer"
+#: src/language/stats/t-test.q:211
+#, fuzzy
+msgid "VARIABLES subcommand may not be used with PAIRS."
+msgstr "O subcomando END só pode ser usado dentro de INPUT PROGRAM."
 
-#: src/ui/gui/data-editor.glade:718
-msgid "Redo"
-msgstr "Refazer"
+#: src/language/stats/t-test.q:230
+msgid "One or more VARIABLES must be specified."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:748
-msgid "Variables"
-msgstr "Variáveis"
+#: src/language/stats/t-test.q:324
+msgid ""
+"When applying GROUPS to a string variable, two values must be specified."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:769
-msgid "Find"
-msgstr "Localizar"
+#: src/language/stats/t-test.q:395
+msgid "At least two variables must be specified on PAIRS."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:821
-msgid "Split File"
-msgstr "Dividir Arquivo"
+#: src/language/stats/t-test.q:503
+msgid "One-Sample Statistics"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:832
-msgid "Weight Cases"
-msgstr "Dar Peso Aos Casos"
+#: src/language/stats/t-test.q:522
+msgid "Group Statistics"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:844
-msgid "Select Cases"
-msgstr "Selecionar Casos"
+#: src/language/stats/t-test.q:621
+msgid "Paired Sample Statistics"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:864 src/ui/gui/data-editor.glade:1452
-#: src/ui/gui/data-editor.glade:1633
-msgid "Value Labels"
-msgstr "Value Labels"
-
-#: src/ui/gui/data-editor.glade:875
-msgid "Use Sets"
+#: src/language/stats/t-test.q:641 src/language/stats/t-test.q:944
+#: src/language/stats/t-test.q:1111
+#, c-format
+msgid "Pair %d"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:907
-msgid "Information Area"
-msgstr "Área de Informação"
-
-#: src/ui/gui/data-editor.glade:926
-msgid "Processor Area"
-msgstr "Área do Processamento"
-
-#: src/ui/gui/data-editor.glade:951
-msgid "Case Counter Area"
-msgstr "Área de Contagem dos Casos"
+#: src/language/stats/t-test.q:737
+msgid "Independent Samples Test"
+msgstr "Teste de Amostras Independentes"
 
-#: src/ui/gui/data-editor.glade:976
-msgid "Filter Use Status Area"
-msgstr "Área de Status do Uso de Filtros"
+#: src/language/stats/t-test.q:745
+msgid "Levene's Test for Equality of Variances"
+msgstr "Teste de Levene para Igualdade de Varianças"
 
-#: src/ui/gui/data-editor.glade:1002
-msgid "Weight Status Area"
-msgstr "Área de Status dos Pesos"
+#: src/language/stats/t-test.q:747
+msgid "t-test for Equality of Means"
+msgstr "teste t para Igualdade de Médias"
 
-#: src/ui/gui/data-editor.glade:1028
-msgid "Split File Status Area"
-msgstr "Área de Status da Divisão de Arquivos"
+#: src/language/stats/t-test.q:750 src/language/stats/t-test.q:1103
+msgid "Sig."
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1058
-msgid "Variable Type"
-msgstr "Tipo da Variável"
+#: src/language/stats/t-test.q:754 src/language/stats/t-test.q:1012
+msgid "Mean Difference"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1094 src/ui/gui/psppire-var-store.c:599
-msgid "Comma"
-msgstr "Vírgula"
+#: src/language/stats/t-test.q:755
+msgid "Std. Error Difference"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1110 src/ui/gui/psppire-var-store.c:600
-msgid "Dot"
-msgstr "Ponto"
+#: src/language/stats/t-test.q:760 src/language/stats/t-test.q:914
+#: src/language/stats/t-test.q:1004
+#, c-format
+msgid "%g%% Confidence Interval of the Difference"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1126
-msgid "Scientific notation"
-msgstr "Notação Científica"
+#: src/language/stats/t-test.q:814
+msgid "Equal variances assumed"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1142 src/ui/gui/psppire-var-store.c:602
-msgid "Date"
-msgstr "Data"
+#: src/language/stats/t-test.q:860
+msgid "Equal variances not assumed"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1158 src/ui/gui/psppire-var-store.c:603
-msgid "Dollar"
-msgstr "Moeda"
+#: src/language/stats/t-test.q:904
+msgid "Paired Samples Test"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1174
-msgid "Custom currency"
-msgstr "Moeda Personalizada"
+#: src/language/stats/t-test.q:907
+msgid "Paired Differences"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1268
-msgid "positive"
-msgstr "positivo"
+#: src/language/stats/t-test.q:919
+msgid "Std. Error Mean"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1274
-msgid "negative"
-msgstr "negativo"
+#: src/language/stats/t-test.q:993
+msgid "One-Sample Test"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1287
-msgid "Sample"
-msgstr "Amostra"
+#: src/language/stats/t-test.q:998
+#, c-format
+msgid "Test Value = %f"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1337
-msgid "Width:"
-msgstr "Tamanho:"
+#: src/language/stats/t-test.q:1098
+msgid "Paired Samples Correlations"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1381
-msgid "Decimal Places:"
-msgstr "Casas Decimais:"
+#: src/language/stats/t-test.q:1102
+msgid "Correlation"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1550
-msgid "Value Label:"
-msgstr "Value Label:"
+#: src/language/stats/t-test.q:1113
+#, c-format
+msgid "%s & %s"
+msgstr ""
 
-#: src/ui/gui/data-editor.glade:1563 src/ui/gui/psppire.glade:2544
-#: src/ui/gui/recode.glade:185
-msgid "Value:"
-msgstr "Valor:"
+#: src/language/data-io/file-handle.q:65
+#, c-format
+msgid ""
+"File handle %s is already defined.  Use CLOSE FILE HANDLE before redefining "
+"a file handle."
+msgstr ""
+"Manipulador de arquivo %s já está definido. Use CLOSE FILE HANDLER antes de "
+"redefinir um manipulador."
 
-#: src/ui/gui/data-editor.glade:1700 src/ui/gui/examine.glade:423
-#: src/ui/gui/t-test.glade:460
-msgid "Missing Values"
-msgstr "Missing Values"
+#: src/language/data-io/file-handle.q:120
+msgid "RECFORM must be specified with MODE=360."
+msgstr "RECFORM deve ser especificado com MODE=360"
 
-#: src/ui/gui/data-editor.glade:1718
-msgid "_Range plus one optional discrete missing value"
+#: src/language/data-io/file-handle.q:131
+#, fuzzy, c-format
+msgid ""
+"The specified file mode requires LRECL.  Assuming %zu-character records."
 msgstr ""
+"O modo de arquivo especificado requer LRECL. Assumindo registros de %d "
+"caracteres."
 
-#: src/ui/gui/data-editor.glade:1743
-msgid "_Low:"
-msgstr "_Menor:"
-
-#: src/ui/gui/data-editor.glade:1772
-msgid "_High:"
-msgstr "Ma_ior:"
+#: src/language/data-io/file-handle.q:135
+#, c-format
+msgid ""
+"Record length (%ld) must be between 1 and %lu bytes.  Assuming %d-character "
+"records."
+msgstr ""
+"Tamanho de registro (%ld) deve ser entre 1 e %lu bytes. Assumindo registros "
+"de %d caracteres."
 
-#: src/ui/gui/data-editor.glade:1813
-msgid "Di_screte value:"
-msgstr "Valor Di_screto:"
+#: src/language/data-io/file-handle.q:177
+msgid "file"
+msgstr "arquivo"
 
-#: src/ui/gui/data-editor.glade:1860
-msgid "_No missing values"
-msgstr "Sem missi_ng values"
+#: src/language/data-io/file-handle.q:179
+msgid "inline file"
+msgstr "arquivo inline"
 
-#: src/ui/gui/data-editor.glade:1878
-msgid "_Discrete missing values"
-msgstr "Missing values _discretos"
+#: src/language/data-io/file-handle.q:205
+msgid "expecting a file name or handle name"
+msgstr "esperando nome de arquivo ou de manipulador"
 
-#: src/ui/gui/descriptives-dialog.c:40 src/ui/gui/frequencies-dialog.c:41
-msgid "Standard deviation"
-msgstr "Desvio padrão"
+#: src/language/data-io/file-handle.q:225
+#, c-format
+msgid "Handle for %s not allowed here."
+msgstr "Manipulador para %s não é permitido aqui."
 
-#: src/ui/gui/descriptives-dialog.c:45
-msgid "Standard error"
-msgstr "Erro padrão"
+#: src/language/data-io/list.q:99
+#, c-format
+msgid ""
+"The first case (%ld) specified precedes the last case (%ld) specified.  The "
+"values will be swapped."
+msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:122 src/ui/gui/frequencies.glade:139
-msgid "Statistics:"
-msgstr "Estatísticas:"
+#: src/language/data-io/list.q:107
+#, c-format
+msgid ""
+"The first case (%ld) to list is less than 1.  The value is being reset to 1."
+msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:184
-msgid "Exclude entire case if any selected variable is missing"
-msgstr "Excluir o caso completo se qualquer variável selecionada for um missing"
+#: src/language/data-io/list.q:113
+#, c-format
+msgid ""
+"The last case (%ld) to list is less than 1.  The value is being reset to 1."
+msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:194
-msgid "Include user-missing data in analysis"
-msgstr "Incluir user-missing na análise"
+#: src/language/data-io/list.q:119
+#, c-format
+msgid "The step value %ld is less than 1.  The value is being reset to 1."
+msgstr ""
 
-#: src/ui/gui/descriptives-dialog.glade:207
-msgid "Save Z-scores of selected variables as new variables"
-msgstr "Salvar Z-score da variável selecionada como novas variáveis"
+#: src/ui/gui/binomial.ui:57 src/ui/gui/chi-square.ui:57
+#, fuzzy
+msgid "_Test Variable List:"
+msgstr "Variável(is) de teste:"
 
-#: src/ui/gui/descriptives-dialog.glade:223
-msgid "Options:"
-msgstr "Opções:"
+#: src/ui/gui/binomial.ui:126 src/ui/gui/chi-square.ui:126
+msgid "_Get from data"
+msgstr ""
 
-#: src/ui/gui/examine.glade:132
-msgid "Dependent List:"
-msgstr "Lista Dependente:"
+#: src/ui/gui/binomial.ui:143 src/ui/gui/t-test.ui:333
+msgid "_Cut point:"
+msgstr "Ponto de _corte:"
 
-#: src/ui/gui/examine.glade:180
-msgid "Factor List:"
-msgstr "Lista de Fator:"
+#: src/ui/gui/binomial.ui:178
+msgid "Define Dichotomy"
+msgstr ""
 
-#: src/ui/gui/examine.glade:218
-msgid "Label Cases by:"
-msgstr "Inserir Label nos Casos por:"
+#: src/ui/gui/binomial.ui:197
+msgid "Test _Proportion:"
+msgstr ""
 
-#: src/ui/gui/examine.glade:255 src/ui/gui/t-test.glade:69
-#: src/ui/gui/t-test.glade:629 src/ui/gui/t-test.glade:780
-msgid "Options..."
-msgstr "Opções..."
+#: src/ui/gui/correlation.ui:7
+#, fuzzy
+msgid "Bivariate Correlations"
+msgstr "_Correlação Bivariada"
 
-#: src/ui/gui/examine.glade:316
-msgid "Extremes"
-msgstr "Extremos"
+#: src/ui/gui/correlation.ui:108
+#, fuzzy
+msgid "Pearso_n"
+msgstr "R de Pearson"
 
-#: src/ui/gui/examine.glade:382
-msgid "Exclude cases listwise"
+#: src/ui/gui/correlation.ui:123
+msgid "_Kendall's tau-b"
 msgstr ""
 
-#: src/ui/gui/examine.glade:392
-msgid "Exclude cases pairwise"
+#: src/ui/gui/correlation.ui:138
+msgid "_Spearman"
 msgstr ""
 
-#: src/ui/gui/examine.glade:406
-msgid "Repeat values"
-msgstr "Repetir valores"
+#: src/ui/gui/correlation.ui:158
+#, fuzzy
+msgid "Correlation Coefficients"
+msgstr "Coeficientes"
 
-#: src/ui/gui/find-dialog.c:659
-#, c-format
-msgid "Bad regular expression: %s"
-msgstr "Expressão regular mal formada: %s"
+#: src/ui/gui/correlation.ui:182
+#, fuzzy
+msgid "_Two-tailed"
+msgstr "Total"
 
-#: src/ui/gui/frequencies-dialog.c:44
-msgid "Standard error of the mean"
-msgstr "Erro padrão da média"
+#: src/ui/gui/correlation.ui:198
+msgid "One-tai_led"
+msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:47
-msgid "Standard error of the skewness"
-msgstr "Erro padrão do skewness"
+#: src/ui/gui/correlation.ui:220
+msgid "Test of Significance"
+msgstr ""
 
-#: src/ui/gui/frequencies-dialog.c:51
-msgid "Standard error of the kurtosis"
-msgstr "Erro padrão do kurtosis"
+#: src/ui/gui/correlation.ui:232
+msgid "_Flag significant correlations"
+msgstr ""
 
-#: src/ui/gui/frequencies.glade:98 src/ui/gui/psppire.glade:265
-#: src/ui/gui/rank.glade:67
-msgid "Variable(s):"
-msgstr "Variável(is):"
+#: src/ui/gui/crosstabs.ui:7
+#, fuzzy
+msgid "Crosstabs"
+msgstr "_Crosstabs"
 
-#: src/ui/gui/frequencies.glade:168
-msgid "Display Frequency Table"
-msgstr "Exibir Tabela de Frequência"
+#: src/ui/gui/crosstabs.ui:50
+msgid "Rows"
+msgstr "Linhas"
 
-#: src/ui/gui/frequencies.glade:264
-msgid "Ascending Order"
-msgstr "Ordem Ascendente"
+#: src/ui/gui/crosstabs.ui:124
+msgid "Format..."
+msgstr "Formato..."
 
-#: src/ui/gui/frequencies.glade:275
-msgid "Descending Order"
-msgstr "Ordem Descendente"
+#: src/ui/gui/crosstabs.ui:137 src/ui/gui/examine.ui:245
+#: src/ui/gui/regression.ui:27
+msgid "Statistics..."
+msgstr "Estatísticas..."
 
-#: src/ui/gui/frequencies.glade:290
-msgid "Ascending Counts"
-msgstr "Contagens Ascendentes"
+#: src/ui/gui/crosstabs.ui:150
+msgid "Cells..."
+msgstr "Células..."
 
-#: src/ui/gui/frequencies.glade:305
-msgid "Descending Counts"
-msgstr "Contagens Descendentes"
+#: src/ui/gui/crosstabs.ui:227
+#, fuzzy
+msgid "Crosstabs: Format"
+msgstr "_Crosstabs"
 
-#: src/ui/gui/frequencies.glade:323
-msgid "Order by"
-msgstr "Ordenar por"
+#: src/ui/gui/crosstabs.ui:241
+msgid "Print tables"
+msgstr "Imprimir tabelas"
 
-#: src/ui/gui/frequencies.glade:355
-msgid "Supress tables with more than N categories"
-msgstr "Ocultar tabelas com mais de N categorias"
+#: src/ui/gui/crosstabs.ui:254
+msgid "Pivot"
+msgstr "Pivô"
 
-#: src/ui/gui/frequencies.glade:371
-msgid "Maximum no of categories"
-msgstr "Número máximo de categorias"
+#: src/ui/gui/crosstabs.ui:267 src/ui/gui/sort.ui:130
+msgid "Ascending"
+msgstr "Ascendente"
 
-#: src/ui/gui/helper.c:139
-msgid "Sorry. The help system hasn't yet been implemented."
-msgstr "Desculpe. O sistema de ajuda ainda não foi implementado."
+#: src/ui/gui/crosstabs.ui:304
+msgid "No label"
+msgstr "Sem rótulo"
 
-#: src/ui/gui/helper.c:165
-#, c-format
-msgid "Cannot open reference manual: %s"
-msgstr "Impossível abrir manual de referência: %s"
+#: src/ui/gui/crosstabs.ui:317
+msgid "Suppress value labels"
+msgstr "Ocultar rótulos de valores"
 
-#: src/ui/gui/message-dialog.c:101
-msgid "data file error"
-msgstr "erro no arquivo de dados"
+#: src/ui/gui/crosstabs.ui:335
+msgid "Labeling"
+msgstr "Rotulando"
 
-#: src/ui/gui/message-dialog.c:106
-msgid "PSPP error"
-msgstr "Erro no PSPP"
+#: src/ui/gui/crosstabs.ui:369
+#, fuzzy
+msgid "Crosstabs: Cells"
+msgstr "_Crosstabs"
 
-#: src/ui/gui/message-dialog.c:114
-msgid "syntax warning"
-msgstr "aviso na sintaxe"
+#: src/ui/gui/crosstabs.ui:402
+msgid "Cell Display"
+msgstr "Visualizar Célula"
 
-#: src/ui/gui/message-dialog.c:118
-msgid "data file warning"
-msgstr "aviso no arquivo de dados"
+#: src/ui/gui/crosstabs.ui:430
+#, fuzzy
+msgid "Crosstabs: Statistics"
+msgstr "Testes estatísticos"
 
-#: src/ui/gui/message-dialog.c:123
-msgid "PSPP warning"
-msgstr "aviso do PSPP"
+#: src/ui/gui/crosstabs.ui:463 src/ui/gui/oneway.ui:222
+#: src/ui/gui/regression.ui:340
+msgid "Statistics"
+msgstr "Estatísticas"
 
-#: src/ui/gui/message-dialog.c:132
-msgid "syntax information"
-msgstr "informação da sintaxe"
+#: src/ui/gui/chi-square.ui:13
+#, fuzzy
+msgid "Chi-Square Test"
+msgstr "Teste Chi-quadrado"
 
-#: src/ui/gui/message-dialog.c:136
-msgid "data file information"
-msgstr "informação do arquivo de dados"
+#: src/ui/gui/chi-square.ui:140
+msgid "Use _specified range"
+msgstr ""
 
-#: src/ui/gui/message-dialog.c:141
-msgid "PSPP information"
-msgstr "Informação do PSPP"
+#: src/ui/gui/chi-square.ui:162
+#, fuzzy
+msgid "_Lower:"
+msgstr "Mínimo"
 
-#: src/ui/gui/message-dialog.c:209
-msgid "The PSPP processing engine reported the following message:"
-msgid_plural "The PSPP processing engine reported the following messages:"
-msgstr[0] ""
-msgstr[1] ""
+#: src/ui/gui/chi-square.ui:170
+#, fuzzy
+msgid "_Upper:"
+msgstr "Máximo"
 
-#: src/ui/gui/message-dialog.c:216
-#, c-format
-msgid "The PSPP processing engine reported %d message."
-msgid_plural "The PSPP processing engine reported %d messages."
-msgstr[0] ""
-msgstr[1] ""
+#: src/ui/gui/chi-square.ui:214
+#, fuzzy
+msgid "Expected Range:"
+msgstr "N esperado"
 
-#: src/ui/gui/message-dialog.c:223
-#, c-format
-msgid "%d of these messages are displayed below."
-msgid_plural "%d of these messages are displayed below."
-msgstr[0] ""
-msgstr[1] ""
+#: src/ui/gui/chi-square.ui:240
+msgid "All categor_ies equal"
+msgstr ""
 
-#: src/ui/gui/message-dialog.glade:8
-msgid "Messages Reported"
-msgstr "Mensagens Reportadas"
+#: src/ui/gui/chi-square.ui:257
+#, fuzzy
+msgid "_Values"
+msgstr "Valores"
 
-#: src/ui/gui/message-dialog.glade:42
-msgid "The PSPP processor reported # errors.  The first # and last # are shown below:"
-msgstr "O processador do PSPP reportou # erros. O primeiro # e o último # estão abaixo:"
+#: src/ui/gui/chi-square.ui:301
+#, fuzzy
+msgid "Expected Values:"
+msgstr "N esperado"
 
-#: src/ui/gui/message-dialog.glade:94
-msgid "gtk-close"
-msgstr "gtk-close"
+#: src/ui/gui/descriptives.ui:130 src/ui/gui/frequencies.ui:140
+msgid "Statistics:"
+msgstr "Estatísticas:"
 
-#: src/ui/gui/missing-val-dialog.c:115 src/ui/gui/missing-val-dialog.c:160
-msgid "Incorrect value for variable type"
-msgstr "Valor incorreto para tipo de variável"
+#: src/ui/gui/descriptives.ui:192
+msgid "Exclude entire case if any selected variable is missing"
+msgstr ""
+"Excluir o caso completo se qualquer variável selecionada for um missing"
 
-#: src/ui/gui/missing-val-dialog.c:136 src/ui/gui/missing-val-dialog.c:143
-msgid "Incorrect range specification"
-msgstr "Especificação incorreta de intervalo"
+#: src/ui/gui/descriptives.ui:207
+msgid "Include user-missing data in analysis"
+msgstr "Incluir user-missing na análise"
 
-#: src/ui/gui/oneway-anova-dialog.c:335
-#, c-format
-msgid "Contrast %d of %d"
-msgstr "Contraste %d de %d"
+#: src/ui/gui/descriptives.ui:222
+msgid "Save Z-scores of selected variables as new variables"
+msgstr "Salvar Z-score da variável selecionada como novas variáveis"
 
-#: src/ui/gui/oneway.glade:30
-msgid "_Factor:"
-msgstr "_Fator:"
+#: src/ui/gui/descriptives.ui:243
+msgid "Options:"
+msgstr "Opções:"
 
-#: src/ui/gui/oneway.glade:66
-msgid "Dependent _Variable(s):"
-msgstr "_Variável(s) Dependente(s)"
+#: src/ui/gui/examine.ui:8
+#, fuzzy
+msgid "Explore"
+msgstr "_Explorar"
 
-#: src/ui/gui/oneway.glade:190
-msgid "_Homogeneity"
-msgstr "_Homogeneidade"
+#: src/ui/gui/examine.ui:51
+msgid "Label Cases by:"
+msgstr "Rotular casos por:"
 
-#: src/ui/gui/oneway.glade:226
-msgid "_Contrasts..."
-msgstr "_Contrastes..."
+#: src/ui/gui/examine.ui:99
+msgid "Factor List:"
+msgstr "Lista de Fator:"
 
-#: src/ui/gui/oneway.glade:309
-msgid "gtk-go-back"
-msgstr "gtk-go-back"
+#: src/ui/gui/examine.ui:146
+msgid "Dependent List:"
+msgstr "Lista Dependente:"
 
-#: src/ui/gui/oneway.glade:320
-msgid "gtk-go-forward"
-msgstr "gtk-go-forward"
+#: src/ui/gui/examine.ui:259 src/ui/gui/t-test.ui:68 src/ui/gui/t-test.ui:658
+#: src/ui/gui/t-test.ui:819
+msgid "Options..."
+msgstr "Opções..."
 
-#: src/ui/gui/oneway.glade:343
-msgid "_Coefficients:"
-msgstr "_Coeficientes:"
+#: src/ui/gui/examine.ui:302
+#, fuzzy
+msgid "Explore: Statistics"
+msgstr "Testes estatísticos"
 
-#: src/ui/gui/oneway.glade:389
-msgid "Coefficient Total: "
-msgstr "Coeficiente Total: "
+#: src/ui/gui/examine.ui:332
+msgid "Extremes"
+msgstr "Extremos"
 
-#: src/ui/gui/oneway.glade:422
-msgid "Contrast 1 of 1"
-msgstr "Contraste 1 de 1"
+#: src/ui/gui/examine.ui:381
+msgid "Explore: Options"
+msgstr ""
 
-#: src/ui/gui/output-viewer.glade:32
-msgid "gtk-save"
-msgstr "gtk-save"
+#: src/ui/gui/examine.ui:405
+msgid "Exclude cases listwise"
+msgstr ""
 
-#: src/ui/gui/output-viewer.glade:41
-msgid "gtk-save-as"
-msgstr "gtk-save-as"
+#: src/ui/gui/examine.ui:419
+msgid "Exclude cases pairwise"
+msgstr ""
 
-#: src/ui/gui/output-viewer.glade:65
-msgid "gtk-copy"
-msgstr "gtk-copy"
+#: src/ui/gui/examine.ui:434
+msgid "Repeat values"
+msgstr "Repetir valores"
 
-#: src/ui/gui/psppire-buttonbox.c:143
-msgid "Buttons"
-msgstr "Botões"
+#: src/ui/gui/examine.ui:455 src/ui/gui/t-test.ui:493
+#: src/ui/gui/var-sheet-dialogs.ui:684
+msgid "Missing Values"
+msgstr "Valores Missing"
 
-#: src/ui/gui/psppire-buttonbox.c:144
-msgid "The mask that decides what buttons appear in the button box"
-msgstr "A máscara que decide qual botão irá aparecer na caixa de botões"
+#: src/ui/gui/factor.ui:21
+#, fuzzy
+msgid "Factor Analysis"
+msgstr "Lista de Fator:"
 
-#: src/ui/gui/psppire-buttonbox.c:273 src/ui/gui/psppire-buttonbox.c:429
-msgid "Continue"
-msgstr "Continuar"
+#: src/ui/gui/factor.ui:47
+#, fuzzy
+msgid "_Descriptives..."
+msgstr "Descritivas"
 
-#: src/ui/gui/psppire-buttonbox.c:427
-msgid "OK"
-msgstr "OK"
+#: src/ui/gui/factor.ui:60
+#, fuzzy
+msgid "_Extraction..."
+msgstr "Opções..."
 
-#: src/ui/gui/psppire-buttonbox.c:428
-msgid "Go To"
-msgstr "Ir Para"
+#: src/ui/gui/factor.ui:74
+#, fuzzy
+msgid "_Rotations..."
+msgstr "Opções..."
 
-#: src/ui/gui/psppire-buttonbox.c:430
-msgid "Cancel"
-msgstr "Cancelar"
+#: src/ui/gui/factor.ui:192
+msgid "Factor Analysis: Extraction"
+msgstr ""
 
-#: src/ui/gui/psppire-buttonbox.c:431
-msgid "Help"
-msgstr "Ajuda"
+#: src/ui/gui/factor.ui:216
+#, fuzzy
+msgid "Method: "
+msgstr "Modo:"
 
-#: src/ui/gui/psppire-buttonbox.c:432
-msgid "Reset"
-msgstr "Reiniciar"
+#: src/ui/gui/factor.ui:266
+msgid "Correlation matrix"
+msgstr ""
 
-#: src/ui/gui/psppire-buttonbox.c:433
-msgid "Paste"
-msgstr "Colar"
+#: src/ui/gui/factor.ui:280
+#, fuzzy
+msgid "Covariance matrix"
+msgstr "Co-variança"
 
-#: src/ui/gui/psppire-data-editor.c:617
-msgid "Data View"
-msgstr "Visualização de dados"
+#: src/ui/gui/factor.ui:300
+#, fuzzy
+msgid "Analyse"
+msgstr "_Analisar"
 
-#: src/ui/gui/psppire-data-editor.c:620
-msgid "Variable View"
-msgstr "Visualização de variáveis"
+#: src/ui/gui/factor.ui:324
+msgid "Unrotatated factor solution"
+msgstr ""
 
-#: src/ui/gui/psppire-data-store.c:828
-msgid "var"
-msgstr "var"
+#: src/ui/gui/factor.ui:338
+msgid "Scree plot"
+msgstr ""
 
-#: src/ui/gui/psppire-data-store.c:949 src/ui/gui/psppire-var-store.c:840
-#, c-format
-msgid "%ld"
-msgstr "%ld"
+#: src/ui/gui/factor.ui:357 src/ui/gui/roc.ui:286
+#, fuzzy
+msgid "Display"
+msgstr "Visualizar Célula"
 
-#: src/ui/gui/psppire-var-sheet.c:100
-msgid "Name"
-msgstr "Nome"
+#: src/ui/gui/factor.ui:430
+msgid "Number of factors:"
+msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:102 src/ui/gui/psppire.glade:2187
-msgid "Width"
-msgstr "Tamanho"
+#: src/ui/gui/factor.ui:460
+msgid "Extract"
+msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:103
-msgid "Decimals"
-msgstr "Decimais"
+#: src/ui/gui/factor.ui:475 src/ui/gui/factor.ui:665
+msgid "Maximum iterations for convergence:"
+msgstr ""
 
-#: src/ui/gui/psppire-var-sheet.c:105
-msgid "Values"
+#: src/ui/gui/factor.ui:538
+#, fuzzy
+msgid "Factor Analysis: Rotation"
+msgstr "Lista de Fator:"
+
+#: src/ui/gui/factor.ui:571
+#, fuzzy
+msgid "_None"
+msgstr "Nenhum"
+
+#: src/ui/gui/factor.ui:582
+#, fuzzy
+msgid "_Varimax"
+msgstr "_Variáveis"
+
+#: src/ui/gui/factor.ui:598
+msgid "_Quartimax"
+msgstr ""
+
+#: src/ui/gui/factor.ui:614
+msgid "_Equimax"
+msgstr ""
+
+#: src/ui/gui/factor.ui:637
+#, fuzzy
+msgid "Method"
+msgstr "Modo:"
+
+#: src/ui/gui/factor.ui:648
+#, fuzzy
+msgid "_Display rotated solution"
+msgstr "informação do arquivo de dados"
+
+#: src/ui/gui/find.ui:8
+msgid "Find Case"
+msgstr "Localizar Casos"
+
+#: src/ui/gui/find.ui:88
+msgid "Variable:"
+msgstr "Variável:"
+
+#: src/ui/gui/find.ui:124 src/ui/gui/recode.ui:173
+#: src/ui/gui/var-sheet-dialogs.ui:531
+msgid "Value:"
+msgstr "Valor:"
+
+#: src/ui/gui/find.ui:147
+msgid "Search value labels"
+msgstr "Procurar por rótulos de valores"
+
+#: src/ui/gui/find.ui:171
+msgid "Regular expression Match"
+msgstr "Casamento da expressão Regular"
+
+#: src/ui/gui/find.ui:187
+msgid "Search substrings"
+msgstr "Procurar sub-strings"
+
+#: src/ui/gui/find.ui:203
+msgid "Wrap around"
+msgstr ""
+
+#: src/ui/gui/find.ui:218
+msgid "Search backward"
+msgstr "Pesquisa reversa"
+
+#: src/ui/gui/frequencies.ui:102 src/ui/gui/psppire.ui:282
+#: src/ui/gui/rank.ui:105
+msgid "Variable(s):"
+msgstr "Variável(is):"
+
+#: src/ui/gui/frequencies.ui:151
+#, fuzzy
+msgid "Include missing values"
+msgstr "Sem valores _missing"
+
+#: src/ui/gui/frequencies.ui:189
+#, fuzzy
+msgid "Charts..."
+msgstr "_Contrastes..."
+
+#: src/ui/gui/frequencies.ui:201
+#, fuzzy
+msgid "Frequency Tables..."
+msgstr "Frequência da Variável"
+
+#: src/ui/gui/frequencies.ui:251
+#, fuzzy
+msgid "Frequencies: Frequency Tables"
+msgstr "Exibir Tabela de Frequência"
+
+#: src/ui/gui/frequencies.ui:281
+msgid "Always"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:297
+msgid "Never"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:316
+msgid "If no more than "
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:347
+#, fuzzy
+msgid "values"
 msgstr "Valores"
 
-#: src/ui/gui/psppire-var-sheet.c:108
-msgid "Align"
-msgstr "Alinhamento"
+#: src/ui/gui/frequencies.ui:368
+#, fuzzy
+msgid "Display frequency tables"
+msgstr "Exibir Tabela de Frequência"
 
-#: src/ui/gui/psppire-var-sheet.c:109
-msgid "Measure"
-msgstr "Medida"
+#: src/ui/gui/frequencies.ui:396
+#, fuzzy
+msgid "Ascending value"
+msgstr "Ascendente"
 
-#: src/ui/gui/psppire-var-store.c:601
-msgid "Scientific"
-msgstr "Científica"
+#: src/ui/gui/frequencies.ui:412
+#, fuzzy
+msgid "Descending value"
+msgstr "Descendente"
 
-#: src/ui/gui/psppire-var-store.c:604
-msgid "Custom"
-msgstr "Personalizado"
+#: src/ui/gui/frequencies.ui:428
+#, fuzzy
+msgid "Ascending frequency"
+msgstr "Ordem Ascendente"
 
-#: src/ui/gui/psppire-var-store.c:675 src/ui/gui/psppire-var-store.c:685
-#: src/ui/gui/psppire-var-store.c:695
-#, c-format
-msgid "%d"
-msgstr "%d"
+#: src/ui/gui/frequencies.ui:444
+#, fuzzy
+msgid "Descending frequency"
+msgstr "Ordem Descendente"
 
-#: src/ui/gui/psppire.c:206
-msgid "_Reset"
-msgstr "_Reiniciar"
+#: src/ui/gui/frequencies.ui:466
+msgid "Order by"
+msgstr "Ordenar por"
 
-#: src/ui/gui/psppire.c:207
-msgid "_Select"
-msgstr "_Selecionar"
+#: src/ui/gui/frequencies.ui:508
+#, fuzzy
+msgid "Frequencies: Charts"
+msgstr "Frequência"
+
+#: src/ui/gui/frequencies.ui:536
+#, fuzzy
+msgid "Exclude values below "
+msgstr "Excluir casos _listwise"
 
-#: src/ui/gui/psppire.glade:11
-msgid "This is beta status software.  Please report bugs to bug-gnu-pspp@gnu.org"
+#: src/ui/gui/frequencies.ui:571
+msgid "Exclude values above "
 msgstr ""
 
-#: src/ui/gui/psppire.glade:73 src/ui/gui/psppire.glade:154
-#: src/ui/gui/weight-cases-dialog.c:80
-msgid "Do not weight cases"
-msgstr "Não ponderar casos"
+#: src/ui/gui/frequencies.ui:609
+#, fuzzy
+msgid "<b>Chart Formatting</b>"
+msgstr "<b>Quoting</b>"
+
+#: src/ui/gui/frequencies.ui:633
+msgid "Draw histograms"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:645
+msgid "Superimpose normal curve"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:661
+#, fuzzy
+msgid "Scale:"
+msgstr "Escalar"
+
+#: src/ui/gui/frequencies.ui:682
+#, fuzzy
+msgid "Percentages"
+msgstr "Percentis"
+
+#: src/ui/gui/frequencies.ui:705
+#, fuzzy
+msgid "<b>Histograms</b>"
+msgstr "<b>Separadores</b>"
+
+#: src/ui/gui/frequencies.ui:729
+msgid "Draw pie charts"
+msgstr ""
+
+#: src/ui/gui/frequencies.ui:741
+#, fuzzy
+msgid "Include slices for missing values"
+msgstr "Valores missing _discretos"
+
+#: src/ui/gui/frequencies.ui:758
+#, fuzzy
+msgid "<b>Pie Charts</b>"
+msgstr "<b>Separadores</b>"
+
+#: src/ui/gui/oneway.ui:8
+#, fuzzy
+msgid "One-Way ANOVA"
+msgstr "_ANOVA de Um Fator"
+
+#: src/ui/gui/oneway.ui:31
+msgid "_Factor:"
+msgstr "_Fator:"
+
+#: src/ui/gui/oneway.ui:69
+msgid "Dependent _Variable(s):"
+msgstr "_Variável(s) Dependente(s)"
+
+#: src/ui/gui/oneway.ui:184 src/ui/gui/data-editor.ui:328
+msgid "_Descriptives"
+msgstr "_Descritivas"
+
+#: src/ui/gui/oneway.ui:200
+msgid "_Homogeneity"
+msgstr "_Homogeneidade"
+
+#: src/ui/gui/oneway.ui:238
+msgid "_Contrasts..."
+msgstr "_Contrastes..."
+
+#: src/ui/gui/oneway.ui:292
+#, fuzzy
+msgid "One-Way ANOVA: Contrasts"
+msgstr "_ANOVA de Um Fator"
+
+#: src/ui/gui/oneway.ui:369
+msgid "_Coefficients:"
+msgstr "_Coeficientes:"
+
+#: src/ui/gui/oneway.ui:416
+msgid "Coefficient Total: "
+msgstr "Coeficiente Total: "
 
-#: src/ui/gui/psppire.glade:83
+#: src/ui/gui/oneway.ui:452
+msgid "Contrast 1 of 1"
+msgstr "Contraste 1 de 1"
+
+#: src/ui/gui/psppire.ui:7
+msgid "Weight Cases"
+msgstr "Ponderar Casos"
+
+#: src/ui/gui/psppire.ui:66
 msgid "Weight cases by"
 msgstr "Ponderar casos por"
 
-#: src/ui/gui/psppire.glade:107
+#: src/ui/gui/psppire.ui:102
 msgid "Frequency Variable"
 msgstr "Frequência da Variável"
 
-#: src/ui/gui/psppire.glade:147
+#: src/ui/gui/psppire.ui:145
 msgid "Current Status: "
 msgstr "Status Atual: "
 
-#: src/ui/gui/psppire.glade:314
+#: src/ui/gui/psppire.ui:195
+#, fuzzy
+msgid "Transpose"
+msgstr "_Transpor"
+
+#: src/ui/gui/psppire.ui:247
 msgid "Name Variable:"
 msgstr "Nome da Variável"
 
-#: src/ui/gui/psppire.glade:429
+#: src/ui/gui/psppire.ui:383
+msgid "Split File"
+msgstr "Dividir Arquivo"
+
+#: src/ui/gui/psppire.ui:443
 msgid "Analyze all cases.  Do not create groups."
 msgstr "Analisar todos os casos. Não criar grupos."
 
-#: src/ui/gui/psppire.glade:439
+#: src/ui/gui/psppire.ui:459
 msgid "Compare groups."
 msgstr "Comparar grupos."
 
-#: src/ui/gui/psppire.glade:452
+#: src/ui/gui/psppire.ui:475
 msgid "Organize output by groups."
 msgstr "Organizar saída por grupos."
 
-#: src/ui/gui/psppire.glade:499
+#: src/ui/gui/psppire.ui:533
 msgid "Groups based on:"
 msgstr "Grupos baseados em:"
 
-#: src/ui/gui/psppire.glade:563
+#: src/ui/gui/psppire.ui:592
 msgid "Sort the file by grouping variables."
 msgstr "Ordenar o arquivo agrupando variáveis."
 
-#: src/ui/gui/psppire.glade:574
+#: src/ui/gui/psppire.ui:609
 msgid "File is already sorted."
 msgstr "Arquivo já está ordenado."
 
-#: src/ui/gui/psppire.glade:618
+#: src/ui/gui/psppire.ui:662
 msgid "Current Status : "
 msgstr "Status Atual : "
 
-#: src/ui/gui/psppire.glade:626
+#: src/ui/gui/psppire.ui:673
 msgid "Analysis by groups is off"
 msgstr "Análise por grupos está desabilitada"
 
-#: src/ui/gui/psppire.glade:725
-msgid "Sort by:"
-msgstr "Ordenar por:"
-
-#: src/ui/gui/psppire.glade:788
-msgid "Descending"
-msgstr "Descendente"
-
-#: src/ui/gui/psppire.glade:804
-msgid "Sort Order"
-msgstr "Ordenação"
+#: src/ui/gui/psppire.ui:709
+#, fuzzy
+msgid "Compute Variable"
+msgstr "Variável de Saída"
 
-#: src/ui/gui/psppire.glade:873
+#: src/ui/gui/psppire.ui:742
 msgid "Target Variable:"
 msgstr "Variável alvo:"
 
-#: src/ui/gui/psppire.glade:904
+#: src/ui/gui/psppire.ui:771
 msgid "Type & Label"
-msgstr "Tipo & Label"
+msgstr "Tipo & Rótulo"
 
-#: src/ui/gui/psppire.glade:943
+#: src/ui/gui/psppire.ui:818
 msgid "="
 msgstr "="
 
-#: src/ui/gui/psppire.glade:989
+#: src/ui/gui/psppire.ui:872
 msgid "Numeric Expressions:"
 msgstr "Expressões Numéricas:"
 
-#: src/ui/gui/psppire.glade:1043
+#: src/ui/gui/psppire.ui:934
 msgid "Functions:"
 msgstr "Funções:"
 
-#: src/ui/gui/psppire.glade:1107 src/ui/gui/psppire.glade:1253
-#: src/ui/gui/recode.glade:731
+#: src/ui/gui/psppire.ui:999 src/ui/gui/psppire.ui:1422
+#: src/ui/gui/recode.ui:741
 msgid "If..."
 msgstr "Se..."
 
-#: src/ui/gui/psppire.glade:1223
-msgid "All Cases"
-msgstr "Todos os Casos"
+#: src/ui/gui/psppire.ui:1052
+msgid "Select Cases"
+msgstr "Selecionar Casos"
 
-#: src/ui/gui/psppire.glade:1239
-msgid "If condition is satisfied"
-msgstr "Se condição é satisfeita"
+#: src/ui/gui/psppire.ui:1240
+msgid "Use filter variable"
+msgstr "Usar variável de filtro"
+
+#: src/ui/gui/psppire.ui:1299
+msgid "Based on time or case range"
+msgstr "Baseado no tempo ou intervalo do caso"
+
+#: src/ui/gui/psppire.ui:1311
+msgid "Range..."
+msgstr "Intervalo..."
 
-#: src/ui/gui/psppire.glade:1291
+#: src/ui/gui/psppire.ui:1355
 msgid "Random sample of cases"
 msgstr "Amostra aleatória de casos"
 
-#: src/ui/gui/psppire.glade:1305
+#: src/ui/gui/psppire.ui:1368
 msgid "Sample..."
 msgstr "Amostra..."
 
-#: src/ui/gui/psppire.glade:1343
-msgid "Based on time or case range"
-msgstr "Baseado no tempo ou intervalo do caso"
-
-#: src/ui/gui/psppire.glade:1356
-msgid "Range..."
-msgstr "Intervalo..."
+#: src/ui/gui/psppire.ui:1410
+msgid "If condition is satisfied"
+msgstr "Se condição é satisfeita"
 
-#: src/ui/gui/psppire.glade:1394
-msgid "Use filter variable"
-msgstr "Usar variável de filtro"
+#: src/ui/gui/psppire.ui:1462
+msgid "All Cases"
+msgstr "Todos os Casos"
 
-#: src/ui/gui/psppire.glade:1556
+#: src/ui/gui/psppire.ui:1477
 msgid "Select"
 msgstr "Selecionar"
 
-#: src/ui/gui/psppire.glade:1586
+#: src/ui/gui/psppire.ui:1504
 msgid "Filtered"
 msgstr "Filtrado"
 
-#: src/ui/gui/psppire.glade:1596
+#: src/ui/gui/psppire.ui:1520
 msgid "Deleted"
 msgstr "Apagado"
 
-#: src/ui/gui/psppire.glade:1613
+#: src/ui/gui/psppire.ui:1543
 msgid "Unselected Cases Are"
 msgstr "Casos não selecionados São"
 
-#: src/ui/gui/psppire.glade:1678
+#: src/ui/gui/psppire.ui:1585
+#, fuzzy
+msgid "Data File Comments"
+msgstr "_Comentários do Arquivo de Dados"
+
+#: src/ui/gui/psppire.ui:1609
 msgid "Comments:"
 msgstr "Comentários:"
 
-#: src/ui/gui/psppire.glade:1720
+#: src/ui/gui/psppire.ui:1650
 msgid "Display comments in output"
 msgstr "Exibir comentários na saída"
 
-#: src/ui/gui/psppire.glade:1734
+#: src/ui/gui/psppire.ui:1669
 msgid "Column Number: 0"
 msgstr "Número da Coluna: 0"
 
-#: src/ui/gui/psppire.glade:1810
-msgid "Variable Information:"
-msgstr "Informação da Variável:"
+#: src/ui/gui/psppire.ui:1703
+#, fuzzy
+msgid "Select Cases: Range"
+msgstr "Selecionar Casos"
 
-#: src/ui/gui/psppire.glade:1836
-msgid ""
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-msgstr ""
+#: src/ui/gui/psppire.ui:1750
+msgid "First case"
+msgstr "Primeiro caso"
 
-#: src/ui/gui/psppire.glade:1900
-msgid "Observation"
-msgstr "Observação"
-
-#: src/ui/gui/psppire.glade:1910
+#: src/ui/gui/psppire.ui:1763
 msgid "Last case"
 msgstr "Último caso"
 
-#: src/ui/gui/psppire.glade:1923
-msgid "First case"
-msgstr "Primeiro caso"
+#: src/ui/gui/psppire.ui:1776
+msgid "Observation"
+msgstr "Observação"
+
+#: src/ui/gui/psppire.ui:1808
+msgid "Compute Variable: Type and Label"
+msgstr ""
 
-#: src/ui/gui/psppire.glade:2081
+#: src/ui/gui/psppire.ui:1843
 msgid "Use expression as label"
 msgstr "Usar expressão como rótulo"
 
-#: src/ui/gui/psppire.glade:2274
+#: src/ui/gui/psppire.ui:2088
+#, fuzzy
+msgid "Goto Case"
+msgstr "_Ir para Caso"
+
+#: src/ui/gui/psppire.ui:2106
 msgid "Goto Case Number:"
 msgstr "Ir Para Caso Número:"
 
-#: src/ui/gui/psppire.glade:2410
+#: src/ui/gui/psppire.ui:2149
+#, fuzzy
+msgid "Select Cases: Random Sample"
+msgstr "Selecionar Casos"
+
+#: src/ui/gui/psppire.ui:2247
 msgid "Sample Size"
 msgstr "Tamanho da Amostra"
 
-#: src/ui/gui/psppire.glade:2513
-msgid "Variable:"
-msgstr "Variável:"
-
-#: src/ui/gui/psppire.glade:2570
-msgid "Search value labels"
-msgstr "Procurar por rótulos de valores"
-
-#: src/ui/gui/psppire.glade:2593
-msgid "Regular expression Match"
-msgstr "Casamento da expressão Regular"
-
-#: src/ui/gui/psppire.glade:2603
-msgid "Search substrings"
-msgstr "Procurar sub-strings"
-
-#: src/ui/gui/psppire.glade:2615
-msgid "Wrap around"
-msgstr ""
-
-#: src/ui/gui/psppire.glade:2627
-msgid "Search backward"
-msgstr "Pesquisa reversa"
+#: src/ui/gui/rank.ui:8
+msgid "Rank Cases"
+msgstr "Ordenamento de Casos"
 
-#: src/ui/gui/rank.glade:111
+#: src/ui/gui/rank.ui:58
 msgid "By:"
 msgstr "Por:"
 
-#: src/ui/gui/rank.glade:197
+#: src/ui/gui/rank.ui:204
 msgid "_Smallest Value"
 msgstr "_Menor Valor"
 
-#: src/ui/gui/rank.glade:209
+#: src/ui/gui/rank.ui:221
 msgid "_Largest Value"
 msgstr "_Maior Valor"
 
-#: src/ui/gui/rank.glade:228
+#: src/ui/gui/rank.ui:245
 msgid "Assign rank 1 to:"
 msgstr ""
 
-#: src/ui/gui/rank.glade:246
+#: src/ui/gui/rank.ui:261
 msgid "_Display summary tables"
 msgstr "_Exibir tabelas de resumo"
 
-#: src/ui/gui/rank.glade:262
+#: src/ui/gui/rank.ui:279
 msgid "Rank T_ypes"
 msgstr "Tipos de _Ordenamento"
 
-#: src/ui/gui/rank.glade:273
+#: src/ui/gui/rank.ui:294
 msgid "_Ties..."
 msgstr ""
 
-#: src/ui/gui/rank.glade:343
-msgid "Ntiles"
-msgstr "Ntiles"
+#: src/ui/gui/rank.ui:346
+#, fuzzy
+msgid "Rank Cases: Types"
+msgstr "Ordenamento de Casos"
 
-#: src/ui/gui/rank.glade:376
-msgid "Rank"
-msgstr "Ordenamento"
+# lala
+#: src/ui/gui/rank.ui:366
+msgid "Sum of case weights"
+msgstr "Soma das ponderações dos casos"
 
-#: src/ui/gui/rank.glade:386
-msgid "Savage score"
+#: src/ui/gui/rank.ui:382
+msgid "Fractional rank as %"
 msgstr ""
 
-#: src/ui/gui/rank.glade:400
+#: src/ui/gui/rank.ui:396
 msgid "Fractional rank"
 msgstr ""
 
-#: src/ui/gui/rank.glade:414
-msgid "Fractional rank as %"
+#: src/ui/gui/rank.ui:410
+msgid "Savage score"
 msgstr ""
 
-# lala
-#: src/ui/gui/rank.glade:428
-msgid "Sum of case weights"
-msgstr "Soma dos pesos dos casos"
+#: src/ui/gui/rank.ui:424
+msgid "Rank"
+msgstr "Ordenamento"
 
-#: src/ui/gui/rank.glade:450
+#: src/ui/gui/rank.ui:438
+msgid "Ntiles"
+msgstr "Ntiles"
+
+#: src/ui/gui/rank.ui:481
 msgid "Proportion Estimates"
 msgstr "Estimativas de proporção"
 
-#: src/ui/gui/rank.glade:460
+#: src/ui/gui/rank.ui:494
 msgid "Normal Scores"
 msgstr ""
 
-#: src/ui/gui/rank.glade:495
+#: src/ui/gui/rank.ui:529
 msgid "Blom"
 msgstr "Blom"
 
-#: src/ui/gui/rank.glade:506
+#: src/ui/gui/rank.ui:543
 msgid "Tukey"
 msgstr "Tukey"
 
-#: src/ui/gui/rank.glade:520
+#: src/ui/gui/rank.ui:557
 msgid "Rankit"
 msgstr "Rankit"
 
-#: src/ui/gui/rank.glade:534
+#: src/ui/gui/rank.ui:571
 msgid "Van der Wärden"
 msgstr "Van der Wärden"
 
-#: src/ui/gui/rank.glade:551
+#: src/ui/gui/rank.ui:591
 msgid "Proportion Estimation Formula"
 msgstr ""
 
-#: src/ui/gui/rank.glade:614
+#: src/ui/gui/rank.ui:625
+#, fuzzy
+msgid "Rank Cases: Ties"
+msgstr "Ordenamento de Casos"
+
+#: src/ui/gui/rank.ui:651
 msgid "_Mean"
 msgstr "_Média"
 
-#: src/ui/gui/rank.glade:626
+#: src/ui/gui/rank.ui:668
 msgid "_Low"
 msgstr "_Mínimo"
 
-#: src/ui/gui/rank.glade:642
+#: src/ui/gui/rank.ui:686
 msgid "_High"
 msgstr "Máxim_o"
 
-#: src/ui/gui/rank.glade:660
+#: src/ui/gui/rank.ui:709
 msgid "_Sequential ranks to unique values"
 msgstr ""
 
-#: src/ui/gui/rank.glade:680
+#: src/ui/gui/rank.ui:732
 msgid "Rank Assigned to Ties"
 msgstr ""
 
-#: src/ui/gui/recode-dialog.c:879
-msgid "Recode into Different Variables"
-msgstr "Transformar para Variáveis Diferentes"
-
-#: src/ui/gui/recode-dialog.c:882
-msgid "Recode into Same Variables"
-msgstr "Transformar para a Mesma Variável"
+#: src/ui/gui/sort.ui:8
+#, fuzzy
+msgid "Sort Cases"
+msgstr "_Ordenar Casos"
 
-#: src/ui/gui/recode-dialog.c:913 src/ui/gui/recode-dialog.c:1015
-msgid "Old"
-msgstr "Antigo"
+#: src/ui/gui/sort.ui:79
+msgid "Sort by:"
+msgstr "Ordenar por:"
 
-#: src/ui/gui/recode-dialog.c:1274
-msgid "Recode into Different Variables: Old and New Values "
-msgstr "Transformar Para Diferentes Variáveis: Antigos e Novos Valores "
+#: src/ui/gui/sort.ui:146
+msgid "Descending"
+msgstr "Descendente"
 
-#: src/ui/gui/recode-dialog.c:1275
-msgid "Recode into Same Variables: Old and New Values"
-msgstr "Transformar Para a Mesma Variável: Antigos e Novos Valores"
+#: src/ui/gui/sort.ui:168
+msgid "Sort Order"
+msgstr "Ordenação"
 
-#: src/ui/gui/recode.glade:197
-msgid "System-Missing"
-msgstr "System-Missing"
+#: src/ui/gui/recode.ui:185 src/ui/gui/recode.ui:467
+msgid "System Missing"
+msgstr "Missing do sistema"
 
-#: src/ui/gui/recode.glade:211
-msgid "System-or user-missing"
-msgstr "System ou user-missing"
+#: src/ui/gui/recode.ui:199
+#, fuzzy
+msgid "System or User Missing"
+msgstr "Missing do sistema ou usuário"
 
-#: src/ui/gui/recode.glade:245
+#: src/ui/gui/recode.ui:237
 msgid "through"
 msgstr "até"
 
-#: src/ui/gui/recode.glade:283
+#: src/ui/gui/recode.ui:275
 msgid "Range, LOWEST thru value"
 msgstr "Intervalo, MENOR até valor"
 
-#: src/ui/gui/recode.glade:297
+#: src/ui/gui/recode.ui:289
 msgid "Range, value thru HIGHEST"
 msgstr "Intervalo, valor até MÁXIMO"
 
-#: src/ui/gui/recode.glade:327
+#: src/ui/gui/recode.ui:319
 msgid "All other values"
 msgstr "Todos os outros valores"
 
-#: src/ui/gui/recode.glade:363
+#: src/ui/gui/recode.ui:355
 msgid "Range:"
 msgstr "Intervalo:"
 
-#: src/ui/gui/recode.glade:380
+#: src/ui/gui/recode.ui:384
 msgid "Old Value"
 msgstr "Valores Antigos"
 
-#: src/ui/gui/recode.glade:462
-msgid "System Missing"
-msgstr "System Missing"
-
-#: src/ui/gui/recode.glade:476
+#: src/ui/gui/recode.ui:481
 msgid "Copy old values"
 msgstr "Copiar valores antigos"
 
-#: src/ui/gui/recode.glade:500
+#: src/ui/gui/recode.ui:505
 msgid "Value: "
 msgstr "Valor: "
 
-#: src/ui/gui/recode.glade:530
+#: src/ui/gui/recode.ui:538
 msgid "New Value"
 msgstr "Novo Valor"
 
-#: src/ui/gui/recode.glade:590
+#: src/ui/gui/recode.ui:596
 msgid "Convert numeric strings to numbers ('5' -> 5)"
 msgstr "Converter stringe numérica para número ('5' -> 5)"
 
-#: src/ui/gui/recode.glade:608
+#: src/ui/gui/recode.ui:614
 msgid "Output variables are strings"
 msgstr "Variáveis de outputt são strings"
 
-#: src/ui/gui/recode.glade:620
+#: src/ui/gui/recode.ui:629
 msgid "Width: "
 msgstr "Tamanho: "
 
-#: src/ui/gui/recode.glade:743
+#: src/ui/gui/recode.ui:757
 msgid "(optional case selection condition)"
 msgstr ""
 
-#: src/ui/gui/recode.glade:823
+#: src/ui/gui/recode.ui:838
 msgid "Name:"
 msgstr "Nome:"
 
-#: src/ui/gui/recode.glade:867
+#: src/ui/gui/recode.ui:881
 msgid "Change"
 msgstr "Mudar"
 
-#: src/ui/gui/recode.glade:885
+#: src/ui/gui/recode.ui:907
 msgid "Output Variable"
 msgstr "Variável de Saída"
 
-#: src/ui/gui/recode.glade:965
+#: src/ui/gui/recode.ui:981
 msgid "Old and New Values"
 msgstr "Antigos e Novos Valores"
 
-#: src/ui/gui/regression-dialog.c:40
-msgid "Coeff"
-msgstr "Coeff"
+#: src/ui/gui/regression.ui:41
+msgid "Save..."
+msgstr "Salvar..."
 
-#: src/ui/gui/regression-dialog.c:42
-msgid "Anova"
-msgstr "Anova"
+#: src/ui/gui/regression.ui:156
+msgid "Dependent"
+msgstr "Dependente"
+
+#: src/ui/gui/regression.ui:201
+msgid "Independent"
+msgstr "Independente"
+
+#: src/ui/gui/regression.ui:236
+#, fuzzy
+msgid "Regression: Save"
+msgstr "Regressão"
+
+#: src/ui/gui/regression.ui:250
+msgid "Predicted values"
+msgstr "Valores esperados"
+
+#: src/ui/gui/regression.ui:263
+msgid "Residuals"
+msgstr "Residuais"
+
+#: src/ui/gui/regression.ui:298
+#, fuzzy
+msgid "Regression: Statistics"
+msgstr "Testes estatísticos"
+
+#: src/ui/gui/reliability.ui:27
+msgid "Reliability Analysis"
+msgstr ""
+
+#: src/ui/gui/reliability.ui:114
+msgid "_Items:"
+msgstr ""
+
+#: src/ui/gui/reliability.ui:136
+#, fuzzy
+msgid "Model:\t"
+msgstr "Modo:"
+
+#: src/ui/gui/reliability.ui:175
+#, fuzzy
+msgid "Variables in first split:"
+msgstr "Informação da Variável:"
+
+#: src/ui/gui/roc.ui:115
+#, fuzzy
+msgid "_Test Variable:"
+msgstr "Variável(is) de teste:"
+
+#: src/ui/gui/roc.ui:147
+#, fuzzy
+msgid "_State Variable:"
+msgstr "Nome da Variável"
+
+#: src/ui/gui/roc.ui:172
+#, fuzzy
+msgid "_Value of state variable:"
+msgstr "Usar variável de filtro"
+
+#: src/ui/gui/roc.ui:209
+msgid "ROC C_urve"
+msgstr ""
+
+#: src/ui/gui/roc.ui:227
+msgid "_With diagonal reference line"
+msgstr ""
+
+#: src/ui/gui/roc.ui:251
+#, fuzzy
+msgid "Standard _Error and Confidence Interval"
+msgstr "Intervalo de confiança de 95%%"
+
+#: src/ui/gui/roc.ui:266
+msgid "_Coordinate points of the ROC Curve"
+msgstr ""
+
+#: src/ui/gui/t-test.ui:8
+#, fuzzy
+msgid "Independent-Samples T Test"
+msgstr "Teste T para Amostras _Independentes"
+
+#: src/ui/gui/t-test.ui:54 src/ui/gui/t-test.ui:175 src/ui/gui/t-test.ui:231
+msgid "Define Groups"
+msgstr "Define grupos"
+
+#: src/ui/gui/t-test.ui:131 src/ui/gui/t-test.ui:584 src/ui/gui/t-test.ui:803
+msgid "Test Variable(s):"
+msgstr "Variável(is) de teste:"
+
+#: src/ui/gui/t-test.ui:271
+msgid "Group_2 value:"
+msgstr "Valor do grupo_2:"
+
+#: src/ui/gui/t-test.ui:284
+msgid "Group_1 value:"
+msgstr "Valor do grupo_1:"
+
+#: src/ui/gui/t-test.ui:365
+msgid "_Use specified values:"
+msgstr ""
+
+#: src/ui/gui/t-test.ui:420
+#, fuzzy
+msgid "Options"
+msgstr "Opções:"
+
+#: src/ui/gui/t-test.ui:452
+msgid "Exclude cases _analysis by analysis"
+msgstr ""
+
+#: src/ui/gui/t-test.ui:469
+msgid "Exclude cases _listwise"
+msgstr "Excluir casos _listwise"
+
+#: src/ui/gui/t-test.ui:529
+#, fuzzy
+msgid "One - Sample T Test"
+msgstr "Teste T Para Uma Am_ostra"
+
+#: src/ui/gui/t-test.ui:626
+msgid "Test Value: "
+msgstr "Valor de teste: "
+
+#: src/ui/gui/t-test.ui:704
+#, fuzzy
+msgid "Paired Samples T Test"
+msgstr "Teste T para amostras em_parelhadas"
+
+#: src/ui/gui/text-data-import.ui:8
+msgid "Importing Textual Data"
+msgstr "Importar dados textuais"
+
+#: src/ui/gui/text-data-import.ui:19
+msgid ""
+"This assistant will guide you through the process of importing data into "
+"PSPP from a text file with one line per case,  in which fields are separated "
+"by tabs, commas, or other delimiters.\n"
+"\n"
+"The selected file contains N lines of text.  Only the first M of these will "
+"be shown for preview purposes in the following screens.  You may choose "
+"below how much of the file should actually be imported."
+msgstr ""
+"Este assistente irá acompanhá-lo durante o processo de importar dados para o "
+"PSPP de um arquivo de texto com um caso por linha, no qual campos são "
+"separados por tabulações, vírgulas ou outros delimitadores.\n"
+"\n"
+"O arquivo selecionado contém N linhas de texto. Apenas as M primeiras destas "
+"irão ser exibidas como pré-visualização nas telas seguintes. Você pode "
+"escolher abaixo quanto do arquivo deve ser efetivamente importado."
+
+#: src/ui/gui/text-data-import.ui:52
+msgid "All cases"
+msgstr "Todos os casos"
+
+#: src/ui/gui/text-data-import.ui:71 src/ui/gui/text-data-import.ui:128
+msgid "Only first "
+msgstr "Apenas o primeiro "
+
+#: src/ui/gui/text-data-import.ui:106
+msgid " cases"
+msgstr "casos"
+
+#: src/ui/gui/text-data-import.ui:162
+msgid "% of file (approximately)"
+msgstr "% do arquivo (aproximadamente)"
+
+#: src/ui/gui/text-data-import.ui:183
+msgid "<b>Amount to Import</b>"
+msgstr "<b>Quantidade para importar</b>"
+
+#: src/ui/gui/text-data-import.ui:202
+msgid "Select Data to Import"
+msgstr "Selecione dados para importar"
+
+#: src/ui/gui/text-data-import.ui:213
+msgid "Select the first line of the data file that contains data."
+msgstr "Selecione a primeira linha do arquivo de dados que contem dados."
+
+#: src/ui/gui/text-data-import.ui:241
+msgid "Line above selected line contains variable names"
+msgstr ""
+
+#: src/ui/gui/text-data-import.ui:259
+msgid "Choose Separators"
+msgstr "Escolha os separadores"
+
+#: src/ui/gui/text-data-import.ui:305
+msgid "C_ustom"
+msgstr "Personalizad_o"
+
+#: src/ui/gui/text-data-import.ui:320
+msgid "Slas_h (/)"
+msgstr "Barr_a (/)"
+
+#: src/ui/gui/text-data-import.ui:337
+msgid "Semicolo_n (;)"
+msgstr "Po_nto-e-vírgula (;)"
+
+#: src/ui/gui/text-data-import.ui:354
+msgid "P_ipe (|)"
+msgstr "P_ipe (|)"
+
+#: src/ui/gui/text-data-import.ui:369
+msgid "H_yphen (-)"
+msgstr "Híf_en (-) "
+
+#: src/ui/gui/text-data-import.ui:386
+msgid "Co_mma (,)"
+msgstr "Vírgul_a (,)"
+
+#: src/ui/gui/text-data-import.ui:403
+msgid "_Colon (:)"
+msgstr "Dois-P_ontos (:)"
+
+#: src/ui/gui/text-data-import.ui:418
+msgid "Ban_g (!)"
+msgstr "Exclamaçã_o (!)"
+
+#: src/ui/gui/text-data-import.ui:433
+msgid "Ta_b"
+msgstr "Ta_bulação"
+
+#: src/ui/gui/text-data-import.ui:448
+msgid "_Space"
+msgstr "E_spaço"
+
+#: src/ui/gui/text-data-import.ui:465
+msgid "<b>Separators</b>"
+msgstr "<b>Separadores</b>"
+
+#: src/ui/gui/text-data-import.ui:495
+msgid "Doubled quote mark treated as escape"
+msgstr "Marca de aspas duplas tratado como escape"
+
+#: src/ui/gui/text-data-import.ui:524
+msgid "Quote separator characters with"
+msgstr ""
+
+#: src/ui/gui/text-data-import.ui:544
+msgid "<b>Quoting</b>"
+msgstr "<b>Quoting</b>"
+
+#: src/ui/gui/text-data-import.ui:592
+msgid "<b>Fields Preview</b>"
+msgstr "<b>Visualização dos campos</b>"
+
+#: src/ui/gui/text-data-import.ui:607
+msgid "Adjust Variable Formats"
+msgstr "Ajustar formatos da variável"
+
+#: src/ui/gui/text-data-import.ui:618
+msgid ""
+"Check the data formats displayed below and fix any that are incorrect.  You "
+"may set other variable properties now or later."
+msgstr ""
+"Verifique os formatos de dados exibidos abaixo e corrija os incorretos. Você "
+"pode definir outras propriedades das variáveis agora ou mais tarde."
+
+#: src/ui/gui/text-data-import.ui:662
+msgid "<b>Variables</b>"
+msgstr "<b>Variáveis</b>"
+
+#: src/ui/gui/text-data-import.ui:705
+msgid "<b>Data Preview</b>"
+msgstr "<b>Visualização de dados</b>"
+
+#: src/ui/gui/var-sheet-dialogs.ui:7
+msgid "Variable Type"
+msgstr "Tipo da Variável"
+
+#: src/ui/gui/var-sheet-dialogs.ui:75
+msgid "Scientific notation"
+msgstr "Notação Científica"
+
+#: src/ui/gui/var-sheet-dialogs.ui:123
+msgid "Custom currency"
+msgstr "Moeda Personalizada"
+
+#: src/ui/gui/var-sheet-dialogs.ui:225
+msgid "positive"
+msgstr "positivo"
+
+#: src/ui/gui/var-sheet-dialogs.ui:234
+msgid "negative"
+msgstr "negativo"
+
+#: src/ui/gui/var-sheet-dialogs.ui:247
+msgid "Sample"
+msgstr "Amostra"
+
+#: src/ui/gui/var-sheet-dialogs.ui:294
+msgid "Width:"
+msgstr "Tamanho:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:339
+msgid "Decimal Places:"
+msgstr "Casas Decimais:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:419 src/ui/gui/var-sheet-dialogs.ui:610
+msgid "Value Labels"
+msgstr "Rótulos de valores"
+
+#: src/ui/gui/var-sheet-dialogs.ui:518
+msgid "Value Label:"
+msgstr "Rótulo de valor:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:711
+msgid "_No missing values"
+msgstr "Sem valores _missing"
+
+#: src/ui/gui/var-sheet-dialogs.ui:782
+msgid "_Discrete missing values"
+msgstr "Valores missing _discretos"
+
+#: src/ui/gui/var-sheet-dialogs.ui:816
+msgid "_Low:"
+msgstr "_Menor:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:835
+msgid "_High:"
+msgstr "Ma_ior:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:860
+msgid "Di_screte value:"
+msgstr "Valor _discreto:"
+
+#: src/ui/gui/var-sheet-dialogs.ui:888
+msgid "_Range plus one optional discrete missing value"
+msgstr ""
+
+#: src/ui/gui/variable-info.ui:50
+msgid "Variable Information:"
+msgstr "Informação da Variável:"
+
+#: src/ui/gui/data-editor.ui:9
+msgid "Sort Ascending"
+msgstr "Ordenar Ascendentemente "
+
+#: src/ui/gui/data-editor.ui:15
+msgid "Sort Descending"
+msgstr "Ordenar Descendentemente"
+
+#: src/ui/gui/data-editor.ui:26 src/ui/gui/output-viewer.ui:9
+#: src/ui/gui/syntax-editor.ui:10
+msgid "_File"
+msgstr "_Arquivo"
+
+#: src/ui/gui/data-editor.ui:38 src/ui/gui/syntax-editor.ui:22
+#: src/ui/gui/syntax-editor.ui:40
+msgid "_Syntax"
+msgstr "_Sintaxe"
+
+#: src/ui/gui/data-editor.ui:44 src/ui/gui/data-editor.ui:217
+#: src/ui/gui/data-editor.ui:229 src/ui/gui/syntax-editor.ui:28
+#: src/ui/gui/syntax-editor.ui:46
+msgid "_Data"
+msgstr "_Dados"
+
+#: src/ui/gui/data-editor.ui:56
+msgid "_Import Delimited Text Data"
+msgstr "_Importar Dados Textuais Delimitados"
+
+#: src/ui/gui/data-editor.ui:75
+#, fuzzy
+msgid "D_isplay Data File Information"
+msgstr "informação do arquivo de dados"
+
+#: src/ui/gui/data-editor.ui:81
+msgid "Working File"
+msgstr ""
+
+#: src/ui/gui/data-editor.ui:87
+#, fuzzy
+msgid "External File"
+msgstr "Arquivo portátil"
+
+#: src/ui/gui/data-editor.ui:93
+msgid "Recently Used Da_ta"
+msgstr "Dados Recen_temente usados"
+
+#: src/ui/gui/data-editor.ui:99
+msgid "Recently Used _Files"
+msgstr "Arquivos _Recentemente Usados"
+
+#: src/ui/gui/data-editor.ui:111 src/ui/gui/output-viewer.ui:28
+#: src/ui/gui/syntax-editor.ui:70
+msgid "_Edit"
+msgstr "_Editar"
+
+#: src/ui/gui/data-editor.ui:117
+msgid "Insert Variable"
+msgstr "Inserir Variáveis"
+
+#: src/ui/gui/data-editor.ui:118
+msgid "Create a new variable at the current position"
+msgstr "Criar uma variável na posição atual"
+
+#: src/ui/gui/data-editor.ui:125
+msgid "Insert Cases"
+msgstr "Inserir Casos"
+
+#: src/ui/gui/data-editor.ui:126
+msgid "Create a new case at the current position"
+msgstr "Criar um caso na posição atual"
+
+#: src/ui/gui/data-editor.ui:132
+msgid "Go To Case"
+msgstr "Ir para Caso"
+
+#: src/ui/gui/data-editor.ui:134
+#, fuzzy
+msgid "Jump to a case in the data sheet"
+msgstr "Pular para o Caso na matriz de dados"
+
+#: src/ui/gui/data-editor.ui:160
+msgid "Cl_ear Variables"
+msgstr "Limpar Variáv_eis"
+
+#: src/ui/gui/data-editor.ui:161
+msgid "Delete the variables at the selected position(s)"
+msgstr "Deletar as variáveis na posição(ões) selecionada(s)"
+
+#: src/ui/gui/data-editor.ui:169
+msgid "_Clear Cases"
+msgstr "Limpar _Casos"
+
+#: src/ui/gui/data-editor.ui:170
+msgid "Delete the cases at the selected position(s)"
+msgstr "Deletar o caso na posição(ões) selecionada(s)"
+
+#: src/ui/gui/data-editor.ui:182
+msgid "_View"
+msgstr "_Ver"
+
+#: src/ui/gui/data-editor.ui:189
+msgid "_Status Bar"
+msgstr "_Barra de Status"
+
+#: src/ui/gui/data-editor.ui:195
+msgid "_Fonts"
+msgstr "_Fontes"
+
+#: src/ui/gui/data-editor.ui:203
+msgid "_Grid Lines"
+msgstr "_Linhas da Grade"
+
+#: src/ui/gui/data-editor.ui:209
+msgid "Value _Labels"
+msgstr "_Rótulos de Valores"
+
+#: src/ui/gui/data-editor.ui:210
+msgid "Show/hide value labels"
+msgstr "Exibir/ocultar rótulos de valores"
+
+#: src/ui/gui/data-editor.ui:223 src/ui/gui/data-editor.ui:430
+msgid "_Variables"
+msgstr "_Variáveis"
+
+#: src/ui/gui/data-editor.ui:234
+msgid "_Sort Cases"
+msgstr "_Ordenar Casos"
+
+#: src/ui/gui/data-editor.ui:237
+msgid "Sort cases in the active file"
+msgstr "Ordenar casos no arquivo ativo"
+
+#: src/ui/gui/data-editor.ui:244
+msgid "_Transpose"
+msgstr "_Transpor"
+
+#: src/ui/gui/data-editor.ui:245
+msgid "Transpose the cases with the variables"
+msgstr "Transpor os casos com as variáveis"
+
+#: src/ui/gui/data-editor.ui:251
+msgid "S_plit File"
+msgstr "_Dividir Arquivo"
+
+#: src/ui/gui/data-editor.ui:252
+msgid "Split the active file"
+msgstr "Dividir o arquivo ativo"
+
+#: src/ui/gui/data-editor.ui:259
+msgid "Select _Cases"
+msgstr "Selecionar _Casos"
+
+#: src/ui/gui/data-editor.ui:265
+msgid "_Weight Cases"
+msgstr "_Ponderar Casos"
+
+#: src/ui/gui/data-editor.ui:266
+msgid "Weight cases by variable"
+msgstr "Pondera casos pela variável"
+
+#: src/ui/gui/data-editor.ui:273
+msgid "_Transform"
+msgstr "_Transformar"
+
+#: src/ui/gui/data-editor.ui:279
+msgid "_Compute"
+msgstr "_Computar"
+
+#: src/ui/gui/data-editor.ui:285
+msgid "Ran_k Cases"
+msgstr "Classificar Casos"
+
+#: src/ui/gui/data-editor.ui:291
+msgid "Recode into _Same Variables"
+msgstr "Recodificar na _Mesma Variável"
+
+#: src/ui/gui/data-editor.ui:297
+msgid "Recode into _Different Variables"
+msgstr "Recodificar em uma Variável _Diferente"
+
+#: src/ui/gui/data-editor.ui:303
+msgid "_Run Pending Transforms"
+msgstr "_Executar Transformações Pendentes"
+
+#: src/ui/gui/data-editor.ui:310
+msgid "_Analyze"
+msgstr "_Analisar"
+
+#: src/ui/gui/data-editor.ui:316
+msgid "_Descriptive Statistics"
+msgstr "Estatísticas _Descritivas"
+
+#: src/ui/gui/data-editor.ui:322
+msgid "_Frequencies"
+msgstr "_Frequências"
+
+#: src/ui/gui/data-editor.ui:334
+msgid "_Explore"
+msgstr "_Explorar"
+
+#: src/ui/gui/data-editor.ui:340
+msgid "_Crosstabs"
+msgstr "_Crosstabs"
+
+#: src/ui/gui/data-editor.ui:346
+msgid "Compare _Means"
+msgstr "Comparar _Médias"
+
+#: src/ui/gui/data-editor.ui:352
+msgid "_One Sample T Test"
+msgstr "Teste T Para Uma Am_ostra"
+
+#: src/ui/gui/data-editor.ui:358
+msgid "_Independent Samples T Test"
+msgstr "Teste T para Amostras _Independentes"
+
+#: src/ui/gui/data-editor.ui:364
+msgid "_Paired Samples T Test"
+msgstr "Teste T para amostras em_parelhadas"
+
+#: src/ui/gui/data-editor.ui:370
+msgid "One Way _ANOVA"
+msgstr "_ANOVA de Um Fator"
+
+#: src/ui/gui/data-editor.ui:376
+#, fuzzy
+msgid "Bivariate _Correlation..."
+msgstr "_Correlação Bivariada"
+
+#: src/ui/gui/data-editor.ui:382
+#, fuzzy
+msgid "Factor _Analysis"
+msgstr "Lista de Fator:"
+
+#: src/ui/gui/data-editor.ui:388
+msgid "Re_liability"
+msgstr ""
+
+#: src/ui/gui/data-editor.ui:394
+msgid "Linear _Regression"
+msgstr "Regressão Linear"
+
+#: src/ui/gui/data-editor.ui:400
+msgid "_Non-Parametric Statistics"
+msgstr "Estatísticas Não-Paramétricas"
+
+#: src/ui/gui/data-editor.ui:406
+msgid "_Chi-Square"
+msgstr "_Chi-Quadrado"
+
+#: src/ui/gui/data-editor.ui:412
+msgid "_Binomial"
+msgstr "_Binomial"
 
-#: src/ui/gui/regression-dialog.c:43
-msgid "Bcov"
-msgstr "Bcov"
+#: src/ui/gui/data-editor.ui:418
+msgid "ROC Cur_ve..."
+msgstr ""
 
-#: src/ui/gui/regression.glade:40
-msgid "Save..."
-msgstr "Salvar..."
+#: src/ui/gui/data-editor.ui:424
+msgid "_Utilities"
+msgstr "_Utilidades"
 
-#: src/ui/gui/regression.glade:145
-msgid "Dependent"
-msgstr "Dependente"
+#: src/ui/gui/data-editor.ui:431
+#, fuzzy
+msgid "Jump to variable"
+msgstr "Pular para variável"
 
-#: src/ui/gui/regression.glade:193
-msgid "Independent"
-msgstr "Independente"
+#: src/ui/gui/data-editor.ui:438
+msgid "Data File _Comments"
+msgstr "_Comentários do Arquivo de Dados"
 
-#: src/ui/gui/regression.glade:243
-msgid "Predicted values"
-msgstr "Valores esperados"
+#: src/ui/gui/data-editor.ui:444 src/ui/gui/output-viewer.ui:40
+#: src/ui/gui/syntax-editor.ui:131
+msgid "_Windows"
+msgstr "_Janelas"
 
-#: src/ui/gui/regression.glade:252
-msgid "Residuals"
-msgstr "Residuais"
+#: src/ui/gui/data-editor.ui:450 src/ui/gui/output-viewer.ui:46
+#: src/ui/gui/syntax-editor.ui:137
+msgid "_Minimize All Windows"
+msgstr "_Minimizar Todas as Janelas"
 
-#: src/ui/gui/select-cases-dialog.c:81
-#, c-format
-msgid "Approximately %3d%% of all cases."
-msgstr "Aproximadamente %3d%% de todos os casos."
+#: src/ui/gui/data-editor.ui:456
+#, fuzzy
+msgid "_Split"
+msgstr "_Dividir"
 
-#: src/ui/gui/select-cases-dialog.c:82
-#, c-format
-msgid "Exactly %3d cases from the first %3d cases."
-msgstr "Exatamente %3d casos dos primeiros %3d casos."
+#: src/ui/gui/data-editor.ui:630
+msgid "Information Area"
+msgstr "Área de Informação"
 
-#: src/ui/gui/select-cases-dialog.c:222
-#, c-format
-msgid "%d thru %d"
-msgstr "%d até %d"
+#: src/ui/gui/data-editor.ui:652
+msgid "Processor Area"
+msgstr "Área do Processamento"
 
-#: src/ui/gui/syntax-editor.c:77
-#, c-format
-msgid "Save contents of syntax editor to %s?"
-msgstr ""
+#: src/ui/gui/data-editor.ui:677
+msgid "Case Counter Area"
+msgstr "Área de Contagem dos Casos"
 
-#: src/ui/gui/syntax-editor.c:124
-msgid "Save Syntax"
-msgstr "Salvar Sintaxe"
+#: src/ui/gui/data-editor.ui:702
+msgid "Filter Use Status Area"
+msgstr "Área de Status do Uso de Filtros"
 
-#: src/ui/gui/syntax-editor.c:132 src/ui/gui/syntax-editor.c:516
-msgid "Syntax Files (*.sps) "
-msgstr "Arquivo de Sintaxe (*.sps) "
+#: src/ui/gui/data-editor.ui:728
+msgid "Weight Status Area"
+msgstr "Área de status da ponderação"
 
-#: src/ui/gui/syntax-editor.c:508
-msgid "Open Syntax"
-msgstr "Abrir Sintaxe"
+#: src/ui/gui/data-editor.ui:754
+msgid "Split File Status Area"
+msgstr "Área de Status da Divisão de Arquivos"
 
-#: src/ui/gui/syntax-editor.glade:10
-msgid "Psppire Syntax Editor"
-msgstr "Editor de Sintaxe do PSPP"
+#: src/ui/gui/output-viewer.ui:22
+#, fuzzy
+msgid "_Export"
+msgstr "_Explorar"
 
-#: src/ui/gui/syntax-editor.glade:188
+#: src/ui/gui/syntax-editor.ui:100
 msgid "_Run"
 msgstr "_Executar"
 
-#: src/ui/gui/syntax-editor.glade:197
+#: src/ui/gui/syntax-editor.ui:106
 msgid "All"
 msgstr "Todos"
 
-#: src/ui/gui/syntax-editor.glade:205
+#: src/ui/gui/syntax-editor.ui:112
 msgid "Selection"
 msgstr "Seleção"
 
-#: src/ui/gui/syntax-editor.glade:213
+#: src/ui/gui/syntax-editor.ui:118
 msgid "Current Line"
 msgstr "Linha atual"
 
-#: src/ui/gui/syntax-editor.glade:222
+#: src/ui/gui/syntax-editor.ui:125
 msgid "To End"
 msgstr "Para o Final"
 
-#: src/ui/gui/t-test-options.c:60
-#, c-format
-msgid "Confidence Interval: %2d %%"
-msgstr "Intervalo de confiança: %2d %%"
+#~ msgid "Dependent variable must be numeric."
+#~ msgstr "Variável dependente precisa ser numérica"
 
-#: src/ui/gui/t-test-paired-samples.c:228
-msgid "Var 1"
-msgstr "Var 1"
+#~ msgid "Variable %s has label of invalid length %zu."
+#~ msgstr "Variável %s tem um rótulo de tamanho inválido %zu."
 
-#: src/ui/gui/t-test-paired-samples.c:229
-msgid "Var 2"
-msgstr "Var 2"
+#~ msgid "_About"
+#~ msgstr "_Sobre"
 
-#: src/ui/gui/t-test.glade:56 src/ui/gui/t-test.glade:165
-msgid "Define Groups"
-msgstr "Define grupos"
+#~ msgid "searching for \"%s\" in path \"%s\""
+#~ msgstr "Procurando \"%s\" no caminho \"%s\""
 
-#: src/ui/gui/t-test.glade:123 src/ui/gui/t-test.glade:549
-#: src/ui/gui/t-test.glade:761
-msgid "Test Variable(s):"
-msgstr "Variável(is) de teste:"
+#~ msgid "...found \"%s\""
+#~ msgstr "...\"%s\" encontrado"
 
-#: src/ui/gui/t-test.glade:258
-msgid "Group_2 value:"
-msgstr "Valor do grupo_2:"
+#~ msgid "...not found"
+#~ msgstr "...não encontrado"
 
-#: src/ui/gui/t-test.glade:271
-msgid "Group_1 value:"
-msgstr "Valor do grupo_1:"
+#~ msgid "Bad variable width %d."
+#~ msgstr "Comprimento %d de variável inválido."
 
-#: src/ui/gui/t-test.glade:320
-msgid "_Cut point:"
-msgstr "Ponto de _corte:"
+#~ msgid ""
+#~ "Ignoring missing values on long string variable %s, which PSPP does not "
+#~ "yet support."
+#~ msgstr ""
+#~ "Ignorando valores missing na variável de string longa %s, os quais PSPP "
+#~ "não suporta ainda."
 
-#: src/ui/gui/t-test.glade:349
-msgid "_Use specified values:"
-msgstr ""
+#~ msgid ""
+#~ "Ignoring value labels for long string variables, which PSPP does not yet "
+#~ "support."
+#~ msgstr ""
+#~ "Ignorando rótulos de valores para variável de string longa, os quais PSPP "
+#~ "ainda não suporta."
 
-#: src/ui/gui/t-test.glade:431
-msgid "Exclude cases _analysis by analysis"
-msgstr ""
+#~ msgid "little-endian"
+#~ msgstr "little-endian"
 
-#: src/ui/gui/t-test.glade:442
-msgid "Exclude cases _listwise"
-msgstr "Excluir casos _listwise"
+#~ msgid "big-endian"
+#~ msgstr "big-endian"
 
-#: src/ui/gui/t-test.glade:594
-msgid "Test Value: "
-msgstr "Valor de teste: "
+#~ msgid "File specifies unexpected value %g as HIGHEST."
+#~ msgstr "Arquivo especifica valor inesperado %g como HIGHEST."
 
-#: src/ui/gui/text-data-import-dialog.c:70
-msgid "The text import assistant has not been compiled into this build of PSPPIRE, because GTK+ version 2.10.0 or later was not available."
-msgstr ""
+#~ msgid "File specifies unexpected value %g as LOWEST."
+#~ msgstr "Arquivo especifica valor inesperado %g como LOWEST."
 
-#: src/ui/gui/text-data-import-dialog.c:488
-#, c-format
-msgid "Could not open \"%s\": %s"
-msgstr "Impossível abrir \"%s\": %s"
+#~ msgid "Compressed data is corrupt."
+#~ msgstr "Dado compactado está corrompido."
 
-#: src/ui/gui/text-data-import-dialog.c:504
-#, c-format
-msgid "Error reading \"%s\": %s"
-msgstr "Erro lendo \"%s\": %s"
+#~ msgid "%s is unimplemented."
+#~ msgstr "%s não está implementado."
 
-#: src/ui/gui/text-data-import-dialog.c:507
-#, c-format
-msgid "Failed to read \"%s\", because it contains a line over %d bytes long and therefore appears not to be a text file."
-msgstr "Falha ao ler \"%s\", porque ele contém uma linha com mais de %d bytes d"
+#~ msgid "%s is not allowed inside INPUT PROGRAM."
+#~ msgstr "%s não é permitido dentro de INPUT PROGRAM."
 
-#: src/ui/gui/text-data-import-dialog.c:521
-#, c-format
-msgid "\"%s\" is empty."
-msgstr "\"%s\" está vazio."
+#~ msgid "BY is required when TABLE is specified."
+#~ msgstr "BY é necessário quando TABLE é especificado."
 
-#: src/ui/gui/text-data-import-dialog.c:566
-msgid "Import Delimited Text Data"
-msgstr "Importar Dados Textuais Delimitados"
+#~ msgid "`/FORMAT WEIGHT' specified, but weighting is not on."
+#~ msgstr "'/FORMAT WEIGHT' especificado, mas ponderação está desabilitada."
 
-#: src/ui/gui/text-data-import-dialog.c:617
-msgid "Importing Delimited Text Data"
-msgstr "Importando dados textuais delimitados"
+#~ msgid "Line"
+#~ msgstr "Linha"
 
-#: src/ui/gui/text-data-import-dialog.c:768
-msgid ""
-"This assistant will guide you through the process of importing data into PSPP from a text file with one line per case,  in which fields are separated by tabs, commas, or other delimiters.\n"
-"\n"
-msgstr "Este assistente irá acompanhá-lo durante o processo de importar dados para o PSPP de um arquivo de texto com um caso por linha, no qual campos são separados por tabulações, vírgulas ou outros delimitadores.\n"
+#~ msgid "Unknown."
+#~ msgstr "Desconhecido."
 
-#: src/ui/gui/text-data-import-dialog.c:774
-#, c-format
-msgid "The selected file contains %zu line of text.  "
-msgid_plural "The selected file contains %zu lines of text.  "
-msgstr[0] ""
-msgstr[1] ""
+#~ msgid "System File."
+#~ msgstr "Arquivo de sistema."
 
-#: src/ui/gui/text-data-import-dialog.c:782
-#, c-format
-msgid "The selected file contains approximately %lu line of text.  "
-msgid_plural "The selected file contains approximately %lu lines of text.  "
-msgstr[0] ""
-msgstr[1] ""
+#~ msgid "Bad character in input: `\\%o'."
+#~ msgstr "Caractere inválido na entrada: '\\%o'."
 
-#: src/ui/gui/text-data-import-dialog.c:788
-#, c-format
-msgid "Only the first %zu line of the file will be shown for preview purposes in the following screens.  "
-msgid_plural "Only the first %zu lines of the file will be shown for preview purposes in the following screens.  "
-msgstr[0] ""
-msgstr[1] ""
+#~ msgid "%s is not currently supported."
+#~ msgstr "%s não é atualmente suportada."
 
-#: src/ui/gui/text-data-import-dialog.c:795
-msgid "You may choose below how much of the file should actually be imported."
-msgstr "Você pode escolher abaixo quanto do arquivo será efetivamente importado."
+#~ msgid "Boxplot"
+#~ msgstr "Boxplot"
 
-#: src/ui/gui/text-data-import-dialog.c:1515
-#: src/ui/gui/text-data-import-dialog.c:1759
-msgid "This input line has too few separators to fill in this field."
-msgstr "Esta linha de entrada tem poucos separadores para preencher este campo."
+#~ msgid "Could not create acceptable variant for variable %s."
+#~ msgstr "Não foi possível criar variança aceitável para variável %s."
 
-#: src/ui/gui/text-data-import-dialog.c:1750
-#, c-format
-msgid "Field content \"%.*s\" cannot be parsed in format %s."
-msgstr "Campo contendo \"%.*s\" não pode ser analisado no formato %s."
+#~ msgid "Cannot create more than 99999 variable names."
+#~ msgstr "Impossível criar mais que 99999 nomes de variáve."
 
-#: src/ui/gui/text-data-import.glade:7
-msgid "Importing Textual Data"
-msgstr "Importar dados textuais"
+#~ msgid "Long string variable %s is not valid here."
+#~ msgstr "Variável string longa %s não é válida aqui."
 
-#: src/ui/gui/text-data-import.glade:16
-msgid ""
-"This assistant will guide you through the process of importing data into PSPP from a text file with one line per case,  in which fields are separated by tabs, commas, or other delimiters.\n"
-"\n"
-"The selected file contains N lines of text.  Only the first M of these will be shown for preview purposes in the following screens.  You may choose below how much of the file should actually be imported."
-msgstr ""
-"Este assistente irá acompanhá-lo durante o processo de importar dados para o PSPP de um arquivo de texto com um caso por linha, no qual campos são separados por tabulações, vírgulas ou outros delimitadores.\n"
-"\n"
-"O arquivo selecionado contém N linhas de texto. Apenas as M primeiras destas irão ser exibidas como pré-visualização nas telas seguintes. Você pode escolher abaixo quanto do arquivo deve ser efetivamente importado."
+#~ msgid "error opening \"%s\" for writing"
+#~ msgstr "erro ao abrir \"%s\" para gravação"
 
-#: src/ui/gui/text-data-import.glade:47
-msgid "All cases"
-msgstr "Todos os casos"
+#~ msgid "FORMAT is %s."
+#~ msgstr "FORMAT é %s."
 
-#: src/ui/gui/text-data-import.glade:62 src/ui/gui/text-data-import.glade:117
-msgid "Only first "
-msgstr "Apenas o primeiro "
+#~ msgid "%s is %s (%s)."
+#~ msgstr "%s é %s (%s)."
 
-#: src/ui/gui/text-data-import.glade:93
-msgid " cases"
-msgstr "casos"
+#~ msgid "WEIGHT is variable %s."
+#~ msgstr "WEIGHT é a variável %s."
 
-#: src/ui/gui/text-data-import.glade:147
-msgid "% of file (approximately)"
-msgstr "% do arquivo (aproximadamente)"
+#~ msgid "%s: `.' expected after string."
+#~ msgstr "%s: '.' esperado após string."
 
-#: src/ui/gui/text-data-import.glade:168
-msgid "<b>Amount to Import</b>"
-msgstr "<b>Quantidade para importar</b>"
+#~ msgid "expected end of file"
+#~ msgstr "fim de arquivo esperado"
 
-#: src/ui/gui/text-data-import.glade:189
-msgid "Select Data to Import"
-msgstr "Selecione dados para importar"
+#~ msgid "number out of valid range"
+#~ msgstr "número fora do intervalo válido"
 
-#: src/ui/gui/text-data-import.glade:198
-msgid "Select the first line of the data file that contains data."
-msgstr "Selecione a primeira linha do arquivo de dados que contem dados."
+#~ msgid "invalid numeric syntax"
+#~ msgstr "sintaxe numérica inválida"
 
-#: src/ui/gui/text-data-import.glade:209
-msgid "Line above selected line contains variable names"
-msgstr ""
+#~ msgid "syntax error expecting integer"
+#~ msgstr "erro de sintaxe esperando inteiro"
 
-#: src/ui/gui/text-data-import.glade:243
-msgid "Choose Separators"
-msgstr "Escolha os separadores"
+#~ msgid "syntax error expecting number"
+#~ msgstr "erro de sintaxe esperando número"
 
-#: src/ui/gui/text-data-import.glade:274
-msgid "_Space"
-msgstr "E_spaço"
+#~ msgid "syntax error in hex constant"
+#~ msgstr "erro de sintaxe em constante hexa"
 
-#: src/ui/gui/text-data-import.glade:285
-msgid "Ta_b"
-msgstr "Ta_bulação"
+#~ msgid "syntax error expecting hex constant"
+#~ msgstr "erro de sintaxe esperando constante hexa"
 
-#: src/ui/gui/text-data-import.glade:300
-msgid "Ban_g (!)"
-msgstr "Exclamaçã_o (!)"
+#~ msgid "unexpected end of line"
+#~ msgstr "fim de linha inesperado"
 
-#: src/ui/gui/text-data-import.glade:315
-msgid "_Colon (:)"
-msgstr "Dois-P_ontos (:)"
+#~ msgid "unexpected end of line expecting string"
+#~ msgstr "fim de linha inesperado esperando string"
 
-#: src/ui/gui/text-data-import.glade:330
-msgid "Co_mma (,)"
-msgstr "Vírgul_a (,)"
+#~ msgid ""
+#~ "unknown orientation `%s' (valid orientations are `portrait' and "
+#~ "`landscape')"
+#~ msgstr ""
+#~ "orientação desconhecida '%s' (orientações válidas são 'retrato' e "
+#~ "'paisagem')"
 
-#: src/ui/gui/text-data-import.glade:347
-msgid "H_yphen (-)"
-msgstr "Híf_en (-) "
+#~ msgid "boolean value expected for %s"
+#~ msgstr "valor booleano esperado para %s"
 
-#: src/ui/gui/text-data-import.glade:364
-msgid "P_ipe (|)"
-msgstr "P_ipe (|)"
+#~ msgid "positive integer value required for `%s'"
+#~ msgstr "valor inteiro positivo requerido para '%s'"
 
-#: src/ui/gui/text-data-import.glade:379
-msgid "Semicolo_n (;)"
-msgstr "Po_nto-e-vírgula (;)"
+#~ msgid ""
+#~ "default font size must be at least 1 point (value of 1000 for key `%s')"
+#~ msgstr ""
+#~ "tamanho padrão de fonte precisa ser pelo menos de 1 ponto (valor de 1000 "
+#~ "para chave '%s')"
 
-#: src/ui/gui/text-data-import.glade:396
-msgid "Slas_h (/)"
-msgstr "Barr_a (/)"
+#~ msgid "could not find AFM file \"%s\""
+#~ msgstr "impossível encontrar arquivo AFM \"%s\""
 
-#: src/ui/gui/text-data-import.glade:413
-msgid "C_ustom"
-msgstr "Personalizad_o"
+#~ msgid "could not find font \"%s\""
+#~ msgstr "impossível encontrar fonte \"%s\""
 
-#: src/ui/gui/text-data-import.glade:444
-msgid "<b>Separators</b>"
-msgstr "<b>Separadores</b>"
+#~ msgid "could not find encoding \"%s\""
+#~ msgstr "impossível abrir codificação \"%s\""
 
-#: src/ui/gui/text-data-import.glade:475
-msgid "Quote separator characters with"
-msgstr ""
+#~ msgid "cannot open font encoding file \"%s\""
+#~ msgstr "impossível abrir arquivo de codificação de fonte \"%s\""
 
-#: src/ui/gui/text-data-import.glade:489
-msgid ""
-"\"'\n"
-"\"\n"
-"'\n"
-msgstr ""
+#~ msgid "invalid numeric format"
+#~ msgstr "formato numérico inválido"
 
-#: src/ui/gui/text-data-import.glade:514
-msgid "Doubled quote mark treated as escape"
-msgstr "Marca de aspas duplas tratado como escape"
+#~ msgid "closing Postscript encoding \"%s\""
+#~ msgstr "fechando codificação \"%s\" Postscript"
 
-#: src/ui/gui/text-data-import.glade:533
-msgid "<b>Quoting</b>"
-msgstr "<b>Quoting</b>"
+#~ msgid "_Labels"
+#~ msgstr "_Rótulos"
 
-#: src/ui/gui/text-data-import.glade:584
-msgid "<b>Fields Preview</b>"
-msgstr "<b>Visualização dos campos</b>"
+#~ msgid "Clear"
+#~ msgstr "Limpar"
 
-#: src/ui/gui/text-data-import.glade:601
-msgid "Adjust Variable Formats"
-msgstr "Ajustar formatos da variável"
+#~ msgid "Insert _Variable"
+#~ msgstr "Inserir _Variáveis"
 
-#: src/ui/gui/text-data-import.glade:610
-msgid "Check the data formats displayed below and fix any that are incorrect.  You may set other variable properties now or later."
-msgstr "Verifique os formatos de dados exibidos abaixo e corrija os incorretos. Você pode definir outras propriedades das variáveis agora ou mais tarde."
+#~ msgid "Insert Ca_se"
+#~ msgstr "Inserir Ca_so"
 
-#: src/ui/gui/text-data-import.glade:653
-msgid "<b>Variables</b>"
-msgstr "<b>Variáveis</b>"
+#~ msgid "_Weights"
+#~ msgstr "_Ponderação"
 
-#: src/ui/gui/text-data-import.glade:700
-msgid "<b>Data Preview</b>"
-msgstr "<b>Visualização de dados</b>"
+#~ msgid "_Sort"
+#~ msgstr "_Ordenar"
 
-#: src/ui/gui/variable-info-dialog.c:89
-#, c-format
-msgid "Label: %s\n"
-msgstr "Label: %s\n"
+#~ msgid "Select cases from the active file"
+#~ msgstr "Selecionar casos do arquivo ativo"
 
-#: src/ui/gui/variable-info-dialog.c:98
-#, c-format
-msgid "Type: %s\n"
-msgstr "Tipo: %s\n"
+#~ msgid "Compute new values for a variable"
+#~ msgstr "Computar novos valores de uma variável"
 
-#: src/ui/gui/variable-info-dialog.c:102
-#, c-format
-msgid "Missing Values: %s\n"
-msgstr "Valores missing: %s\n"
+#~ msgid "Oneway _ANOVA"
+#~ msgstr "_ANOVA de Um Fator"
 
-#: src/ui/gui/variable-info-dialog.c:107
-#, c-format
-msgid "Measurement Level: %s\n"
-msgstr "Nível de medida: %s\n"
+#~ msgid "Perform one way analysis of variance"
+#~ msgstr "Fazer análise one way de variância"
 
-#: src/ui/gui/variable-info-dialog.c:121
-msgid "Value Labels:\n"
-msgstr "Value Labels:\n"
+#~ msgid "Calculate T Test for samples from independent groups"
+#~ msgstr "Calcular Teste T para amostrar de grupos independentes"
 
-#: src/ui/gui/variable-info-dialog.c:133
-#, c-format
-msgid "%s %s\n"
-msgstr ""
+#~ msgid "Calculate T Test for paired samples"
+#~ msgstr "Calcular Teste T para amostras emparelhadas"
 
-#: src/ui/gui/weight-cases-dialog.c:86
-#, c-format
-msgid "Weight cases by %s"
-msgstr "Pesar casos por %s"
+#~ msgid "Calculate T Test for sample from a single distribution"
+#~ msgstr "Calcular Teste T para amostra de uma distribuição única"
 
-#: src/ui/gui/window-manager.c:142
-#, c-format
-msgid "Syntax%d"
-msgstr "Sintaxe%d"
+#~ msgid "Commentary text for the data file"
+#~ msgstr "Comentário do arquivo de dados"
 
-#: src/ui/gui/window-manager.c:143 src/ui/gui/window-manager.c:178
-#, c-format
-msgid "%s --- PSPP Syntax Editor"
-msgstr "%s --- Editor de Sintaxe do PSPP"
+#~ msgid "_Find"
+#~ msgstr "_Localizar"
 
-#: src/ui/gui/window-manager.c:146
-#, c-format
-msgid "Untitled%d"
-msgstr "Sem título%d"
+#~ msgid "Recode values into the same Variables"
+#~ msgstr "Recodificar valores na mesma variável"
 
-#: src/ui/gui/window-manager.c:147 src/ui/gui/window-manager.c:181
-#, c-format
-msgid "%s --- PSPP Data Editor"
-msgstr "%s --- Editor de Dados do PSPP"
+#~ msgid "Recode values into different Variables"
+#~ msgstr "Recodificar valores em variáveis diferentes"
 
-#: src/ui/gui/window-manager.c:150
-#, c-format
-msgid "Output%d"
-msgstr "Saída%d"
+#~ msgid "Calculate descriptive statistics (mean, variance, ...)"
+#~ msgstr "Calcular estatísticas descritivas (média, variância, ...)"
 
-#: src/ui/gui/window-manager.c:151
-#, c-format
-msgid "%s --- PSPP Output"
-msgstr "%s --- Saída do PSPP"
+#~ msgid "Generate frequency statistics"
+#~ msgstr "Gerar estatísticas de frequência"
 
-#: src/ui/terminal/command-line.c:230
-#, c-format
-msgid ""
-"PSPP, a program for statistical analysis of sample data.\n"
-"\n"
-"Usage: %s [OPTION]... FILE...\n"
-"\n"
-"If a long option shows an argument as mandatory, then it is mandatory\n"
-"for the equivalent short option also.  Similarly for optional arguments.\n"
-"\n"
-"Configuration:\n"
-"  -a, --algorithm={compatible|enhanced}\n"
-"                            set to `compatible' if you want output\n"
-"                            calculated from broken algorithms\n"
-"  -B, --config-dir=DIR      set configuration directory to DIR\n"
-"  -o, --device=DEVICE       select output driver DEVICE and disable defaults\n"
-"\n"
-"Input and output:\n"
-"  -e, --error-file=FILE     send error messages to FILE (appended)\n"
-"  -f, --out-file=FILE       send output to FILE (overwritten)\n"
-"  -p, --pipe                read syntax from stdin, send output to stdout\n"
-"  -I-, --no-include         clear include path\n"
-"  -I, --include=DIR         append DIR to include path\n"
-"\n"
-"Language modifiers:\n"
-"  -i, --interactive         interpret syntax in interactive mode\n"
-"  -n, --edit                just check syntax; don't actually run the code\n"
-"  -r, --no-statrc           disable execution of .pspp/rc at startup\n"
-"  -s, --safer               don't allow some unsafe operations\n"
-"  -x, --syntax={compatible|enhanced}\n"
-"                            set to `compatible' if you want only to accept\n"
-"                            spss compatible syntax\n"
-"\n"
-"Informative output:\n"
-"  -h, --help                print this help, then exit\n"
-"  -l, --list                print a list of known driver classes, then exit\n"
-"  -V, --version             show PSPP version, then exit\n"
-"  -v, --verbose             increments verbosity level\n"
-"\n"
-"Non-option arguments:\n"
-" FILE                       syntax file to execute\n"
-" KEY=VALUE                  overrides macros in output initialization file\n"
-"\n"
-msgstr ""
-"PSPP, um programa para análises estatísticas de dados amostrais.\n"
-"\n"
-"Uso: %s [OPÇÃO]... ARQUIVO...\n"
-"\n"
-"Se uma opção longa exibe um argumento como obrigatório, então ele também é obrigatório\n"
-"para a opção curta equivale. O mesmo se aplica para argumentos opcionais.\n"
-"\n"
-"Configuração:\n"
-"  -a, --algorithm={compatible|enhanced}\n"
-"                            escolha 'compatible' se você deseja saída\n"
-"                            calculada por algoritmos problemáticos\n"
-"  -B, --config-dir=DIR      define o diretório de configuração como DIR\n"
-"  -o, --device=DEVICE       seleciona DEVICE como driver de saída e desabilita padrões\n"
-"\n"
-"Entrada e saída:\n"
-"  -e, --error-file=FILE     envia mensagens de erro para FILE (incluídas no final)\n"
-"  -f, --out-file=FILE       envia saída para FILE (sobrescrevendo)\n"
-"  -p, --pipe                lê sintaxe de stdin, e envia saída para stdout\n"
-"  -I-, --no-include         limpa caminho de inclusão\n"
-"  -I, --include=DIR         Insere DIR no caminho de inclusão\n"
-"\n"
-"Modificadores da linguagem:\n"
-"  -i, --interactive         interpreta sintaxe no modo interativo\n"
-"  -n, --edit                simplesmente checa sintaxe; não executa o código\n"
-"  -r, --no-statrc           desabilita a execução de .pspp/rc na inicialização\n"
-"  -s, --safer               não permite algumas operações inseguras\n"
-"  -x, --syntax={compatible|enhanced}\n"
-"                            escolha 'compatible' se você deseja somente aceitar\n"
-"                            sintaxe compatível com SPSS\n"
-"\n"
-"Informative output:\n"
-"  -h, --help                exibe esta ajuda, e então sai\n"
-"  -l, --list                exibe uma lista de classes de driver conhecidos, e então sai\n"
-"  -V, --version             exibe a versão do PSPP, e então sai\n"
-"  -v, --verbose             incrementa o nível de verbosidade\n"
-"\n"
-"Non-option arguments:\n"
-" FILE                       arquivo de sintaxe para executar\n"
-" KEY=VALUE                  sobrescreve macros no arquivo de inicialização da saída\n"
-"\n"
+#~ msgid "Generate crosstabulations"
+#~ msgstr "Gerar crosstabs"
 
-#: src/ui/terminal/command-line.c:265
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <%s>.\n"
-msgstr ""
-"\n"
-"Reporte bugs para <%s>.\n"
+#~ msgid "Examine Data by Factors"
+#~ msgstr "Examina dados pelos fatores"
 
-#: src/ui/terminal/main.c:131
-msgid "Stopping syntax file processing here to avoid a cascade of dependent command failures."
-msgstr "Interrompendo processamento do arquivo de sintaxe para evitar falha uma cascata de falhas de comandos."
+#~ msgid "Estimate parameters of the linear model"
+#~ msgstr "Estima parâmetros do modelo linear"
 
-#: src/ui/terminal/msg-ui.c:67
-#, c-format
-msgid "Cannot open %s (%s). Writing errors to stdout instead.\n"
-msgstr "Impossível abrir %s (%s). Imprimindo erros na saída padrão.\n"
+#~ msgid "Open a data file"
+#~ msgstr "Abrir arquivo de dados"
 
-#: src/ui/terminal/msg-ui.c:94
-msgid "Terminating execution of syntax file due to error."
-msgstr "Terminando a execução do arquivo de sintaxe devido a um erro."
+#~ msgid "Save data to file"
+#~ msgstr "Salvar dados para arquivo"
 
-#: src/ui/terminal/msg-ui.c:96
-#, c-format
-msgid "Errors (%d) exceeds limit (%d)."
-msgstr "(%d) erros excederam o limite (%d)."
+#~ msgid "Save As"
+#~ msgstr "Salvar Como"
 
-#: src/ui/terminal/msg-ui.c:99
-#, c-format
-msgid "Warnings (%d) exceed limit (%d)."
-msgstr "(%d) avisos excederam o limite (%d)."
+#~ msgid "New data file"
+#~ msgstr "Novo arquivo de dados"
 
-#: src/ui/terminal/msg-ui.c:150
-msgid "error"
-msgstr "erro"
+#~ msgid "_Import Text Data"
+#~ msgstr "_Importar dados textuais"
 
-#: src/ui/terminal/msg-ui.c:151
-msgid "warning"
-msgstr "aviso"
+#~ msgid "Import text data file"
+#~ msgstr "Importar arquivo de dados textuais"
 
-#: src/ui/terminal/terminal.c:72
-#, c-format
-msgid "could not access definition for terminal `%s'"
-msgstr "não foi possível acessar definição para o terminal '%s'"
+#~ msgid "Insert Case"
+#~ msgstr "Inserir Caso"
+
+#~ msgid "Print"
+#~ msgstr "Imprimir"
+
+#~ msgid "Recall"
+#~ msgstr "Recall"
+
+#~ msgid "Undo"
+#~ msgstr "Desfazer"
+
+#~ msgid "Redo"
+#~ msgstr "Refazer"
+
+#~ msgid "Find"
+#~ msgstr "Localizar"
+
+#~ msgid "Ascending Counts"
+#~ msgstr "Contagens Ascendentes"
+
+#~ msgid "Descending Counts"
+#~ msgstr "Contagens Descendentes"
+
+#~ msgid "Supress tables with more than N categories"
+#~ msgstr "Ocultar tabelas com mais de N categorias"
+
+#~ msgid "Maximum no of categories"
+#~ msgstr "Número máximo de categorias"
+
+#~ msgid "Cannot open reference manual: %s"
+#~ msgstr "Impossível abrir manual de referência: %s"
+
+#~ msgid "data file error"
+#~ msgstr "erro no arquivo de dados"
+
+#~ msgid "PSPP error"
+#~ msgstr "Erro no PSPP"
+
+#~ msgid "syntax warning"
+#~ msgstr "aviso na sintaxe"
+
+#~ msgid "data file warning"
+#~ msgstr "aviso no arquivo de dados"
+
+#~ msgid "PSPP warning"
+#~ msgstr "aviso do PSPP"
+
+#~ msgid "syntax information"
+#~ msgstr "informação da sintaxe"
+
+#~ msgid "PSPP information"
+#~ msgstr "Informação do PSPP"
+
+#~ msgid "Messages Reported"
+#~ msgstr "Mensagens Reportadas"
+
+#~ msgid ""
+#~ "The PSPP processor reported # errors.  The first # and last # are shown "
+#~ "below:"
+#~ msgstr ""
+#~ "O processador do PSPP reportou # erros. O primeiro # e o último # estão "
+#~ "abaixo:"
+
+#~ msgid "gtk-close"
+#~ msgstr "gtk-close"
+
+#~ msgid "gtk-go-back"
+#~ msgstr "gtk-go-back"
+
+#~ msgid "gtk-go-forward"
+#~ msgstr "gtk-go-forward"
+
+#~ msgid "gtk-save"
+#~ msgstr "gtk-save"
+
+#~ msgid "gtk-save-as"
+#~ msgstr "gtk-save-as"
+
+#~ msgid "gtk-copy"
+#~ msgstr "gtk-copy"
+
+#~ msgid "Buttons"
+#~ msgstr "Botões"
+
+#~ msgid "The mask that decides what buttons appear in the button box"
+#~ msgstr "A máscara que decide qual botão irá aparecer na caixa de botões"
+
+#~ msgid "%ld"
+#~ msgstr "%ld"
+
+#~ msgid "System-Missing"
+#~ msgstr "Missing do sistema"
+
+#~ msgid "Open Syntax"
+#~ msgstr "Abrir Sintaxe"
+
+#~ msgid "Syntax%d"
+#~ msgstr "Sintaxe%d"
+
+#~ msgid "%s --- PSPP Syntax Editor"
+#~ msgstr "%s --- Editor de Sintaxe do PSPP"
+
+#~ msgid "Untitled%d"
+#~ msgstr "Sem título%d"
+
+#~ msgid "Output%d"
+#~ msgstr "Saída%d"
+
+#~ msgid "%s --- PSPP Output"
+#~ msgstr "%s --- Saída do PSPP"
+
+#~ msgid ""
+#~ "PSPP, a program for statistical analysis of sample data.\n"
+#~ "\n"
+#~ "Usage: %s [OPTION]... FILE...\n"
+#~ "\n"
+#~ "If a long option shows an argument as mandatory, then it is mandatory\n"
+#~ "for the equivalent short option also.  Similarly for optional arguments.\n"
+#~ "\n"
+#~ "Configuration:\n"
+#~ "  -a, --algorithm={compatible|enhanced}\n"
+#~ "                            set to `compatible' if you want output\n"
+#~ "                            calculated from broken algorithms\n"
+#~ "  -B, --config-dir=DIR      set configuration directory to DIR\n"
+#~ "  -o, --device=DEVICE       select output driver DEVICE and disable "
+#~ "defaults\n"
+#~ "\n"
+#~ "Input and output:\n"
+#~ "  -e, --error-file=FILE     send error messages to FILE (appended)\n"
+#~ "  -f, --out-file=FILE       send output to FILE (overwritten)\n"
+#~ "  -p, --pipe                read syntax from stdin, send output to "
+#~ "stdout\n"
+#~ "  -I-, --no-include         clear include path\n"
+#~ "  -I, --include=DIR         append DIR to include path\n"
+#~ "\n"
+#~ "Language modifiers:\n"
+#~ "  -i, --interactive         interpret syntax in interactive mode\n"
+#~ "  -n, --edit                just check syntax; don't actually run the "
+#~ "code\n"
+#~ "  -r, --no-statrc           disable execution of .pspp/rc at startup\n"
+#~ "  -s, --safer               don't allow some unsafe operations\n"
+#~ "  -x, --syntax={compatible|enhanced}\n"
+#~ "                            set to `compatible' if you want only to "
+#~ "accept\n"
+#~ "                            spss compatible syntax\n"
+#~ "\n"
+#~ "Informative output:\n"
+#~ "  -h, --help                print this help, then exit\n"
+#~ "  -l, --list                print a list of known driver classes, then "
+#~ "exit\n"
+#~ "  -V, --version             show PSPP version, then exit\n"
+#~ "  -v, --verbose             increments verbosity level\n"
+#~ "\n"
+#~ "Non-option arguments:\n"
+#~ " FILE                       syntax file to execute\n"
+#~ " KEY=VALUE                  overrides macros in output initialization "
+#~ "file\n"
+#~ "\n"
+#~ msgstr ""
+#~ "PSPP, um programa para análises estatísticas de dados amostrais.\n"
+#~ "\n"
+#~ "Uso: %s [OPÇÃO]... ARQUIVO...\n"
+#~ "\n"
+#~ "Se uma opção longa exibe um argumento como obrigatório, então ele também "
+#~ "é obrigatório\n"
+#~ "para a opção curta equivale. O mesmo se aplica para argumentos "
+#~ "opcionais.\n"
+#~ "\n"
+#~ "Configuração:\n"
+#~ "  -a, --algorithm={compatible|enhanced}\n"
+#~ "                            escolha 'compatible' se você deseja saída\n"
+#~ "                            calculada por algoritmos problemáticos\n"
+#~ "  -B, --config-dir=DIR      define o diretório de configuração como DIR\n"
+#~ "  -o, --device=DEVICE       seleciona DEVICE como driver de saída e "
+#~ "desabilita padrões\n"
+#~ "\n"
+#~ "Entrada e saída:\n"
+#~ "  -e, --error-file=FILE     envia mensagens de erro para FILE (incluídas "
+#~ "no final)\n"
+#~ "  -f, --out-file=FILE       envia saída para FILE (sobrescrevendo)\n"
+#~ "  -p, --pipe                lê sintaxe de stdin, e envia saída para "
+#~ "stdout\n"
+#~ "  -I-, --no-include         limpa caminho de inclusão\n"
+#~ "  -I, --include=DIR         Insere DIR no caminho de inclusão\n"
+#~ "\n"
+#~ "Modificadores da linguagem:\n"
+#~ "  -i, --interactive         interpreta sintaxe no modo interativo\n"
+#~ "  -n, --edit                simplesmente checa sintaxe; não executa o "
+#~ "código\n"
+#~ "  -r, --no-statrc           desabilita a execução de .pspp/rc na "
+#~ "inicialização\n"
+#~ "  -s, --safer               não permite algumas operações inseguras\n"
+#~ "  -x, --syntax={compatible|enhanced}\n"
+#~ "                            escolha 'compatible' se você deseja somente "
+#~ "aceitar\n"
+#~ "                            sintaxe compatível com SPSS\n"
+#~ "\n"
+#~ "Informative output:\n"
+#~ "  -h, --help                exibe esta ajuda, e então sai\n"
+#~ "  -l, --list                exibe uma lista de classes de driver "
+#~ "conhecidos, e então sai\n"
+#~ "  -V, --version             exibe a versão do PSPP, e então sai\n"
+#~ "  -v, --verbose             incrementa o nível de verbosidade\n"
+#~ "\n"
+#~ "Non-option arguments:\n"
+#~ " FILE                       arquivo de sintaxe para executar\n"
+#~ " KEY=VALUE                  sobrescreve macros no arquivo de "
+#~ "inicialização da saída\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to <%s>.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Reporte bugs para <%s>.\n"
+
+#~ msgid "Cannot open %s (%s). Writing errors to stdout instead.\n"
+#~ msgstr "Impossível abrir %s (%s). Imprimindo erros na saída padrão.\n"
+
+#~ msgid "Terminating execution of syntax file due to error."
+#~ msgstr "Terminando a execução do arquivo de sintaxe devido a um erro."
index 56f7590410f8d042761b9cdbf64949d219c4c669..65806fd442ed28bb83d9d674cbe5932355881a49 100644 (file)
@@ -7,14 +7,14 @@ include $(top_srcdir)/src/data/automake.mk
 
 
 
-AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/lib -DPKGDATADIR=\"$(pkgdatadir)\"
+AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/lib
 
 
 lib_LTLIBRARIES = src/libpspp-core.la src/libpspp.la
 src_libpspp_core_la_SOURCES = 
 
 
-src_libpspp_core_la_LDFLAGS = -release @VERSION@
+src_libpspp_core_la_LDFLAGS = -release $(VERSION)
 
 src_libpspp_core_la_LIBADD = \
        src/data/libdata.la \
@@ -24,7 +24,7 @@ src_libpspp_core_la_LIBADD = \
 
 src_libpspp_la_SOURCES = 
 
-src_libpspp_la_LDFLAGS = -release @VERSION@
+src_libpspp_la_LDFLAGS = -release $(VERSION)
 
 src_libpspp_la_LIBADD = \
        src/language/liblanguage.la \
index 1c1b519b2dce7c289d8cb11d340582cbc199dcf3..731f552a9f9021bf05ffd524c5fbebad11946405 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -42,30 +42,38 @@ enum detect_result
     IO_ERROR                    /* File couldn't be opened. */
   };
 
-/* Tries to detect whether HANDLE represents a given type of
-   file, by opening the file and passing it to DETECT, and
-   returns a detect_result. */
+/* Tries to detect whether FILE is a given type of file, by opening the file
+   and passing it to DETECT, and returns a detect_result. */
 static enum detect_result
-try_detect (struct file_handle *handle, bool (*detect) (FILE *))
+try_detect (const char *file_name, bool (*detect) (FILE *))
 {
   FILE *file;
   bool is_type;
 
-  file = fn_open (fh_get_file_name (handle), "rb");
+  file = fn_open (file_name, "rb");
   if (file == NULL)
     {
       msg (ME, _("An error occurred while opening \"%s\": %s."),
-           fh_get_file_name (handle), strerror (errno));
+           file_name, strerror (errno));
       return IO_ERROR;
     }
 
   is_type = detect (file);
 
-  fn_close (fh_get_file_name (handle), file);
+  fn_close (file_name, file);
 
   return is_type ? YES : NO;
 }
 
+/* Returns true if any_reader_open() would be able to open FILE as a data
+   file, false otherwise. */
+bool
+any_reader_may_open (const char *file)
+{
+  return (try_detect (file, sfm_detect) == YES
+          || try_detect (file, pfm_detect) == YES);
+}
+
 /* Returns a casereader for HANDLE.  On success, returns the new
    casereader and stores the file's dictionary into *DICT.  On
    failure, returns a null pointer. */
@@ -78,13 +86,13 @@ any_reader_open (struct file_handle *handle, struct dictionary **dict)
       {
         enum detect_result result;
 
-        result = try_detect (handle, sfm_detect);
+        result = try_detect (fh_get_file_name (handle), sfm_detect);
         if (result == IO_ERROR)
           return NULL;
         else if (result == YES)
           return sfm_open_reader (handle, dict, NULL);
 
-        result = try_detect (handle, pfm_detect);
+        result = try_detect (fh_get_file_name (handle), pfm_detect);
         if (result == IO_ERROR)
           return NULL;
         else if (result == YES)
index 18707fa8416ad79c5ca71d6967d354d03399d358..e999aa33f5be28543d18c1f0b120d47ded4264d0 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@
 
 struct file_handle;
 struct dictionary;
+bool any_reader_may_open (const char *file_name);
 struct casereader *any_reader_open (struct file_handle *,
                                     struct dictionary **);
 
index a249f5ad4e9557a8c0f5a6e28366dcc322182c1d..19403cf7f3ae95ee48ce6635c756d3a0d9d25545 100644 (file)
@@ -25,7 +25,11 @@ src_data_libdata_la_SOURCES = \
        src/data/caseinit.c \
        src/data/caseinit.h \
        src/data/casereader-filter.c \
+       src/data/casereader-project.c \
        src/data/casereader-provider.h \
+       src/data/casereader-select.c \
+       src/data/casereader-shim.c \
+       src/data/casereader-shim.h \
        src/data/casereader-translator.c \
        src/data/casereader.c \
        src/data/casereader.h \
@@ -38,8 +42,6 @@ src_data_libdata_la_SOURCES = \
        src/data/case.h \
        src/data/case-tmpfile.c \
        src/data/case-tmpfile.h \
-       src/data/category.c \
-       src/data/category.h \
        src/data/data-in.c \
        src/data/data-in.h \
        src/data/data-out.c \
@@ -69,6 +71,8 @@ src_data_libdata_la_SOURCES = \
        src/data/missing-values.h \
        src/data/make-file.c \
        src/data/make-file.h \
+       src/data/mrset.c \
+       src/data/mrset.h \
        src/data/procedure.c \
        src/data/procedure.h \
        src/data/por-file-reader.c \
index 1a40213a537d295f78241a0c35a0594ba3a6262a..9837013acb8bee86cb6d30bf0876a706a05dbc71 100644 (file)
@@ -320,7 +320,7 @@ caseproto_free__ (struct caseproto *proto)
 void
 caseproto_refresh_long_string_cache__ (const struct caseproto *proto_)
 {
-  struct caseproto *proto = (struct caseproto *) proto_;
+  struct caseproto *proto = CONST_CAST (struct caseproto *, proto_);
   size_t n, i;
 
   assert (proto->long_strings == NULL);
index b85a9f32d9260f02d6339b8f0852caca8518722f..b0f45c418c47aae8017b0469a5307cff6b9cd7f6 100644 (file)
@@ -22,6 +22,7 @@
 #include <stddef.h>
 #include <stdlib.h>
 #include <data/value.h>
+#include <libpspp/cast.h>
 #include <libpspp/compiler.h>
 
 /* Case prototype.
@@ -144,7 +145,7 @@ void caseproto_free__ (struct caseproto *);
 static inline struct caseproto *
 caseproto_ref (const struct caseproto *proto_)
 {
-  struct caseproto *proto = (struct caseproto *) proto_;
+  struct caseproto *proto = CONST_CAST (struct caseproto *, proto_);
   proto->ref_cnt++;
   return proto;
 }
diff --git a/src/data/casereader-project.c b/src/data/casereader-project.c
new file mode 100644 (file)
index 0000000..116a335
--- /dev/null
@@ -0,0 +1,106 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <data/casereader-provider.h>
+#include <data/subcase.h>
+
+#include "gl/xalloc.h"
+
+static bool
+projection_is_no_op (const struct casereader *reader, const struct subcase *sc)
+{
+  size_t n = subcase_get_n_fields (sc);
+  size_t i;
+
+  if (n != caseproto_get_n_widths (casereader_get_proto (reader)))
+    return false;
+
+  for (i = 0; i < n; i++)
+    if (subcase_get_case_index (sc, i) != i)
+      return false;
+
+  return true;
+}
+
+struct casereader_project
+  {
+    struct subcase old_sc;
+    struct subcase new_sc;
+  };
+
+static struct ccase *
+project_case (struct ccase *old, casenumber idx UNUSED, const void *project_)
+{
+  const struct casereader_project *project = project_;
+  struct ccase *new = case_create (subcase_get_proto (&project->new_sc));
+  subcase_copy (&project->old_sc, old, &project->new_sc, new);
+  case_unref (old);
+  return new;
+}
+
+static bool
+destroy_projection (void *project_)
+{
+  struct casereader_project *project = project_;
+  subcase_destroy (&project->old_sc);
+  subcase_destroy (&project->new_sc);
+  free (project);
+  return true;
+}
+
+/* Returns a casereader in which each row is obtained by extracting the subcase
+   SC from the corresponding row of SUBREADER. */
+struct casereader *
+casereader_project (struct casereader *subreader, const struct subcase *sc)
+{
+  if (projection_is_no_op (subreader, sc))
+    return casereader_rename (subreader);
+  else
+    {
+      struct casereader_project *project = xmalloc (sizeof *project);
+      const struct caseproto *proto;
+
+      subcase_clone (&project->old_sc, sc);
+      proto = subcase_get_proto (&project->old_sc);
+
+      subcase_init_empty (&project->new_sc);
+      subcase_add_proto_always (&project->new_sc, proto);
+
+      return casereader_translate_stateless (subreader, proto,
+                                             project_case, destroy_projection,
+                                             project);
+    }
+}
+
+/* Returns a casereader in which each row is obtained by extracting the value
+   with index COLUMN from the corresponding row of SUBREADER. */
+struct casereader *
+casereader_project_1 (struct casereader *subreader, int column)
+{
+  const struct caseproto *subproto = casereader_get_proto (subreader);
+  struct casereader *reader;
+  struct subcase sc;
+
+  subcase_init (&sc, column, caseproto_get_width (subproto, column),
+                SC_ASCEND);
+  reader = casereader_project (subreader, &sc);
+  subcase_destroy (&sc);
+
+  return reader;
+}
+
diff --git a/src/data/casereader-select.c b/src/data/casereader-select.c
new file mode 100644 (file)
index 0000000..a26ef67
--- /dev/null
@@ -0,0 +1,81 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <data/casereader-provider.h>
+
+#include "gl/xalloc.h"
+
+struct casereader_select
+  {
+    casenumber by;
+    casenumber i;
+  };
+
+static bool
+casereader_select_include (const struct ccase *c UNUSED, void *cs_)
+{
+  struct casereader_select *cs = cs_;
+  if (++cs->i >= cs->by)
+    {
+      cs->i = 0;
+      return true;
+    }
+  else
+    return false;
+}
+
+static bool
+casereader_select_destroy (void *cs_)
+{
+  struct casereader_select *cs = cs_;
+  free (cs);
+  return true;
+}
+
+/* Returns a casereader that contains cases FIRST though LAST, exclusive, of
+   those within SUBREADER.  (The first case in SUBREADER is number 0.)  If BY
+   is greater than 1, then it specifies a step between cases, e.g.  a BY value
+   of 2 causes the cases numbered FIRST + 1, FIRST + 3, FIRST + 5, and so on
+   to be omitted.
+
+   The caller gives up ownership of SUBREADER, transferring it into this
+   function. */
+struct casereader *
+casereader_select (struct casereader *subreader,
+                   casenumber first, casenumber last, casenumber by)
+{
+  if (by == 0)
+    by = 1;
+
+  casereader_advance (subreader, first);
+  if (last >= first)
+    casereader_truncate (subreader, (last - first) / by * by);
+
+  if (by == 1)
+    return casereader_rename (subreader);
+  else
+    {
+      struct casereader_select *cs = xmalloc (sizeof *cs);
+      cs->by = by;
+      cs->i = 0;
+      return casereader_create_filter_func (subreader,
+                                            casereader_select_include,
+                                            casereader_select_destroy,
+                                            cs, NULL);
+    }
+}
diff --git a/src/data/casereader-shim.c b/src/data/casereader-shim.c
new file mode 100644 (file)
index 0000000..9d9dd70
--- /dev/null
@@ -0,0 +1,142 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "data/casereader-shim.h"
+
+#include <stdlib.h>
+
+#include "data/casereader.h"
+#include "data/casereader-provider.h"
+#include "data/casewindow.h"
+#include "data/settings.h"
+#include "libpspp/taint.h"
+
+#include "gl/xalloc.h"
+
+/* A buffering shim casereader. */
+struct casereader_shim
+  {
+    struct casewindow *window;          /* Window of buffered cases. */
+    struct casereader *subreader;       /* Subordinate casereader. */
+  };
+
+static const struct casereader_random_class shim_class;
+
+static bool buffer_case (struct casereader_shim *s);
+
+/* Interposes a buffering shim on READER.
+
+   Returns the new shim.  The only legitimate use of the returned
+   casereader_shim is for calling casereader_shim_slurp().  If READER has no
+   clones already (which the caller should ensure, if it plans to use the
+   return value), then the returned casreader_shim is valid for that purpose
+   until, and only until, the READER's 'destroy' function is called. */
+struct casereader_shim *
+casereader_shim_insert (struct casereader *reader)
+{
+  const struct caseproto *proto = casereader_get_proto (reader);
+  casenumber case_cnt = casereader_get_case_cnt (reader);
+  struct casereader_shim *s = xmalloc (sizeof *s);
+  s->window = casewindow_create (proto, settings_get_workspace_cases (proto));
+  s->subreader = casereader_create_random (proto, case_cnt, &shim_class, s);
+  casereader_swap (reader, s->subreader);
+  taint_propagate (casewindow_get_taint (s->window),
+                   casereader_get_taint (reader));
+  taint_propagate (casereader_get_taint (s->subreader),
+                   casereader_get_taint (reader));
+  return s;
+}
+
+/* Reads all of the cases from S's subreader into S's buffer and destroys S's
+   subreader.  (This is a no-op if the subreader has already been
+   destroyed.)
+
+   Refer to the comment on casereader_shim_insert() for information on when
+   this function may be used. */
+void
+casereader_shim_slurp (struct casereader_shim *s)
+{
+  while (buffer_case (s))
+    continue;
+}
+
+/* Reads a case from S's subreader and appends it to S's window.  Returns true
+   if successful, false at the end of S's subreader or upon an I/O error. */
+static bool
+buffer_case (struct casereader_shim *s)
+{
+  struct ccase *tmp;
+
+  if (s->subreader == NULL)
+    return false;
+
+  tmp = casereader_read (s->subreader);
+  if (tmp == NULL)
+    {
+      casereader_destroy (s->subreader);
+      s->subreader = NULL;
+      return false;
+    }
+
+  casewindow_push_head (s->window, tmp);
+  return true;
+}
+
+/* Reads the case at the given 0-based OFFSET from the front of the window into
+   C.  Returns the case if successful, or a null pointer if OFFSET is beyond
+   the end of file or upon I/O error.  The caller must call case_unref() on the
+   returned case when it is no longer needed. */
+static struct ccase *
+casereader_shim_read (struct casereader *reader UNUSED, void *s_,
+                      casenumber offset)
+{
+  struct casereader_shim *s = s_;
+
+  while (casewindow_get_case_cnt (s->window) <= offset)
+    if (!buffer_case (s))
+      return false;
+
+  return casewindow_get_case (s->window, offset);
+}
+
+/* Destroys S. */
+static void
+casereader_shim_destroy (struct casereader *reader UNUSED, void *s_)
+{
+  struct casereader_shim *s = s_;
+  casewindow_destroy (s->window);
+  casereader_destroy (s->subreader);
+  free (s);
+}
+
+/* Discards CNT cases from the front of S's window. */
+static void
+casereader_shim_advance (struct casereader *reader UNUSED, void *s_,
+                         casenumber case_cnt)
+{
+  struct casereader_shim *s = s_;
+  casewindow_pop_tail (s->window, case_cnt);
+}
+
+/* Class for the buffered reader. */
+static const struct casereader_random_class shim_class =
+  {
+    casereader_shim_read,
+    casereader_shim_destroy,
+    casereader_shim_advance,
+  };
diff --git a/src/data/casereader-shim.h b/src/data/casereader-shim.h
new file mode 100644 (file)
index 0000000..704d1d3
--- /dev/null
@@ -0,0 +1,48 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef DATA_CASEREADER_SHIM_H
+#define DATA_CASEREADER_SHIM_H 1
+
+/* Buffering shim for implementing clone and peek operations.
+
+   The "clone" and "peek" operations aren't implemented by all types of
+   casereaders, but we have to expose a uniform interface anyhow.  The
+   casereader buffering shim can do this by interposing a buffer on top of an
+   existing casereader.  The shim maintains a window of cases that spans the
+   positions of the original casereader and all of its clones (the "clone
+   set"), from the position of the casereader that has read the fewest cases to
+   the position of the casereader that has read the most.
+
+   Thus, if all of the casereaders in the clone set are at approximately the
+   same position, only a few cases are buffered and there is little
+   inefficiency.  If, on the other hand, one casereader is not used to read any
+   cases at all, but another one is used to read all of the cases, the entire
+   contents of the casereader is copied into the buffer.  This still might not
+   be so inefficient, given that case data in memory is shared across multiple
+   identical copies, but in the worst case the window implementation will write
+   cases to disk instead of maintaining them in-memory.
+
+   Casereader buffering shims are inserted automatically on the first call to
+   casereader_clone() or casereader_peek() for a casereader that does not
+   support those operations natively.  Thus, there is ordinarily little reason
+   to intentionally insert a shim. */
+
+struct casereader;
+struct casereader_shim *casereader_shim_insert (struct casereader *);
+void casereader_shim_slurp (struct casereader_shim *);
+
+#endif /* data/casereader-shim.h */
index feffa15c4510ba97e57cd95705cd9afd290c1e04..27ea413460aa501a61d4d81ae97a9c9c8f1d50df 100644 (file)
@@ -46,6 +46,11 @@ static const struct casereader_class casereader_translator_class;
    INPUT and auxiliary data AUX.  TRANSLATE must destroy its
    input case.
 
+   TRANSLATE may be stateful, that is, the output for a given
+   case may depend on previous cases.  If TRANSLATE is stateless,
+   then you may want to use casereader_translate_stateless
+   instead, since it sometimes performs better.
+
    The cases returned by TRANSLATE must match OUTPUT_PROTO.
 
    When the translating casereader is destroyed, DESTROY will be
@@ -106,7 +111,110 @@ static const struct casereader_class casereader_translator_class =
     NULL,
     NULL,
   };
+\f
+/* Casereader that applies a user-supplied function to translate
+   each case into another in a stateless fashion. */
+
+/* A statelessly translating casereader. */
+struct casereader_stateless_translator
+  {
+    struct casereader *subreader; /* Source of input cases. */
+
+    casenumber case_offset;
+    struct ccase *(*translate) (struct ccase *input, casenumber,
+                                const void *aux);
+    bool (*destroy) (void *aux);
+    void *aux;
+  };
+
+static const struct casereader_random_class
+casereader_stateless_translator_class;
+
+/* Creates and returns a new casereader whose cases are produced by reading
+   from SUBREADER and passing through the TRANSLATE function.  TRANSLATE must
+   takes ownership of its input case and returns a translated case, populating
+   the translated case based on INPUT and auxiliary data AUX.
+
+   TRANSLATE must be stateless, that is, the output for a given case must not
+   depend on previous cases.  This is because cases may be retrieved in
+   arbitrary order, and some cases may be retrieved multiple times, and some
+   cases may be skipped and never retrieved at all.  If TRANSLATE is stateful,
+   use casereader_create_translator instead.
+
+   The casenumber argument to the TRANSLATE function is the absolute case
+   number in SUBREADER, that is, 0 when the first case in SUBREADER is being
+   translated, 1 when the second case is being translated, and so on.
+
+   The cases returned by TRANSLATE must match OUTPUT_PROTO.
+
+   When the stateless translating casereader is destroyed, DESTROY will be
+   called to allow any auxiliary data maintained by TRANSLATE to be freed.
+
+   After this function is called, SUBREADER must not ever again be referenced
+   directly.  It will be destroyed automatically when the translating
+   casereader is destroyed. */
+struct casereader *
+casereader_translate_stateless (
+  struct casereader *subreader,
+  const struct caseproto *output_proto,
+  struct ccase *(*translate) (struct ccase *input, casenumber,
+                              const void *aux),
+  bool (*destroy) (void *aux),
+  void *aux)
+{
+  struct casereader_stateless_translator *cst = xmalloc (sizeof *cst);
+  struct casereader *reader;
+  cst->subreader = casereader_rename (subreader);
+  cst->translate = translate;
+  cst->destroy = destroy;
+  cst->aux = aux;
+  reader = casereader_create_random (
+    output_proto, casereader_get_case_cnt (cst->subreader),
+    &casereader_stateless_translator_class, cst);
+  taint_propagate (casereader_get_taint (cst->subreader),
+                   casereader_get_taint (reader));
+  return reader;
+}
+
+/* Internal read function for stateless translating casereader. */
+static struct ccase *
+casereader_stateless_translator_read (struct casereader *reader UNUSED,
+                                      void *cst_, casenumber idx)
+{
+  struct casereader_stateless_translator *cst = cst_;
+  struct ccase *tmp = casereader_peek (cst->subreader, idx);
+  if (tmp != NULL)
+    tmp = cst->translate (tmp, cst->case_offset + idx, cst->aux);
+  return tmp;
+}
+
+/* Internal destroy function for translating casereader. */
+static void
+casereader_stateless_translator_destroy (struct casereader *reader UNUSED,
+                                         void *cst_)
+{
+  struct casereader_stateless_translator *cst = cst_;
+  casereader_destroy (cst->subreader);
+  cst->destroy (cst->aux);
+  free (cst);
+}
+
+static void
+casereader_stateless_translator_advance (struct casereader *reader UNUSED,
+                                         void *cst_, casenumber cnt)
+{
+  struct casereader_stateless_translator *cst = cst_;
+  cst->case_offset += casereader_advance (cst->subreader, cnt);
+}
 
+/* Casereader class for stateless translating casereader. */
+static const struct casereader_random_class
+casereader_stateless_translator_class =
+  {
+    casereader_stateless_translator_read,
+    casereader_stateless_translator_destroy,
+    casereader_stateless_translator_advance,
+  };
 \f
 
 struct casereader_append_numeric
index a1550ac57560e5fb623d12ede14b7e1a65ca661b..98c10273b314dd4bbc4f81170e485136a828a756 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include <data/casereader.h>
-#include <data/casereader-provider.h>
+#include "data/casereader.h"
+#include "data/casereader-provider.h"
 
 #include <stdlib.h>
 
-#include <data/casewindow.h>
-#include <data/casewriter.h>
-#include <data/settings.h>
-#include <libpspp/assertion.h>
-#include <libpspp/heap.h>
-#include <libpspp/taint.h>
+#include "data/casereader-shim.h"
+#include "data/casewriter.h"
+#include "libpspp/assertion.h"
+#include "libpspp/heap.h"
+#include "libpspp/taint.h"
 
-#include "xalloc.h"
+#include "gl/xalloc.h"
 
 /* A casereader. */
 struct casereader
@@ -41,8 +40,6 @@ struct casereader
     void *aux;                            /* Auxiliary data for class. */
   };
 
-static void insert_shim (struct casereader *);
-
 /* Reads and returns the next case from READER.  The caller owns
    the returned case and must call case_unref on it when its data
    is no longer needed.  Returns a null pointer if cases have
@@ -108,13 +105,13 @@ casereader_destroy (struct casereader *reader)
 struct casereader *
 casereader_clone (const struct casereader *reader_)
 {
-  struct casereader *reader = (struct casereader *) reader_;
+  struct casereader *reader = CONST_CAST (struct casereader *, reader_);
   struct casereader *clone;
   if ( reader == NULL ) 
     return NULL;
 
   if (reader->class->clone == NULL)
-    insert_shim (reader);
+    casereader_shim_insert (reader);
   clone = reader->class->clone (reader, reader->aux);
   assert (clone != NULL);
   assert (clone != reader);
@@ -175,7 +172,7 @@ casereader_peek (struct casereader *reader, casenumber idx)
     {
       struct ccase *c;
       if (reader->class->peek == NULL)
-        insert_shim (reader);
+        casereader_shim_insert (reader);
       c = reader->class->peek (reader, reader->aux, idx);
       if (c != NULL)
         return c;
@@ -257,6 +254,20 @@ casereader_get_case_cnt (struct casereader *reader)
   return reader->case_cnt;
 }
 
+static casenumber
+casereader_count_cases__ (const struct casereader *reader,
+                          casenumber max_cases)
+{
+  struct casereader *clone;
+  casenumber n_cases;
+
+  clone = casereader_clone (reader);
+  n_cases = casereader_advance (clone, max_cases);
+  casereader_destroy (clone);
+
+  return n_cases;
+}
+
 /* Returns the number of cases that will be read by successive
    calls to casereader_read for READER, assuming that no errors
    occur.  Upon an error condition, the case count drops to 0, so
@@ -267,25 +278,30 @@ casereader_get_case_cnt (struct casereader *reader)
    of the contents of a clone of READER.  Thus, the return value
    is always correct in the absence of I/O errors. */
 casenumber
-casereader_count_cases (struct casereader *reader)
+casereader_count_cases (const struct casereader *reader)
 {
   if (reader->case_cnt == CASENUMBER_MAX)
     {
-      casenumber n_cases = 0;
-      struct ccase *c;
-
-      struct casereader *clone = casereader_clone (reader);
-
-      for (; (c = casereader_read (clone)) != NULL; case_unref (c))
-        n_cases++;
-
-      casereader_destroy (clone);
-      reader->case_cnt = n_cases;
+      struct casereader *reader_rw = CONST_CAST (struct casereader *, reader);
+      reader_rw->case_cnt = casereader_count_cases__ (reader, CASENUMBER_MAX);
     }
-
   return reader->case_cnt;
 }
 
+/* Truncates READER to at most N cases. */
+void
+casereader_truncate (struct casereader *reader, casenumber n)
+{
+  /* This could be optimized, if it ever becomes too expensive, by adding a
+     "max_cases" member to struct casereader.  We could also add a "truncate"
+     function to the casereader implementation, to allow the casereader to
+     throw away data that cannot ever be read. */
+  if (reader->case_cnt == CASENUMBER_MAX)
+    reader->case_cnt = casereader_count_cases__ (reader, n);
+  if (reader->case_cnt > n)
+    reader->case_cnt = n;
+}
+
 /* Returns the prototype for the cases in READER.  The caller
    must not unref the returned prototype. */
 const struct caseproto *
@@ -294,6 +310,26 @@ casereader_get_proto (const struct casereader *reader)
   return reader->proto;
 }
 
+/* Skips past N cases in READER, stopping when the last case in
+   READER has been read or on an input error.  Returns the number
+   of cases successfully skipped. */
+casenumber
+casereader_advance (struct casereader *reader, casenumber n)
+{
+  casenumber i;
+
+  for (i = 0; i < n; i++)
+    {
+      struct ccase *c = casereader_read (reader);
+      if (c == NULL)
+        break;
+      case_unref (c);
+    }
+
+  return i;
+}
+
+
 /* Copies all the cases in READER to WRITER, propagating errors
    appropriately. */
 void
@@ -559,108 +595,42 @@ static const struct casereader_class random_reader_casereader_class =
     random_reader_peek,
   };
 \f
-/* Buffering shim for implementing clone and peek operations.
-
-   The "clone" and "peek" operations aren't implemented by all
-   types of casereaders, but we have to expose a uniform
-   interface anyhow.  We do this by interposing a buffering
-   casereader on top of the existing casereader on the first call
-   to "clone" or "peek".  The buffering casereader maintains a
-   window of cases that spans the positions of the original
-   casereader and all of its clones (the "clone set"), from the
-   position of the casereader that has read the fewest cases to
-   the position of the casereader that has read the most.
-
-   Thus, if all of the casereaders in the clone set are at
-   approximately the same position, only a few cases are buffered
-   and there is little inefficiency.  If, on the other hand, one
-   casereader is not used to read any cases at all, but another
-   one is used to read all of the cases, the entire contents of
-   the casereader is copied into the buffer.  This still might
-   not be so inefficient, given that case data in memory is
-   shared across multiple identical copies, but in the worst case
-   the window implementation will write cases to disk instead of
-   maintaining them in-memory. */
-
-/* A buffering shim for a non-clonable or non-peekable
-   casereader. */
-struct shim
-  {
-    struct casewindow *window;          /* Window of buffered cases. */
-    struct casereader *subreader;       /* Subordinate casereader. */
-  };
+\f
+static const struct casereader_class casereader_null_class;
 
-static const struct casereader_random_class shim_class;
+/* Returns a casereader with no cases.  The casereader has the prototype
+   specified by PROTO.  PROTO may be specified as a null pointer, in which case
+   the casereader has no variables. */
+struct casereader *
+casereader_create_empty (const struct caseproto *proto_)
+{
+  struct casereader *reader;
+  struct caseproto *proto;
 
-/* Interposes a buffering shim atop READER. */
-static void
-insert_shim (struct casereader *reader)
-{
-  const struct caseproto *proto = casereader_get_proto (reader);
-  casenumber case_cnt = casereader_get_case_cnt (reader);
-  struct shim *b = xmalloc (sizeof *b);
-  b->window = casewindow_create (proto, settings_get_workspace_cases (proto));
-  b->subreader = casereader_create_random (proto, case_cnt, &shim_class, b);
-  casereader_swap (reader, b->subreader);
-  taint_propagate (casewindow_get_taint (b->window),
-                   casereader_get_taint (reader));
-  taint_propagate (casereader_get_taint (b->subreader),
-                   casereader_get_taint (reader));
-}
-
-/* Ensures that B's window contains at least CASE_CNT cases.
-   Return true if successful, false upon reaching the end of B's
-   subreader or an I/O error. */
-static bool
-prime_buffer (struct shim *b, casenumber case_cnt)
-{
-  while (casewindow_get_case_cnt (b->window) < case_cnt)
-    {
-      struct ccase *tmp = casereader_read (b->subreader);
-      if (tmp == NULL)
-        return false;
-      casewindow_push_head (b->window, tmp);
-    }
-  return true;
-}
+  proto = proto_ != NULL ? caseproto_ref (proto_) : caseproto_create ();
+  reader = casereader_create_sequential (NULL, proto, 0,
+                                         &casereader_null_class, NULL);
+  caseproto_unref (proto);
 
-/* Reads the case at the given 0-based OFFSET from the front of
-   the window into C.  Returns the case if successful, or a null
-   pointer if OFFSET is beyond the end of file or upon I/O error.
-   The caller must call case_unref() on the returned case when it
-   is no longer needed. */
-static struct ccase *
-shim_read (struct casereader *reader UNUSED, void *b_,
-           casenumber offset)
-{
-  struct shim *b = b_;
-  if (!prime_buffer (b, offset + 1))
-    return NULL;
-  return casewindow_get_case (b->window, offset);
+  return reader;
 }
 
-/* Destroys B. */
-static void
-shim_destroy (struct casereader *reader UNUSED, void *b_)
+static struct ccase *
+casereader_null_read (struct casereader *reader UNUSED, void *aux UNUSED)
 {
-  struct shim *b = b_;
-  casewindow_destroy (b->window);
-  casereader_destroy (b->subreader);
-  free (b);
+  return NULL;
 }
 
-/* Discards CNT cases from the front of B's window. */
 static void
-shim_advance (struct casereader *reader UNUSED, void *b_, casenumber case_cnt)
+casereader_null_destroy (struct casereader *reader UNUSED, void *aux UNUSED)
 {
-  struct shim *b = b_;
-  casewindow_pop_tail (b->window, case_cnt);
+  /* Nothing to do. */
 }
 
-/* Class for the buffered reader. */
-static const struct casereader_random_class shim_class =
+static const struct casereader_class casereader_null_class =
   {
-    shim_read,
-    shim_destroy,
-    shim_advance,
+    casereader_null_read,
+    casereader_null_destroy,
+    NULL,                       /* clone */
+    NULL,                       /* peek */
   };
index 3b903bbfd52d66cdba8ffe0e960fa7f0d1ef2474..f2231e2d88984576e39e712427d3dfa4e530f889 100644 (file)
@@ -58,6 +58,7 @@
 struct dictionary;
 struct casereader;
 struct casewriter;
+struct subcase;
 
 struct ccase *casereader_read (struct casereader *);
 bool casereader_destroy (struct casereader *);
@@ -76,11 +77,15 @@ void casereader_force_error (struct casereader *);
 const struct taint *casereader_get_taint (const struct casereader *);
 
 casenumber casereader_get_case_cnt (struct casereader *);
-casenumber casereader_count_cases (struct casereader *);
+casenumber casereader_count_cases (const struct casereader *);
+void casereader_truncate (struct casereader *, casenumber);
 const struct caseproto *casereader_get_proto (const struct casereader *);
 
+casenumber casereader_advance (struct casereader *, casenumber);
 void casereader_transfer (struct casereader *, struct casewriter *);
 \f
+struct casereader *casereader_create_empty (const struct caseproto *);
+
 struct casereader *
 casereader_create_filter_func (struct casereader *,
                                bool (*include) (const struct ccase *,
@@ -112,6 +117,22 @@ casereader_create_translator (struct casereader *,
                               bool (*destroy) (void *aux),
                               void *aux);
 
+struct casereader *
+casereader_translate_stateless (struct casereader *,
+                                const struct caseproto *output_proto,
+                                struct ccase *(*translate) (struct ccase *,
+                                                            casenumber idx,
+                                                            const void *aux),
+                                bool (*destroy) (void *aux),
+                                void *aux);
+
+struct casereader *casereader_project (struct casereader *,
+                                       const struct subcase *);
+struct casereader *casereader_project_1 (struct casereader *, int column);
+struct casereader *casereader_select (struct casereader *,
+                                      casenumber first, casenumber last,
+                                      casenumber by);
+
 /* A function which creates a numberic value from an existing case */
 typedef double new_value_func (const struct ccase *, casenumber, void *);
 
index 9b04b9413c61bbace1e5b189d68e65eebe152482..936b6aa940051be14a422fde8a8773f22388eeb7 100644 (file)
@@ -168,7 +168,7 @@ casewindow_pop_tail (struct casewindow *cw, casenumber case_cnt)
 struct ccase *
 casewindow_get_case (const struct casewindow *cw_, casenumber case_idx)
 {
-  struct casewindow *cw = (struct casewindow *) cw_;
+  struct casewindow *cw = CONST_CAST (struct casewindow *, cw_);
 
   assert (case_idx >= 0 && case_idx < casewindow_get_case_cnt (cw));
   if (casewindow_error (cw))
diff --git a/src/data/category.c b/src/data/category.c
deleted file mode 100644 (file)
index 968dd4c..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2005, 2009 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-/*
-  Functions and data structures to store values of a categorical
-  variable, and to recode those values into binary vectors.
-
-  For some statistical models, it is necessary to change each value
-  of a categorical variable to a vector with binary entries. These
-  vectors are then stored as sub-rows within a matrix during
-  model-fitting. For example, we need functions and data strucutres to map a
-  value, say 'a', of a variable named 'cat_var', to a vector, say (0
-  1 0 0 0), and vice versa.  We also need to be able to map the
-  vector back to the value 'a', and if the vector is a sub-row of a
-  matrix, we need to know which sub-row corresponds to the variable
-  'cat_var'.
-*/
-#include <config.h>
-
-#include <assert.h>
-#include <data/category.h>
-#include <data/value.h>
-#include <data/variable.h>
-#include <gl/xalloc.h>
-#include <libpspp/message.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CAT_VALUE_NOT_FOUND -1
-
-#define N_INITIAL_CATEGORIES 1
-
-/*
-  This structure contains the observed values of a
-  categorical variable.
- */
-struct cat_vals
-{
-  union value *vals;
-  size_t n_categories;
-  size_t n_allocated_categories;       /* This is used only during
-                                          initialization to keep
-                                          track of the number of
-                                          values stored.
-                                        */
-  size_t *value_counts; /* Element i stores the number of cases for which
-                          the categorical variable has that corresponding 
-                          value. This is necessary for computing covariance
-                          matrices.
-                        */
-};
-
-void
-cat_stored_values_create (const struct variable *v)
-{
-  if (!var_has_obs_vals (v))
-    {
-      struct cat_vals *obs_vals = xmalloc (sizeof *obs_vals);
-
-      obs_vals->n_categories = 0;
-      obs_vals->n_allocated_categories = N_INITIAL_CATEGORIES;
-      obs_vals->vals = xnmalloc (N_INITIAL_CATEGORIES, sizeof *obs_vals->vals);
-      obs_vals->value_counts = xnmalloc (N_INITIAL_CATEGORIES, sizeof *obs_vals->value_counts);
-      var_set_obs_vals (v, obs_vals);
-    }
-}
-
-void
-cat_stored_values_destroy (struct cat_vals *obs_vals)
-{
-  if (obs_vals != NULL)
-    {
-      if (obs_vals->n_allocated_categories > 0)
-       {
-         free (obs_vals->vals);
-         free (obs_vals->value_counts);
-       }
-      free (obs_vals);
-    }
-}
-
-/*
-  Which subscript corresponds to val?
- */
-size_t
-cat_value_find (const struct variable *v, const union value *val)
-{
-  struct cat_vals *obs_vals = var_get_obs_vals (v);
-  size_t i;
-  const union value *candidate;
-
-  for (i = 0; i < obs_vals->n_categories; i++)
-    {
-      candidate = obs_vals->vals + i;
-      assert (candidate != NULL);
-      if (value_equal (candidate, val, var_get_width (v)))
-       {
-         return i;
-       }
-    }
-  return CAT_VALUE_NOT_FOUND;
-}
-
-/*
-   Add the new value unless it is already present. Increment the count.
- */
-void
-cat_value_update (const struct variable *v, const union value *val)
-{
-  if (var_is_alpha (v))
-    {
-      size_t i;
-      struct cat_vals *cv = var_get_obs_vals (v);
-      i = cat_value_find (v, val);
-      if (i == CAT_VALUE_NOT_FOUND)
-       {
-         if (cv->n_categories >= cv->n_allocated_categories)
-           {
-             cv->n_allocated_categories *= 2;
-             cv->vals = xnrealloc (cv->vals,
-                                   cv->n_allocated_categories,
-                                   sizeof *cv->vals);
-             cv->value_counts = xnrealloc (cv->value_counts, cv->n_allocated_categories,
-                                           sizeof *cv->value_counts);
-           }
-         cv->vals[cv->n_categories] = *val;
-         cv->value_counts[cv->n_categories] = 1;
-         cv->n_categories++;
-       }
-      else
-       {
-         cv->value_counts[i]++;
-       }
-    }
-}
-/*
-  Return the count for the sth category.
- */
-size_t
-cat_get_category_count (const size_t s, const struct variable *v)
-{
-  struct cat_vals *tmp;
-  size_t n_categories;
-
-  tmp = var_get_obs_vals (v);
-  n_categories = cat_get_n_categories (v);
-  if (s < n_categories)
-    {
-      return tmp->value_counts[s];
-    }
-  return CAT_VALUE_NOT_FOUND;
-}
-
-const union value *
-cat_subscript_to_value (const size_t s, const struct variable *v)
-{
-  struct cat_vals *obs_vals = var_get_obs_vals (v);
-  return s < obs_vals->n_categories ? obs_vals->vals + s : NULL;
-}
-
-/*
-  Return the number of categories of a categorical variable.
- */
-size_t
-cat_get_n_categories (const struct variable *v)
-{
-  return var_get_obs_vals (v)->n_categories;
-}
-
-/*
-  If VAR is categorical with d categories, its first category should
-  correspond to the origin in d-dimensional Euclidean space.
- */
-bool
-cat_is_origin (const struct variable *var, const union value *val)
-{
-  if (var_is_numeric (var))
-    {
-      return false;
-    }
-  if (cat_value_find (var, val) == 0)
-    {
-      return true;
-    }
-  return false;
-}
diff --git a/src/data/category.h b/src/data/category.h
deleted file mode 100644 (file)
index f90ae7c..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2005 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-/*
-  Functions and data structures to recode categorical variables into
-  vectors and sub-rows of matrices.
-
-  To fit many types of statistical models, it is necessary
-  to change each value of a categorical variable to a vector with binary
-  entries. These vectors are then stored as sub-rows within a matrix
-  during model-fitting. We need functions and data strucutres to,
-  e.g., map a value, say 'a', of a variable named 'cat_var', to a
-  vector, say (0 1 0 0 0), and vice versa.  We also need to be able
-  to map the vector back to the value 'a', and if the vector is a
-  sub-row of a matrix, we need to know which sub-row corresponds to
-  the variable 'cat_var'.
-
- */
-
-#ifndef CATEGORY_H
-#define CATEGORY_H
-#include <stdbool.h>
-#include <stddef.h>
-
-struct cat_vals;
-struct variable ;
-union value;
-
-void cat_stored_values_create (const struct variable *);
-void cat_stored_values_destroy (struct cat_vals *);
-
-size_t cat_value_find (const struct variable *, const union value *);
-
-const union value *cat_subscript_to_value (const size_t,
-                                          const struct variable *);
-
-
-void cat_value_update (const struct variable *, const union value *);
-
-/*
-  Return the count for the sth category.
-*/
-size_t
-cat_get_category_count (const size_t, const struct variable *);
-
-/*
-  Return the number of categories of a categorical variable.
- */
-size_t  cat_get_n_categories (const struct variable *v);
-
-/*
-  If VAR is categorical with d categories, its first category should
-  correspond to the origin in d-dimensional Euclidean space.
- */
-bool cat_is_origin (const struct variable *, const union value *);
-#endif
index 33e369f971da8751f78e29e76f23d230e6e0227d..63e644c186bf565168a7f6e199c4bc707f7ae7cf 100644 (file)
@@ -1199,9 +1199,11 @@ vdata_warning (const struct data_in *i, const char *format, va_list args)
   ds_put_format (&text, _("%s field) "), fmt_name (i->format));
   ds_put_vformat (&text, format, args);
 
-  m.category = MSG_DATA;
-  m.severity = MSG_WARNING;
+  m.category = MSG_C_DATA;
+  m.severity = MSG_S_WARNING;
   m.text = ds_cstr (&text);
+  m.where.file_name = NULL;
+  m.where.line_number = -1;
 
   msg_emit (&m);
 }
index fa24d8ce77014e980cb79e4700ffc63832c5d061..4abc526f0cb2a720cb8e3023eb7d732effdb5da4 100644 (file)
@@ -275,7 +275,7 @@ datasheet_destroy (struct datasheet *ds)
 const struct caseproto *
 datasheet_get_proto (const struct datasheet *ds_)
 {
-  struct datasheet *ds = (struct datasheet *) ds_;
+  struct datasheet *ds = CONST_CAST (struct datasheet *, ds_);
   if (ds->proto == NULL)
     {
       size_t i;
@@ -548,7 +548,7 @@ datasheet_get_row (const struct datasheet *ds, casenumber row)
 {
   size_t n_columns = datasheet_get_n_columns (ds);
   struct ccase *c = case_create (datasheet_get_proto (ds));
-  if (rw_case ((struct datasheet *) ds, OP_READ,
+  if (rw_case (CONST_CAST (struct datasheet *, ds), OP_READ,
                row, 0, n_columns, case_data_all_rw (c)))
     return c;
   else
@@ -582,7 +582,8 @@ datasheet_get_value (const struct datasheet *ds, casenumber row,
                      size_t column, union value *value)
 {
   assert (row >= 0);
-  return rw_case ((struct datasheet *) ds, OP_READ, row, column, 1, value);
+  return rw_case (CONST_CAST (struct datasheet *, ds), OP_READ,
+                  row, column, 1, value);
 }
 
 /* Stores VALUE into DS in the given ROW and COLUMN.  VALUE must
index 8858985ac4475daae7113658f9d7ee0d8e059af3..aa0fcd5654d82181c23895793a7c88459e1e2dae 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include "dictionary.h"
+#include "data/dictionary.h"
 
+#include <stdint.h>
 #include <stdlib.h>
 #include <ctype.h>
 
-#include <data/attributes.h>
-#include <data/case.h>
-#include <data/identifier.h>
-#include <data/settings.h>
-#include <data/value-labels.h>
-#include <data/vardict.h>
-#include <data/variable.h>
-#include <data/vector.h>
-#include <libpspp/array.h>
-#include <libpspp/assertion.h>
-#include <libpspp/compiler.h>
-#include <libpspp/hash.h>
-#include <libpspp/message.h>
-#include <libpspp/misc.h>
-#include <libpspp/pool.h>
-#include <libpspp/str.h>
-
-#include "intprops.h"
-#include "minmax.h"
-#include "xalloc.h"
+#include "data/attributes.h"
+#include "data/case.h"
+#include "data/identifier.h"
+#include "data/mrset.h"
+#include "data/settings.h"
+#include "data/value-labels.h"
+#include "data/vardict.h"
+#include "data/variable.h"
+#include "data/vector.h"
+#include "libpspp/array.h"
+#include "libpspp/assertion.h"
+#include "libpspp/compiler.h"
+#include "libpspp/hash-functions.h"
+#include "libpspp/hmap.h"
+#include "libpspp/message.h"
+#include "libpspp/misc.h"
+#include "libpspp/pool.h"
+#include "libpspp/str.h"
+
+#include "gl/intprops.h"
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 /* A dictionary. */
 struct dictionary
   {
-    struct variable **var;     /* Variables. */
+    struct vardict_info *var;  /* Variables. */
     size_t var_cnt, var_cap;    /* Number of variables, capacity. */
     struct caseproto *proto;    /* Prototype for dictionary cases
                                    (updated lazily). */
-    struct hsh_table *name_tab;        /* Variable index by name. */
+    struct hmap name_map;      /* Variable index by name. */
     int next_value_idx;         /* Index of next `union value' to allocate. */
     const struct variable **split;    /* SPLIT FILE vars. */
     size_t split_cnt;           /* SPLIT FILE count. */
@@ -64,6 +67,8 @@ struct dictionary
     struct vector **vector;     /* Vectors of variables. */
     size_t vector_cnt;          /* Number of vectors. */
     struct attrset attributes;  /* Custom attributes. */
+    struct mrset **mrsets;      /* Multiple response sets. */
+    size_t n_mrsets;            /* Number of multiple response sets. */
 
     char *encoding;             /* Character encoding of string data */
 
@@ -75,12 +80,17 @@ struct dictionary
     void *changed_data;
   };
 
+static void dict_unset_split_var (struct dictionary *, struct variable *);
+static void dict_unset_mrset_var (struct dictionary *, struct variable *);
 
 void
 dict_set_encoding (struct dictionary *d, const char *enc)
 {
   if (enc)
-    d->encoding = xstrdup (enc);
+    {
+      free (d->encoding);
+      d->encoding = xstrdup (enc);
+    }
 }
 
 const char *
@@ -116,8 +126,7 @@ dict_dump (const struct dictionary *d)
   int i;
   for (i = 0 ; i < d->var_cnt ; ++i )
     {
-      const struct variable *v =
-       d->var[i];
+      const struct variable *v = d->var[i].var;
       printf ("Name: %s;\tdict_idx: %zu; case_idx: %zu\n",
              var_get_name (v),
              var_get_dict_index (v),
@@ -155,8 +164,7 @@ dict_create (void)
 {
   struct dictionary *d = xzalloc (sizeof *d);
 
-  d->name_tab = hsh_create (8, compare_vars_by_name, hash_var_by_name,
-                            NULL, NULL);
+  hmap_init (&d->name_map);
   attrset_init (&d->attributes);
   return d;
 }
@@ -175,25 +183,18 @@ dict_clone (const struct dictionary *s)
   struct dictionary *d;
   size_t i;
 
-  assert (s != NULL);
-
   d = dict_create ();
 
   for (i = 0; i < s->var_cnt; i++)
     {
-      const struct vardict_info *svdi;
-      struct vardict_info dvdi;
-      struct variable *sv = s->var[i];
-      struct variable *dv = dict_clone_var_assert (d, sv, var_get_name (sv));
+      struct variable *sv = s->var[i].var;
+      struct variable *dv = dict_clone_var_assert (d, sv);
       size_t i;
 
       for (i = 0; i < var_get_short_name_cnt (sv); i++)
         var_set_short_name (dv, i, var_get_short_name (sv, i));
 
-      svdi = var_get_vardict (sv);
-      dvdi = *svdi;
-      dvdi.dict = d;
-      var_set_vardict (dv, &dvdi);
+      var_get_vardict (dv)->case_index = var_get_vardict (sv)->case_index;
     }
 
   d->next_value_idx = s->next_value_idx;
@@ -226,6 +227,20 @@ dict_clone (const struct dictionary *s)
 
   dict_set_attributes (d, dict_get_attributes (s));
 
+  for (i = 0; i < s->n_mrsets; i++)
+    {
+      const struct mrset *old = s->mrsets[i];
+      struct mrset *new;
+      size_t j;
+
+      /* Clone old mrset, then replace vars from D by vars from S. */
+      new = mrset_clone (old);
+      for (j = 0; j < new->n_vars; j++)
+        new->vars[j] = dict_lookup_var_assert (d, var_get_name (new->vars[j]));
+
+      dict_add_mrset (d, new);
+    }
+
   return d;
 }
 
@@ -236,18 +251,16 @@ dict_clear (struct dictionary *d)
 {
   /* FIXME?  Should we really clear case_limit, label, documents?
      Others are necessarily cleared by deleting all the variables.*/
-  assert (d != NULL);
-
   while (d->var_cnt > 0 )
     {
-      dict_delete_var (d, d->var[d->var_cnt - 1]);
+      dict_delete_var (d, d->var[d->var_cnt - 1].var);
     }
 
   free (d->var);
   d->var = NULL;
   d->var_cnt = d->var_cap = 0;
   invalidate_proto (d);
-  hsh_clear (d->name_tab);
+  hmap_clear (&d->name_map);
   d->next_value_idx = 0;
   dict_set_split_vars (d, NULL, 0);
   dict_set_weight (d, NULL);
@@ -267,10 +280,8 @@ dict_clear_aux (struct dictionary *d)
 {
   int i;
 
-  assert (d != NULL);
-
   for (i = 0; i < d->var_cnt; i++)
-    var_clear_aux (d->var[i]);
+    var_clear_aux (d->var[i].var);
 }
 
 /* Clears a dictionary and destroys it. */
@@ -284,8 +295,9 @@ dict_destroy (struct dictionary *d)
       d->callbacks  = NULL ;
 
       dict_clear (d);
-      hsh_destroy (d->name_tab);
+      hmap_destroy (&d->name_map);
       attrset_destroy (&d->attributes);
+      free (d->mrsets);
       free (d);
     }
 }
@@ -294,8 +306,6 @@ dict_destroy (struct dictionary *d)
 size_t
 dict_get_var_cnt (const struct dictionary *d)
 {
-  assert (d != NULL);
-
   return d->var_cnt;
 }
 
@@ -305,10 +315,9 @@ dict_get_var_cnt (const struct dictionary *d)
 struct variable *
 dict_get_var (const struct dictionary *d, size_t idx)
 {
-  assert (d != NULL);
   assert (idx < d->var_cnt);
 
-  return d->var[idx];
+  return d->var[idx].var;
 }
 
 /* Sets *VARS to an array of pointers to variables in D and *CNT
@@ -335,15 +344,12 @@ dict_get_vars_mutable (const struct dictionary *d, struct variable ***vars,
   size_t count;
   size_t i;
 
-  assert (d != NULL);
-  assert (vars != NULL);
-  assert (cnt != NULL);
   assert (exclude == (exclude & DC_ALL));
 
   count = 0;
   for (i = 0; i < d->var_cnt; i++)
     {
-      enum dict_class class = var_get_dict_class (d->var[i]);
+      enum dict_class class = var_get_dict_class (d->var[i].var);
       if (!(class & exclude))
         count++;
     }
@@ -352,9 +358,9 @@ dict_get_vars_mutable (const struct dictionary *d, struct variable ***vars,
   *cnt = 0;
   for (i = 0; i < d->var_cnt; i++)
     {
-      enum dict_class class = var_get_dict_class (d->var[i]);
+      enum dict_class class = var_get_dict_class (d->var[i].var);
       if (!(class & exclude))
-        (*vars)[(*cnt)++] = d->var[i];
+        (*vars)[(*cnt)++] = d->var[i].var;
     }
   assert (*cnt == count);
 }
@@ -362,21 +368,30 @@ dict_get_vars_mutable (const struct dictionary *d, struct variable ***vars,
 static struct variable *
 add_var (struct dictionary *d, struct variable *v)
 {
-  /* Add dictionary info to variable. */
-  struct vardict_info vdi;
-  vdi.case_index = d->next_value_idx;
-  vdi.dict_index = d->var_cnt;
-  vdi.dict = d;
-  var_set_vardict (v, &vdi);
+  struct vardict_info *vardict;
 
   /* Update dictionary. */
   if (d->var_cnt >= d->var_cap)
     {
-      d->var_cap = 8 + 2 * d->var_cap;
-      d->var = xnrealloc (d->var, d->var_cap, sizeof *d->var);
+      size_t i;
+
+      d->var = x2nrealloc (d->var, &d->var_cap, sizeof *d->var);
+      hmap_clear (&d->name_map);
+      for (i = 0; i < d->var_cnt; i++)
+        {
+          var_set_vardict (d->var[i].var, &d->var[i]);
+          hmap_insert_fast (&d->name_map, &d->var[i].name_node,
+                            d->var[i].name_node.hash);
+        }
     }
-  d->var[d->var_cnt++] = v;
-  hsh_force_insert (d->name_tab, v);
+
+  vardict = &d->var[d->var_cnt++];
+  vardict->dict = d;
+  vardict->var = v;
+  hmap_insert (&d->name_map, &vardict->name_node,
+               hash_case_string (var_get_name (v), 0));
+  vardict->case_index = d->next_value_idx;
+  var_set_vardict (v, vardict);
 
   if ( d->changed ) d->changed (d, d->changed_data);
   if ( d->callbacks &&  d->callbacks->var_added )
@@ -409,27 +424,46 @@ dict_create_var_assert (struct dictionary *d, const char *name, int width)
   return add_var (d, var_create (name, width));
 }
 
-/* Creates and returns a new variable in D with name NAME, as a
-   copy of existing variable OLD_VAR, which need not be in D or
-   in any dictionary.  Returns a null pointer if the given NAME
-   would duplicate that of an existing variable in the
+/* Creates and returns a new variable in D, as a copy of existing variable
+   OLD_VAR, which need not be in D or in any dictionary.  Returns a null
+   pointer if OLD_VAR's name would duplicate that of an existing variable in
+   the dictionary. */
+struct variable *
+dict_clone_var (struct dictionary *d, const struct variable *old_var)
+{
+  return dict_clone_var_as (d, old_var, var_get_name (old_var));
+}
+
+/* Creates and returns a new variable in D, as a copy of existing variable
+   OLD_VAR, which need not be in D or in any dictionary.  Assert-fails if
+   OLD_VAR's name would duplicate that of an existing variable in the
    dictionary. */
 struct variable *
-dict_clone_var (struct dictionary *d, const struct variable *old_var,
-                const char *name)
+dict_clone_var_assert (struct dictionary *d, const struct variable *old_var)
+{
+  return dict_clone_var_as_assert (d, old_var, var_get_name (old_var));
+}
+
+/* Creates and returns a new variable in D with name NAME, as a copy of
+   existing variable OLD_VAR, which need not be in D or in any dictionary.
+   Returns a null pointer if the given NAME would duplicate that of an existing
+   variable in the dictionary. */
+struct variable *
+dict_clone_var_as (struct dictionary *d, const struct variable *old_var,
+                   const char *name)
 {
   return (dict_lookup_var (d, name) == NULL
-          ? dict_clone_var_assert (d, old_var, name)
+          ? dict_clone_var_as_assert (d, old_var, name)
           : NULL);
 }
 
-/* Creates and returns a new variable in D with name NAME, as a
-   copy of existing variable OLD_VAR, which need not be in D or
-   in any dictionary.  Assert-fails if the given NAME would
-   duplicate that of an existing variable in the dictionary. */
+/* Creates and returns a new variable in D with name NAME, as a copy of
+   existing variable OLD_VAR, which need not be in D or in any dictionary.
+   Assert-fails if the given NAME would duplicate that of an existing variable
+   in the dictionary. */
 struct variable *
-dict_clone_var_assert (struct dictionary *d, const struct variable *old_var,
-                       const char *name)
+dict_clone_var_as_assert (struct dictionary *d, const struct variable *old_var,
+                          const char *name)
 {
   struct variable *new_var = var_clone (old_var);
   assert (dict_lookup_var (d, name) == NULL);
@@ -442,23 +476,17 @@ dict_clone_var_assert (struct dictionary *d, const struct variable *old_var,
 struct variable *
 dict_lookup_var (const struct dictionary *d, const char *name)
 {
-  struct variable *target ;
-  struct variable *result ;
-
-  if ( ! var_is_plausible_name (name, false))
-    return NULL;
+  struct vardict_info *vardict;
 
-  target = var_create (name, 0);
-  result = hsh_find (d->name_tab, target);
-  var_destroy (target);
-
-  if ( result && var_has_vardict (result)) 
-  {
-      const struct vardict_info *vdi = var_get_vardict (result);
-      assert (vdi->dict == d);
-  }
+  HMAP_FOR_EACH_WITH_HASH (vardict, struct vardict_info, name_node,
+                           hash_case_string (name, 0), &d->name_map)
+    {
+      struct variable *var = vardict->var;
+      if (!strcasecmp (var_get_name (var), name))
+        return var;
+    }
 
-  return result;
+  return NULL;
 }
 
 /* Returns the variable named NAME in D.  Assert-fails if no
@@ -476,15 +504,8 @@ dict_lookup_var_assert (const struct dictionary *d, const char *name)
 bool
 dict_contains_var (const struct dictionary *d, const struct variable *v)
 {
-  if (var_has_vardict (v))
-    {
-      const struct vardict_info *vdi = var_get_vardict (v);
-      return (vdi->dict_index >= 0
-              && vdi->dict_index < d->var_cnt
-              && d->var[vdi->dict_index] == v);
-    }
-  else
-    return false;
+  return (var_has_vardict (v)
+          && vardict_get_dictionary (var_get_vardict (v)) == d);
 }
 
 /* Compares two double pointers to variables, which should point
@@ -498,27 +519,45 @@ compare_var_ptrs (const void *a_, const void *b_, const void *aux UNUSED)
   return *a < *b ? -1 : *a > *b;
 }
 
-/* Sets the dict_index in V's vardict to DICT_INDEX. */
 static void
-set_var_dict_index (struct variable *v, int dict_index)
+unindex_var (struct dictionary *d, struct vardict_info *vardict)
+{
+  hmap_delete (&d->name_map, &vardict->name_node);
+}
+
+/* This function assumes that vardict->name_node.hash is valid, that is, that
+   its name has not changed since it was hashed (rename_var() updates this
+   hash along with the name itself). */
+static void
+reindex_var (struct dictionary *d, struct vardict_info *vardict)
 {
-  struct vardict_info vdi = *var_get_vardict (v);
-  struct dictionary *d = vdi.dict;
-  vdi.dict_index = dict_index;
-  var_set_vardict (v, &vdi);
+  struct variable *var = vardict->var;
+
+  var_set_vardict (var, vardict);
+  hmap_insert_fast (&d->name_map, &vardict->name_node,
+                    vardict->name_node.hash);
 
   if ( d->changed ) d->changed (d, d->changed_data);
   if ( d->callbacks &&  d->callbacks->var_changed )
-    d->callbacks->var_changed (d, dict_index, d->cb_data);
+    d->callbacks->var_changed (d, var_get_dict_index (var), d->cb_data);
 }
 
 /* Sets the case_index in V's vardict to CASE_INDEX. */
 static void
 set_var_case_index (struct variable *v, int case_index)
 {
-  struct vardict_info vdi = *var_get_vardict (v);
-  vdi.case_index = case_index;
-  var_set_vardict (v, &vdi);
+  var_get_vardict (v)->case_index = case_index;
+}
+
+/* Removes the dictionary variables with indexes from FROM to TO (exclusive)
+   from name_map. */
+static void
+unindex_vars (struct dictionary *d, size_t from, size_t to)
+{
+  size_t i;
+
+  for (i = from; i < to; i++)
+    unindex_var (d, &d->var[i]);
 }
 
 /* Re-sets the dict_index in the dictionary variables with
@@ -529,7 +568,7 @@ reindex_vars (struct dictionary *d, size_t from, size_t to)
   size_t i;
 
   for (i = from; i < to; i++)
-    set_var_dict_index (d->var[i], i);
+    reindex_var (d, &d->var[i]);
 }
 
 /* Deletes variable V from dictionary D and frees V.
@@ -558,6 +597,7 @@ dict_delete_var (struct dictionary *d, struct variable *v)
   var_clear_aux (v);
 
   dict_unset_split_var (d, v);
+  dict_unset_mrset_var (d, v);
 
   if (d->weight == v)
     dict_set_weight (d, NULL);
@@ -568,16 +608,13 @@ dict_delete_var (struct dictionary *d, struct variable *v)
   dict_clear_vectors (d);
 
   /* Remove V from var array. */
+  unindex_vars (d, dict_index, d->var_cnt);
   remove_element (d->var, d->var_cnt, sizeof *d->var, dict_index);
   d->var_cnt--;
 
   /* Update dict_index for each affected variable. */
   reindex_vars (d, dict_index, d->var_cnt);
 
-  /* Update name hash. */
-  hsh_force_delete (d->name_tab, v);
-
-
   /* Free memory. */
   var_clear_vardict (v);
   var_destroy (v);
@@ -597,7 +634,6 @@ dict_delete_vars (struct dictionary *d,
 {
   /* FIXME: this can be done in O(count) time, but this algorithm
      is O(count**2). */
-  assert (d != NULL);
   assert (count == 0 || vars != NULL);
 
   while (count-- > 0)
@@ -615,7 +651,7 @@ dict_delete_consecutive_vars (struct dictionary *d, size_t idx, size_t count)
   assert (idx + count <= d->var_cnt);
 
   while (count-- > 0)
-    dict_delete_var (d, d->var[idx]);
+    dict_delete_var (d, d->var[idx].var);
 }
 
 /* Deletes scratch variables from dictionary D. */
@@ -626,11 +662,9 @@ dict_delete_scratch_vars (struct dictionary *d)
 
   /* FIXME: this can be done in O(count) time, but this algorithm
      is O(count**2). */
-  assert (d != NULL);
-
   for (i = 0; i < d->var_cnt; )
-    if (var_get_dict_class (d->var[i]) == DC_SCRATCH)
-      dict_delete_var (d, d->var[i]);
+    if (var_get_dict_class (d->var[i].var) == DC_SCRATCH)
+      dict_delete_var (d, d->var[i].var);
     else
       i++;
 }
@@ -644,6 +678,8 @@ dict_reorder_var (struct dictionary *d, struct variable *v, size_t new_index)
   size_t old_index = var_get_dict_index (v);
 
   assert (new_index < d->var_cnt);
+
+  unindex_vars (d, MIN (old_index, new_index), MAX (old_index, new_index) + 1);
   move_element (d->var, d->var_cnt, sizeof *d->var, old_index, new_index);
   reindex_vars (d, MIN (old_index, new_index), MAX (old_index, new_index) + 1);
 }
@@ -656,46 +692,50 @@ void
 dict_reorder_vars (struct dictionary *d,
                    struct variable *const *order, size_t count)
 {
-  struct variable **new_var;
+  struct vardict_info *new_var;
   size_t i;
 
-  assert (d != NULL);
   assert (count == 0 || order != NULL);
   assert (count <= d->var_cnt);
 
-  new_var = xnmalloc (d->var_cnt, sizeof *new_var);
-  memcpy (new_var, order, count * sizeof *new_var);
+  new_var = xnmalloc (d->var_cap, sizeof *new_var);
+
+  /* Add variables in ORDER to new_var. */
   for (i = 0; i < count; i++)
     {
-      size_t index = var_get_dict_index (order[i]);
-      assert (d->var[index] == order[i]);
-      d->var[index] = NULL;
-      set_var_dict_index (order[i], i);
+      struct vardict_info *old_var;
+
+      assert (dict_contains_var (d, order[i]));
+
+      old_var = var_get_vardict (order[i]);
+      new_var[i] = *old_var;
+      old_var->dict = NULL;
     }
+
+  /* Add remaining variables to new_var. */
   for (i = 0; i < d->var_cnt; i++)
-    if (d->var[i] != NULL)
-      {
-        assert (count < d->var_cnt);
-        new_var[count] = d->var[i];
-        set_var_dict_index (new_var[count], count);
-        count++;
-      }
+    if (d->var[i].dict != NULL)
+      new_var[count++] = d->var[i];
+  assert (count == d->var_cnt);
+
+  /* Replace old vardicts by new ones. */
   free (d->var);
   d->var = new_var;
+
+  hmap_clear (&d->name_map);
+  reindex_vars (d, 0, d->var_cnt);
 }
 
-/* Changes the name of variable V in dictionary D to NEW_NAME. */
+/* Changes the name of variable V that is currently in a dictionary to
+   NEW_NAME. */
 static void
-rename_var (struct dictionary *d, struct variable *v, const char *new_name)
+rename_var (struct variable *v, const char *new_name)
 {
-  struct vardict_info vdi;
-
-  assert (dict_contains_var (d, v));
-
-  vdi = *var_get_vardict (v);
+  struct vardict_info *vardict = var_get_vardict (v);
   var_clear_vardict (v);
   var_set_name (v, new_name);
-  var_set_vardict (v, &vdi);
+  vardict->name_node.hash = hash_case_string (new_name, 0);
+  var_set_vardict (v, vardict);
 }
 
 /* Changes the name of V in D to name NEW_NAME.  Assert-fails if
@@ -708,9 +748,9 @@ dict_rename_var (struct dictionary *d, struct variable *v,
   assert (!strcasecmp (var_get_name (v), new_name)
           || dict_lookup_var (d, new_name) == NULL);
 
-  hsh_force_delete (d->name_tab, v);
-  rename_var (d, v, new_name);
-  hsh_force_insert (d->name_tab, v);
+  unindex_var (d, var_get_vardict (v));
+  rename_var (v, new_name);
+  reindex_var (d, var_get_vardict (v));
 
   if (settings_get_algorithm () == ENHANCED)
     var_clear_short_names (v);
@@ -748,34 +788,37 @@ dict_rename_vars (struct dictionary *d,
      and rename them. */
   for (i = 0; i < count; i++)
     {
-      hsh_force_delete (d->name_tab, vars[i]);
-      rename_var (d, vars[i], new_names[i]);
+      unindex_var (d, var_get_vardict (vars[i]));
+      rename_var (vars[i], new_names[i]);
     }
 
   /* Add the renamed variables back into the name hash,
      checking for conflicts. */
   for (i = 0; i < count; i++)
-    if (hsh_insert (d->name_tab, vars[i]) != NULL)
-      {
-        /* There is a name conflict.
-           Back out all the name changes that have already
-           taken place, and indicate failure. */
-        size_t fail_idx = i;
-        if (err_name != NULL)
-          *err_name = new_names[i];
-
-        for (i = 0; i < fail_idx; i++)
-          hsh_force_delete (d->name_tab, vars[i]);
-
-        for (i = 0; i < count; i++)
-          {
-            rename_var (d, vars[i], old_names[i]);
-            hsh_force_insert (d->name_tab, vars[i]);
-          }
-
-        pool_destroy (pool);
-        return false;
-      }
+    {
+      if (dict_lookup_var (d, var_get_name (vars[i])) != NULL)
+        {
+          /* There is a name conflict.
+             Back out all the name changes that have already
+             taken place, and indicate failure. */
+          size_t fail_idx = i;
+          if (err_name != NULL)
+            *err_name = new_names[i];
+
+          for (i = 0; i < fail_idx; i++)
+            unindex_var (d, var_get_vardict (vars[i]));
+
+          for (i = 0; i < count; i++)
+            {
+              rename_var (vars[i], old_names[i]);
+              reindex_var (d, var_get_vardict (vars[i]));
+            }
+
+          pool_destroy (pool);
+          return false;
+        }
+      reindex_var (d, var_get_vardict (vars[i]));
+    }
 
   /* Clear short names. */
   if (settings_get_algorithm () == ENHANCED)
@@ -908,7 +951,6 @@ dict_make_unique_var_name (const struct dictionary *dict, const char *hint,
 struct variable *
 dict_get_weight (const struct dictionary *d)
 {
-  assert (d != NULL);
   assert (d->weight == NULL || dict_contains_var (d, d->weight));
 
   return d->weight;
@@ -924,7 +966,6 @@ double
 dict_get_case_weight (const struct dictionary *d, const struct ccase *c,
                      bool *warn_on_invalid)
 {
-  assert (d != NULL);
   assert (c != NULL);
 
   if (d->weight == NULL)
@@ -949,7 +990,6 @@ dict_get_case_weight (const struct dictionary *d, const struct ccase *c,
 void
 dict_set_weight (struct dictionary *d, struct variable *v)
 {
-  assert (d != NULL);
   assert (v == NULL || dict_contains_var (d, v));
   assert (v == NULL || var_is_numeric (v));
 
@@ -967,7 +1007,6 @@ dict_set_weight (struct dictionary *d, struct variable *v)
 struct variable *
 dict_get_filter (const struct dictionary *d)
 {
-  assert (d != NULL);
   assert (d->filter == NULL || dict_contains_var (d, d->filter));
 
   return d->filter;
@@ -978,7 +1017,6 @@ dict_get_filter (const struct dictionary *d)
 void
 dict_set_filter (struct dictionary *d, struct variable *v)
 {
-  assert (d != NULL);
   assert (v == NULL || dict_contains_var (d, v));
   assert (v == NULL || var_is_numeric (v));
 
@@ -996,8 +1034,6 @@ dict_set_filter (struct dictionary *d, struct variable *v)
 casenumber
 dict_get_case_limit (const struct dictionary *d)
 {
-  assert (d != NULL);
-
   return d->case_limit;
 }
 
@@ -1006,8 +1042,6 @@ dict_get_case_limit (const struct dictionary *d)
 void
 dict_set_case_limit (struct dictionary *d, casenumber case_limit)
 {
-  assert (d != NULL);
-
   d->case_limit = case_limit;
 }
 
@@ -1015,7 +1049,7 @@ dict_set_case_limit (struct dictionary *d, casenumber case_limit)
 const struct caseproto *
 dict_get_proto (const struct dictionary *d_)
 {
-  struct dictionary *d = (struct dictionary *) d_;
+  struct dictionary *d = CONST_CAST (struct dictionary *, d_);
   if (d->proto == NULL)
     {
       size_t i;
@@ -1024,8 +1058,8 @@ dict_get_proto (const struct dictionary *d_)
       d->proto = caseproto_reserve (d->proto, d->var_cnt);
       for (i = 0; i < d->var_cnt; i++)
         d->proto = caseproto_set_width (d->proto,
-                                        var_get_case_index (d->var[i]),
-                                        var_get_width (d->var[i]));
+                                        var_get_case_index (d->var[i].var),
+                                        var_get_width (d->var[i].var));
     }
   return d->proto;
 }
@@ -1036,8 +1070,6 @@ dict_get_proto (const struct dictionary *d_)
 int
 dict_get_next_value_idx (const struct dictionary *d)
 {
-  assert (d != NULL);
-
   return d->next_value_idx;
 }
 
@@ -1046,8 +1078,6 @@ dict_get_next_value_idx (const struct dictionary *d)
 size_t
 dict_get_case_size (const struct dictionary *d)
 {
-  assert (d != NULL);
-
   return sizeof (union value) * dict_get_next_value_idx (d);
 }
 
@@ -1061,7 +1091,7 @@ dict_compact_values (struct dictionary *d)
   d->next_value_idx = 0;
   for (i = 0; i < d->var_cnt; i++)
     {
-      struct variable *v = d->var[i];
+      struct variable *v = d->var[i].var;
       set_var_case_index (v, d->next_value_idx++);
     }
   invalidate_proto (d);
@@ -1090,7 +1120,7 @@ dict_count_values (const struct dictionary *d, unsigned int exclude_classes)
   cnt = 0;
   for (i = 0; i < d->var_cnt; i++)
     {
-      enum dict_class class = var_get_dict_class (d->var[i]);
+      enum dict_class class = var_get_dict_class (d->var[i].var);
       if (!(exclude_classes & (1u << class)))
         cnt++;
     }
@@ -1118,7 +1148,7 @@ dict_get_compacted_proto (const struct dictionary *d,
   proto = caseproto_create ();
   for (i = 0; i < d->var_cnt; i++)
     {
-      struct variable *v = d->var[i];
+      struct variable *v = d->var[i].var;
       if (!(exclude_classes & (1u << var_get_dict_class (v))))
         proto = caseproto_add_width (proto, var_get_width (v));
     }
@@ -1132,8 +1162,6 @@ dict_get_compacted_proto (const struct dictionary *d,
 const struct variable *const *
 dict_get_split_vars (const struct dictionary *d)
 {
-  assert (d != NULL);
-
   return d->split;
 }
 
@@ -1141,14 +1169,12 @@ dict_get_split_vars (const struct dictionary *d)
 size_t
 dict_get_split_cnt (const struct dictionary *d)
 {
-  assert (d != NULL);
-
   return d->split_cnt;
 }
 
 /* Removes variable V, which must be in D, from D's set of split
    variables. */
-void
+static void
 dict_unset_split_var (struct dictionary *d, struct variable *v)
 {
   int orig_count;
@@ -1173,7 +1199,6 @@ void
 dict_set_split_vars (struct dictionary *d,
                      struct variable *const *split, size_t cnt)
 {
-  assert (d != NULL);
   assert (cnt == 0 || split != NULL);
 
   d->split_cnt = cnt;
@@ -1198,8 +1223,6 @@ dict_set_split_vars (struct dictionary *d,
 const char *
 dict_get_label (const struct dictionary *d)
 {
-  assert (d != NULL);
-
   return d->label;
 }
 
@@ -1208,8 +1231,6 @@ dict_get_label (const struct dictionary *d)
 void
 dict_set_label (struct dictionary *d, const char *label)
 {
-  assert (d != NULL);
-
   free (d->label);
   d->label = label != NULL ? xstrndup (label, 60) : NULL;
 }
@@ -1294,7 +1315,6 @@ dict_create_vector (struct dictionary *d,
 {
   size_t i;
 
-  assert (var != NULL);
   assert (cnt > 0);
   for (i = 0; i < cnt; i++)
     assert (dict_contains_var (d, var[i]));
@@ -1326,7 +1346,6 @@ dict_create_vector_assert (struct dictionary *d,
 const struct vector *
 dict_get_vector (const struct dictionary *d, size_t idx)
 {
-  assert (d != NULL);
   assert (idx < d->vector_cnt);
 
   return d->vector[idx];
@@ -1336,8 +1355,6 @@ dict_get_vector (const struct dictionary *d, size_t idx)
 size_t
 dict_get_vector_cnt (const struct dictionary *d)
 {
-  assert (d != NULL);
-
   return d->vector_cnt;
 }
 
@@ -1366,7 +1383,138 @@ dict_clear_vectors (struct dictionary *d)
   d->vector = NULL;
   d->vector_cnt = 0;
 }
+\f
+/* Multiple response sets. */
+
+/* Returns the multiple response set in DICT with index IDX, which must be
+   between 0 and the count returned by dict_get_n_mrsets(), exclusive. */
+const struct mrset *
+dict_get_mrset (const struct dictionary *dict, size_t idx)
+{
+  assert (idx < dict->n_mrsets);
+  return dict->mrsets[idx];
+}
+
+/* Returns the number of multiple response sets in DICT. */
+size_t
+dict_get_n_mrsets (const struct dictionary *dict)
+{
+  return dict->n_mrsets;
+}
+
+/* Looks for a multiple response set named NAME in DICT.  If it finds one,
+   returns its index; otherwise, returns SIZE_MAX. */
+static size_t
+dict_lookup_mrset_idx (const struct dictionary *dict, const char *name)
+{
+  size_t i;
+
+  for (i = 0; i < dict->n_mrsets; i++)
+    if (!strcasecmp (name, dict->mrsets[i]->name))
+      return i;
+
+  return SIZE_MAX;
+}
+
+/* Looks for a multiple response set named NAME in DICT.  If it finds one,
+   returns it; otherwise, returns NULL. */
+const struct mrset *
+dict_lookup_mrset (const struct dictionary *dict, const char *name)
+{
+  size_t idx = dict_lookup_mrset_idx (dict, name);
+  return idx != SIZE_MAX ? dict->mrsets[idx] : NULL;
+}
+
+/* Adds MRSET to DICT, replacing any existing set with the same name.  Returns
+   true if a set was replaced, false if none existed with the specified name.
+
+   Ownership of MRSET is transferred to DICT. */
+bool
+dict_add_mrset (struct dictionary *dict, struct mrset *mrset)
+{
+  size_t idx;
 
+  assert (mrset_ok (mrset, dict));
+
+  idx = dict_lookup_mrset_idx (dict, mrset->name);
+  if (idx == SIZE_MAX)
+    {
+      dict->mrsets = xrealloc (dict->mrsets,
+                               (dict->n_mrsets + 1) * sizeof *dict->mrsets);
+      dict->mrsets[dict->n_mrsets++] = mrset;
+      return true;
+    }
+  else
+    {
+      mrset_destroy (dict->mrsets[idx]);
+      dict->mrsets[idx] = mrset;
+      return false;
+    }
+}
+
+/* Looks for a multiple response set in DICT named NAME.  If found, removes it
+   from DICT and returns true.  If none is found, returns false without
+   modifying DICT.
+
+   Deleting one multiple response set causes the indexes of other sets within
+   DICT to change. */
+bool
+dict_delete_mrset (struct dictionary *dict, const char *name)
+{
+  size_t idx = dict_lookup_mrset_idx (dict, name);
+  if (idx != SIZE_MAX)
+    {
+      mrset_destroy (dict->mrsets[idx]);
+      dict->mrsets[idx] = dict->mrsets[--dict->n_mrsets];
+      return true;
+    }
+  else
+    return false;
+}
+
+/* Deletes all multiple response sets from DICT. */
+void
+dict_clear_mrsets (struct dictionary *dict)
+{
+  size_t i;
+
+  for (i = 0; i < dict->n_mrsets; i++)
+    mrset_destroy (dict->mrsets[i]);
+  free (dict->mrsets);
+  dict->mrsets = NULL;
+  dict->n_mrsets = 0;
+}
+
+/* Removes VAR, which must be in DICT, from DICT's multiple response sets. */
+static void
+dict_unset_mrset_var (struct dictionary *dict, struct variable *var)
+{
+  size_t i;
+
+  assert (dict_contains_var (dict, var));
+
+  for (i = 0; i < dict->n_mrsets; )
+    {
+      struct mrset *mrset = dict->mrsets[i];
+      size_t j;
+
+      for (j = 0; j < mrset->n_vars; )
+        if (mrset->vars[j] == var)
+          remove_element (mrset->vars, mrset->n_vars--,
+                          sizeof *mrset->vars, j);
+        else
+          j++;
+
+      if (mrset->n_vars < 2)
+        {
+          mrset_destroy (mrset);
+          dict->mrsets[i] = dict->mrsets[--dict->n_mrsets];
+        }
+      else
+        i++;
+    }
+}
+\f
 /* Returns D's attribute set.  The caller may examine or modify
    the attribute set, but must not destroy it.  Destroying D or
    calling dict_set_attributes for D will also destroy D's
@@ -1374,7 +1522,7 @@ dict_clear_vectors (struct dictionary *d)
 struct attrset *
 dict_get_attributes (const struct dictionary *d) 
 {
-  return (struct attrset *) &d->attributes;
+  return CONST_CAST (struct attrset *, &d->attributes);
 }
 
 /* Replaces D's attributes set by a copy of ATTRS. */
@@ -1400,8 +1548,8 @@ dict_var_changed (const struct variable *v)
 {
   if ( var_has_vardict (v))
     {
-      const struct vardict_info *vdi = var_get_vardict (v);
-      struct dictionary *d = vdi->dict;
+      const struct vardict_info *vardict = var_get_vardict (v);
+      struct dictionary *d = vardict->dict;
 
       if ( NULL == d)
        return;
@@ -1420,10 +1568,10 @@ dict_var_resized (const struct variable *v, int old_width)
 {
   if ( var_has_vardict (v))
     {
-      const struct vardict_info *vdi = var_get_vardict (v);
+      const struct vardict_info *vardict = var_get_vardict (v);
       struct dictionary *d;
 
-      d = vdi->dict;
+      d = vardict->dict;
 
       if (d->changed) d->changed (d, d->changed_data);
 
@@ -1441,14 +1589,68 @@ dict_var_display_width_changed (const struct variable *v)
 {
   if ( var_has_vardict (v))
     {
-      const struct vardict_info *vdi = var_get_vardict (v);
+      const struct vardict_info *vardict = var_get_vardict (v);
       struct dictionary *d;
 
-      d = vdi->dict;
+      d = vardict->dict;
 
       if (d->changed) d->changed (d, d->changed_data);
       if ( d->callbacks && d->callbacks->var_display_width_changed )
        d->callbacks->var_display_width_changed (d, var_get_dict_index (v), d->cb_data);
     }
 }
+\f
+/* Dictionary used to contain "internal variables". */
+static struct dictionary *internal_dict;
+
+/* Create a variable of the specified WIDTH to be used for internal
+   calculations only.  The variable is assigned case index CASE_IDX. */
+struct variable *
+dict_create_internal_var (int case_idx, int width)
+{
+  if (internal_dict == NULL)
+    internal_dict = dict_create ();
 
+  for (;;)
+    {
+      static int counter = INT_MAX / 2;
+      struct variable *var;
+      char name[64];
+
+      if (++counter == INT_MAX)
+        counter = INT_MAX / 2;
+
+      sprintf (name, "$internal%d", counter);
+      var = dict_create_var (internal_dict, name, width);
+      if (var != NULL)
+        {
+          set_var_case_index (var, case_idx);
+          return var;
+        }
+    }
+}
+
+/* Destroys VAR, which must have been created with
+   dict_create_internal_var(). */
+void
+dict_destroy_internal_var (struct variable *var)
+{
+  if (var != NULL)
+    {
+      dict_delete_var (internal_dict, var);
+
+      /* Destroy internal_dict if it has no variables left, just so that
+         valgrind --leak-check --show-reachable won't show internal_dict. */
+      if (dict_get_var_cnt (internal_dict) == 0)
+        {
+          dict_destroy (internal_dict);
+          internal_dict = NULL;
+        }
+    }
+}
+\f
+int
+vardict_get_dict_index (const struct vardict_info *vardict)
+{
+  return vardict - vardict->dict->var;
+}
index 02fd5cd4c0195f3ed73c994d04571b4988a796d3..96529a1bd3aaa075dff403ef4bd2c78d46c25ec4 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2004, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -56,10 +56,14 @@ struct variable *dict_create_var (struct dictionary *, const char *,
                                   int width);
 struct variable *dict_create_var_assert (struct dictionary *, const char *,
                                          int width);
-struct variable *dict_clone_var (struct dictionary *, const struct variable *,
-                                 const char *);
+struct variable *dict_clone_var (struct dictionary *, const struct variable *);
 struct variable *dict_clone_var_assert (struct dictionary *,
-                                        const struct variable *, const char *);
+                                        const struct variable *);
+struct variable *dict_clone_var_as (struct dictionary *,
+                                    const struct variable *, const char *);
+struct variable *dict_clone_var_as_assert (struct dictionary *,
+                                           const struct variable *,
+                                           const char *);
 
 /* Deleting variables. */
 void dict_delete_var (struct dictionary *, struct variable *);
@@ -116,7 +120,6 @@ const struct variable *const *dict_get_split_vars (const struct dictionary *);
 size_t dict_get_split_cnt (const struct dictionary *);
 void dict_set_split_vars (struct dictionary *,
                           struct variable *const *, size_t cnt);
-void dict_unset_split_var (struct dictionary *, struct variable *);
 
 /* File label. */
 const char *dict_get_label (const struct dictionary *);
@@ -145,15 +148,28 @@ const struct vector *dict_lookup_vector (const struct dictionary *,
                                          const char *name);
 void dict_clear_vectors (struct dictionary *);
 
+/* Multiple response sets. */
+const struct mrset *dict_get_mrset (const struct dictionary *, size_t idx);
+size_t dict_get_n_mrsets (const struct dictionary *);
+const struct mrset *dict_lookup_mrset (const struct dictionary *,
+                                       const char *name);
+
+bool dict_add_mrset (struct dictionary *, struct mrset *);
+bool dict_delete_mrset (struct dictionary *, const char *name);
+void dict_clear_mrsets (struct dictionary *);
+
 /* Attributes. */
 struct attrset *dict_get_attributes (const struct dictionary *);
 void dict_set_attributes (struct dictionary *, const struct attrset *);
 bool dict_has_attributes (const struct dictionary *);
 
-
+/* Data encoding. */
 void dict_set_encoding (struct dictionary *d, const char *enc);
 const char *dict_get_encoding (const struct dictionary *d);
 
+/* Internal variables. */
+struct variable *dict_create_internal_var (int case_idx, int width);
+void dict_destroy_internal_var (struct variable *);
 
 /* Functions to be called upon dictionary changes. */
 struct dict_callbacks
index 91229595924c7bfe7fe11d1486970ae598950f5c..e3047a3354cd3506917cefcb3e0a23587138981c 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include <data/file-name.h>
+#include "data/file-name.h"
 
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <sys/stat.h>
 #include <unistd.h>
 
-#include "intprops.h"
-#include "minmax.h"
-#include "dirname.h"
-#include "xmalloca.h"
-
-#include <data/settings.h>
-#include <libpspp/hash.h>
-#include <libpspp/message.h>
-#include <libpspp/str.h>
-#include <libpspp/verbose-msg.h>
-#include <libpspp/version.h>
+#include "data/settings.h"
+#include "libpspp/hash.h"
+#include "libpspp/message.h"
+#include "libpspp/str.h"
+#include "libpspp/version.h"
 
-#include "xalloc.h"
+#include "gl/dirname.h"
+#include "gl/intprops.h"
+#include "gl/minmax.h"
+#include "gl/relocatable.h"
+#include "gl/xalloc.h"
+#include "gl/xmalloca.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-#include <unistd.h>
-#include <sys/stat.h>
-
 #if defined _WIN32 || defined __WIN32__
 #define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 #include <windows.h>
 #endif
 \f
-/* Initialization. */
-
-const char *config_path;
-
-void
-fn_init (void)
-{
-  config_path = fn_getenv_default ("STAT_CONFIG_PATH", default_config_path);
-}
-\f
 /* Functions for performing operations on file names. */
 
-
-/* Substitutes $variables in SRC, putting the result in DST,
-   properly handling the case where SRC is a substring of DST.
-   Variables are as defined by GETENV. Supports $var and ${var}
-   syntaxes; $$ substitutes as $. */
-void
-fn_interp_vars (struct substring src, const char *(*getenv) (const char *),
-                struct string *dst_)
-{
-  struct string dst = DS_EMPTY_INITIALIZER;
-  int c;
-
-  while ((c = ss_get_char (&src)) != EOF)
-    if (c != '$')
-      ds_put_char (&dst, c);
-    else
-      {
-        if (ss_match_char (&src, '$') || ss_is_empty (src))
-          ds_put_char (&dst, '$');
-        else
-          {
-            struct substring var_name;
-            size_t start;
-            const char *value;
-
-            if (ss_match_char (&src, '('))
-              ss_get_until (&src, ')', &var_name);
-            else if (ss_match_char (&src, '{'))
-              ss_get_until (&src, '}', &var_name);
-            else
-              ss_get_chars (&src, MAX (1, ss_span (src, ss_cstr (CC_ALNUM))),
-                            &var_name);
-
-            start = ds_length (&dst);
-            ds_put_substring (&dst, var_name);
-            value = getenv (ds_cstr (&dst) + start);
-            ds_truncate (&dst, start);
-
-            ds_put_cstr (&dst, value);
-          }
-      }
-
-  ds_swap (&dst, dst_);
-  ds_destroy (&dst);
-}
-
-/* Searches for a configuration file with name NAME in the path
-   given by PATH, which is environment-interpolated.
-   Directories in PATH are delimited by ':'.  Returns the
-   malloc'd full name of the first file found, or NULL if none is
-   found. */
+/* Searches for a configuration file with name NAME in the directories given in
+   PATH, which is terminated by a null pointer.  Returns the full name of the
+   first file found, which the caller is responsible for freeing with free(),
+   or NULL if none is found. */
 char *
-fn_search_path (const char *base_name, const char *path_)
+fn_search_path (const char *base_name, char **path)
 {
-  struct string path;
-  struct substring dir;
-  struct string file = DS_EMPTY_INITIALIZER;
-  size_t save_idx = 0;
+  size_t i;
 
   if (fn_is_absolute (base_name))
     return xstrdup (base_name);
 
-  /* Interpolate environment variables. */
-  ds_init_cstr (&path, path_);
-  fn_interp_vars (ds_ss (&path), fn_getenv, &path);
-
-  verbose_msg (2, _("searching for \"%s\" in path \"%s\""),
-               base_name, ds_cstr (&path));
-  while (ds_separate (&path, ss_cstr (":"), &save_idx, &dir))
+  for (i = 0; path[i] != NULL; i++)
     {
-      /* Construct file name. */
-      ds_clear (&file);
-      ds_put_substring (&file, dir);
-      if (!ds_is_empty (&file) && !ISSLASH (ds_last (&file)))
-       ds_put_char (&file, '/');
-      ds_put_cstr (&file, base_name);
-      ds_relocate (&file);
-
-      /* Check whether file exists. */
-      if (fn_exists (ds_cstr (&file)))
-       {
-         verbose_msg (2, _("...found \"%s\""), ds_cstr (&file));
-          ds_destroy (&path);
-         return ds_cstr (&file);
-       }
+      const char *dir = path[i];
+      char *file;
+
+      if (!strcmp (dir, "") || !strcmp (dir, "."))
+        file = xstrdup (base_name);
+      else if (ISSLASH (dir[strlen (dir) - 1]))
+        file = xasprintf ("%s%s", dir, base_name);
+      else
+        file = xasprintf ("%s/%s", dir, base_name);
+
+      if (fn_exists (file))
+        return file;
+      free (file);
     }
 
-  /* Failure. */
-  verbose_msg (2, _("...not found"));
-  ds_destroy (&path);
-  ds_destroy (&file);
   return NULL;
 }
 
@@ -246,11 +171,6 @@ safety_violation (const char *fn)
 }
 #endif
 
-/* As a general comment on the following routines, a `sensible value'
-   for errno includes 0 if there is no associated system error.  The
-   routines will only set errno to 0 if there is an error in a
-   callback that sets errno to 0; they themselves won't. */
-
 /* File open routine that understands `-' as stdin/stdout and `|cmd'
    as a pipe to command `cmd'.  Returns resultant FILE on success,
    NULL on failure.  If NULL is returned then errno is set to a
@@ -260,12 +180,18 @@ fn_open (const char *fn, const char *mode)
 {
   assert (mode[0] == 'r' || mode[0] == 'w' || mode[0] == 'a');
 
-  if (mode[0] == 'r' && (!strcmp (fn, "stdin") || !strcmp (fn, "-")))
-    return stdin;
-  else if (mode[0] == 'w' && (!strcmp (fn, "stdout") || !strcmp (fn, "-")))
-    return stdout;
-  else if (mode[0] == 'w' && !strcmp (fn, "stderr"))
-    return stderr;
+  if (mode[0] == 'r')
+    {
+      if (!strcmp (fn, "stdin") || !strcmp (fn, "-"))
+        return stdin;
+    }
+  else
+    {
+      if (!strcmp (fn, "stdout") || !strcmp (fn, "-"))
+        return stdout;
+      if (!strcmp (fn, "stderr"))
+        return stderr;
+    }
 
 #if HAVE_POPEN
   if (fn[0] == '|')
@@ -298,7 +224,7 @@ fn_open (const char *fn, const char *mode)
     {
       FILE *f = fopen (fn, mode);
 
-      if (f && mode[0] == 'w')
+      if (f && mode[0] != 'r')
        setvbuf (f, NULL, _IOLBF, 0);
 
       return f;
index d34bd4196fea046db722197aa403db964a423deb..8e04d36a926dffb80618b236f60cf7e4309d802b 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <stdio.h>
 #include <stdbool.h>
-#include <libpspp/str.h>
 #include <sys/types.h>
 
-/* Search path for configuration files. */
-extern const char *config_path;
+struct string_set;
 
-void fn_init (void);
-
-void fn_interp_vars (struct substring src,
-                     const char *(*getenv) (const char *),
-                     struct string *dst);
-char *fn_search_path (const char *base_name, const char *path);
+char *fn_search_path (const char *base_name, char **path);
 char *fn_dir_name (const char *fn);
 char *fn_extension (const char *fn);
 
index f166ee6aba86f1a00acefb409c466e253635a574..74911c469ea902a916f8b87ab2fd29a20dc425a6 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -320,21 +320,17 @@ static void
 convert_xml_string_to_value (struct ccase *c, const struct variable *var,
                             const xmlChar *xv)
 {
-  int n_bytes = 0;
   union value *v = case_data_rw (c, var);
 
-  const char *text = (const char *) xv;
-
-  if ( text)
-    n_bytes = MIN (var_get_width (var), strlen (text));
-
-  if ( var_is_alpha (var))
-    {
-      memcpy (value_str_rw (v, var_get_width (var)), text, n_bytes);
-    }
+  if (xv == NULL)
+    value_set_missing (v, var_get_width (var));
+  else if ( var_is_alpha (var))
+    value_copy_str_rpad (v, var_get_width (var), xv, ' ');
   else
     {
+      const char *text = (const char *) xv;
       char *endptr;
+
       errno = 0;
       v->f = strtod (text, &endptr);
       if ( errno != 0 || endptr == text)
index f5cda498a89358662965a01c2b5e44a39c5a707b..f163d5e7737c0b6cf8e591b385d3cbd128edd36e 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
+
+#include "data/make-file.h"
+
 #include <assert.h>
+#include <errno.h>
 #include <fcntl.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <errno.h>
-#include <stdio.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
-#include <data/file-name.h>
-#include <data/make-file.h>
-#include <libpspp/ll.h>
-#include <libpspp/message.h>
+#include "data/file-name.h"
+#include "libpspp/ll.h"
+#include "libpspp/message.h"
 
-#include "fatal-signal.h"
-#include "tempname.h"
-#include "xalloc.h"
+#include "gl/fatal-signal.h"
+#include "gl/tempname.h"
+#include "gl/xalloc.h"
+#include "gl/xvasprintf.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -177,7 +181,7 @@ replace_file_start (const char *file_name, const char *mode,
     {
       /* Generate unique temporary file name. */
       rf->tmp_name = xasprintf ("%s.tmpXXXXXX", file_name);
-      if (gen_tempname (rf->tmp_name, 0600, GT_NOCREATE) < 0)
+      if (gen_tempname (rf->tmp_name, 0, 0600, GT_NOCREATE) < 0)
         {
           msg (ME, _("Creating temporary file to replace %s: %s."),
                rf->file_name, strerror (errno));
index 19d33ebe76bfc070b0f28aed4c11bc61c89b7111..31795bebe58db8d4b66d187c2ba9f3978369d7e2 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
-#ifndef MKFILE_H
-#define MKFILE_H
+#ifndef MAKE_FILE_H
+#define MAKE_FILE_H
 
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/types.h>
 
 /* Creates a temporary file and stores its name in *FILE_NAME and
    a file descriptor for it in *FD.  Returns success.  Caller is
diff --git a/src/data/mrset.c b/src/data/mrset.c
new file mode 100644 (file)
index 0000000..2f05edb
--- /dev/null
@@ -0,0 +1,104 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "data/mrset.h"
+
+#include <stdlib.h>
+
+#include "data/dictionary.h"
+#include "data/val-type.h"
+#include "data/variable.h"
+
+#include "gl/xalloc.h"
+
+/* Creates and returns a clone of OLD.  The caller is responsible for freeing
+   the new multiple response set (using mrset_destroy()). */
+struct mrset *
+mrset_clone (const struct mrset *old)
+{
+  struct mrset *new;
+
+  new = xmalloc (sizeof *new);
+  new->name = xstrdup (old->name);
+  new->label = old->label != NULL ? xstrdup (old->label) : NULL;
+  new->type = old->type;
+  new->vars = xmemdup (old->vars, old->n_vars * sizeof *old->vars);
+  new->n_vars = old->n_vars;
+
+  new->cat_source = old->cat_source;
+  new->label_from_var_label = old->label_from_var_label;
+  value_clone (&new->counted, &old->counted, old->width);
+  new->width = old->width;
+
+  return new;
+}
+
+/* Frees MRSET and the data that it contains. */
+void
+mrset_destroy (struct mrset *mrset)
+{
+  if (mrset != NULL)
+    {
+      free (mrset->name);
+      free (mrset->label);
+      free (mrset->vars);
+      value_destroy (&mrset->counted, mrset->width);
+    }
+}
+
+/* Checks various constraints on MRSET:
+
+   - MRSET has a valid name for a multiple response set (beginning with '$').
+
+   - MRSET has a valid type.
+
+   - MRSET has at least 2 variables.
+
+   - All of MRSET's variables are in DICT.
+
+   - All of MRSET's variables are the same type (numeric or string).
+
+   - If MRSET is a multiple dichotomy set, its counted value has the same type
+     as and is no wider than its narrowest variable.
+
+   Returns true if all the constraints are satisfied, otherwise false. */
+bool
+mrset_ok (const struct mrset *mrset, const struct dictionary *dict)
+{
+  enum val_type type;
+  size_t i;
+
+  if (mrset->name == NULL
+      || mrset->name[0] != '$'
+      || (mrset->type != MRSET_MD && mrset->type != MRSET_MC)
+      || mrset->vars == NULL
+      || mrset->n_vars < 2)
+    return false;
+
+  type = var_get_type (mrset->vars[0]);
+  if (mrset->type == MRSET_MD && type != val_type_from_width (mrset->width))
+    return false;
+  for (i = 0; i < mrset->n_vars; i++)
+    if (!dict_contains_var (dict, mrset->vars[i])
+        || type != var_get_type (mrset->vars[i])
+        || (mrset->type == MRSET_MD
+            && mrset->width > var_get_width (mrset->vars[i])))
+      return false;
+
+  return true;
+}
diff --git a/src/data/mrset.h b/src/data/mrset.h
new file mode 100644 (file)
index 0000000..c531db7
--- /dev/null
@@ -0,0 +1,82 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef DATA_MRSET_H
+#define DATA_MRSET_H 1
+
+/* Multiple response set data structure.
+
+   A multiple response set (mrset) is a set of variables that represent
+   multiple responses to a single survey question in one of the two following
+   ways:
+
+     - A multiple dichotomy set represents a survey question with a set of
+       checkboxes.  Each variable in the set is treated in a Boolean fashion:
+       one value (the "counted value") means that the box was checked, and any
+       other value means that it was not.
+
+     - A multiple category set represents a survey question where the
+       respondent is instructed to "list up to N choices".  Each variable
+       represents one of the responses.
+
+   The set of functions provided here are skeletal.  Undoubtedly they will grow
+   as PSPP begins to make use of multiple response sets, as opposed to merely
+   maintaining them as part of the dictionary.
+ */
+
+#include <stdbool.h>
+#include <stddef.h>
+
+#include "data/value.h"
+
+struct dictionary;
+
+/* Type of a multiple response set. */
+enum mrset_type
+  {
+    MRSET_MD,                   /* Multiple dichotomy group. */
+    MRSET_MC                    /* Multiple category group. */
+  };
+
+/* Source of category labels for a multiple dichotomy group. */
+enum mrset_md_cat_source
+  {
+    MRSET_VARLABELS,            /* Variable labels. */
+    MRSET_COUNTEDVALUES         /* Value labels for the counted value. */
+  };
+
+/* A multiple response set. */
+struct mrset
+  {
+    char *name;                 /* Name for syntax.  Always begins with "$". */
+    char *label;                /* Human-readable label for group. */
+    enum mrset_type type;       /* Group type. */
+    struct variable **vars;     /* Constituent variables. */
+    size_t n_vars;              /* Number of constituent variables. */
+
+    /* MRSET_MD only. */
+    enum mrset_md_cat_source cat_source; /* Source of category labels. */
+    bool label_from_var_label;  /* 'label' taken from variable label? */
+    union value counted;        /* Counted value. */
+    int width;                  /* Width of 'counted'. */
+  };
+
+struct mrset *mrset_clone (const struct mrset *);
+void mrset_destroy (struct mrset *);
+
+bool mrset_ok (const struct mrset *, const struct dictionary *);
+
+#endif /* data/mrset.h */
index a463124274a20c6cd62e1071f15c51cd95edcb3a..b729770a91c7c294b99b0cbe5172245bdef128b0 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -96,14 +96,14 @@ error (struct pfm_reader *r, const char *msg, ...)
   va_list args;
 
   ds_init_empty (&text);
-  ds_put_format (&text, _("portable file %s corrupt at offset 0x%lx: "),
-                 fh_get_file_name (r->fh), ftell (r->file));
+  ds_put_format (&text, _("portable file %s corrupt at offset 0x%llx: "),
+                 fh_get_file_name (r->fh), (long long int) ftello (r->file));
   va_start (args, msg);
   ds_put_vformat (&text, msg, args);
   va_end (args);
 
-  m.category = MSG_GENERAL;
-  m.severity = MSG_ERROR;
+  m.category = MSG_C_GENERAL;
+  m.severity = MSG_S_ERROR;
   m.where.file_name = NULL;
   m.where.line_number = 0;
   m.text = ds_cstr (&text);
@@ -125,14 +125,14 @@ warning (struct pfm_reader *r, const char *msg, ...)
   va_list args;
 
   ds_init_empty (&text);
-  ds_put_format (&text, _("reading portable file %s at offset 0x%lx: "),
-                 fh_get_file_name (r->fh), ftell (r->file));
+  ds_put_format (&text, _("reading portable file %s at offset 0x%llx: "),
+                 fh_get_file_name (r->fh), (long long int) ftello (r->file));
   va_start (args, msg);
   ds_put_vformat (&text, msg, args);
   va_end (args);
 
-  m.category = MSG_GENERAL;
-  m.severity = MSG_WARNING;
+  m.category = MSG_C_GENERAL;
+  m.severity = MSG_S_WARNING;
   m.where.file_name = NULL;
   m.where.line_number = 0;
   m.text = ds_cstr (&text);
index b762214d10e20a33d6bbdf89ac52253a67589453..c79e784e8b70f4d7ced4cabf5414cd76d8baca8c 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
+#include "data/procedure.h"
+
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 
-#include <data/case.h>
-#include <data/case-map.h>
-#include <data/caseinit.h>
-#include <data/casereader.h>
-#include <data/casereader-provider.h>
-#include <data/casewriter.h>
-#include <data/dictionary.h>
-#include <data/file-handle-def.h>
-#include <data/procedure.h>
-#include <data/transformations.h>
-#include <data/variable.h>
-#include <libpspp/deque.h>
-#include <libpspp/misc.h>
-#include <libpspp/str.h>
-#include <libpspp/taint.h>
-#include <libpspp/i18n.h>
-
-#include "minmax.h"
-#include "xalloc.h"
+#include "data/case.h"
+#include "data/case-map.h"
+#include "data/caseinit.h"
+#include "data/casereader.h"
+#include "data/casereader-provider.h"
+#include "data/casereader-shim.h"
+#include "data/casewriter.h"
+#include "data/dictionary.h"
+#include "data/file-handle-def.h"
+#include "data/transformations.h"
+#include "data/variable.h"
+#include "libpspp/deque.h"
+#include "libpspp/misc.h"
+#include "libpspp/str.h"
+#include "libpspp/taint.h"
+#include "libpspp/i18n.h"
+
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
 
 struct dataset {
   /* Cases are read from source,
@@ -92,8 +94,9 @@ struct dataset {
                                    but proc_commit not yet called. */
     }
   proc_state;
-  casenumber cases_written;       /* Cases output so far. */
-  bool ok;                    /* Error status. */
+  casenumber cases_written;     /* Cases output so far. */
+  bool ok;                      /* Error status. */
+  struct casereader_shim *shim; /* Shim on proc_open() casereader. */
 
   void (*callback) (void *); /* Callback for when the dataset changes */
   void *cb_data;
@@ -165,6 +168,8 @@ static const struct casereader_class proc_casereader_class;
 struct casereader *
 proc_open (struct dataset *ds)
 {
+  struct casereader *reader;
+
   assert (ds->source != NULL);
   assert (ds->proc_state == PROC_COMMITTED);
 
@@ -217,9 +222,19 @@ proc_open (struct dataset *ds)
   /* FIXME: use taint in dataset in place of `ok'? */
   /* FIXME: for trivial cases we can just return a clone of
      ds->source? */
-  return casereader_create_sequential (NULL, dict_get_proto (ds->dict),
-                                       CASENUMBER_MAX,
-                                       &proc_casereader_class, ds);
+
+  /* Create casereader and insert a shim on top.  The shim allows us to
+     arbitrarily extend the casereader's lifetime, by slurping the cases into
+     the shim's buffer in proc_commit().  That is especially useful when output
+     table_items are generated directly from the procedure casereader (e.g. by
+     the LIST procedure) when we are using an output driver that keeps a
+     reference to the output items passed to it (e.g. the GUI output driver in
+     PSPPIRE). */
+  reader = casereader_create_sequential (NULL, dict_get_proto (ds->dict),
+                                         CASENUMBER_MAX,
+                                         &proc_casereader_class, ds);
+  ds->shim = casereader_shim_insert (reader);
+  return reader;
 }
 
 /* Returns true if a procedure is in progress, that is, if
@@ -298,6 +313,11 @@ proc_casereader_destroy (struct casereader *reader, void *ds_)
   struct dataset *ds = ds_;
   struct ccase *c;
 
+  /* We are always the subreader for a casereader_buffer, so if we're being
+     destroyed then it's because the casereader_buffer has read all the cases
+     that it ever will. */
+  ds->shim = NULL;
+
   /* Make sure transformations happen for every input case, in
      case they have side effects, and ensure that the replacement
      active file gets all the cases it should. */
@@ -318,6 +338,9 @@ proc_casereader_destroy (struct casereader *reader, void *ds_)
 bool
 proc_commit (struct dataset *ds)
 {
+  if (ds->shim != NULL)
+    casereader_shim_slurp (ds->shim);
+
   assert (ds->proc_state == PROC_CLOSED);
   ds->proc_state = PROC_COMMITTED;
 
@@ -682,7 +705,7 @@ dataset_end_of_command (struct dataset *ds)
       else
         {
           const struct taint *taint = casereader_get_taint (ds->source);
-          taint_reset_successor_taint ((struct taint *) taint);
+          taint_reset_successor_taint (CONST_CAST (struct taint *, taint));
           assert (!taint_has_tainted_successor (taint));
         }
     }
index c86ac9cc7e2c856ee685d271cf0995e5a9bbafd1..d95e3a14076a140d848d8ccad45c73e767592d47 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -52,17 +52,14 @@ struct settings
   int *viewlength;
   int *viewwidth;
   bool safer_mode;
-  bool do_echo;
   bool include;
   int epoch;
-  bool errorbreak;
   bool route_errors_to_terminal;
   bool route_errors_to_listing;
   bool scompress;
   bool undefined;
   double blanks;
-  int mxwarns;
-  int mxerrs;
+  int max_messages[MSG_N_SEVERITIES];
   bool printback;
   bool mprint;
   int mxloops;
@@ -77,6 +74,8 @@ struct settings
   int syntax;
 
   struct fmt_number_style *styles;
+
+  enum settings_output_devices output_routing[SETTINGS_N_OUTPUT_TYPES];
 };
 
 static struct settings the_settings = {
@@ -93,15 +92,11 @@ static struct settings the_settings = {
     /* viewwidth */
   NULL,
     /* safer_mode */
-  false,
-    /* do_echo */
   false,
     /* include */
   true,
     /* epoch */
   -1,
-    /* errorbreak */
-  false,
     /* route_errors_to_terminal */
   true,
     /* route_errors_to_listing */
@@ -112,10 +107,12 @@ static struct settings the_settings = {
   true,
     /* blanks */
   SYSMIS,
-    /* mxwarns */
-  100,
-    /* mxerrs */
-  100,
+    /* max_messages */
+  {
+    100,                        /* MSG_S_ERROR */
+    100,                        /* MSG_S_WARNING */
+    100                         /* MSG_S_NOTE */
+  },
     /* printback */
   true,
     /* mprint */
@@ -139,7 +136,12 @@ static struct settings the_settings = {
     /* syntax */
   ENHANCED,
     /* styles */
-  NULL
+  NULL,
+    /* output devices */
+  {SETTINGS_DEVICE_LISTING | SETTINGS_DEVICE_TERMINAL,
+   SETTINGS_DEVICE_LISTING | SETTINGS_DEVICE_TERMINAL,
+   0,
+   SETTINGS_DEVICE_LISTING | SETTINGS_DEVICE_TERMINAL}
 };
 
 static void init_viewport ( int *, int *);
@@ -269,20 +271,6 @@ settings_set_safer_mode (void)
   the_settings.safer_mode = true;
 }
 
-/* Echo commands to the listing file/printer? */
-bool
-settings_get_echo (void)
-{
-  return the_settings.do_echo;
-}
-
-/* Set echo. */
-void
-settings_set_echo ( bool echo)
-{
-  the_settings.do_echo = echo;
-}
-
 /* If echo is on, whether commands from include files are echoed. */
 bool
 settings_get_include (void)
@@ -321,50 +309,6 @@ settings_set_epoch ( int epoch)
   assert (the_settings.epoch >= 0);
 }
 
-/* Does an error stop execution? */
-bool
-settings_get_errorbreak (void)
-{
-  return the_settings.errorbreak;
-}
-
-/* Sets whether an error stops execution. */
-void
-settings_set_errorbreak ( bool errorbreak)
-{
-  the_settings.errorbreak = errorbreak;
-}
-
-/* Route error messages to terminal? */
-bool
-settings_get_error_routing_to_terminal (void)
-{
-  return the_settings.route_errors_to_terminal;
-}
-
-/* Sets whether error messages should be routed to the
-   terminal. */
-void
-settings_set_error_routing_to_terminal ( bool route_to_terminal)
-{
-  the_settings.route_errors_to_terminal = route_to_terminal;
-}
-
-/* Route error messages to listing file? */
-bool
-settings_get_error_routing_to_listing (void)
-{
-  return the_settings.route_errors_to_listing;
-}
-
-/* Sets whether error messages should be routed to the
-   listing file. */
-void
-settings_set_error_routing_to_listing ( bool route_to_listing)
-{
-  the_settings.route_errors_to_listing = route_to_listing;
-}
-
 /* Compress system files by default? */
 bool
 settings_get_scompression (void)
@@ -408,46 +352,24 @@ settings_set_blanks ( double blanks)
   the_settings.blanks = blanks;
 }
 
-/* Maximum number of warnings + errors. */
+/* Returns the maximum number of messages to show of the given SEVERITY before
+   aborting.  (The value for MSG_S_WARNING is interpreted as maximum number of
+   warnings and errors combined.) */
 int
-settings_get_mxwarns (void)
+settings_get_max_messages (enum msg_severity severity)
 {
-  return the_settings.mxwarns;
+  assert (severity < MSG_N_SEVERITIES);
+  return the_settings.max_messages[severity];
 }
 
-/* Sets maximum number of warnings + errors. */
+/* Sets the maximum number of messages to show of the given SEVERITY before
+   aborting to MAX.  (The value for MSG_S_WARNING is interpreted as maximum
+   number of warnings and errors combined.) */
 void
-settings_set_mxwarns ( int mxwarns)
+settings_set_max_messages (enum msg_severity severity, int max)
 {
-  the_settings.mxwarns = mxwarns;
-}
-
-/* Maximum number of errors. */
-int
-settings_get_mxerrs (void)
-{
-  return the_settings.mxerrs;
-}
-
-/* Sets maximum number of errors. */
-void
-settings_set_mxerrs ( int mxerrs)
-{
-  the_settings.mxerrs = mxerrs;
-}
-
-/* Whether commands are written to the display. */
-bool
-settings_get_printback (void)
-{
-  return the_settings.printback;
-}
-
-/* Sets whether commands are written to the display. */
-void
-settings_set_printback ( bool printback)
-{
-  the_settings.printback = printback;
+  assert (severity < MSG_N_SEVERITIES);
+  the_settings.max_messages[severity] = max;
 }
 
 /* Independent of get_printback, controls whether the commands
@@ -757,3 +679,18 @@ settings_dollar_template (const struct fmt_spec *fmt)
 
   return ds_cstr (&str);
 }
+
+void
+settings_set_output_routing (enum settings_output_type type,
+                             enum settings_output_devices devices)
+{
+  assert (type < SETTINGS_N_OUTPUT_TYPES);
+  the_settings.output_routing[type] = devices;
+}
+
+enum settings_output_devices
+settings_get_output_routing (enum settings_output_type type)
+{
+  assert (type < SETTINGS_N_OUTPUT_TYPES);
+  return the_settings.output_routing[type] | SETTINGS_DEVICE_UNFILTERED;
+}
index 3de1715f0738595dc7fd53a4df82b34a96dc98f0..7dcb0e34a479c2d5bf18cd431cd810e626decc6f 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <stdbool.h>
 #include <stddef.h>
-#include <data/format.h>
-#include <libpspp/float-format.h>
-#include <libpspp/integer-format.h>
+
+#include "data/format.h"
+#include "libpspp/float-format.h"
+#include "libpspp/integer-format.h"
+#include "libpspp/message.h"
 
 struct caseproto;
 struct settings;
@@ -63,22 +65,12 @@ void settings_set_viewwidth ( int);
 bool settings_get_safer_mode (void);
 void settings_set_safer_mode (void);
 
-bool settings_get_echo (void);
-void settings_set_echo ( bool);
 bool settings_get_include (void);
 void settings_set_include ( bool);
 
 int settings_get_epoch (void);
 void settings_set_epoch ( int);
 
-bool settings_get_errorbreak (void);
-void settings_set_errorbreak ( bool);
-
-bool settings_get_error_routing_to_terminal (void);
-void settings_set_error_routing_to_terminal (bool);
-bool settings_get_error_routing_to_listing (void);
-void settings_set_error_routing_to_listing (bool);
-
 bool settings_get_scompression (void);
 void settings_set_scompression (bool);
 
@@ -87,13 +79,9 @@ void settings_set_undefined (bool);
 double settings_get_blanks (void);
 void settings_set_blanks (double);
 
-int settings_get_mxwarns (void);
-void settings_set_mxwarns ( int);
-int settings_get_mxerrs (void);
-void settings_set_mxerrs ( int);
+int settings_get_max_messages (enum msg_severity);
+void settings_set_max_messages (enum msg_severity, int max);
 
-bool settings_get_printback (void);
-void settings_set_printback (bool);
 bool settings_get_mprint (void);
 void settings_set_mprint (bool);
 
@@ -140,4 +128,26 @@ const struct fmt_number_style * settings_get_style (enum fmt_type type);
 
 char * settings_dollar_template (const struct fmt_spec *fmt);
 
+/* Routing of different kinds of output. */
+enum settings_output_devices
+  {
+    SETTINGS_DEVICE_LISTING = 1 << 0,  /* File or device. */
+    SETTINGS_DEVICE_TERMINAL = 1 << 1, /* Screen. */
+    SETTINGS_DEVICE_UNFILTERED = 1 << 2 /* Gets all output, no filtering. */
+  };
+
+enum settings_output_type
+  {
+    SETTINGS_OUTPUT_ERROR,      /* Errors and warnings. */
+    SETTINGS_OUTPUT_NOTE,       /* Notes. */
+    SETTINGS_OUTPUT_SYNTAX,     /* Syntax. */
+    SETTINGS_OUTPUT_RESULT,     /* Everything else. */
+    SETTINGS_N_OUTPUT_TYPES
+  };
+
+void settings_set_output_routing (enum settings_output_type,
+                                  enum settings_output_devices);
+enum settings_output_devices settings_get_output_routing (
+  enum settings_output_type);
+
 #endif /* !settings_h */
index 1b8be927a69c70f918f47ba1505d59787ae6fa03..d1e37f5be06e079c846383dbbd16e70bb360e39f 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include <data/short-names.h>
+#include "data/short-names.h"
 
-#include <data/dictionary.h>
-#include <data/sys-file-private.h>
-#include <data/variable.h>
-#include <libpspp/assertion.h>
-#include <libpspp/compiler.h>
-#include <libpspp/hash.h>
-#include <libpspp/message.h>
-#include <libpspp/str.h>
+#include "data/dictionary.h"
+#include "data/sys-file-private.h"
+#include "data/variable.h"
+#include "libpspp/assertion.h"
+#include "libpspp/compiler.h"
+#include "libpspp/message.h"
+#include "libpspp/str.h"
+#include "libpspp/stringi-set.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-/* Compares two strings. */
-static int
-compare_strings (const void *a, const void *b, const void *aux UNUSED)
-{
-  return strcmp (a, b);
-}
-
-/* Hashes a string. */
-static unsigned
-do_hash_string (const void *s, const void *aux UNUSED)
-{
-  return hash_string (s, 0);
-}
-
 /* Sets V's short name to BASE, followed by a suffix of the form
    _A, _B, _C, ..., _AA, _AB, etc. according to the value of
    SUFFIX_NUMBER.  Truncates BASE as necessary to fit. */
@@ -79,18 +65,19 @@ set_var_short_name_suffix (struct variable *v, size_t i,
 }
 
 static void
-claim_short_name (struct variable *v, size_t i, struct hsh_table *short_names)
+claim_short_name (struct variable *v, size_t i,
+                  struct stringi_set *short_names)
 {
   const char *short_name = var_get_short_name (v, i);
-  if (short_name != NULL
-      && hsh_insert (short_names, (char *) short_name) != NULL)
+  if (short_name != NULL && !stringi_set_insert (short_names, short_name))
     var_set_short_name (v, i, NULL);
 }
 
 /* Form initial short_name from the variable name, then try _A,
    _B, ... _AA, _AB, etc., if needed. */
 static void
-assign_short_name (struct variable *v, size_t i, struct hsh_table *short_names)
+assign_short_name (struct variable *v, size_t i,
+                   struct stringi_set *short_names)
 {
   int trial;
 
@@ -104,7 +91,7 @@ assign_short_name (struct variable *v, size_t i, struct hsh_table *short_names)
       else
         set_var_short_name_suffix (v, i, var_get_name (v), trial);
 
-      if (hsh_insert (short_names, (char *) var_get_short_name (v, i)) == NULL)
+      if (stringi_set_insert (short_names, var_get_short_name (v, i)))
         break;
     }
 }
@@ -121,15 +108,10 @@ void
 short_names_assign (struct dictionary *d)
 {
   size_t var_cnt = dict_get_var_cnt (d);
-  struct hsh_table *short_names;
+  struct stringi_set short_names;
   size_t i, j;
 
-  /* Create hash used for detecting conflicts.  The entries in
-     the hash table point to strings owned by dictionary
-     variables, not by us, so we don't need to provide a free
-     function. */
-  short_names = hsh_create (var_cnt, compare_strings, do_hash_string,
-                            NULL, NULL);
+  stringi_set_init (&short_names);
 
   /* Clear short names that conflict with a variable name. */
   for (i = 0; i < var_cnt; i++)
@@ -153,8 +135,9 @@ short_names_assign (struct dictionary *d)
   for (i = 0; i < var_cnt; i++)
     {
       struct variable *v = dict_get_var (d, i);
-      if (strlen (var_get_name (v)) <= SHORT_NAME_LEN)
-        var_set_short_name (v, 0, var_get_name (v));
+      const char *name = var_get_name (v);
+      if (strlen (name) <= SHORT_NAME_LEN)
+        var_set_short_name (v, 0, name);
     }
 
   /* Each variable with an assigned short name for its first
@@ -165,14 +148,14 @@ short_names_assign (struct dictionary *d)
   for (i = 0; i < var_cnt; i++)
     {
       struct variable *v = dict_get_var (d, i);
-      claim_short_name (v, 0, short_names);
+      claim_short_name (v, 0, &short_names);
     }
   for (i = 0; i < var_cnt; i++)
     {
       struct variable *v = dict_get_var (d, i);
       int segment_cnt = sfm_width_to_segments (var_get_width (v));
       for (j = 1; j < segment_cnt; j++)
-        claim_short_name (v, j, short_names);
+        claim_short_name (v, j, &short_names);
     }
 
   /* Assign short names to first segment of remaining variables,
@@ -180,16 +163,15 @@ short_names_assign (struct dictionary *d)
   for (i = 0; i < var_cnt; i++)
     {
       struct variable *v = dict_get_var (d, i);
-      assign_short_name (v, 0, short_names);
+      assign_short_name (v, 0, &short_names);
     }
   for (i = 0; i < var_cnt; i++)
     {
       struct variable *v = dict_get_var (d, i);
       int segment_cnt = sfm_width_to_segments (var_get_width (v));
       for (j = 1; j < segment_cnt; j++)
-        assign_short_name (v, j, short_names);
+        assign_short_name (v, j, &short_names);
     }
 
-  /* Get rid of hash table. */
-  hsh_destroy (short_names);
+  stringi_set_destroy (&short_names);
 }
index 6ffaa4c2bed24a603e3ce0aa267c16661e82f471..32056215e4ace37d4fcd9b544c3e48c493d82dec 100644 (file)
@@ -99,6 +99,27 @@ subcase_destroy (struct subcase *sc)
   caseproto_unref (sc->proto);
 }
 
+/* Returns true if VAR already has a field in SC,
+   false otherwise. */
+bool
+subcase_contains_var (const struct subcase *sc, const struct variable *var)
+{
+  return subcase_contains (sc, var_get_case_index (var));
+}
+
+/* Returns true if CASE_INDEX already has a field in SC,
+   false otherwise. */
+bool
+subcase_contains (const struct subcase *sc, int case_index)
+{
+  size_t i;
+
+  for (i = 0; i < sc->n_fields; i++)
+    if (sc->fields[i].case_index == case_index)
+      return true;
+
+  return false;
+}
 
 /* Add a field for VAR to SC, with DIRECTION as the sort order.
    Returns true if successful, false if VAR already has a field
@@ -107,8 +128,13 @@ bool
 subcase_add_var (struct subcase *sc, const struct variable *var,
                  enum subcase_direction direction)
 {
-  return subcase_add (sc, var_get_case_index (var),
-                     var_get_width (var), direction);
+  if (!subcase_contains_var (sc, var))
+    {
+      subcase_add_var_always (sc, var, direction);
+      return true;
+    }
+  else
+    return false;
 }
 
 /* Add a field for CASE_INDEX, WIDTH to SC, with DIRECTION as the sort order.
@@ -116,14 +142,35 @@ subcase_add_var (struct subcase *sc, const struct variable *var,
    in SC. */
 bool
 subcase_add (struct subcase *sc, int case_index, int width,
-                 enum subcase_direction direction)
+             enum subcase_direction direction)
 {
-  struct subcase_field *field;
-  size_t i;
+  if (!subcase_contains (sc, case_index))
+    {
+      subcase_add_always (sc, case_index, width, direction);
+      return true;
+    }
+  else
+    return false;
+}
 
-  for (i = 0; i < sc->n_fields; i++)
-    if (sc->fields[i].case_index == case_index)
-      return false;
+/* Add a field for VAR to SC, with DIRECTION as the sort order,
+   regardless of whether VAR already has a field in SC. */
+void
+subcase_add_var_always (struct subcase *sc, const struct variable *var,
+                        enum subcase_direction direction)
+{
+  return subcase_add_always (sc, var_get_case_index (var),
+                             var_get_width (var), direction);
+}
+
+/* Add a field for CASE_INDEX, WIDTH to SC, with DIRECTION as the
+   sort order, regardless of whether CASE_INDEX already has a
+   field in SC. */
+void
+subcase_add_always (struct subcase *sc, int case_index, int width,
+                    enum subcase_direction direction)
+{
+  struct subcase_field *field;
 
   sc->fields = xnrealloc (sc->fields, sc->n_fields + 1, sizeof *sc->fields);
   field = &sc->fields[sc->n_fields++];
@@ -131,7 +178,27 @@ subcase_add (struct subcase *sc, int case_index, int width,
   field->width = width;
   field->direction = direction;
   invalidate_proto (sc);
-  return true;
+}
+
+/* Adds a field to SC for each column in PROTO, so that SC
+   contains all of the columns in PROTO in the same order as a
+   case conforming to PROTO.  The fields are added with
+   ascending direction. */
+void
+subcase_add_proto_always (struct subcase *sc, const struct caseproto *proto)
+{
+  size_t n = caseproto_get_n_widths (proto);
+  size_t i;
+
+  sc->fields = xnrealloc (sc->fields, sc->n_fields + n, sizeof *sc->fields);
+  for (i = 0; i < n; i++)
+    {
+      struct subcase_field *field = &sc->fields[sc->n_fields++];
+      field->case_index = i;
+      field->width = caseproto_get_width (proto, i);
+      field->direction = SC_ASCEND;
+    }
+  invalidate_proto (sc);
 }
 
 /* Obtains a caseproto for a case described by SC.  The caller
@@ -139,7 +206,7 @@ subcase_add (struct subcase *sc, int case_index, int width,
 const struct caseproto *
 subcase_get_proto (const struct subcase *sc_)
 {
-  struct subcase *sc = (struct subcase *) sc_;
+  struct subcase *sc = CONST_CAST (struct subcase *, sc_);
 
   if (sc->proto == NULL)
     {
index 6e59da1d3679ac5b4c89f8a1b6a6ca6bc910627c..71bf6fd7cc33d4227a4e3c4380f6773a1bfc599a 100644 (file)
@@ -60,17 +60,27 @@ void subcase_clone (struct subcase *, const struct subcase *);
 void subcase_clear (struct subcase *);
 void subcase_destroy (struct subcase *);
 
-bool subcase_add (struct subcase *sc, int index, int width,
-                 enum subcase_direction direction);
+bool subcase_contains (const struct subcase *, int case_index);
+bool subcase_contains_var (const struct subcase *, const struct variable *);
 
+bool subcase_add (struct subcase *, int case_index, int width,
+                 enum subcase_direction direction);
 bool subcase_add_var (struct subcase *, const struct variable *,
                       enum subcase_direction);
 
+void subcase_add_always (struct subcase *sc, int case_index, int width,
+                         enum subcase_direction direction);
+void subcase_add_var_always (struct subcase *, const struct variable *,
+                             enum subcase_direction);
+void subcase_add_proto_always (struct subcase *, const struct caseproto *);
+
 const struct caseproto *subcase_get_proto (const struct subcase *);
 
 static inline bool subcase_is_empty (const struct subcase *);
 static inline size_t subcase_get_n_fields (const struct subcase *);
 
+static inline size_t subcase_get_case_index (const struct subcase *,
+                                             size_t idx);
 static inline enum subcase_direction subcase_get_direction (
   const struct subcase *, size_t idx);
 
@@ -100,6 +110,12 @@ bool subcase_equal_cx (const struct subcase *,
 bool subcase_equal_xx (const struct subcase *,
                        const union value *a, const union value *b);
 
+static inline size_t
+subcase_get_case_index (const struct subcase *sc, size_t idx)
+{
+  return sc->fields[idx].case_index;
+}
+
 static inline enum subcase_direction
 subcase_get_direction (const struct subcase *sc, size_t idx)
 {
index b024e4f0ef81532d51f7024a9b2ea352efba84f6..03234c2d66166f60138cd67fa22ca7b7291e581e 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -16,8 +16,8 @@
 
 #include <config.h>
 
-#include <data/sys-file-reader.h>
-#include <data/sys-file-private.h>
+#include "data/sys-file-reader.h"
+#include "data/sys-file-private.h"
 
 #include <errno.h>
 #include <float.h>
 #include <setjmp.h>
 #include <stdlib.h>
 
-#include <libpspp/i18n.h>
-#include <libpspp/assertion.h>
-#include <libpspp/message.h>
-#include <libpspp/compiler.h>
-#include <libpspp/misc.h>
-#include <libpspp/pool.h>
-#include <libpspp/str.h>
-#include <libpspp/hash.h>
-#include <libpspp/array.h>
-
-#include <data/attributes.h>
-#include <data/case.h>
-#include <data/casereader-provider.h>
-#include <data/casereader.h>
-#include <data/dictionary.h>
-#include <data/file-handle-def.h>
-#include <data/file-name.h>
-#include <data/format.h>
-#include <data/missing-values.h>
-#include <data/short-names.h>
-#include <data/value-labels.h>
-#include <data/variable.h>
-#include <data/value.h>
-
-#include "c-ctype.h"
-#include "inttostr.h"
-#include "minmax.h"
-#include "unlocked-io.h"
-#include "xalloc.h"
-#include "xsize.h"
+#include "data/attributes.h"
+#include "data/case.h"
+#include "data/casereader-provider.h"
+#include "data/casereader.h"
+#include "data/dictionary.h"
+#include "data/file-handle-def.h"
+#include "data/file-name.h"
+#include "data/format.h"
+#include "data/missing-values.h"
+#include "data/mrset.h"
+#include "data/short-names.h"
+#include "data/value-labels.h"
+#include "data/value.h"
+#include "data/variable.h"
+#include "libpspp/array.h"
+#include "libpspp/assertion.h"
+#include "libpspp/compiler.h"
+#include "libpspp/hash.h"
+#include "libpspp/i18n.h"
+#include "libpspp/message.h"
+#include "libpspp/misc.h"
+#include "libpspp/pool.h"
+#include "libpspp/str.h"
+#include "libpspp/stringi-set.h"
+
+#include "gl/c-ctype.h"
+#include "gl/inttostr.h"
+#include "gl/minmax.h"
+#include "gl/unlocked-io.h"
+#include "gl/xalloc.h"
+#include "gl/xsize.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -88,6 +89,7 @@ struct sfm_reader
     double bias;               /* Compression bias, usually 100.0. */
     uint8_t opcodes[8];         /* Current block of opcodes. */
     size_t opcode_idx;          /* Next opcode to interpret, 8 if none left. */
+    bool corruption_warning;    /* Warned about possible corruption? */
   };
 
 static const struct casereader_class sys_file_casereader_class;
@@ -99,6 +101,8 @@ static struct variable **make_var_by_value_idx (struct sfm_reader *,
 static struct variable *lookup_var_by_value_idx (struct sfm_reader *,
                                                  struct variable **,
                                                  int value_idx);
+static struct variable *lookup_var_by_short_name (struct dictionary *,
+                                                  const char *short_name);
 
 static void sys_msg (struct sfm_reader *r, int class,
                      const char *format, va_list args)
@@ -127,12 +131,19 @@ static void text_warn (struct sfm_reader *r, struct text_record *text,
                        const char *format, ...)
   PRINTF_FORMAT (3, 4);
 static char *text_get_token (struct text_record *,
-                             struct substring delimiters);
+                             struct substring delimiters, char *delimiter);
 static bool text_match (struct text_record *, char c);
+static bool text_read_variable_name (struct sfm_reader *, struct dictionary *,
+                                     struct text_record *,
+                                     struct substring delimiters,
+                                     struct variable **);
 static bool text_read_short_name (struct sfm_reader *, struct dictionary *,
                                   struct text_record *,
                                   struct substring delimiters,
                                   struct variable **);
+static const char *text_parse_counted_string (struct sfm_reader *,
+                                              struct text_record *);
+static size_t text_pos (const struct text_record *);
 
 static bool close_reader (struct sfm_reader *r);
 \f
@@ -168,6 +179,8 @@ static void read_machine_integer_info (struct sfm_reader *,
                                       );
 static void read_machine_float_info (struct sfm_reader *,
                                      size_t size, size_t count);
+static void read_mrsets (struct sfm_reader *, size_t size, size_t count,
+                         struct dictionary *);
 static void read_display_parameters (struct sfm_reader *,
                                      size_t size, size_t count,
                                      struct dictionary *);
@@ -270,6 +283,7 @@ sfm_open_reader (struct file_handle *fh, struct dictionary **dict,
   r->oct_cnt = 0;
   r->has_long_var_names = false;
   r->opcode_idx = sizeof r->opcodes;
+  r->corruption_warning = false;
 
   /* TRANSLATORS: this fragment will be interpolated into
      messages in fh_lock() that identify types of files. */
@@ -604,16 +618,20 @@ read_variable_record (struct sfm_reader *r, struct dictionary *dict,
     sys_error (r, _("Variable label indicator field is not 0 or 1."));
   if (has_variable_label == 1)
     {
-      size_t len;
+      size_t len, read_len;
       char label[255 + 1];
 
       len = read_int (r);
-      if (len >= sizeof label)
-        sys_error (r, _("Variable %s has label of invalid length %zu."),
-                   name, len);
-      read_string (r, label, len + 1);
+
+      /* Read up to 255 bytes of label. */
+      read_len = MIN (sizeof label - 1, len);
+      read_string (r, label, read_len + 1);
       var_set_label (var, label);
 
+      /* Skip unread label bytes. */
+      skip_bytes (r, len - read_len);
+
+      /* Skip label padding up to multiple of 4 bytes. */
       skip_bytes (r, ROUND_UP (len, 4) - len);
     }
 
@@ -823,8 +841,9 @@ read_extension_record (struct sfm_reader *r, struct dictionary *dict,
       break;
 
     case 7:
-      /* Used by the MRSETS command. */
-      break;
+    case 19:
+      read_mrsets (r, size, count, dict);
+      return;
 
     case 8:
       /* Used by the SPSS Data Entry software. */
@@ -843,7 +862,7 @@ read_extension_record (struct sfm_reader *r, struct dictionary *dict,
       return;
 
     case 16:
-      /* New in SPSS v14?  Unknown purpose.  */
+      /* Extended number of cases.  Not important. */
       break;
 
     case 17:
@@ -1005,6 +1024,160 @@ read_machine_float_info (struct sfm_reader *r, size_t size, size_t count)
               lowest, "LOWEST");
 }
 
+/* Read record type 7, subtype 7 or 19. */
+static void
+read_mrsets (struct sfm_reader *r, size_t size, size_t count,
+             struct dictionary *dict)
+{
+  struct text_record *text;
+  struct mrset *mrset;
+
+  text = open_text_record (r, size * count);
+  for (;;)
+    {
+      const char *name, *label, *counted;
+      struct stringi_set var_names;
+      size_t allocated_vars;
+      char delimiter;
+      int width;
+
+      mrset = xzalloc (sizeof *mrset);
+
+      name = text_get_token (text, ss_cstr ("="), NULL);
+      if (name == NULL)
+        break;
+      mrset->name = xstrdup (name);
+
+      if (text_match (text, 'C'))
+        {
+          mrset->type = MRSET_MC;
+          if (!text_match (text, ' '))
+            {
+              sys_warn (r, _("Missing space following 'C' at offset %zu "
+                             "in MRSETS record"), text_pos (text));
+              break;
+            }
+        }
+      else if (text_match (text, 'D'))
+        {
+          mrset->type = MRSET_MD;
+          mrset->cat_source = MRSET_VARLABELS;
+        }
+      else if (text_match (text, 'E'))
+        {
+          char *number;
+
+          mrset->type = MRSET_MD;
+          mrset->cat_source = MRSET_COUNTEDVALUES;
+          if (!text_match (text, ' '))
+            {
+              sys_warn (r, _("Missing space following 'E' at offset %zu "
+                             "in MRSETS record"), text_pos (text));
+              break;
+            }
+
+          number = text_get_token (text, ss_cstr (" "), NULL);
+          if (!strcmp (number, "11"))
+            mrset->label_from_var_label = true;
+          else if (strcmp (number, "1"))
+            sys_warn (r, _("Unexpected label source value \"%s\" "
+                           "following 'E' at offset %zu in MRSETS record"),
+                      number, text_pos (text));
+        }
+      else
+        {
+          sys_warn (r, _("Missing 'C', 'D', or 'E' at offset %zu "
+                         "in MRSETS record."),
+                    text_pos (text));
+          break;
+        }
+
+      if (mrset->type == MRSET_MD)
+        {
+          counted = text_parse_counted_string (r, text);
+          if (counted == NULL)
+            break;
+        }
+
+      label = text_parse_counted_string (r, text);
+      if (label == NULL)
+        break;
+      mrset->label = label[0] != '\0' ? xstrdup (label) : NULL;
+
+      stringi_set_init (&var_names);
+      allocated_vars = 0;
+      width = INT_MAX;
+      do
+        {
+          struct variable *var;
+          const char *var_name;
+
+          var_name = text_get_token (text, ss_cstr (" \n"), &delimiter);
+          if (var_name == NULL)
+            {
+              sys_warn (r, _("Missing new-line parsing variable names "
+                             "at offset %zu in MRSETS record."),
+                        text_pos (text));
+              break;
+            }
+
+          var = lookup_var_by_short_name (dict, var_name);
+          if (var == NULL)
+            continue;
+          if (!stringi_set_insert (&var_names, var_name))
+            {
+              sys_warn (r, _("Duplicate variable name %s "
+                             "at offset %zu in MRSETS record."),
+                        var_name, text_pos (text));
+              continue;
+            }
+
+          if (mrset->label == NULL && mrset->label_from_var_label
+              && var_has_label (var))
+            mrset->label = xstrdup (var_get_label (var));
+
+          if (mrset->n_vars
+              && var_get_type (var) != var_get_type (mrset->vars[0]))
+            {
+              sys_warn (r, _("MRSET %s contains both string and "
+                             "numeric variables."), name);
+              continue;
+            }
+          width = MIN (width, var_get_width (var));
+
+          if (mrset->n_vars >= allocated_vars)
+            mrset->vars = x2nrealloc (mrset->vars, &allocated_vars,
+                                      sizeof *mrset->vars);
+          mrset->vars[mrset->n_vars++] = var;
+        }
+      while (delimiter != '\n');
+
+      if (mrset->n_vars < 2)
+        {
+          sys_warn (r, _("MRSET %s has only %zu variables."), mrset->name,
+                    mrset->n_vars);
+          mrset_destroy (mrset);
+          continue;
+        }
+
+      if (mrset->type == MRSET_MD)
+        {
+          mrset->width = width;
+          value_init (&mrset->counted, width);
+          if (width == 0)
+            mrset->counted.f = strtod (counted, NULL);
+          else
+            value_copy_str_rpad (&mrset->counted, width,
+                                 (const uint8_t *) counted, ' ');
+        }
+
+      dict_add_mrset (dict, mrset);
+      mrset = NULL;
+    }
+  mrset_destroy (mrset);
+  close_text_record (r, text);
+}
+
 /* Read record type 7, subtype 11, which specifies how variables
    should be displayed in GUI environments. */
 static void
@@ -1353,7 +1526,7 @@ read_attributes (struct sfm_reader *r, struct text_record *text,
       int index;
 
       /* Parse the key. */
-      key = text_get_token (text, ss_cstr ("("));
+      key = text_get_token (text, ss_cstr ("("), NULL);
       if (key == NULL)
         return;
 
@@ -1364,7 +1537,7 @@ read_attributes (struct sfm_reader *r, struct text_record *text,
           char *value;
           size_t length;
 
-          value = text_get_token (text, ss_cstr ("\n"));
+          value = text_get_token (text, ss_cstr ("\n"), NULL);
           if (value == NULL)
             {
               text_warn (r, text, _("Error parsing attribute value %s[%d]"),
@@ -1528,7 +1701,7 @@ read_variable_attributes (struct sfm_reader *r,
   for (;;) 
     {
       struct variable *var;
-      if (!text_read_short_name (r, dict, text, ss_cstr (":"), &var))
+      if (!text_read_variable_name (r, dict, text, ss_cstr (":"), &var))
         break;
       read_attributes (r, text, var != NULL ? var_get_attributes (var) : NULL);
     }
@@ -1710,7 +1883,14 @@ read_compressed_number (struct sfm_reader *r, double *d)
       break;
 
     case 254:
-      sys_error (r, _("Compressed data is corrupt."));
+      float_convert (r->float_format, "        ", FLOAT_NATIVE_DOUBLE, d);
+      if (!r->corruption_warning)
+        {
+          r->corruption_warning = true;
+          sys_warn (r, _("Possible compressed data corruption: "
+                         "compressed spaces appear in numeric field."));
+        }
+      break;
 
     case 255:
       *d = SYSMIS;
@@ -1731,7 +1911,8 @@ read_compressed_number (struct sfm_reader *r, double *d)
 static bool
 read_compressed_string (struct sfm_reader *r, uint8_t *dst)
 {
-  switch (read_opcode (r))
+  int opcode = read_opcode (r);
+  switch (opcode)
     {
     case -1:
     case 252:
@@ -1746,7 +1927,25 @@ read_compressed_string (struct sfm_reader *r, uint8_t *dst)
       break;
 
     default:
-      sys_error (r, _("Compressed data is corrupt."));
+      {
+        double value = opcode - r->bias;
+        float_convert (FLOAT_NATIVE_DOUBLE, &value, r->float_format, dst);
+        if (value == 0.0)
+          {
+            /* This has actually been seen "in the wild".  The submitter of the
+               file that showed that the contents decoded as spaces, but they
+               were at the end of the field so it's possible that the null
+               bytes just acted as null terminators. */
+          }
+        else if (!r->corruption_warning)
+          {
+            r->corruption_warning = true;
+            sys_warn (r, _("Possible compressed data corruption: "
+                           "string contains compressed integer (opcode %d)"),
+                      opcode);
+          }
+      }
+      break;
     }
 
   return true;
@@ -1924,7 +2123,7 @@ read_variable_to_value_pair (struct sfm_reader *r, struct dictionary *dict,
       if (!text_read_short_name (r, dict, text, ss_cstr ("="), var))
         return false;
       
-      *value = text_get_token (text, ss_buffer ("\t\0", 2));
+      *value = text_get_token (text, ss_buffer ("\t\0", 2), NULL);
       if (*value == NULL)
         return false;
 
@@ -1936,18 +2135,39 @@ read_variable_to_value_pair (struct sfm_reader *r, struct dictionary *dict,
     }
 }
 
+static bool
+text_read_variable_name (struct sfm_reader *r, struct dictionary *dict,
+                         struct text_record *text, struct substring delimiters,
+                         struct variable **var)
+{
+  char *name;
+
+  name = text_get_token (text, delimiters, NULL);
+  if (name == NULL)
+    return false;
+
+  *var = dict_lookup_var (dict, name);
+  if (*var != NULL)
+    return true;
+
+  text_warn (r, text, _("Dictionary record refers to unknown variable %s."),
+             name);
+  return false;
+}
+
+
 static bool
 text_read_short_name (struct sfm_reader *r, struct dictionary *dict,
                       struct text_record *text, struct substring delimiters,
                       struct variable **var)
 {
-  char *short_name = text_get_token (text, delimiters);
+  char *short_name = text_get_token (text, delimiters, NULL);
   if (short_name == NULL)
     return false;
 
   *var = lookup_var_by_short_name (dict, short_name);
   if (*var == NULL)
-    text_warn (r, text, _("Variable map refers to unknown variable %s."),
+    text_warn (r, text, _("Dictionary record refers to unknown variable %s."),
                short_name);
   return true;
 }
@@ -1969,16 +2189,78 @@ text_warn (struct sfm_reader *r, struct text_record *text,
 }
 
 static char *
-text_get_token (struct text_record *text, struct substring delimiters)
+text_get_token (struct text_record *text, struct substring delimiters,
+                char *delimiter)
 {
   struct substring token;
+  char *end;
 
   if (!ss_tokenize (text->buffer, delimiters, &text->pos, &token))
     return NULL;
-  ss_data (token)[ss_length (token)] = '\0';
+
+  end = &ss_data (token)[ss_length (token)];
+  if (delimiter != NULL)
+    *delimiter = *end;
+  *end = '\0';
   return ss_data (token);
 }
 
+/* Reads a integer value expressed in decimal, then a space, then a string that
+   consists of exactly as many bytes as specified by the integer, then a space,
+   from TEXT.  Returns the string, null-terminated, as a subset of TEXT's
+   buffer (so the caller should not free the string). */
+static const char *
+text_parse_counted_string (struct sfm_reader *r, struct text_record *text)
+{
+  size_t start;
+  size_t n;
+  char *s;
+
+  start = text->pos;
+  n = 0;
+  for (;;)
+    {
+      int c = text->buffer.string[text->pos];
+      if (c < '0' || c > '9')
+        break;
+      n = (n * 10) + (c - '0');
+      text->pos++;
+    }
+  if (start == text->pos)
+    {
+      sys_warn (r, _("Expecting digit at offset %zu in MRSETS record."),
+                 text->pos);
+      return NULL;
+    }
+
+  if (!text_match (text, ' '))
+    {
+      sys_warn (r, _("Expecting space at offset %zu in MRSETS record."),
+                text->pos);
+      return NULL;
+    }
+
+  if (text->pos + n > text->buffer.length)
+    {
+      sys_warn (r, _("%zu-byte string starting at offset %zu "
+                     "exceeds record length %zu."),
+                n, text->pos, text->buffer.length);
+      return NULL;
+    }
+
+  s = &text->buffer.string[text->pos];
+  if (s[n] != ' ')
+    {
+      sys_warn (r,
+                _("Expecting space at offset %zu following %zu-byte string."),
+                text->pos + n, n);
+      return NULL;
+    }
+  s[n] = '\0';
+  text->pos += n + 1;
+  return s;
+}
+
 static bool
 text_match (struct text_record *text, char c)
 {
@@ -1990,6 +2272,13 @@ text_match (struct text_record *text, char c)
   else
     return false;
 }
+
+/* Returns the current byte offset inside the TEXT's string. */
+static size_t
+text_pos (const struct text_record *text)
+{
+  return text->pos;
+}
 \f
 /* Messages. */
 
@@ -2001,8 +2290,8 @@ sys_msg (struct sfm_reader *r, int class, const char *format, va_list args)
   struct string text;
 
   ds_init_empty (&text);
-  ds_put_format (&text, "\"%s\" near offset 0x%lx: ",
-                 fh_get_file_name (r->fh), (unsigned long) ftell (r->file));
+  ds_put_format (&text, "\"%s\" near offset 0x%llx: ",
+                 fh_get_file_name (r->fh), (long long int) ftello (r->file));
   ds_put_vformat (&text, format, args);
 
   m.category = msg_class_to_category (class);
index 5daea89dc5a908ac385a5f19dc8c2c62db7c0e20..729213bf6826337ba2a73c2c6ae6ce7ed678d7da 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -16,8 +16,8 @@
 
 #include <config.h>
 
-#include "sys-file-writer.h"
-#include "sys-file-private.h"
+#include "data/sys-file-writer.h"
+#include "data/sys-file-private.h"
 
 #include <ctype.h>
 #include <errno.h>
 #include <sys/stat.h>
 #include <time.h>
 
-#include <libpspp/float-format.h>
-#include <libpspp/integer-format.h>
-#include <libpspp/message.h>
-#include <libpspp/misc.h>
-#include <libpspp/str.h>
-#include <libpspp/i18n.h>
-#include <libpspp/version.h>
-
-#include <data/attributes.h>
-#include <data/case.h>
-#include <data/casewriter-provider.h>
-#include <data/casewriter.h>
-#include <data/dictionary.h>
-#include <data/file-handle-def.h>
-#include <data/file-name.h>
-#include <data/format.h>
-#include <data/make-file.h>
-#include <data/missing-values.h>
-#include <data/settings.h>
-#include <data/short-names.h>
-#include <data/value-labels.h>
-#include <data/variable.h>
-
-#include "minmax.h"
-#include "unlocked-io.h"
-#include "xalloc.h"
+#include "data/attributes.h"
+#include "data/case.h"
+#include "data/casewriter-provider.h"
+#include "data/casewriter.h"
+#include "data/dictionary.h"
+#include "data/file-handle-def.h"
+#include "data/file-name.h"
+#include "data/format.h"
+#include "data/make-file.h"
+#include "data/missing-values.h"
+#include "data/mrset.h"
+#include "data/settings.h"
+#include "data/short-names.h"
+#include "data/value-labels.h"
+#include "data/variable.h"
+#include "libpspp/float-format.h"
+#include "libpspp/i18n.h"
+#include "libpspp/integer-format.h"
+#include "libpspp/message.h"
+#include "libpspp/misc.h"
+#include "libpspp/str.h"
+#include "libpspp/version.h"
+
+#include "gl/xmemdup0.h"
+#include "gl/minmax.h"
+#include "gl/unlocked-io.h"
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -95,9 +96,9 @@ struct sfm_writer
 static const struct casewriter_class sys_file_casewriter_class;
 
 static void write_header (struct sfm_writer *, const struct dictionary *);
-static void write_variable (struct sfm_writer *, const struct variable *, const struct dictionary *);
-static void write_value_labels (struct sfm_writer *,
-                                struct variable *, int idx, const struct dictionary *);
+static void write_variable (struct sfm_writer *, const struct variable *);
+static void write_value_labels (struct sfm_writer *, struct variable *,
+                                int idx);
 static void write_integer_info_record (struct sfm_writer *);
 static void write_float_info_record (struct sfm_writer *);
 
@@ -113,6 +114,9 @@ static void write_vls_length_table (struct sfm_writer *w,
 static void write_long_string_value_labels (struct sfm_writer *,
                                             const struct dictionary *);
 
+static void write_mrsets (struct sfm_writer *, const struct dictionary *,
+                          bool pre_v14);
+
 static void write_variable_display_parameters (struct sfm_writer *w,
                                                const struct dictionary *dict);
 
@@ -223,7 +227,7 @@ sfm_open_writer (struct file_handle *fh, struct dictionary *d,
   /* Write basic variable info. */
   short_names_assign (d);
   for (i = 0; i < dict_get_var_cnt (d); i++)
-    write_variable (w, dict_get_var (d, i), d);
+    write_variable (w, dict_get_var (d, i));
 
   /* Write out value labels. */
   idx = 0;
@@ -231,7 +235,7 @@ sfm_open_writer (struct file_handle *fh, struct dictionary *d,
     {
       struct variable *v = dict_get_var (d, i);
 
-      write_value_labels (w, v, idx, d);
+      write_value_labels (w, v, idx);
       idx += sfm_width_to_octs (var_get_width (v));
     }
 
@@ -241,6 +245,8 @@ sfm_open_writer (struct file_handle *fh, struct dictionary *d,
   write_integer_info_record (w);
   write_float_info_record (w);
 
+  write_mrsets (w, d, true);
+
   write_variable_display_parameters (w, d);
 
   if (opts.version >= 3)
@@ -254,6 +260,8 @@ sfm_open_writer (struct file_handle *fh, struct dictionary *d,
     write_data_file_attributes (w, d);
   write_variable_attributes (w, d);
 
+  write_mrsets (w, d, false);
+
   write_encoding_record (w, d);
 
   /* Write end-of-headers record. */
@@ -421,7 +429,7 @@ write_variable_continuation_records (struct sfm_writer *w, int width)
 /* Write the variable record(s) for variable V to system file
    W. */
 static void
-write_variable (struct sfm_writer *w, const struct variable *v, const struct dictionary *dict)
+write_variable (struct sfm_writer *w, const struct variable *v)
 {
   int width = var_get_width (v);
   int segment_cnt = sfm_width_to_segments (width);
@@ -461,7 +469,7 @@ write_variable (struct sfm_writer *w, const struct variable *v, const struct dic
   /* Value label. */
   if (var_has_label (v))
     {
-      char *label = recode_string (dict_get_encoding (dict), UTF8, var_get_label (v), -1);
+      char *label = recode_string (var_get_encoding (v), UTF8, var_get_label (v), -1);
       size_t label_len = MIN (strlen (label), 255);
       size_t padded_len = ROUND_UP (label_len, 4);
       write_int (w, label_len);
@@ -508,7 +516,7 @@ write_variable (struct sfm_writer *w, const struct variable *v, const struct dic
    Value labels for long string variables are written separately,
    by write_long_string_value_labels. */
 static void
-write_value_labels (struct sfm_writer *w, struct variable *v, int idx, const struct dictionary *dict)
+write_value_labels (struct sfm_writer *w, struct variable *v, int idx)
 {
   const struct val_labs *val_labs;
   const struct val_lab **labels;
@@ -527,7 +535,7 @@ write_value_labels (struct sfm_writer *w, struct variable *v, int idx, const str
   for (i = 0; i < n_labels; i++)
     {
       const struct val_lab *vl = labels[i];
-      char *label = recode_string (dict_get_encoding (dict), UTF8, val_lab_get_label (vl), -1);
+      char *label = recode_string (var_get_encoding (v), UTF8, val_lab_get_label (vl), -1);
       uint8_t len = MIN (strlen (label), 255);
 
       write_value (w, val_lab_get_value (vl), var_get_width (v));
@@ -621,6 +629,64 @@ write_variable_attributes (struct sfm_writer *w, const struct dictionary *d)
   ds_destroy (&s);
 }
 
+/* Write multiple response sets.  If PRE_V14 is true, writes sets supported by
+   SPSS before release 14, otherwise writes sets supported only by later
+   versions. */
+static void
+write_mrsets (struct sfm_writer *w, const struct dictionary *dict,
+              bool pre_v14)
+{
+  struct string s = DS_EMPTY_INITIALIZER;
+  size_t n_mrsets;
+  size_t i;
+
+  n_mrsets = dict_get_n_mrsets (dict);
+  if (n_mrsets == 0)
+    return;
+
+  for (i = 0; i < n_mrsets; i++)
+    {
+      const struct mrset *mrset = dict_get_mrset (dict, i);
+      const char *label;
+      size_t j;
+
+      if ((mrset->type != MRSET_MD || mrset->cat_source != MRSET_COUNTEDVALUES)
+          != pre_v14)
+        continue;
+
+      ds_put_format (&s, "%s=", mrset->name);
+      if (mrset->type == MRSET_MD)
+        {
+          char *counted;
+
+          if (mrset->cat_source == MRSET_COUNTEDVALUES)
+            ds_put_format (&s, "E %d ", mrset->label_from_var_label ? 11 : 1);
+          else
+            ds_put_char (&s, 'D');
+
+          if (mrset->width == 0)
+            counted = xasprintf ("%.0f", mrset->counted.f);
+          else
+            counted = xmemdup0 (value_str (&mrset->counted, mrset->width),
+                                mrset->width);
+          ds_put_format (&s, "%zu %s", strlen (counted), counted);
+          free (counted);
+        }
+      else
+        ds_put_char (&s, 'C');
+      ds_put_char (&s, ' ');
+
+      label = mrset->label && !mrset->label_from_var_label ? mrset->label : "";
+      ds_put_format (&s, "%zu %s", strlen (label), label);
+
+      for (j = 0; j < mrset->n_vars; j++)
+        ds_put_format (&s, " %s", var_get_short_name (mrset->vars[j], 0));
+      ds_put_char (&s, '\n');
+    }
+  write_attribute_record (w, &s, 7);
+  ds_destroy (&s);
+}
+
 /* Write the alignment, width and scale values. */
 static void
 write_variable_display_parameters (struct sfm_writer *w,
@@ -910,7 +976,7 @@ close_writer (struct sfm_writer *w)
       /* Seek back to the beginning and update the number of cases.
          This is just a courtesy to later readers, so there's no need
          to check return values or report errors. */
-      if (ok && w->case_cnt <= INT32_MAX && !fseek (w->file, 80, SEEK_SET))
+      if (ok && w->case_cnt <= INT32_MAX && !fseeko (w->file, 80, SEEK_SET))
         {
           write_int (w, w->case_cnt);
           clearerr (w->file);
index c8061f7bd5d7fee54c47f5e65aa739b442f10dce..b1c0dc7ae2682c9fec73dd2d322fea651e251002 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <data/value.h>
 #include <data/variable.h>
 #include <libpspp/array.h>
+#include <libpspp/cast.h>
 #include <libpspp/compiler.h>
 #include <libpspp/hash-functions.h>
 #include <libpspp/hmap.h>
+#include <libpspp/intern.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
 
 #include "xalloc.h"
 
-static struct atom *atom_create (const char *string);
-static void atom_destroy (struct atom *);
-static const char *atom_to_string (const struct atom *);
-
-/* Returns the label in VL.  The caller must not modify or free
-   the returned value. */
-const char *
-val_lab_get_label (const struct val_lab *vl)
-{
-  return atom_to_string (vl->label);
-}
-
 /* Creates and returns a new, empty set of value labels with the
    given WIDTH. */
 struct val_labs *
@@ -68,7 +58,7 @@ val_labs_clone (const struct val_labs *vls)
 
   copy = val_labs_create (vls->width);
   HMAP_FOR_EACH (label, struct val_lab, node, &vls->labels)
-    val_labs_add (copy, &label->value, atom_to_string (label->label));
+    val_labs_add (copy, &label->value, label->label);
   return copy;
 }
 
@@ -123,11 +113,18 @@ val_labs_clear (struct val_labs *vls)
     {
       hmap_delete (&vls->labels, &label->node);
       value_destroy (&label->value, vls->width);
-      atom_destroy (label->label);
+      intern_unref (label->label);
       free (label);
     }
 }
 
+/* Returns the width of VLS. */
+int
+val_labs_get_width (const struct val_labs *vls)
+{
+  return vls->width;
+}
+
 /* Returns the number of value labels in VLS.
    Returns 0 if VLS is null. */
 size_t
@@ -141,9 +138,8 @@ do_add_val_lab (struct val_labs *vls, const union value *value,
                 const char *label)
 {
   struct val_lab *lab = xmalloc (sizeof *lab);
-  value_init (&lab->value, vls->width);
-  value_copy (&lab->value, value, vls->width);
-  lab->label = atom_create (label);
+  value_clone (&lab->value, value, vls->width);
+  lab->label = intern_new (label);
   hmap_insert (&vls->labels, &lab->node, value_hash (value, vls->width, 0));
 }
 
@@ -169,11 +165,11 @@ void
 val_labs_replace (struct val_labs *vls, const union value *value,
                   const char *label)
 {
-  struct val_lab *vl = (struct val_lab *) val_labs_lookup (vls, value);
+  struct val_lab *vl = val_labs_lookup (vls, value);
   if (vl != NULL)
     {
-      atom_destroy (vl->label);
-      vl->label = atom_create (label);
+      intern_unref (vl->label);
+      vl->label = intern_new (label);
     }
   else
     do_add_val_lab (vls, value, label);
@@ -181,12 +177,11 @@ val_labs_replace (struct val_labs *vls, const union value *value,
 
 /* Removes LABEL from VLS. */
 void
-val_labs_remove (struct val_labs *vls, const struct val_lab *label_)
+val_labs_remove (struct val_labs *vls, struct val_lab *label)
 {
-  struct val_lab *label = (struct val_lab *) label_;
   hmap_delete (&vls->labels, &label->node);
   value_destroy (&label->value, vls->width);
-  atom_destroy (label->label);
+  intern_unref (label->label);
   free (label);
 }
 
@@ -197,13 +192,13 @@ const char *
 val_labs_find (const struct val_labs *vls, const union value *value)
 {
   const struct val_lab *label = val_labs_lookup (vls, value);
-  return label ? atom_to_string (label->label) : NULL;
+  return label ? label->label : NULL;
 }
 
 /* Searches VLS for a value label for VALUE.  If successful,
    returns the value label; otherwise, returns a null pointer.
    Returns a null pointer if VLS is null. */
-const struct val_lab *
+struct val_lab *
 val_labs_lookup (const struct val_labs *vls, const union value *value)
 {
   if (vls != NULL)
@@ -270,89 +265,3 @@ val_labs_sorted (const struct val_labs *vls)
   else
     return NULL;
 }
-\f
-/* Atoms: reference-counted constant strings. */
-
-/* An atom. */
-struct atom
-  {
-    struct hmap_node node;      /* Hash map node. */
-    char *string;               /* String value. */
-    unsigned ref_count;         /* Number of references. */
-  };
-
-/* Hash table of atoms. */
-static struct hmap atoms = HMAP_INITIALIZER (atoms);
-
-static void free_atom (struct atom *atom);
-static void free_all_atoms (void);
-
-/* Creates and returns an atom for STRING. */
-static struct atom *
-atom_create (const char *string)
-{
-  static bool initialized;
-  struct atom *atom;
-  size_t hash;
-
-  assert (string != NULL);
-
-  if (!initialized)
-    {
-      initialized = true;
-      atexit (free_all_atoms);
-    }
-
-  hash = hash_string (string, 0);
-  HMAP_FOR_EACH_WITH_HASH (atom, struct atom, node, hash, &atoms)
-    if (!strcmp (atom->string, string))
-      {
-        atom->ref_count++;
-        return atom;
-      }
-
-  atom = xmalloc (sizeof *atom);
-  atom->string = xstrdup (string);
-  atom->ref_count = 1;
-  hmap_insert (&atoms, &atom->node, hash);
-  return atom;
-}
-
-/* Destroys ATOM. */
-static void
-atom_destroy (struct atom *atom)
-{
-  if (atom != NULL)
-    {
-      assert (atom->ref_count > 0);
-      atom->ref_count--;
-      if (atom->ref_count == 0)
-        {
-          hmap_delete (&atoms, &atom->node);
-          free_atom (atom);
-        }
-    }
-}
-
-/* Returns the string associated with ATOM. */
-static const char *
-atom_to_string (const struct atom *atom)
-{
-  return atom->string;
-}
-
-static void
-free_atom (struct atom *atom)
-{
-  free (atom->string);
-  free (atom);
-}
-
-static void
-free_all_atoms (void)
-{
-  struct atom *atom, *next;
-
-  HMAP_FOR_EACH_SAFE (atom, next, struct atom, node, &atoms)
-    free_atom (atom);
-}
index 53d13a389700eb586af6aaf14bd82bd540311235..d6f65d43c334d3b8657993af922cc26673cfe4a6 100644 (file)
@@ -38,7 +38,7 @@ struct val_lab
   {
     struct hmap_node node;      /* Node in hash map. */
     union value value;          /* The value being labeled. */
-    struct atom *label;         /* A ref-counted string. */
+    const char *label;          /* An interned string. */
   };
 
 /* Returns the value in VL.  The caller must not modify or free
@@ -52,7 +52,13 @@ static inline const union value *val_lab_get_value (const struct val_lab *vl)
   return &vl->value;
 }
 
-const char *val_lab_get_label (const struct val_lab *);
+/* Returns the label in VL.  The caller must not modify or free the returned
+   value. */
+static inline const char *
+val_lab_get_label (const struct val_lab *vl)
+{
+  return vl->label;
+}
 \f
 /* A set of value labels. */
 struct val_labs
@@ -70,7 +76,7 @@ size_t val_labs_count (const struct val_labs *);
 
 /* Looking up value labels. */
 const char *val_labs_find (const struct val_labs *, const union value *);
-const struct val_lab *val_labs_lookup (const struct val_labs *,
+struct val_lab *val_labs_lookup (const struct val_labs *,
                                        const union value *);
 
 /* Basic properties. */
@@ -82,7 +88,7 @@ void val_labs_set_width (struct val_labs *, int new_width);
 /* Adding value labels. */
 bool val_labs_add (struct val_labs *, const union value *, const char *);
 void val_labs_replace (struct val_labs *, const union value *, const char *);
-void val_labs_remove (struct val_labs *, const struct val_lab *);
+void val_labs_remove (struct val_labs *, struct val_lab *);
 
 /* Iterating through value labels. */
 const struct val_lab *val_labs_first (const struct val_labs *);
index 6dbecb11abfca8137bc8fdc763ffc1c0a8568bc2..422639b17819375f9f3619cdb8490e377468e730 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -211,6 +211,22 @@ value_init_pool (struct pool *pool, union value *value, int width)
     value->long_string = pool_alloc_unaligned (pool, width);
 }
 
+/* Same as value_clone(), except that memory for VALUE (if necessary) is
+   allocated from POOL and will be freed automatically when POOL is destroyed.
+
+   VALUE must not be freed manually by calling value_destroy().  If it needs to
+   be resized, it must be done using value_resize_pool() instead of
+   value_resize(). */
+void
+value_clone_pool (struct pool *pool,
+                  union value *value, const union value *src, int width)
+{
+  if (width > MAX_SHORT_STRING)
+    value->long_string = pool_clone_unaligned (pool, src->long_string, width);
+  else
+    *value = *src;
+}
+
 /* Same as value_resize, except that VALUE must have been
    allocated from POOL using value_init_pool.
 
index f9782e2d867d47028f134c4b406dbfd53313d68c..9205bc1a031feec0bee4d6858ca5af3b2e3d0b2e 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -51,6 +51,7 @@ union value
   };
 
 static inline void value_init (union value *, int width);
+static inline void value_clone (union value *, const union value *, int width);
 static inline bool value_needs_init (int width);
 static inline bool value_try_init (union value *, int width);
 static inline void value_destroy (union value *, int width);
@@ -80,6 +81,8 @@ static inline void value_swap (union value *, union value *);
 
 struct pool;
 void value_init_pool (struct pool *, union value *, int width);
+void value_clone_pool (struct pool *, union value *, const union value *,
+                       int width);
 void value_resize_pool (struct pool *, union value *,
                         int old_width, int new_width);
 \f
@@ -98,6 +101,17 @@ value_init (union value *v, int width)
     v->long_string = xmalloc (width);
 }
 
+/* Initializes V as a value of the given WIDTH, as with value_init(), and
+   copies SRC's value into V as its initial value. */
+static inline void
+value_clone (union value *v, const union value *src, int width)
+{
+  if (width <= MAX_SHORT_STRING)
+    *v = *src;
+  else
+    v->long_string = xmemdup (src->long_string, width);
+}
+
 /* Returns true if a value of the given WIDTH actually needs to
    have the value_init and value_destroy functions called, false
    if those functions are no-ops for values of the given WIDTH.
index b4552cf17e014a6a4044b25c129f03e752ff2ce5..809c564c86bbdf5e5c9375215a22a19a19feb636 100644 (file)
 
 struct dictionary ;
 
-/* Dictionary data stored in variable. */
+/* Binds a variable to a dictionary. */
 struct vardict_info
   {
-    int dict_index;     /* Dictionary index containing the variable. */
+    struct dictionary *dict;
+    struct variable *var;
+    struct hmap_node name_node; /* In struct dictionary's name_map. */
     int case_index;     /* Index into case of variable data. */
-    struct dictionary *dict;  /* The dictionary containing the variable */
   };
 
 /* Called by dictionary code, defined in variable.c. */
-const struct vardict_info *var_get_vardict (const struct variable *);
-void var_set_vardict (struct variable *, const struct vardict_info *);
+struct vardict_info *var_get_vardict (const struct variable *);
+void var_set_vardict (struct variable *, struct vardict_info *);
 bool var_has_vardict (const struct variable *);
 void var_clear_vardict (struct variable *);
 
-
 /* Called by variable.c, defined in dictionary.c. */
 void dict_var_changed (const struct variable *v);
 void dict_var_resized (const struct variable *v, int old_width);
 void dict_var_display_width_changed (const struct variable *v);
 
+int vardict_get_dict_index (const struct vardict_info *);
+
+static inline int
+vardict_get_case_index (const struct vardict_info *vardict)
+{
+  return vardict->case_index;
+}
+
+static inline struct dictionary *
+vardict_get_dictionary (const struct vardict_info *vardict)
+{
+  return vardict->dict;
+}
+
 #endif /* data/vardict.h */
index 5ebd6e41231186701f0ea933867f8a0ecd085aa9..9968d9f9fb4e6067219dd9f7ccef2cc15518b0d7 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@ struct variable
     bool leave;                 /* Leave value from case to case? */
 
     /* Data for use by containing dictionary. */
-    struct vardict_info vardict;
+    struct vardict_info *vardict;
 
     /* Used only for system and portable file input and output.
        See short-names.h. */
@@ -73,11 +73,6 @@ struct variable
     void *aux;
     void (*aux_dtor) (struct variable *);
 
-    /* Values of a categorical variable.  Procedures need
-       vectors with binary entries, so any variable of type ALPHA will
-       have its values stored here. */
-    struct cat_vals *obs_vals;
-
     /* Custom attributes. */
     struct attrset attributes;
   };
@@ -95,7 +90,7 @@ var_create (const char *name, int width)
   assert (width >= 0 && width <= MAX_STRING);
 
   v = xmalloc (sizeof *v);
-  v->vardict.dict_index = v->vardict.case_index = -1;
+  v->vardict = NULL;
   var_set_name (v, name);
   v->width = width;
   mv_init (&v->miss, width);
@@ -111,7 +106,6 @@ var_create (const char *name, int width)
   v->short_name_cnt = 0;
   v->aux = NULL;
   v->aux_dtor = NULL;
-  v->obs_vals = NULL;
   attrset_init (&v->attributes);
 
   return v;
@@ -126,8 +120,7 @@ var_create (const char *name, int width)
 
     - The new variable is not added to OLD_VAR's dictionary by
       default.  Use dict_clone_var, instead, to do that.
-
-    - Auxiliary data and obs_vals are not copied. */
+*/
 struct variable *
 var_clone (const struct variable *old_var)
 {
@@ -148,27 +141,6 @@ var_clone (const struct variable *old_var)
   return new_var;
 }
 
-/* Create a variable of the specified WIDTH to be used for
-   internal calculations only.  The variable is assigned a unique
-   dictionary index and a case index of CASE_IDX. */
-struct variable *
-var_create_internal (int case_idx, int width)
-{
-  struct variable *v = var_create ("$internal", width);
-  struct vardict_info vdi;
-  static int counter = INT_MAX / 2;
-
-  vdi.dict = NULL;
-  vdi.case_index = case_idx;
-  vdi.dict_index = counter++;
-  if (counter == INT_MAX)
-    counter = INT_MAX / 2;
-
-  var_set_vardict (v, &vdi);
-
-  return v;
-}
-
 /* Destroys variable V.
    V must not belong to a dictionary.  If it does, use
    dict_delete_var instead. */
@@ -177,13 +149,8 @@ var_destroy (struct variable *v)
 {
   if (v != NULL)
     {
-      if (var_has_vardict (v))
-       {
-         const struct vardict_info *vdi = var_get_vardict (v);
-         assert (vdi->dict == NULL);
-       }
+      assert (!var_has_vardict (v));
       mv_destroy (&v->miss);
-      cat_stored_values_destroy (v->obs_vals);
       var_clear_short_names (v);
       var_clear_aux (v);
       val_labs_destroy (v->val_labs);
@@ -207,7 +174,7 @@ var_get_name (const struct variable *v)
 void
 var_set_name (struct variable *v, const char *name)
 {
-  assert (v->vardict.dict_index == -1);
+  assert (!var_has_vardict (v));
   assert (var_is_plausible_name (name, false));
 
   str_copy_trunc (v->name, sizeof v->name, name);
@@ -223,8 +190,6 @@ var_is_valid_name (const char *name, bool issue_error)
   bool plausible;
   size_t length, i;
 
-  assert (name != NULL);
-
   /* Note that strlen returns number of BYTES, not the number of
      CHARACTERS */
   length = strlen (name);
@@ -270,8 +235,6 @@ var_is_plausible_name (const char *name, bool issue_error)
 {
   size_t length;
 
-  assert (name != NULL);
-
   /* Note that strlen returns number of BYTES, not the number of
      CHARACTERS */
   length = strlen (name);
@@ -589,10 +552,9 @@ var_append_value_name (const struct variable *v, const union value *value,
                       struct string *str)
 {
   const char *name = var_lookup_value_label (v, value);
-  const struct dictionary *dict = var_get_vardict (v)->dict;
   if (name == NULL)
     {
-      char *s = data_out (value, dict_get_encoding (dict), &v->print);
+      char *s = data_out (value, var_get_encoding (v), &v->print);
       ds_put_cstr (str, s);
       free (s);
     }
@@ -874,7 +836,6 @@ var_get_short_name (const struct variable *var, size_t idx)
 void
 var_set_short_name (struct variable *var, size_t idx, const char *short_name)
 {
-  assert (var != NULL);
   assert (short_name == NULL || var_is_plausible_name (short_name, false));
 
   /* Clear old short name numbered IDX, if any. */
@@ -925,8 +886,8 @@ var_clear_short_names (struct variable *v)
 size_t
 var_get_dict_index (const struct variable *v)
 {
-  assert (v->vardict.dict_index != -1);
-  return v->vardict.dict_index;
+  assert (var_has_vardict (v));
+  return vardict_get_dict_index (v->vardict);
 }
 
 /* Returns V's index within the case represented by its
@@ -936,8 +897,8 @@ var_get_dict_index (const struct variable *v)
 size_t
 var_get_case_index (const struct variable *v)
 {
-  assert (v->vardict.case_index != -1);
-  return v->vardict.case_index;
+  assert (var_has_vardict (v));
+  return vardict_get_case_index (v->vardict);
 }
 \f
 /* Returns V's auxiliary data, or a null pointer if none has been
@@ -956,7 +917,7 @@ void *
 var_attach_aux (const struct variable *v_,
                 void *aux, void (*aux_dtor) (struct variable *))
 {
-  struct variable *v = (struct variable *) v_ ; /* cast away const  */
+  struct variable *v = CONST_CAST (struct variable *, v_);
   assert (v->aux == NULL);
   assert (aux != NULL);
   v->aux = aux;
@@ -980,7 +941,6 @@ var_detach_aux (struct variable *v)
 void
 var_clear_aux (struct variable *v)
 {
-  assert (v != NULL);
   if (v->aux != NULL)
     {
       if (v->aux_dtor != NULL)
@@ -998,35 +958,6 @@ var_dtor_free (struct variable *v)
   free (v->aux);
 }
 \f
-/* Observed categorical values. */
-
-/* Returns V's observed categorical values,
-   which V must have. */
-struct cat_vals *
-var_get_obs_vals (const struct variable *v)
-{
-  assert (v->obs_vals != NULL);
-  return v->obs_vals;
-}
-
-/* Sets V's observed categorical values to CAT_VALS.
-   V becomes the owner of CAT_VALS. */
-void
-var_set_obs_vals (const struct variable *v_, struct cat_vals *cat_vals)
-{
-  struct variable *v = (struct variable *) v_ ; /* cast away const */
-  cat_stored_values_destroy (v->obs_vals);
-  v->obs_vals = cat_vals;
-}
-
-/* Returns true if V has observed categorical values,
-   false otherwise. */
-bool
-var_has_obs_vals (const struct variable *v)
-{
-  return v->obs_vals != NULL;
-}
-\f
 /* Returns variable V's attribute set.  The caller may examine or
    modify the attribute set, but must not destroy it.  Destroying
    V, or calling var_set_attributes() on V, will also destroy its
@@ -1034,7 +965,7 @@ var_has_obs_vals (const struct variable *v)
 struct attrset *
 var_get_attributes (const struct variable *v) 
 {
-  return (struct attrset *) &v->attributes;
+  return CONST_CAST (struct attrset *, &v->attributes);
 }
 
 /* Replaces variable V's attributes set by a copy of ATTRS. */
@@ -1052,33 +983,41 @@ var_has_attributes (const struct variable *v)
   return attrset_count (&v->attributes) > 0;
 }
 \f
+/* Returns the encoding of values of variable VAR.  (This is actually a
+   property of the dictionary.)  Returns null if no specific encoding has been
+   set.  */
+const char *
+var_get_encoding (const struct variable *var)
+{
+  return (var_has_vardict (var)
+          ? dict_get_encoding (vardict_get_dictionary (var->vardict))
+          : NULL);
+}
+\f
 /* Returns V's vardict structure. */
-const struct vardict_info *
+struct vardict_info *
 var_get_vardict (const struct variable *v)
 {
-  assert (var_has_vardict (v));
-  return &v->vardict;
+  return CONST_CAST (struct vardict_info *, v->vardict);
 }
 
 /* Sets V's vardict data to VARDICT. */
 void
-var_set_vardict (struct variable *v, const struct vardict_info *vardict)
+var_set_vardict (struct variable *v, struct vardict_info *vardict)
 {
-  assert (vardict->dict_index >= 0);
-  assert (vardict->case_index >= 0);
-  v->vardict = *vardict;
+  v->vardict = vardict;
 }
 
 /* Returns true if V has vardict data. */
 bool
 var_has_vardict (const struct variable *v)
 {
-  return v->vardict.dict_index != -1;
+  return v->vardict != NULL;
 }
 
 /* Clears V's vardict data. */
 void
 var_clear_vardict (struct variable *v)
 {
-  v->vardict.dict_index = v->vardict.case_index = -1;
+  v->vardict = NULL;
 }
index 0b619a497ed1eefa04a1dac97ec4be20afac4b80..524a6be2be0d73c60b376aeb510079f0ad512ea3 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -32,8 +32,6 @@ union value;
 struct variable *var_create (const char *name, int width);
 struct variable *var_clone (const struct variable *);
 void var_destroy (struct variable *);
-struct variable *var_create_internal (int case_idx, int width);
-
 
 /* Variable names. */
 #define VAR_NAME_LEN 64 /* Maximum length of variable name, in bytes. */
@@ -168,16 +166,14 @@ void var_clear_aux (struct variable *);
 void *var_detach_aux (struct variable *);
 void var_dtor_free (struct variable *);
 
-/* Observed categorical values. */
-struct cat_vals *var_get_obs_vals (const struct variable *);
-void var_set_obs_vals (const struct variable *, struct cat_vals *);
-bool var_has_obs_vals (const struct variable *);
-
 /* Custom attributes. */
 struct attrset *var_get_attributes (const struct variable *);
 void var_set_attributes (struct variable *, const struct attrset *);
 bool var_has_attributes (const struct variable *);
 
+/* Encoding. */
+const char *var_get_encoding (const struct variable *);
+
 /* Function types. */
 typedef bool var_predicate_func (const struct variable *);
 
index 4210b7fce45f8f05153f9fd4bd2cd28881255b01..3052b52353ca54416ffbb53f66c4354787bf6924 100644 (file)
@@ -13,9 +13,6 @@ include $(top_srcdir)/src/language/expressions/automake.mk
 noinst_LTLIBRARIES +=  src/language/liblanguage.la
 
 
-src_language_liblanguage_la_LIBADD = \
-       src/output/charts/libcharts.la
-
 src_language_liblanguage_la_SOURCES = \
        src/language/syntax-file.c \
        src/language/syntax-file.h \
index 32dba0b4f7cd0ca7760f18315e13ae0b845069a0..448fae7ea803463f11a54edbec50a23c816875a4 100644 (file)
 #include <ctype.h>
 #include <errno.h>
 #include <unistd.h>
+#if HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#if HAVE_READLINE
+#include <readline/readline.h>
+#endif
 
 #include <data/casereader.h>
 #include <data/dictionary.h>
 #include <libpspp/message.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
-#include <output/manager.h>
-#include <output/table.h>
 #include <libpspp/getl.h>
-
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-#if HAVE_READLINE
-#include <readline/readline.h>
-#endif
+#include <output/text-item.h>
 
 #include "xalloc.h"
 #include "xmalloca.h"
@@ -143,11 +140,7 @@ cmd_parse_in_state (struct lexer *lexer, struct dataset *ds,
 {
   int result;
 
-  som_new_series ();
-
   result = do_parse_command (lexer, ds, state);
-  if (cmd_result_is_failure (result))
-    lex_discard_rest_of_command (lexer);
 
   assert (!proc_is_open (ds));
   unset_cmd_algorithm ();
@@ -175,8 +168,9 @@ static enum cmd_result
 do_parse_command (struct lexer *lexer,
                  struct dataset *ds, enum cmd_state state)
 {
-  const struct command *command;
+  const struct command *command = NULL;
   enum cmd_result result;
+  bool opened = false;
 
   /* Read the command's first token. */
   prompt_set_style (PROMPT_FIRST);
@@ -203,53 +197,54 @@ do_parse_command (struct lexer *lexer,
       result = CMD_FAILURE;
       goto finish;
     }
-  else if (command->function == NULL)
+  text_item_submit (text_item_create (TEXT_ITEM_COMMAND_OPEN, command->name));
+  opened = true;
+
+  if (command->function == NULL)
     {
       msg (SE, _("%s is not yet implemented."), command->name);
       result = CMD_NOT_IMPLEMENTED;
-      goto finish;
     }
   else if ((command->flags & F_TESTING) && !settings_get_testing_mode ())
     {
       msg (SE, _("%s may be used only in testing mode."), command->name);
       result = CMD_FAILURE;
-      goto finish;
     }
   else if ((command->flags & F_ENHANCED) && settings_get_syntax () != ENHANCED)
     {
       msg (SE, _("%s may be used only in enhanced syntax mode."),
            command->name);
       result = CMD_FAILURE;
-      goto finish;
     }
   else if (!in_correct_state (command, state))
     {
       report_state_mismatch (command, state);
       result = CMD_FAILURE;
-      goto finish;
     }
-
-  /* Execute command. */
-  msg_set_command_name (command->name);
-  tab_set_command_name (command->name);
-  result = command->function (lexer, ds);
-  tab_set_command_name (NULL);
-  msg_set_command_name (NULL);
+  else
+    {
+      /* Execute command. */
+      result = command->function (lexer, ds);
+    }
 
   assert (cmd_result_is_valid (result));
 
  finish:
-  if ( cmd_result_is_failure (result))
+  if (cmd_result_is_failure (result))
     {
-      const struct source_stream *cs = lex_get_source_stream (lexer);
-
-      if ( source_stream_current_error_mode (cs) == ERRMODE_STOP )
+      lex_discard_rest_of_command (lexer);
+      if (source_stream_current_error_mode (
+            lex_get_source_stream (lexer)) == ERRMODE_STOP )
        {
          msg (MW, _("Error encountered while ERROR=STOP is effective."));
          result = CMD_CASCADING_FAILURE;
        }
     }
 
+  if (opened)
+    text_item_submit (text_item_create (TEXT_ITEM_COMMAND_CLOSE,
+                                        command->name));
+
   return result;
 }
 
index 066ecf92c4c7a28a483a7a5f0bdae136006b5b02..80b471b6a80c14d35a0960a8584ae41c351b09f6 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -72,6 +72,7 @@ DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "IF", cmd_if)
 DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "LEAVE", cmd_leave)
 DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "LOOP", cmd_loop)
 DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "MISSING VALUES", cmd_missing_values)
+DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "MRSETS", cmd_mrsets)
 DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "NUMERIC", cmd_numeric)
 DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "PRINT EJECT", cmd_print_eject)
 DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "PRINT FORMATS", cmd_print_formats)
@@ -106,6 +107,7 @@ DEF_CMD (S_DATA, 0, "DESCRIPTIVES", cmd_descriptives)
 DEF_CMD (S_DATA, 0, "EXAMINE", cmd_examine)
 DEF_CMD (S_DATA, 0, "EXECUTE", cmd_execute)
 DEF_CMD (S_DATA, 0, "EXPORT", cmd_export)
+DEF_CMD (S_DATA, 0, "FACTOR", cmd_factor)
 DEF_CMD (S_DATA, 0, "FILTER", cmd_filter)
 DEF_CMD (S_DATA, 0, "FLIP", cmd_flip)
 DEF_CMD (S_DATA, 0, "FREQUENCIES", cmd_frequencies)
@@ -175,7 +177,6 @@ UNIMPL_CMD ("DETECTANOMALY", "Find unusual cases")
 UNIMPL_CMD ("DISCRIMINANT", "Linear discriminant analysis")
 UNIMPL_CMD ("EDIT", "obsolete")
 UNIMPL_CMD ("END FILE TYPE", "Ends complex data input")
-UNIMPL_CMD ("FACTOR", "Factor analysis")
 UNIMPL_CMD ("FILE TYPE", "Complex data input")
 UNIMPL_CMD ("FIT", "Goodness of Fit")
 UNIMPL_CMD ("GENLOG", "Categorical model fitting")
@@ -202,7 +203,6 @@ UNIMPL_CMD ("MODEL CLOSE ", "Close server connection")
 UNIMPL_CMD ("MODEL HANDLE", "Define server connection")
 UNIMPL_CMD ("MODEL LIST ", "Show existing models")
 UNIMPL_CMD ("MODEL NAME ", "Specify model label")
-UNIMPL_CMD ("MRSETS", "Multiple response sets")
 UNIMPL_CMD ("MULTIPLE CORRESPONDENCE", "Multiple correspondence analysis")
 UNIMPL_CMD ("MULT RESPONSE", "Multiple reponse analysis")
 UNIMPL_CMD ("MVA", "Missing value analysis")
index 32847bb4a9298bd100f0cb80e8489097adc7d8ca..cb608f769d5d4b91adbb5c21fa5ae3d4403a2c08 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
 #include <language/command.h>
 #include <language/lexer/lexer.h>
 #include <language/lexer/variable-parser.h>
+#include <libpspp/cast.h>
 #include <libpspp/ll.h>
 #include <libpspp/message.h>
 #include <libpspp/misc.h>
@@ -512,10 +513,10 @@ find_substitution (struct repeat_block *block, struct substring name)
 /* Makes appropriate DO REPEAT macro substitutions within the
    repeated lines. */
 static void
-do_repeat_filter (struct getl_interface *block_,
-                  struct string *line)
+do_repeat_filter (struct getl_interface *interface, struct string *line)
 {
-  struct repeat_block *block = (struct repeat_block *) block_;
+  struct repeat_block *block
+    = UP_CAST (interface, struct repeat_block, parent);
   bool in_apos, in_quote, dot;
   struct substring input;
   struct string output;
@@ -557,7 +558,8 @@ do_repeat_filter (struct getl_interface *block_,
 static struct repeat_line *
 current_line (const struct getl_interface *interface)
 {
-  struct repeat_block *block = (struct repeat_block *) interface;
+  struct repeat_block *block
+    = UP_CAST (interface, struct repeat_block, parent);
   return (block->cur_line != ll_null (&block->lines)
           ? ll_data (block->cur_line, struct repeat_line, ll)
           : NULL);
@@ -570,7 +572,8 @@ static bool
 do_repeat_read  (struct getl_interface *interface,
                  struct string *output)
 {
-  struct repeat_block *block = (struct repeat_block *) interface;
+  struct repeat_block *block
+    = UP_CAST (interface, struct repeat_block, parent);
   struct repeat_line *line;
 
   block->cur_line = ll_next (block->cur_line);
@@ -591,9 +594,10 @@ do_repeat_read  (struct getl_interface *interface,
 /* Frees a DO REPEAT block.
    Called by getl to close out the DO REPEAT block. */
 static void
-do_repeat_close (struct getl_interface *block_)
+do_repeat_close (struct getl_interface *interface)
 {
-  struct repeat_block *block = (struct repeat_block *) block_;
+  struct repeat_block *block
+    = UP_CAST (interface, struct repeat_block, parent);
   pool_destroy (block->pool);
 }
 
index d4b9bf58905cde762b12510d4506f797630918cb..fd57beced05ff7f45630294b802baf7aa9daf325 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -562,7 +562,7 @@ merge_dictionary (struct dictionary *const m, struct comb_file *f)
                 ds_put_format (&s, _("In an earlier file, %s was a string "
                                      "variable with width %d."),
                                var_name, var_get_width (mv));
-              msg (SE, ds_cstr (&s));
+              msg (SE, "%s", ds_cstr (&s));
               ds_destroy (&s);
               return false;
             }
@@ -575,7 +575,7 @@ merge_dictionary (struct dictionary *const m, struct comb_file *f)
             var_set_label (mv, var_get_label (dv));
         }
       else
-        mv = dict_clone_var_assert (m, dv, var_get_name (dv));
+        mv = dict_clone_var_assert (m, dv);
     }
 
   return true;
index 020f8e4c7e5a20a0caabc4add9f228f98937d1b6..eb578e270d3e9fee03e5b9c50e3fb688abad7b2f 100644 (file)
@@ -31,7 +31,7 @@
 #include <language/data-io/data-reader.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include "xalloc.h"
 
@@ -644,8 +644,7 @@ dump_fixed_table (const struct data_parser *parser,
   struct tab_table *t;
   size_t i;
 
-  t = tab_create (4, parser->field_cnt + 1, 0);
-  tab_columns (t, TAB_COL_DOWN, 1);
+  t = tab_create (4, parser->field_cnt + 1);
   tab_headers (t, 0, 0, 1, 0);
   tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Variable"));
   tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Record"));
@@ -653,7 +652,6 @@ dump_fixed_table (const struct data_parser *parser,
   tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Format"));
   tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 3, parser->field_cnt);
   tab_hline (t, TAL_2, 0, 3, 1);
-  tab_dim (t, tab_natural_dimensions, NULL);
 
   for (i = 0; i < parser->field_cnt; i++)
     {
@@ -685,14 +683,12 @@ dump_delimited_table (const struct data_parser *parser,
   struct tab_table *t;
   size_t i;
 
-  t = tab_create (2, parser->field_cnt + 1, 0);
-  tab_columns (t, TAB_COL_DOWN, 1);
+  t = tab_create (2, parser->field_cnt + 1);
   tab_headers (t, 0, 0, 1, 0);
   tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Variable"));
   tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Format"));
   tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 1, parser->field_cnt);
   tab_hline (t, TAL_2, 0, 1, 1);
-  tab_dim (t, tab_natural_dimensions, NULL);
 
   for (i = 0; i < parser->field_cnt; i++)
     {
index 6f620a6a948341a0dfa5db150763d20f51e92284..74e4c5692b1b83a95987bc1e16e7b92aaeebc500 100644 (file)
@@ -34,6 +34,7 @@
 #include <language/lexer/lexer.h>
 #include <language/prompt.h>
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 #include <libpspp/integer-format.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
@@ -140,7 +141,7 @@ dfm_open_reader (struct file_handle *fh, struct lexer *lexer)
   if (fh_get_referent (fh) != FH_REF_INLINE)
     {
       struct stat s;
-      r->where.file_name = fh_get_file_name (fh);
+      r->where.file_name = CONST_CAST (char *, fh_get_file_name (fh));
       r->where.line_number = 0;
       r->file = fn_open (fh_get_file_name (fh),
                          fh_get_mode (fh) == FH_MODE_TEXT ? "r" : "rb");
index c3f9b0881b959fac98a3cffac628662ffe143299..60f51b523b0c0250abbe4ae43753880be464ff4b 100644 (file)
 #include <data/data-out.h>
 #include <data/format.h>
 #include <data/procedure.h>
-#include <data/short-names.h>
+#include <data/subcase.h>
 #include <data/variable.h>
 #include <language/command.h>
 #include <language/dictionary/split-file.h>
 #include <language/lexer/lexer.h>
 #include <libpspp/compiler.h>
-#include <libpspp/message.h>
+#include <libpspp/ll.h>
 #include <libpspp/message.h>
 #include <libpspp/misc.h>
-#include <output/htmlP.h>
-#include <output/manager.h>
-#include <output/output.h>
-#include <output/table.h>
+#include <output/tab.h>
+#include <output/table-item.h>
 
 #include "minmax.h"
 #include "xalloc.h"
      *variables=varlist("PV_NO_SCRATCH");
      cases=:from n:first,"%s>0"/by n:step,"%s>0"/ *to n:last,"%s>0";
      +format=numbering:numbered/!unnumbered,
-             wrap:!wrap/single,
-             weight:weight/!noweight.
+             wrap:!wrap/single.
 */
 /* (declarations) */
 /* (functions) */
 
-/* Layout for one output driver. */
-struct list_ext
-  {
-    int type;          /* 0=Values and labels fit across the page. */
-    size_t n_vertical; /* Number of labels to list vertically. */
-    size_t header_rows;        /* Number of header rows. */
-    char **header;     /* The header itself. */
-  };
-
 /* Parsed command. */
 static struct cmd_list cmd;
 
-/* Line buffer. */
-static struct string line_buffer;
-
-/* TTY-style output functions. */
-static unsigned n_lines_remaining (struct outp_driver *d);
-static unsigned n_chars_width (struct outp_driver *d);
-static void write_line (struct outp_driver *d, const char *s);
-
-/* Other functions. */
-static void list_case (const struct ccase *, casenumber case_idx,
-                       const struct dataset *);
-static void determine_layout (void);
-static void clean_up (void);
-static void write_header (struct outp_driver *);
-static void write_all_headers (struct casereader *, const struct dataset*);
-
-/* Returns the number of text lines that can fit on the remainder of
-   the page. */
-static inline unsigned
-n_lines_remaining (struct outp_driver *d)
-{
-  int diff;
-
-  diff = d->length - d->cp_y;
-  return (diff > 0) ? (diff / d->font_height) : 0;
-}
-
-/* Returns the number of fixed-width character that can fit across the
-   page. */
-static inline unsigned
-n_chars_width (struct outp_driver *d)
-{
-  return d->width / d->fixed_width;
-}
-
-/* Writes the line S at the current position and advances to the next
-   line.  */
-static void
-write_line (struct outp_driver *d, const char *s)
-{
-  struct outp_text text;
-
-  assert (d->cp_y + d->font_height <= d->length);
-  text.font = OUTP_FIXED;
-  text.justification = OUTP_LEFT;
-  text.string = ss_cstr (s);
-  text.x = d->cp_x;
-  text.y = d->cp_y;
-  text.h = text.v = INT_MAX;
-  d->class->text_draw (d, &text);
-  d->cp_x = 0;
-  d->cp_y += d->font_height;
-}
-
 /* Parses and executes the LIST procedure. */
 int
 cmd_list (struct lexer *lexer, struct dataset *ds)
 {
   struct dictionary *dict = dataset_dict (ds);
-  struct variable *casenum_var = NULL;
   struct casegrouper *grouper;
   struct casereader *group;
-  casenumber case_idx;
+  struct subcase sc;
+  size_t i;
   bool ok;
 
   if (!parse_list (lexer, ds, &cmd, NULL))
@@ -187,584 +121,65 @@ cmd_list (struct lexer *lexer, struct dataset *ds)
       cmd.step = 1;
     }
 
-  /* Weighting variable. */
-  if (cmd.weight == LST_WEIGHT)
-    {
-      if (dict_get_weight (dict) != NULL)
-       {
-         size_t i;
+  subcase_init_empty (&sc);
+  for (i = 0; i < cmd.n_variables; i++)
+    subcase_add_var (&sc, cmd.v_variables[i], SC_ASCEND);
 
-         for (i = 0; i < cmd.n_variables; i++)
-           if (cmd.v_variables[i] == dict_get_weight (dict))
-             break;
-         if (i >= cmd.n_variables)
-           {
-             /* Add the weight variable to the end of the variable list. */
-             cmd.n_variables++;
-             cmd.v_variables = xnrealloc (cmd.v_variables, cmd.n_variables,
-                                           sizeof *cmd.v_variables);
-             cmd.v_variables[cmd.n_variables - 1]
-                = dict_get_weight (dict);
-           }
-       }
-      else
-       msg (SW, _("`/FORMAT WEIGHT' specified, but weighting is not on."));
-    }
-
-  /* Case number. */
-  if (cmd.numbering == LST_NUMBERED)
+  grouper = casegrouper_create_splits (proc_open (ds), dict);
+  while (casegrouper_get_next_group (grouper, &group))
     {
-      /* Initialize the case-number variable. */
-      int width = cmd.last == LONG_MAX ? 5 : intlog10 (cmd.last);
-      struct fmt_spec format = fmt_for_output (FMT_F, width, 0);
-      casenum_var = var_create ("Case#", 0);
-      var_set_both_formats (casenum_var, &format);
-
-      /* Add the weight variable at the beginning of the variable list. */
-      cmd.n_variables++;
-      cmd.v_variables = xnrealloc (cmd.v_variables,
-                                   cmd.n_variables, sizeof *cmd.v_variables);
-      memmove (&cmd.v_variables[1], &cmd.v_variables[0],
-              (cmd.n_variables - 1) * sizeof *cmd.v_variables);
-      cmd.v_variables[0] = casenum_var;
-    }
-
-  determine_layout ();
-
-  case_idx = 0;
-  for (grouper = casegrouper_create_splits (proc_open (ds), dict);
-       casegrouper_get_next_group (grouper, &group);
-       casereader_destroy (group))
-    {
-      struct ccase *c;
-
-      write_all_headers (group, ds);
-      for (; (c = casereader_read (group)) != NULL; case_unref (c))
+      struct ccase *ccase;
+      struct table *t;
+
+      group = casereader_project (group, &sc);
+      if (cmd.numbering == LST_NUMBERED)
+        group = casereader_create_arithmetic_sequence (group, 1, 1);
+      group = casereader_select (group, cmd.first - 1,
+                                 (cmd.last != LONG_MAX ? cmd.last
+                                  : CASENUMBER_MAX), cmd.step);
+
+      ccase = casereader_peek (group, 0);
+      if (ccase != NULL)
         {
-          case_idx++;
-          if (case_idx >= cmd.first && case_idx <= cmd.last
-              && (case_idx - cmd.first) % cmd.step == 0)
-            list_case (c, case_idx, ds);
+          output_split_file_values (ds, ccase);
+          case_unref (ccase);
         }
-    }
-  ok = casegrouper_destroy (grouper);
-  ok = proc_commit (ds) && ok;
-
-  ds_destroy(&line_buffer);
-
-  clean_up ();
-
-  var_destroy (casenum_var);
-
-  return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
-}
 
-/* Writes headers to all devices.  This is done at the beginning of
-   each SPLIT FILE group. */
-static void
-write_all_headers (struct casereader *input, const struct dataset *ds)
-{
-  struct outp_driver *d;
-  struct ccase *c;
-
-  c = casereader_peek (input, 0);
-  if (c == NULL)
-    return;
-  output_split_file_values (ds, c);
-  case_unref (c);
-
-  for (d = outp_drivers (NULL); d; d = outp_drivers (d))
-    {
-      if (!d->class->special)
-       {
-         d->cp_y += d->font_height;            /* Blank line. */
-         write_header (d);
-       }
-      else if (d->class == &html_class)
-       {
-         struct html_driver_ext *x = d->ext;
-
-         fputs ("<TABLE BORDER=1>\n  <TR>\n", x->file);
-
-         {
-           size_t i;
+      if (cmd.numbering == LST_NUMBERED)
+        {
+          struct fmt_spec fmt;
+          size_t col;
+          int width;
 
-           for (i = 0; i < cmd.n_variables; i++)
-             fprintf (x->file, "    <TH><EM>%s</EM></TH>\n",
-                      var_get_name (cmd.v_variables[i]));
-         }
+          width = cmd.last == LONG_MAX ? 5 : intlog10 (cmd.last);
+          fmt = fmt_for_output (FMT_F, width, 0);
+          col = caseproto_get_n_widths (casereader_get_proto (group)) - 1;
 
-         fputs ("  </TR>\n", x->file);
-       }
+          t = table_from_casereader (group, col, _("Case Number"), &fmt);
+        }
       else
-       NOT_REACHED ();
-    }
-}
-
-/* Writes the headers.  Some of them might be vertical; most are
-   probably horizontal. */
-static void
-write_header (struct outp_driver *d)
-{
-  struct list_ext *prc = d->prc;
-
-  if (!prc->header_rows)
-    return;
-
-  if (n_lines_remaining (d) < prc->header_rows + 1)
-    {
-      outp_eject_page (d);
-      assert (n_lines_remaining (d) >= prc->header_rows + 1);
-    }
-
-  /* Design the header. */
-  if (!prc->header)
-    {
-      size_t i;
-      size_t x;
-
-      /* Allocate, initialize header. */
-      prc->header = xnmalloc (prc->header_rows, sizeof *prc->header);
-      {
-       int w = n_chars_width (d);
-       for (i = 0; i < prc->header_rows; i++)
-         {
-           prc->header[i] = xmalloc (w + 1);
-           memset (prc->header[i], ' ', w);
-         }
-      }
-
-      /* Put in vertical names. */
-      for (i = x = 0; i < prc->n_vertical; i++)
-       {
-         const struct variable *v = cmd.v_variables[i];
-          const char *name = var_get_name (v);
-          size_t name_len = strlen (name);
-          const struct fmt_spec *print = var_get_print_format (v);
-         size_t j;
-
-         memset (&prc->header[prc->header_rows - 1][x], '-', print->w);
-         x += print->w - 1;
-         for (j = 0; j < name_len; j++)
-           prc->header[name_len - j - 1][x] = name[j];
-         x += 2;
-       }
-
-      /* Put in horizontal names. */
-      for (; i < cmd.n_variables; i++)
-       {
-         const struct variable *v = cmd.v_variables[i];
-          const char *name = var_get_name (v);
-          size_t name_len = strlen (name);
-          const struct fmt_spec *print = var_get_print_format (v);
-
-         memset (&prc->header[prc->header_rows - 1][x], '-',
-                 MAX (print->w, (int) name_len));
-         if ((int) name_len < print->w)
-           x += print->w - name_len;
-         memcpy (&prc->header[0][x], name, name_len);
-         x += name_len + 1;
-       }
-
-      /* Add null bytes. */
-      for (i = 0; i < prc->header_rows; i++)
-       {
-         for (x = n_chars_width (d); x >= 1; x--)
-           if (prc->header[i][x - 1] != ' ')
-             {
-               prc->header[i][x] = 0;
-               break;
-             }
-         assert (x);
-       }
-    }
-
-  /* Write out the header, in back-to-front order except for the last line. */
-  if (prc->header_rows >= 2)
-    {
-      size_t i;
-
-      for (i = prc->header_rows - 1; i-- != 0; )
-        write_line (d, prc->header[i]);
-    }
-  write_line (d, prc->header[prc->header_rows - 1]);
-}
-
-
-/* Frees up all the memory we've allocated. */
-static void
-clean_up (void)
-{
-  struct outp_driver *d;
-
-  for (d = outp_drivers (NULL); d; d = outp_drivers (d))
-    if (d->class->special == 0)
-      {
-       struct list_ext *prc = d->prc;
-       size_t i;
+        t = NULL;
 
-       if (prc->header)
-         {
-           for (i = 0; i < prc->header_rows; i++)
-             free (prc->header[i]);
-           free (prc->header);
-         }
-       free (prc);
-      }
-    else if (d->class == &html_class)
-      {
-       if (d->page_open)
-         {
-           struct html_driver_ext *x = d->ext;
-
-           fputs ("</TABLE>\n", x->file);
-         }
-      }
-    else
-      NOT_REACHED ();
-
-  free (cmd.v_variables);
-}
-
-/* Writes string STRING at the current position.  If the text would
-   fall off the side of the page, then advance to the next line,
-   indenting by amount INDENT. */
-static void
-write_varname (struct outp_driver *d, char *string, int indent)
-{
-  struct outp_text text;
-  int width;
-
-  if (d->cp_x + outp_string_width (d, string, OUTP_FIXED) > d->width)
-    {
-      d->cp_y += d->font_height;
-      if (d->cp_y + d->font_height > d->length)
-       outp_eject_page (d);
-      d->cp_x = indent;
-    }
-
-  text.font = OUTP_FIXED;
-  text.justification = OUTP_LEFT;
-  text.string = ss_cstr (string);
-  text.x = d->cp_x;
-  text.y = d->cp_y;
-  text.h = text.v = INT_MAX;
-  d->class->text_draw (d, &text);
-  d->class->text_metrics (d, &text, &width, NULL);
-  d->cp_x += width;
-}
-
-/* When we can't fit all the values across the page, we write out all
-   the variable names just once.  This is where we do it. */
-static void
-write_fallback_headers (struct outp_driver *d)
-{
-  const int max_width = n_chars_width(d) - 10;
-
-  int index = 0;
-  int width = 0;
-  int line_number = 0;
-
-  const char *Line = _("Line");
-  char *leader = xmalloca (strlen (Line)
-                           + INT_STRLEN_BOUND (line_number) + 1 + 1);
-
-  while (index < cmd.n_variables)
-    {
-      struct outp_text text;
-      int leader_width;
-
-      /* Ensure that there is enough room for a line of text. */
-      if (d->cp_y + d->font_height > d->length)
-       outp_eject_page (d);
-
-      /* The leader is a string like `Line 1: '.  Write the leader. */
-      sprintf (leader, "%s %d:", Line, ++line_number);
-      text.font = OUTP_FIXED;
-      text.justification = OUTP_LEFT;
-      text.string = ss_cstr (leader);
-      text.x = 0;
-      text.y = d->cp_y;
-      text.h = text.v = INT_MAX;
-      d->class->text_draw (d, &text);
-      d->class->text_metrics (d, &text, &leader_width, NULL);
-      d->cp_x = leader_width;
-
-      goto entry;
-      do
-       {
-         width++;
-
-       entry:
-         {
-           int var_width = var_get_print_format (cmd.v_variables[index])->w;
-           if (width + var_width > max_width && width != 0)
-             {
-               width = 0;
-               d->cp_x = 0;
-               d->cp_y += d->font_height;
-               break;
-             }
-           width += var_width;
-         }
-
-         {
-           char varname[VAR_NAME_LEN + 2];
-           snprintf (varname, sizeof varname,
-                      " %s", var_get_name (cmd.v_variables[index]));
-           write_varname (d, varname, leader_width);
-         }
-       }
-      while (++index < cmd.n_variables);
-
-    }
-  d->cp_x = 0;
-  d->cp_y += d->font_height;
-
-  freea (leader);
-}
-
-/* There are three possible layouts for the LIST procedure:
-
-   1. If the values and their variables' name fit across the page,
-   then they are listed across the page in that way.
-
-   2. If the values can fit across the page, but not the variable
-   names, then as many variable names as necessary are printed
-   vertically to compensate.
-
-   3. If not even the values can fit across the page, the variable
-   names are listed just once, at the beginning, in a compact format,
-   and the values are listed with a variable name label at the
-   beginning of each line for easier reference.
-
-   This is complicated by the fact that we have to do all this for
-   every output driver, not just once.  */
-static void
-determine_layout (void)
-{
-  struct outp_driver *d;
-
-  /* This is the largest page width of any driver, so we can tell what
-     size buffer to allocate. */
-  int largest_page_width = 0;
-
-  for (d = outp_drivers (NULL); d; d = outp_drivers (d))
-    {
-      size_t column;   /* Current column. */
-      int width;       /* Accumulated width. */
-      int height;       /* Height of vertical names. */
-      int max_width;   /* Page width. */
-
-      struct list_ext *prc;
-
-      if (d->class == &html_class)
-       continue;
-
-      assert (d->class->special == 0);
-
-      outp_open_page (d);
-
-      max_width = n_chars_width (d);
-      largest_page_width = MAX (largest_page_width, max_width);
-
-      prc = d->prc = xmalloc (sizeof *prc);
-      prc->type = 0;
-      prc->n_vertical = 0;
-      prc->header = NULL;
-
-      /* Try layout #1. */
-      for (width = cmd.n_variables - 1, column = 0; column < cmd.n_variables; column++)
-       {
-         const struct variable *v = cmd.v_variables[column];
-          int fmt_width = var_get_print_format (v)->w;
-          int name_len = strlen (var_get_name (v));
-         width += MAX (fmt_width, name_len);
-       }
-      if (width <= max_width)
-       {
-         prc->header_rows = 2;
-         continue;
-       }
-
-      /* Try layout #2. */
-      for (width = cmd.n_variables - 1, height = 0, column = 0;
-          column < cmd.n_variables && width <= max_width;
-          column++)
+      for (i = 0; i < cmd.n_variables; i++)
         {
-          const struct variable *v = cmd.v_variables[column];
-          int fmt_width = var_get_print_format (v)->w;
-          size_t name_len = strlen (var_get_name (v));
-          width += fmt_width;
-          if (name_len > height)
-            height = name_len;
-        }
-
-      /* If it fit then we need to determine how many labels can be
-         written horizontally. */
-      if (width <= max_width && height <= SHORT_NAME_LEN)
-       {
-#ifndef NDEBUG
-         prc->n_vertical = SIZE_MAX;
-#endif
-         for (column = cmd.n_variables; column-- != 0; )
-           {
-             const struct variable *v = cmd.v_variables[column];
-              int name_len = strlen (var_get_name (v));
-              int fmt_width = var_get_print_format (v)->w;
-             int trial_width = width - fmt_width + MAX (fmt_width, name_len);
-             if (trial_width > max_width)
-               {
-                 prc->n_vertical = column + 1;
-                 break;
-               }
-             width = trial_width;
-           }
-         assert (prc->n_vertical != SIZE_MAX);
+          const struct variable *var = cmd.v_variables[i];
+          struct table *c;
 
-         prc->n_vertical = cmd.n_variables;
-         /* Finally determine the length of the headers. */
-         for (prc->header_rows = 0, column = 0;
-              column < prc->n_vertical;
-              column++)
-            {
-              const struct variable *var = cmd.v_variables[column];
-              size_t name_len = strlen (var_get_name (var));
-              prc->header_rows = MAX (prc->header_rows, name_len);
-            }
-         prc->header_rows++;
-         continue;
-       }
+          c = table_from_casereader (group, i, var_get_name (var),
+                                     var_get_print_format (var));
+          t = table_hpaste (t, c);
+        }
 
-      /* Otherwise use the ugly fallback listing format. */
-      prc->type = 1;
-      prc->header_rows = 0;
+      casereader_destroy (group);
 
-      d->cp_y += d->font_height;
-      write_fallback_headers (d);
-      d->cp_y += d->font_height;
+      table_item_submit (table_item_create (t, "Data List"));
     }
+  ok = casegrouper_destroy (grouper);
+  ok = proc_commit (ds) && ok;
 
-  ds_init_empty (&line_buffer);
-}
-
-/* Writes case C to output. */
-static void
-list_case (const struct ccase *c, casenumber case_idx,
-           const struct dataset *ds)
-{
-  struct dictionary *dict = dataset_dict (ds);
-  struct outp_driver *d;
-
-  for (d = outp_drivers (NULL); d; d = outp_drivers (d))
-    if (d->class->special == 0)
-      {
-       const struct list_ext *prc = d->prc;
-       const int max_width = n_chars_width (d);
-       int column;
-
-       if (!prc->header_rows)
-         {
-           ds_put_format(&line_buffer, "%8s: ",
-                          var_get_name (cmd.v_variables[0]));
-         }
-
-
-       for (column = 0; column < cmd.n_variables; column++)
-         {
-           const struct variable *v = cmd.v_variables[column];
-            const struct fmt_spec *print = var_get_print_format (v);
-           int width;
-
-           if (prc->type == 0 && column >= prc->n_vertical)
-              {
-                int name_len = strlen (var_get_name (v));
-                width = MAX (name_len, print->w);
-              }
-           else
-             width = print->w;
-
-           if (width + ds_length(&line_buffer) > max_width &&
-               ds_length(&line_buffer) != 0)
-             {
-               if (!n_lines_remaining (d))
-                 {
-                   outp_eject_page (d);
-                   write_header (d);
-                 }
-
-               write_line (d, ds_cstr (&line_buffer));
-               ds_clear(&line_buffer);
-
-               if (!prc->header_rows)
-                  ds_put_format (&line_buffer, "%8s: ", var_get_name (v));
-             }
-
-           if (width > print->w)
-              ds_put_char_multiple(&line_buffer, ' ', width - print->w);
-
-            if (fmt_is_string (print->type)
-                || dict_contains_var (dict, v))
-             {
-               char *s = data_out (case_data (c, v), dict_get_encoding (dict), print);
-               ds_put_cstr (&line_buffer, s);
-               free (s);
-             }
-            else
-              {
-               char *s;
-                union value case_idx_value;
-                case_idx_value.f = case_idx;
-                s = data_out (&case_idx_value, dict_get_encoding (dict), print);
-               ds_put_cstr (&line_buffer, s);
-               free (s);
-              }
-
-           ds_put_char (&line_buffer, ' ');
-         }
-
-       if (!n_lines_remaining (d))
-         {
-           outp_eject_page (d);
-           write_header (d);
-         }
-
-       write_line (d, ds_cstr (&line_buffer));
-       ds_clear(&line_buffer);
-      }
-    else if (d->class == &html_class)
-      {
-       struct html_driver_ext *x = d->ext;
-       int column;
-
-       fputs ("  <TR>\n", x->file);
-
-       for (column = 0; column < cmd.n_variables; column++)
-         {
-           const struct variable *v = cmd.v_variables[column];
-            const struct fmt_spec *print = var_get_print_format (v);
-           char *s = NULL;
-
-            if (fmt_is_string (print->type)
-                || dict_contains_var (dict, v))
-             s = data_out (case_data (c, v), dict_get_encoding (dict), print);
-            else
-              {
-                union value case_idx_value;
-                case_idx_value.f = case_idx;
-                s = data_out (&case_idx_value, dict_get_encoding (dict), print);
-              }
-
-            fputs ("    <TD>", x->file);
-            html_put_cell_contents (d, TAB_FIX, ss_buffer (s, print->w));
-           free (s);
-            fputs ("</TD>\n", x->file);
-         }
+  subcase_destroy (&sc);
 
-       fputs ("  </TR>\n", x->file);
-      }
-    else
-      NOT_REACHED ();
+  return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
 }
 
 /*
index 3f73ee25a8de16fb1f1883608e2c6fa8cf25fdba..25bcc750516964264f5bf99e9fd15fed251ed405 100644 (file)
@@ -26,8 +26,8 @@
 #include <language/data-io/file-handle.h>
 #include <language/expressions/public.h>
 #include <language/lexer/lexer.h>
-#include <output/manager.h>
 #include <libpspp/message.h>
+#include <output/text-item.h>
 
 #include "xalloc.h"
 
@@ -123,7 +123,7 @@ print_space_trns_proc (void *t_, struct ccase **c,
 
   while (n--)
     if (trns->writer == NULL)
-      som_blank_line ();
+      text_item_submit (text_item_create (TEXT_ITEM_BLANK_LINE, ""));
     else
       dfm_put_record (trns->writer, " ", 1);
 
index 2cfa0177c77950f26495aa9a5bd421ab8df73488..fd98eaedcc319fe5b44faf0294aa7dce6265a020 100644 (file)
@@ -38,8 +38,8 @@
 #include <libpspp/message.h>
 #include <libpspp/misc.h>
 #include <libpspp/pool.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/text-item.h>
+#include <output/tab.h>
 
 #include "xalloc.h"
 
@@ -396,8 +396,7 @@ dump_table (struct print_trns *trns, const struct file_handle *fh)
   int row;
 
   spec_cnt = ll_count (&trns->specs);
-  t = tab_create (4, spec_cnt + 1, 0);
-  tab_columns (t, TAB_COL_DOWN, 1);
+  t = tab_create (4, spec_cnt + 1);
   tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 3, spec_cnt);
   tab_hline (t, TAL_2, 0, 3, 1);
   tab_headers (t, 0, 0, 1, 0);
@@ -405,7 +404,6 @@ dump_table (struct print_trns *trns, const struct file_handle *fh)
   tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Record"));
   tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Columns"));
   tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Format"));
-  tab_dim (t, tab_natural_dimensions, NULL);
   row = 1;
   ll_for_each (spec, struct prt_out_spec, ll, &trns->specs)
     {
@@ -516,14 +514,14 @@ flush_records (struct print_trns *trns, int target_record,
         {
           *eject = false;
           if (trns->writer == NULL)
-            som_eject_page ();
+            text_item_submit (text_item_create (TEXT_ITEM_EJECT_PAGE, ""));
           else
             leader = '1';
         }
       line[0] = legacy_from_native (trns->encoding, leader);
 
       if (trns->writer == NULL)
-        tab_output_text (TAB_FIX | TAT_NOWRAP, &line[1]);
+        tab_output_text (TAB_FIX, &line[1]);
       else
         {
           if (!trns->include_prefix)
index 7a14c996b8c6ea7cd1cc90ab0ec2399477a9b4da..921b9c655e9475b916a56823ff34f0fcf1d1d4bd 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -114,7 +114,8 @@ parse_dict_rename (struct lexer *lexer, struct dictionary *dict)
          msg (SE, _("`=' expected after variable list."));
          goto done;
        }
-      if (!parse_DATA_LIST_vars (lexer, &new_names, &nn, PV_APPEND | PV_NO_SCRATCH))
+      if (!parse_DATA_LIST_vars (lexer, &new_names, &nn,
+                                 PV_APPEND | PV_NO_SCRATCH | PV_NO_DUPLICATE))
        goto done;
       if (nn != nv)
        {
index 2aa91842c5db8bdc42848624e049b15bcd9187c8..15243b65aa0504bfbfa918a54aae28a835aeec49 100644 (file)
@@ -7,6 +7,7 @@ language_dictionary_sources = \
  src/language/dictionary/formats.c \
  src/language/dictionary/missing-values.c \
  src/language/dictionary/modify-variables.c \
+ src/language/dictionary/mrsets.c \
  src/language/dictionary/numeric.c \
  src/language/dictionary/rename-variables.c \
  src/language/dictionary/split-file.c \
index 819b0a9021cfe5821b4060e02b9932830b2a6120..22fe4436f0500e9f93b54b97ae48962c2a2663db 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@
 int
 cmd_missing_values (struct lexer *lexer, struct dataset *ds)
 {
-  struct variable **v;
+  struct variable **v = NULL;
   size_t nv;
 
   int retval = CMD_FAILURE;
diff --git a/src/language/dictionary/mrsets.c b/src/language/dictionary/mrsets.c
new file mode 100644 (file)
index 0000000..6e8a050
--- /dev/null
@@ -0,0 +1,605 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "data/data-out.h"
+#include "data/dictionary.h"
+#include "data/mrset.h"
+#include "data/procedure.h"
+#include "data/value-labels.h"
+#include "data/variable.h"
+#include "language/command.h"
+#include "language/lexer/lexer.h"
+#include "language/lexer/variable-parser.h"
+#include "libpspp/assertion.h"
+#include "libpspp/hmap.h"
+#include "libpspp/message.h"
+#include "libpspp/str.h"
+#include "libpspp/stringi-map.h"
+#include "libpspp/stringi-set.h"
+#include "output/tab.h"
+
+#include "gl/xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+static bool parse_group (struct lexer *, struct dictionary *, enum mrset_type);
+static bool parse_delete (struct lexer *, struct dictionary *);
+static bool parse_display (struct lexer *, struct dictionary *);
+
+int
+cmd_mrsets (struct lexer *lexer, struct dataset *ds)
+{
+  struct dictionary *dict = dataset_dict (ds);
+
+  while (lex_match (lexer, '/'))
+    {
+      bool ok;
+
+      if (lex_match_id (lexer, "MDGROUP"))
+        ok = parse_group (lexer, dict, MRSET_MD);
+      else if (lex_match_id (lexer, "MCGROUP"))
+        ok = parse_group (lexer, dict, MRSET_MC);
+      else if (lex_match_id (lexer, "DELETE"))
+        ok = parse_delete (lexer, dict);
+      else if (lex_match_id (lexer, "DISPLAY"))
+        ok = parse_display (lexer, dict);
+      else
+        {
+          ok = false;
+          lex_error (lexer, NULL);
+        }
+
+      if (!ok)
+        return CMD_FAILURE;
+    }
+
+  return lex_end_of_command (lexer);
+}
+
+static bool
+parse_group (struct lexer *lexer, struct dictionary *dict,
+             enum mrset_type type)
+{
+  const char *subcommand_name = type == MRSET_MD ? "MDGROUP" : "MCGROUP";
+  struct mrset *mrset;
+  bool labelsource_varlabel;
+  bool has_value;
+
+  mrset = xzalloc (sizeof *mrset);
+  mrset->type = type;
+  mrset->cat_source = MRSET_VARLABELS;
+
+  labelsource_varlabel = false;
+  has_value = false;
+  while (lex_token (lexer) != '/' && lex_token (lexer) != '.')
+    {
+      if (lex_match_id (lexer, "NAME"))
+        {
+          if (!lex_force_match (lexer, '=') || !lex_force_id (lexer))
+            goto error;
+          if (lex_tokid (lexer)[0] != '$')
+            {
+              msg (SE, _("%s is not a valid name for a multiple response "
+                         "set.  Multiple response set names must begin with "
+                         "`$'."), lex_tokid (lexer));
+              goto error;
+            }
+
+          free (mrset->name);
+          mrset->name = xstrdup (lex_tokid (lexer));
+          lex_get (lexer);
+        }
+      else if (lex_match_id (lexer, "VARIABLES"))
+        {
+          if (!lex_force_match (lexer, '='))
+            goto error;
+
+          free (mrset->vars);
+          if (!parse_variables (lexer, dict, &mrset->vars, &mrset->n_vars,
+                                PV_SAME_TYPE | PV_NO_SCRATCH))
+            goto error;
+
+          if (mrset->n_vars < 2)
+            {
+              msg (SE, _("VARIABLES specified only variable %s on %s, but "
+                         "at least two variables are required."),
+                   var_get_name (mrset->vars[0]), subcommand_name);
+              goto error;
+            }
+        }
+      else if (lex_match_id (lexer, "LABEL"))
+        {
+          if (!lex_force_match (lexer, '=') || !lex_force_string (lexer))
+            goto error;
+
+          free (mrset->label);
+          mrset->label = ds_xstrdup (lex_tokstr (lexer));
+          lex_get (lexer);
+        }
+      else if (type == MRSET_MD && lex_match_id (lexer, "LABELSOURCE"))
+        {
+          if (!lex_force_match (lexer, '=')
+              || !lex_force_match_id (lexer, "VARLABEL"))
+            goto error;
+
+          labelsource_varlabel = true;
+        }
+      else if (type == MRSET_MD && lex_match_id (lexer, "VALUE"))
+        {
+          if (!lex_force_match (lexer, '='))
+            goto error;
+
+          has_value = true;
+          if (lex_is_number (lexer))
+            {
+              if (!lex_is_integer (lexer))
+                {
+                  msg (SE, _("Numeric VALUE must be an integer."));
+                  goto error;
+                }
+              value_destroy (&mrset->counted, mrset->width);
+              mrset->counted.f = lex_integer (lexer);
+              mrset->width = 0;
+            }
+          else if (lex_is_string (lexer))
+            {
+              const char *s = ds_cstr (lex_tokstr (lexer));
+              int width;
+
+              /* Trim off trailing spaces, but don't trim the string until
+                 it's empty because a width of 0 is a numeric type. */
+              width = strlen (s);
+              while (width > 1 && s[width - 1] == ' ')
+                width--;
+
+              value_destroy (&mrset->counted, mrset->width);
+              value_init (&mrset->counted, width);
+              memcpy (value_str_rw (&mrset->counted, width), s, width);
+              mrset->width = width;
+            }
+          else
+            {
+              lex_error (lexer, NULL);
+              goto error;
+            }
+          lex_get (lexer);
+        }
+      else if (type == MRSET_MD && lex_match_id (lexer, "CATEGORYLABELS"))
+        {
+          if (!lex_force_match (lexer, '='))
+            goto error;
+
+          if (lex_match_id (lexer, "VARLABELS"))
+            mrset->cat_source = MRSET_VARLABELS;
+          else if (lex_match_id (lexer, "COUNTEDVALUES"))
+            mrset->cat_source = MRSET_COUNTEDVALUES;
+          else
+            {
+              lex_error (lexer, NULL);
+              goto error;
+            }
+        }
+      else
+        {
+          lex_error (lexer, NULL);
+          goto error;
+        }
+    }
+
+  if (mrset->name == NULL)
+    {
+      msg (SE, _("Required %s specification missing from %s subcommand."),
+           "NAME", subcommand_name);
+      goto error;
+    }
+  else if (mrset->n_vars == 0)
+    {
+      msg (SE, _("Required %s specification missing from %s subcommand."),
+           "VARIABLES", subcommand_name);
+      goto error;
+    }
+
+  if (type == MRSET_MD)
+    {
+      /* Check that VALUE is specified and is valid for the VARIABLES. */
+      if (!has_value)
+        {
+          msg (SE, _("Required %s specification missing from %s subcommand."),
+               "VALUE", subcommand_name);
+          goto error;
+        }
+      else if (var_is_alpha (mrset->vars[0]))
+        {
+          if (mrset->width == 0)
+            {
+              msg (SE, _("MDGROUP subcommand for group %s specifies a string "
+                         "VALUE, but the variables specified for this group "
+                         "are numeric."),
+                   mrset->name);
+              goto error;
+            }
+          else {
+            const struct variable *shortest_var;
+            int min_width;
+            size_t i;
+
+            shortest_var = NULL;
+            min_width = INT_MAX;
+            for (i = 0; i < mrset->n_vars; i++)
+              {
+                int width = var_get_width (mrset->vars[i]);
+                if (width < min_width)
+                  {
+                    shortest_var = mrset->vars[i];
+                    min_width = width;
+                  }
+              }
+            if (mrset->width > min_width)
+              {
+                msg (SE, _("VALUE string on MDGROUP subcommand for group "
+                           "%s is %d bytes long, but it must be no longer "
+                           "than the narrowest variable in the group, "
+                           "which is %s with a width of %d bytes."),
+                     mrset->name, mrset->width,
+                     var_get_name (shortest_var), min_width);
+                goto error;
+              }
+          }
+        }
+      else
+        {
+          if (mrset->width != 0)
+            {
+              msg (SE, _("MDGROUP subcommand for group %s specifies a string "
+                         "VALUE, but the variables specified for this group "
+                         "are numeric."),
+                   mrset->name);
+              goto error;
+            }
+        }
+
+      /* Implement LABELSOURCE=VARLABEL. */
+      if (labelsource_varlabel)
+        {
+          if (mrset->cat_source != MRSET_COUNTEDVALUES)
+            msg (SW, _("MDGROUP subcommand for group %s specifies "
+                       "LABELSOURCE=VARLABEL but not "
+                       "CATEGORYLABELS=COUNTEDVALUES.  "
+                       "Ignoring LABELSOURCE."),
+                 mrset->name);
+          else if (mrset->label)
+            msg (SW, _("MDGROUP subcommand for group %s specifies both LABEL "
+                       "and LABELSOURCE, but only one of these subcommands "
+                       "may be used at a time.  Ignoring LABELSOURCE."),
+                 mrset->name);
+          else
+            {
+              size_t i;
+
+              mrset->label_from_var_label = true;
+              for (i = 0; mrset->label == NULL && i < mrset->n_vars; i++)
+                {
+                  const char *label = var_get_label (mrset->vars[i]);
+                  if (label != NULL)
+                    {
+                      mrset->label = xstrdup (label);
+                      break;
+                    }
+                }
+            }
+        }
+
+      /* Warn if categories cannot be distinguished in output. */
+      if (mrset->cat_source == MRSET_VARLABELS)
+        {
+          struct stringi_map seen;
+          size_t i;
+
+          stringi_map_init (&seen);
+          for (i = 0; i < mrset->n_vars; i++)
+            {
+              const struct variable *var = mrset->vars[i];
+              const char *name = var_get_name (var);
+              const char *label = var_get_label (var);
+              if (label != NULL)
+                {
+                  const char *other_name = stringi_map_find (&seen, label);
+
+                  if (other_name == NULL)
+                    stringi_map_insert (&seen, label, name);
+                  else
+                    msg (SW, _("Variables %s and %s specified as part of "
+                               "multiple dichotomy group %s have the same "
+                               "variable label.  Categories represented by "
+                               "these variables will not be distinguishable "
+                               "in output."),
+                         other_name, name, mrset->name);
+                }
+            }
+          stringi_map_destroy (&seen);
+        }
+      else
+        {
+          struct stringi_map seen;
+          size_t i;
+
+          stringi_map_init (&seen);
+          for (i = 0; i < mrset->n_vars; i++)
+            {
+              const struct variable *var = mrset->vars[i];
+              const char *name = var_get_name (var);
+              const struct val_labs *val_labs;
+              union value value;
+              const char *label;
+
+              value_clone (&value, &mrset->counted, mrset->width);
+              value_resize (&value, mrset->width, var_get_width (var));
+
+              val_labs = var_get_value_labels (var);
+              label = val_labs_find (val_labs, &value);
+              if (label == NULL)
+                msg (SW, _("Variable %s specified as part of multiple "
+                           "dichotomy group %s (which has "
+                           "CATEGORYLABELS=COUNTEDVALUES) has no value label "
+                           "for its counted value.  This category will not "
+                           "be distinguishable in output."),
+                     name, mrset->name);
+              else
+                {
+                  const char *other_name = stringi_map_find (&seen, label);
+
+                  if (other_name == NULL)
+                    stringi_map_insert (&seen, label, name);
+                  else
+                    msg (SW, _("Variables %s and %s specified as part of "
+                               "multiple dichotomy group %s (which has "
+                               "CATEGORYLABELS=COUNTEDVALUES) have the same "
+                               "value label for the the group's counted "
+                               "value.  These categories will not be "
+                               "distinguishable in output."),
+                         other_name, name, mrset->name);
+                }
+            }
+          stringi_map_destroy (&seen);
+        }
+    }
+  else                          /* MCGROUP. */
+    {
+      /* Warn if categories cannot be distinguished in output. */
+      struct category
+        {
+          struct hmap_node hmap_node;
+          union value value;
+          int width;
+          const char *label;
+          const char *var_name;
+          bool warned;
+        };
+
+      struct category *c, *next;
+      struct hmap categories;
+      size_t i;
+
+      hmap_init (&categories);
+      for (i = 0; i < mrset->n_vars; i++)
+        {
+          const struct variable *var = mrset->vars[i];
+          const char *name = var_get_name (var);
+          int width = var_get_width (var);
+          const struct val_labs *val_labs;
+          const struct val_lab *vl;
+
+          val_labs = var_get_value_labels (var);
+          for (vl = val_labs_first (val_labs); vl != NULL;
+               vl = val_labs_next (val_labs, vl))
+            {
+              const union value *value = val_lab_get_value (vl);
+              const char *label = val_lab_get_label (vl);
+              unsigned int hash = value_hash (value, width, 0);
+
+              HMAP_FOR_EACH_WITH_HASH (c, struct category, hmap_node,
+                                       hash, &categories)
+                {
+                  if (width == c->width
+                      && value_equal (value, &c->value, width))
+                    {
+                      if (!c->warned && strcasecmp (c->label, label))
+                        {
+                          char *s = data_out (value, var_get_encoding (var),
+                                              var_get_print_format (var));
+                          c->warned = true;
+                          msg (SW, _("Variables specified on MCGROUP should "
+                                     "have the same categories, but %s and %s "
+                                     "(and possibly others) in multiple "
+                                     "category group %s have different "
+                                     "value labels for value %s."),
+                               c->var_name, name, mrset->name, s);
+                          free (s);
+                        }
+                      goto found;
+                    }
+                }
+
+              c = xmalloc (sizeof *c);
+              value_clone (&c->value, value, width);
+              c->width = width;
+              c->label = label;
+              c->var_name = name;
+              c->warned = false;
+              hmap_insert (&categories, &c->hmap_node, hash);
+
+            found: ;
+            }
+        }
+
+      HMAP_FOR_EACH_SAFE (c, next, struct category, hmap_node, &categories)
+        {
+          value_destroy (&c->value, c->width);
+          hmap_delete (&categories, &c->hmap_node);
+          free (c);
+        }
+      hmap_destroy (&categories);
+    }
+
+  dict_add_mrset (dict, mrset);
+  return true;
+
+error:
+  mrset_destroy (mrset);
+  return false;
+}
+
+static bool
+parse_mrset_names (struct lexer *lexer, struct dictionary *dict,
+                   struct stringi_set *mrset_names)
+{
+  if (!lex_force_match_id (lexer, "NAME") || !lex_force_match (lexer, '='))
+    return false;
+
+  stringi_set_init (mrset_names);
+  if (lex_match (lexer, '['))
+    {
+      while (!lex_match (lexer, ']'))
+        {
+          if (!lex_force_id (lexer))
+            return false;
+          if (dict_lookup_mrset (dict, lex_tokid (lexer)) == NULL)
+            {
+              msg (SE, _("No multiple response set named %s."),
+                   lex_tokid (lexer));
+              stringi_set_destroy (mrset_names);
+              return false;
+            }
+          stringi_set_insert (mrset_names, lex_tokid (lexer));
+          lex_get (lexer);
+        }
+    }
+  else if (lex_match (lexer, T_ALL))
+    {
+      size_t n_sets = dict_get_n_mrsets (dict);
+      size_t i;
+
+      for (i = 0; i < n_sets; i++)
+        stringi_set_insert (mrset_names, dict_get_mrset (dict, i)->name);
+    }
+
+  return true;
+}
+
+static bool
+parse_delete (struct lexer *lexer, struct dictionary *dict)
+{
+  const struct stringi_set_node *node;
+  struct stringi_set mrset_names;
+  const char *name;
+
+  if (!parse_mrset_names (lexer, dict, &mrset_names))
+    return false;
+
+  STRINGI_SET_FOR_EACH (name, node, &mrset_names)
+    dict_delete_mrset (dict, name);
+  stringi_set_destroy (&mrset_names);
+
+  return true;
+}
+
+static bool
+parse_display (struct lexer *lexer, struct dictionary *dict)
+{
+  struct string details, var_names;
+  struct stringi_set mrset_names_set;
+  char **mrset_names;
+  struct tab_table *table;
+  size_t i, n;
+
+  if (!parse_mrset_names (lexer, dict, &mrset_names_set))
+    return false;
+
+  n = stringi_set_count (&mrset_names_set);
+  if (n == 0)
+    {
+      if (dict_get_n_mrsets (dict) == 0)
+        msg (SN, _("The active file dictionary does not contain any multiple "
+                   "response sets."));
+      stringi_set_destroy (&mrset_names_set);
+      return true;
+    }
+
+  table = tab_create (3, n + 1);
+  tab_headers (table, 0, 0, 1, 0);
+  tab_box (table, TAL_1, TAL_1, TAL_1, TAL_1, 0, 0, 2, n);
+  tab_hline (table, TAL_2, 0, 2, 1);
+  tab_title (table, "%s", _("Multiple Response Sets"));
+  tab_text (table, 0, 0, TAB_EMPH | TAB_LEFT, _("Name"));
+  tab_text (table, 1, 0, TAB_EMPH | TAB_LEFT, _("Variables"));
+  tab_text (table, 2, 0, TAB_EMPH | TAB_LEFT, _("Details"));
+
+  ds_init_empty (&details);
+  ds_init_empty (&var_names);
+  mrset_names = stringi_set_get_sorted_array (&mrset_names_set);
+  for (i = 0; i < n; i++)
+    {
+      const struct mrset *mrset = dict_lookup_mrset (dict, mrset_names[i]);
+      const int row = i + 1;
+      size_t j;
+
+      /* Details. */
+      ds_clear (&details);
+      ds_put_format (&details, "%s\n", (mrset->type == MRSET_MD
+                                        ? _("Multiple dichotomy set")
+                                        : _("Multiple category set")));
+      if (mrset->label != NULL)
+        ds_put_format (&details, "%s: %s\n", _("Label"), mrset->label);
+      if (mrset->type == MRSET_MD)
+        {
+          if (mrset->label != NULL || mrset->label_from_var_label)
+            ds_put_format (&details, "%s: %s\n", _("Label source"),
+                           (mrset->label_from_var_label
+                            ? _("First variable label among variables")
+                            : _("Provided by user")));
+          ds_put_format (&details, "%s: ", _("Counted value"));
+          if (mrset->width == 0)
+            ds_put_format (&details, "%.0f\n", mrset->counted.f);
+          else
+            ds_put_format (&details, "\"%.*s\"\n", mrset->width,
+                           value_str (&mrset->counted, mrset->width));
+          ds_put_format (&details, "%s: %s\n", _("Category label source"),
+                         (mrset->cat_source == MRSET_VARLABELS
+                          ? _("Variable labels")
+                          : _("Value labels of counted value")));
+        }
+
+      /* Variable names. */
+      ds_clear (&var_names);
+      for (j = 0; j < mrset->n_vars; j++)
+        ds_put_format (&var_names, "%s\n", var_get_name (mrset->vars[j]));
+
+      tab_text (table, 0, row, TAB_LEFT, mrset_names[i]);
+      tab_text (table, 1, row, TAB_LEFT, ds_cstr (&var_names));
+      tab_text (table, 2, row, TAB_LEFT, ds_cstr (&details));
+    }
+  free (mrset_names);
+  ds_destroy (&var_names);
+  ds_destroy (&details);
+  stringi_set_destroy (&mrset_names_set);
+
+  tab_submit (table);
+
+  return true;
+}
index 5fa77541b24791aa7d309e5500a6744d4d758b7a..41f3c79a67b8bcc3ea5b1194f770a93535f86713 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@ cmd_numeric (struct lexer *lexer, struct dataset *ds)
         be used. */
       struct fmt_spec f;
 
-      if (!parse_DATA_LIST_vars (lexer, &v, &nv, PV_NONE))
+      if (!parse_DATA_LIST_vars (lexer, &v, &nv, PV_NO_DUPLICATE))
        return CMD_FAILURE;
 
       /* Get the optional format specification. */
@@ -127,7 +127,7 @@ cmd_string (struct lexer *lexer, struct dataset *ds)
 
   do
     {
-      if (!parse_DATA_LIST_vars (lexer, &v, &nv, PV_NONE))
+      if (!parse_DATA_LIST_vars (lexer, &v, &nv, PV_NO_DUPLICATE))
        return CMD_FAILURE;
 
       if (!lex_force_match (lexer, '(')
index 90117ff69ede1ea6a33b1cb7a4aa65761dbe0ba3..c175831d8dacb6c3d448ac2821a9d7362725e1b5 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -67,7 +67,8 @@ cmd_rename_variables (struct lexer *lexer, struct dataset *ds)
          msg (SE, _("`=' expected between lists of new and old variable names."));
          goto lossage;
        }
-      if (!parse_DATA_LIST_vars (lexer, &rename_new_names, &prev_nv_1, PV_APPEND))
+      if (!parse_DATA_LIST_vars (lexer, &rename_new_names, &prev_nv_1,
+                                 PV_APPEND | PV_NO_DUPLICATE))
        goto lossage;
       if (prev_nv_1 != rename_cnt)
        {
index 5d2b42d758eed2d1e305d05046d59cf0aa290877..d27ab3a65b3ab1b34c6c74b9a8cb1b011287a7a2 100644 (file)
@@ -31,8 +31,7 @@
 #include <language/lexer/variable-parser.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include "xalloc.h"
 
@@ -77,8 +76,7 @@ output_split_file_values (const struct dataset *ds, const struct ccase *c)
   if (split_cnt == 0)
     return;
 
-  t = tab_create (3, split_cnt + 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
+  t = tab_create (3, split_cnt + 1);
   tab_vline (t, TAL_GAP, 1, 0, split_cnt);
   tab_vline (t, TAL_GAP, 2, 0, split_cnt);
   tab_text (t, 0, 0, TAB_NONE, _("Variable"));
@@ -95,6 +93,7 @@ output_split_file_values (const struct dataset *ds, const struct ccase *c)
       tab_text_format (t, 0, i + 1, TAB_LEFT, "%s", var_get_name (v));
 
       s = data_out (case_data (c, v), dict_get_encoding (dict), print);
+
       tab_text_format (t, 1, i + 1, 0, "%.*s", print->w, s);
 
       free (s);
@@ -103,6 +102,5 @@ output_split_file_values (const struct dataset *ds, const struct ccase *c)
       if (val_lab)
        tab_text (t, 2, i + 1, TAB_LEFT, val_lab);
     }
-  tab_flags (t, SOMF_NO_TITLE);
   tab_submit (t);
 }
index f68a830b83810ba6eec7d4e73b42ab40b041ca91..db871b8734be012be056124c7b91335dd2685cc8 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -39,9 +39,7 @@
 #include <libpspp/message.h>
 #include <libpspp/message.h>
 #include <libpspp/misc.h>
-#include <output/manager.h>
-#include <output/output.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include "minmax.h"
 #include "xalloc.h"
@@ -66,22 +64,6 @@ enum
 static int describe_variable (const struct variable *v, struct tab_table *t,
                               int r, int pc, int flags);
 
-/* Sets the widths of all the columns and heights of all the rows in
-   table T for driver D. */
-static void
-sysfile_info_dim (struct tab_table *t, struct outp_driver *d, void *aux UNUSED)
-{
-  static const int max[] = {20, 5, 35, 3, 0};
-  const int *p;
-  int i;
-
-  for (p = max; *p; p++)
-    t->w[p - max] = MIN (tab_natural_width (t, d, p - max),
-                        *p * d->prop_em_width);
-  for (i = 0; i < t->nr; i++)
-    t->h[i] = tab_natural_height (t, d, i);
-}
-
 /* SYSFILE INFO utility. */
 int
 cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED)
@@ -108,7 +90,7 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED)
     }
   casereader_destroy (reader);
 
-  t = tab_create (2, 11, 0);
+  t = tab_create (2, 11);
   tab_vline (t, TAL_GAP, 1, 0, 8);
   tab_text (t, 0, 0, TAB_LEFT, _("File:"));
   tab_text (t, 1, 0, TAB_LEFT, fh_get_file_name (h));
@@ -138,9 +120,10 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED)
   tab_text (t, 0, 5, TAB_LEFT, _("Variables:"));
   tab_text_format (t, 1, 5, TAB_LEFT, "%zu", dict_get_var_cnt (d));
   tab_text (t, 0, 6, TAB_LEFT, _("Cases:"));
-  tab_text_format (t, 1, 6, TAB_LEFT,
-                   info.case_cnt == -1 ? _("Unknown") : "%ld",
-                   (long int) info.case_cnt);
+  if (info.case_cnt == -1)
+    tab_text (t, 1, 6, TAB_LEFT, _("Unknown"));
+  else
+    tab_text_format (t, 1, 6, TAB_LEFT, "%ld", (long int) info.case_cnt);
   tab_text (t, 0, 7, TAB_LEFT, _("Type:"));
   tab_text (t, 1, 7, TAB_LEFT, _("System File"));
   tab_text (t, 0, 8, TAB_LEFT, _("Weight:"));
@@ -156,15 +139,13 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED)
 
 
   tab_text (t, 0, 10, TAB_LEFT, _("Charset:"));
-  tab_text_format (t, 1, 10, TAB_LEFT,
-                   dict_get_encoding(d) ? dict_get_encoding(d) : _("Unknown"));
+  tab_text (t, 1, 10, TAB_LEFT,
+            dict_get_encoding(d) ? dict_get_encoding(d) : _("Unknown"));
 
 
-  tab_dim (t, tab_natural_dimensions, NULL);
   tab_submit (t);
 
-  t = tab_create (4, 1 + 2 * dict_get_var_cnt (d), 1);
-  tab_dim (t, sysfile_info_dim, NULL);
+  t = tab_create (4, 1 + 2 * dict_get_var_cnt (d));
   tab_headers (t, 0, 0, 1, 0);
   tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Variable"));
   tab_joint_text (t, 1, 0, 2, 0, TAB_LEFT | TAT_TITLE, _("Description"));
@@ -179,7 +160,6 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED)
   tab_vline (t, TAL_1, 3, 0, r);
 
   tab_resize (t, -1, r);
-  tab_flags (t, SOMF_NO_TITLE);
   tab_submit (t);
 
   dict_destroy (d);
@@ -212,7 +192,6 @@ cmd_display (struct lexer *lexer, struct dataset *ds)
     display_documents (dataset_dict (ds));
   else if (lex_match_id (lexer, "FILE"))
     {
-      som_blank_line ();
       if (!lex_force_match_id (lexer, "LABEL"))
        return CMD_FAILURE;
       if (dict_get_label (dataset_dict (ds)) == NULL)
@@ -309,7 +288,6 @@ cmd_display (struct lexer *lexer, struct dataset *ds)
 static void
 display_macros (void)
 {
-  som_blank_line ();
   tab_output_text (TAB_LEFT, _("Macros not supported."));
 }
 
@@ -318,7 +296,6 @@ display_documents (const struct dictionary *dict)
 {
   const char *documents = dict_get_documents (dict);
 
-  som_blank_line ();
   if (documents == NULL)
     tab_output_text (TAB_LEFT, _("The active file dictionary does not "
                                  "contain any documents."));
@@ -329,43 +306,15 @@ display_documents (const struct dictionary *dict)
 
       tab_output_text (TAB_LEFT | TAT_TITLE,
                       _("Documents in the active file:"));
-      som_blank_line ();
       for (i = 0; i < dict_get_document_line_cnt (dict); i++)
         {
           dict_get_document_line (dict, i, &line);
-          tab_output_text (TAB_LEFT | TAB_FIX | TAT_NOWRAP, ds_cstr (&line));
+          tab_output_text (TAB_LEFT | TAB_FIX, ds_cstr (&line));
         }
       ds_destroy (&line);
     }
 }
 
-static int _flags;
-
-/* Sets the widths of all the columns and heights of all the rows in
-   table T for driver D. */
-static void
-variables_dim (struct tab_table *t, struct outp_driver *d, void *aux UNUSED)
-{
-  int pc;
-  int i;
-
-  t->w[0] = tab_natural_width (t, d, 0);
-  if (_flags & (DF_VALUE_LABELS | DF_VARIABLE_LABELS | DF_MISSING_VALUES
-                | DF_AT_ATTRIBUTES | DF_ATTRIBUTES))
-    {
-      t->w[1] = MAX (tab_natural_width (t, d, 1), d->prop_em_width * 5);
-      t->w[2] = MAX (tab_natural_width (t, d, 2), d->prop_em_width * 35);
-      pc = 3;
-    }
-  else
-    pc = 1;
-  if (_flags & DF_DICT_INDEX)
-    t->w[pc] = tab_natural_width (t, d, pc);
-
-  for (i = 0; i < t->nr; i++)
-    t->h[i] = tab_natural_height (t, d, i);
-}
-
 static void
 display_variables (const struct variable **vl, size_t n, int flags)
 {
@@ -375,8 +324,6 @@ display_variables (const struct variable **vl, size_t n, int flags)
   int r;                       /* Current row. */
   size_t i;
 
-  _flags = flags;
-
   /* One column for the name,
      two columns for general description,
      one column for dictionary index. */
@@ -387,7 +334,7 @@ display_variables (const struct variable **vl, size_t n, int flags)
   if (flags & DF_DICT_INDEX)
     nc++;
 
-  t = tab_create (nc, n + 5, 1);
+  t = tab_create (nc, n + 5);
   tab_headers (t, 0, 0, 1, 0);
   tab_hline (t, TAL_2, 0, nc - 1, 1);
   tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Variable"));
@@ -397,7 +344,6 @@ display_variables (const struct variable **vl, size_t n, int flags)
                      ? _("Description") : _("Label")));
   if (flags & DF_DICT_INDEX)
     tab_text (t, pc, 0, TAB_LEFT | TAT_TITLE, _("Position"));
-  tab_dim (t, variables_dim, NULL);
 
   r = 1;
   for (i = 0; i < n; i++)
@@ -408,12 +354,9 @@ display_variables (const struct variable **vl, size_t n, int flags)
       tab_box (t, TAL_1, TAL_1, -1, -1, 0, 0, nc - 1, r - 1);
       tab_vline (t, TAL_1, 1, 0, r - 1);
     }
-  else
-    tab_flags (t, SOMF_NO_TITLE);
   if (flags & ~DF_DICT_INDEX)
     tab_vline (t, TAL_1, nc - 1, 0, r - 1);
   tab_resize (t, -1, r);
-  tab_columns (t, TAB_COL_DOWN, 1);
   tab_submit (t);
 }
 \f
@@ -478,15 +421,13 @@ display_data_file_attributes (struct attrset *set, int flags)
   if (!n_attrs)
     return;
 
-  t = tab_create (2, n_attrs + 1, 0);
+  t = tab_create (2, n_attrs + 1);
   tab_headers (t, 0, 0, 1, 0);
   tab_box (t, TAL_1, TAL_1, -1, TAL_1, 0, 0, tab_nc (t) - 1, tab_nr (t) - 1);
   tab_hline (t, TAL_2, 0, 1, 1); 
   tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Attribute"));
   tab_text (t, 1, 0, TAB_LEFT | TAT_TITLE, _("Value"));
   display_attributes (t, set, flags, 0, 1);
-  tab_columns (t, TAB_COL_DOWN, 1);
-  tab_dim (t, tab_natural_dimensions, NULL);
   tab_title (t, "Custom data file attributes.");
   tab_submit (t);
 }
@@ -713,10 +654,8 @@ display_vectors (const struct dictionary *dict, int sorted)
   if (sorted)
     qsort (vl, nvec, sizeof *vl, compare_vector_ptrs_by_name);
 
-  t = tab_create (4, nrow + 1, 0);
+  t = tab_create (4, nrow + 1);
   tab_headers (t, 0, 0, 1, 0);
-  tab_columns (t, TAB_COL_DOWN, 1);
-  tab_dim (t, tab_natural_dimensions, NULL);
   tab_box (t, TAL_1, TAL_1, -1, -1, 0, 0, 3, nrow);
   tab_box (t, -1, -1, -1, TAL_1, 0, 0, 3, nrow);
   tab_hline (t, TAL_2, 0, 3, 1);
@@ -724,7 +663,6 @@ display_vectors (const struct dictionary *dict, int sorted)
   tab_text (t, 1, 0, TAT_TITLE | TAB_LEFT, _("Position"));
   tab_text (t, 2, 0, TAT_TITLE | TAB_LEFT, _("Variable"));
   tab_text (t, 3, 0, TAT_TITLE | TAB_LEFT, _("Print Format"));
-  tab_flags (t, SOMF_NO_TITLE);
 
   row = 1;
   for (i = 0; i < nvec; i++)
index bc4e830d7ffefc010cf3283d6f237fb8dc58a880..11eb8e0bf35645fe422c82d4932cb4132a4bfb4d 100644 (file)
@@ -23,19 +23,19 @@ helpers = src/language/expressions/generate.pl \
        src/language/expressions/operations.def
 
 $(expressions_built_sources): $(helpers)
-EXTRA_DIST += $(helpers) $(expressions_built_sources:=.pl)
+EXTRA_DIST += $(helpers) $(expressions_built_sources:=pl)
 AM_CPPFLAGS += -I$(top_builddir)/src/language/expressions \
        -I$(top_srcdir)/src/language/expressions
 
-SUFFIXES = .h.pl .inc.pl
+SUFFIXES += .h .hpl .inc .incpl
 
 generate_from_pl = $(MKDIR_P) `dirname $@` && \
        $(PERL) -I $(top_srcdir)/src/language/expressions $< -o $@ -i $(top_srcdir)/src/language/expressions/operations.def
 
-.h.pl.h:
+.hpl.h:
        $(generate_from_pl)
 
-.inc.pl.inc:
+.incpl.inc:
        $(generate_from_pl)
 
 EXTRA_DIST += src/language/expressions/OChangeLog
diff --git a/src/language/expressions/evaluate.h.pl b/src/language/expressions/evaluate.h.pl
deleted file mode 100644 (file)
index c26a7cc..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-use strict;
-use warnings 'all';
-
-do 'generate.pl';
-
-our (%ops);
-our (@order);
-sub generate_output {
-    print "#include \"helpers.h\"\n\n";
-
-    for my $opname (@order) {
-       my ($op) = $ops{$opname};
-       next if $op->{UNIMPLEMENTED};
-
-       my (@args);
-       for my $arg (@{$op->{ARGS}}) {
-           if (!defined $arg->{IDX}) {
-               push (@args, c_type ($arg->{TYPE}) . $arg->{NAME});
-           } else {
-               push (@args, c_type ($arg->{TYPE}) . "$arg->{NAME}" . "[]");
-               push (@args, "size_t $arg->{IDX}");
-           }
-       }
-       for my $aux (@{$op->{AUX}}) {
-           push (@args, c_type ($aux->{TYPE}) . $aux->{NAME});
-       }
-       push (@args, "void") if !@args;
-
-       my ($statements) = $op->{BLOCK} || "  return $op->{EXPRESSION};\n";
-
-       print "static inline ", c_type ($op->{RETURNS}), "\n";
-       print "eval_$opname (", join (', ', @args), ")\n";
-       print "{\n";
-       print "$statements";
-       print "}\n\n";
-    }
-}
diff --git a/src/language/expressions/evaluate.hpl b/src/language/expressions/evaluate.hpl
new file mode 100644 (file)
index 0000000..c26a7cc
--- /dev/null
@@ -0,0 +1,37 @@
+use strict;
+use warnings 'all';
+
+do 'generate.pl';
+
+our (%ops);
+our (@order);
+sub generate_output {
+    print "#include \"helpers.h\"\n\n";
+
+    for my $opname (@order) {
+       my ($op) = $ops{$opname};
+       next if $op->{UNIMPLEMENTED};
+
+       my (@args);
+       for my $arg (@{$op->{ARGS}}) {
+           if (!defined $arg->{IDX}) {
+               push (@args, c_type ($arg->{TYPE}) . $arg->{NAME});
+           } else {
+               push (@args, c_type ($arg->{TYPE}) . "$arg->{NAME}" . "[]");
+               push (@args, "size_t $arg->{IDX}");
+           }
+       }
+       for my $aux (@{$op->{AUX}}) {
+           push (@args, c_type ($aux->{TYPE}) . $aux->{NAME});
+       }
+       push (@args, "void") if !@args;
+
+       my ($statements) = $op->{BLOCK} || "  return $op->{EXPRESSION};\n";
+
+       print "static inline ", c_type ($op->{RETURNS}), "\n";
+       print "eval_$opname (", join (', ', @args), ")\n";
+       print "{\n";
+       print "$statements";
+       print "}\n\n";
+    }
+}
diff --git a/src/language/expressions/evaluate.inc.pl b/src/language/expressions/evaluate.inc.pl
deleted file mode 100644 (file)
index e2fccab..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-use strict;
-use warnings 'all';
-
-do 'generate.pl';
-
-our (@order);
-our (%ops);
-
-sub generate_output {
-    for my $opname (@order) {
-       my ($op) = $ops{$opname};
-
-       if ($op->{UNIMPLEMENTED}) {
-           print "case $opname:\n";
-           print "  NOT_REACHED ();\n\n";
-           next;
-       }
-
-       my (@decls);
-       my (@args);
-       for my $arg (@{$op->{ARGS}}) {
-           my ($name) = $arg->{NAME};
-           my ($type) = $arg->{TYPE};
-           my ($c_type) = c_type ($type);
-           my ($idx) = $arg->{IDX};
-           push (@args, "arg_$arg->{NAME}");
-           if (!defined ($idx)) {
-               my ($decl) = "${c_type}arg_$name";
-               if ($type->{ROLE} eq 'any') {
-                   unshift (@decls, "$decl = *--$type->{STACK}");
-               } elsif ($type->{ROLE} eq 'leaf') {
-                   push (@decls, "$decl = op++->$type->{ATOM}");
-               } else {
-                   die;
-               }
-           } else {
-               my ($stack) = $type->{STACK};
-               defined $stack or die;
-               unshift (@decls,
-                        "$c_type*arg_$arg->{NAME} = $stack -= arg_$idx");
-               unshift (@decls, "size_t arg_$arg->{IDX} = op++->integer");
-
-               my ($idx) = "arg_$idx";
-               if ($arg->{TIMES} != 1) {
-                   $idx .= " / $arg->{TIMES}";
-               }
-               push (@args, $idx);
-           }
-       }
-       for my $aux (@{$op->{AUX}}) {
-           my ($type) = $aux->{TYPE};
-           my ($name) = $aux->{NAME};
-           if ($type->{ROLE} eq 'leaf') {
-               my ($c_type) = c_type ($type);
-               push (@decls, "${c_type}aux_$name = op++->$type->{ATOM}");
-               push (@args, "aux_$name");
-           } elsif ($type->{ROLE} eq 'fixed') {
-               push (@args, $type->{FIXED_VALUE});
-           }
-       }
-
-       my ($sysmis_cond) = make_sysmis_decl ($op, "op++->integer");
-       push (@decls, $sysmis_cond) if defined $sysmis_cond;
-
-       my ($result) = "eval_$op->{OPNAME} (" . join (', ', @args) . ")";
-
-       my ($stack) = $op->{RETURNS}{STACK};
-
-       print "case $opname:\n";
-       if (@decls) {
-           print "  {\n";
-           print "    $_;\n" foreach @decls;
-           if (defined $sysmis_cond) {
-               my ($miss_ret) = $op->{RETURNS}{MISSING_VALUE};
-               print "    *$stack++ = force_sysmis ? $miss_ret : $result;\n";
-           } else {
-               print "    *$stack++ = $result;\n";
-           }
-           print "  }\n";
-       } else {
-           print "  *$stack++ = $result;\n";
-       }
-       print "  break;\n\n";
-    }
-}
diff --git a/src/language/expressions/evaluate.incpl b/src/language/expressions/evaluate.incpl
new file mode 100644 (file)
index 0000000..e2fccab
--- /dev/null
@@ -0,0 +1,85 @@
+use strict;
+use warnings 'all';
+
+do 'generate.pl';
+
+our (@order);
+our (%ops);
+
+sub generate_output {
+    for my $opname (@order) {
+       my ($op) = $ops{$opname};
+
+       if ($op->{UNIMPLEMENTED}) {
+           print "case $opname:\n";
+           print "  NOT_REACHED ();\n\n";
+           next;
+       }
+
+       my (@decls);
+       my (@args);
+       for my $arg (@{$op->{ARGS}}) {
+           my ($name) = $arg->{NAME};
+           my ($type) = $arg->{TYPE};
+           my ($c_type) = c_type ($type);
+           my ($idx) = $arg->{IDX};
+           push (@args, "arg_$arg->{NAME}");
+           if (!defined ($idx)) {
+               my ($decl) = "${c_type}arg_$name";
+               if ($type->{ROLE} eq 'any') {
+                   unshift (@decls, "$decl = *--$type->{STACK}");
+               } elsif ($type->{ROLE} eq 'leaf') {
+                   push (@decls, "$decl = op++->$type->{ATOM}");
+               } else {
+                   die;
+               }
+           } else {
+               my ($stack) = $type->{STACK};
+               defined $stack or die;
+               unshift (@decls,
+                        "$c_type*arg_$arg->{NAME} = $stack -= arg_$idx");
+               unshift (@decls, "size_t arg_$arg->{IDX} = op++->integer");
+
+               my ($idx) = "arg_$idx";
+               if ($arg->{TIMES} != 1) {
+                   $idx .= " / $arg->{TIMES}";
+               }
+               push (@args, $idx);
+           }
+       }
+       for my $aux (@{$op->{AUX}}) {
+           my ($type) = $aux->{TYPE};
+           my ($name) = $aux->{NAME};
+           if ($type->{ROLE} eq 'leaf') {
+               my ($c_type) = c_type ($type);
+               push (@decls, "${c_type}aux_$name = op++->$type->{ATOM}");
+               push (@args, "aux_$name");
+           } elsif ($type->{ROLE} eq 'fixed') {
+               push (@args, $type->{FIXED_VALUE});
+           }
+       }
+
+       my ($sysmis_cond) = make_sysmis_decl ($op, "op++->integer");
+       push (@decls, $sysmis_cond) if defined $sysmis_cond;
+
+       my ($result) = "eval_$op->{OPNAME} (" . join (', ', @args) . ")";
+
+       my ($stack) = $op->{RETURNS}{STACK};
+
+       print "case $opname:\n";
+       if (@decls) {
+           print "  {\n";
+           print "    $_;\n" foreach @decls;
+           if (defined $sysmis_cond) {
+               my ($miss_ret) = $op->{RETURNS}{MISSING_VALUE};
+               print "    *$stack++ = force_sysmis ? $miss_ret : $result;\n";
+           } else {
+               print "    *$stack++ = $result;\n";
+           }
+           print "  }\n";
+       } else {
+           print "  *$stack++ = $result;\n";
+       }
+       print "  break;\n\n";
+    }
+}
index 85705098a2df44e2ad0e39da0764f75684bc9407..7e9e1d6cb542f8b15216c31fe8d9e90788609259 100644 (file)
@@ -30,8 +30,8 @@ expr_error (void *aux UNUSED, const char *format, ...)
   struct msg m;
   va_list args;
 
-  m.category = MSG_SYNTAX;
-  m.severity = MSG_ERROR;
+  m.category = MSG_C_SYNTAX;
+  m.severity = MSG_S_ERROR;
   va_start (args, format);
   m.text = xvasprintf (format, args);
   va_end (args);
diff --git a/src/language/expressions/operations.h.pl b/src/language/expressions/operations.h.pl
deleted file mode 100644 (file)
index 8e6e120..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-use strict;
-use warnings 'all';
-
-do 'generate.pl';
-our (@types, @funcs, @opers);
-
-sub generate_output {
-    print "#include <stdlib.h>\n";
-    print "#include <stdbool.h>\n\n";
-
-    print "typedef enum";
-    print "  {\n";
-    my (@atoms);
-    foreach my $type (@types) {
-       next if $type->{ROLE} eq 'fixed';
-       push (@atoms, "OP_$type->{NAME}");
-    }
-    print_operations ('atom', 1, \@atoms);
-    print_operations ('function', "OP_atom_last + 1", \@funcs);
-    print_operations ('operator', "OP_function_last + 1", \@opers);
-    print_range ("OP_composite", "OP_function_first", "OP_operator_last");
-    print ",\n\n";
-    print_range ("OP", "OP_atom_first", "OP_composite_last");
-    print "\n  }\n";
-    print "operation_type, atom_type;\n";
-
-    print_predicate ('is_operation', 'OP');
-    print_predicate ("is_$_", "OP_$_")
-       foreach qw (atom composite function operator);
-}
-
-sub print_operations {
-    my ($type, $first, $names) = @_;
-    print "    /* \u$type types. */\n";
-    print "    $names->[0] = $first,\n";
-    print "    $_,\n" foreach @$names[1...$#{$names}];
-    print_range ("OP_$type", $names->[0], $names->[$#{$names}]);
-    print ",\n\n";
-}
-
-sub print_range {
-    my ($prefix, $first, $last) = @_;
-    print "    ${prefix}_first = $first,\n";
-    print "    ${prefix}_last = $last,\n";
-    print "    ${prefix}_cnt = ${prefix}_last - ${prefix}_first + 1";
-}
-
-sub print_predicate {
-    my ($function, $category) = @_;
-    my ($assertion) = "";
-
-    print "\nstatic inline bool\n";
-    print "$function (operation_type op)\n";
-    print "{\n";
-    print "  assert (is_operation (op));\n" if $function ne 'is_operation';
-    print "  return op >= ${category}_first && op <= ${category}_last;\n";
-    print "}\n";
-}
diff --git a/src/language/expressions/operations.hpl b/src/language/expressions/operations.hpl
new file mode 100644 (file)
index 0000000..8e6e120
--- /dev/null
@@ -0,0 +1,58 @@
+use strict;
+use warnings 'all';
+
+do 'generate.pl';
+our (@types, @funcs, @opers);
+
+sub generate_output {
+    print "#include <stdlib.h>\n";
+    print "#include <stdbool.h>\n\n";
+
+    print "typedef enum";
+    print "  {\n";
+    my (@atoms);
+    foreach my $type (@types) {
+       next if $type->{ROLE} eq 'fixed';
+       push (@atoms, "OP_$type->{NAME}");
+    }
+    print_operations ('atom', 1, \@atoms);
+    print_operations ('function', "OP_atom_last + 1", \@funcs);
+    print_operations ('operator', "OP_function_last + 1", \@opers);
+    print_range ("OP_composite", "OP_function_first", "OP_operator_last");
+    print ",\n\n";
+    print_range ("OP", "OP_atom_first", "OP_composite_last");
+    print "\n  }\n";
+    print "operation_type, atom_type;\n";
+
+    print_predicate ('is_operation', 'OP');
+    print_predicate ("is_$_", "OP_$_")
+       foreach qw (atom composite function operator);
+}
+
+sub print_operations {
+    my ($type, $first, $names) = @_;
+    print "    /* \u$type types. */\n";
+    print "    $names->[0] = $first,\n";
+    print "    $_,\n" foreach @$names[1...$#{$names}];
+    print_range ("OP_$type", $names->[0], $names->[$#{$names}]);
+    print ",\n\n";
+}
+
+sub print_range {
+    my ($prefix, $first, $last) = @_;
+    print "    ${prefix}_first = $first,\n";
+    print "    ${prefix}_last = $last,\n";
+    print "    ${prefix}_cnt = ${prefix}_last - ${prefix}_first + 1";
+}
+
+sub print_predicate {
+    my ($function, $category) = @_;
+    my ($assertion) = "";
+
+    print "\nstatic inline bool\n";
+    print "$function (operation_type op)\n";
+    print "{\n";
+    print "  assert (is_operation (op));\n" if $function ne 'is_operation';
+    print "  return op >= ${category}_first && op <= ${category}_last;\n";
+    print "}\n";
+}
diff --git a/src/language/expressions/optimize.inc.pl b/src/language/expressions/optimize.inc.pl
deleted file mode 100644 (file)
index c441774..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-use strict;
-use warnings 'all';
-
-do 'generate.pl';
-our (@order, %ops);
-
-sub generate_output {
-    for my $opname (@order) {
-       my ($op) = $ops{$opname};
-
-       if (!$op->{OPTIMIZABLE} || $op->{UNIMPLEMENTED}) {
-           print "case $opname:\n";
-           print "  NOT_REACHED ();\n\n";
-           next;
-       }
-
-       my (@decls);
-       my ($arg_idx) = 0;
-       for my $arg (@{$op->{ARGS}}) {
-           my ($decl);
-           my ($name) = $arg->{NAME};
-           my ($type) = $arg->{TYPE};
-           my ($ctype) = c_type ($type);
-           my ($idx) = $arg->{IDX};
-           if (!defined ($idx)) {
-               my ($func) = "get_$type->{ATOM}_arg";
-               push (@decls, "${ctype}arg_$name = $func (node, $arg_idx)");
-           } else {
-               my ($decl) = "size_t arg_$idx = node->arg_cnt";
-               $decl .= " - $arg_idx" if $arg_idx;
-               push (@decls, $decl);
-
-               push (@decls, "${ctype}*arg_$name = "
-                     . "get_$type->{ATOM}_args "
-                     . " (node, $arg_idx, arg_$idx, e)");
-           }
-           $arg_idx++;
-       }
-
-       my ($sysmis_cond) = make_sysmis_decl ($op, "node->min_valid");
-       push (@decls, $sysmis_cond) if defined $sysmis_cond;
-
-       my (@args);
-       for my $arg (@{$op->{ARGS}}) {
-           push (@args, "arg_$arg->{NAME}");
-           if (defined $arg->{IDX}) {
-               my ($idx) = "arg_$arg->{IDX}";
-               $idx .= " / $arg->{TIMES}" if $arg->{TIMES} != 1;
-               push (@args, $idx);
-           }
-       }
-       for my $aux (@{$op->{AUX}}) {
-           my ($type) = $aux->{TYPE};
-           if ($type->{ROLE} eq 'leaf') {
-               my ($func) = "get_$type->{ATOM}_arg";
-               push (@args, "$func (node, $arg_idx)");
-               $arg_idx++;
-           } elsif ($type->{ROLE} eq 'fixed') {
-               push (@args, $type->{FIXED_VALUE});
-           } else {
-               die;
-           }
-       }
-
-       my ($result) = "eval_$op->{OPNAME} (" . join (', ', @args) . ")";
-       if (@decls && defined ($sysmis_cond)) {
-           my ($miss_ret) = $op->{RETURNS}{MISSING_VALUE};
-           push (@decls, c_type ($op->{RETURNS}) . "result = "
-                 . "force_sysmis ? $miss_ret : $result");
-           $result = "result";
-       }
-
-       print "case $opname:\n";
-       my ($alloc_func) = "expr_allocate_$op->{RETURNS}{NAME}";
-       if (@decls) {
-           print "  {\n";
-           print "    $_;\n" foreach @decls;
-           print "    return $alloc_func (e, $result);\n";
-           print "  }\n";
-       } else {
-           print "  return $alloc_func (e, $result);\n";
-       }
-       print "\n";
-    }
-}
diff --git a/src/language/expressions/optimize.incpl b/src/language/expressions/optimize.incpl
new file mode 100644 (file)
index 0000000..c441774
--- /dev/null
@@ -0,0 +1,85 @@
+use strict;
+use warnings 'all';
+
+do 'generate.pl';
+our (@order, %ops);
+
+sub generate_output {
+    for my $opname (@order) {
+       my ($op) = $ops{$opname};
+
+       if (!$op->{OPTIMIZABLE} || $op->{UNIMPLEMENTED}) {
+           print "case $opname:\n";
+           print "  NOT_REACHED ();\n\n";
+           next;
+       }
+
+       my (@decls);
+       my ($arg_idx) = 0;
+       for my $arg (@{$op->{ARGS}}) {
+           my ($decl);
+           my ($name) = $arg->{NAME};
+           my ($type) = $arg->{TYPE};
+           my ($ctype) = c_type ($type);
+           my ($idx) = $arg->{IDX};
+           if (!defined ($idx)) {
+               my ($func) = "get_$type->{ATOM}_arg";
+               push (@decls, "${ctype}arg_$name = $func (node, $arg_idx)");
+           } else {
+               my ($decl) = "size_t arg_$idx = node->arg_cnt";
+               $decl .= " - $arg_idx" if $arg_idx;
+               push (@decls, $decl);
+
+               push (@decls, "${ctype}*arg_$name = "
+                     . "get_$type->{ATOM}_args "
+                     . " (node, $arg_idx, arg_$idx, e)");
+           }
+           $arg_idx++;
+       }
+
+       my ($sysmis_cond) = make_sysmis_decl ($op, "node->min_valid");
+       push (@decls, $sysmis_cond) if defined $sysmis_cond;
+
+       my (@args);
+       for my $arg (@{$op->{ARGS}}) {
+           push (@args, "arg_$arg->{NAME}");
+           if (defined $arg->{IDX}) {
+               my ($idx) = "arg_$arg->{IDX}";
+               $idx .= " / $arg->{TIMES}" if $arg->{TIMES} != 1;
+               push (@args, $idx);
+           }
+       }
+       for my $aux (@{$op->{AUX}}) {
+           my ($type) = $aux->{TYPE};
+           if ($type->{ROLE} eq 'leaf') {
+               my ($func) = "get_$type->{ATOM}_arg";
+               push (@args, "$func (node, $arg_idx)");
+               $arg_idx++;
+           } elsif ($type->{ROLE} eq 'fixed') {
+               push (@args, $type->{FIXED_VALUE});
+           } else {
+               die;
+           }
+       }
+
+       my ($result) = "eval_$op->{OPNAME} (" . join (', ', @args) . ")";
+       if (@decls && defined ($sysmis_cond)) {
+           my ($miss_ret) = $op->{RETURNS}{MISSING_VALUE};
+           push (@decls, c_type ($op->{RETURNS}) . "result = "
+                 . "force_sysmis ? $miss_ret : $result");
+           $result = "result";
+       }
+
+       print "case $opname:\n";
+       my ($alloc_func) = "expr_allocate_$op->{RETURNS}{NAME}";
+       if (@decls) {
+           print "  {\n";
+           print "    $_;\n" foreach @decls;
+           print "    return $alloc_func (e, $result);\n";
+           print "  }\n";
+       } else {
+           print "  return $alloc_func (e, $result);\n";
+       }
+       print "\n";
+    }
+}
index bdce53c5827540afe92e985991f6f045da057c2d..3577443da94194a5317e80d9abcd5a42f87ffd99 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -577,7 +577,7 @@ parse_binary_operators (struct lexer *lexer, struct expression *e, union any_nod
     }
 
   if (op_count > 1 && chain_warning != NULL)
-    msg (SW, chain_warning);
+    msg (SW, "%s", chain_warning);
 
   return node;
 }
diff --git a/src/language/expressions/parse.inc.pl b/src/language/expressions/parse.inc.pl
deleted file mode 100644 (file)
index 4e7243c..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-use strict;
-use warnings 'all';
-
-do 'generate.pl';
-our (@types, @order, %ops);
-
-sub generate_output {
-    my (@members) = ("\"\"", "\"\"", 0, 0, 0, "{}", 0, 0);
-    print "{", join (', ', @members), "},\n";
-
-    for my $type (@types) {
-       next if $type->{ROLE} eq 'fixed';
-
-       my ($human_name) = $type->{HUMAN_NAME};
-       $human_name = "" if !defined $human_name;
-       
-       my (@members) = ("\"$type->{NAME}\"", "\"\"",
-                        0, "OP_$type->{NAME}", 0, "{}", 0, 0);
-       print "{", join (', ', @members), "},\n";
-    }
-
-    for my $opname (@order) {
-       my ($op) = $ops{$opname};
-
-       my (@members);
-
-       push (@members, "\"$op->{NAME}\"");
-
-       if ($op->{CATEGORY} eq 'function') {
-           my (@args, @opt_args);
-           for my $arg (@{$op->{ARGS}}) {
-               push (@args, $arg->{TYPE}{HUMAN_NAME}) if !defined $arg->{IDX};
-           }
-
-           if (my ($array) = array_arg ($op)) {
-               if (!defined $op->{MIN_VALID}) {
-                   my (@array_args);
-                   for (my $i = 0; $i < $array->{TIMES}; $i++) {
-                       push (@array_args, $array->{TYPE}{HUMAN_NAME});
-                   }
-                   push (@args, @array_args);
-                   @opt_args = @array_args;
-               } else {
-                   for (my $i = 0; $i < $op->{MIN_VALID}; $i++) {
-                       push (@args, $array->{TYPE}{HUMAN_NAME});
-                   }
-                   push (@opt_args, $array->{TYPE}{HUMAN_NAME});
-               }
-           }
-           my ($human) = "$op->{NAME}(" . join (', ', @args);
-           $human .= '[, ' . join (', ', @opt_args) . ']...' if @opt_args;
-           $human .= ')';
-           push (@members, "\"$human\"");
-       } else {
-           push (@members, "NULL");
-       }
-
-       my (@flags);
-       push (@flags, "OPF_ABSORB_MISS") if defined $op->{ABSORB_MISS};
-       push (@flags, "OPF_ARRAY_OPERAND") if array_arg ($op);
-       push (@flags, "OPF_MIN_VALID") if defined $op->{MIN_VALID};
-       push (@flags, "OPF_NONOPTIMIZABLE") if !$op->{OPTIMIZABLE};
-       push (@flags, "OPF_EXTENSION") if $op->{EXTENSION};
-       push (@flags, "OPF_UNIMPLEMENTED") if $op->{UNIMPLEMENTED};
-       push (@flags, "OPF_PERM_ONLY") if $op->{PERM_ONLY};
-       push (@flags, "OPF_NO_ABBREV") if $op->{NO_ABBREV};
-       push (@members, @flags ? join (' | ', @flags) : 0);
-
-       push (@members, "OP_$op->{RETURNS}{NAME}");
-
-       push (@members, scalar (@{$op->{ARGS}}));
-
-       my (@arg_types) = map ("OP_$_->{TYPE}{NAME}", @{$op->{ARGS}});
-       push (@members, "{" . join (', ', @arg_types) . "}");
-
-       push (@members, $op->{MIN_VALID} || 0);
-
-       push (@members, array_arg ($op) ? ${array_arg ($op)}{TIMES} : 0);
-
-       print "{", join (', ', @members), "},\n";
-    }
-}
diff --git a/src/language/expressions/parse.incpl b/src/language/expressions/parse.incpl
new file mode 100644 (file)
index 0000000..4e7243c
--- /dev/null
@@ -0,0 +1,82 @@
+use strict;
+use warnings 'all';
+
+do 'generate.pl';
+our (@types, @order, %ops);
+
+sub generate_output {
+    my (@members) = ("\"\"", "\"\"", 0, 0, 0, "{}", 0, 0);
+    print "{", join (', ', @members), "},\n";
+
+    for my $type (@types) {
+       next if $type->{ROLE} eq 'fixed';
+
+       my ($human_name) = $type->{HUMAN_NAME};
+       $human_name = "" if !defined $human_name;
+       
+       my (@members) = ("\"$type->{NAME}\"", "\"\"",
+                        0, "OP_$type->{NAME}", 0, "{}", 0, 0);
+       print "{", join (', ', @members), "},\n";
+    }
+
+    for my $opname (@order) {
+       my ($op) = $ops{$opname};
+
+       my (@members);
+
+       push (@members, "\"$op->{NAME}\"");
+
+       if ($op->{CATEGORY} eq 'function') {
+           my (@args, @opt_args);
+           for my $arg (@{$op->{ARGS}}) {
+               push (@args, $arg->{TYPE}{HUMAN_NAME}) if !defined $arg->{IDX};
+           }
+
+           if (my ($array) = array_arg ($op)) {
+               if (!defined $op->{MIN_VALID}) {
+                   my (@array_args);
+                   for (my $i = 0; $i < $array->{TIMES}; $i++) {
+                       push (@array_args, $array->{TYPE}{HUMAN_NAME});
+                   }
+                   push (@args, @array_args);
+                   @opt_args = @array_args;
+               } else {
+                   for (my $i = 0; $i < $op->{MIN_VALID}; $i++) {
+                       push (@args, $array->{TYPE}{HUMAN_NAME});
+                   }
+                   push (@opt_args, $array->{TYPE}{HUMAN_NAME});
+               }
+           }
+           my ($human) = "$op->{NAME}(" . join (', ', @args);
+           $human .= '[, ' . join (', ', @opt_args) . ']...' if @opt_args;
+           $human .= ')';
+           push (@members, "\"$human\"");
+       } else {
+           push (@members, "NULL");
+       }
+
+       my (@flags);
+       push (@flags, "OPF_ABSORB_MISS") if defined $op->{ABSORB_MISS};
+       push (@flags, "OPF_ARRAY_OPERAND") if array_arg ($op);
+       push (@flags, "OPF_MIN_VALID") if defined $op->{MIN_VALID};
+       push (@flags, "OPF_NONOPTIMIZABLE") if !$op->{OPTIMIZABLE};
+       push (@flags, "OPF_EXTENSION") if $op->{EXTENSION};
+       push (@flags, "OPF_UNIMPLEMENTED") if $op->{UNIMPLEMENTED};
+       push (@flags, "OPF_PERM_ONLY") if $op->{PERM_ONLY};
+       push (@flags, "OPF_NO_ABBREV") if $op->{NO_ABBREV};
+       push (@members, @flags ? join (' | ', @flags) : 0);
+
+       push (@members, "OP_$op->{RETURNS}{NAME}");
+
+       push (@members, scalar (@{$op->{ARGS}}));
+
+       my (@arg_types) = map ("OP_$_->{TYPE}{NAME}", @{$op->{ARGS}});
+       push (@members, "{" . join (', ', @arg_types) . "}");
+
+       push (@members, $op->{MIN_VALID} || 0);
+
+       push (@members, array_arg ($op) ? ${array_arg ($op)}{TIMES} : 0);
+
+       print "{", join (', ', @members), "},\n";
+    }
+}
index 8b3f2a48d00474811a09c090f8a82d1b75ed7546..1c35642f874daa9ef8447522af7428a34f89d023 100644 (file)
@@ -32,6 +32,7 @@
 #include <libpspp/getl.h>
 #include <libpspp/str.h>
 #include <output/journal.h>
+#include <output/text-item.h>
 
 #include "xalloc.h"
 
@@ -873,16 +874,16 @@ lex_preprocess_line (struct string *line,
     }
 }
 
-/* Reads a line, without performing any preprocessing.
-   Sets *SYNTAX, if SYNTAX is non-null, to the line's syntax
-   mode. */
+/* Reads a line, without performing any preprocessing. */
 bool
 lex_get_line_raw (struct lexer *lexer)
 {
   bool ok = getl_read_line (lexer->ss, &lexer->line_buffer);
-  enum syntax_mode mode = lex_current_syntax_mode (lexer);
-  journal_write (mode == GETL_BATCH, ds_cstr (&lexer->line_buffer));
-
+  if (ok)
+    {
+      const char *line = ds_cstr (&lexer->line_buffer);
+      text_item_submit (text_item_create (TEXT_ITEM_SYNTAX, line));
+    }
   return ok;
 }
 
index be0f29c5216ac392209e3e075a6df469208b54b2..f2617092b3368c6173a4676ee549b3bf7cb320d5 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2008, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -83,8 +83,6 @@ static char *tokstr;
 \f
 /* Utility functions. */
 
-static char nullstr[] = "";
-
 /* Close all open files and delete the output file, on failure. */
 static void
 finish_up (void)
@@ -108,8 +106,8 @@ hcf (void)
   exit (EXIT_FAILURE);
 }
 
-int fail (const char *, ...) PRINTF_FORMAT (1, 2);
-int error (const char *, ...) PRINTF_FORMAT (1, 2);
+int fail (const char *, ...) PRINTF_FORMAT (1, 2) NO_RETURN;
+int error (const char *, ...) PRINTF_FORMAT (1, 2) NO_RETURN;
 
 /* Output an error message and terminate unsuccessfully. */
 int
@@ -974,6 +972,19 @@ dump (int indention, const char *format, ...)
     indent += BASE_INDENT * indention;
 }
 
+/* Writes a blank line to the output file and adjusts 'indent' by BASE_INDENT
+   * INDENTION characters.
+
+   (This is only useful because GCC complains about using "" as a format
+   string, for whatever reason.) */
+static void
+dump_blank_line (int indention)
+{
+  oln++;
+  indent += BASE_INDENT * indention;
+  putc ('\n', out);
+}
+
 /* Write the structure members for specifier SPEC to the output file.
    SBC is the including subcommand. */
 static void
@@ -1069,7 +1080,7 @@ dump_declarations (void)
          if (buf == NULL)
            buf = xmalloc (1024);
          else
-           dump (0, buf);
+           dump (0, "%s", buf);
 
          if (k)
            sprintf (buf, "%s%s,", st_upper (prefix), sym->name);
@@ -1082,13 +1093,13 @@ dump_declarations (void)
     if (buf)
       {
        buf[strlen (buf) - 1] = 0;
-       dump (0, buf);
+       dump (0, "%s", buf);
        free (buf);
       }
     if (f)
       {
        dump (-1, "};");
-       dump (-1, nullstr);
+       dump_blank_line (-1);
       }
   }
 
@@ -1122,7 +1133,7 @@ dump_declarations (void)
            dump (0, "%s%scount", st_upper (prefix), st_upper (sbc->prefix));
 
            dump (-1, "};");
-           dump (-1, nullstr);
+           dump_blank_line (-1);
          }
        }
   }
@@ -1139,7 +1150,7 @@ dump_declarations (void)
        int f = 0;
 
        if (sbc != subcommands)
-         dump (0, nullstr);
+         dump_blank_line (0);
 
        dump (0, "/* %s subcommand. */", sbc->name);
        dump (0, "int sbc_%s;", st_lower (sbc->name));
@@ -1217,7 +1228,7 @@ dump_declarations (void)
       }
 
     dump (-1, "};");
-    dump (-1, nullstr);
+    dump_blank_line (-1);
   }
 
   /* Write out prototypes for custom_*() functions as necessary. */
@@ -1240,7 +1251,7 @@ dump_declarations (void)
        }
 
     if (seen)
-      dump (0, nullstr);
+      dump_blank_line (0);
   }
 
   /* Prototypes for parsing and freeing functions. */
@@ -1250,7 +1261,7 @@ dump_declarations (void)
          make_identifier (cmdname), make_identifier (cmdname));
     dump (0, "static void free_%s (struct cmd_%s *);",
          make_identifier (cmdname), make_identifier (cmdname));
-    dump (0, nullstr);
+    dump_blank_line (0);
   }
 }
 
@@ -1912,13 +1923,13 @@ dump_parser (int persistent)
   dump (0, "break;");
   dump (-2, "}");
   outdent ();
-  dump (0, nullstr);
+  dump_blank_line (0);
   dump (1, "if (lex_token (lexer) != '.')");
   dump (1, "{");
   dump (0, "lex_error (lexer, _(\"expecting end of command\"));");
   dump (0, "goto lossage;");
   dump (-1, "}");
-  dump (0, nullstr);
+  dump_blank_line (0);
 
   outdent ();
 
@@ -1937,19 +1948,19 @@ dump_parser (int persistent)
                  sbc->name);
            dump (0, "goto lossage;");
            dump (-1, "}");
-           dump (0, nullstr);
+           dump_blank_line (0);
          }
       }
   }
 
   dump (-1, "return true;");
-  dump (0, nullstr);
+  dump_blank_line (0);
   dump (-1, "lossage:");
   indent ();
   dump (0, "free_%s (p);", make_identifier (cmdname));
   dump (0, "return false;");
   dump (-1, "}");
-  dump (0, nullstr);
+  dump_blank_line (0);
 }
 
 
@@ -1959,7 +1970,7 @@ dump_header (void)
 {
   indent = 0;
   dump (0,   "/* %s\t\t-*- mode: c; buffer-read-only: t -*-", ofn);
-  dump (0, nullstr);
+  dump_blank_line (0);
   dump (0, "   Generated by q2c from %s.", ifn);
   dump (0, "   Do not modify!");
   dump (0, " */");
@@ -2123,14 +2134,14 @@ main (int argc, char *argv[])
          dump (0, "#include <libpspp/str.h>");
           dump (0, "#include <language/lexer/subcommand-list.h>");
          dump (0, "#include <data/variable.h>");
-         dump (0, nullstr);
+         dump_blank_line (0);
 
           dump (0, "#include \"xalloc.h\"");
-         dump (0, nullstr);
+         dump_blank_line (0);
 
           dump (0, "#include \"gettext.h\"");
           dump (0, "#define _(msgid) gettext (msgid)");
-         dump (0, nullstr);
+         dump_blank_line (0);
        }
       else if (!strcmp (directive, "declarations"))
        dump_declarations ();
index 1194110efa3ac850ed1584451e2782ec12870b83..b9d67523eeda711ed52501425d8ff9fa99ed0c54 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include <language/lexer/variable-parser.h>
+#include "language/lexer/variable-parser.h"
 
 #include <ctype.h>
 #include <stdbool.h>
 #include <stdlib.h>
 
-#include "lexer.h"
-#include <data/dictionary.h>
-#include <data/procedure.h>
-#include <data/variable.h>
-#include <libpspp/assertion.h>
-#include <libpspp/bit-vector.h>
-#include <libpspp/hash.h>
-#include <libpspp/message.h>
-#include <libpspp/misc.h>
-#include <libpspp/pool.h>
-#include <libpspp/str.h>
-
-#include "xalloc.h"
+#include "data/dictionary.h"
+#include "data/procedure.h"
+#include "data/variable.h"
+#include "language/lexer/lexer.h"
+#include "libpspp/assertion.h"
+#include "libpspp/cast.h"
+#include "libpspp/hash-functions.h"
+#include "libpspp/hmapx.h"
+#include "libpspp/message.h"
+#include "libpspp/misc.h"
+#include "libpspp/pool.h"
+#include "libpspp/str.h"
+#include "libpspp/stringi-set.h"
+
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -399,7 +401,8 @@ extract_num (char *s, char *r, int *n, int *d)
 /* Parses a list of variable names according to the DATA LIST version
    of the TO convention.  */
 bool
-parse_DATA_LIST_vars (struct lexer *lexer, char ***names, size_t *nnames, int pv_opts)
+parse_DATA_LIST_vars (struct lexer *lexer, char ***names,
+                      size_t *nnames, int pv_opts)
 {
   int n1, n2;
   int d1, d2;
@@ -407,16 +410,27 @@ parse_DATA_LIST_vars (struct lexer *lexer, char ***names, size_t *nnames, int pv
   size_t nvar, mvar;
   char name1[VAR_NAME_LEN + 1], name2[VAR_NAME_LEN + 1];
   char root1[VAR_NAME_LEN + 1], root2[VAR_NAME_LEN + 1];
+  struct stringi_set set;
   int success = 0;
 
   assert (names != NULL);
   assert (nnames != NULL);
   assert ((pv_opts & ~(PV_APPEND | PV_SINGLE
                        | PV_NO_SCRATCH | PV_NO_DUPLICATE)) == 0);
-  /* FIXME: PV_NO_DUPLICATE is not implemented. */
+  stringi_set_init (&set);
 
   if (pv_opts & PV_APPEND)
-    nvar = mvar = *nnames;
+    {
+      nvar = mvar = *nnames;
+
+      if (pv_opts & PV_NO_DUPLICATE)
+        {
+          size_t i;
+
+          for (i = 0; i < nvar; i++)
+            stringi_set_insert (&set, (*names)[i]);
+        }
+    }
   else
     {
       nvar = mvar = 0;
@@ -476,6 +490,13 @@ parse_DATA_LIST_vars (struct lexer *lexer, char ***names, size_t *nnames, int pv
            {
               char name[VAR_NAME_LEN + 1];
              sprintf (name, "%s%0*d", root1, d1, n);
+
+              if (pv_opts & PV_NO_DUPLICATE && !stringi_set_insert (&set, name))
+                {
+                  msg (SE, _("Variable %s appears twice in variable list."),
+                       name);
+                  goto fail;
+                }
              (*names)[nvar] = xstrdup (name);
              nvar++;
            }
@@ -500,6 +521,7 @@ parse_DATA_LIST_vars (struct lexer *lexer, char ***names, size_t *nnames, int pv
 
 fail:
   *nnames = nvar;
+  stringi_set_destroy (&set);
   if (!success)
     {
       int i;
@@ -738,7 +760,7 @@ struct array_var_set
   {
     struct variable *const *var;/* Array of variables. */
     size_t var_cnt;             /* Number of elements in var. */
-    struct hsh_table *name_tab; /* Hash from variable names to variables. */
+    struct hmapx vars_by_name;  /* Variables hashed by name. */
   };
 
 /* Returns the number of variables in VS. */
@@ -757,7 +779,7 @@ array_var_set_get_var (const struct var_set *vs, size_t idx)
 {
   struct array_var_set *avs = vs->aux;
 
-  return (struct variable *) avs->var[idx];
+  return CONST_CAST (struct variable *, avs->var[idx]);
 }
 
 /* If VS contains a variable named NAME, sets *IDX to its index
@@ -767,19 +789,18 @@ array_var_set_lookup_var_idx (const struct var_set *vs, const char *name,
                               size_t *idx)
 {
   struct array_var_set *avs = vs->aux;
-  struct variable *v, *const *vpp;
+  struct hmapx_node *node;
+  struct variable **varp;
 
-  v = var_create (name, 0);
-  vpp = hsh_find (avs->name_tab, &v);
-  var_destroy (v);
+  HMAPX_FOR_EACH_WITH_HASH (varp, node, hash_case_string (name, 0),
+                            &avs->vars_by_name)
+    if (!strcasecmp (name, var_get_name (*varp)))
+      {
+        *idx = varp - avs->var;
+        return true;
+      }
 
-  if (vpp != NULL)
-    {
-      *idx = vpp - avs->var;
-      return true;
-    }
-  else
-    return false;
+  return false;
 }
 
 /* Destroys VS. */
@@ -788,13 +809,12 @@ array_var_set_destroy (struct var_set *vs)
 {
   struct array_var_set *avs = vs->aux;
 
-  hsh_destroy (avs->name_tab);
+  hmapx_destroy (&avs->vars_by_name);
   free (avs);
   free (vs);
 }
 
-/* Returns a variable set based on the VAR_CNT variables in
-   VAR. */
+/* Returns a variable set based on the VAR_CNT variables in VAR. */
 struct var_set *
 var_set_create_from_array (struct variable *const *var, size_t var_cnt)
 {
@@ -810,15 +830,20 @@ var_set_create_from_array (struct variable *const *var, size_t var_cnt)
   vs->aux = avs = xmalloc (sizeof *avs);
   avs->var = var;
   avs->var_cnt = var_cnt;
-  avs->name_tab = hsh_create (2 * var_cnt,
-                              compare_var_ptrs_by_name, hash_var_ptr_by_name,
-                              NULL, NULL);
+  hmapx_init (&avs->vars_by_name);
   for (i = 0; i < var_cnt; i++)
-    if (hsh_insert (avs->name_tab, (void *) &var[i]) != NULL)
-      {
-        var_set_destroy (vs);
-        return NULL;
-      }
+    {
+      const char *name = var_get_name (var[i]);
+      size_t idx;
+
+      if (array_var_set_lookup_var_idx (vs, name, &idx))
+        {
+          var_set_destroy (vs);
+          return NULL;
+        }
+      hmapx_insert (&avs->vars_by_name, CONST_CAST (void *, &avs->var[i]),
+                    hash_case_string (name, 0));
+    }
 
   return vs;
 }
index 5ecd42fb34fa6b91a2322aecbecc3f400af43f7d..ede6a5e3b9c8c76d5b5d249113bc2537e3cff82d 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -31,9 +31,8 @@
 #include <libpspp/message.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
-#include <libpspp/verbose-msg.h>
 #include <libpspp/version.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include "xalloc.h"
 
index 08d2f5e15c7d06176f1787b5e81017c7da54ad83..42f330d5d21a64b141a963b82ce1bbcae49a7c3e 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -196,6 +196,7 @@ cmd_aggregate (struct lexer *lexer, struct dataset *ds)
   dict_set_documents (agr.dict, dict_get_documents (dict));
 
   /* OUTFILE subcommand must be first. */
+  lex_match (lexer, '/');
   if (!lex_force_match_id (lexer, "OUTFILE"))
     goto error;
   lex_match (lexer, '=');
@@ -236,8 +237,7 @@ cmd_aggregate (struct lexer *lexer, struct dataset *ds)
           agr.break_var_cnt = subcase_get_n_fields (&agr.sort);
 
           for (i = 0; i < agr.break_var_cnt; i++)
-            dict_clone_var_assert (agr.dict, agr.break_vars[i],
-                                   var_get_name (agr.break_vars[i]));
+            dict_clone_var_assert (agr.dict, agr.break_vars[i]);
 
           /* BREAK must follow the options. */
           break;
@@ -391,7 +391,8 @@ parse_aggregate_functions (struct lexer *lexer, const struct dictionary *dict,
          size_t n_dest_prev = n_dest;
 
          if (!parse_DATA_LIST_vars (lexer, &dest, &n_dest,
-                                     PV_APPEND | PV_SINGLE | PV_NO_SCRATCH))
+                                     (PV_APPEND | PV_SINGLE | PV_NO_SCRATCH
+                                      | PV_NO_DUPLICATE)))
            goto error;
 
          /* Assign empty labels. */
@@ -581,7 +582,7 @@ parse_aggregate_functions (struct lexer *lexer, const struct dictionary *dict,
                  }
 
                if (function->alpha_type == VAL_STRING)
-                 destvar = dict_clone_var (agr->dict, v->src, dest[i]);
+                 destvar = dict_clone_var_as (agr->dict, v->src, dest[i]);
                else
                   {
                     assert (var_is_numeric (v->src)
@@ -711,8 +712,8 @@ agr_destroy (struct agr_proc *agr)
       else if (iter->function == SD)
         moments1_destroy (iter->moments);
 
-      var_destroy (iter->subject);
-      var_destroy (iter->weight);
+      dict_destroy_internal_var (iter->subject);
+      dict_destroy_internal_var (iter->weight);
 
       free (iter);
     }
@@ -965,20 +966,20 @@ dump_aggregate_info (struct agr_proc *agr, struct casewriter *output)
          case MEDIAN:
            {
              struct casereader *sorted_reader;
-             struct order_stats *median = percentile_create (0.5, i->cc);
+             struct percentile *median = percentile_create (0.5, i->cc);
+              struct order_stats *os = &median->parent;
 
              sorted_reader = casewriter_make_reader (i->writer);
 
-             order_stats_accumulate (&median, 1,
+             order_stats_accumulate (&os, 1,
                                      sorted_reader,
                                      i->weight,
                                      i->subject,
                                      i->exclude);
 
-             v->f = percentile_calculate ((struct percentile *) median,
-                                          PC_HAVERAGE);
+             v->f = percentile_calculate (median, PC_HAVERAGE);
 
-             statistic_destroy ((struct statistic *) median);
+             statistic_destroy (&median->parent.parent);
            }
            break;
          case SD:
@@ -1105,10 +1106,10 @@ initialize_aggregate_info (struct agr_proc *agr, const struct ccase *input)
             proto = caseproto_add_width (proto, 0);
 
            if ( ! iter->subject)
-             iter->subject = var_create_internal (0, 0);
+             iter->subject = dict_create_internal_var (0, 0);
 
            if ( ! iter->weight)
-             iter->weight = var_create_internal (1, 0);
+             iter->weight = dict_create_internal_var (1, 0);
 
             subcase_init_var (&ordering, iter->subject, SC_ASCEND);
            iter->writer = sort_create_writer (&ordering, proto);
index 05e8bcf9440060a73537a7a2ccc4af8bd684ed37..e3f0b1c1ed279efe91512c64890d79d3f75d2e3f 100644 (file)
@@ -28,12 +28,14 @@ language_stats_sources = \
        src/language/stats/sort-cases.c \
        src/language/stats/sort-criteria.c \
        src/language/stats/sort-criteria.h \
+       src/language/stats/factor.c \
        src/language/stats/flip.c \
        src/language/stats/freq.c \
        src/language/stats/freq.h \
        src/language/stats/npar-summary.c \
        src/language/stats/npar-summary.h \
        src/language/stats/roc.c \
+       src/language/stats/roc.h \
        src/language/stats/sign.c \
        src/language/stats/sign.h \
        src/language/stats/wilcoxon.c \
index 887b12230d48222f805a97c37de6298aa15f7971..68571cb2ef4d8f96265824c5c9968f47662f7977 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
+
 #include <stdlib.h>
 
-#include <data/case.h>
-#include <data/casereader.h>
-#include <data/dictionary.h>
-#include <data/procedure.h>
-#include <data/transformations.h>
-#include <data/variable.h>
-#include <language/command.h>
-#include <language/lexer/lexer.h>
-#include <language/lexer/variable-parser.h>
-#include <libpspp/compiler.h>
-#include <libpspp/hash.h>
-#include <libpspp/message.h>
-#include <libpspp/pool.h>
-#include <libpspp/str.h>
-
-#include "xalloc.h"
+#include "data/case.h"
+#include "data/casereader.h"
+#include "data/dictionary.h"
+#include "data/procedure.h"
+#include "data/transformations.h"
+#include "data/variable.h"
+#include "language/command.h"
+#include "language/lexer/lexer.h"
+#include "language/lexer/variable-parser.h"
+#include "libpspp/array.h"
+#include "libpspp/compiler.h"
+#include "libpspp/hash-functions.h"
+#include "libpspp/hmap.h"
+#include "libpspp/message.h"
+#include "libpspp/pool.h"
+#include "libpspp/str.h"
+
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
 /* FIXME: Implement PRINT subcommand. */
 
-/* An AUTORECODE variable's original value. */
-union arc_value
-  {
-    double f;                   /* Numeric. */
-    char *c;                    /* Short or long string. */
-  };
-
-/* Explains how to recode one value.  `from' must be first element.  */
+/* Explains how to recode one value. */
 struct arc_item
   {
-    union arc_value from;      /* Original value. */
+    struct hmap_node hmap_node; /* Element in "struct arc_spec" hash table. */
+    union value from;           /* Original value. */
     double to;                 /* Recoded value. */
   };
 
@@ -57,20 +54,12 @@ struct arc_item
 struct arc_spec
   {
     const struct variable *src;        /* Source variable. */
-    struct variable *dest;     /* Target variable. */
-    struct hsh_table *items;   /* Hash table of `freq's. */
-  };
-
-/* AUTORECODE transformation. */
-struct autorecode_trns
-  {
-    struct pool *pool;         /* Contains AUTORECODE specs. */
-    struct arc_spec *specs;    /* AUTORECODE specifications. */
-    size_t spec_cnt;           /* Number of specifications. */
+    struct variable *dst;      /* Target variable. */
+    struct hmap items;          /* Hash table of "struct arc_item"s. */
   };
 
 /* Descending or ascending sort order. */
-enum direction
+enum arc_direction
   {
     ASCENDING,
     DESCENDING
@@ -79,298 +68,239 @@ enum direction
 /* AUTORECODE data. */
 struct autorecode_pgm
   {
-    const struct variable **src_vars;    /* Source variables. */
-    char **dst_names;              /* Target variable names. */
-    struct variable **dst_vars;    /* Target variables. */
-    struct hsh_table **src_values; /* `union arc_value's of source vars. */
-    size_t var_cnt;                /* Number of variables. */
-    struct pool *src_values_pool;  /* Pool used by src_values. */
-    enum direction direction;      /* Sort order. */
-    int print;                     /* Print mapping table if nonzero. */
+    struct arc_spec *specs;
+    size_t n_specs;
   };
 
 static trns_proc_func autorecode_trns_proc;
 static trns_free_func autorecode_trns_free;
-static hsh_compare_func compare_alpha_value, compare_numeric_value;
-static hsh_hash_func hash_alpha_value, hash_numeric_value;
 
-static void recode (struct dataset *, const struct autorecode_pgm *);
+static int compare_arc_items (const void *, const void *, const void *width);
 static void arc_free (struct autorecode_pgm *);
+static struct arc_item *find_arc_item (struct arc_spec *, const union value *,
+                                       size_t hash);
 
 /* Performs the AUTORECODE procedure. */
 int
 cmd_autorecode (struct lexer *lexer, struct dataset *ds)
 {
-  struct autorecode_pgm arc;
+  struct autorecode_pgm *arc = NULL;
+
+  const struct variable **src_vars = NULL;
+  char **dst_names = NULL;
+  size_t n_srcs = 0;
+  size_t n_dsts = 0;
+
+  enum arc_direction direction;
+  bool print;
+
   struct casereader *input;
   struct ccase *c;
-  size_t dst_cnt;
+
   size_t i;
   bool ok;
 
-  arc.src_vars = NULL;
-  arc.dst_names = NULL;
-  arc.dst_vars = NULL;
-  arc.src_values = NULL;
-  arc.var_cnt = 0;
-  arc.src_values_pool = NULL;
-  arc.direction = ASCENDING;
-  arc.print = 0;
-  dst_cnt = 0;
-
+  /* Parse variable lists. */
   lex_match_id (lexer, "VARIABLES");
   lex_match (lexer, '=');
-  if (!parse_variables_const (lexer, dataset_dict (ds), &arc.src_vars,
-                             &arc.var_cnt,
-                        PV_NO_DUPLICATE))
-    goto lossage;
+  if (!parse_variables_const (lexer, dataset_dict (ds), &src_vars, &n_srcs,
+                              PV_NO_DUPLICATE))
+    goto error;
   if (!lex_force_match_id (lexer, "INTO"))
-    goto lossage;
+    goto error;
   lex_match (lexer, '=');
-  if (!parse_DATA_LIST_vars (lexer, &arc.dst_names, &dst_cnt, PV_NONE))
-    goto lossage;
-  if (dst_cnt != arc.var_cnt)
+  if (!parse_DATA_LIST_vars (lexer, &dst_names, &n_dsts, PV_NO_DUPLICATE))
+    goto error;
+  if (n_dsts != n_srcs)
     {
-      size_t i;
-
       msg (SE, _("Source variable count (%zu) does not match "
                  "target variable count (%zu)."),
-           arc.var_cnt, dst_cnt);
-
-      for (i = 0; i < dst_cnt; i++)
-        free (arc.dst_names[i]);
-      free (arc.dst_names);
-      arc.dst_names = NULL;
+           n_srcs, n_dsts);
 
-      goto lossage;
+      goto error;
     }
+  for (i = 0; i < n_dsts; i++)
+    {
+      const char *name = dst_names[i];
+
+      if (dict_lookup_var (dataset_dict (ds), name) != NULL)
+        {
+          msg (SE, _("Target variable %s duplicates existing variable %s."),
+               name, name);
+          goto error;
+        }
+    }
+
+  /* Parse options. */
+  direction = ASCENDING;
+  print = false;
   while (lex_match (lexer, '/'))
     if (lex_match_id (lexer, "DESCENDING"))
-      arc.direction = DESCENDING;
+      direction = DESCENDING;
     else if (lex_match_id (lexer, "PRINT"))
-      arc.print = 1;
+      print = true;
   if (lex_token (lexer) != '.')
     {
       lex_error (lexer, _("expecting end of command"));
-      goto lossage;
+      goto error;
     }
 
-  for (i = 0; i < arc.var_cnt; i++)
+  /* Create procedure. */
+  arc = xmalloc (sizeof *arc);
+  arc->specs = xmalloc (n_dsts * sizeof *arc->specs);
+  arc->n_specs = n_dsts;
+  for (i = 0; i < n_dsts; i++)
     {
-      int j;
-
-      if (dict_lookup_var (dataset_dict (ds), arc.dst_names[i]) != NULL)
-       {
-         msg (SE, _("Target variable %s duplicates existing variable %s."),
-              arc.dst_names[i], arc.dst_names[i]);
-         goto lossage;
-       }
-      for (j = 0; j < i; j++)
-       if (!strcasecmp (arc.dst_names[i], arc.dst_names[j]))
-         {
-           msg (SE, _("Duplicate variable name %s among target variables."),
-                arc.dst_names[i]);
-           goto lossage;
-         }
-    }
+      struct arc_spec *spec = &arc->specs[i];
 
-  arc.src_values_pool = pool_create ();
-  arc.dst_vars = xnmalloc (arc.var_cnt, sizeof *arc.dst_vars);
-  arc.src_values = xnmalloc (arc.var_cnt, sizeof *arc.src_values);
-  for (i = 0; i < dst_cnt; i++)
-    {
-       /* FIXME: consolodate this hsh_create */
-    if (var_is_alpha (arc.src_vars[i]))
-      arc.src_values[i] = hsh_create (10, compare_alpha_value,
-                                      hash_alpha_value, NULL, arc.src_vars[i]);
-    else
-      arc.src_values[i] = hsh_create (10, compare_numeric_value,
-                                      hash_numeric_value, NULL, NULL);
-   }
+      spec->src = src_vars[i];
+      hmap_init (&spec->items);
+    }
 
+  /* Execute procedure. */
   input = proc_open (ds);
   for (; (c = casereader_read (input)) != NULL; case_unref (c))
-    for (i = 0; i < arc.var_cnt; i++)
+    for (i = 0; i < arc->n_specs; i++)
       {
-        union arc_value v, *vp, **vpp;
-
-        if (var_is_numeric (arc.src_vars[i]))
-          v.f = case_num (c, arc.src_vars[i]);
-        else
-          v.c = (char *) case_str (c, arc.src_vars[i]);
-
-        vpp = (union arc_value **) hsh_probe (arc.src_values[i], &v);
-        if (*vpp == NULL)
+        struct arc_spec *spec = &arc->specs[i];
+        int width = var_get_width (spec->src);
+        const union value *value = case_data (c, spec->src);
+        size_t hash = value_hash (value, width, 0);
+        struct arc_item *item;
+
+        item = find_arc_item (spec, value, hash);
+        if (item == NULL)
           {
-            vp = pool_alloc (arc.src_values_pool, sizeof *vp);
-            if (var_is_numeric (arc.src_vars[i]))
-              vp->f = v.f;
-            else
-              vp->c = pool_clone (arc.src_values_pool,
-                                  v.c, var_get_width (arc.src_vars[i]));
-            *vpp = vp;
+            item = xmalloc (sizeof *item);
+            value_clone (&item->from, value, width);
+            hmap_insert (&spec->items, &item->hmap_node, hash);
           }
       }
   ok = casereader_destroy (input);
   ok = proc_commit (ds) && ok;
 
-  for (i = 0; i < arc.var_cnt; i++)
-    arc.dst_vars[i] = dict_create_var_assert (dataset_dict (ds),
-                                              arc.dst_names[i], 0);
+  /* Create transformation. */
+  for (i = 0; i < arc->n_specs; i++)
+    {
+      struct arc_spec *spec = &arc->specs[i];
+      struct arc_item **items;
+      struct arc_item *item;
+      size_t n_items;
+      int src_width;
+      size_t j;
+
+      /* Create destination variable. */
+      spec->dst = dict_create_var_assert (dataset_dict (ds), dst_names[i], 0);
+
+      /* Create array of pointers to items. */
+      n_items = hmap_count (&spec->items);
+      items = xmalloc (n_items * sizeof *items);
+      j = 0;
+      HMAP_FOR_EACH (item, struct arc_item, hmap_node, &spec->items)
+        items[j++] = item;
+      assert (j == n_items);
+
+      /* Sort array by value. */
+      src_width = var_get_width (spec->src);
+      sort (items, n_items, sizeof *items, compare_arc_items, &src_width);
+
+      /* Assign recoded values in sorted order. */
+      for (j = 0; j < n_items; j++)
+        items[j]->to = direction == ASCENDING ? j + 1 : n_items - j;
+
+      /* Free array. */
+      free (items);
+    }
+  add_transformation (ds, autorecode_trns_proc, autorecode_trns_free, arc);
 
-  recode (ds, &arc);
-  arc_free (&arc);
   return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
 
-lossage:
-  arc_free (&arc);
+error:
+  for (i = 0; i < n_dsts; i++)
+    free (dst_names[i]);
+  free (dst_names);
+  free (src_vars);
+  arc_free (arc);
   return CMD_CASCADING_FAILURE;
 }
 
 static void
 arc_free (struct autorecode_pgm *arc)
 {
-  free (arc->src_vars);
-  if (arc->dst_names != NULL)
-    {
-      size_t i;
-
-      for (i = 0; i < arc->var_cnt; i++)
-        free (arc->dst_names[i]);
-      free (arc->dst_names);
-    }
-  free (arc->dst_vars);
-  if (arc->src_values != NULL)
+  if (arc != NULL)
     {
       size_t i;
 
-      for (i = 0; i < arc->var_cnt; i++)
-        hsh_destroy (arc->src_values[i]);
-      free (arc->src_values);
+      for (i = 0; i < arc->n_specs; i++)
+        {
+          struct arc_spec *spec = &arc->specs[i];
+          int width = var_get_width (spec->src);
+          struct arc_item *item, *next;
+
+          HMAP_FOR_EACH_SAFE (item, next, struct arc_item, hmap_node,
+                              &spec->items)
+            {
+              value_destroy (&item->from, width);
+              hmap_delete (&spec->items, &item->hmap_node);
+              free (item);
+            }
+          hmap_destroy (&spec->items);
+        }
+      free (arc->specs);
+      free (arc);
     }
-  pool_destroy (arc->src_values_pool);
 }
 
-\f
-/* AUTORECODE transformation. */
+static struct arc_item *
+find_arc_item (struct arc_spec *spec, const union value *value,
+               size_t hash)
+{
+  struct arc_item *item;
 
-static void
-recode (struct dataset *ds, const struct autorecode_pgm *arc)
+  HMAP_FOR_EACH_WITH_HASH (item, struct arc_item, hmap_node, hash,
+                           &spec->items)
+    if (value_equal (value, &item->from, var_get_width (spec->src)))
+      return item;
+  return NULL;
+}
+
+static int
+compare_arc_items (const void *a_, const void *b_, const void *width_)
 {
-  struct autorecode_trns *trns;
-  size_t i;
+  const struct arc_item *const *a = a_;
+  const struct arc_item *const *b = b_;
+  const int *width = width_;
 
-  trns = pool_create_container (struct autorecode_trns, pool);
-  trns->specs = pool_nalloc (trns->pool, arc->var_cnt, sizeof *trns->specs);
-  trns->spec_cnt = arc->var_cnt;
-  for (i = 0; i < arc->var_cnt; i++)
-    {
-      struct arc_spec *spec = &trns->specs[i];
-      void *const *p = hsh_sort (arc->src_values[i]);
-      int count = hsh_count (arc->src_values[i]);
-      int j;
-
-      spec->src = arc->src_vars[i];
-      spec->dest = arc->dst_vars[i];
-
-      if (var_is_alpha (arc->src_vars[i]))
-       spec->items = hsh_create (2 * count, compare_alpha_value,
-                                 hash_alpha_value, NULL, arc->src_vars[i]);
-      else
-       spec->items = hsh_create (2 * count, compare_numeric_value,
-                                 hash_numeric_value, NULL, NULL);
-
-      for (j = 0; *p; p++, j++)
-       {
-         struct arc_item *item = pool_alloc (trns->pool, sizeof *item);
-          union arc_value *vp = *p;
-
-         if (var_is_numeric (arc->src_vars[i]))
-            item->from.f = vp->f;
-          else
-           item->from.c = pool_clone (trns->pool, vp->c,
-                                       var_get_width (arc->src_vars[i]));
-         item->to = arc->direction == ASCENDING ? j + 1 : count - j;
-         hsh_force_insert (spec->items, item);
-       }
-    }
-  add_transformation (ds,
-                     autorecode_trns_proc, autorecode_trns_free, trns);
+  return value_compare_3way (&(*a)->from, &(*b)->from, *width);
 }
 
-/* Executes an AUTORECODE transformation. */
 static int
-autorecode_trns_proc (void *trns_, struct ccase **c,
+autorecode_trns_proc (void *arc_, struct ccase **c,
                       casenumber case_idx UNUSED)
 {
-  struct autorecode_trns *trns = trns_;
+  struct autorecode_pgm *arc = arc_;
   size_t i;
 
   *c = case_unshare (*c);
-  for (i = 0; i < trns->spec_cnt; i++)
+  for (i = 0; i < arc->n_specs; i++)
     {
-      struct arc_spec *spec = &trns->specs[i];
+      struct arc_spec *spec = &arc->specs[i];
+      int width = var_get_width (spec->src);
+      const union value *value = case_data (*c, spec->src);
       struct arc_item *item;
-      union arc_value v;
 
-      if (var_is_numeric (spec->src))
-        v.f = case_num (*c, spec->src);
-      else
-        v.c = (char *) case_str (*c, spec->src);
-      item = hsh_force_find (spec->items, &v);
-
-      case_data_rw (*c, spec->dest)->f = item->to;
+      item = find_arc_item (spec, value, value_hash (value, width, 0));
+      case_data_rw (*c, spec->dst)->f = item ? item->to : SYSMIS;
     }
+
   return TRNS_CONTINUE;
 }
 
-/* Frees an AUTORECODE transformation. */
 static bool
-autorecode_trns_free (void *trns_)
+autorecode_trns_free (void *arc_)
 {
-  struct autorecode_trns *trns = trns_;
-  size_t i;
+  struct autorecode_pgm *arc = arc_;
 
-  for (i = 0; i < trns->spec_cnt; i++)
-    hsh_destroy (trns->specs[i].items);
-  pool_destroy (trns->pool);
+  arc_free (arc);
   return true;
 }
-\f
-/* AUTORECODE procedure. */
-
-static int
-compare_alpha_value (const void *a_, const void *b_, const void *v_)
-{
-  const union arc_value *a = a_;
-  const union arc_value *b = b_;
-  const struct variable *v = v_;
-
-  return memcmp (a->c, b->c, var_get_width (v));
-}
-
-static unsigned
-hash_alpha_value (const void *a_, const void *v_)
-{
-  const union arc_value *a = a_;
-  const struct variable *v = v_;
-
-  return hash_bytes (a->c, var_get_width (v), 0);
-}
-
-static int
-compare_numeric_value (const void *a_, const void *b_, const void *aux UNUSED)
-{
-  const union arc_value *a = a_;
-  const union arc_value *b = b_;
-
-  return a->f < b->f ? -1 : a->f > b->f;
-}
-
-static unsigned
-hash_numeric_value (const void *a_, const void *aux UNUSED)
-{
-  const union arc_value *a = a_;
-
-  return hash_double (a->f, 0);
-}
index 26e0257ca14030ca3d58a2ae10acd8f960b45d2c..b92018fdb400e9fe88d72ec93eed6d04d40d9bbe 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 
 #include <config.h>
 #include <libpspp/compiler.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include <data/format.h>
 #include <data/case.h>
@@ -91,8 +91,8 @@ static bool
 do_binomial (const struct dictionary *dict,
             struct casereader *input,
             const struct binomial_test *bst,
-            struct freq_mutable *cat1,
-            struct freq_mutable *cat2,
+            struct freq *cat1,
+            struct freq *cat2,
              enum mv_class exclude
             )
 {
@@ -160,7 +160,7 @@ binomial_execute (const struct dataset *ds,
   const struct binomial_test *bst = (const struct binomial_test *) test;
   const struct one_sample_test *ost = (const struct one_sample_test*) test;
 
-  struct freq_mutable *cat[2];
+  struct freq *cat[2];
   int i;
 
   assert ((bst->category1 == SYSMIS) == (bst->category2 == SYSMIS) || bst->cutpoint != SYSMIS);
@@ -187,16 +187,14 @@ binomial_execute (const struct dataset *ds,
       const struct fmt_spec *wfmt = wvar ?
        var_get_print_format (wvar) : & F_8_0;
 
-      struct tab_table *table = tab_create (7, ost->n_vars * 3 + 1, 0);
-
-      tab_dim (table, tab_natural_dimensions, NULL);
+      struct tab_table *table = tab_create (7, ost->n_vars * 3 + 1);
 
       tab_title (table, _("Binomial Test"));
 
       tab_headers (table, 2, 0, 1, 0);
 
       tab_box (table, TAL_1, TAL_1, -1, TAL_1,
-               0, 0, table->nc - 1, tab_nr(table) - 1 );
+               0, 0, tab_nc (table) - 1, tab_nr(table) - 1 );
 
       for (v = 0 ; v < ost->n_vars; ++v)
         {
index 4593df4116eda81be5230a64ee2eee6c5f9fa15f..6218228690526da661921ec38b82d33c63b13a78 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <language/stats/chisquare.h>
 
-#include <stdlib.h>
-#include <math.h>
-
-#include <data/format.h>
-#include <data/case.h>
-#include <data/casereader.h>
-#include <data/dictionary.h>
-#include <data/procedure.h>
-#include <data/value-labels.h>
-#include <data/variable.h>
-#include <language/stats/freq.h>
-#include <language/stats/npar.h>
-#include <libpspp/assertion.h>
-#include <libpspp/compiler.h>
-#include <libpspp/hash.h>
-#include <libpspp/message.h>
-#include <libpspp/taint.h>
-#include <output/table.h>
-
 #include <gsl/gsl_cdf.h>
+#include <math.h>
+#include <stdlib.h>
 
-#include "xalloc.h"
+#include "data/format.h"
+#include "data/case.h"
+#include "data/casereader.h"
+#include "data/dictionary.h"
+#include "data/procedure.h"
+#include "data/value-labels.h"
+#include "data/variable.h"
+#include "language/stats/freq.h"
+#include "language/stats/npar.h"
+#include "libpspp/array.h"
+#include "libpspp/assertion.h"
+#include "libpspp/cast.h"
+#include "libpspp/compiler.h"
+#include "libpspp/hash-functions.h"
+#include "libpspp/message.h"
+#include "libpspp/taint.h"
+#include "output/tab.h"
+
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-/* Return a hash table containing the frequency counts of each
-   value of VAR in CF .
-   It is the caller's responsibility to free the hash table when
-   no longer required.
-*/
-static struct hsh_table *
+/* Adds frequency counts of each value of VAR in INPUT between LO and HI to
+   FREQ_HASH.  LO and HI and each input value is truncated to an integer.
+   Returns true if successful, false on input error.  It is the caller's
+   responsibility to initialize FREQ_HASH and to free it when no longer
+   required, even on failure. */
+static bool
 create_freq_hash_with_range (const struct dictionary *dict,
                             struct casereader *input,
                             const struct variable *var,
-                            double lo,
-                            double hi)
+                            double lo_, double hi_,
+                             struct hmap *freq_hash)
 {
+  struct freq **entries;
   bool warn = true;
-  float i_d;
   struct ccase *c;
+  double lo, hi;
+  double i_d;
 
-  struct hsh_table *freq_hash =
-    hsh_create (4, compare_freq, hash_freq,
-               free_freq_mutable_hash,
-               (void *) var);
+  assert (var_is_numeric (var));
+  lo = trunc (lo_);
+  hi = trunc (hi_);
 
   /* Populate the hash with zero entries */
-  for (i_d = trunc (lo); i_d <= trunc (hi); i_d += 1.0 )
+  entries = xnmalloc (hi - lo + 1, sizeof *entries);
+  for (i_d = lo; i_d <= hi; i_d += 1.0 )
     {
-      struct freq_mutable *fr = xmalloc (sizeof (*fr));
-      value_init (&fr->value, 0);
-      fr->value.f = i_d;
-      fr->count = 0;
-      hsh_insert (freq_hash, fr);
+      size_t ofs = i_d - lo;
+      union value value = { i_d };
+      entries[ofs] = freq_hmap_insert (freq_hash, &value, 0,
+                                       value_hash (&value, 0, 0));
     }
 
   for (; (c = casereader_read (input)) != NULL; case_unref (c))
     {
-      struct freq_mutable fr;
-      fr.value.f = trunc (case_num (c, var));
-      if (fr.value.f >= lo && fr.value.f <= hi)
+      double x = trunc (case_num (c, var));
+      if (x >= lo && x <= hi)
         {
-          struct freq_mutable *existing_fr = hsh_force_find (freq_hash, &fr);
-          existing_fr->count += dict_get_case_weight (dict, c, &warn);
+          size_t ofs = x - lo;
+          struct freq *fr = entries[ofs];
+          fr->count += dict_get_case_weight (dict, c, &warn);
         }
     }
-  if (casereader_destroy (input))
-    return freq_hash;
-  else
-    {
-      hsh_destroy (freq_hash);
-      return NULL;
-    }
-}
 
+  return casereader_destroy (input);
+}
 
-/* Return a hash table containing the frequency counts of each
-   value of VAR in INPUT .
-   It is the caller's responsibility to free the hash table when
-   no longer required.
-*/
-static struct hsh_table *
+/* Adds frequency counts of each value of VAR in INPUT to FREQ_HASH.  LO and HI
+   and each input value is truncated to an integer.  Returns true if
+   successful, false on input error.  It is the caller's responsibility to
+   initialize FREQ_HASH and to free it when no longer required, even on
+   failure. */
+static bool
 create_freq_hash (const struct dictionary *dict,
                  struct casereader *input,
-                 const struct variable *var)
+                 const struct variable *var,
+                  struct hmap *freq_hash)
 {
   int width = var_get_width (var);
   bool warn = true;
   struct ccase *c;
 
-  struct hsh_table *freq_hash =
-    hsh_create (4, compare_freq, hash_freq,
-               free_freq_mutable_hash,
-               (void *) var);
-
   for (; (c = casereader_read (input)) != NULL; case_unref (c))
     {
-      struct freq_mutable fr;
-      void **p;
+      const union value *value = case_data (c, var);
+      size_t hash = value_hash (value, width, 0);
+      double weight = dict_get_case_weight (dict, c, &warn);
+      struct freq *f;
 
-      fr.value = *case_data (c, var);
-      fr.count = dict_get_case_weight (dict, c, &warn);
+      f = freq_hmap_search (freq_hash, value, width, hash);
+      if (f == NULL)
+        f = freq_hmap_insert (freq_hash, value, width, hash);
 
-      p = hsh_probe (freq_hash, &fr);
-      if (*p == NULL)
-        {
-          struct freq_mutable *new_fr = *p = xmalloc (sizeof *new_fr);
-          value_init (&new_fr->value, width);
-          value_copy (&new_fr->value, &fr.value, width);
-          new_fr->count = fr.count;
-        }
-      else
-        {
-          struct freq *existing_fr = *p;
-          existing_fr->count += fr.count;
-        }
-    }
-  if (casereader_destroy (input))
-    return freq_hash;
-  else
-    {
-      hsh_destroy (freq_hash);
-      return NULL;
+      f->count += weight;
     }
-}
-
 
+  return casereader_destroy (input);
+}
 
 static struct tab_table *
 create_variable_frequency_table (const struct dictionary *dict,
                                 struct casereader *input,
                                 const struct chisquare_test *test,
-                                int v,
-                                struct hsh_table **freq_hash)
+                                int v, struct hmap *freq_hash)
 
 {
   int i;
@@ -161,11 +136,14 @@ create_variable_frequency_table (const struct dictionary *dict,
   struct tab_table *table ;
   const struct variable *var =  ost->vars[v];
 
-  *freq_hash = create_freq_hash (dict, input, var);
-  if (*freq_hash == NULL)
-    return NULL;
+  hmap_init (freq_hash);
+  if (!create_freq_hash (dict, input, var, freq_hash))
+    {
+      freq_hmap_destroy (freq_hash, var_get_width (var));
+      return NULL;
+    }
 
-  n_cells = hsh_count (*freq_hash);
+  n_cells = hmap_count (freq_hash);
 
   if ( test->n_expected > 0 && n_cells != test->n_expected )
     {
@@ -174,15 +152,12 @@ create_variable_frequency_table (const struct dictionary *dict,
          test->n_expected, n_cells,
          var_get_name (var)
          );
-      hsh_destroy (*freq_hash);
-      *freq_hash = NULL;
       return NULL;
     }
 
-  table = tab_create(4, n_cells + 2, 0);
-  tab_dim (table, tab_natural_dimensions, NULL);
+  table = tab_create(4, n_cells + 2);
 
-  tab_title (table, var_to_string(var));
+  tab_title (table, "%s", var_to_string(var));
   tab_text (table, 1, 0, TAB_LEFT, _("Observed N"));
   tab_text (table, 2, 0, TAB_LEFT, _("Expected N"));
   tab_text (table, 3, 0, TAB_LEFT, _("Residual"));
@@ -190,7 +165,7 @@ create_variable_frequency_table (const struct dictionary *dict,
   tab_headers (table, 1, 0, 1, 0);
 
   tab_box (table, TAL_1, TAL_1, -1, -1,
-          0, 0, table->nc - 1, tab_nr(table) - 1 );
+          0, 0, tab_nc (table) - 1, tab_nr(table) - 1 );
 
   tab_hline (table, TAL_1, 0, tab_nc(table) - 1, 1);
 
@@ -199,7 +174,7 @@ create_variable_frequency_table (const struct dictionary *dict,
     tab_vline (table, TAL_1, i, 0, tab_nr(table) - 1);
 
 
-  tab_text (table, 0, table->nr - 1, TAB_LEFT, _("Total"));
+  tab_text (table, 0, tab_nr (table) - 1, TAB_LEFT, _("Total"));
 
   return table;
 }
@@ -215,8 +190,7 @@ create_combo_frequency_table (const struct chisquare_test *test)
 
   int n_cells = test->hi - test->lo + 1;
 
-  table = tab_create(1 + ost->n_vars * 4, n_cells + 3, 0);
-  tab_dim (table, tab_natural_dimensions, NULL);
+  table = tab_create(1 + ost->n_vars * 4, n_cells + 3);
 
   tab_title (table, _("Frequencies"));
   for ( i = 0 ; i < ost->n_vars ; ++i )
@@ -254,12 +228,12 @@ create_combo_frequency_table (const struct chisquare_test *test)
   tab_headers (table, 1, 0, 2, 0);
 
   tab_box (table, TAL_1, TAL_1, -1, -1,
-          0, 0, table->nc - 1, tab_nr(table) - 1 );
+          0, 0, tab_nc (table) - 1, tab_nr(table) - 1 );
 
   tab_hline (table, TAL_1, 1, tab_nc(table) - 1, 1);
   tab_hline (table, TAL_1, 0, tab_nc(table) - 1, 2);
 
-  tab_text (table, 0, table->nr - 1, TAB_LEFT, _("Total"));
+  tab_text (table, 0, tab_nr (table) - 1, TAB_LEFT, _("Total"));
 
   return table;
 }
@@ -271,8 +245,7 @@ create_stats_table (const struct chisquare_test *test)
   const struct one_sample_test *ost = (const struct one_sample_test*) test;
 
   struct tab_table *table;
-  table = tab_create (1 + ost->n_vars, 4, 0);
-  tab_dim (table, tab_natural_dimensions, NULL);
+  table = tab_create (1 + ost->n_vars, 4);
   tab_title (table, _("Test Statistics"));
   tab_headers (table, 1, 0, 1, 0);
 
@@ -305,8 +278,9 @@ chisquare_execute (const struct dataset *ds,
 {
   const struct dictionary *dict = dataset_dict (ds);
   int v, i;
-  struct one_sample_test *ost = (struct one_sample_test *) test;
-  struct chisquare_test *cst = (struct chisquare_test *) test;
+  struct chisquare_test *cst = UP_CAST (test, struct chisquare_test,
+                                        parent.parent);
+  struct one_sample_test *ost = &cst->parent;
   int n_cells = 0;
   double total_expected = 0.0;
   const struct variable *wvar = dict_get_weight (dict);
@@ -324,11 +298,12 @@ chisquare_execute (const struct dataset *ds,
     {
       for ( v = 0 ; v < ost->n_vars ; ++v )
        {
+          const struct variable *var = ost->vars[v];
          double total_obs = 0.0;
-         struct hsh_table *freq_hash = NULL;
+         struct hmap freq_hash;
           struct casereader *reader =
             casereader_create_filter_missing (casereader_clone (input),
-                                              &ost->vars[v], 1, exclude,
+                                              &var, 1, exclude,
                                              NULL, NULL);
          struct tab_table *freq_table =
             create_variable_frequency_table(dict, reader, cst, v, &freq_hash);
@@ -337,9 +312,9 @@ chisquare_execute (const struct dataset *ds,
 
          if ( NULL == freq_table )
             continue;
-          ff = (struct freq **) hsh_sort (freq_hash);
+          ff = freq_hmap_sort (&freq_hash, var_get_width (var));
 
-         n_cells = hsh_count (freq_hash);
+         n_cells = hmap_count (&freq_hash);
 
          for ( i = 0 ; i < n_cells ; ++i )
            total_obs += ff[i]->count;
@@ -352,7 +327,7 @@ chisquare_execute (const struct dataset *ds,
              const union value *observed_value = &ff[i]->value;
 
              ds_init_empty (&str);
-             var_append_value_name (ost->vars[v], observed_value, &str);
+             var_append_value_name (var, observed_value, &str);
 
              /* The key */
              tab_text (freq_table, 0, i + 1, TAB_LEFT, ds_cstr (&str));
@@ -385,7 +360,8 @@ chisquare_execute (const struct dataset *ds,
 
          tab_submit (freq_table);
 
-         hsh_destroy (freq_hash);
+          freq_hmap_destroy (&freq_hash, var_get_width (var));
+          free (ff);
        }
     }
   else  /* ranged == true */
@@ -396,28 +372,30 @@ chisquare_execute (const struct dataset *ds,
 
       for ( v = 0 ; v < ost->n_vars ; ++v )
        {
+          const struct variable *var = ost->vars[v];
          double total_obs = 0.0;
           struct casereader *reader =
             casereader_create_filter_missing (casereader_clone (input),
-                                              &ost->vars[v], 1, exclude,
+                                              &var, 1, exclude,
                                              NULL, NULL);
-         struct hsh_table *freq_hash =
-           create_freq_hash_with_range (dict, reader,
-                                         ost->vars[v], cst->lo, cst->hi);
-
+         struct hmap freq_hash;
          struct freq **ff;
 
-          if (freq_hash == NULL)
-            continue;
+          hmap_init (&freq_hash);
+          if (!create_freq_hash_with_range (dict, reader, var,
+                                            cst->lo, cst->hi, &freq_hash))
+            {
+              freq_hmap_destroy (&freq_hash, var_get_width (var));
+              continue;
+            }
 
-          ff = (struct freq **) hsh_sort (freq_hash);
-         assert ( n_cells == hsh_count (freq_hash));
+          ff = freq_hmap_sort (&freq_hash, var_get_width (var));
 
-         for ( i = 0 ; i < hsh_count (freq_hash) ; ++i )
+         for ( i = 0 ; i < hmap_count (&freq_hash) ; ++i )
            total_obs += ff[i]->count;
 
          xsq[v] = 0.0;
-         for ( i = 0 ; i < hsh_count (freq_hash) ; ++i )
+         for ( i = 0 ; i < hmap_count (&freq_hash) ; ++i )
            {
              struct string str;
              double exp;
@@ -438,7 +416,7 @@ chisquare_execute (const struct dataset *ds,
              if ( cst->n_expected > 0 )
                exp = cst->expected[i] * total_obs / total_expected ;
              else
-               exp = total_obs / (double) hsh_count (freq_hash);
+               exp = total_obs / (double) hmap_count (&freq_hash);
 
              /* The expected N */
              tab_double (freq_table, v * 4 + 3, i + 2 , TAB_NONE,
@@ -457,7 +435,8 @@ chisquare_execute (const struct dataset *ds,
 
          df[v] = n_cells - 1.0;
 
-         hsh_destroy (freq_hash);
+         freq_hmap_destroy (&freq_hash, var_get_width (var));
+          free (ff);
        }
 
       tab_submit (freq_table);
index 13543407a35584ec24571ac02161420b498f4d91..995675e2cbf4b36cecab0e37ba7374df8e30c9a3 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <libpspp/assertion.h>
 #include <math/covariance.h>
+#include <math/correlation.h>
 #include <gsl/gsl_matrix.h>
 #include <data/casegrouper.h>
 #include <data/casereader.h>
@@ -28,8 +29,7 @@
 #include <language/dictionary/split-file.h>
 #include <language/lexer/lexer.h>
 #include <language/lexer/variable-parser.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/tab.h>
 #include <libpspp/message.h>
 #include <data/format.h>
 #include <math/moments.h>
 #define N_(msgid) msgid
 
 
-static double
-significance_of_correlation (double rho, double w)
-{
-  double t = w - 2;
-  t /= 1 - MIN (1, pow2 (rho));
-  t = sqrt (t);
-  t *= rho;
-  
-  if (t > 0)
-    return  gsl_cdf_tdist_Q (t, w - 2);
-  else
-    return  gsl_cdf_tdist_P (t, w - 2);
-}
-
-
 struct corr
 {
   size_t n_vars_total;
@@ -107,9 +92,8 @@ output_descriptives (const struct corr *corr, const gsl_matrix *means,
   const int heading_columns = 1;
   const int heading_rows = 1;
 
-  struct tab_table *t = tab_create (nc, nr, 0);
+  struct tab_table *t = tab_create (nc, nr);
   tab_title (t, _("Descriptive Statistics"));
-  tab_dim (t, tab_natural_dimensions, NULL);
 
   tab_headers (t, heading_columns, 0, heading_rows, 0);
 
@@ -202,9 +186,8 @@ output_correlation (const struct corr *corr, const struct corr_opts *opts,
   /* One header row */
   nr += heading_rows;
 
-  t = tab_create (nc, nr, 0);
+  t = tab_create (nc, nr);
   tab_title (t, _("Correlations"));
-  tab_dim (t, tab_natural_dimensions, NULL);
 
   tab_headers (t, heading_columns, 0, heading_rows, 0);
 
@@ -290,32 +273,6 @@ output_correlation (const struct corr *corr, const struct corr_opts *opts,
 }
 
 
-static gsl_matrix *
-correlation_from_covariance (const gsl_matrix *cv, const gsl_matrix *v)
-{
-  size_t i, j;
-  gsl_matrix *corr = gsl_matrix_calloc (cv->size1, cv->size2);
-  
-  for (i = 0 ; i < cv->size1; ++i)
-    {
-      for (j = 0 ; j < cv->size2; ++j)
-       {
-         double rho = gsl_matrix_get (cv, i, j);
-         
-         rho /= sqrt (gsl_matrix_get (v, i, j))
-           * 
-           sqrt (gsl_matrix_get (v, j, i));
-         
-         gsl_matrix_set (corr, i, j, rho);
-       }
-    }
-  
-  return corr;
-}
-
-
-
-
 static void
 run_corr (struct casereader *r, const struct corr_opts *opts, const struct corr *corr)
 {
index 99fa41d9c056a039ef9d92fdc9090758539c9d15..acec9769b48d2ecf11eff6ef837ffb15aaa027b2 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -56,8 +56,7 @@
 #include <libpspp/misc.h>
 #include <libpspp/pool.h>
 #include <libpspp/str.h>
-#include <output/output.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include "minmax.h"
 #include "xalloc.h"
@@ -201,41 +200,6 @@ struct crosstabs_proc
     unsigned int statistics;    /* Bit k is 1 if statistic k is requested. */
   };
 
-static void
-init_proc (struct crosstabs_proc *proc, struct dataset *ds)
-{
-  const struct variable *wv = dict_get_weight (dataset_dict (ds));
-  proc->dict = dataset_dict (ds);
-  proc->bad_warn = true;
-  proc->variables = NULL;
-  proc->n_variables = 0;
-  proc->pivots = NULL;
-  proc->n_pivots = 0;
-  proc->weight_format = wv ? *var_get_print_format (wv) : F_8_0;
-}
-
-static void
-free_proc (struct crosstabs_proc *proc)
-{
-  struct pivot_table *pt;
-
-  free (proc->variables);
-  for (pt = &proc->pivots[0]; pt < &proc->pivots[proc->n_pivots]; pt++)
-    {
-      free (pt->vars);
-      free (pt->const_vars);
-      /* We must not call value_destroy on const_values because
-         it is a wild pointer; it never pointed to anything owned
-         by the pivot_table.
-
-         The rest of the data was allocated and destroyed at a
-         lower level already. */
-      free (pt);
-    }
-}
-
-static int internal_cmd_crosstabs (struct lexer *lexer, struct dataset *ds,
-                                   struct crosstabs_proc *);
 static bool should_tabulate_case (const struct pivot_table *,
                                   const struct ccase *, enum mv_class exclude);
 static void tabulate_general_case (struct pivot_table *, const struct ccase *,
@@ -243,94 +207,92 @@ static void tabulate_general_case (struct pivot_table *, const struct ccase *,
 static void tabulate_integer_case (struct pivot_table *, const struct ccase *,
                                    double weight);
 static void postcalc (struct crosstabs_proc *);
-static void submit (struct crosstabs_proc *, struct pivot_table *,
-                    struct tab_table *);
+static void submit (struct pivot_table *, struct tab_table *);
 
-/* Parse and execute CROSSTABS, then clean up. */
+/* Parses and executes the CROSSTABS procedure. */
 int
 cmd_crosstabs (struct lexer *lexer, struct dataset *ds)
 {
+  const struct variable *wv = dict_get_weight (dataset_dict (ds));
   struct crosstabs_proc proc;
-  int result;
-
-  init_proc (&proc, ds);
-  result = internal_cmd_crosstabs (lexer, ds, &proc);
-  free_proc (&proc);
-
-  return result;
-}
-
-/* Parses and executes the CROSSTABS procedure. */
-static int
-internal_cmd_crosstabs (struct lexer *lexer, struct dataset *ds,
-                        struct crosstabs_proc *proc)
-{
   struct casegrouper *grouper;
   struct casereader *input, *group;
   struct cmd_crosstabs cmd;
   struct pivot_table *pt;
+  int result;
   bool ok;
   int i;
 
-  if (!parse_crosstabs (lexer, ds, &cmd, proc))
-    return CMD_FAILURE;
+  proc.dict = dataset_dict (ds);
+  proc.bad_warn = true;
+  proc.variables = NULL;
+  proc.n_variables = 0;
+  proc.pivots = NULL;
+  proc.n_pivots = 0;
+  proc.weight_format = wv ? *var_get_print_format (wv) : F_8_0;
+
+  if (!parse_crosstabs (lexer, ds, &cmd, &proc))
+    {
+      result = CMD_FAILURE;
+      goto exit;
+    }
 
-  proc->mode = proc->n_variables ? INTEGER : GENERAL;
+  proc.mode = proc.n_variables ? INTEGER : GENERAL;
 
   /* CELLS. */
   if (!cmd.sbc_cells)
-    proc->cells = 1u << CRS_CL_COUNT;
+    proc.cells = 1u << CRS_CL_COUNT;
   else if (cmd.a_cells[CRS_CL_ALL])
-    proc->cells = UINT_MAX;
+    proc.cells = UINT_MAX;
   else
     {
-      proc->cells = 0;
+      proc.cells = 0;
       for (i = 0; i < CRS_CL_count; i++)
        if (cmd.a_cells[i])
-         proc->cells |= 1u << i;
-      if (proc->cells == 0)
-        proc->cells = ((1u << CRS_CL_COUNT)
+         proc.cells |= 1u << i;
+      if (proc.cells == 0)
+        proc.cells = ((1u << CRS_CL_COUNT)
                        | (1u << CRS_CL_ROW)
                        | (1u << CRS_CL_COLUMN)
                        | (1u << CRS_CL_TOTAL));
     }
-  proc->cells &= ((1u << CRS_CL_count) - 1);
-  proc->cells &= ~((1u << CRS_CL_NONE) | (1u << CRS_CL_ALL));
-  proc->n_cells = 0;
+  proc.cells &= ((1u << CRS_CL_count) - 1);
+  proc.cells &= ~((1u << CRS_CL_NONE) | (1u << CRS_CL_ALL));
+  proc.n_cells = 0;
   for (i = 0; i < CRS_CL_count; i++)
-    if (proc->cells & (1u << i))
-      proc->a_cells[proc->n_cells++] = i;
+    if (proc.cells & (1u << i))
+      proc.a_cells[proc.n_cells++] = i;
 
   /* STATISTICS. */
   if (cmd.a_statistics[CRS_ST_ALL])
-    proc->statistics = UINT_MAX;
+    proc.statistics = UINT_MAX;
   else if (cmd.sbc_statistics)
     {
       int i;
 
-      proc->statistics = 0;
+      proc.statistics = 0;
       for (i = 0; i < CRS_ST_count; i++)
        if (cmd.a_statistics[i])
-         proc->statistics |= 1u << i;
-      if (proc->statistics == 0)
-        proc->statistics |= 1u << CRS_ST_CHISQ;
+         proc.statistics |= 1u << i;
+      if (proc.statistics == 0)
+        proc.statistics |= 1u << CRS_ST_CHISQ;
     }
   else
-    proc->statistics = 0;
+    proc.statistics = 0;
 
   /* MISSING. */
-  proc->exclude = (cmd.miss == CRS_TABLE ? MV_ANY
+  proc.exclude = (cmd.miss == CRS_TABLE ? MV_ANY
                    : cmd.miss == CRS_INCLUDE ? MV_SYSTEM
                    : MV_NEVER);
-  if (proc->mode == GENERAL && proc->mode == MV_NEVER)
+  if (proc.mode == GENERAL && proc.mode == MV_NEVER)
     {
       msg (SE, _("Missing mode REPORT not allowed in general mode.  "
                 "Assuming MISSING=TABLE."));
-      proc->mode = MV_ANY;
+      proc.mode = MV_ANY;
     }
 
   /* PIVOT. */
-  proc->pivot = cmd.pivot == CRS_PIVOT;
+  proc.pivot = cmd.pivot == CRS_PIVOT;
 
   input = casereader_create_filter_weight (proc_open (ds), dataset_dict (ds),
                                            NULL, NULL);
@@ -347,15 +309,19 @@ internal_cmd_crosstabs (struct lexer *lexer, struct dataset *ds,
           case_unref (c);
         }
 
+      /* Initialize hash tables. */
+      for (pt = &proc.pivots[0]; pt < &proc.pivots[proc.n_pivots]; pt++)
+        hmap_init (&pt->data);
+
       /* Tabulate. */
       for (; (c = casereader_read (group)) != NULL; case_unref (c))
-        for (pt = &proc->pivots[0]; pt < &proc->pivots[proc->n_pivots]; pt++)
+        for (pt = &proc.pivots[0]; pt < &proc.pivots[proc.n_pivots]; pt++)
           {
             double weight = dict_get_case_weight (dataset_dict (ds), c,
-                                                  &proc->bad_warn);
-            if (should_tabulate_case (pt, c, proc->exclude))
+                                                  &proc.bad_warn);
+            if (should_tabulate_case (pt, c, proc.exclude))
               {
-                if (proc->mode == GENERAL)
+                if (proc.mode == GENERAL)
                   tabulate_general_case (pt, c, weight);
                 else
                   tabulate_integer_case (pt, c, weight);
@@ -366,12 +332,29 @@ internal_cmd_crosstabs (struct lexer *lexer, struct dataset *ds,
       casereader_destroy (group);
 
       /* Output. */
-      postcalc (proc);
+      postcalc (&proc);
     }
   ok = casegrouper_destroy (grouper);
   ok = proc_commit (ds) && ok;
 
-  return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
+  result = ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
+
+exit:
+  free (proc.variables);
+  for (pt = &proc.pivots[0]; pt < &proc.pivots[proc.n_pivots]; pt++)
+    {
+      free (pt->vars);
+      free (pt->const_vars);
+      /* We must not call value_destroy on const_values because
+         it is a wild pointer; it never pointed to anything owned
+         by the pivot_table.
+
+         The rest of the data was allocated and destroyed at a
+         lower level already. */
+    }
+  free (proc.pivots);
+
+  return result;
 }
 
 /* Parses the TABLES subcommand. */
@@ -446,9 +429,6 @@ crs_custom_tables (struct lexer *lexer, struct dataset *ds,
       pt->n_consts = 0;
       pt->const_vars = NULL;
       pt->const_values = NULL;
-      hmap_init (&pt->data);
-      pt->entries = NULL;
-      pt->n_entries = 0;
 
       for (j = 0; j < n_by; j++)
         pt->vars[j] = by[j][by_iter[j]];
@@ -655,9 +635,7 @@ tabulate_general_case (struct pivot_table *pt, const struct ccase *c,
   for (j = 0; j < pt->n_vars; j++)
     {
       const struct variable *var = pt->vars[j];
-      int width = var_get_width (var);
-      value_init (&te->values[j], width);
-      value_copy (&te->values[j], case_data (c, var), width);
+      value_clone (&te->values[j], case_data (c, var), var_get_width (var));
     }
   hmap_insert (&pt->data, &te->node, hash);
 }
@@ -836,7 +814,7 @@ make_summary_table (struct crosstabs_proc *proc)
   struct string name;
   int i;
 
-  summary = tab_create (7, 3 + proc->n_pivots, 1);
+  summary = tab_create (7, 3 + proc->n_pivots);
   tab_title (summary, _("Summary."));
   tab_headers (summary, 1, 0, 3, 0);
   tab_joint_text (summary, 1, 0, 6, 0, TAB_CENTER, _("Cases"));
@@ -891,7 +869,7 @@ make_summary_table (struct crosstabs_proc *proc)
     }
   ds_destroy (&name);
 
-  submit (proc, NULL, summary);
+  submit (NULL, summary);
 }
 \f
 /* Output. */
@@ -914,8 +892,6 @@ static void display_symmetric (struct crosstabs_proc *, struct pivot_table *,
 static void display_risk (struct pivot_table *, struct tab_table *);
 static void display_directional (struct crosstabs_proc *, struct pivot_table *,
                                  struct tab_table *);
-static void crosstabs_dim (struct tab_table *, struct outp_driver *,
-                           void *proc);
 static void table_value_missing (struct crosstabs_proc *proc,
                                  struct tab_table *table, int c, int r,
                                 unsigned char opt, const union value *v,
@@ -1023,18 +999,18 @@ output_pivot_table (struct crosstabs_proc *proc, struct pivot_table *pt)
       free (x.col_tot);
     }
 
-  submit (proc, NULL, table);
+  submit (NULL, table);
 
   if (chisq)
     {
       if (!showed_fisher)
        tab_resize (chisq, 4 + (pt->n_vars - 2), -1);
-      submit (proc, pt, chisq);
+      submit (pt, chisq);
     }
 
-  submit (proc, pt, sym);
-  submit (proc, pt, risk);
-  submit (proc, pt, direct);
+  submit (pt, sym);
+  submit (pt, risk);
+  submit (pt, direct);
 
   free (pt->cols);
 }
@@ -1144,43 +1120,46 @@ create_crosstab_table (struct crosstabs_proc *proc, struct pivot_table *pt)
 
   struct tab_table *table;
   struct string title;
+  struct pivot_table x;
+
   int i;
 
-  table = tab_create (pt->n_consts + 1 + pt->n_cols + 1,
-                      (pt->n_entries / pt->n_cols) * 3 / 2 * proc->n_cells + 10,
-                      true);
-  tab_headers (table, pt->n_consts + 1, 0, 2, 0);
+  make_pivot_table_subset (pt, 0, 0, &x);
+
+  table = tab_create (x.n_consts + 1 + x.n_cols + 1,
+                      (x.n_entries / x.n_cols) * 3 / 2 * proc->n_cells + 10);
+  tab_headers (table, x.n_consts + 1, 0, 2, 0);
 
   /* First header line. */
-  tab_joint_text (table, pt->n_consts + 1, 0,
-                  (pt->n_consts + 1) + (pt->n_cols - 1), 0,
-                  TAB_CENTER | TAT_TITLE, var_get_name (pt->vars[COL_VAR]));
+  tab_joint_text (table, x.n_consts + 1, 0,
+                  (x.n_consts + 1) + (x.n_cols - 1), 0,
+                  TAB_CENTER | TAT_TITLE, var_get_name (x.vars[COL_VAR]));
 
-  tab_hline (table, TAL_1, pt->n_consts + 1,
-             pt->n_consts + 2 + pt->n_cols - 2, 1);
+  tab_hline (table, TAL_1, x.n_consts + 1,
+             x.n_consts + 2 + x.n_cols - 2, 1);
 
   /* Second header line. */
-  for (i = 2; i < pt->n_consts + 2; i++)
-    tab_joint_text (table, pt->n_consts + 2 - i - 1, 0,
-                    pt->n_consts + 2 - i - 1, 1,
-                    TAB_RIGHT | TAT_TITLE, var_to_string (pt->vars[i]));
-  tab_text (table, pt->n_consts + 2 - 2, 1, TAB_RIGHT | TAT_TITLE,
-            var_get_name (pt->vars[ROW_VAR]));
-  for (i = 0; i < pt->n_cols; i++)
-    table_value_missing (proc, table, pt->n_consts + 2 + i - 1, 1, TAB_RIGHT,
-                         &pt->cols[i], pt->vars[COL_VAR]);
-  tab_text (table, pt->n_consts + 2 + pt->n_cols - 1, 1, TAB_CENTER, _("Total"));
-
-  tab_hline (table, TAL_1, 0, pt->n_consts + 2 + pt->n_cols - 1, 2);
-  tab_vline (table, TAL_1, pt->n_consts + 2 + pt->n_cols - 1, 0, 1);
+  for (i = 2; i < x.n_consts + 2; i++)
+    tab_joint_text (table, x.n_consts + 2 - i - 1, 0,
+                    x.n_consts + 2 - i - 1, 1,
+                    TAB_RIGHT | TAT_TITLE, var_to_string (x.vars[i]));
+  tab_text (table, x.n_consts + 2 - 2, 1, TAB_RIGHT | TAT_TITLE,
+            var_get_name (x.vars[ROW_VAR]));
+  for (i = 0; i < x.n_cols; i++)
+    table_value_missing (proc, table, x.n_consts + 2 + i - 1, 1, TAB_RIGHT,
+                         &x.cols[i], x.vars[COL_VAR]);
+  tab_text (table, x.n_consts + 2 + x.n_cols - 1, 1, TAB_CENTER, _("Total"));
+
+  tab_hline (table, TAL_1, 0, x.n_consts + 2 + x.n_cols - 1, 2);
+  tab_vline (table, TAL_1, x.n_consts + 2 + x.n_cols - 1, 0, 1);
 
   /* Title. */
   ds_init_empty (&title);
-  for (i = 0; i < pt->n_consts + 2; i++)
+  for (i = 0; i < x.n_consts + 2; i++)
     {
       if (i)
         ds_put_cstr (&title, " * ");
-      ds_put_cstr (&title, var_get_name (pt->vars[i]));
+      ds_put_cstr (&title, var_get_name (x.vars[i]));
     }
   for (i = 0; i < pt->n_consts; i++)
     {
@@ -1193,7 +1172,8 @@ create_crosstab_table (struct crosstabs_proc *proc, struct pivot_table *pt)
       /* Insert the formatted value of the variable, then trim
          leading spaces in what was just inserted. */
       ofs = ds_length (&title);
-      s = data_out (&pt->const_values[i], dict_get_encoding (proc->dict), var_get_print_format (var));
+      s = data_out (&pt->const_values[i], var_get_encoding (var),
+                    var_get_print_format (var));
       ds_put_cstr (&title, s);
       free (s);
       ds_remove (&title, ofs, ss_cspan (ds_substr (&title, ofs, SIZE_MAX),
@@ -1224,8 +1204,7 @@ create_chisq_table (struct pivot_table *pt)
   struct tab_table *chisq;
 
   chisq = tab_create (6 + (pt->n_vars - 2),
-                      pt->n_entries / pt->n_cols * 3 / 2 * N_CHISQ + 10,
-                      1);
+                      pt->n_entries / pt->n_cols * 3 / 2 * N_CHISQ + 10);
   tab_headers (chisq, 1 + (pt->n_vars - 2), 0, 1, 0);
 
   tab_title (chisq, _("Chi-square tests."));
@@ -1252,7 +1231,7 @@ create_sym_table (struct pivot_table *pt)
   struct tab_table *sym;
 
   sym = tab_create (6 + (pt->n_vars - 2),
-                    pt->n_entries / pt->n_cols * 7 + 10, 1);
+                    pt->n_entries / pt->n_cols * 7 + 10);
   tab_headers (sym, 2 + (pt->n_vars - 2), 0, 1, 0);
   tab_title (sym, _("Symmetric measures."));
 
@@ -1274,8 +1253,7 @@ create_risk_table (struct pivot_table *pt)
 {
   struct tab_table *risk;
 
-  risk = tab_create (4 + (pt->n_vars - 2), pt->n_entries / pt->n_cols * 4 + 10,
-                     1);
+  risk = tab_create (4 + (pt->n_vars - 2), pt->n_entries / pt->n_cols * 4 + 10);
   tab_headers (risk, 1 + pt->n_vars - 2, 0, 2, 0);
   tab_title (risk, _("Risk estimate."));
 
@@ -1300,7 +1278,7 @@ create_direct_table (struct pivot_table *pt)
   struct tab_table *direct;
 
   direct = tab_create (7 + (pt->n_vars - 2),
-                       pt->n_entries / pt->n_cols * 7 + 10, 1);
+                       pt->n_entries / pt->n_cols * 7 + 10);
   tab_headers (direct, 3 + (pt->n_vars - 2), 0, 1, 0);
   tab_title (direct, _("Directional measures."));
 
@@ -1345,8 +1323,7 @@ delete_missing (struct pivot_table *pt)
 
 /* Prepare table T for submission, and submit it. */
 static void
-submit (struct crosstabs_proc *proc, struct pivot_table *pt,
-        struct tab_table *t)
+submit (struct pivot_table *pt, struct tab_table *t)
 {
   int i;
 
@@ -1356,7 +1333,7 @@ submit (struct crosstabs_proc *proc, struct pivot_table *pt,
   tab_resize (t, -1, 0);
   if (tab_nr (t) == tab_t (t))
     {
-      tab_destroy (t);
+      table_unref (&t->table);
       return;
     }
   tab_offset (t, 0, 0);
@@ -1370,49 +1347,8 @@ submit (struct crosstabs_proc *proc, struct pivot_table *pt,
   tab_box (t, -1, -1, -1, TAL_GAP, 0, tab_t (t), tab_l (t) - 1,
           tab_nr (t) - 1);
   tab_vline (t, TAL_2, tab_l (t), 0, tab_nr (t) - 1);
-  tab_dim (t, crosstabs_dim, proc);
-  tab_submit (t);
-}
-
-/* Sets the widths of all the columns and heights of all the rows in
-   table T for driver D. */
-static void
-crosstabs_dim (struct tab_table *t, struct outp_driver *d, void *proc_)
-{
-  struct crosstabs_proc *proc = proc_;
-  int i;
-
-  /* Width of a numerical column. */
-  int c = outp_string_width (d, "0.000000", OUTP_PROPORTIONAL);
-  if (proc->exclude == MV_NEVER)
-    c += outp_string_width (d, "M", OUTP_PROPORTIONAL);
 
-  /* Set width for header columns. */
-  if (t->l != 0)
-    {
-      size_t i;
-      int w;
-
-      w = d->width - c * (t->nc - t->l);
-      for (i = 0; i <= t->nc; i++)
-        w -= t->wrv[i];
-      w /= t->l;
-
-      if (w < d->prop_em_width * 8)
-       w = d->prop_em_width * 8;
-
-      if (w > d->prop_em_width * 15)
-       w = d->prop_em_width * 15;
-
-      for (i = 0; i < t->l; i++)
-       t->w[i] = w;
-    }
-
-  for (i = t->l; i < t->nc; i++)
-    t->w[i] = c;
-
-  for (i = 0; i < t->nr; i++)
-    t->h[i] = tab_natural_height (t, d, i);
+  tab_submit (t);
 }
 
 static bool
@@ -1513,26 +1449,21 @@ table_value_missing (struct crosstabs_proc *proc,
                      struct tab_table *table, int c, int r, unsigned char opt,
                     const union value *v, const struct variable *var)
 {
-  struct substring s;
-  const struct fmt_spec *print = var_get_print_format (var);
-
   const char *label = var_lookup_value_label (var, v);
-  if (label)
-    {
-      tab_text (table, c, r, TAB_LEFT, label);
-      return;
-    }
-
-  s = ss_cstr (data_out_pool (v, dict_get_encoding (proc->dict), print,
-                            table->container));
-  if (proc->exclude == MV_NEVER && var_is_num_missing (var, v->f, MV_USER))
-    s.string[s.length++] = 'M';
-  while (s.length && *s.string == ' ')
+  if (label != NULL)
+    tab_text (table, c, r, TAB_LEFT, label);
+  else
     {
-      s.length--;
-      s.string++;
+      const struct fmt_spec *print = var_get_print_format (var);
+      if (proc->exclude == MV_NEVER && var_is_value_missing (var, v, MV_USER))
+        {
+          char *s = data_out (v, dict_get_encoding (proc->dict), print);
+          tab_text_format (table, c, r, opt, "%sM", s + strspn (s, " "));
+          free (s);
+        }
+      else
+        tab_value (table, c, r, opt, v, proc->dict, print);
     }
-  tab_raw (table, c, r, opt, &s);
 }
 
 /* Draws a line across TABLE at the current row to indicate the most
@@ -1544,10 +1475,10 @@ static void
 display_dimensions (struct crosstabs_proc *proc, struct pivot_table *pt,
                     struct tab_table *table, int first_difference)
 {
-  tab_hline (table, TAL_1, pt->n_vars - first_difference - 1, tab_nc (table) - 1, 0);
+  tab_hline (table, TAL_1, pt->n_consts + pt->n_vars - first_difference - 1, tab_nc (table) - 1, 0);
 
   for (; first_difference >= 2; first_difference--)
-    table_value_missing (proc, table, pt->n_vars - first_difference - 1, 0,
+    table_value_missing (proc, table, pt->n_consts + pt->n_vars - first_difference - 1, 0,
                         TAB_RIGHT, &pt->entries[0]->values[first_difference],
                         pt->vars[first_difference]);
 }
@@ -1561,22 +1492,22 @@ format_cell_entry (struct tab_table *table, int c, int r, double value,
 {
   const struct fmt_spec f = {FMT_F, 10, 1};
   union value v;
-  struct substring s;
+  char suffixes[3];
+  int suffix_len;
+  char *s;
 
   v.f = value;
-  s = ss_cstr (data_out_pool (&v, dict_get_encoding (dict), &f, table->container));
+  s = data_out (&v, dict_get_encoding (dict), &f);
 
-  while (*s.string == ' ')
-    {
-      s.length--;
-      s.string++;
-    }
+  suffix_len = 0;
   if (suffix != 0)
-    s.string[s.length++] = suffix;
+    suffixes[suffix_len++] = suffix;
   if (mark_missing)
-    s.string[s.length++] = 'M';
+    suffixes[suffix_len++] = 'M';
+  suffixes[suffix_len] = '\0';
 
-  tab_raw (table, c, r, TAB_RIGHT, &s);
+  tab_text_format (table, c, r, TAB_RIGHT, "%s%s",
+                   s + strspn (s, " "), suffixes);
 }
 
 /* Displays the crosstabulation table. */
@@ -1589,15 +1520,16 @@ display_crosstabulation (struct crosstabs_proc *proc, struct pivot_table *pt,
   double *mp;
 
   for (r = 0; r < pt->n_rows; r++)
-    table_value_missing (proc, table, pt->n_vars - 2, r * proc->n_cells,
-                         TAB_RIGHT, &pt->rows[r], pt->vars[ROW_VAR]);
+    table_value_missing (proc, table, pt->n_consts + pt->n_vars - 2,
+                         r * proc->n_cells, TAB_RIGHT, &pt->rows[r],
+                         pt->vars[ROW_VAR]);
 
   tab_text (table, pt->n_vars - 2, pt->n_rows * proc->n_cells,
            TAB_LEFT, _("Total"));
 
   /* Put in the actual cells. */
   mp = pt->mat;
-  tab_offset (table, pt->n_vars - 1, -1);
+  tab_offset (table, pt->n_consts + pt->n_vars - 1, -1);
   for (r = 0; r < pt->n_rows; r++)
     {
       if (proc->n_cells > 1)
index 6b57fd297d8475ad63bcecc320a8c0c1b2d9201f..eb04bfa663889649855c771a944f98057e7381d8 100644 (file)
@@ -35,8 +35,7 @@
 #include <libpspp/message.h>
 #include <libpspp/assertion.h>
 #include <math/moments.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include "xalloc.h"
 
@@ -552,15 +551,13 @@ dump_z_table (struct dsc_proc *dsc)
        cnt++;
   }
 
-  t = tab_create (2, cnt + 1, 0);
+  t = tab_create (2, cnt + 1);
   tab_title (t, _("Mapping of variables to corresponding Z-scores."));
-  tab_columns (t, SOM_COL_DOWN, 1);
   tab_headers (t, 0, 0, 1, 0);
   tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 1, cnt);
   tab_hline (t, TAL_2, 0, 1, 1);
   tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Source"));
   tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Target"));
-  tab_dim (t, tab_natural_dimensions, NULL);
 
   {
     size_t i, y;
@@ -873,13 +870,12 @@ display (struct dsc_proc *dsc)
     sort (dsc->vars, dsc->var_cnt, sizeof *dsc->vars,
           descriptives_compare_dsc_vars, dsc);
 
-  t = tab_create (nc, dsc->var_cnt + 1, 0);
+  t = tab_create (nc, dsc->var_cnt + 1);
   tab_headers (t, 1, 0, 1, 0);
   tab_box (t, TAL_1, TAL_1, -1, -1, 0, 0, nc - 1, dsc->var_cnt);
   tab_box (t, -1, -1, -1, TAL_1, 1, 0, nc - 1, dsc->var_cnt);
   tab_hline (t, TAL_2, 0, nc - 1, 1);
   tab_vline (t, TAL_2, 1, 0, dsc->var_cnt);
-  tab_dim (t, tab_natural_dimensions, NULL);
 
   nc = 0;
   tab_text (t, nc++, 0, TAB_LEFT | TAT_TITLE, _("Variable"));
index 08077942340234031939cded549e87886d5119ee..d06f98ef9d79692cc6ad98cd1372dcfa79d571b4 100644 (file)
 #include <libpspp/misc.h>
 #include <libpspp/str.h>
 #include <math/moments.h>
-#include <output/charts/box-whisker.h>
-#include <output/charts/cartesian.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/chart-item.h>
+#include <output/charts/boxplot.h>
+#include <output/charts/np-plot.h>
+#include <output/tab.h>
 
 #include "minmax.h"
 #include "xalloc.h"
@@ -61,9 +61,7 @@
 #define N_(msgid) msgid
 
 /* (headers) */
-#include <output/chart.h>
 #include <output/charts/plot-hist.h>
-#include <output/charts/plot-chart.h>
 #include <math/histogram.h>
 
 /* (specification)
@@ -104,11 +102,11 @@ struct factor_metrics
   struct percentile **ptl;
   size_t n_ptiles;
 
-  struct statistic *tukey_hinges;
-  struct statistic *box_whisker;
-  struct statistic *trimmed_mean;
-  struct statistic *histogram;
-  struct order_stats *np;
+  struct tukey_hinges *tukey_hinges;
+  struct box_whisker *box_whisker;
+  struct trimmed_mean *trimmed_mean;
+  struct histogram *histogram;
+  struct np *np;
 
   /* Three quartiles indexing into PTL */
   struct percentile **quartiles;
@@ -179,12 +177,12 @@ factor_destroy (struct xfactor *fctr)
          moments1_destroy (result->metrics[v].moments);
          extrema_destroy (result->metrics[v].minima);
          extrema_destroy (result->metrics[v].maxima);
-         statistic_destroy (result->metrics[v].trimmed_mean);
-         statistic_destroy (result->metrics[v].tukey_hinges);
-         statistic_destroy (result->metrics[v].box_whisker);
-         statistic_destroy (result->metrics[v].histogram);
+         statistic_destroy (&result->metrics[v].trimmed_mean->parent.parent);
+         statistic_destroy (&result->metrics[v].tukey_hinges->parent.parent);
+         statistic_destroy (&result->metrics[v].box_whisker->parent.parent);
+         statistic_destroy (&result->metrics[v].histogram->parent);
          for (i = 0 ; i < result->metrics[v].n_ptiles; ++i)
-           statistic_destroy ((struct statistic *) result->metrics[v].ptl[i]);
+           statistic_destroy (&result->metrics[v].ptl[i]->parent.parent);
          free (result->metrics[v].ptl);
          free (result->metrics[v].quartiles);
          casereader_destroy (result->metrics[v].up_reader);
@@ -320,82 +318,6 @@ cmd_examine (struct lexer *lexer, struct dataset *ds)
 };
 
 
-/* Plot the normal and detrended normal plots for RESULT.
-   Label the plots with LABEL */
-static void
-np_plot (struct np *np, const char *label)
-{
-  double yfirst = 0, ylast = 0;
-
-  double x_lower;
-  double x_upper;
-  double slack;
-
-  /* Normal Plot */
-  struct chart *np_chart;
-
-  /* Detrended Normal Plot */
-  struct chart *dnp_chart;
-
-  /* The slope and intercept of the ideal normal probability line */
-  const double slope = 1.0 / np->stddev;
-  const double intercept = -np->mean / np->stddev;
-
-  if ( np->n < 1.0 )
-    {
-      msg (MW, _("Not creating plot because data set is empty."));
-      return ;
-    }
-
-  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"), label);
-  chart_write_xlabel (np_chart, _("Observed Value"));
-  chart_write_ylabel (np_chart, _("Expected Normal"));
-
-  chart_write_title (dnp_chart, _("Detrended Normal Q-Q Plot of %s"),
-                    label);
-  chart_write_xlabel (dnp_chart, _("Observed Value"));
-  chart_write_ylabel (dnp_chart, _("Dev from Normal"));
-
-  yfirst = gsl_cdf_ugaussian_Pinv (1 / (np->n + 1));
-  ylast = gsl_cdf_ugaussian_Pinv (np->n / (np->n + 1));
-
-  /* Need to make sure that both the scatter plot and the ideal fit into the
-     plot */
-  x_lower = MIN (np->y_min, (yfirst - intercept) / slope) ;
-  x_upper = MAX (np->y_max, (ylast  - intercept) / slope) ;
-  slack = (x_upper - x_lower)  * 0.05 ;
-
-  chart_write_xscale (np_chart, x_lower - slack, x_upper + slack, 5);
-  chart_write_xscale (dnp_chart, np->y_min, np->y_max, 5);
-
-  chart_write_yscale (np_chart, yfirst, ylast, 5);
-  chart_write_yscale (dnp_chart, np->dns_min, np->dns_max, 5);
-
-  {
-    struct casereader *reader = casewriter_make_reader (np->writer);
-    struct ccase *c;
-    while ((c = casereader_read (reader)) != NULL)
-      {
-       chart_datum (np_chart, 0, case_data_idx (c, NP_IDX_Y)->f, case_data_idx (c, NP_IDX_NS)->f);
-       chart_datum (dnp_chart, 0, case_data_idx (c, NP_IDX_Y)->f, case_data_idx (c, NP_IDX_DNS)->f);
-
-       case_unref (c);
-      }
-    casereader_destroy (reader);
-  }
-
-  chart_line (dnp_chart, 0, 0, np->y_min, np->y_max , CHART_DIM_X);
-  chart_line (np_chart, slope, intercept, yfirst, ylast , CHART_DIM_Y);
-
-  chart_submit (np_chart);
-  chart_submit (dnp_chart);
-}
 
 
 static void
@@ -412,20 +334,37 @@ show_npplot (const struct variable **dependent_var,
           ll != ll_null (&fctr->result_list);
           ll = ll_next (ll))
        {
-         struct string str;
+         struct string label;
          const struct factor_result *result =
            ll_data (ll, struct factor_result, ll);
-
-         ds_init_empty (&str);
-         ds_put_format (&str, "%s ", var_get_name (dependent_var[v]));
-
-         factor_to_string (fctr, result, &str);
-
-         np_plot ((struct np*) result->metrics[v].np, ds_cstr(&str));
-
-         statistic_destroy ((struct statistic *)result->metrics[v].np);
-
-         ds_destroy (&str);
+          struct chart_item *npp, *dnpp;
+          struct casereader *reader;
+          struct np *np;
+
+         ds_init_empty (&label);
+         ds_put_format (&label, "%s ", var_get_name (dependent_var[v]));
+         factor_to_string (fctr, result, &label);
+
+          np = result->metrics[v].np;
+          reader = casewriter_make_reader (np->writer);
+          npp = np_plot_create (np, reader, ds_cstr (&label));
+          dnpp = np_plot_create (np, reader, ds_cstr (&label));
+
+         ds_destroy (&label);
+
+          if (npp == NULL || dnpp == NULL)
+            {
+              msg (MW, _("Not creating NP plot because data set is empty."));
+              chart_item_unref (npp);
+              chart_item_unref (dnpp);
+            }
+          else
+            {
+              chart_item_submit (npp);
+              chart_item_submit (dnpp);
+            }
+
+         statistic_destroy (&np->parent.parent);
        }
     }
 }
@@ -448,15 +387,26 @@ show_histogram (const struct variable **dependent_var,
          struct string str;
          const struct factor_result *result =
            ll_data (ll, struct factor_result, ll);
+          struct histogram *histogram;
+          double mean, var, n;
+
+          histogram = result->metrics[v].histogram;
+          if (histogram == NULL)
+            {
+              /* Probably all values are SYSMIS. */
+              continue;
+            }
 
          ds_init_empty (&str);
          ds_put_format (&str, "%s ", var_get_name (dependent_var[v]));
 
          factor_to_string (fctr, result, &str);
 
-         histogram_plot ((struct histogram *) result->metrics[v].histogram,
-                         ds_cstr (&str),
-                         (struct moments1 *) result->metrics[v].moments);
+          moments1_calculate (result->metrics[v].moments,
+                              &n, &mean, &var, NULL,  NULL);
+          chart_item_submit (histogram_chart_create (histogram->gsl_hist,
+                                                     ds_cstr (&str), n, mean,
+                                                     sqrt (var), false));
 
          ds_destroy (&str);
        }
@@ -474,25 +424,18 @@ show_boxplot_groups (const struct variable **dependent_var,
 
   for (v = 0; v < n_dep_var; ++v)
     {
-      struct ll *ll;
-      int f = 0;
-      struct chart *ch = chart_create ();
+      const struct factor_result *result;
+      struct boxplot *boxplot;
       double y_min = DBL_MAX;
       double y_max = -DBL_MAX;
+      char *title;
 
-      for (ll = ll_head (&fctr->result_list);
-          ll != ll_null (&fctr->result_list);
-          ll = ll_next (ll))
+      ll_for_each (result, struct factor_result, ll, &fctr->result_list)
        {
+          struct factor_metrics *metrics = &result->metrics[v];
+         const struct ll_list *max_list = extrema_list (metrics->maxima);
+         const struct ll_list *min_list = extrema_list (metrics->minima);
          const struct extremum  *max, *min;
-         const struct factor_result *result =
-           ll_data (ll, struct factor_result, ll);
-
-         const struct ll_list *max_list =
-           extrema_list (result->metrics[v].maxima);
-
-         const struct ll_list *min_list =
-           extrema_list (result->metrics[v].minima);
 
          if ( ll_is_empty (max_list))
            {
@@ -500,52 +443,34 @@ show_boxplot_groups (const struct variable **dependent_var,
              continue;
            }
 
-         max = (const struct extremum *)
-           ll_data (ll_head(max_list), struct extremum, ll);
-
-          min = (const struct extremum *)
-           ll_data (ll_head (min_list), struct extremum, ll);
+         max = ll_data (ll_head(max_list), struct extremum, ll);
+          min = ll_data (ll_head (min_list), struct extremum, ll);
 
          y_max = MAX (y_max, max->value);
          y_min = MIN (y_min, min->value);
        }
 
-      boxplot_draw_yscale (ch, y_max, y_min);
-
-      if ( fctr->indep_var[0])
-       chart_write_title (ch, _("Boxplot of %s vs. %s"),
+      if (fctr->indep_var[0])
+       title = xasprintf (_("Boxplot of %s vs. %s"),
                           var_to_string (dependent_var[v]),
-                          var_to_string (fctr->indep_var[0]) );
+                          var_to_string (fctr->indep_var[0]));
       else
-       chart_write_title (ch, _("Boxplot of %s"),
-                          var_to_string (dependent_var[v]));
+       title = xasprintf (_("Boxplot of %s"),
+                           var_to_string (dependent_var[v]));
+      boxplot = boxplot_create (y_min, y_max, title);
+      free (title);
 
-      for (ll = ll_head (&fctr->result_list);
-          ll != ll_null (&fctr->result_list);
-          ll = ll_next (ll))
+      ll_for_each (result, struct factor_result, ll, &fctr->result_list)
        {
-         const struct factor_result *result =
-           ll_data (ll, struct factor_result, ll);
-
-         struct string str;
-         const double box_width = (ch->data_right - ch->data_left)
-           / (ll_count (&fctr->result_list) * 2.0 ) ;
-
-         const double box_centre = (f++ * 2 + 1) * box_width + ch->data_left;
-
-         ds_init_empty (&str);
+          struct factor_metrics *metrics = &result->metrics[v];
+         struct string str = DS_EMPTY_INITIALIZER;
          factor_to_string_concise (fctr, result, &str);
-
-         boxplot_draw_boxplot (ch,
-                               box_centre, box_width,
-                               (const struct box_whisker *)
-                                result->metrics[v].box_whisker,
-                               ds_cstr (&str));
-
+          boxplot_add_box (boxplot, metrics->box_whisker, ds_cstr (&str));
+          metrics->box_whisker = NULL;
          ds_destroy (&str);
        }
 
-      chart_submit (ch);
+      boxplot_submit (boxplot);
     }
 }
 
@@ -558,74 +483,42 @@ show_boxplot_variables (const struct variable **dependent_var,
                        )
 
 {
+  const struct factor_result *result;
   int v;
-  struct ll *ll;
-  const struct ll_list *result_list = &fctr->result_list;
-
-  for (ll = ll_head (result_list);
-       ll != ll_null (result_list);
-       ll = ll_next (ll))
 
+  ll_for_each (result, struct factor_result, ll, &fctr->result_list)
     {
       struct string title;
-      struct chart *ch = chart_create ();
       double y_min = DBL_MAX;
       double y_max = -DBL_MAX;
-
-      const struct factor_result *result =
-       ll_data (ll, struct factor_result, ll);
-
-      const double box_width = (ch->data_right - ch->data_left)
-       / (n_dep_var * 2.0 ) ;
+      struct boxplot *boxplot;
 
       for (v = 0; v < n_dep_var; ++v)
        {
-         const struct ll *max_ll =
-           ll_head (extrema_list (result->metrics[v].maxima));
-         const struct ll *min_ll =
-           ll_head (extrema_list (result->metrics[v].minima));
-
-         const struct extremum  *max =
-           (const struct extremum *) ll_data (max_ll, struct extremum, ll);
-
-          const struct extremum  *min =
-           (const struct extremum *) ll_data (min_ll, struct extremum, ll);
+          const struct factor_metrics *metrics = &result->metrics[v];
+         const struct ll *max_ll = ll_head (extrema_list (metrics->maxima));
+         const struct ll *min_ll = ll_head (extrema_list (metrics->minima));
+         const struct extremum *max = ll_data (max_ll, struct extremum, ll);
+          const struct extremum *min = ll_data (min_ll, struct extremum, ll);
 
          y_max = MAX (y_max, max->value);
          y_min = MIN (y_min, min->value);
        }
 
-
-      boxplot_draw_yscale (ch, y_max, y_min);
-
       ds_init_empty (&title);
       factor_to_string (fctr, result, &title);
-
-#if 0
-      ds_put_format (&title, "%s = ", var_get_name (fctr->indep_var[0]));
-      var_append_value_name (fctr->indep_var[0], &result->value[0], &title);
-#endif
-
-      chart_write_title (ch, ds_cstr (&title));
+      boxplot = boxplot_create (y_min, y_max, ds_cstr (&title));
       ds_destroy (&title);
 
       for (v = 0; v < n_dep_var; ++v)
        {
-         struct string str;
-         const double box_centre = (v * 2 + 1) * box_width + ch->data_left;
-
-         ds_init_empty (&str);
-         ds_init_cstr (&str, var_get_name (dependent_var[v]));
-
-         boxplot_draw_boxplot (ch,
-                               box_centre, box_width,
-                               (const struct box_whisker *) result->metrics[v].box_whisker,
-                               ds_cstr (&str));
-
-         ds_destroy (&str);
+          struct factor_metrics *metrics = &result->metrics[v];
+          boxplot_add_box (boxplot, metrics->box_whisker,
+                           var_get_name (dependent_var[v]));
+          metrics->box_whisker = NULL;
        }
 
-      chart_submit (ch);
+      boxplot_submit (boxplot);
     }
 }
 
@@ -674,16 +567,14 @@ output_examine (const struct dictionary *dict)
       if ( cmd.sbc_percentiles)
        show_percentiles (dependent_vars, n_dependent_vars, factor);
 
-      if (cmd.a_plot[XMN_PLT_BOXPLOT] &&
-         cmd.cmp == XMN_GROUPS)
-       show_boxplot_groups (dependent_vars, n_dependent_vars, factor);
-
-
-      if (cmd.a_plot[XMN_PLT_BOXPLOT] &&
-         cmd.cmp == XMN_VARIABLES)
-       show_boxplot_variables (dependent_vars, n_dependent_vars,
-                               factor);
-
+      if (cmd.a_plot[XMN_PLT_BOXPLOT])
+        {
+          if (cmd.cmp == XMN_GROUPS)
+            show_boxplot_groups (dependent_vars, n_dependent_vars, factor);
+          else if (cmd.cmp == XMN_VARIABLES)
+            show_boxplot_variables (dependent_vars, n_dependent_vars, factor);
+        }
+      
       if (cmd.a_plot[XMN_PLT_HISTOGRAM])
        show_histogram (dependent_vars, n_dependent_vars, factor);
 
@@ -989,15 +880,13 @@ examine_group (struct cmd_examine *cmd, struct casereader *reader, int level,
 
          metric->n_ptiles = percentile_list.n_data;
 
-         metric->ptl = xcalloc (metric->n_ptiles,
-                                sizeof (struct percentile *));
+         metric->ptl = xcalloc (metric->n_ptiles, sizeof *metric->ptl);
 
          metric->quartiles = xcalloc (3, sizeof (*metric->quartiles));
 
          for (i = 0 ; i < metric->n_ptiles; ++i)
            {
-             metric->ptl[i] = (struct percentile *)
-               percentile_create (percentile_list.data[i] / 100.0, metric->n_valid);
+             metric->ptl[i] = percentile_create (percentile_list.data[i] / 100.0, metric->n_valid);
 
              if ( percentile_list.data[i] == 25)
                metric->quartiles[0] = metric->ptl[i];
@@ -1018,18 +907,18 @@ examine_group (struct cmd_examine *cmd, struct casereader *reader, int level,
              n_os ++;
            }
 
-         os = xcalloc (sizeof (struct order_stats *), n_os);
+          os = xcalloc (n_os, sizeof *os);
 
          for (i = 0 ; i < metric->n_ptiles ; ++i )
            {
-             os[i] = (struct order_stats *) metric->ptl[i];
+             os[i] = &metric->ptl[i]->parent;
            }
 
-         os[i] = (struct order_stats *) metric->tukey_hinges;
-         os[i+1] = (struct order_stats *) metric->trimmed_mean;
+         os[i] = &metric->tukey_hinges->parent;
+         os[i+1] = &metric->trimmed_mean->parent;
 
          if (cmd->a_plot[XMN_PLT_NPPLOT])
-           os[i+2] = metric->np;
+           os[i+2] = &metric->np->parent;
 
          order_stats_accumulate (os, n_os,
                                  casereader_clone (metric->up_reader),
@@ -1080,7 +969,7 @@ examine_group (struct cmd_examine *cmd, struct casereader *reader, int level,
            {
              struct factor_metrics *metric = &result->metrics[v];
              if ( metric->histogram)
-               histogram_add ((struct histogram *) metric->histogram,
+               histogram_add (metric->histogram,
                               case_data (c, dependent_vars[v])->f, weight);
            }
          case_unref (c);
@@ -1096,13 +985,13 @@ examine_group (struct cmd_examine *cmd, struct casereader *reader, int level,
          struct factor_metrics *metric = &result->metrics[v];
           int n_vals = caseproto_get_n_widths (casereader_get_proto (
                                                  metric->up_reader));
+          struct order_stats *os;
 
          metric->box_whisker =
-           box_whisker_create ((struct tukey_hinges *) metric->tukey_hinges,
-                               cmd->v_id, n_vals - 1);
+           box_whisker_create ( metric->tukey_hinges, cmd->v_id, n_vals - 1);
 
-         order_stats_accumulate ((struct order_stats **) &metric->box_whisker,
-                                 1,
+          os = &metric->box_whisker->parent;
+         order_stats_accumulate ( &os, 1,
                                  casereader_clone (metric->up_reader),
                                  wv, dependent_vars[v], MV_ANY);
        }
@@ -1242,11 +1131,9 @@ show_summary (const struct variable **dependent_var, int n_dep_var,
 
   n_cols = heading_columns + 6;
 
-  tbl = tab_create (n_cols, n_rows, 0);
+  tbl = tab_create (n_cols, n_rows);
   tab_headers (tbl, heading_columns, 0, heading_rows, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
-
   /* Outline the box */
   tab_box (tbl,
           TAL_2, TAL_2,
@@ -1479,11 +1366,9 @@ show_descriptives (const struct variable **dependent_var,
 
   n_cols = heading_columns + 2;
 
-  tbl = tab_create (n_cols, n_rows, 0);
+  tbl = tab_create (n_cols, n_rows);
   tab_headers (tbl, heading_columns, 0, heading_rows, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
-
   /* Outline the box */
   tab_box (tbl,
           TAL_2, TAL_2,
@@ -1658,7 +1543,7 @@ show_descriptives (const struct variable **dependent_var,
          tab_double (tbl, n_cols - 2,
                     heading_rows + row_var_start + 3 + i * DESCRIPTIVE_ROWS,
                     TAB_CENTER,
-                    trimmed_mean_calculate ((struct trimmed_mean *) result->metrics[v].trimmed_mean),
+                    trimmed_mean_calculate (result->metrics[v].trimmed_mean),
                     NULL);
 
 
@@ -1791,11 +1676,9 @@ show_extremes (const struct variable **dependent_var,
 
   n_cols = heading_columns + 2;
 
-  tbl = tab_create (n_cols, n_rows, 0);
+  tbl = tab_create (n_cols, n_rows);
   tab_headers (tbl, heading_columns, 0, heading_rows, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
-
   /* Outline the box */
   tab_box (tbl,
           TAL_2, TAL_2,
@@ -1995,11 +1878,9 @@ show_percentiles (const struct variable **dependent_var,
 
   n_cols = heading_columns + n_percentiles;
 
-  tbl = tab_create (n_cols, n_rows, 0);
+  tbl = tab_create (n_cols, n_rows);
   tab_headers (tbl, heading_columns, 0, heading_rows, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
-
   /* Outline the box */
   tab_box (tbl,
           TAL_2, TAL_2,
@@ -2078,8 +1959,7 @@ show_percentiles (const struct variable **dependent_var,
 
          tab_vline (tbl, TAL_1, n_cols - n_percentiles -1, heading_rows, n_rows - 1);
 
-         tukey_hinges_calculate ((struct tukey_hinges *) result->metrics[v].tukey_hinges,
-                                 hinges);
+         tukey_hinges_calculate (result->metrics[v].tukey_hinges, hinges);
 
          for (j = 0; j < n_percentiles; ++j)
            {
diff --git a/src/language/stats/factor.c b/src/language/stats/factor.c
new file mode 100644 (file)
index 0000000..1043173
--- /dev/null
@@ -0,0 +1,1891 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+
+#include <gsl/gsl_vector.h>
+#include <gsl/gsl_linalg.h>
+#include <gsl/gsl_matrix.h>
+#include <gsl/gsl_eigen.h> 
+#include <gsl/gsl_blas.h> 
+#include <gsl/gsl_sort_vector.h>
+
+#include <math/covariance.h>
+
+#include <math/correlation.h>
+#include <math/moments.h>
+#include <data/procedure.h>
+#include <language/lexer/variable-parser.h>
+#include <language/lexer/value-parser.h>
+#include <language/command.h>
+#include <language/lexer/lexer.h>
+
+#include <data/casegrouper.h>
+#include <data/casereader.h>
+#include <data/casewriter.h>
+#include <data/dictionary.h>
+#include <data/format.h>
+#include <data/subcase.h>
+
+#include <libpspp/misc.h>
+#include <libpspp/message.h>
+
+#include <output/tab.h>
+
+#include <output/charts/scree.h>
+#include <output/chart-item.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+enum method
+  {
+    METHOD_CORR,
+    METHOD_COV
+  };
+
+enum missing_type
+  {
+    MISS_LISTWISE,
+    MISS_PAIRWISE,
+    MISS_MEANSUB,
+  };
+
+enum extraction_method
+  {
+    EXTRACTION_PC,
+    EXTRACTION_PAF,
+  };
+
+enum plot_opts
+  {
+    PLOT_SCREE = 0x0001,
+    PLOT_ROTATION = 0x0002
+  };
+
+enum print_opts
+  {
+    PRINT_UNIVARIATE  = 0x0001,
+    PRINT_DETERMINANT = 0x0002,
+    PRINT_INV         = 0x0004,
+    PRINT_AIC         = 0x0008,
+    PRINT_SIG         = 0x0010,
+    PRINT_COVARIANCE  = 0x0020,
+    PRINT_CORRELATION = 0x0040,
+    PRINT_ROTATION    = 0x0080,
+    PRINT_EXTRACTION  = 0x0100,
+    PRINT_INITIAL     = 0x0200,
+    PRINT_KMO         = 0x0400,
+    PRINT_REPR        = 0x0800, 
+    PRINT_FSCORE      = 0x1000
+  };
+
+enum rotation_type
+  {
+    ROT_VARIMAX = 0,
+    ROT_EQUAMAX,
+    ROT_QUARTIMAX,
+    ROT_NONE
+  };
+
+typedef void (*rotation_coefficients) (double *x, double *y,
+                                   double a, double b, double c, double d,
+                                   const gsl_matrix *loadings );
+
+
+static void
+varimax_coefficients (double *x, double *y,
+                     double a, double b, double c, double d,
+                     const gsl_matrix *loadings )
+{
+  *x = d - 2 * a * b / loadings->size1;
+  *y = c - (a * a - b * b) / loadings->size1;
+}
+
+static void
+equamax_coefficients (double *x, double *y,
+                     double a, double b, double c, double d,
+                     const gsl_matrix *loadings )
+{
+  *x = d - loadings->size2 * a * b / loadings->size1;
+  *y = c - loadings->size2 * (a * a - b * b) / (2 * loadings->size1);
+}
+
+static void
+quartimax_coefficients (double *x, double *y,
+                     double a UNUSED, double b UNUSED, double c, double d,
+                     const gsl_matrix *loadings UNUSED)
+{
+  *x = d ;
+  *y = c ;
+}
+
+static const rotation_coefficients rotation_coeff[3] = {
+  varimax_coefficients,
+  equamax_coefficients,
+  quartimax_coefficients
+};
+
+
+struct cmd_factor 
+{
+  size_t n_vars;
+  const struct variable **vars;
+
+  const struct variable *wv;
+
+  enum method method;
+  enum missing_type missing_type;
+  enum mv_class exclude;
+  enum print_opts print;
+  enum extraction_method extraction;
+  enum plot_opts plot;
+  enum rotation_type rotation;
+
+  /* Extraction Criteria */
+  int n_factors;
+  double min_eigen;
+  double econverge;
+  int iterations;
+
+  double rconverge;
+
+  /* Format */
+  double blank;
+  bool sort;
+};
+
+struct idata
+{
+  /* Intermediate values used in calculation */
+
+  const gsl_matrix *corr ;  /* The correlation matrix */
+  const gsl_matrix *cov ;   /* The covariance matrix */
+  const gsl_matrix *n ;     /* Matrix of number of samples */
+
+  gsl_vector *eval ;  /* The eigenvalues */
+  gsl_matrix *evec ;  /* The eigenvectors */
+
+  int n_extractions;
+
+  gsl_vector *msr ;  /* Multiple Squared Regressions */
+};
+
+static struct idata *
+idata_alloc (size_t n_vars)
+{
+  struct idata *id = xzalloc (sizeof (*id));
+
+  id->n_extractions = 0;
+  id->msr = gsl_vector_alloc (n_vars);
+
+  id->eval = gsl_vector_alloc (n_vars);
+  id->evec = gsl_matrix_alloc (n_vars, n_vars);
+
+  return id;
+}
+
+static void
+idata_free (struct idata *id)
+{
+  gsl_vector_free (id->msr);
+  gsl_vector_free (id->eval);
+  gsl_matrix_free (id->evec);
+
+  free (id);
+}
+
+
+static void
+dump_matrix (const gsl_matrix *m)
+{
+  size_t i, j;
+
+  for (i = 0 ; i < m->size1; ++i)
+    {
+      for (j = 0 ; j < m->size2; ++j)
+       printf ("%02f ", gsl_matrix_get (m, i, j));
+      printf ("\n");
+    }
+}
+
+
+static void
+dump_matrix_permute (const gsl_matrix *m, const gsl_permutation *p)
+{
+  size_t i, j;
+
+  for (i = 0 ; i < m->size1; ++i)
+    {
+      for (j = 0 ; j < m->size2; ++j)
+       printf ("%02f ", gsl_matrix_get (m, gsl_permutation_get (p, i), j));
+      printf ("\n");
+    }
+}
+
+
+static void
+dump_vector (const gsl_vector *v)
+{
+  size_t i;
+  for (i = 0 ; i < v->size; ++i)
+    {
+      printf ("%02f\n", gsl_vector_get (v, i));
+    }
+  printf ("\n");
+}
+
+
+static int 
+n_extracted_factors (const struct cmd_factor *factor, struct idata *idata)
+{
+  int i;
+  
+  /* If there is a cached value, then return that. */
+  if ( idata->n_extractions != 0)
+    return idata->n_extractions;
+
+  /* Otherwise, if the number of factors has been explicitly requested,
+     use that. */
+  if (factor->n_factors > 0)
+    {
+      idata->n_extractions = factor->n_factors;
+      goto finish;
+    }
+  
+  /* Use the MIN_EIGEN setting. */
+  for (i = 0 ; i < idata->eval->size; ++i)
+    {
+      double evali = fabs (gsl_vector_get (idata->eval, i));
+
+      idata->n_extractions = i;
+
+      if (evali < factor->min_eigen)
+       goto finish;
+    }
+
+ finish:
+  return idata->n_extractions;
+}
+
+
+/* Returns a newly allocated matrix identical to M.
+   It it the callers responsibility to free the returned value.
+*/
+static gsl_matrix *
+matrix_dup (const gsl_matrix *m)
+{
+  gsl_matrix *n =  gsl_matrix_alloc (m->size1, m->size2);
+
+  gsl_matrix_memcpy (n, m);
+
+  return n;
+}
+
+
+struct smr_workspace
+{
+  /* Copy of the subject */
+  gsl_matrix *m;
+  
+  gsl_matrix *inverse;
+
+  gsl_permutation *perm;
+
+  gsl_matrix *result1;
+  gsl_matrix *result2;
+};
+
+
+static struct smr_workspace *ws_create (const gsl_matrix *input)
+{
+  struct smr_workspace *ws = xmalloc (sizeof (*ws));
+  
+  ws->m = gsl_matrix_alloc (input->size1, input->size2);
+  ws->inverse = gsl_matrix_calloc (input->size1 - 1, input->size2 - 1);
+  ws->perm = gsl_permutation_alloc (input->size1 - 1);
+  ws->result1 = gsl_matrix_calloc (input->size1 - 1, 1);
+  ws->result2 = gsl_matrix_calloc (1, 1);
+
+  return ws;
+}
+
+static void
+ws_destroy (struct smr_workspace *ws)
+{
+  gsl_matrix_free (ws->result2);
+  gsl_matrix_free (ws->result1);
+  gsl_permutation_free (ws->perm);
+  gsl_matrix_free (ws->inverse);
+  gsl_matrix_free (ws->m);
+
+  free (ws);
+}
+
+
+/* 
+   Return the square of the regression coefficient for VAR regressed against all other variables.
+ */
+static double
+squared_multiple_correlation (const gsl_matrix *corr, int var, struct smr_workspace *ws)
+{
+  /* For an explanation of what this is doing, see 
+     http://www.visualstatistics.net/Visual%20Statistics%20Multimedia/multiple_regression_analysis.htm
+  */
+
+  int signum = 0;
+  gsl_matrix_view rxx;
+
+  gsl_matrix_memcpy (ws->m, corr);
+
+  gsl_matrix_swap_rows (ws->m, 0, var);
+  gsl_matrix_swap_columns (ws->m, 0, var);
+
+  rxx = gsl_matrix_submatrix (ws->m, 1, 1, ws->m->size1 - 1, ws->m->size1 - 1); 
+
+  gsl_linalg_LU_decomp (&rxx.matrix, ws->perm, &signum);
+
+  gsl_linalg_LU_invert (&rxx.matrix, ws->perm, ws->inverse);
+
+  {
+    gsl_matrix_const_view rxy = gsl_matrix_const_submatrix (ws->m, 1, 0, ws->m->size1 - 1, 1);
+    gsl_matrix_const_view ryx = gsl_matrix_const_submatrix (ws->m, 0, 1, 1, ws->m->size1 - 1);
+
+    gsl_blas_dgemm (CblasNoTrans,  CblasNoTrans,
+                   1.0, ws->inverse, &rxy.matrix, 0.0, ws->result1);
+
+    gsl_blas_dgemm (CblasNoTrans,  CblasNoTrans,
+                   1.0, &ryx.matrix, ws->result1, 0.0, ws->result2);
+  }
+
+  return gsl_matrix_get (ws->result2, 0, 0);
+}
+
+
+
+static double the_communality (const gsl_matrix *evec, const gsl_vector *eval, int n, int n_factors);
+
+
+struct factor_matrix_workspace
+{
+  size_t n_factors;
+  gsl_eigen_symmv_workspace *eigen_ws;
+
+  gsl_vector *eval ;
+  gsl_matrix *evec ;
+
+  gsl_matrix *gamma ;
+
+  gsl_matrix *r;
+};
+
+static struct factor_matrix_workspace *
+factor_matrix_workspace_alloc (size_t n, size_t nf)
+{
+  struct factor_matrix_workspace *ws = xmalloc (sizeof (*ws));
+
+  ws->n_factors = nf;
+  ws->gamma = gsl_matrix_calloc (nf, nf);
+  ws->eigen_ws = gsl_eigen_symmv_alloc (n);
+  ws->eval = gsl_vector_alloc (n);
+  ws->evec = gsl_matrix_alloc (n, n);
+  ws->r  = gsl_matrix_alloc (n, n);
+  
+  return ws;
+}
+
+static void
+factor_matrix_workspace_free (struct factor_matrix_workspace *ws)
+{
+  gsl_eigen_symmv_free (ws->eigen_ws);
+  gsl_vector_free (ws->eval);
+  gsl_matrix_free (ws->evec);
+  gsl_matrix_free (ws->gamma);
+  gsl_matrix_free (ws->r);
+  free (ws);
+}
+
+/*
+  Shift P left by OFFSET places, and overwrite TARGET
+  with the shifted result.
+  Positions in TARGET less than OFFSET are unchanged.
+*/
+static void
+perm_shift_apply (gsl_permutation *target, const gsl_permutation *p,
+                 size_t offset)
+{
+  size_t i;
+  assert (target->size == p->size);
+  assert (offset <= target->size);
+
+  for (i = 0; i < target->size - offset; ++i)
+    {
+      target->data[i] = p->data [i + offset];
+    }
+}
+
+
+/* 
+   Indirectly sort the rows of matrix INPUT, storing the sort order in PERM.
+   The sort criteria are as follows:
+   
+   Rows are sorted on the first column, until the absolute value of an
+   element in a subsequent column  is greater than that of the first
+   column.  Thereafter, rows will be sorted on the second column,
+   until the absolute value of an element in a subsequent column
+   exceeds that of the second column ...
+*/
+static void
+sort_matrix_indirect (const gsl_matrix *input, gsl_permutation *perm)
+{
+  const size_t n = perm->size;
+  const size_t m = input->size2;
+  int i, j;
+  gsl_matrix *mat ;
+  int column_n = 0;
+  int row_n = 0;
+  gsl_permutation *p;
+
+  assert (perm->size == input->size1);
+
+  p = gsl_permutation_alloc (n);
+
+  /* Copy INPUT into MAT, discarding the sign */
+  mat = gsl_matrix_alloc (n, m);
+  for (i = 0 ; i < mat->size1; ++i)
+    {
+      for (j = 0 ; j < mat->size2; ++j)
+       {
+         double x = gsl_matrix_get (input, i, j);
+         gsl_matrix_set (mat, i, j, fabs (x));
+       }
+    }
+
+  while (column_n < m && row_n < n) 
+    {
+      gsl_vector_const_view columni = gsl_matrix_const_column (mat, column_n);
+      gsl_sort_vector_index (p, &columni.vector);
+
+      for (i = 0 ; i < n; ++i)
+       {
+         gsl_vector_view row = gsl_matrix_row (mat, p->data[n - 1 - i]);
+         size_t maxindex = gsl_vector_max_index (&row.vector);
+         
+         if ( maxindex > column_n )
+           break;
+
+         /* All subsequent elements of this row, are of no interest.
+            So set them all to a highly negative value */
+         for (j = column_n + 1; j < row.vector.size ; ++j)
+           gsl_vector_set (&row.vector, j, -DBL_MAX);
+       }
+
+      perm_shift_apply (perm, p, row_n);
+      row_n += i;
+
+      column_n++;
+    }
+
+  gsl_permutation_free (p);
+  gsl_matrix_free (mat);
+  
+  assert ( 0 == gsl_permutation_valid (perm));
+
+  /* We want the biggest value to be first */
+  gsl_permutation_reverse (perm);    
+}
+
+
+static void
+drot_go (double phi, double *l0, double *l1)
+{
+  double r0 = cos (phi) * *l0 + sin (phi) * *l1;
+  double r1 = - sin (phi) * *l0 + cos (phi) * *l1;
+
+  *l0 = r0;
+  *l1 = r1;
+}
+
+
+static gsl_matrix *
+clone_matrix (const gsl_matrix *m)
+{
+  int j, k;
+  gsl_matrix *c = gsl_matrix_calloc (m->size1, m->size2);
+
+  for (j = 0 ; j < c->size1; ++j)
+    {
+      for (k = 0 ; k < c->size2; ++k)
+       {
+         const double *v = gsl_matrix_const_ptr (m, j, k);
+         gsl_matrix_set (c, j, k, *v);
+       }
+    }
+
+  return c;
+}
+
+
+static double 
+initial_sv (const gsl_matrix *fm)
+{
+  int j, k;
+
+  double sv = 0.0;
+  for (j = 0 ; j < fm->size2; ++j)
+    {
+      double l4s = 0;
+      double l2s = 0;
+
+      for (k = j + 1 ; k < fm->size2; ++k)
+       {
+         double lambda = gsl_matrix_get (fm, k, j);
+         double lambda_sq = lambda * lambda;
+         double lambda_4 = lambda_sq * lambda_sq;
+
+         l4s += lambda_4;
+         l2s += lambda_sq;
+       }
+      sv += ( fm->size1 * l4s - (l2s * l2s) ) / (fm->size1 * fm->size1 );
+    }
+  return sv;
+}
+
+static void
+rotate (const struct cmd_factor *cf, const gsl_matrix *unrot,
+       const gsl_vector *communalities,
+       gsl_matrix *result,
+       gsl_vector *rotated_loadings
+       )
+{
+  int j, k;
+  int i;
+  double prev_sv;
+
+  /* First get a normalised version of UNROT */
+  gsl_matrix *normalised = gsl_matrix_calloc (unrot->size1, unrot->size2);
+  gsl_matrix *h_sqrt = gsl_matrix_calloc (communalities->size, communalities->size);
+  gsl_matrix *h_sqrt_inv ;
+
+  /* H is the diagonal matrix containing the absolute values of the communalities */
+  for (i = 0 ; i < communalities->size ; ++i)
+    {
+      double *ptr = gsl_matrix_ptr (h_sqrt, i, i);
+      *ptr = fabs (gsl_vector_get (communalities, i));
+    }
+
+  /* Take the square root of the communalities */
+  gsl_linalg_cholesky_decomp (h_sqrt);
+
+
+  /* Save a copy of h_sqrt and invert it */
+  h_sqrt_inv = clone_matrix (h_sqrt);
+  gsl_linalg_cholesky_decomp (h_sqrt_inv);
+  gsl_linalg_cholesky_invert (h_sqrt_inv);
+
+  /* normalised vertion is H^{1/2} x UNROT */
+  gsl_blas_dgemm (CblasNoTrans,  CblasNoTrans, 1.0, h_sqrt_inv, unrot, 0.0, normalised);
+
+  gsl_matrix_free (h_sqrt_inv);
+
+
+  /* Now perform the rotation iterations */
+
+  prev_sv = initial_sv (normalised);
+  for (i = 0 ; i < cf->iterations ; ++i)
+    {
+      double sv = 0.0;
+      for (j = 0 ; j < normalised->size2; ++j)
+       {
+         /* These variables relate to the convergence criterium */
+         double l4s = 0;
+         double l2s = 0;
+
+         for (k = j + 1 ; k < normalised->size2; ++k)
+           {
+             int p;
+             double a = 0.0;
+             double b = 0.0;
+             double c = 0.0;
+             double d = 0.0;
+             double x, y;
+             double phi;
+
+             for (p = 0; p < normalised->size1; ++p)
+               {
+                 double jv = gsl_matrix_get (normalised, p, j);
+                 double kv = gsl_matrix_get (normalised, p, k);
+             
+                 double u = jv * jv - kv * kv;
+                 double v = 2 * jv * kv;
+                 a += u;
+                 b += v;
+                 c +=  u * u - v * v;
+                 d += 2 * u * v;
+               }
+
+             rotation_coeff [cf->rotation] (&x, &y, a, b, c, d, normalised);
+
+             phi = atan2 (x,  y) / 4.0 ;
+
+             /* Don't bother rotating if the angle is small */
+             if ( fabs (sin (phi) ) <= pow (10.0, -15.0))
+                 continue;
+
+             for (p = 0; p < normalised->size1; ++p)
+               {
+                 double *lambda0 = gsl_matrix_ptr (normalised, p, j);
+                 double *lambda1 = gsl_matrix_ptr (normalised, p, k);
+                 drot_go (phi, lambda0, lambda1);
+               }
+
+             /* Calculate the convergence criterium */
+             {
+               double lambda = gsl_matrix_get (normalised, k, j);
+               double lambda_sq = lambda * lambda;
+               double lambda_4 = lambda_sq * lambda_sq;
+
+               l4s += lambda_4;
+               l2s += lambda_sq;
+             }
+           }
+         sv += ( normalised->size1 * l4s - (l2s * l2s) ) / (normalised->size1 * normalised->size1 );
+       }
+
+      if ( fabs (sv - prev_sv) <= cf->rconverge)
+       break;
+
+      prev_sv = sv;
+    }
+
+  gsl_blas_dgemm (CblasNoTrans,  CblasNoTrans, 1.0,
+                 h_sqrt, normalised,  0.0,   result);
+
+  gsl_matrix_free (h_sqrt);
+
+
+  /* reflect negative sums and populate the rotated loadings vector*/
+  for (i = 0 ; i < result->size2; ++i)
+    {
+      double ssq = 0.0;
+      double sum = 0.0;
+      for (j = 0 ; j < result->size1; ++j)
+       {
+         double s = gsl_matrix_get (result, j, i);
+         ssq += s * s;
+         sum += gsl_matrix_get (result, j, i);
+       }
+
+      gsl_vector_set (rotated_loadings, i, ssq);
+
+      if ( sum < 0 )
+       for (j = 0 ; j < result->size1; ++j)
+         {
+           double *lambda = gsl_matrix_ptr (result, j, i);
+           *lambda = - *lambda;
+         }
+    }
+}
+
+
+/*
+  Get an approximation for the factor matrix into FACTORS, and the communalities into COMMUNALITIES.
+  R is the matrix to be analysed.
+  WS is a pointer to a structure which must have been initialised with factor_matrix_workspace_init.
+ */
+static void
+iterate_factor_matrix (const gsl_matrix *r, gsl_vector *communalities, gsl_matrix *factors, 
+                      struct factor_matrix_workspace *ws)
+{
+  size_t i;
+  gsl_matrix_view mv ;
+
+  assert (r->size1 == r->size2);
+  assert (r->size1 == communalities->size);
+
+  assert (factors->size1 == r->size1);
+  assert (factors->size2 == ws->n_factors);
+
+  gsl_matrix_memcpy (ws->r, r);
+
+  /* Apply Communalities to diagonal of correlation matrix */
+  for (i = 0 ; i < communalities->size ; ++i)
+    {
+      double *x = gsl_matrix_ptr (ws->r, i, i);
+      *x = gsl_vector_get (communalities, i);
+    }
+
+  gsl_eigen_symmv (ws->r, ws->eval, ws->evec, ws->eigen_ws);
+
+  mv = gsl_matrix_submatrix (ws->evec, 0, 0, ws->evec->size1, ws->n_factors);
+
+  /* Gamma is the diagonal matrix containing the absolute values of the eigenvalues */
+  for (i = 0 ; i < ws->n_factors ; ++i)
+    {
+      double *ptr = gsl_matrix_ptr (ws->gamma, i, i);
+      *ptr = fabs (gsl_vector_get (ws->eval, i));
+    }
+
+  /* Take the square root of gamma */
+  gsl_linalg_cholesky_decomp (ws->gamma);
+
+  gsl_blas_dgemm (CblasNoTrans,  CblasNoTrans, 1.0, &mv.matrix, ws->gamma, 0.0, factors);
+
+  for (i = 0 ; i < r->size1 ; ++i)
+    {
+      double h = the_communality (ws->evec, ws->eval, i, ws->n_factors);
+      gsl_vector_set (communalities, i, h);
+    }
+}
+
+
+
+static bool run_factor (struct dataset *ds, const struct cmd_factor *factor);
+
+
+int
+cmd_factor (struct lexer *lexer, struct dataset *ds)
+{
+  bool extraction_seen = false;
+  const struct dictionary *dict = dataset_dict (ds);
+
+  struct cmd_factor factor;
+  factor.n_vars = 0;
+  factor.vars = NULL;
+  factor.method = METHOD_CORR;
+  factor.missing_type = MISS_LISTWISE;
+  factor.exclude = MV_ANY;
+  factor.print = PRINT_INITIAL | PRINT_EXTRACTION | PRINT_ROTATION;
+  factor.extraction = EXTRACTION_PC;
+  factor.n_factors = 0;
+  factor.min_eigen = SYSMIS;
+  factor.iterations = 25;
+  factor.econverge = 0.001;
+
+  factor.blank = 0;
+  factor.sort = false;
+  factor.plot = 0;
+  factor.rotation = ROT_VARIMAX;
+
+  factor.rconverge = 0.0001;
+
+  factor.wv = dict_get_weight (dict);
+
+  lex_match (lexer, '/');
+
+  if (!lex_force_match_id (lexer, "VARIABLES"))
+    {
+      goto error;
+    }
+
+  lex_match (lexer, '=');
+
+  if (!parse_variables_const (lexer, dict, &factor.vars, &factor.n_vars,
+                             PV_NO_DUPLICATE | PV_NUMERIC))
+    goto error;
+
+  if (factor.n_vars < 2)
+    msg (MW, _("Factor analysis on a single variable is not useful."));
+
+  while (lex_token (lexer) != '.')
+    {
+      lex_match (lexer, '/');
+
+      if (lex_match_id (lexer, "PLOT"))
+       {
+          lex_match (lexer, '=');
+          while (lex_token (lexer) != '.' && lex_token (lexer) != '/')
+           {
+             if (lex_match_id (lexer, "EIGEN"))
+               {
+                 factor.plot |= PLOT_SCREE;
+               }
+#if FACTOR_FULLY_IMPLEMENTED
+             else if (lex_match_id (lexer, "ROTATION"))
+               {
+               }
+#endif
+             else
+               {
+                 lex_error (lexer, NULL);
+                 goto error;
+               }
+           }
+       }
+      else if (lex_match_id (lexer, "METHOD"))
+       {
+          lex_match (lexer, '=');
+          while (lex_token (lexer) != '.' && lex_token (lexer) != '/')
+           {
+             if (lex_match_id (lexer, "COVARIANCE"))
+               {
+                 factor.method = METHOD_COV;
+               }
+             else if (lex_match_id (lexer, "CORRELATION"))
+               {
+                 factor.method = METHOD_CORR;
+               }
+             else
+               {
+                 lex_error (lexer, NULL);
+                 goto error;
+               }
+           }
+       }
+      else if (lex_match_id (lexer, "ROTATION"))
+       {
+          lex_match (lexer, '=');
+          while (lex_token (lexer) != '.' && lex_token (lexer) != '/')
+           {
+             /* VARIMAX and DEFAULT are defaults */
+             if (lex_match_id (lexer, "VARIMAX") || lex_match_id (lexer, "DEFAULT"))
+               {
+                 factor.rotation = ROT_VARIMAX;
+               }
+             else if (lex_match_id (lexer, "EQUAMAX"))
+               {
+                 factor.rotation = ROT_EQUAMAX;
+               }
+             else if (lex_match_id (lexer, "QUARTIMAX"))
+               {
+                 factor.rotation = ROT_QUARTIMAX;
+               }
+             else if (lex_match_id (lexer, "NOROTATE"))
+               {
+                 factor.rotation = ROT_NONE;
+               }
+             else
+               {
+                 lex_error (lexer, NULL);
+                 goto error;
+               }
+           }
+       }
+      else if (lex_match_id (lexer, "CRITERIA"))
+       {
+          lex_match (lexer, '=');
+          while (lex_token (lexer) != '.' && lex_token (lexer) != '/')
+           {
+             if (lex_match_id (lexer, "FACTORS"))
+               {
+                 if ( lex_force_match (lexer, '('))
+                   {
+                     lex_force_int (lexer);
+                     factor.n_factors = lex_integer (lexer);
+                     lex_get (lexer);
+                     lex_force_match (lexer, ')');
+                   }
+               }
+             else if (lex_match_id (lexer, "MINEIGEN"))
+               {
+                 if ( lex_force_match (lexer, '('))
+                   {
+                     lex_force_num (lexer);
+                     factor.min_eigen = lex_number (lexer);
+                     lex_get (lexer);
+                     lex_force_match (lexer, ')');
+                   }
+               }
+             else if (lex_match_id (lexer, "ECONVERGE"))
+               {
+                 if ( lex_force_match (lexer, '('))
+                   {
+                     lex_force_num (lexer);
+                     factor.econverge = lex_number (lexer);
+                     lex_get (lexer);
+                     lex_force_match (lexer, ')');
+                   }
+               }
+             else if (lex_match_id (lexer, "RCONVERGE"))
+               {
+                 if ( lex_force_match (lexer, '('))
+                   {
+                     lex_force_num (lexer);
+                     factor.rconverge = lex_number (lexer);
+                     lex_get (lexer);
+                     lex_force_match (lexer, ')');
+                   }
+               }
+             else if (lex_match_id (lexer, "ITERATE"))
+               {
+                 if ( lex_force_match (lexer, '('))
+                   {
+                     lex_force_int (lexer);
+                     factor.iterations = lex_integer (lexer);
+                     lex_get (lexer);
+                     lex_force_match (lexer, ')');
+                   }
+               }
+             else if (lex_match_id (lexer, "DEFAULT"))
+               {
+                 factor.n_factors = 0;
+                 factor.min_eigen = 1;
+                 factor.iterations = 25;
+               }
+             else
+               {
+                 lex_error (lexer, NULL);
+                 goto error;
+               }
+           }
+       }
+      else if (lex_match_id (lexer, "EXTRACTION"))
+       {
+         extraction_seen = true;
+          lex_match (lexer, '=');
+          while (lex_token (lexer) != '.' && lex_token (lexer) != '/')
+           {
+             if (lex_match_id (lexer, "PAF"))
+               {
+                 factor.extraction = EXTRACTION_PAF;
+               }
+             else if (lex_match_id (lexer, "PC"))
+               {
+                 factor.extraction = EXTRACTION_PC;
+               }
+             else if (lex_match_id (lexer, "PA1"))
+               {
+                 factor.extraction = EXTRACTION_PC;
+               }
+             else if (lex_match_id (lexer, "DEFAULT"))
+               {
+                 factor.extraction = EXTRACTION_PC;
+               }
+             else
+               {
+                 lex_error (lexer, NULL);
+                 goto error;
+               }
+           }
+       }
+      else if (lex_match_id (lexer, "FORMAT"))
+       {
+          lex_match (lexer, '=');
+          while (lex_token (lexer) != '.' && lex_token (lexer) != '/')
+           {
+             if (lex_match_id (lexer, "SORT"))
+               {
+                 factor.sort = true;
+               }
+             else if (lex_match_id (lexer, "BLANK"))
+               {
+                 if ( lex_force_match (lexer, '('))
+                   {
+                     lex_force_num (lexer);
+                     factor.blank = lex_number (lexer);
+                     lex_get (lexer);
+                     lex_force_match (lexer, ')');
+                   }
+               }
+             else if (lex_match_id (lexer, "DEFAULT"))
+               {
+                 factor.blank = 0;
+                 factor.sort = false;
+               }
+             else
+               {
+                 lex_error (lexer, NULL);
+                 goto error;
+               }
+           }
+       }
+      else if (lex_match_id (lexer, "PRINT"))
+       {
+         factor.print = 0;
+          lex_match (lexer, '=');
+          while (lex_token (lexer) != '.' && lex_token (lexer) != '/')
+            {
+              if (lex_match_id (lexer, "UNIVARIATE"))
+               {
+                 factor.print |= PRINT_UNIVARIATE;
+               }
+             else if (lex_match_id (lexer, "DET"))
+               {
+                 factor.print |= PRINT_DETERMINANT;
+               }
+#if FACTOR_FULLY_IMPLEMENTED
+             else if (lex_match_id (lexer, "INV"))
+               {
+               }
+             else if (lex_match_id (lexer, "AIC"))
+               {
+               }
+#endif
+             else if (lex_match_id (lexer, "SIG"))
+               {
+                 factor.print |= PRINT_SIG;
+               }
+             else if (lex_match_id (lexer, "CORRELATION"))
+               {
+                 factor.print |= PRINT_CORRELATION;
+               }
+#if FACTOR_FULLY_IMPLEMENTED
+             else if (lex_match_id (lexer, "COVARIANCE"))
+               {
+               }
+#endif
+             else if (lex_match_id (lexer, "ROTATION"))
+               {
+                 factor.print |= PRINT_ROTATION;
+               }
+             else if (lex_match_id (lexer, "EXTRACTION"))
+               {
+                 factor.print |= PRINT_EXTRACTION;
+               }
+             else if (lex_match_id (lexer, "INITIAL"))
+               {
+                 factor.print |= PRINT_INITIAL;
+               }
+#if FACTOR_FULLY_IMPLEMENTED
+             else if (lex_match_id (lexer, "KMO"))
+               {
+               }
+             else if (lex_match_id (lexer, "REPR"))
+               {
+               }
+             else if (lex_match_id (lexer, "FSCORE"))
+               {
+               }
+#endif
+              else if (lex_match (lexer, T_ALL))
+               {
+                 factor.print = 0xFFFF;
+               }
+             else if (lex_match_id (lexer, "DEFAULT"))
+               {
+                 factor.print |= PRINT_INITIAL ;
+                 factor.print |= PRINT_EXTRACTION ;
+                 factor.print |= PRINT_ROTATION ;
+               }
+             else
+               {
+                 lex_error (lexer, NULL);
+                 goto error;
+               }
+           }
+       }
+      else if (lex_match_id (lexer, "MISSING"))
+        {
+          lex_match (lexer, '=');
+          while (lex_token (lexer) != '.' && lex_token (lexer) != '/')
+            {
+             if (lex_match_id (lexer, "INCLUDE"))
+               {
+                 factor.exclude = MV_SYSTEM;
+               }
+             else if (lex_match_id (lexer, "EXCLUDE"))
+               {
+                 factor.exclude = MV_ANY;
+               }
+             else if (lex_match_id (lexer, "LISTWISE"))
+               {
+                 factor.missing_type = MISS_LISTWISE;
+               }
+             else if (lex_match_id (lexer, "PAIRWISE"))
+               {
+                 factor.missing_type = MISS_PAIRWISE;
+               }
+             else if (lex_match_id (lexer, "MEANSUB"))
+               {
+                 factor.missing_type = MISS_MEANSUB;
+               }
+             else
+               {
+                  lex_error (lexer, NULL);
+                 goto error;
+               }
+           }
+       }
+      else
+       {
+         lex_error (lexer, NULL);
+         goto error;
+       }
+    }
+
+  if ( factor.rotation == ROT_NONE )
+    factor.print &= ~PRINT_ROTATION;
+
+  if ( ! run_factor (ds, &factor)) 
+    goto error;
+
+  free (factor.vars);
+  return CMD_SUCCESS;
+
+ error:
+  free (factor.vars);
+  return CMD_FAILURE;
+}
+
+static void do_factor (const struct cmd_factor *factor, struct casereader *group);
+
+
+static bool
+run_factor (struct dataset *ds, const struct cmd_factor *factor)
+{
+  struct dictionary *dict = dataset_dict (ds);
+  bool ok;
+  struct casereader *group;
+
+  struct casegrouper *grouper = casegrouper_create_splits (proc_open (ds), dict);
+
+  while (casegrouper_get_next_group (grouper, &group))
+    {
+      if ( factor->missing_type == MISS_LISTWISE )
+       group  = casereader_create_filter_missing (group, factor->vars, factor->n_vars,
+                                                  factor->exclude,
+                                                  NULL,  NULL);
+      do_factor (factor, group);
+    }
+
+  ok = casegrouper_destroy (grouper);
+  ok = proc_commit (ds) && ok;
+
+  return ok;
+}
+
+
+/* Return the communality of variable N, calculated to N_FACTORS */
+static double
+the_communality (const gsl_matrix *evec, const gsl_vector *eval, int n, int n_factors)
+{
+  size_t i;
+
+  double comm = 0;
+
+  assert (n >= 0);
+  assert (n < eval->size);
+  assert (n < evec->size1);
+  assert (n_factors <= eval->size);
+
+  for (i = 0 ; i < n_factors; ++i)
+    {
+      double evali = fabs (gsl_vector_get (eval, i));
+
+      double eveci = gsl_matrix_get (evec, n, i);
+
+      comm += pow2 (eveci) * evali;
+    }
+
+  return comm;
+}
+
+/* Return the communality of variable N, calculated to N_FACTORS */
+static double
+communality (struct idata *idata, int n, int n_factors)
+{
+  return the_communality (idata->evec, idata->eval, n, n_factors);
+}
+
+
+static void
+show_scree (const struct cmd_factor *f, struct idata *idata)
+{
+  struct scree *s;
+  const char *label ;
+
+  if ( !(f->plot & PLOT_SCREE) )
+    return;
+
+
+  label = f->extraction == EXTRACTION_PC ? _("Component Number") : _("Factor Number");
+
+  s = scree_create (idata->eval, label);
+
+  scree_submit (s);
+}
+
+static void
+show_communalities (const struct cmd_factor * factor,
+                   const gsl_vector *initial, const gsl_vector *extracted)
+{
+  int i;
+  int c = 0;
+  const int heading_columns = 1;
+  int nc = heading_columns;
+  const int heading_rows = 1;
+  const int nr = heading_rows + factor->n_vars;
+  struct tab_table *t;
+
+  if (factor->print & PRINT_EXTRACTION)
+    nc++;
+
+  if (factor->print & PRINT_INITIAL)
+    nc++;
+
+  /* No point having a table with only headings */
+  if (nc <= 1)
+    return;
+
+  t = tab_create (nc, nr);
+
+  tab_title (t, _("Communalities"));
+
+  tab_headers (t, heading_columns, 0, heading_rows, 0);
+
+  c = 1;
+  if (factor->print & PRINT_INITIAL)
+    tab_text (t, c++, 0, TAB_CENTER | TAT_TITLE, _("Initial"));
+
+  if (factor->print & PRINT_EXTRACTION)
+    tab_text (t, c++, 0, TAB_CENTER | TAT_TITLE, _("Extraction"));
+
+  /* Outline the box */
+  tab_box (t,
+          TAL_2, TAL_2,
+          -1, -1,
+          0, 0,
+          nc - 1, nr - 1);
+
+  /* Vertical lines */
+  tab_box (t,
+          -1, -1,
+          -1, TAL_1,
+          heading_columns, 0,
+          nc - 1, nr - 1);
+
+  tab_hline (t, TAL_1, 0, nc - 1, heading_rows);
+  tab_vline (t, TAL_2, heading_columns, 0, nr - 1);
+
+  for (i = 0 ; i < factor->n_vars; ++i)
+    {
+      c = 0;
+      tab_text (t, c++, i + heading_rows, TAT_TITLE, var_to_string (factor->vars[i]));
+
+      if (factor->print & PRINT_INITIAL)
+       tab_double (t, c++, i + heading_rows, 0, gsl_vector_get (initial, i), NULL);
+
+      if (factor->print & PRINT_EXTRACTION)
+       tab_double (t, c++, i + heading_rows, 0, gsl_vector_get (extracted, i), NULL);
+    }
+
+  tab_submit (t);
+}
+
+
+static void
+show_factor_matrix (const struct cmd_factor *factor, struct idata *idata, const char *title, const gsl_matrix *fm)
+{
+  int i;
+  const int n_factors = idata->n_extractions;
+
+  const int heading_columns = 1;
+  const int heading_rows = 2;
+  const int nr = heading_rows + factor->n_vars;
+  const int nc = heading_columns + n_factors;
+  gsl_permutation *perm;
+
+  struct tab_table *t = tab_create (nc, nr);
+
+  /* 
+  if ( factor->extraction == EXTRACTION_PC )
+    tab_title (t, _("Component Matrix"));
+  else 
+    tab_title (t, _("Factor Matrix"));
+  */
+
+  tab_title (t, title);
+
+  tab_headers (t, heading_columns, 0, heading_rows, 0);
+
+  if ( factor->extraction == EXTRACTION_PC )
+    tab_joint_text (t,
+                   1, 0,
+                   nc - 1, 0,
+                   TAB_CENTER | TAT_TITLE, _("Component"));
+  else
+    tab_joint_text (t,
+                   1, 0,
+                   nc - 1, 0,
+                   TAB_CENTER | TAT_TITLE, _("Factor"));
+
+
+  tab_hline (t, TAL_1, heading_columns, nc - 1, 1);
+
+
+  /* Outline the box */
+  tab_box (t,
+          TAL_2, TAL_2,
+          -1, -1,
+          0, 0,
+          nc - 1, nr - 1);
+
+  /* Vertical lines */
+  tab_box (t,
+          -1, -1,
+          -1, TAL_1,
+          heading_columns, 1,
+          nc - 1, nr - 1);
+
+  tab_hline (t, TAL_1, 0, nc - 1, heading_rows);
+  tab_vline (t, TAL_2, heading_columns, 0, nr - 1);
+
+
+  /* Initialise to the identity permutation */
+  perm = gsl_permutation_calloc (factor->n_vars);
+
+  if ( factor->sort)
+    sort_matrix_indirect (fm, perm);
+
+  for (i = 0 ; i < n_factors; ++i)
+    {
+      tab_text_format (t, heading_columns + i, 1, TAB_CENTER | TAT_TITLE, _("%d"), i + 1);
+    }
+
+  for (i = 0 ; i < factor->n_vars; ++i)
+    {
+      int j;
+      const int matrix_row = perm->data[i];
+      tab_text (t, 0, i + heading_rows, TAT_TITLE, var_to_string (factor->vars[matrix_row]));
+
+      for (j = 0 ; j < n_factors; ++j)
+       {
+         double x = gsl_matrix_get (fm, matrix_row, j);
+
+         if ( fabs (x) < factor->blank)
+           continue;
+
+         tab_double (t, heading_columns + j, heading_rows + i, 0, x, NULL);
+       }
+    }
+
+  gsl_permutation_free (perm);
+
+  tab_submit (t);
+}
+
+
+static void
+show_explained_variance (const struct cmd_factor * factor, struct idata *idata,
+                        const gsl_vector *initial_eigenvalues,
+                        const gsl_vector *extracted_eigenvalues,
+                        const gsl_vector *rotated_loadings)
+{
+  size_t i;
+  int c = 0;
+  const int heading_columns = 1;
+  const int heading_rows = 2;
+  const int nr = heading_rows + factor->n_vars;
+
+  struct tab_table *t ;
+
+  double i_total = 0.0;
+  double i_cum = 0.0;
+
+  double e_total = 0.0;
+  double e_cum = 0.0;
+
+  double r_cum = 0.0;
+
+  int nc = heading_columns;
+
+  if (factor->print & PRINT_EXTRACTION)
+    nc += 3;
+
+  if (factor->print & PRINT_INITIAL)
+    nc += 3;
+
+  if (factor->print & PRINT_ROTATION)
+    nc += 3;
+
+  /* No point having a table with only headings */
+  if ( nc <= heading_columns)
+    return;
+
+  t = tab_create (nc, nr);
+
+  tab_title (t, _("Total Variance Explained"));
+
+  tab_headers (t, heading_columns, 0, heading_rows, 0);
+
+  /* Outline the box */
+  tab_box (t,
+          TAL_2, TAL_2,
+          -1, -1,
+          0, 0,
+          nc - 1, nr - 1);
+
+  /* Vertical lines */
+  tab_box (t,
+          -1, -1,
+          -1, TAL_1,
+          heading_columns, 0,
+          nc - 1, nr - 1);
+
+  tab_hline (t, TAL_1, 0, nc - 1, heading_rows);
+  tab_hline (t, TAL_1, 1, nc - 1, 1);
+
+  tab_vline (t, TAL_2, heading_columns, 0, nr - 1);
+
+
+  if ( factor->extraction == EXTRACTION_PC)
+    tab_text (t, 0, 1, TAB_LEFT | TAT_TITLE, _("Component"));
+  else
+    tab_text (t, 0, 1, TAB_LEFT | TAT_TITLE, _("Factor"));
+
+  c = 1;
+  if (factor->print & PRINT_INITIAL)
+    {
+      tab_joint_text (t, c, 0, c + 2, 0, TAB_CENTER | TAT_TITLE, _("Initial Eigenvalues"));
+      c += 3;
+    }
+
+  if (factor->print & PRINT_EXTRACTION)
+    {
+      tab_joint_text (t, c, 0, c + 2, 0, TAB_CENTER | TAT_TITLE, _("Extraction Sums of Squared Loadings"));
+      c += 3;
+    }
+
+  if (factor->print & PRINT_ROTATION)
+    {
+      tab_joint_text (t, c, 0, c + 2, 0, TAB_CENTER | TAT_TITLE, _("Rotation Sums of Squared Loadings"));
+      c += 3;
+    }
+
+  for (i = 0; i < (nc - heading_columns) / 3 ; ++i)
+    {
+      tab_text (t, i * 3 + 1, 1, TAB_CENTER | TAT_TITLE, _("Total"));
+      /* xgettext:no-c-format */
+      tab_text (t, i * 3 + 2, 1, TAB_CENTER | TAT_TITLE, _("% of Variance"));
+      tab_text (t, i * 3 + 3, 1, TAB_CENTER | TAT_TITLE, _("Cumulative %"));
+
+      tab_vline (t, TAL_2, heading_columns + i * 3, 0, nr - 1);
+    }
+
+  for (i = 0 ; i < initial_eigenvalues->size; ++i)
+    i_total += gsl_vector_get (initial_eigenvalues, i);
+
+  if ( factor->extraction == EXTRACTION_PAF)
+    {
+      e_total = factor->n_vars;
+    }
+  else
+    {
+      e_total = i_total;
+    }
+
+  for (i = 0 ; i < factor->n_vars; ++i)
+    {
+      const double i_lambda = gsl_vector_get (initial_eigenvalues, i);
+      double i_percent = 100.0 * i_lambda / i_total ;
+
+      const double e_lambda = gsl_vector_get (extracted_eigenvalues, i);
+      double e_percent = 100.0 * e_lambda / e_total ;
+
+      const double r_lambda = gsl_vector_get (rotated_loadings, i);
+      double r_percent = 100.0 * r_lambda / e_total ;
+
+      c = 0;
+
+      tab_text_format (t, c++, i + heading_rows, TAB_LEFT | TAT_TITLE, _("%d"), i + 1);
+
+      i_cum += i_percent;
+      e_cum += e_percent;
+      r_cum += r_percent;
+
+      /* Initial Eigenvalues */
+      if (factor->print & PRINT_INITIAL)
+      {
+       tab_double (t, c++, i + heading_rows, 0, i_lambda, NULL);
+       tab_double (t, c++, i + heading_rows, 0, i_percent, NULL);
+       tab_double (t, c++, i + heading_rows, 0, i_cum, NULL);
+      }
+
+
+      if (factor->print & PRINT_EXTRACTION)
+       {
+         if (i < idata->n_extractions)
+           {
+             /* Sums of squared loadings */
+             tab_double (t, c++, i + heading_rows, 0, e_lambda, NULL);
+             tab_double (t, c++, i + heading_rows, 0, e_percent, NULL);
+             tab_double (t, c++, i + heading_rows, 0, e_cum, NULL);
+           }
+       }
+
+      if (factor->print & PRINT_ROTATION)
+       {
+         if (i < idata->n_extractions)
+           {
+             tab_double (t, c++, i + heading_rows, 0, r_lambda, NULL);
+             tab_double (t, c++, i + heading_rows, 0, r_percent, NULL);
+             tab_double (t, c++, i + heading_rows, 0, r_cum, NULL);
+           }
+      }
+
+    }
+
+  tab_submit (t);
+}
+
+
+static void
+show_correlation_matrix (const struct cmd_factor *factor, const struct idata *idata)
+{
+  struct tab_table *t ;
+  size_t i, j;
+  int y_pos_corr = -1;
+  int y_pos_sig = -1;
+  int suffix_rows = 0;
+
+  const int heading_rows = 1;
+  const int heading_columns = 2;
+
+  int nc = heading_columns ;
+  int nr = heading_rows ;
+  int n_data_sets = 0;
+
+  if (factor->print & PRINT_CORRELATION)
+    {
+      y_pos_corr = n_data_sets;
+      n_data_sets++;
+      nc = heading_columns + factor->n_vars;
+    }
+
+  if (factor->print & PRINT_SIG)
+    {
+      y_pos_sig = n_data_sets;
+      n_data_sets++;
+      nc = heading_columns + factor->n_vars;
+    }
+
+  nr += n_data_sets * factor->n_vars;
+
+  if (factor->print & PRINT_DETERMINANT)
+    suffix_rows = 1;
+
+  /* If the table would contain only headings, don't bother rendering it */
+  if (nr <= heading_rows && suffix_rows == 0)
+    return;
+
+  t = tab_create (nc, nr + suffix_rows);
+
+  tab_title (t, _("Correlation Matrix"));
+
+  tab_hline (t, TAL_1, 0, nc - 1, heading_rows);
+
+  if (nr > heading_rows)
+    {
+      tab_headers (t, heading_columns, 0, heading_rows, 0);
+
+      tab_vline (t, TAL_2, 2, 0, nr - 1);
+
+      /* Outline the box */
+      tab_box (t,
+              TAL_2, TAL_2,
+              -1, -1,
+              0, 0,
+              nc - 1, nr - 1);
+
+      /* Vertical lines */
+      tab_box (t,
+              -1, -1,
+              -1, TAL_1,
+              heading_columns, 0,
+              nc - 1, nr - 1);
+
+
+      for (i = 0; i < factor->n_vars; ++i)
+       tab_text (t, heading_columns + i, 0, TAT_TITLE, var_to_string (factor->vars[i]));
+
+
+      for (i = 0 ; i < n_data_sets; ++i)
+       {
+         int y = heading_rows + i * factor->n_vars;
+         size_t v;
+         for (v = 0; v < factor->n_vars; ++v)
+           tab_text (t, 1, y + v, TAT_TITLE, var_to_string (factor->vars[v]));
+
+         tab_hline (t, TAL_1, 0, nc - 1, y);
+       }
+
+      if (factor->print & PRINT_CORRELATION)
+       {
+         const double y = heading_rows + y_pos_corr;
+         tab_text (t, 0, y, TAT_TITLE, _("Correlations"));
+
+         for (i = 0; i < factor->n_vars; ++i)
+           {
+             for (j = 0; j < factor->n_vars; ++j)
+               tab_double (t, heading_columns + i,  y + j, 0, gsl_matrix_get (idata->corr, i, j), NULL);
+           }
+       }
+
+      if (factor->print & PRINT_SIG)
+       {
+         const double y = heading_rows + y_pos_sig * factor->n_vars;
+         tab_text (t, 0, y, TAT_TITLE, _("Sig. 1-tailed"));
+
+         for (i = 0; i < factor->n_vars; ++i)
+           {
+             for (j = 0; j < factor->n_vars; ++j)
+               {
+                 double rho = gsl_matrix_get (idata->corr, i, j);
+                 double w = gsl_matrix_get (idata->n, i, j);
+
+                 if (i == j)
+                   continue;
+
+                 tab_double (t, heading_columns + i,  y + j, 0, significance_of_correlation (rho, w), NULL);
+               }
+           }
+       }
+    }
+
+  if (factor->print & PRINT_DETERMINANT)
+    {
+      int sign = 0;
+      double det = 0.0;
+
+      const int size = idata->corr->size1;
+      gsl_permutation *p = gsl_permutation_calloc (size);
+      gsl_matrix *tmp = gsl_matrix_calloc (size, size);
+      gsl_matrix_memcpy (tmp, idata->corr);
+
+      gsl_linalg_LU_decomp (tmp, p, &sign);
+      det = gsl_linalg_LU_det (tmp, sign);
+      gsl_permutation_free (p);
+      gsl_matrix_free (tmp);
+
+
+      tab_text (t, 0, nr, TAB_LEFT | TAT_TITLE, _("Determinant"));
+      tab_double (t, 1, nr, 0, det, NULL);
+    }
+
+  tab_submit (t);
+}
+
+
+
+static void
+do_factor (const struct cmd_factor *factor, struct casereader *r)
+{
+  struct ccase *c;
+  const gsl_matrix *var_matrix;
+  const gsl_matrix *mean_matrix;
+
+  const gsl_matrix *analysis_matrix;
+  struct idata *idata = idata_alloc (factor->n_vars);
+
+  struct covariance *cov = covariance_1pass_create (factor->n_vars, factor->vars,
+                                             factor->wv, factor->exclude);
+
+  for ( ; (c = casereader_read (r) ); case_unref (c))
+    {
+      covariance_accumulate (cov, c);
+    }
+
+  idata->cov = covariance_calculate (cov);
+
+  var_matrix = covariance_moments (cov, MOMENT_VARIANCE);
+  mean_matrix = covariance_moments (cov, MOMENT_MEAN);
+  idata->n = covariance_moments (cov, MOMENT_NONE);
+
+  if ( factor->method == METHOD_CORR)
+    {
+      idata->corr = correlation_from_covariance (idata->cov, var_matrix);
+      analysis_matrix = idata->corr;
+    }
+  else
+    analysis_matrix = idata->cov;
+
+  if ( factor->print & PRINT_UNIVARIATE)
+    {
+      const int nc = 4;
+      int i;
+      const struct fmt_spec *wfmt = factor->wv ? var_get_print_format (factor->wv) : & F_8_0;
+
+
+      const int heading_columns = 1;
+      const int heading_rows = 1;
+
+      const int nr = heading_rows + factor->n_vars;
+
+      struct tab_table *t = tab_create (nc, nr);
+      tab_title (t, _("Descriptive Statistics"));
+
+      tab_headers (t, heading_columns, 0, heading_rows, 0);
+
+      /* Outline the box */
+      tab_box (t,
+              TAL_2, TAL_2,
+              -1, -1,
+              0, 0,
+              nc - 1, nr - 1);
+
+      /* Vertical lines */
+      tab_box (t,
+              -1, -1,
+              -1, TAL_1,
+              heading_columns, 0,
+              nc - 1, nr - 1);
+
+      tab_hline (t, TAL_1, 0, nc - 1, heading_rows);
+      tab_vline (t, TAL_2, heading_columns, 0, nr - 1);
+
+      tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Mean"));
+      tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Std. Deviation"));
+      tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Analysis N"));
+
+      for (i = 0 ; i < factor->n_vars; ++i)
+       {
+         const struct variable *v = factor->vars[i];
+         tab_text (t, 0, i + heading_rows, TAB_LEFT | TAT_TITLE, var_to_string (v));
+
+         tab_double (t, 1, i + heading_rows, 0, gsl_matrix_get (mean_matrix, i, i), NULL);
+         tab_double (t, 2, i + heading_rows, 0, sqrt (gsl_matrix_get (var_matrix, i, i)), NULL);
+         tab_double (t, 3, i + heading_rows, 0, gsl_matrix_get (idata->n, i, i), wfmt);
+       }
+
+      tab_submit (t);
+    }
+
+  show_correlation_matrix (factor, idata);
+
+#if 1
+  {
+    gsl_eigen_symmv_workspace *workspace = gsl_eigen_symmv_alloc (factor->n_vars);
+    
+    gsl_eigen_symmv (matrix_dup (analysis_matrix), idata->eval, idata->evec, workspace);
+
+    gsl_eigen_symmv_free (workspace);
+  }
+
+  gsl_eigen_symmv_sort (idata->eval, idata->evec, GSL_EIGEN_SORT_ABS_DESC);
+#endif
+
+  idata->n_extractions = n_extracted_factors (factor, idata);
+
+  if (idata->n_extractions == 0)
+    {
+      msg (MW, _("The FACTOR criteria result in zero factors extracted. Therefore no analysis will be performed."));
+      goto finish;
+    }
+
+  if (idata->n_extractions > factor->n_vars)
+    {
+      msg (MW, _("The FACTOR criteria result in more factors than variables, which is not meaningful. No analysis will be performed."));
+      goto finish;
+    }
+    
+  {
+    gsl_matrix *rotated_factors = NULL;
+    gsl_vector *rotated_loadings = NULL;
+
+    const gsl_vector *extracted_eigenvalues = NULL;
+    gsl_vector *initial_communalities = gsl_vector_alloc (factor->n_vars);
+    gsl_vector *extracted_communalities = gsl_vector_alloc (factor->n_vars);
+    size_t i;
+    struct factor_matrix_workspace *fmw = factor_matrix_workspace_alloc (idata->msr->size, idata->n_extractions);
+    gsl_matrix *factor_matrix = gsl_matrix_calloc (factor->n_vars, fmw->n_factors);
+
+    if ( factor->extraction == EXTRACTION_PAF)
+      {
+       gsl_vector *diff = gsl_vector_alloc (idata->msr->size);
+       struct smr_workspace *ws = ws_create (analysis_matrix);
+
+       for (i = 0 ; i < factor->n_vars ; ++i)
+         {
+           double r2 = squared_multiple_correlation (analysis_matrix, i, ws);
+
+           gsl_vector_set (idata->msr, i, r2);
+         }
+       ws_destroy (ws);
+
+       gsl_vector_memcpy (initial_communalities, idata->msr);
+
+       for (i = 0; i < factor->iterations; ++i)
+         {
+           double min, max;
+           gsl_vector_memcpy (diff, idata->msr);
+
+           iterate_factor_matrix (analysis_matrix, idata->msr, factor_matrix, fmw);
+      
+           gsl_vector_sub (diff, idata->msr);
+
+           gsl_vector_minmax (diff, &min, &max);
+      
+           if ( fabs (min) < factor->econverge && fabs (max) < factor->econverge)
+             break;
+         }
+       gsl_vector_free (diff);
+
+
+
+       gsl_vector_memcpy (extracted_communalities, idata->msr);
+       extracted_eigenvalues = fmw->eval;
+      }
+    else if (factor->extraction == EXTRACTION_PC)
+      {
+       for (i = 0; i < factor->n_vars; ++i)
+         gsl_vector_set (initial_communalities, i, communality (idata, i, factor->n_vars));
+
+       gsl_vector_memcpy (extracted_communalities, initial_communalities);
+
+       iterate_factor_matrix (analysis_matrix, extracted_communalities, factor_matrix, fmw);
+
+
+       extracted_eigenvalues = idata->eval;
+      }
+
+
+    show_communalities (factor, initial_communalities, extracted_communalities);
+
+
+    if ( factor->rotation != ROT_NONE)
+      {
+       rotated_factors = gsl_matrix_calloc (factor_matrix->size1, factor_matrix->size2);
+       rotated_loadings = gsl_vector_calloc (factor_matrix->size2);
+
+       rotate (factor, factor_matrix, extracted_communalities, rotated_factors, rotated_loadings);
+      }
+
+    show_explained_variance (factor, idata, idata->eval, extracted_eigenvalues, rotated_loadings);
+
+    factor_matrix_workspace_free (fmw);
+
+    show_scree (factor, idata);
+
+    show_factor_matrix (factor, idata,
+                       factor->extraction == EXTRACTION_PC ? _("Component Matrix") : _("Factor Matrix"),
+                       factor_matrix);
+
+    if ( factor->rotation != ROT_NONE)
+      {
+       show_factor_matrix (factor, idata,
+                           factor->extraction == EXTRACTION_PC ? _("Rotated Component Matrix") : _("Rotated Factor Matrix"),
+                           rotated_factors);
+
+       gsl_matrix_free (rotated_factors);
+      }
+
+
+
+    gsl_vector_free (initial_communalities);
+    gsl_vector_free (extracted_communalities);
+  }
+
+ finish:
+
+  idata_free (idata);
+
+  casereader_destroy (r);
+}
+
+
+
index c8cb03b92d7f75aff63dc5fe3ca549d8a4d2b365..8f73c1debabfc0b1898f1429f6c344b345f378b5 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -322,7 +322,7 @@ flip_file (struct flip_pgm *flip)
   output_buf = input_buf + flip->n_vars * case_capacity;
 
   input_file = flip->file;
-  if (fseek (input_file, 0, SEEK_SET) != 0)
+  if (fseeko (input_file, 0, SEEK_SET) != 0)
     {
       msg (SE, _("Error rewinding FLIP file: %s."), strerror (errno));
       return false;
@@ -387,7 +387,7 @@ flip_file (struct flip_pgm *flip)
   pool_unregister (flip->pool, input_buf);
   free (input_buf);
 
-  if (fseek (output_file, 0, SEEK_SET) != 0)
+  if (fseeko (output_file, 0, SEEK_SET) != 0)
     {
       msg (SE, _("Error rewinding FLIP source file: %s."), strerror (errno));
       return false;
index 1a0ecd498636561b9fb225f96baa8d9bdc82e409..6c201021abf921a16aa2b4817613c7cd62f636df 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
-#include <data/variable.h>
-#include <data/value.h>
-#include <libpspp/compiler.h>
+
+#include "language/stats/freq.h"
 
 #include <stdlib.h>
 
-#include "freq.h"
+#include "data/variable.h"
+#include "data/value.h"
+#include "libpspp/array.h"
+#include "libpspp/compiler.h"
 
-int
-compare_freq ( const void *_f1, const void *_f2, const void *_var)
+void
+freq_hmap_destroy (struct hmap *hmap, int width)
 {
-  const struct freq *f1 = _f1;
-  const struct freq *f2 = _f2;
-  const struct variable *var = _var;
+  struct freq *f, *next;
 
-  return value_compare_3way (&f1->value, &f2->value, var_get_width (var));
+  HMAP_FOR_EACH_SAFE (f, next, struct freq, hmap_node, hmap)
+    {
+      value_destroy (&f->value, width);
+      hmap_delete (hmap, &f->hmap_node);
+      free (f);
+    }
+  hmap_destroy (hmap);
 }
 
-unsigned int
-hash_freq (const void *_f, const void *var)
+struct freq *
+freq_hmap_search (struct hmap *hmap,
+                  const union value *value, int width, size_t hash)
 {
-  const struct freq *f = _f;
+  struct freq *f;
+
+  HMAP_FOR_EACH_WITH_HASH (f, struct freq, hmap_node, hash, hmap)
+    if (value_equal (value, &f->value, width))
+      return f;
 
-  return value_hash (&f->value, var_get_width (var), 0);
+  return NULL;
 }
 
-/* Free function to be used on FR whose value parameter has been copied */
-void
-free_freq_mutable_hash (void *fr, const void *var_)
+struct freq *
+freq_hmap_insert (struct hmap *hmap,
+                  const union value *value, int width, size_t hash)
 {
-  const struct variable *var = var_;
-  struct freq_mutable *freq = fr;
-  value_destroy (&freq->value, var_get_width (var));
-  free (freq);
+  struct freq *f = xmalloc (sizeof *f);
+  value_clone (&f->value, value, width);
+  f->count = 0;
+  hmap_insert (hmap, &f->hmap_node, hash);
+  return f;
 }
 
-void
-free_freq_hash (void *fr, const void *var UNUSED)
+static int
+compare_freq_ptr_3way (const void *a_, const void *b_, const void *width_)
+{
+  const struct freq *const *ap = a_;
+  const struct freq *const *bp = b_;
+  const int *widthp = width_;
+
+  return value_compare_3way (&(*ap)->value, &(*bp)->value, *widthp);
+}
+
+struct freq **
+freq_hmap_sort (struct hmap *hmap, int width)
 {
-  free (fr);
+  size_t n_entries = hmap_count (hmap);
+  struct freq **entries;
+  struct freq *f;
+  size_t i;
+
+  entries = xnmalloc (n_entries, sizeof *entries);
+  i = 0;
+  HMAP_FOR_EACH (f, struct freq, hmap_node, hmap)
+    entries[i++] = f;
+  assert (i == n_entries);
+
+  sort (entries, n_entries, sizeof *entries, compare_freq_ptr_3way, &width);
+
+  return entries;
 }
+
+struct freq *
+freq_hmap_extract (struct hmap *hmap)
+{
+  struct freq *freqs, *f;
+  size_t n_freqs;
+  size_t i;
+
+  n_freqs = hmap_count (hmap);
+  freqs = xnmalloc (n_freqs, sizeof *freqs);
+  i = 0;
+  HMAP_FOR_EACH (f, struct freq, hmap_node, hmap)
+    freqs[i++] = *f;
+  assert (i == n_freqs);
+
+  return freqs;
+}
+
index b06a36f6b2fb14f5fbc47f7f9db6d6d924dab893..fd6081f4e13c465704ce2bf264b6a14d6daf9ebb 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
-#ifndef freq_h
-#define freq_h
+#ifndef LANGUAGE_STATS_FREQ_H
+#define LANGUAGE_STATS_FREQ_H 1
+
+#include "data/value.h"
+#include "libpspp/hmap.h"
 
-union value ;
 /* Frequency table entry. */
 struct freq
   {
-    const union value value;   /* The value. */
-    double count;              /* The number of occurrences of the value. */
-  };
-
-/* Non const version of frequency table entry. */
-struct freq_mutable
-  {
-    union value value;         /* The value. */
+    struct hmap_node hmap_node; /* Element in hash table. */
+    union value value;          /* The value. */
     double count;              /* The number of occurrences of the value. */
   };
 
+void freq_hmap_destroy (struct hmap *, int width);
 
-int compare_freq ( const void *_f1, const void *_f2, const void *_var);
-
-unsigned int hash_freq (const void *_f, const void *_var);
-
-/* Free function for struct freq */
-void free_freq_hash (void *fr, const void *aux);
-
-/* Free function for struct freq_mutable */
-void free_freq_mutable_hash (void *fr, const void *var);
-
+struct freq *freq_hmap_search (struct hmap *, const union value *, int width,
+                               size_t hash);
+struct freq *freq_hmap_insert (struct hmap *, const union value *, int width,
+                               size_t hash);
 
+struct freq **freq_hmap_sort (struct hmap *, int width);
+struct freq *freq_hmap_extract (struct hmap *);
 
-#endif
+#endif /* language/stats/freq.h */
index 5a704d0d019f1f0d723aac1c8b81b455f02c0f7a..723d26e8341c3f7c732f3ed394067dea0b4204c6 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
-/*
-  TODO:
-
-  * Remember that histograms, bar charts need mean, stddev.
-*/
-
 #include <config.h>
 
 #include <math.h>
 #include <stdlib.h>
 #include <gsl/gsl_histogram.h>
 
-#include <data/case.h>
-#include <data/casegrouper.h>
-#include <data/casereader.h>
-#include <data/dictionary.h>
-#include <data/format.h>
-#include <data/procedure.h>
-#include <data/settings.h>
-#include <data/value-labels.h>
-#include <data/variable.h>
-#include <language/command.h>
-#include <language/dictionary/split-file.h>
-#include <language/lexer/lexer.h>
-#include <libpspp/array.h>
-#include <libpspp/bit-vector.h>
-#include <libpspp/compiler.h>
-#include <libpspp/hash.h>
-#include <libpspp/message.h>
-#include <libpspp/misc.h>
-#include <libpspp/pool.h>
-#include <libpspp/str.h>
-#include <math/histogram.h>
-#include <math/moments.h>
-#include <output/chart.h>
-#include <output/charts/piechart.h>
-#include <output/charts/plot-hist.h>
-#include <output/manager.h>
-#include <output/output.h>
-#include <output/table.h>
-
-#include "freq.h"
-
-#include "minmax.h"
-#include "xalloc.h"
+#include "data/case.h"
+#include "data/casegrouper.h"
+#include "data/casereader.h"
+#include "data/dictionary.h"
+#include "data/format.h"
+#include "data/procedure.h"
+#include "data/settings.h"
+#include "data/value-labels.h"
+#include "data/variable.h"
+#include "language/command.h"
+#include "language/dictionary/split-file.h"
+#include "language/lexer/lexer.h"
+#include "language/stats/freq.h"
+#include "libpspp/array.h"
+#include "libpspp/bit-vector.h"
+#include "libpspp/compiler.h"
+#include "libpspp/hmap.h"
+#include "libpspp/message.h"
+#include "libpspp/misc.h"
+#include "libpspp/pool.h"
+#include "libpspp/str.h"
+#include "math/histogram.h"
+#include "math/moments.h"
+#include "output/chart-item.h"
+#include "output/charts/piechart.h"
+#include "output/charts/plot-hist.h"
+#include "output/tab.h"
+
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 /* (specification)
    FREQUENCIES (frq_):
      *+variables=custom;
-     +format=cond:condense/onepage(*n:onepage_limit,"%s>=0")/!standard,
-            table:limit(n:limit,"%s>0")/notable/!table,
-            labels:!labels/nolabels,
-            sort:!avalue/dvalue/afreq/dfreq,
-            spaces:!single/double,
-            paging:newpage/!oldpage;
+     +format=table:limit(n:limit,"%s>0")/notable/!table,
+            sort:!avalue/dvalue/afreq/dfreq;
      missing=miss:include/!exclude;
      barchart(ba_)=:minimum(d:min),
            :maximum(d:max),
            scale:freq(*n:freq,"%s>0")/percent(*n:pcnt,"%s>0");
      piechart(pie_)=:minimum(d:min),
            :maximum(d:max),
-           missing:missing/!nomissing;
+           missing:missing/!nomissing,
+           scale:!freq/percent;
      histogram(hi_)=:minimum(d:min),
            :maximum(d:max),
            scale:freq(*n:freq,"%s>0")/percent(*n:pcnt,"%s>0"),
-           norm:!nonormal/normal,
-           incr:increment(d:inc,"%s>0");
-     hbar(hb_)=:minimum(d:min),
-           :maximum(d:max),
-           scale:freq(*n:freq,"%s>0")/percent(*n:pcnt,"%s>0"),
-           norm:!nonormal/normal,
-           incr:increment(d:inc,"%s>0");
+           norm:!nonormal/normal;
      +grouped=custom;
      +ntiles=integer;
      +percentiles = double list;
-     +statistics[st_]=1|mean,2|semean,3|median,4|mode,5|stddev,6|variance,
-           7|kurtosis,8|skewness,9|range,10|minimum,11|maximum,12|sum,
-           13|default,14|seskewness,15|sekurtosis,all,none.
+     +statistics[st_]=mean,semean,median,mode,stddev,variance,
+           kurtosis,skewness,range,minimum,maximum,sum,
+           default,seskewness,sekurtosis,all,none.
 */
 /* (declarations) */
 /* (functions) */
 /* Statistics. */
 enum
   {
-    frq_mean = 0, frq_semean, frq_median, frq_mode, frq_stddev, frq_variance,
-    frq_kurt, frq_sekurt, frq_skew, frq_seskew, frq_range, frq_min, frq_max,
-    frq_sum, frq_n_stats
+    FRQ_MEAN, FRQ_SEMEAN, FRQ_MEDIAN, FRQ_MODE, FRQ_STDDEV, FRQ_VARIANCE,
+    FRQ_KURT, FRQ_SEKURT, FRQ_SKEW, FRQ_SESKEW, FRQ_RANGE, FRQ_MIN, FRQ_MAX,
+    FRQ_SUM, FRQ_N_STATS
   };
 
 /* Description of a statistic. */
@@ -118,7 +100,7 @@ struct frq_info
   };
 
 /* Table of statistics, indexed by dsc_*. */
-static const struct frq_info st_name[frq_n_stats + 1] =
+static const struct frq_info st_name[FRQ_N_STATS + 1] =
 {
   {FRQ_ST_MEAN, N_("Mean")},
   {FRQ_ST_SEMEAN, N_("S.E. Mean")},
@@ -143,74 +125,45 @@ struct percentile
 {
   double p;        /* the %ile to be calculated */
   double value;    /* the %ile's value */
-  double x1;       /* The datum value <= the percentile */
-  double x2;       /* The datum value >= the percentile */
-  int flag;
-  int flag2;       /* Set to 1 if this percentile value has been found */
+  bool show;       /* True to show this percentile in the statistics box. */
 };
 
-
-static void add_percentile (double x) ;
-
-static struct percentile *percentiles;
-static int n_percentiles;
-
 /* Groups of statistics. */
 #define BI          BIT_INDEX
-#define frq_default                                                    \
-       (BI (frq_mean) | BI (frq_stddev) | BI (frq_min) | BI (frq_max))
-#define frq_all                                                        \
-       (BI (frq_sum) | BI(frq_min) | BI(frq_max)               \
-        | BI(frq_mean) | BI(frq_semean) | BI(frq_stddev)       \
-        | BI(frq_variance) | BI(frq_kurt) | BI(frq_sekurt)     \
-        | BI(frq_skew) | BI(frq_seskew) | BI(frq_range)        \
-        | BI(frq_range) | BI(frq_mode) | BI(frq_median))
-
-/* Statistics; number of statistics. */
-static unsigned long stats;
-static int n_stats;
-
-/* Types of graphs. */
-enum
+#define FRQ_DEFAULT                                                    \
+       (BI (FRQ_MEAN) | BI (FRQ_STDDEV) | BI (FRQ_MIN) | BI (FRQ_MAX))
+#define FRQ_ALL                                                        \
+       (BI (FRQ_SUM) | BI(FRQ_MIN) | BI(FRQ_MAX)               \
+        | BI(FRQ_MEAN) | BI(FRQ_SEMEAN) | BI(FRQ_STDDEV)       \
+        | BI(FRQ_VARIANCE) | BI(FRQ_KURT) | BI(FRQ_SEKURT)     \
+        | BI(FRQ_SKEW) | BI(FRQ_SESKEW) | BI(FRQ_RANGE)        \
+        | BI(FRQ_RANGE) | BI(FRQ_MODE) | BI(FRQ_MEDIAN))
+
+struct frq_chart
   {
-    GFT_NONE,                  /* Don't draw graphs. */
-    GFT_BAR,                   /* Draw bar charts. */
-    GFT_HIST,                  /* Draw histograms. */
-    GFT_PIE,                    /* Draw piechart */
-    GFT_HBAR                   /* Draw bar charts or histograms at our discretion. */
-  };
-
-/* Parsed command. */
-static struct cmd_frequencies cmd;
-
-/* Summary of the barchart, histogram, and hbar subcommands. */
-/* FIXME: These should not be mututally exclusive */
-static int chart;              /* NONE/BAR/HIST/HBAR/PIE. */
-static double min, max;                /* Minimum, maximum on y axis. */
-static int format;             /* FREQ/PERCENT: Scaling of y axis. */
-static double scale, incr;     /* FIXME */
-static int normal;             /* FIXME */
+    double x_min;               /* X axis minimum value. */
+    double x_max;               /* X axis maximum value. */
+    int y_scale;                /* Y axis scale: FRQ_FREQ or FRQ_PERCENT. */
 
-/* Variables for which to calculate statistics. */
-static size_t n_variables;
-static const struct variable **v_variables;
+    /* Histograms only. */
+    double y_max;               /* Y axis maximum value. */
+    bool draw_normal;           /* Whether to draw normal curve. */
 
-/* Pools. */
-static struct pool *data_pool;         /* For per-SPLIT FILE group data. */
-static struct pool *syntax_pool;        /* For syntax-related data. */
+    /* Pie charts only. */
+    bool include_missing;       /* Whether to include missing values. */
+  };
 
 /* Frequency tables. */
 
 /* Entire frequency table. */
 struct freq_tab
   {
-    struct hsh_table *data;    /* Undifferentiated data. */
-    struct freq_mutable *valid; /* Valid freqs. */
+    struct hmap data;           /* Hash table for accumulating counts. */
+    struct freq *valid;         /* Valid freqs. */
     int n_valid;               /* Number of total freqs. */
-    const struct dictionary *dict; /* The dict from whence entries in the table
-                                     come */
+    const struct dictionary *dict; /* Source of entries in the table. */
 
-    struct freq_mutable *missing; /* Missing freqs. */
+    struct freq *missing;       /* Missing freqs. */
     int n_missing;             /* Number of missing freqs. */
 
     /* Statistics. */
@@ -218,10 +171,11 @@ struct freq_tab
     double valid_cases;                /* Sum of weights of valid cases. */
   };
 
-
 /* Per-variable frequency data. */
 struct var_freqs
   {
+    struct variable *var;
+
     /* Freqency table. */
     struct freq_tab tab;       /* Frequencies table to use. */
 
@@ -230,112 +184,130 @@ struct var_freqs
     double *groups;            /* Groups. */
 
     /* Statistics. */
-    double stat[frq_n_stats];
+    double stat[FRQ_N_STATS];
 
     /* Variable attributes. */
     int width;
     struct fmt_spec print;
   };
 
-static inline struct var_freqs *
-get_var_freqs (const struct variable *v)
-{
-  return var_get_aux (v);
-}
+struct frq_proc
+  {
+    struct pool *pool;
 
-static void determine_charts (void);
+    struct var_freqs *vars;
+    size_t n_vars;
 
-static void calc_stats (const struct variable *v, double d[frq_n_stats]);
+    /* Percentiles to calculate and possibly display. */
+    struct percentile *percentiles;
+    int n_percentiles, n_show_percentiles;
 
-static void precalc (struct casereader *, struct dataset *);
-static void calc (const struct ccase *, const struct dataset *);
-static void postcalc (const struct dataset *);
+    /* Frequency table display. */
+    int max_categories;         /* Maximum categories to show. */
+    int sort;                   /* FRQ_AVALUE or FRQ_DVALUE
+                                   or FRQ_ACOUNT or FRQ_DCOUNT. */
 
-static void postprocess_freq_tab (const struct variable *);
-static void dump_full ( const struct variable *, const struct variable *);
-static void dump_condensed (const struct variable *, const struct variable *);
-static void dump_statistics (const struct variable *, bool show_varname, const struct variable *);
-static void cleanup_freq_tab (const struct variable *);
+    /* Statistics; number of statistics. */
+    unsigned long stats;
+    int n_stats;
 
-static hsh_compare_func compare_value_numeric_a, compare_value_alpha_a;
-static hsh_compare_func compare_value_numeric_d, compare_value_alpha_d;
-static hsh_compare_func compare_freq_numeric_a, compare_freq_alpha_a;
-static hsh_compare_func compare_freq_numeric_d, compare_freq_alpha_d;
+    /* Histogram and pie chart settings. */
+    struct frq_chart *hist, *pie;
+  };
 
+static void determine_charts (struct frq_proc *,
+                              const struct cmd_frequencies *);
 
-static void do_piechart(const struct variable *var,
-                       const struct freq_tab *frq_tab);
+static void calc_stats (const struct var_freqs *, double d[FRQ_N_STATS]);
+static void calc_percentiles (const struct frq_proc *,
+                              const struct var_freqs *);
 
-struct histogram *
-freq_tab_to_hist(const struct freq_tab *ft, const struct variable *var);
+static void precalc (struct frq_proc *, struct casereader *, struct dataset *);
+static void calc (struct frq_proc *, const struct ccase *,
+                  const struct dataset *);
+static void postcalc (struct frq_proc *, const struct dataset *);
+
+static void postprocess_freq_tab (const struct frq_proc *, struct var_freqs *);
+static void dump_freq_table (const struct var_freqs *,
+                             const struct variable *weight_var);
+static void dump_statistics (const struct frq_proc *, const struct var_freqs *,
+                             const struct variable *weight_var);
+static void cleanup_freq_tab (struct var_freqs *);
 
+static void add_percentile (struct frq_proc *, double x, bool show,
+                            size_t *allocated_percentiles);
 
+static void do_piechart(const struct frq_chart *, const struct variable *,
+                       const struct freq_tab *);
+
+struct histogram *freq_tab_to_hist(const struct frq_proc *,
+                                   const struct freq_tab *,
+                                   const struct variable *);
 \f
 /* Parser and outline. */
 
-static int internal_cmd_frequencies (struct lexer *lexer, struct dataset *ds);
-
 int
 cmd_frequencies (struct lexer *lexer, struct dataset *ds)
 {
-  int result;
-
-  syntax_pool = pool_create ();
-  result = internal_cmd_frequencies (lexer, ds);
-  pool_destroy (syntax_pool);
-  syntax_pool=0;
-  pool_destroy (data_pool);
-  data_pool=0;
-  free (v_variables);
-  v_variables=0;
-  return result;
-}
-
-static int
-internal_cmd_frequencies (struct lexer *lexer, struct dataset *ds)
-{
+  struct cmd_frequencies cmd;
+  struct frq_proc frq;
   struct casegrouper *grouper;
   struct casereader *input, *group;
+  size_t allocated_percentiles;
   bool ok;
   int i;
 
-  n_percentiles = 0;
-  percentiles = NULL;
+  frq.pool = pool_create ();
 
-  n_variables = 0;
-  v_variables = NULL;
+  frq.vars = NULL;
+  frq.n_vars = 0;
 
-  if (!parse_frequencies (lexer, ds, &cmd, NULL))
-    return CMD_FAILURE;
+  frq.percentiles = NULL;
+  frq.n_percentiles = 0;
+  frq.n_show_percentiles = 0;
 
-  if (cmd.onepage_limit == LONG_MIN)
-    cmd.onepage_limit = 50;
+  frq.hist = NULL;
+  frq.pie = NULL;
+
+  allocated_percentiles = 0;
+
+  if (!parse_frequencies (lexer, ds, &cmd, &frq))
+    {
+      pool_destroy (frq.pool);
+      return CMD_FAILURE;
+    }
+
+  /* Figure out when to show frequency tables. */
+  frq.max_categories = (cmd.table == FRQ_NOTABLE ? -1
+                        : cmd.table == FRQ_TABLE ? INT_MAX
+                        : cmd.limit);
+  frq.sort = cmd.sort;
 
   /* Figure out statistics to calculate. */
-  stats = 0;
+  frq.stats = 0;
   if (cmd.a_statistics[FRQ_ST_DEFAULT] || !cmd.sbc_statistics)
-    stats |= frq_default;
+    frq.stats |= FRQ_DEFAULT;
   if (cmd.a_statistics[FRQ_ST_ALL])
-    stats |= frq_all;
+    frq.stats |= FRQ_ALL;
   if (cmd.sort != FRQ_AVALUE && cmd.sort != FRQ_DVALUE)
-    stats &= ~BIT_INDEX (frq_median);
-  for (i = 0; i < frq_n_stats; i++)
+    frq.stats &= ~BIT_INDEX (FRQ_MEDIAN);
+  for (i = 0; i < FRQ_N_STATS; i++)
     if (cmd.a_statistics[st_name[i].st_indx])
-      stats |= BIT_INDEX (i);
-  if (stats & frq_kurt)
-    stats |= BIT_INDEX (frq_sekurt);
-  if (stats & frq_skew)
-    stats |= BIT_INDEX (frq_seskew);
+      frq.stats |= BIT_INDEX (i);
+  if (frq.stats & FRQ_KURT)
+    frq.stats |= BIT_INDEX (FRQ_SEKURT);
+  if (frq.stats & FRQ_SKEW)
+    frq.stats |= BIT_INDEX (FRQ_SESKEW);
 
   /* Calculate n_stats. */
-  n_stats = 0;
-  for (i = 0; i < frq_n_stats; i++)
-    if ((stats & BIT_INDEX (i)))
-      n_stats++;
+  frq.n_stats = 0;
+  for (i = 0; i < FRQ_N_STATS; i++)
+    if ((frq.stats & BIT_INDEX (i)))
+      frq.n_stats++;
 
   /* Charting. */
-  determine_charts ();
-  if (chart != GFT_NONE || cmd.sbc_ntiles)
+  determine_charts (&frq, &cmd);
+  if (cmd.sbc_histogram || cmd.sbc_piechart || cmd.sbc_ntiles)
     cmd.sort = FRQ_AVALUE;
 
   /* Work out what percentiles need to be calculated */
@@ -346,7 +318,8 @@ internal_cmd_frequencies (struct lexer *lexer, struct dataset *ds)
          int pl;
          subc_list_double *ptl_list = &cmd.dl_percentiles[i];
          for ( pl = 0 ; pl < subc_list_double_count(ptl_list); ++pl)
-             add_percentile (subc_list_double_at(ptl_list, pl) / 100.0 );
+            add_percentile (&frq, subc_list_double_at(ptl_list, pl) / 100.0,
+                            true, &allocated_percentiles);
        }
     }
   if ( cmd.sbc_ntiles )
@@ -355,16 +328,22 @@ internal_cmd_frequencies (struct lexer *lexer, struct dataset *ds)
        {
          int j;
          for (j = 0; j <= cmd.n_ntiles[i]; ++j )
-             add_percentile (j / (double) cmd.n_ntiles[i]);
+            add_percentile (&frq, j / (double) cmd.n_ntiles[i], true,
+                            &allocated_percentiles);
        }
     }
-  if (stats & BIT_INDEX (frq_median))
+  if (frq.stats & BIT_INDEX (FRQ_MEDIAN))
     {
       /* Treat the median as the 50% percentile.
          We output it in the percentiles table as "50 (Median)." */
-      add_percentile (0.5);
-      stats &= ~BIT_INDEX (frq_median);
-      n_stats--;
+      add_percentile (&frq, 0.5, true, &allocated_percentiles);
+      frq.stats &= ~BIT_INDEX (FRQ_MEDIAN);
+      frq.n_stats--;
+    }
+  if (cmd.sbc_histogram)
+    {
+      add_percentile (&frq, 0.25, false, &allocated_percentiles);
+      add_percentile (&frq, 0.75, false, &allocated_percentiles);
     }
 
   /* Do it! */
@@ -376,161 +355,102 @@ internal_cmd_frequencies (struct lexer *lexer, struct dataset *ds)
     {
       struct ccase *c;
 
-      precalc (group, ds);
+      precalc (&frq, group, ds);
       for (; (c = casereader_read (group)) != NULL; case_unref (c))
-        calc (c, ds);
-      postcalc (ds);
+        calc (&frq, c, ds);
+      postcalc (&frq, ds);
     }
   ok = casegrouper_destroy (grouper);
   ok = proc_commit (ds) && ok;
 
   free_frequencies(&cmd);
 
+  pool_destroy (frq.pool);
+  free (frq.vars);
+  free (frq.percentiles);
+  free (frq.hist);
+  free (frq.pie);
+
   return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
 }
 
 /* Figure out which charts the user requested.  */
 static void
-determine_charts (void)
+determine_charts (struct frq_proc *frq, const struct cmd_frequencies *cmd)
 {
-  int count = (!!cmd.sbc_histogram) + (!!cmd.sbc_barchart) +
-    (!!cmd.sbc_hbar) + (!!cmd.sbc_piechart);
+  if (cmd->sbc_barchart)
+    msg (SW, _("Bar charts are not implemented."));
 
-  if (!count)
+  if (cmd->sbc_histogram)
     {
-      chart = GFT_NONE;
-      return;
-    }
-  else if (count > 1)
-    {
-      chart = GFT_HBAR;
-      msg (SW, _("At most one of BARCHART, HISTOGRAM, or HBAR should be "
-          "given.  HBAR will be assumed.  Argument values will be "
-          "given precedence increasing along the order given."));
+      struct frq_chart *hist;
+
+      hist = frq->hist = xmalloc (sizeof *frq->hist);
+      hist->x_min = cmd->hi_min;
+      hist->x_max = cmd->hi_max;
+      hist->y_scale = cmd->hi_scale;
+      hist->y_max = cmd->hi_scale == FRQ_FREQ ? cmd->hi_freq : cmd->hi_pcnt;
+      hist->draw_normal = cmd->hi_norm != FRQ_NONORMAL;
+      hist->include_missing = false;
+
+      if (hist->x_min != SYSMIS && hist->x_max != SYSMIS
+          && hist->x_min >= hist->x_max)
+        {
+          msg (SE, _("MAX for histogram must be greater than or equal to MIN, "
+                     "but MIN was specified as %.15g and MAX as %.15g.  "
+                     "MIN and MAX will be ignored."),
+               hist->x_min, hist->x_max);
+          hist->x_min = hist->x_max = SYSMIS;
+        }
     }
-  else if (cmd.sbc_histogram)
-    chart = GFT_HIST;
-  else if (cmd.sbc_barchart)
-    chart = GFT_BAR;
-  else if (cmd.sbc_piechart)
-    chart = GFT_PIE;
-  else
-    chart = GFT_HBAR;
-
-  min = max = SYSMIS;
-  format = FRQ_FREQ;
-  scale = SYSMIS;
-  incr = SYSMIS;
-  normal = 0;
 
-  if (cmd.sbc_barchart)
+  if (cmd->sbc_piechart)
     {
-      if (cmd.ba_min != SYSMIS)
-       min = cmd.ba_min;
-      if (cmd.ba_max != SYSMIS)
-       max = cmd.ba_max;
-      if (cmd.ba_scale == FRQ_FREQ)
-       {
-         format = FRQ_FREQ;
-         scale = cmd.ba_freq;
-       }
-      else if (cmd.ba_scale == FRQ_PERCENT)
-       {
-         format = FRQ_PERCENT;
-         scale = cmd.ba_pcnt;
-       }
-    }
+      struct frq_chart *pie;
 
-  if (cmd.sbc_histogram)
-    {
-      if (cmd.hi_min != SYSMIS)
-       min = cmd.hi_min;
-      if (cmd.hi_max != SYSMIS)
-       max = cmd.hi_max;
-      if (cmd.hi_scale == FRQ_FREQ)
-       {
-         format = FRQ_FREQ;
-         scale = cmd.hi_freq;
-       }
-      else if (cmd.hi_scale == FRQ_PERCENT)
-       {
-         format = FRQ_PERCENT;
-         scale = cmd.ba_pcnt;
-       }
-      if (cmd.hi_norm != FRQ_NONORMAL )
-       normal = 1;
-      if (cmd.hi_incr == FRQ_INCREMENT)
-       incr = cmd.hi_inc;
-    }
+      pie = frq->pie = xmalloc (sizeof *frq->pie);
+      pie->x_min = cmd->pie_min;
+      pie->x_max = cmd->pie_max;
+      pie->y_scale = cmd->pie_scale;
+      pie->include_missing = cmd->pie_missing == FRQ_MISSING;
 
-  if (cmd.sbc_hbar)
-    {
-      if (cmd.hb_min != SYSMIS)
-       min = cmd.hb_min;
-      if (cmd.hb_max != SYSMIS)
-       max = cmd.hb_max;
-      if (cmd.hb_scale == FRQ_FREQ)
-       {
-         format = FRQ_FREQ;
-         scale = cmd.hb_freq;
-       }
-      else if (cmd.hb_scale == FRQ_PERCENT)
-       {
-         format = FRQ_PERCENT;
-         scale = cmd.ba_pcnt;
-       }
-      if (cmd.hb_norm)
-       normal = 1;
-      if (cmd.hb_incr == FRQ_INCREMENT)
-       incr = cmd.hb_inc;
-    }
-
-  if (min != SYSMIS && max != SYSMIS && min >= max)
-    {
-      msg (SE, _("MAX must be greater than or equal to MIN, if both are "
-          "specified.  However, MIN was specified as %g and MAX as %g.  "
-          "MIN and MAX will be ignored."), min, max);
-      min = max = SYSMIS;
+      if (pie->x_min != SYSMIS && pie->x_max != SYSMIS
+          && pie->x_min >= pie->x_max)
+        {
+          msg (SE, _("MAX for pie chart must be greater than or equal to MIN, "
+                     "but MIN was specified as %.15g and MAX as %.15g.  "
+                     "MIN and MAX will be ignored."), pie->x_min, pie->x_max);
+          pie->x_min = pie->x_max = SYSMIS;
+        }
     }
 }
 
 /* Add data from case C to the frequency table. */
 static void
-calc (const struct ccase *c, const struct dataset *ds)
+calc (struct frq_proc *frq, const struct ccase *c, const struct dataset *ds)
 {
   double weight = dict_get_case_weight (dataset_dict (ds), c, NULL);
   size_t i;
 
-  for (i = 0; i < n_variables; i++)
+  for (i = 0; i < frq->n_vars; i++)
     {
-      const struct variable *v = v_variables[i];
-      const union value *val = case_data (c, v);
-      struct var_freqs *vf = get_var_freqs (v);
-      struct freq_tab *ft = &vf->tab;
-
-      struct freq_mutable target;
-      struct freq_mutable **fpp;
+      struct var_freqs *vf = &frq->vars[i];
+      const union value *value = case_data (c, vf->var);
+      size_t hash = value_hash (value, vf->width, 0);
+      struct freq *f;
 
-      target.value = *val;
-      fpp = (struct freq_mutable **) hsh_probe (ft->data, &target);
+      f = freq_hmap_search (&vf->tab.data, value, vf->width, hash);
+      if (f == NULL)
+        f = freq_hmap_insert (&vf->tab.data, value, vf->width, hash);
 
-      if (*fpp != NULL)
-        (*fpp)->count += weight;
-      else
-        {
-          struct freq_mutable *fp = pool_alloc (data_pool, sizeof *fp);
-          fp->count = weight;
-          value_init_pool (data_pool, &fp->value, vf->width);
-          value_copy (&fp->value, val, vf->width);
-          *fpp = fp;
-        }
+      f->count += weight;
     }
 }
 
 /* Prepares each variable that is the target of FREQUENCIES by setting
    up its hash table. */
 static void
-precalc (struct casereader *input, struct dataset *ds)
+precalc (struct frq_proc *frq, struct casereader *input, struct dataset *ds)
 {
   struct ccase *c;
   size_t i;
@@ -542,163 +462,125 @@ precalc (struct casereader *input, struct dataset *ds)
       case_unref (c);
     }
 
-  pool_destroy (data_pool);
-  data_pool = pool_create ();
-
-  for (i = 0; i < n_variables; i++)
-    {
-      const struct variable *v = v_variables[i];
-      struct freq_tab *ft = &get_var_freqs (v)->tab;
-
-      ft->data = hsh_create (16, compare_freq, hash_freq, NULL, v);
-    }
+  for (i = 0; i < frq->n_vars; i++)
+    hmap_init (&frq->vars[i].tab.data);
 }
 
 /* Finishes up with the variables after frequencies have been
    calculated.  Displays statistics, percentiles, ... */
 static void
-postcalc (const struct dataset *ds)
+postcalc (struct frq_proc *frq, const struct dataset *ds)
 {
   const struct dictionary *dict = dataset_dict (ds);
   const struct variable *wv = dict_get_weight (dict);
   size_t i;
 
-  for (i = 0; i < n_variables; i++)
+  for (i = 0; i < frq->n_vars; i++)
     {
-      const struct variable *v = v_variables[i];
-      struct var_freqs *vf = get_var_freqs (v);
-      struct freq_tab *ft = &vf->tab;
-      int n_categories;
-      int dumped_freq_tab = 1;
+      struct var_freqs *vf = &frq->vars[i];
 
-      postprocess_freq_tab (v);
+      postprocess_freq_tab (frq, vf);
 
       /* Frequencies tables. */
-      n_categories = ft->n_valid + ft->n_missing;
-      if (cmd.table == FRQ_TABLE
-         || (cmd.table == FRQ_LIMIT && n_categories <= cmd.limit))
-       switch (cmd.cond)
-         {
-         case FRQ_CONDENSE:
-           dump_condensed (v, wv);
-           break;
-         case FRQ_STANDARD:
-           dump_full (v, wv);
-           break;
-         case FRQ_ONEPAGE:
-           if (n_categories > cmd.onepage_limit)
-             dump_condensed (v, wv);
-           else
-             dump_full (v, wv);
-           break;
-         default:
-            NOT_REACHED ();
-         }
-      else
-       dumped_freq_tab = 0;
+      if (vf->tab.n_valid + vf->tab.n_missing <= frq->max_categories)
+        dump_freq_table (vf, wv);
 
       /* Statistics. */
-      if (n_stats)
-       dump_statistics (v, !dumped_freq_tab, wv);
-
-
+      if (frq->n_stats)
+       dump_statistics (frq, vf, wv);
 
-      if ( chart == GFT_HIST && var_is_numeric (v) )
+      if (frq->hist && var_is_numeric (vf->var) && vf->tab.n_valid > 0)
        {
-         double d[frq_n_stats];
-         struct histogram *hist ;
+         double d[FRQ_N_STATS];
+         struct histogram *histogram;
 
-         calc_stats (v, d);
+         calc_stats (vf, d);
 
-         hist = freq_tab_to_hist (ft,v);
+         histogram = freq_tab_to_hist (frq, &vf->tab, vf->var);
 
-         histogram_plot_n (hist, var_to_string(v),
-                         vf->tab.valid_cases,
-                         d[frq_mean],
-                         d[frq_stddev],
-                         normal);
+          chart_item_submit (histogram_chart_create (
+                               histogram->gsl_hist, var_to_string(vf->var),
+                               vf->tab.valid_cases,
+                               d[FRQ_MEAN],
+                               d[FRQ_STDDEV],
+                               frq->hist->draw_normal));
 
-         statistic_destroy ((struct statistic *)hist);
+         statistic_destroy (&histogram->parent);
        }
 
-      if ( chart == GFT_PIE)
-       {
-         do_piechart(v_variables[i], ft);
-       }
+      if (frq->pie)
+        do_piechart(frq->pie, vf->var, &vf->tab);
 
-      cleanup_freq_tab (v);
+      cleanup_freq_tab (vf);
 
     }
 }
 
-/* Returns the comparison function that should be used for
-   sorting a frequency table by FRQ_SORT using VAL_TYPE
-   values. */
-static hsh_compare_func *
-get_freq_comparator (int frq_sort, enum val_type val_type)
-{
-  bool is_numeric = val_type == VAL_NUMERIC;
-  switch (frq_sort)
-    {
-    case FRQ_AVALUE:
-      return is_numeric ? compare_value_numeric_a : compare_value_alpha_a;
-    case FRQ_DVALUE:
-      return is_numeric ? compare_value_numeric_d : compare_value_alpha_d;
-    case FRQ_AFREQ:
-      return is_numeric ? compare_freq_numeric_a : compare_freq_alpha_a;
-    case FRQ_DFREQ:
-      return is_numeric ? compare_freq_numeric_d : compare_freq_alpha_d;
-    default:
-      NOT_REACHED ();
-    }
-}
-
-/* Returns true iff the value in struct freq_mutable F is non-missing
+/* Returns true iff the value in struct freq F is non-missing
    for variable V. */
 static bool
 not_missing (const void *f_, const void *v_)
 {
-  const struct freq_mutable *f = f_;
+  const struct freq *f = f_;
   const struct variable *v = v_;
 
   return !var_is_value_missing (v, &f->value, MV_ANY);
 }
 
+struct freq_compare_aux
+  {
+    bool by_freq;
+    bool ascending_freq;
+
+    int width;
+    bool ascending_value;
+  };
+
+static int
+compare_freq (const void *a_, const void *b_, const void *aux_)
+{
+  const struct freq_compare_aux *aux = aux_;
+  const struct freq *a = a_;
+  const struct freq *b = b_;
+
+  if (aux->by_freq && a->count != b->count)
+    {
+      int cmp = a->count > b->count ? 1 : -1;
+      return aux->ascending_freq ? cmp : -cmp;
+    }
+  else
+    {
+      int cmp = value_compare_3way (&a->value, &b->value, aux->width);
+      return aux->ascending_value ? cmp : -cmp;
+    }
+}
 /* Summarizes the frequency table data for variable V. */
 static void
-postprocess_freq_tab (const struct variable *v)
+postprocess_freq_tab (const struct frq_proc *frq, struct var_freqs *vf)
 {
-  hsh_compare_func *compare;
-  struct freq_tab *ft;
+  struct freq_tab *ft = &vf->tab;
+  struct freq_compare_aux aux;
   size_t count;
-  void *const *data;
-  struct freq_mutable *freqs, *f;
+  struct freq *freqs, *f;
   size_t i;
 
-  ft = &get_var_freqs (v)->tab;
-  compare = get_freq_comparator (cmd.sort, var_get_type (v));
-
   /* Extract data from hash table. */
-  count = hsh_count (ft->data);
-  data = hsh_data (ft->data);
-
-  /* Copy dereferenced data into freqs. */
-  freqs = xnmalloc (count, sizeof *freqs);
-  for (i = 0; i < count; i++)
-    {
-      struct freq_mutable *f = data[i];
-      freqs[i] = *f;
-    }
+  count = hmap_count (&ft->data);
+  freqs = freq_hmap_extract (&ft->data);
 
   /* Put data into ft. */
   ft->valid = freqs;
-  ft->n_valid = partition (freqs, count, sizeof *freqs, not_missing, v);
+  ft->n_valid = partition (freqs, count, sizeof *freqs, not_missing, vf->var);
   ft->missing = freqs + ft->n_valid;
   ft->n_missing = count - ft->n_valid;
 
   /* Sort data. */
-  sort (ft->valid, ft->n_valid, sizeof *ft->valid, compare, v);
-  sort (ft->missing, ft->n_missing, sizeof *ft->missing, compare, v);
+  aux.by_freq = frq->sort == FRQ_AFREQ || frq->sort == FRQ_DFREQ;
+  aux.ascending_freq = frq->sort != FRQ_DFREQ;
+  aux.width = vf->width;
+  aux.ascending_value = frq->sort != FRQ_DVALUE;
+  sort (ft->valid, ft->n_valid, sizeof *ft->valid, compare_freq, &aux);
+  sort (ft->missing, ft->n_missing, sizeof *ft->missing, compare_freq, &aux);
 
   /* Summary statistics. */
   ft->valid_cases = 0.0;
@@ -720,57 +602,66 @@ postprocess_freq_tab (const struct variable *v)
 
 /* Frees the frequency table for variable V. */
 static void
-cleanup_freq_tab (const struct variable *v)
+cleanup_freq_tab (struct var_freqs *vf)
 {
-  struct freq_tab *ft = &get_var_freqs (v)->tab;
-  free (ft->valid);
-  hsh_destroy (ft->data);
+  free (vf->tab.valid);
+  freq_hmap_destroy (&vf->tab.data, vf->width);
 }
 
-/* Parses the VARIABLES subcommand, adding to
-   {n_variables,v_variables}. */
+/* Parses the VARIABLES subcommand. */
 static int
-frq_custom_variables (struct lexer *lexer, struct dataset *ds, struct cmd_frequencies *cmd UNUSED, void *aux UNUSED)
+frq_custom_variables (struct lexer *lexer, struct dataset *ds,
+                      struct cmd_frequencies *cmd UNUSED, void *frq_ UNUSED)
 {
-  size_t old_n_variables = n_variables;
+  struct frq_proc *frq = frq_;
+  struct variable **vars;
+  size_t n_vars;
   size_t i;
 
   lex_match (lexer, '=');
-  if (lex_token (lexer) != T_ALL && (lex_token (lexer) != T_ID
-                         || dict_lookup_var (dataset_dict (ds), lex_tokid (lexer)) == NULL))
+  if (lex_token (lexer) != T_ALL
+      && (lex_token (lexer) != T_ID
+          || dict_lookup_var (dataset_dict (ds), lex_tokid (lexer)) == NULL))
     return 2;
 
-  if (!parse_variables_const (lexer, dataset_dict (ds), &v_variables, &n_variables,
-                       PV_APPEND | PV_NO_SCRATCH))
+  /* Get list of current variables, to avoid duplicates. */
+  vars = xmalloc (frq->n_vars * sizeof *vars);
+  n_vars = frq->n_vars;
+  for (i = 0; i < frq->n_vars; i++)
+    vars[i] = frq->vars[i].var;
+
+  if (!parse_variables (lexer, dataset_dict (ds), &vars, &n_vars,
+                        PV_APPEND | PV_NO_SCRATCH))
     return 0;
 
-  for (i = old_n_variables; i < n_variables; i++)
+  frq->vars = xrealloc (frq->vars, n_vars * sizeof *frq->vars);
+  for (i = frq->n_vars; i < n_vars; i++)
     {
-      const struct variable *v = v_variables[i];
-      struct var_freqs *vf;
+      struct variable *var = vars[i];
+      struct var_freqs *vf = &frq->vars[i];
 
-      if (var_get_aux (v) != NULL)
-       {
-         msg (SE, _("Variable %s specified multiple times on VARIABLES "
-                    "subcommand."), var_get_name (v));
-         return 0;
-       }
-      vf = var_attach_aux (v, xmalloc (sizeof *vf), var_dtor_free);
+      vf->var = var;
       vf->tab.valid = vf->tab.missing = NULL;
       vf->tab.dict = dataset_dict (ds);
       vf->n_groups = 0;
       vf->groups = NULL;
-      vf->width = var_get_width (v);
-      vf->print = *var_get_print_format (v);
+      vf->width = var_get_width (var);
+      vf->print = *var_get_print_format (var);
     }
+  frq->n_vars = n_vars;
+
+  free (vars);
+
   return 1;
 }
 
 /* Parses the GROUPED subcommand, setting the n_grouped, grouped
    fields of specified variables. */
 static int
-frq_custom_grouped (struct lexer *lexer, struct dataset *ds, struct cmd_frequencies *cmd UNUSED, void *aux UNUSED)
+frq_custom_grouped (struct lexer *lexer, struct dataset *ds, struct cmd_frequencies *cmd UNUSED, void *frq_ UNUSED)
 {
+  struct frq_proc *frq = frq_;
+
   lex_match (lexer, '=');
   if ((lex_token (lexer) == T_ID && dict_lookup_var (dataset_dict (ds), lex_tokid (lexer)) != NULL)
       || lex_token (lexer) == T_ID)
@@ -798,7 +689,7 @@ frq_custom_grouped (struct lexer *lexer, struct dataset *ds, struct cmd_frequenc
                if (nl >= ml)
                  {
                    ml += 16;
-                   dl = pool_nrealloc (syntax_pool, dl, ml, sizeof *dl);
+                   dl = pool_nrealloc (frq->pool, dl, ml, sizeof *dl);
                  }
                dl[nl++] = lex_tokval (lexer);
                lex_get (lexer);
@@ -820,22 +711,31 @@ frq_custom_grouped (struct lexer *lexer, struct dataset *ds, struct cmd_frequenc
           }
 
        for (i = 0; i < n; i++)
-          if (var_get_aux (v[i]) == NULL)
+          {
+            size_t j;
+
+            for (j = 0; j < frq->n_vars; j++)
+              {
+                struct var_freqs *vf = &frq->vars[j];
+                if (vf->var == v[i])
+                  {
+                    if (vf->groups != NULL)
+                      msg (SE, _("Variables %s specified multiple times on "
+                                 "GROUPED subcommand."), var_get_name (v[i]));
+                    else
+                      {
+                        vf->n_groups = nl;
+                        vf->groups = dl;
+                      }
+                    goto found;
+                  }
+              }
             msg (SE, _("Variables %s specified on GROUPED but not on "
                        "VARIABLES."), var_get_name (v[i]));
-          else
-            {
-              struct var_freqs *vf = get_var_freqs (v[i]);
-
-              if (vf->groups != NULL)
-                msg (SE, _("Variables %s specified multiple times on GROUPED "
-                           "subcommand."), var_get_name (v[i]));
-              else
-                {
-                  vf->n_groups = nl;
-                  vf->groups = dl;
-                }
-            }
+
+          found:;
+          }
+
        free (v);
        if (!lex_match (lexer, '/'))
          break;
@@ -851,192 +751,65 @@ frq_custom_grouped (struct lexer *lexer, struct dataset *ds, struct cmd_frequenc
 }
 
 /* Adds X to the list of percentiles, keeping the list in proper
-   order. */
+   order.  If SHOW is true, the percentile will be shown in the statistics
+   box, otherwise it will be hidden. */
 static void
-add_percentile (double x)
+add_percentile (struct frq_proc *frq, double x, bool show,
+                size_t *allocated_percentiles)
 {
   int i;
 
-  for (i = 0; i < n_percentiles; i++)
+  /* Do nothing if it's already in the list */
+  for (i = 0; i < frq->n_percentiles; i++)
     {
-      /* Do nothing if it's already in the list */
-      if ( fabs(x - percentiles[i].p) < DBL_EPSILON )
-       return;
+      struct percentile *pc = &frq->percentiles[i];
 
-      if (x < percentiles[i].p)
+      if ( fabs(x - pc->p) < DBL_EPSILON )
+        {
+          if (show && !pc->show)
+            {
+              frq->n_show_percentiles++;
+              pc->show = true;
+            }
+          return;
+        }
+
+      if (x < pc->p)
        break;
     }
 
-  if (i >= n_percentiles || x != percentiles[i].p)
-    {
-      percentiles = pool_nrealloc (syntax_pool, percentiles,
-                                   n_percentiles + 1, sizeof *percentiles);
-      insert_element (percentiles, n_percentiles, sizeof *percentiles, i);
-      percentiles[i].p = x;
-      n_percentiles++;
-    }
+  if (frq->n_percentiles >= *allocated_percentiles)
+    frq->percentiles = x2nrealloc (frq->percentiles, allocated_percentiles,
+                                   sizeof *frq->percentiles);
+  insert_element (frq->percentiles, frq->n_percentiles,
+                  sizeof *frq->percentiles, i);
+  frq->percentiles[i].p = x;
+  frq->percentiles[i].show = show;
+  frq->n_percentiles++;
+  if (show)
+    frq->n_show_percentiles++;
 }
 
 /* Comparison functions. */
 
-/* Ascending numeric compare of values. */
-static int
-compare_value_numeric_a (const void *a_, const void *b_, const void *aux UNUSED)
-{
-  const struct freq_mutable *a = a_;
-  const struct freq_mutable *b = b_;
-
-  if (a->value.f > b->value.f)
-    return 1;
-  else if (a->value.f < b->value.f)
-    return -1;
-  else
-    return 0;
-}
-
-/* Ascending string compare of values. */
-static int
-compare_value_alpha_a (const void *a_, const void *b_, const void *v_)
-{
-  const struct freq_mutable *a = a_;
-  const struct freq_mutable *b = b_;
-  const struct variable *v = v_;
-  struct var_freqs *vf = get_var_freqs (v);
-
-  return value_compare_3way (&a->value, &b->value, vf->width);
-}
-
-/* Descending numeric compare of values. */
-static int
-compare_value_numeric_d (const void *a, const void *b, const void *aux UNUSED)
-{
-  return -compare_value_numeric_a (a, b, aux);
-}
-
-/* Descending string compare of values. */
-static int
-compare_value_alpha_d (const void *a, const void *b, const void *v)
-{
-  return -compare_value_alpha_a (a, b, v);
-}
-
-/* Ascending numeric compare of frequency;
-   secondary key on ascending numeric value. */
-static int
-compare_freq_numeric_a (const void *a_, const void *b_, const void *aux UNUSED)
-{
-  const struct freq_mutable *a = a_;
-  const struct freq_mutable *b = b_;
-
-  if (a->count > b->count)
-    return 1;
-  else if (a->count < b->count)
-    return -1;
-
-  if (a->value.f > b->value.f)
-    return 1;
-  else if (a->value.f < b->value.f)
-    return -1;
-  else
-    return 0;
-}
-
-/* Ascending numeric compare of frequency;
-   secondary key on ascending string value. */
-static int
-compare_freq_alpha_a (const void *a_, const void *b_, const void *v_)
-{
-  const struct freq_mutable *a = a_;
-  const struct freq_mutable *b = b_;
-  const struct variable *v = v_;
-  struct var_freqs *vf = get_var_freqs (v);
-
-  if (a->count > b->count)
-    return 1;
-  else if (a->count < b->count)
-    return -1;
-  else
-    return value_compare_3way (&a->value, &b->value, vf->width);
-}
-
-/* Descending numeric compare of frequency;
-   secondary key on ascending numeric value. */
-static int
-compare_freq_numeric_d (const void *a_, const void *b_, const void *aux UNUSED)
-{
-  const struct freq_mutable *a = a_;
-  const struct freq_mutable *b = b_;
-
-  if (a->count > b->count)
-    return -1;
-  else if (a->count < b->count)
-    return 1;
-
-  if (a->value.f > b->value.f)
-    return 1;
-  else if (a->value.f < b->value.f)
-    return -1;
-  else
-    return 0;
-}
-
-/* Descending numeric compare of frequency;
-   secondary key on ascending string value. */
-static int
-compare_freq_alpha_d (const void *a_, const void *b_, const void *v_)
-{
-  const struct freq_mutable *a = a_;
-  const struct freq_mutable *b = b_;
-  const struct variable *v = v_;
-  struct var_freqs *vf = get_var_freqs (v);
-
-  if (a->count > b->count)
-    return -1;
-  else if (a->count < b->count)
-    return 1;
-  else
-    return value_compare_3way (&a->value, &b->value, vf->width);
-}
 \f
 /* Frequency table display. */
 
-/* Sets the widths of all the columns and heights of all the rows in
-   table T for driver D. */
-static void
-full_dim (struct tab_table *t, struct outp_driver *d, void *aux UNUSED)
-{
-  int i = 0;
-  int columns = 5;
-
-  if (cmd.labels == FRQ_LABELS)
-    {
-    t->w[0] = MIN (tab_natural_width (t, d, 0), d->prop_em_width * 15);
-      i = 1;
-      columns ++;
-    }
-
-  for (;i < columns; i++)
-    t->w[i] = MAX (tab_natural_width (t, d, i), d->prop_em_width * 8);
-
-  for (i = 0; i < t->nr; i++)
-    t->h[i] = d->font_height;
-}
-
 /* Displays a full frequency table for variable V. */
 static void
-dump_full (const struct variable *v, const struct variable *wv)
+dump_freq_table (const struct var_freqs *vf, const struct variable *wv)
 {
   const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : &F_8_0;
+  const struct freq_tab *ft = &vf->tab;
   int n_categories;
-  struct var_freqs *vf;
-  struct freq_tab *ft;
-  struct freq_mutable *f;
+  struct freq *f;
   struct tab_table *t;
   int r, x;
   double cum_total = 0.0;
   double cum_freq = 0.0;
 
   static const char *headings[] = {
+    N_("Value Label"),
     N_("Value"),
     N_("Frequency"),
     N_("Percent"),
@@ -1044,24 +817,17 @@ dump_full (const struct variable *v, const struct variable *wv)
     N_("Cum Percent")
   };
 
-  const bool lab = (cmd.labels == FRQ_LABELS);
-
-  vf = get_var_freqs (v);
-  ft = &vf->tab;
   n_categories = ft->n_valid + ft->n_missing;
-  t = tab_create (5 + lab, n_categories + 2, 0);
+  t = tab_create (6, n_categories + 2);
   tab_headers (t, 0, 0, 1, 0);
-  tab_dim (t, full_dim, NULL);
 
-  if (lab)
-    tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Value Label"));
-
-  for (x = 0; x < 5; x++)
-    tab_text (t, lab + x, 0, TAB_CENTER | TAT_TITLE, gettext (headings[x]));
+  for (x = 0; x < 6; x++)
+    tab_text (t, x, 0, TAB_CENTER | TAT_TITLE, gettext (headings[x]));
 
   r = 1;
   for (f = ft->valid; f < ft->missing; f++)
     {
+      const char *label;
       double percent, valid_percent;
 
       cum_freq += f->count;
@@ -1070,232 +836,118 @@ dump_full (const struct variable *v, const struct variable *wv)
       valid_percent = f->count / ft->valid_cases * 100.0;
       cum_total += valid_percent;
 
-      if (lab)
-       {
-         const char *label = var_lookup_value_label (v, &f->value);
-         if (label != NULL)
-           tab_text (t, 0, r, TAB_LEFT, label);
-       }
+      label = var_lookup_value_label (vf->var, &f->value);
+      if (label != NULL)
+        tab_text (t, 0, r, TAB_LEFT, label);
 
-      tab_value (t, 0 + lab, r, TAB_NONE, &f->value, ft->dict, &vf->print);
-      tab_double (t, 1 + lab, r, TAB_NONE, f->count, wfmt);
-      tab_double (t, 2 + lab, r, TAB_NONE, percent, NULL);
-      tab_double (t, 3 + lab, r, TAB_NONE, valid_percent, NULL);
-      tab_double (t, 4 + lab, r, TAB_NONE, cum_total, NULL);
+      tab_value (t, 1, r, TAB_NONE, &f->value, ft->dict, &vf->print);
+      tab_double (t, 2, r, TAB_NONE, f->count, wfmt);
+      tab_double (t, 3, r, TAB_NONE, percent, NULL);
+      tab_double (t, 4, r, TAB_NONE, valid_percent, NULL);
+      tab_double (t, 5, r, TAB_NONE, cum_total, NULL);
       r++;
     }
   for (; f < &ft->valid[n_categories]; f++)
     {
+      const char *label;
+
       cum_freq += f->count;
 
-      if (lab)
-       {
-         const char *label = var_lookup_value_label (v, &f->value);
-         if (label != NULL)
-           tab_text (t, 0, r, TAB_LEFT, label);
-       }
+      label = var_lookup_value_label (vf->var, &f->value);
+      if (label != NULL)
+        tab_text (t, 0, r, TAB_LEFT, label);
 
-      tab_value (t, 0 + lab, r, TAB_NONE, &f->value, ft->dict, &vf->print);
-      tab_double (t, 1 + lab, r, TAB_NONE, f->count, wfmt);
-      tab_double (t, 2 + lab, r, TAB_NONE,
+      tab_value (t, 1, r, TAB_NONE, &f->value, ft->dict, &vf->print);
+      tab_double (t, 2, r, TAB_NONE, f->count, wfmt);
+      tab_double (t, 3, r, TAB_NONE,
                     f->count / ft->total_cases * 100.0, NULL);
-      tab_text (t, 3 + lab, r, TAB_NONE, _("Missing"));
+      tab_text (t, 4, r, TAB_NONE, _("Missing"));
       r++;
     }
 
-  tab_box (t, TAL_1, TAL_1,
-          cmd.spaces == FRQ_SINGLE ? -1 : TAL_GAP, TAL_1,
-          0, 0, 4 + lab, r);
-  tab_hline (t, TAL_2, 0, 4 + lab, 1);
-  tab_hline (t, TAL_2, 0, 4 + lab, r);
-  tab_joint_text (t, 0, r, 0 + lab, r, TAB_RIGHT | TAT_TITLE, _("Total"));
+  tab_box (t, TAL_1, TAL_1, -1, TAL_1, 0, 0, 5, r);
+  tab_hline (t, TAL_2, 0, 5, 1);
+  tab_hline (t, TAL_2, 0, 5, r);
+  tab_joint_text (t, 0, r, 1, r, TAB_RIGHT | TAT_TITLE, _("Total"));
   tab_vline (t, TAL_0, 1, r, r);
-  tab_double (t, 1 + lab, r, TAB_NONE, cum_freq, wfmt);
-  tab_fixed (t, 2 + lab, r, TAB_NONE, 100.0, 5, 1);
-  tab_fixed (t, 3 + lab, r, TAB_NONE, 100.0, 5, 1);
+  tab_double (t, 2, r, TAB_NONE, cum_freq, wfmt);
+  tab_fixed (t, 3, r, TAB_NONE, 100.0, 5, 1);
+  tab_fixed (t, 4, r, TAB_NONE, 100.0, 5, 1);
 
-  tab_title (t, "%s", var_to_string (v));
+  tab_title (t, "%s", var_to_string (vf->var));
   tab_submit (t);
 }
+\f
+/* Statistical display. */
 
-/* Sets the widths of all the columns and heights of all the rows in
-   table T for driver D. */
-static void
-condensed_dim (struct tab_table *t, struct outp_driver *d, void *aux UNUSED)
+static double
+calc_percentile (double p, double valid_cases, double x1, double x2)
 {
-  int cum_w = MAX (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
-                  MAX (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
-                       outp_string_width (d, "000", OUTP_PROPORTIONAL)));
+  double s, dummy;
 
-  int i;
+  s = (settings_get_algorithm () != COMPATIBLE
+       ? modf ((valid_cases - 1) * p, &dummy)
+       : modf ((valid_cases + 1) * p - 1, &dummy));
 
-  for (i = 0; i < 2; i++)
-    t->w[i] = MAX (tab_natural_width (t, d, i), d->prop_em_width * 8);
-  for (i = 2; i < 4; i++)
-    t->w[i] = cum_w;
-  for (i = 0; i < t->nr; i++)
-    t->h[i] = d->font_height;
+  return x1 + (x2 - x1) * s;
 }
 
-/* Display condensed frequency table for variable V. */
+/* Calculates all of the percentiles for VF within FRQ. */
 static void
-dump_condensed (const struct variable *v, const struct variable *wv)
+calc_percentiles (const struct frq_proc *frq, const struct var_freqs *vf)
 {
-  const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : &F_8_0;
-  int n_categories;
-  struct var_freqs *vf;
-  struct freq_tab *ft;
-  struct freq_mutable *f;
-  struct tab_table *t;
-  int r;
-  double cum_total = 0.0;
-
-  vf = get_var_freqs (v);
-  ft = &vf->tab;
-  n_categories = ft->n_valid + ft->n_missing;
-  t = tab_create (4, n_categories + 2, 0);
+  const struct freq_tab *ft = &vf->tab;
+  double W = ft->valid_cases;
+  const struct freq *f;
+  int percentile_idx;
+  double rank;
 
-  tab_headers (t, 0, 0, 2, 0);
-  tab_text (t, 0, 1, TAB_CENTER | TAT_TITLE, _("Value"));
-  tab_text (t, 1, 1, TAB_CENTER | TAT_TITLE, _("Freq"));
-  tab_text (t, 2, 1, TAB_CENTER | TAT_TITLE, _("Pct"));
-  tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Cum"));
-  tab_text (t, 3, 1, TAB_CENTER | TAT_TITLE, _("Pct"));
-  tab_dim (t, condensed_dim, NULL);
+  assert (ft->n_valid > 0);
 
-  r = 2;
+  rank = 0;
+  percentile_idx = 0;
   for (f = ft->valid; f < ft->missing; f++)
     {
-      double percent;
+      rank += f->count;
+      for (; percentile_idx < frq->n_percentiles; percentile_idx++)
+        {
+          struct percentile *pc = &frq->percentiles[percentile_idx];
+          double tp;
 
-      percent = f->count / ft->total_cases * 100.0;
-      cum_total += f->count / ft->valid_cases * 100.0;
+          tp = (settings_get_algorithm () == ENHANCED
+                ? (W - 1) * pc->p
+                : (W + 1) * pc->p - 1);
 
-      tab_value (t, 0, r, TAB_NONE, &f->value, ft->dict, &vf->print);
-      tab_double (t, 1, r, TAB_NONE, f->count, wfmt);
-      tab_double (t, 2, r, TAB_NONE, percent, NULL);
-      tab_double (t, 3, r, TAB_NONE, cum_total, NULL);
-      r++;
+          if (rank <= tp)
+            break;
+
+          if (f->count > 1
+              && (rank - (f->count - 1) > tp || f + 1 >= ft->missing))
+            pc->value = f->value.f;
+          else
+            pc->value = calc_percentile (pc->p, W, f->value.f, f[1].value.f);
+        }
     }
-  for (; f < &ft->valid[n_categories]; f++)
+  for (; percentile_idx < frq->n_percentiles; percentile_idx++)
     {
-      tab_value (t, 0, r, TAB_NONE, &f->value, ft->dict, &vf->print);
-      tab_double (t, 1, r, TAB_NONE, f->count, wfmt);
-      tab_double (t, 2, r, TAB_NONE,
-                f->count / ft->total_cases * 100.0, NULL);
-      r++;
+      struct percentile *pc = &frq->percentiles[percentile_idx];
+      pc->value = ft->valid[ft->n_valid - 1].value.f;
     }
-
-  tab_box (t, TAL_1, TAL_1,
-          cmd.spaces == FRQ_SINGLE ? -1 : TAL_GAP, TAL_1,
-          0, 0, 3, r - 1);
-  tab_hline (t, TAL_2, 0, 3, 2);
-  tab_title (t, "%s", var_to_string (v));
-  tab_columns (t, SOM_COL_DOWN, 1);
-  tab_submit (t);
 }
-\f
-/* Statistical display. */
 
-/* Calculates all the pertinent statistics for variable V, putting
-   them in array D[].  FIXME: This could be made much more optimal. */
+/* Calculates all the pertinent statistics for VF, putting them in array
+   D[]. */
 static void
-calc_stats (const struct variable *v, double d[frq_n_stats])
+calc_stats (const struct var_freqs *vf, double d[FRQ_N_STATS])
 {
-  struct freq_tab *ft = &get_var_freqs (v)->tab;
+  const struct freq_tab *ft = &vf->tab;
   double W = ft->valid_cases;
+  const struct freq *f;
   struct moments *m;
-  struct freq_mutable *f=0;
   int most_often;
   double X_mode;
 
-  double rank;
-  int i = 0;
-  int idx;
-
-  /* Calculate percentiles. */
-
-  for (i = 0; i < n_percentiles; i++)
-    {
-      percentiles[i].flag = 0;
-      percentiles[i].flag2 = 0;
-    }
-
-  rank = 0;
-  for (idx = 0; idx < ft->n_valid; ++idx)
-    {
-      static double prev_value = SYSMIS;
-      f = &ft->valid[idx];
-      rank += f->count ;
-      for (i = 0; i < n_percentiles; i++)
-        {
-         double tp;
-         if ( percentiles[i].flag2  ) continue ;
-
-         if ( settings_get_algorithm () != COMPATIBLE )
-           tp =
-             (ft->valid_cases - 1) *  percentiles[i].p;
-         else
-           tp =
-             (ft->valid_cases + 1) *  percentiles[i].p - 1;
-
-         if ( percentiles[i].flag )
-           {
-             percentiles[i].x2 = f->value.f;
-             percentiles[i].x1 = prev_value;
-             percentiles[i].flag2 = 1;
-             continue;
-           }
-
-          if (rank >  tp )
-         {
-           if ( f->count > 1 && rank - (f->count - 1) > tp )
-             {
-               percentiles[i].x2 = percentiles[i].x1 = f->value.f;
-               percentiles[i].flag2 = 1;
-             }
-           else
-             {
-               percentiles[i].flag=1;
-             }
-
-           continue;
-         }
-        }
-      prev_value = f->value.f;
-    }
-
-  for (i = 0; i < n_percentiles; i++)
-    {
-      /* Catches the case when p == 100% */
-      if ( ! percentiles[i].flag2 )
-       percentiles[i].x1 = percentiles[i].x2 = f->value.f;
-
-      /*
-      printf("percentile %d (p==%.2f); X1 = %g; X2 = %g\n",
-            i,percentiles[i].p,percentiles[i].x1,percentiles[i].x2);
-      */
-    }
-
-  for (i = 0; i < n_percentiles; i++)
-    {
-      struct freq_tab *ft = &get_var_freqs (v)->tab;
-      double s;
-
-      double dummy;
-      if ( settings_get_algorithm () != COMPATIBLE )
-       {
-         s = modf((ft->valid_cases - 1) * percentiles[i].p , &dummy);
-       }
-      else
-       {
-         s = modf((ft->valid_cases + 1) * percentiles[i].p -1, &dummy);
-       }
-
-      percentiles[i].value = percentiles[i].x1 +
-       ( percentiles[i].x2 - percentiles[i].x1) * s ;
-    }
-
+  assert (ft->n_valid > 0);
 
   /* Calculate the mode. */
   most_often = -1;
@@ -1321,46 +973,46 @@ calc_stats (const struct variable *v, double d[frq_n_stats])
     moments_pass_one (m, f->value.f, f->count);
   for (f = ft->valid; f < ft->missing; f++)
     moments_pass_two (m, f->value.f, f->count);
-  moments_calculate (m, NULL, &d[frq_mean], &d[frq_variance],
-                     &d[frq_skew], &d[frq_kurt]);
+  moments_calculate (m, NULL, &d[FRQ_MEAN], &d[FRQ_VARIANCE],
+                     &d[FRQ_SKEW], &d[FRQ_KURT]);
   moments_destroy (m);
 
   /* Formulas below are taken from _SPSS Statistical Algorithms_. */
-  d[frq_min] = ft->valid[0].value.f;
-  d[frq_max] = ft->valid[ft->n_valid - 1].value.f;
-  d[frq_mode] = X_mode;
-  d[frq_range] = d[frq_max] - d[frq_min];
-  d[frq_sum] = d[frq_mean] * W;
-  d[frq_stddev] = sqrt (d[frq_variance]);
-  d[frq_semean] = d[frq_stddev] / sqrt (W);
-  d[frq_seskew] = calc_seskew (W);
-  d[frq_sekurt] = calc_sekurt (W);
+  d[FRQ_MIN] = ft->valid[0].value.f;
+  d[FRQ_MAX] = ft->valid[ft->n_valid - 1].value.f;
+  d[FRQ_MODE] = X_mode;
+  d[FRQ_RANGE] = d[FRQ_MAX] - d[FRQ_MIN];
+  d[FRQ_SUM] = d[FRQ_MEAN] * W;
+  d[FRQ_STDDEV] = sqrt (d[FRQ_VARIANCE]);
+  d[FRQ_SEMEAN] = d[FRQ_STDDEV] / sqrt (W);
+  d[FRQ_SESKEW] = calc_seskew (W);
+  d[FRQ_SEKURT] = calc_sekurt (W);
 }
 
 /* Displays a table of all the statistics requested for variable V. */
 static void
-dump_statistics (const struct variable *v, bool show_varname,
-                const struct variable *wv)
+dump_statistics (const struct frq_proc *frq, const struct var_freqs *vf,
+                 const struct variable *wv)
 {
   const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : &F_8_0;
-  struct freq_tab *ft;
-  double stat_value[frq_n_stats];
+  const struct freq_tab *ft = &vf->tab;
+  double stat_value[FRQ_N_STATS];
   struct tab_table *t;
   int i, r;
 
-  if (var_is_alpha (v))
+  if (var_is_alpha (vf->var))
     return;
-  ft = &get_var_freqs (v)->tab;
+
   if (ft->n_valid == 0)
     {
       msg (SW, _("No valid data for variable %s; statistics not displayed."),
-          var_get_name (v));
+          var_get_name (vf->var));
       return;
     }
-  calc_stats (v, stat_value);
+  calc_stats (vf, stat_value);
+  calc_percentiles (frq, vf);
 
-  t = tab_create (3, n_stats + n_percentiles + 2, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
+  t = tab_create (3, frq->n_stats + frq->n_show_percentiles + 2);
 
   tab_box (t, TAL_1, TAL_1, -1, -1 , 0 , 0 , 2, tab_nr(t) - 1) ;
 
@@ -1370,8 +1022,8 @@ dump_statistics (const struct variable *v, bool show_varname,
 
   r=2; /* N missing and N valid are always dumped */
 
-  for (i = 0; i < frq_n_stats; i++)
-    if (stats & BIT_INDEX (i))
+  for (i = 0; i < FRQ_N_STATS; i++)
+    if (frq->stats & BIT_INDEX (i))
       {
        tab_text (t, 0, r, TAB_LEFT | TAT_TITLE,
                      gettext (st_name[i].s10));
@@ -1386,100 +1038,158 @@ dump_statistics (const struct variable *v, bool show_varname,
   tab_double (t, 2, 0, TAB_NONE, ft->valid_cases, wfmt);
   tab_double (t, 2, 1, TAB_NONE, ft->total_cases - ft->valid_cases, wfmt);
 
-  for (i = 0; i < n_percentiles; i++, r++)
+  for (i = 0; i < frq->n_percentiles; i++, r++)
     {
+      struct percentile *pc = &frq->percentiles[i];
+
+      if (!pc->show)
+        continue;
+
       if ( i == 0 )
        {
          tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, _("Percentiles"));
        }
 
-      if (percentiles[i].p == 0.5)
+      if (pc->p == 0.5)
         tab_text (t, 1, r, TAB_LEFT, _("50 (Median)"));
       else
-        tab_fixed (t, 1, r, TAB_LEFT, percentiles[i].p * 100, 3, 0);
-      tab_double (t, 2, r, TAB_NONE, percentiles[i].value,
-                 var_get_print_format (v));
+        tab_fixed (t, 1, r, TAB_LEFT, pc->p * 100, 3, 0);
+      tab_double (t, 2, r, TAB_NONE, pc->value,
+                  var_get_print_format (vf->var));
     }
 
-  tab_columns (t, SOM_COL_DOWN, 1);
-  if (show_varname)
-    tab_title (t, "%s", var_to_string (v));
-  else
-    tab_flags (t, SOMF_NO_TITLE);
-
+  tab_title (t, "%s", var_to_string (vf->var));
 
   tab_submit (t);
 }
 
+static double
+calculate_iqr (const struct frq_proc *frq)
+{
+  double q1 = SYSMIS;
+  double q3 = SYSMIS;
+  int i;
+
+  for (i = 0; i < frq->n_percentiles; i++)
+    {
+      struct percentile *pc = &frq->percentiles[i];
+
+      if (fabs (0.25 - pc->p) < DBL_EPSILON)
+        q1 = pc->value;
+      else if (fabs (0.75 - pc->p) < DBL_EPSILON)
+        q3 = pc->value;
+    }
+
+  return q1 == SYSMIS || q3 == SYSMIS ? SYSMIS : q3 - q1;
+}
+
+static bool
+chart_includes_value (const struct frq_chart *chart,
+                      const struct variable *var,
+                      const union value *value)
+{
+  if (!chart->include_missing && var_is_value_missing (var, value, MV_ANY))
+    return false;
+
+  if (var_is_numeric (var)
+      && ((chart->x_min != SYSMIS && value->f < chart->x_min)
+          || (chart->x_max != SYSMIS && value->f > chart->x_max)))
+    return false;
+
+  return true;
+}
 
 /* Create a gsl_histogram from a freq_tab */
 struct histogram *
-freq_tab_to_hist (const struct freq_tab *ft, const struct variable *var)
+freq_tab_to_hist (const struct frq_proc *frq, const struct freq_tab *ft,
+                  const struct variable *var)
 {
+  double x_min, x_max, valid_freq;
   int i;
-  double x_min = DBL_MAX;
-  double x_max = -DBL_MAX;
-
-  struct statistic *hist;
-  const double bins = 11;
 
-  struct hsh_iterator hi;
-  struct hsh_table *fh = ft->data;
-  struct freq_mutable *frq;
+  struct histogram *histogram;
+  double iqr;
+  int bins;
 
-  /* Find out the extremes of the x value */
-  for ( frq = hsh_first(fh, &hi); frq != 0; frq = hsh_next(fh, &hi) )
+  /* Find out the extremes of the x value, within the range to be included in
+     the histogram, and sum the total frequency of those values. */
+  x_min = DBL_MAX;
+  x_max = -DBL_MAX;
+  valid_freq = 0;
+  for (i = 0; i < ft->n_valid; i++)
     {
-      if (var_is_value_missing(var, &frq->value, MV_ANY))
-       continue;
-
-      if ( frq->value.f < x_min ) x_min = frq->value.f ;
-      if ( frq->value.f > x_max ) x_max = frq->value.f ;
+      const struct freq *f = &ft->valid[i];
+      if (chart_includes_value (frq->hist, var, &f->value))
+        {
+          x_min = MIN (x_min, f->value.f);
+          x_max = MAX (x_max, f->value.f);
+          valid_freq += f->count;
+        }
     }
 
-  hist = histogram_create (bins, x_min, x_max);
+  /* Freedman-Diaconis' choice of bin width. */
+  iqr = calculate_iqr (frq);
+  if (iqr != SYSMIS)
+    {
+      double bin_width = 2 * iqr / pow (valid_freq, 1.0 / 3.0);
+      bins = (x_max - x_min) / bin_width;
+      if (bins < 5)
+        bins = 5;
+      else if (bins > 400)
+        bins = 400;
+    }
+  else
+    bins = 5;
 
-  for( i = 0 ; i < ft->n_valid ; ++i )
+  histogram = histogram_create (bins, x_min, x_max);
+  for (i = 0; i < ft->n_valid; i++)
     {
-      frq = &ft->valid[i];
-      histogram_add ((struct histogram *)hist, frq->value.f, frq->count);
+      const struct freq *f = &ft->valid[i];
+      if (chart_includes_value (frq->hist, var, &f->value))
+        histogram_add (histogram, f->value.f, f->count);
     }
 
-  return (struct histogram *)hist;
+  return histogram;
 }
 
-
-static struct slice *
-freq_tab_to_slice_array(const struct freq_tab *frq_tab,
-                       const struct variable *var,
-                       int *n_slices);
-
+static int
+add_slice (const struct frq_chart *pie, const struct freq *freq,
+           const struct variable *var, struct slice *slice)
+{
+  if (chart_includes_value (pie, var, &freq->value))
+    {
+      ds_init_empty (&slice->label);
+      var_append_value_name (var, &freq->value, &slice->label);
+      slice->magnitude = freq->count;
+      return 1;
+    }
+  else
+    return 0;
+}
 
 /* Allocate an array of slices and fill them from the data in frq_tab
    n_slices will contain the number of slices allocated.
    The caller is responsible for freeing slices
 */
 static struct slice *
-freq_tab_to_slice_array(const struct freq_tab *frq_tab,
+freq_tab_to_slice_array(const struct frq_chart *pie,
+                        const struct freq_tab *frq_tab,
                        const struct variable *var,
-                       int *n_slices)
+                       int *n_slicesp)
 {
-  int i;
   struct slice *slices;
+  int n_slices;
+  int i;
 
-  *n_slices = frq_tab->n_valid;
-
-  slices = xnmalloc (*n_slices, sizeof *slices);
+  slices = xnmalloc (frq_tab->n_valid + frq_tab->n_missing, sizeof *slices);
+  n_slices = 0;
 
-  for (i = 0 ; i < *n_slices ; ++i )
-    {
-      const struct freq_mutable *frq = &frq_tab->valid[i];
-
-      ds_init_empty (&slices[i].label);
-      var_append_value_name (var, &frq->value, &slices[i].label);
-      slices[i].magnetude = frq->count;
-    }
+  for (i = 0; i < frq_tab->n_valid; i++)
+    n_slices += add_slice (pie, &frq_tab->valid[i], var, &slices[n_slices]);
+  for (i = 0; i < frq_tab->n_missing; i++)
+    n_slices += add_slice (pie, &frq_tab->missing[i], var, &slices[n_slices]);
 
+  *n_slicesp = n_slices;
   return slices;
 }
 
@@ -1487,21 +1197,26 @@ freq_tab_to_slice_array(const struct freq_tab *frq_tab,
 
 
 static void
-do_piechart(const struct variable *var, const struct freq_tab *frq_tab)
+do_piechart(const struct frq_chart *pie, const struct variable *var,
+            const struct freq_tab *frq_tab)
 {
   struct slice *slices;
   int n_slices, i;
 
-  slices = freq_tab_to_slice_array(frq_tab, var, &n_slices);
+  slices = freq_tab_to_slice_array (pie, 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);
-    }
+  if (n_slices < 2)
+    msg (SW, _("Omitting pie chart for %s, which has only %d unique values."),
+         var_get_name (var), n_slices);
+  else if (n_slices > 50)
+    msg (SW, _("Omitting pie chart for %s, which has over 50 unique values."),
+         var_get_name (var));
+  else
+    chart_item_submit (piechart_create (var_to_string(var), slices, n_slices));
 
-  free(slices);
+  for (i = 0; i < n_slices; i++)
+    ds_destroy (&slices[i].label);
+  free (slices);
 }
 
 
index 2363571c5c81db88b10d8450e1c5aa8fc09e27a6..1a941152d9fa334d408eb10002314c17febd4049 100644 (file)
@@ -23,7 +23,6 @@
 #include <stdlib.h>
 
 #include <data/case.h>
-#include <data/category.h>
 #include <data/casegrouper.h>
 #include <data/casereader.h>
 #include <data/dictionary.h>
@@ -43,7 +42,7 @@
 #include <math/coefficient.h>
 #include <math/linreg.h>
 #include <math/moments.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include "xalloc.h"
 #include "gettext.h"
index d626dffac5f72075a582c370cb5940ec3845e2d1..625291360fb7ed453472982f01b084bf46edf003 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 #include <config.h>
 
 #include <data/format.h>
-#include <output/table.h>
+#include <output/tab.h>
 #include <data/casereader.h>
 #include <libpspp/hash.h>
 #include <data/variable.h>
@@ -102,16 +102,15 @@ do_summary_box (const struct descriptives *desc,
   if ( desc ) columns += 5;
   if ( quartiles ) columns += 3;
 
-  table = tab_create (columns, 2 + n_vars, 0);
+  table = tab_create (columns, 2 + n_vars);
 
-  tab_dim (table, tab_natural_dimensions, NULL);
 
   tab_title (table, _("Descriptive Statistics"));
 
   tab_headers (table, 1, 0, 1, 0);
 
   tab_box (table, TAL_1, TAL_1, -1, TAL_1,
-          0, 0, table->nc - 1, tab_nr(table) - 1 );
+          0, 0, tab_nc (table) - 1, tab_nr(table) - 1 );
 
   tab_hline (table, TAL_2, 0, tab_nc (table) -1, 2);
   tab_vline (table, TAL_2, 1, 0, tab_nr (table) - 1);
@@ -159,13 +158,17 @@ do_summary_box (const struct descriptives *desc,
       const struct variable *var = vv[v];
       const struct fmt_spec *fmt = var_get_print_format (var);
 
-      tab_text (table, 0, 2 + v, TAT_NONE, var_to_string (var));
-
-      tab_double (table, 1, 2 + v, TAT_NONE, desc[v].n, fmt);
-      tab_double (table, 2, 2 + v, TAT_NONE, desc[v].mean, fmt);
-      tab_double (table, 3, 2 + v, TAT_NONE, desc[v].std_dev, fmt);
-      tab_double (table, 4, 2 + v, TAT_NONE, desc[v].min, fmt);
-      tab_double (table, 5, 2 + v, TAT_NONE, desc[v].max, fmt);
+      tab_text (table, 0, 2 + v, 0, var_to_string (var));
+
+      col = 1;
+      if (desc != NULL)
+        {
+          tab_double (table, col++, 2 + v, 0, desc[v].n, fmt);
+          tab_double (table, col++, 2 + v, 0, desc[v].mean, fmt);
+          tab_double (table, col++, 2 + v, 0, desc[v].std_dev, fmt);
+          tab_double (table, col++, 2 + v, 0, desc[v].min, fmt);
+          tab_double (table, col++, 2 + v, 0, desc[v].max, fmt);
+        }
     }
 
 
index bbccce671f075b161b1e95170d07197c6a3ac69d..535797227b2a23974e6a13da5ed265b0a8c419b2 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <config.h>
 
+
 #include <language/stats/npar.h>
 
 #include <math.h>
@@ -32,6 +33,7 @@
 #include <language/stats/chisquare.h>
 #include <language/stats/wilcoxon.h>
 #include <language/stats/sign.h>
+#include <libpspp/cast.h>
 #include <libpspp/hash.h>
 #include <libpspp/pool.h>
 #include <libpspp/taint.h>
@@ -132,6 +134,7 @@ npar_execute(struct casereader *input,
   casereader_destroy (input);
 }
 
+
 int
 cmd_npar_tests (struct lexer *lexer, struct dataset *ds)
 {
@@ -223,10 +226,11 @@ npar_custom_chisquare (struct lexer *lexer, struct dataset *ds,
   struct npar_specs *specs = aux;
 
   struct chisquare_test *cstp = pool_alloc(specs->pool, sizeof(*cstp));
-  struct one_sample_test *tp = (struct one_sample_test *) cstp;
+  struct one_sample_test *tp = &cstp->parent;
+  struct npar_test *nt = &tp->parent;
 
-  ((struct npar_test *)tp)->execute = chisquare_execute;
-  ((struct npar_test *)tp)->insert_variables = one_sample_insert_variables;
+  nt->execute = chisquare_execute;
+  nt->insert_variables = one_sample_insert_variables;
 
   if (!parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds),
                                   &tp->vars, &tp->n_vars,
@@ -316,7 +320,7 @@ npar_custom_chisquare (struct lexer *lexer, struct dataset *ds,
                              specs->test,
                              sizeof(*specs->test) * specs->n_tests);
 
-  specs->test[specs->n_tests - 1] = (struct npar_test *) tp;
+  specs->test[specs->n_tests - 1] = nt;
 
   return 1;
 }
@@ -328,14 +332,17 @@ npar_custom_binomial (struct lexer *lexer, struct dataset *ds,
 {
   struct npar_specs *specs = aux;
   struct binomial_test *btp = pool_alloc(specs->pool, sizeof(*btp));
-  struct one_sample_test *tp = (struct one_sample_test *) btp;
+  struct one_sample_test *tp = &btp->parent;
+  struct npar_test *nt = &tp->parent;
 
-  ((struct npar_test *)tp)->execute = binomial_execute;
-  ((struct npar_test *)tp)->insert_variables = one_sample_insert_variables;
+  nt->execute = binomial_execute;
+  nt->insert_variables = one_sample_insert_variables;
 
   btp->category1 = btp->category2 = btp->cutpoint = SYSMIS;
 
-  if ( lex_match(lexer, '(') )
+  btp->p = 0.5;
+
+  if ( lex_match (lexer, '(') )
     {
       if ( lex_force_num (lexer) )
        {
@@ -346,6 +353,10 @@ npar_custom_binomial (struct lexer *lexer, struct dataset *ds,
       else
        return 0;
     }
+  else
+    /* Kludge: q2c swallows the '=' so put it back here  */
+     lex_put_back (lexer, '=');
+
 
   if ( lex_match (lexer, '=') )
     {
@@ -374,6 +385,7 @@ npar_custom_binomial (struct lexer *lexer, struct dataset *ds,
        }
       else
        return 2;
+
     }
 
   specs->n_tests++;
@@ -381,7 +393,7 @@ npar_custom_binomial (struct lexer *lexer, struct dataset *ds,
                              specs->test,
                              sizeof(*specs->test) * specs->n_tests);
 
-  specs->test[specs->n_tests - 1] = (struct npar_test *) tp;
+  specs->test[specs->n_tests - 1] = nt;
 
   return 1;
 }
@@ -412,7 +424,7 @@ parse_two_sample_related_test (struct lexer *lexer,
   const struct variable **vlist2;
   size_t n_vlist2;
 
-  ((struct npar_test *)test_parameters)->insert_variables = two_sample_insert_variables;
+  test_parameters->parent.insert_variables = two_sample_insert_variables;
 
   if (!parse_variables_const_pool (lexer, pool,
                                   dict,
@@ -512,7 +524,8 @@ npar_custom_wilcoxon (struct lexer *lexer,
   struct npar_specs *specs = aux;
 
   struct two_sample_test *tp = pool_alloc (specs->pool, sizeof(*tp));
-  ((struct npar_test *)tp)->execute = wilcoxon_execute;
+  struct npar_test *nt = &tp->parent;
+  nt->execute = wilcoxon_execute;
 
   if (!parse_two_sample_related_test (lexer, dataset_dict (ds), cmd,
                                      tp, specs->pool) )
@@ -522,7 +535,7 @@ npar_custom_wilcoxon (struct lexer *lexer,
   specs->test = pool_realloc (specs->pool,
                              specs->test,
                              sizeof(*specs->test) * specs->n_tests);
-  specs->test[specs->n_tests - 1] = (struct npar_test *) tp;
+  specs->test[specs->n_tests - 1] = nt;
 
   return 1;
 }
@@ -535,7 +548,8 @@ npar_custom_mcnemar (struct lexer *lexer,
   struct npar_specs *specs = aux;
 
   struct two_sample_test *tp = pool_alloc(specs->pool, sizeof(*tp));
-  ((struct npar_test *)tp)->execute = NULL;
+  struct npar_test *nt = &tp->parent;
+  nt->execute = NULL;
 
 
   if (!parse_two_sample_related_test (lexer, dataset_dict (ds),
@@ -546,7 +560,7 @@ npar_custom_mcnemar (struct lexer *lexer,
   specs->test = pool_realloc (specs->pool,
                              specs->test,
                              sizeof(*specs->test) * specs->n_tests);
-  specs->test[specs->n_tests - 1] = (struct npar_test *) tp;
+  specs->test[specs->n_tests - 1] = nt;
 
   return 1;
 }
@@ -558,7 +572,9 @@ npar_custom_sign (struct lexer *lexer, struct dataset *ds,
   struct npar_specs *specs = aux;
 
   struct two_sample_test *tp = pool_alloc(specs->pool, sizeof(*tp));
-  ((struct npar_test *) tp)->execute = sign_execute;
+  struct npar_test *nt = &tp->parent;
+
+  nt->execute = sign_execute;
 
   if (!parse_two_sample_related_test (lexer, dataset_dict (ds), cmd,
                                      tp, specs->pool) )
@@ -568,7 +584,7 @@ npar_custom_sign (struct lexer *lexer, struct dataset *ds,
   specs->test = pool_realloc (specs->pool,
                              specs->test,
                              sizeof(*specs->test) * specs->n_tests);
-  specs->test[specs->n_tests - 1] = (struct npar_test *) tp;
+  specs->test[specs->n_tests - 1] = nt;
 
   return 1;
 }
@@ -579,7 +595,7 @@ one_sample_insert_variables (const struct npar_test *test,
                             struct const_hsh_table *var_hash)
 {
   int i;
-  struct one_sample_test *ost = (struct one_sample_test *) test;
+  struct one_sample_test *ost = UP_CAST (test, struct one_sample_test, parent);
 
   for ( i = 0 ; i < ost->n_vars ; ++i )
     const_hsh_insert (var_hash, ost->vars[i]);
index 0f6b20a1db04cdf9503e4a21cd67cb2f22ecf6bf..2d55edff73fb286597a7be6771b467a9c4b6422c 100644 (file)
@@ -40,8 +40,7 @@
 #include <math/group-proc.h>
 #include <math/group.h>
 #include <math/levene.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/tab.h>
 #include "sort-criteria.h"
 #include <data/format.h>
 
@@ -259,10 +258,8 @@ show_anova_table (void)
   struct tab_table *t;
 
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 2, 0, 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
-
 
   tab_box (t,
           TAL_2, TAL_2,
@@ -370,9 +367,8 @@ show_descriptives (const struct dictionary *dict)
   for ( v = 0; v < n_vars; ++v )
     n_rows += group_proc_get (vars[v])->n_groups + 1;
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 2, 0, 2, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
 
 
   /* Put a frame around the entire box, and vertical lines inside */
@@ -517,9 +513,9 @@ show_homogeneity (void)
   struct tab_table *t;
 
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 1, 0, 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
+
 
   /* Put a frame around the entire box, and vertical lines inside */
   tab_box (t,
@@ -577,9 +573,8 @@ show_contrast_coeffs (short *bad_contrast)
 
   struct tab_table *t;
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 2, 0, 2, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
 
   /* Put a frame around the entire box, and vertical lines inside */
   tab_box (t,
@@ -661,9 +656,8 @@ show_contrast_tests (short *bad_contrast)
 
   struct tab_table *t;
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 3, 0, 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
 
   /* Put a frame around the entire box, and vertical lines inside */
   tab_box (t,
index c225370e459269cc572430f87e533f7a591662c4..ec3052c0acee616def219464aa7bf19edfec4550 100644 (file)
@@ -35,8 +35,7 @@
 #include <libpspp/compiler.h>
 #include <libpspp/taint.h>
 #include <math/sort.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include <gsl/gsl_cdf.h>
 
@@ -692,7 +691,7 @@ cmd_rank (struct lexer *lexer, struct dataset *ds)
       int v;
 
       tab_output_text (0, _("Variables Created By RANK"));
-      tab_output_text (0, "\n");
+      tab_output_text (0, "");
 
       for (i = 0 ; i <  n_rank_specs ; ++i )
        {
index c27d8a40a7e1eb0314d5d8c088d86ec5988d88c1..c7e8179a579086620064f53e0bd6bb5eace213ce 100644 (file)
@@ -24,7 +24,6 @@
 #include <data/case.h>
 #include <data/casegrouper.h>
 #include <data/casereader.h>
-#include <data/category.h>
 #include <data/dictionary.h>
 #include <data/missing-values.h>
 #include <data/procedure.h>
@@ -41,7 +40,7 @@
 #include <math/covariance.h>
 #include <math/linreg.h>
 #include <math/moments.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include "xalloc.h"
 
@@ -147,8 +146,7 @@ reg_stats_r (linreg *c, void *aux UNUSED)
   rsq = linreg_ssreg (c) / linreg_sst (c);
   adjrsq = 1.0 - (1.0 - rsq) * (linreg_n_obs (c) - 1.0) / (linreg_n_obs (c) - linreg_n_coeffs (c));
   std_error = sqrt (linreg_mse (c));
-  t = tab_create (n_cols, n_rows, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
+  t = tab_create (n_cols, n_rows);
   tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1);
   tab_hline (t, TAL_2, 0, n_cols - 1, 1);
   tab_vline (t, TAL_2, 2, 0, n_rows - 1);
@@ -184,14 +182,13 @@ reg_stats_coeff (linreg * c, void *aux_)
 
   const struct variable *v;
   struct tab_table *t;
+  gsl_matrix *cov = aux_;
 
   assert (c != NULL);
-  gsl_matrix *cov = (gsl_matrix *) aux_;
   n_rows = linreg_n_coeffs (c) + 3;
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 2, 0, 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
   tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1);
   tab_hline (t, TAL_2, 0, n_cols - 1, 1);
   tab_vline (t, TAL_2, 2, 0, n_rows - 1);
@@ -274,9 +271,8 @@ reg_stats_anova (linreg * c, void *aux UNUSED)
   struct tab_table *t;
 
   assert (c != NULL);
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 2, 0, 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
 
   tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1);
 
@@ -365,9 +361,8 @@ reg_stats_bcov (linreg * c, void *aux UNUSED)
   assert (c != NULL);
   n_cols = c->n_indeps + 1 + 2;
   n_rows = 2 * (c->n_indeps + 1);
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 2, 0, 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL);
   tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1);
   tab_hline (t, TAL_2, 0, n_cols - 1, 1);
   tab_vline (t, TAL_2, 2, 0, n_rows - 1);
index 681669d18999fdac3c5516c9815b9079aae99dfb..7eb20807ff645111b17353122a302ddcd431294f 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,8 +27,8 @@
 #include <language/command.h>
 #include <libpspp/misc.h>
 #include <math/moments.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/tab.h>
+#include <output/text-item.h>
 
 #include "xalloc.h"
 #include "xmalloca.h"
@@ -379,18 +379,8 @@ run_reliability (struct casereader *input, struct dataset *ds,
        alpha (s->n_items, s->sum_of_variances, s->variance_of_sums);
     }
 
-
-  {
-    struct tab_table *tab = tab_create(1, 1, 0);
-
-    tab_dim (tab, tab_natural_dimensions, NULL);
-    tab_flags (tab, SOMF_NO_TITLE );
-
-    tab_text_format (tab, 0, 0, 0, "Scale: %s", ds_cstr (&rel->scale_name));
-
-    tab_submit(tab);
-  }
-
+  text_item_submit (text_item_create_format (TEXT_ITEM_PARAGRAPH, "Scale: %s",
+                                             ds_cstr (&rel->scale_name)));
 
   case_processing_summary (n_valid, n_missing, dataset_dict (ds));
 }
@@ -425,11 +415,9 @@ reliability_statistics (const struct reliability *rel)
   int heading_columns = rol[rel->model].heading_cols;
   int heading_rows = rol[rel->model].heading_rows;
 
-  struct tab_table *tbl = tab_create (n_cols, n_rows, 0);
+  struct tab_table *tbl = tab_create (n_cols, n_rows);
   tab_headers (tbl, heading_columns, 0, heading_rows, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
-
   tab_title (tbl, _("Reliability Statistics"));
 
   /* Vertical lines for the data only */
@@ -468,11 +456,9 @@ reliability_summary_total (const struct reliability *rel)
   const int heading_rows = 1;
   const int n_rows = rel->sc[0].n_items + heading_rows ;
 
-  struct tab_table *tbl = tab_create (n_cols, n_rows, 0);
+  struct tab_table *tbl = tab_create (n_cols, n_rows);
   tab_headers (tbl, heading_columns, 0, heading_rows, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
-
   tab_title (tbl, _("Item-Total Statistics"));
 
   /* Vertical lines for the data only */
@@ -557,7 +543,7 @@ reliability_statistics_model_alpha (struct tab_table *tbl,
                _("Cronbach's Alpha"));
 
   tab_text (tbl, 1, 0, TAB_CENTER | TAT_TITLE,
-               _("N of items"));
+               _("N of Items"));
 
   tab_double (tbl, 0, 1, TAB_RIGHT, s->alpha, NULL);
 
@@ -678,11 +664,9 @@ case_processing_summary (casenumber n_valid, casenumber n_missing,
   int heading_columns = 2;
   int heading_rows = 1;
   struct tab_table *tbl;
-  tbl = tab_create (n_cols, n_rows, 0);
+  tbl = tab_create (n_cols, n_rows);
   tab_headers (tbl, heading_columns, 0, heading_rows, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
-
   tab_title (tbl, _("Case Processing Summary"));
 
   /* Vertical lines for the data only */
index 1d61a55c57a3cad25c834c204c3571632d9df778..724bc523a3beef42df39ca5b801da5918f88d398 100644 (file)
 
 #include <config.h>
 
-#include <data/procedure.h>
-#include <language/lexer/variable-parser.h>
-#include <language/lexer/value-parser.h>
-#include <language/command.h>
-#include <language/lexer/lexer.h>
+#include <language/stats/roc.h>
 
 #include <data/casegrouper.h>
 #include <data/casereader.h>
 #include <data/casewriter.h>
 #include <data/dictionary.h>
 #include <data/format.h>
-#include <math/sort.h>
+#include <data/procedure.h>
 #include <data/subcase.h>
-
-
+#include <language/command.h>
+#include <language/lexer/lexer.h>
+#include <language/lexer/value-parser.h>
+#include <language/lexer/variable-parser.h>
 #include <libpspp/misc.h>
+#include <math/sort.h>
+#include <output/chart-item.h>
+#include <output/charts/roc-chart.h>
+#include <output/tab.h>
 
 #include <gsl/gsl_cdf.h>
-#include <output/table.h>
-
-#include <output/charts/plot-chart.h>
-#include <output/charts/cartesian.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -112,6 +110,7 @@ cmd_roc (struct lexer *lexer, struct dataset *ds)
       goto error;
     }
 
+  value_init (&roc.state_value, var_get_width (roc.state_var));
   parse_value (lexer, &roc.state_value, var_get_width (roc.state_var));
 
 
@@ -271,10 +270,12 @@ cmd_roc (struct lexer *lexer, struct dataset *ds)
   if ( ! run_roc (ds, &roc)) 
     goto error;
 
+  value_destroy (&roc.state_value, var_get_width (roc.state_var));
   free (roc.vars);
   return CMD_SUCCESS;
 
  error:
+  value_destroy (&roc.state_value, var_get_width (roc.state_var));
   free (roc.vars);
   return CMD_FAILURE;
 }
@@ -383,13 +384,6 @@ struct roc_state
   double max;
 };
 
-#define CUTPOINT 0
-#define TP 1
-#define FN 2
-#define TN 3
-#define FP 4
-
-
 /* 
    Return a new casereader based upon CUTPOINT_RDR.
    The number of "positive" cases are placed into
@@ -415,7 +409,7 @@ accumulate_counts (struct casereader *cutpoint_rdr,
   for ( ; (cpc = casereader_read (r) ); case_unref (cpc))
     {
       struct ccase *new_case;
-      const double cp = case_data_idx (cpc, CUTPOINT)->f;
+      const double cp = case_data_idx (cpc, ROC_CUTPOINT)->f;
 
       assert (cp != SYSMIS);
 
@@ -579,7 +573,7 @@ process_positive_group (const struct variable *var, struct casereader *reader,
   return process_group (var, reader, gt, dict, &rs->n1,
                        &rs->cutpoint_rdr,
                        ge,
-                       TP, FN);
+                       ROC_TP, ROC_FN);
 }
 
 /*
@@ -597,7 +591,7 @@ process_negative_group (const struct variable *var, struct casereader *reader,
   return process_group (var, reader, lt, dict, &rs->n2,
                        &rs->cutpoint_rdr,
                        lt,
-                       TN, FP);
+                       ROC_TN, ROC_FP);
 }
 
 
@@ -608,11 +602,11 @@ append_cutpoint (struct casewriter *writer, double cutpoint)
 {
   struct ccase *cc = case_create (casewriter_get_proto (writer));
 
-  case_data_rw_idx (cc, CUTPOINT)->f = cutpoint;
-  case_data_rw_idx (cc, TP)->f = 0;
-  case_data_rw_idx (cc, FN)->f = 0;
-  case_data_rw_idx (cc, TN)->f = 0;
-  case_data_rw_idx (cc, FP)->f = 0;
+  case_data_rw_idx (cc, ROC_CUTPOINT)->f = cutpoint;
+  case_data_rw_idx (cc, ROC_TP)->f = 0;
+  case_data_rw_idx (cc, ROC_FN)->f = 0;
+  case_data_rw_idx (cc, ROC_TN)->f = 0;
+  case_data_rw_idx (cc, ROC_FP)->f = 0;
 
   casewriter_write (writer, cc);
 }
@@ -620,9 +614,9 @@ append_cutpoint (struct casewriter *writer, double cutpoint)
 
 /* 
    Create and initialise the rs[x].cutpoint_rdr casereaders.  That is, the readers will
-   be created with width 5, ready to take the values (cutpoint, TP, FN, TN, FP), and the
+   be created with width 5, ready to take the values (cutpoint, ROC_TP, ROC_FN, ROC_TN, ROC_FP), and the
    reader will be populated with its final number of cases.
-   However on exit from this function, only CUTPOINT entries will be set to their final
+   However on exit from this function, only ROC_CUTPOINT entries will be set to their final
    value.  The other entries will be initialised to zero.
 */
 static void
@@ -634,13 +628,13 @@ prepare_cutpoints (struct cmd_roc *roc, struct roc_state *rs, struct casereader
   struct caseproto *proto = caseproto_create ();
 
   struct subcase ordering;
-  subcase_init (&ordering, CUTPOINT, 0, SC_ASCEND);
+  subcase_init (&ordering, ROC_CUTPOINT, 0, SC_ASCEND);
 
   proto = caseproto_add_width (proto, 0); /* cutpoint */
-  proto = caseproto_add_width (proto, 0); /* TP */
-  proto = caseproto_add_width (proto, 0); /* FN */
-  proto = caseproto_add_width (proto, 0); /* TN */
-  proto = caseproto_add_width (proto, 0); /* FP */
+  proto = caseproto_add_width (proto, 0); /* ROC_TP */
+  proto = caseproto_add_width (proto, 0); /* ROC_FN */
+  proto = caseproto_add_width (proto, 0); /* ROC_TN */
+  proto = caseproto_add_width (proto, 0); /* ROC_FP */
 
   for (i = 0 ; i < roc->n_vars; ++i)
     {
@@ -932,7 +926,7 @@ show_auc  (struct roc_state *rs, const struct cmd_roc *roc)
   const int n_fields = roc->print_se ? 5 : 1;
   const int n_cols = roc->n_vars > 1 ? n_fields + 1: n_fields;
   const int n_rows = 2 + roc->n_vars;
-  struct tab_table *tbl = tab_create (n_cols, n_rows, 0);
+  struct tab_table *tbl = tab_create (n_cols, n_rows);
 
   if ( roc->n_vars > 1)
     tab_title (tbl, _("Area Under the Curve"));
@@ -941,7 +935,6 @@ show_auc  (struct roc_state *rs, const struct cmd_roc *roc)
 
   tab_headers (tbl, n_cols - n_fields, 0, 1, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
 
   tab_text (tbl, n_cols - n_fields, 1, TAT_TITLE, _("Area"));
 
@@ -1027,14 +1020,12 @@ show_summary (const struct cmd_roc *roc)
 {
   const int n_cols = 3;
   const int n_rows = 4;
-  struct tab_table *tbl = tab_create (n_cols, n_rows, 0);
+  struct tab_table *tbl = tab_create (n_cols, n_rows);
 
   tab_title (tbl, _("Case Summary"));
 
   tab_headers (tbl, 1, 0, 2, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
-
   tab_box (tbl,
           TAL_2, TAL_2,
           -1, -1,
@@ -1085,7 +1076,7 @@ show_coords (struct roc_state *rs, const struct cmd_roc *roc)
   for (i = 0; i < roc->n_vars; ++i)
     n_rows += casereader_count_cases (rs[i].cutpoint_rdr);
 
-  tbl = tab_create (n_cols, n_rows, 0);
+  tbl = tab_create (n_cols, n_rows);
 
   if ( roc->n_vars > 1)
     tab_title (tbl, _("Coordinates of the Curve"));
@@ -1095,8 +1086,6 @@ show_coords (struct roc_state *rs, const struct cmd_roc *roc)
 
   tab_headers (tbl, 1, 0, 1, 0);
 
-  tab_dim (tbl, tab_natural_dimensions, NULL);
-
   tab_hline (tbl, TAL_2, 0, n_cols - 1, 1);
 
   if ( roc->n_vars > 1)
@@ -1131,21 +1120,21 @@ show_coords (struct roc_state *rs, const struct cmd_roc *roc)
       for (; (cc = casereader_read (r)) != NULL;
           case_unref (cc), x++)
        {
-         const double se = case_data_idx (cc, TP)->f /
+         const double se = case_data_idx (cc, ROC_TP)->f /
            (
-            case_data_idx (cc, TP)->f
+            case_data_idx (cc, ROC_TP)->f
             +
-            case_data_idx (cc, FN)->f
+            case_data_idx (cc, ROC_FN)->f
             );
 
-         const double sp = case_data_idx (cc, TN)->f /
+         const double sp = case_data_idx (cc, ROC_TN)->f /
            (
-            case_data_idx (cc, TN)->f
+            case_data_idx (cc, ROC_TN)->f
             +
-            case_data_idx (cc, FP)->f
+            case_data_idx (cc, ROC_FP)->f
             );
 
-         tab_double (tbl, n_cols - 3, x, 0, case_data_idx (cc, CUTPOINT)->f,
+         tab_double (tbl, n_cols - 3, x, 0, case_data_idx (cc, ROC_CUTPOINT)->f,
                      var_get_print_format (roc->vars[i]));
 
          tab_double (tbl, n_cols - 2, x, 0, se, NULL);
@@ -1159,68 +1148,25 @@ show_coords (struct roc_state *rs, const struct cmd_roc *roc)
 }
 
 
-static void
-draw_roc (struct roc_state *rs, const struct cmd_roc *roc)
-{
-  int i;
-
-  struct chart *roc_chart = chart_create ();
-
-  chart_write_title (roc_chart, _("ROC Curve"));
-  chart_write_xlabel (roc_chart, _("1 - Specificity"));
-  chart_write_ylabel (roc_chart, _("Sensitivity"));
-
-  chart_write_xscale (roc_chart, 0, 1, 5);
-  chart_write_yscale (roc_chart, 0, 1, 5);
-
-  if ( roc->reference )
-    {
-      chart_line (roc_chart, 1.0, 0,
-                 0.0, 1.0,
-                 CHART_DIM_X);
-    }
-
-  for (i = 0; i < roc->n_vars; ++i)
-    {
-      struct ccase *cc;
-      struct casereader *r = casereader_clone (rs[i].cutpoint_rdr);
-
-      chart_vector_start (roc_chart, var_get_name (roc->vars[i]));
-      for (; (cc = casereader_read (r)) != NULL;
-          case_unref (cc))
-       {
-         double se = case_data_idx (cc, TP)->f;
-         double sp = case_data_idx (cc, TN)->f;
-
-         se /= case_data_idx (cc, FN)->f +
-           case_data_idx (cc, TP)->f ;
-
-         sp /= case_data_idx (cc, TN)->f +
-           case_data_idx (cc, FP)->f ;
-
-         chart_vector (roc_chart, 1 - sp, se);
-       }
-      chart_vector_end (roc_chart);
-      casereader_destroy (r);
-    }
-
-  chart_write_legend (roc_chart);
-
-  chart_submit (roc_chart);
-}
-
-
 static void
 output_roc (struct roc_state *rs, const struct cmd_roc *roc)
 {
   show_summary (roc);
 
   if ( roc->curve )
-    draw_roc (rs, roc);
+    {
+      struct roc_chart *rc;
+      size_t i;
+
+      rc = roc_chart_create (roc->reference);
+      for (i = 0; i < roc->n_vars; i++)
+        roc_chart_add_var (rc, var_get_name (roc->vars[i]),
+                           rs[i].cutpoint_rdr);
+      roc_chart_submit (rc);
+    }
 
   show_auc (rs, roc);
 
-
   if ( roc->print_coords )
     show_coords (rs, roc);
 }
diff --git a/src/language/stats/roc.h b/src/language/stats/roc.h
new file mode 100644 (file)
index 0000000..5d63c96
--- /dev/null
@@ -0,0 +1,28 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LANGUAGE_STATS_ROC_H
+#define LANGUAGE_STATS_ROC_H 1
+
+/* These are case indexes into the cutpoint case readers for ROC
+   output, used by roc.c and roc-chart.c. */
+#define ROC_CUTPOINT 0
+#define ROC_TP 1
+#define ROC_FN 2
+#define ROC_TN 3
+#define ROC_FP 4
+
+#endif /* language/stats/roc.h */
index a5a272126007c557a2c006b652d73cf7e9fe4436..754b0d7dfcd6b47c08d62f6f4db05ab8a6e90812 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <data/variable.h>
 #include <libpspp/str.h>
-#include <output/table.h>
+#include <output/tab.h>
 #include <gsl/gsl_cdf.h>
 #include <gsl/gsl_randist.h>
 #include "npar.h"
@@ -52,24 +52,22 @@ output_frequency_table (const struct two_sample_test *t2s,
                        const struct dictionary *dict)
 {
   int i;
-  struct tab_table *table = tab_create (3, 1 + 4 * t2s->n_pairs, 0);
+  struct tab_table *table = tab_create (3, 1 + 4 * t2s->n_pairs);
 
   const struct variable *wv = dict_get_weight (dict);
   const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0;
 
-  tab_dim (table, tab_natural_dimensions, NULL);
-
   tab_title (table, _("Frequencies"));
 
   tab_headers (table, 2, 0, 1, 0);
 
   /* Vertical lines inside the box */
   tab_box (table, 0, 0, -1, TAL_1,
-          1, 0, table->nc - 1, tab_nr (table) - 1 );
+          1, 0, tab_nc (table) - 1, tab_nr (table) - 1 );
 
   /* Box around entire table */
   tab_box (table, TAL_2, TAL_2, -1, -1,
-          0, 0, table->nc - 1, tab_nr (table) - 1 );
+          0, 0, tab_nc (table) - 1, tab_nr (table) - 1 );
 
   tab_text (table,  2, 0,  TAB_CENTER, _("N"));
 
@@ -86,7 +84,7 @@ output_frequency_table (const struct two_sample_test *t2s,
 
       ds_destroy (&pair_name);
 
-      tab_hline (table, TAL_1, 0, table->nc - 1, 1 + i * 4);
+      tab_hline (table, TAL_1, 0, tab_nc (table) - 1, 1 + i * 4);
 
       tab_text (table,  1, 1 + i * 4,  TAB_LEFT, _("Negative Differences"));
       tab_text (table,  1, 2 + i * 4,  TAB_LEFT, _("Positive Differences"));
@@ -108,26 +106,24 @@ output_statistics_table (const struct two_sample_test *t2s,
                         const struct sign_test_params *param)
 {
   int i;
-  struct tab_table *table = tab_create (1 + t2s->n_pairs, 4, 0);
-
-  tab_dim (table, tab_natural_dimensions, NULL);
+  struct tab_table *table = tab_create (1 + t2s->n_pairs, 4);
 
   tab_title (table, _("Test Statistics"));
 
   tab_headers (table, 0, 1,  0, 1);
 
-  tab_hline (table, TAL_2, 0, table->nc - 1, 1);
-  tab_vline (table, TAL_2, 1, 0, table->nr - 1);
+  tab_hline (table, TAL_2, 0, tab_nc (table) - 1, 1);
+  tab_vline (table, TAL_2, 1, 0, tab_nr (table) - 1);
 
 
   /* Vertical lines inside the box */
   tab_box (table, -1, -1, -1, TAL_1,
           0, 0,
-          table->nc - 1, tab_nr (table) - 1);
+          tab_nc (table) - 1, tab_nr (table) - 1);
 
   /* Box around entire table */
   tab_box (table, TAL_2, TAL_2, -1, -1,
-          0, 0, table->nc - 1,
+          0, 0, tab_nc (table) - 1,
           tab_nr (table) - 1);
 
   tab_text (table,  0, 1, TAT_TITLE | TAB_LEFT,
index c448d52ea035c3d163bef9bf343a8d6b9609f904..8aee3b157992827fa9021c876b39822809ab43b2 100644 (file)
@@ -43,8 +43,8 @@
 #include <libpspp/taint.h>
 #include <math/group-proc.h>
 #include <math/levene.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <math/correlation.h>
+#include <output/tab.h>
 #include <data/format.h>
 
 #include "minmax.h"
@@ -476,13 +476,11 @@ static void
 ssbox_base_init (struct ssbox *this, int cols, int rows)
 {
   this->finalize = ssbox_base_finalize;
-  this->t = tab_create (cols, rows, 0);
+  this->t = tab_create (cols, rows);
 
-  tab_columns (this->t, SOM_COL_DOWN, 1);
   tab_headers (this->t, 0, 0, 1, 0);
   tab_box (this->t, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, cols - 1, rows - 1);
   tab_hline (this->t, TAL_2, 0, cols- 1, 1);
-  tab_dim (this->t, tab_natural_dimensions, NULL);
 }
 \f
 /* ssbox implementations. */
@@ -1068,11 +1066,10 @@ trbox_base_init (struct trbox *self, size_t data_rows, int cols)
   const size_t rows = 3 + data_rows;
 
   self->finalize = trbox_base_finalize;
-  self->t = tab_create (cols, rows, 0);
+  self->t = tab_create (cols, rows);
   tab_headers (self->t, 0, 0, 3, 0);
   tab_box (self->t, TAL_2, TAL_2, TAL_0, TAL_0, 0, 0, cols - 1, rows - 1);
   tab_hline (self->t, TAL_2, 0, cols- 1, 3);
-  tab_dim (self->t, tab_natural_dimensions, NULL);
 }
 
 /* Base finalizer for the trbox */
@@ -1092,14 +1089,12 @@ pscbox (struct t_test_proc *proc)
 
   struct tab_table *table;
 
-  table = tab_create (cols, rows, 0);
+  table = tab_create (cols, rows);
 
-  tab_columns (table, SOM_COL_DOWN, 1);
   tab_headers (table, 0, 0, 1, 0);
   tab_box (table, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, cols - 1, rows - 1);
   tab_hline (table, TAL_2, 0, cols - 1, 1);
   tab_vline (table, TAL_2, 2, 0, rows - 1);
-  tab_dim (table, tab_natural_dimensions, NULL);
   tab_title (table, _("Paired Samples Correlations"));
 
   /* column headings */
@@ -1110,14 +1105,6 @@ pscbox (struct t_test_proc *proc)
   for (i = 0; i < proc->n_pairs; i++)
     {
       struct pair *pair = &proc->pairs[i];
-      double df = pair->n - 2;
-      double p, q;
-
-      /* corr2 will mathematically always be in the range [0, 1.0].  Inaccurate
-         calculations sometimes cause it to be slightly greater than 1.0, so
-         force it into the correct range to avoid NaN from sqrt(). */
-      double corr2 = MIN (1.0, pow2 (pair->correlation));
-      double correlation_t = pair->correlation * sqrt (df) / sqrt (1 - corr2);
 
       /* row headings */
       tab_text_format (table, 0, i + 1, TAB_LEFT | TAT_TITLE,
@@ -1131,10 +1118,8 @@ pscbox (struct t_test_proc *proc)
       tab_double (table, 2, i + 1, TAB_RIGHT, pair->n, &proc->weight_format);
       tab_double (table, 3, i + 1, TAB_RIGHT, pair->correlation, NULL);
 
-      p = gsl_cdf_tdist_P (correlation_t, df);
-      q = gsl_cdf_tdist_Q (correlation_t, df);
-      tab_double (table, 4, i + 1, TAB_RIGHT,
-                 2.0 * (correlation_t > 0 ? q : p), NULL);
+      tab_double (table, 4, i + 1, TAB_RIGHT, 
+                 2.0 * significance_of_correlation (pair->correlation, pair->n), NULL);
     }
 
   tab_submit (table);
index 310206c0e7bf88961e820c05f97831f8568da5a6..197124cf6025fbe001a1763360307b80d5ddbda0 100644 (file)
@@ -1,5 +1,5 @@
 /* Pspp - a program for statistical analysis.
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@
 #include <libpspp/misc.h>
 #include <math/sort.h>
 #include <math/wilcoxon-sig.h>
-#include <output/table.h>
+#include <output/tab.h>
 #include <signal.h>
 #include <unistd.h>
 
@@ -88,7 +88,7 @@ wilcoxon_execute (const struct dataset *ds,
 
   struct wilcoxon_state *ws = xcalloc (sizeof (*ws), t2s->n_pairs);
   const struct variable *weight = dict_get_weight (dict);
-  struct variable *weightx = var_create_internal (WEIGHT_IDX, 0);
+  struct variable *weightx = dict_create_internal_var (WEIGHT_IDX, 0);
   struct caseproto *proto;
 
   input =
@@ -108,8 +108,8 @@ wilcoxon_execute (const struct dataset *ds,
       struct subcase ordering;
       variable_pair *vp = &t2s->pairs[i];
 
-      ws[i].sign = var_create_internal (0, 0);
-      ws[i].absdiff = var_create_internal (1, 0);
+      ws[i].sign = dict_create_internal_var (0, 0);
+      ws[i].absdiff = dict_create_internal_var (1, 0);
 
       r = casereader_create_filter_missing (r, *vp, 2,
                                            exclude,
@@ -195,15 +195,15 @@ wilcoxon_execute (const struct dataset *ds,
 
   casereader_destroy (input);
 
-  var_destroy (weightx);
+  dict_destroy_internal_var (weightx);
 
   show_ranks_box (ws, t2s, dict);
   show_tests_box (ws, t2s, exact, timer);
 
   for (i = 0 ; i < t2s->n_pairs; ++i )
     {
-      var_destroy (ws[i].sign);
-      var_destroy (ws[i].absdiff);
+      dict_destroy_internal_var (ws[i].sign);
+      dict_destroy_internal_var (ws[i].absdiff);
     }
 
   free (ws);
@@ -225,9 +225,7 @@ show_ranks_box (const struct wilcoxon_state *ws,
   const struct variable *wv = dict_get_weight (dict);
   const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0;
 
-  struct tab_table *table = tab_create (5, 1 + 4 * t2s->n_pairs, 0);
-
-  tab_dim (table, tab_natural_dimensions, NULL);
+  struct tab_table *table = tab_create (5, 1 + 4 * t2s->n_pairs);
 
   tab_title (table, _("Ranks"));
 
@@ -235,11 +233,11 @@ show_ranks_box (const struct wilcoxon_state *ws,
 
   /* Vertical lines inside the box */
   tab_box (table, 0, 0, -1, TAL_1,
-          1, 0, table->nc - 1, tab_nr (table) - 1 );
+          1, 0, tab_nc (table) - 1, tab_nr (table) - 1 );
 
   /* Box around entire table */
   tab_box (table, TAL_2, TAL_2, -1, -1,
-          0, 0, table->nc - 1, tab_nr (table) - 1 );
+          0, 0, tab_nc (table) - 1, tab_nr (table) - 1 );
 
 
   tab_text (table,  2, 0,  TAB_CENTER, _("N"));
@@ -261,7 +259,7 @@ show_ranks_box (const struct wilcoxon_state *ws,
       tab_text (table, 1, 3 + i * 4, TAB_LEFT, _("Ties"));
       tab_text (table, 1, 4 + i * 4, TAB_LEFT, _("Total"));
 
-      tab_hline (table, TAL_1, 0, table->nc - 1, 1 + i * 4);
+      tab_hline (table, TAL_1, 0, tab_nc (table) - 1, 1 + i * 4);
 
 
       tab_text (table, 0, 1 + i * 4, TAB_LEFT, ds_cstr (&pair_name));
@@ -290,8 +288,8 @@ show_ranks_box (const struct wilcoxon_state *ws,
 
     }
 
-  tab_hline (table, TAL_2, 0, table->nc - 1, 1);
-  tab_vline (table, TAL_2, 2, 0, table->nr - 1);
+  tab_hline (table, TAL_2, 0, tab_nc (table) - 1, 1);
+  tab_vline (table, TAL_2, 2, 0, tab_nr (table) - 1);
 
 
   tab_submit (table);
@@ -306,9 +304,7 @@ show_tests_box (const struct wilcoxon_state *ws,
                )
 {
   size_t i;
-  struct tab_table *table = tab_create (1 + t2s->n_pairs, exact ? 5 : 3, 0);
-
-  tab_dim (table, tab_natural_dimensions, NULL);
+  struct tab_table *table = tab_create (1 + t2s->n_pairs, exact ? 5 : 3);
 
   tab_title (table, _("Test Statistics"));
 
@@ -316,11 +312,11 @@ show_tests_box (const struct wilcoxon_state *ws,
 
   /* Vertical lines inside the box */
   tab_box (table, 0, 0, -1, TAL_1,
-          0, 0, table->nc - 1, tab_nr (table) - 1 );
+          0, 0, tab_nc (table) - 1, tab_nr (table) - 1 );
 
   /* Box around entire table */
   tab_box (table, TAL_2, TAL_2, -1, -1,
-          0, 0, table->nc - 1, tab_nr (table) - 1 );
+          0, 0, tab_nc (table) - 1, tab_nr (table) - 1 );
 
 
   tab_text (table,  0, 1,  TAB_LEFT, _("Z"));
@@ -377,8 +373,8 @@ show_tests_box (const struct wilcoxon_state *ws,
        }
     }
 
-  tab_hline (table, TAL_2, 0, table->nc - 1, 1);
-  tab_vline (table, TAL_2, 1, 0, table->nr - 1);
+  tab_hline (table, TAL_2, 0, tab_nc (table) - 1, 1);
+  tab_vline (table, TAL_2, 1, 0, tab_nr (table) - 1);
 
 
   tab_submit (table);
index 0771ade3a9e92dccc0c3063a7c14d13014c010e3..5521972477f270a1a046b9a99f5b0b3e5a117f69 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <language/command.h>
 #include <language/lexer/lexer.h>
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 #include <libpspp/message.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
-#include <libpspp/verbose-msg.h>
 #include <libpspp/version.h>
-#include <output/table.h>
+#include <output/tab.h>
 
 #include <libpspp/ll.h>
 
@@ -62,14 +62,16 @@ struct syntax_file_source
 static const char *
 name (const struct getl_interface *s)
 {
-  const struct syntax_file_source *sfs = (const struct syntax_file_source *) s;
+  const struct syntax_file_source *sfs = UP_CAST (s, struct syntax_file_source,
+                                                  parent);
   return sfs->fn;
 }
 
 static int
 line_number (const struct getl_interface *s)
 {
-  const struct syntax_file_source *sfs = (const struct syntax_file_source *) s;
+  const struct syntax_file_source *sfs = UP_CAST (s, struct syntax_file_source,
+                                                  parent);
   return sfs->ln;
 }
 
@@ -80,12 +82,12 @@ static bool
 read_syntax_file (struct getl_interface *s,
                   struct string *line)
 {
-  struct syntax_file_source *sfs = (struct syntax_file_source *) s;
+  struct syntax_file_source *sfs = UP_CAST (s, struct syntax_file_source,
+                                            parent);
 
   /* Open file, if not yet opened. */
   if (sfs->syntax_file == NULL)
     {
-      verbose_msg (1, _("opening \"%s\" as syntax file"), sfs->fn);
       sfs->syntax_file = fn_open (sfs->fn, "r");
 
       if (sfs->syntax_file == NULL)
@@ -111,17 +113,14 @@ read_syntax_file (struct getl_interface *s,
     }
   while (sfs->ln == 1 && !memcmp (ds_cstr (line), "#!", 2));
 
-  /* Echo to listing file, if configured to do so. */
-  if (settings_get_echo ())
-    tab_output_text (TAB_LEFT | TAB_FIX, ds_cstr (line));
-
   return true;
 }
 
 static void
 syntax_close (struct getl_interface *s)
 {
-  struct syntax_file_source *sfs = (struct syntax_file_source *) s;
+  struct syntax_file_source *sfs = UP_CAST (s, struct syntax_file_source,
+                                            parent);
 
   if (sfs->syntax_file && EOF == fn_close (sfs->fn, sfs->syntax_file))
     msg (MW, _("Closing `%s': %s."), sfs->fn, strerror (errno));
@@ -151,6 +150,6 @@ create_syntax_file_source (const char *fn)
   ss->parent.name = name ;
   ss->parent.location = line_number;
 
-  return (struct getl_interface *) ss;
+  return &ss->parent;
 }
 
index 94a56f97aacb55ae642b3eac0290cd8531f2b2c3..405141cd50a7fd1734f387281b5b344d5a7e74f9 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical interface for PSPP.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
 
 #include <config.h>
 
+#include <libpspp/cast.h>
 #include <libpspp/getl.h>
 #include <libpspp/compiler.h>
 #include <libpspp/str.h>
@@ -60,7 +61,8 @@ location (const struct getl_interface *i UNUSED)
 static void
 do_close (struct getl_interface *i )
 {
-  struct syntax_string_source *sss = (struct syntax_string_source *) i;
+  struct syntax_string_source *sss = UP_CAST (i, struct syntax_string_source,
+                                              parent);
 
   ds_destroy (&sss->buffer);
 
@@ -73,7 +75,8 @@ static bool
 read_single_line (struct getl_interface *i,
                  struct string *line)
 {
-  struct syntax_string_source *sss = (struct syntax_string_source *) i;
+  struct syntax_string_source *sss = UP_CAST (i, struct syntax_string_source,
+                                              parent);
 
   size_t next;
 
@@ -120,7 +123,7 @@ create_syntax_string_source (const char *format, ...)
   sss->parent.location = location;
 
 
-  return (struct getl_interface *) sss;
+  return &sss->parent;
 }
 
 /* Return the syntax currently contained in S.
index d8c49a595c0250a30155080a5372c629a2da598f..5aea2c334f34f5157a7dbcd77d4fa0f4a478f6b7 100644 (file)
 #include <language/command.h>
 #include <language/lexer/lexer.h>
 #include <libpspp/assertion.h>
-#include <output/output.h>
+#include <libpspp/string-map.h>
+#include <output/measure.h>
 
 /* Executes the DEBUG PAPER SIZE command. */
 int
 cmd_debug_paper_size (struct lexer *lexer, struct dataset *ds UNUSED)
 {
+  const char *paper_size;
   int h, v;
 
   if (!lex_force_string (lexer))
     return CMD_FAILURE;
+  paper_size = ds_cstr (lex_tokstr (lexer));
 
-  printf ("\"%s\" => ", ds_cstr (lex_tokstr (lexer)));
-  if (outp_get_paper_size (ds_cstr (lex_tokstr (lexer)), &h, &v))
+  printf ("\"%s\" => ", paper_size);
+  if (measure_paper (paper_size, &h, &v))
     printf ("%.1f x %.1f in, %.0f x %.0f mm\n",
             h / 72000., v / 72000.,
             h / (72000 / 25.4), v / (72000 / 25.4));
index 19e9f9e54bf36b860b46f8d4681ce61660931b10..ebd6a990fc88e1c1c02a48a7562fd91d4fccdc32 100644 (file)
@@ -19,8 +19,7 @@
 #include <libpspp/str.h>
 #include <language/lexer/lexer.h>
 #include <language/command.h>
-#include <output/table.h>
-#include <output/manager.h>
+#include <output/tab.h>
 
 #include "xalloc.h"
 
@@ -33,10 +32,7 @@ cmd_echo (struct lexer *lexer, struct dataset *ds UNUSED)
   if (lex_token (lexer) != T_STRING)
     return CMD_FAILURE;
 
-  tab = tab_create(1, 1, 0);
-
-  tab_dim (tab, tab_natural_dimensions, NULL);
-  tab_flags (tab, SOMF_NO_TITLE );
+  tab = tab_create(1, 1);
 
   tab_text(tab, 0, 0, 0, ds_cstr (lex_tokstr (lexer)));
 
index fe98aeb87f3347b82b61853adc70360cee87f132..ceb78771d748fb6f18bb8cb79274a23421720eab 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
+
 #include <ctype.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
+
+#include <data/file-name.h>
 #include <language/command.h>
-#include <libpspp/message.h>
-#include <libpspp/getl.h>
-#include <language/syntax-file.h>
 #include <language/lexer/lexer.h>
+#include <language/syntax-file.h>
+#include <libpspp/getl.h>
+#include <libpspp/message.h>
 #include <libpspp/str.h>
-#include <data/file-name.h>
 
 #include "dirname.h"
 #include "xalloc.h"
index 5c2b571ec57a7df2a7f9203abe2d23d244e083c9..6a1d184f600f88d28723a409b5237ad1b30a3c7e 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -40,8 +40,8 @@
 #include <libpspp/message.h>
 #include <libpspp/i18n.h>
 #include <math/random.h>
+#include <output/driver.h>
 #include <output/journal.h>
-#include <output/output.h>
 
 #if HAVE_LIBTERMCAP
 #if HAVE_TERMCAP_H
@@ -72,13 +72,10 @@ int tgetnum (const char *);
      cpi=integer "x>0" "%s must be greater than 0";
      cprompt=string;
      decimal=dec:dot/comma;
-     disk=custom;
      dprompt=string;
-     echo=echo:on/off;
      endcmd=string "x==1" "one character long";
      epoch=custom;
-     errorbreak=errbrk:on/off;
-     errors=errors:terminal/listing/both/on/none/off;
+     errors=custom;
      format=custom;
      headers=headers:no/yes/blank;
      highres=hires:on/off;
@@ -88,11 +85,10 @@ int tgetnum (const char *);
      log=custom;
      length=custom;
      locale=custom;
-     listing=custom;
      lowres=lores:auto/on/off;
      lpi=integer "x>0" "%s must be greater than 0";
      menus=menus:standard/extended;
-     messages=messages:on/off/terminal/listing/both/on/none/off;
+     messages=custom;
      mexpand=mexp:on/off;
      miterate=integer "x>0" "%s must be greater than 0";
      mnest=integer "x>0" "%s must be greater than 0";
@@ -102,9 +98,9 @@ int tgetnum (const char *);
      mxmemory=integer;
      mxwarns=integer;
      nulline=null:on/off;
-     printback=prtbck:on/off;
+     printback=custom;
      prompt=string;
-     results=res:on/off/terminal/listing/both/on/none/off;
+     results=custom;
      rib=rib:msbfirst/lsbfirst/vax/native;
      rrb=rrb:native/isl/isb/idl/idb/vf/vd/vg/zs/zl;
      safer=safe:on;
@@ -162,24 +158,14 @@ cmd_set (struct lexer *lexer, struct dataset *ds)
   if (cmd.sbc_decimal)
     settings_set_decimal_char (cmd.dec == STC_DOT ? '.' : ',');
 
-  if (cmd.sbc_echo)
-    settings_set_echo (cmd.echo == STC_ON);
   if (cmd.sbc_endcmd)
     settings_set_endcmd (cmd.s_endcmd[0]);
-  if (cmd.sbc_errorbreak)
-    settings_set_errorbreak (cmd.errbrk == STC_ON);
-  if (cmd.sbc_errors)
-    {
-      bool both = cmd.errors == STC_BOTH || cmd.errors == STC_ON;
-      settings_set_error_routing_to_terminal (cmd.errors == STC_TERMINAL || both);
-      settings_set_error_routing_to_listing (cmd.errors == STC_LISTING || both);
-    }
   if (cmd.sbc_include)
     settings_set_include (cmd.inc == STC_ON);
   if (cmd.sbc_mxerrs)
-    settings_set_mxerrs (cmd.n_mxerrs[0]);
+    settings_set_max_messages (MSG_S_ERROR, cmd.n_mxerrs[0]);
   if (cmd.sbc_mxwarns)
-    settings_set_mxwarns (cmd.n_mxwarns[0]);
+    settings_set_max_messages (MSG_S_WARNING, cmd.n_mxwarns[0]);
   if (cmd.sbc_nulline)
     settings_set_nulline (cmd.null == STC_ON);
   if (cmd.sbc_rib)
@@ -280,7 +266,30 @@ stc_to_float_format (int stc)
   NOT_REACHED ();
 }
 
+static int
+set_output_routing (struct lexer *lexer, enum settings_output_type type)
+{
+  enum settings_output_devices devices;
+
+  lex_match (lexer, '=');
+  if (lex_match_id (lexer, "ON") || lex_match_id (lexer, "BOTH"))
+    devices = SETTINGS_DEVICE_LISTING | SETTINGS_DEVICE_TERMINAL;
+  else if (lex_match_id (lexer, "TERMINAL"))
+    devices = SETTINGS_DEVICE_TERMINAL;
+  else if (lex_match_id (lexer, "LISTING"))
+    devices = SETTINGS_DEVICE_LISTING;
+  else if (lex_match_id (lexer, "OFF") || lex_match_id (lexer, "NONE"))
+    devices = 0;
+  else
+    {
+      lex_error (lexer, NULL);
+      return 0;
+    }
+
+  settings_set_output_routing (type, devices);
 
+  return 1;
+}
 
 /* Parses the BLANKS subcommand, which controls the value that
    completely blank fields in numeric data imply.  X, Wnd: Syntax is
@@ -336,6 +345,13 @@ stc_custom_epoch (struct lexer *lexer,
   return 1;
 }
 
+static int
+stc_custom_errors (struct lexer *lexer, struct dataset *ds UNUSED,
+                   struct cmd_set *cmd UNUSED, void *aux UNUSED)
+{
+  return set_output_routing (lexer, SETTINGS_OUTPUT_ERROR);
+}
+
 static int
 stc_custom_length (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED)
 {
@@ -396,7 +412,26 @@ stc_custom_locale (struct lexer *lexer, struct dataset *ds UNUSED,
   return 1;
 }
 
+static int
+stc_custom_messages (struct lexer *lexer, struct dataset *ds UNUSED,
+                   struct cmd_set *cmd UNUSED, void *aux UNUSED)
+{
+  return set_output_routing (lexer, SETTINGS_OUTPUT_NOTE);
+}
+
+static int
+stc_custom_printback (struct lexer *lexer, struct dataset *ds UNUSED,
+                      struct cmd_set *cmd UNUSED, void *aux UNUSED)
+{
+  return set_output_routing (lexer, SETTINGS_OUTPUT_SYNTAX);
+}
 
+static int
+stc_custom_results (struct lexer *lexer, struct dataset *ds UNUSED,
+                    struct cmd_set *cmd UNUSED, void *aux UNUSED)
+{
+  return set_output_routing (lexer, SETTINGS_OUTPUT_RESULT);
+}
 
 static int
 stc_custom_seed (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED)
@@ -488,33 +523,24 @@ stc_custom_log (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *
 {
   return stc_custom_journal (lexer, ds, cmd, aux);
 }
-
-static int
-stc_custom_listing (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED)
+\f
+static char *
+show_output_routing (enum settings_output_type type)
 {
-  bool listing;
+  enum settings_output_devices devices;
+  const char *s;
 
-  lex_match (lexer, '=');
-  if (lex_match_id (lexer, "ON") || lex_match_id (lexer, "YES"))
-    listing = true;
-  else if (lex_match_id (lexer, "OFF") || lex_match_id (lexer, "NO"))
-    listing = false;
+  devices = settings_get_output_routing (type);
+  if (devices & SETTINGS_DEVICE_LISTING)
+    s = devices & SETTINGS_DEVICE_TERMINAL ? "BOTH" : "LISTING";
+  else if (devices & SETTINGS_DEVICE_TERMINAL)
+    s = "TERMINAL";
   else
-    {
-      /* FIXME */
-      return 0;
-    }
-  outp_enable_device (listing, OUTP_DEV_LISTING);
+    s = "NONE";
 
-  return 1;
+  return xstrdup (s);
 }
 
-static int
-stc_custom_disk (struct lexer *lexer, struct dataset *ds, struct cmd_set *cmd UNUSED, void *aux)
-{
-  return stc_custom_listing (lexer, ds, cmd, aux);
-}
-\f
 static char *
 show_blanks (const struct dataset *ds UNUSED)
 {
@@ -600,12 +626,7 @@ show_endcmd (const struct dataset *ds UNUSED)
 static char *
 show_errors (const struct dataset *ds UNUSED)
 {
-  bool terminal = settings_get_error_routing_to_terminal ();
-  bool listing = settings_get_error_routing_to_listing ();
-  return xstrdup (terminal && listing ? "BOTH"
-                  : terminal ? "TERMINAL"
-                  : listing ? "LISTING"
-                  : "NONE");
+  return show_output_routing (SETTINGS_OUTPUT_ERROR);
 }
 
 static char *
@@ -627,10 +648,28 @@ show_locale (const struct dataset *ds UNUSED)
   return xstrdup (get_default_encoding ());
 }
 
+static char *
+show_messages (const struct dataset *ds UNUSED)
+{
+  return show_output_routing (SETTINGS_OUTPUT_NOTE);
+}
+
+static char *
+show_printback (const struct dataset *ds UNUSED)
+{
+  return show_output_routing (SETTINGS_OUTPUT_SYNTAX);
+}
+
+static char *
+show_results (const struct dataset *ds UNUSED)
+{
+  return show_output_routing (SETTINGS_OUTPUT_RESULT);
+}
+
 static char *
 show_mxerrs (const struct dataset *ds UNUSED)
 {
-  return xasprintf ("%d", settings_get_mxerrs ());
+  return xasprintf ("%d", settings_get_max_messages (MSG_S_ERROR));
 }
 
 static char *
@@ -642,7 +681,7 @@ show_mxloops (const struct dataset *ds UNUSED)
 static char *
 show_mxwarns (const struct dataset *ds UNUSED)
 {
-  return xasprintf ("%d", settings_get_mxwarns ());
+  return xasprintf ("%d", settings_get_max_messages (MSG_S_WARNING));
 }
 
 /* Returns a name for the given INTEGER_FORMAT value. */
@@ -773,9 +812,12 @@ const struct show_sbc show_table[] =
     {"FORMAT", show_format},
     {"LENGTH", show_length},
     {"LOCALE", show_locale},
+    {"MESSAGES", show_messages},
     {"MXERRS", show_mxerrs},
     {"MXLOOPS", show_mxloops},
     {"MXWARNS", show_mxwarns},
+    {"PRINTBACk", show_printback},
+    {"RESULTS", show_results},
     {"RIB", show_rib},
     {"RRB", show_rrb},
     {"SCOMPRESSION", show_scompression},
index 1bdb0e9a0db6487467d51aa958452cf91ef13637..fe826db155dadb8ad1b5cd97d2df7709399171ba 100644 (file)
 #include <libpspp/message.h>
 #include <libpspp/start-date.h>
 #include <libpspp/version.h>
-#include <output/output.h>
+#include <output/text-item.h>
 
 #include "xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-static int get_title (struct lexer *, const char *cmd, char **title);
+static int parse_title (struct lexer *, enum text_item_type);
+static void set_title (const char *title, enum text_item_type);
 
 int
 cmd_title (struct lexer *lexer, struct dataset *ds UNUSED)
 {
-  return get_title (lexer, "TITLE", &outp_title);
+  return parse_title (lexer, TEXT_ITEM_TITLE);
 }
 
 int
 cmd_subtitle (struct lexer *lexer, struct dataset *ds UNUSED)
 {
-  return get_title (lexer, "SUBTITLE", &outp_subtitle);
+  return parse_title (lexer, TEXT_ITEM_SUBTITLE);
 }
 
 static int
-get_title (struct lexer *lexer, const char *cmd, char **title)
+parse_title (struct lexer *lexer, enum text_item_type type)
 {
   int c;
 
@@ -59,30 +60,24 @@ get_title (struct lexer *lexer, const char *cmd, char **title)
       lex_get (lexer);
       if (!lex_force_string (lexer))
        return CMD_FAILURE;
-      if (*title)
-       free (*title);
-      *title = ds_xstrdup (lex_tokstr (lexer));
+      set_title (ds_cstr (lex_tokstr (lexer)), type);
       lex_get (lexer);
-      if (lex_token (lexer) != '.')
-       {
-         msg (SE, _("%s: `.' expected after string."), cmd);
-         return CMD_FAILURE;
-       }
+      return lex_end_of_command (lexer);
     }
   else
     {
-      char *cp;
-
-      if (*title)
-       free (*title);
-      *title = xstrdup (lex_rest_of_line (lexer));
+      set_title (lex_rest_of_line (lexer), type);
       lex_discard_line (lexer);
-      for (cp = *title; *cp; cp++)
-       *cp = toupper ((unsigned char) (*cp));
     }
   return CMD_SUCCESS;
 }
 
+static void
+set_title (const char *title, enum text_item_type type)
+{
+  text_item_submit (text_item_create (type, title));
+}
+
 /* Performs the FILE LABEL command. */
 int
 cmd_file_label (struct lexer *lexer, struct dataset *ds)
index 8ce2d12576697beb5562fc65fc4a03522ce2a9a0..4fb889b17717ae3a0dec8bc98ee5a81ea6e219b9 100644 (file)
@@ -352,7 +352,7 @@ count_trns_proc (void *trns_, struct ccase **c,
 static bool
 count_trns_free (void *trns_)
 {
-  struct count_trns *trns = (struct count_trns *) trns_;
+  struct count_trns *trns = trns_;
   pool_destroy (trns->pool);
   return true;
 }
index 74b2ceb387f54d04e669cfbadb7eb4e7589c89a3..b776612922f2579b290f3a3657f12adb8efee0fe 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
 #endif
 
 #include <libpspp/abt.h>
+#include <libpspp/cast.h>
 
 #include <stdbool.h>
 
@@ -145,8 +146,8 @@ insert_relative (struct abt *abt, const struct abt_node *p, bool after,
           p = p->down[dir];
           dir = !after;
         }
-      ((struct abt_node *) p)->down[dir] = node;
-      node->up = (struct abt_node *) p;
+      CONST_CAST (struct abt_node *, p)->down[dir] = node;
+      node->up = CONST_CAST (struct abt_node *, p);
       abt_reaugmented (abt, node);
     }
 
@@ -280,7 +281,7 @@ abt_find (const struct abt *abt, const struct abt_node *target)
     {
       cmp = abt->compare (target, p, abt->aux);
       if (cmp == 0)
-        return (struct abt_node *) p;
+        return CONST_CAST (struct abt_node *, p);
     }
 
   return NULL;
@@ -307,7 +308,7 @@ abt_next (const struct abt *abt, const struct abt_node *p)
       p = p->down[1];
       while (p->down[0] != NULL)
         p = p->down[0];
-      return (struct abt_node *) p;
+      return CONST_CAST (struct abt_node *, p);
     }
 }
 
@@ -332,7 +333,7 @@ abt_prev (const struct abt *abt, const struct abt_node *p)
       p = p->down[0];
       while (p->down[1] != NULL)
         p = p->down[1];
-      return (struct abt_node *) p;
+      return CONST_CAST (struct abt_node *, p);
     }
 }
 
index 3801eb86636c14d2d4a73420329d7c568768d630..24d7268a2d6543a383361c50914d796e52e7b6c1 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    tree paper.  */
 
 #include <stddef.h>
+#include <libpspp/cast.h>
 
 /* Returns the data structure corresponding to the given NODE,
    assuming that NODE is embedded as the given MEMBER name in
    data type STRUCT. */
-#define abt_data(NODE, STRUCT, MEMBER)                                  \
-        ((STRUCT *) ((char *) (NODE) - offsetof (STRUCT, MEMBER)))
+#define abt_data(NODE, STRUCT, MEMBER)                          \
+        (CHECK_POINTER_HAS_TYPE (NODE, struct abt_node *),      \
+         UP_CAST (NODE, STRUCT, MEMBER))
 
 /* Node in an augmented binary tree. */
 struct abt_node
index 6df2a2d803995841b319a5398661a2f4024416d5..b1b4ee524562e4335b275ddbbb0072b1e4312667 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -370,7 +370,7 @@ insert_range (void *array_, size_t count, size_t size,
 /* Makes room for a new element at IDX in ARRAY, which initially
    consists of COUNT elements of SIZE bytes each, by shifting
    elements IDX...COUNT (exclusive) to the right by one
-   positions. */
+   position. */
 void
 insert_element (void *array, size_t count, size_t size,
                 size_t idx)
@@ -638,7 +638,7 @@ typedef struct
 
 void
 sort (void *array, size_t count, size_t size,
-           algo_compare_func *compare, const void *aux)
+      algo_compare_func *compare, const void *aux)
 {
   char *const first = array;
   const size_t max_thresh = MAX_THRESH * size;
index 109aee4c611832a4733c95bdbe70fccbaa7f1e08..dc17fbd7ef56fdd3f8b1a44c532fb9c964c28c90 100644 (file)
@@ -118,7 +118,7 @@ void insert_range (void *array, size_t count, size_t size,
 /* Makes room for a new element at IDX in ARRAY, which initially
    consists of COUNT elements of SIZE bytes each, by shifting
    elements IDX...COUNT (exclusive) to the right by one
-   positions. */
+   position. */
 void insert_element (void *array, size_t count, size_t size,
                      size_t idx);
 
index 7cd5bbfaae42d9f8c9d3f525eec773a17b211485..35760f3ec41114b64205904dc6d262d515cfda4b 100644 (file)
@@ -14,6 +14,7 @@ src_libpspp_libpspp_la_SOURCES = \
        src/libpspp/bit-vector.h \
        src/libpspp/bt.c \
        src/libpspp/bt.h \
+       src/libpspp/cast.h \
        src/libpspp/compiler.h \
        src/libpspp/copyleft.c \
        src/libpspp/copyleft.h \
@@ -39,6 +40,8 @@ src_libpspp_libpspp_la_SOURCES = \
        src/libpspp/i18n.h \
        src/libpspp/integer-format.c \
        src/libpspp/integer-format.h \
+       src/libpspp/intern.c \
+       src/libpspp/intern.h \
        src/libpspp/legacy-encoding.c \
        src/libpspp/legacy-encoding.h \
        src/libpspp/ll.c \
@@ -65,6 +68,16 @@ src_libpspp_libpspp_la_SOURCES = \
        src/libpspp/sparse-xarray.h \
        src/libpspp/start-date.c \
        src/libpspp/start-date.h \
+       src/libpspp/string-array.c \
+       src/libpspp/string-array.h \
+       src/libpspp/string-map.c \
+       src/libpspp/string-map.h \
+       src/libpspp/string-set.c \
+       src/libpspp/string-set.h \
+       src/libpspp/stringi-map.c \
+       src/libpspp/stringi-map.h \
+       src/libpspp/stringi-set.c \
+       src/libpspp/stringi-set.h \
        src/libpspp/str.c \
        src/libpspp/str.h \
        src/libpspp/taint.c \
@@ -73,9 +86,9 @@ src_libpspp_libpspp_la_SOURCES = \
        src/libpspp/tmpfile.h \
        src/libpspp/tower.c \
        src/libpspp/tower.h \
-       src/libpspp/verbose-msg.c \
-       src/libpspp/verbose-msg.h \
-       src/libpspp/version.h 
+       src/libpspp/version.h \
+       src/libpspp/zip-writer.c \
+       src/libpspp/zip-writer.h
 
 DISTCLEANFILES+=src/libpspp/version.c
 
@@ -92,16 +105,12 @@ src/libpspp/version.c: $(top_srcdir)/AUTHORS Makefile
        echo "\$$VERSION='$(VERSION_FOR_PERL)';" >> $@
        echo "*/" >> $@
        echo "#include \"version.h\"" >> $@
-       echo "const char bare_version[] = \"@VERSION@\";" >> $@
-       echo "const char version[] = \"GNU @PACKAGE@ @VERSION@\";" >> $@
-       echo "const char stat_version[] = \"GNU @PACKAGE@ @VERSION@ \
+       echo "const char bare_version[] = \"$(VERSION)\";" >> $@
+       echo "const char version[] = \"GNU $(PACKAGE) $(VERSION)\";" >> $@
+       echo "const char stat_version[] = \"GNU $(PACKAGE) $(VERSION) \
 (`date`).\";" >> $@
        echo "const char host_system[] = \"$(host_triplet)\";" >> $@
        echo "const char build_system[] = \"$(build_triplet)\";" >> $@
-       echo "const char default_config_path[] =\
-\"\$$HOME/.pspp:$(pkgsysconfdir)\";" >> $@
-       echo "const char include_path[] =\
-\"./:\$$HOME/.pspp/include:$(pkgdatadir)\";" >> $@
        echo "const char locale_dir[] = \"$(datadir)/locale\";" >> $@
        echo "const char *const authors[] = {" >> $@
        sed -e 's/^/  \"/' -e 's/$$/\",/' $(top_srcdir)/AUTHORS >> $@
index 26eb982b25d47c26c9699c24018a0910cb2dbcd5..997083b1a08fb64271098f1342a126b9ebd0fe6b 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -67,6 +67,8 @@
 #include <stdbool.h>
 #include <stdint.h>
 
+#include <libpspp/cast.h>
+
 static void rebalance_subtree (struct bt *, struct bt_node *, size_t);
 
 static struct bt_node **down_link (struct bt *, struct bt_node *);
@@ -79,9 +81,7 @@ static inline int calculate_h_alpha (size_t);
 /* Initializes BT as an empty BT that uses the given COMPARE
    function, passing in AUX as auxiliary data. */
 void
-bt_init (struct bt *bt,
-         bt_compare_func *compare,
-         const void *aux)
+bt_init (struct bt *bt, bt_compare_func *compare, const void *aux)
 {
   bt->root = NULL;
   bt->compare = compare;
@@ -250,7 +250,7 @@ bt_find (const struct bt *bt, const struct bt_node *target)
     {
       cmp = bt->compare (target, p, bt->aux);
       if (cmp == 0)
-        return (struct bt_node *) p;
+        return CONST_CAST (struct bt_node *, p);
     }
 
   return NULL;
@@ -283,7 +283,7 @@ bt_find_ge (const struct bt *bt, const struct bt_node *target)
             break;
         }
     }
-  return (struct bt_node *) q;
+  return CONST_CAST (struct bt_node *, q);
 }
 
 /* Searches BT for, and returns, the last node in in-order whose
@@ -314,7 +314,7 @@ bt_find_le (const struct bt *bt, const struct bt_node *target)
             break;
         }
     }
-  return (struct bt_node *) q;
+  return CONST_CAST (struct bt_node *, q);
 }
 
 /* Returns the node in BT following P in in-order.
@@ -338,7 +338,7 @@ bt_next (const struct bt *bt, const struct bt_node *p)
       p = p->down[1];
       while (p->down[0] != NULL)
         p = p->down[0];
-      return (struct bt_node *) p;
+      return CONST_CAST (struct bt_node *, p);
     }
 }
 
@@ -363,7 +363,7 @@ bt_prev (const struct bt *bt, const struct bt_node *p)
       p = p->down[0];
       while (p->down[1] != NULL)
         p = p->down[1];
-      return (struct bt_node *) p;
+      return CONST_CAST (struct bt_node *, p);
     }
 }
 
index 340b8760166c31fec29ea42ae8ecc50c24911806..0ee29898e8263eeb434d8987192157c771fbb19a 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    balancing applied to the balanced tree, as its operation is
    fully encapsulated. */
 
+#include <stdbool.h>
 #include <stddef.h>
+#include <libpspp/cast.h>
 
 /* Returns the data structure corresponding to the given NODE,
    assuming that NODE is embedded as the given MEMBER name in
    data type STRUCT. */
-#define bt_data(NODE, STRUCT, MEMBER)                                  \
-        ((STRUCT *) ((char *) (NODE) - offsetof (STRUCT, MEMBER)))
+#define bt_data(NODE, STRUCT, MEMBER)                           \
+        (CHECK_POINTER_HAS_TYPE (NODE, struct bt_node *),       \
+         UP_CAST (NODE, STRUCT, MEMBER))
 
 /* Node in a balanced binary tree. */
 struct bt_node
@@ -78,4 +81,11 @@ static inline size_t bt_count (const struct bt *bt)
   return bt->size;
 }
 
+/* Return true if BT contains no nodes,
+   false if BT contains at least one node. */
+static inline bool bt_is_empty (const struct bt *bt)
+{
+  return bt->size == 0;
+}
+
 #endif /* libpspp/bt.h */
diff --git a/src/libpspp/cast.h b/src/libpspp/cast.h
new file mode 100644 (file)
index 0000000..1e33857
--- /dev/null
@@ -0,0 +1,92 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LIBPSPP_CAST_H
+#define LIBPSPP_CAST_H 1
+
+#include <stddef.h>
+
+/* Expands to a void expression that checks that POINTER is an
+   expression whose type is a qualified or unqualified version of
+   a type compatible with TYPE (a pointer type) and, if not,
+   causes a compiler warning to be issued (on typical compilers).
+
+   Examples:
+
+   int *ip;
+   const int *cip;
+   const int **cipp;
+   int ***ippp;
+   double *dp;
+
+   // None of these causes a warning:
+   CHECK_POINTER_HAS_TYPE (ip, int *);
+   CHECK_POINTER_HAS_TYPE (ip, const int *);
+   CHECK_POINTER_HAS_TYPE (cip, int *);
+   CHECK_POINTER_HAS_TYPE (cip, const int *);
+   CHECK_POINTER_HAS_TYPE (dp, double *);
+   CHECK_POINTER_HAS_TYPE (dp, const double *);
+   CHECK_POINTER_HAS_TYPE (cipp, const int **);
+   CHECK_POINTER_HAS_TYPE (cipp, const int *const *);
+   CHECK_POINTER_HAS_TYPE (ippp, int ***);
+   CHECK_POINTER_HAS_TYPE (ippp, int **const *);
+
+   // None of these causes a warning either, although it is unusual to
+   // const-qualify a pointer like this (it's like declaring a "const int",
+   // for example).
+   CHECK_POINTER_HAS_TYPE (ip, int *const);
+   CHECK_POINTER_HAS_TYPE (ip, const int *const);
+   CHECK_POINTER_HAS_TYPE (cip, int *const);
+   CHECK_POINTER_HAS_TYPE (cip, const int *const);
+   CHECK_POINTER_HAS_TYPE (cipp, const int **const);
+   CHECK_POINTER_HAS_TYPE (cipp, const int *const *const);
+   CHECK_POINTER_HAS_TYPE (ippp, int ***const);
+   CHECK_POINTER_HAS_TYPE (ippp, int **const *const);
+
+   // Provokes a warning because "int" is not compatible with "double":
+   CHECK_POINTER_HAS_TYPE (dp, int *);
+
+   // Provoke warnings because C's type compatibility rules only allow
+   // adding a "const" qualifier to the outermost pointer:
+   CHECK_POINTER_HAS_TYPE (ippp, const int ***);
+   CHECK_POINTER_HAS_TYPE (ippp, int *const**);
+*/
+#define CHECK_POINTER_HAS_TYPE(POINTER, TYPE)           \
+        ((void) sizeof ((TYPE) (POINTER) == (POINTER)))
+
+/* Given expressions A and B, both of which have pointer type,
+   expands to a void expression that causes a compiler warning if
+   A and B are not pointers to qualified or unqualified versions
+   of compatible types.
+
+   Examples similar to those given for CHECK_POINTER_HAS_TYPE,
+   above, can easily be devised. */
+#define CHECK_POINTER_COMPATIBILITY(A, B) ((void) sizeof ((A) == (B)))
+
+/* Equivalent to casting POINTER to TYPE, but also issues a
+   warning if the cast changes anything other than an outermost
+   "const" or "volatile" qualifier. */
+#define CONST_CAST(TYPE, POINTER)                       \
+        (CHECK_POINTER_HAS_TYPE (POINTER, TYPE),        \
+         (TYPE) (POINTER))
+
+/* Given POINTER, a pointer to the given MEMBER within structure
+   STRUCT, returns the address of the STRUCT. */
+#define UP_CAST(POINTER, STRUCT, MEMBER)                                \
+        (CHECK_POINTER_COMPATIBILITY (&((STRUCT *) 0)->MEMBER, POINTER), \
+         (STRUCT *) ((char *) (POINTER) - offsetof (STRUCT, MEMBER)))
+
+#endif /* libpspp/cast.h */
index d22819446f5e5ee7a5eececf9c4f0e3ef261e758..a7e91bfec1f805b35c8f2c6d15608fcf556bbc68 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #define PURE_FUNCTION
 #endif
 
+/* This attribute indicates that the argument with the given
+   IDX must be a null pointer.  IDX counts backward in the
+   argument list, so that 0 is the last argument, 1 is the
+   second-from-last argument, and so on. */
+#if __GNUC__ > 3
+#define SENTINEL(IDX) ATTRIBUTE ((sentinel(IDX)))
+#else
+#define SENTINEL(IDX)
+#endif
+
 #endif /* compiler.h */
index 302cd9137ddbc7b748ae07c9c4c34103ffecbf86..43d2a56f460d8f645a61ee86dc5e457c862a9efc 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include <stdlib.h>
+#include "libpspp/getl.h"
 
-#include "getl.h"
+#include <stdlib.h>
 
-#include <libpspp/str.h>
-#include <libpspp/ll.h>
-#include <libpspp/version.h>
+#include "libpspp/ll.h"
+#include "libpspp/str.h"
+#include "libpspp/string-array.h"
 
-#include "xalloc.h"
+#include "gl/configmake.h"
+#include "gl/relocatable.h"
+#include "gl/xalloc.h"
 
 struct getl_source
   {
@@ -41,14 +43,15 @@ struct getl_source
 struct source_stream
   {
     struct ll_list sources ;  /* List of source files. */
-
-    struct string the_include_path;
+    struct string_array include_path;
   };
 
-const char *
-getl_include_path (const struct source_stream *ss)
+char **
+getl_include_path (const struct source_stream *ss_)
 {
-  return ds_cstr (&ss->the_include_path);
+  struct source_stream *ss = CONST_CAST (struct source_stream *, ss_);
+  string_array_terminate_null (&ss->include_path);
+  return ss->include_path.strings;
 }
 
 static struct getl_source *
@@ -80,15 +83,19 @@ source_stream_current_error_mode (const struct source_stream *ss)
 
 /* Initialize getl. */
 struct source_stream *
-create_source_stream (const char *initial_include_path)
+create_source_stream (void)
 {
-  struct source_stream *ss = xzalloc (sizeof (*ss));
+  struct source_stream *ss;
+
+  ss = xzalloc (sizeof (*ss));
   ll_init (&ss->sources);
-#if 0
-  ds_init_cstr (&ss->the_include_path,
-                fn_getenv_default ("STAT_INCLUDE_PATH", include_path));
-#endif
-  ds_init_cstr (&ss->the_include_path, initial_include_path);
+
+  string_array_init (&ss->include_path);
+  string_array_append (&ss->include_path, ".");
+  if (getenv ("HOME") != NULL)
+    string_array_append_nocopy (&ss->include_path,
+                                xasprintf ("%s/.pspp", getenv ("HOME")));
+  string_array_append (&ss->include_path, relocate (PKGDATADIR));
 
   return ss;
 }
@@ -97,17 +104,14 @@ create_source_stream (const char *initial_include_path)
 void
 getl_clear_include_path (struct source_stream *ss)
 {
-  ds_clear (&ss->the_include_path);
+  string_array_clear (&ss->include_path);
 }
 
 /* Add to the include path. */
 void
 getl_add_include_dir (struct source_stream *ss, const char *path)
 {
-  if (ds_length (&ss->the_include_path))
-    ds_put_char (&ss->the_include_path, ':');
-
-  ds_put_cstr (&ss->the_include_path, path);
+  string_array_append (&ss->include_path, path);
 }
 
 /* Appends source S to the list of source files. */
@@ -231,7 +235,7 @@ destroy_source_stream (struct source_stream *ss)
 {
   while ( !ll_is_empty (&ss->sources))
     close_source (ss);
-  ds_destroy (&ss->the_include_path);
+  string_array_destroy (&ss->include_path);
 
   free (ss);
 }
index c0399377982bf556ce588cabfcdf0b4cdd1e571e..47dea27e4285be8e1d13e85a934d3e2424427b2f 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ struct getl_interface
 
 struct source_stream;
 
-struct source_stream * create_source_stream (const char *);
+struct source_stream *create_source_stream (void);
 
 enum syntax_mode source_stream_current_syntax_mode
    (const struct source_stream *);
@@ -94,7 +94,7 @@ void destroy_source_stream (struct source_stream *);
 
 void getl_clear_include_path (struct source_stream *);
 void getl_add_include_dir (struct source_stream *, const char *);
-const char * getl_include_path (const struct source_stream *);
+char **getl_include_path (const struct source_stream *);
 
 void getl_abort_noninteractive (struct source_stream *);
 bool getl_is_interactive (const struct source_stream *);
index f9f1f0e165ef2db3801a65890ba7c9798aacda8c..a72ee06e185e8171efe4f50270215af4ac340943 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -172,3 +172,12 @@ hash_double (double d, unsigned int basis)
   return hash_bytes (&d, sizeof d, basis);
 #endif /* SIZEOF_DOUBLE != 8 */
 }
+
+/* Returns a hash value for pointer P, starting from BASIS. */
+unsigned int
+hash_pointer (const void *p, unsigned int basis)
+{
+  /* Casting to uintptr_t before casting to int suppresses a GCC warning about
+     on 64-bit platforms. */
+  return hash_int ((int) (uintptr_t) p, basis);
+}
index 089134b43fae16376ba9dcc80f3a8d50bf6081b2..bdf3da31ab7578fa464b693fe059b91382957ee3 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,5 +24,6 @@ unsigned int hash_string (const char *, unsigned int basis);
 unsigned int hash_case_string (const char *, unsigned int basis);
 unsigned int hash_int (int, unsigned int basis);
 unsigned int hash_double (double, unsigned int basis);
+unsigned int hash_pointer (const void *, unsigned int basis);
 
 #endif /* libpspp/hash-functions.h */
index 57fc2678d09548ad50922b9130298afb6cf80cac..e586bcc0c18d1ae79242dc5a6ba42068db5b1f63 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 134224373d2ec2dbf6536b4d7909799df59b06d6..3a3c516a03485ab7e4a5ecac923719c3425c4ee0 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -70,6 +70,7 @@
 #ifndef LIBPSPP_HEAP_H
 #define LIBPSPP_HEAP_H 1
 
+#include <libpspp/cast.h>
 #include <stdbool.h>
 #include <stddef.h>
 
@@ -78,8 +79,9 @@ struct pool;
 /* Returns the data structure corresponding to the given heap
    NODE, assuming that NODE is embedded as the given MEMBER name
    in data type STRUCT. */
-#define heap_data(NODE, STRUCT, MEMBER)                                 \
-        ((STRUCT *) ((char *) (NODE) - offsetof (STRUCT, MEMBER)))
+#define heap_data(NODE, STRUCT, MEMBER)                         \
+        (CHECK_POINTER_HAS_TYPE (NODE, struct heap_node *),     \
+         UP_CAST (NODE, STRUCT, MEMBER))
 
 /* A node in a heap.  Opaque.
    One of these structures must be embedded in your heap node. */
index 4c97e2359c922034cc8389344dc2a581227042d7..9050cc08f5571a6f2e8908201444d834a96a6398 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -49,6 +49,18 @@ hmap_swap (struct hmap *a, struct hmap *b)
     b->buckets = &b->one;
 }
 
+/* Removes all of the elements from MAP, without destroying MAP itself and
+   without accessing the existing elements (if any). */
+void
+hmap_clear (struct hmap *map)
+{
+  size_t i;
+
+  for (i = 0; i <= map->mask; i++)
+    map->buckets[i] = NULL;
+  map->count = 0;
+}
+
 /* Frees the memory, if any, allocated by hash map MAP.  This has
    no effect on the actual data items in MAP, if any, because the
    client is responsible for allocating and freeing them.  It
index e73d84fd153764ec96935c6242dc2388820c5757..095edf104674ba0af56b2a2da7d0bb4687807c0d 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
        }
    */
 
+#include <stdbool.h>
 #include <stddef.h>
+#include <libpspp/cast.h>
 
 /* Returns the data structure corresponding to the given NODE,
    assuming that NODE is embedded as the given MEMBER name in
    data type STRUCT.  NODE must not be a null pointer. */
 #define HMAP_DATA(NODE, STRUCT, MEMBER)                         \
-  ((STRUCT *) ((char *) (NODE) - offsetof (STRUCT, MEMBER)))
+        (CHECK_POINTER_HAS_TYPE (NODE, struct hmap_node *),     \
+         UP_CAST (NODE, STRUCT, MEMBER))
 
 /* Like HMAP_DATA, except that a null NODE yields a null pointer
    result. */
@@ -155,6 +158,7 @@ struct hmap
 /* Creation and destruction. */
 void hmap_init (struct hmap *);
 void hmap_swap (struct hmap *, struct hmap *);
+void hmap_clear (struct hmap *);
 void hmap_destroy (struct hmap *);
 
 /* Storage management. */
@@ -180,6 +184,7 @@ static inline struct hmap_node *hmap_next (const struct hmap *,
                                            const struct hmap_node *);
 
 /* Counting. */
+static bool hmap_is_empty (const struct hmap *);
 static inline size_t hmap_count (const struct hmap *);
 static inline size_t hmap_capacity (const struct hmap *);
 
@@ -440,6 +445,14 @@ hmap_next (const struct hmap *map, const struct hmap_node *node)
           : hmap_first_nonempty_bucket__ (map, (node->hash & map->mask) + 1));
 }
 
+/* Returns true if MAP currently contains no data items, false
+   otherwise. */
+static inline bool
+hmap_is_empty (const struct hmap *map)
+{
+  return map->count == 0;
+}
+
 /* Returns the number of data items currently in MAP. */
 static inline size_t
 hmap_count (const struct hmap *map) 
index d73245084178025d2f550c47af66487590310b7a..25dabf6eda54184085509a9be4f807eb2714a87e 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,9 +18,9 @@
 #include <config.h>
 #endif
 
-#include <libpspp/hmapx.h>
+#include "libpspp/hmapx.h"
 #include <stdlib.h>
-#include "xalloc.h"
+#include "gl/xalloc.h"
 
 /* Frees the memory, if any, allocated by hash map MAP, including
    all hmapx_nodes that it contains.  The user-defined data items
@@ -32,7 +32,7 @@ hmapx_destroy (struct hmapx *map)
 {
   if (map != NULL) 
     {
-      if (hmapx_count (map) > 0) 
+      if (!(hmapx_is_empty (map)))
         {
           struct hmapx_node *node, *next;
           for (node = hmapx_first (map); node != NULL; node = next)
@@ -45,6 +45,18 @@ hmapx_destroy (struct hmapx *map)
     }
 }
 
+/* Removes all hmapx_nodes from MAP and frees them.  The user-defined data
+   items that the hmapx_nodes point to are not affected. */
+void
+hmapx_clear (struct hmapx *map)
+{
+  struct hmapx_node *node, *next;
+  void *data;
+
+  HMAPX_FOR_EACH_SAFE (data, node, next, map)
+    hmapx_delete (map, node);
+}
+
 /* Allocates and returns a new hmapx_node with DATA as its data
    item. */
 static struct hmapx_node *
index 32a4452fe2417d58157ca8da27e079f2052fcc88..2fe7f9f770b21c7224182270dc87609ed7a0a104 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -143,6 +143,7 @@ struct hmapx
 /* Creation and destruction. */
 static inline void hmapx_init (struct hmapx *);
 static inline void hmapx_swap (struct hmapx *, struct hmapx *);
+void hmapx_clear (struct hmapx *);
 void hmapx_destroy (struct hmapx *);
 
 /* Storage management. */
@@ -165,6 +166,7 @@ static inline struct hmapx_node *hmapx_next (const struct hmapx *,
                                              const struct hmapx_node *);
 
 /* Counting. */
+static inline bool hmapx_is_empty (const struct hmapx *);
 static inline size_t hmapx_count (const struct hmapx *);
 static inline size_t hmapx_capacity (const struct hmapx *);
 
@@ -404,6 +406,14 @@ hmapx_next (const struct hmapx *map, const struct hmapx_node *node)
   return HMAP_NEXT (node, struct hmapx_node, hmap_node, &map->hmap);
 }
 
+/* Returns true if MAP currently contains no data items, false
+   otherwise. */
+static inline bool
+hmapx_is_empty (const struct hmapx *map)
+{
+  return hmap_is_empty (&map->hmap);
+}
+
 /* Returns the number of data items currently in MAP. */
 static inline size_t
 hmapx_count (const struct hmapx *map) 
index 80a0ed35dd57a388f622146482e56fddca9b7211..8e99aa04236cb1cf7cd326848b20461f4ceb2e7d 100644 (file)
@@ -86,6 +86,9 @@ create_iconv (const char* tocode, const char* fromcode)
   return converter->conv;
 }
 
+
+/* Similar to recode_string_pool, but allocates the returned value on the heap instead of 
+   in a pool.  It is the caller's responsibility to free the returned value. */
 char *
 recode_string (const char *to, const char *from,
               const char *text, int length)
@@ -94,10 +97,19 @@ recode_string (const char *to, const char *from,
 }
 
 
-/* Return a string based on TEXT which must be encoded using FROM.
-   The returned string will be encoded in TO.
-   If length is not -1, then it must be the number of bytes in TEXT.
-   The returned string must be freed when no longer required.
+/* 
+Converts the string TEXT, which should be encoded in FROM-encoding, to a
+dynamically allocated string in TO-encoding.   Any characters which cannot
+be converted will be represented by '?'.
+
+LENGTH should be the length of the string or -1, if null terminated.
+
+The returned string will be allocated on POOL.
+
+This function's behaviour differs from that of g_convert_with_fallback provided
+by GLib.  The GLib function will fail (returns NULL) if any part of the input
+string is not valid in the declared input encoding.  This function however perseveres
+even in the presence of badly encoded input.
 */
 char *
 recode_string_pool (const char *to, const char *from,
index 9c8f7c14014bdfca443b4d8d01012b1eb40539e9..e2663a022094b65e5fc5f2aa6e2d303508c2a83b 100644 (file)
@@ -26,9 +26,28 @@ void  i18n_init (void);
 
 struct pool;
 
+
+/* 
+Converts the string TEXT, which should be encoded in FROM-encoding, to a
+dynamically allocated string in TO-encoding.   Any characters which cannot
+be converted will be represented by '?'.
+
+LENGTH should be the length of the string or -1, if null terminated.
+
+The returned string will be allocated on POOL.
+
+This function's behaviour differs from that of g_convert_with_fallback provided
+by GLib.  The GLib function will fail (returns NULL) if any part of the input
+string is not valid in the declared input encoding.  This function however perseveres
+even in the presence of badly encoded input.
+*/
 char *recode_string_pool (const char *to, const char *from,
                          const char *text, int length, struct pool *pool);
 
+
+
+/* Similar to recode_string_pool, but allocates the returned value on the heap instead of 
+   in a pool.  It is the caller's responsibility to free the returned value. */
 char *recode_string (const char *to, const char *from,
                      const char *text, int len);
 
index fa5d6da96f8d3cb48c397cc4298199ba68e808a0..2d8a72efe68569d015e67a62b3a851e19c7a8121 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ integer_get (enum integer_format format, const void *from_, size_t cnt)
   size_t i;
 
   assert (is_integer_format (format));
-  assert (cnt < 8);
+  assert (cnt <= 8);
 
   switch (format)
     {
diff --git a/src/libpspp/intern.c b/src/libpspp/intern.c
new file mode 100644 (file)
index 0000000..0bb9277
--- /dev/null
@@ -0,0 +1,121 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "libpspp/intern.h"
+
+#include <assert.h>
+#include <string.h>
+
+#include "libpspp/assertion.h"
+#include "libpspp/hash-functions.h"
+#include "libpspp/hmap.h"
+
+#include "gl/xalloc.h"
+
+/* A single interned string. */
+struct interned_string
+  {
+    struct hmap_node node;      /* Node in hash table. */
+    size_t ref_cnt;             /* Reference count. */
+    char string[1];             /* Null-terminated string. */
+  };
+
+/* All interned strings. */
+static struct hmap interns = HMAP_INITIALIZER (interns);
+
+/* Searches the table of interned string for  */
+static struct interned_string *
+intern_lookup__ (const char *s, size_t length, unsigned int hash)
+{
+  struct interned_string *is;
+
+  HMAP_FOR_EACH_WITH_HASH (is, struct interned_string, node, hash, &interns)
+    if (!memcmp (s, is->string, length + 1))
+      return is;
+
+  return NULL;
+}
+
+/* Returns an interned version of string S.  Pass the returned string to
+   intern_unref() to release it. */
+const char *
+intern_new (const char *s)
+{
+  size_t length = strlen (s);
+  unsigned int hash = hash_bytes (s, length, 0);
+  struct interned_string *is;
+
+  is = intern_lookup__ (s, length, hash);
+  if (is != NULL)
+    is->ref_cnt++;
+  else
+    {
+      is = xmalloc (length + sizeof *is);
+      hmap_insert (&interns, &is->node, hash);
+      is->ref_cnt = 1;
+      memcpy (is->string, s, length + 1);
+    }
+  return is->string;
+}
+
+static struct interned_string *
+interned_string_from_string (const char *s)
+{
+  const size_t ofs = offsetof (struct interned_string, string);
+  struct interned_string *is = (struct interned_string *) (s - ofs);
+  assert (is->ref_cnt > 0);
+  return is;
+}
+
+/* Increases the reference count on S, which must be an interned string
+   returned by intern_new(). */
+const char *
+intern_ref (const char *s)
+{
+  struct interned_string *is = interned_string_from_string (s);
+  is->ref_cnt++;
+  return s;
+}
+
+/* Decreases the reference count on S, which must be an interned string
+   returned by intern_new().  If the reference count reaches 0, frees the
+   interned string. */
+void
+intern_unref (const char *s)
+{
+  struct interned_string *is = interned_string_from_string (s);
+  if (--is->ref_cnt == 0)
+    {
+      hmap_delete (&interns, &is->node);
+      free (is);
+    }
+}
+
+/* Given null-terminated string S, returns true if S is an interned string
+   returned by intern_string_new(), false otherwise.
+
+   This is appropriate for use in debug assertions, e.g.:
+       assert (is_interned_string (s));
+*/
+bool
+is_interned_string (const char *s)
+{
+  size_t length = strlen (s);
+  unsigned int hash = hash_bytes (s, length, 0);
+  return intern_lookup__ (s, length, hash) != NULL;
+}
diff --git a/src/libpspp/intern.h b/src/libpspp/intern.h
new file mode 100644 (file)
index 0000000..147a69a
--- /dev/null
@@ -0,0 +1,41 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LIBPSPP_INTERN_H
+#define LIBPSPP_INTERN_H 1
+
+/* Interned strings.
+
+   An "interned" string is stored in a global hash table.  Only one copy of any
+   given string is kept in the hash table, which reduces memory usage in cases
+   where there might otherwise be many duplicates of a given string.
+
+   Interned strings can be compared for equality by comparing pointers, which
+   can also be a significant advantage in some cases.
+
+   Interned strings are immutable.
+
+   See http://en.wikipedia.org/wiki/String_interning for more information. */
+
+#include <stdbool.h>
+
+const char *intern_new (const char *);
+const char *intern_ref (const char *);
+void intern_unref (const char *);
+
+bool is_interned_string (const char *);
+
+#endif /* libpspp/intern.h */
index b9d595bc97a00212e9ebc1c156a1a01f75ed1556..e6533f2cd25fccf5beb2cbf9a4da31c279022027 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -169,7 +169,7 @@ ll_find_equal (const struct ll *r0, const struct ll *r1,
   for (x = r0; x != r1; x = ll_next (x))
     if (compare (x, target, aux) == 0)
       break;
-  return (struct ll *) x;
+  return CONST_CAST (struct ll *, x);
 }
 
 /* Returns the first node in R0...R1 for which PREDICATE returns
@@ -185,7 +185,7 @@ ll_find_if (const struct ll *r0, const struct ll *r1,
   for (x = r0; x != r1; x = ll_next (x))
     if (predicate (x, aux))
       break;
-  return (struct ll *) x;
+  return CONST_CAST (struct ll *, x);
 }
 
 /* Compares each pair of adjacent nodes in R0...R1
@@ -203,10 +203,10 @@ ll_find_adjacent_equal (const struct ll *r0, const struct ll *r1,
 
       for (x = r0, y = ll_next (x); y != r1; x = y, y = ll_next (y))
         if (compare (x, y, aux) == 0)
-          return (struct ll *) x;
+          return CONST_CAST (struct ll *, x);
     }
 
-  return (struct ll *) r1;
+  return CONST_CAST (struct ll *, r1);
 }
 
 /* Returns the number of nodes in R0...R1.
@@ -272,7 +272,7 @@ ll_max (const struct ll *r0, const struct ll *r1,
         if (compare (x, max, aux) > 0)
           max = x;
     }
-  return (struct ll *) max;
+  return CONST_CAST (struct ll *, max);
 }
 
 /* Returns the least node in R0...R1 according to COMPARE given
@@ -291,7 +291,7 @@ ll_min (const struct ll *r0, const struct ll *r1,
         if (compare (x, min, aux) < 0)
           min = x;
     }
-  return (struct ll *) min;
+  return CONST_CAST (struct ll *, min);
 }
 
 /* Lexicographically compares A0...A1 to B0...B1.
@@ -474,7 +474,7 @@ ll_find_run (const struct ll *r0, const struct ll *r1,
       while (r0 != r1 && compare (ll_prev (r0), r0, aux) <= 0);
     }
 
-  return (struct ll *) r0;
+  return CONST_CAST (struct ll *, r0);
 }
 
 /* Merges B0...B1 into A0...A1 according to COMPARE given
@@ -681,6 +681,6 @@ ll_find_partition (const struct ll *r0, const struct ll *r1,
     if (predicate (x, aux))
       return NULL;
 
-  return (struct ll *) partition;
+  return CONST_CAST (struct ll *, partition);
 }
 \f
index 65ecf55f2cad759a50085a85e90f1e3c79cf7f02..bf871f6b0f842a0a42726de48364aad08ea4d3ea 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -50,6 +50,9 @@
 #include <assert.h>
 #include <stdbool.h>
 #include <stddef.h>
+#include <libpspp/cast.h>
+
+#include <libpspp/cast.h>
 
 /* Embedded, circular doubly linked list.
 
 /* Returns the data structure corresponding to the given node LL,
    assuming that LL is embedded as the given MEMBER name in data
    type STRUCT. */
-#define ll_data(LL, STRUCT, MEMBER)                                    \
-        ((STRUCT *) ((char *) (LL) - offsetof (STRUCT, MEMBER)))
+#define ll_data(LL, STRUCT, MEMBER)                     \
+        (CHECK_POINTER_HAS_TYPE(LL, struct ll *),       \
+         UP_CAST(LL, STRUCT, MEMBER))
 
 /* Linked list node. */
 struct ll
@@ -378,7 +382,7 @@ ll_tail (const struct ll_list *list)
 static inline struct ll *
 ll_null (const struct ll_list *list)
 {
-  return (struct ll *) &list->null;
+  return CONST_CAST (struct ll *, &list->null);
 }
 
 /* Returns the node following LL in its list,
index 4dc82bffeb66219bf37d12f7cff7131a0c73cccc..905850bc41c13ec74be83289e0571c0972f464dc 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -219,6 +219,20 @@ llx_remove_if (struct llx *r0, struct llx *r1,
   return count;
 }
 
+/* Returns the first node in R0...R1 that has data TARGET.
+   Returns NULL if no node in R0...R1 equals TARGET. */
+struct llx *
+llx_find (const struct llx *r0, const struct llx *r1, const void *target)
+{
+  const struct llx *x;
+
+  for (x = r0; x != r1; x = llx_next (x))
+    if (llx_data (x) == target)
+      return CONST_CAST (struct llx *, x);
+
+  return NULL;
+}
+
 /* Returns the first node in R0...R1 that equals TARGET
    according to COMPARE given auxiliary data AUX.
    Returns R1 if no node in R0...R1 equals TARGET. */
@@ -232,7 +246,7 @@ llx_find_equal (const struct llx *r0, const struct llx *r1,
   for (x = r0; x != r1; x = llx_next (x))
     if (compare (llx_data (x), target, aux) == 0)
       break;
-  return (struct llx *) x;
+  return CONST_CAST (struct llx *, x);
 }
 
 /* Returns the first node in R0...R1 for which PREDICATE returns
@@ -248,7 +262,7 @@ llx_find_if (const struct llx *r0, const struct llx *r1,
   for (x = r0; x != r1; x = llx_next (x))
     if (predicate (llx_data (x), aux))
       break;
-  return (struct llx *) x;
+  return CONST_CAST (struct llx *, x);
 }
 
 /* Compares each pair of adjacent nodes in R0...R1
@@ -266,10 +280,10 @@ llx_find_adjacent_equal (const struct llx *r0, const struct llx *r1,
 
       for (x = r0, y = llx_next (x); y != r1; x = y, y = llx_next (y))
         if (compare (llx_data (x), llx_data (y), aux) == 0)
-          return (struct llx *) x;
+          return CONST_CAST (struct llx *, x);
     }
 
-  return (struct llx *) r1;
+  return CONST_CAST (struct llx *, r1);
 }
 
 /* Returns the number of nodes in R0...R1.
@@ -329,7 +343,7 @@ llx_max (const struct llx *r0, const struct llx *r1,
         if (compare (llx_data (x), llx_data (max), aux) > 0)
           max = x;
     }
-  return (struct llx *) max;
+  return CONST_CAST (struct llx *, max);
 }
 
 /* Returns the least node in R0...R1 according to COMPARE given
@@ -348,7 +362,7 @@ llx_min (const struct llx *r0, const struct llx *r1,
         if (compare (llx_data (x), llx_data (min), aux) < 0)
           min = x;
     }
-  return (struct llx *) min;
+  return CONST_CAST (struct llx *, min);
 }
 
 /* Lexicographically compares A0...A1 to B0...B1.
@@ -521,7 +535,7 @@ llx_find_run (const struct llx *r0, const struct llx *r1,
                                   llx_data (r0), aux) <= 0);
     }
 
-  return (struct llx *) r0;
+  return CONST_CAST (struct llx *, r0);
 }
 
 /* Merges B0...B1 into A0...A1 according to COMPARE given
@@ -734,7 +748,7 @@ llx_find_partition (const struct llx *r0, const struct llx *r1,
     if (predicate (llx_data (x), aux))
       return NULL;
 
-  return (struct llx *) partition;
+  return CONST_CAST (struct llx *, partition);
 }
 \f
 /* Allocates and returns a node using malloc. */
index 6232f3967ce3bdd9b9495bbf0cf0fc3a34934a6f..2aa18e7ba5694bced71cbe32a3feb69700e23f9b 100644 (file)
@@ -110,6 +110,12 @@ struct llx_list
     struct ll_list ll_list;     /* The list. */
   };
 
+/* Suitable for use as the initializer for a `struct llx_list'
+   named LIST.  Typical usage:
+       struct llx_list list = LLX_INITIALIZER (list);
+   LLX_INITIALIZER() is an alternative to llx_init(). */
+#define LLX_INITIALIZER(LIST) { LL_INITIALIZER ((LIST).ll_list) }
+
 /* Memory manager. */
 struct llx_manager
   {
@@ -180,6 +186,8 @@ size_t llx_remove_if (struct llx *r0, struct llx *r1,
                       const struct llx_manager *);
 
 /* Non-mutating algorithms. */
+struct llx *llx_find (const struct llx *r0, const struct llx *r1,
+                      const void *target);
 struct llx *llx_find_equal (const struct llx *r0, const struct llx *r1,
                             const void *target,
                             llx_compare_func *, void *aux);
index 5faee1f1d6c8dc33279e36acc9b3188b56b1f218..c227a60368a0ff725dacc9baba4e00bf916cf37d 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <string.h>
 #include <unistd.h>
 
+#include <libpspp/str.h>
 #include <libpspp/version.h>
 
-#include "progname.h"
-#include "xalloc.h"
-#include "xvasprintf.h"
+#include "gl/progname.h"
+#include "gl/xalloc.h"
+#include "gl/xvasprintf.h"
 
-/* Current command name as set by msg_set_command_name(). */
-static char *command_name;
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
 
 /* Message handler as set by msg_init(). */
 static void (*msg_handler)  (const struct msg *);
@@ -73,27 +74,77 @@ void
 msg_done (void)
 {
 }
-
+\f
+/* Working with messages. */
 
 /* Duplicate a message */
 struct msg *
-msg_dup(const struct msg *m)
+msg_dup (const struct msg *m)
 {
-  struct msg *new_msg = xmalloc (sizeof *m);
+  struct msg *new_msg;
 
-  *new_msg = *m;
-  new_msg->text = xstrdup(m->text);
+  new_msg = xmemdup (m, sizeof *m);
+  if (m->where.file_name != NULL)
+    new_msg->where.file_name = xstrdup (m->where.file_name);
+  new_msg->text = xstrdup (m->text);
 
   return new_msg;
 }
 
+/* Frees a message created by msg_dup().
+
+   (Messages not created by msg_dup(), as well as their where.file_name
+   members, are typically not dynamically allocated, so this function should
+   not be used to destroy them.) */
 void
-msg_destroy(struct msg *m)
+msg_destroy (struct msg *m)
 {
-  free(m->text);
-  free(m);
+  free (m->where.file_name);
+  free (m->text);
+  free (m);
 }
 
+char *
+msg_to_string (const struct msg *m, const char *command_name)
+{
+  const char *label;
+  struct string s;
+
+  ds_init_empty (&s);
+
+  if (m->category != MSG_C_GENERAL
+      && (m->where.file_name || m->where.line_number != -1))
+    {
+      if (m->where.file_name)
+        ds_put_format (&s, "%s:", m->where.file_name);
+      if (m->where.line_number != -1)
+        ds_put_format (&s, "%d:", m->where.line_number);
+      ds_put_char (&s, ' ');
+    }
+
+  switch (m->severity)
+    {
+    case MSG_S_ERROR:
+      label = _("error");
+      break;
+    case MSG_S_WARNING:
+      label = _("warning");
+      break;
+    case MSG_S_NOTE:
+    default:
+      label = _("note");
+      break;
+    }
+  ds_put_format (&s, "%s: ", label);
+
+  if (m->category == MSG_C_SYNTAX && command_name != NULL)
+    ds_put_format (&s, "%s: ", command_name);
+
+  ds_put_cstr (&s, m->text);
+
+  return ds_cstr (&s);
+}
+\f
 /* Emits M as an error message.
    Frees allocated data in M. */
 void
@@ -101,6 +152,11 @@ msg_emit (struct msg *m)
 {
   if ( s_stream )
     get_msg_location (s_stream, &m->where);
+  else
+    {
+      m->where.file_name = NULL;
+      m->where.line_number = -1;
+    }
 
   if (!messages_disabled)
      msg_handler (m);
@@ -127,22 +183,6 @@ msg_enable (void)
 \f
 /* Private functions. */
 
-/* Sets COMMAND_NAME as the command name included in some kinds
-   of error messages. */
-void
-msg_set_command_name (const char *command_name_)
-{
-  free (command_name);
-  command_name = command_name_ ? xstrdup (command_name_) : NULL;
-}
-
-/* Returns the current command name, or NULL if none. */
-const char *
-msg_get_command_name (void)
-{
-  return command_name;
-}
-
 void
 request_bug_report_and_abort (const char *msg)
 {
@@ -157,8 +197,6 @@ request_bug_report_and_abort (const char *msg)
   fprintf (stderr, "version:             %s\n", stat_version);
   fprintf (stderr, "host_system:         %s\n", host_system);
   fprintf (stderr, "build_system:        %s\n", build_system);
-  fprintf (stderr, "default_config_path: %s\n", default_config_path);
-  fprintf (stderr, "include_path:        %s\n", include_path);
   fprintf (stderr, "locale_dir:          %s\n", locale_dir);
   fprintf (stderr, "compiler version:    %s\n",
 #ifdef __VERSION__
index be4ba3e21dcba2f25e68aa98a3f1674d97dc13d9..e1fc4f5aab1235459b075ddf92e2c704c4561d62 100644 (file)
 /* What kind of message is this? */
 enum msg_category
   {
-    MSG_GENERAL,        /* General info. */
-    MSG_SYNTAX,         /* Messages that relate to syntax files. */
-    MSG_DATA            /* Messages that relate to data files. */
+    MSG_C_GENERAL,              /* General info. */
+    MSG_C_SYNTAX,               /* Messages that relate to syntax files. */
+    MSG_C_DATA,                 /* Messages that relate to data files. */
+    MSG_N_CATEGORIES
   };
 
 /* How important a condition is it? */
 enum msg_severity
   {
-    MSG_ERROR,
-    MSG_WARNING,
-    MSG_NOTE
+    MSG_S_ERROR,
+    MSG_S_WARNING,
+    MSG_S_NOTE,
+    MSG_N_SEVERITIES
   };
 
 /* Combination of a category and a severity for convenience. */
@@ -46,7 +48,6 @@ enum msg_class
     MSG_CLASS_CNT,
   };
 
-
 static inline enum msg_category
 msg_class_to_category (enum msg_class class)
 {
@@ -69,8 +70,8 @@ msg_class_from_category_and_severity (enum msg_category category,
 /* A file location.  */
 struct msg_locator
   {
-    const char *file_name;             /* File name. */
-    int line_number;                   /* Line number. */
+    char *file_name;           /* File name. */
+    int line_number;            /* Line number. */
   };
 
 /* A message. */
@@ -89,8 +90,10 @@ void msg_init (struct source_stream *, void (*handler) (const struct msg *) );
 
 void msg_done (void);
 
-struct msg * msg_dup(const struct msg *m);
-void msg_destroy(struct msg *m);
+/* Working with messages. */
+struct msg *msg_dup (const struct msg *);
+void msg_destroy(struct msg *);
+char *msg_to_string (const struct msg *, const char *command_name);
 
 /* Emitting messages. */
 void msg (enum msg_class, const char *format, ...)
@@ -102,8 +105,6 @@ void msg_enable (void);
 void msg_disable (void);
 
 /* Error context. */
-void msg_set_command_name (const char *);
-const char *msg_get_command_name (void);
 void msg_push_msg_locator (const struct msg_locator *);
 void msg_pop_msg_locator (const struct msg_locator *);
 
index 09550e29ac9c802def722eb8269d50efb9ab726d..fb8082e9217f6d7d4614b35e9a347761e8ad356a 100644 (file)
@@ -17,8 +17,9 @@
 #include <config.h>
 #include <stdlib.h>
 #include "msg-locator.h"
-#include <libpspp/message.h>
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
+#include <libpspp/message.h>
 #include "getl.h"
 
 #include "xalloc.h"
@@ -77,7 +78,7 @@ get_msg_location (const struct source_stream *ss, struct msg_locator *loc)
     }
   else
     {
-      loc->file_name = getl_source_name (ss);
+      loc->file_name = CONST_CAST (char *, getl_source_name (ss));
       loc->line_number = getl_source_location (ss);
     }
 }
index 3dd77c9ffac30f2fb85429df8a35091ce108c7ef..024fe93790e507a052e14e4990152b9b17c7ea91 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <stdbool.h>
 
 #include <libpspp/bt.h>
+#include <libpspp/cast.h>
 
 /* Returns the data structure corresponding to the given NODE,
    assuming that NODE is embedded as the given MEMBER name in
    data type STRUCT. */
 #define range_map_data(NODE, STRUCT, MEMBER)                            \
-        ((STRUCT *) ((char *) (NODE) - offsetof (STRUCT, MEMBER)))
+        (CHECK_POINTER_HAS_TYPE (NODE, struct range_map_node *),        \
+         UP_CAST (NODE, STRUCT, MEMBER))
 
 /* A range map node, to be embedded in the data value. */
 struct range_map_node
index efa3b4d670e7e06c3c560ebc64ade1bf4d45ae21..cd17fe02a4e2130544d5d37687cf46210ff2de39 100644 (file)
@@ -287,7 +287,7 @@ range_set_allocate_fully (struct range_set *rs, unsigned long int request,
 bool
 range_set_contains (const struct range_set *rs_, unsigned long int position)
 {
-  struct range_set *rs = (struct range_set *) rs_;
+  struct range_set *rs = CONST_CAST (struct range_set *, rs_);
   if (position < rs->cache_end && position >= rs->cache_start)
     return rs->cache_value;
   else
@@ -328,7 +328,7 @@ range_set_contains (const struct range_set *rs_, unsigned long int position)
 unsigned long int
 range_set_scan (const struct range_set *rs_, unsigned long int start)
 {
-  struct range_set *rs = (struct range_set *) rs_;
+  struct range_set *rs = CONST_CAST (struct range_set *, rs_);
   unsigned long int retval = ULONG_MAX;
   struct bt_node *bt_node;
 
index 941692b40029098ea8224ea4d0a4f0e1b9026385..ee7dac23137d3c39b392b13cb11c7d560c71fc79 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <stdbool.h>
 #include <libpspp/bt.h>
+#include <libpspp/cast.h>
 
 /* A set of ranges. */
 struct range_set
@@ -122,7 +123,7 @@ static inline const struct range_set_node *
 range_set_next (const struct range_set *rs, const struct range_set_node *node)
 {
   return (node != NULL
-          ? range_set_next__ (rs, (struct range_set_node *) node)
+          ? range_set_next__ (rs, CONST_CAST (struct range_set_node *, node))
           : range_set_first__ (rs));
 }
 
@@ -147,7 +148,7 @@ static inline const struct range_set_node *
 range_set_prev (const struct range_set *rs, const struct range_set_node *node)
 {
   return (node != NULL
-          ? range_set_prev__ (rs, (struct range_set_node *) node)
+          ? range_set_prev__ (rs, CONST_CAST (struct range_set_node *, node))
           : range_set_last__ (rs));
 }
 
index 28398d5cc86321e9e648a9c0ac30c052c1d26641..298f2caf9eb9ae09108aa247fc6db7b000183de1 100644 (file)
@@ -22,6 +22,7 @@
 #include <string.h>
 
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 #include <libpspp/misc.h>
 #include <libpspp/pool.h>
 
@@ -577,7 +578,7 @@ leaf_size (const struct sparse_array *spar)
 static struct leaf_node *
 find_leaf_node (const struct sparse_array *spar_, unsigned long int key)
 {
-  struct sparse_array *spar = (struct sparse_array *) spar_;
+  struct sparse_array *spar = CONST_CAST (struct sparse_array *, spar_);
   const union pointer *p;
   int level;
 
@@ -679,7 +680,7 @@ static void *
 scan_forward (const struct sparse_array *spar_, unsigned long int start,
               unsigned long int *found)
 {
-  struct sparse_array *spar = (struct sparse_array *) spar_;
+  struct sparse_array *spar = CONST_CAST (struct sparse_array *, spar_);
 
   /* Check the cache. */
   if (start >> BITS_PER_LEVEL == spar->cache_ofs)
@@ -761,7 +762,7 @@ static void *
 scan_reverse (const struct sparse_array *spar_, unsigned long int start,
               unsigned long int *found)
 {
-  struct sparse_array *spar = (struct sparse_array *) spar_;
+  struct sparse_array *spar = CONST_CAST (struct sparse_array *, spar_);
 
   /* Check the cache. */
   if (start >> BITS_PER_LEVEL == spar->cache_ofs)
index afe32de9f2049bfcc5a80ac7a95b36b348be4cb7..79f3c912e9b649cf39d3ab9a0b37510e25867bf5 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 
+#include <libpspp/cast.h>
 #include <libpspp/message.h>
 #include <libpspp/pool.h>
 
@@ -1214,13 +1215,24 @@ ds_capacity (const struct string *st)
 char *
 ds_cstr (const struct string *st_)
 {
-  struct string *st = (struct string *) st_;
+  struct string *st = CONST_CAST (struct string *, st_);
   if (st->ss.string == NULL)
     ds_extend (st, 1);
   st->ss.string[st->ss.length] = '\0';
   return st->ss.string;
 }
 
+/* Returns the value of ST as a null-terminated string and then
+   reinitialized ST as an empty string.  The caller must free the
+   returned string with free(). */
+char *
+ds_steal_cstr (struct string *st)
+{
+  char *s = ds_cstr (st);
+  ds_init_empty (st);
+  return s;
+}
+
 /* Reads characters from STREAM and appends them to ST, stopping
    after MAX_LENGTH characters, after appending a newline, or
    after an I/O error or end of file was encountered, whichever
index a134079f90dd52f7c359d7ad4fba3049c5c85203..0b57f7364e07816400b0d90f80e12376f219b821 100644 (file)
@@ -203,6 +203,7 @@ char *ds_xstrdup (const struct string *);
 
 size_t ds_capacity (const struct string *);
 char *ds_cstr (const struct string *);
+char *ds_steal_cstr (struct string *);
 
 /* File input. */
 bool ds_read_line (struct string *, FILE *, size_t max_length);
diff --git a/src/libpspp/string-array.c b/src/libpspp/string-array.c
new file mode 100644 (file)
index 0000000..b9067ab
--- /dev/null
@@ -0,0 +1,256 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "libpspp/string-array.h"
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libpspp/array.h"
+#include "libpspp/str.h"
+
+#include "gl/xalloc.h"
+
+/* Initializes SA as an initially empty array of strings. */
+void
+string_array_init (struct string_array *sa)
+{
+  sa->strings = NULL;
+  sa->n = 0;
+  sa->allocated = 0;
+}
+
+/* Initializes DST as an array of strings whose contents are initially copies
+   of the strings in SRC. */
+void
+string_array_clone (struct string_array *dst, const struct string_array *src)
+{
+  size_t i;
+
+  dst->strings = xmalloc (sizeof *dst->strings * src->n);
+  for (i = 0; i < src->n; i++)
+    dst->strings[i] = xstrdup (src->strings[i]);
+  dst->n = src->n;
+  dst->allocated = src->n;
+}
+
+/* Exchanges the contents of A and B. */
+void
+string_array_swap (struct string_array *a, struct string_array *b)
+{
+  struct string_array tmp = *a;
+  *a = *b;
+  *b = tmp;
+}
+
+/* Frees the strings in SA.  SA must be reinitialized (with
+   string_array_init()) before it is used again. */
+void
+string_array_destroy (struct string_array *sa)
+{
+  if (sa != NULL)
+    {
+      string_array_clear (sa);
+      free (sa->strings);
+    }
+}
+
+/* Returns true if SA contains at least one copy of STRING, otherwise false.
+
+   This function runs in O(n) time in the number of strings in SA. */
+bool
+string_array_contains (const struct string_array *sa, const char *string)
+{
+  return string_array_find (sa, string) != SIZE_MAX;
+}
+
+/* If SA contains at least one copy of STRING, returns the smallest index of
+   any of those copies.  If SA does not contain STRING, returns SIZE_MAX.
+
+   This function runs in O(n) time in the number of strings in SA. */
+size_t
+string_array_find (const struct string_array *sa, const char *string)
+{
+  size_t i;
+
+  for (i = 0; i < sa->n; i++)
+    if (!strcmp (sa->strings[i], string))
+      return i;
+  return SIZE_MAX;
+}
+
+/* Appends a copy of STRING to SA.  The caller retains ownership of STRING. */
+void
+string_array_append (struct string_array *sa, const char *string)
+{
+  string_array_insert (sa, string, sa->n);
+}
+
+/* Appends STRING to SA.  Ownership of STRING transfers to SA. */
+void
+string_array_append_nocopy (struct string_array *sa, char *string)
+{
+  string_array_insert_nocopy (sa, string, sa->n);
+}
+
+/* Inserts a copy of STRING in SA just before the string with index BEFORE,
+   which must be less than or equal to the number of strings in SA.  The caller
+   retains ownership of STRING.
+
+   In general, this function runs in O(n) time in the number of strings that
+   must be shifted to higher indexes; if BEFORE is the number of strings in SA,
+   it runs in amortized constant time. */
+void
+string_array_insert (struct string_array *sa,
+                     const char *string, size_t before)
+{
+  string_array_insert_nocopy (sa, xstrdup (string), before);
+}
+
+static void
+string_array_expand__ (struct string_array *sa)
+{
+  if (sa->n >= sa->allocated)
+    sa->strings = x2nrealloc (sa->strings, &sa->allocated,
+                              sizeof *sa->strings);
+}
+
+/* Inserts STRING in SA just before the string with index BEFORE, which must be
+   less than or equal to the number of strings in SA.  Ownership of STRING
+   transfers to SA.
+
+   In general, this function runs in O(n) time in the number of strings that
+   must be shifted to higher indexes; if BEFORE is the number of strings in SA,
+   it runs in amortized constant time. */
+void
+string_array_insert_nocopy (struct string_array *sa, char *string,
+                            size_t before)
+{
+  string_array_expand__ (sa);
+  if (before < sa->n)
+    insert_element (sa->strings, sa->n, sizeof *sa->strings, before);
+
+  sa->strings[before] = string;
+  sa->n++;
+}
+
+/* Deletes from SA the string with index IDX, which must be less than the
+   number of strings in SA, and shifts down the strings with higher indexes.
+   Frees the string.
+
+   In general, this function runs in O(n) time in the number of strings that
+   must be shifted to lower indexes.  If IDX is the last string in SA, it runs
+   in amortized constant time. */
+void
+string_array_delete (struct string_array *sa, size_t idx)
+{
+  free (string_array_delete_nofree (sa, idx));
+}
+
+/* Deletes from SA the string with index IDX, which must be less than the
+   number of strings in SA.  Returns the string, which the caller is
+   responsible for freeing with free().
+
+   In general, this function runs in O(n) time in the number of strings that
+   must be shifted to lower indexes.  If IDX is the last string in SA, it runs
+   in amortized constant time. */
+char *
+string_array_delete_nofree (struct string_array *sa, size_t idx)
+{
+  char *s = sa->strings[idx];
+  if (idx != sa->n - 1)
+    remove_element (sa->strings, sa->n, sizeof *sa->strings, idx);
+  sa->n--;
+  return s;
+}
+
+/* Deletes all of the strings from SA and frees them. */
+void
+string_array_clear (struct string_array *sa)
+{
+  size_t i;
+
+  for (i = 0; i < sa->n; i++)
+    free (sa->strings[i]);
+  sa->n = 0;
+}
+
+/* Ensures that 'sa->strings[sa->n]' is a null pointer (until SA is modified
+   further). */
+void
+string_array_terminate_null (struct string_array *sa)
+{
+  string_array_expand__ (sa);
+  sa->strings[sa->n] = NULL;
+}
+
+/* Reduces the amount of memory allocated for SA's strings to the minimum
+   necessary. */
+void
+string_array_shrink (struct string_array *sa)
+{
+  if (sa->allocated > sa->n)
+    {
+      if (sa->n > 0)
+        sa->strings = xrealloc (sa->strings, sa->n * sizeof *sa->strings);
+      else
+        {
+          free (sa->strings);
+          sa->strings = NULL;
+        }
+      sa->allocated = sa->n;
+    }
+}
+
+static int
+compare_strings (const void *a_, const void *b_)
+{
+  const void *const *a = a_;
+  const void *const *b = b_;
+
+  return strcmp (*a, *b);
+}
+
+/* Sorts the strings in SA into order according to strcmp(). */
+void
+string_array_sort (struct string_array *sa)
+{
+  qsort (sa->strings, sa->n, sizeof *sa->strings, compare_strings);
+}
+
+/* Returns a single string that consists of each of the strings in SA
+   concatenated, separated from each other with SEPARATOR.
+
+   The caller is responsible for freeing the returned string with free(). */
+char *
+string_array_join (const struct string_array *sa, const char *separator)
+{
+  struct string dst;
+  const char *s;
+  size_t i;
+
+  ds_init_empty (&dst);
+  STRING_ARRAY_FOR_EACH (s, i, sa)
+    {
+      if (i > 0)
+        ds_put_cstr (&dst, separator);
+      ds_put_cstr (&dst, s);
+    }
+  return ds_steal_cstr (&dst);
+}
diff --git a/src/libpspp/string-array.h b/src/libpspp/string-array.h
new file mode 100644 (file)
index 0000000..f3ec042
--- /dev/null
@@ -0,0 +1,96 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LIBPSPP_STRING_ARRAY_H
+#define LIBPSPP_STRING_ARRAY_H
+
+#include <stdbool.h>
+#include <stddef.h>
+
+/* An unordered array of strings.
+
+   Not opaque by any means. */
+struct string_array
+  {
+    char **strings;
+    size_t n;
+    size_t allocated;
+  };
+
+/* Suitable for use as the initializer for a string_array named ARRAY.  Typical
+   usage:
+       struct string_array array = STRING_ARRAY_INITIALIZER (array);
+   STRING_ARRAY_INITIALIZER is an alternative to calling string_array_init. */
+#define STRING_ARRAY_INITIALIZER(ARRAY) { NULL, 0, 0 }
+
+void string_array_init (struct string_array *);
+void string_array_clone (struct string_array *, const struct string_array *);
+void string_array_swap (struct string_array *, struct string_array *);
+void string_array_destroy (struct string_array *);
+
+static inline size_t string_array_count (const struct string_array *);
+static inline bool string_array_is_empty (const struct string_array *);
+
+bool string_array_contains (const struct string_array *, const char *);
+size_t string_array_find (const struct string_array *, const char *);
+
+void string_array_append (struct string_array *, const char *);
+void string_array_append_nocopy (struct string_array *, char *);
+void string_array_insert (struct string_array *, const char *, size_t before);
+void string_array_insert_nocopy (struct string_array *, char *, size_t before);
+void string_array_delete (struct string_array *, size_t idx);
+char *string_array_delete_nofree (struct string_array *, size_t idx);
+
+void string_array_clear (struct string_array *);
+
+void string_array_terminate_null (struct string_array *);
+void string_array_shrink (struct string_array *);
+
+void string_array_sort (struct string_array *);
+
+char *string_array_join (const struct string_array *, const char *separator);
+
+/* Macros for conveniently iterating through a string_array, e.g. to print all
+   of the strings in "my_array":
+
+   const char *string;
+   size_t idx;
+
+   STRING_ARRAY_FOR_EACH (string, idx, &my_array)
+     puts (string);
+*/
+#define STRING_ARRAY_FOR_EACH(STRING, IDX, ARRAY)                  \
+  for ((IDX) = 0;                                                  \
+       ((IDX) < (ARRAY)->n                                         \
+        ? ((STRING) = (ARRAY)->strings[IDX], true)                 \
+        : false);                                                  \
+       (IDX)++)
+\f
+/* Returns the number of strings currently in ARRAY. */
+static inline size_t
+string_array_count (const struct string_array *array)
+{
+  return array->n;
+}
+
+/* Returns true if ARRAY currently contains no strings, false otherwise. */
+static inline bool
+string_array_is_empty (const struct string_array *array)
+{
+  return array->n == 0;
+}
+
+#endif /* libpspp/string-array.h */
diff --git a/src/libpspp/string-map.c b/src/libpspp/string-map.c
new file mode 100644 (file)
index 0000000..4812479
--- /dev/null
@@ -0,0 +1,366 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <libpspp/string-map.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <libpspp/hash-functions.h>
+#include <libpspp/string-set.h>
+
+#include "gl/xalloc.h"
+
+static struct string_map_node *string_map_find_node__ (
+  const struct string_map *, const char *key, unsigned int hash);
+static bool string_map_delete__ (struct string_map *, const char *key,
+                                 unsigned int hash);
+static struct string_map_node *string_map_insert__ (struct string_map *,
+                                                    char *key, char *value,
+                                                    unsigned int hash);
+
+/* Sets NODE's value to a copy of NEW_VALUE and returns the node's previous
+   value.  The caller is responsible for freeing the returned string (with
+   free()). */
+char *
+string_map_node_swap_value (struct string_map_node *node,
+                            const char *new_value)
+{
+  return string_map_node_swap_value_nocopy (node, xstrdup (new_value));
+}
+
+/* Sets NODE's value to NEW_VALUE, which must be a malloc()'d string,
+   transferring ownership of NEW_VALUE to the node.  Returns the node's
+   previous value, which the caller is responsible for freeing (with
+   free()). */
+char *
+string_map_node_swap_value_nocopy (struct string_map_node *node,
+                                   char *new_value)
+{
+  char *old_value = node->value;
+  node->value = new_value;
+  return old_value;
+}
+
+/* Replaces NODE's value by a copy of VALUE. */
+void
+string_map_node_set_value (struct string_map_node *node, const char *value)
+{
+  string_map_node_set_value_nocopy (node, xstrdup (value));
+}
+
+/* Replaces NODE's value by VALUE, which must be a malloc()'d string,
+   transferring ownership of VALUE to the node.. */
+void
+string_map_node_set_value_nocopy (struct string_map_node *node, char *value)
+{
+  free (node->value);
+  node->value = value;
+}
+
+/* Frees NODE and and its key and value.  Ordinarily nodes are owned by
+   string_maps, but this function should only be used by a caller that owns
+   NODE, such as one that has called string_map_delete_nofree() for the
+   node. */
+void
+string_map_node_destroy (struct string_map_node *node)
+{
+  free (node->key);
+  free (node->value);
+  free (node);
+}
+\f
+/* Initializes MAP as an initially empty string map. */
+void
+string_map_init (struct string_map *map)
+{
+  hmap_init (&map->hmap);
+}
+
+/* Initializes MAP as a new string map that initially contains the same pairs
+   as OLD. */
+void
+string_map_clone (struct string_map *map, const struct string_map *old)
+{
+  const struct string_map_node *node;
+  const char *key, *value;
+
+  string_map_init (map);
+  hmap_reserve (&map->hmap, string_map_count (old));
+  STRING_MAP_FOR_EACH_KEY_VALUE (key, value, node, old)
+    string_map_insert__ (map, xstrdup (key), xstrdup (value),
+                         node->hmap_node.hash);
+}
+
+/* Exchanges the contents of string maps A and B. */
+void
+string_map_swap (struct string_map *a, struct string_map *b)
+{
+  hmap_swap (&a->hmap, &b->hmap);
+}
+
+/* Frees MAP and its nodes and key-value pairs. */
+void
+string_map_destroy (struct string_map *map)
+{
+  if (map != NULL)
+    {
+      string_map_clear (map);
+      hmap_destroy (&map->hmap);
+    }
+}
+
+/* Returns true if MAP contains KEY as a key, otherwise false. */
+bool
+string_map_contains (const struct string_map *map, const char *key)
+{
+  return string_map_find_node (map, key) != NULL;
+}
+
+/* If MAP contains KEY as a key, returns the corresponding value.  Otherwise,
+   returns a null pointer. */
+const char *
+string_map_find (const struct string_map *map, const char *key)
+{
+  const struct string_map_node *node = string_map_find_node (map, key);
+  return node != NULL ? node->value : NULL;
+}
+
+/* If MAP contains KEY as a key, returns the corresponding node.  Otherwise,
+   returns a null pointer. */
+struct string_map_node *
+string_map_find_node (const struct string_map *map, const char *key)
+{
+  return string_map_find_node__ (map, key, hash_string (key, 0));
+}
+
+/* If MAP contains KEY as a key, deletes that key's node and returns its value,
+   which the caller is responsible for freeing (using free()).  Otherwise,
+   returns a null pointer. */
+char *
+string_map_find_and_delete (struct string_map *map, const char *key)
+{
+  struct string_map_node *node = string_map_find_node (map, key);
+  char *value = NULL;
+  if (node != NULL)
+    {
+      value = node->value;
+      node->value = NULL;
+      string_map_delete_node (map, node);
+    }
+  return value;
+}
+
+/* If MAP does not contain KEY as a key, inserts a new node containing copies
+   of KEY and VALUE and returns the new node.  Otherwise, returns the existing
+   node that contains KEY. */
+struct string_map_node *
+string_map_insert (struct string_map *map, const char *key, const char *value)
+{
+  unsigned int hash = hash_string (key, 0);
+  struct string_map_node *node = string_map_find_node__ (map, key, hash);
+  if (node == NULL)
+    node = string_map_insert__ (map, xstrdup (key), xstrdup (value), hash);
+  return node;
+}
+
+/* If MAP does not contain KEY as a key, inserts a new node containing KEY and
+   VALUE and returns the new node.  Otherwise, returns the existing node that
+   contains KEY.  Either way, ownership of KEY and VALUE is transferred to
+   MAP. */
+struct string_map_node *
+string_map_insert_nocopy (struct string_map *map, char *key, char *value)
+{
+  unsigned int hash = hash_string (key, 0);
+  struct string_map_node *node = string_map_find_node__ (map, key, hash);
+  if (node == NULL)
+    node = string_map_insert__ (map, key, value, hash);
+  else
+    {
+      free (key);
+      free (value);
+    }
+  return node;
+}
+
+/* If MAP does not contain KEY as a key, inserts a new node containing copies
+   of KEY and VALUE.  Otherwise, replaces the existing node's value by a copy
+   of VALUE.  Returns the node. */
+struct string_map_node *
+string_map_replace (struct string_map *map, const char *key, const char *value)
+{
+  unsigned int hash = hash_string (key, 0);
+  struct string_map_node *node = string_map_find_node__ (map, key, hash);
+  if (node == NULL)
+    node = string_map_insert__ (map, xstrdup (key), xstrdup (value), hash);
+  else
+    string_map_node_set_value (node, value);
+  return node;
+}
+
+/* If MAP does not contain KEY as a key, inserts a new node containing KEY and
+   VALUE.  Otherwise, replaces the existing node's value by VALUE.  Either way,
+   ownership of KEY and VALUE is transferred to MAP.  Returns the node. */
+struct string_map_node *
+string_map_replace_nocopy (struct string_map *map, char *key, char *value)
+{
+  unsigned int hash = hash_string (key, 0);
+  struct string_map_node *node = string_map_find_node__ (map, key, hash);
+  if (node == NULL)
+    node = string_map_insert__ (map, key, value, hash);
+  else
+    {
+      free (key);
+      string_map_node_set_value_nocopy (node, value);
+    }
+  return node;
+}
+
+/* Searches MAP for a node with KEY as its key.  If found, deletes the node
+   and its key and value and returns true.  Otherwise, returns false without
+   modifying MAP. */
+bool
+string_map_delete (struct string_map *map, const char *key)
+{
+  return string_map_delete__ (map, key, hash_string (key, 0));
+}
+
+/* Deletes NODE from MAP and destroys the node and its key and value. */
+void
+string_map_delete_node (struct string_map *map, struct string_map_node *node)
+{
+  string_map_delete_nofree (map, node);
+  string_map_node_destroy (node);
+}
+
+/* Deletes NODE from MAP.  Transfers ownership of NODE to the caller, which
+   becomes responsible for destroying it. */
+void
+string_map_delete_nofree (struct string_map *map, struct string_map_node *node)
+{
+  hmap_delete (&map->hmap, &node->hmap_node);
+}
+
+/* Removes all nodes from MAP and frees them and their keys and values. */
+void
+string_map_clear (struct string_map *map)
+{
+  struct string_map_node *node, *next;
+
+  STRING_MAP_FOR_EACH_NODE_SAFE (node, next, map)
+    string_map_delete_node (map, node);
+}
+
+/* Inserts a copy of each of the nodes in SRC into DST.  When SRC and DST both
+   have a particular key, the value in DST's node is left unchanged. */
+void
+string_map_insert_map (struct string_map *dst, const struct string_map *src)
+{
+  const struct string_map_node *node;
+
+  STRING_MAP_FOR_EACH_NODE (node, src)
+    {
+      if (!string_map_find_node__ (dst, node->key, node->hmap_node.hash))
+        string_map_insert__ (dst, xstrdup (node->key), xstrdup (node->value),
+                             node->hmap_node.hash);
+    }
+}
+
+/* Inserts a copy of each of the nodes in SRC into DST.  When SRC and DST both
+   have a particular key, the value in DST's node is replaced by a copy of the
+   value in SRC's node. */
+void
+string_map_replace_map (struct string_map *dst, const struct string_map *src)
+{
+  const struct string_map_node *snode;
+
+  STRING_MAP_FOR_EACH_NODE (snode, src)
+    {
+      struct string_map_node *dnode;
+      dnode = string_map_find_node__ (dst, snode->key, snode->hmap_node.hash);
+      if (dnode != NULL)
+        string_map_node_set_value (dnode, snode->value);
+      else
+        string_map_insert__ (dst, xstrdup (snode->key), xstrdup (snode->value),
+                             snode->hmap_node.hash);
+    }
+}
+
+/* Inserts each of the keys in MAP into KEYS.  KEYS must already have been
+   initialized (using string_set_init()). */
+void
+string_map_get_keys (const struct string_map *map, struct string_set *keys)
+{
+  const struct string_map_node *node;
+  const char *key;
+
+  STRING_MAP_FOR_EACH_KEY (key, node, map)
+    string_set_insert (keys, key);
+}
+
+/* Inserts each of the values in MAP into VALUES.  VALUES must already have
+   been initialized (using string_set_init()). */
+void
+string_map_get_values (const struct string_map *map, struct string_set *values)
+{
+  const struct string_map_node *node;
+  const char *value;
+
+  STRING_MAP_FOR_EACH_VALUE (value, node, map)
+    string_set_insert (values, value);
+}
+\f
+static struct string_map_node *
+string_map_find_node__ (const struct string_map *map, const char *key,
+                        unsigned int hash)
+{
+  struct string_map_node *node;
+
+  HMAP_FOR_EACH_WITH_HASH (node, struct string_map_node, hmap_node,
+                           hash, &map->hmap)
+    if (!strcmp (key, node->key))
+      return node;
+
+  return NULL;
+}
+
+static bool
+string_map_delete__ (struct string_map *map, const char *key,
+                     unsigned int hash)
+{
+  struct string_map_node *node = string_map_find_node__ (map, key, hash);
+  if (node != NULL)
+    {
+      string_map_delete_node (map, node);
+      return true;
+    }
+  else
+    return false;
+}
+
+static struct string_map_node *
+string_map_insert__ (struct string_map *map, char *key, char *value,
+                     unsigned int hash)
+{
+  struct string_map_node *node = xmalloc (sizeof *node);
+  node->key = key;
+  node->value = value;
+  hmap_insert (&map->hmap, &node->hmap_node, hash);
+  return node;
+}
+
diff --git a/src/libpspp/string-map.h b/src/libpspp/string-map.h
new file mode 100644 (file)
index 0000000..f8ffabc
--- /dev/null
@@ -0,0 +1,213 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LIBPSPP_STRING_MAP_H
+#define LIBPSPP_STRING_MAP_H
+
+/* Map from a unique string key to a string value.
+
+   This is a convenient wrapper around a "struct hmap" for storing string
+   key-value pairs. */
+
+#include <stdbool.h>
+#include <libpspp/hmap.h>
+
+struct string_set;
+
+/* A node within a string map. */
+struct string_map_node
+  {
+    struct hmap_node hmap_node;
+    char *key;
+    char *value;
+  };
+
+/* Returns the string key within NODE.  The caller must not modify or free the
+   returned string. */
+static inline const char *
+string_map_node_get_key (const struct string_map_node *node)
+{
+  return node->key;
+}
+
+/* Returns the string key within NODE.  The caller must not free the returned
+   string. */
+static inline const char *
+string_map_node_get_value (const struct string_map_node *node)
+{
+  return node->value;
+}
+
+/* Returns the string key within NODE.  The caller must not free the returned
+   string. */
+static inline char *
+string_map_node_get_value_rw (struct string_map_node *node)
+{
+  return node->value;
+}
+
+char *string_map_node_swap_value (struct string_map_node *,
+                                  const char *new_value);
+char *string_map_node_swap_value_nocopy (struct string_map_node *,
+                                         char *new_value);
+void string_map_node_set_value (struct string_map_node *, const char *value);
+void string_map_node_set_value_nocopy (struct string_map_node *, char *value);
+void string_map_node_destroy (struct string_map_node *);
+\f
+/* Unordered map from unique string keys to string values. */
+struct string_map
+  {
+    struct hmap hmap;
+  };
+
+/* Suitable for use as the initializer for a string_map named MAP.  Typical
+   usage:
+       struct string_map map = STRING_MAP_INITIALIZER (map);
+   STRING_MAP_INITIALIZER is an alternative to calling string_map_init. */
+#define STRING_MAP_INITIALIZER(MAP) { HMAP_INITIALIZER ((MAP).hmap) }
+
+void string_map_init (struct string_map *);
+void string_map_clone (struct string_map *, const struct string_map *);
+void string_map_swap (struct string_map *, struct string_map *);
+void string_map_destroy (struct string_map *);
+
+static inline size_t string_map_count (const struct string_map *);
+static inline bool string_map_is_empty (const struct string_map *);
+
+bool string_map_contains (const struct string_map *, const char *);
+const char *string_map_find (const struct string_map *, const char *);
+struct string_map_node *string_map_find_node (const struct string_map *,
+                                              const char *);
+char *string_map_find_and_delete (struct string_map *, const char *key);
+
+struct string_map_node *string_map_insert (struct string_map *,
+                                           const char *key, const char *value);
+struct string_map_node *string_map_insert_nocopy (struct string_map *,
+                                                  char *key, char *value);
+struct string_map_node *string_map_replace (struct string_map *,
+                                           const char *key, const char *value);
+struct string_map_node *string_map_replace_nocopy (struct string_map *,
+                                                   char *key, char *value);
+bool string_map_delete (struct string_map *, const char *);
+void string_map_delete_node (struct string_map *, struct string_map_node *);
+void string_map_delete_nofree (struct string_map *, struct string_map_node *);
+
+void string_map_clear (struct string_map *);
+void string_map_insert_map (struct string_map *, const struct string_map *);
+void string_map_replace_map (struct string_map *, const struct string_map *);
+
+void string_map_get_keys (const struct string_map *, struct string_set *);
+void string_map_get_values (const struct string_map *, struct string_set *);
+
+static inline struct string_map_node *string_map_first (
+  const struct string_map *);
+static inline struct string_map_node *string_map_next (
+  const struct string_map *, const struct string_map_node *);
+
+/* Macros for conveniently iterating through a string_map, e.g. to print all of
+   the key-value pairs in "my_map":
+
+   struct string_map_node *node;
+   const char *key, *value;
+
+   STRING_MAP_FOR_EACH_KEY_VALUE (key, value, node, &my_map)
+     printf ("%s=%s\n", key, value);
+   */
+#define STRING_MAP_FOR_EACH_NODE(NODE, MAP)                     \
+        for ((NODE) = string_map_first (MAP); (NODE) != NULL;   \
+             (NODE) = string_map_next (MAP, NODE))
+#define STRING_MAP_FOR_EACH_NODE_SAFE(NODE, NEXT, MAP)          \
+        for ((NODE) = string_map_first (MAP);                   \
+             ((NODE) != NULL                                    \
+              && ((NEXT) = string_map_next (MAP, NODE), 1));    \
+             (NODE) = (NEXT))
+#define STRING_MAP_FOR_EACH_KEY(KEY, NODE, MAP)                 \
+        for ((NODE) = string_map_first (MAP);                   \
+             ((NODE) != NULL                                    \
+              && ((KEY) = string_map_node_get_key (NODE), 1));  \
+             (NODE) = string_map_next (MAP, NODE))
+#define STRING_MAP_FOR_EACH_KEY_SAFE(KEY, NODE, NEXT, MAP)      \
+        for ((NODE) = string_map_first (MAP);                   \
+             ((NODE) != NULL                                    \
+              && ((KEY) = string_map_node_get_key (NODE), 1)    \
+              && ((NEXT) = string_map_next (MAP, NODE), 1));    \
+             (NODE) = (NEXT))
+#define STRING_MAP_FOR_EACH_VALUE(VALUE, NODE, MAP)     \
+        for ((NODE) = string_map_first (MAP);           \
+             ((NODE) != NULL                            \
+              && ((VALUE) = (NODE)->value, 1));         \
+             (NODE) = string_map_next (MAP, NODE))
+#define STRING_MAP_FOR_EACH_VALUE_SAFE(VALUE, NODE, NEXT, MAP)  \
+        for ((NODE) = string_map_first (MAP);                   \
+             ((NODE) != NULL                                    \
+              && ((VALUE) = (NODE)->value, 1)                   \
+              && ((NEXT) = string_map_next (MAP, NODE), 1));    \
+             (NODE) = (NEXT))
+#define STRING_MAP_FOR_EACH_KEY_VALUE(KEY, VALUE, NODE, MAP)    \
+        for ((NODE) = string_map_first (MAP);                   \
+             ((NODE) != NULL                                    \
+              && ((KEY) = string_map_node_get_key (NODE), 1)    \
+              && ((VALUE) = (NODE)->value, 1));                 \
+             (NODE) = string_map_next (MAP, NODE))
+#define STRING_MAP_FOR_EACH_KEY_VALUE_SAFE(KEY, VALUE, NODE, NEXT, MAP) \
+        for ((NODE) = string_map_first (MAP);                           \
+             ((NODE) != NULL                                            \
+              && ((KEY) = string_map_node_get_key (NODE), 1)            \
+              && ((VALUE) = (NODE)->value, 1)                           \
+              && ((NEXT) = string_map_next (MAP, NODE), 1));            \
+             (NODE) = (NEXT))
+\f
+/* Returns the number of key-value pairs currently in MAP. */
+static inline size_t
+string_map_count (const struct string_map *map)
+{
+  return hmap_count (&map->hmap);
+}
+
+/* Returns true if MAP currently contains no key-value pairs, false
+   otherwise. */
+static inline bool
+string_map_is_empty (const struct string_map *map)
+{
+  return hmap_is_empty (&map->hmap);
+}
+
+/* Returns the first node in MAP, or a null pointer if MAP is empty.  See the
+   hmap_first function for information about complexity (O(1) amortized) and
+   ordering (arbitrary).
+
+   The STRING_MAP_FOR_EACH family of macros provide convenient ways to iterate
+   over all the nodes in a string map. */
+static inline struct string_map_node *
+string_map_first (const struct string_map *map)
+{
+  return HMAP_FIRST (struct string_map_node, hmap_node, &map->hmap);
+}
+
+/* Returns the next node in MAP following NODE, or a null pointer if NODE is
+   the last node in MAP.  See the hmap_next function for information about
+   complexity (O(1) amortized) and ordering (arbitrary).
+
+   The STRING_MAP_FOR_EACH family of macros provide convenient ways to iterate
+   over all the nodes in a string map. */
+static inline struct string_map_node *
+string_map_next (const struct string_map *map,
+                 const struct string_map_node *node)
+{
+  return HMAP_NEXT (node, struct string_map_node, hmap_node, &map->hmap);
+}
+
+#endif /* libpspp/string-map.h */
diff --git a/src/libpspp/string-set.c b/src/libpspp/string-set.c
new file mode 100644 (file)
index 0000000..3fd370d
--- /dev/null
@@ -0,0 +1,261 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+/* If you add routines in this file, please add a corresponding test to
+   string-set-test.c. */
+
+#include <config.h>
+
+#include <libpspp/string-set.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <libpspp/hash-functions.h>
+
+#include "gl/xalloc.h"
+
+static struct string_set_node *string_set_find_node__ (
+  const struct string_set *, const char *, unsigned int hash);
+static void string_set_insert__ (struct string_set *, char *,
+                                 unsigned int hash);
+static bool string_set_delete__ (struct string_set *, const char *,
+                                 unsigned int hash);
+
+/* Initializes SET as a new string set that is initially empty. */
+void
+string_set_init (struct string_set *set)
+{
+  hmap_init (&set->hmap);
+}
+
+/* Initializes SET as a new string set that initially contains the same strings
+   as OLD. */
+void
+string_set_clone (struct string_set *set, const struct string_set *old)
+{
+  const struct string_set_node *node;
+  const char *s;
+
+  string_set_init (set);
+  hmap_reserve (&set->hmap, string_set_count (old));
+  STRING_SET_FOR_EACH (s, node, old)
+    string_set_insert__ (set, xstrdup (s), node->hmap_node.hash);
+}
+
+/* Exchanges the contents of string sets A and B. */
+void
+string_set_swap (struct string_set *a, struct string_set *b)
+{
+  hmap_swap (&a->hmap, &b->hmap);
+}
+
+/* Frees SET and its nodes and strings. */
+void
+string_set_destroy (struct string_set *set)
+{
+  if (set != NULL)
+    {
+      string_set_clear (set);
+      hmap_destroy (&set->hmap);
+    }
+}
+
+/* Returns true if SET contains S, false otherwise. */
+bool
+string_set_contains (const struct string_set *set, const char *s)
+{
+  return string_set_find_node (set, s) != NULL;
+}
+
+/* Returns the node in SET that contains S, or a null pointer if SET does not
+   contain S. */
+struct string_set_node *
+string_set_find_node (const struct string_set *set, const char *s)
+{
+  return string_set_find_node__ (set, s, hash_string (s, 0));
+}
+
+/* Inserts a copy of S into SET.  Returns true if successful, false if SET
+   is unchanged because it already contained S. */
+bool
+string_set_insert (struct string_set *set, const char *s)
+{
+  unsigned int hash = hash_string (s, 0);
+  if (!string_set_find_node__ (set, s, hash))
+    {
+      string_set_insert__ (set, xstrdup (s), hash);
+      return true;
+    }
+  else
+    return false;
+}
+
+/* Inserts S, which must be a malloc'd string, into SET, transferring ownership
+   of S to SET.  Returns true if successful, false if SET is unchanged because
+   it already contained a copy of S.  (In the latter case, S is freed.) */
+bool
+string_set_insert_nocopy (struct string_set *set, char *s)
+{
+  unsigned int hash = hash_string (s, 0);
+  if (!string_set_find_node__ (set, s, hash))
+    {
+      string_set_insert__ (set, s, hash);
+      return true;
+    }
+  else
+    {
+      free (s);
+      return false;
+    }
+}
+
+/* Deletes S from SET.  Returns true if successful, false if SET is unchanged
+   because it did not contain a copy of S. */
+bool
+string_set_delete (struct string_set *set, const char *s)
+{
+  return string_set_delete__ (set, s, hash_string (s, 0));
+}
+
+/* Deletes NODE from SET, and frees NODE and its string. */
+void
+string_set_delete_node (struct string_set *set, struct string_set_node *node)
+{
+  free (string_set_delete_nofree (set, node));
+}
+
+/* Deletes NODE from SET and frees NODE.  Returns the string that NODE
+   contained, transferring ownership to the caller. */
+char *
+string_set_delete_nofree (struct string_set *set, struct string_set_node *node)
+{
+  char *string = node->string;
+  hmap_delete (&set->hmap, &node->hmap_node);
+  free (node);
+  return string;
+}
+
+/* Removes all nodes from SET. */
+void
+string_set_clear (struct string_set *set)
+{
+  struct string_set_node *node, *next;
+
+  HMAP_FOR_EACH_SAFE (node, next, struct string_set_node, hmap_node,
+                      &set->hmap)
+    string_set_delete_node (set, node);
+}
+
+/* Calculates A = union(A, B).
+
+   If B may be modified, string_set_union_and_intersection() is
+   faster than this function. */
+void
+string_set_union (struct string_set *a, const struct string_set *b)
+{
+  struct string_set_node *node;
+  HMAP_FOR_EACH (node, struct string_set_node, hmap_node, &b->hmap)
+    if (!string_set_find_node__ (a, node->string, node->hmap_node.hash))
+      string_set_insert__ (a, xstrdup (node->string), node->hmap_node.hash);
+}
+
+/* Calculates A = union(A, B) and B = intersect(A, B).
+
+   If only the intersection is needed, string_set_intersect() is
+   faster. */
+void
+string_set_union_and_intersection (struct string_set *a, struct string_set *b)
+{
+  struct string_set_node *node, *next;
+
+  HMAP_FOR_EACH_SAFE (node, next, struct string_set_node, hmap_node,
+                      &b->hmap)
+    if (!string_set_find_node__ (a, node->string, node->hmap_node.hash))
+      {
+        hmap_delete (&b->hmap, &node->hmap_node);
+        hmap_insert (&a->hmap, &node->hmap_node, node->hmap_node.hash);
+      }
+}
+
+/* Calculates A = intersect(A, B). */
+void
+string_set_intersect (struct string_set *a, const struct string_set *b)
+{
+  struct string_set_node *node, *next;
+
+  HMAP_FOR_EACH_SAFE (node, next, struct string_set_node, hmap_node,
+                      &a->hmap)
+    if (!string_set_find_node__ (b, node->string, node->hmap_node.hash))
+      string_set_delete_node (a, node);
+}
+
+/* Removes from A all of the strings in B. */
+void
+string_set_subtract (struct string_set *a, const struct string_set *b)
+{
+  struct string_set_node *node, *next;
+
+  if (string_set_count (a) < string_set_count (b))
+    {
+      HMAP_FOR_EACH_SAFE (node, next, struct string_set_node, hmap_node,
+                          &a->hmap)
+        if (string_set_find_node__ (b, node->string, node->hmap_node.hash))
+          string_set_delete_node (a, node);
+    }
+  else
+    {
+      HMAP_FOR_EACH (node, struct string_set_node, hmap_node, &b->hmap)
+        string_set_delete__ (a, node->string, node->hmap_node.hash);
+    }
+}
+\f
+/* Internal functions. */
+
+static struct string_set_node *
+string_set_find_node__ (const struct string_set *set, const char *s,
+                        unsigned int hash)
+{
+  struct string_set_node *node;
+
+  HMAP_FOR_EACH_WITH_HASH (node, struct string_set_node, hmap_node,
+                           hash, &set->hmap)
+    if (!strcmp (s, node->string))
+      return node;
+
+  return NULL;
+}
+
+static void
+string_set_insert__ (struct string_set *set, char *s, unsigned int hash)
+{
+  struct string_set_node *node = xmalloc (sizeof *node);
+  node->string = s;
+  hmap_insert (&set->hmap, &node->hmap_node, hash);
+}
+
+static bool
+string_set_delete__ (struct string_set *set, const char *s, unsigned int hash)
+{
+  struct string_set_node *node = string_set_find_node__ (set, s, hash);
+  if (node != NULL)
+    {
+      string_set_delete_node (set, node);
+      return true;
+    }
+  else
+    return false;
+}
diff --git a/src/libpspp/string-set.h b/src/libpspp/string-set.h
new file mode 100644 (file)
index 0000000..a604e15
--- /dev/null
@@ -0,0 +1,148 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LIBPSPP_STRING_SET_H
+#define LIBPSPP_STRING_SET_H
+
+/* Set of unique strings.
+
+   This is a convenient wrapper around a "struct hmap" for storing strings. */
+
+#include <stdbool.h>
+#include <libpspp/hmap.h>
+
+/* A node in the string set. */
+struct string_set_node
+  {
+    struct hmap_node hmap_node;
+    char *string;
+  };
+
+/* Returns the string within NODE.  The caller must not modify or free the
+   returned string. */
+static inline const char *
+string_set_node_get_string (const struct string_set_node *node)
+{
+  return node->string;
+}
+\f
+/* An unordered set of unique strings. */
+struct string_set
+  {
+    struct hmap hmap;
+  };
+
+/* Suitable for use as the initializer for a string_set named SET.  Typical
+   usage:
+       struct string_set set = STRING_SET_INITIALIZER (set);
+   STRING_SET_INITIALIZER is an alternative to calling string_set_init. */
+#define STRING_SET_INITIALIZER(SET) { HMAP_INITIALIZER ((SET).hmap) }
+
+void string_set_init (struct string_set *);
+void string_set_clone (struct string_set *, const struct string_set *);
+void string_set_swap (struct string_set *, struct string_set *);
+void string_set_destroy (struct string_set *);
+
+static inline size_t string_set_count (const struct string_set *);
+static inline bool string_set_is_empty (const struct string_set *);
+
+bool string_set_contains (const struct string_set *, const char *);
+struct string_set_node *string_set_find_node (const struct string_set *,
+                                              const char *);
+
+bool string_set_insert (struct string_set *, const char *);
+bool string_set_insert_nocopy (struct string_set *, char *);
+bool string_set_delete (struct string_set *, const char *);
+void string_set_delete_node (struct string_set *, struct string_set_node *);
+char *string_set_delete_nofree (struct string_set *, struct string_set_node *);
+
+void string_set_clear (struct string_set *);
+void string_set_union (struct string_set *, const struct string_set *);
+void string_set_union_and_intersection (struct string_set *,
+                                        struct string_set *);
+void string_set_intersect (struct string_set *, const struct string_set *);
+void string_set_subtract (struct string_set *, const struct string_set *);
+
+static inline const struct string_set_node *string_set_first (
+  const struct string_set *);
+static inline const struct string_set_node *string_set_next (
+  const struct string_set *, const struct string_set_node *);
+
+/* Macros for conveniently iterating through a string_set, e.g. to print all of
+   the strings in "my_set":
+
+   struct string_set_node *node;
+   const char *string;
+
+   STRING_SET_FOR_EACH (string, node, &my_set)
+     puts (string);
+   */
+#define STRING_SET_FOR_EACH(STRING, NODE, SET)                  \
+        for ((NODE) = string_set_first (SET);                   \
+             ((NODE) != NULL                                    \
+              ? ((STRING) = string_set_node_get_string (NODE),  \
+                 1)                                             \
+              : 0);                                             \
+             (NODE) = string_set_next (SET, NODE))
+#define STRING_SET_FOR_EACH_SAFE(STRING, NODE, NEXT, SET)       \
+        for ((NODE) = string_set_first (SET);                   \
+             ((NODE) != NULL                                    \
+              ? ((STRING) = string_set_node_get_string (NODE),  \
+                 (NEXT) = string_set_next (SET, NODE),          \
+                 1)                                             \
+              : 0);                                             \
+             (NODE) = (NEXT))
+\f
+/* Returns the number of strings currently in SET. */
+static inline size_t
+string_set_count (const struct string_set *set)
+{
+  return hmap_count (&set->hmap);
+}
+
+/* Returns true if SET currently contains no strings, false otherwise. */
+static inline bool
+string_set_is_empty (const struct string_set *set)
+{
+  return hmap_is_empty (&set->hmap);
+}
+
+/* Returns the first node in SET, or a null pointer if SET is empty.  See the
+   hmap_first function for information about complexity (O(1) amortized) and
+   ordering (arbitrary).
+
+   The STRING_SET_FOR_EACH and STRING_SET_FOR_EACH_SAFE macros provide
+   convenient ways to iterate over all the nodes in a string set. */
+static inline const struct string_set_node *
+string_set_first (const struct string_set *set)
+{
+  return HMAP_FIRST (struct string_set_node, hmap_node, &set->hmap);
+}
+
+/* Returns the next node in SET following NODE, or a null pointer if NODE is
+   the last node in SET.  See the hmap_next function for information about
+   complexity (O(1) amortized) and ordering (arbitrary).
+
+   The STRING_SET_FOR_EACH and STRING_SET_FOR_EACH_SAFE macros provide
+   convenient ways to iterate over all the nodes in a string set. */
+static inline const struct string_set_node *
+string_set_next (const struct string_set *set,
+                 const struct string_set_node *node)
+{
+  return HMAP_NEXT (node, struct string_set_node, hmap_node, &set->hmap);
+}
+
+#endif /* libpspp/string-set.h */
diff --git a/src/libpspp/stringi-map.c b/src/libpspp/stringi-map.c
new file mode 100644 (file)
index 0000000..d3e5144
--- /dev/null
@@ -0,0 +1,377 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "libpspp/stringi-map.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "libpspp/hash-functions.h"
+#include "libpspp/string-set.h"
+#include "libpspp/stringi-set.h"
+
+#include "gl/xalloc.h"
+
+static struct stringi_map_node *stringi_map_find_node__ (
+  const struct stringi_map *, const char *key, unsigned int hash);
+static bool stringi_map_delete__ (struct stringi_map *, const char *key,
+                                  unsigned int hash);
+static struct stringi_map_node *stringi_map_insert__ (struct stringi_map *,
+                                                      char *key, char *value,
+                                                      unsigned int hash);
+
+/* Sets NODE's value to a copy of NEW_VALUE and returns the node's previous
+   value.  The caller is responsible for freeing the returned string (with
+   free()). */
+char *
+stringi_map_node_swap_value (struct stringi_map_node *node,
+                             const char *new_value)
+{
+  return stringi_map_node_swap_value_nocopy (node, xstrdup (new_value));
+}
+
+/* Sets NODE's value to NEW_VALUE, which must be a malloc()'d string,
+   transferring ownership of NEW_VALUE to the node.  Returns the node's
+   previous value, which the caller is responsible for freeing (with
+   free()). */
+char *
+stringi_map_node_swap_value_nocopy (struct stringi_map_node *node,
+                                    char *new_value)
+{
+  char *old_value = node->value;
+  node->value = new_value;
+  return old_value;
+}
+
+/* Replaces NODE's value by a copy of VALUE. */
+void
+stringi_map_node_set_value (struct stringi_map_node *node, const char *value)
+{
+  stringi_map_node_set_value_nocopy (node, xstrdup (value));
+}
+
+/* Replaces NODE's value by VALUE, which must be a malloc()'d string,
+   transferring ownership of VALUE to the node.. */
+void
+stringi_map_node_set_value_nocopy (struct stringi_map_node *node, char *value)
+{
+  free (node->value);
+  node->value = value;
+}
+
+/* Frees NODE and and its key and value.  Ordinarily nodes are owned by
+   stringi_maps, but this function should only be used by a caller that owns
+   NODE, such as one that has called stringi_map_delete_nofree() for the
+   node. */
+void
+stringi_map_node_destroy (struct stringi_map_node *node)
+{
+  free (node->key);
+  free (node->value);
+  free (node);
+}
+\f
+/* Initializes MAP as an initially empty case-insensitive string map. */
+void
+stringi_map_init (struct stringi_map *map)
+{
+  hmap_init (&map->hmap);
+}
+
+/* Initializes MAP as a new string map that initially contains the same pairs
+   as OLD. */
+void
+stringi_map_clone (struct stringi_map *map, const struct stringi_map *old)
+{
+  const struct stringi_map_node *node;
+  const char *key, *value;
+
+  stringi_map_init (map);
+  hmap_reserve (&map->hmap, stringi_map_count (old));
+  STRINGI_MAP_FOR_EACH_KEY_VALUE (key, value, node, old)
+    stringi_map_insert__ (map, xstrdup (key), xstrdup (value),
+                          node->hmap_node.hash);
+}
+
+/* Exchanges the contents of string maps A and B. */
+void
+stringi_map_swap (struct stringi_map *a, struct stringi_map *b)
+{
+  hmap_swap (&a->hmap, &b->hmap);
+}
+
+/* Frees MAP and its nodes and key-value pairs. */
+void
+stringi_map_destroy (struct stringi_map *map)
+{
+  if (map != NULL)
+    {
+      stringi_map_clear (map);
+      hmap_destroy (&map->hmap);
+    }
+}
+
+/* Returns true if MAP contains KEY (or an equivalent with different case) as a
+   key, otherwise false. */
+bool
+stringi_map_contains (const struct stringi_map *map, const char *key)
+{
+  return stringi_map_find_node (map, key) != NULL;
+}
+
+/* If MAP contains KEY (or an equivalent with different case) as a key, returns
+   the corresponding value.  Otherwise, returns a null pointer. */
+const char *
+stringi_map_find (const struct stringi_map *map, const char *key)
+{
+  const struct stringi_map_node *node = stringi_map_find_node (map, key);
+  return node != NULL ? node->value : NULL;
+}
+
+/* If MAP contains KEY (or an equivalent with different case) as a key, returns
+   the corresponding node.  Otherwise, returns a null pointer. */
+struct stringi_map_node *
+stringi_map_find_node (const struct stringi_map *map, const char *key)
+{
+  return stringi_map_find_node__ (map, key, hash_case_string (key, 0));
+}
+
+/* If MAP contains KEY (or an equivalent with different case) as a key, deletes
+   that key's node and returns its value, which the caller is responsible for
+   freeing (using free()).  Otherwise, returns a null pointer. */
+char *
+stringi_map_find_and_delete (struct stringi_map *map, const char *key)
+{
+  struct stringi_map_node *node = stringi_map_find_node (map, key);
+  char *value = NULL;
+  if (node != NULL)
+    {
+      value = node->value;
+      node->value = NULL;
+      stringi_map_delete_node (map, node);
+    }
+  return value;
+}
+
+/* If MAP does not contain KEY (or an equivalent with different case) as a key,
+   inserts a new node containing copies of KEY and VALUE and returns the new
+   node.  Otherwise, returns the existing node that contains KEY. */
+struct stringi_map_node *
+stringi_map_insert (struct stringi_map *map, const char *key,
+                    const char *value)
+{
+  unsigned int hash = hash_case_string (key, 0);
+  struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash);
+  if (node == NULL)
+    node = stringi_map_insert__ (map, xstrdup (key), xstrdup (value), hash);
+  return node;
+}
+
+/* If MAP does not contain KEY (or an equivalent with different case) as a key,
+   inserts a new node containing KEY and VALUE and returns the new node.
+   Otherwise, returns the existing node that contains KEY.  Either way,
+   ownership of KEY and VALUE is transferred to MAP. */
+struct stringi_map_node *
+stringi_map_insert_nocopy (struct stringi_map *map, char *key, char *value)
+{
+  unsigned int hash = hash_case_string (key, 0);
+  struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash);
+  if (node == NULL)
+    node = stringi_map_insert__ (map, key, value, hash);
+  else
+    {
+      free (key);
+      free (value);
+    }
+  return node;
+}
+
+/* If MAP does not contain KEY (or an equivalent with different case) as a key,
+   inserts a new node containing copies of KEY and VALUE.  Otherwise, replaces
+   the existing node's value by a copy of VALUE.  Returns the node. */
+struct stringi_map_node *
+stringi_map_replace (struct stringi_map *map, const char *key,
+                     const char *value)
+{
+  unsigned int hash = hash_case_string (key, 0);
+  struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash);
+  if (node == NULL)
+    node = stringi_map_insert__ (map, xstrdup (key), xstrdup (value), hash);
+  else
+    stringi_map_node_set_value (node, value);
+  return node;
+}
+
+/* If MAP does not contain KEY (or an equivalent with different case) as a key,
+   inserts a new node containing KEY and VALUE.  Otherwise, replaces the
+   existing node's value by VALUE.  Either way, ownership of KEY and VALUE is
+   transferred to MAP.  Returns the node. */
+struct stringi_map_node *
+stringi_map_replace_nocopy (struct stringi_map *map, char *key, char *value)
+{
+  unsigned int hash = hash_case_string (key, 0);
+  struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash);
+  if (node == NULL)
+    node = stringi_map_insert__ (map, key, value, hash);
+  else
+    {
+      free (key);
+      stringi_map_node_set_value_nocopy (node, value);
+    }
+  return node;
+}
+
+/* Searches MAP for a node with KEY (or an equivalent with different case) as
+   its key.  If found, deletes the node and its key and value and returns true.
+   Otherwise, returns false without modifying MAP. */
+bool
+stringi_map_delete (struct stringi_map *map, const char *key)
+{
+  return stringi_map_delete__ (map, key, hash_case_string (key, 0));
+}
+
+/* Deletes NODE from MAP and destroys the node and its key and value. */
+void
+stringi_map_delete_node (struct stringi_map *map,
+                         struct stringi_map_node *node)
+{
+  stringi_map_delete_nofree (map, node);
+  stringi_map_node_destroy (node);
+}
+
+/* Deletes NODE from MAP.  Transfers ownership of NODE to the caller, which
+   becomes responsible for destroying it. */
+void
+stringi_map_delete_nofree (struct stringi_map *map,
+                           struct stringi_map_node *node)
+{
+  hmap_delete (&map->hmap, &node->hmap_node);
+}
+
+/* Removes all nodes from MAP and frees them and their keys and values. */
+void
+stringi_map_clear (struct stringi_map *map)
+{
+  struct stringi_map_node *node, *next;
+
+  STRINGI_MAP_FOR_EACH_NODE_SAFE (node, next, map)
+    stringi_map_delete_node (map, node);
+}
+
+/* Inserts a copy of each of the nodes in SRC into DST.  When SRC and DST both
+   have a particular key (or keys that differ only in case), the value in DST's
+   node is left unchanged. */
+void
+stringi_map_insert_map (struct stringi_map *dst, const struct stringi_map *src)
+{
+  const struct stringi_map_node *node;
+
+  STRINGI_MAP_FOR_EACH_NODE (node, src)
+    {
+      if (!stringi_map_find_node__ (dst, node->key, node->hmap_node.hash))
+        stringi_map_insert__ (dst, xstrdup (node->key), xstrdup (node->value),
+                              node->hmap_node.hash);
+    }
+}
+
+/* Inserts a copy of each of the nodes in SRC into DST.  When SRC and DST both
+   have a particular key (or keys that differ only in case), the value in DST's
+   node is replaced by a copy of the value in SRC's node. */
+void
+stringi_map_replace_map (struct stringi_map *dst,
+                         const struct stringi_map *src)
+{
+  const struct stringi_map_node *snode;
+
+  STRINGI_MAP_FOR_EACH_NODE (snode, src)
+    {
+      struct stringi_map_node *dnode;
+      dnode = stringi_map_find_node__ (dst, snode->key, snode->hmap_node.hash);
+      if (dnode != NULL)
+        stringi_map_node_set_value (dnode, snode->value);
+      else
+        stringi_map_insert__ (dst,
+                              xstrdup (snode->key), xstrdup (snode->value),
+                              snode->hmap_node.hash);
+    }
+}
+
+/* Inserts each of the keys in MAP into KEYS.  KEYS must already have been
+   initialized (using stringi_set_init()). */
+void
+stringi_map_get_keys (const struct stringi_map *map, struct stringi_set *keys)
+{
+  const struct stringi_map_node *node;
+  const char *key;
+
+  STRINGI_MAP_FOR_EACH_KEY (key, node, map)
+    stringi_set_insert (keys, key);
+}
+
+/* Inserts each of the values in MAP into VALUES.  VALUES must already have
+   been initialized (using string_set_init()). */
+void
+stringi_map_get_values (const struct stringi_map *map,
+                        struct string_set *values)
+{
+  const struct stringi_map_node *node;
+  const char *value;
+
+  STRINGI_MAP_FOR_EACH_VALUE (value, node, map)
+    string_set_insert (values, value);
+}
+\f
+static struct stringi_map_node *
+stringi_map_find_node__ (const struct stringi_map *map, const char *key,
+                         unsigned int hash)
+{
+  struct stringi_map_node *node;
+
+  HMAP_FOR_EACH_WITH_HASH (node, struct stringi_map_node, hmap_node,
+                           hash, &map->hmap)
+    if (!strcasecmp (key, node->key))
+      return node;
+
+  return NULL;
+}
+
+static bool
+stringi_map_delete__ (struct stringi_map *map, const char *key,
+                      unsigned int hash)
+{
+  struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash);
+  if (node != NULL)
+    {
+      stringi_map_delete_node (map, node);
+      return true;
+    }
+  else
+    return false;
+}
+
+static struct stringi_map_node *
+stringi_map_insert__ (struct stringi_map *map, char *key, char *value,
+                      unsigned int hash)
+{
+  struct stringi_map_node *node = xmalloc (sizeof *node);
+  node->key = key;
+  node->value = value;
+  hmap_insert (&map->hmap, &node->hmap_node, hash);
+  return node;
+}
+
diff --git a/src/libpspp/stringi-map.h b/src/libpspp/stringi-map.h
new file mode 100644 (file)
index 0000000..bc01e72
--- /dev/null
@@ -0,0 +1,218 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LIBPSPP_STRINGI_MAP_H
+#define LIBPSPP_STRINGI_MAP_H
+
+/* Map from a unique, case-insensitve string key to a string value.
+
+   This is a convenient wrapper around a "struct hmap" for storing string
+   key-value pairs. */
+
+#include <stdbool.h>
+#include <libpspp/hmap.h>
+
+struct string_set;
+struct stringi_set;
+
+/* A node within a string map. */
+struct stringi_map_node
+  {
+    struct hmap_node hmap_node;
+    char *key;
+    char *value;
+  };
+
+/* Returns the string key within NODE.  The caller must not modify or free the
+   returned string. */
+static inline const char *
+stringi_map_node_get_key (const struct stringi_map_node *node)
+{
+  return node->key;
+}
+
+/* Returns the string key within NODE.  The caller must not free the returned
+   string. */
+static inline const char *
+stringi_map_node_get_value (const struct stringi_map_node *node)
+{
+  return node->value;
+}
+
+/* Returns the string key within NODE.  The caller must not free the returned
+   string. */
+static inline char *
+stringi_map_node_get_value_rw (struct stringi_map_node *node)
+{
+  return node->value;
+}
+
+char *stringi_map_node_swap_value (struct stringi_map_node *,
+                                   const char *new_value);
+char *stringi_map_node_swap_value_nocopy (struct stringi_map_node *,
+                                          char *new_value);
+void stringi_map_node_set_value (struct stringi_map_node *, const char *value);
+void stringi_map_node_set_value_nocopy (struct stringi_map_node *, char *value);
+void stringi_map_node_destroy (struct stringi_map_node *);
+\f
+/* Unordered map from unique, case-insensitive string keys to string values. */
+struct stringi_map
+  {
+    struct hmap hmap;
+  };
+
+/* Suitable for use as the initializer for a stringi_map named MAP.  Typical
+   usage:
+   struct stringi_map map = STRINGI_MAP_INITIALIZER (map);
+   STRINGI_MAP_INITIALIZER is an alternative to calling stringi_map_init. */
+#define STRINGI_MAP_INITIALIZER(MAP) { HMAP_INITIALIZER ((MAP).hmap) }
+
+void stringi_map_init (struct stringi_map *);
+void stringi_map_clone (struct stringi_map *, const struct stringi_map *);
+void stringi_map_swap (struct stringi_map *, struct stringi_map *);
+void stringi_map_destroy (struct stringi_map *);
+
+static inline size_t stringi_map_count (const struct stringi_map *);
+static inline bool stringi_map_is_empty (const struct stringi_map *);
+
+bool stringi_map_contains (const struct stringi_map *, const char *);
+const char *stringi_map_find (const struct stringi_map *, const char *);
+struct stringi_map_node *stringi_map_find_node (const struct stringi_map *,
+                                                const char *);
+char *stringi_map_find_and_delete (struct stringi_map *, const char *key);
+
+struct stringi_map_node *stringi_map_insert (struct stringi_map *,
+                                             const char *key,
+                                             const char *value);
+struct stringi_map_node *stringi_map_insert_nocopy (struct stringi_map *,
+                                                    char *key, char *value);
+struct stringi_map_node *stringi_map_replace (struct stringi_map *,
+                                              const char *key,
+                                              const char *value);
+struct stringi_map_node *stringi_map_replace_nocopy (struct stringi_map *,
+                                                     char *key, char *value);
+bool stringi_map_delete (struct stringi_map *, const char *);
+void stringi_map_delete_node (struct stringi_map *, struct stringi_map_node *);
+void stringi_map_delete_nofree (struct stringi_map *,
+                                struct stringi_map_node *);
+
+void stringi_map_clear (struct stringi_map *);
+void stringi_map_insert_map (struct stringi_map *, const struct stringi_map *);
+void stringi_map_replace_map (struct stringi_map *,
+                              const struct stringi_map *);
+
+void stringi_map_get_keys (const struct stringi_map *, struct stringi_set *);
+void stringi_map_get_values (const struct stringi_map *, struct string_set *);
+
+static inline struct stringi_map_node *stringi_map_first (
+  const struct stringi_map *);
+static inline struct stringi_map_node *stringi_map_next (
+  const struct stringi_map *, const struct stringi_map_node *);
+
+/* Macros for conveniently iterating through a stringi_map, e.g. to print all
+   of the key-value pairs in "my_map":
+
+   struct stringi_map_node *node;
+   const char *key, *value;
+
+   STRINGI_MAP_FOR_EACH_KEY_VALUE (key, value, node, &my_map)
+   printf ("%s=%s\n", key, value);
+*/
+#define STRINGI_MAP_FOR_EACH_NODE(NODE, MAP)                    \
+  for ((NODE) = stringi_map_first (MAP); (NODE) != NULL;        \
+       (NODE) = stringi_map_next (MAP, NODE))
+#define STRINGI_MAP_FOR_EACH_NODE_SAFE(NODE, NEXT, MAP) \
+  for ((NODE) = stringi_map_first (MAP);                \
+       ((NODE) != NULL                                  \
+        && ((NEXT) = stringi_map_next (MAP, NODE), 1)); \
+       (NODE) = (NEXT))
+#define STRINGI_MAP_FOR_EACH_KEY(KEY, NODE, MAP)                \
+  for ((NODE) = stringi_map_first (MAP);                        \
+       ((NODE) != NULL                                          \
+        && ((KEY) = stringi_map_node_get_key (NODE), 1));       \
+       (NODE) = stringi_map_next (MAP, NODE))
+#define STRINGI_MAP_FOR_EACH_KEY_SAFE(KEY, NODE, NEXT, MAP)     \
+  for ((NODE) = stringi_map_first (MAP);                        \
+       ((NODE) != NULL                                          \
+        && ((KEY) = stringi_map_node_get_key (NODE), 1)         \
+        && ((NEXT) = stringi_map_next (MAP, NODE), 1));         \
+       (NODE) = (NEXT))
+#define STRINGI_MAP_FOR_EACH_VALUE(VALUE, NODE, MAP)    \
+  for ((NODE) = stringi_map_first (MAP);                \
+       ((NODE) != NULL                                  \
+        && ((VALUE) = (NODE)->value, 1));               \
+       (NODE) = stringi_map_next (MAP, NODE))
+#define STRINGI_MAP_FOR_EACH_VALUE_SAFE(VALUE, NODE, NEXT, MAP) \
+  for ((NODE) = stringi_map_first (MAP);                        \
+       ((NODE) != NULL                                          \
+        && ((VALUE) = (NODE)->value, 1)                         \
+        && ((NEXT) = stringi_map_next (MAP, NODE), 1));         \
+       (NODE) = (NEXT))
+#define STRINGI_MAP_FOR_EACH_KEY_VALUE(KEY, VALUE, NODE, MAP)   \
+  for ((NODE) = stringi_map_first (MAP);                        \
+       ((NODE) != NULL                                          \
+        && ((KEY) = stringi_map_node_get_key (NODE), 1)         \
+        && ((VALUE) = (NODE)->value, 1));                       \
+       (NODE) = stringi_map_next (MAP, NODE))
+#define STRINGI_MAP_FOR_EACH_KEY_VALUE_SAFE(KEY, VALUE, NODE, NEXT, MAP) \
+  for ((NODE) = stringi_map_first (MAP);                                \
+       ((NODE) != NULL                                                  \
+        && ((KEY) = stringi_map_node_get_key (NODE), 1)                 \
+        && ((VALUE) = (NODE)->value, 1)                                 \
+        && ((NEXT) = stringi_map_next (MAP, NODE), 1));                 \
+       (NODE) = (NEXT))
+\f
+/* Returns the number of key-value pairs currently in MAP. */
+static inline size_t
+stringi_map_count (const struct stringi_map *map)
+{
+  return hmap_count (&map->hmap);
+}
+
+/* Returns true if MAP currently contains no key-value pairs, false
+   otherwise. */
+static inline bool
+stringi_map_is_empty (const struct stringi_map *map)
+{
+  return hmap_is_empty (&map->hmap);
+}
+
+/* Returns the first node in MAP, or a null pointer if MAP is empty.  See the
+   hmap_first function for information about complexity (O(1) amortized) and
+   ordering (arbitrary).
+
+   The STRINGI_MAP_FOR_EACH family of macros provide convenient ways to iterate
+   over all the nodes in a string map. */
+static inline struct stringi_map_node *
+stringi_map_first (const struct stringi_map *map)
+{
+  return HMAP_FIRST (struct stringi_map_node, hmap_node, &map->hmap);
+}
+
+/* Returns the next node in MAP following NODE, or a null pointer if NODE is
+   the last node in MAP.  See the hmap_next function for information about
+   complexity (O(1) amortized) and ordering (arbitrary).
+
+   The STRINGI_MAP_FOR_EACH family of macros provide convenient ways to iterate
+   over all the nodes in a string map. */
+static inline struct stringi_map_node *
+stringi_map_next (const struct stringi_map *map,
+                  const struct stringi_map_node *node)
+{
+  return HMAP_NEXT (node, struct stringi_map_node, hmap_node, &map->hmap);
+}
+
+#endif /* libpspp/string-map.h */
diff --git a/src/libpspp/stringi-set.c b/src/libpspp/stringi-set.c
new file mode 100644 (file)
index 0000000..a7ae699
--- /dev/null
@@ -0,0 +1,315 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+/* If you add routines in this file, please add a corresponding test to
+   stringi-set-test.c. */
+
+#include <config.h>
+
+#include "libpspp/stringi-set.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "libpspp/cast.h"
+#include "libpspp/hash-functions.h"
+
+#include "gl/xalloc.h"
+
+static struct stringi_set_node *stringi_set_find_node__ (
+  const struct stringi_set *, const char *, unsigned int hash);
+static void stringi_set_insert__ (struct stringi_set *, char *,
+                                 unsigned int hash);
+static bool stringi_set_delete__ (struct stringi_set *, const char *,
+                                 unsigned int hash);
+
+/* Initializes SET as a new string set that is initially empty. */
+void
+stringi_set_init (struct stringi_set *set)
+{
+  hmap_init (&set->hmap);
+}
+
+/* Initializes SET as a new string set that initially contains the same strings
+   as OLD. */
+void
+stringi_set_clone (struct stringi_set *set, const struct stringi_set *old)
+{
+  const struct stringi_set_node *node;
+  const char *s;
+
+  stringi_set_init (set);
+  hmap_reserve (&set->hmap, stringi_set_count (old));
+  STRINGI_SET_FOR_EACH (s, node, old)
+    stringi_set_insert__ (set, xstrdup (s), node->hmap_node.hash);
+}
+
+/* Exchanges the contents of string sets A and B. */
+void
+stringi_set_swap (struct stringi_set *a, struct stringi_set *b)
+{
+  hmap_swap (&a->hmap, &b->hmap);
+}
+
+/* Frees SET and its nodes and strings. */
+void
+stringi_set_destroy (struct stringi_set *set)
+{
+  if (set != NULL)
+    {
+      stringi_set_clear (set);
+      hmap_destroy (&set->hmap);
+    }
+}
+
+/* Returns true if SET contains S (or a similar string with different case),
+   false otherwise. */
+bool
+stringi_set_contains (const struct stringi_set *set, const char *s)
+{
+  return stringi_set_find_node (set, s) != NULL;
+}
+
+/* Returns the node in SET that contains S, or a null pointer if SET does not
+   contain S. */
+struct stringi_set_node *
+stringi_set_find_node (const struct stringi_set *set, const char *s)
+{
+  return stringi_set_find_node__ (set, s, hash_case_string (s, 0));
+}
+
+/* Inserts a copy of S into SET.  Returns true if successful, false if SET
+   is unchanged because it already contained S. */
+bool
+stringi_set_insert (struct stringi_set *set, const char *s)
+{
+  unsigned int hash = hash_case_string (s, 0);
+  if (!stringi_set_find_node__ (set, s, hash))
+    {
+      stringi_set_insert__ (set, xstrdup (s), hash);
+      return true;
+    }
+  else
+    return false;
+}
+
+/* Inserts S, which must be a malloc'd string, into SET, transferring ownership
+   of S to SET.  Returns true if successful, false if SET is unchanged because
+   it already contained a copy of S.  (In the latter case, S is freed.) */
+bool
+stringi_set_insert_nocopy (struct stringi_set *set, char *s)
+{
+  unsigned int hash = hash_case_string (s, 0);
+  if (!stringi_set_find_node__ (set, s, hash))
+    {
+      stringi_set_insert__ (set, s, hash);
+      return true;
+    }
+  else
+    {
+      free (s);
+      return false;
+    }
+}
+
+/* Deletes S from SET.  Returns true if successful, false if SET is unchanged
+   because it did not contain a copy of S. */
+bool
+stringi_set_delete (struct stringi_set *set, const char *s)
+{
+  return stringi_set_delete__ (set, s, hash_case_string (s, 0));
+}
+
+/* Deletes NODE from SET, and frees NODE and its string. */
+void
+stringi_set_delete_node (struct stringi_set *set,
+                         struct stringi_set_node *node)
+{
+  free (stringi_set_delete_nofree (set, node));
+}
+
+/* Deletes NODE from SET and frees NODE.  Returns the string that NODE
+   contained, transferring ownership to the caller. */
+char *
+stringi_set_delete_nofree (struct stringi_set *set,
+                           struct stringi_set_node *node)
+{
+  char *string = node->string;
+  hmap_delete (&set->hmap, &node->hmap_node);
+  free (node);
+  return string;
+}
+
+/* Removes all nodes from SET. */
+void
+stringi_set_clear (struct stringi_set *set)
+{
+  struct stringi_set_node *node, *next;
+
+  HMAP_FOR_EACH_SAFE (node, next, struct stringi_set_node, hmap_node,
+                      &set->hmap)
+    stringi_set_delete_node (set, node);
+}
+
+/* Calculates A = union(A, B).
+
+   If B may be modified, stringi_set_union_and_intersection() is
+   faster than this function. */
+void
+stringi_set_union (struct stringi_set *a, const struct stringi_set *b)
+{
+  struct stringi_set_node *node;
+  HMAP_FOR_EACH (node, struct stringi_set_node, hmap_node, &b->hmap)
+    if (!stringi_set_find_node__ (a, node->string, node->hmap_node.hash))
+      stringi_set_insert__ (a, xstrdup (node->string), node->hmap_node.hash);
+}
+
+/* Calculates A = union(A, B) and B = intersect(A, B).
+
+   If only the intersection is needed, stringi_set_intersect() is
+   faster. */
+void
+stringi_set_union_and_intersection (struct stringi_set *a,
+                                    struct stringi_set *b)
+{
+  struct stringi_set_node *node, *next;
+
+  HMAP_FOR_EACH_SAFE (node, next, struct stringi_set_node, hmap_node,
+                      &b->hmap)
+    if (!stringi_set_find_node__ (a, node->string, node->hmap_node.hash))
+      {
+        hmap_delete (&b->hmap, &node->hmap_node);
+        hmap_insert (&a->hmap, &node->hmap_node, node->hmap_node.hash);
+      }
+}
+
+/* Calculates A = intersect(A, B). */
+void
+stringi_set_intersect (struct stringi_set *a, const struct stringi_set *b)
+{
+  struct stringi_set_node *node, *next;
+
+  HMAP_FOR_EACH_SAFE (node, next, struct stringi_set_node, hmap_node,
+                      &a->hmap)
+    if (!stringi_set_find_node__ (b, node->string, node->hmap_node.hash))
+      stringi_set_delete_node (a, node);
+}
+
+/* Removes from A all of the strings in B. */
+void
+stringi_set_subtract (struct stringi_set *a, const struct stringi_set *b)
+{
+  struct stringi_set_node *node, *next;
+
+  if (stringi_set_count (a) < stringi_set_count (b))
+    {
+      HMAP_FOR_EACH_SAFE (node, next, struct stringi_set_node, hmap_node,
+                          &a->hmap)
+        if (stringi_set_find_node__ (b, node->string, node->hmap_node.hash))
+          stringi_set_delete_node (a, node);
+    }
+  else
+    {
+      HMAP_FOR_EACH (node, struct stringi_set_node, hmap_node, &b->hmap)
+        stringi_set_delete__ (a, node->string, node->hmap_node.hash);
+    }
+}
+
+/* Allocates and returns an array that points to each of the strings in SET.
+   The caller must not free or modify any of the strings.  Removing a string
+   from SET invalidates the corresponding element of the returned array.  The
+   caller it is responsible for freeing the returned array itself (with
+   free()).
+
+   The returned array is in the same order as observed by stringi_set_first()
+   and stringi_set_next(), that is, no particular order. */
+char **
+stringi_set_get_array (const struct stringi_set *set)
+{
+  const struct stringi_set_node *node;
+  const char *s;
+  char **array;
+  size_t i;
+
+  array = xnmalloc (stringi_set_count (set), sizeof *array);
+
+  i = 0;
+  STRINGI_SET_FOR_EACH (s, node, set)
+    array[i++] = CONST_CAST (char *, s);
+
+  return array;
+}
+
+static int
+compare_strings (const void *a_, const void *b_)
+{
+  const char *const *a = a_;
+  const char *const *b = b_;
+  return strcasecmp (*a, *b);
+}
+
+/* Allocates and returns an array that points to each of the strings in SET.
+   The caller must not free or modify any of the strings.  Removing a string
+   from SET invalidates the corresponding element of the returned array.  The
+   caller it is responsible for freeing the returned array itself (with
+   free()).
+
+   The returned array is ordered according to strcasecmp(). */
+char **
+stringi_set_get_sorted_array (const struct stringi_set *set)
+{
+  char **array = stringi_set_get_array (set);
+  qsort (array, stringi_set_count (set), sizeof *array, compare_strings);
+  return array;
+}
+\f
+/* Internal functions. */
+
+static struct stringi_set_node *
+stringi_set_find_node__ (const struct stringi_set *set, const char *s,
+                        unsigned int hash)
+{
+  struct stringi_set_node *node;
+
+  HMAP_FOR_EACH_WITH_HASH (node, struct stringi_set_node, hmap_node,
+                           hash, &set->hmap)
+    if (!strcasecmp (s, node->string))
+      return node;
+
+  return NULL;
+}
+
+static void
+stringi_set_insert__ (struct stringi_set *set, char *s, unsigned int hash)
+{
+  struct stringi_set_node *node = xmalloc (sizeof *node);
+  node->string = s;
+  hmap_insert (&set->hmap, &node->hmap_node, hash);
+}
+
+static bool
+stringi_set_delete__ (struct stringi_set *set, const char *s,
+                      unsigned int hash)
+{
+  struct stringi_set_node *node = stringi_set_find_node__ (set, s, hash);
+  if (node != NULL)
+    {
+      stringi_set_delete_node (set, node);
+      return true;
+    }
+  else
+    return false;
+}
diff --git a/src/libpspp/stringi-set.h b/src/libpspp/stringi-set.h
new file mode 100644 (file)
index 0000000..f438d04
--- /dev/null
@@ -0,0 +1,152 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LIBPSPP_STRINGI_SET_H
+#define LIBPSPP_STRINGI_SET_H
+
+/* Set of unique, case-insensitive strings.
+
+   This is a convenient wrapper around a "struct hmap" for storing strings. */
+
+#include <stdbool.h>
+#include <libpspp/hmap.h>
+
+/* A node in the string set. */
+struct stringi_set_node
+  {
+    struct hmap_node hmap_node;
+    char *string;
+  };
+
+/* Returns the string within NODE.  The caller must not modify or free the
+   returned string. */
+static inline const char *
+stringi_set_node_get_string (const struct stringi_set_node *node)
+{
+  return node->string;
+}
+\f
+/* An unordered set of unique strings. */
+struct stringi_set
+  {
+    struct hmap hmap;
+  };
+
+/* Suitable for use as the initializer for a stringi_set named SET.  Typical
+   usage:
+       struct stringi_set set = STRINGI_SET_INITIALIZER (set);
+   STRINGI_SET_INITIALIZER is an alternative to calling stringi_set_init. */
+#define STRINGI_SET_INITIALIZER(SET) { HMAP_INITIALIZER ((SET).hmap) }
+
+void stringi_set_init (struct stringi_set *);
+void stringi_set_clone (struct stringi_set *, const struct stringi_set *);
+void stringi_set_swap (struct stringi_set *, struct stringi_set *);
+void stringi_set_destroy (struct stringi_set *);
+
+static inline size_t stringi_set_count (const struct stringi_set *);
+static inline bool stringi_set_is_empty (const struct stringi_set *);
+
+bool stringi_set_contains (const struct stringi_set *, const char *);
+struct stringi_set_node *stringi_set_find_node (const struct stringi_set *,
+                                              const char *);
+
+bool stringi_set_insert (struct stringi_set *, const char *);
+bool stringi_set_insert_nocopy (struct stringi_set *, char *);
+bool stringi_set_delete (struct stringi_set *, const char *);
+void stringi_set_delete_node (struct stringi_set *, struct stringi_set_node *);
+char *stringi_set_delete_nofree (struct stringi_set *,
+                                 struct stringi_set_node *);
+
+void stringi_set_clear (struct stringi_set *);
+void stringi_set_union (struct stringi_set *, const struct stringi_set *);
+void stringi_set_union_and_intersection (struct stringi_set *,
+                                        struct stringi_set *);
+void stringi_set_intersect (struct stringi_set *, const struct stringi_set *);
+void stringi_set_subtract (struct stringi_set *, const struct stringi_set *);
+
+char **stringi_set_get_array (const struct stringi_set *);
+char **stringi_set_get_sorted_array (const struct stringi_set *);
+
+static inline const struct stringi_set_node *stringi_set_first (
+  const struct stringi_set *);
+static inline const struct stringi_set_node *stringi_set_next (
+  const struct stringi_set *, const struct stringi_set_node *);
+
+/* Macros for conveniently iterating through a stringi_set, e.g. to print all
+   of the strings in "my_set":
+
+   struct stringi_set_node *node;
+   const char *string;
+
+   STRINGI_SET_FOR_EACH (string, node, &my_set)
+     puts (string);
+   */
+#define STRINGI_SET_FOR_EACH(STRING, NODE, SET)                 \
+        for ((NODE) = stringi_set_first (SET);                  \
+             ((NODE) != NULL                                    \
+              ? ((STRING) = stringi_set_node_get_string (NODE), \
+                 1)                                             \
+              : 0);                                             \
+             (NODE) = stringi_set_next (SET, NODE))
+#define STRINGI_SET_FOR_EACH_SAFE(STRING, NODE, NEXT, SET)      \
+        for ((NODE) = stringi_set_first (SET);                  \
+             ((NODE) != NULL                                    \
+              ? ((STRING) = stringi_set_node_get_string (NODE), \
+                 (NEXT) = stringi_set_next (SET, NODE),         \
+                 1)                                             \
+              : 0);                                             \
+             (NODE) = (NEXT))
+\f
+/* Returns the number of strings currently in SET. */
+static inline size_t
+stringi_set_count (const struct stringi_set *set)
+{
+  return hmap_count (&set->hmap);
+}
+
+/* Returns true if SET currently contains no strings, false otherwise. */
+static inline bool
+stringi_set_is_empty (const struct stringi_set *set)
+{
+  return hmap_is_empty (&set->hmap);
+}
+
+/* Returns the first node in SET, or a null pointer if SET is empty.  See the
+   hmap_first function for information about complexity (O(1) amortized) and
+   ordering (arbitrary).
+
+   The STRINGI_SET_FOR_EACH and STRINGI_SET_FOR_EACH_SAFE macros provide
+   convenient ways to iterate over all the nodes in a string set. */
+static inline const struct stringi_set_node *
+stringi_set_first (const struct stringi_set *set)
+{
+  return HMAP_FIRST (struct stringi_set_node, hmap_node, &set->hmap);
+}
+
+/* Returns the next node in SET following NODE, or a null pointer if NODE is
+   the last node in SET.  See the hmap_next function for information about
+   complexity (O(1) amortized) and ordering (arbitrary).
+
+   The STRINGI_SET_FOR_EACH and STRINGI_SET_FOR_EACH_SAFE macros provide
+   convenient ways to iterate over all the nodes in a string set. */
+static inline const struct stringi_set_node *
+stringi_set_next (const struct stringi_set *set,
+                 const struct stringi_set_node *node)
+{
+  return HMAP_NEXT (node, struct stringi_set_node, hmap_node, &set->hmap);
+}
+
+#endif /* libpspp/string-set.h */
index 3a74587bb5918ae8cee61766619187b5ca758532..4c1cecb97cdbbdbcdd2302e91f2741e7a68a8bc2 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@
 
 #include <libpspp/array.h>
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 
 #include "xalloc.h"
 
@@ -79,7 +80,7 @@ taint_create (void)
 struct taint *
 taint_clone (const struct taint *taint_)
 {
-  struct taint *taint = (struct taint *) taint_;
+  struct taint *taint = CONST_CAST (struct taint *, taint_);
 
   assert (taint->ref_cnt > 0);
   taint->ref_cnt++;
@@ -139,8 +140,8 @@ taint_destroy (struct taint *taint)
 void
 taint_propagate (const struct taint *from_, const struct taint *to_)
 {
-  struct taint *from = (struct taint *) from_;
-  struct taint *to = (struct taint *) to_;
+  struct taint *from = CONST_CAST (struct taint *, from_);
+  struct taint *to = CONST_CAST (struct taint *, to_);
 
   if (from != to)
     {
@@ -165,7 +166,7 @@ taint_is_tainted (const struct taint *taint)
 void
 taint_set_taint (const struct taint *taint_)
 {
-  struct taint *taint = (struct taint *) taint_;
+  struct taint *taint = CONST_CAST (struct taint *, taint_);
   if (!taint->tainted)
     recursively_set_taint (taint);
 }
@@ -186,7 +187,7 @@ taint_has_tainted_successor (const struct taint *taint)
 void
 taint_reset_successor_taint (const struct taint *taint_)
 {
-  struct taint *taint = (struct taint *) taint_;
+  struct taint *taint = CONST_CAST (struct taint *, taint_);
 
   if (taint->tainted_successor)
     {
index 0d3093646faa6a9d20a941048760f0d0d11d8be6..aff135d0cc0a1c27b0ea9af1d58dec6beb08d19a 100644 (file)
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 
 #include "error.h"
 #include "xalloc.h"
@@ -81,7 +82,7 @@ tmpfile_destroy (struct tmpfile *tf)
 static bool
 do_seek (const struct tmpfile *tf_, off_t offset)
 {
-  struct tmpfile *tf = (struct tmpfile *) tf_;
+  struct tmpfile *tf = CONST_CAST (struct tmpfile *, tf_);
 
   if (!tmpfile_error (tf))
     {
@@ -106,7 +107,7 @@ do_seek (const struct tmpfile *tf_, off_t offset)
 static bool
 do_read (const struct tmpfile *tf_, void *buffer, size_t bytes)
 {
-  struct tmpfile *tf = (struct tmpfile *) tf_;
+  struct tmpfile *tf = CONST_CAST (struct tmpfile *, tf_);
 
   assert (!tmpfile_error (tf));
   if (bytes > 0 && fread (buffer, bytes, 1, tf->file) != 1)
index e8d253d086731c61dd539962cbc79f9c2b3b0750..9157987774e555c625d63af41a9343dc4447c574 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@
 #include <limits.h>
 
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 #include <libpspp/compiler.h>
 
 static struct tower_node *abt_to_tower_node (const struct abt_node *);
@@ -184,7 +185,7 @@ tower_lookup (const struct tower *t_,
               unsigned long height,
               unsigned long *node_start)
 {
-  struct tower *t = (struct tower *) t_;
+  struct tower *t = CONST_CAST (struct tower *, t_);
   struct abt_node *p;
 
   assert (height < tower_height (t));
@@ -237,7 +238,7 @@ tower_lookup (const struct tower *t_,
 struct tower_node *
 tower_get (const struct tower *t_, unsigned long int index) 
 {
-  struct tower *t = (struct tower *) t_;
+  struct tower *t = CONST_CAST (struct tower *, t_);
   struct abt_node *p;
 
   assert (index < tower_count (t));
index 246984a2c1bfd6cd1c46100fbe95f84140843a92..9be8231c98ad7c9b0c7fc217a14a513d2813aa92 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <stdbool.h>
 #include <libpspp/abt.h>
+#include <libpspp/cast.h>
 
 /* Returns the data structure corresponding to the given NODE,
    assuming that NODE is embedded as the given MEMBER name in
    data type STRUCT. */
-#define tower_data(NODE, STRUCT, MEMBER)                            \
-        ((STRUCT *) ((char *) (NODE) - offsetof (STRUCT, MEMBER)))
+#define tower_data(NODE, STRUCT, MEMBER)                        \
+        (CHECK_POINTER_HAS_TYPE (NODE, struct tower_node *),    \
+         UP_CAST (NODE, STRUCT, MEMBER))
 
 /* A node within a tower. */
 struct tower_node
diff --git a/src/libpspp/verbose-msg.c b/src/libpspp/verbose-msg.c
deleted file mode 100644 (file)
index a65db7d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-#include <libpspp/verbose-msg.h>
-
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "progname.h"
-
-/* Level of verbosity.
-   Higher values cause more output. */
-static int verbosity;
-
-/* Increases the verbosity level. */
-void
-verbose_increment_level (void)
-{
-  verbosity++;
-}
-
-/* Writes MESSAGE formatted with printf, to stderr, if the
-   verbosity level is at least LEVEL. */
-void
-verbose_msg (int level, const char *format, ...)
-{
-  if (level <= verbosity)
-    {
-      va_list args;
-
-      va_start (args, format);
-      fprintf (stderr, "%s: ", program_name);
-      vfprintf (stderr, format, args);
-      putc ('\n', stderr);
-      va_end (args);
-    }
-}
-
diff --git a/src/libpspp/verbose-msg.h b/src/libpspp/verbose-msg.h
deleted file mode 100644 (file)
index 2a19331..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#ifndef VERBOSE_MSG_H
-#define VERBOSE_MSG_H 1
-
-#include <libpspp/compiler.h>
-
-void verbose_increment_level (void);
-void verbose_msg (int level, const char *format, ...)
-     PRINTF_FORMAT (2, 3);
-
-#endif /* verbose-msg.h */
index 88cd3ebe75352f17f1370695f119f7c7874548ca..e2125154a8ca20ccd57005012957bf7d4ae68fec 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -33,12 +33,6 @@ extern const char host_system[];
 /* Canonical name of build system type. */
 extern const char build_system[];
 
-/* Configuration path at build time. */
-extern const char default_config_path[];
-
-/* Include path. */
-extern const char include_path[];
-
 /* Locale directory. */
 extern const char locale_dir[];
 
diff --git a/src/libpspp/zip-writer.c b/src/libpspp/zip-writer.c
new file mode 100644 (file)
index 0000000..7e1a6cc
--- /dev/null
@@ -0,0 +1,232 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "libpspp/zip-writer.h"
+
+#include <errno.h>
+#include <stdlib.h>
+#include <time.h>
+
+#include "libpspp/integer-format.h"
+
+#include "gl/crc.h"
+#include "gl/error.h"
+#include "gl/fwriteerror.h"
+#include "gl/xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+struct zip_writer
+  {
+    char *file_name;            /* File name, for use in error mesages. */
+    FILE *file;                 /* Output stream. */
+
+    uint16_t date, time;        /* Date and time in MS-DOS format. */
+
+    /* Members already added to the file, so that we can summarize them to the
+       central directory at the end of the ZIP file. */
+    struct zip_member *members;
+    size_t n_members, allocated_members;
+  };
+
+struct zip_member
+  {
+    uint32_t offset;            /* Starting offset in file. */
+    uint32_t size;              /* Length of member file data, in bytes. */
+    uint32_t crc;               /* CRC-32 of member file data.. */
+    char *name;                 /* Name of member file. */
+  };
+
+static void
+put_bytes (struct zip_writer *zw, const void *p, size_t n)
+{
+  fwrite (p, 1, n, zw->file);
+}
+
+static void
+put_u16 (struct zip_writer *zw, uint16_t x)
+{
+  if (INTEGER_NATIVE != INTEGER_LSB_FIRST)
+    integer_convert (INTEGER_NATIVE, &x, INTEGER_MSB_FIRST, &x, sizeof x);
+  put_bytes (zw, &x, sizeof x);
+}
+
+static void
+put_u32 (struct zip_writer *zw, uint32_t x)
+{
+  if (INTEGER_NATIVE != INTEGER_LSB_FIRST)
+    integer_convert (INTEGER_NATIVE, &x, INTEGER_MSB_FIRST, &x, sizeof x);
+  put_bytes (zw, &x, sizeof x);
+}
+
+/* Starts writing a new ZIP file named FILE_NAME.  Returns a new zip_writer if
+   successful, otherwise a null pointer. */
+struct zip_writer *
+zip_writer_create (const char *file_name)
+{
+  struct zip_writer *zw;
+  struct tm *tm;
+  time_t now;
+  FILE *file;
+
+  file = fopen (file_name, "wb");
+  if (file == NULL)
+    {
+      error (0, errno, _("%s: error opening output file"), file_name);
+      return NULL;
+    }
+
+  zw = xmalloc (sizeof *zw);
+  zw->file_name = xstrdup (file_name);
+  zw->file = file;
+
+  now = time (NULL);
+  tm = localtime (&now);
+  zw->date = tm->tm_mday + ((tm->tm_mon + 1) << 5) + ((tm->tm_year - 80) << 9);
+  zw->time = tm->tm_sec / 2 + (tm->tm_min << 5) + (tm->tm_hour << 11);
+
+  zw->members = NULL;
+  zw->n_members = 0;
+  zw->allocated_members = 0;
+
+  return zw;
+}
+
+/* Adds the contents of FILE, with name MEMBER_NAME, to ZW. */
+void
+zip_writer_add (struct zip_writer *zw, FILE *file, const char *member_name)
+{
+  struct zip_member *member;
+  uint32_t offset, size;
+  size_t bytes_read;
+  uint32_t crc;
+  char buf[4096];
+
+  /* Local file header. */
+  offset = ftello (zw->file);
+  put_u32 (zw, 0x04034b50);     /* local file header signature */
+  put_u16 (zw, 10);             /* version needed to extract */
+  put_u16 (zw, 1 << 3);         /* general purpose bit flag */
+  put_u16 (zw, 0);              /* compression method */
+  put_u16 (zw, zw->time);       /* last mod file time */
+  put_u16 (zw, zw->date);       /* last mod file date */
+  put_u32 (zw, 0);              /* crc-32 */
+  put_u32 (zw, 0);              /* compressed size */
+  put_u32 (zw, 0);              /* uncompressed size */
+  put_u16 (zw, strlen (member_name)); /* file name length */
+  put_u16 (zw, 0);                    /* extra field length */
+  put_bytes (zw, member_name, strlen (member_name));
+
+  /* File data. */
+  size = crc = 0;
+  fseeko (file, 0, SEEK_SET);
+  while ((bytes_read = fread (buf, 1, sizeof buf, file)) > 0)
+    {
+      put_bytes (zw, buf, bytes_read);
+      size += bytes_read;
+      crc = crc32_update (crc, buf, bytes_read);
+    }
+
+  /* Data descriptor. */
+  put_u32 (zw, 0x08074b50);
+  put_u32 (zw, crc);
+  put_u32 (zw, size);
+  put_u32 (zw, size);
+
+  /* Add to set of members. */
+  if (zw->n_members >= zw->allocated_members)
+    zw->members = x2nrealloc (zw->members, &zw->allocated_members,
+                              sizeof *zw->members);
+  member = &zw->members[zw->n_members++];
+  member->offset = offset;
+  member->size = size;
+  member->crc = crc;
+  member->name = xstrdup (member_name);
+}
+
+/* Finalizes the contents of ZW and closes it.  Returns true if successful,
+   false if a write error occurred while finalizing the file or at any earlier
+   time. */
+bool
+zip_writer_close (struct zip_writer *zw)
+{
+  uint32_t dir_start, dir_end;
+  size_t i;
+  bool ok;
+
+  if (zw == NULL)
+    return true;
+
+  dir_start = ftello (zw->file);
+  for (i = 0; i < zw->n_members; i++)
+    {
+      struct zip_member *m = &zw->members[i];
+
+      /* Central directory file header. */
+      put_u32 (zw, 0x02014b50);       /* central file header signature */
+      put_u16 (zw, 63);               /* version made by */
+      put_u16 (zw, 10);               /* version needed to extract */
+      put_u16 (zw, 1 << 3);           /* general purpose bit flag */
+      put_u16 (zw, 0);                /* compression method */
+      put_u16 (zw, zw->time);         /* last mod file time */
+      put_u16 (zw, zw->date);         /* last mod file date */
+      put_u32 (zw, m->crc);           /* crc-32 */
+      put_u32 (zw, m->size);          /* compressed size */
+      put_u32 (zw, m->size);          /* uncompressed size */
+      put_u16 (zw, strlen (m->name)); /* file name length */
+      put_u16 (zw, 0);                /* extra field length */
+      put_u16 (zw, 0);                /* file comment length */
+      put_u16 (zw, 0);                /* disk number start */
+      put_u16 (zw, 0);                /* internal file attributes */
+      put_u32 (zw, 0);                /* external file attributes */
+      put_u32 (zw, m->offset);        /* relative offset of local header */
+      put_bytes (zw, m->name, strlen (m->name));
+      free (m->name);
+    }
+  free (zw->members);
+  dir_end = ftello (zw->file);
+
+  /* End of central directory record. */
+  put_u32 (zw, 0x06054b50);     /* end of central dir signature */
+  put_u16 (zw, 0);              /* number of this disk */
+  put_u16 (zw, 0);              /* number of the disk with the
+                                   start of the central directory */
+  put_u16 (zw, zw->n_members);  /* total number of entries in the
+                                   central directory on this disk */
+  put_u16 (zw, zw->n_members);  /* total number of entries in
+                                   the central directory */
+  put_u32 (zw, dir_end - dir_start); /* size of the central directory */
+  put_u32 (zw, dir_start);      /* offset of start of central
+                                   directory with respect to
+                                   the starting disk number */
+  put_u16 (zw, 0);              /* .ZIP file comment length */
+
+  if (!fwriteerror (zw->file))
+    ok = true;
+  else
+    {
+      error (0, errno, _("%s: write failed"), zw->file_name);
+      ok = false;
+    }
+
+  free (zw->file_name);
+  free (zw);
+
+  return ok;
+}
diff --git a/src/libpspp/zip-writer.h b/src/libpspp/zip-writer.h
new file mode 100644 (file)
index 0000000..aff3f99
--- /dev/null
@@ -0,0 +1,27 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LIBPSPP_ZIP_WRITER_H
+#define LIBPSPP_ZIP_WRITER_H 1
+
+#include <stdbool.h>
+#include <stdio.h>
+
+struct zip_writer *zip_writer_create (const char *file_name);
+void zip_writer_add (struct zip_writer *, FILE *, const char *member_name);
+bool zip_writer_close (struct zip_writer *);
+
+#endif /* libpspp/zip-writer.h */
index 2dc398a77754631d0873acdbda609c5146f7b9d6..b443d9f94c63f7a0aacebf0ed6447e58dbfdff29 100644 (file)
@@ -1,6 +1,5 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
-include $(top_srcdir)/src/math/ts/automake.mk
 
 noinst_LTLIBRARIES += src/math/libpspp-math.la
 
@@ -15,6 +14,8 @@ src_math_libpspp_math_la_SOURCES = \
        src/math/categoricals.c \
        src/math/covariance.c \
        src/math/covariance.h \
+       src/math/correlation.c \
+       src/math/correlation.h \
        src/math/extrema.c src/math/extrema.h \
        src/math/group.c  src/math/group.h \
        src/math/group-proc.h \
index 288fc072ef119ccb2c49b2001a015a34834378ad..de4124efe16c5beb799c7b5d0b2af42743ff79d7 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
 #include "tukey-hinges.h"
 #include <gl/xalloc.h>
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 #include <math.h>
 #include <float.h>
 #include <data/val-type.h>
@@ -30,8 +31,8 @@
 static void
 destroy (struct statistic *s)
 {
-  struct order_stats *os = (struct order_stats *) s;
-  struct box_whisker *bw = (struct box_whisker *) s;
+  struct box_whisker *bw = UP_CAST (s, struct box_whisker, parent.parent);
+  struct order_stats *os = &bw->parent;
   struct ll *ll;
 
   for (ll = ll_head (&bw->outliers); ll != ll_null (&bw->outliers); )
@@ -53,7 +54,7 @@ static void
 acc (struct statistic *s, const struct ccase *cx,
      double c UNUSED, double cc UNUSED, double y)
 {
-  struct box_whisker *bw = (struct box_whisker *) s;
+  struct box_whisker *bw = UP_CAST (s, struct box_whisker, parent.parent);
   bool extreme;
   struct outlier *o;
 
@@ -110,13 +111,13 @@ box_whisker_outliers (const struct box_whisker *bw)
   return &bw->outliers;
 }
 
-struct statistic *
+struct box_whisker *
 box_whisker_create (const struct tukey_hinges *th,
                    const struct variable *id_var,  size_t casenumber_idx)
 {
   struct box_whisker *w = xzalloc (sizeof (*w));
-  struct order_stats *os = (struct order_stats *) w;
-  struct statistic *stat = (struct statistic *) w;
+  struct order_stats *os = &w->parent;
+  struct statistic *stat = &os->parent;
 
   os->n_k = 0;
 
@@ -135,5 +136,5 @@ box_whisker_create (const struct tukey_hinges *th,
 
   ll_init (&w->outliers);
 
-  return stat;
+  return w;
 }
index 5202b646727b184ccc22b3ffcfd7e14f3c32c8fd..bef091e83b448dafc5c601fab3d04eb0d60f19f6 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ struct box_whisker
   const struct variable *id_var;
 };
 
-struct statistic * box_whisker_create (const struct tukey_hinges *,
+struct box_whisker * box_whisker_create (const struct tukey_hinges *,
                                         const struct variable *, size_t);
 
 void box_whisker_whiskers (const struct box_whisker *bw, double whiskers[2]);
index f78895f8214e4b70b89668477ac1dfe1abc98fe2..b3dccc518733a8a079d50e9c11a8b65cbdbc00dd 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -159,18 +159,16 @@ pspp_coeff_var_to_coeff (const struct variable *v, struct pspp_coeff **coefs,
 {
   size_t i = 0;
   size_t j = 0;
-  size_t v_idx;
 
   struct pspp_coeff *result = NULL;
 
   if (v != NULL)
     {
-      v_idx = var_get_dict_index (v);
       while (i < n_coef)
        {
          if (coefs[i]->v_info != NULL)
            {
-             if (var_get_dict_index (coefs[i]->v_info->v) == v_idx)
+             if (coefs[i]->v_info->v == v)
                {
                  break;
                }
diff --git a/src/math/correlation.c b/src/math/correlation.c
new file mode 100644 (file)
index 0000000..4776274
--- /dev/null
@@ -0,0 +1,68 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "correlation.h"
+
+#include <gsl/gsl_matrix.h>
+#include <gsl/gsl_cdf.h>
+#include <math.h>
+#include <libpspp/misc.h>
+#include "minmax.h"
+
+
+double
+significance_of_correlation (double rho, double w)
+{
+  double t = w - 2;
+
+  /* |rho| will mathematically always be in the range [0, 1.0].  Inaccurate
+     calculations sometimes cause it to be slightly greater than 1.0, so
+     force it into the correct range to avoid NaN from sqrt(). */
+  t /= 1 - MIN (1, pow2 (rho));
+
+  t = sqrt (t);
+  t *= rho;
+  
+  if (t > 0)
+    return  gsl_cdf_tdist_Q (t, w - 2);
+  else
+    return  gsl_cdf_tdist_P (t, w - 2);
+}
+
+gsl_matrix *
+correlation_from_covariance (const gsl_matrix *cv, const gsl_matrix *v)
+{
+  size_t i, j;
+  gsl_matrix *corr = gsl_matrix_calloc (cv->size1, cv->size2);
+  
+  for (i = 0 ; i < cv->size1; ++i)
+    {
+      for (j = 0 ; j < cv->size2; ++j)
+       {
+         double rho = gsl_matrix_get (cv, i, j);
+         
+         rho /= sqrt (gsl_matrix_get (v, i, j))
+           * 
+           sqrt (gsl_matrix_get (v, j, i));
+         
+         gsl_matrix_set (corr, i, j, rho);
+       }
+    }
+  
+  return corr;
+}
diff --git a/src/math/correlation.h b/src/math/correlation.h
new file mode 100644 (file)
index 0000000..27621c4
--- /dev/null
@@ -0,0 +1,27 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+
+#ifndef SRC_MATH_CORRELATION_H
+#define SRC_MATH_CORRELATION_H
+
+#include <gsl/gsl_matrix.h>
+
+gsl_matrix * correlation_from_covariance (const gsl_matrix *cv, const gsl_matrix *v);
+
+double significance_of_correlation (double rho, double w);
+
+#endif
diff --git a/src/math/covariance-matrix.c b/src/math/covariance-matrix.c
deleted file mode 100644 (file)
index 89660ba..0000000
+++ /dev/null
@@ -1,1029 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-/*
-  Create and update the values in the covariance matrix.
-*/
-#include <assert.h>
-#include <config.h>
-#include <data/case.h>
-#include <data/category.h>
-#include <data/variable.h>
-#include <data/value.h>
-#include <libpspp/hash.h>
-#include <libpspp/hash-functions.h>
-#include <math/covariance-matrix.h>
-#include <math/moments.h>
-#include <string.h>
-#include <xalloc.h>
-
-/*
-  Structure used to accumulate the covariance matrix in a single data
-  pass.  Before passing the data, we do not know how many categories
-  there are in each categorical variable. Therefore we do not know the
-  size of the covariance matrix. To get around this problem, we
-  accumulate the elements of the covariance matrix in pointers to
-  COVARIANC_ACCUMULATOR. These values are then used to populate
-  the covariance matrix.
- */
-struct covariance_accumulator
-{
-  const struct variable *v1;
-  const struct variable *v2;
-  const union value *val1;
-  const union value *val2;
-  double dot_product;
-  double sum1;
-  double sum2;
-  double ssize;
-};
-
-
-
-struct covariance_matrix
-{
-  struct design_matrix *cov;
-  struct design_matrix *ssize;
-  struct hsh_table *ca;
-  struct moments1 **m1;
-  struct moments **m;
-  const struct variable **v_variables;
-  const struct interaction_variable **interactions;
-  size_t n_variables;
-  size_t n_intr;
-  int n_pass;
-  int missing_handling;
-  enum mv_class missing_value;
-  void (*accumulate) (struct covariance_matrix *, const struct ccase *,
-                     const struct interaction_variable **, size_t);
-  void (*update_moments) (struct covariance_matrix *, size_t, double);
-};
-
-
-
-static struct hsh_table *covariance_hsh_create (size_t *);
-static hsh_hash_func covariance_accumulator_hash;
-static unsigned int hash_numeric_alpha (const struct variable *,
-                                       const struct variable *,
-                                       const union value *, size_t);
-static hsh_compare_func covariance_accumulator_compare;
-static hsh_free_func covariance_accumulator_free;
-static void update_moments1 (struct covariance_matrix *, size_t, double);
-static void update_moments2 (struct covariance_matrix *, size_t, double);
-static struct covariance_accumulator *get_new_covariance_accumulator (const
-                                                                     struct
-                                                                     variable
-                                                                     *,
-                                                                     const
-                                                                     struct
-                                                                     variable
-                                                                     *,
-                                                                     const
-                                                                     union
-                                                                     value *,
-                                                                     const
-                                                                     union
-                                                                     value
-                                                                     *);
-static void covariance_accumulate_listwise (struct covariance_matrix *,
-                                           const struct ccase *,
-                                           const struct interaction_variable **,
-                                           size_t);
-static void covariance_accumulate_pairwise (struct covariance_matrix *,
-                                           const struct ccase *,
-                                           const struct interaction_variable **,
-                                           size_t);
-
-struct covariance_matrix *
-covariance_matrix_init (size_t n_variables,
-                       const struct variable *v_variables[], int n_pass,
-                       int missing_handling, enum mv_class missing_value)
-{
-  size_t i;
-  struct covariance_matrix *result = NULL;
-
-  result = xmalloc (sizeof (*result));
-  result->cov = NULL;
-  result->n_variables = n_variables;
-  result->ca = covariance_hsh_create (&result->n_variables);
-  result->m = NULL;
-  result->m1 = NULL;
-  result->n_intr = 0;
-  result->missing_handling = missing_handling;
-  result->missing_value = missing_value;
-  result->accumulate = (result->missing_handling == LISTWISE) ?
-    covariance_accumulate_listwise : covariance_accumulate_pairwise;
-  if (n_pass == ONE_PASS)
-    {
-      result->update_moments = update_moments1;
-      result->m1 = xnmalloc (n_variables, sizeof (*result->m1));
-      for (i = 0; i < n_variables; i++)
-       {
-         result->m1[i] = moments1_create (MOMENT_MEAN);
-       }
-    }
-  else
-    {
-      result->update_moments = update_moments2;
-      result->m = xnmalloc (n_variables, sizeof (*result->m));
-      for (i = 0; i < n_variables; i++)
-       {
-         result->m[i] = moments_create (MOMENT_MEAN);
-       }
-    }
-  result->v_variables = v_variables;
-
-  result->n_pass = n_pass;
-
-  return result;
-}
-void
-covariance_interaction_set (struct covariance_matrix *cov, 
-                           const struct interaction_variable **intr, size_t n_intr)
-{
-  cov->interactions = intr;
-  cov->n_intr = n_intr;
-}
-
-static size_t 
-get_n_rows (size_t n_variables, const struct variable *v_variables[])
-{
-  size_t i;
-  size_t result = 0;
-  for (i = 0; i < n_variables; i++)
-    {
-      if (var_is_numeric (v_variables[i]))
-       {
-         result++;
-       }
-      else if (var_is_alpha (v_variables[i]))
-       {
-         size_t n_categories = cat_get_n_categories (v_variables[i]);
-         result += n_categories - 1;
-       }
-    }
-  return result;
-}
-/*
-  The covariances are stored in a DESIGN_MATRIX structure.
- */
-struct design_matrix *
-covariance_matrix_create (size_t n_variables,
-                         const struct variable *v_variables[])
-{
-  size_t n_rows = get_n_rows (n_variables, v_variables);
-  return design_matrix_create (n_variables, v_variables, n_rows);
-}
-
-static size_t 
-get_n_rows_s (const struct variable *var)
-{
-  size_t result = 0;
-  if (var_is_numeric (var))
-    {
-      result++;
-    }
-  else
-    {
-      result += cat_get_n_categories (var) - 1;
-    }
-  return result;
-}
-static struct design_matrix *
-covariance_matrix_create_s (struct covariance_matrix *cov)
-{
-  struct variable **v_variables;
-  size_t n_variables;
-  size_t n_rows = 0;
-  size_t i;
-  size_t j;
-
-  n_variables = cov->n_variables + cov->n_intr;
-  v_variables = xnmalloc (n_variables, sizeof (*v_variables));
-  for (i = 0; i < cov->n_variables; i++)
-    {
-      v_variables[i] = cov->v_variables[i];
-      n_rows += get_n_rows_s (v_variables[i]);
-    }
-  for (j = 0; j < cov->n_intr; j++)
-    {
-      v_variables[i + j] = interaction_get_variable (cov->interactions[j]);
-      n_rows += get_n_rows_s (v_variables[i]);
-    }
-  return design_matrix_create (n_variables, v_variables, n_rows);
-}
-
-static void
-update_moments1 (struct covariance_matrix *cov, size_t i, double x)
-{
-  assert (cov->m1 != NULL);
-  moments1_add (cov->m1[i], x, 1.0);
-}
-
-static void
-update_moments2 (struct covariance_matrix *cov, size_t i, double x)
-{
-  assert (cov->m != NULL);
-  moments_pass_one (cov->m[i], x, 1.0);
-}
-
-void
-covariance_matrix_destroy (struct covariance_matrix *cov)
-{
-  size_t i;
-
-  assert (cov != NULL);
-  design_matrix_destroy (cov->cov);
-  design_matrix_destroy (cov->ssize);
-  hsh_destroy (cov->ca);
-  if (cov->n_pass == ONE_PASS)
-    {
-      for (i = 0; i < cov->n_variables; i++)
-       {
-         moments1_destroy (cov->m1[i]);
-       }
-      free (cov->m1);
-    }
-  else
-    {
-      for (i = 0; i < cov->n_variables; i++)
-       {
-         moments_destroy (cov->m[i]);
-       }
-      free (cov->m);
-    }
-}
-
-/*
-  Update the covariance matrix with the new entries, assuming that ROW
-  corresponds to a categorical variable and V2 is numeric.
- */
-static void
-covariance_update_categorical_numeric (struct design_matrix *cov, double mean,
-                                      size_t row,
-                                      const struct variable *v2, double x,
-                                      const union value *val2)
-{
-  size_t col;
-  double tmp;
-
-  assert (var_is_numeric (v2));
-
-  col = design_matrix_var_to_column (cov, v2);
-  assert (val2 != NULL);
-  tmp = design_matrix_get_element (cov, row, col);
-  design_matrix_set_element (cov, row, col, (val2->f - mean) * x + tmp);
-  design_matrix_set_element (cov, col, row, (val2->f - mean) * x + tmp);
-}
-static void
-column_iterate (struct design_matrix *cov, const struct variable *v,
-               double ssize, double x, const union value *val1, size_t row)
-{
-  int width = var_get_width (v);
-  size_t col;
-  size_t i;
-  double y;
-  double tmp;
-  const union value *tmp_val;
-
-  col = design_matrix_var_to_column (cov, v);
-  for (i = 0; i < cat_get_n_categories (v) - 1; i++)
-    {
-      col += i;
-      y = -1.0 * cat_get_category_count (i, v) / ssize;
-      tmp_val = cat_subscript_to_value (i, v);
-      if (!value_equal (tmp_val, val1, width))
-       {
-         y += -1.0;
-       }
-      tmp = design_matrix_get_element (cov, row, col);
-      design_matrix_set_element (cov, row, col, x * y + tmp);
-      design_matrix_set_element (cov, col, row, x * y + tmp);
-    }
-}
-
-/*
-  Call this function in the second data pass. The central moments are
-  MEAN1 and MEAN2. Any categorical variables should already have their
-  values summarized in in its OBS_VALS element.
- */
-void
-covariance_pass_two (struct design_matrix *cov, double mean1, double mean2,
-                    double ssize, const struct variable *v1,
-                    const struct variable *v2, const union value *val1,
-                    const union value *val2)
-{
-  size_t row;
-  size_t col;
-  size_t i;
-  double x;
-  const union value *tmp_val;
-
-  if (var_is_alpha (v1))
-    {
-      row = design_matrix_var_to_column (cov, v1);
-      for (i = 0; i < cat_get_n_categories (v1) - 1; i++)
-       {
-         row += i;
-         x = -1.0 * cat_get_category_count (i, v1) / ssize;
-         tmp_val = cat_subscript_to_value (i, v1);
-         if (!value_equal (tmp_val, val1, var_get_width (v1)))
-           {
-             x += 1.0;
-           }
-         if (var_is_numeric (v2))
-           {
-             covariance_update_categorical_numeric (cov, mean2, row,
-                                                    v2, x, val2);
-           }
-         else
-           {
-             column_iterate (cov, v1, ssize, x, val1, row);
-             column_iterate (cov, v2, ssize, x, val2, row);
-           }
-       }
-    }
-  else if (var_is_alpha (v2))
-    {
-      /*
-         Reverse the orders of V1, V2, etc. and put ourselves back
-         in the previous IF scope.
-       */
-      covariance_pass_two (cov, mean2, mean1, ssize, v2, v1, val2, val1);
-    }
-  else
-    {
-      /*
-         Both variables are numeric.
-       */
-      row = design_matrix_var_to_column (cov, v1);
-      col = design_matrix_var_to_column (cov, v2);
-      x = (val1->f - mean1) * (val2->f - mean2);
-      x += design_matrix_get_element (cov, col, row);
-      design_matrix_set_element (cov, row, col, x);
-      design_matrix_set_element (cov, col, row, x);
-    }
-}
-
-static unsigned int
-covariance_accumulator_hash (const void *h, const void *aux)
-{
-  struct covariance_accumulator *ca = (struct covariance_accumulator *) h;
-  size_t *n_vars = (size_t *) aux;
-  size_t idx_max;
-  size_t idx_min;
-  const struct variable *v_min;
-  const struct variable *v_max;
-  const union value *val_min;
-  const union value *val_max;
-
-  /*
-     Order everything by the variables' indices. This ensures we get the
-     same key regardless of the order in which the variables are stored
-     and passed around.
-   */
-  v_min =
-    (var_get_dict_index (ca->v1) <
-     var_get_dict_index (ca->v2)) ? ca->v1 : ca->v2;
-  v_max = (ca->v1 == v_min) ? ca->v2 : ca->v1;
-
-  val_min = (v_min == ca->v1) ? ca->val1 : ca->val2;
-  val_max = (ca->val1 == val_min) ? ca->val2 : ca->val1;
-
-  idx_min = var_get_dict_index (v_min);
-  idx_max = var_get_dict_index (v_max);
-
-  if (var_is_numeric (v_max) && var_is_numeric (v_min))
-    {
-      return (*n_vars * idx_max + idx_min);
-    }
-  if (var_is_numeric (v_max) && var_is_alpha (v_min))
-    {
-      return hash_numeric_alpha (v_max, v_min, val_min, *n_vars);
-    }
-  if (var_is_alpha (v_max) && var_is_numeric (v_min))
-    {
-      return (hash_numeric_alpha (v_min, v_max, val_max, *n_vars));
-    }
-  if (var_is_alpha (v_max) && var_is_alpha (v_min))
-    {
-      unsigned hash = value_hash (val_max, var_get_width (v_max), 0);
-      hash = value_hash (val_min, var_get_width (v_min), hash);
-      return hash_int (*n_vars * (*n_vars + 1 + idx_max) + idx_min, hash);
-    }
-  return -1u;
-}
-
-/*
-  Make a hash table consisting of struct covariance_accumulators.
-  This allows the accumulation of the elements of a covariance matrix
-  in a single data pass. Call covariance_accumulate () for each case 
-  in the data.
- */
-static struct hsh_table *
-covariance_hsh_create (size_t *n_vars)
-{
-  return hsh_create (*n_vars * *n_vars, covariance_accumulator_compare,
-                    covariance_accumulator_hash, covariance_accumulator_free,
-                    n_vars);
-}
-
-static void
-covariance_accumulator_free (void *c_, const void *aux UNUSED)
-{
-  struct covariance_accumulator *c = c_;
-  assert (c != NULL);
-  free (c);
-}
-
-static int 
-ordered_match_nodes (const struct covariance_accumulator *c, const struct variable *v1,
-                    const struct variable *v2, const union value *val1, const union value *val2)
-{
-  size_t result;
-  size_t m;
-
-  result = var_get_dict_index (v1) ^ var_get_dict_index (c->v1);
-  m = var_get_dict_index (v2) ^ var_get_dict_index (c->v2);
-  result = result|m;
-  if (var_is_alpha (v1))
-    {
-      result |= value_compare_3way (val1, c->val1, var_get_width (v1));
-      if (var_is_alpha (v2))
-       {
-         result |= value_compare_3way (val2, c->val2, var_get_width (v2));
-       }
-    }
-  else if (var_is_alpha (v2))
-    {
-      result |= value_compare_3way (val2, c->val2, var_get_width (v2));
-    }
-  return result;
-}
-  
-/*
-  Hash comparison. Returns 0 for a match, or a non-zero int
-  otherwise. The sign of a non-zero return value *should* indicate the
-  position of C relative to the covariance_accumulator described by
-  the other arguments. But for now, it just returns 1 for any
-  non-match.  This should be changed when someone figures out how to
-  compute a sensible sign for the return value.
- */
-static int
-match_nodes (const struct covariance_accumulator *c,
-            const struct variable *v1, const struct variable *v2,
-            const union value *val1, const union value *val2)
-{
-  size_t n;
-  size_t m;
-
-  n = ordered_match_nodes (c, v1, v2, val1, val2);
-  m = ordered_match_nodes (c, v2, v1, val2, val1);
-  return (n & m);
-}
-
-/*
-  This function is meant to be used as a comparison function for
-  a struct hsh_table in src/libpspp/hash.c.
-*/
-static int
-covariance_accumulator_compare (const void *a1_, const void *a2_,
-                               const void *aux UNUSED)
-{
-  const struct covariance_accumulator *a1 = a1_;
-  const struct covariance_accumulator *a2 = a2_;
-
-  if (a1 == NULL && a2 == NULL)
-    return 0;
-
-  if (a1 == NULL || a2 == NULL)
-    return 1;
-  
-  return match_nodes (a1, a2->v1, a2->v2, a2->val1, a2->val2);
-}
-
-static unsigned int
-hash_numeric_alpha (const struct variable *v1, const struct variable *v2,
-                   const union value *val, size_t n_vars)
-{
-  unsigned int result = -1u;
-  if (var_is_numeric (v1) && var_is_alpha (v2))
-    {
-      result = n_vars * ((n_vars + 1) + var_get_dict_index (v1))
-       + var_get_dict_index (v2) + value_hash (val, var_get_width (v2), 0);
-    }
-  else if (var_is_alpha (v1) && var_is_numeric (v2))
-    {
-      result = hash_numeric_alpha (v2, v1, val, n_vars);
-    }
-  return result;
-}
-
-
-static double
-update_product (const struct variable *v1, const struct variable *v2,
-               const union value *val1, const union value *val2)
-{
-  assert (v1 != NULL);
-  assert (v2 != NULL);
-  assert (val1 != NULL);
-  assert (val2 != NULL);
-  if (var_is_alpha (v1) && var_is_alpha (v2))
-    {
-      return 1.0;
-    }
-  if (var_is_numeric (v1) && var_is_numeric (v2))
-    {
-      return (val1->f * val2->f);
-    }
-  if (var_is_numeric (v1) && var_is_alpha (v2))
-    {
-      return val1->f;
-    }
-  if (var_is_numeric (v2) && var_is_alpha (v1))
-    {
-      return val2->f;
-    }
-  else
-    {
-      return 0.0;
-    }
-}
-static double
-update_sum (const struct variable *var, const union value *val, double weight)
-{
-  assert (var != NULL);
-  assert (val != NULL);
-  if (var_is_alpha (var))
-    {
-      return weight;
-    }
-  return val->f;
-}
-static struct covariance_accumulator *
-get_new_covariance_accumulator (const struct variable *v1,
-                               const struct variable *v2,
-                               const union value *val1,
-                               const union value *val2)
-{
-  if ((v1 != NULL) && (v2 != NULL) && (val1 != NULL) && (val2 != NULL))
-    {
-      struct covariance_accumulator *ca;
-      ca = xmalloc (sizeof (*ca));
-      ca->v1 = v1;
-      ca->v2 = v2;
-      ca->val1 = val1;
-      ca->val2 = val2;
-      return ca;
-    }
-  return NULL;
-}
-
-static const struct variable **
-get_covariance_variables (const struct covariance_matrix *cov)
-{
-  return cov->v_variables;
-}
-
-static void
-update_hash_entry_intr (struct hsh_table *c,
-                       const struct variable *v1,
-                       const struct variable *v2,
-                       const union value *val1, const union value *val2, 
-                       const struct interaction_value *i_val1,
-                       const struct interaction_value *i_val2)
-{
-  struct covariance_accumulator *ca;
-  struct covariance_accumulator *new_entry;
-  double iv_f1;
-  double iv_f2;
-
-  iv_f1 = interaction_value_get_nonzero_entry (i_val1);
-  iv_f2 = interaction_value_get_nonzero_entry (i_val2);
-  ca = get_new_covariance_accumulator (v1, v2, val1, val2);
-  ca->dot_product = update_product (ca->v1, ca->v2, ca->val1, ca->val2);
-  ca->dot_product *= iv_f1 * iv_f2;
-  ca->sum1 = update_sum (ca->v1, ca->val1, iv_f1);
-  ca->sum2 = update_sum (ca->v2, ca->val2, iv_f2);
-  ca->ssize = 1.0;
-  new_entry = hsh_insert (c, ca);
-
-  if (new_entry != NULL)
-    {
-      new_entry->dot_product += ca->dot_product;
-      new_entry->ssize += 1.0;
-      new_entry->sum1 += ca->sum1;
-      new_entry->sum2 += ca->sum2;
-      /*
-       If DOT_PRODUCT is null, CA was not already in the hash
-       hable, so we don't free it because it was just inserted.
-       If DOT_PRODUCT was not null, CA is already in the hash table.
-       Unnecessary now, it must be freed here.
-      */
-      free (ca);
-    }
-}
-
-static void
-update_hash_entry (struct hsh_table *c,
-                  const struct variable *v1,
-                  const struct variable *v2,
-                  const union value *val1, const union value *val2)
-{
-  struct covariance_accumulator *ca;
-  struct covariance_accumulator *new_entry;
-
-  ca = get_new_covariance_accumulator (v1, v2, val1, val2);
-  ca->dot_product = update_product (ca->v1, ca->v2, ca->val1, ca->val2);
-  ca->sum1 = update_sum (ca->v1, ca->val1, 1.0);
-  ca->sum2 = update_sum (ca->v2, ca->val2, 1.0);
-  ca->ssize = 1.0;
-  new_entry = hsh_insert (c, ca);
-
-  if (new_entry != NULL)
-    {
-      new_entry->dot_product += ca->dot_product;
-      new_entry->ssize += 1.0;
-      new_entry->sum1 += ca->sum1;
-      new_entry->sum2 += ca->sum2;
-      /*
-       If DOT_PRODUCT is null, CA was not already in the hash
-       hable, so we don't free it because it was just inserted.
-       If DOT_PRODUCT was not null, CA is already in the hash table.
-       Unnecessary now, it must be freed here.
-      */
-      free (ca);
-    }
-}
-
-static void
-inner_intr_loop (struct covariance_matrix *cov, const struct ccase  *ccase, const struct variable *var1,
-                const union value *val1, const struct interaction_variable **i_var, 
-                const struct interaction_value *i_val1, size_t j)
-{
-  struct variable *var2;
-  union value *val2;
-  struct interaction_value *i_val2;
-
-  var2 = interaction_get_variable (i_var[j]);
-  i_val2 = interaction_case_data (ccase, i_var[j]);
-  val2 = interaction_value_get (i_val2);
-  
-  if (!var_is_value_missing (var2, val2, cov->missing_value))
-    {
-      update_hash_entry_intr (cov->ca, var1, var2, val1, val2, i_val1, i_val2);
-    }
-}       
-/*
-  Compute the covariance matrix in a single data-pass. Cases with
-  missing values are dropped pairwise, in other words, only if one of
-  the two values necessary to accumulate the inner product is missing.
-
-  Do not call this function directly. Call it through the struct
-  covariance_matrix ACCUMULATE member function, for example,
-  cov->accumulate (cov, ccase).
- */
-static void
-covariance_accumulate_pairwise (struct covariance_matrix *cov,
-                               const struct ccase *ccase, 
-                               const struct interaction_variable **i_var,
-                               size_t n_intr)
-{
-  size_t i;
-  size_t j;
-  const union value *val1;
-  const union value *val2;
-  const struct variable **v_variables;
-  const struct variable *var1;
-  const struct variable *var2;
-  struct interaction_value *i_val1 = NULL;
-  struct interaction_value *i_val2 = NULL;
-
-  assert (cov != NULL);
-  assert (ccase != NULL);
-
-  v_variables = get_covariance_variables (cov);
-  assert (v_variables != NULL);
-
-  for (i = 0; i < cov->n_variables; ++i)
-    {
-      var1 = v_variables[i];
-      val1 = case_data (ccase, var1);
-      if (!var_is_value_missing (var1, val1, cov->missing_value))
-       {
-         cat_value_update (var1, val1);
-         if (var_is_numeric (var1))
-           cov->update_moments (cov, i, val1->f);
-
-         for (j = i; j < cov->n_variables; j++)
-           {
-             var2 = v_variables[j];
-             val2 = case_data (ccase, var2);
-             if (!var_is_value_missing
-                 (var2, val2, cov->missing_value))
-               {
-                 update_hash_entry (cov->ca, var1, var2, val1, val2);
-               }
-           }
-         for (j = 0; j < cov->n_intr; j++)
-           {
-             inner_intr_loop (cov, ccase, var1, val1, i_var, i_val1, j);
-           }
-       }
-    }
-  for (i = 0; i < cov->n_intr; i++)
-    {
-      var1 = interaction_get_variable (i_var[i]);
-      i_val1 = interaction_case_data (ccase, i_var[i]);
-      val1 = interaction_value_get (i_val1);
-      cat_value_update (var1, val1);
-      if (!var_is_value_missing (var1, val1, cov->missing_value))
-       {
-         for (j = i; j < cov->n_intr; j++)
-           {
-             inner_intr_loop (cov, ccase, var1, val1, i_var, i_val1, j);
-           }
-       }
-    }
-}
-
-/*
-  Compute the covariance matrix in a single data-pass. Cases with
-  missing values are dropped listwise. In other words, if one of the
-  values for any variable in a case is missing, the entire case is
-  skipped. 
-
-  The caller must use a casefilter to remove the cases with missing
-  values before calling covariance_accumulate_listwise. This function
-  assumes that CCASE has already passed through this filter, and
-  contains no missing values.
-
-  Do not call this function directly. Call it through the struct
-  covariance_matrix ACCUMULATE member function, for example,
-  cov->accumulate (cov, ccase).
- */
-static void
-covariance_accumulate_listwise (struct covariance_matrix *cov,
-                               const struct ccase *ccase,
-                               const struct interaction_variable **i_var,
-                               size_t n_intr)
-{
-  size_t i;
-  size_t j;
-  const union value *val1;
-  const union value *val2;
-  const struct variable **v_variables;
-  struct interaction_value *i_val1 = NULL;
-  struct interaction_value *i_val2 = NULL;
-
-  assert (cov != NULL);
-  assert (ccase != NULL);
-
-  v_variables = get_covariance_variables (cov);
-  assert (v_variables != NULL);
-
-  for (i = 0; i < cov->n_variables; ++i)
-    {
-      val1 = case_data (ccase, v_variables[i]);
-      cat_value_update (v_variables[i], val1);
-      if (var_is_numeric (v_variables[i]))
-       cov->update_moments (cov, i, val1->f);
-
-      for (j = i; j < cov->n_variables; j++)
-       {
-         update_hash_entry (cov->ca, v_variables[i], v_variables[j],
-                            val1, val2);
-       }
-    }
-}
-
-/*
-  Call this function during the data pass. Each case will be added to
-  a hash containing all values of the covariance matrix. After the
-  data have been passed, call covariance_matrix_compute to put the
-  values in the struct covariance_matrix. 
- */
-void
-covariance_matrix_accumulate (struct covariance_matrix *cov,
-                             const struct ccase *ccase, void **aux, size_t n_intr)
-{
-  cov->accumulate (cov, ccase, (const struct interaction_variable **) aux, n_intr);
-}
-
-/*
-  Return the value corresponding to subscript TARGET. If that value corresponds
-  to the origin, return NULL.
- */
-static const union value *
-get_value_from_subscript (const struct design_matrix *dm, size_t target)
-{
-  const union value *result = NULL;
-  const struct variable *var;
-  size_t i;
-  
-  var = design_matrix_col_to_var (dm, target);
-  if (var_is_numeric (var))
-    {
-      return NULL;
-    }
-  for (i = 0; i < cat_get_n_categories (var); i++)
-    {
-      result = cat_subscript_to_value (i, var);
-      if (dm_get_exact_subscript (dm, var, result) == target)
-       {
-         return result;
-       }
-    }
-  return NULL;
-}
-
-static bool
-is_covariance_contributor (const struct covariance_accumulator *ca, const struct design_matrix *dm,
-                          size_t i, size_t j)
-{
-  size_t k;
-  const struct variable *v1;
-  const struct variable *v2;
-  
-  assert (dm != NULL);
-  v1 = design_matrix_col_to_var (dm, i);
-  v2 = design_matrix_col_to_var (dm, j);
-  if (var_get_dict_index (v1) == var_get_dict_index(ca->v1))
-    {
-      if (var_get_dict_index (v2) == var_get_dict_index (ca->v2))
-       {
-         k = dm_get_exact_subscript (dm, v1, ca->val1);
-         if (k == i)
-           {
-             k = dm_get_exact_subscript (dm, v2, ca->val2);
-             if (k == j)
-               {
-                 return true;
-               }
-           }
-       }
-    }
-  else if (var_get_dict_index (v1) == var_get_dict_index (ca->v2))
-    {
-      if (var_get_dict_index (v2) == var_get_dict_index (ca->v1))
-       {
-         k = dm_get_exact_subscript (dm, v1, ca->val2);
-         if (k == i)
-           {
-             k = dm_get_exact_subscript (dm, v2, ca->val1);
-             if (k == j)
-               {
-                 return true;
-               }
-           }
-       }
-    }
-  
-  return false;
-}
-static double
-get_sum (const struct covariance_matrix *cov, size_t i)
-{
-  size_t k;
-  double mean;
-  double n;
-  const struct variable *var;
-  const union value *val = NULL;
-
-  assert ( cov != NULL);
-  var = design_matrix_col_to_var (cov->cov, i);
-  if (var != NULL)
-    {
-      if (var_is_alpha (var))
-       {
-         val = get_value_from_subscript (cov->cov, i);
-         k = cat_value_find (var, val);
-         return cat_get_category_count (k, var);
-       }
-      else
-       {
-         k = 0;
-         while (cov->v_variables[k] != var && k  < cov->n_variables)
-           {
-             k++;
-           }
-         if (k < cov->n_variables)
-           {
-             moments1_calculate (cov->m1[k], &n, &mean, NULL, NULL, NULL);
-             return mean * n;
-           }
-       }
-    }
-      
-  return 0.0;
-}
-static void
-update_ssize (struct design_matrix *dm, size_t i, size_t j, struct covariance_accumulator *ca)
-{
-  const struct variable *var;
-  double tmp;
-  var = design_matrix_col_to_var (dm, i);
-  if (var_get_dict_index (ca->v1) == var_get_dict_index (var))
-    {
-      var = design_matrix_col_to_var (dm, j);
-      if (var_get_dict_index (ca->v2) == var_get_dict_index (var))
-       {
-         tmp = design_matrix_get_element (dm, i, j);
-         tmp += ca->ssize;
-         design_matrix_set_element (dm, i, j, tmp);
-       }
-    }
-}
-static void
-covariance_accumulator_to_matrix (struct covariance_matrix *cov)
-{
-  size_t i;
-  size_t j;
-  double sum_i = 0.0;
-  double sum_j = 0.0;
-  double tmp = 0.0;
-  struct covariance_accumulator *entry;
-  struct hsh_iterator iter;
-
-  cov->cov = covariance_matrix_create_s (cov);
-  cov->ssize = covariance_matrix_create_s (cov);
-  entry = hsh_first (cov->ca, &iter);
-  while (entry != NULL)
-    {
-      entry = hsh_next (cov->ca, &iter);
-    }
-
-  for (i = 0; i < design_matrix_get_n_cols (cov->cov); i++)
-    {
-      sum_i = get_sum (cov, i);
-      for (j = i; j < design_matrix_get_n_cols (cov->cov); j++)
-       {
-         sum_j = get_sum (cov, j);
-         entry = hsh_first (cov->ca, &iter);
-         while (entry != NULL)
-           {
-             update_ssize (cov->ssize, i, j, entry);
-             /*
-               We compute the centered, un-normalized covariance matrix.
-             */
-             if (is_covariance_contributor (entry, cov->cov, i, j))
-               {
-                 design_matrix_set_element (cov->cov, i, j, entry->dot_product);
-               }
-             entry = hsh_next (cov->ca, &iter);
-           }
-         tmp = design_matrix_get_element (cov->cov, i, j);
-         tmp -= sum_i * sum_j / design_matrix_get_element (cov->ssize, i, j);
-         design_matrix_set_element (cov->cov, i, j, tmp);
-         design_matrix_set_element (cov->cov, j, i, tmp);
-       } 
-    }
-}
-
-
-/*
-  Call this function after passing the data.
- */
-void
-covariance_matrix_compute (struct covariance_matrix *cov)
-{
-  if (cov->n_pass == ONE_PASS)
-    {
-      covariance_accumulator_to_matrix (cov);
-    }
-}
-
-struct design_matrix *
-covariance_to_design (const struct covariance_matrix *c)
-{
-  if (c != NULL)
-    {
-      return c->cov;
-    }
-  return NULL;
-}
-size_t
-covariance_matrix_get_n_rows (const struct covariance_matrix *c)
-{
-  return design_matrix_get_n_rows (c->cov);
-}
-
-double 
-covariance_matrix_get_element (const struct covariance_matrix *c, size_t row, size_t col)
-{
-  return (design_matrix_get_element (c->cov, row, col));
-}
-
diff --git a/src/math/covariance-matrix.h b/src/math/covariance-matrix.h
deleted file mode 100644 (file)
index c16e5cb..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-/*
-  Create covariance matrices for procedures that need them.
- */
-
-#ifndef COVARIANCE_MATRIX_H
-#define COVARIANCE_MATRIX_H
-
-#include <math/design-matrix.h>
-#include <math/interaction.h>
-
-struct moments1;
-struct ccase;
-struct hsh_table;
-struct covariance_matrix;
-enum
-{ ONE_PASS,
-  TWO_PASS
-};
-
-/*
-  How to deal with missing values.
- */
-enum
-{ LISTWISE,
-  PAIRWISE
-};
-struct design_matrix *covariance_matrix_create (size_t, const struct variable *[]);
-
-void covariance_matrix_destroy (struct covariance_matrix *);
-void covariance_pass_two (struct design_matrix *, double,
-                         double, double, const struct variable *,
-                         const struct variable *, const union value *,
-                         const union value *);
-void covariance_matrix_compute (struct covariance_matrix *);
-struct covariance_matrix *covariance_matrix_init (size_t,
-                                                 const struct variable *[],
-                                                 int, int, enum mv_class);
-void covariance_matrix_free (struct covariance_matrix *);
-void covariance_matrix_accumulate (struct covariance_matrix *,
-                                  const struct ccase *, void **, size_t);
-struct design_matrix *covariance_to_design (const struct covariance_matrix *);
-double covariance_matrix_get_element (const struct covariance_matrix *, size_t, size_t);
-void covariance_interaction_set (struct covariance_matrix *, 
-                                const struct interaction_variable **, size_t);
-#endif
diff --git a/src/math/design-matrix.c b/src/math/design-matrix.c
deleted file mode 100644 (file)
index 8f125c5..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2005 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-/*
-  Create design matrices for procedures that need them.
-*/
-#include <config.h>
-
-#include "design-matrix.h"
-
-#include <assert.h>
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <libpspp/message.h>
-#include <data/variable.h>
-#include <data/category.h>
-#include <data/value.h>
-
-#include <gsl/gsl_machine.h>
-#include <gsl/gsl_vector.h>
-#include <gsl/gsl_matrix.h>
-
-#include "xalloc.h"
-
-#define DM_COLUMN_NOT_FOUND -1
-#define DM_INDEX_NOT_FOUND -3
-
-
-struct design_matrix *
-design_matrix_create (int n_variables,
-                     const struct variable *v_variables[],
-                     const size_t n_data)
-{
-  struct design_matrix *dm;
-  const struct variable *v;
-  size_t i;
-  size_t n_cols = 0;
-  size_t col;
-
-  dm = xmalloc (sizeof *dm);
-  dm->vars = xnmalloc (n_variables, sizeof *dm->vars);
-  dm->n_cases = xnmalloc (n_variables, sizeof (*dm->n_cases));
-  dm->n_vars = n_variables;
-
-  for (i = 0; i < n_variables; i++)
-    {
-      dm->n_cases[i] = 0;
-      v = v_variables[i];
-      assert ((dm->vars + i) != NULL);
-      (dm->vars + i)->v = v;   /* Allows us to look up the variable from
-                                  the design matrix. */
-      (dm->vars + i)->first_column = n_cols;
-      if (var_is_numeric (v))
-       {
-         (dm->vars + i)->last_column = n_cols;
-         n_cols++;
-       }
-      else if (var_is_alpha (v))
-       {
-         size_t n_categories = cat_get_n_categories (v);
-         (dm->vars + i)->last_column =
-           (dm->vars + i)->first_column + n_categories - 2;
-         n_cols += n_categories - 1;
-       }
-    }
-  dm->m = gsl_matrix_calloc (n_data, n_cols);
-  col = 0;
-
-  
-  return dm;
-}
-
-void
-design_matrix_destroy (struct design_matrix *dm)
-{
-  free (dm->vars);
-  gsl_matrix_free (dm->m);
-  free (dm->n_cases);
-  free (dm);
-}
-
-/*
-  Return the index of the variable for the
-  given column.
- */
-const struct variable *
-design_matrix_col_to_var (const struct design_matrix *dm, size_t col)
-{
-  size_t i;
-  struct design_matrix_var v;
-
-  for (i = 0; i < dm->n_vars; i++)
-    {
-      v = dm->vars[i];
-      if (v.first_column <= col && col <= v.last_column)
-       return v.v;
-    }
-  return NULL;
-}
-
-/*
-  Return the number of the first column which holds the
-  values for variable v.
- */
-size_t
-design_matrix_var_to_column (const struct design_matrix * dm,
-                            const struct variable * v)
-{
-  size_t i;
-  struct design_matrix_var tmp;
-
-  for (i = 0; i < dm->n_vars; i++)
-    {
-      tmp = dm->vars[i];
-      if (tmp.v == v)
-       {
-         return tmp.first_column;
-       }
-    }
-  return DM_COLUMN_NOT_FOUND;
-}
-
-/* Last column. */
-static size_t
-dm_var_to_last_column (const struct design_matrix *dm,
-                      const struct variable *v)
-{
-  size_t i;
-  struct design_matrix_var tmp;
-
-  for (i = 0; i < dm->n_vars; i++)
-    {
-      tmp = dm->vars[i];
-      if (tmp.v == v)
-       {
-         return tmp.last_column;
-       }
-    }
-  return DM_COLUMN_NOT_FOUND;
-}
-
-/*
-  Set the appropriate value in the design matrix,
-  whether that value is from a categorical or numeric
-  variable. For a categorical variable, only the usual
-  binary encoding is allowed.
- */
-void
-design_matrix_set_categorical (struct design_matrix *dm, size_t row,
-                              const struct variable *var,
-                              const union value *val)
-{
-  size_t col;
-  size_t is_one;
-  size_t fc;
-  size_t lc;
-  double entry;
-
-  assert (var_is_alpha (var));
-  fc = design_matrix_var_to_column (dm, var);
-  lc = dm_var_to_last_column (dm, var);
-  assert (lc != DM_COLUMN_NOT_FOUND);
-  assert (fc != DM_COLUMN_NOT_FOUND);
-  is_one = fc + cat_value_find (var, val);
-  for (col = fc; col <= lc; col++)
-    {
-      entry = (col == is_one) ? 1.0 : 0.0;
-      gsl_matrix_set (dm->m, row, col, entry);
-    }
-}
-
-void
-design_matrix_set_numeric (struct design_matrix *dm, size_t row,
-                          const struct variable *var, const union value *val)
-{
-  size_t col;
-
-  assert (var_is_numeric (var));
-  col = design_matrix_var_to_column ((const struct design_matrix *) dm, var);
-  assert (col != DM_COLUMN_NOT_FOUND);
-  gsl_matrix_set (dm->m, row, col, val->f);
-}
-
-struct design_matrix *
-design_matrix_clone (const struct design_matrix *dm)
-{
-  struct design_matrix *result;
-  size_t i;
-  
-  assert (dm != NULL);
-  result = xmalloc (sizeof *result);
-  result->vars = xnmalloc (dm->n_vars, sizeof *dm->vars);
-  result->n_vars = dm->n_vars;
-  result->m = gsl_matrix_alloc (dm->m->size1, dm->m->size2);
-  
-  gsl_matrix_memcpy (result->m, dm->m);
-  for (i = 0; i < result->n_vars; i++)
-    {
-      result->vars[i] = dm->vars[i];
-    }
-  return result;
-}
-
-/*
-  Increment the number of cases for V.
- */
-void 
-design_matrix_increment_case_count (struct design_matrix *dm, const struct variable *v)
-{
-  size_t i;
-  assert (dm != NULL);
-  assert (dm->n_cases != NULL);
-  assert (v != NULL);
-  i = design_matrix_var_to_column (dm, v);
-  dm->n_cases[i]++;
-}
-
-/*
-  Set the number of cases for V.
- */
-void 
-design_matrix_set_case_count (struct design_matrix *dm, const struct variable *v, size_t n)
-{
-  size_t i;
-  assert (dm != NULL);
-  assert (dm->n_cases != NULL);
-  assert (v != NULL);
-  i = design_matrix_var_to_column (dm, v);
-  dm->n_cases[i] = n;
-}
-
-/*
-  Get the number of cases for V.
- */
-size_t 
-design_matrix_get_case_count (const struct design_matrix *dm, const struct variable *v)
-{
-  size_t i;
-  assert (dm != NULL);
-  assert (dm->n_cases != NULL);
-  assert (v != NULL);
-  i = design_matrix_var_to_column (dm, v);
-  return dm->n_cases[i];
-}
-
-size_t
-design_matrix_get_n_cols (const struct design_matrix *d)
-{
-  return d->m->size2;
-}
-
-size_t
-design_matrix_get_n_rows (const struct design_matrix *d)
-{
-  return d->m->size1;
-}
-
-double
-design_matrix_get_element (const struct design_matrix *d, size_t row, size_t col)
-{
-  return (gsl_matrix_get (d->m, row, col));
-}
-
-void
-design_matrix_set_element (const struct design_matrix *d, size_t row, size_t col, double x)
-{
-  gsl_matrix_set (d->m, row, col, x);
-}
-
-/*
-  Return the subscript of the column of the design matrix
-  corresponding to VAL. If VAR is categorical with d categories, its
-  first category should correspond to the origin in d-dimensional
-  Euclidean space, so there is no subscript for this value.
- */
-size_t
-dm_get_exact_subscript (const struct design_matrix *dm, const struct variable *var,
-                    const union value *val)
-{
-  size_t result;
-
-  result = design_matrix_var_to_column (dm, var);
-  if (var_is_alpha (var))
-    {
-      if (cat_is_origin (var, val))
-       {
-         return -1u;
-       }
-      result += cat_value_find (var, val) - 1;
-    }
-  return result;
-}
diff --git a/src/math/design-matrix.h b/src/math/design-matrix.h
deleted file mode 100644 (file)
index b1cda5a..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2005 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-/*
-  Create design matrices for procedures that need them.
- */
-
-#ifndef DESIGN_MATRIX_H
-#define DESIGN_MATRIX_H
-
-#include <gsl/gsl_matrix.h>
-#include <stdbool.h>
-#include <data/category.h>
-
-struct design_matrix_var
-{
-  size_t first_column;         /* First column for this variable in
-                                  the design_matix. If this variable
-                                  is categorical, its values are
-                                  stored in multiple, contiguous
-                                  columns, as dictated by its vector
-                                  encoding in the variable's struct
-                                  cat_vals.
-                                */
-  size_t last_column;
-  const struct variable *v;
-};
-
-struct design_matrix
-{
-  gsl_matrix *m;
-  struct design_matrix_var *vars;      /* Element i corresponds to
-                                          the variable whose values
-                                          are stored in at least one
-                                          column of m. If that
-                                          variable is categorical
-                                          with more than two
-                                          categories, its values are
-                                          stored in multiple,
-                                          contiguous columns. The
-                                          variable's values are then
-                                          stored in the columns
-                                          first_column through
-                                          last_column of the
-                                          design_matrix_var
-                                          structure.
-                                        */
-  size_t *n_cases; /* Element i is the number of valid cases for this
-                     variable.
-                   */
-  size_t n_vars;
-};
-
-
-struct design_matrix *design_matrix_create (int, const struct variable *[],
-                                           const size_t);
-
-void design_matrix_destroy (struct design_matrix *);
-
-void design_matrix_set_categorical (struct design_matrix *, size_t,
-                                   const struct variable *,
-                                   const union value *);
-
-void design_matrix_set_numeric (struct design_matrix *, size_t,
-                                   const struct variable *,
-                                   const union value *);
-
-struct design_matrix *design_matrix_clone (const struct design_matrix *);
-
-size_t design_matrix_var_to_column (const struct design_matrix *,
-                                   const struct variable *);
-
-const struct variable *design_matrix_col_to_var (const struct design_matrix *,
-                                          size_t);
-void design_matrix_increment_case_count (struct design_matrix *, const struct variable *);
-
-void design_matrix_set_case_count (struct design_matrix *, const struct variable *, size_t);
-
-size_t design_matrix_get_case_count (const struct design_matrix *, const struct variable *);
-size_t design_matrix_get_n_cols (const struct design_matrix *);
-size_t design_matrix_get_n_rows (const struct design_matrix *);
-double design_matrix_get_element (const struct design_matrix *, size_t, size_t);
-void design_matrix_set_element (const struct design_matrix *, size_t, size_t, double);
-size_t dm_get_exact_subscript (const struct design_matrix *, const struct variable *,
-                                  const union value *);
-
-#endif
index 67079398d169ec58737c6f3b94a7d243b9fc8516..3c88c3858f61c6b1c2230843a7b9151a47902956 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2004, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
 
 #include <gl/xalloc.h>
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 
 #include <gsl/gsl_histogram.h>
 #include "chart-geometry.h"
@@ -28,7 +29,8 @@
 void
 histogram_add (struct histogram *h, double y, double c)
 {
-  ((struct statistic *)h)->accumulate ((struct statistic *) h, NULL, c, 0, y);
+  struct statistic *stat = &h->parent;
+  stat->accumulate (stat, NULL, c, 0, y);
 }
 
 
@@ -36,7 +38,7 @@ histogram_add (struct histogram *h, double y, double c)
 static void
 acc (struct statistic *s, const struct ccase *cx UNUSED, double c, double cc UNUSED, double y)
 {
-  struct histogram *hist = (struct histogram *) s;
+  struct histogram *hist = UP_CAST (s, struct histogram, parent);
 
   gsl_histogram_accumulate (hist->gsl_hist, y, c);
 }
@@ -45,17 +47,17 @@ acc (struct statistic *s, const struct ccase *cx UNUSED, double c, double cc UNU
 static void
 destroy (struct statistic *s)
 {
-  struct histogram *h = (struct histogram *) s;
+  struct histogram *h = UP_CAST (s, struct histogram, parent);
   gsl_histogram_free (h->gsl_hist);
   free (s);
 }
 
 
-struct statistic *
+struct histogram *
 histogram_create (int bins, double min, double max)
 {
   struct histogram *h = xmalloc (sizeof *h);
-  struct statistic *stat = (struct statistic *) h;
+  struct statistic *stat = &h->parent;
   double upper_limit, lower_limit;
 
   double bin_width = chart_rounded_tick ((max - min) / (double) bins);
@@ -78,6 +80,6 @@ histogram_create (int bins, double min, double max)
   stat->accumulate = acc;
   stat->destroy = destroy;
 
-  return stat;
+  return h;
 }
 
index b2b204ee808098c2bf378ef99e8419c6d4223988..bc4a5ae6c1354d9711a467ceba8cf904a875a8fa 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ struct histogram
   gsl_histogram *gsl_hist;
 };
 
-struct statistic * histogram_create (int bins, double max, double min);
+struct histogram * histogram_create (int bins, double max, double min);
 
 void histogram_add (struct histogram *h, double y, double c);
 
index 7fc9f0f63d2c5efee0098f06fe921d50758425e6..2f8da8ccaaa1fd4619a73415a8ff888cd097d9ac 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -31,6 +31,7 @@
 
 #include <config.h>
 #include <assert.h>
+#include <data/dictionary.h>
 #include <data/value.h>
 #include <data/variable.h>
 #include <gl/unistr.h>
@@ -84,14 +85,14 @@ interaction_variable_create (const struct variable **vars, int n_vars)
              width += var_get_width (vars[i]);
            }
        }
-      result->intr = var_create_internal (0, width);
+      result->intr = dict_create_internal_var (0, width);
     }
 
   return result;
 }
 void interaction_variable_destroy (struct interaction_variable *iv)
 {
-  var_destroy (iv->intr);
+  dict_destroy_internal_var (iv->intr);
   free (iv->members);
   free (iv);
 }
@@ -267,7 +268,7 @@ is_interaction (const struct variable *var, const struct interaction_variable **
   for (i = 0; i < n_intr; i++)
     {
       intr = interaction_get_variable (iv[i]);
-      if (var_get_dict_index (intr) == var_get_dict_index (var))
+      if (intr == var)
        {
          return true;
        }
index 7bd582105f940c28ffeb26506d4c5fe941ff728d..5ff474dc4ed5c0c39088a2d1a0affabf676835ce 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -164,7 +164,7 @@ levene_precalc (const struct levene_info *l)
 
 
       for ( gs = hsh_first(gp->group_hash, &hi);
-           gs != 0;
+           gs != NULL;
            gs = hsh_next(gp->group_hash, &hi))
        {
          gs->lz_total = 0;
@@ -196,7 +196,7 @@ levene_calc (const struct dictionary *dict, const struct ccase *c,
 
       gs = hsh_find(gp->group_hash,(void *) &key );
 
-      if ( 0 == gs )
+      if ( gs == NULL )
        continue ;
 
       if ( !var_is_value_missing (var, v, l->exclude))
@@ -246,9 +246,7 @@ levene2_precalc (struct levene_info *l)
       struct hsh_table *hash = group_proc_get (var)->group_hash;
 
 
-      for(g = (struct group_statistics *) hsh_first(hash,&hi);
-         g != 0 ;
-         g = (struct group_statistics *) hsh_next(hash,&hi) )
+      for (g = hsh_first(hash,&hi); g != NULL; g = hsh_next(hash, &hi))
        {
          g->lz_mean = g->lz_total / g->n ;
        }
@@ -279,7 +277,7 @@ levene2_calc (const struct dictionary *dict, const struct ccase *c,
 
       gs = hsh_find(group_proc_get (var)->group_hash,(void *) &key );
 
-      if ( 0 == gs )
+      if ( gs == NULL )
        continue;
 
       if ( !var_is_value_missing (var, v, l->exclude))
@@ -308,9 +306,7 @@ levene2_postcalc (struct levene_info *l)
       struct group_proc *gp = group_proc_get (var);
       struct hsh_table *hash = gp->group_hash;
 
-      for(g = (struct group_statistics *) hsh_first(hash,&hi);
-         g != 0 ;
-         g = (struct group_statistics *) hsh_next(hash,&hi) )
+      for (g = hsh_first(hash, &hi); g != NULL; g = hsh_next(hash, &hi))
        {
          lz_numerator += g->n * pow2(g->lz_mean - l->lz[v].grand_mean );
        }
index e0083eca1b9d923d4f38d6f752287002537f6ca8..462a07852fe7fc04cb275f8298874fc0b0055fc2 100644 (file)
@@ -23,7 +23,6 @@
 #include <gsl/gsl_multifit.h>
 #include <linreg/sweep.h>
 #include <math/linreg.h>
-#include <src/data/category.h>
 #include <src/data/variable.h>
 #include <src/data/value.h>
 #include <gl/xalloc.h>
index d129f6ab038b3eee06104e716b15fbcf432c61c5..545c9644399a9501765455cfc99505be30e8d460 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@ calc_moments (enum moment max_moment,
 
       /* From _SPSS Statistical Algorithms, 2nd ed.,
          0-918469-89-9, section "DESCRIPTIVES". */
-      if (fabs (*variance) >= 1e-20)
+      if (fabs (s2) >= 1e-20)
         {
           if (max_moment >= MOMENT_SKEWNESS && skewness != NULL && w > 2.)
             {
index e61bf58e117aaf915d596bc26b8875152f0f0deb..b631820903e6ebf4e41a536ebe7ea964924af918 100644 (file)
@@ -24,6 +24,7 @@
 #include <data/case.h>
 #include <data/casewriter.h>
 #include <libpspp/compiler.h>
+#include <libpspp/cast.h>
 #include <libpspp/misc.h>
 #include <math/moments.h>
 
@@ -32,8 +33,8 @@
 static void
 destroy (struct statistic *stat)
 {
-  struct order_stats *os = (struct order_stats *) stat;
-  free (os);
+  struct np *np = UP_CAST (stat, struct np, parent.parent);
+  free (np);
 }
 
 
@@ -42,7 +43,7 @@ acc (struct statistic *s, const struct ccase *cx UNUSED,
      double c, double cc, double y)
 {
   struct ccase *cp;
-  struct np *np = (struct np *) s;
+  struct np *np = UP_CAST (s, struct np, parent.parent);
   double rank = np->prev_cc + (c + 1) / 2.0;
 
   double ns = gsl_cdf_ugaussian_Pinv (rank / ( np->n + 1 ));
@@ -69,13 +70,13 @@ acc (struct statistic *s, const struct ccase *cx UNUSED,
   np->prev_cc = cc;
 }
 
-struct order_stats *
+struct np *
 np_create (const struct moments1 *m)
 {
   double variance;
   struct np *np = xzalloc (sizeof (*np));
-  struct statistic *stat = (struct statistic *) np;
-  struct order_stats *os = (struct order_stats *) np;
+  struct order_stats *os = &np->parent;
+  struct statistic *stat = &os->parent;
   struct caseproto *proto;
   int i;
 
@@ -98,5 +99,5 @@ np_create (const struct moments1 *m)
   stat->destroy = destroy;
   stat->accumulate = acc;
 
-  return os;
+  return np;
 }
index 7db51f73b223fbcf7ade345afec06c45b5687fb9..b5265bd41f72c57d5b895a578a428971957fb61a 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -54,6 +54,6 @@ struct np
 };
 
 
-struct order_stats * np_create (const struct moments1 *);
+struct np * np_create (const struct moments1 *);
 
 #endif
index 1b6aa131ea745ba6c0b55b33a54f3a6d39ceddbe..e550d2b2eb55f66fd4baea366e7a058abb849443 100644 (file)
@@ -90,7 +90,7 @@ update_k_values (const struct ccase *cx, double y_i, double c_i, double cc_i,
     {
       int k;
       struct order_stats *tos = os[j];
-      struct statistic  *stat = (struct statistic *) tos;
+      struct statistic  *stat = &tos->parent;
       for (k = 0 ; k < tos->n_k; ++k)
        {
          struct k *myk = &tos->k[k];
index bf99de163ffbaafe2af8711685e9a640a0256784..c76bb492ba767a90ffa2c03c8d35bf8a7d532ab6 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
 #define N_(msgid) msgid
 
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 #include <data/val-type.h>
 #include <gl/xalloc.h>
 #include <data/variable.h>
@@ -44,7 +45,7 @@ const char *const ptile_alg_desc[] = {
 double
 percentile_calculate (const struct percentile *ptl, enum pc_alg alg)
 {
-  struct percentile *mutable = (struct percentile *) ptl;
+  struct percentile *mutable = CONST_CAST (struct percentile *, ptl);
   const struct order_stats *os = &ptl->parent;
 
   assert (os->cc == ptl->w);
@@ -154,18 +155,19 @@ percentile_calculate (const struct percentile *ptl, enum pc_alg alg)
 static void
 destroy (struct statistic *stat)
 {
-  struct order_stats *os = (struct order_stats *) stat;
+  struct percentile *ptl = UP_CAST (stat, struct percentile, parent.parent);
+  struct order_stats *os = &ptl->parent;
   free (os->k);
-  free (os);
+  free (ptl);
 }
 
 
-struct order_stats *
+struct percentile *
 percentile_create (double p, double W)
 {
   struct percentile *ptl = xzalloc (sizeof (*ptl));
-  struct order_stats *os = (struct order_stats *) ptl;
-  struct statistic *stat = (struct statistic *) ptl;
+  struct order_stats *os = &ptl->parent;
+  struct statistic *stat = &os->parent;
 
   assert (p >= 0);
   assert (p <= 1.0);
@@ -186,6 +188,6 @@ percentile_create (double p, double W)
 
   stat->destroy = destroy;
 
-  return os;
+  return ptl;
 }
 
index 0dd09820945e1bafaee5a017ba3756cb4197783b..ff46bea6dce45611b88c621df4f7e86a30d97534 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2004, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ struct percentile
 /* Create the Pth percentile.
    W is the total sum of weights in the data set
 */
-struct order_stats *percentile_create (double p, double W);
+struct percentile *percentile_create (double p, double W);
 
 /* Return the value of the percentile */
 double percentile_calculate (const struct percentile *ptl, enum pc_alg alg);
index da3d4240e5b232533de6c5c31073b53adda49f48..d1cc6b708279098ab8d263b95923d9b31c968ed6 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
 
 #include <gl/xalloc.h>
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 #include <math.h>
 #include <data/val-type.h>
 
@@ -27,8 +28,8 @@
 static void
 acc (struct statistic *s, const struct ccase *cx UNUSED, double c, double cc, double y)
 {
-  struct trimmed_mean *tm = (struct trimmed_mean *) s;
-  struct order_stats *os = (struct order_stats *) s;
+  struct trimmed_mean *tm = UP_CAST (s, struct trimmed_mean, parent.parent);
+  struct order_stats *os = &tm->parent;
 
   if ( cc > os->k[0].tc && cc < os->k[1].tc)
       tm->sum += c * y;
@@ -40,17 +41,18 @@ acc (struct statistic *s, const struct ccase *cx UNUSED, double c, double cc, do
 static void
 destroy (struct statistic *s)
 {
-  struct order_stats *os = (struct order_stats *) s;
+  struct trimmed_mean *tm = UP_CAST (s, struct trimmed_mean, parent.parent);
+  struct order_stats *os = &tm->parent;
   free (os->k);
-  free (s);
+  free (tm);
 }
 
-struct statistic *
+struct trimmed_mean *
 trimmed_mean_create (double W, double tail)
 {
   struct trimmed_mean *tm = xzalloc (sizeof (*tm));
-  struct order_stats *os = (struct order_stats *) tm;
-  struct statistic *stat = (struct statistic *) tm;
+  struct order_stats *os = &tm->parent;
+  struct statistic *stat = &os->parent;
 
   os->n_k = 2;
   os->k = xcalloc (sizeof (*os->k), 2);
@@ -68,7 +70,7 @@ trimmed_mean_create (double W, double tail)
   tm->w = W;
   tm->tail = tail;
 
-  return stat;
+  return tm;
 }
 
 
index 9339cab983ff9fba971d2cd2703ee81f17be6f66..c667b1be7ffcd9f9486606022c521143f5f08e6e 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ struct trimmed_mean
   double tail;
 };
 
-struct statistic * trimmed_mean_create (double W, double c_min);
+struct trimmed_mean * trimmed_mean_create (double W, double c_min);
 double trimmed_mean_calculate (const struct trimmed_mean *);
 
 #endif
index 95a79c1d30026da280cbc6fa2542518c0ff4ad1f..22ab45210c38c98066eb4bb654663114cb496ddd 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
 
 #include <gl/xalloc.h>
 #include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 #include <math.h>
 
 void
@@ -59,19 +60,20 @@ tukey_hinges_calculate (const struct tukey_hinges *th, double hinge[3])
 static void
 destroy (struct statistic *s)
 {
-  struct order_stats *os = (struct order_stats *) s;
+  struct tukey_hinges *th = UP_CAST (s, struct tukey_hinges, parent.parent);
+  struct order_stats *os = &th->parent;
 
   free (os->k);
   free (s);
 };
 
-struct statistic *
+struct tukey_hinges *
 tukey_hinges_create (double W, double c_min)
 {
   double d;
   struct tukey_hinges *th = xzalloc (sizeof (*th));
-  struct order_stats *os = (struct order_stats *) th;
-  struct statistic *stat = (struct statistic *) th;
+  struct order_stats *os = &th->parent;
+  struct statistic *stat = &os->parent;
 
   assert (c_min >= 0);
 
@@ -97,5 +99,5 @@ tukey_hinges_create (double W, double c_min)
 
   stat->destroy = destroy;
 
-  return stat;
+  return th;
 }
index d87691f8b01a4dceb78fddfc9294c17053e8690b..4b509da1d4321a8396510fd4c08b40d801214ffe 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ struct tukey_hinges
   struct order_stats parent;
 };
 
-struct statistic * tukey_hinges_create (double W, double c_min);
+struct tukey_hinges * tukey_hinges_create (double W, double c_min);
 
 
 void tukey_hinges_calculate (const struct tukey_hinges *h, double hinge[3]);
diff --git a/src/output/afm.c b/src/output/afm.c
deleted file mode 100644 (file)
index 480aa15..0000000
+++ /dev/null
@@ -1,1156 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-#include "afm.h"
-#include "c-ctype.h"
-#include "c-strtod.h"
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <setjmp.h>
-#include "error.h"
-#include "minmax.h"
-#include <libpspp/assertion.h>
-#include <libpspp/pool.h>
-#include <libpspp/str.h>
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-
-/* A kern pair entry. */
-struct afm_kern_pair
-  {
-    struct afm_character *successor; /* Second character. */
-    int adjust;                 /* Adjustment. */
-  };
-
-/* A ligature. */
-struct afm_ligature
-  {
-    struct afm_character *successor; /* Second character. */
-    struct afm_character *ligature;  /* Resulting ligature. */
-  };
-
-/* How to map between byte strings and character values. */
-enum mapping_scheme
-  {
-    MAP_UNKNOWN,                /* Not yet determined. */
-    MAP_ONE_BYTE,               /* 8-bit coding. */
-    MAP_TWO_BYTE,               /* 16-bit coding. */
-    MAP_ESCAPE,                 /* 8-bit coding with escape to change fonts. */
-    MAP_DOUBLE_ESCAPE,          /* 8-bit coding with multiple escapes. */
-    MAP_SHIFT                   /* 8-bit coding with 2 fonts that toggle. */
-  };
-
-/* AFM file data.  */
-struct afm
-  {
-    struct pool *pool;         /* Containing pool. */
-    char *findfont_name;        /* Name for PostScript /findfont operator. */
-    int ascent;                 /* Height above the baseline (non-negative). */
-    int descent;                /* Depth below the baseline (non-negative). */
-
-    /* Encoding characters into strings. */
-    enum mapping_scheme mapping; /* Basic mapping scheme. */
-    char escape_char;           /* MAP_ESCAPE only: escape character to use. */
-    char shift_out;             /* MAP_SHIFT only: selects font 0. */
-    char shift_in;              /* MAP_SHIFT only: selects font 1. */
-
-    /* Characters. */
-    struct afm_character *undefined_codes[256];
-    struct afm_character **codes[256];
-    struct afm_character **chars;
-    size_t char_cnt;
-  };
-
-/* AFM file parser. */
-struct parser
-  {
-    struct pool *pool;          /* Containing pool. */
-    struct afm *afm;            /* AFM being parsed. */
-    FILE *file;                 /* File being parsed. */
-    const char *file_name;      /* Name of file being parsed. */
-    int line_number;            /* Current line number in file. */
-    jmp_buf bail_out;           /* longjmp() target for error handling. */
-
-    size_t char_allocated;
-    int max_code;
-  };
-
-static struct afm *create_afm (void);
-static struct afm_character *create_character (struct afm *);
-
-static void afm_error (struct parser *, const char *, ...)
-     PRINTF_FORMAT (2, 3)
-     NO_RETURN;
-
-static void parse_afm (struct parser *);
-static void skip_section (struct parser *, const char *end_key);
-static bool parse_set_specific (struct parser *, const char *end_key);
-static void parse_direction (struct parser *);
-static void parse_char_metrics (struct parser *);
-static void parse_kern_pairs (struct parser *);
-static void add_kern_pair (struct parser *p,
-                           struct afm_character *, struct afm_character *,
-                           int adjust);
-
-static int skip_spaces (struct parser *);
-static char *parse_key (struct parser *);
-static void skip_line (struct parser *);
-static void force_eol (struct parser *);
-static bool get_integer (struct parser *, int *);
-static int force_get_integer (struct parser *);
-static bool get_number (struct parser *, int *);
-static int force_get_number (struct parser *);
-static bool get_hex_code (struct parser *, int *);
-static int force_get_hex_code (struct parser *);
-static bool get_word (struct parser *, char **);
-static char *force_get_word (struct parser *);
-static bool get_string (struct parser *, char **);
-static char *force_get_string (struct parser *);
-
-static struct afm_character *get_char_by_name (struct parser *, const char *);
-static struct afm_character *get_char_by_code (const struct afm *, int code);
-
-/* Reads FILE_NAME as an AFM file and returns the metrics data.
-   Returns a null pointer if the file cannot be parsed. */
-struct afm *
-afm_open (const char *file_name)
-{
-  struct afm *volatile afm;
-  struct parser *parser;
-
-  parser = pool_create_container (struct parser, pool);
-  afm = parser->afm = create_afm ();
-  parser->file = pool_fopen (parser->pool, file_name, "r");
-  parser->file_name = file_name;
-  parser->line_number = 0;
-  if (parser->file == NULL)
-    {
-      error (0, errno, _("opening font metrics file \"%s\""), file_name);
-      goto error;
-    }
-
-  if (setjmp (parser->bail_out))
-    goto error;
-
-  parse_afm (parser);
-  pool_destroy (parser->pool);
-  return afm;
-
- error:
-  pool_destroy (parser->pool);
-  pool_destroy (afm->pool);
-  return create_afm ();
-}
-
-/* Creates and returns an empty set of metrics. */
-static struct afm *
-create_afm (void)
-{
-  struct afm *afm;
-  struct afm_character *def_char;
-  size_t i;
-
-  afm = pool_create_container (struct afm, pool);
-  afm->findfont_name = NULL;
-  afm->ascent = 0;
-  afm->descent = 0;
-  afm->mapping = MAP_UNKNOWN;
-  afm->escape_char = 255;
-  afm->shift_out = 14;
-  afm->shift_in = 15;
-  def_char = create_character (afm);
-  for (i = 0; i < 256; i++)
-    afm->undefined_codes[i] = def_char;
-  for (i = 0; i < 256; i++)
-    afm->codes[i] = afm->undefined_codes;
-  afm->chars = NULL;
-  afm->char_cnt = 0;
-
-  return afm;
-}
-
-/* Creates and returns an initialized character within AFM. */
-static struct afm_character *
-create_character (struct afm *afm)
-{
-  struct afm_character *c = pool_alloc (afm->pool, sizeof *c);
-  c->code = ' ';
-  c->name = NULL;
-  c->width = 12000;
-  c->ascent = 0;
-  c->descent = 0;
-  c->kern_pairs = NULL;
-  c->kern_pair_cnt = 0;
-  c->ligatures = NULL;
-  c->ligature_cnt = 0;
-  return c;
-}
-
-/* Reports the given MESSAGE at the current line in parser P
-   and bails out with longjmp(). */
-static void
-afm_error (struct parser *p, const char *message, ...)
-{
-  va_list args;
-  char *msg;
-
-  va_start (args, message);
-  msg = xasprintf (message, args);
-  va_end (args);
-
-  error_at_line (0, 0, p->file_name, p->line_number, "%s", msg);
-  free (msg);
-
-  longjmp (p->bail_out, 1);
-}
-
-/* Parses an AFM file with parser P. */
-static void
-parse_afm (struct parser *p)
-{
-  char *key;
-
-  p->char_allocated = 0;
-  p->max_code = 0;
-
-  key = force_get_word (p);
-  if (strcmp (key, "StartFontMetrics"))
-    afm_error (p, _("first line must be StartFontMetrics"));
-  skip_line (p);
-
-  do
-    {
-      key = parse_key (p);
-      if (!strcmp (key, "FontName"))
-        p->afm->findfont_name = pool_strdup (p->afm->pool,
-                                             force_get_string (p));
-      else if (!strcmp (key, "Ascender"))
-        p->afm->ascent = force_get_integer (p);
-      else if (!strcmp (key, "Descender"))
-        p->afm->descent = force_get_integer (p);
-      else if (!strcmp (key, "MappingScheme"))
-        {
-          int scheme = force_get_integer (p);
-          if (scheme == 4)
-            p->afm->mapping = MAP_ONE_BYTE;
-          else if (scheme == 2 || scheme == 5 || scheme == 6)
-            p->afm->mapping = MAP_TWO_BYTE;
-          else if (scheme == 3)
-            p->afm->mapping = MAP_ESCAPE;
-          else if (scheme == 7)
-            p->afm->mapping = MAP_DOUBLE_ESCAPE;
-          else if (scheme == 8)
-            p->afm->mapping = MAP_SHIFT;
-          else
-            afm_error (p, _("unsupported MappingScheme %d"), scheme);
-        }
-      else if (!strcmp (key, "EscChar"))
-        p->afm->escape_char = force_get_integer (p);
-      else if (!strcmp (key, "StartDirection"))
-        parse_direction (p);
-      else if (!strcmp (key, "StartCharMetrics"))
-        parse_char_metrics (p);
-      else if (!strcmp (key, "StartKernPairs")
-               || !strcmp (key, "StartKernPairs0"))
-        parse_kern_pairs (p);
-      else if (!strcmp (key, "StartTrackKern"))
-        skip_section (p, "EndTrackKern");
-      else if (!strcmp (key, "StartComposites"))
-        skip_section (p, "EndComposites");
-      else
-        skip_line (p);
-    }
-  while (strcmp (key, "EndFontMetrics"));
-
-  if (p->afm->findfont_name == NULL)
-    afm_error (p, _("required FontName is missing"));
-  if (p->afm->mapping == MAP_UNKNOWN)
-    {
-      /* There seem to be a number of fonts out there that use a
-         2-byte encoding but don't announce it with
-         MappingScheme. */
-      p->afm->mapping = p->max_code > 255 ? MAP_TWO_BYTE : MAP_ONE_BYTE;
-    }
-}
-
-/* Reads lines from parser P until one starts with END_KEY. */
-static void
-skip_section (struct parser *p, const char *end_key)
-{
-  const char *key;
-  skip_line (p);
-  do
-    {
-      key = parse_key (p);
-      skip_line (p);
-    }
-  while (strcmp (key, end_key));
-}
-
-/* Attempts to read an integer from parser P.
-   If one is found, and it is nonzero, skips lines until END_KEY
-   is encountered and returns false.
-   Otherwise, skips the rest of the line and returns true.
-   (This is useful because AFM files can have multiple sets of
-   metrics.  Set 0 is for normal text, other sets are for
-   vertical text, etc.  We only care about set 0.) */
-static bool
-parse_set_specific (struct parser *p, const char *end_key)
-{
-  int set;
-
-  if (get_integer (p, &set) && set != 0)
-    {
-      skip_section (p, end_key);
-      return false;
-    }
-  else
-    {
-      force_eol (p);
-      return true;
-    }
-}
-
-/* Parses a StartDirection...EndDirection section in parser P. */
-static void
-parse_direction (struct parser *p)
-{
-  const char *key;
-
-  if (!parse_set_specific (p, "EndDirection"))
-    return;
-
-  do
-    {
-      key = parse_key (p);
-      if (!strcmp (key, "CharWidth"))
-        p->afm->codes[0][0]->width = force_get_integer (p);
-      skip_line (p);
-    }
-  while (strcmp (key, "EndDirection"));
-}
-
-/* Parses a StartCharMetrics...EndCharMetrics section in parser
-   P. */
-static void
-parse_char_metrics (struct parser *p)
-{
-  struct parsing_ligature
-    {
-      struct afm_character *first;
-      char *successor;
-      char *ligature;
-    };
-
-  struct parsing_ligature *ligatures = NULL;
-  size_t ligature_cnt = 0;
-  size_t ligature_allocated = 0;
-
-  size_t i;
-
-  skip_line (p);
-
-  for (;;)
-    {
-      char *key;
-      struct afm_character *c;
-
-      key = parse_key (p);
-      if (!strcmp (key, "EndCharMetrics"))
-        break;
-
-      if (p->afm->char_cnt == p->char_allocated)
-        p->afm->chars = pool_2nrealloc (p->afm->pool, p->afm->chars,
-                                        &p->char_allocated,
-                                        sizeof *p->afm->chars);
-      c = create_character (p->afm);
-
-      if (!strcmp (key, "C"))
-        c->code = force_get_integer (p);
-      else if (!strcmp (key, "CH"))
-        c->code = force_get_hex_code (p);
-      else
-        afm_error (p, _("CharMetrics line must start with C or CH"));
-      if (c->code < 0 || c->code > 65535)
-        c->code = -1;
-
-      if (c->code > p->max_code)
-        p->max_code = c->code;
-
-      p->afm->chars[p->afm->char_cnt++] = c;
-      if (c->code != -1)
-        p->afm->codes[c->code >> 8][c->code & 0xff] = c;
-
-      key = force_get_word (p);
-      while (!strcmp (key, ";"))
-        {
-          if (!get_word (p, &key))
-            break;
-
-          if (!strcmp (key, "N"))
-            c->name = force_get_word (p);
-          else if (!strcmp (key, "WX") || !strcmp (key, "W0X"))
-            c->width = force_get_number (p);
-          else if (!strcmp (key, "W") || !strcmp (key, "W0"))
-            {
-              c->width = force_get_number (p);
-              force_get_number (p);
-            }
-          else if (!strcmp (key, "B"))
-            {
-              int llx, lly, urx, ury;
-              llx = force_get_number (p);
-              lly = force_get_number (p);
-              urx = force_get_number (p);
-              ury = force_get_number (p);
-              c->ascent = MAX (0, ury);
-              c->descent = MAX (0, -lly);
-            }
-          else if (!strcmp (key, "L"))
-            {
-              struct parsing_ligature *ligature;
-              if (ligature_cnt == ligature_allocated)
-                ligatures = pool_2nrealloc (p->pool, ligatures,
-                                            &ligature_allocated,
-                                            sizeof *ligatures);
-              ligature = &ligatures[ligature_cnt++];
-              ligature->first = c;
-              ligature->successor = force_get_word (p);
-              ligature->ligature = force_get_word (p);
-            }
-          else
-            {
-              while (strcmp (key, ";"))
-                key = force_get_word (p);
-              continue;
-            }
-          if (!get_word (p, &key))
-            break;
-        }
-    }
-  skip_line (p);
-
-  for (i = 0; i < ligature_cnt; i++)
-    {
-      struct parsing_ligature *src = &ligatures[i];
-      struct afm_ligature *dst;
-      src->first->ligatures = pool_nrealloc (p->afm->pool,
-                                             src->first->ligatures,
-                                             src->first->ligature_cnt + 1,
-                                             sizeof *src->first->ligatures);
-      dst = &src->first->ligatures[src->first->ligature_cnt++];
-      dst->successor = get_char_by_name (p, src->successor);
-      dst->ligature = get_char_by_name (p, src->ligature);
-    }
-}
-
-/* Parses a StartKernPairs...EndKernPairs section in parser P. */
-static void
-parse_kern_pairs (struct parser *p)
-{
-  char *key;
-
-  skip_line (p);
-
-  do
-    {
-      struct afm_character *c1, *c2;
-      int adjust;
-
-      key = parse_key (p);
-      if (!strcmp (key, "KP") || !strcmp (key, "KPX"))
-        {
-          c1 = get_char_by_name (p, force_get_word (p));
-          c2 = get_char_by_name (p, force_get_word (p));
-          adjust = force_get_number (p);
-          if (!strcmp (key, "KP"))
-            force_get_number (p);
-          add_kern_pair (p, c1, c2, adjust);
-        }
-      else if (!strcmp (key, "KPH"))
-        {
-          c1 = get_char_by_code (p->afm, force_get_hex_code (p));
-          c2 = get_char_by_code (p->afm, force_get_hex_code (p));
-          adjust = force_get_number (p);
-          force_get_number (p);
-          add_kern_pair (p, c1, c2, adjust);
-        }
-      else
-        skip_line (p);
-    }
-  while (strcmp (key, "EndKernPairs"));
-}
-
-/* Adds a kern pair that adjusts (FIRST, SECOND) by ADJUST units
-   to the metrics within parser P. */
-static void
-add_kern_pair (struct parser *p, struct afm_character *first,
-               struct afm_character *second, int adjust)
-{
-  struct afm_kern_pair *kp;
-
-  first->kern_pairs = pool_nrealloc (p->afm->pool, first->kern_pairs,
-                                     first->kern_pair_cnt + 1,
-                                     sizeof *first->kern_pairs);
-  kp = &first->kern_pairs[first->kern_pair_cnt++];
-  kp->successor = second;
-  kp->adjust = adjust;
-}
-
-/* Returns the character with the given NAME with the metrics for
-   parser P.  Reports an error if no character has the given
-   name. */
-static struct afm_character *
-get_char_by_name (struct parser *p, const char *name)
-{
-  size_t i;
-
-  for (i = 0; i < p->afm->char_cnt; i++)
-    {
-      struct afm_character *c = p->afm->chars[i];
-      if (c->name != NULL && !strcmp (c->name, name))
-        return c;
-    }
-  afm_error (p, _("reference to unknown character \"%s\""), name);
-}
-
-/* Returns the character with the given CODE within AFM.
-   Returns a default character if the font doesn't have a
-   character with that code. */
-static struct afm_character *
-get_char_by_code (const struct afm *afm, int code_)
-{
-  uint16_t code = code_;
-  return afm->codes[code >> 8][code & 0xff];
-}
-\f
-/* Skips white space, except for new-lines, within parser P. */
-static int
-skip_spaces (struct parser *p)
-{
-  int c;
-  while (isspace (c = getc (p->file)) && c != '\n')
-    continue;
-  ungetc (c, p->file);
-  return c;
-}
-
-/* Parses a word at the beginning of a line.
-   Skips comments.
-   Reports an error if not at the beginning of a line. */
-static char *
-parse_key (struct parser *p)
-{
-  force_eol (p);
-  for (;;)
-    {
-      char *key;
-
-      do
-        {
-          p->line_number++;
-          getc (p->file);
-        }
-      while (skip_spaces (p) == '\n');
-
-      key = force_get_word (p);
-      if (strcmp (key, "Comment"))
-        return key;
-
-      skip_line (p);
-    }
-}
-
-/* Skips to the next line within parser P. */
-static void
-skip_line (struct parser *p)
-{
-  for (;;)
-    {
-      int c = getc (p->file);
-      if (c == EOF)
-        afm_error (p, _("expected end of file"));
-      if (c == '\n')
-        break;
-    }
-  ungetc ('\n', p->file);
-}
-
-/* Ensures that parser P is at the end of a line. */
-static void
-force_eol (struct parser *p)
-{
-  if (skip_spaces (p) != '\n')
-    afm_error (p, _("syntax error expecting end of line"));
-}
-
-/* Tries to read an integer into *INTEGER at the current position
-   in parser P.
-   Returns success. */
-static bool
-get_integer (struct parser *p, int *integer)
-{
-  int c = skip_spaces (p);
-  if (isdigit (c) || c == '-')
-    {
-      char *tail;
-      long tmp;
-
-      errno = 0;
-      tmp = strtol (force_get_word (p), &tail, 10);
-      if (errno == ERANGE || tmp < INT_MIN || tmp > INT_MAX)
-        afm_error (p, _("number out of valid range"));
-      if (*tail != '\0')
-        afm_error (p, _("invalid numeric syntax"));
-      *integer = tmp;
-
-      return true;
-    }
-  else
-    return false;
-}
-
-/* Returns an integer read from the current position in P.
-   Reports an error if unsuccessful. */
-static int
-force_get_integer (struct parser *p)
-{
-  int integer;
-  if (!get_integer (p, &integer))
-    afm_error (p, _("syntax error expecting integer"));
-  return integer;
-}
-
-/* Tries to read a floating-point number at the current position
-   in parser P.  Stores the number's integer part into *INTEGER.
-   Returns success. */
-static bool
-get_number (struct parser *p, int *integer)
-{
-  int c = skip_spaces (p);
-  if (c == '-' || c == '.' || isdigit (c))
-    {
-      char *tail;
-      double number;
-
-      errno = 0;
-      number = c_strtod (force_get_word (p), &tail);
-      if (errno == ERANGE || number < INT_MIN || number > INT_MAX)
-        afm_error (p, _("number out of valid range"));
-      if (*tail != '\0')
-        afm_error (p, _("invalid numeric syntax"));
-      *integer = number;
-
-      return true;
-    }
-  else
-    return false;
-}
-
-/* Returns the integer part of a floating-point number read from
-   the current position in P.
-   Reports an error if unsuccessful. */
-static int
-force_get_number (struct parser *p)
-{
-  int integer;
-  if (!get_number (p, &integer))
-    afm_error (p, _("syntax error expecting number"));
-  return integer;
-}
-
-/* Tries to read an integer expressed in hexadecimal into
-   *INTEGER from P.
-   Returns success. */
-static bool
-get_hex_code (struct parser *p, int *integer)
-{
-  if (skip_spaces (p) == '<')
-    {
-      if (fscanf (p->file, "<%x", integer) != 1 || getc (p->file) != '>')
-        afm_error (p, _("syntax error in hex constant"));
-      return true;
-    }
-  else
-    return false;
-}
-
-/* Reads an integer expressed in hexadecimal and returns its
-   value.
-   Reports an error if unsuccessful. */
-static int
-force_get_hex_code (struct parser *p)
-{
-  int integer;
-  if (!get_hex_code (p, &integer))
-    afm_error (p, _("syntax error expecting hex constant"));
-  return integer;
-}
-
-/* Tries to read a word from P into *WORD.
-   The word is allocated in P's pool.
-   Returns success. */
-static bool
-get_word (struct parser *p, char **word)
-{
-  if (skip_spaces (p) != '\n')
-    {
-      struct string s;
-      int c;
-
-      ds_init_empty (&s);
-      while (!isspace (c = getc (p->file)) && c != EOF)
-        ds_put_char (&s, c);
-      ungetc (c, p->file);
-      *word = ds_cstr (&s);
-      pool_register (p->pool, free, *word);
-      return true;
-    }
-  else
-    {
-      *word = NULL;
-      return false;
-    }
-}
-
-/* Reads a word from P and returns it.
-   The word is allocated in P's pool.
-   Reports an error if unsuccessful. */
-static char *
-force_get_word (struct parser *p)
-{
-  char *word;
-  if (!get_word (p, &word))
-    afm_error (p, _("unexpected end of line"));
-  return word;
-}
-
-/* Reads a string, consisting of the remainder of the current
-   line, from P, and stores it in *STRING.
-   Leading and trailing spaces are removed.
-   The word is allocated in P's pool.
-   Returns true if a non-empty string was successfully read,
-   false otherwise. */
-static bool
-get_string (struct parser *p, char **string)
-{
-  struct string s = DS_EMPTY_INITIALIZER;
-
-  skip_spaces (p);
-  for (;;)
-    {
-      int c = getc (p->file);
-      if (c == EOF || c == '\n')
-        break;
-      ds_put_char (&s, c);
-    }
-  ungetc ('\n', p->file);
-  ds_rtrim (&s, ss_cstr (CC_SPACES));
-
-  if (!ds_is_empty (&s))
-    {
-      *string = ds_cstr (&s);
-      pool_register (p->pool, free, *string);
-      return true;
-    }
-  else
-    {
-      *string = NULL;
-      ds_destroy (&s);
-      return false;
-    }
-}
-
-/* Reads a string, consisting of the remainder of the current
-   line, from P, and returns it.
-   Leading and trailing spaces are removed.
-   The word is allocated in P's pool.
-   Reports an error if the string is empty. */
-static char *
-force_get_string (struct parser *p)
-{
-  char *string;
-  if (!get_string (p, &string))
-    afm_error (p, _("unexpected end of line expecting string"));
-  return string;
-}
-\f
-/* Closes AFM and frees its storage. */
-void
-afm_close (struct afm *afm)
-{
-  if (afm != NULL)
-    pool_destroy (afm->pool);
-}
-
-/* Returns the string that must be passed to the PostScript
-   "findfont" operator to obtain AFM's font. */
-const char *
-afm_get_findfont_name (const struct afm *afm)
-{
-  return afm->findfont_name;
-}
-
-/* Returns the ascent for AFM, that is, the font's height above
-   the baseline, in units of 1/1000 of the nominal font size. */
-int
-afm_get_ascent (const struct afm *afm)
-{
-  return afm->ascent;
-}
-
-/* Returns the descent for AFM, that is, the font's depth below
-   the baseline, in units of 1/1000 of the nominal font size. */
-int
-afm_get_descent (const struct afm *afm)
-{
-  return afm->descent;
-}
-
-/* Returns the character numbered CODE within AFM,
-   or a default character if the font has none. */
-const struct afm_character *
-afm_get_character (const struct afm *afm, int code)
-{
-  return get_char_by_code (afm, code);
-}
-
-/* Returns the ligature formed when FIRST is followed by SECOND,
-   or a null pointer if there is no such ligature. */
-const struct afm_character *
-afm_get_ligature (const struct afm_character *first,
-                  const struct afm_character *second)
-{
-  size_t i;
-
-  for (i = 0; i < first->ligature_cnt; i++)
-    if (first->ligatures[i].successor == second)
-      return first->ligatures[i].ligature;
-  return NULL;
-}
-
-/* Returns the pair kerning x-adjustment when FIRST is followed
-   by SECOND, or 0 if no pair kerning should be done for the
-   given pair of characters. */
-int
-afm_get_kern_adjustment (const struct afm_character *first,
-                         const struct afm_character *second)
-{
-  size_t i;
-
-  for (i = 0; i < first->kern_pair_cnt; i++)
-    if (first->kern_pairs[i].successor == second)
-      return first->kern_pairs[i].adjust;
-  return 0;
-}
-\f
-/* Encodes the N characters in S as a PostScript string in OUT,
-   using a single-byte encoding.
-   Returns the number of characters remaining after all those
-   that could be successfully encoded were. */
-static size_t
-encode_one_byte (const struct afm_character **s, size_t n,
-                 struct string *out)
-{
-  ds_put_char (out, '(');
-  for (; n > 0; s++, n--)
-    {
-      uint8_t code = (*s)->code;
-      if (code != (*s)->code)
-        break;
-
-      if (code == '(' || code == ')' || code == '\\')
-        ds_put_format (out, "\\%c", code);
-      else if (!c_isprint (code))
-        ds_put_format (out, "\\%03o", code);
-      else
-        ds_put_char (out, code);
-    }
-  ds_put_char (out, ')');
-  return n;
-}
-
-/* State of binary encoder for PostScript. */
-struct binary_encoder
-  {
-    struct string *out;         /* Output string. */
-    uint32_t b;                 /* Accumulated bytes for base-85 encoding. */
-    size_t n;                   /* Number of bytes in b (0...3). */
-  };
-
-/* Initializes encoder E for output to OUT. */
-static void
-binary_init (struct binary_encoder *e, struct string *out)
-{
-  e->out = out;
-  e->b = e->n = 0;
-}
-
-/* Returns the character that represents VALUE in ASCII85
-   encoding. */
-static int
-value_to_ascii85 (int value)
-{
-  assert (value >= 0 && value < 85);
-#if C_CTYPE_ASCII
-  return value + 33;
-#else
-  return ("!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK"
-          "LMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstu")[value];
-#endif
-}
-
-/* Appends the first N characters of the ASCII85 representation
-   of B to string OUT. */
-static void
-append_ascii85_block (unsigned b, size_t n, struct string *out)
-{
-  char c[5];
-  int i;
-
-  for (i = 4; i >= 0; i--)
-    {
-      c[i] = value_to_ascii85 (b % 85);
-      b /= 85;
-    }
-  ds_put_substring (out, ss_buffer (c, n));
-}
-
-/* Encodes BYTE with encoder E. */
-static void
-binary_put (struct binary_encoder *e, uint8_t byte)
-{
-  e->b = (e->b << 8) | byte;
-  e->n++;
-  if (e->n % 4 == 0)
-    {
-      if (e->n == 4)
-        ds_put_cstr (e->out, "<~");
-
-      if (e->b != 0)
-        append_ascii85_block (e->b, 5, e->out);
-      else
-        ds_put_char (e->out, 'z');
-    }
-}
-
-/* Finishes up encoding with E. */
-static void
-binary_finish (struct binary_encoder *e)
-{
-  if (e->n >= 4)
-    {
-      /* We output at least one complete ASCII85 block.
-         Finish up. */
-      size_t n = e->n % 4;
-      if (n > 0)
-        append_ascii85_block (e->b << 8 * (4 - n), n + 1, e->out);
-      ds_put_cstr (e->out, "~>");
-    }
-  else if (e->n > 0)
-    {
-      /* It's cheaper (or at least the same cost) to encode this
-         string in hexadecimal. */
-      uint32_t b;
-      size_t i;
-
-      ds_put_cstr (e->out, "<");
-      b = e->b << 8 * (4 - e->n);
-      for (i = 0; i < e->n; i++)
-        {
-          ds_put_format (e->out, "%02x", b >> 24);
-          b <<= 8;
-        }
-      ds_put_cstr (e->out, ">");
-    }
-  else
-    {
-      /* Empty string. */
-      ds_put_cstr (e->out, "()");
-    }
-}
-
-/* Encodes the N characters in S into encoder E,
-   using a two-byte encoding.
-   Returns the number of characters remaining after all those
-   that could be successfully encoded were. */
-static size_t
-encode_two_byte (const struct afm_character **s, size_t n,
-                 struct binary_encoder *e)
-{
-  for (; n > 0; s++, n--)
-    {
-      uint16_t code = (*s)->code;
-      if (code != (*s)->code)
-        break;
-
-      binary_put (e, code >> 8);
-      binary_put (e, code);
-    }
-  return n;
-}
-
-/* Encodes the N characters in S into encoder E,
-   using an escape-based encoding with ESCAPE_CHAR as escape.
-   Returns the number of characters remaining after all those
-   that could be successfully encoded were. */
-static size_t
-encode_escape (const struct afm_character **s, size_t n,
-               unsigned char escape_char,
-               struct binary_encoder *e)
-{
-  uint8_t cur_font = 0;
-
-  for (; n > 0; s++, n--)
-    {
-      uint16_t code = (*s)->code;
-      uint8_t font_num = code >> 8;
-      uint8_t char_num = code & 0xff;
-      if (code != (*s)->code)
-        break;
-
-      if (font_num != cur_font)
-        {
-          if (font_num == escape_char)
-            break;
-          binary_put (e, escape_char);
-          binary_put (e, font_num);
-          cur_font = font_num;
-        }
-      binary_put (e, char_num);
-    }
-  return n;
-}
-
-/* Encodes the N characters in S into encoder E,
-   using an double escape-based encoding with ESCAPE_CHAR as
-   escape.
-   Returns the number of characters remaining after all those
-   that could be successfully encoded were. */
-static size_t
-encode_double_escape (const struct afm_character **s, size_t n,
-                      unsigned char escape_char,
-                      struct binary_encoder *e)
-{
-  unsigned cur_font = 0;
-
-  for (; n > 0; s++, n--)
-    {
-      unsigned font_num = (*s)->code >> 8;
-      uint8_t char_num = (*s)->code & 0xff;
-      if ((*s)->code & ~0x1ffff)
-        break;
-
-      if (font_num != cur_font)
-        {
-          if (font_num == (escape_char & 0xff))
-            break;
-          if (font_num >= 256)
-            binary_put (e, escape_char);
-          binary_put (e, escape_char);
-          binary_put (e, font_num & 0xff);
-          cur_font = font_num;
-        }
-      binary_put (e, char_num);
-    }
-  return n;
-}
-
-/* Encodes the N characters in S into encoder E,
-   using a shift-based encoding with SHIFT_IN and SHIFT_OUT as
-   shift characters.
-   Returns the number of characters remaining after all those
-   that could be successfully encoded were. */
-static size_t
-encode_shift (const struct afm_character **s, size_t n,
-              unsigned char shift_in, unsigned char shift_out,
-              struct binary_encoder *e)
-{
-  unsigned cur_font = 0;
-
-  for (; n > 0; s++, n--)
-    {
-      int font_num = ((*s)->code & 0x100) != 0;
-      uint8_t char_num = (*s)->code & 0xff;
-      if ((*s)->code & ~0x1ff)
-        break;
-
-      if (font_num != cur_font)
-        {
-          binary_put (e, font_num ? shift_out : shift_in);
-          cur_font = font_num;
-        }
-      binary_put (e, char_num);
-    }
-  return n;
-}
-
-/* Encodes the N characters in S into a PostScript string in OUT,
-   according to AFM's character encoding.
-   Returns the number of characters successfully encoded,
-   which may be less than N if an unencodable character was
-   encountered. */
-size_t
-afm_encode_string (const struct afm *afm,
-                   const struct afm_character **s, size_t n,
-                   struct string *out)
-{
-  size_t initial_length = ds_length (out);
-  size_t chars_left;
-
-  if (afm->mapping == MAP_ONE_BYTE)
-    chars_left = encode_one_byte (s, n, out);
-  else
-    {
-      struct binary_encoder e;
-
-      binary_init (&e, out);
-      switch (afm->mapping)
-        {
-        case MAP_TWO_BYTE:
-          chars_left = encode_two_byte (s, n, &e);
-          break;
-
-        case MAP_ESCAPE:
-          chars_left = encode_escape (s, n, afm->escape_char, &e);
-          break;
-
-        case MAP_DOUBLE_ESCAPE:
-          chars_left = encode_double_escape (s, n, afm->escape_char, &e);
-          break;
-
-        case MAP_SHIFT:
-          chars_left = encode_shift (s, n, afm->shift_in, afm->shift_out, &e);
-          break;
-
-        default:
-          NOT_REACHED ();
-        }
-      binary_finish (&e);
-    }
-
-  if (chars_left == n)
-    ds_truncate (out, initial_length);
-  return n - chars_left;
-}
diff --git a/src/output/afm.h b/src/output/afm.h
deleted file mode 100644 (file)
index 6525af6..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#ifndef AFM_H
-#define AFM_H 1
-
-#include <stddef.h>
-#include <libpspp/str.h>
-
-/* Metrics for a single character.  */
-struct afm_character
-  {
-    int code;                   /* Non-negative character code, -1 if none. */
-    const char *name;           /* Character name, if any. */
-    int width;                 /* Width. */
-    int ascent;                        /* Height above baseline, never negative. */
-    int descent;                /* Depth below baseline, never negative. */
-
-    /* Pairwise kerning data for this character in the first
-       position, other characters in the second position. */
-    struct afm_kern_pair *kern_pairs;
-    size_t kern_pair_cnt;
-
-    /* Ligature data for this character in the first position,
-       other characters in the second position. */
-    struct afm_ligature *ligatures;
-    size_t ligature_cnt;
-  };
-
-struct afm *afm_open (const char *file_name);
-void afm_close (struct afm *);
-
-int afm_get_ascent (const struct afm *);
-int afm_get_descent (const struct afm *);
-const char *afm_get_findfont_name (const struct afm *);
-
-const struct afm_character *afm_get_character (const struct afm *,
-                                               int code);
-const struct afm_character *afm_get_ligature (const struct afm_character *,
-                                              const struct afm_character *);
-int afm_get_kern_adjustment (const struct afm_character *,
-                             const struct afm_character *);
-
-size_t afm_encode_string (const struct afm *,
-                          const struct afm_character **, size_t,
-                          struct string *);
-
-#endif /* afm.h */
index 29d7b76b2940d76dbc0af108827922785f8e71ce..730a82444d35686ffc3821637ad8b770a0ff07de 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <data/settings.h>
 #include <libpspp/assertion.h>
 #include <libpspp/compiler.h>
-#include <libpspp/pool.h>
+#include <libpspp/message.h>
 #include <libpspp/start-date.h>
+#include <libpspp/string-map.h>
 #include <libpspp/version.h>
+#include <output/cairo.h>
+#include <output/chart-item-provider.h>
+#include <output/message-item.h>
+#include <output/options.h>
+#include <output/tab.h>
+#include <output/text-item.h>
+#include <output/driver-provider.h>
+#include <output/render.h>
+#include <output/table-item.h>
 
-#include "chart.h"
 #include "error.h"
 #include "minmax.h"
-#include "output.h"
 #include "xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-/* ASCII driver options: (defaults listed first)
-
-   output-file="pspp.list"
-   append=no|yes                If output-file exists, append to it?
-   chart-files="pspp-#.png"     Name used for charts.
-   chart-type=png               Format of charts (use "none" to disable).
-
-   paginate=on|off              Formfeeds are desired?
-   tab-width=8                  Width of a tab; 0 to not use tabs.
-
-   headers=on|off               Put headers at top of page?
-   emphasis=bold|underline|none Style to use for emphasis.
-   length=66|auto
-   width=79|auto
-   squeeze=off|on               Squeeze multiple newlines into exactly one.
-
-   top-margin=2
-   bottom-margin=2
-
-   box[x]="strng"               Sets box character X (X in base 4: 0-3333).
-   init="string"                Set initialization string.
- */
-
-/* Disable messages by failed range checks. */
-/*#define SUPPRESS_WARNINGS 1 */
+/* This file uses TABLE_HORZ and TABLE_VERT enough to warrant abbreviating. */
+#define H TABLE_HORZ
+#define V TABLE_VERT
 
 /* Line styles bit shifts. */
 enum
@@ -76,16 +62,23 @@ enum
     LNS_COUNT = 256
   };
 
+static inline int
+make_box_index (int left, int right, int top, int bottom)
+{
+  return ((left << LNS_LEFT) | (right << LNS_RIGHT)
+          | (top << LNS_TOP) | (bottom << LNS_BOTTOM));
+}
+
 /* Character attributes. */
 #define ATTR_EMPHASIS   0x100   /* Bold-face. */
 #define ATTR_BOX        0x200   /* Line drawing character. */
 
 /* A line of text. */
-struct line
+struct ascii_line
   {
     unsigned short *chars;      /* Characters and attributes. */
-    int char_cnt;               /* Length. */
-    int char_cap;               /* Allocated bytes. */
+    int n_chars;                /* Length. */
+    int allocated_chars;        /* Allocated "chars" elements. */
   };
 
 /* How to emphasize text. */
@@ -96,24 +89,24 @@ enum emphasis_style
     EMPH_NONE                   /* No emphasis. */
   };
 
-/* ASCII output driver extension record. */
-struct ascii_driver_ext
+/* ASCII output driver. */
+struct ascii_driver
   {
-    struct pool *pool;
+    struct output_driver driver;
 
     /* User parameters. */
-    bool append;                /* Append if output-file already exists? */
+    bool append;                /* Append if output file already exists? */
     bool headers;              /* Print headers at top of page? */
     bool paginate;             /* Insert formfeeds? */
     bool squeeze_blank_lines;   /* Squeeze multiple blank lines into one? */
     enum emphasis_style emphasis; /* How to emphasize text. */
-    int tab_width;             /* Width of a tab; 0 not to use tabs. */
-    const char *chart_type;     /* Type of charts to output; NULL for none. */
-    const char *chart_file_name; /* Name of files used for charts. */
+    char *chart_file_name;      /* Name of files used for charts. */
 
+    int width;                  /* Page width. */
+    int length;                 /* Page length minus margins and header. */
     bool auto_width;            /* Use viewwidth as page width? */
     bool auto_length;           /* Use viewlength as page width? */
-    int page_length;           /* Page length before subtracting margins. */
+
     int top_margin;            /* Top margin in lines. */
     int bottom_margin;         /* Bottom margin in lines. */
 
@@ -121,820 +114,837 @@ struct ascii_driver_ext
     char *init;                 /* Device initialization string. */
 
     /* Internal state. */
+    char *command_name;
+    char *title;
+    char *subtitle;
     char *file_name;            /* Output file name. */
     FILE *file;                 /* Output file. */
-    bool reported_error;        /* Reported file open error? */
+    bool error;                 /* Output error? */
     int page_number;           /* Current page number. */
-    struct line *lines;         /* Page content. */
-    int line_cap;               /* Number of lines allocated. */
+    struct ascii_line *lines;   /* Page content. */
+    int allocated_lines;        /* Number of lines allocated. */
     int chart_cnt;              /* Number of charts so far. */
+    int y;
   };
 
-static void ascii_flush (struct outp_driver *);
-static int get_default_box_char (size_t idx);
-static bool update_page_size (struct outp_driver *, bool issue_error);
-static bool handle_option (struct outp_driver *this, const char *key,
-                           const struct string *val);
+static const struct output_driver_class ascii_driver_class;
 
-static bool
-ascii_open_driver (struct outp_driver *this, struct substring options)
+static void ascii_submit (struct output_driver *, const struct output_item *);
+
+static int vertical_margins (const struct ascii_driver *);
+
+static const char *get_default_box (int right, int bottom, int left, int top);
+static bool update_page_size (struct ascii_driver *, bool issue_error);
+static int parse_page_size (struct driver_option *);
+
+static void ascii_close_page (struct ascii_driver *);
+static bool ascii_open_page (struct ascii_driver *);
+
+static void ascii_draw_line (void *, int bb[TABLE_N_AXES][2],
+                             enum render_line_style styles[TABLE_N_AXES][2]);
+static void ascii_measure_cell_width (void *, const struct table_cell *,
+                                      int *min, int *max);
+static int ascii_measure_cell_height (void *, const struct table_cell *,
+                                      int width);
+static void ascii_draw_cell (void *, const struct table_cell *,
+                             int bb[TABLE_N_AXES][2],
+                             int clip[TABLE_N_AXES][2]);
+
+static struct ascii_driver *
+ascii_driver_cast (struct output_driver *driver)
 {
-  struct ascii_driver_ext *x;
-  int i;
+  assert (driver->class == &ascii_driver_class);
+  return UP_CAST (driver, struct ascii_driver, driver);
+}
 
-  this->width = 79;
-  this->font_height = 1;
-  this->prop_em_width = 1;
-  this->fixed_width = 1;
-  for (i = 0; i < OUTP_L_COUNT; i++)
-    this->horiz_line_width[i] = this->vert_line_width[i] = i != OUTP_L_NONE;
-
-  this->ext = x = pool_create_container (struct ascii_driver_ext, pool);
-  x->append = false;
-  x->headers = true;
-  x->paginate = true;
-  x->squeeze_blank_lines = false;
-  x->emphasis = EMPH_BOLD;
-  x->tab_width = 8;
-  x->chart_file_name = pool_strdup (x->pool, "pspp-#.png");
-  x->chart_type = pool_strdup (x->pool, "png");
-  x->auto_width = false;
-  x->auto_length = false;
-  x->page_length = 66;
-  x->top_margin = 2;
-  x->bottom_margin = 2;
-  for (i = 0; i < LNS_COUNT; i++)
-    x->box[i] = NULL;
-  x->init = NULL;
-  x->file_name = pool_strdup (x->pool, "pspp.list");
-  x->file = NULL;
-  x->reported_error = false;
-  x->page_number = 0;
-  x->lines = NULL;
-  x->line_cap = 0;
-  x->chart_cnt = 0;
-
-  if (!outp_parse_options (options, handle_option, this))
-    goto error;
+static struct driver_option *
+opt (struct output_driver *d, struct string_map *options, const char *key,
+     const char *default_value)
+{
+  return driver_option_get (d, options, key, default_value);
+}
 
-  if (!update_page_size (this, true))
-    goto error;
+static struct output_driver *
+ascii_create (const char *file_name, enum settings_output_devices device_type,
+              struct string_map *o)
+{
+  struct output_driver *d;
+  struct ascii_driver *a;
+  int paper_length;
+  int right, bottom, left, top;
+
+  a = xzalloc (sizeof *a);
+  d = &a->driver;
+  output_driver_init (&a->driver, &ascii_driver_class, file_name, device_type);
+  a->append = parse_boolean (opt (d, o, "append", "false"));
+  a->headers = parse_boolean (opt (d, o, "headers", "false"));
+  a->paginate = parse_boolean (opt (d, o, "paginate", "false"));
+  a->squeeze_blank_lines = parse_boolean (opt (d, o, "squeeze", "true"));
+  a->emphasis = parse_enum (opt (d, o, "emphasis", "none"),
+                            "bold", EMPH_BOLD,
+                            "underline", EMPH_UNDERLINE,
+                            "none", EMPH_NONE,
+                            (char *) NULL);
+
+  a->chart_file_name = parse_chart_file_name (opt (d, o, "charts", file_name));
+
+  a->top_margin = parse_int (opt (d, o, "top-margin", "0"), 0, INT_MAX);
+  a->bottom_margin = parse_int (opt (d, o, "bottom-margin", "0"), 0, INT_MAX);
+
+  a->width = parse_page_size (opt (d, o, "width", "79"));
+  paper_length = parse_page_size (opt (d, o, "length", "66"));
+  a->auto_width = a->width < 0;
+  a->auto_length = paper_length < 0;
+  a->length = paper_length - vertical_margins (a);
+
+  for (right = 0; right < 4; right++)
+    for (bottom = 0; bottom < 4; bottom++)
+      for (left = 0; left < 4; left++)
+        for (top = 0; top < 4; top++)
+          {
+            int indx = make_box_index (left, right, top, bottom);
+            const char *default_value;
+            char name[16];
 
-  for (i = 0; i < LNS_COUNT; i++)
-    if (x->box[i] == NULL)
-      {
-        char s[2];
-        s[0] = get_default_box_char (i);
-        s[1] = '\0';
-        x->box[i] = pool_strdup (x->pool, s);
-      }
+            sprintf (name, "box[%d%d%d%d]", right, bottom, left, top);
+            default_value = get_default_box (right, bottom, left, top);
+            a->box[indx] = parse_string (opt (d, o, name, default_value));
+          }
+  a->init = parse_string (opt (d, o, "init", ""));
+
+  a->command_name = NULL;
+  a->title = xstrdup ("");
+  a->subtitle = xstrdup ("");
+  a->file_name = xstrdup (file_name);
+  a->file = NULL;
+  a->error = false;
+  a->page_number = 0;
+  a->lines = NULL;
+  a->allocated_lines = 0;
+  a->chart_cnt = 1;
+
+  if (!update_page_size (a, true))
+    goto error;
 
-  return true;
+  return d;
 
- error:
-  pool_destroy (x->pool);
-  return false;
+error:
+  output_driver_destroy (d);
+  return NULL;
 }
 
-static int
-get_default_box_char (size_t idx)
+static const char *
+get_default_box (int right, int bottom, int left, int top)
 {
-  /* Disassemble IDX into components. */
-  unsigned top = (idx >> LNS_TOP) & 3;
-  unsigned left = (idx >> LNS_LEFT) & 3;
-  unsigned bottom = (idx >> LNS_BOTTOM) & 3;
-  unsigned right = (idx >> LNS_RIGHT) & 3;
-
-  /* Reassemble components into nibbles in the order TLBR.
-     This makes it easy to read the case labels. */
-  unsigned value = (top << 12) | (left << 8) | (bottom << 4) | (right << 0);
-  switch (value)
+  switch ((top << 12) | (left << 8) | (bottom << 4) | (right << 0))
     {
     case 0x0000:
-      return ' ';
+      return " ";
 
     case 0x0100: case 0x0101: case 0x0001:
-      return '-';
+      return "-";
 
     case 0x1000: case 0x1010: case 0x0010:
-      return '|';
+      return "|";
 
     case 0x0300: case 0x0303: case 0x0003:
     case 0x0200: case 0x0202: case 0x0002:
-      return '=';
+      return "=";
 
     default:
-      return left > 1 || top > 1 || right > 1 || bottom > 1 ? '#' : '+';
+      return left > 1 || top > 1 || right > 1 || bottom > 1 ? "#" : "+";
     }
 }
 
+static int
+parse_page_size (struct driver_option *option)
+{
+  int dim = atol (option->default_value);
+
+  if (option->value != NULL)
+    {
+      if (!strcmp (option->value, "auto"))
+        dim = -1;
+      else
+        {
+          int value;
+          char *tail;
+
+          errno = 0;
+          value = strtol (option->value, &tail, 0);
+          if (dim >= 1 && errno != ERANGE && *tail == '\0')
+            dim = value;
+          else
+            error (0, 0, _("%s: %s must be positive integer or `auto'"),
+                   option->driver_name, option->name);
+        }
+    }
+
+  driver_option_destroy (option);
+
+  return dim;
+}
+
+static int
+vertical_margins (const struct ascii_driver *a)
+{
+  return a->top_margin + a->bottom_margin + (a->headers ? 3 : 0);
+}
+
 /* Re-calculates the page width and length based on settings,
    margins, and, if "auto" is set, the size of the user's
    terminal window or GUI output window. */
 static bool
-update_page_size (struct outp_driver *this, bool issue_error)
+update_page_size (struct ascii_driver *a, bool issue_error)
 {
-  struct ascii_driver_ext *x = this->ext;
-  int margins = x->top_margin + x->bottom_margin + 1 + (x->headers ? 3 : 0);
-
-  if (x->auto_width)
-    this->width = settings_get_viewwidth ();
-  if (x->auto_length)
-    x->page_length = settings_get_viewlength ();
+  enum { MIN_WIDTH = 6, MIN_LENGTH = 6 };
 
-  this->length = x->page_length - margins;
+  if (a->auto_width)
+    a->width = settings_get_viewwidth ();
+  if (a->auto_length)
+    a->length = settings_get_viewlength () - vertical_margins (a);
 
-  if (this->width < 59 || this->length < 15)
+  if (a->width < MIN_WIDTH || a->length < MIN_LENGTH)
     {
       if (issue_error)
         error (0, 0,
                _("ascii: page excluding margins and headers "
-                 "must be at least 59 characters wide by 15 lines long, but "
+                 "must be at least %d characters wide by %d lines long, but "
                  "as configured is only %d characters by %d lines"),
-             this->width, this->length);
-      if (this->width < 59)
-        this->width = 59;
-      if (this->length < 15)
-        {
-          this->length = 15;
-          x->page_length = this->length + margins;
-        }
+               MIN_WIDTH, MIN_LENGTH,
+               a->width, a->length);
+      if (a->width < MIN_WIDTH)
+        a->width = MIN_WIDTH;
+      if (a->length < MIN_LENGTH)
+        a->length = MIN_LENGTH;
       return false;
     }
 
   return true;
 }
 
-static bool
-ascii_close_driver (struct outp_driver *this)
+static void
+ascii_destroy (struct output_driver *driver)
 {
-  struct ascii_driver_ext *x = this->ext;
+  struct ascii_driver *a = ascii_driver_cast (driver);
+  int i;
 
-  ascii_flush (this);
-  pool_detach_file (x->pool, x->file);
-  pool_destroy (x->pool);
+  if (a->y > 0)
+    ascii_close_page (a);
 
-  return true;
+  if (a->file != NULL)
+    fn_close (a->file_name, a->file);
+  free (a->command_name);
+  free (a->title);
+  free (a->subtitle);
+  free (a->file_name);
+  free (a->chart_file_name);
+  for (i = 0; i < LNS_COUNT; i++)
+    free (a->box[i]);
+  free (a->init);
+  for (i = 0; i < a->allocated_lines; i++)
+    free (a->lines[i].chars);
+  free (a->lines);
+  free (a);
 }
 
-/* Generic option types. */
-enum
-  {
-    boolean_arg,
-    emphasis_arg,
-    nonneg_int_arg,
-    page_size_arg,
-    string_arg
-  };
-
-static const struct outp_option option_tab[] =
-  {
-    {"headers", boolean_arg, 0},
-    {"paginate", boolean_arg, 1},
-    {"squeeze", boolean_arg, 2},
-    {"append", boolean_arg, 3},
-
-    {"emphasis", emphasis_arg, 0},
-
-    {"length", page_size_arg, 0},
-    {"width", page_size_arg, 1},
-
-    {"top-margin", nonneg_int_arg, 0},
-    {"bottom-margin", nonneg_int_arg, 1},
-    {"tab-width", nonneg_int_arg, 2},
+static void
+ascii_flush (struct output_driver *driver)
+{
+  struct ascii_driver *a = ascii_driver_cast (driver);
+  if (a->y > 0)
+    {
+      ascii_close_page (a);
 
-    {"output-file", string_arg, 0},
-    {"chart-files", string_arg, 1},
-    {"chart-type", string_arg, 2},
-    {"init", string_arg, 3},
+      if (fn_close (a->file_name, a->file) != 0)
+        error (0, errno, _("ascii: closing output file \"%s\""),
+               a->file_name);
+      a->file = NULL;
+    }
+}
 
-    {NULL, 0, 0},
-  };
+static void
+ascii_init_caption_cell (const char *caption, struct table_cell *cell)
+{
+  cell->contents = caption;
+  cell->options = TAB_LEFT;
+  cell->destructor = NULL;
+}
 
-static bool
-handle_option (struct outp_driver *this, const char *key,
-               const struct string *val)
+static void
+ascii_output_table_item (struct ascii_driver *a,
+                         const struct table_item *table_item)
 {
-  struct ascii_driver_ext *x = this->ext;
-  int subcat;
-  const char *value;
+  const char *caption = table_item_get_caption (table_item);
+  struct render_params params;
+  struct render_page *page;
+  struct render_break x_break;
+  int caption_height;
+  int i;
+
+  update_page_size (a, false);
 
-  value = ds_cstr (val);
-  if (!strncmp (key, "box[", 4))
+  if (caption != NULL)
+    {
+      /* XXX doesn't do well with very large captions */
+      struct table_cell cell;
+      ascii_init_caption_cell (caption, &cell);
+      caption_height = ascii_measure_cell_height (a, &cell, a->width);
+    }
+  else
+    caption_height = 0;
+
+  params.draw_line = ascii_draw_line;
+  params.measure_cell_width = ascii_measure_cell_width;
+  params.measure_cell_height = ascii_measure_cell_height;
+  params.draw_cell = ascii_draw_cell,
+    params.aux = a;
+  params.size[H] = a->width;
+  params.size[V] = a->length - caption_height;
+  params.font_size[H] = 1;
+  params.font_size[V] = 1;
+  for (i = 0; i < RENDER_N_LINES; i++)
     {
-      char *tail;
-      int indx = strtol (&key[4], &tail, 4);
-      if (*tail != ']' || indx < 0 || indx > LNS_COUNT)
-       {
-         error (0, 0, _("ascii: bad index value for `box' key: syntax "
-                         "is box[INDEX], 0 <= INDEX < %d decimal, with INDEX "
-                         "expressed in base 4"),
-                 LNS_COUNT);
-         return false;
-       }
-      if (x->box[indx] != NULL)
-       error (0, 0, _("ascii: multiple values for %s"), key);
-      x->box[indx] = pool_strdup (x->pool, value);
-      return true;
+      int width = i == RENDER_LINE_NONE ? 0 : 1;
+      params.line_widths[H][i] = width;
+      params.line_widths[V][i] = width;
     }
 
-  switch (outp_match_keyword (key, option_tab, &subcat))
+  if (a->file == NULL && !ascii_open_page (a))
+    return;
+
+  page = render_page_create (&params, table_item_get_table (table_item));
+  for (render_break_init (&x_break, page, H);
+       render_break_has_next (&x_break); )
     {
-    case -1:
-      error (0, 0, _("ascii: unknown parameter `%s'"), key);
-      break;
-    case page_size_arg:
-      {
-       char *tail;
-       int arg;
+      struct render_page *x_slice;
+      struct render_break y_break;
 
-        if (ss_equals_case (ds_ss (val), ss_cstr ("auto")))
-          {
-            if (!(this->device & OUTP_DEV_SCREEN))
-              {
-                /* We only let `screen' devices have `auto'
-                   length or width because output to such devices
-                   is flushed before each new command.  Resizing
-                   a device in the middle of output seems like a
-                   bad idea. */
-                error (0, 0, _("ascii: only screen devices may have `auto' "
-                               "length or width"));
-              }
-            else if (subcat == 0)
-              x->auto_length = true;
-            else
-              x->auto_width = true;
-          }
-        else
-          {
-            errno = 0;
-            arg = strtol (value, &tail, 0);
-            if (arg < 1 || errno == ERANGE || *tail)
-              {
-                error (0, 0, _("ascii: positive integer required as "
-                               "`%s' value"),
-                       key);
-                break;
-              }
-            switch (subcat)
-              {
-              case 0:
-                x->page_length = arg;
-                break;
-              case 1:
-                this->width = arg;
-                break;
-              default:
-                NOT_REACHED ();
-              }
-          }
-      }
-      break;
-    case emphasis_arg:
-      if (!strcmp (value, "bold"))
-        x->emphasis = EMPH_BOLD;
-      else if (!strcmp (value, "underline"))
-        x->emphasis = EMPH_UNDERLINE;
-      else if (!strcmp (value, "none"))
-        x->emphasis = EMPH_NONE;
-      else
-        error (0, 0,
-               _("ascii: `emphasis' value must be `bold', "
-                 "`underline', or `none'"));
-      break;
-    case nonneg_int_arg:
-      {
-       char *tail;
-       int arg;
-
-       errno = 0;
-       arg = strtol (value, &tail, 0);
-       if (arg < 0 || errno == ERANGE || *tail)
-         {
-           error (0, 0,
-                   _("ascii: zero or positive integer required as `%s' value"),
-                   key);
-           break;
-         }
-       switch (subcat)
-         {
-         case 0:
-           x->top_margin = arg;
-           break;
-         case 1:
-           x->bottom_margin = arg;
-           break;
-         case 2:
-           x->tab_width = arg;
-           break;
-         default:
-           NOT_REACHED ();
-         }
-      }
-      break;
-    case boolean_arg:
-      {
-       bool setting;
-       if (!strcmp (value, "on") || !strcmp (value, "true")
-           || !strcmp (value, "yes") || atoi (value))
-         setting = true;
-       else if (!strcmp (value, "off") || !strcmp (value, "false")
-                || !strcmp (value, "no") || !strcmp (value, "0"))
-         setting = false;
-       else
-         {
-           error (0, 0, _("ascii: boolean value expected for `%s'"), key);
-           return false;
-         }
-       switch (subcat)
-         {
-         case 0:
-           x->headers = setting;
-           break;
-         case 1:
-           x->paginate = setting;
-           break;
-          case 2:
-            x->squeeze_blank_lines = setting;
-            break;
-          case 3:
-            x->append = setting;
-            break;
-         default:
-           NOT_REACHED ();
-         }
-      }
-      break;
-    case string_arg:
-      switch (subcat)
+      x_slice = render_break_next (&x_break, a->width);
+      for (render_break_init (&y_break, x_slice, V);
+           render_break_has_next (&y_break); )
         {
-        case 0:
-          x->file_name = pool_strdup (x->pool, value);
-          break;
-        case 1:
-          if (ds_find_char (val, '#') != SIZE_MAX)
-            x->chart_file_name = pool_strdup (x->pool, value);
-          else
-            error (0, 0, _("`chart-files' value must contain `#'"));
-          break;
-        case 2:
-          if (value[0] != '\0')
-            x->chart_type = pool_strdup (x->pool, value);
-          else
-            x->chart_type = NULL;
-          break;
-        case 3:
-          x->init = pool_strdup (x->pool, value);
-          break;
+          struct render_page *y_slice;
+          int space;
+
+          if (a->y > 0)
+            a->y++;
+
+          space = a->length - a->y - caption_height;
+          if (render_break_next_size (&y_break) > space)
+            {
+              assert (a->y > 0);
+              ascii_close_page (a);
+              if (!ascii_open_page (a))
+                return;
+              continue;
+            }
+
+          y_slice = render_break_next (&y_break, space);
+          if (caption_height)
+            {
+              struct table_cell cell;
+              int bb[TABLE_N_AXES][2];
+
+              ascii_init_caption_cell (caption, &cell);
+              bb[H][0] = 0;
+              bb[H][1] = a->width;
+              bb[V][0] = 0;
+              bb[V][1] = caption_height;
+              ascii_draw_cell (a, &cell, bb, bb);
+              a->y += caption_height;
+              caption_height = 0;
+            }
+          render_page_draw (y_slice);
+          a->y += render_page_get_size (y_slice, V);
+          render_page_unref (y_slice);
         }
-      break;
-    default:
-      NOT_REACHED ();
+      render_break_destroy (&y_break);
     }
+  render_break_destroy (&x_break);
+}
 
-  return true;
+static void
+ascii_output_text (struct ascii_driver *a, const char *text)
+{
+  struct table_item *table_item;
+
+  table_item = table_item_create (table_from_string (TAB_LEFT, text), NULL);
+  ascii_output_table_item (a, table_item);
+  table_item_unref (table_item);
 }
 
 static void
-ascii_open_page (struct outp_driver *this)
+ascii_submit (struct output_driver *driver,
+              const struct output_item *output_item)
 {
-  struct ascii_driver_ext *x = this->ext;
-  int i;
+  struct ascii_driver *a = ascii_driver_cast (driver);
 
-  update_page_size (this, false);
+  output_driver_track_current_command (output_item, &a->command_name);
 
-  if (x->file == NULL)
+  if (a->error)
+    return;
+
+  if (is_table_item (output_item))
+    ascii_output_table_item (a, to_table_item (output_item));
+#ifdef HAVE_CAIRO
+  else if (is_chart_item (output_item) && a->chart_file_name != NULL)
     {
-      x->file = fn_open (x->file_name, x->append ? "a" : "w");
-      if (x->file != NULL)
-        {
-          pool_attach_file (x->pool, x->file);
-          if (x->init != NULL)
-            fputs (x->init, x->file);
-        }
-      else
+      struct chart_item *chart_item = to_chart_item (output_item);
+      char *file_name;
+
+      file_name = xr_draw_png_chart (chart_item, a->chart_file_name,
+                                     a->chart_cnt++);
+      if (file_name != NULL)
         {
-          /* Report the error to the user and complete
-             initialization.  If we do not finish initialization,
-             then calls to other driver functions will segfault
-             later.  It would be better to simply drop the driver
-             entirely, but we do not have a convenient mechanism
-             for this (yet). */
-          if (!x->reported_error)
-            error (0, errno, _("ascii: opening output file \"%s\""),
-                   x->file_name);
-          x->reported_error = true;
-        }
-    }
+          struct text_item *text_item;
 
-  x->page_number++;
+          text_item = text_item_create_format (
+            TEXT_ITEM_PARAGRAPH, _("See %s for a chart."), file_name);
 
-  if (this->length > x->line_cap)
-    {
-      x->lines = pool_nrealloc (x->pool,
-                                x->lines, this->length, sizeof *x->lines);
-      for (i = x->line_cap; i < this->length; i++)
-        {
-          struct line *line = &x->lines[i];
-          line->chars = NULL;
-          line->char_cap = 0;
+          ascii_submit (driver, &text_item->output_item);
+          text_item_unref (text_item);
+          free (file_name);
         }
-      x->line_cap = this->length;
     }
-
-  for (i = 0; i < this->length; i++)
-    x->lines[i].char_cnt = 0;
-}
-
-/* Ensures that at least the first LENGTH characters of line Y in
-   THIS driver identified X have been cleared out. */
-static inline void
-expand_line (struct outp_driver *this, int y, int length)
-{
-  struct ascii_driver_ext *ext = this->ext;
-  struct line *line = &ext->lines[y];
-  if (line->char_cnt < length)
+#endif  /* HAVE_CAIRO */
+  else if (is_text_item (output_item))
     {
-      int x;
-      if (line->char_cap < length)
+      const struct text_item *text_item = to_text_item (output_item);
+      enum text_item_type type = text_item_get_type (text_item);
+      const char *text = text_item_get_text (text_item);
+
+      switch (type)
         {
-          line->char_cap = MIN (length * 2, this->width);
-          line->chars = pool_nrealloc (ext->pool,
-                                       line->chars,
-                                       line->char_cap, sizeof *line->chars);
+        case TEXT_ITEM_TITLE:
+          free (a->title);
+          a->title = xstrdup (text);
+          break;
+
+        case TEXT_ITEM_SUBTITLE:
+          free (a->subtitle);
+          a->subtitle = xstrdup (text);
+          break;
+
+        case TEXT_ITEM_COMMAND_CLOSE:
+          break;
+
+        case TEXT_ITEM_BLANK_LINE:
+          if (a->y > 0)
+            a->y++;
+          break;
+
+        case TEXT_ITEM_EJECT_PAGE:
+          if (a->y > 0)
+            ascii_close_page (a);
+          break;
+
+        default:
+          ascii_output_text (a, text);
+          break;
         }
-      for (x = line->char_cnt; x < length; x++)
-        line->chars[x] = ' ';
-      line->char_cnt = length;
+    }
+  else if (is_message_item (output_item))
+    {
+      const struct message_item *message_item = to_message_item (output_item);
+      const struct msg *msg = message_item_get_msg (message_item);
+      char *s = msg_to_string (msg, a->command_name);
+      ascii_output_text (a, s);
+      free (s);
     }
 }
 
+const struct output_driver_factory txt_driver_factory =
+  { "txt", ascii_create };
+const struct output_driver_factory list_driver_factory =
+  { "list", ascii_create };
+
+static const struct output_driver_class ascii_driver_class =
+  {
+    "text",
+    ascii_destroy,
+    ascii_submit,
+    ascii_flush,
+  };
+\f
+enum wrap_mode
+  {
+    WRAP_WORD,
+    WRAP_CHAR,
+    WRAP_WORD_CHAR
+  };
+
+static void ascii_expand_line (struct ascii_driver *, int y, int length);
+static void ascii_layout_cell (struct ascii_driver *,
+                               const struct table_cell *,
+                               int bb[TABLE_N_AXES][2],
+                               int clip[TABLE_N_AXES][2], enum wrap_mode wrap,
+                               int *width, int *height);
+
 static void
-ascii_line (struct outp_driver *this,
-            int x0, int y0, int x1, int y1,
-            enum outp_line_style top, enum outp_line_style left,
-            enum outp_line_style bottom, enum outp_line_style right)
+ascii_draw_line (void *a_, int bb[TABLE_N_AXES][2],
+                 enum render_line_style styles[TABLE_N_AXES][2])
 {
-  struct ascii_driver_ext *ext = this->ext;
-  int y;
-  unsigned short value;
+  struct ascii_driver *a = a_;
+  unsigned short int value;
+  int x1, y1;
+  int x, y;
 
-  assert (this->page_open);
-#if DEBUGGING
-  if (x0 < 0 || x1 > this->width || y0 < 0 || y1 > this->length)
+  /* Clip to the page. */
+  if (bb[H][0] >= a->width || bb[V][0] + a->y >= a->length)
+    return;
+  x1 = MIN (bb[H][1], a->width);
+  y1 = MIN (bb[V][1] + a->y, a->length);
+
+  /* Draw. */
+  value = ATTR_BOX | make_box_index (styles[V][0], styles[V][1],
+                                     styles[H][0], styles[H][1]);
+  for (y = bb[V][0] + a->y; y < y1; y++)
     {
-#if !SUPPRESS_WARNINGS
-      printf (_("ascii: bad line (%d,%d)-(%d,%d) out of (%d,%d)\n"),
-             x0, y0, x1, y1, this->width, this->length);
-#endif
-      return;
+      ascii_expand_line (a, y, x1);
+      for (x = bb[H][0]; x < x1; x++)
+        a->lines[y].chars[x] = value;
     }
-#endif
+}
 
-  value = ((left << LNS_LEFT) | (right << LNS_RIGHT)
-           | (top << LNS_TOP) | (bottom << LNS_BOTTOM) | ATTR_BOX);
-  for (y = y0; y < y1; y++)
+static void
+ascii_measure_cell_width (void *a_, const struct table_cell *cell,
+                          int *min_width, int *max_width)
+{
+  struct ascii_driver *a = a_;
+  int bb[TABLE_N_AXES][2];
+  int clip[TABLE_N_AXES][2];
+  int h;
+
+  bb[H][0] = 0;
+  bb[H][1] = INT_MAX;
+  bb[V][0] = 0;
+  bb[V][1] = INT_MAX;
+  clip[H][0] = clip[H][1] = clip[V][0] = clip[V][1] = 0;
+  ascii_layout_cell (a, cell, bb, clip, WRAP_WORD, max_width, &h);
+
+  if (strchr (cell->contents, ' '))
     {
-      int x;
-
-      expand_line (this, y, x1);
-      for (x = x0; x < x1; x++)
-        ext->lines[y].chars[x] = value;
+      bb[H][1] = 1;
+      ascii_layout_cell (a, cell, bb, clip, WRAP_WORD, min_width, &h);
     }
+  else
+    *min_width = *max_width;
+}
+
+static int
+ascii_measure_cell_height (void *a_, const struct table_cell *cell, int width)
+{
+  struct ascii_driver *a = a_;
+  int bb[TABLE_N_AXES][2];
+  int clip[TABLE_N_AXES][2];
+  int w, h;
+
+  bb[H][0] = 0;
+  bb[H][1] = width;
+  bb[V][0] = 0;
+  bb[V][1] = INT_MAX;
+  clip[H][0] = clip[H][1] = clip[V][0] = clip[V][1] = 0;
+  ascii_layout_cell (a, cell, bb, clip, WRAP_WORD, &w, &h);
+  return h;
 }
 
 static void
-ascii_submit (struct outp_driver *this UNUSED, struct som_entity *s)
+ascii_draw_cell (void *a_, const struct table_cell *cell,
+                 int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2])
 {
-  extern struct som_table_class tab_table_class;
+  struct ascii_driver *a = a_;
+  int w, h;
 
-  assert (s->class == &tab_table_class);
-  assert (s->type == SOM_CHART);
+  ascii_layout_cell (a, cell, bb, clip, WRAP_WORD, &w, &h);
 }
 
+/* Ensures that at least the first LENGTH characters of line Y in
+   ascii driver A have been cleared out. */
 static void
-text_draw (struct outp_driver *this,
-           enum outp_font font,
-           int x, int y,
-           enum outp_justification justification, int width,
-           const char *string, size_t length)
+ascii_expand_line (struct ascii_driver *a, int y, int length)
 {
-  struct ascii_driver_ext *ext = this->ext;
-  unsigned short attr = font == OUTP_EMPHASIS ? ATTR_EMPHASIS : 0;
+  struct ascii_line *line = &a->lines[y];
+  if (line->n_chars < length)
+    {
+      int x;
+      if (line->allocated_chars < length)
+        {
+          line->allocated_chars = MAX (length, MIN (length * 2, a->width));
+          line->chars = xnrealloc (line->chars, line->allocated_chars,
+                                   sizeof *line->chars);
+        }
+      for (x = line->n_chars; x < length; x++)
+        line->chars[x] = ' ';
+      line->n_chars = length;
+    }
+}
 
-  int line_len;
+static void
+text_draw (struct ascii_driver *a, const struct table_cell *cell,
+           int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2],
+           int y, const char *string, int n)
+{
+  int x0 = MAX (0, clip[H][0]);
+  int y0 = MAX (0, clip[V][0] + a->y);
+  int x1 = clip[H][1];
+  int y1 = MIN (a->length, clip[V][1] + a->y);
+  int x;
+
+  y += a->y;
+  if (y < y0 || y >= y1)
+    return;
 
-  switch (justification)
+  switch (cell->options & TAB_ALIGNMENT)
     {
-    case OUTP_LEFT:
+    case TAB_LEFT:
+      x = bb[H][0];
       break;
-    case OUTP_CENTER:
-      x += (width - length + 1) / 2;
+    case TAB_CENTER:
+      x = (bb[H][0] + bb[H][1] - n + 1) / 2;
       break;
-    case OUTP_RIGHT:
-      x += width - length;
+    case TAB_RIGHT:
+      x = bb[H][1] - n;
       break;
     default:
       NOT_REACHED ();
     }
 
-  if (y >= this->length || x >= this->width)
-    return;
-
-  if (x + length > this->width)
-    length = this->width - x;
+  if (x0 > x)
+    {
+      n -= x0 - x;
+      if (n <= 0)
+        return;
+      string += x0 - x;
+      x = x0;
+    }
+  if (x + n >= x1)
+    n = x1 - x;
 
-  line_len = x + length;
+  if (n > 0)
+    {
+      int attr = cell->options & TAB_EMPH ? ATTR_EMPHASIS : 0;
+      size_t i;
 
-  expand_line (this, y, line_len);
-  while (length-- > 0)
-    ext->lines[y].chars[x++] = *string++ | attr;
+      ascii_expand_line (a, y, x + n);
+      for (i = 0; i < n; i++)
+        a->lines[y].chars[x + i] = string[i] | attr;
+    }
 }
 
-/* Divides the text T->S into lines of width T->H.  Sets *WIDTH
-   to the maximum width of a line and *HEIGHT to the number of
-   lines, if those arguments are non-null.  Actually draws the
-   text if DRAW is true. */
 static void
-delineate (struct outp_driver *this, const struct outp_text *text, bool draw,
-           int *width, int *height)
+ascii_layout_cell (struct ascii_driver *a, const struct table_cell *cell,
+                   int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2],
+                   enum wrap_mode wrap, int *width, int *height)
 {
-  int max_width;
-  int height_left;
-
-  const char *cp = ss_data (text->string);
+  size_t length = strlen (cell->contents);
+  int y, pos;
 
-  max_width = 0;
-  height_left = text->v;
-
-  while (height_left > 0)
+  *width = 0;
+  pos = 0;
+  for (y = bb[V][0]; y < bb[V][1] && pos < length; y++)
     {
-      size_t chars_left;
+      const char *line = &cell->contents[pos];
+      const char *new_line;
       size_t line_len;
-      const char *end;
-
-      /* Initially the line is up to text->h characters long. */
-      chars_left = ss_end (text->string) - cp;
-      if (chars_left == 0)
-        break;
-      line_len = MIN (chars_left, text->h);
 
-      /* A new-line terminates the line prematurely. */
-      end = memchr (cp, '\n', line_len);
-      if (end != NULL)
-        line_len = end - cp;
+      /* Find line length without considering word wrap. */
+      line_len = MIN (bb[H][1] - bb[H][0], length - pos);
+      new_line = memchr (line, '\n', line_len);
+      if (new_line != NULL)
+        line_len = new_line - line;
 
-      /* Don't cut off words if it can be avoided. */
-      if (cp + line_len < ss_end (text->string))
+      /* Word wrap. */
+      if (pos + line_len < length && wrap != WRAP_CHAR)
         {
           size_t space_len = line_len;
-          while (space_len > 0 && !isspace ((unsigned char) cp[space_len]))
+          while (space_len > 0 && !isspace ((unsigned char) line[space_len]))
             space_len--;
           if (space_len > 0)
             line_len = space_len;
+          else if (wrap == WRAP_WORD)
+            {
+              while (pos + line_len < length
+                     && !isspace ((unsigned char) line[line_len]))
+                line_len++;
+            }
         }
+      if (line_len > *width)
+        *width = line_len;
 
       /* Draw text. */
-      if (draw)
-        text_draw (this,
-                   text->font,
-                   text->x, text->y + (text->v - height_left),
-                   text->justification, text->h,
-                   cp, line_len);
-
-      /* Update. */
-      height_left--;
-      if (line_len > max_width)
-        max_width = line_len;
+      text_draw (a, cell, bb, clip, y, line, line_len);
 
       /* Next line. */
-      cp += line_len;
-      if (cp < ss_end (text->string) && isspace ((unsigned char) *cp))
-        cp++;
+      pos += line_len;
+      if (pos < length && isspace ((unsigned char) cell->contents[pos]))
+        pos++;
     }
-
-  if (width != NULL)
-    *width = max_width;
-  if (height != NULL)
-    *height = text->v - height_left;
+  *height = y - bb[V][0];
 }
+\f
+/* ascii_close_page () and support routines. */
 
-static void
-ascii_text_metrics (struct outp_driver *this, const struct outp_text *t,
-                    int *width, int *height)
+static bool
+ascii_open_page (struct ascii_driver *a)
 {
-  delineate (this, t, false, width, height);
-}
+  int i;
 
-static void
-ascii_text_draw (struct outp_driver *this, const struct outp_text *t)
-{
-  assert (this->page_open);
-  delineate (this, t, true, NULL, NULL);
+  if (a->error)
+    return false;
+
+  if (a->file == NULL)
+    {
+      a->file = fn_open (a->file_name, a->append ? "a" : "w");
+      if (a->file != NULL)
+        {
+          if (a->init != NULL)
+            fputs (a->init, a->file);
+        }
+      else
+        {
+          error (0, errno, _("ascii: opening output file \"%s\""),
+                 a->file_name);
+          a->error = true;
+          return false;
+        }
+    }
+
+  a->page_number++;
+
+  if (a->length > a->allocated_lines)
+    {
+      a->lines = xnrealloc (a->lines, a->length, sizeof *a->lines);
+      for (i = a->allocated_lines; i < a->length; i++)
+        {
+          struct ascii_line *line = &a->lines[i];
+          line->chars = NULL;
+          line->allocated_chars = 0;
+        }
+      a->allocated_lines = a->length;
+    }
+
+  for (i = 0; i < a->length; i++)
+    a->lines[i].n_chars = 0;
+
+  return true;
 }
-\f
-/* ascii_close_page () and support routines. */
 
-/* Writes the LENGTH characters in S to OUT.  */
+/* Writes LINE to A's output file.  */
 static void
-output_line (struct outp_driver *this, const struct line *line,
-             struct string *out)
+output_line (struct ascii_driver *a, const struct ascii_line *line)
 {
-  struct ascii_driver_ext *ext = this->ext;
-  const unsigned short *s = line->chars;
   size_t length;
+  size_t i;
 
-  for (length = line->char_cnt; length-- > 0; s++)
-    if (*s & ATTR_BOX)
-      ds_put_cstr (out, ext->box[*s & 0xff]);
-    else
-      {
-        if (*s & ATTR_EMPHASIS)
-          {
-            if (ext->emphasis == EMPH_BOLD)
-              {
-                ds_put_char (out, *s);
-                ds_put_char (out, '\b');
-              }
-            else if (ext->emphasis == EMPH_UNDERLINE)
-              ds_put_cstr (out, "_\b");
-          }
-        ds_put_char (out, *s);
-      }
+  length = line->n_chars;
+  while (length > 0 && line->chars[length - 1] == ' ')
+    length--;
+
+  for (i = 0; i < length; i++)
+    {
+      int attribute = line->chars[i] & (ATTR_BOX | ATTR_EMPHASIS);
+      int ch = line->chars[i] & ~(ATTR_BOX | ATTR_EMPHASIS);
+
+      switch (attribute)
+        {
+        case ATTR_BOX:
+          fputs (a->box[ch], a->file);
+          break;
+
+        case ATTR_EMPHASIS:
+          if (a->emphasis == EMPH_BOLD)
+            fprintf (a->file, "%c\b%c", ch, ch);
+          else if (a->emphasis == EMPH_UNDERLINE)
+            fprintf (a->file, "_\b%c", ch);
+          else
+            putc (ch, a->file);
+          break;
+
+        default:
+          putc (ch, a->file);
+          break;
+        }
+    }
+
+  putc ('\n', a->file);
 }
 
 static void
-append_lr_justified (struct string *out, int width,
-                     const char *left, const char *right)
+output_title_line (FILE *out, int width, const char *left, const char *right)
 {
-  ds_put_char_multiple (out, ' ', width);
+  struct string s = DS_EMPTY_INITIALIZER;
+  ds_put_char_multiple (&s, ' ', width);
   if (left != NULL)
     {
       size_t length = MIN (strlen (left), width);
-      memcpy (ds_end (out) - width, left, length);
+      memcpy (ds_end (&s) - width, left, length);
     }
   if (right != NULL)
     {
       size_t length = MIN (strlen (right), width);
-      memcpy (ds_end (out) - length, right, length);
+      memcpy (ds_end (&s) - length, right, length);
     }
-  ds_put_char (out, '\n');
-}
-
-static void
-dump_output (struct outp_driver *this, struct string *out)
-{
-  struct ascii_driver_ext *x = this->ext;
-  fwrite (ds_data (out), ds_length (out), 1, x->file);
-  ds_clear (out);
+  ds_put_char (&s, '\n');
+  fputs (ds_cstr (&s), out);
+  ds_destroy (&s);
 }
 
 static void
-ascii_close_page (struct outp_driver *this)
+ascii_close_page (struct ascii_driver *a)
 {
-  struct ascii_driver_ext *x = this->ext;
-  struct string out;
-  int line_num;
+  bool any_blank;
+  int i, y;
 
-  if (x->file == NULL)
+  a->y = 0;
+  if (a->file == NULL)
     return;
 
-  ds_init_empty (&out);
+  if (!a->top_margin && !a->bottom_margin && a->squeeze_blank_lines
+      && !a->paginate && a->page_number > 1)
+    putc ('\n', a->file);
 
-  ds_put_char_multiple (&out, '\n', x->top_margin);
-  if (x->headers)
+  for (i = 0; i < a->top_margin; i++)
+    putc ('\n', a->file);
+  if (a->headers)
     {
       char *r1, *r2;
 
-      r1 = xasprintf (_("%s - Page %d"), get_start_date (), x->page_number);
+      r1 = xasprintf (_("%s - Page %d"), get_start_date (), a->page_number);
       r2 = xasprintf ("%s - %s" , version, host_system);
 
-      append_lr_justified (&out, this->width, outp_title, r1);
-      append_lr_justified (&out, this->width, outp_subtitle, r2);
-      ds_put_char (&out, '\n');
+      output_title_line (a->file, a->width, a->title, r1);
+      output_title_line (a->file, a->width, a->subtitle, r2);
+      putc ('\n', a->file);
 
       free (r1);
       free (r2);
     }
-  dump_output (this, &out);
 
-  for (line_num = 0; line_num < this->length; line_num++)
+  any_blank = false;
+  for (y = 0; y < a->allocated_lines; y++)
     {
+      struct ascii_line *line = &a->lines[y];
 
-      /* Squeeze multiple blank lines into a single blank line if
-         requested. */
-      if (x->squeeze_blank_lines)
+      if (a->squeeze_blank_lines && y > 0 && line->n_chars == 0)
+        any_blank = true;
+      else
         {
-          if (line_num >= x->line_cap)
-            break;
-          if (line_num > 0
-              && x->lines[line_num].char_cnt == 0
-              && x->lines[line_num - 1].char_cnt == 0)
-            continue;
-        }
-
-      if (line_num < x->line_cap)
-        output_line (this, &x->lines[line_num], &out);
-      ds_put_char (&out, '\n');
-      dump_output (this, &out);
-    }
-
-  ds_put_char_multiple (&out, '\n', x->bottom_margin);
-  if (x->paginate)
-    ds_put_char (&out, '\f');
+          if (any_blank)
+            {
+              putc ('\n', a->file);
+              any_blank = false;
+            }
 
-  dump_output (this, &out);
-  ds_destroy (&out);
-}
-
-/* Flushes all output to the user and lets the user deal with it.
-   This is applied only to output drivers that are designated as
-   "screen" drivers that the user is interacting with in real
-   time. */
-static void
-ascii_flush (struct outp_driver *this)
-{
-  struct ascii_driver_ext *x = this->ext;
-  if (x->file != NULL)
-    {
-      if (fn_close (x->file_name, x->file) != 0)
-        error (0, errno, _("ascii: closing output file \"%s\""),
-               x->file_name);
-      pool_detach_file (x->pool, x->file);
-      x->file = NULL;
-    }
-}
-
-static void
-ascii_chart_initialise (struct outp_driver *this, struct chart *ch)
-{
-  struct ascii_driver_ext *x = this->ext;
-  struct outp_text t;
-  char *text;
-
-  if (x->chart_type == NULL)
-    return;
-
-  /* Initialize chart. */
-  chart_init_separate (ch, x->chart_type, x->chart_file_name, ++x->chart_cnt);
-  if (ch->file_name == NULL)
-    return;
-
-  /* Mention chart in output.
-     First advance current position. */
-  if (!this->page_open)
-    outp_open_page (this);
-  else
-    {
-      this->cp_y++;
-      if (this->cp_y >= this->length)
-        {
-          outp_close_page (this);
-          outp_open_page (this);
+          output_line (a, line);
         }
     }
-
-  /* Then write the text. */
-  text = xasprintf ("See %s for a chart.", ch->file_name);
-  t.font = OUTP_FIXED;
-  t.justification = OUTP_LEFT;
-  t.string = ss_cstr (text);
-  t.h = this->width;
-  t.v = 1;
-  t.x = 0;
-  t.y = this->cp_y;
-  ascii_text_draw (this, &t);
-  this->cp_y++;
-
-  free (text);
-}
-
-static void
-ascii_chart_finalise (struct outp_driver *this, struct chart *ch)
-{
-  struct ascii_driver_ext *x = this->ext;
-  if (x->chart_type != NULL)
-    chart_finalise_separate (ch);
+  if (!a->squeeze_blank_lines)
+    for (y = a->allocated_lines; y < a->length; y++)
+      putc ('\n', a->file);
+
+  for (i = 0; i < a->bottom_margin; i++)
+    putc ('\n', a->file);
+  if (a->paginate)
+    putc ('\f', a->file);
 }
-
-const struct outp_class ascii_class =
-{
-  "ascii",
-  0,
-
-  ascii_open_driver,
-  ascii_close_driver,
-
-  ascii_open_page,
-  ascii_close_page,
-  ascii_flush,
-
-  ascii_submit,
-
-  ascii_line,
-  ascii_text_metrics,
-  ascii_text_draw,
-
-  ascii_chart_initialise,
-  ascii_chart_finalise
-};
index ec92c559e044723180977db31ca43708c7f637bd..e5781b0af7d3bb4e3f8fdf1ff4ccfbd61acc6f87 100644 (file)
@@ -1,35 +1,74 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
-
-include $(top_srcdir)/src/output/charts/automake.mk
-
 noinst_LTLIBRARIES += src/output/liboutput.la 
 
-output_sources = \
-       src/output/afm.c \
-       src/output/afm.h \
+src_output_liboutput_la_CPPFLAGS = $(LIBXML2_CFLAGS) $(AM_CPPFLAGS) 
+
+src_output_liboutput_la_SOURCES = \
        src/output/ascii.c \
+       src/output/chart-item-provider.h \
+       src/output/chart-item.c \
+       src/output/chart-item.h \
+       src/output/charts/boxplot.c \
+       src/output/charts/boxplot.h \
+       src/output/charts/np-plot.c \
+       src/output/charts/np-plot.h \
+       src/output/charts/piechart.c \
+       src/output/charts/piechart.h \
+       src/output/charts/plot-hist.c \
+       src/output/charts/plot-hist.h \
+       src/output/charts/roc-chart.c \
+       src/output/charts/roc-chart.h \
+       src/output/charts/scree.c \
+       src/output/charts/scree.h \
+       src/output/csv.c \
+       src/output/driver-provider.h \
+       src/output/driver.c \
+       src/output/driver.h \
        src/output/html.c \
-       src/output/htmlP.h \
        src/output/journal.c \
        src/output/journal.h \
-       src/output/output.c \
-       src/output/output.h \
-       src/output/postscript.c \
-       src/output/manager.c \
-       src/output/manager.h \
-       src/output/chart.h \
-       src/output/table.c src/output/table.h
-
-
-if WITHCHARTS
-src_output_liboutput_la_SOURCES = $(output_sources) src/output/chart.c
-
-EXTRA_DIST += src/output/dummy-chart.c
-else
-src_output_liboutput_la_SOURCES = $(output_sources) src/output/dummy-chart.c
-
-EXTRA_DIST += src/output/chart.c
+       src/output/measure.c \
+       src/output/measure.h \
+       src/output/message-item.c \
+       src/output/message-item.h \
+       src/output/msglog.c \
+       src/output/msglog.h \
+       src/output/options.c \
+       src/output/options.h \
+       src/output/output-item-provider.h \
+       src/output/output-item.c \
+       src/output/output-item.h \
+       src/output/render.c \
+       src/output/render.h \
+       src/output/tab.c \
+       src/output/tab.h \
+       src/output/table-casereader.c \
+       src/output/table-item.c \
+       src/output/table-item.h \
+       src/output/table-paste.c \
+       src/output/table-provider.h \
+       src/output/table-select.c \
+       src/output/table-transpose.c \
+       src/output/table.c \
+       src/output/table.h \
+       src/output/text-item.c \
+       src/output/text-item.h
+if HAVE_CAIRO
+src_output_liboutput_la_SOURCES += \
+       src/output/cairo-chart.c \
+       src/output/cairo-chart.h \
+       src/output/cairo.c \
+       src/output/cairo.h \
+       src/output/charts/boxplot-cairo.c \
+       src/output/charts/np-plot-cairo.c \
+       src/output/charts/piechart-cairo.c \
+       src/output/charts/plot-hist-cairo.c \
+       src/output/charts/roc-chart-cairo.c \
+       src/output/charts/scree-cairo.c
+endif
+if ODT_SUPPORT
+src_output_liboutput_la_SOURCES += src/output/odt.c
 endif
 
 EXTRA_DIST += src/output/OChangeLog
diff --git a/src/output/cairo-chart.c b/src/output/cairo-chart.c
new file mode 100644 (file)
index 0000000..a776eab
--- /dev/null
@@ -0,0 +1,499 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "output/cairo-chart.h"
+
+#include <assert.h>
+#include <cairo/cairo.h>
+#include <pango/pango.h>
+#include <pango/pangocairo.h>
+#include <errno.h>
+#include <float.h>
+#include <math.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libpspp/assertion.h"
+#include "math/chart-geometry.h"
+#include "output/cairo.h"
+#include "output/chart-item.h"
+
+#include "error.h"
+#include "xalloc.h"
+#include "xvasprintf.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+void
+xrchart_geometry_init (cairo_t *cr, struct xrchart_geometry *geom,
+                       double width, double length)
+{
+  /* Set default chartetry. */
+  geom->data_top = 0.900 * length;
+  geom->data_right = 0.800 * width;
+  geom->data_bottom = 0.120 * length;
+  geom->data_left = 0.150 * width;
+  geom->abscissa_top = 0.070 * length;
+  geom->ordinate_right = 0.120 * width;
+  geom->title_bottom = 0.920 * length;
+  geom->legend_left = 0.810 * width;
+  geom->legend_right = width;
+  geom->font_size = 15.0;
+  geom->in_path = false;
+  geom->dataset = NULL;
+  geom->n_datasets = 0;
+
+  geom->fill_colour.red = 255;
+  geom->fill_colour.green = 0;
+  geom->fill_colour.blue = 0;
+
+  cairo_set_line_width (cr, 1.0);
+
+  cairo_rectangle (cr, geom->data_left, geom->data_bottom,
+                   geom->data_right - geom->data_left,
+                   geom->data_top - geom->data_bottom);
+  cairo_stroke (cr);
+}
+
+void
+xrchart_geometry_free (cairo_t *cr UNUSED, struct xrchart_geometry *geom)
+{
+  int i;
+
+  for (i = 0 ; i < geom->n_datasets; ++i)
+    free (geom->dataset[i]);
+  free (geom->dataset);
+}
+
+#if ! PANGO_VERSION_CHECK (1, 22, 0)
+int pango_layout_get_baseline (PangoLayout    *layout);
+
+/* Shamelessly copied from the pango source */
+int
+pango_layout_get_baseline (PangoLayout    *layout)
+{
+  int baseline;
+
+  /* XXX this is so inefficient */
+  PangoLayoutIter *iter = pango_layout_get_iter (layout);
+  baseline = pango_layout_iter_get_baseline (iter);
+  pango_layout_iter_free (iter);
+
+  return baseline;
+}
+#endif
+
+
+
+const struct xrchart_colour data_colour[XRCHART_N_COLOURS] =
+  {
+    { 165, 42, 42 },            /* brown */
+    { 255, 0, 0 },              /* red */
+    { 255, 165, 0 },            /* orange */
+    { 255, 255, 0 },            /* yellow */
+    { 0, 255, 0 },              /* green */
+    { 0, 0, 255 },              /* blue */
+    { 238, 130, 238 },          /* violet */
+    { 190, 190, 190 },          /* grey */
+    { 255, 192, 203 },          /* pink */
+  };
+
+void
+xrchart_draw_marker (cairo_t *cr, double x, double y,
+                     enum xrmarker_type marker, double size)
+{
+  cairo_save (cr);
+  cairo_translate (cr, x, y);
+  cairo_scale (cr, size / 2.0, size / 2.0);
+  cairo_set_line_width (cr, cairo_get_line_width (cr) / (size / 2.0));
+  switch (marker)
+    {
+    case XRMARKER_CIRCLE:
+      cairo_arc (cr, 0, 0, 1.0, 0, 2 * M_PI);
+      cairo_stroke (cr);
+      break;
+
+    case XRMARKER_ASTERISK:
+      cairo_move_to (cr, 0, -1.0); /* | */
+      cairo_line_to (cr, 0, 1.0);
+      cairo_move_to (cr, -M_SQRT1_2, -M_SQRT1_2); /* / */
+      cairo_line_to (cr, M_SQRT1_2, M_SQRT1_2);
+      cairo_move_to (cr, -M_SQRT1_2, M_SQRT1_2); /* \ */
+      cairo_line_to (cr, M_SQRT1_2, -M_SQRT1_2);
+      cairo_stroke (cr);
+      break;
+
+    case XRMARKER_SQUARE:
+      cairo_rectangle (cr, -1.0, -1.0, 2.0, 2.0);
+      cairo_stroke (cr);
+      break;
+    }
+  cairo_restore (cr);
+}
+
+void
+xrchart_label (cairo_t *cr, int horz_justify, int vert_justify,
+               double font_size, const char *string)
+{
+  PangoFontDescription *desc;
+  PangoLayout *layout;
+  double x, y;
+
+  desc = pango_font_description_from_string ("sans serif");
+  if (desc == NULL)
+    {
+      cairo_new_path (cr);
+      return;
+    }
+  pango_font_description_set_absolute_size (desc, font_size * PANGO_SCALE);
+
+  cairo_save (cr);
+  cairo_get_current_point (cr, &x, &y);
+  cairo_translate (cr, x, y);
+  cairo_move_to (cr, 0, 0);
+  cairo_scale (cr, 1.0, -1.0);
+
+  layout = pango_cairo_create_layout (cr);
+  pango_layout_set_font_description (layout, desc);
+  pango_layout_set_text (layout, string, -1);
+  if (horz_justify != 'l')
+    {
+      int width_pango;
+      double width;
+
+      pango_layout_get_size (layout, &width_pango, NULL);
+      width = (double) width_pango / PANGO_SCALE;
+      if (horz_justify == 'r')
+        cairo_rel_move_to (cr, -width, 0);
+      else
+        cairo_rel_move_to (cr, -width / 2.0, 0);
+    }
+  if (vert_justify == 'x')
+    {
+      int baseline_pango = pango_layout_get_baseline (layout);
+      double baseline = (double) baseline_pango / PANGO_SCALE;
+      cairo_rel_move_to (cr, 0, -baseline);
+    }
+  else if (vert_justify != 't')
+    {
+      int height_pango;
+      double height;
+
+      pango_layout_get_size (layout, NULL, &height_pango);
+      height = (double) height_pango / PANGO_SCALE;
+      if (vert_justify == 'b')
+        cairo_rel_move_to (cr, 0, -height);
+      else if (vert_justify == 'c')
+        cairo_rel_move_to (cr, 0, -height / 2.0);
+    }
+  pango_cairo_show_layout (cr, layout);
+  g_object_unref (layout);
+
+  cairo_restore (cr);
+
+  cairo_new_path (cr);
+
+  pango_font_description_free (desc);
+}
+
+/* Draw a tick mark at position
+   If label is non zero, then print it at the tick mark
+*/
+void
+draw_tick (cairo_t *cr, const struct xrchart_geometry *geom,
+           enum tick_orientation orientation,
+           double position,
+           const char *label, ...)
+{
+  const int tickSize = 10;
+  double x, y;
+
+  cairo_move_to (cr, geom->data_left, geom->data_bottom);
+
+  if (orientation == TICK_ABSCISSA)
+    {
+      cairo_rel_move_to (cr, position, 0);
+      cairo_rel_line_to (cr, 0, -tickSize);
+    }
+  else if (orientation == TICK_ORDINATE)
+    {
+      cairo_rel_move_to (cr, 0, position);
+      cairo_rel_line_to (cr, -tickSize, 0);
+    }
+  else
+    NOT_REACHED ();
+  cairo_get_current_point (cr, &x, &y);
+
+  cairo_stroke (cr);
+
+  if (label != NULL)
+    {
+      va_list ap;
+      char *s;
+
+      cairo_move_to (cr, x, y);
+
+      va_start (ap, label);
+      s = xvasprintf (label, ap);
+      if (orientation == TICK_ABSCISSA)
+        xrchart_label (cr, 'c', 't', geom->font_size, s);
+      else if (orientation == TICK_ORDINATE)
+        {
+          if (fabs (position) < DBL_EPSILON)
+           cairo_rel_move_to (cr, 0, 10);
+          xrchart_label (cr, 'r', 'c', geom->font_size, s);
+        }
+      free (s);
+      va_end (ap);
+    }
+}
+
+
+/* Write the title on a chart*/
+void
+xrchart_write_title (cairo_t *cr, const struct xrchart_geometry *geom,
+                   const char *title, ...)
+{
+  va_list ap;
+  char *s;
+
+  cairo_save (cr);
+  cairo_move_to (cr, geom->data_left, geom->title_bottom);
+
+  va_start(ap, title);
+  s = xvasprintf (title, ap);
+  xrchart_label (cr, 'l', 'x', geom->font_size * 1.5, s);
+  free (s);
+  va_end (ap);
+
+  cairo_restore (cr);
+}
+
+
+/* Set the scale for the abscissa */
+void
+xrchart_write_xscale (cairo_t *cr, struct xrchart_geometry *geom,
+                    double min, double max, int ticks)
+{
+  double x;
+
+  const double tick_interval =
+    chart_rounded_tick ((max - min) / (double) ticks);
+
+  geom->x_max = ceil (max / tick_interval) * tick_interval;
+  geom->x_min = floor (min / tick_interval) * tick_interval;
+  geom->abscissa_scale = fabs(geom->data_right - geom->data_left) /
+    fabs(geom->x_max - geom->x_min);
+
+  for (x = geom->x_min; x <= geom->x_max; x += tick_interval)
+    draw_tick (cr, geom, TICK_ABSCISSA,
+               (x - geom->x_min) * geom->abscissa_scale, "%g", x);
+}
+
+
+/* Set the scale for the ordinate */
+void
+xrchart_write_yscale (cairo_t *cr, struct xrchart_geometry *geom,
+                    double smin, double smax, int ticks)
+{
+  double y;
+
+  const double tick_interval =
+    chart_rounded_tick ((smax - smin) / (double) ticks);
+
+  geom->y_max = ceil (smax / tick_interval) * tick_interval;
+  geom->y_min = floor (smin / tick_interval) * tick_interval;
+
+  geom->ordinate_scale =
+    (fabs (geom->data_top - geom->data_bottom)
+     / fabs (geom->y_max - geom->y_min));
+
+  for (y = geom->y_min; y <= geom->y_max; y += tick_interval)
+    draw_tick (cr, geom, TICK_ORDINATE,
+              (y - geom->y_min) * geom->ordinate_scale, "%g", y);
+}
+
+/* Write the abscissa label */
+void
+xrchart_write_xlabel (cairo_t *cr, const struct xrchart_geometry *geom,
+                    const char *label)
+{
+  cairo_move_to (cr, geom->data_left, geom->abscissa_top);
+  xrchart_label (cr, 'l', 't', geom->font_size, label);
+}
+
+/* Write the ordinate label */
+void
+xrchart_write_ylabel (cairo_t *cr, const struct xrchart_geometry *geom,
+                    const char *label)
+{
+  cairo_save (cr);
+  cairo_translate (cr, -geom->data_bottom, -geom->ordinate_right);
+  cairo_move_to (cr, 0, 0);
+  cairo_rotate (cr, M_PI / 2.0);
+  xrchart_label (cr, 'l', 'x', geom->font_size, label);
+  cairo_restore (cr);
+}
+
+
+void
+xrchart_write_legend (cairo_t *cr, const struct xrchart_geometry *geom)
+{
+  int i;
+  const int vstep = geom->font_size * 2;
+  const int xpad = 10;
+  const int ypad = 10;
+  const int swatch = 20;
+  const int legend_top = geom->data_top;
+  const int legend_bottom = legend_top -
+    (vstep * geom->n_datasets + 2 * ypad );
+
+  cairo_save (cr);
+
+  cairo_rectangle (cr, geom->legend_left, legend_top,
+                   geom->legend_right - xpad - geom->legend_left,
+                   legend_bottom - legend_top);
+  cairo_stroke (cr);
+
+  for (i = 0 ; i < geom->n_datasets ; ++i )
+    {
+      const int ypos = legend_top - vstep * (i + 1);
+      const int xpos = geom->legend_left + xpad;
+      const struct xrchart_colour *colour;
+
+      cairo_move_to (cr, xpos, ypos);
+
+      cairo_save (cr);
+      colour = &data_colour [ i % XRCHART_N_COLOURS];
+      cairo_set_source_rgb (cr,
+                            colour->red / 255.0,
+                            colour->green / 255.0,
+                            colour->blue / 255.0);
+      cairo_rectangle (cr, xpos, ypos, swatch, swatch);
+      cairo_fill_preserve (cr);
+      cairo_stroke (cr);
+      cairo_restore (cr);
+
+      cairo_move_to (cr, xpos + swatch * 1.5, ypos);
+      xrchart_label (cr, 'l', 'x', geom->font_size, geom->dataset[i]);
+    }
+
+  cairo_restore (cr);
+}
+
+/* Start a new vector called NAME */
+void
+xrchart_vector_start (cairo_t *cr, struct xrchart_geometry *geom, const char *name)
+{
+  const struct xrchart_colour *colour;
+
+  cairo_save (cr);
+
+  colour = &data_colour[geom->n_datasets % XRCHART_N_COLOURS];
+  cairo_set_source_rgb (cr,
+                        colour->red / 255.0,
+                        colour->green / 255.0,
+                        colour->blue / 255.0);
+
+  geom->n_datasets++;
+  geom->dataset = xrealloc (geom->dataset,
+                            geom->n_datasets * sizeof (*geom->dataset));
+
+  geom->dataset[geom->n_datasets - 1] = strdup (name);
+}
+
+/* Plot a data point */
+void
+xrchart_datum (cairo_t *cr, const struct xrchart_geometry *geom,
+             int dataset UNUSED, double x, double y)
+{
+  double x_pos = (x - geom->x_min) * geom->abscissa_scale + geom->data_left;
+  double y_pos = (y - geom->y_min) * geom->ordinate_scale + geom->data_bottom;
+
+  xrchart_draw_marker (cr, x_pos, y_pos, XRMARKER_SQUARE, 15);
+}
+
+void
+xrchart_vector_end (cairo_t *cr, struct xrchart_geometry *geom)
+{
+  cairo_stroke (cr);
+  cairo_restore (cr);
+  geom->in_path = false;
+}
+
+/* Plot a data point */
+void
+xrchart_vector (cairo_t *cr, struct xrchart_geometry *geom, double x, double y)
+{
+  const double x_pos =
+    (x - geom->x_min) * geom->abscissa_scale + geom->data_left ;
+
+  const double y_pos =
+    (y - geom->y_min) * geom->ordinate_scale + geom->data_bottom ;
+
+  if (geom->in_path)
+    cairo_line_to (cr, x_pos, y_pos);
+  else
+    {
+      cairo_move_to (cr, x_pos, y_pos);
+      geom->in_path = true;
+    }
+}
+
+
+
+/* Draw a line with slope SLOPE and intercept INTERCEPT.
+   between the points limit1 and limit2.
+   If lim_dim is XRCHART_DIM_Y then the limit{1,2} are on the
+   y axis otherwise the x axis
+*/
+void
+xrchart_line(cairo_t *cr, const struct xrchart_geometry *geom,
+           double slope, double intercept,
+          double limit1, double limit2, enum xrchart_dim lim_dim)
+{
+  double x1, y1;
+  double x2, y2;
+
+  if ( lim_dim == XRCHART_DIM_Y )
+    {
+      x1 = ( limit1 - intercept ) / slope;
+      x2 = ( limit2 - intercept ) / slope;
+      y1 = limit1;
+      y2 = limit2;
+    }
+  else
+    {
+      x1 = limit1;
+      x2 = limit2;
+      y1 = slope * x1 + intercept;
+      y2 = slope * x2 + intercept;
+    }
+
+  y1 = (y1 - geom->y_min) * geom->ordinate_scale + geom->data_bottom;
+  y2 = (y2 - geom->y_min) * geom->ordinate_scale + geom->data_bottom;
+  x1 = (x1 - geom->x_min) * geom->abscissa_scale + geom->data_left;
+  x2 = (x2 - geom->x_min) * geom->abscissa_scale + geom->data_left;
+
+  cairo_move_to (cr, x1, y1);
+  cairo_line_to (cr, x2, y2);
+  cairo_stroke (cr);
+}
diff --git a/src/output/cairo-chart.h b/src/output/cairo-chart.h
new file mode 100644 (file)
index 0000000..041a169
--- /dev/null
@@ -0,0 +1,165 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_CAIRO_CHART_H
+#define OUTPUT_CAIRO_CHART_H 1
+
+#include <cairo/cairo.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include "libpspp/compiler.h"
+
+struct chart_item;
+
+struct xrchart_colour
+  {
+    uint8_t red;
+    uint8_t green;
+    uint8_t blue;
+  };
+
+/* The geometry of a chart. */
+struct xrchart_geometry
+  {
+    int data_top;
+    int data_right;
+    int data_bottom;
+    int data_left;
+
+    int abscissa_top;
+
+    int ordinate_right;
+
+    int title_bottom;
+
+    /* Legend. */
+    int legend_left;
+    int legend_right;
+    char **dataset;
+    int n_datasets;
+
+    /* Default font size for the plot. */
+    double font_size;
+
+    struct xrchart_colour fill_colour;
+
+    /* Stuff particular to cartesians and boxplots. */
+    double ordinate_scale;
+    double abscissa_scale;
+    double x_min;
+    double x_max;
+    double y_min;
+    double y_max;
+    bool in_path;
+  };
+
+void xrchart_geometry_init (cairo_t *, struct xrchart_geometry *,
+                            double width, double length);
+void xrchart_geometry_free (cairo_t *, struct xrchart_geometry *);
+
+#define XRCHART_N_COLOURS 9
+extern const struct xrchart_colour data_colour[];
+
+enum tick_orientation
+  {
+    TICK_ABSCISSA=0,
+    TICK_ORDINATE
+  };
+
+enum xrmarker_type
+  {
+    XRMARKER_CIRCLE,              /* Hollow circle. */
+    XRMARKER_ASTERISK,            /* Asterisk (*). */
+    XRMARKER_SQUARE               /* Hollow square. */
+  };
+
+void xrchart_draw_marker (cairo_t *, double x, double y, enum xrmarker_type,
+                          double size);
+
+void xrchart_label (cairo_t *, int horz_justify, int vert_justify,
+                    double font_size, const char *);
+
+/* Draw a tick mark at position
+   If label is non zero, then print it at the tick mark
+*/
+void draw_tick (cairo_t *, const struct xrchart_geometry *,
+                enum tick_orientation orientation, double position,
+                const char *label, ...)
+  PRINTF_FORMAT (5, 6);
+
+
+/* Write the title on a chart*/
+void xrchart_write_title (cairo_t *, const struct xrchart_geometry *,
+                          const char *title, ...)
+  PRINTF_FORMAT (3, 4);
+
+/* Set the scale for the abscissa */
+void xrchart_write_xscale (cairo_t *, struct xrchart_geometry *,
+                           double min, double max, int ticks);
+
+
+/* Set the scale for the ordinate */
+void xrchart_write_yscale (cairo_t *, struct xrchart_geometry *,
+                           double smin, double smax, int ticks);
+
+void xrchart_write_xlabel (cairo_t *, const struct xrchart_geometry *,
+                           const char *label) ;
+
+/* Write the ordinate label */
+void xrchart_write_ylabel (cairo_t *, const struct xrchart_geometry *,
+                           const char *label);
+
+void xrchart_write_legend (cairo_t *, const struct xrchart_geometry *);
+
+enum xrchart_dim
+  {
+    XRCHART_DIM_X,
+    XRCHART_DIM_Y
+  };
+
+void xrchart_vector_start (cairo_t *, struct xrchart_geometry *,
+                           const char *name);
+void xrchart_vector_end (cairo_t *, struct xrchart_geometry *);
+void xrchart_vector (cairo_t *, struct xrchart_geometry *, double x, double y);
+
+/* Plot a data point */
+void xrchart_datum (cairo_t *, const struct xrchart_geometry *,
+                    int dataset UNUSED, double x, double y);
+
+/* Draw a line with slope SLOPE and intercept INTERCEPT.
+   between the points limit1 and limit2.
+   If lim_dim is XRCHART_DIM_Y then the limit{1,2} are on the
+   y axis otherwise the x axis
+*/
+void xrchart_line (cairo_t *, const struct xrchart_geometry *,
+                   double slope, double intercept,
+                   double limit1, double limit2, enum xrchart_dim lim_dim);
+
+/* Drawing various kinds of charts. */
+void xrchart_draw_boxplot (const struct chart_item *, cairo_t *,
+                           struct xrchart_geometry *);
+void xrchart_draw_roc (const struct chart_item *, cairo_t *,
+                       struct xrchart_geometry *);
+void xrchart_draw_piechart (const struct chart_item *, cairo_t *,
+                            struct xrchart_geometry *);
+void xrchart_draw_histogram (const struct chart_item *, cairo_t *,
+                             struct xrchart_geometry *);
+void xrchart_draw_np_plot (const struct chart_item *, cairo_t *,
+                           struct xrchart_geometry *);
+void xrchart_draw_scree (const struct chart_item *, cairo_t *,
+                         struct xrchart_geometry *);
+
+#endif /* output/cairo-chart.h */
diff --git a/src/output/cairo.c b/src/output/cairo.c
new file mode 100644 (file)
index 0000000..68c3eb8
--- /dev/null
@@ -0,0 +1,1342 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "output/cairo.h"
+
+#include "libpspp/assertion.h"
+#include "libpspp/cast.h"
+#include "libpspp/message.h"
+#include "libpspp/start-date.h"
+#include "libpspp/str.h"
+#include "libpspp/string-map.h"
+#include "libpspp/version.h"
+#include "output/cairo-chart.h"
+#include "output/chart-item-provider.h"
+#include "output/charts/boxplot.h"
+#include "output/charts/np-plot.h"
+#include "output/charts/piechart.h"
+#include "output/charts/plot-hist.h"
+#include "output/charts/roc-chart.h"
+#include "output/charts/scree.h"
+#include "output/driver-provider.h"
+#include "output/message-item.h"
+#include "output/options.h"
+#include "output/render.h"
+#include "output/tab.h"
+#include "output/table-item.h"
+#include "output/table.h"
+#include "output/text-item.h"
+
+#include <cairo/cairo-pdf.h>
+#include <cairo/cairo-ps.h>
+#include <cairo/cairo-svg.h>
+#include <cairo/cairo.h>
+#include <pango/pango-font.h>
+#include <pango/pango-layout.h>
+#include <pango/pango.h>
+#include <pango/pangocairo.h>
+#include <stdlib.h>
+
+#include "gl/error.h"
+#include "gl/intprops.h"
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+/* This file uses TABLE_HORZ and TABLE_VERT enough to warrant abbreviating. */
+#define H TABLE_HORZ
+#define V TABLE_VERT
+
+/* Measurements as we present to the rest of PSPP. */
+#define XR_POINT PANGO_SCALE
+#define XR_INCH (XR_POINT * 72)
+
+/* Conversions to and from points. */
+static double
+xr_to_pt (int x)
+{
+  return x / (double) XR_POINT;
+}
+
+/* Output types. */
+enum xr_output_type
+  {
+    XR_PDF,
+    XR_PS,
+    XR_SVG
+  };
+
+/* Cairo fonts. */
+enum xr_font_type
+  {
+    XR_FONT_PROPORTIONAL,
+    XR_FONT_EMPHASIS,
+    XR_FONT_FIXED,
+    XR_N_FONTS
+  };
+
+/* A font for use with Cairo. */
+struct xr_font
+  {
+    char *string;
+    PangoFontDescription *desc;
+    PangoLayout *layout;
+    PangoFontMetrics *metrics;
+  };
+
+/* An output item whose rendering is in progress. */
+struct xr_render_fsm
+  {
+    /* Renders as much of itself as it can on the current page.  Returns true
+       if rendering is complete, false if the output item needs another
+       page. */
+    bool (*render) (struct xr_render_fsm *, struct xr_driver *);
+
+    /* Destroys the output item. */
+    void (*destroy) (struct xr_render_fsm *);
+  };
+
+/* Cairo output driver. */
+struct xr_driver
+  {
+    struct output_driver driver;
+
+    /* User parameters. */
+    bool headers;               /* Draw headers at top of page? */
+
+    struct xr_font fonts[XR_N_FONTS];
+    int font_height;            /* In XR units. */
+
+    int width;                  /* Page width minus margins. */
+    int length;                 /* Page length minus margins and header. */
+
+    int left_margin;            /* Left margin in XR units. */
+    int right_margin;           /* Right margin in XR units. */
+    int top_margin;             /* Top margin in XR units. */
+    int bottom_margin;          /* Bottom margin in XR units. */
+
+    int line_gutter;           /* Space around lines. */
+    int line_space;            /* Space between lines. */
+    int line_width;            /* Width of lines. */
+
+    /* Internal state. */
+    struct render_params *params;
+    char *command_name;
+    char *title;
+    char *subtitle;
+    cairo_t *cairo;
+    int page_number;           /* Current page number. */
+    int y;
+    struct xr_render_fsm *fsm;
+  };
+
+static const struct output_driver_class cairo_driver_class;
+
+static void draw_headers (struct xr_driver *);
+static void xr_driver_destroy_fsm (struct xr_driver *);
+static void xr_driver_run_fsm (struct xr_driver *);
+
+static bool load_font (struct xr_driver *, struct xr_font *);
+static void free_font (struct xr_font *);
+
+static void xr_draw_line (void *, int bb[TABLE_N_AXES][2],
+                          enum render_line_style styles[TABLE_N_AXES][2]);
+static void xr_measure_cell_width (void *, const struct table_cell *,
+                                   int *min, int *max);
+static int xr_measure_cell_height (void *, const struct table_cell *,
+                                   int width);
+static void xr_draw_cell (void *, const struct table_cell *,
+                          int bb[TABLE_N_AXES][2],
+                          int clip[TABLE_N_AXES][2]);
+
+static struct xr_render_fsm *xr_render_output_item (
+  struct xr_driver *, const struct output_item *);
+\f
+/* Output driver basics. */
+
+static struct xr_driver *
+xr_driver_cast (struct output_driver *driver)
+{
+  assert (driver->class == &cairo_driver_class);
+  return UP_CAST (driver, struct xr_driver, driver);
+}
+
+static struct driver_option *
+opt (struct output_driver *d, struct string_map *options, const char *key,
+     const char *default_value)
+{
+  return driver_option_get (d, options, key, default_value);
+}
+
+static struct xr_driver *
+xr_allocate (const char *name, int device_type, struct string_map *o)
+{
+  int paper_width, paper_length;
+  struct output_driver *d;
+  struct xr_driver *xr;
+
+  xr = xzalloc (sizeof *xr);
+  d = &xr->driver;
+  output_driver_init (d, &cairo_driver_class, name, device_type);
+  xr->font_height = XR_POINT * 10;
+  xr->fonts[XR_FONT_FIXED].string
+    = parse_string (opt (d, o, "fixed-font", "monospace"));
+  xr->fonts[XR_FONT_PROPORTIONAL].string
+    = parse_string (opt (d, o, "prop-font", "serif"));
+  xr->fonts[XR_FONT_EMPHASIS].string
+    = parse_string (opt (d, o, "emph-font", "serif italic"));
+  xr->line_gutter = XR_POINT;
+  xr->line_space = XR_POINT;
+  xr->line_width = XR_POINT / 2;
+  xr->page_number = 0;
+
+  xr->headers = parse_boolean (opt (d, o, "headers", "true"));
+
+  parse_paper_size (opt (d, o, "paper-size", ""), &paper_width, &paper_length);
+  xr->left_margin = parse_dimension (opt (d, o, "left-margin", ".5in"));
+  xr->right_margin = parse_dimension (opt (d, o, "right-margin", ".5in"));
+  xr->top_margin = parse_dimension (opt (d, o, "top-margin", ".5in"));
+  xr->bottom_margin = parse_dimension (opt (d, o, "bottom-margin", ".5in"));
+
+  if (xr->headers)
+    xr->top_margin += 3 * xr->font_height;
+  xr->width = paper_width - xr->left_margin - xr->right_margin;
+  xr->length = paper_length - xr->top_margin - xr->bottom_margin;
+
+  return xr;
+}
+
+static bool
+xr_set_cairo (struct xr_driver *xr, cairo_t *cairo)
+{
+  int i;
+
+  xr->cairo = cairo;
+
+  cairo_set_line_width (xr->cairo, xr_to_pt (xr->line_width));
+
+  for (i = 0; i < XR_N_FONTS; i++)
+    if (!load_font (xr, &xr->fonts[i]))
+      return false;
+
+  if (xr->params == NULL)
+    {
+      int single_width, double_width;
+
+      xr->params = xmalloc (sizeof *xr->params);
+      xr->params->draw_line = xr_draw_line;
+      xr->params->measure_cell_width = xr_measure_cell_width;
+      xr->params->measure_cell_height = xr_measure_cell_height;
+      xr->params->draw_cell = xr_draw_cell;
+      xr->params->aux = xr;
+      xr->params->size[H] = xr->width;
+      xr->params->size[V] = xr->length;
+      xr->params->font_size[H] = xr->font_height / 2; /* XXX */
+      xr->params->font_size[V] = xr->font_height;
+
+      single_width = 2 * xr->line_gutter + xr->line_width;
+      double_width = 2 * xr->line_gutter + xr->line_space + 2 * xr->line_width;
+      for (i = 0; i < TABLE_N_AXES; i++)
+        {
+          xr->params->line_widths[i][RENDER_LINE_NONE] = 0;
+          xr->params->line_widths[i][RENDER_LINE_SINGLE] = single_width;
+          xr->params->line_widths[i][RENDER_LINE_DOUBLE] = double_width;
+        }
+    }
+
+  return true;
+}
+
+static struct output_driver *
+xr_create (const char *file_name, enum settings_output_devices device_type,
+           struct string_map *o, enum xr_output_type file_type)
+{
+  enum { MIN_WIDTH = 3, MIN_LENGTH = 3 };
+  struct output_driver *d;
+  struct xr_driver *xr;
+  cairo_surface_t *surface;
+  cairo_status_t status;
+  double width_pt, length_pt;
+
+  xr = xr_allocate (file_name, device_type, o);
+  d = &xr->driver;
+
+  width_pt = (xr->width + xr->left_margin + xr->right_margin) / 1000.0;
+  length_pt = (xr->length + xr->top_margin + xr->bottom_margin) / 1000.0;
+  if (file_type == XR_PDF)
+    surface = cairo_pdf_surface_create (file_name, width_pt, length_pt);
+  else if (file_type == XR_PS)
+    surface = cairo_ps_surface_create (file_name, width_pt, length_pt);
+  else if (file_type == XR_SVG)
+    surface = cairo_svg_surface_create (file_name, width_pt, length_pt);
+  else
+    NOT_REACHED ();
+
+  status = cairo_surface_status (surface);
+  if (status != CAIRO_STATUS_SUCCESS)
+    {
+      error (0, 0, _("error opening output file \"%s\": %s"),
+             file_name, cairo_status_to_string (status));
+      cairo_surface_destroy (surface);
+      goto error;
+    }
+
+  xr->cairo = cairo_create (surface);
+  cairo_surface_destroy (surface);
+
+  if (!xr_set_cairo (xr, xr->cairo))
+    goto error;
+
+  cairo_save (xr->cairo);
+  xr_driver_next_page (xr, xr->cairo);
+
+  if (xr->width / (xr->font_height / 2) < MIN_WIDTH)
+    {
+      error (0, 0, _("The defined page is not wide enough to hold at least %d "
+                     "characters in the default font.  In fact, there's only "
+                     "room for %d characters."),
+             MIN_WIDTH,
+             xr->width / (xr->font_height / 2));
+      goto error;
+    }
+
+  if (xr->length / xr->font_height < MIN_LENGTH)
+    {
+      error (0, 0, _("The defined page is not long "
+                     "enough to hold margins and headers, plus least %d "
+                     "lines of the default fonts.  In fact, there's only "
+                     "room for %d lines."),
+             MIN_LENGTH,
+             xr->length / xr->font_height);
+      goto error;
+    }
+
+  draw_headers (xr);
+
+  return &xr->driver;
+
+ error:
+  output_driver_destroy (&xr->driver);
+  return NULL;
+}
+
+static struct output_driver *
+xr_pdf_create (const char *file_name, enum settings_output_devices device_type,
+               struct string_map *o)
+{
+  return xr_create (file_name, device_type, o, XR_PDF);
+}
+
+static struct output_driver *
+xr_ps_create (const char *file_name, enum settings_output_devices device_type,
+               struct string_map *o)
+{
+  return xr_create (file_name, device_type, o, XR_PS);
+}
+
+static struct output_driver *
+xr_svg_create (const char *file_name, enum settings_output_devices device_type,
+               struct string_map *o)
+{
+  return xr_create (file_name, device_type, o, XR_SVG);
+}
+
+static void
+xr_destroy (struct output_driver *driver)
+{
+  struct xr_driver *xr = xr_driver_cast (driver);
+  size_t i;
+
+  xr_driver_destroy_fsm (xr);
+
+  if (xr->cairo != NULL)
+    {
+      cairo_status_t status;
+
+      cairo_surface_finish (cairo_get_target (xr->cairo));
+      status = cairo_status (xr->cairo);
+      if (status != CAIRO_STATUS_SUCCESS)
+        error (0, 0, _("error drawing output for %s driver: %s"),
+               output_driver_get_name (driver),
+               cairo_status_to_string (status));
+      cairo_destroy (xr->cairo);
+    }
+
+  free (xr->command_name);
+  for (i = 0; i < XR_N_FONTS; i++)
+    free_font (&xr->fonts[i]);
+  free (xr->params);
+  free (xr);
+}
+
+static void
+xr_flush (struct output_driver *driver)
+{
+  struct xr_driver *xr = xr_driver_cast (driver);
+
+  cairo_surface_flush (cairo_get_target (xr->cairo));
+}
+
+static void
+xr_init_caption_cell (const char *caption, struct table_cell *cell)
+{
+  cell->contents = caption;
+  cell->options = TAB_LEFT;
+  cell->destructor = NULL;
+}
+
+static struct render_page *
+xr_render_table_item (struct xr_driver *xr, const struct table_item *item,
+                      int *caption_heightp)
+{
+  const char *caption = table_item_get_caption (item);
+
+  if (caption != NULL)
+    {
+      /* XXX doesn't do well with very large captions */
+      struct table_cell cell;
+      xr_init_caption_cell (caption, &cell);
+      *caption_heightp = xr_measure_cell_height (xr, &cell, xr->width);
+    }
+  else
+    *caption_heightp = 0;
+
+  return render_page_create (xr->params, table_item_get_table (item));
+}
+
+static void
+xr_submit (struct output_driver *driver, const struct output_item *output_item)
+{
+  struct xr_driver *xr = xr_driver_cast (driver);
+
+  xr_driver_output_item (xr, output_item);
+  while (xr_driver_need_new_page (xr))
+    {
+      cairo_restore (xr->cairo);
+      cairo_show_page (xr->cairo);
+      cairo_save (xr->cairo);
+      xr_driver_next_page (xr, xr->cairo);
+    }
+}
+\f
+/* Functions for rendering a series of output items to a series of Cairo
+   contexts, with pagination, possibly including headers.
+
+   Used by PSPPIRE for printing, and by the basic Cairo output driver above as
+   its underlying implementation.
+
+   See the big comment in cairo.h for intended usage. */
+
+/* Gives new page CAIRO to XR for output.  CAIRO may be null to skip actually
+   rendering the page (which might be useful to find out how many pages an
+   output document has without actually rendering it). */
+void
+xr_driver_next_page (struct xr_driver *xr, cairo_t *cairo)
+{
+  if (cairo != NULL)
+    cairo_translate (cairo,
+                     xr_to_pt (xr->left_margin),
+                     xr_to_pt (xr->top_margin));
+
+  xr->page_number++;
+  xr->cairo = cairo;
+  xr->y = 0;
+  draw_headers (xr);
+  xr_driver_run_fsm (xr);
+}
+
+/* Start rendering OUTPUT_ITEM to XR.  Only valid if XR is not in the middle of
+   rendering a previous output item, that is, only if xr_driver_need_new_page()
+   returns false. */
+void
+xr_driver_output_item (struct xr_driver *xr,
+                       const struct output_item *output_item)
+{
+  assert (xr->fsm == NULL);
+  xr->fsm = xr_render_output_item (xr, output_item);
+  xr_driver_run_fsm (xr);
+}
+
+/* Returns true if XR is in the middle of rendering an output item and needs a
+   new page to be appended using xr_driver_next_page() to make progress,
+   otherwise false. */
+bool
+xr_driver_need_new_page (const struct xr_driver *xr)
+{
+  return xr->fsm != NULL;
+}
+
+/* Returns true if the current page doesn't have any content yet (besides
+   headers, if enabled). */
+bool
+xr_driver_is_page_blank (const struct xr_driver *xr)
+{
+  return xr->y == 0;
+}
+
+static void
+xr_driver_destroy_fsm (struct xr_driver *xr)
+{
+  if (xr->fsm != NULL)
+    {
+      xr->fsm->destroy (xr->fsm);
+      xr->fsm = NULL;
+    }
+}
+
+static void
+xr_driver_run_fsm (struct xr_driver *xr)
+{
+  if (xr->fsm != NULL && !xr->fsm->render (xr->fsm, xr))
+    xr_driver_destroy_fsm (xr);
+}
+\f
+static void
+xr_layout_cell (struct xr_driver *, const struct table_cell *,
+                int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2],
+                PangoWrapMode, int *width, int *height);
+
+static void
+dump_line (struct xr_driver *xr, int x0, int y0, int x1, int y1)
+{
+  cairo_new_path (xr->cairo);
+  cairo_move_to (xr->cairo, xr_to_pt (x0), xr_to_pt (y0 + xr->y));
+  cairo_line_to (xr->cairo, xr_to_pt (x1), xr_to_pt (y1 + xr->y));
+  cairo_stroke (xr->cairo);
+}
+
+/* Draws a horizontal line X0...X2 at Y if LEFT says so,
+   shortening it to X0...X1 if SHORTEN is true.
+   Draws a horizontal line X1...X3 at Y if RIGHT says so,
+   shortening it to X2...X3 if SHORTEN is true. */
+static void
+horz_line (struct xr_driver *xr, int x0, int x1, int x2, int x3, int y,
+           enum render_line_style left, enum render_line_style right,
+           bool shorten)
+{
+  if (left != RENDER_LINE_NONE && right != RENDER_LINE_NONE && !shorten)
+    dump_line (xr, x0, y, x3, y);
+  else
+    {
+      if (left != RENDER_LINE_NONE)
+        dump_line (xr, x0, y, shorten ? x1 : x2, y);
+      if (right != RENDER_LINE_NONE)
+        dump_line (xr, shorten ? x2 : x1, y, x3, y);
+    }
+}
+
+/* Draws a vertical line Y0...Y2 at X if TOP says so,
+   shortening it to Y0...Y1 if SHORTEN is true.
+   Draws a vertical line Y1...Y3 at X if BOTTOM says so,
+   shortening it to Y2...Y3 if SHORTEN is true. */
+static void
+vert_line (struct xr_driver *xr, int y0, int y1, int y2, int y3, int x,
+           enum render_line_style top, enum render_line_style bottom,
+           bool shorten)
+{
+  if (top != RENDER_LINE_NONE && bottom != RENDER_LINE_NONE && !shorten)
+    dump_line (xr, x, y0, x, y3);
+  else
+    {
+      if (top != RENDER_LINE_NONE)
+        dump_line (xr, x, y0, x, shorten ? y1 : y2);
+      if (bottom != RENDER_LINE_NONE)
+        dump_line (xr, x, shorten ? y2 : y1, x, y3);
+    }
+}
+
+static void
+xr_draw_line (void *xr_, int bb[TABLE_N_AXES][2],
+              enum render_line_style styles[TABLE_N_AXES][2])
+{
+  const int x0 = bb[H][0];
+  const int y0 = bb[V][0];
+  const int x3 = bb[H][1];
+  const int y3 = bb[V][1];
+  const int top = styles[H][0];
+  const int left = styles[V][0];
+  const int bottom = styles[H][1];
+  const int right = styles[V][1];
+
+  /* The algorithm here is somewhat subtle, to allow it to handle
+     all the kinds of intersections that we need.
+
+     Three additional ordinates are assigned along the x axis.  The
+     first is xc, midway between x0 and x3.  The others are x1 and
+     x2; for a single vertical line these are equal to xc, and for
+     a double vertical line they are the ordinates of the left and
+     right half of the double line.
+
+     yc, y1, and y2 are assigned similarly along the y axis.
+
+     The following diagram shows the coordinate system and output
+     for double top and bottom lines, single left line, and no
+     right line:
+
+                 x0       x1 xc  x2      x3
+               y0 ________________________
+                  |        #     #       |
+                  |        #     #       |
+                  |        #     #       |
+                  |        #     #       |
+                  |        #     #       |
+     y1 = y2 = yc |#########     #       |
+                  |        #     #       |
+                  |        #     #       |
+                  |        #     #       |
+                  |        #     #       |
+               y3 |________#_____#_______|
+  */
+  struct xr_driver *xr = xr_;
+
+  /* Offset from center of each line in a pair of double lines. */
+  int double_line_ofs = (xr->line_space + xr->line_width) / 2;
+
+  /* Are the lines along each axis single or double?
+     (It doesn't make sense to have different kinds of line on the
+     same axis, so we don't try to gracefully handle that case.) */
+  bool double_vert = top == RENDER_LINE_DOUBLE || bottom == RENDER_LINE_DOUBLE;
+  bool double_horz = left == RENDER_LINE_DOUBLE || right == RENDER_LINE_DOUBLE;
+
+  /* When horizontal lines are doubled,
+     the left-side line along y1 normally runs from x0 to x2,
+     and the right-side line along y1 from x3 to x1.
+     If the top-side line is also doubled, we shorten the y1 lines,
+     so that the left-side line runs only to x1,
+     and the right-side line only to x2.
+     Otherwise, the horizontal line at y = y1 below would cut off
+     the intersection, which looks ugly:
+               x0       x1     x2      x3
+             y0 ________________________
+                |        #     #       |
+                |        #     #       |
+                |        #     #       |
+                |        #     #       |
+             y1 |#########     ########|
+                |                      |
+                |                      |
+             y2 |######################|
+                |                      |
+                |                      |
+             y3 |______________________|
+     It is more of a judgment call when the horizontal line is
+     single.  We actually choose to cut off the line anyhow, as
+     shown in the first diagram above.
+  */
+  bool shorten_y1_lines = top == RENDER_LINE_DOUBLE;
+  bool shorten_y2_lines = bottom == RENDER_LINE_DOUBLE;
+  bool shorten_yc_line = shorten_y1_lines && shorten_y2_lines;
+  int horz_line_ofs = double_vert ? double_line_ofs : 0;
+  int xc = (x0 + x3) / 2;
+  int x1 = xc - horz_line_ofs;
+  int x2 = xc + horz_line_ofs;
+
+  bool shorten_x1_lines = left == RENDER_LINE_DOUBLE;
+  bool shorten_x2_lines = right == RENDER_LINE_DOUBLE;
+  bool shorten_xc_line = shorten_x1_lines && shorten_x2_lines;
+  int vert_line_ofs = double_horz ? double_line_ofs : 0;
+  int yc = (y0 + y3) / 2;
+  int y1 = yc - vert_line_ofs;
+  int y2 = yc + vert_line_ofs;
+
+  if (!double_horz)
+    horz_line (xr, x0, x1, x2, x3, yc, left, right, shorten_yc_line);
+  else
+    {
+      horz_line (xr, x0, x1, x2, x3, y1, left, right, shorten_y1_lines);
+      horz_line (xr, x0, x1, x2, x3, y2, left, right, shorten_y2_lines);
+    }
+
+  if (!double_vert)
+    vert_line (xr, y0, y1, y2, y3, xc, top, bottom, shorten_xc_line);
+  else
+    {
+      vert_line (xr, y0, y1, y2, y3, x1, top, bottom, shorten_x1_lines);
+      vert_line (xr, y0, y1, y2, y3, x2, top, bottom, shorten_x2_lines);
+    }
+}
+
+static void
+xr_measure_cell_width (void *xr_, const struct table_cell *cell,
+                       int *min_width, int *max_width)
+{
+  struct xr_driver *xr = xr_;
+  int bb[TABLE_N_AXES][2];
+  int clip[TABLE_N_AXES][2];
+  int h;
+
+  bb[H][0] = 0;
+  bb[H][1] = INT_MAX;
+  bb[V][0] = 0;
+  bb[V][1] = INT_MAX;
+  clip[H][0] = clip[H][1] = clip[V][0] = clip[V][1] = 0;
+  xr_layout_cell (xr, cell, bb, clip, PANGO_WRAP_WORD, max_width, &h);
+
+  bb[H][1] = 1;
+  xr_layout_cell (xr, cell, bb, clip, PANGO_WRAP_WORD, min_width, &h);
+}
+
+static int
+xr_measure_cell_height (void *xr_, const struct table_cell *cell, int width)
+{
+  struct xr_driver *xr = xr_;
+  int bb[TABLE_N_AXES][2];
+  int clip[TABLE_N_AXES][2];
+  int w, h;
+
+  bb[H][0] = 0;
+  bb[H][1] = width;
+  bb[V][0] = 0;
+  bb[V][1] = INT_MAX;
+  clip[H][0] = clip[H][1] = clip[V][0] = clip[V][1] = 0;
+  xr_layout_cell (xr, cell, bb, clip, PANGO_WRAP_WORD, &w, &h);
+  return h;
+}
+
+static void
+xr_draw_cell (void *xr_, const struct table_cell *cell,
+              int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2])
+{
+  struct xr_driver *xr = xr_;
+  int w, h;
+
+  xr_layout_cell (xr, cell, bb, clip, PANGO_WRAP_WORD, &w, &h);
+}
+\f
+/* Writes STRING at location (X,Y) trimmed to the given MAX_WIDTH
+   and with the given cell OPTIONS for XR. */
+static int
+draw_text (struct xr_driver *xr, const char *string, int x, int y,
+           int max_width, unsigned int options)
+{
+  struct table_cell cell;
+  int bb[TABLE_N_AXES][2];
+  int w, h;
+
+  cell.contents = string;
+  cell.options = options;
+  bb[H][0] = x;
+  bb[V][0] = y - xr->y;
+  bb[H][1] = x + max_width;
+  bb[V][1] = xr->font_height - xr->y;
+  xr_layout_cell (xr, &cell, bb, bb, PANGO_WRAP_WORD_CHAR, &w, &h);
+  return w;
+}
+
+/* Writes LEFT left-justified and RIGHT right-justified within
+   (X0...X1) at Y.  LEFT or RIGHT or both may be null. */
+static void
+draw_header_line (struct xr_driver *xr, const char *left, const char *right,
+                  int x0, int x1, int y)
+{
+  int right_width = 0;
+  if (right != NULL)
+    right_width = (draw_text (xr, right, x0, y, x1 - x0, TAB_RIGHT)
+                   + xr->font_height / 2);
+  if (left != NULL)
+    draw_text (xr, left, x0, y, x1 - x0 - right_width, TAB_LEFT);
+}
+
+/* Draw top of page headers for XR. */
+static void
+draw_headers (struct xr_driver *xr)
+{
+  char *r1, *r2;
+  int x0, x1;
+  int y;
+
+  if (!xr->headers || xr->cairo == NULL)
+    return;
+
+  y = -3 * xr->font_height;
+  x0 = xr->font_height / 2;
+  x1 = xr->width - xr->font_height / 2;
+
+  /* Draw box. */
+  cairo_rectangle (xr->cairo, 0, xr_to_pt (y), xr_to_pt (xr->width),
+                   xr_to_pt (2 * (xr->font_height
+                                  + xr->line_width + xr->line_gutter)));
+  cairo_save (xr->cairo);
+  cairo_set_source_rgb (xr->cairo, 0.9, 0.9, 0.9);
+  cairo_fill_preserve (xr->cairo);
+  cairo_restore (xr->cairo);
+  cairo_stroke (xr->cairo);
+
+  y += xr->line_width + xr->line_gutter;
+
+  r1 = xasprintf (_("%s - Page %d"), get_start_date (), xr->page_number);
+  r2 = xasprintf ("%s - %s", version, host_system);
+
+  draw_header_line (xr, xr->title, r1, x0, x1, y);
+  y += xr->font_height;
+
+  draw_header_line (xr, xr->subtitle, r2, x0, x1, y);
+
+  free (r1);
+  free (r2);
+}
+\f
+static void
+xr_layout_cell (struct xr_driver *xr, const struct table_cell *cell,
+                int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2],
+                PangoWrapMode wrap, int *width, int *height)
+{
+  struct xr_font *font;
+
+  font = (cell->options & TAB_FIX ? &xr->fonts[XR_FONT_FIXED]
+          : cell->options & TAB_EMPH ? &xr->fonts[XR_FONT_EMPHASIS]
+          : &xr->fonts[XR_FONT_PROPORTIONAL]);
+
+  pango_layout_set_text (font->layout, cell->contents, -1);
+
+  pango_layout_set_alignment (
+    font->layout,
+    ((cell->options & TAB_ALIGNMENT) == TAB_RIGHT ? PANGO_ALIGN_RIGHT
+     : (cell->options & TAB_ALIGNMENT) == TAB_LEFT ? PANGO_ALIGN_LEFT
+     : PANGO_ALIGN_CENTER));
+  pango_layout_set_width (font->layout,
+                          bb[H][1] == INT_MAX ? -1 : bb[H][1] - bb[H][0]);
+  pango_layout_set_wrap (font->layout, wrap);
+
+  if (clip[H][0] != clip[H][1])
+    {
+      cairo_save (xr->cairo);
+
+      if (clip[H][1] != INT_MAX || clip[V][1] != INT_MAX)
+        {
+          double x0 = xr_to_pt (clip[H][0]);
+          double y0 = xr_to_pt (clip[V][0] + xr->y);
+          double x1 = xr_to_pt (clip[H][1]);
+          double y1 = xr_to_pt (clip[V][1] + xr->y);
+
+          cairo_rectangle (xr->cairo, x0, y0, x1 - x0, y1 - y0);
+          cairo_clip (xr->cairo);
+        }
+
+      cairo_translate (xr->cairo,
+                       xr_to_pt (bb[H][0]),
+                       xr_to_pt (bb[V][0] + xr->y));
+      pango_cairo_show_layout (xr->cairo, font->layout);
+      cairo_restore (xr->cairo);
+    }
+
+  if (width != NULL || height != NULL)
+    {
+      int w, h;
+
+      pango_layout_get_size (font->layout, &w, &h);
+      if (width != NULL)
+        *width = w;
+      if (height != NULL)
+        *height = h;
+    }
+}
+\f
+/* Attempts to load FONT, initializing its other members based on
+   its 'string' member and the information in DRIVER.  Returns true
+   if successful, otherwise false. */
+static bool
+load_font (struct xr_driver *xr, struct xr_font *font)
+{
+  PangoContext *context;
+  PangoLanguage *language;
+
+  font->desc = pango_font_description_from_string (font->string);
+  if (font->desc == NULL)
+    {
+      error (0, 0, _("\"%s\": bad font specification"), font->string);
+      return false;
+    }
+  pango_font_description_set_absolute_size (font->desc, xr->font_height);
+
+  font->layout = pango_cairo_create_layout (xr->cairo);
+  pango_layout_set_font_description (font->layout, font->desc);
+
+  language = pango_language_get_default ();
+  context = pango_layout_get_context (font->layout);
+  font->metrics = pango_context_get_metrics (context, font->desc, language);
+
+  return true;
+}
+
+/* Frees FONT. */
+static void
+free_font (struct xr_font *font)
+{
+  free (font->string);
+  if (font->desc != NULL)
+    pango_font_description_free (font->desc);
+  pango_font_metrics_unref (font->metrics);
+  if (font->layout != NULL)
+    g_object_unref (font->layout);
+}
+
+struct output_driver_factory pdf_driver_factory = { "pdf", xr_pdf_create };
+struct output_driver_factory ps_driver_factory = { "ps", xr_ps_create };
+struct output_driver_factory svg_driver_factory = { "svg", xr_svg_create };
+
+static const struct output_driver_class cairo_driver_class =
+{
+  "cairo",
+  xr_destroy,
+  xr_submit,
+  xr_flush,
+};
+\f
+/* GUI rendering helpers. */
+
+struct xr_rendering
+  {
+    /* Table items. */
+    struct render_page *page;
+    struct xr_driver *xr;
+    int title_height;
+
+    /* Chart items. */
+    struct chart_item *chart;
+  };
+
+#define CHART_WIDTH 500
+#define CHART_HEIGHT 375
+
+struct xr_driver *
+xr_driver_create (cairo_t *cairo, struct string_map *options)
+{
+  struct xr_driver *xr = xr_allocate ("cairo", 0, options);
+  if (!xr_set_cairo (xr, cairo))
+    {
+      output_driver_destroy (&xr->driver);
+      return NULL;
+    }
+  return xr;
+}
+
+/* Destroy XR, which should have been created with xr_driver_create().  Any
+   cairo_t added to XR is not destroyed, because it is owned by the client. */
+void
+xr_driver_destroy (struct xr_driver *xr)
+{
+  if (xr != NULL)
+    {
+      xr->cairo = NULL;
+      output_driver_destroy (&xr->driver);
+    }
+}
+
+static struct xr_rendering *
+xr_rendering_create_text (struct xr_driver *xr, const char *text, cairo_t *cr)
+{
+  struct table_item *table_item;
+  struct xr_rendering *r;
+
+  table_item = table_item_create (table_from_string (0, text), NULL);
+  r = xr_rendering_create (xr, &table_item->output_item, cr);
+  table_item_unref (table_item);
+
+  return r;
+}
+
+struct xr_rendering *
+xr_rendering_create (struct xr_driver *xr, const struct output_item *item,
+                     cairo_t *cr)
+{
+  struct xr_rendering *r = NULL;
+
+  if (is_text_item (item))
+    r = xr_rendering_create_text (xr, text_item_get_text (to_text_item (item)),
+                                  cr);
+  else if (is_message_item (item))
+    {
+      const struct message_item *message_item = to_message_item (item);
+      const struct msg *msg = message_item_get_msg (message_item);
+      char *s = msg_to_string (msg, NULL);
+      r = xr_rendering_create_text (xr, s, cr);
+      free (s);
+    }
+  else if (is_table_item (item))
+    {
+      r = xzalloc (sizeof *r);
+      r->xr = xr;
+      xr_set_cairo (xr, cr);
+      r->page = xr_render_table_item (xr, to_table_item (item),
+                                      &r->title_height);
+    }
+  else if (is_chart_item (item))
+    {
+      r = xzalloc (sizeof *r);
+      r->chart = to_chart_item (output_item_ref (item));
+    }
+
+  return r;
+}
+
+void
+xr_rendering_measure (struct xr_rendering *r, int *w, int *h)
+{
+  if (r->chart == NULL)
+    {
+      *w = render_page_get_size (r->page, H) / 1024;
+      *h = (render_page_get_size (r->page, V) + r->title_height) / 1024;
+    }
+  else
+    {
+      *w = CHART_WIDTH;
+      *h = CHART_HEIGHT;
+    }
+}
+
+void
+xr_rendering_draw (struct xr_rendering *r, cairo_t *cr)
+{
+  if (r->chart == NULL)
+    {
+      struct xr_driver *xr = r->xr;
+
+      xr_set_cairo (xr, cr);
+      xr->y = 0;
+      render_page_draw (r->page);
+    }
+  else
+    xr_draw_chart (r->chart, cr, 0, 0, CHART_WIDTH, CHART_HEIGHT);
+}
+
+void
+xr_draw_chart (const struct chart_item *chart_item, cairo_t *cr,
+               double x, double y, double width, double height)
+{
+  struct xrchart_geometry geom;
+
+  cairo_save (cr);
+  cairo_translate (cr, x, y + height);
+  cairo_scale (cr, 1.0, -1.0);
+  xrchart_geometry_init (cr, &geom, width, height);
+  if (is_boxplot (chart_item))
+    xrchart_draw_boxplot (chart_item, cr, &geom);
+  else if (is_histogram_chart (chart_item))
+    xrchart_draw_histogram (chart_item, cr, &geom);
+  else if (is_np_plot_chart (chart_item))
+    xrchart_draw_np_plot (chart_item, cr, &geom);
+  else if (is_piechart (chart_item))
+    xrchart_draw_piechart (chart_item, cr, &geom);
+  else if (is_roc_chart (chart_item))
+    xrchart_draw_roc (chart_item, cr, &geom);
+  else if (is_scree (chart_item))
+    xrchart_draw_scree (chart_item, cr, &geom);
+  else
+    NOT_REACHED ();
+  xrchart_geometry_free (cr, &geom);
+
+  cairo_restore (cr);
+}
+
+char *
+xr_draw_png_chart (const struct chart_item *item,
+                   const char *file_name_template, int number)
+{
+  const int width = 640;
+  const int length = 480;
+
+  cairo_surface_t *surface;
+  cairo_status_t status;
+  const char *number_pos;
+  char *file_name;
+  cairo_t *cr;
+
+  number_pos = strchr (file_name_template, '#');
+  if (number_pos != NULL)
+    file_name = xasprintf ("%.*s%d%s", (int) (number_pos - file_name_template),
+                           file_name_template, number, number_pos + 1);
+  else
+    file_name = xstrdup (file_name_template);
+
+  surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, length);
+  cr = cairo_create (surface);
+
+  cairo_save (cr);
+  cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
+  cairo_rectangle (cr, 0, 0, width, length);
+  cairo_fill (cr);
+  cairo_restore (cr);
+
+  cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+
+  xr_draw_chart (item, cr, 0.0, 0.0, width, length);
+
+  status = cairo_surface_write_to_png (surface, file_name);
+  if (status != CAIRO_STATUS_SUCCESS)
+    error (0, 0, _("error writing output file \"%s\": %s"),
+           file_name, cairo_status_to_string (status));
+
+  cairo_destroy (cr);
+  cairo_surface_destroy (surface);
+
+  return file_name;
+}
+\f
+struct xr_table_state
+  {
+    struct xr_render_fsm fsm;
+    struct table_item *table_item;
+    struct render_break x_break;
+    struct render_break y_break;
+    int caption_height;
+  };
+
+static bool
+xr_table_render (struct xr_render_fsm *fsm, struct xr_driver *xr)
+{
+  struct xr_table_state *ts = UP_CAST (fsm, struct xr_table_state, fsm);
+
+  for (;;)
+    {
+      struct render_page *y_slice;
+      int space;
+
+      while (!render_break_has_next (&ts->y_break))
+        {
+          struct render_page *x_slice;
+
+          render_break_destroy (&ts->y_break);
+          if (!render_break_has_next (&ts->x_break))
+            return false;
+
+          x_slice = render_break_next (&ts->x_break, xr->width);
+          render_break_init (&ts->y_break, x_slice, V);
+        }
+
+      space = xr->length - xr->y;
+      if (render_break_next_size (&ts->y_break) > space)
+        {
+          assert (xr->y > 0);
+          return true;
+        }
+
+      y_slice = render_break_next (&ts->y_break, space);
+      if (ts->caption_height)
+        {
+          if (xr->cairo)
+            {
+              struct table_cell cell;
+              int bb[TABLE_N_AXES][2];
+
+              xr_init_caption_cell (table_item_get_caption (ts->table_item),
+                                    &cell);
+              bb[H][0] = 0;
+              bb[H][1] = xr->width;
+              bb[V][0] = 0;
+              bb[V][1] = ts->caption_height;
+              xr_draw_cell (xr, &cell, bb, bb);
+            }
+          xr->y += ts->caption_height;
+          ts->caption_height = 0;
+        }
+
+      if (xr->cairo)
+        render_page_draw (y_slice);
+      xr->y += render_page_get_size (y_slice, V);
+      render_page_unref (y_slice);
+    }
+}
+
+static void
+xr_table_destroy (struct xr_render_fsm *fsm)
+{
+  struct xr_table_state *ts = UP_CAST (fsm, struct xr_table_state, fsm);
+
+  table_item_unref (ts->table_item);
+  render_break_destroy (&ts->x_break);
+  render_break_destroy (&ts->y_break);
+  free (ts);
+}
+
+static struct xr_render_fsm *
+xr_render_table (struct xr_driver *xr, const struct table_item *table_item)
+{
+  struct xr_table_state *ts;
+  struct render_page *page;
+
+  ts = xmalloc (sizeof *ts);
+  ts->fsm.render = xr_table_render;
+  ts->fsm.destroy = xr_table_destroy;
+  ts->table_item = table_item_ref (table_item);
+
+  if (xr->y > 0)
+    xr->y += xr->font_height;
+
+  page = xr_render_table_item (xr, table_item, &ts->caption_height);
+  xr->params->size[V] = xr->length - ts->caption_height;
+
+  render_break_init (&ts->x_break, page, H);
+  render_break_init_empty (&ts->y_break);
+
+  return &ts->fsm;
+}
+\f
+struct xr_chart_state
+  {
+    struct xr_render_fsm fsm;
+    struct chart_item *chart_item;
+  };
+
+static bool
+xr_chart_render (struct xr_render_fsm *fsm, struct xr_driver *xr)
+{
+  struct xr_chart_state *cs = UP_CAST (fsm, struct xr_chart_state, fsm);
+
+  if (xr->y > 0)
+    return true;
+
+  if (xr->cairo != NULL)
+    xr_draw_chart (cs->chart_item, xr->cairo, 0.0, 0.0,
+                   xr_to_pt (xr->width), xr_to_pt (xr->length));
+  xr->y = xr->length;
+
+  return false;
+}
+
+static void
+xr_chart_destroy (struct xr_render_fsm *fsm)
+{
+  struct xr_chart_state *cs = UP_CAST (fsm, struct xr_chart_state, fsm);
+
+  chart_item_unref (cs->chart_item);
+  free (cs);
+}
+
+static struct xr_render_fsm *
+xr_render_chart (const struct chart_item *chart_item)
+{
+  struct xr_chart_state *cs;
+
+  cs = xmalloc (sizeof *cs);
+  cs->fsm.render = xr_chart_render;
+  cs->fsm.destroy = xr_chart_destroy;
+  cs->chart_item = chart_item_ref (chart_item);
+
+  return &cs->fsm;
+}
+\f
+static bool
+xr_eject_render (struct xr_render_fsm *fsm UNUSED, struct xr_driver *xr)
+{
+  return xr->y > 0;
+}
+
+static void
+xr_eject_destroy (struct xr_render_fsm *fsm UNUSED)
+{
+  /* Nothing to do. */
+}
+
+static struct xr_render_fsm *
+xr_render_eject (void)
+{
+  static struct xr_render_fsm eject_renderer =
+    {
+      xr_eject_render,
+      xr_eject_destroy
+    };
+
+  return &eject_renderer;
+}
+\f
+static struct xr_render_fsm *
+xr_create_text_renderer (struct xr_driver *xr, const char *text)
+{
+  struct table_item *table_item;
+  struct xr_render_fsm *fsm;
+
+  table_item = table_item_create (table_from_string (TAB_LEFT, text), NULL);
+  fsm = xr_render_table (xr, table_item);
+  table_item_unref (table_item);
+
+  return fsm;
+}
+
+static struct xr_render_fsm *
+xr_render_text (struct xr_driver *xr, const struct text_item *text_item)
+{
+  enum text_item_type type = text_item_get_type (text_item);
+  const char *text = text_item_get_text (text_item);
+
+  switch (type)
+    {
+    case TEXT_ITEM_TITLE:
+      free (xr->title);
+      xr->title = xstrdup (text);
+      draw_headers (xr);
+      break;
+
+    case TEXT_ITEM_SUBTITLE:
+      free (xr->subtitle);
+      xr->subtitle = xstrdup (text);
+      draw_headers (xr);
+      break;
+
+    case TEXT_ITEM_COMMAND_CLOSE:
+      break;
+
+    case TEXT_ITEM_BLANK_LINE:
+      if (xr->y > 0)
+        xr->y += xr->font_height;
+      break;
+
+    case TEXT_ITEM_EJECT_PAGE:
+      if (xr->y > 0)
+        return xr_render_eject ();
+      break;
+
+    default:
+      return xr_create_text_renderer (xr, text);
+    }
+
+  return NULL;
+}
+
+static struct xr_render_fsm *
+xr_render_message (struct xr_driver *xr,
+                   const struct message_item *message_item)
+{
+  const struct msg *msg = message_item_get_msg (message_item);
+  struct xr_render_fsm *fsm;
+  char *s;
+
+  s = msg_to_string (msg, xr->command_name);
+  fsm = xr_create_text_renderer (xr, s);
+  free (s);
+
+  return fsm;
+}
+
+static struct xr_render_fsm *
+xr_render_output_item (struct xr_driver *xr,
+                       const struct output_item *output_item)
+{
+  if (is_table_item (output_item))
+    return xr_render_table (xr, to_table_item (output_item));
+  else if (is_chart_item (output_item))
+    return xr_render_chart (to_chart_item (output_item));
+  else if (is_text_item (output_item))
+    return xr_render_text (xr, to_text_item (output_item));
+  else if (is_message_item (output_item))
+    return xr_render_message (xr, to_message_item (output_item));
+  else
+    return NULL;
+}
diff --git a/src/output/cairo.h b/src/output/cairo.h
new file mode 100644 (file)
index 0000000..77889d1
--- /dev/null
@@ -0,0 +1,89 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_CAIRO_H
+#define OUTPUT_CAIRO_H 1
+
+#include <stdbool.h>
+
+#ifdef HAVE_CAIRO
+
+#include <cairo/cairo.h>
+
+struct chart_item;
+struct output_item;
+struct string_map;
+
+/* Creating and destroying Cairo output drivers. */
+struct xr_driver *xr_driver_create (cairo_t *, struct string_map *options);
+void xr_driver_destroy (struct xr_driver *);
+
+/* Functions for rendering a single output item to a Cairo context.
+   Output items are never broken across multiple pages.
+   Used by PSPPIRE to render in the GUI. */
+struct xr_rendering *xr_rendering_create (struct xr_driver *,
+                                          const struct output_item *,
+                                          cairo_t *);
+void xr_rendering_measure (struct xr_rendering *, int *w, int *h);
+void xr_rendering_draw (struct xr_rendering *, cairo_t *);
+
+/* Functions for rendering a series of output items to a series of Cairo
+   contexts, with pagination, possibly including headers.
+
+   The intended usage pattern is this:
+
+     * Create an xr_driver with xr_driver_create().  The cairo_t passed in must
+       accurately reflect the properties of the output (e.g. for the purpose of
+       page size and font selection) but need not be used for rendering.
+
+     * Call xr_driver_next_page() to set up the first real output page's
+       cairo_t.  (You can skip this step if the cairo_t passed to
+       xr_driver_create() can be used.)
+
+     * Then, for each output_item:
+
+       - Pass the output item to xr_driver_output_item().  As much output as
+         fits will be rendered on the current page.
+
+       - Then, as long as xr_driver_need_new_page() returns true, obtain a new
+         page for rendering and pass it to xr_driver_next_page().  As much
+         output as fits on the new page will be rendered on it.
+
+     * When you're done, destroy the output driver with xr_driver_destroy().
+
+   These functions may also be used for counting pages without actually
+   rendering output.  Follow the same steps, except pass NULL as the cairo_t to
+   xr_driver_next_page().  (But xr_driver_create() still needs a valid cairo_t
+   for page setup.)
+
+   (If the cairo_t that you pass to xr_driver_create() won't remain valid, be
+   sure to clear it out one way or another before calling xr_driver_destroy(),
+   so that xr_driver_destroy() won't destroy it itself.)
+*/
+void xr_driver_next_page (struct xr_driver *, cairo_t *);
+void xr_driver_output_item (struct xr_driver *, const struct output_item *);
+bool xr_driver_need_new_page (const struct xr_driver *);
+bool xr_driver_is_page_blank (const struct xr_driver *);
+
+/* Render charts with Cairo. */
+void xr_draw_chart (const struct chart_item *, cairo_t *,
+                    double x, double y, double width, double height);
+char *xr_draw_png_chart (const struct chart_item *,
+                         const char *file_name_template, int number);
+
+#endif  /* HAVE_CAIRO */
+
+#endif /* output/cairo.h */
diff --git a/src/output/chart-item-provider.h b/src/output/chart-item-provider.h
new file mode 100644 (file)
index 0000000..4f13fcf
--- /dev/null
@@ -0,0 +1,31 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_CHART_ITEM_PROVIDER_H
+#define OUTPUT_CHART_ITEM_PROVIDER_H 1
+
+#include <output/chart-item.h>
+#include <output/output-item.h>
+
+struct chart_item_class
+  {
+    void (*destroy) (struct chart_item *);
+  };
+
+void chart_item_init (struct chart_item *, const struct chart_item_class *,
+                      const char *title);
+
+#endif /* output/chart-provider.h */
diff --git a/src/output/chart-item.c b/src/output/chart-item.c
new file mode 100644 (file)
index 0000000..227994d
--- /dev/null
@@ -0,0 +1,88 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/chart-item.h>
+#include <output/chart-item-provider.h>
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include <libpspp/cast.h>
+#include <libpspp/compiler.h>
+#include <output/driver.h>
+#include <output/output-item-provider.h>
+
+#include "gl/xalloc.h"
+
+/* Initializes ITEM as a chart item of the specified CLASS.  The new chart item
+   initially has the specified TITLE, which may be NULL if no title is yet
+   available.  The caller retains ownership of TITLE.
+
+   A chart item is an abstract class, that is, a plain chart_item is not useful
+   on its own.  Thus, this function is normally called from the initialization
+   function of some subclass of chart_item. */
+void
+chart_item_init (struct chart_item *item, const struct chart_item_class *class,
+                 const char *title)
+{
+  output_item_init (&item->output_item, &chart_item_class);
+  item->class = class;
+  item->title = title != NULL ? xstrdup (title) : NULL;
+}
+
+/* Returns ITEM's title, which is a null pointer if no title has been set. */
+const char *
+chart_item_get_title (const struct chart_item *item)
+{
+  return item->title;
+}
+
+/* Sets ITEM's title to TITLE, replacing any previous title.  Specify NULL for
+   TITLE to clear any title from ITEM.  The caller retains ownership of
+   TITLE.
+
+   This function may only be used on a chart_item that is unshared. */
+void
+chart_item_set_title (struct chart_item *item, const char *title)
+{
+  assert (!chart_item_is_shared (item));
+  free (item->title);
+  item->title = title != NULL ? xstrdup (title) : NULL;
+}
+
+/* Submits ITEM to the configured output drivers, and transfers ownership to
+   the output subsystem. */
+void
+chart_item_submit (struct chart_item *item)
+{
+  output_submit (&item->output_item);
+}
+\f
+static void
+chart_item_destroy (struct output_item *output_item)
+{
+  struct chart_item *item = to_chart_item (output_item);
+  char *title = item->title;
+  item->class->destroy (item);
+  free (title);
+}
+
+const struct output_item_class chart_item_class =
+  {
+    chart_item_destroy,
+  };
diff --git a/src/output/chart-item.h b/src/output/chart-item.h
new file mode 100644 (file)
index 0000000..c005a46
--- /dev/null
@@ -0,0 +1,100 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_CHART_ITEM_H
+#define OUTPUT_CHART_ITEM_H 1
+
+/* Chart items.
+
+   A chart item is a subclass of an output item (see output/output-item.h).
+
+   A chart item is abstract.  Every actual chart is a subclass of
+   chart_item. */
+
+#include <stdbool.h>
+#include <output/output-item.h>
+
+/* A chart item.
+
+   The members of struct chart_item should not be accessed directly.  Use one
+   of the accessor functions defined below. */
+struct chart_item
+  {
+    struct output_item output_item; /* Superclass */
+    const struct chart_item_class *class; /* Subclass. */
+    char *title;                /* May be null if there is no title. */
+  };
+
+const char *chart_item_get_title (const struct chart_item *);
+void chart_item_set_title (struct chart_item *, const char *);
+\f
+/* This boilerplate for chart_item, a subclass of output_item, was
+   autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct output_item_class chart_item_class;
+
+/* Returns true if SUPER is a chart_item, otherwise false. */
+static inline bool
+is_chart_item (const struct output_item *super)
+{
+  return super->class == &chart_item_class;
+}
+
+/* Returns SUPER converted to chart_item.  SUPER must be a chart_item, as
+   reported by is_chart_item. */
+static inline struct chart_item *
+to_chart_item (const struct output_item *super)
+{
+  assert (is_chart_item (super));
+  return UP_CAST (super, struct chart_item, output_item);
+}
+
+/* Returns INSTANCE converted to output_item. */
+static inline struct output_item *
+chart_item_super (const struct chart_item *instance)
+{
+  return CONST_CAST (struct output_item *, &instance->output_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct chart_item *
+chart_item_ref (const struct chart_item *instance)
+{
+  return to_chart_item (output_item_ref (&instance->output_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+chart_item_unref (struct chart_item *instance)
+{
+  output_item_unref (&instance->output_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+chart_item_is_shared (const struct chart_item *instance)
+{
+  return output_item_is_shared (&instance->output_item);
+}
+
+void chart_item_submit (struct chart_item *);
+\f
+#endif /* output/chart-item.h */
diff --git a/src/output/chart.c b/src/output/chart.c
deleted file mode 100644 (file)
index e324901..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-#include <output/chart.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <float.h>
-#include <math.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <plot.h>
-
-#include <libpspp/str.h>
-#include <output/manager.h>
-#include <output/output.h>
-
-#include "error.h"
-#include "xalloc.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-
-extern struct som_table_class tab_table_class;
-
-struct chart *
-chart_create(void)
-{
-  struct chart *chart;
-  struct outp_driver *d;
-
-  d = outp_drivers (NULL);
-  if (d == NULL)
-    return NULL;
-
-  chart = xmalloc (sizeof *chart);
-  chart->lp = NULL;
-  d->class->initialise_chart(d, chart);
-  if (!chart->lp)
-    {
-      free (chart);
-      return NULL;
-    }
-
-  if (pl_openpl_r (chart->lp) < 0)      /* open Plotter */
-    return NULL;
-
-  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 */
-  pl_pencolorname_r (chart->lp, "black");
-
-  pl_erase_r (chart->lp);               /* erase graphics display */
-  pl_filltype_r(chart->lp,0);
-
-  pl_savestate_r(chart->lp);
-
-  /* Set default chartetry */
-  chart->data_top =   900;
-  chart->data_right = 800;
-  chart->data_bottom = 120;
-  chart->data_left = 150;
-  chart->abscissa_top = 70;
-  chart->ordinate_right = 120;
-  chart->title_bottom = 920;
-  chart->legend_left = 810;
-  chart->legend_right = 1000;
-  chart->font_size = 0;
-  chart->in_path = false;
-  chart->dataset = NULL;
-  chart->n_datasets = 0;
-  strcpy(chart->fill_colour,"red");
-
-  /* Get default font size */
-  if ( !chart->font_size)
-    chart->font_size = pl_fontsize_r(chart->lp, -1);
-
-  /* Draw the data area */
-  pl_box_r(chart->lp,
-          chart->data_left, chart->data_bottom,
-          chart->data_right, chart->data_top);
-
-  return chart;
-}
-
-void
-chart_submit(struct chart *chart)
-{
-  int i;
-  struct som_entity s;
-  struct outp_driver *d;
-
-  if ( ! chart )
-     return ;
-
-  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);
-
-  d = outp_drivers (NULL);
-  d->class->finalise_chart(d, chart);
-
-  for (i = 0 ; i < chart->n_datasets; ++i)
-    free (chart->dataset[i]);
-  free (chart->dataset);
-
-  free(chart);
-}
-
-void
-chart_init_separate (struct chart *ch, const char *type,
-                     const char *file_name_tmpl, int number)
-{
-  FILE *fp;
-  int number_pos;
-
-  number_pos = strchr (file_name_tmpl, '#') - file_name_tmpl;
-  ch->file_name = xasprintf ("%.*s%d%s",
-                             number_pos, file_name_tmpl,
-                             number,
-                             file_name_tmpl + number_pos + 1);
-  fp = fopen (ch->file_name, "wb");
-  if (fp == NULL)
-    {
-      error (0, errno, _("creating \"%s\""), ch->file_name);
-      free (ch->file_name);
-      ch->file_name = NULL;
-      return;
-    }
-
-  ch->pl_params = pl_newplparams ();
-  ch->lp = pl_newpl_r (type, 0, fp, stderr, ch->pl_params);
-}
-
-void
-chart_finalise_separate (struct chart *ch)
-{
-  free (ch->file_name);
-}
diff --git a/src/output/chart.h b/src/output/chart.h
deleted file mode 100644 (file)
index 4da12ec..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdio.h>
-#include <float.h>
-#include <assert.h>
-#include <math.h>
-
-#include <math/chart-geometry.h>
-#include <libpspp/str.h>
-#include "manager.h"
-#include "output.h"
-
-#include "xalloc.h"
-
-#ifndef CHART_H
-#define CHART_H
-
-#ifndef NO_CHARTS
-#include <plot.h>
-#endif
-
-struct chart {
-
-#ifndef NO_CHARTS
-  plPlotter *lp ;
-  plPlotterParams *pl_params;
-#else
-  void *lp;
-#endif
-  char *file_name;
-  FILE *file;
-
-  /* The geometry of the chart
-     See diagram at the foot of this file.
-   */
-
-  int data_top   ;
-  int data_right ;
-  int data_bottom;
-  int data_left  ;
-
-  int abscissa_top;
-
-  int ordinate_right ;
-
-  int title_bottom ;
-
-  int legend_left ;
-  int legend_right ;
-  const char **dataset;
-  int n_datasets;
-
-
-  /* Default font size for the plot (if zero, then use plotter default) */
-  int font_size;
-
-  char fill_colour[10];
-
-  /* Stuff Particular to Cartesians (and Boxplots ) */
-  double ordinate_scale;
-  double abscissa_scale;
-  double x_min;
-  double x_max;
-  double y_min;
-  double y_max;
-  bool in_path;
-};
-
-
-
-struct chart * chart_create(void);
-void chart_submit(struct chart *ch);
-
-/* Helper functions for output drivers that put each chart into a
-   separate file. */
-void chart_init_separate (struct chart *, const char *type,
-                          const char *file_name_tmpl, int number);
-
-void chart_finalise_separate (struct chart *);
-
-#endif
diff --git a/src/output/charts/Makefile b/src/output/charts/Makefile
deleted file mode 100644 (file)
index c1a052e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-all:
-       $(MAKE) -C /home/res/jmd/PSPP/pspp 
diff --git a/src/output/charts/automake.mk b/src/output/charts/automake.mk
deleted file mode 100644 (file)
index ab0ff51..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-## Process this file with automake to produce Makefile.in  -*- makefile -*-
-
-noinst_LTLIBRARIES += src/output/charts/libcharts.la
-
-chart_sources = \
-       src/output/charts/barchart.c \
-       src/output/charts/barchart.h \
-       src/output/charts/box-whisker.c \
-       src/output/charts/box-whisker.h \
-       src/output/charts/cartesian.c \
-       src/output/charts/cartesian.h \
-       src/output/charts/piechart.c \
-       src/output/charts/piechart.h \
-       src/output/charts/plot-chart.h \
-       src/output/charts/plot-chart.c \
-       src/output/charts/plot-hist.c \
-       src/output/charts/plot-hist.h
-
-if WITHCHARTS
-src_output_charts_libcharts_la_SOURCES = \
-       $(chart_sources)
-
-EXTRA_DIST += src/output/charts/dummy-chart.c
-else
-src_output_charts_libcharts_la_SOURCES =  \
-       src/output/charts/dummy-chart.c
-
-EXTRA_DIST += $(chart_sources)
-
-AM_CPPFLAGS += -DNO_CHARTS
-
-endif
-
-EXTRA_DIST += src/output/charts/OChangeLog
diff --git a/src/output/charts/barchart.c b/src/output/charts/barchart.c
deleted file mode 100644 (file)
index f3b1001..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004, 2009 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-
-#include <config.h>
-
-#include <stdio.h>
-#include <plot.h>
-#include <stdarg.h>
-#include <math.h>
-#include <output/charts/barchart.h>
-#include <output/chart.h>
-#include <output/charts/plot-chart.h>
-
-#define CATAGORIES 6
-#define SUB_CATAGORIES 3
-
-static const    double x_min = 0;
-static const    double x_max = 15.0;
-
-static const char *cat_labels[] =
-  {
-    "Age",
-    "Intelligence",
-    "Wealth",
-    "Emotional",
-    "cat 5",
-    "cat 6",
-    "cat 7",
-    "cat 8",
-    "cat 9",
-    "cat 10",
-    "cat 11"
-  };
-
-
-
-
-/* Subcatagories */
-static const double data1[] =
-{
-  28,83,
-  34,
-  29,13,
-   9,4,
-   3,3,
-   2,0,
-   1,0,
-   0,
-   1,1
-};
-
-
-static const double data2[] =
-{
-  45,13,
-   9,4,
-   3,43,
-   2,0,
-   1,20,
-   0,0,
-  1,1,
-  0,0
-};
-
-static const double data3[] =
-  {
-    23,18,
-    0, 45,23, 9, 40, 24,4, 8
-  };
-
-
-static const char subcat_name[]="Gender";
-
-
-struct subcat {
-  const double *data;
-  const char *label;
-};
-
-static const struct subcat sub_catagory[SUB_CATAGORIES] =
-  {
-    {data1, "male"},
-    {data2, "female"},
-    {data3, "47xxy"}
-  };
-
-
-
-static const    double y_min = 0;
-static const    double y_max = 120.0;
-static const    double y_tick = 20.0;
-
-
-
-static void write_legend(struct chart *chart) ;
-
-
-void
-draw_barchart(struct chart *ch, const char *title,
-             const char *xlabel, const char *ylabel, enum bar_opts opt)
-{
-  double d;
-  int i;
-
-  double interval_size = fabs(ch->data_right - ch->data_left) / ( CATAGORIES );
-
-  double bar_width = interval_size / 1.1 ;
-
-  double ordinate_scale = fabs(ch->data_top -  ch->data_bottom) /
-    fabs(y_max - y_min) ;
-
-  if ( opt != BAR_STACKED )
-      bar_width /= SUB_CATAGORIES;
-
-  /* Move to data bottom-left */
-  pl_move_r(ch->lp, ch->data_left, ch->data_bottom);
-
-  pl_savestate_r(ch->lp);
-  pl_filltype_r(ch->lp,1);
-
-  /* Draw the data */
-  for (i = 0 ; i < CATAGORIES ; ++i )
-    {
-      int sc;
-      double ystart=0.0;
-      double x = i * interval_size;
-
-      pl_savestate_r(ch->lp);
-
-      draw_tick (ch, TICK_ABSCISSA, x + (interval_size/2 ), "%s",
-                cat_labels[i]);
-
-      for(sc = 0 ; sc < SUB_CATAGORIES ; ++sc )
-       {
-
-         pl_savestate_r(ch->lp);
-         pl_fillcolorname_r(ch->lp,data_colour[sc % N_CHART_COLOURS]);
-
-         switch ( opt )
-           {
-           case BAR_GROUPED:
-             pl_fboxrel_r(ch->lp,
-                          x + (sc * bar_width ), 0,
-                          x + (sc + 1) * bar_width,
-                            sub_catagory[sc].data[i] * ordinate_scale );
-             break;
-
-
-           case BAR_STACKED:
-
-             pl_fboxrel_r(ch->lp,
-                          x, ystart,
-                          x + bar_width,
-                          ystart + sub_catagory[sc].data[i] * ordinate_scale );
-
-             ystart +=    sub_catagory[sc].data[i] * ordinate_scale ;
-
-             break;
-
-           default:
-             break;
-           }
-         pl_restorestate_r(ch->lp);
-       }
-
-      pl_restorestate_r(ch->lp);
-    }
-  pl_restorestate_r(ch->lp);
-
-  for ( d = y_min; d <= y_max ; d += y_tick )
-    {
-
-      draw_tick (ch, TICK_ORDINATE,
-                (d - y_min ) * ordinate_scale, "%g", d);
-
-    }
-
-  /* Write the abscissa label */
-  pl_move_r(ch->lp,ch->data_left, ch->abscissa_top);
-  pl_alabel_r(ch->lp,0,'t',xlabel);
-
-
-  /* Write the ordinate label */
-  pl_savestate_r(ch->lp);
-  pl_move_r(ch->lp,ch->data_bottom, ch->ordinate_right);
-  pl_textangle_r(ch->lp,90);
-  pl_alabel_r(ch->lp,0,0,ylabel);
-  pl_restorestate_r(ch->lp);
-
-
-  chart_write_title(ch, "%s", title);
-
-  write_legend(ch);
-
-
-}
-
-
-
-
-
-static void
-write_legend(struct chart *chart)
-{
-  int sc;
-
-  pl_savestate_r(chart->lp);
-
-  pl_filltype_r(chart->lp,1);
-
-  pl_move_r(chart->lp, chart->legend_left,
-           chart->data_bottom + chart->font_size * SUB_CATAGORIES * 1.5);
-
-  pl_alabel_r(chart->lp,0,'b',subcat_name);
-
-  for (sc = 0 ; sc < SUB_CATAGORIES ; ++sc )
-    {
-      pl_fmove_r(chart->lp,
-                chart->legend_left,
-                chart->data_bottom + chart->font_size * sc  * 1.5);
-
-      pl_savestate_r(chart->lp);
-      pl_fillcolorname_r(chart->lp,data_colour[sc]);
-      pl_fboxrel_r (chart->lp,
-                   0,0,
-                   chart->font_size, chart->font_size);
-      pl_restorestate_r(chart->lp);
-
-      pl_fmove_r(chart->lp,
-                chart->legend_left + chart->font_size * 1.5,
-                chart->data_bottom + chart->font_size * sc  * 1.5);
-
-      pl_alabel_r(chart->lp,'l','b',sub_catagory[sc].label);
-    }
-
-
-  pl_restorestate_r(chart->lp);
-}
diff --git a/src/output/charts/barchart.h b/src/output/charts/barchart.h
deleted file mode 100644 (file)
index 0983272..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#ifndef BARCHART_H
-#define BARCHART_H
-
-#include <output/chart.h>
-
-enum  bar_opts {
-  BAR_GROUPED =  0,
-  BAR_STACKED,
-  BAR_RANGE
-};
-
-void draw_barchart(struct chart *ch, const char *title,
-             const char *xlabel, const char *ylabel, enum bar_opts opt);
-
-#endif
diff --git a/src/output/charts/box-whisker.c b/src/output/charts/box-whisker.c
deleted file mode 100644 (file)
index 33c445b..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-
-#include <config.h>
-
-#include <math.h>
-#include <assert.h>
-#include <libpspp/misc.h>
-
-#include <output/charts/box-whisker.h>
-#include <output/charts/plot-chart.h>
-
-#include <output/chart.h>
-#include <math/chart-geometry.h>
-#include <math/box-whisker.h>
-
-/* Draw a box-and-whiskers plot
-*/
-
-/* Draw an OUTLIER on the plot CH
- * at CENTRELINE
- */
-static void
-draw_case (struct chart *ch, double centreline,
-          const struct outlier *outlier)
-{
-
-#define MARKER_CIRCLE 4
-#define MARKER_STAR 3
-
-  pl_fmarker_r(ch->lp,
-              centreline,
-              ch->data_bottom + (outlier->value - ch->y_min) * ch->ordinate_scale,
-              outlier->extreme ? MARKER_STAR : MARKER_CIRCLE,
-              20);
-
-  pl_moverel_r(ch->lp, 10,0);
-
-  pl_alabel_r(ch->lp, 'l', 'c', ds_cstr (&outlier->label));
-}
-
-
-void
-boxplot_draw_boxplot (struct chart *ch,
-                     double box_centre,
-                     double box_width,
-                     const struct box_whisker *bw,
-                     const char *name)
-{
-  double whisker[2];
-  double hinge[3];
-  struct ll *ll;
-
-  const struct ll_list *outliers;
-
-  const double box_left = box_centre - box_width / 2.0;
-
-  const double box_right = box_centre + box_width / 2.0;
-
-  double box_bottom ;
-  double box_top ;
-  double bottom_whisker ;
-  double top_whisker ;
-
-  box_whisker_whiskers (bw, whisker);
-  box_whisker_hinges (bw, hinge);
-
-  box_bottom = ch->data_bottom + (hinge[0] - ch->y_min ) * ch->ordinate_scale;
-
-  box_top = ch->data_bottom + (hinge[2] - ch->y_min ) * ch->ordinate_scale;
-
-  bottom_whisker = ch->data_bottom + (whisker[0] - ch->y_min) *
-    ch->ordinate_scale;
-
-  top_whisker = ch->data_bottom + (whisker[1] - ch->y_min) * ch->ordinate_scale;
-
-  pl_savestate_r(ch->lp);
-
-  /* Draw the box */
-  pl_savestate_r (ch->lp);
-  pl_fillcolorname_r (ch->lp, ch->fill_colour);
-  pl_filltype_r (ch->lp,1);
-  pl_fbox_r (ch->lp,
-           box_left,
-           box_bottom,
-           box_right,
-           box_top);
-
-  pl_restorestate_r (ch->lp);
-
-  /* Draw the median */
-  pl_savestate_r (ch->lp);
-  pl_linewidth_r (ch->lp, 5);
-  pl_fline_r (ch->lp,
-            box_left,
-            ch->data_bottom + (hinge[1] - ch->y_min) * ch->ordinate_scale,
-            box_right,
-            ch->data_bottom + (hinge[1] - ch->y_min) * ch->ordinate_scale);
-  pl_restorestate_r (ch->lp);
-
-  /* Draw the bottom whisker */
-  pl_fline_r (ch->lp,
-            box_left,
-            bottom_whisker,
-            box_right,
-            bottom_whisker);
-
-  /* Draw top whisker */
-  pl_fline_r (ch->lp,
-            box_left,
-            top_whisker,
-            box_right,
-            top_whisker);
-
-
-  /* Draw centre line.
-     (bottom half) */
-  pl_fline_r (ch->lp,
-            box_centre, bottom_whisker,
-            box_centre, box_bottom);
-
-  /* (top half) */
-  pl_fline_r (ch->lp,
-            box_centre, top_whisker,
-            box_centre, box_top);
-
-  outliers = box_whisker_outliers (bw);
-  for (ll = ll_head (outliers);
-       ll != ll_null (outliers); ll = ll_next (ll))
-    {
-      const struct outlier *outlier = ll_data (ll, struct outlier, ll);
-      draw_case (ch, box_centre, outlier);
-    }
-
-  /* Draw  tick  mark on x axis */
-  draw_tick(ch, TICK_ABSCISSA, box_centre - ch->data_left, "%s", name);
-
-  pl_restorestate_r(ch->lp);
-}
-
-void
-boxplot_draw_yscale (struct chart *ch, double y_max, double y_min)
-{
-  double y_tick;
-  double d;
-
-  if ( !ch )
-     return ;
-
-  ch->y_max  = y_max;
-  ch->y_min  = y_min;
-
-  y_tick = chart_rounded_tick (fabs(ch->y_max - ch->y_min) / 5.0);
-
-  ch->y_min = (ceil( ch->y_min  / y_tick ) - 1.0  ) * y_tick;
-
-  ch->y_max = ( floor( ch->y_max  / y_tick ) + 1.0  ) * y_tick;
-
-  ch->ordinate_scale = fabs(ch->data_top - ch->data_bottom)
-    / fabs(ch->y_max - ch->y_min) ;
-
-  /* Move to data bottom-left */
-  pl_move_r(ch->lp,
-           ch->data_left, ch->data_bottom);
-
-  for ( d = ch->y_min; d <= ch->y_max ; d += y_tick )
-    {
-      draw_tick (ch, TICK_ORDINATE, (d - ch->y_min ) * ch->ordinate_scale, "%g", d);
-    }
-}
diff --git a/src/output/charts/box-whisker.h b/src/output/charts/box-whisker.h
deleted file mode 100644 (file)
index 7b2c4b8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#ifndef BOX_WHISKER_H
-#define BOX_WHISKER_H
-
-struct chart ;
-struct box_whisker;
-
-void boxplot_draw_boxplot (struct chart *ch,
-                          double box_centre,
-                          double box_width,
-                          const struct box_whisker *w,
-                          const char *name);
-
-
-void boxplot_draw_yscale (struct chart *ch , double y_max, double y_min);
-
-#endif
diff --git a/src/output/charts/boxplot-cairo.c b/src/output/charts/boxplot-cairo.c
new file mode 100644 (file)
index 0000000..ddecbfc
--- /dev/null
@@ -0,0 +1,179 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/cairo-chart.h>
+
+#include <math.h>
+
+#include <output/charts/boxplot.h>
+#include <math/box-whisker.h>
+#include <math/chart-geometry.h>
+
+/* Draw an OUTLIER on the plot CH
+ * at CENTRELINE
+ */
+static void
+draw_case (cairo_t *cr, const struct xrchart_geometry *geom, double centreline,
+          const struct outlier *outlier)
+{
+  double y = geom->data_bottom + (outlier->value - geom->y_min) * geom->ordinate_scale;
+  xrchart_draw_marker (cr, centreline, y,
+                     outlier->extreme ? XRMARKER_ASTERISK : XRMARKER_CIRCLE,
+                     20);
+
+  cairo_move_to (cr, centreline + 10, y);
+  xrchart_label (cr, 'l', 'c', geom->font_size, ds_cstr (&outlier->label));
+}
+
+static void
+boxplot_draw_box (cairo_t *cr, const struct xrchart_geometry *geom,
+                  double box_centre,
+                  double box_width,
+                  const struct box_whisker *bw,
+                  const char *name)
+{
+  double whisker[2];
+  double hinge[3];
+  struct ll *ll;
+
+  const struct ll_list *outliers;
+
+  const double box_left = box_centre - box_width / 2.0;
+
+  const double box_right = box_centre + box_width / 2.0;
+
+  double box_bottom ;
+  double box_top ;
+  double bottom_whisker ;
+  double top_whisker ;
+
+  box_whisker_whiskers (bw, whisker);
+  box_whisker_hinges (bw, hinge);
+
+  box_bottom = geom->data_bottom + (hinge[0] - geom->y_min ) * geom->ordinate_scale;
+
+  box_top = geom->data_bottom + (hinge[2] - geom->y_min ) * geom->ordinate_scale;
+
+  bottom_whisker = geom->data_bottom + (whisker[0] - geom->y_min) *
+    geom->ordinate_scale;
+
+  top_whisker = geom->data_bottom + (whisker[1] - geom->y_min) * geom->ordinate_scale;
+
+  /* Draw the box */
+  cairo_rectangle (cr,
+                   box_left,
+                   box_bottom,
+                   box_right - box_left,
+                   box_top - box_bottom);
+  cairo_save (cr);
+  cairo_set_source_rgb (cr,
+                        geom->fill_colour.red / 255.0,
+                        geom->fill_colour.green / 255.0,
+                        geom->fill_colour.blue / 255.0);
+  cairo_fill (cr);
+  cairo_restore (cr);
+  cairo_stroke (cr);
+
+  /* Draw the median */
+  cairo_save (cr);
+  cairo_set_line_width (cr, cairo_get_line_width (cr) * 5);
+  cairo_move_to (cr,
+                 box_left,
+                 geom->data_bottom + (hinge[1] - geom->y_min) * geom->ordinate_scale);
+  cairo_line_to (cr,
+                 box_right,
+                 geom->data_bottom + (hinge[1] - geom->y_min) * geom->ordinate_scale);
+  cairo_stroke (cr);
+  cairo_restore (cr);
+
+  /* Draw the bottom whisker */
+  cairo_move_to (cr, box_left, bottom_whisker);
+  cairo_line_to (cr, box_right, bottom_whisker);
+  cairo_stroke (cr);
+
+  /* Draw top whisker */
+  cairo_move_to (cr, box_left, top_whisker);
+  cairo_line_to (cr, box_right, top_whisker);
+  cairo_stroke (cr);
+
+  /* Draw centre line.
+     (bottom half) */
+  cairo_move_to (cr, box_centre, bottom_whisker);
+  cairo_line_to (cr, box_centre, box_bottom);
+  cairo_stroke (cr);
+
+  /* (top half) */
+  cairo_move_to (cr, box_centre, top_whisker);
+  cairo_line_to (cr, box_centre, box_top);
+  cairo_stroke (cr);
+
+  outliers = box_whisker_outliers (bw);
+  for (ll = ll_head (outliers);
+       ll != ll_null (outliers); ll = ll_next (ll))
+    {
+      const struct outlier *outlier = ll_data (ll, struct outlier, ll);
+      draw_case (cr, geom, box_centre, outlier);
+    }
+
+  /* Draw  tick  mark on x axis */
+  draw_tick(cr, geom, TICK_ABSCISSA, box_centre - geom->data_left, "%s", name);
+}
+
+static void
+boxplot_draw_yscale (cairo_t *cr, struct xrchart_geometry *geom,
+                     double y_max, double y_min)
+{
+  double y_tick;
+  double d;
+
+  geom->y_max = y_max;
+  geom->y_min = y_min;
+
+  y_tick = chart_rounded_tick (fabs (geom->y_max - geom->y_min) / 5.0);
+
+  geom->y_min = (ceil (geom->y_min / y_tick) - 1.0) * y_tick;
+
+  geom->y_max = (floor (geom->y_max / y_tick) + 1.0) * y_tick;
+
+  geom->ordinate_scale = (fabs (geom->data_top - geom->data_bottom)
+                          / fabs (geom->y_max - geom->y_min));
+
+  for (d = geom->y_min; d <= geom->y_max; d += y_tick)
+    draw_tick (cr, geom, TICK_ORDINATE,
+               (d - geom->y_min) * geom->ordinate_scale, "%g", d);
+}
+
+void
+xrchart_draw_boxplot (const struct chart_item *chart_item, cairo_t *cr,
+                      struct xrchart_geometry *geom)
+{
+  const struct boxplot *boxplot = to_boxplot (chart_item);
+  double box_width;
+  size_t i;
+
+  boxplot_draw_yscale (cr, geom, boxplot->y_max, boxplot->y_min);
+  xrchart_write_title (cr, geom, "%s", chart_item->title);
+
+  box_width = (geom->data_right - geom->data_left) / boxplot->n_boxes / 2.0;
+  for (i = 0; i < boxplot->n_boxes; i++)
+    {
+      const struct boxplot_box *box = &boxplot->boxes[i];
+      const double box_centre = (i * 2 + 1) * box_width + geom->data_left;
+      boxplot_draw_box (cr, geom, box_centre, box_width, box->bw, box->label);
+    }
+}
diff --git a/src/output/charts/boxplot.c b/src/output/charts/boxplot.c
new file mode 100644 (file)
index 0000000..7e92480
--- /dev/null
@@ -0,0 +1,70 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+#include <output/charts/boxplot.h>
+
+#include <math/box-whisker.h>
+#include <output/chart-item-provider.h>
+
+struct boxplot *
+boxplot_create (double y_min, double y_max, const char *title)
+{
+  struct boxplot *boxplot = xmalloc (sizeof *boxplot);
+  chart_item_init (&boxplot->chart_item, &boxplot_class, title);
+  boxplot->y_min = y_min;
+  boxplot->y_max = y_max;
+  boxplot->boxes = NULL;
+  boxplot->n_boxes = boxplot->boxes_allocated = 0;
+  return boxplot;
+}
+
+void
+boxplot_add_box (struct boxplot *boxplot,
+                 struct box_whisker *bw, const char *label)
+{
+  struct boxplot_box *box;
+  if (boxplot->n_boxes >= boxplot->boxes_allocated)
+    boxplot->boxes = x2nrealloc (boxplot->boxes, &boxplot->boxes_allocated,
+                                 sizeof *boxplot->boxes);
+  box = &boxplot->boxes[boxplot->n_boxes++];
+  box->bw = bw;
+  box->label = xstrdup (label);
+}
+
+static void
+boxplot_chart_destroy (struct chart_item *chart_item)
+{
+  struct boxplot *boxplot = to_boxplot (chart_item);
+  size_t i;
+
+  for (i = 0; i < boxplot->n_boxes; i++)
+    {
+      struct boxplot_box *box = &boxplot->boxes[i];
+      struct statistic *statistic = &box->bw->parent.parent;
+      statistic->destroy (statistic);
+      free (box->label);
+    }
+  free (boxplot->boxes);
+  free (boxplot);
+}
+
+const struct chart_item_class boxplot_class =
+  {
+    boxplot_chart_destroy
+  };
diff --git a/src/output/charts/boxplot.h b/src/output/charts/boxplot.h
new file mode 100644 (file)
index 0000000..bd5a7a3
--- /dev/null
@@ -0,0 +1,108 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_CHARTS_BOXPLOT_H
+#define OUTPUT_CHARTS_BOXPLOT_H 1
+
+#include <stddef.h>
+#include <output/chart-item.h>
+
+/* Box-whiskers plot. */
+struct boxplot
+  {
+    struct chart_item chart_item;
+
+    /* Data. */
+    struct boxplot_box *boxes;
+    size_t n_boxes, boxes_allocated;
+
+    /* Derived from data and convenient for plotting. */
+    double y_min;               /* Minimum Y coordinate of extremum. */
+    double y_max;               /* Maximum Y coordinate of extremum. */
+  };
+
+/* One box within a box-whiskers plot. */
+struct boxplot_box
+  {
+    struct box_whisker *bw;
+    char *label;                /* Variable name or factor label. */
+  };
+
+struct boxplot *boxplot_create (double y_min, double y_max, const char *title);
+void boxplot_add_box (struct boxplot *,
+                      struct box_whisker *, const char *label);
+\f
+/* This boilerplate for boxplot, a subclass of chart_item, was
+   autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct chart_item_class boxplot_class;
+
+/* Returns true if SUPER is a boxplot, otherwise false. */
+static inline bool
+is_boxplot (const struct chart_item *super)
+{
+  return super->class == &boxplot_class;
+}
+
+/* Returns SUPER converted to boxplot.  SUPER must be a boxplot, as
+   reported by is_boxplot. */
+static inline struct boxplot *
+to_boxplot (const struct chart_item *super)
+{
+  assert (is_boxplot (super));
+  return UP_CAST (super, struct boxplot, chart_item);
+}
+
+/* Returns INSTANCE converted to chart_item. */
+static inline struct chart_item *
+boxplot_super (const struct boxplot *instance)
+{
+  return CONST_CAST (struct chart_item *, &instance->chart_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct boxplot *
+boxplot_ref (const struct boxplot *instance)
+{
+  return to_boxplot (chart_item_ref (&instance->chart_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+boxplot_unref (struct boxplot *instance)
+{
+  chart_item_unref (&instance->chart_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+boxplot_is_shared (const struct boxplot *instance)
+{
+  return chart_item_is_shared (&instance->chart_item);
+}
+
+static inline void
+boxplot_submit (struct boxplot *instance)
+{
+  chart_item_submit (&instance->chart_item);
+}
+\f
+#endif /* output/charts/boxplot.h */
diff --git a/src/output/charts/cartesian.c b/src/output/charts/cartesian.c
deleted file mode 100644 (file)
index cb2f346..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-
-#include <config.h>
-
-#include <math.h>
-#include <assert.h>
-
-#include <output/chart.h>
-
-#include <output/charts/plot-chart.h>
-#include <output/charts/cartesian.h>
-#include <libpspp/compiler.h>
-
-
-/* Start a new vector called NAME */
-void
-chart_vector_start (struct chart *ch, const char *name)
-{
-  if ( ! ch )
-    return ;
-
-  pl_savestate_r (ch->lp);
-
-  pl_colorname_r (ch->lp, data_colour [ch->n_datasets % N_CHART_COLOURS]);
-
-  ch->n_datasets++;
-  ch->dataset = xrealloc (ch->dataset, ch->n_datasets * sizeof (*ch->dataset));
-
-  ch->dataset[ch->n_datasets - 1] = strdup (name);
-}
-
-/* Plot a data point */
-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);
-
-    pl_restorestate_r(ch->lp);
-  }
-}
-
-void
-chart_vector_end (struct chart *ch)
-{
-  pl_endpath_r (ch->lp);
-  pl_colorname_r (ch->lp, "black");
-  ch->in_path = false;
-  pl_restorestate_r (ch->lp);
-}
-
-/* Plot a data point */
-void
-chart_vector (struct chart *ch, 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 ;
-
-    if ( ch->in_path)
-      pl_fcont_r (ch->lp, x_pos, y_pos);
-    else
-      {
-       pl_fmove_r (ch->lp, x_pos, y_pos);
-       ch->in_path = true;
-      }
-  }
-}
-
-
-
-/* Draw a line with slope SLOPE and intercept INTERCEPT.
-   between the points limit1 and limit2.
-   If lim_dim is CHART_DIM_Y then the limit{1,2} are on the
-   y axis otherwise the x axis
-*/
-void
-chart_line (struct chart *ch, double slope, double intercept,
-          double limit1, double limit2, enum CHART_DIM lim_dim)
-{
-  double x1, y1;
-  double x2, y2 ;
-
-  if ( ! ch )
-    return ;
-
-
-  if ( lim_dim == CHART_DIM_Y )
-    {
-      x1 = ( limit1 - intercept ) / slope ;
-      x2 = ( limit2 - intercept ) / slope ;
-      y1 = limit1;
-      y2 = limit2;
-    }
-  else
-    {
-      x1 = limit1;
-      x2 = limit2;
-      y1 = slope * x1 + intercept;
-      y2 = slope * x2 + intercept;
-    }
-
-  y1 = (y1 - ch->y_min) * ch->ordinate_scale + ch->data_bottom ;
-  y2 = (y2 - ch->y_min) * ch->ordinate_scale + ch->data_bottom ;
-  x1 = (x1 - ch->x_min) * ch->abscissa_scale + ch->data_left ;
-  x2 = (x2 - ch->x_min) * ch->abscissa_scale + ch->data_left ;
-
-  pl_savestate_r(ch->lp);
-
-  pl_fline_r(ch->lp, x1, y1, x2, y2);
-
-  pl_restorestate_r(ch->lp);
-}
diff --git a/src/output/charts/cartesian.h b/src/output/charts/cartesian.h
deleted file mode 100644 (file)
index 0874b9c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-
-
-#ifndef CARTESIAN_H
-#define CARTESIAN_H
-
-
-enum CHART_DIM
-  {
-    CHART_DIM_X,
-    CHART_DIM_Y
-  };
-
-
-void chart_vector_start (struct chart *ch, const char *name);
-void chart_vector (struct chart *ch, double x, double y);
-void chart_vector_end (struct chart *ch);
-
-/* Plot a data point */
-void chart_datum (struct chart *ch, int dataset UNUSED, double x, double y);
-
-/* Draw a line with slope SLOPE and intercept INTERCEPT.
-   between the points limit1 and limit2.
-   If lim_dim is CHART_DIM_Y then the limit{1,2} are on the
-   y axis otherwise the x axis
-*/
-void chart_line (struct chart *ch, double slope, double intercept,
-               double limit1, double limit2, enum CHART_DIM lim_dim);
-
-
-#endif
diff --git a/src/output/charts/dummy-chart.c b/src/output/charts/dummy-chart.c
deleted file mode 100644 (file)
index e22f958..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2005 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-
-/* Stubs for plotting routines.
-   This module is linked only when charts are not supported */
-
-#include "config.h"
-#include <output/chart.h>
-#include <output/charts/box-whisker.h>
-#include <output/charts/piechart.h>
-#include <output/charts/plot-chart.h>
-#include <output/charts/plot-hist.h>
-#include <output/charts/cartesian.h>
-#include <gsl/gsl_histogram.h>
-#include <libpspp/compiler.h>
-
-#ifndef NO_CHARTS
-#error This file should be used only when compiling without charts.
-#endif
-
-void
-chart_write_title (struct chart *chart UNUSED, const char *title UNUSED, ...)
-{
-}
-
-
-void
-chart_write_xscale (struct chart *ch UNUSED,
-                   double min UNUSED, double max UNUSED, int ticks UNUSED)
-{
-}
-
-
-void
-chart_write_yscale (struct chart *ch UNUSED UNUSED,
-                   double smin UNUSED, double smax UNUSED, int ticks UNUSED)
-{
-}
-
-
-void
-chart_write_xlabel (struct chart *ch UNUSED, const char *label UNUSED)
-{
-}
-
-void
-chart_write_ylabel (struct chart *ch UNUSED, const char *label UNUSED)
-{
-}
-
-
-void
-chart_line (struct chart *ch UNUSED,
-           double slope UNUSED, double intercept UNUSED,
-           double limit1 UNUSED, double limit2 UNUSED,
-           enum CHART_DIM lim_dim UNUSED)
-{
-}
-
-
-void
-chart_datum (struct chart *ch UNUSED, int dataset UNUSED UNUSED,
-            double x UNUSED, double y UNUSED)
-{
-}
-
-void
-histogram_plot (const struct histogram *hist UNUSED,
-               const char *label UNUSED,
-               const struct moments1 *m UNUSED)
-{
-}
-
-void
-histogram_plot_n (const struct histogram *hist UNUSED,
-                 const char *label UNUSED,
-                 double n UNUSED, double mean UNUSED, double stddev UNUSED,
-                 bool show_normal UNUSED)
-{
-}
-
-
-void
-boxplot_draw_yscale (struct chart *ch UNUSED,
-                    double y_max UNUSED, double y_min UNUSED)
-{
-}
-
-void
-boxplot_draw_boxplot (struct chart *ch UNUSED,
-                     double box_centre UNUSED,
-                     double box_width UNUSED,
-                     const struct box_whisker *w UNUSED,
-                     const char *name UNUSED)
-{
-}
-
-
-
-
-void
-piechart_plot (const char *title UNUSED,
-              const struct slice *slices UNUSED, int n_slices UNUSED)
-{
-}
diff --git a/src/output/charts/np-plot-cairo.c b/src/output/charts/np-plot-cairo.c
new file mode 100644 (file)
index 0000000..a918652
--- /dev/null
@@ -0,0 +1,90 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/charts/np-plot.h>
+
+#include <data/case.h>
+#include <data/casereader.h>
+#include <math/np.h>
+#include <output/cairo-chart.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+static void
+np_plot_chart_draw (const struct chart_item *chart_item, cairo_t *cr,
+                    struct xrchart_geometry *geom)
+{
+  const struct np_plot_chart *npp = to_np_plot_chart (chart_item);
+  struct casereader *data;
+  struct ccase *c;
+
+  xrchart_write_title (cr, geom, _("Normal Q-Q Plot of %s"), npp->label);
+  xrchart_write_xlabel (cr, geom, _("Observed Value"));
+  xrchart_write_ylabel (cr, geom, _("Expected Normal"));
+  xrchart_write_xscale (cr, geom,
+                      npp->x_lower - npp->slack,
+                      npp->x_upper + npp->slack, 5);
+  xrchart_write_yscale (cr, geom, npp->y_first, npp->y_last, 5);
+
+  data = casereader_clone (npp->data);
+  for (; (c = casereader_read (data)) != NULL; case_unref (c))
+    xrchart_datum (cr, geom, 0,
+                 case_data_idx (c, NP_IDX_Y)->f,
+                 case_data_idx (c, NP_IDX_NS)->f);
+  casereader_destroy (data);
+
+  xrchart_line (cr, geom, npp->slope, npp->intercept,
+              npp->y_first, npp->y_last, XRCHART_DIM_Y);
+}
+
+static void
+dnp_plot_chart_draw (const struct chart_item *chart_item, cairo_t *cr,
+                     struct xrchart_geometry *geom)
+{
+  const struct np_plot_chart *dnpp = to_np_plot_chart (chart_item);
+  struct casereader *data;
+  struct ccase *c;
+
+  xrchart_write_title (cr, geom, _("Detrended Normal Q-Q Plot of %s"),
+                       dnpp->label);
+  xrchart_write_xlabel (cr, geom, _("Observed Value"));
+  xrchart_write_ylabel (cr, geom, _("Dev from Normal"));
+  xrchart_write_xscale (cr, geom, dnpp->y_min, dnpp->y_max, 5);
+  xrchart_write_yscale (cr, geom, dnpp->dns_min, dnpp->dns_max, 5);
+
+  data = casereader_clone (dnpp->data);
+  for (; (c = casereader_read (data)) != NULL; case_unref (c))
+    xrchart_datum (cr, geom, 0, case_data_idx (c, NP_IDX_Y)->f,
+                   case_data_idx (c, NP_IDX_DNS)->f);
+  casereader_destroy (data);
+
+  xrchart_line (cr, geom, 0, 0, dnpp->y_min, dnpp->y_max, XRCHART_DIM_X);
+}
+
+void
+xrchart_draw_np_plot (const struct chart_item *chart_item, cairo_t *cr,
+                      struct xrchart_geometry *geom)
+{
+  const struct np_plot_chart *npp = to_np_plot_chart (chart_item);
+
+  if (npp->detrended)
+    dnp_plot_chart_draw (chart_item, cr, geom);
+  else
+    np_plot_chart_draw (chart_item, cr, geom);
+}
diff --git a/src/output/charts/np-plot.c b/src/output/charts/np-plot.c
new file mode 100644 (file)
index 0000000..e912479
--- /dev/null
@@ -0,0 +1,107 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/charts/np-plot.h>
+
+#include <gsl/gsl_cdf.h>
+
+#include <data/casereader.h>
+#include <libpspp/cast.h>
+#include <math/np.h>
+#include <output/chart-item-provider.h>
+
+#include "gl/minmax.h"
+
+static struct chart_item *
+make_np_plot (const struct np *np, const struct casereader *reader,
+              const char *label, bool detrended)
+{
+  struct np_plot_chart *npp;
+
+  if (np->n < 1.0)
+    return NULL;
+
+  npp = xmalloc (sizeof *npp);
+  chart_item_init (&npp->chart_item, &np_plot_chart_class, label);
+  npp->data = casereader_clone (reader);
+  npp->y_min = np->y_min;
+  npp->y_max = np->y_max;
+  npp->dns_min = np->dns_min;
+  npp->dns_max = np->dns_max;
+  npp->detrended = detrended;
+
+  /* Slope and intercept of the ideal normal probability line. */
+  npp->slope = 1.0 / np->stddev;
+  npp->intercept = -np->mean / np->stddev;
+
+  npp->y_first = gsl_cdf_ugaussian_Pinv (1 / (np->n + 1));
+  npp->y_last = gsl_cdf_ugaussian_Pinv (np->n / (np->n + 1));
+
+  /* Need to make sure that both the scatter plot and the ideal fit into the
+     plot. */
+  npp->x_lower = MIN (np->y_min, (npp->y_first - npp->intercept) / npp->slope);
+  npp->x_upper = MAX (np->y_max, (npp->y_last  - npp->intercept) / npp->slope);
+  npp->slack = (npp->x_upper - npp->x_lower) * 0.05;
+
+  return &npp->chart_item;
+}
+
+/* Creates and returns a normal probability plot corresponding to
+   the calculations in NP and the data in READER, and label the
+   plot with LABEL.  The data in READER must have Y-values in
+   value index NP_IDX_Y and NS-values in value index NP_IDX_NS.
+
+   Returns a null pointer if the data set is empty.
+
+   The caller retains ownership of NP and READER. */
+struct chart_item *
+np_plot_create (const struct np *np, const struct casereader *reader,
+                const char *label)
+{
+  return make_np_plot (np, reader, label, false);
+}
+
+/* Creates and returns a detrended normal probability plot
+   corresponding to the calculations in NP and the data in
+   READER, and label the plot with LABEL.  The data in READER
+   must have Y-values in value index NP_IDX_Y and DNS-values in
+   value index NP_IDX_DNS.
+
+   Returns a null pointer if the data set is empty.
+
+   The caller retains ownership of NP and READER. */
+struct chart_item *
+dnp_plot_create (const struct np *np, const struct casereader *reader,
+                 const char *label)
+{
+  return make_np_plot (np, reader, label, true);
+}
+
+static void
+np_plot_chart_destroy (struct chart_item *chart_item)
+{
+  struct np_plot_chart *npp = to_np_plot_chart (chart_item);
+  casereader_destroy (npp->data);
+  free (npp->label);
+  free (npp);
+}
+
+const struct chart_item_class np_plot_chart_class =
+  {
+    np_plot_chart_destroy
+  };
diff --git a/src/output/charts/np-plot.h b/src/output/charts/np-plot.h
new file mode 100644 (file)
index 0000000..82194e2
--- /dev/null
@@ -0,0 +1,110 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_CHARTS_NP_PLOT_H
+#define OUTPUT_CHARTS_NP_PLOT_H 1
+
+#include <output/chart-item.h>
+
+struct np;
+
+/* An NP or DNP plot. */
+struct np_plot_chart
+  {
+    struct chart_item chart_item;
+    char *label;
+    struct casereader *data;
+    bool detrended;
+
+    /* Copied directly from struct np. */
+    double y_min, y_max;
+    double dns_min, dns_max;
+
+    /* Calculated. */
+    double slope, intercept;
+    double y_first, y_last;
+    double x_lower, x_upper;
+    double slack;
+  };
+
+struct chart_item *np_plot_create (const struct np *,
+                                   const struct casereader *,
+                                   const char *label);
+struct chart_item *dnp_plot_create (const struct np *,
+                                    const struct casereader *,
+                                    const char *label);
+\f
+/* This boilerplate for np_plot_chart, a subclass of chart_item, was
+   autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct chart_item_class np_plot_chart_class;
+
+/* Returns true if SUPER is a np_plot_chart, otherwise false. */
+static inline bool
+is_np_plot_chart (const struct chart_item *super)
+{
+  return super->class == &np_plot_chart_class;
+}
+
+/* Returns SUPER converted to np_plot_chart.  SUPER must be a np_plot_chart, as
+   reported by is_np_plot_chart. */
+static inline struct np_plot_chart *
+to_np_plot_chart (const struct chart_item *super)
+{
+  assert (is_np_plot_chart (super));
+  return UP_CAST (super, struct np_plot_chart, chart_item);
+}
+
+/* Returns INSTANCE converted to chart_item. */
+static inline struct chart_item *
+np_plot_chart_super (const struct np_plot_chart *instance)
+{
+  return CONST_CAST (struct chart_item *, &instance->chart_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct np_plot_chart *
+np_plot_chart_ref (const struct np_plot_chart *instance)
+{
+  return to_np_plot_chart (chart_item_ref (&instance->chart_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+np_plot_chart_unref (struct np_plot_chart *instance)
+{
+  chart_item_unref (&instance->chart_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+np_plot_chart_is_shared (const struct np_plot_chart *instance)
+{
+  return chart_item_is_shared (&instance->chart_item);
+}
+
+static inline void
+np_plot_chart_submit (struct np_plot_chart *instance)
+{
+  chart_item_submit (&instance->chart_item);
+}
+\f
+#endif /* output/charts/np-plot.h */
diff --git a/src/output/charts/piechart-cairo.c b/src/output/charts/piechart-cairo.c
new file mode 100644 (file)
index 0000000..501c0bd
--- /dev/null
@@ -0,0 +1,123 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/charts/piechart.h>
+
+#include <math.h>
+
+#include <output/cairo-chart.h>
+
+#include "gl/minmax.h"
+
+/* Draw a single slice of the pie */
+static void
+draw_segment(cairo_t *cr,
+            double x0, double y0,
+            double radius,
+            double start_angle, double segment_angle,
+            const struct xrchart_colour *colour)
+{
+  cairo_move_to (cr, x0, y0);
+  cairo_arc (cr, x0, y0, radius, start_angle, start_angle + segment_angle);
+  cairo_line_to (cr, x0, y0);
+  cairo_save (cr);
+  cairo_set_source_rgb (cr,
+                        colour->red / 255.0,
+                        colour->green / 255.0,
+                        colour->blue / 255.0);
+  cairo_fill_preserve (cr);
+  cairo_restore (cr);
+  cairo_stroke (cr);
+}
+
+void
+xrchart_draw_piechart (const struct chart_item *chart_item, cairo_t *cr,
+                       struct xrchart_geometry *geom)
+{
+  const struct piechart *pie = to_piechart (chart_item);
+  double total_magnitude;
+  double left_label, right_label;
+  double centre_x, centre_y;
+  double radius;
+  double angle;
+  int i;
+
+  centre_x = (geom->data_right + geom->data_left) / 2.0 ;
+  centre_y = (geom->data_top + geom->data_bottom) / 2.0 ;
+
+  left_label = geom->data_left + (geom->data_right - geom->data_left)/10.0;
+  right_label = geom->data_right - (geom->data_right - geom->data_left)/10.0;
+
+  radius = MIN (5.0 / 12.0 * (geom->data_top - geom->data_bottom),
+                1.0 / 4.0 * (geom->data_right - geom->data_left));
+
+  radius = MIN (5.0 / 12.0 * (geom->data_top - geom->data_bottom),
+                1.0 / 4.0 * (geom->data_right - geom->data_left));
+
+  xrchart_write_title (cr, geom, "%s", chart_item_get_title (chart_item));
+
+  total_magnitude = 0.0;
+  for (i = 0; i < pie->n_slices; i++)
+    total_magnitude += pie->slices[i].magnitude;
+
+  angle = 0.0;
+  for (i = 0; i < pie->n_slices ; ++i )
+    {
+      const double segment_angle =
+       pie->slices[i].magnitude / total_magnitude * 2 * M_PI ;
+
+      const double label_x = centre_x -
+       radius * sin(angle + segment_angle/2.0);
+
+      const double label_y = centre_y +
+       radius * cos(angle + segment_angle/2.0);
+
+      /* Fill the segment */
+      draw_segment (cr,
+                    centre_x, centre_y, radius,
+                    angle, segment_angle,
+                    &data_colour[i % XRCHART_N_COLOURS]);
+
+      /* Now add the labels */
+      if ( label_x < centre_x )
+       {
+          cairo_move_to (cr, label_x, label_y);
+          cairo_line_to (cr, left_label, label_y);
+          cairo_stroke (cr);
+         cairo_move_to (cr, left_label, label_y + 5);
+         xrchart_label (cr, 'l', 'x', geom->font_size,
+                         ds_cstr (&pie->slices[i].label));
+       }
+      else
+       {
+         cairo_move_to (cr, label_x, label_y);
+          cairo_line_to (cr, right_label, label_y);
+          cairo_stroke (cr);
+         cairo_move_to (cr, right_label, label_y + 5);
+         xrchart_label (cr, 'r', 'x', geom->font_size,
+                         ds_cstr (&pie->slices[i].label));
+       }
+
+      angle += segment_angle;
+    }
+
+  /* Draw an outline to the pie */
+  cairo_arc (cr, centre_x, centre_y, radius, 0, 2 * M_PI);
+  cairo_stroke (cr);
+}
+
index d7db80e921a6f573991ed0be14e1eaf583e8527d..0b9153d545b76d26340532a22b9e218bb29f15c6 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
-
 #include <config.h>
 
-#include <float.h>
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-
-
 #include <output/charts/piechart.h>
-#include <output/charts/plot-chart.h>
-
-#include <output/chart.h>
-#include <libpspp/str.h>
-#include <data/value-labels.h>
-
-#include "minmax.h"
-
 
-/* Pie charts of course need to know Pi :) */
-#ifndef M_PI
-#define M_PI ( 22.0 / 7.0 )
-#endif
-
-
-
-/* Draw a single slice of the pie */
-static void
-draw_segment(struct chart *ch,
-            double centre_x, double centre_y,
-            double radius,
-            double start_angle, double segment_angle,
-            const char *colour) ;
+#include <stdlib.h>
 
+#include <libpspp/cast.h>
+#include <libpspp/str.h>
+#include <output/chart-item-provider.h>
 
+#include "gl/xalloc.h"
 
-/* Draw a piechart */
-void
-piechart_plot(const char *title, const struct slice *slices, int n_slices)
+/* Creates and returns a chart that will render a piechart with
+   the given TITLE and the N_SLICES described in SLICES. */
+struct chart_item *
+piechart_create (const char *title, const struct slice *slices, int n_slices)
 {
+  struct piechart *pie;
   int i;
-  double total_magnetude=0;
-
-  struct chart *ch;
-
-  double left_label;
-  double right_label;
 
-  double centre_x;
-  double centre_y;
-
-  double radius;
-
-  ch = chart_create ();
-  if (ch == NULL)
-    return;
-
-  left_label = ch->data_left + (ch->data_right - ch->data_left)/10.0;
-  right_label = ch->data_right - (ch->data_right - ch->data_left)/10.0;
-  centre_x = (ch->data_right + ch->data_left ) / 2.0;
-  centre_y = (ch->data_top + ch->data_bottom ) / 2.0;
-  radius = MIN (5.0 / 12.0 * (ch->data_top - ch->data_bottom),
-                1.0 / 4.0 * (ch->data_right - ch->data_left));
-
-  chart_write_title(ch, "%s", title);
-
-  for (i = 0 ; i < n_slices ; ++i )
-    total_magnetude += slices[i].magnetude;
-
-  for (i = 0 ; i < n_slices ; ++i )
+  pie = xmalloc (sizeof *pie);
+  chart_item_init (&pie->chart_item, &piechart_class, title);
+  pie->slices = xnmalloc (n_slices, sizeof *pie->slices);
+  for (i = 0; i < n_slices; i++)
     {
-      static double angle=0.0;
-
-      const double segment_angle =
-       slices[i].magnetude / total_magnetude * 2 * M_PI ;
-
-      const double label_x = centre_x -
-       radius * sin(angle + segment_angle/2.0);
-
-      const double label_y = centre_y +
-       radius * cos(angle + segment_angle/2.0);
-
-      /* Fill the segment */
-      draw_segment(ch,
-                  centre_x, centre_y, radius,
-                  angle, segment_angle,
-                  data_colour[i % N_CHART_COLOURS]);
-
-      /* Now add the labels */
-      if ( label_x < centre_x )
-       {
-         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, ds_cstr (&slices[i].label));
-       }
-      else
-       {
-         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, ds_cstr (&slices[i].label));
-       }
-
-      angle += segment_angle;
+      const struct slice *src = &slices[i];
+      struct slice *dst = &pie->slices[i];
 
+      ds_init_string (&dst->label, &src->label);
+      dst->magnitude = src->magnitude;
     }
-
-  /* Draw an outline to the pie */
-  pl_filltype_r(ch->lp,0);
-  pl_fcircle_r (ch->lp, centre_x, centre_y, radius);
-
-  chart_submit(ch);
+  pie->n_slices = n_slices;
+  return &pie->chart_item;
 }
 
 static void
-fill_segment(struct chart *ch,
-            double x0, double y0,
-            double radius,
-            double start_angle, double segment_angle) ;
-
-
-/* Fill a segment with the current fill colour */
-static void
-fill_segment(struct chart *ch,
-            double x0, double y0,
-            double radius,
-            double start_angle, double segment_angle)
+piechart_destroy (struct chart_item *chart_item)
 {
+  struct piechart *pie = to_piechart (chart_item);
+  int i;
 
-  const double start_x  = x0 - radius * sin(start_angle);
-  const double start_y  = y0 + radius * cos(start_angle);
-
-  const double stop_x   =
-    x0 - radius * sin(start_angle + segment_angle);
-
-  const double stop_y   =
-    y0 + radius * cos(start_angle + segment_angle);
-
-  assert(segment_angle <= 2 * M_PI);
-  assert(segment_angle >= 0);
-
-  if ( segment_angle > M_PI )
-    {
-      /* Then we must draw it in two halves */
-      fill_segment(ch, x0, y0, radius, start_angle, segment_angle / 2.0 );
-      fill_segment(ch, x0, y0, radius, start_angle + segment_angle / 2.0,
-                  segment_angle / 2.0 );
-    }
-  else
+  for (i = 0; i < pie->n_slices; i++)
     {
-      pl_move_r(ch->lp, x0, y0);
-
-      pl_cont_r(ch->lp, stop_x, stop_y);
-      pl_cont_r(ch->lp, start_x, start_y);
-
-      pl_arc_r(ch->lp,
-              x0, y0,
-              stop_x, stop_y,
-              start_x, start_y
-              );
-
-      pl_endpath_r(ch->lp);
+      struct slice *slice = &pie->slices[i];
+      ds_destroy (&slice->label);
     }
+  free (pie->slices);
+  free (pie);
 }
 
-
-
-/* Draw a single slice of the pie */
-static void
-draw_segment(struct chart *ch,
-            double x0, double y0,
-            double radius,
-            double start_angle, double segment_angle,
-            const char *colour)
-{
-  const double start_x  = x0 - radius * sin(start_angle);
-  const double start_y  = y0 + radius * cos(start_angle);
-
-  pl_savestate_r(ch->lp);
-
-  pl_savestate_r(ch->lp);
-  pl_colorname_r(ch->lp, colour);
-
-  pl_pentype_r(ch->lp,1);
-  pl_filltype_r(ch->lp,1);
-
-  fill_segment(ch, x0, y0, radius, start_angle, segment_angle);
-  pl_restorestate_r(ch->lp);
-
-  /* Draw line dividing segments */
-  pl_pentype_r(ch->lp, 1);
-  pl_fline_r(ch->lp, x0, y0, start_x, start_y);
-
-
-  pl_restorestate_r(ch->lp);
-}
-
+const struct chart_item_class piechart_class =
+  {
+    piechart_destroy
+  };
index 96540401e7406f61e33259a7117e983d18e78fb9..312a45ee08ce759f84e9c02e2991ca9acd3163f0 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #define PIECHART_H
 
 #include <libpspp/str.h>
+#include <output/chart-item.h>
 
-struct slice {
-  struct string label;
-  double magnetude;
-};
+struct piechart
+  {
+    struct chart_item chart_item;
+    struct slice *slices;
+    int n_slices;
+  };
 
-/* Draw a piechart */
-void piechart_plot(const char *title,
-                  const struct slice *slices, int n_slices);
+struct slice
+  {
+    struct string label;
+    double magnitude;
+  };
 
-#endif
+struct chart_item *piechart_create (const char *title,
+                                    const struct slice *, int n_slices);
+\f
+/* This boilerplate for piechart, a subclass of chart_item, was
+   autogenerated by mk-class-boilerplate. */
 
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct chart_item_class piechart_class;
+
+/* Returns true if SUPER is a piechart, otherwise false. */
+static inline bool
+is_piechart (const struct chart_item *super)
+{
+  return super->class == &piechart_class;
+}
+
+/* Returns SUPER converted to piechart.  SUPER must be a piechart, as
+   reported by is_piechart. */
+static inline struct piechart *
+to_piechart (const struct chart_item *super)
+{
+  assert (is_piechart (super));
+  return UP_CAST (super, struct piechart, chart_item);
+}
+
+/* Returns INSTANCE converted to chart_item. */
+static inline struct chart_item *
+piechart_super (const struct piechart *instance)
+{
+  return CONST_CAST (struct chart_item *, &instance->chart_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct piechart *
+piechart_ref (const struct piechart *instance)
+{
+  return to_piechart (chart_item_ref (&instance->chart_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+piechart_unref (struct piechart *instance)
+{
+  chart_item_unref (&instance->chart_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+piechart_is_shared (const struct piechart *instance)
+{
+  return chart_item_is_shared (&instance->chart_item);
+}
+
+static inline void
+piechart_submit (struct piechart *instance)
+{
+  chart_item_submit (&instance->chart_item);
+}
+\f
+#endif /* output/charts/piechart.h */
diff --git a/src/output/charts/plot-chart.c b/src/output/charts/plot-chart.c
deleted file mode 100644 (file)
index 5641db1..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004, 2009 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <plot.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdio.h>
-#include <float.h>
-#include <assert.h>
-#include <math.h>
-
-#include <output/charts/plot-chart.h>
-
-#include <math/chart-geometry.h>
-
-
-
-#include <libpspp/str.h>
-#include <libpspp/assertion.h>
-#include <output/manager.h>
-#include <output/output.h>
-
-#include "xalloc.h"
-
-const char *const data_colour[N_CHART_COLOURS] =
-  {
-    "brown",
-    "red",
-    "orange",
-    "yellow",
-    "green",
-    "blue",
-    "violet",
-    "grey",
-    "pink"
-  };
-
-
-
-/* Draw a tick mark at position
-   If label is non zero, then print it at the tick mark
-*/
-void
-draw_tick(struct chart *chart,
-         enum tick_orientation orientation,
-         double position,
-         const char *label, ...)
-{
-  const int tickSize = 10;
-
-  assert(chart);
-
-  pl_savestate_r(chart->lp);
-
-  pl_move_r(chart->lp, chart->data_left, chart->data_bottom);
-
-  if ( orientation == TICK_ABSCISSA )
-    pl_flinerel_r(chart->lp, position, 0, position, -tickSize);
-  else if (orientation == TICK_ORDINATE )
-      pl_flinerel_r(chart->lp, 0, position, -tickSize, position);
-  else
-    NOT_REACHED ();
-
-  if ( label ) {
-    char buf[10];
-    va_list ap;
-    va_start(ap,label);
-    vsnprintf(buf,10,label,ap);
-
-    if ( orientation == TICK_ABSCISSA )
-      pl_alabel_r(chart->lp, 'c','t', buf);
-    else if (orientation == TICK_ORDINATE )
-      {
-       if ( fabs(position) < DBL_EPSILON )
-           pl_moverel_r(chart->lp, 0, 10);
-
-       pl_alabel_r(chart->lp, 'r','c', buf);
-      }
-
-    va_end(ap);
-  }
-
-  pl_restorestate_r(chart->lp);
-}
-
-
-/* Write the title on a chart*/
-void
-chart_write_title(struct chart *chart, const char *title, ...)
-{
-  va_list ap;
-  char buf[100];
-
-  if ( ! chart )
-         return ;
-
-  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);
-
-  va_start(ap,title);
-  vsnprintf(buf,100,title,ap);
-  pl_alabel_r(chart->lp,0,0,buf);
-  va_end(ap);
-
-  pl_restorestate_r(chart->lp);
-}
-
-
-/* Set the scale for the abscissa */
-void
-chart_write_xscale(struct chart *ch, double min, double max, int ticks)
-{
-  double x;
-
-  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);
-
-  for(x = ch->x_min ; x <= ch->x_max; x += tick_interval )
-    {
-      draw_tick (ch, TICK_ABSCISSA,
-                (x - ch->x_min) * ch->abscissa_scale, "%g", x);
-    }
-
-}
-
-
-/* Set the scale for the ordinate */
-void
-chart_write_yscale(struct chart *ch, double smin, double smax, int ticks)
-{
-  double y;
-
-  const double tick_interval =
-    chart_rounded_tick( (smax - smin) / (double) ticks);
-
-  if ( !ch )
-         return;
-
-  ch->y_max = ceil  ( smax / tick_interval ) * tick_interval ;
-  ch->y_min = floor ( smin / tick_interval ) * tick_interval ;
-
-  ch->ordinate_scale =
-    fabs(ch->data_top -  ch->data_bottom) / fabs(ch->y_max - ch->y_min) ;
-
-  for(y = ch->y_min ; y <= ch->y_max; y += tick_interval )
-    {
-    draw_tick (ch, TICK_ORDINATE,
-              (y - ch->y_min) * ch->ordinate_scale, "%g", y);
-    }
-}
-
-
-/* Write the abscissa label */
-void
-chart_write_xlabel(struct chart *ch, const char *label)
-{
-  if ( ! ch )
-    return ;
-
-  pl_savestate_r(ch->lp);
-
-  pl_move_r(ch->lp,ch->data_left, ch->abscissa_top);
-  pl_alabel_r(ch->lp,0,'t',label);
-
-  pl_restorestate_r(ch->lp);
-
-}
-
-
-
-/* Write the ordinate label */
-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);
-  pl_textangle_r(ch->lp, 90);
-  pl_alabel_r(ch->lp, 0, 0, label);
-
-  pl_restorestate_r(ch->lp);
-}
-
-
-void
-chart_write_legend (struct chart *ch)
-{
-  int i;
-  const int vstep = ch->font_size * 2;
-  const int xpad = 10;
-  const int ypad = 10;
-  const int swatch = 20;
-  const int legend_top = ch->data_top;
-  const int legend_bottom = legend_top -
-    (vstep * ch->n_datasets + 2 * ypad );
-
-  if ( ! ch )
-    return ;
-
-  pl_savestate_r (ch->lp);
-
-  pl_box_r (ch->lp, ch->legend_left, legend_top,
-           ch->legend_right - xpad, legend_bottom);
-
-  for (i = 0 ; i < ch->n_datasets ; ++i )
-    {
-      const int ypos = vstep * (i + 1);
-      const int xpos = ch->legend_left + xpad;
-      pl_move_r (ch->lp, xpos, legend_top - ypos);
-
-      pl_savestate_r(ch->lp);
-       pl_fillcolorname_r (ch->lp, data_colour [ i % N_CHART_COLOURS]);
-
-       pl_pentype_r (ch->lp, 1);
-       pl_filltype_r (ch->lp, 1);
-       pl_boxrel_r (ch->lp, 0, 0, swatch, swatch);
-
-
-      pl_moverel_r (ch->lp, swatch, 0);
-      pl_alabel_r (ch->lp, 0, 0, ch->dataset[i]);
-
-      pl_restorestate_r (ch->lp);
-    }
-
-  pl_restorestate_r (ch->lp);
-}
diff --git a/src/output/charts/plot-chart.h b/src/output/charts/plot-chart.h
deleted file mode 100644 (file)
index cfbaa4d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004, 2009 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdio.h>
-#include <float.h>
-#include <assert.h>
-#include <math.h>
-
-
-#include <math/chart-geometry.h>
-#include <output/chart.h>
-
-#include <libpspp/compiler.h>
-#include <libpspp/str.h>
-#include <output/manager.h>
-#include <output/output.h>
-
-#include "xalloc.h"
-
-#ifndef PLOT_CHART_H
-#define PLOT_CHART_H
-
-#define N_CHART_COLOURS 9
-extern const char *const data_colour[];
-
-enum tick_orientation
-  {
-    TICK_ABSCISSA=0,
-    TICK_ORDINATE
-  };
-
-
-/* Draw a tick mark at position
-   If label is non zero, then print it at the tick mark
-*/
-void draw_tick(struct chart *chart,
-         enum tick_orientation orientation,
-         double position,
-              const char *label, ...)
-  PRINTF_FORMAT (4, 5);
-
-
-/* Write the title on a chart*/
-void   chart_write_title(struct chart *chart, const char *title, ...)
-  PRINTF_FORMAT (2, 3);
-
-
-/* Set the scale for the abscissa */
-void  chart_write_xscale(struct chart *ch, double min, double max, int ticks);
-
-
-/* Set the scale for the ordinate */
-void  chart_write_yscale(struct chart *ch, double smin, double smax, int ticks);
-
-void chart_write_xlabel(struct chart *ch, const char *label) ;
-
-/* Write the ordinate label */
-void  chart_write_ylabel(struct chart *ch, const char *label);
-
-void chart_write_legend (struct chart *ch);
-
-#endif
diff --git a/src/output/charts/plot-hist-cairo.c b/src/output/charts/plot-hist-cairo.c
new file mode 100644 (file)
index 0000000..a70fa17
--- /dev/null
@@ -0,0 +1,162 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/charts/plot-hist.h>
+
+#include <gsl/gsl_randist.h>
+
+#include <data/val-type.h>
+#include <output/cairo-chart.h>
+
+#include "gl/xvasprintf.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+/* Write the legend of the chart */
+static void
+histogram_write_legend (cairo_t *cr, const struct xrchart_geometry *geom,
+                        double n, double mean, double stddev)
+{
+  double y = geom->data_bottom;
+  cairo_save (cr);
+
+  if (n != SYSMIS)
+    {
+      char *buf = xasprintf ("N = %.2f", n);
+      cairo_move_to (cr, geom->legend_left, y);
+      xrchart_label (cr, 'l', 'b', geom->font_size, buf);
+      y += geom->font_size * 1.5;
+      free (buf);
+    }
+
+  if (mean != SYSMIS)
+    {
+      char *buf = xasprintf ("Mean = %.1f", mean);
+      cairo_move_to (cr,geom->legend_left, y);
+      xrchart_label (cr, 'l', 'b', geom->font_size, buf);
+      y += geom->font_size * 1.5;
+      free (buf);
+    }
+
+  if (stddev != SYSMIS)
+    {
+      char *buf = xasprintf ("Std. Dev = %.2f", stddev);
+      cairo_move_to (cr, geom->legend_left, y);
+      xrchart_label (cr, 'l', 'b', geom->font_size, buf);
+      free (buf);
+    }
+
+  cairo_restore (cr);
+}
+
+static void
+hist_draw_bar (cairo_t *cr, const struct xrchart_geometry *geom,
+               const gsl_histogram *h, int bar)
+{
+  double upper;
+  double lower;
+  double height;
+
+  const size_t bins = gsl_histogram_bins (h);
+  const double x_pos = (geom->data_right - geom->data_left) * bar / (double) bins ;
+  const double width = (geom->data_right - geom->data_left) / (double) bins ;
+
+  assert ( 0 == gsl_histogram_get_range (h, bar, &lower, &upper));
+
+  assert ( upper >= lower);
+
+  height = gsl_histogram_get (h, bar) *
+    (geom->data_top - geom->data_bottom) / gsl_histogram_max_val (h);
+
+  cairo_rectangle (cr, geom->data_left + x_pos, geom->data_bottom,
+                   width, height);
+  cairo_save (cr);
+  cairo_set_source_rgb (cr,
+                        geom->fill_colour.red / 255.0,
+                        geom->fill_colour.green / 255.0,
+                        geom->fill_colour.blue / 255.0);
+  cairo_fill_preserve (cr);
+  cairo_restore (cr);
+  cairo_stroke (cr);
+
+  draw_tick (cr, geom, TICK_ABSCISSA,
+             x_pos + width / 2.0, "%g", (upper + lower) / 2.0);
+}
+
+void
+xrchart_draw_histogram (const struct chart_item *chart_item, cairo_t *cr,
+                        struct xrchart_geometry *geom)
+{
+  struct histogram_chart *h = to_histogram_chart (chart_item);
+  int i;
+  int bins;
+
+  xrchart_write_title (cr, geom, _("HISTOGRAM"));
+
+  xrchart_write_ylabel (cr, geom, _("Frequency"));
+  xrchart_write_xlabel (cr, geom, chart_item_get_title (chart_item));
+
+  if (h->gsl_hist == NULL)
+    {
+      /* Probably all values are SYSMIS. */
+      return;
+    }
+
+  bins = gsl_histogram_bins (h->gsl_hist);
+
+  xrchart_write_yscale (cr, geom, 0, gsl_histogram_max_val (h->gsl_hist), 5);
+
+  for (i = 0; i < bins; i++)
+    hist_draw_bar (cr, geom, h->gsl_hist, i);
+
+  histogram_write_legend (cr, geom, h->n, h->mean, h->stddev);
+
+  if (h->show_normal
+      && h->n != SYSMIS && h->mean != SYSMIS && h->stddev != SYSMIS)
+    {
+      /* Draw the normal curve */
+      double d;
+      double x_min, x_max, not_used;
+      double abscissa_scale;
+      double ordinate_scale;
+      double range;
+
+      gsl_histogram_get_range (h->gsl_hist, 0, &x_min, &not_used);
+      range = not_used - x_min;
+      gsl_histogram_get_range (h->gsl_hist, bins - 1, &not_used, &x_max);
+
+      abscissa_scale = (geom->data_right - geom->data_left) / (x_max - x_min);
+      ordinate_scale = (geom->data_top - geom->data_bottom) /
+       gsl_histogram_max_val (h->gsl_hist);
+
+      cairo_move_to (cr, geom->data_left, geom->data_bottom);
+      for (d = geom->data_left;
+          d <= geom->data_right;
+          d += (geom->data_right - geom->data_left) / 100.0)
+       {
+         const double x = (d - geom->data_left) / abscissa_scale + x_min;
+         const double y = h->n * range *
+           gsl_ran_gaussian_pdf (x - h->mean, h->stddev);
+
+          cairo_line_to (cr, d, geom->data_bottom  + y * ordinate_scale);
+
+       }
+      cairo_stroke (cr);
+    }
+}
index fbf1925e635e165c3c096d119bace8123fa0d5bc..5925df6d1a35af5d0122f75312b497bc01e68eb8 100644 (file)
 #include <config.h>
 
 #include <stdio.h>
-#include <plot.h>
 #include <math.h>
-#include <gsl/gsl_histogram.h>
 #include <gsl/gsl_randist.h>
 #include <assert.h>
 
 #include <output/charts/plot-hist.h>
-#include <output/charts/plot-chart.h>
+#include <output/chart-item-provider.h>
 
-#include <data/variable.h>
-#include <libpspp/hash.h>
-#include <output/chart.h>
+#include <libpspp/cast.h>
 #include <math/histogram.h>
 #include <math/moments.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-/* Write the legend of the chart */
-static void
-histogram_write_legend (struct chart *ch, double n, double mean, double stddev)
+/* Plots a histogram of the data in HIST with the given LABEL.
+   Labels the histogram with each of N, MEAN, and STDDEV that is
+   not SYSMIS.  If all three are not SYSMIS and SHOW_NORMAL is
+   true, also draws a normal curve on the histogram. */
+struct chart_item *
+histogram_chart_create (const gsl_histogram *hist, const char *label,
+                        double n, double mean, double stddev,
+                        bool show_normal)
 {
-  char buf[100];
-
-  if (!ch)
-    return ;
-
-  pl_savestate_r (ch->lp);
-
-  sprintf (buf, "N = %.2f", n);
-  pl_move_r (ch->lp, ch->legend_left, ch->data_bottom);
-  pl_alabel_r (ch->lp, 0, 'b', buf);
-
-  sprintf (buf, "Mean = %.1f", mean);
-  pl_fmove_r (ch->lp,ch->legend_left,ch->data_bottom + ch->font_size * 1.5);
-  pl_alabel_r (ch->lp, 0, 'b', buf);
-
-  sprintf (buf, "Std. Dev = %.2f", stddev);
-  pl_fmove_r (ch->lp, ch->legend_left, ch->data_bottom + ch->font_size * 1.5 * 2);
-  pl_alabel_r (ch->lp, 0, 'b', buf);
-
-  pl_restorestate_r (ch->lp);
+  struct histogram_chart *h;
+
+  h = xmalloc (sizeof *h);
+  chart_item_init (&h->chart_item, &histogram_chart_class, label);
+  h->gsl_hist = hist != NULL ? gsl_histogram_clone (hist) : NULL;
+  h->n = n;
+  h->mean = mean;
+  h->stddev = stddev;
+  h->show_normal = show_normal;
+  return &h->chart_item;
 }
 
-static void hist_draw_bar (struct chart *ch, const struct histogram *hist, int bar);
-
-
 static void
-hist_draw_bar (struct chart *ch, const struct histogram *hist, int bar)
-{
-  if (!ch)
-    return ;
-
-  {
-    double upper;
-    double lower;
-    double height;
-
-    const size_t bins = gsl_histogram_bins (hist->gsl_hist);
-    const double x_pos = (ch->data_right - ch->data_left) * bar / (double) bins ;
-    const double width = (ch->data_right - ch->data_left) / (double) bins ;
-
-    assert ( 0 == gsl_histogram_get_range (hist->gsl_hist, bar, &lower, &upper));
-
-    assert ( upper >= lower);
-
-    height = gsl_histogram_get (hist->gsl_hist, bar) *
-     (ch->data_top - ch->data_bottom) / gsl_histogram_max_val (hist->gsl_hist);
-
-    pl_savestate_r (ch->lp);
-    pl_move_r (ch->lp,ch->data_left, ch->data_bottom);
-    pl_fillcolorname_r (ch->lp, ch->fill_colour);
-    pl_filltype_r (ch->lp,1);
-
-
-    pl_fboxrel_r (ch->lp,
-                x_pos, 0,
-                x_pos + width, height);
-
-    pl_restorestate_r (ch->lp);
-
-    draw_tick (ch, TICK_ABSCISSA,
-               x_pos + width / 2.0, "%g", (upper + lower) / 2.0);
-  }
-}
-
-
-
-void
-histogram_plot (const struct histogram *hist,
-               const char *label,
-               const struct moments1 *m)
-{
-  double mean, var, n;
-
-  moments1_calculate (m, &n, &mean, &var, NULL,  NULL);
-
-  histogram_plot_n (hist, label, n, mean, sqrt(var), m);
-}
-
-
-/* This function is deprecated.  Don't use it in new code */
-void
-histogram_plot_n (const struct histogram *hist,
-                 const char *label,
-                 double n, double mean, double stddev,
-                 bool show_normal)
+histogram_chart_destroy (struct chart_item *chart_item)
 {
-  int i;
-  int bins;
-
-  struct chart *ch = chart_create ();
-
-  chart_write_title (ch, _("HISTOGRAM"));
-
-  chart_write_ylabel (ch, _("Frequency"));
-  chart_write_xlabel (ch, label);
-
-  if ( ! hist ) /* If this happens, probably all values are SYSMIS */
-    {
-      chart_submit (ch);
-      return;
-    }
-  else
-    {
-      bins = gsl_histogram_bins (hist->gsl_hist);
-    }
-
-  chart_write_yscale (ch, 0, gsl_histogram_max_val (hist->gsl_hist), 5);
-
-  for ( i = 0 ; i < bins ; ++i )
-    hist_draw_bar (ch, hist, i);
-
-  histogram_write_legend (ch, n, mean, stddev);
-
-  if (show_normal)
-    {
-      /* Draw the normal curve */
-
-      double d ;
-      double x_min, x_max, not_used ;
-      double abscissa_scale ;
-      double ordinate_scale ;
-      double range ;
-
-      gsl_histogram_get_range (hist->gsl_hist, 0, &x_min, &not_used);
-      range = not_used - x_min;
-      gsl_histogram_get_range (hist->gsl_hist, bins - 1, &not_used, &x_max);
-
-      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->gsl_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)
-       {
-         const double x = (d - ch->data_left) / abscissa_scale + x_min ;
-         const double y = n * range *
-           gsl_ran_gaussian_pdf (x - mean, stddev);
-
-         pl_fcont_r (ch->lp,  d,  ch->data_bottom  + y * ordinate_scale);
-
-       }
-      pl_endpath_r (ch->lp);
-    }
-
-  chart_submit (ch);
+  struct histogram_chart *h = UP_CAST (chart_item, struct histogram_chart,
+                                       chart_item);
+  if (h->gsl_hist != NULL)
+    gsl_histogram_free (h->gsl_hist);
+  free (h);
 }
 
-
+const struct chart_item_class histogram_chart_class =
+  {
+    histogram_chart_destroy
+  };
index 606206d5012c47d4e7b239e0a0230bf1788cea8e..237b8b3c11ef7d2ac612675ef879b456a96cf714 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
-#ifndef PLOT_HIST_H
-#define PLOT_HIST_H
+#ifndef OUTPUT_PLOT_HIST_H
+#define OUTPUT_PLOT_HIST_H
 
+#include <gsl/gsl_histogram.h>
 #include <stdbool.h>
 
-struct chart;
-struct moments1;
-struct histogram;
+#include "output/chart-item.h"
 
-/* Plot M onto histogram HIST and label it with LABEL */
-void histogram_plot (const struct histogram *hist,
-                    const char *label,  const struct moments1 *m);
+struct histogram_chart
+  {
+    struct chart_item chart_item;
+    gsl_histogram *gsl_hist;
+    double n;
+    double mean;
+    double stddev;
+    bool show_normal;
+  };
 
+/* Creates and returns a new chart that depicts a histogram of
+   the data in HIST with the given LABEL.  Labels the histogram
+   with each of N, MEAN, and STDDEV that is not SYSMIS.  If all
+   three are not SYSMIS and SHOW_NORMAL is true, also draws a
+   normal curve on the histogram. */
+struct chart_item *histogram_chart_create (const gsl_histogram *,
+                                           const char *label, double n,
+                                           double mean, double stddev,
+                                           bool show_normal);
+\f
+/* This boilerplate for histogram_chart, a subclass of chart_item, was
+   autogenerated by mk-class-boilerplate. */
 
-/* A wrapper aroud histogram_plot.
-   Don't use this function.  It's legacy only */
-void histogram_plot_n (const struct histogram *hist,
-                      const char *label,
-                      double n, double mean, double var,
-                      bool show_normal);
+#include <assert.h>
+#include <libpspp/cast.h>
 
+extern const struct chart_item_class histogram_chart_class;
 
-#endif
+/* Returns true if SUPER is a histogram_chart, otherwise false. */
+static inline bool
+is_histogram_chart (const struct chart_item *super)
+{
+  return super->class == &histogram_chart_class;
+}
+
+/* Returns SUPER converted to histogram_chart.  SUPER must be a histogram_chart, as
+   reported by is_histogram_chart. */
+static inline struct histogram_chart *
+to_histogram_chart (const struct chart_item *super)
+{
+  assert (is_histogram_chart (super));
+  return UP_CAST (super, struct histogram_chart, chart_item);
+}
+
+/* Returns INSTANCE converted to chart_item. */
+static inline struct chart_item *
+histogram_chart_super (const struct histogram_chart *instance)
+{
+  return CONST_CAST (struct chart_item *, &instance->chart_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct histogram_chart *
+histogram_chart_ref (const struct histogram_chart *instance)
+{
+  return to_histogram_chart (chart_item_ref (&instance->chart_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+histogram_chart_unref (struct histogram_chart *instance)
+{
+  chart_item_unref (&instance->chart_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+histogram_chart_is_shared (const struct histogram_chart *instance)
+{
+  return chart_item_is_shared (&instance->chart_item);
+}
+
+static inline void
+histogram_chart_submit (struct histogram_chart *instance)
+{
+  chart_item_submit (&instance->chart_item);
+}
+\f
+#endif /* output/plot-hist.h */
diff --git a/src/output/charts/roc-chart-cairo.c b/src/output/charts/roc-chart-cairo.c
new file mode 100644 (file)
index 0000000..b5c22ac
--- /dev/null
@@ -0,0 +1,73 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/charts/roc-chart.h>
+
+#include <data/case.h>
+#include <data/casereader.h>
+#include <language/stats/roc.h>
+#include <output/cairo-chart.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+void
+xrchart_draw_roc (const struct chart_item *chart_item, cairo_t *cr,
+                  struct xrchart_geometry *geom)
+{
+  const struct roc_chart *rc = to_roc_chart (chart_item);
+  size_t i;
+
+  xrchart_write_title (cr, geom, _("ROC Curve"));
+  xrchart_write_xlabel (cr, geom, _("1 - Specificity"));
+  xrchart_write_ylabel (cr, geom, _("Sensitivity"));
+
+  xrchart_write_xscale (cr, geom, 0, 1, 5);
+  xrchart_write_yscale (cr, geom, 0, 1, 5);
+
+  if ( rc->reference )
+    {
+      xrchart_line (cr, geom, 1.0, 0,
+                    0.0, 1.0,
+                    XRCHART_DIM_X);
+    }
+
+  for (i = 0; i < rc->n_vars; ++i)
+    {
+      const struct roc_var *rv = &rc->vars[i];
+      struct casereader *r = casereader_clone (rv->cutpoint_reader);
+      struct ccase *cc;
+
+      xrchart_vector_start (cr, geom, rv->name);
+      for (; (cc = casereader_read (r)) != NULL; case_unref (cc))
+       {
+         double se = case_data_idx (cc, ROC_TP)->f;
+         double sp = case_data_idx (cc, ROC_TN)->f;
+
+         se /= case_data_idx (cc, ROC_FN)->f + case_data_idx (cc, ROC_TP)->f ;
+         sp /= case_data_idx (cc, ROC_TN)->f + case_data_idx (cc, ROC_FP)->f ;
+
+         xrchart_vector (cr, geom, 1 - sp, se);
+       }
+      xrchart_vector_end (cr, geom);
+      casereader_destroy (r);
+    }
+
+  xrchart_write_legend (cr, geom);
+}
+
diff --git a/src/output/charts/roc-chart.c b/src/output/charts/roc-chart.c
new file mode 100644 (file)
index 0000000..5af8f27
--- /dev/null
@@ -0,0 +1,75 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/charts/roc-chart.h>
+
+#include <output/chart-item-provider.h>
+#include <data/casereader.h>
+#include <language/stats/roc.h>
+
+#include "xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+struct roc_chart *
+roc_chart_create (bool reference)
+{
+  struct roc_chart *rc = xmalloc (sizeof *rc);
+  chart_item_init (&rc->chart_item, &roc_chart_class, NULL);
+  rc->reference = reference;
+  rc->vars = NULL;
+  rc->n_vars = 0;
+  rc->allocated_vars = 0;
+  return rc;
+}
+
+void
+roc_chart_add_var (struct roc_chart *rc, const char *var_name,
+                   const struct casereader *cutpoint_reader)
+{
+  struct roc_var *rv;
+
+  if (rc->n_vars >= rc->allocated_vars)
+    rc->vars = x2nrealloc (rc->vars, &rc->allocated_vars, sizeof *rc->vars);
+
+  rv = &rc->vars[rc->n_vars++];
+  rv->name = xstrdup (var_name);
+  rv->cutpoint_reader = casereader_clone (cutpoint_reader);
+}
+
+static void
+roc_chart_destroy (struct chart_item *chart_item)
+{
+  struct roc_chart *rc = UP_CAST (chart_item, struct roc_chart, chart_item);
+  size_t i;
+
+  for (i = 0; i < rc->n_vars; i++)
+    {
+      struct roc_var *rv = &rc->vars[i];
+      free (rv->name);
+      casereader_destroy (rv->cutpoint_reader);
+    }
+  free (rc->vars);
+  free (rc);
+}
+
+const struct chart_item_class roc_chart_class =
+  {
+    roc_chart_destroy
+  };
diff --git a/src/output/charts/roc-chart.h b/src/output/charts/roc-chart.h
new file mode 100644 (file)
index 0000000..a995f93
--- /dev/null
@@ -0,0 +1,103 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_CHARTS_ROC_CHART_H
+#define OUTPUT_CHARTS_ROC_CHART_H 1
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <output/chart-item.h>
+
+struct roc_chart
+  {
+    struct chart_item chart_item;
+    bool reference;
+    struct roc_var *vars;
+    size_t n_vars;
+    size_t allocated_vars;
+  };
+
+struct roc_var
+  {
+    char *name;
+    struct casereader *cutpoint_reader;
+  };
+
+struct roc_chart *roc_chart_create (bool reference);
+void roc_chart_add_var (struct roc_chart *, const char *var_name,
+                        const struct casereader *cutpoint_reader);
+\f
+/* This boilerplate for roc_chart, a subclass of chart_item, was
+   autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct chart_item_class roc_chart_class;
+
+/* Returns true if SUPER is a roc_chart, otherwise false. */
+static inline bool
+is_roc_chart (const struct chart_item *super)
+{
+  return super->class == &roc_chart_class;
+}
+
+/* Returns SUPER converted to roc_chart.  SUPER must be a roc_chart, as
+   reported by is_roc_chart. */
+static inline struct roc_chart *
+to_roc_chart (const struct chart_item *super)
+{
+  assert (is_roc_chart (super));
+  return UP_CAST (super, struct roc_chart, chart_item);
+}
+
+/* Returns INSTANCE converted to chart_item. */
+static inline struct chart_item *
+roc_chart_super (const struct roc_chart *instance)
+{
+  return CONST_CAST (struct chart_item *, &instance->chart_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct roc_chart *
+roc_chart_ref (const struct roc_chart *instance)
+{
+  return to_roc_chart (chart_item_ref (&instance->chart_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+roc_chart_unref (struct roc_chart *instance)
+{
+  chart_item_unref (&instance->chart_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+roc_chart_is_shared (const struct roc_chart *instance)
+{
+  return chart_item_is_shared (&instance->chart_item);
+}
+
+static inline void
+roc_chart_submit (struct roc_chart *instance)
+{
+  chart_item_submit (&instance->chart_item);
+}
+\f
+#endif /* output/charts/roc-chart.h */
diff --git a/src/output/charts/scree-cairo.c b/src/output/charts/scree-cairo.c
new file mode 100644 (file)
index 0000000..d48a364
--- /dev/null
@@ -0,0 +1,65 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/charts/scree.h>
+
+#include <math.h>
+
+#include <output/cairo-chart.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+void
+xrchart_draw_scree (const struct chart_item *chart_item, cairo_t *cr,
+                    struct xrchart_geometry *geom)
+{
+  const struct scree *rc = to_scree (chart_item);
+  size_t i;
+  double min, max;
+
+  xrchart_write_title (cr, geom, _("Scree Plot"));
+  xrchart_write_xlabel (cr, geom, rc->xlabel);
+  xrchart_write_ylabel (cr, geom, _("Eigenvalue"));
+
+  gsl_vector_minmax (rc->eval, &min, &max);
+
+  if ( fabs (max) > fabs (min))
+    max = fabs (max);
+  else
+    max = fabs (min);
+
+  xrchart_write_yscale (cr, geom, 0, max, max);
+  xrchart_write_xscale (cr, geom, 0, rc->eval->size + 1, rc->eval->size + 1);
+
+  xrchart_vector_start (cr, geom, "");
+  for (i = 0 ; i < rc->eval->size; ++i)
+    {
+      const double x = 1 + i;
+      const double y = gsl_vector_get (rc->eval, i);
+      xrchart_vector (cr, geom, x, y);
+    }
+  xrchart_vector_end (cr, geom);
+
+  for (i = 0 ; i < rc->eval->size; ++i)
+    {
+      const double x = 1 + i;
+      const double y = gsl_vector_get (rc->eval, i);
+      xrchart_datum (cr, geom, 0, x, y);
+    }
+}
diff --git a/src/output/charts/scree.c b/src/output/charts/scree.c
new file mode 100644 (file)
index 0000000..ffa7756
--- /dev/null
@@ -0,0 +1,55 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/charts/scree.h>
+
+#include <output/chart-item-provider.h>
+
+#include "gl/xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+struct scree *
+scree_create (const gsl_vector *eigenvalues, const char *xlabel)
+{
+  struct scree *rc = xmalloc (sizeof *rc);
+  chart_item_init (&rc->chart_item, &scree_class, NULL);
+
+  rc->eval = gsl_vector_alloc (eigenvalues->size);
+  gsl_vector_memcpy (rc->eval, eigenvalues);
+
+  rc->xlabel = xstrdup (xlabel);
+
+  return rc;
+}
+
+static void
+scree_destroy (struct chart_item *chart_item)
+{
+  struct scree *rc = to_scree (chart_item);
+
+  gsl_vector_free (rc->eval);
+  free (rc->xlabel);
+  free (rc);
+}
+
+const struct chart_item_class scree_class =
+  {
+    scree_destroy
+  };
diff --git a/src/output/charts/scree.h b/src/output/charts/scree.h
new file mode 100644 (file)
index 0000000..43f5b82
--- /dev/null
@@ -0,0 +1,97 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_CHARTS_SCREE_H
+#define OUTPUT_CHARTS_SCREE_H 1
+
+#include <gsl/gsl_vector.h>
+#include <output/chart-item.h>
+
+/* A scree plot. */
+struct scree
+  {
+    struct chart_item chart_item;
+    gsl_vector *eval;
+    char *xlabel;
+  };
+
+/* Create a "Scree Plot" of EIGENVALUES with LABEL on the X Axis */
+struct scree *scree_create (const gsl_vector *eigenvalues, const char *label);
+
+/* Return the chart underlying SCREE */
+struct chart *scree_get_chart (struct scree *scree);
+\f
+/* This boilerplate for scree, a subclass of chart_item, was
+   autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct chart_item_class scree_class;
+
+/* Returns true if SUPER is a scree, otherwise false. */
+static inline bool
+is_scree (const struct chart_item *super)
+{
+  return super->class == &scree_class;
+}
+
+/* Returns SUPER converted to scree.  SUPER must be a scree, as
+   reported by is_scree. */
+static inline struct scree *
+to_scree (const struct chart_item *super)
+{
+  assert (is_scree (super));
+  return UP_CAST (super, struct scree, chart_item);
+}
+
+/* Returns INSTANCE converted to chart_item. */
+static inline struct chart_item *
+scree_super (const struct scree *instance)
+{
+  return CONST_CAST (struct chart_item *, &instance->chart_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct scree *
+scree_ref (const struct scree *instance)
+{
+  return to_scree (chart_item_ref (&instance->chart_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+scree_unref (struct scree *instance)
+{
+  chart_item_unref (&instance->chart_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+scree_is_shared (const struct scree *instance)
+{
+  return chart_item_is_shared (&instance->chart_item);
+}
+
+static inline void
+scree_submit (struct scree *instance)
+{
+  chart_item_submit (&instance->chart_item);
+}
+\f
+#endif /* output/charts/scree.h */
diff --git a/src/output/csv.c b/src/output/csv.c
new file mode 100644 (file)
index 0000000..626dc2f
--- /dev/null
@@ -0,0 +1,255 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+#include "data/file-name.h"
+#include "libpspp/assertion.h"
+#include "libpspp/compiler.h"
+#include "libpspp/message.h"
+#include "libpspp/string-map.h"
+#include "output/text-item.h"
+#include "output/driver-provider.h"
+#include "output/options.h"
+#include "output/message-item.h"
+#include "output/table-item.h"
+#include "output/table-provider.h"
+
+#include "gl/error.h"
+#include "gl/xalloc.h"
+#include "gl/xvasprintf.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+/* Comma-separated value output driver. */
+struct csv_driver
+  {
+    struct output_driver driver;
+
+    char *separator;            /* Comma or tab. */
+    char *file_name;            /* Output file name. */
+    char *command_name;         /* Current command. */
+    FILE *file;                 /* Output file. */
+    int n_items;                /* Number of items output so far. */
+  };
+
+static const struct output_driver_class csv_driver_class;
+
+static struct csv_driver *
+csv_driver_cast (struct output_driver *driver)
+{
+  assert (driver->class == &csv_driver_class);
+  return UP_CAST (driver, struct csv_driver, driver);
+}
+
+static struct driver_option *
+opt (struct output_driver *d, struct string_map *options, const char *key,
+     const char *default_value)
+{
+  return driver_option_get (d, options, key, default_value);
+}
+
+static struct output_driver *
+csv_create (const char *file_name, enum settings_output_devices device_type,
+            struct string_map *o)
+{
+  struct output_driver *d;
+  struct csv_driver *csv;
+
+  csv = xzalloc (sizeof *csv);
+  d = &csv->driver;
+  output_driver_init (&csv->driver, &csv_driver_class, file_name, device_type);
+
+  csv->separator = parse_string (opt (d, o, "separator", ","));
+  csv->file_name = xstrdup (file_name);
+  csv->file = fn_open (csv->file_name, "w");
+  csv->n_items = 0;
+
+  if (csv->file == NULL)
+    {
+      error (0, errno, _("error opening output file \"%s\""), csv->file_name);
+      output_driver_destroy (d);
+      return NULL;
+    }
+
+  return d;
+}
+
+static void
+csv_destroy (struct output_driver *driver)
+{
+  struct csv_driver *csv = csv_driver_cast (driver);
+
+  if (csv->file != NULL)
+    fn_close (csv->file_name, csv->file);
+
+  free (csv->separator);
+  free (csv->file_name);
+  free (csv);
+}
+
+static void
+csv_flush (struct output_driver *driver)
+{
+  struct csv_driver *csv = csv_driver_cast (driver);
+  if (csv->file != NULL)
+    fflush (csv->file);
+}
+
+static void
+csv_output_field (FILE *file, const char *field)
+{
+  while (*field == ' ')
+    field++;
+
+  if (field[strcspn (field, "\"\n\r,\t")])
+    {
+      const char *p;
+
+      putc ('"', file);
+      for (p = field; *p != '\0'; p++)
+        {
+          if (*p == '"')
+            putc ('"', file);
+          putc (*p, file);
+        }
+      putc ('"', file);
+    }
+  else
+    fputs (field, file);
+}
+
+static void
+csv_output_field_format (FILE *file, const char *format, ...)
+  PRINTF_FORMAT (2, 3);
+
+static void
+csv_output_field_format (FILE *file, const char *format, ...)
+{
+  va_list args;
+  char *s;
+
+  va_start (args, format);
+  s = xvasprintf (format, args);
+  va_end (args);
+
+  csv_output_field (file, s);
+  free (s);
+}
+
+static void
+csv_put_separator (struct csv_driver *csv)
+{
+  if (csv->n_items++ > 0)
+    putc ('\n', csv->file);
+}
+
+static void
+csv_submit (struct output_driver *driver,
+            const struct output_item *output_item)
+{
+  struct csv_driver *csv = csv_driver_cast (driver);
+
+  output_driver_track_current_command (output_item, &csv->command_name);
+
+  if (is_table_item (output_item))
+    {
+      struct table_item *table_item = to_table_item (output_item);
+      const char *caption = table_item_get_caption (table_item);
+      const struct table *t = table_item_get_table (table_item);
+      int x, y;
+
+      csv_put_separator (csv);
+
+      if (caption != NULL)
+        {
+          csv_output_field_format (csv->file, "Table: %s", caption);
+          putc ('\n', csv->file);
+        }
+
+      for (y = 0; y < table_nr (t); y++)
+        {
+          for (x = 0; x < table_nc (t); x++)
+            {
+              struct table_cell cell;
+
+              table_get_cell (t, x, y, &cell);
+
+              if (x > 0)
+                fputs (csv->separator, csv->file);
+
+              if (x != cell.d[TABLE_HORZ][0] || y != cell.d[TABLE_VERT][0])
+                csv_output_field (csv->file, "");
+              else
+                csv_output_field (csv->file, cell.contents);
+
+              table_cell_free (&cell);
+            }
+          putc ('\n', csv->file);
+        }
+    }
+  else if (is_text_item (output_item))
+    {
+      const struct text_item *text_item = to_text_item (output_item);
+      enum text_item_type type = text_item_get_type (text_item);
+      const char *text = text_item_get_text (text_item);
+
+      if (type == TEXT_ITEM_COMMAND_OPEN || type == TEXT_ITEM_COMMAND_CLOSE
+          || type == TEXT_ITEM_SYNTAX)
+        return;
+
+      csv_put_separator (csv);
+      switch (type)
+        {
+        case TEXT_ITEM_TITLE:
+          csv_output_field_format (csv->file, "Title: %s", text);
+          break;
+
+        case TEXT_ITEM_SUBTITLE:
+          csv_output_field_format (csv->file, "Subtitle: %s", text);
+          break;
+
+        default:
+          csv_output_field (csv->file, text);
+          break;
+        }
+      putc ('\n', csv->file);
+    }
+  else if (is_message_item (output_item))
+    {
+      const struct message_item *message_item = to_message_item (output_item);
+      const struct msg *msg = message_item_get_msg (message_item);
+      char *s = msg_to_string (msg, csv->command_name);
+      csv_put_separator (csv);
+      csv_output_field (csv->file, s);
+      free (s);
+      putc ('\n', csv->file);
+    }
+}
+
+struct output_driver_factory csv_driver_factory = { "csv", csv_create };
+
+static const struct output_driver_class csv_driver_class =
+  {
+    "csv",
+    csv_destroy,
+    csv_submit,
+    csv_flush,
+  };
diff --git a/src/output/driver-provider.h b/src/output/driver-provider.h
new file mode 100644 (file)
index 0000000..df31637
--- /dev/null
@@ -0,0 +1,101 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_DRIVER_PROVIDER_H
+#define OUTPUT_DRIVER_PROVIDER_H 1
+
+#include <stdbool.h>
+
+#include "data/settings.h"
+#include "libpspp/compiler.h"
+#include "output/driver.h"
+
+struct output_item;
+struct string_map;
+
+/* A configured output driver. */
+struct output_driver
+  {
+    const struct output_driver_class *class; /* Driver class. */
+    char *name;                              /* Name of this driver. */
+    enum settings_output_devices device_type; /* One of SETTINGS_DEVICE_*. */
+  };
+
+void output_driver_init (struct output_driver *,
+                         const struct output_driver_class *,
+                         const char *name, enum settings_output_devices);
+void output_driver_destroy (struct output_driver *);
+
+const char *output_driver_get_name (const struct output_driver *);
+
+/* One kind of output driver.
+
+   Output driver implementations must not call msg() to report errors.  This
+   can lead to reentrance in the output driver, because msg() may report error
+   messages using the output drivers.  Instead, this code should report errors
+   with error(), which will never call into the output drivers.  */
+struct output_driver_class
+  {
+    /* Name of this driver class. */
+    const char *name;
+
+    /* Closes and frees DRIVER. */
+    void (*destroy) (struct output_driver *driver);
+
+    /* Passes ITEM to DRIVER to be written as output.  The caller retains
+       ownership of ITEM (but DRIVER may keep a copy of it by incrementing the
+       reference count by calling output_item_ref). */
+    void (*submit) (struct output_driver *driver,
+                    const struct output_item *item);
+
+    /* Ensures that any output items passed to the 'submit' function for DRIVER
+       have actually been displayed.
+
+       This is called from the text-based UI before showing the command prompt,
+       to ensure that the user has actually been shown any preceding output If
+       it doesn't make sense for DRIVER to be used this way, then this function
+       need not do anything. */
+    void (*flush) (struct output_driver *driver);
+  };
+
+/* Useful for output driver implementation. */
+void output_driver_track_current_command (const struct output_item *, char **);
+\f
+/* An abstract way for the output subsystem to create an output driver. */
+struct output_driver_factory
+  {
+    /* The file extension, without the leading dot, e.g. "pdf". */
+    const char *extension;
+
+    /* Creates a new output driver of this class.  NAME and TYPE should be
+       passed directly to output_driver_init.  Returns the new output driver if
+       successful, otherwise a null pointer.
+
+       It is up to the driver class to decide how to interpret OPTIONS.  The
+       create function should delete pairs that it understands from OPTIONS,
+       because the caller may issue errors about unknown options for any pairs
+       that remain.  The functions in output/options.h can be useful.
+
+       The returned driver should not have been registered (with
+       output_driver_register).  The caller will register the driver (if this
+       is desirable). */
+    struct output_driver *(*create) (const char *name,
+                                     enum settings_output_devices type,
+                                     struct string_map *options);
+  };
+
+
+#endif /* output/driver-provider.h */
diff --git a/src/output/driver.c b/src/output/driver.c
new file mode 100644 (file)
index 0000000..6d83635
--- /dev/null
@@ -0,0 +1,352 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "output/driver.h"
+#include "output/driver-provider.h"
+
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "data/file-name.h"
+#include "data/settings.h"
+#include "libpspp/array.h"
+#include "libpspp/assertion.h"
+#include "libpspp/message.h"
+#include "libpspp/llx.h"
+#include "libpspp/string-map.h"
+#include "libpspp/string-set.h"
+#include "libpspp/str.h"
+#include "output/message-item.h"
+#include "output/output-item.h"
+#include "output/text-item.h"
+
+#include "gl/error.h"
+#include "gl/xalloc.h"
+#include "gl/xmemdup0.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+static const struct output_driver_factory *factories[];
+
+/* Drivers currently registered with output_driver_register(). */
+static struct llx_list drivers = LLX_INITIALIZER (drivers);
+
+static struct output_item *deferred_syntax;
+static bool in_command;
+
+void
+output_close (void)
+{
+  while (!llx_is_empty (&drivers))
+    {
+      struct output_driver *d = llx_pop_head (&drivers, &llx_malloc_mgr);
+      output_driver_destroy (d);
+    }
+}
+
+void
+output_get_supported_formats (struct string_set *formats)
+{
+  const struct output_driver_factory **fp;
+
+  for (fp = factories; *fp != NULL; fp++)
+    string_set_insert (formats, (*fp)->extension);
+}
+
+static void
+output_submit__ (struct output_item *item)
+{
+  struct llx *llx, *next;
+
+  for (llx = llx_head (&drivers); llx != llx_null (&drivers); llx = next)
+    {
+      struct output_driver *d = llx_data (llx);
+      enum settings_output_type type;
+
+      next = llx_next (llx);
+
+      if (is_message_item (item))
+        {
+          const struct msg *m = message_item_get_msg (to_message_item (item));
+          if (m->severity == MSG_S_NOTE)
+            type = SETTINGS_OUTPUT_NOTE;
+          else
+            type = SETTINGS_OUTPUT_ERROR;
+        }
+      else if (is_text_item (item)
+               && text_item_get_type (to_text_item (item)) == TEXT_ITEM_SYNTAX)
+        type = SETTINGS_OUTPUT_SYNTAX;
+      else
+        type = SETTINGS_OUTPUT_RESULT;
+
+      if (settings_get_output_routing (type) & d->device_type)
+        d->class->submit (d, item);
+    }
+
+  output_item_unref (item);
+}
+
+static void
+flush_deferred_syntax (void)
+{
+  if (deferred_syntax != NULL)
+    {
+      output_submit__ (deferred_syntax);
+      deferred_syntax = NULL;
+    }
+}
+
+/* Submits ITEM to the configured output drivers, and transfers ownership to
+   the output subsystem. */
+void
+output_submit (struct output_item *item)
+{
+  if (is_text_item (item))
+    {
+      struct text_item *text = to_text_item (item);
+      switch (text_item_get_type (text))
+        {
+        case TEXT_ITEM_SYNTAX:
+          if (!in_command)
+            {
+              flush_deferred_syntax ();
+              deferred_syntax = item;
+              return;
+            }
+          break;
+
+        case TEXT_ITEM_COMMAND_OPEN:
+          output_submit__ (item);
+          flush_deferred_syntax ();
+          in_command = true;
+          return;
+
+        case TEXT_ITEM_COMMAND_CLOSE:
+          in_command = false;
+          break;
+
+        default:
+          break;
+        }
+    }
+
+  output_submit__ (item);
+}
+
+/* Flushes output to screen devices, so that the user can see
+   output that doesn't fill up an entire page. */
+void
+output_flush (void)
+{
+  struct llx *llx;
+
+  for (llx = llx_head (&drivers); llx != llx_null (&drivers);
+       llx = llx_next (llx))
+    {
+      struct output_driver *d = llx_data (llx);
+      if (d->device_type & SETTINGS_DEVICE_TERMINAL && d->class->flush != NULL)
+        d->class->flush (d);
+    }
+}
+\f
+void
+output_driver_init (struct output_driver *driver,
+                    const struct output_driver_class *class,
+                    const char *name, enum settings_output_devices type)
+{
+  driver->class = class;
+  driver->name = xstrdup (name);
+  driver->device_type = type;
+}
+
+void
+output_driver_destroy (struct output_driver *driver)
+{
+  if (driver != NULL)
+    {
+      char *name = driver->name;
+      if (output_driver_is_registered (driver))
+        output_driver_unregister (driver);
+      if (driver->class->destroy)
+        driver->class->destroy (driver);
+      free (name);
+    }
+}
+
+const char *
+output_driver_get_name (const struct output_driver *driver)
+{
+  return driver->name;
+}
+\f
+void
+output_driver_register (struct output_driver *driver)
+{
+  assert (!output_driver_is_registered (driver));
+  llx_push_tail (&drivers, driver, &llx_malloc_mgr);
+}
+
+void
+output_driver_unregister (struct output_driver *driver)
+{
+  llx_remove (llx_find (llx_head (&drivers), llx_null (&drivers), driver),
+              &llx_malloc_mgr);
+}
+
+bool
+output_driver_is_registered (const struct output_driver *driver)
+{
+  return llx_find (llx_head (&drivers), llx_null (&drivers), driver) != NULL;
+}
+\f
+/* Useful functions for output driver implementation. */
+
+void
+output_driver_track_current_command (const struct output_item *output_item,
+                                     char **command_namep)
+{
+  if (is_text_item (output_item))
+    {
+      const struct text_item *item = to_text_item (output_item);
+      const char *text = text_item_get_text (item);
+      enum text_item_type type = text_item_get_type (item);
+
+      if (type == TEXT_ITEM_COMMAND_OPEN)
+        {
+          free (*command_namep);
+          *command_namep = xstrdup (text);
+        }
+      else if (type == TEXT_ITEM_COMMAND_CLOSE)
+        {
+          free (*command_namep);
+          *command_namep = NULL;
+        }
+    }
+}
+\f
+extern const struct output_driver_factory txt_driver_factory;
+extern const struct output_driver_factory list_driver_factory;
+extern const struct output_driver_factory html_driver_factory;
+extern const struct output_driver_factory csv_driver_factory;
+#ifdef ODT_SUPPORT
+extern const struct output_driver_factory odt_driver_factory;
+#endif
+#ifdef HAVE_CAIRO
+extern const struct output_driver_factory pdf_driver_factory;
+extern const struct output_driver_factory ps_driver_factory;
+extern const struct output_driver_factory svg_driver_factory;
+#endif
+
+static const struct output_driver_factory *factories[] =
+  {
+    &txt_driver_factory,
+    &list_driver_factory,
+    &html_driver_factory,
+    &csv_driver_factory,
+#ifdef ODT_SUPPORT
+    &odt_driver_factory,
+#endif
+#ifdef HAVE_CAIRO
+    &pdf_driver_factory,
+    &ps_driver_factory,
+    &svg_driver_factory,
+#endif
+    NULL
+  };
+
+static const struct output_driver_factory *
+find_factory (const char *format)
+{
+  const struct output_driver_factory **fp;
+
+  for (fp = factories; *fp != NULL; fp++)
+    {
+      const struct output_driver_factory *f = *fp;
+
+      if (!strcmp (f->extension, format))
+        return f;
+    }
+  return &txt_driver_factory;
+}
+
+static enum settings_output_devices
+default_device_type (const char *file_name)
+{
+  return (!strcmp (file_name, "-")
+          ? SETTINGS_DEVICE_TERMINAL
+          : SETTINGS_DEVICE_LISTING);
+}
+
+struct output_driver *
+output_driver_create (struct string_map *options)
+{
+  enum settings_output_devices device_type;
+  const struct output_driver_factory *f;
+  struct output_driver *driver;
+  char *device_string;
+  char *file_name;
+  char *format;
+
+  file_name = string_map_find_and_delete (options, "output-file");
+  if (file_name == NULL)
+    file_name = xstrdup ("-");
+
+  format = string_map_find_and_delete (options, "format");
+  if (format == NULL)
+    {
+      const char *extension = strrchr (file_name, '.');
+      format = xstrdup (extension != NULL ? extension + 1 : "");
+    }
+
+  /* XXX should use parse_enum(). */
+  device_string = string_map_find_and_delete (options, "device");
+  if (device_string == NULL || device_string[0] == '\0')
+    device_type = default_device_type (file_name);
+  else if (!strcmp (device_string, "terminal"))
+    device_type = SETTINGS_DEVICE_TERMINAL;
+  else if (!strcmp (device_string, "listing"))
+    device_type = SETTINGS_DEVICE_LISTING;
+  else
+    {
+      error (0, 0, _("%s is not a valid device type (the choices are "
+                     "\"terminal\" and \"listing\")"), device_string);
+      device_type = default_device_type (file_name);
+    }
+
+  f = find_factory (format);
+  driver = f->create (file_name, device_type, options);
+  if (driver != NULL)
+    {
+      const struct string_map_node *node;
+      const char *key;
+
+      STRING_MAP_FOR_EACH_KEY (key, node, options)
+        error (0, 0, _("%s: unknown option \"%s\""), file_name, key);
+    }
+  string_map_clear (options);
+
+  free (file_name);
+  free (format);
+  free (device_string);
+
+  return driver;
+}
diff --git a/src/output/driver.h b/src/output/driver.h
new file mode 100644 (file)
index 0000000..9380207
--- /dev/null
@@ -0,0 +1,38 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_DRIVER_H
+#define OUTPUT_DRIVER_H 1
+
+#include <stdbool.h>
+
+struct output_item;
+struct string_set;
+struct string_map;
+
+void output_submit (struct output_item *);
+
+void output_flush (void);
+
+void output_close (void);
+void output_get_supported_formats (struct string_set *);
+
+struct output_driver *output_driver_create (struct string_map *options);
+void output_driver_register (struct output_driver *);
+void output_driver_unregister (struct output_driver *);
+bool output_driver_is_registered (const struct output_driver *);
+
+#endif /* output/driver.h */
diff --git a/src/output/dummy-chart.c b/src/output/dummy-chart.c
deleted file mode 100644 (file)
index 7758ad7..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 2004 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-#include <stdio.h>
-#include <libpspp/compiler.h>
-#include "chart.h"
-
-
-struct chart *
-chart_create(void)
-{
-  return NULL;
-}
-
-void
-chart_submit(struct chart *chart UNUSED)
-{
-}
-
-void
-chart_init_separate (struct chart *ch UNUSED, const char *type UNUSED,
-                     const char *file_name_tmpl UNUSED, int number UNUSED)
-{
-}
-
-void
-chart_finalise_separate (struct chart *ch UNUSED)
-{
-}
index 893c18527b7ff30e431762ede6658332e6fc5e46..989752b627fc9c54dcbf59410c5729769a96488c 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,8 +15,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
-#include "chart.h"
-#include "htmlP.h"
+
 #include <errno.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <time.h>
 #include <unistd.h>
 
-#include <libpspp/assertion.h>
-#include <libpspp/compiler.h>
-#include <data/file-name.h>
-#include "error.h"
-#include "output.h"
-#include "manager.h"
-#include "table.h"
-#include <libpspp/version.h>
+#include "data/file-name.h"
+#include "libpspp/assertion.h"
+#include "libpspp/cast.h"
+#include "libpspp/compiler.h"
+#include "libpspp/message.h"
+#include "libpspp/version.h"
+#include "output/cairo.h"
+#include "output/chart-item.h"
+#include "output/driver-provider.h"
+#include "output/message-item.h"
+#include "output/options.h"
+#include "output/output-item-provider.h"
+#include "output/table-provider.h"
+#include "output/table-item.h"
+#include "output/text-item.h"
 
+#include "error.h"
 #include "xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-/* HTML driver options: (defaults listed first)
+struct html_driver
+  {
+    struct output_driver driver;
 
-   output-file="pspp.html"
-   chart-files="pspp-#.png"
-*/
+    char *file_name;
+    char *chart_file_name;
+
+    char *command_name;
+    FILE *file;
+    size_t chart_cnt;
+
+    bool in_syntax;
+  };
 
+static const struct output_driver_class html_driver_class;
+
+static void html_output_table (struct html_driver *, struct table_item *);
 static void escape_string (FILE *file,
                            const char *text, size_t length,
                            const char *space);
-static bool handle_option (struct outp_driver *this,
-                           const char *key, const struct string *val);
 static void print_title_tag (FILE *file, const char *name,
                              const char *content);
 
-static bool
-html_open_driver (struct outp_driver *this, struct substring options)
+static struct html_driver *
+html_driver_cast (struct output_driver *driver)
 {
-  struct html_driver_ext *x;
-
-  this->ext = x = xmalloc (sizeof *x);
-  x->file_name = xstrdup ("pspp.html");
-  x->chart_file_name = xstrdup ("pspp-#.png");
-  x->file = NULL;
-  x->chart_cnt = 0;
+  assert (driver->class == &html_driver_class);
+  return UP_CAST (driver, struct html_driver, driver);
+}
 
-  outp_parse_options (options, handle_option, this);
+static struct driver_option *
+opt (struct output_driver *d, struct string_map *options, const char *key,
+     const char *default_value)
+{
+  return driver_option_get (d, options, key, default_value);
+}
 
-  x->file = fn_open (x->file_name, "w");
-  if (x->file == NULL)
+static struct output_driver *
+html_create (const char *file_name, enum settings_output_devices device_type,
+             struct string_map *o)
+{
+  struct output_driver *d;
+  struct html_driver *html;
+
+  html = xzalloc (sizeof *html);
+  d = &html->driver;
+  output_driver_init (&html->driver, &html_driver_class, file_name,
+                      device_type);
+
+  html->file_name = xstrdup (file_name);
+  html->chart_file_name = parse_chart_file_name (opt (d, o, "charts",
+                                                      file_name));
+  html->file = NULL;
+  html->chart_cnt = 1;
+
+  html->file = fn_open (html->file_name, "w");
+  if (html->file == NULL)
     {
-      error (0, errno, _("opening HTML output file: %s"), x->file_name);
+      error (0, errno, _("error opening output file \"%s\""), html->file_name);
       goto error;
     }
 
   fputs ("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n"
-         "   \"http://www.w3.org/TR/html4/loose.dtd\">\n", x->file);
-  fputs ("<HTML>\n", x->file);
-  fputs ("<HEAD>\n", x->file);
-  /* The <TITLE> tag is required, so we use a default if the user
-     didn't provide one. */
-  print_title_tag (x->file,
-                   "TITLE", outp_title ? outp_title : _("PSPP Output"));
-  fprintf (x->file, "<META NAME=\"generator\" CONTENT=\"%s\">\n", version);
+         "   \"http://www.w3.org/TR/html4/loose.dtd\">\n", html->file);
+  fputs ("<HTML>\n", html->file);
+  fputs ("<HEAD>\n", html->file);
+  print_title_tag (html->file, "TITLE", _("PSPP Output"));
+  fprintf (html->file, "<META NAME=\"generator\" CONTENT=\"%s\">\n", version);
+  fputs ("<META http-equiv=\"Content-Style-Type\" content=\"text/css\">\n",
+         html->file);
   fputs ("<META HTTP-EQUIV=\"Content-Type\" "
-         "CONTENT=\"text/html; charset=ISO-8859-1\">\n", x->file);
-  fputs ("</HEAD>\n", x->file);
-  fputs ("<BODY BGCOLOR=\"#ffffff\" TEXT=\"#000000\"\n", x->file);
-  fputs (" LINK=\"#1f00ff\" ALINK=\"#ff0000\" VLINK=\"#9900dd\">\n", x->file);
-  print_title_tag (x->file, "H1", outp_title);
-  print_title_tag (x->file, "H2", outp_subtitle);
-
-  return true;
+         "CONTENT=\"text/html; charset=ISO-8859-1\">\n", html->file);
+  fputs ("<STYLE>\n"
+         "<!--\n"
+         "body {\n"
+         "  background: white;\n"
+         "  color: black;\n"
+         "  padding: 0em 12em 0em 3em;\n"
+         "  margin: 0\n"
+         "}\n"
+         "body>p {\n"
+         "  margin: 0pt 0pt 0pt 0em\n"
+         "}\n"
+         "body>p + p {\n"
+         "  text-indent: 1.5em;\n"
+         "}\n"
+         "h1 {\n"
+         "  font-size: 150%;\n"
+         "  margin-left: -1.33em\n"
+         "}\n"
+         "h2 {\n"
+         "  font-size: 125%;\n"
+         "  font-weight: bold;\n"
+         "  margin-left: -.8em\n"
+         "}\n"
+         "h3 {\n"
+         "  font-size: 100%;\n"
+         "  font-weight: bold;\n"
+         "  margin-left: -.5em }\n"
+         "h4 {\n"
+         "  font-size: 100%;\n"
+         "  margin-left: 0em\n"
+         "}\n"
+         "h1, h2, h3, h4, h5, h6 {\n"
+         "  font-family: sans-serif;\n"
+         "  color: blue\n"
+         "}\n"
+         "html {\n"
+         "  margin: 0\n"
+         "}\n"
+         "code {\n"
+         "  font-family: sans-serif\n"
+         "}\n"
+         "table {\n"
+         "  border-collapse: collapse;\n"
+         "  margin-bottom: 1em\n"
+         "}\n"
+         "th { background: #dddddd; font-weight: normal; font-style: oblique }\n"
+         "caption {\n"
+         "  text-align: left\n"
+         "}\n"
+         "-->\n"
+         "</STYLE>\n",
+         html->file);
+  fputs ("</HEAD>\n", html->file);
+  fputs ("<BODY BGCOLOR=\"#ffffff\" TEXT=\"#000000\"\n", html->file);
+  fputs (" LINK=\"#1f00ff\" ALINK=\"#ff0000\" VLINK=\"#9900dd\">\n", html->file);
+
+  return d;
 
  error:
-  this->class->close_driver (this);
-  return false;
+  output_driver_destroy (d);
+  return NULL;
 }
 
 /* Emits <NAME>CONTENT</NAME> to the output, escaping CONTENT as
@@ -109,114 +193,141 @@ print_title_tag (FILE *file, const char *name, const char *content)
     }
 }
 
-static bool
-html_close_driver (struct outp_driver *this)
+static void
+html_destroy (struct output_driver *driver)
 {
-  struct html_driver_ext *x = this->ext;
-  bool ok;
+  struct html_driver *html = html_driver_cast (driver);
 
-  if (x->file != NULL)
+  if (html->file != NULL)
     {
-      fprintf (x->file,
+      if (html->in_syntax)
+        {
+          fprintf (html->file, "</PRE>\n");
+          html->in_syntax = false;
+        }
+      fprintf (html->file,
                "</BODY>\n"
                "</HTML>\n"
                "<!-- end of file -->\n");
-      ok = fn_close (x->file_name, x->file) == 0;
-      x->file = NULL;
+      fn_close (html->file_name, html->file);
     }
-  else
-    ok = true;
-  free (x->chart_file_name);
-  free (x->file_name);
-  free (x);
+  free (html->chart_file_name);
+  free (html->file_name);
+  free (html->command_name);
+  free (html);
+}
 
-  return ok;
+static bool
+is_syntax_item (const struct output_item *item)
+{
+  return (is_text_item (item)
+          && text_item_get_type (to_text_item (item)) == TEXT_ITEM_SYNTAX);
 }
 
-/* Link the image contained in FILE_NAME to the
-   HTML stream in FILE. */
 static void
-link_image (FILE *file, char *file_name)
+html_submit (struct output_driver *driver,
+             const struct output_item *output_item)
 {
-  fprintf (file, "<IMG SRC=\"%s\"/>", file_name);
- }
+  struct html_driver *html = html_driver_cast (driver);
 
-/* Generic option types. */
-enum
-  {
-    string_arg,
-    nonneg_int_arg
-  };
+  output_driver_track_current_command (output_item, &html->command_name);
 
-/* All the options that the HTML driver supports. */
-static const struct outp_option option_tab[] =
-  {
-    {"output-file",            string_arg,     0},
-    {"chart-files",            string_arg,     1},
-    {NULL, 0, 0},
-  };
+  if (html->in_syntax && !is_syntax_item (output_item))
+    {
+      fprintf (html->file, "</PRE>\n");
+      html->in_syntax = false;
+    }
 
-static bool
-handle_option (struct outp_driver *this,
-               const char *key, const struct string *val)
-{
-  struct html_driver_ext *x = this->ext;
-  int subcat;
+  if (is_table_item (output_item))
+    {
+      struct table_item *table_item = to_table_item (output_item);
+      html_output_table (html, table_item);
+    }
+#ifdef HAVE_CAIRO
+  else if (is_chart_item (output_item) && html->chart_file_name != NULL)
+    {
+      struct chart_item *chart_item = to_chart_item (output_item);
+      char *file_name;
 
-  switch (outp_match_keyword (key, option_tab, &subcat))
+      file_name = xr_draw_png_chart (chart_item, html->chart_file_name,
+                                     html->chart_cnt++);
+      if (file_name != NULL)
+        {
+          fprintf (html->file, "<IMG SRC=\"%s\"/>", file_name);
+          free (file_name);
+        }
+    }
+#endif  /* HAVE_CAIRO */
+  else if (is_text_item (output_item))
     {
-    case -1:
-      error (0, 0,
-             _("unknown configuration parameter `%s' for HTML device driver"),
-             key);
-      break;
-    case string_arg:
-      switch (subcat)
+      struct text_item *text_item = to_text_item (output_item);
+      const char *s = text_item_get_text (text_item);
+
+      switch (text_item_get_type (text_item))
         {
-        case 0:
-          free (x->file_name);
-          x->file_name = ds_xstrdup (val);
+        case TEXT_ITEM_TITLE:
+          print_title_tag (html->file, "H1", s);
+          break;
+
+        case TEXT_ITEM_SUBTITLE:
+          print_title_tag (html->file, "H2", s);
           break;
-        case 1:
-          if (ds_find_char (val, '#') != SIZE_MAX)
+
+        case TEXT_ITEM_COMMAND_OPEN:
+          fprintf (html->file, "<DIV class=\"");
+          escape_string (html->file, s, strlen (s), "_");
+          fprintf (html->file, "\">");
+          print_title_tag (html->file, "H3", s);
+          break;
+
+        case TEXT_ITEM_COMMAND_CLOSE:
+          fprintf (html->file, "</DIV>\n");
+          break;
+
+        case TEXT_ITEM_SUBHEAD:
+          print_title_tag (html->file, "H4", s);
+          break;
+
+        case TEXT_ITEM_SYNTAX:
+          if (!html->in_syntax)
             {
-              free (x->chart_file_name);
-              x->chart_file_name = ds_xstrdup (val);
+              fprintf (html->file, "<PRE class=\"syntax\">");
+              html->in_syntax = true;
             }
           else
-            error (0, 0, _("`chart-files' value must contain `#'"));
+            putc ('\n', html->file);
+          escape_string (html->file, s, strlen (s), " ");
           break;
-        default:
-          NOT_REACHED ();
-        }
-      break;
-    default:
-      NOT_REACHED ();
-    }
 
-  return true;
-}
+        case TEXT_ITEM_PARAGRAPH:
+          print_title_tag (html->file, "P", s);
+          break;
 
-static void output_tab_table (struct outp_driver *, struct tab_table *);
+        case TEXT_ITEM_MONOSPACE:
+          print_title_tag (html->file, "PRE", s); /* should be <P><TT> */
+          break;
 
-static void
-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;
+        case TEXT_ITEM_BLANK_LINE:
+          fputs ("<BR>", html->file);
+          break;
 
-  assert (s->class == &tab_table_class ) ;
+        case TEXT_ITEM_EJECT_PAGE:
+          /* Nothing to do. */
+          break;
 
-  switch (s->type)
+        case TEXT_ITEM_COMMENT:
+        case TEXT_ITEM_ECHO:
+          /* We print out syntax anyway, so nothing to do here either. */
+          break;
+        }
+    }
+  else if (is_message_item (output_item))
     {
-    case SOM_TABLE:
-      output_tab_table ( this, (struct tab_table *) s->ext);
-      break;
-    case SOM_CHART:
-      link_image (x->file, ((struct chart *)s->ext)->file_name);
-      break;
-    default:
-      NOT_REACHED ();
+      const struct message_item *message_item = to_message_item (output_item);
+      const struct msg *msg = message_item_get_msg (message_item);
+      char *s = msg_to_string (msg, html->command_name);
+      print_title_tag (html->file, "P", s);
+      free (s);
     }
 }
 
@@ -245,6 +356,9 @@ escape_string (FILE *file,
         case ' ':
           fputs (space, file);
           break;
+        case '"':
+          fputs ("&quot;", file);
+          break;
         default:
           putc (c, file);
           break;
@@ -252,148 +366,134 @@ escape_string (FILE *file,
     }
 }
 
-/* Outputs content for a cell with options OPTS and contents
-   TEXT. */
-void
-html_put_cell_contents (struct outp_driver *this,
-                        unsigned int opts, const struct substring text)
+static void
+put_border (FILE *file, int n_borders, int style, const char *border_name)
 {
-  struct html_driver_ext *x = this->ext;
-
-  if (!(opts & TAB_EMPTY))
-    {
-      if (opts & TAB_EMPH)
-        fputs ("<EM>", x->file);
-      if (opts & TAB_FIX)
-        {
-          fputs ("<TT>", x->file);
-          escape_string (x->file, ss_data (text), ss_length (text), "&nbsp;");
-          fputs ("</TT>", x->file);
-        }
-      else
-        {
-          size_t initial_spaces = ss_span (text, ss_cstr (CC_SPACES));
-          escape_string (x->file,
-                         ss_data (text) + initial_spaces,
-                         ss_length (text) - initial_spaces,
-                         " ");
-        }
-      if (opts & TAB_EMPH)
-        fputs ("</EM>", x->file);
-    }
+  fprintf (file, "%sborder-%s: %s",
+           n_borders == 0 ? " STYLE=\"" : "; ",
+           border_name,
+           style == TAL_1 ? "thin solid" : "double");
 }
 
-/* Write table T to THIS output driver. */
 static void
-output_tab_table (struct outp_driver *this, struct tab_table *t)
+html_output_table (struct html_driver *html, struct table_item *item)
 {
-  struct html_driver_ext *x = this->ext;
+  const struct table *t = table_item_get_table (item);
+  const char *caption;
+  int x, y;
 
-  if (t->nr == 1 && t->nc == 1)
-    {
-      fputs ("<P>", x->file);
-      html_put_cell_contents (this, t->ct[0], *t->cc);
-      fputs ("</P>\n", x->file);
+  fputs ("<TABLE>\n", html->file);
 
-      return;
+  caption = table_item_get_caption (item);
+  if (caption != NULL)
+    {
+      fputs ("  <CAPTION>", html->file);
+      escape_string (html->file, caption, strlen (caption), " ");
+      fputs ("</CAPTION>\n", html->file);
     }
 
-  fputs ("<TABLE BORDER=1>\n", x->file);
-
-  if (t->title != NULL)
+  for (y = 0; y < table_nr (t); y++)
     {
-      fprintf (x->file, "  <CAPTION>");
-      escape_string (x->file, t->title, strlen (t->title), " ");
-      fputs ("</CAPTION>\n", x->file);
-    }
+      fputs ("  <TR>\n", html->file);
+      for (x = 0; x < table_nc (t); x++)
+        {
+          struct table_cell cell;
+          const char *tag;
+          bool is_header;
+          int alignment, colspan, rowspan;
+          int top, left, right, bottom, n_borders;
+          const char *s;
+
+          table_get_cell (t, x, y, &cell);
+          if (x != cell.d[TABLE_HORZ][0] || y != cell.d[TABLE_VERT][0])
+            continue;
+
+          /* Output <TD> or <TH> tag. */
+          is_header = (y < table_ht (t)
+                       || y >= table_nr (t) - table_hb (t)
+                       || x < table_hl (t)
+                       || x >= table_nc (t) - table_hr (t));
+          tag = is_header ? "TH" : "TD";
+          fprintf (html->file, "    <%s", tag);
+
+          alignment = cell.options & TAB_ALIGNMENT;
+          if (alignment != TAB_LEFT)
+            fprintf (html->file, " ALIGN=%s",
+                     alignment == TAB_RIGHT ? "RIGHT" : "CENTER");
+
+          colspan = table_cell_colspan (&cell);
+          if (colspan > 1)
+            fprintf (html->file, " COLSPAN=%d", colspan);
+
+          rowspan = table_cell_rowspan (&cell);
+          if (rowspan > 1)
+            fprintf (html->file, " ROWSPAN=%d", rowspan);
+
+          /* Cell borders. */
+          n_borders = 0;
+          
+          top = table_get_rule (t, TABLE_VERT, x, y);
+          if (top > TAL_GAP)
+            put_border (html->file, n_borders++, top, "top");
+
+          if (y == table_nr (t) - 1)
+            {
+              bottom = table_get_rule (t, TABLE_VERT, x, y + 1);
+              if (bottom > TAL_GAP)
+                put_border (html->file, n_borders++, bottom, "bottom");
+            }
 
-  {
-    int r;
-    unsigned char *ct = t->ct;
-
-    for (r = 0; r < t->nr; r++)
-      {
-       int c;
-
-       fputs ("  <TR>\n", x->file);
-       for (c = 0; c < t->nc; c++, ct++)
-         {
-            struct substring *cc;
-            const char *tag;
-            struct tab_joined_cell *j = NULL;
-
-            cc = t->cc + c + r * t->nc;
-           if (*ct & TAB_JOIN)
-              {
-                j = (struct tab_joined_cell *) ss_data (*cc);
-                cc = &j->contents;
-                if (j->x1 != c || j->y1 != r)
-                  continue;
-              }
-
-            /* Output <TD> or <TH> tag. */
-            tag = (r < t->t || r >= t->nr - t->b
-                   || c < t->l || c >= t->nc - t->r) ? "TH" : "TD";
-            fprintf (x->file, "    <%s ALIGN=%s",
-                     tag,
-                     (*ct & TAB_ALIGN_MASK) == TAB_LEFT ? "LEFT"
-                     : (*ct & TAB_ALIGN_MASK) == TAB_RIGHT ? "RIGHT"
-                     : "CENTER");
-           if (*ct & TAB_JOIN)
-             {
-               if (j->x2 - j->x1 > 1)
-                 fprintf (x->file, " COLSPAN=%d", j->x2 - j->x1);
-               if (j->y2 - j->y1 > 1)
-                 fprintf (x->file, " ROWSPAN=%d", j->y2 - j->y1);
-             }
-           putc ('>', x->file);
-
-            /* Output cell contents. */
-            html_put_cell_contents (this, *ct, *cc);
-
-            /* Output </TH> or </TD>. */
-           fprintf (x->file, "</%s>\n", tag);
-         }
-       fputs ("  </TR>\n", x->file);
-      }
-  }
-
-  fputs ("</TABLE>\n\n", x->file);
-}
+          left = table_get_rule (t, TABLE_HORZ, x, y);
+          if (left > TAL_GAP)
+            put_border (html->file, n_borders++, left, "left");
 
-static void
-html_initialise_chart (struct outp_driver *this UNUSED, struct chart *ch)
-{
-  struct html_driver_ext *x = this->ext;
-  chart_init_separate (ch, "png", x->chart_file_name, ++x->chart_cnt);
-}
+          if (x == table_nc (t) - 1)
+            {
+              right = table_get_rule (t, TABLE_HORZ, x + 1, y);
+              if (right > TAL_GAP)
+                put_border (html->file, n_borders++, right, "right");
+            }
 
-static void
-html_finalise_chart(struct outp_driver *d UNUSED, struct chart *ch)
-{
-  chart_finalise_separate (ch);
-}
+          if (n_borders > 0)
+            fputs ("\"", html->file);
 
+          putc ('>', html->file);
 
+          /* Output cell contents. */
+          s = cell.contents;
+          if (cell.options & TAB_EMPH)
+            fputs ("<EM>", html->file);
+          if (cell.options & TAB_FIX)
+            {
+              fputs ("<TT>", html->file);
+              escape_string (html->file, s, strlen (s), "&nbsp;");
+              fputs ("</TT>", html->file);
+            }
+          else
+            {
+              s += strspn (s, CC_SPACES);
+              escape_string (html->file, s, strlen (s), " ");
+            }
+          if (cell.options & TAB_EMPH)
+            fputs ("</EM>", html->file);
 
-/* HTML driver class. */
-const struct outp_class html_class =
-  {
-    "html",
-    1,
+          /* Output </TH> or </TD>. */
+          fprintf (html->file, "</%s>\n", tag);
 
-    html_open_driver,
-    html_close_driver,
+          table_cell_free (&cell);
+        }
+      fputs ("  </TR>\n", html->file);
+    }
 
-    NULL,
-    NULL,
-    NULL,
+  fputs ("</TABLE>\n\n", html->file);
+}
 
-    html_submit,
+struct output_driver_factory html_driver_factory = { "html", html_create };
 
+static const struct output_driver_class html_driver_class =
+  {
+    "html",
+    html_destroy,
+    html_submit,
     NULL,
-    NULL,
-    NULL,
-    html_initialise_chart,
-    html_finalise_chart
   };
diff --git a/src/output/htmlP.h b/src/output/htmlP.h
deleted file mode 100644 (file)
index 05340f4..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#if !htmlP_h
-#define htmlP_h 1
-
-#include <data/file-name.h>
-
-/* HTML output driver extension record. */
-struct html_driver_ext
-  {
-    char *file_name;
-    char *chart_file_name;
-    FILE *file;
-
-    size_t chart_cnt;
-  };
-
-extern const struct outp_class html_class;
-
-struct outp_driver;
-void html_put_cell_contents (struct outp_driver *this,
-                             unsigned int opts, struct substring text);
-
-#endif /* !htmlP_h */
index 67657f6247cc8ec731cf8154c4f45aa48d369003..1a700898ac5e1d6707de700d4b59de1723b32c74 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include <output/journal.h>
+#include "output/journal.h"
 
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <data/file-name.h>
-#include <libpspp/str.h>
+#include "data/file-name.h"
+#include "libpspp/cast.h"
+#include "libpspp/str.h"
+#include "output/driver-provider.h"
+#include "output/message-item.h"
+#include "output/text-item.h"
 
-#include "fwriteerror.h"
-#include "error.h"
-#include "xalloc.h"
+#include "gl/error.h"
+#include "gl/fwriteerror.h"
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-/* Journaling enabled? */
-static bool journal_enabled = false;
+struct journal_driver
+  {
+    struct output_driver driver;
+    FILE *file;
+    char *command_name;
+  };
 
-/* Name of the journal file. */
-static char *journal_file_name = NULL;
+static const struct output_driver_class journal_class;
 
-/* Journal file. */
-static FILE *journal_file = NULL;
+/* Journal driver, if journaling is enabled. */
+static struct journal_driver *journal;
 
-/* Enables journaling. */
-void
-journal_enable (void)
+/* Name of journal file. */
+static char *journal_file_name;
+
+static struct journal_driver *
+journal_driver_cast (struct output_driver *driver)
 {
-  journal_enabled = true;
+  assert (driver->class == &journal_class);
+  return UP_CAST (driver, struct journal_driver, driver);
 }
 
-/* Disables journaling. */
-void
-journal_disable (void)
+static void
+journal_close (void)
 {
-  journal_enabled = false;
-  if (journal_file != NULL)
-    fflush (journal_file);
+  if (journal != NULL && journal->file != NULL)
+    {
+      if (fwriteerror (journal->file))
+        error (0, errno, _("error writing output file \"%s\""),
+               journal_file_name);
+      journal->file = NULL;
+    }
 }
 
-/* Sets the name of the journal file to FILE_NAME. */
-void
-journal_set_file_name (const char *file_name)
+static void
+journal_destroy (struct output_driver *driver)
 {
-  assert (file_name != NULL);
+  struct journal_driver *j = journal_driver_cast (driver);
+
+  journal_close ();
+  free (j->command_name);
+  free (j);
 
-  if (journal_file != NULL)
+  journal = NULL;
+}
+
+static void
+journal_output (struct journal_driver *j, const char *s)
+{
+  if (j->file == NULL)
     {
-      if (fwriteerror (journal_file))
-        error (0, errno, _("error writing \"%s\""), journal_file_name);
+      j->file = fopen (journal_file_name, "a");
+      if (j->file == NULL)
+        {
+          error (0, errno, _("error opening output file \"%s\""),
+                 journal_file_name);
+          output_driver_destroy (&j->driver);
+          return;
+        }
     }
 
-  free (journal_file_name);
-  journal_file_name = xstrdup (file_name);
+  fprintf (j->file, "%s\n", s);
 }
 
-/* Writes LINE to the journal file (if journaling is enabled).
-   If PREFIX is non-null, the line will be prefixed by "> ". */
-void
-journal_write (bool prefix, const char *line)
+static void
+journal_submit (struct output_driver *driver, const struct output_item *item)
 {
-  if (!journal_enabled)
-    return;
+  struct journal_driver *j = journal_driver_cast (driver);
+
+  output_driver_track_current_command (item, &j->command_name);
+
+  if (is_text_item (item))
+    {
+      const struct text_item *text_item = to_text_item (item);
+      enum text_item_type type = text_item_get_type (text_item);
+
+      if (type == TEXT_ITEM_SYNTAX)
+        journal_output (j, text_item_get_text (text_item));
+    }
+  else if (is_message_item (item))
+    {
+      const struct message_item *message_item = to_message_item (item);
+      const struct msg *msg = message_item_get_msg (message_item);
+      char *s = msg_to_string (msg, j->command_name);
+      journal_output (j, s);
+      free (s);
+    }
+}
 
-  if (journal_file == NULL)
+static const struct output_driver_class journal_class =
+  {
+    "journal",
+    journal_destroy,
+    journal_submit,
+    NULL                        /* flush */
+  };
+\f
+/* Enables journaling. */
+void
+journal_enable (void)
+{
+  if (journal == NULL)
     {
+      /* If no journal file name is configured, use the default. */
       if (journal_file_name == NULL)
        {
          const char *output_path = default_output_path ();
          journal_file_name = xasprintf ("%s%s", output_path, "pspp.jnl");
        }
-      journal_file = fopen (journal_file_name, "w");
-      if (journal_file == NULL)
-        {
-          error (0, errno, _("error creating \"%s\""), journal_file_name);
-          journal_enabled = false;
-          return;
-        }
+
+      /* Create journal driver. */
+      journal = xzalloc (sizeof *journal);
+      output_driver_init (&journal->driver, &journal_class, "journal",
+                          SETTINGS_DEVICE_UNFILTERED);
+      journal->file = NULL;
+      journal->command_name = NULL;
+
+      /* Register journal driver. */
+      output_driver_register (&journal->driver);
     }
+}
+
+/* Disables journaling. */
+void
+journal_disable (void)
+{
+  if (journal != NULL)
+    output_driver_destroy (&journal->driver);
+}
 
-  if (prefix)
-    fputs ("> ", journal_file);
-  fputs (line, journal_file);
-  if (strchr (line, '\n') == NULL)
-    putc ('\n', journal_file);
-  fflush (journal_file);
+/* Sets the name of the journal file to FILE_NAME. */
+void
+journal_set_file_name (const char *file_name)
+{
+  journal_close ();
+  free (journal_file_name);
+  journal_file_name = xstrdup (file_name);
 }
index 3509ff09890b4329a7b62bba36771a34ef516b92..5051193a67ea3c7d03ed61be1fddfe0167273173 100644 (file)
@@ -29,6 +29,5 @@
 void journal_enable (void);
 void journal_disable (void);
 void journal_set_file_name (const char *);
-void journal_write (bool prefix, const char *);
 
 #endif /* output/journal.h */
diff --git a/src/output/manager.c b/src/output/manager.c
deleted file mode 100644 (file)
index 0b2fdfe..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-#include "manager.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <libpspp/assertion.h>
-#include "output.h"
-
-/* Table. */
-int table_num = 1;
-int subtable_num;
-\f
-/* Increments table_num so different procedures' output can be
-   distinguished. */
-void
-som_new_series (void)
-{
-  if (subtable_num != 0)
-    {
-      table_num++;
-      subtable_num = 0;
-    }
-}
-
-/* Ejects the paper for all active devices. */
-void
-som_eject_page (void)
-{
-  struct outp_driver *d;
-
-  for (d = outp_drivers (NULL); d; d = outp_drivers (d))
-    outp_eject_page (d);
-}
-
-/* Flushes output on all active devices. */
-void
-som_flush (void)
-{
-  struct outp_driver *d;
-
-  for (d = outp_drivers (NULL); d; d = outp_drivers (d))
-    outp_flush (d);
-}
-
-/* Skip down a single line on all active devices. */
-void
-som_blank_line (void)
-{
-  struct outp_driver *d;
-
-  for (d = outp_drivers (NULL); d; d = outp_drivers (d))
-    if (d->page_open && d->cp_y != 0)
-      d->cp_y += d->font_height;
-}
-\f
-/* Driver. */
-static struct outp_driver *d = 0;
-
-/* Table. */
-static struct som_entity *t = 0;
-
-/* Flags. */
-static unsigned flags;
-
-/* Number of columns, rows. */
-static int nc, nr;
-
-/* Number of columns or rows in left, right, top, bottom headers. */
-static int hl, hr, ht, hb;
-
-/* Column style. */
-static int cs;
-
-/* Table height, width. */
-static int th, tw;
-
-static void render_columns (void);
-static void render_simple (void);
-static void render_segments (void);
-
-static void output_entity (struct outp_driver *, struct som_entity *);
-
-/* Output table T to appropriate output devices. */
-void
-som_submit (struct som_entity *t)
-{
-#if DEBUGGING
-  static int entry;
-
-  assert (entry++ == 0);
-#endif
-
-  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 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);
-         NOT_REACHED ();
-       }
-      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);
-
-      if (!(flags & SOMF_NO_TITLE))
-       subtable_num++;
-
-    }
-
-  {
-    struct outp_driver *d;
-
-    for (d = outp_drivers (NULL); d; d = outp_drivers (d))
-       output_entity (d, t);
-
-  }
-
-#if DEBUGGING
-  assert (--entry == 0);
-#endif
-}
-
-/* Output entity ENTITY to driver DRIVER. */
-static void
-output_entity (struct outp_driver *driver, struct som_entity *entity)
-{
-  bool fits_width, fits_length;
-  d = driver;
-
-  outp_open_page (d);
-  if (d->class->special || entity->type == SOM_CHART)
-    {
-      driver->class->submit (d, entity);
-      return;
-    }
-
-  t = entity;
-
-  t->class->driver (d);
-  t->class->area (&tw, &th);
-  fits_width = t->class->fits_width (d->width);
-  fits_length = t->class->fits_length (d->length);
-  if (!fits_width || !fits_length)
-    {
-      int tl, tr, tt, tb;
-      tl = fits_width ? hl : 0;
-      tr = fits_width ? hr : 0;
-      tt = fits_length ? ht : 0;
-      tb = fits_length ? hb : 0;
-      t->class->set_headers (tl, tr, tt, tb);
-      t->class->driver (d);
-      t->class->area (&tw, &th);
-    }
-
-  if (!(flags & SOMF_NO_SPACING) && d->cp_y != 0)
-    d->cp_y += d->font_height;
-
-  if (cs != SOM_COL_NONE
-      && 2 * (tw + d->prop_em_width) <= d->width
-      && nr - (ht + hb) > 5)
-    render_columns ();
-  else if (tw < d->width && th + d->cp_y < d->length)
-    render_simple ();
-  else
-    render_segments ();
-
-  t->class->set_headers (hl, hr, ht, hb);
-}
-
-/* Render the table into multiple columns. */
-static void
-render_columns (void)
-{
-  int y0, y1;
-  int max_len = 0;
-  int index = 0;
-
-  assert (cs == SOM_COL_DOWN);
-  assert (d->cp_x == 0);
-
-  for (y0 = ht; y0 < nr - hb; y0 = y1)
-    {
-      int len;
-
-      t->class->cumulate (SOM_ROWS, y0, &y1, d->length - d->cp_y, &len);
-
-      if (y0 == y1)
-       {
-         assert (d->cp_y);
-         outp_eject_page (d);
-       }
-      else
-        {
-         if (len > max_len)
-           max_len = len;
-
-         t->class->title (index++, 0);
-         t->class->render (0, y0, nc, y1);
-
-         d->cp_x += tw + 2 * d->prop_em_width;
-         if (d->cp_x + tw > d->width)
-           {
-             d->cp_x = 0;
-             d->cp_y += max_len;
-             max_len = 0;
-           }
-       }
-    }
-
-  if (d->cp_x > 0)
-    {
-      d->cp_x = 0;
-      d->cp_y += max_len;
-    }
-}
-
-/* Render the table by itself on the current page. */
-static void
-render_simple (void)
-{
-  assert (d->cp_x == 0);
-  assert (tw < d->width && th + d->cp_y < d->length);
-
-  t->class->title (0, 0);
-  t->class->render (hl, ht, nc - hr, nr - hb);
-  d->cp_y += th;
-}
-
-/* General table breaking routine. */
-static void
-render_segments (void)
-{
-  int count = 0;
-
-  int x_index;
-  int x0, x1;
-
-  assert (d->cp_x == 0);
-
-  for (x_index = 0, x0 = hl; x0 < nc - hr; x0 = x1, x_index++)
-    {
-      int y_index;
-      int y0, y1;
-
-      t->class->cumulate (SOM_COLUMNS, x0, &x1, d->width, NULL);
-      if (x_index == 0 && x1 != nc - hr)
-       x_index++;
-
-      for (y_index = 0, y0 = ht; y0 < nr - hb; y0 = y1, y_index++)
-       {
-         int len;
-
-         if (count++ != 0 && d->cp_y != 0)
-           d->cp_y += d->font_height;
-
-         t->class->cumulate (SOM_ROWS, y0, &y1, d->length - d->cp_y, &len);
-         if (y_index == 0 && y1 != nr - hb)
-           y_index++;
-
-         if (y0 == y1)
-           {
-             assert (d->cp_y);
-             outp_eject_page (d);
-           }
-          else
-            {
-             t->class->title (x_index ? x_index : y_index,
-                              x_index ? y_index : 0);
-             t->class->render (x0, y0, x1, y1);
-
-             d->cp_y += len;
-           }
-       }
-    }
-}
diff --git a/src/output/manager.h b/src/output/manager.h
deleted file mode 100644 (file)
index 58d0c12..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#if !som_h
-#define som_h 1
-
-/* Structured Output Manager.
-
-   som considers the output stream to be a series of tables.  Each
-   table is made up of a rectangular grid of cells.  Cells can be
-   joined to form larger cells.  Rows and columns can be separated by
-   rules of various types.  Tables too large to fit on a single page
-   will be divided into sections.  Rows and columns can be designated
-   as headers, which causes them to be repeated in each section.
-
-   Every table is an instance of a particular table class.  A table
-   class is responsible for keeping track of cell data, for handling
-   requests from the som, and finally for rendering cell data to the
-   output drivers.  Tables may implement these operations in any way
-   desired, and in fact almost every operation performed by som may be
-   overridden in a table class.  */
-
-#include <stdbool.h>
-
-enum som_type
-  {
-    SOM_TABLE,
-    SOM_CHART
-  } ;
-
-/* Entity (Table or Chart) . */
-struct som_entity
-  {
-    const struct som_table_class *class;       /* Table class. */
-    enum som_type type;                 /* Table or Chart */
-    void *ext;                         /* Owned by */
-  };
-
-/* Group styles. */
-enum
-  {
-    SOM_COL_NONE,                      /* No columns. */
-    SOM_COL_DOWN                       /* Columns down first. */
-  };
-
-/* Cumulation types. */
-enum
-  {
-    SOM_ROWS, SOM_ROW = SOM_ROWS,      /* Rows. */
-    SOM_COLUMNS, SOM_COLUMN = SOM_COLUMNS      /* Columns. */
-  };
-
-/* Flags. */
-enum
-  {
-    SOMF_NONE = 0,
-    SOMF_NO_SPACING = 01,      /* No spacing before the table. */
-    SOMF_NO_TITLE = 02         /* No title. */
-  };
-
-/* Table class. */
-struct outp_driver;
-struct som_table_class
-  {
-    /* Set table, driver. */
-    void (*table) (struct som_entity *);
-    void (*driver) (struct outp_driver *);
-
-    /* Query columns and rows. */
-    void (*count) (int *n_columns, int *n_rows);
-    void (*area) (int *horiz, int *vert);
-    void (*width) (int *columns);
-    void (*height) (int *rows);
-    void (*columns) (int *style);
-    int (*breakable) (int row);                                /* ? */
-    void (*headers) (int *l, int *r, int *t, int *b);
-    void (*join) (int *(column[2]), int *(row[2]));    /* ? */
-    void (*cumulate) (int cumtype, int start, int *end, int max, int *actual);
-    void (*flags) (unsigned *);
-    bool (*fits_width) (int width);
-    bool (*fits_length) (int length);
-
-    /* Set columns and rows. */
-    void (*set_width) (int column, int width);         /* ? */
-    void (*set_height) (int row, int height);          /* ? */
-    void (*set_headers) (int l, int r, int t, int b);
-
-    /* Rendering. */
-    void (*title) (int x, int y);
-    void (*render) (int x1, int y1, int x2, int y2);
-  };
-
-/* Table indexes. */
-extern int table_num;
-extern int subtable_num;
-
-/* Submission. */
-void som_new_series (void);
-void som_submit (struct som_entity *t);
-
-/* Miscellaneous. */
-void som_eject_page (void);
-void som_blank_line (void);
-void som_flush (void);
-
-#endif /* som_h */
diff --git a/src/output/measure.c b/src/output/measure.c
new file mode 100644 (file)
index 0000000..2064f45
--- /dev/null
@@ -0,0 +1,311 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/measure.h>
+
+#include <ctype.h>
+#include <errno.h>
+#if HAVE_LC_PAPER
+#include <langinfo.h>
+#endif
+#include <libpspp/str.h>
+#include <stdlib.h>
+
+#include <data/file-name.h>
+
+#include "gl/error.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+static double parse_unit (const char *);
+static bool parse_paper_size (const char *, int *h, int *v);
+static bool get_standard_paper_size (struct substring name, int *h, int *v);
+static bool read_paper_conf (const char *file_name, int *h, int *v);
+static bool get_default_paper_size (int *h, int *v);
+
+/* Determines the size of a dimensional measurement and returns
+   the size in units of 1/72000".  Units are assumed to be
+   millimeters unless otherwise specified.  Returns -1 on
+   error. */
+int
+measure_dimension (const char *dimen)
+{
+  double raw, factor;
+  char *tail;
+
+  /* Number. */
+  raw = strtod (dimen, &tail);
+  if (raw < 0.0)
+    goto syntax_error;
+
+  /* Unit. */
+  factor = parse_unit (tail);
+  if (factor == 0.0)
+    goto syntax_error;
+
+  return raw * factor;
+
+syntax_error:
+  error (0, 0, _("`%s' is not a valid length."), dimen);
+  return -1;
+}
+
+/* Stores the dimensions, in 1/72000" units, of paper identified
+   by SIZE into *H and *V.  SIZE can be the name of a kind of
+   paper ("a4", "letter", ...) or a pair of dimensions
+   ("210x297", "8.5x11in", ...).  Returns true on success, false
+   on failure.  On failure, *H and *V are set for A4 paper. */
+bool
+measure_paper (const char *size, int *h, int *v)
+{
+  struct substring s;
+  bool ok;
+
+  s = ss_cstr (size);
+  ss_trim (&s, ss_cstr (CC_SPACES));
+
+  if (ss_is_empty (s))
+    {
+      /* Treat empty string as default paper size. */
+      ok = get_default_paper_size (h, v);
+    }
+  else if (isdigit (ss_first (s)))
+    {
+      /* Treat string that starts with digit as explicit size. */
+      ok = parse_paper_size (size, h, v);
+      if (!ok)
+        error (0, 0, _("syntax error in paper size `%s'"), size);
+    }
+  else
+    {
+      /* Check against standard paper sizes. */
+      ok = get_standard_paper_size (s, h, v);
+    }
+
+  /* Default to A4 on error. */
+  if (!ok)
+    {
+      *h = 210 * (72000 / 25.4);
+      *v = 297 * (72000 / 25.4);
+    }
+  return ok;
+}
+\f
+/* Parses UNIT as a dimensional unit.  Returns the multiplicative
+   factor needed to change a quantity measured in that unit into
+   1/72000" units.  If UNIT is empty, it is treated as
+   millimeters.  If the unit is unrecognized, returns 0. */
+static double
+parse_unit (const char *unit)
+{
+  struct unit
+    {
+      char name[3];
+      double factor;
+    };
+
+  static const struct unit units[] =
+    {
+      {"pt", 72000 / 72},
+      {"pc", 72000 / 72 * 12.0},
+      {"in", 72000},
+      {"cm", 72000 / 2.54},
+      {"mm", 72000 / 25.4},
+      {"", 72000 / 25.4},
+    };
+
+  const struct unit *p;
+
+  unit += strspn (unit, CC_SPACES);
+  for (p = units; p < units + sizeof units / sizeof *units; p++)
+    if (!strcasecmp (unit, p->name))
+      return p->factor;
+  return 0.0;
+}
+
+/* Stores the dimensions in 1/72000" units of paper identified by
+   SIZE, which is of form `HORZ x VERT [UNIT]' where HORZ and
+   VERT are numbers and UNIT is an optional unit of measurement,
+   into *H and *V.  Return true on success. */
+static bool
+parse_paper_size (const char *size, int *h, int *v)
+{
+  double raw_h, raw_v, factor;
+  char *tail;
+
+  /* Width. */
+  raw_h = strtod (size, &tail);
+  if (raw_h <= 0.0)
+    return false;
+
+  /* Delimiter. */
+  tail += strspn (tail, CC_SPACES "x,");
+
+  /* Length. */
+  raw_v = strtod (tail, &tail);
+  if (raw_v <= 0.0)
+    return false;
+
+  /* Unit. */
+  factor = parse_unit (tail);
+  if (factor == 0.0)
+    return false;
+
+  *h = raw_h * factor + .5;
+  *v = raw_v * factor + .5;
+  return true;
+}
+
+static bool
+get_standard_paper_size (struct substring name, int *h, int *v)
+{
+  static const char *sizes[][2] =
+    {
+      {"a0", "841 x 1189 mm"},
+      {"a1", "594 x 841 mm"},
+      {"a2", "420 x 594 mm"},
+      {"a3", "297 x 420 mm"},
+      {"a4", "210 x 297 mm"},
+      {"a5", "148 x 210 mm"},
+      {"b5", "176 x 250 mm"},
+      {"a6", "105 x 148 mm"},
+      {"a7", "74 x 105 mm"},
+      {"a8", "52 x 74 mm"},
+      {"a9", "37 x 52 mm"},
+      {"a10", "26 x 37 mm"},
+      {"b0", "1000 x 1414 mm"},
+      {"b1", "707 x 1000 mm"},
+      {"b2", "500 x 707 mm"},
+      {"b3", "353 x 500 mm"},
+      {"b4", "250 x 353 mm"},
+      {"letter", "612 x 792 pt"},
+      {"legal", "612 x 1008 pt"},
+      {"executive", "522 x 756 pt"},
+      {"note", "612 x 792 pt"},
+      {"11x17", "792 x 1224 pt"},
+      {"tabloid", "792 x 1224 pt"},
+      {"statement", "396 x 612 pt"},
+      {"halfletter", "396 x 612 pt"},
+      {"halfexecutive", "378 x 522 pt"},
+      {"folio", "612 x 936 pt"},
+      {"quarto", "610 x 780 pt"},
+      {"ledger", "1224 x 792 pt"},
+      {"archA", "648 x 864 pt"},
+      {"archB", "864 x 1296 pt"},
+      {"archC", "1296 x 1728 pt"},
+      {"archD", "1728 x 2592 pt"},
+      {"archE", "2592 x 3456 pt"},
+      {"flsa", "612 x 936 pt"},
+      {"flse", "612 x 936 pt"},
+      {"csheet", "1224 x 1584 pt"},
+      {"dsheet", "1584 x 2448 pt"},
+      {"esheet", "2448 x 3168 pt"},
+    };
+
+  size_t i;
+
+  for (i = 0; i < sizeof sizes / sizeof *sizes; i++)
+    if (ss_equals_case (ss_cstr (sizes[i][0]), name))
+      {
+        bool ok = parse_paper_size (sizes[i][1], h, v);
+        assert (ok);
+        return ok;
+      }
+  error (0, 0, _("unknown paper type `%.*s'"),
+         (int) ss_length (name), ss_data (name));
+  return false;
+}
+
+/* Reads file FILE_NAME to find a paper size.  Stores the
+   dimensions, in 1/72000" units, into *H and *V.  Returns true
+   on success, false on failure. */
+static bool
+read_paper_conf (const char *file_name, int *h, int *v)
+{
+  struct string line = DS_EMPTY_INITIALIZER;
+  int line_number = 0;
+  FILE *file;
+
+  file = fopen (file_name, "r");
+  if (file == NULL)
+    {
+      error (0, errno, _("error opening input file \"%s\""), file_name);
+      return false;
+    }
+
+  for (;;)
+    {
+      struct substring name;
+
+      if (!ds_read_config_line (&line, &line_number, file))
+       {
+         if (ferror (file))
+           error (0, errno, _("error reading file \"%s\""), file_name);
+         break;
+       }
+
+      name = ds_ss (&line);
+      ss_trim (&name, ss_cstr (CC_SPACES));
+      if (!ss_is_empty (name))
+        {
+          bool ok = get_standard_paper_size (name, h, v);
+          fclose (file);
+          ds_destroy (&line);
+          return ok;
+        }
+    }
+
+  fclose (file);
+  ds_destroy (&line);
+  error (0, 0, _("paper size file \"%s\" does not state a paper size"),
+         file_name);
+  return false;
+}
+
+/* The user didn't specify a paper size, so let's choose a
+   default based on his environment.  Stores the
+   dimensions, in 1/72000" units, into *H and *V.  Returns true
+   on success, false on failure. */
+static bool
+get_default_paper_size (int *h, int *v)
+{
+  /* libpaper in Debian (and other distributions?) allows the
+     paper size to be specified in $PAPERSIZE or in a file
+     specified in $PAPERCONF. */
+  if (getenv ("PAPERSIZE") != NULL)
+    return get_standard_paper_size (ss_cstr (getenv ("PAPERSIZE")), h, v);
+  if (getenv ("PAPERCONF") != NULL)
+    return read_paper_conf (getenv ("PAPERCONF"), h, v);
+
+#if HAVE_LC_PAPER
+  /* LC_PAPER is a non-standard glibc extension. */
+  *h = (int) nl_langinfo(_NL_PAPER_WIDTH) * (72000 / 25.4);
+  *v = (int) nl_langinfo(_NL_PAPER_HEIGHT) * (72000 / 25.4);
+  if (*h > 0 && *v > 0)
+     return true;
+#endif
+
+  /* libpaper defaults to /etc/papersize. */
+  if (fn_exists ("/etc/papersize"))
+    return read_paper_conf ("/etc/papersize", h, v);
+
+  /* Can't find a default. */
+  return false;
+}
+
diff --git a/src/output/measure.h b/src/output/measure.h
new file mode 100644 (file)
index 0000000..4b6fab3
--- /dev/null
@@ -0,0 +1,25 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 1997-9, 2000, 2007, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_MEASURE_H
+#define OUTPUT_MEASURE_H 1
+
+#include <stdbool.h>
+
+int measure_dimension (const char *dimen);
+bool measure_paper (const char *size, int *h, int *v);
+
+#endif /* output/measure.h */
diff --git a/src/output/message-item.c b/src/output/message-item.c
new file mode 100644 (file)
index 0000000..feb1d32
--- /dev/null
@@ -0,0 +1,66 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Sonftware Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "output/message-item.h"
+
+#include <stdlib.h>
+
+#include "libpspp/message.h"
+#include "output/driver.h"
+#include "output/output-item-provider.h"
+
+#include "gl/xalloc.h"
+
+struct message_item *
+message_item_create (const struct msg *msg)
+{
+  struct message_item *item;
+
+  item = xmalloc (sizeof *msg);
+  output_item_init (&item->output_item, &message_item_class);
+  item->msg = msg_dup (msg);
+
+  return item;
+}
+
+const struct msg *
+message_item_get_msg (const struct message_item *item)
+{
+  return item->msg;
+}
+
+static void
+message_item_destroy (struct output_item *output_item)
+{
+  struct message_item *item = to_message_item (output_item);
+  msg_destroy (item->msg);
+  free (item);
+}
+
+/* Submits ITEM to the configured output drivers, and transfers ownership to
+   the output subsystem. */
+void
+message_item_submit (struct message_item *item)
+{
+  output_submit (&item->output_item);
+}
+
+const struct output_item_class message_item_class =
+  {
+    message_item_destroy,
+  };
diff --git a/src/output/message-item.h b/src/output/message-item.h
new file mode 100644 (file)
index 0000000..a97b227
--- /dev/null
@@ -0,0 +1,101 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Sonftware Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_MESSAGE_ITEM_H
+#define OUTPUT_MESSAGE_ITEM_H 1
+
+/* Message items.
+
+   A message item is a subclass of an output item (see
+   output/output-item.h).
+
+   A message item is an error, warning, or note to the user.
+
+   Message items should not be submitted directly to the output subsystem.
+   Instead, use the msg() function in libpspp/message.h, which will ensure that
+   the message gets routed properly for the PSPP user interface in use. */
+
+#include <stdbool.h>
+#include <output/output-item.h>
+
+/* A message item. */
+struct message_item
+  {
+    struct output_item output_item;
+    struct msg *msg;
+  };
+
+struct message_item *message_item_create (const struct msg *);
+
+const struct msg *message_item_get_msg (const struct message_item *);
+\f
+/* This boilerplate for message_item, a subclass of output_item, was
+   autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct output_item_class message_item_class;
+
+/* Returns true if SUPER is a message_item, otherwise false. */
+static inline bool
+is_message_item (const struct output_item *super)
+{
+  return super->class == &message_item_class;
+}
+
+/* Returns SUPER converted to message_item.  SUPER must be a message_item, as
+   reported by is_message_item. */
+static inline struct message_item *
+to_message_item (const struct output_item *super)
+{
+  assert (is_message_item (super));
+  return UP_CAST (super, struct message_item, output_item);
+}
+
+/* Returns INSTANCE converted to output_item. */
+static inline struct output_item *
+message_item_super (const struct message_item *instance)
+{
+  return CONST_CAST (struct output_item *, &instance->output_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct message_item *
+message_item_ref (const struct message_item *instance)
+{
+  return to_message_item (output_item_ref (&instance->output_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+message_item_unref (struct message_item *instance)
+{
+  output_item_unref (&instance->output_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+message_item_is_shared (const struct message_item *instance)
+{
+  return output_item_is_shared (&instance->output_item);
+}
+
+void message_item_submit (struct message_item *);
+\f
+#endif /* output/message-item.h */
diff --git a/src/output/mk-class-boilerplate b/src/output/mk-class-boilerplate
new file mode 100755 (executable)
index 0000000..b2191aa
--- /dev/null
@@ -0,0 +1,77 @@
+#! /usr/bin/perl
+
+while (<>) {
+    if (my ($class, $super) = /boilerplate for ([a-zA-Z0-9_]+), a subclass of ([a-zA-Z0-9_]+)/) {
+       while (<>) {
+           last if /\f/;
+       }
+       print <<EOF;
+/* This boilerplate for ${class}, a subclass of ${super}, was
+   autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct ${super}_class ${class}_class;
+
+/* Returns true if SUPER is a ${class}, otherwise false. */
+static inline bool
+is_${class} (const struct ${super} *super)
+{
+  return super->class == &${class}_class;
+}
+
+/* Returns SUPER converted to ${class}.  SUPER must be a ${class}, as
+   reported by is_${class}. */
+static inline struct ${class} *
+to_${class} (const struct ${super} *super)
+{
+  assert (is_${class} (super));
+  return UP_CAST (super, struct ${class}, ${super});
+}
+
+/* Returns INSTANCE converted to ${super}. */
+static inline struct ${super} *
+${class}_super (const struct ${class} *instance)
+{
+  return CONST_CAST (struct ${super} *, &instance->${super});
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct ${class} *
+${class}_ref (const struct ${class} *instance)
+{
+  return to_${class} (${super}_ref (&instance->${super}));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+${class}_unref (struct ${class} *instance)
+{
+  ${super}_unref (&instance->${super});
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+${class}_is_shared (const struct ${class} *instance)
+{
+  return ${super}_is_shared (&instance->${super});
+}
+
+EOF
+       if ($super ne 'output_item') {
+           print <<EOF;
+static inline void
+${class}_submit (struct ${class} *instance)
+{
+  ${super}_submit (&instance->${super});
+}
+EOF
+       } else {
+           print "void ${class}_submit (struct ${class} *);\n";
+       }
+    }
+    print;
+}
diff --git a/src/output/msglog.c b/src/output/msglog.c
new file mode 100644 (file)
index 0000000..70c237c
--- /dev/null
@@ -0,0 +1,119 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "output/msglog.h"
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "data/file-name.h"
+#include "data/settings.h"
+#include "libpspp/cast.h"
+#include "output/driver-provider.h"
+#include "output/message-item.h"
+
+#include "gl/error.h"
+#include "gl/fwriteerror.h"
+#include "gl/xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+struct msglog_driver
+  {
+    struct output_driver driver;
+    FILE *file;
+    char *file_name;
+    char *command_name;
+  };
+
+static const struct output_driver_class msglog_class;
+
+static struct msglog_driver *
+msglog_driver_cast (struct output_driver *driver)
+{
+  assert (driver->class == &msglog_class);
+  return UP_CAST (driver, struct msglog_driver, driver);
+}
+
+struct output_driver *
+msglog_create (const char *file_name)
+{
+  enum settings_output_devices type;
+  struct msglog_driver *ml;
+  FILE *file;
+
+  file = fn_open (file_name, "w");
+  if (file == NULL)
+    {
+      error (0, errno, _("error opening output file \"%s\""), file_name);
+      return NULL;
+    }
+
+  type = (!strcmp (file_name, "-") || isatty (fileno (file))
+          ? SETTINGS_DEVICE_TERMINAL
+          : SETTINGS_DEVICE_UNFILTERED);
+
+  ml = xzalloc (sizeof *ml);
+  output_driver_init (&ml->driver, &msglog_class, file_name, type);
+  ml->file = file;
+  ml->file_name = xstrdup (file_name);
+  ml->command_name = NULL;
+
+  output_driver_register (&ml->driver);
+
+  return &ml->driver;
+}
+
+static void
+msglog_destroy (struct output_driver *driver)
+{
+  struct msglog_driver *ml = msglog_driver_cast (driver);
+
+  fn_close (ml->file_name, ml->file);
+  free (ml->file_name);
+  free (ml->command_name);
+  free (ml);
+}
+
+static void
+msglog_submit (struct output_driver *driver, const struct output_item *item)
+{
+  struct msglog_driver *ml = msglog_driver_cast (driver);
+
+  output_driver_track_current_command (item, &ml->command_name);
+
+  if (is_message_item (item))
+    {
+      const struct message_item *message_item = to_message_item (item);
+      const struct msg *msg = message_item_get_msg (message_item);
+      char *s = msg_to_string (msg, ml->command_name);
+      fprintf (ml->file, "%s\n", s);
+      free (s);
+    }
+}
+
+static const struct output_driver_class msglog_class =
+  {
+    "msglog",
+    msglog_destroy,
+    msglog_submit,
+    NULL
+  };
diff --git a/src/output/msglog.h b/src/output/msglog.h
new file mode 100644 (file)
index 0000000..e5d5498
--- /dev/null
@@ -0,0 +1,24 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_MSGLOG_H
+#define OUTPUT_MSGLOG_H 1
+
+/* Output driver to log errors, warnings, and notes to files. */
+
+struct output_driver *msglog_create (const char *file_name);
+
+#endif /* output/msglog.h */
diff --git a/src/output/odt.c b/src/output/odt.c
new file mode 100644 (file)
index 0000000..49a55b4
--- /dev/null
@@ -0,0 +1,524 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* A driver for creating OpenDocument Format text files from PSPP's output */
+
+#include <errno.h>
+#include <libgen.h>
+#include <libxml/xmlwriter.h>
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "libpspp/assertion.h"
+#include "libpspp/cast.h"
+#include "libpspp/str.h"
+#include "libpspp/version.h"
+#include "libpspp/zip-writer.h"
+#include "output/driver-provider.h"
+#include "output/message-item.h"
+#include "output/options.h"
+#include "output/tab.h"
+#include "output/table-item.h"
+#include "output/table-provider.h"
+#include "output/text-item.h"
+
+#include "gl/xalloc.h"
+#include "gl/error.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+#define _xml(X) (const xmlChar *)(X)
+
+struct odt_driver
+{
+  struct output_driver driver;
+
+  struct zip_writer *zip;     /* ZIP file writer. */
+  char *file_name;            /* Output file name. */
+
+  /* content.xml */
+  xmlTextWriterPtr content_wtr; /* XML writer. */
+  FILE *content_file;           /* Temporary file. */
+
+  /* manifest.xml */
+  xmlTextWriterPtr manifest_wtr; /* XML writer. */
+  FILE *manifest_file;           /* Temporary file. */
+
+  /* Number of tables so far. */
+  int table_num;
+
+  /* Name of current command. */
+  char *command_name;
+};
+
+static const struct output_driver_class odt_driver_class;
+
+static struct odt_driver *
+odt_driver_cast (struct output_driver *driver)
+{
+  assert (driver->class == &odt_driver_class);
+  return UP_CAST (driver, struct odt_driver, driver);
+}
+
+/* Create the "mimetype" file needed by ODF */
+static bool
+create_mimetype (struct zip_writer *zip)
+{
+  FILE *fp;
+
+  fp = tmpfile ();
+  if (fp == NULL)
+    {
+      error (0, errno, _("error creating temporary file"));
+      return false;
+    }
+
+  fprintf (fp, "application/vnd.oasis.opendocument.text");
+  zip_writer_add (zip, fp, "mimetype");
+  fclose (fp);
+
+  return true;
+}
+
+/* Creates a new temporary file and stores it in *FILE, then creates an XML
+   writer for it and stores it in *W. */
+static void
+create_writer (FILE **file, xmlTextWriterPtr *w)
+{
+  /* XXX this can fail */
+  *file = tmpfile ();
+  *w = xmlNewTextWriter (xmlOutputBufferCreateFile (*file, NULL));
+
+  xmlTextWriterStartDocument (*w, NULL, "UTF-8", NULL);
+}
+
+
+static void
+register_file (struct odt_driver *odt, const char *filename)
+{
+  assert (odt->manifest_wtr);
+  xmlTextWriterStartElement (odt->manifest_wtr, _xml("manifest:file-entry"));
+  xmlTextWriterWriteAttribute (odt->manifest_wtr, _xml("manifest:media-type"),  _xml("text/xml"));
+  xmlTextWriterWriteAttribute (odt->manifest_wtr, _xml("manifest:full-path"),  _xml (filename));
+  xmlTextWriterEndElement (odt->manifest_wtr);
+}
+
+static void
+write_style_data (struct odt_driver *odt)
+{
+  xmlTextWriterPtr w;
+  FILE *file;
+
+  create_writer (&file, &w);
+  register_file (odt, "styles.xml");
+
+  xmlTextWriterStartElement (w, _xml ("office:document-styles"));
+  xmlTextWriterWriteAttribute (w, _xml ("xmlns:office"),
+                              _xml ("urn:oasis:names:tc:opendocument:xmlns:office:1.0"));
+
+  xmlTextWriterWriteAttribute (w, _xml ("xmlns:style"),
+                              _xml ("urn:oasis:names:tc:opendocument:xmlns:style:1.0"));
+
+  xmlTextWriterWriteAttribute (w, _xml ("xmlns:fo"),
+                              _xml ("urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0") );
+
+  xmlTextWriterWriteAttribute (w, _xml ("office:version"),  _xml ("1.1"));
+                              
+
+
+  xmlTextWriterStartElement (w, _xml ("office:styles"));
+
+
+  {
+    xmlTextWriterStartElement (w, _xml ("style:style"));
+    xmlTextWriterWriteAttribute (w, _xml ("style:name"),
+                                _xml ("Standard"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:family"),
+                                _xml ("paragraph"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:class"),
+                                _xml ("text"));
+
+    xmlTextWriterEndElement (w); /* style:style */
+  }
+
+  {
+    xmlTextWriterStartElement (w, _xml ("style:style"));
+    xmlTextWriterWriteAttribute (w, _xml ("style:name"),
+                                _xml ("Table_20_Contents"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:display-name"),
+                                _xml ("Table Contents"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:family"),
+                                _xml ("paragraph"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:parent-style-name"),
+                                _xml ("Standard"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:class"),
+                                _xml ("extra"));
+
+    xmlTextWriterEndElement (w); /* style:style */
+  }
+
+  {
+    xmlTextWriterStartElement (w, _xml ("style:style"));
+    xmlTextWriterWriteAttribute (w, _xml ("style:name"),
+                                _xml ("Table_20_Heading"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:display-name"),
+                                _xml ("Table Heading"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:family"),
+                                _xml ("paragraph"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:parent-style-name"),
+                                _xml ("Table_20_Contents"));
+
+    xmlTextWriterWriteAttribute (w, _xml ("style:class"),
+                                _xml ("extra"));
+
+
+    xmlTextWriterStartElement (w, _xml ("style:text-properties"));
+    xmlTextWriterWriteAttribute (w, _xml ("fo:font-weight"), _xml ("bold"));
+    xmlTextWriterWriteAttribute (w, _xml ("style:font-weight-asian"), _xml ("bold"));
+    xmlTextWriterWriteAttribute (w, _xml ("style:font-weight-complex"), _xml ("bold"));
+    xmlTextWriterEndElement (w); /* style:text-properties */
+
+    xmlTextWriterEndElement (w); /* style:style */
+  }
+
+
+  xmlTextWriterEndElement (w); /* office:styles */
+  xmlTextWriterEndElement (w); /* office:document-styles */
+
+  xmlTextWriterEndDocument (w);
+  xmlFreeTextWriter (w);
+  zip_writer_add (odt->zip, file, "styles.xml");
+  fclose (file);
+}
+
+static void
+write_meta_data (struct odt_driver *odt)
+{
+  xmlTextWriterPtr w;
+  FILE *file;
+
+  create_writer (&file, &w);
+  register_file (odt, "meta.xml");
+
+  xmlTextWriterStartElement (w, _xml ("office:document-meta"));
+  xmlTextWriterWriteAttribute (w, _xml ("xmlns:office"), _xml ("urn:oasis:names:tc:opendocument:xmlns:office:1.0"));
+  xmlTextWriterWriteAttribute (w, _xml ("xmlns:dc"),  _xml ("http://purl.org/dc/elements/1.1/"));
+  xmlTextWriterWriteAttribute (w, _xml ("xmlns:meta"), _xml ("urn:oasis:names:tc:opendocument:xmlns:meta:1.0"));
+  xmlTextWriterWriteAttribute (w, _xml ("xmlns:ooo"), _xml("http://openoffice.org/2004/office"));
+  xmlTextWriterWriteAttribute (w, _xml ("office:version"),  _xml("1.1"));
+
+  xmlTextWriterStartElement (w, _xml ("office:meta"));
+  {
+    xmlTextWriterStartElement (w, _xml ("meta:generator"));
+    xmlTextWriterWriteString (w, _xml (stat_version));
+    xmlTextWriterEndElement (w);
+  }
+
+
+  {
+    char buf[30];
+    time_t t = time (NULL);
+    struct tm *tm =  localtime (&t);
+
+    strftime (buf, 30, "%Y-%m-%dT%H:%M:%S", tm);
+
+    xmlTextWriterStartElement (w, _xml ("meta:creation-date"));
+    xmlTextWriterWriteString (w, _xml (buf));
+    xmlTextWriterEndElement (w);
+
+    xmlTextWriterStartElement (w, _xml ("dc:date"));
+    xmlTextWriterWriteString (w, _xml (buf));
+    xmlTextWriterEndElement (w);
+  }
+
+#ifdef HAVE_PWD_H
+  {
+    struct passwd *pw = getpwuid (getuid ());
+    if (pw != NULL)
+      {
+        xmlTextWriterStartElement (w, _xml ("meta:initial-creator"));
+        xmlTextWriterWriteString (w, _xml (strtok (pw->pw_gecos, ",")));
+        xmlTextWriterEndElement (w);
+
+        xmlTextWriterStartElement (w, _xml ("dc:creator"));
+        xmlTextWriterWriteString (w, _xml (strtok (pw->pw_gecos, ",")));
+        xmlTextWriterEndElement (w);
+      }
+  }
+#endif
+
+  xmlTextWriterEndElement (w);
+  xmlTextWriterEndElement (w);
+  xmlTextWriterEndDocument (w);
+  xmlFreeTextWriter (w);
+  zip_writer_add (odt->zip, file, "meta.xml");
+  fclose (file);
+}
+
+static struct output_driver *
+odt_create (const char *file_name, enum settings_output_devices device_type,
+            struct string_map *o UNUSED)
+{
+  struct output_driver *d;
+  struct odt_driver *odt;
+  struct zip_writer *zip;
+
+  zip = zip_writer_create (file_name);
+  if (zip == NULL)
+    return NULL;
+
+  odt = xzalloc (sizeof *odt);
+  d = &odt->driver;
+  output_driver_init (d, &odt_driver_class, file_name, device_type);
+
+  odt->zip = zip;
+  odt->file_name = xstrdup (file_name);
+
+  if (!create_mimetype (zip))
+    {
+      output_driver_destroy (d);
+      return NULL;
+    }
+
+  /* Create the manifest */
+  create_writer (&odt->manifest_file, &odt->manifest_wtr);
+
+  xmlTextWriterStartElement (odt->manifest_wtr, _xml("manifest:manifest"));
+  xmlTextWriterWriteAttribute (odt->manifest_wtr, _xml("xmlns:manifest"),
+                              _xml("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"));
+
+
+  /* Add a manifest entry for the document as a whole */
+  xmlTextWriterStartElement (odt->manifest_wtr, _xml("manifest:file-entry"));
+  xmlTextWriterWriteAttribute (odt->manifest_wtr, _xml("manifest:media-type"),  _xml("application/vnd.oasis.opendocument.text"));
+  xmlTextWriterWriteAttribute (odt->manifest_wtr, _xml("manifest:full-path"),  _xml("/"));
+  xmlTextWriterEndElement (odt->manifest_wtr);
+
+
+  write_meta_data (odt);
+  write_style_data (odt);
+
+  create_writer (&odt->content_file, &odt->content_wtr);
+  register_file (odt, "content.xml");
+
+
+  /* Some necessary junk at the start */
+  xmlTextWriterStartElement (odt->content_wtr, _xml("office:document-content"));
+  xmlTextWriterWriteAttribute (odt->content_wtr, _xml("xmlns:office"),
+                              _xml("urn:oasis:names:tc:opendocument:xmlns:office:1.0"));
+
+  xmlTextWriterWriteAttribute (odt->content_wtr, _xml("xmlns:text"),
+                              _xml("urn:oasis:names:tc:opendocument:xmlns:text:1.0"));
+
+  xmlTextWriterWriteAttribute (odt->content_wtr, _xml("xmlns:table"),
+                              _xml("urn:oasis:names:tc:opendocument:xmlns:table:1.0"));
+
+  xmlTextWriterWriteAttribute (odt->content_wtr, _xml("office:version"), _xml("1.1"));
+
+  xmlTextWriterStartElement (odt->content_wtr, _xml("office:body"));
+  xmlTextWriterStartElement (odt->content_wtr, _xml("office:text"));
+
+
+
+  /* Close the manifest */
+  xmlTextWriterEndElement (odt->manifest_wtr);
+  xmlTextWriterEndDocument (odt->manifest_wtr);
+  xmlFreeTextWriter (odt->manifest_wtr);
+  zip_writer_add (odt->zip, odt->manifest_file, "META-INF/manifest.xml");
+  fclose (odt->manifest_file);
+
+  return d;
+}
+
+static void
+odt_destroy (struct output_driver *driver)
+{
+  struct odt_driver *odt = odt_driver_cast (driver);
+
+  if (odt->content_wtr != NULL)
+    {
+      xmlTextWriterEndElement (odt->content_wtr); /* office:text */
+      xmlTextWriterEndElement (odt->content_wtr); /* office:body */
+      xmlTextWriterEndElement (odt->content_wtr); /* office:document-content */
+
+      xmlTextWriterEndDocument (odt->content_wtr);
+      xmlFreeTextWriter (odt->content_wtr);
+      zip_writer_add (odt->zip, odt->content_file, "content.xml");
+      fclose (odt->content_file);
+
+      zip_writer_close (odt->zip);
+    }
+  
+  free (odt->command_name);
+  free (odt);
+}
+
+static void
+odt_submit_table (struct odt_driver *odt, struct table_item *item)
+{
+  const struct table *tab = table_item_get_table (item);
+  const char *caption = table_item_get_caption (item);
+  int r, c;
+
+  /* Write a heading for the table */
+  if (caption != NULL)
+    {
+      xmlTextWriterStartElement (odt->content_wtr, _xml("text:h"));
+      xmlTextWriterWriteFormatAttribute (odt->content_wtr, _xml("text:level"),
+                                         "%d", 2);
+      xmlTextWriterWriteString (odt->content_wtr,
+                                _xml (table_item_get_caption (item)) );
+      xmlTextWriterEndElement (odt->content_wtr);
+    }
+
+  /* Start table */
+  xmlTextWriterStartElement (odt->content_wtr, _xml("table:table"));
+  xmlTextWriterWriteFormatAttribute (odt->content_wtr, _xml("table:name"), 
+                                    "TABLE-%d", odt->table_num++);
+
+
+  /* Start column definitions */
+  xmlTextWriterStartElement (odt->content_wtr, _xml("table:table-column"));
+  xmlTextWriterWriteFormatAttribute (odt->content_wtr, _xml("table:number-columns-repeated"), "%d", table_nc (tab));
+  xmlTextWriterEndElement (odt->content_wtr);
+
+
+  /* Deal with row headers */
+  if ( table_ht (tab) > 0)
+    xmlTextWriterStartElement (odt->content_wtr, _xml("table:table-header-rows"));
+    
+
+  /* Write all the rows */
+  for (r = 0 ; r < table_nr (tab); ++r)
+    {
+      /* Start row definition */
+      xmlTextWriterStartElement (odt->content_wtr, _xml("table:table-row"));
+
+      /* Write all the columns */
+      for (c = 0 ; c < table_nc (tab) ; ++c)
+       {
+          struct table_cell cell;
+
+          table_get_cell (tab, c, r, &cell);
+
+          if (c == cell.d[TABLE_HORZ][0] && r == cell.d[TABLE_VERT][0])
+            {
+              int colspan = table_cell_colspan (&cell);
+              int rowspan = table_cell_rowspan (&cell);
+
+              xmlTextWriterStartElement (odt->content_wtr, _xml("table:table-cell"));
+              xmlTextWriterWriteAttribute (odt->content_wtr, _xml("office:value-type"), _xml("string"));
+
+              if (colspan > 1)
+                xmlTextWriterWriteFormatAttribute (
+                  odt->content_wtr, _xml("table:number-columns-spanned"),
+                  "%d", colspan);
+
+              if (rowspan > 1)
+                xmlTextWriterWriteFormatAttribute (
+                  odt->content_wtr, _xml("table:number-rows-spanned"),
+                  "%d", rowspan);
+
+             xmlTextWriterStartElement (odt->content_wtr, _xml("text:p"));
+
+             if ( r < table_ht (tab) || c < table_hl (tab) )
+               xmlTextWriterWriteAttribute (odt->content_wtr, _xml("text:style-name"), _xml("Table_20_Heading"));
+             else
+               xmlTextWriterWriteAttribute (odt->content_wtr, _xml("text:style-name"), _xml("Table_20_Contents"));
+
+             xmlTextWriterWriteString (odt->content_wtr, _xml(cell.contents));
+
+             xmlTextWriterEndElement (odt->content_wtr); /* text:p */
+             xmlTextWriterEndElement (odt->content_wtr); /* table:table-cell */
+           }
+         else
+           {
+             xmlTextWriterStartElement (odt->content_wtr, _xml("table:covered-table-cell"));
+             xmlTextWriterEndElement (odt->content_wtr);
+           }
+
+          table_cell_free (&cell);
+       }
+  
+      xmlTextWriterEndElement (odt->content_wtr); /* row */
+
+      if ( table_ht (tab) > 0 && r == table_ht (tab) - 1)
+       xmlTextWriterEndElement (odt->content_wtr); /* table-header-rows */
+    }
+
+  xmlTextWriterEndElement (odt->content_wtr); /* table */
+}
+
+static void
+odt_output_text (struct odt_driver *odt, const char *text)
+{
+  xmlTextWriterStartElement (odt->content_wtr, _xml("text:p"));
+  xmlTextWriterWriteString (odt->content_wtr, _xml(text));
+  xmlTextWriterEndElement (odt->content_wtr);
+}
+
+/* Submit a table to the ODT driver */
+static void
+odt_submit (struct output_driver *driver,
+            const struct output_item *output_item)
+{
+  struct odt_driver *odt = odt_driver_cast (driver);
+
+  output_driver_track_current_command (output_item, &odt->command_name);
+
+  if (is_table_item (output_item))
+    odt_submit_table (odt, to_table_item (output_item));
+  else if (is_text_item (output_item))
+    {
+      /* XXX apply different styles based on text_item's type.  */
+      odt_output_text (odt, text_item_get_text (to_text_item (output_item)));
+    }
+  else if (is_message_item (output_item))
+    {
+      const struct message_item *message_item = to_message_item (output_item);
+      const struct msg *msg = message_item_get_msg (message_item);
+      char *s = msg_to_string (msg, odt->command_name);
+      odt_output_text (odt, s);
+      free (s);
+    }
+}
+
+struct output_driver_factory odt_driver_factory = { "odt", odt_create };
+
+static const struct output_driver_class odt_driver_class =
+{
+  "odf",
+  odt_destroy,
+  odt_submit,
+  NULL,
+};
diff --git a/src/output/options.c b/src/output/options.c
new file mode 100644 (file)
index 0000000..593adf5
--- /dev/null
@@ -0,0 +1,338 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "output/options.h"
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libpspp/str.h"
+#include "libpspp/string-map.h"
+#include "output/driver-provider.h"
+#include "output/measure.h"
+
+#include "gl/error.h"
+#include "gl/xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+/* Creates and returns a new struct driver_option that contains copies of
+   all of the supplied arguments.  All of the arguments must be nonnull,
+   except that VALUE may be NULL (if the user did not supply a value for this
+   option).
+
+   Refer to struct driver_option for the meaning of each argument. */
+struct driver_option *
+driver_option_create (const char *driver_name, const char *name,
+                      const char *value, const char *default_value)
+{
+  struct driver_option *o = xmalloc (sizeof *o);
+  o->driver_name = xstrdup (driver_name);
+  o->name = xstrdup (name);
+  o->value = value != NULL ? xstrdup (value) : NULL;
+  o->default_value = xstrdup (default_value);
+  return o;
+}
+
+/* Creates and returns a new struct driver_option for output driver DRIVER
+   (which is needed only to the extent that its name will be used in error
+   messages).  The option named NAME is extracted from OPTIONS.  DEFAULT_VALUE
+   is the default value of the option, used if the given option was not
+   supplied or was invalid. */
+struct driver_option *
+driver_option_get (struct output_driver *driver, struct string_map *options,
+                   const char *name, const char *default_value)
+{
+  struct driver_option *option;
+  char *value;
+
+  value = string_map_find_and_delete (options, name);
+  option = driver_option_create (output_driver_get_name (driver), name, value,
+                                 default_value);
+  free (value);
+  return option;
+}
+
+/* Frees driver option O. */
+void
+driver_option_destroy (struct driver_option *o)
+{
+  if (o != NULL)
+    {
+      free (o->driver_name);
+      free (o->name);
+      free (o->value);
+      free (o->default_value);
+      free (o);
+    }
+}
+
+/* Stores the paper size of the value of option O into *H and *V, in 1/72000"
+   units.  Any syntax accepted by measure_paper() may be used.
+
+   Destroys O. */
+void
+parse_paper_size (struct driver_option *o, int *h, int *v)
+{
+  if (o->value == NULL || !measure_paper (o->value, h, v))
+    measure_paper (o->default_value, h, v);
+  driver_option_destroy (o);
+}
+
+static int
+do_parse_boolean (const char *driver_name, const char *key,
+                  const char *value)
+{
+  if (!strcmp (value, "on") || !strcmp (value, "true")
+      || !strcmp (value, "yes") || !strcmp (value, "1"))
+    return true;
+  else if (!strcmp (value, "off") || !strcmp (value, "false")
+           || !strcmp (value, "no") || !strcmp (value, "0"))
+    return false;
+  else
+    {
+      error (0, 0, _("%s: \"%s\" is \"%s\" but a Boolean value is required"),
+             driver_name, value, key);
+      return -1;
+    }
+}
+
+/* Parses and return O's value as a Boolean value.  "true" and "false", "yes"
+   and "no", "on" and "off", and "1" and "0" are acceptable boolean strings.
+
+   Destroys O. */
+bool
+parse_boolean (struct driver_option *o)
+{
+  bool retval;
+
+  retval = do_parse_boolean (o->driver_name, o->name, o->default_value) > 0;
+  if (o->value != NULL)
+    {
+      int value = do_parse_boolean (o->driver_name, o->name, o->value);
+      if (value >= 0)
+        retval = value;
+    }
+
+  driver_option_destroy (o);
+
+  return retval;
+}
+
+/* Parses O's value as an enumeration constant.  The arguments to this function
+   consist of a series of string/int pairs, terminated by a null pointer value.
+   O's value is compared to each string in turn, and parse_enum() returns the
+   int associated with the first matching string.  If there is no match, or if
+   O has no user-specified value, then O's default value is treated the same
+   way.  If the default value still does not match, parse_enum() returns 0.
+
+   Example: parse_enum (o, "a", 1, "b", 2, (char *) NULL) returns 1 if O's
+   value if "a", 2 if O's value is "b".
+
+   Destroys O. */
+int
+parse_enum (struct driver_option *o, ...)
+{
+  va_list args;
+  int retval;
+
+  retval = 0;
+  va_start (args, o);
+  for (;;)
+    {
+      const char *s;
+      int value;
+
+      s = va_arg (args, const char *);
+      if (s == NULL)
+        {
+          if (o->value != NULL)
+            {
+              struct string choices;
+              int i;
+
+              ds_init_empty (&choices);
+              va_end (args);
+              va_start (args, o);
+              for (i = 0; ; i++)
+                {
+                  s = va_arg (args, const char *);
+                  if (s == NULL)
+                    break;
+                  value = va_arg (args, int);
+
+                  if (i > 0)
+                    ds_put_cstr (&choices, ", ");
+                  ds_put_format (&choices, "`%s'", s);
+                }
+
+              error (0, 0, _("%s: \"%s\" is \"%s\" but one of the following "
+                             "is required: %s"),
+                     o->driver_name, o->name, o->value, ds_cstr (&choices));
+              ds_destroy (&choices);
+            }
+          break;
+        }
+      value = va_arg (args, int);
+
+      if (o->value != NULL && !strcmp (s, o->value))
+        {
+          retval = value;
+          break;
+        }
+      else if (!strcmp (s, o->default_value))
+        retval = value;
+    }
+  va_end (args);
+  driver_option_destroy (o);
+  return retval;
+}
+
+/* Parses O's value as an integer in the range MIN_VALUE to MAX_VALUE
+   (inclusive) and returns the integer.
+
+   Destroys O. */
+int
+parse_int (struct driver_option *o, int min_value, int max_value)
+{
+  int retval = strtol (o->default_value, NULL, 0);
+
+  if (o->value != NULL)
+    {
+      int value;
+      char *tail;
+
+      errno = 0;
+      value = strtol (o->value, &tail, 0);
+      if (tail != o->value && *tail == '\0' && errno != ERANGE
+          && value >= min_value && value <= max_value)
+        retval = value;
+      else if (max_value == INT_MAX)
+        {
+          if (min_value == 0)
+            error (0, 0, _("%s: \"%s\" is \"%s\" but a nonnegative integer "
+                           "is required"),
+                   o->driver_name, o->name, o->value);
+          else if (min_value == 1)
+            error (0, 0, _("%s: \"%s\" is \"%s\" but a positive integer is "
+                           "required"), o->driver_name, o->name, o->value);
+          else if (min_value == INT_MIN)
+            error (0, 0, _("%s: \"%s\" is \"%s\" but an integer is required"),
+                   o->driver_name, o->name, o->value);
+          else
+            error (0, 0, _("%s: \"%s\" is \"%s\" but an integer greater "
+                           "than %d is required"),
+                   o->driver_name, o->name, o->value, min_value - 1);
+        }
+      else
+        error (0, 0, _("%s: \"%s\" is \"%s\"  but an integer between %d and "
+                       "%d is required"),
+               o->driver_name, o->name, o->value, min_value, max_value);
+    }
+
+  driver_option_destroy (o);
+  return retval;
+}
+
+/* Parses O's value as a dimension, as understood by measure_dimension(), and
+   returns its length in units of 1/72000".
+
+   Destroys O. */
+int
+parse_dimension (struct driver_option *o)
+{
+  int retval;
+
+  retval = o->value != NULL ? measure_dimension (o->value) : -1;
+  if (retval == -1)
+    retval = measure_dimension (o->default_value);
+
+  driver_option_destroy (o);
+  return retval;
+}
+
+/* Parses O's value as a string and returns it as a malloc'd string that the
+   caller is responsible for freeing.
+
+   Destroys O. */
+char *
+parse_string (struct driver_option *o)
+{
+  char *retval = xstrdup (o->value != NULL ? o->value : o->default_value);
+  driver_option_destroy (o);
+  return retval;
+}
+
+static char *
+default_chart_file_name (const char *file_name)
+{
+  if (strcmp (file_name, "-"))
+    {
+      const char *extension = strrchr (file_name, '.');
+      int stem_length = extension ? extension - file_name : strlen (file_name);
+      return xasprintf ("%.*s-#.png", stem_length, file_name);
+    }
+  else
+    return NULL;
+}
+
+/* Parses and returns a chart file name, or NULL if no charts should be output.
+   If a nonnull string is returned, it will contain at least one '#' character,
+   which the client will presumably replace by a number as part of writing
+   charts to separate files.
+
+   If O->value is "none", then this function returns NULL.
+
+   If O->value is non-NULL but not "none", returns a copy of that string (if it
+   contains '#').
+
+   If O->value is NULL, then O's default_value should be the name of the main
+   output file.  Returns NULL if default_value is "-", and otherwise returns a
+   copy of string string with its extension stripped off and "-#.png" appended.
+
+   Destroys O. */
+char *
+parse_chart_file_name (struct driver_option *o)
+{
+  char *chart_file_name;
+
+  if (o->value != NULL)
+    {
+      if (!strcmp (o->value, "none"))
+        chart_file_name = NULL;
+      else if (strchr (o->value, '#') != NULL)
+        chart_file_name = xstrdup (o->value);
+      else
+        {
+          error (0, 0, _("%s: \"%s\" is \"%s\" but a file name that contains "
+                         "\"#\" is required."),
+                 o->name, o->value, o->driver_name);
+          chart_file_name = default_chart_file_name (o->default_value);
+        }
+    }
+  else
+    chart_file_name = default_chart_file_name (o->default_value);
+
+  driver_option_destroy (o);
+
+  return chart_file_name;
+}
diff --git a/src/output/options.h b/src/output/options.h
new file mode 100644 (file)
index 0000000..3f9e705
--- /dev/null
@@ -0,0 +1,55 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_OPTIONS_H
+#define OUTPUT_OPTIONS_H 1
+
+/* Helper functions for driver option parsing. */
+
+#include <stdbool.h>
+#include "libpspp/compiler.h"
+
+struct output_driver;
+struct string_map;
+
+/* An option being parsed. */
+struct driver_option
+  {
+    char *driver_name;          /* Driver's name, for use in error messages. */
+    char *name;                 /* Option name, for use in error messages.  */
+    char *value;                /* Value supplied by user (NULL if none). */
+    char *default_value;        /* Default value supplied by driver. */
+  };
+
+struct driver_option *driver_option_create (const char *driver_name,
+                                            const char *name,
+                                            const char *value,
+                                            const char *default_value);
+struct driver_option *driver_option_get (struct output_driver *,
+                                         struct string_map *,
+                                         const char *name,
+                                         const char *default_value);
+void driver_option_destroy (struct driver_option *);
+
+void parse_paper_size (struct driver_option *, int *h, int *v);
+bool parse_boolean (struct driver_option *);
+int parse_enum (struct driver_option *, ...) SENTINEL(0);
+int parse_int (struct driver_option *, int min_value, int max_value);
+int parse_dimension (struct driver_option *);
+char *parse_string (struct driver_option *);
+char *parse_chart_file_name (struct driver_option *);
+
+#endif /* output/options.h */
diff --git a/src/output/output-item-provider.h b/src/output/output-item-provider.h
new file mode 100644 (file)
index 0000000..a810f97
--- /dev/null
@@ -0,0 +1,35 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_ITEM_PROVIDER_H
+#define OUTPUT_ITEM_PROVIDER_H 1
+
+#include <output/output-item.h>
+
+/* Class structure for an output item.
+
+   This structure must be provided by an output_item subclass to initialize an
+   instance of output_item. */
+struct output_item_class
+  {
+    /* Destroys and frees ITEM.  Called when output_item_unref() drops ITEM's
+       reference count to 0. */
+    void (*destroy) (struct output_item *item);
+  };
+
+void output_item_init (struct output_item *, const struct output_item_class *);
+
+#endif /* output/output-item-provider.h */
diff --git a/src/output/output-item.c b/src/output/output-item.c
new file mode 100644 (file)
index 0000000..e1c889f
--- /dev/null
@@ -0,0 +1,73 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/output-item-provider.h>
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include <libpspp/assertion.h>
+#include <libpspp/cast.h>
+
+#include "xalloc.h"
+\f
+/* Increases ITEM's reference count, indicating that it has an additional
+   owner.  An output item that is shared among multiple owners must not be
+   modified. */
+struct output_item *
+output_item_ref (const struct output_item *item_)
+{
+  struct output_item *item = CONST_CAST (struct output_item *, item_);
+  item->ref_cnt++;
+  return item;
+}
+
+/* Decreases ITEM's reference count, indicating that it has one fewer owner.
+   If ITEM no longer has any owners, it is freed. */
+void
+output_item_unref (struct output_item *item)
+{
+  if (item != NULL)
+    {
+      assert (item->ref_cnt > 0);
+      if (--item->ref_cnt == 0)
+        item->class->destroy (item);
+    }
+}
+
+/* Returns true if ITEM has more than one owner.  An output item that is shared
+   among multiple owners must not be modified. */
+bool
+output_item_is_shared (const struct output_item *item)
+{
+  return item->ref_cnt > 1;
+}
+\f
+/* Initializes ITEM as an output item of the specified CLASS, initially with a
+   reference count of 1.
+
+   An output item is an abstract class, that is, a plain output_item is not
+   useful on its own.  Thus, this function is normally called from the
+   initialization function of some subclass of output_item. */
+void
+output_item_init (struct output_item *item,
+                  const struct output_item_class *class)
+{
+  item->class = class;
+  item->ref_cnt = 1;
+}
diff --git a/src/output/output-item.h b/src/output/output-item.h
new file mode 100644 (file)
index 0000000..b45e008
--- /dev/null
@@ -0,0 +1,52 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_ITEM_H
+#define OUTPUT_ITEM_H 1
+
+/* Output items.
+
+   An output item is a self-contained chunk of output.  The
+   following kinds of output items currently exist:
+
+        - Tables (see output/table-item.h).
+
+        - Charts (see output/chart-item.h).
+
+        - Text strings (see output/text-item.h).
+
+        - Messages (see output/message-item.h).
+*/
+
+#include <libpspp/cast.h>
+#include <stdbool.h>
+
+/* A single output item. */
+struct output_item
+  {
+    const struct output_item_class *class;
+
+    /* Reference count.  An output item may be shared between multiple owners,
+       indicated by a reference count greater than 1.  When this is the case,
+       the output item must not be modified. */
+    int ref_cnt;
+  };
+
+struct output_item *output_item_ref (const struct output_item *);
+void output_item_unref (struct output_item *);
+bool output_item_is_shared (const struct output_item *);
+
+#endif /* output/output-item.h */
diff --git a/src/output/output.c b/src/output/output.c
deleted file mode 100644 (file)
index 843b0d4..0000000
+++ /dev/null
@@ -1,1179 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-#include <ctype.h>
-#include <errno.h>
-#if HAVE_LC_PAPER
-#include <langinfo.h>
-#endif
-#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <data/file-name.h>
-#include <data/settings.h>
-#include <libpspp/misc.h>
-#include <libpspp/str.h>
-#include <output/htmlP.h>
-#include <output/output.h>
-
-#include "error.h"
-#include "intprops.h"
-#include "xalloc.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-
-/* FIXME? Should the output configuration format be changed to
-   drivername:classname:devicetype:options, where devicetype is zero
-   or more of screen, printer, listing? */
-
-/* FIXME: Have the reentrancy problems been solved? */
-
-/* Where the output driver name came from. */
-enum
-  {
-    OUTP_S_COMMAND_LINE,       /* Specified by the user. */
-    OUTP_S_INIT_FILE           /* `default' or the init file. */
-  };
-
-/* Names the output drivers to be used. */
-struct outp_names
-  {
-    char *name;                        /* Name of the output driver. */
-    int source;                        /* OUTP_S_* */
-    struct outp_names *next, *prev;
-  };
-
-/* Defines an init file macro. */
-struct outp_defn
-  {
-    char *key;
-    struct string value;
-    struct outp_defn *next, *prev;
-  };
-
-static struct outp_defn *outp_macros;
-static struct outp_names *outp_configure_vec;
-
-/* A list of driver classes. */
-struct outp_driver_class_list
-  {
-    const struct outp_class *class;
-    struct outp_driver_class_list *next;
-  };
-
-static struct outp_driver_class_list *outp_class_list;
-static struct outp_driver *outp_driver_list;
-
-char *outp_title;
-char *outp_subtitle;
-
-/* A set of OUTP_DEV_* bits indicating the devices that are
-   disabled. */
-static int disabled_devices;
-
-static void destroy_driver (struct outp_driver *);
-static void configure_driver (const struct substring, const struct substring,
-                              const struct substring, const struct substring);
-
-/* Add a class to the class list. */
-static void
-add_class (const struct outp_class *class)
-{
-  struct outp_driver_class_list *new_list = xmalloc (sizeof *new_list);
-
-  new_list->class = class;
-
-  if (!outp_class_list)
-    {
-      outp_class_list = new_list;
-      new_list->next = NULL;
-    }
-  else
-    {
-      new_list->next = outp_class_list;
-      outp_class_list = new_list;
-    }
-}
-
-/* Finds the outp_names in outp_configure_vec with name between BP and
-   EP exclusive. */
-static struct outp_names *
-search_names (char *bp, char *ep)
-{
-  struct outp_names *n;
-
-  for (n = outp_configure_vec; n; n = n->next)
-    if ((int) strlen (n->name) == ep - bp && !memcmp (n->name, bp, ep - bp))
-      return n;
-  return NULL;
-}
-
-/* Deletes outp_names NAME from outp_configure_vec. */
-static void
-delete_name (struct outp_names * n)
-{
-  free (n->name);
-  if (n->prev)
-    n->prev->next = n->next;
-  if (n->next)
-    n->next->prev = n->prev;
-  if (n == outp_configure_vec)
-    outp_configure_vec = n->next;
-  free (n);
-}
-
-/* Adds the name between BP and EP exclusive to list
-   outp_configure_vec with source SOURCE. */
-static void
-add_name (char *bp, char *ep, int source)
-{
-  struct outp_names *n = xmalloc (sizeof *n);
-  n->name = xmalloc (ep - bp + 1);
-  memcpy (n->name, bp, ep - bp);
-  n->name[ep - bp] = 0;
-  n->source = source;
-  n->next = outp_configure_vec;
-  n->prev = NULL;
-  if (outp_configure_vec)
-    outp_configure_vec->prev = n;
-  outp_configure_vec = n;
-}
-
-/* Checks that outp_configure_vec is empty, complains and clears
-   it if it isn't. */
-static void
-check_configure_vec (void)
-{
-  struct outp_names *n;
-
-  for (n = outp_configure_vec; n; n = n->next)
-    if (n->source == OUTP_S_COMMAND_LINE)
-      error (0, 0, _("unknown output driver `%s'"), n->name);
-    else
-      error (0, 0, _("output driver `%s' referenced but never defined"),
-             n->name);
-  outp_configure_clear ();
-}
-
-/* Searches outp_configure_vec for the name between BP and EP
-   exclusive.  If found, it is deleted, then replaced by the names
-   given in EP+1, if any. */
-static void
-expand_name (char *bp, char *ep)
-{
-  struct outp_names *n = search_names (bp, ep);
-  if (!n)
-    return;
-  delete_name (n);
-
-  bp = ep + 1;
-  for (;;)
-    {
-      while (isspace ((unsigned char) *bp))
-       bp++;
-      ep = bp;
-      while (*ep && !isspace ((unsigned char) *ep))
-       ep++;
-      if (bp == ep)
-       return;
-      if (!search_names (bp, ep))
-       add_name (bp, ep, OUTP_S_INIT_FILE);
-      bp = ep;
-    }
-}
-
-/* Looks for a macro with key KEY, and returns the corresponding value
-   if found, or NULL if not. */
-static const char *
-find_defn_value (const char *key)
-{
-  static char buf[INT_STRLEN_BOUND (int) + 1];
-  struct outp_defn *d;
-
-  for (d = outp_macros; d; d = d->next)
-    if (!strcmp (key, d->key))
-      return ds_cstr (&d->value);
-  if (!strcmp (key, "viewwidth"))
-    {
-      sprintf (buf, "%d", settings_get_viewwidth ());
-      return buf;
-    }
-  else if (!strcmp (key, "viewlength"))
-    {
-      sprintf (buf, "%d", settings_get_viewlength ());
-      return buf;
-    }
-  else
-    return getenv (key);
-}
-
-/* Initializes global variables. */
-void
-outp_init (void)
-{
-  extern struct outp_class ascii_class;
-  extern struct outp_class postscript_class;
-
-  char def[] = "default";
-
-  add_class (&html_class);
-  add_class (&postscript_class);
-  add_class (&ascii_class);
-
-  add_name (def, &def[strlen (def)], OUTP_S_INIT_FILE);
-}
-
-/* Deletes all the output macros. */
-static void
-delete_macros (void)
-{
-  struct outp_defn *d, *next;
-
-  for (d = outp_macros; d; d = next)
-    {
-      next = d->next;
-      free (d->key);
-      ds_destroy (&d->value);
-      free (d);
-    }
-}
-
-static void
-init_default_drivers (void)
-{
-  error (0, 0, _("using default output driver configuration"));
-  configure_driver (ss_cstr ("list"),
-                    ss_cstr ("ascii"),
-                    ss_cstr ("listing"),
-                    ss_cstr ("length=66 width=79 output-file=\"pspp.list\""));
-}
-
-/* Reads the initialization file; initializes
-   outp_driver_list. */
-void
-outp_read_devices (void)
-{
-  int result = 0;
-
-  char *init_fn;
-
-  FILE *f = NULL;
-  struct string line;
-  int line_number;
-
-  init_fn = fn_search_path (fn_getenv_default ("STAT_OUTPUT_INIT_FILE",
-                                              "devices"),
-                           fn_getenv_default ("STAT_OUTPUT_INIT_PATH",
-                                              config_path));
-
-  ds_init_empty (&line);
-
-  if (init_fn == NULL)
-    {
-      error (0, 0, _("cannot find output initialization file "
-                     "(use `-vv' to view search path)"));
-      goto exit;
-    }
-
-  f = fopen (init_fn, "r");
-  if (f == NULL)
-    {
-      error (0, errno, _("cannot open \"%s\""), init_fn);
-      goto exit;
-    }
-
-  line_number = 0;
-  for (;;)
-    {
-      char *cp;
-
-      if (!ds_read_config_line (&line, &line_number, f))
-       {
-         if (ferror (f))
-           error (0, errno, _("reading \"%s\""), init_fn);
-         break;
-       }
-      for (cp = ds_cstr (&line); isspace ((unsigned char) *cp); cp++);
-      if (!strncmp ("define", cp, 6) && isspace ((unsigned char) cp[6]))
-       outp_configure_macro (&cp[7]);
-      else if (*cp)
-       {
-         char *ep;
-         for (ep = cp; *ep && *ep != ':' && *ep != '='; ep++);
-         if (*ep == '=')
-           expand_name (cp, ep);
-         else if (*ep == ':')
-           {
-             struct outp_names *n = search_names (cp, ep);
-             if (n)
-               {
-                 outp_configure_driver_line (ds_ss (&line));
-                 delete_name (n);
-               }
-           }
-         else
-           error_at_line (0, 0, init_fn, line_number, _("syntax error"));
-       }
-    }
-  result = 1;
-
-  check_configure_vec ();
-
-exit:
-  if (f && -1 == fclose (f))
-    error (0, errno, _("error closing \"%s\""), init_fn);
-  free (init_fn);
-  ds_destroy (&line);
-  delete_macros ();
-
-  if (result)
-    {
-      if (outp_driver_list == NULL)
-        error (0, 0, _("no active output drivers"));
-    }
-  else
-    error (0, 0, _("error reading device definition file"));
-
-  if (!result || outp_driver_list == NULL)
-    init_default_drivers ();
-}
-
-/* Clear the list of drivers to configure. */
-void
-outp_configure_clear (void)
-{
-  struct outp_names *n, *next;
-
-  for (n = outp_configure_vec; n; n = next)
-    {
-      next = n->next;
-      free (n->name);
-      free (n);
-    }
-  outp_configure_vec = NULL;
-}
-
-/* Adds the name BP to the list of drivers to configure into
-   outp_driver_list. */
-void
-outp_configure_add (char *bp)
-{
-  char *ep = &bp[strlen (bp)];
-  if (!search_names (bp, ep))
-    add_name (bp, ep, OUTP_S_COMMAND_LINE);
-}
-
-/* Defines one configuration macro based on the text in BP, which
-   should be of the form `KEY=VALUE'. */
-void
-outp_configure_macro (char *bp)
-{
-  struct outp_defn *d;
-  char *ep;
-
-  while (isspace ((unsigned char) *bp))
-    bp++;
-  ep = bp;
-  while (*ep && !isspace ((unsigned char) *ep) && *ep != '=')
-    ep++;
-
-  d = xmalloc (sizeof *d);
-  d->key = xmalloc (ep - bp + 1);
-  memcpy (d->key, bp, ep - bp);
-  d->key[ep - bp] = 0;
-
-  /* Earlier definitions for a particular KEY override later ones. */
-  if (find_defn_value (d->key))
-    {
-      free (d->key);
-      free (d);
-      return;
-    }
-
-  if (*ep == '=')
-    ep++;
-  while (isspace ((unsigned char) *ep))
-    ep++;
-
-  ds_init_cstr (&d->value, ep);
-  fn_interp_vars (ds_ss (&d->value), find_defn_value, &d->value);
-  d->next = outp_macros;
-  d->prev = NULL;
-  if (outp_macros)
-    outp_macros->prev = d;
-  outp_macros = d;
-}
-
-/* Destroys all the drivers in driver list *DL and sets *DL to
-   NULL. */
-static void
-destroy_list (struct outp_driver ** dl)
-{
-  struct outp_driver *d, *next;
-
-  for (d = *dl; d; d = next)
-    {
-      destroy_driver (d);
-      next = d->next;
-      free (d);
-    }
-  *dl = NULL;
-}
-
-/* Closes all the output drivers. */
-void
-outp_done (void)
-{
-  struct outp_driver_class_list *n = outp_class_list ;
-  outp_configure_clear ();
-  destroy_list (&outp_driver_list);
-
-  while (n)
-    {
-      struct outp_driver_class_list *next = n->next;
-      free(n);
-      n = next;
-    }
-  outp_class_list = NULL;
-
-  free (outp_title);
-  outp_title = NULL;
-
-  free (outp_subtitle);
-  outp_subtitle = NULL;
-}
-
-/* Display on stdout a list of all registered driver classes. */
-void
-outp_list_classes (void)
-{
-  int width = settings_get_viewwidth ();
-  struct outp_driver_class_list *c;
-
-  printf (_("Driver classes:\n\t"));
-  width -= 8;
-  for (c = outp_class_list; c; c = c->next)
-    {
-      if ((int) strlen (c->class->name) + 1 > width)
-       {
-         printf ("\n\t");
-         width = settings_get_viewwidth () - 8;
-       }
-      else
-       putc (' ', stdout);
-      fputs (c->class->name, stdout);
-    }
-  putc('\n', stdout);
-}
-
-/* Obtains a token from S and advances its position.  Errors are
-   reported against the given DRIVER_NAME.
-   The token is stored in TOKEN.  Returns true if successful,
-   false on syntax error.
-
-   Caller is responsible for skipping leading spaces. */
-static bool
-get_option_token (struct substring *s, const char *driver_name,
-                  struct string *token)
-{
-  int c;
-
-  ds_clear (token);
-  c = ss_get_char (s);
-  if (c == EOF)
-    {
-      error (0, 0, _("syntax error parsing options for \"%s\" driver"),
-             driver_name);
-      return false;
-    }
-  else if (c == '\'' || c == '"')
-    {
-      int quote = c;
-
-      for (;;)
-        {
-          c = ss_get_char (s);
-          if (c == quote)
-            break;
-          else if (c == EOF)
-            {
-              error (0, 0,
-                     _("reached end of options inside quoted string "
-                       "parsing options for \"%s\" driver"),
-                     driver_name);
-              return false;
-            }
-          else if (c != '\\')
-            ds_put_char (token, c);
-          else
-            {
-              int out;
-
-              c = ss_get_char (s);
-              switch (c)
-                {
-                case '\'':
-                  out = '\'';
-                  break;
-                case '"':
-                  out = '"';
-                  break;
-                case '\\':
-                  out = '\\';
-                  break;
-                case 'a':
-                  out = '\a';
-                  break;
-                case 'b':
-                  out = '\b';
-                  break;
-                case 'f':
-                  out = '\f';
-                  break;
-                case 'n':
-                  out = '\n';
-                  break;
-                case 'r':
-                  out = '\r';
-                  break;
-                case 't':
-                  out = '\t';
-                  break;
-                case 'v':
-                  out = '\v';
-                  break;
-                case '0':
-                case '1':
-                case '2':
-                case '3':
-                case '4':
-                case '5':
-                case '6':
-                case '7':
-                  out = c - '0';
-                  while (ss_first (*s) >= '0' && ss_first (*s) <= '7')
-                    out = out * 8 + (ss_get_char (s) - '0');
-                  break;
-                case 'x':
-                case 'X':
-                  out = 0;
-                  while (isxdigit (ss_first (*s)))
-                    {
-                      c = ss_get_char (s);
-                      out *= 16;
-                      if (isdigit (c))
-                        out += c - '0';
-                      else
-                        out += tolower (c) - 'a' + 10;
-                    }
-                  break;
-                default:
-                  error (0, 0, _("syntax error in string constant "
-                                 "parsing options for \"%s\" driver"),
-                         driver_name);
-                  return false;
-                }
-              ds_put_char (token, out);
-            }
-        }
-    }
-  else
-    {
-      for (;;)
-        {
-          ds_put_char (token, c);
-
-          c = ss_first (*s);
-          if (c == EOF || c == '=' || isspace (c))
-            break;
-          ss_advance (s, 1);
-        }
-    }
-
-  return 1;
-}
-
-bool
-outp_parse_options (struct substring options,
-                    bool (*callback) (struct outp_driver *, const char *key,
-                                      const struct string *value),
-                    struct outp_driver *driver)
-{
-  struct string key = DS_EMPTY_INITIALIZER;
-  struct string value = DS_EMPTY_INITIALIZER;
-  struct substring left = options;
-  bool ok = true;
-
-  do
-    {
-      ss_ltrim (&left, ss_cstr (CC_SPACES));
-      if (ss_is_empty (left))
-        break;
-
-      if (!get_option_token (&left, driver->name, &key))
-        break;
-
-      ss_ltrim (&left, ss_cstr (CC_SPACES));
-      if (!ss_match_char (&left, '='))
-       {
-         error (0, 0, _("syntax error expecting `=' "
-                         "parsing options for driver \"%s\""),
-                 driver->name);
-         break;
-       }
-
-      ss_ltrim (&left, ss_cstr (CC_SPACES));
-      if (!get_option_token (&left, driver->name, &value))
-        break;
-
-      ok = callback (driver, ds_cstr (&key), &value);
-    }
-  while (ok);
-
-  ds_destroy (&key);
-  ds_destroy (&value);
-
-  return ok;
-}
-
-/* Find the driver in outp_driver_list with name NAME. */
-static struct outp_driver *
-find_driver (char *name)
-{
-  struct outp_driver *d;
-
-  for (d = outp_driver_list; d; d = d->next)
-    if (!strcmp (d->name, name))
-      return d;
-  return NULL;
-}
-
-/* Adds a driver to outp_driver_list pursuant to the
-   specification provided.  */
-static void
-configure_driver (struct substring driver_name, struct substring class_name,
-                  struct substring device_type, struct substring options)
-{
-  struct outp_driver *d, *iter;
-  struct outp_driver_class_list *c;
-
-  struct substring token;
-  size_t save_idx = 0;
-  int device;
-
-  /* Find class. */
-  for (c = outp_class_list; c; c = c->next)
-    if (!ss_compare (ss_cstr (c->class->name), class_name))
-      break;
-  if (c == NULL)
-    {
-      error (0, 0, _("unknown output driver class `%.*s'"),
-             (int) ss_length (class_name), ss_data (class_name));
-      return;
-    }
-
-  /* Parse device type. */
-  device = 0;
-  while (ss_tokenize (device_type, ss_cstr (CC_SPACES), &save_idx, &token))
-    if (!ss_compare (token, ss_cstr ("listing")))
-      device |= OUTP_DEV_LISTING;
-    else if (!ss_compare (token, ss_cstr ("screen")))
-      device |= OUTP_DEV_SCREEN;
-    else if (!ss_compare (token, ss_cstr ("printer")))
-      device |= OUTP_DEV_PRINTER;
-    else
-      error (0, 0, _("unknown device type `%.*s'"),
-             (int) ss_length (token), ss_data (token));
-
-  /* Open the device. */
-  d = xmalloc (sizeof *d);
-  d->next = d->prev = NULL;
-  d->class = c->class;
-  d->name = ss_xstrdup (driver_name);
-  d->page_open = false;
-  d->device = device;
-  d->cp_x = d->cp_y = 0;
-  d->ext = NULL;
-  d->prc = NULL;
-
-  /* Open driver. */
-  if (!d->class->open_driver (d, options))
-    {
-      error (0, 0, _("cannot initialize output driver `%s' of class `%s'"),
-             d->name, d->class->name);
-      free (d->name);
-      free (d);
-      return;
-    }
-
-  /* Find like-named driver and delete. */
-  iter = find_driver (d->name);
-  if (iter != NULL)
-    destroy_driver (iter);
-
-  /* Add to list. */
-  d->next = outp_driver_list;
-  d->prev = NULL;
-  if (outp_driver_list != NULL)
-    outp_driver_list->prev = d;
-  outp_driver_list = d;
-}
-
-/* String LINE is in format:
-   DRIVERNAME:CLASSNAME:DEVICETYPE:OPTIONS
-   Adds a driver to outp_driver_list pursuant to the specification
-   provided.  */
-void
-outp_configure_driver_line (struct substring line_)
-{
-  struct string line = DS_EMPTY_INITIALIZER;
-  struct substring tokens[4];
-  size_t save_idx;
-  size_t i;
-
-  fn_interp_vars (line_, find_defn_value, &line);
-
-  save_idx = 0;
-  for (i = 0; i < 4; i++)
-    {
-      struct substring *token = &tokens[i];
-      ds_separate (&line, ss_cstr (i < 3 ? ":" : ""), &save_idx, token);
-      ss_trim (token, ss_cstr (CC_SPACES));
-    }
-
-  if (!ss_is_empty (tokens[0]) && !ss_is_empty (tokens[1]))
-    configure_driver (tokens[0], tokens[1], tokens[2], tokens[3]);
-  else
-    error (0, 0,
-           _("driver definition line missing driver name or class name"));
-
-  ds_destroy (&line);
-}
-
-/* Destroys output driver D. */
-static void
-destroy_driver (struct outp_driver *d)
-{
-  outp_close_page (d);
-  if (d->class)
-    {
-      struct outp_driver_class_list *c;
-
-      d->class->close_driver (d);
-
-      for (c = outp_class_list; c; c = c->next)
-       if (c->class == d->class)
-         break;
-      assert (c != NULL);
-    }
-  free (d->name);
-
-  /* Remove this driver from the global driver list. */
-  if (d->prev)
-    d->prev->next = d->next;
-  if (d->next)
-    d->next->prev = d->prev;
-  if (d == outp_driver_list)
-    outp_driver_list = d->next;
-}
-
-/* Tries to match S as one of the keywords in TAB, with
-   corresponding information structure INFO.  Returns category
-   code and stores subcategory in *SUBCAT on success.  Returns -1
-   on failure. */
-int
-outp_match_keyword (const char *s, const struct outp_option *tab, int *subcat)
-{
-  for (; tab->keyword != NULL; tab++)
-    if (!strcmp (s, tab->keyword))
-      {
-        *subcat = tab->subcat;
-        return tab->cat;
-      }
-  return -1;
-}
-
-/* Parses UNIT as a dimensional unit.  Returns the multiplicative
-   factor needed to change a quantity measured in that unit into
-   1/72000" units.  If UNIT is empty, it is treated as
-   millimeters.  If the unit is unrecognized, returns 0. */
-static double
-parse_unit (const char *unit)
-{
-  struct unit
-    {
-      char name[3];
-      double factor;
-    };
-
-  static const struct unit units[] =
-    {
-      {"pt", 72000 / 72},
-      {"pc", 72000 / 72 * 12.0},
-      {"in", 72000},
-      {"cm", 72000 / 2.54},
-      {"mm", 72000 / 25.4},
-      {"", 72000 / 25.4},
-    };
-
-  const struct unit *p;
-
-  unit += strspn (unit, CC_SPACES);
-  for (p = units; p < units + sizeof units / sizeof *units; p++)
-    if (!strcasecmp (unit, p->name))
-      return p->factor;
-  return 0.0;
-}
-
-/* Determines the size of a dimensional measurement and returns
-   the size in units of 1/72000".  Units are assumed to be
-   millimeters unless otherwise specified.  Returns 0 on
-   error. */
-int
-outp_evaluate_dimension (const char *dimen)
-{
-  double raw, factor;
-  char *tail;
-
-  /* Number. */
-  raw = strtod (dimen, &tail);
-  if (raw <= 0.0)
-    goto syntax_error;
-
-  /* Unit. */
-  factor = parse_unit (tail);
-  if (factor == 0.0)
-    goto syntax_error;
-
-  return raw * factor;
-
-syntax_error:
-  error (0, 0, _("`%s' is not a valid length."), dimen);
-  return 0;
-}
-
-/* Stores the dimensions in 1/72000" units of paper identified by
-   SIZE, which is of form `HORZ x VERT [UNIT]' where HORZ and
-   VERT are numbers and UNIT is an optional unit of measurement,
-   into *H and *V.  Return true on success. */
-static bool
-parse_paper_size (const char *size, int *h, int *v)
-{
-  double raw_h, raw_v, factor;
-  char *tail;
-
-  /* Width. */
-  raw_h = strtod (size, &tail);
-  if (raw_h <= 0.0)
-    return false;
-
-  /* Delimiter. */
-  tail += strspn (tail, CC_SPACES "x,");
-
-  /* Length. */
-  raw_v = strtod (tail, &tail);
-  if (raw_v <= 0.0)
-    return false;
-
-  /* Unit. */
-  factor = parse_unit (tail);
-  if (factor == 0.0)
-    return false;
-
-  *h = raw_h * factor + .5;
-  *v = raw_v * factor + .5;
-  return true;
-}
-
-static bool
-get_standard_paper_size (struct substring name, int *h, int *v)
-{
-  static const char *sizes[][2] =
-    {
-      {"a0", "841 x 1189 mm"},
-      {"a1", "594 x 841 mm"},
-      {"a2", "420 x 594 mm"},
-      {"a3", "297 x 420 mm"},
-      {"a4", "210 x 297 mm"},
-      {"a5", "148 x 210 mm"},
-      {"b5", "176 x 250 mm"},
-      {"a6", "105 x 148 mm"},
-      {"a7", "74 x 105 mm"},
-      {"a8", "52 x 74 mm"},
-      {"a9", "37 x 52 mm"},
-      {"a10", "26 x 37 mm"},
-      {"b0", "1000 x 1414 mm"},
-      {"b1", "707 x 1000 mm"},
-      {"b2", "500 x 707 mm"},
-      {"b3", "353 x 500 mm"},
-      {"b4", "250 x 353 mm"},
-      {"letter", "612 x 792 pt"},
-      {"legal", "612 x 1008 pt"},
-      {"executive", "522 x 756 pt"},
-      {"note", "612 x 792 pt"},
-      {"11x17", "792 x 1224 pt"},
-      {"tabloid", "792 x 1224 pt"},
-      {"statement", "396 x 612 pt"},
-      {"halfletter", "396 x 612 pt"},
-      {"halfexecutive", "378 x 522 pt"},
-      {"folio", "612 x 936 pt"},
-      {"quarto", "610 x 780 pt"},
-      {"ledger", "1224 x 792 pt"},
-      {"archA", "648 x 864 pt"},
-      {"archB", "864 x 1296 pt"},
-      {"archC", "1296 x 1728 pt"},
-      {"archD", "1728 x 2592 pt"},
-      {"archE", "2592 x 3456 pt"},
-      {"flsa", "612 x 936 pt"},
-      {"flse", "612 x 936 pt"},
-      {"csheet", "1224 x 1584 pt"},
-      {"dsheet", "1584 x 2448 pt"},
-      {"esheet", "2448 x 3168 pt"},
-    };
-
-  size_t i;
-
-  for (i = 0; i < sizeof sizes / sizeof *sizes; i++)
-    if (ss_equals_case (ss_cstr (sizes[i][0]), name))
-      {
-        bool ok = parse_paper_size (sizes[i][1], h, v);
-        assert (ok);
-        return ok;
-      }
-  error (0, 0, _("unknown paper type `%.*s'"),
-         (int) ss_length (name), ss_data (name));
-  return false;
-}
-
-/* Reads file FILE_NAME to find a paper size.  Stores the
-   dimensions, in 1/72000" units, into *H and *V.  Returns true
-   on success, false on failure. */
-static bool
-read_paper_conf (const char *file_name, int *h, int *v)
-{
-  struct string line = DS_EMPTY_INITIALIZER;
-  int line_number = 0;
-  FILE *file;
-
-  file = fopen (file_name, "r");
-  if (file == NULL)
-    {
-      error (0, errno, _("error opening \"%s\""), file_name);
-      return false;
-    }
-
-  for (;;)
-    {
-      struct substring name;
-
-      if (!ds_read_config_line (&line, &line_number, file))
-       {
-         if (ferror (file))
-           error (0, errno, _("error reading \"%s\""), file_name);
-         break;
-       }
-
-      name = ds_ss (&line);
-      ss_trim (&name, ss_cstr (CC_SPACES));
-      if (!ss_is_empty (name))
-        {
-          bool ok = get_standard_paper_size (name, h, v);
-          fclose (file);
-          ds_destroy (&line);
-          return ok;
-        }
-    }
-
-  fclose (file);
-  ds_destroy (&line);
-  error (0, 0, _("paper size file \"%s\" does not state a paper size"),
-         file_name);
-  return false;
-}
-
-/* The user didn't specify a paper size, so let's choose a
-   default based on his environment.  Stores the
-   dimensions, in 1/72000" units, into *H and *V.  Returns true
-   on success, false on failure. */
-static bool
-get_default_paper_size (int *h, int *v)
-{
-  /* libpaper in Debian (and other distributions?) allows the
-     paper size to be specified in $PAPERSIZE or in a file
-     specified in $PAPERCONF. */
-  if (getenv ("PAPERSIZE") != NULL)
-    return get_standard_paper_size (ss_cstr (getenv ("PAPERSIZE")), h, v);
-  if (getenv ("PAPERCONF") != NULL)
-    return read_paper_conf (getenv ("PAPERCONF"), h, v);
-
-#if HAVE_LC_PAPER
-  /* LC_PAPER is a non-standard glibc extension. */
-  *h = (int) nl_langinfo(_NL_PAPER_WIDTH) * (72000 / 25.4);
-  *v = (int) nl_langinfo(_NL_PAPER_HEIGHT) * (72000 / 25.4);
-  if (*h > 0 && *v > 0)
-     return true;
-#endif
-
-  /* libpaper defaults to /etc/papersize. */
-  if (fn_exists ("/etc/papersize"))
-    return read_paper_conf ("/etc/papersize", h, v);
-
-  /* Can't find a default. */
-  return false;
-}
-
-/* Stores the dimensions, in 1/72000" units, of paper identified
-   by SIZE into *H and *V.  SIZE can be the name of a kind of
-   paper ("a4", "letter", ...) or a pair of dimensions
-   ("210x297", "8.5x11in", ...).  Returns true on success, false
-   on failure.  On failure, *H and *V are set for A4 paper. */
-bool
-outp_get_paper_size (const char *size, int *h, int *v)
-{
-  struct substring s;
-  bool ok;
-
-  s = ss_cstr (size);
-  ss_trim (&s, ss_cstr (CC_SPACES));
-
-  if (ss_is_empty (s))
-    {
-      /* Treat empty string as default paper size. */
-      ok = get_default_paper_size (h, v);
-    }
-  else if (isdigit (ss_first (s)))
-    {
-      /* Treat string that starts with digit as explicit size. */
-      ok = parse_paper_size (size, h, v);
-      if (!ok)
-        error (0, 0, _("syntax error in paper size `%s'"), size);
-    }
-  else
-    {
-      /* Check against standard paper sizes. */
-      ok = get_standard_paper_size (s, h, v);
-    }
-
-  /* Default to A4 on error. */
-  if (!ok)
-    {
-      *h = 210 * (72000 / 25.4);
-      *v = 297 * (72000 / 25.4);
-    }
-  return ok;
-}
-
-/* If D is NULL, returns the first enabled driver if any, NULL if
-   none.  Otherwise D must be the last driver returned by this
-   function, in which case the next enabled driver is returned or NULL
-   if that was the last. */
-struct outp_driver *
-outp_drivers (struct outp_driver *d)
-{
-  for (;;)
-    {
-      if (d == NULL)
-       d = outp_driver_list;
-      else
-       d = d->next;
-
-      if (d == NULL
-         || (d->device == 0 || (d->device & disabled_devices) != d->device))
-       break;
-    }
-
-  return d;
-}
-
-/* Enables (if ENABLE is true) or disables (if ENABLE is false) the
-   device(s) given in mask DEVICE. */
-void
-outp_enable_device (bool enable, int device)
-{
-  if (enable)
-    disabled_devices &= ~device;
-  else
-    disabled_devices |= device;
-}
-
-/* Opens a page on driver D (if one is not open). */
-void
-outp_open_page (struct outp_driver *d)
-{
-  if (!d->page_open)
-    {
-      d->cp_x = d->cp_y = 0;
-
-      d->page_open = true;
-      if (d->class->open_page != NULL)
-        d->class->open_page (d);
-    }
-}
-
-/* Closes the page on driver D (if one is open). */
-void
-outp_close_page (struct outp_driver *d)
-{
-  if (d->page_open)
-    {
-      if (d->class->close_page != NULL)
-        d->class->close_page (d);
-      d->page_open = false;
-    }
-}
-
-/* Ejects the page on device D, if a page is open and non-blank,
-   and opens a new page.  */
-void
-outp_eject_page (struct outp_driver *d)
-{
-  if (d->page_open && d->cp_y != 0)
-    outp_close_page (d);
-  outp_open_page (d);
-}
-
-/* Flushes output to screen devices, so that the user can see
-   output that doesn't fill up an entire page. */
-void
-outp_flush (struct outp_driver *d)
-{
-  if (d->device & OUTP_DEV_SCREEN && d->class->flush != NULL)
-    {
-      outp_close_page (d);
-      d->class->flush (d);
-    }
-}
-
-/* Returns the width of string S, in device units, when output on
-   device D. */
-int
-outp_string_width (struct outp_driver *d, const char *s, enum outp_font font)
-{
-  struct outp_text text;
-  int width;
-
-  text.font = font;
-  text.justification = OUTP_LEFT;
-  text.string = ss_cstr (s);
-  text.h = text.v = INT_MAX;
-  d->class->text_metrics (d, &text, &width, NULL);
-
-  return width;
-}
diff --git a/src/output/output.h b/src/output/output.h
deleted file mode 100644 (file)
index fc66874..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#ifndef OUTPUT_OUTPUT_H
-#define OUTPUT_OUTPUT_H 1
-
-#include <libpspp/str.h>
-
-
-/* Line styles.  */
-enum outp_line_style
-  {
-    OUTP_L_NONE,               /* No line. */
-    OUTP_L_SINGLE,             /* Single line. */
-    OUTP_L_DOUBLE,             /* Double line. */
-    OUTP_L_COUNT
-  };
-
-/* Text justification. */
-enum outp_justification
-  {
-    OUTP_RIGHT,                 /* Right justification. */
-    OUTP_LEFT,                  /* Left justification. */
-    OUTP_CENTER,                /* Center justification. */
-  };
-
-enum outp_font
-  {
-    OUTP_FIXED,                 /* Fixed-width font. */
-    OUTP_PROPORTIONAL,          /* Proportional font. */
-    OUTP_EMPHASIS,              /* Proportional font used for emphasis. */
-    OUTP_FONT_CNT               /* Number of fonts. */
-  };
-
-/* Describes text output. */
-struct outp_text
-  {
-    enum outp_font font;
-    enum outp_justification justification;
-    struct substring string;
-    int h, v;                  /* Horizontal, vertical size. */
-    int x, y;                  /* Position. */
-  };
-
-struct som_entity;
-struct outp_driver;
-struct chart;
-
-/* Defines a class of output driver. */
-struct outp_class
-  {
-    const char *name;          /* Name of this driver class. */
-    int special;               /* Boolean value. */
-
-    bool (*open_driver) (struct outp_driver *, struct substring options);
-    bool (*close_driver) (struct outp_driver *);
-
-    void (*open_page) (struct outp_driver *);
-    void (*close_page) (struct outp_driver *);
-
-    void (*flush) (struct outp_driver *);
-
-    /* special != 0 only. */
-    void (*submit) (struct outp_driver *, struct som_entity *);
-
-    /* special == 0 only.  */
-    void (*line) (struct outp_driver *, int x0, int y0, int x1, int y1,
-                  enum outp_line_style top, enum outp_line_style left,
-                  enum outp_line_style bottom, enum outp_line_style right);
-    void (*text_metrics) (struct outp_driver *, const struct outp_text *,
-                          int *width, int *height);
-    void (*text_draw) (struct outp_driver *, const struct outp_text *);
-    void (*initialise_chart)(struct outp_driver *, struct chart *);
-    void (*finalise_chart)(struct outp_driver *, struct chart *);
-  };
-
-/* Device types. */
-enum
-  {
-    OUTP_DEV_NONE = 0,         /* None of the below. */
-    OUTP_DEV_LISTING = 001,    /* Listing device. */
-    OUTP_DEV_SCREEN = 002,     /* Screen device. */
-    OUTP_DEV_PRINTER = 004,    /* Printer device. */
-  };
-
-/* Defines the configuration of an output driver. */
-struct outp_driver
-  {
-    struct outp_driver *next, *prev; /* List of drivers. */
-    const struct outp_class *class;    /* Driver class. */
-    char *name;                        /* Name of this driver. */
-    bool page_open;            /* 1=page is open, 0=page is closed. */
-    int device;                        /* Zero or more of OUTP_DEV_*. */
-    int cp_x, cp_y;            /* Current position. */
-
-    int width, length;         /* Page size. */
-    int font_height;           /* Default font character height. */
-    int prop_em_width;         /* Proportional font em width. */
-    int fixed_width;           /* Fixed-pitch font character width. */
-    int horiz_line_width[OUTP_L_COUNT];        /* Width of horizontal lines. */
-    int vert_line_width[OUTP_L_COUNT]; /* Width of vertical lines. */
-
-    void *ext;                 /* Private extension record. */
-    void *prc;                 /* Per-procedure extension record. */
-  };
-
-/* Option structure for the keyword recognizer. */
-struct outp_option
-  {
-    const char *keyword;       /* Keyword name. */
-    int cat;                   /* Category. */
-    int subcat;                        /* Subcategory. */
-  };
-
-
-/* Title, subtitle. */
-extern char *outp_title;
-extern char *outp_subtitle;
-
-void outp_init (void);
-void outp_read_devices (void);
-void outp_configure_driver_line (struct substring);
-void outp_done (void);
-
-void outp_configure_clear (void);
-void outp_configure_add (char *);
-void outp_configure_macro (char *);
-
-void outp_list_classes (void);
-
-void outp_enable_device (bool enable, int device);
-struct outp_driver *outp_drivers (struct outp_driver *);
-
-bool outp_parse_options (struct substring options,
-                         bool (*) (struct outp_driver *, const char *key,
-                                   const struct string *value),
-                         struct outp_driver *);
-int outp_match_keyword (const char *, const struct outp_option *, int *);
-
-int outp_evaluate_dimension (const char *);
-bool outp_get_paper_size (const char *, int *h, int *v);
-
-void outp_open_page (struct outp_driver *);
-void outp_close_page (struct outp_driver *);
-void outp_eject_page (struct outp_driver *);
-void outp_flush (struct outp_driver *);
-
-int outp_string_width (struct outp_driver *, const char *, enum outp_font);
-
-/* Imported from som-frnt.c. */
-void som_destroy_driver (struct outp_driver *);
-
-#endif /* output/output.h */
diff --git a/src/output/postscript.c b/src/output/postscript.c
deleted file mode 100644 (file)
index 11116b9..0000000
+++ /dev/null
@@ -1,1446 +0,0 @@
-/* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <time.h>
-#include <unistd.h>
-
-#include <libpspp/assertion.h>
-#include <libpspp/bit-vector.h>
-#include <libpspp/compiler.h>
-#include <libpspp/freaderror.h>
-#include <libpspp/hash.h>
-#include <libpspp/misc.h>
-#include <libpspp/start-date.h>
-#include <libpspp/version.h>
-
-#include <data/file-name.h>
-
-#include "afm.h"
-#include "chart.h"
-#include "error.h"
-#include "manager.h"
-#include "output.h"
-
-#include "intprops.h"
-#include "minmax.h"
-#include "xalloc.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-
-/* PostScript driver options: (defaults listed first)
-
-   output-file="pspp.ps"
-
-   paper-size=letter (see "papersize" file)
-   orientation=portrait|landscape
-   headers=on|off
-
-   left-margin=0.5in
-   right-margin=0.5in
-   top-margin=0.5in
-   bottom-margin=0.5in
-
-   prop-font=Times-Roman
-   emph-font=Times-Italic
-   fixed-font=Courier
-   font-size=10000
-
-   line-gutter=1pt
-   line-spacing=1pt
-   line-width=0.5pt
- */
-
-/* The number of `psus' (PostScript driver UnitS) per inch. */
-#define PSUS 72000
-
-/* A PostScript font. */
-struct font
-  {
-    struct afm *metrics;        /* Metrics. */
-    char *embed_fn;             /* Name of file to embed. */
-    char *encoding_fn;          /* Name of file with encoding. */
-  };
-
-/* PostScript output driver extension record. */
-struct ps_driver_ext
-  {
-    char *file_name;            /* Output file name. */
-    FILE *file;                 /* Output file. */
-
-    bool draw_headers;          /* Draw headers at top of page? */
-    int page_number;           /* Current page number. */
-
-    bool portrait;              /* Portrait mode? */
-    int paper_width;            /* Width of paper before dropping margins. */
-    int paper_length;           /* Length of paper before dropping margins. */
-    int left_margin;           /* Left margin in psus. */
-    int right_margin;          /* Right margin in psus. */
-    int top_margin;            /* Top margin in psus. */
-    int bottom_margin;         /* Bottom margin in psus. */
-
-    int line_gutter;           /* Space around lines. */
-    int line_space;            /* Space between lines. */
-    int line_width;            /* Width of lines. */
-
-    struct font *fonts[OUTP_FONT_CNT];
-    int last_font;              /* Index of last font set with setfont. */
-  };
-
-/* Transform logical y-ordinate Y into a page ordinate. */
-#define YT(Y) (this->length - (Y))
-
-static bool handle_option (struct outp_driver *this, const char *key,
-                           const struct string *val);
-static void draw_headers (struct outp_driver *this);
-
-static void write_ps_prologue (struct outp_driver *);
-
-static char *quote_ps_name (const char *string);
-
-static struct font *load_font (const char *string);
-static void free_font (struct font *);
-static void setup_font (struct outp_driver *this, struct font *, int index);
-\f
-/* Driver initialization. */
-
-static bool
-ps_open_driver (struct outp_driver *this, struct substring options)
-{
-  struct ps_driver_ext *x;
-  size_t i;
-
-  this->width = this->length = 0;
-  this->font_height = PSUS * 10 / 72;
-
-  this->ext = x = xmalloc (sizeof *x);
-  x->file_name = xstrdup ("pspp.ps");
-  x->file = NULL;
-  x->draw_headers = true;
-  x->page_number = 0;
-  x->portrait = true;
-  outp_get_paper_size ("", &x->paper_width, &x->paper_length);
-  x->left_margin = PSUS / 2;
-  x->right_margin = PSUS / 2;
-  x->top_margin = PSUS / 2;
-  x->bottom_margin = PSUS / 2;
-  x->line_gutter = PSUS / 72;
-  x->line_space = PSUS / 72;
-  x->line_width = PSUS / 144;
-  for (i = 0; i < OUTP_FONT_CNT; i++)
-    x->fonts[i] = NULL;
-
-  outp_parse_options (options, handle_option, this);
-
-  x->file = fn_open (x->file_name, "w");
-  if (x->file == NULL)
-    {
-      error (0, errno, _("opening PostScript output file \"%s\""),
-             x->file_name);
-      goto error;
-    }
-
-  if (x->portrait)
-    {
-      this->width = x->paper_width;
-      this->length = x->paper_length;
-    }
-  else
-    {
-      this->width = x->paper_length;
-      this->length = x->paper_width;
-    }
-  this->width -= x->left_margin + x->right_margin;
-  this->length -= x->top_margin + x->bottom_margin;
-  if (x->draw_headers)
-    {
-      int header_length = 3 * this->font_height;
-      this->length -= header_length;
-      x->top_margin += header_length;
-    }
-
-  for (i = 0; i < OUTP_FONT_CNT; i++)
-    if (x->fonts[i] == NULL)
-      {
-        const char *default_fonts[OUTP_FONT_CNT];
-        default_fonts[OUTP_FIXED] = "Courier.afm";
-        default_fonts[OUTP_PROPORTIONAL] = "Times-Roman.afm";
-        default_fonts[OUTP_EMPHASIS] = "Times-Italic.afm";
-        x->fonts[i] = load_font (default_fonts[i]);
-        if (x->fonts[i] == NULL)
-          goto error;
-      }
-
-  if (this->length / this->font_height < 15)
-    {
-      error (0, 0, _("The defined PostScript page is not long "
-                     "enough to hold margins and headers, plus least 15 "
-                     "lines of the default fonts.  In fact, there's only "
-                     "room for %d lines of each font at the default size "
-                     "of %d.%03d points."),
-          this->length / this->font_height,
-          this->font_height / 1000, this->font_height % 1000);
-      goto error;
-    }
-
-  this->fixed_width =
-    afm_get_character (x->fonts[OUTP_FIXED]->metrics, '0')->width
-    * this->font_height / 1000;
-  this->prop_em_width =
-    afm_get_character (x->fonts[OUTP_PROPORTIONAL]->metrics, '0')->width
-    * this->font_height / 1000;
-
-  this->horiz_line_width[OUTP_L_NONE] = 0;
-  this->horiz_line_width[OUTP_L_SINGLE] = 2 * x->line_gutter + x->line_width;
-  this->horiz_line_width[OUTP_L_DOUBLE] = (2 * x->line_gutter + x->line_space
-                                           + 2 * x->line_width);
-  memcpy (this->vert_line_width, this->horiz_line_width,
-          sizeof this->vert_line_width);
-
-  write_ps_prologue (this);
-
-  return true;
-
- error:
-  this->class->close_driver (this);
-  return false;
-}
-
-static bool
-ps_close_driver (struct outp_driver *this)
-{
-  struct ps_driver_ext *x = this->ext;
-  bool ok = true;
-  size_t i;
-
-  if (x->file != NULL)
-    {
-      fprintf (x->file,
-               "%%%%Trailer\n"
-               "%%%%Pages: %d\n"
-               "%%%%EOF\n",
-               x->page_number);
-
-      ok = fn_close (x->file_name, x->file) == 0;
-      if (!ok)
-        error (0, errno, _("closing PostScript output file \"%s\""),
-               x->file_name);
-    }
-
-  free (x->file_name);
-  for (i = 0; i < OUTP_FONT_CNT; i++)
-    free_font (x->fonts[i]);
-  free (x);
-
-  return ok;
-}
-
-/* Generic option types. */
-enum
-{
-  output_file_arg,
-  paper_size_arg,
-  orientation_arg,
-  line_style_arg,
-  boolean_arg,
-  pos_int_arg,
-  dimension_arg,
-  string_arg,
-  nonneg_int_arg
-};
-
-/* All the options that the PostScript driver supports. */
-static const struct outp_option option_tab[] =
-{
-  {"output-file",              output_file_arg,0},
-  {"paper-size",               paper_size_arg, 0},
-  {"orientation",              orientation_arg,0},
-
-  {"headers",                  boolean_arg,    1},
-
-  {"prop-font",                string_arg,     OUTP_PROPORTIONAL},
-  {"emph-font",                string_arg,     OUTP_EMPHASIS},
-  {"fixed-font",               string_arg,     OUTP_FIXED},
-
-  {"left-margin",              pos_int_arg,    0},
-  {"right-margin",             pos_int_arg,    1},
-  {"top-margin",               pos_int_arg,    2},
-  {"bottom-margin",            pos_int_arg,    3},
-  {"font-size",                        pos_int_arg,    4},
-
-  {"line-width",               dimension_arg,  0},
-  {"line-gutter",              dimension_arg,  1},
-  {"line-width",               dimension_arg,  2},
-  {NULL, 0, 0},
-};
-
-static bool
-handle_option (struct outp_driver *this, const char *key,
-               const struct string *val)
-{
-  struct ps_driver_ext *x = this->ext;
-  int subcat;
-  char *value = ds_cstr (val);
-
-  switch (outp_match_keyword (key, option_tab, &subcat))
-    {
-    case -1:
-      error (0, 0,
-             _("unknown configuration parameter `%s' for PostScript device "
-               "driver"), key);
-      break;
-    case output_file_arg:
-      free (x->file_name);
-      x->file_name = xstrdup (value);
-      break;
-    case paper_size_arg:
-      outp_get_paper_size (value, &this->width, &this->length);
-      break;
-    case orientation_arg:
-      if (!strcmp (value, "portrait"))
-       x->portrait = true;
-      else if (!strcmp (value, "landscape"))
-       x->portrait = false;
-      else
-       error (0, 0, _("unknown orientation `%s' (valid orientations are "
-                       "`portrait' and `landscape')"), value);
-      break;
-    case boolean_arg:
-      if (!strcmp (value, "on") || !strcmp (value, "true")
-          || !strcmp (value, "yes") || atoi (value))
-        x->draw_headers = true;
-      else if (!strcmp (value, "off") || !strcmp (value, "false")
-               || !strcmp (value, "no") || !strcmp (value, "0"))
-        x->draw_headers = false;
-      else
-        {
-          error (0, 0, _("boolean value expected for %s"), key);
-          return false;
-        }
-      break;
-    case pos_int_arg:
-      {
-       char *tail;
-       int arg;
-
-       errno = 0;
-       arg = strtol (value, &tail, 0);
-       if (arg < 1 || errno == ERANGE || *tail)
-         {
-           error (0, 0, _("positive integer value required for `%s'"), key);
-           break;
-         }
-       if ((subcat == 4 || subcat == 5) && arg < 1000)
-         {
-           error (0, 0, _("default font size must be at least 1 point (value "
-                           "of 1000 for key `%s')"), key);
-           break;
-         }
-       switch (subcat)
-         {
-         case 0:
-           x->left_margin = arg;
-           break;
-         case 1:
-           x->right_margin = arg;
-           break;
-         case 2:
-           x->top_margin = arg;
-           break;
-         case 3:
-           x->bottom_margin = arg;
-           break;
-         case 4:
-           this->font_height = arg;
-           break;
-         default:
-           NOT_REACHED ();
-         }
-      }
-      break;
-    case dimension_arg:
-      {
-       int dimension = outp_evaluate_dimension (value);
-
-       if (dimension <= 0)
-          break;
-       switch (subcat)
-         {
-         case 0:
-           x->line_width = dimension;
-           break;
-         case 1:
-           x->line_gutter = dimension;
-           break;
-         case 2:
-           x->line_width = dimension;
-           break;
-         default:
-           NOT_REACHED ();
-         }
-      }
-      break;
-    case string_arg:
-      {
-        struct font *font = load_font (value);
-        if (font != NULL)
-          {
-            struct font **dst = &x->fonts[subcat];
-            if (*dst != NULL)
-              free_font (*dst);
-            *dst = font;
-          }
-      }
-      break;
-    default:
-      NOT_REACHED ();
-    }
-
-  return true;
-}
-
-/* Looks for a PostScript font file or config file in all the
-   appropriate places.  Returns the file name on success, NULL on
-   failure. */
-static char *
-find_ps_file (const char *name)
-{
-  if (fn_is_absolute (name))
-    return xstrdup (name);
-  else
-    {
-      char *base_name = xasprintf ("psfonts/%s", name);
-      char *file_name = fn_search_path (base_name, config_path);
-      free (base_name);
-      return file_name;
-    }
-}
-\f
-/* Basic file operations. */
-
-/* Writes the PostScript prologue to file F. */
-static void
-write_ps_prologue (struct outp_driver *this)
-{
-  struct ps_driver_ext *x = this->ext;
-  size_t embedded_cnt, preloaded_cnt;
-  size_t i;
-
-  fputs ("%!PS-Adobe-3.0\n", x->file);
-  fputs ("%%Pages: (atend)\n", x->file);
-
-  embedded_cnt = preloaded_cnt = 0;
-  for (i = 0; i < OUTP_FONT_CNT; i++)
-    {
-      bool embed = x->fonts[i]->embed_fn != NULL;
-      embedded_cnt += embed;
-      preloaded_cnt += !embed;
-    }
-  if (preloaded_cnt > 0)
-    {
-      fputs ("%%DocumentNeededResources: font", x->file);
-      for (i = 0; i < OUTP_FONT_CNT; i++)
-        {
-          struct font *f = x->fonts[i];
-          if (f->embed_fn == NULL)
-            fprintf (x->file, " %s", afm_get_findfont_name (f->metrics));
-        }
-      fputs ("\n", x->file);
-    }
-  if (embedded_cnt > 0)
-    {
-      fputs ("%%DocumentSuppliedResources: font", x->file);
-      for (i = 0; i < OUTP_FONT_CNT; i++)
-        {
-          struct font *f = x->fonts[i];
-          if (f->embed_fn != NULL)
-            fprintf (x->file, " %s", afm_get_findfont_name (f->metrics));
-        }
-      fputs ("\n", x->file);
-    }
-  fputs ("%%Copyright: This prologue is public domain.\n", x->file);
-  fprintf (x->file, "%%%%Creator: %s\n", version);
-  fprintf (x->file, "%%%%DocumentMedia: Plain %g %g 75 white ()\n",
-           x->paper_width / (PSUS / 72.0), x->paper_length / (PSUS / 72.0));
-  fprintf (x->file, "%%%%Orientation: %s\n",
-           x->portrait ? "Portrait" : "Landscape");
-  fputs ("%%EndComments\n", x->file);
-  fputs ("%%BeginDefaults\n", x->file);
-  fputs ("%%PageResources: font", x->file);
-  for (i = 0; i < OUTP_FONT_CNT; i++)
-    fprintf (x->file, " %s", afm_get_findfont_name (x->fonts[i]->metrics));
-  fputs ("\n", x->file);
-  fputs ("%%EndDefaults\n", x->file);
-  fputs ("%%BeginProlog\n", x->file);
-  fputs ("/ED{exch def}bind def\n", x->file);
-  fputs ("/L{moveto lineto stroke}bind def\n", x->file);
-  fputs ("/D{moveto lineto moveto lineto stroke}bind def\n", x->file);
-  fputs ("/S{show}bind def\n", x->file);
-  fputs ("/GS{glyphshow}def\n", x->file);
-  fputs ("/RF{\n", x->file);
-  fputs (" exch dup maxlength 1 add dict begin\n", x->file);
-  fputs (" {\n", x->file);
-  fputs ("  1 index/FID ne{def}{pop pop}ifelse\n", x->file);
-  fputs (" }forall\n", x->file);
-  fputs (" /Encoding ED\n", x->file);
-  fputs (" currentdict end\n", x->file);
-  fputs ("}bind def\n", x->file);
-  fputs ("/F{setfont}bind def\n", x->file);
-  fputs ("/EP{\n", x->file);
-  fputs (" pg restore\n", x->file);
-  fputs (" showpage\n", x->file);
-  fputs ("}bind def\n", x->file);
-  fputs ("/GB{\n", x->file);
-  fputs (" /y2 ED/x2 ED/y1 ED/x1 ED\n", x->file);
-  fputs (" x1 y1 moveto x2 y1 lineto x2 y2 lineto x1 y2 lineto closepath\n",
-         x->file);
-  fputs (" gsave 0.9 setgray fill grestore stroke\n", x->file);
-  fputs ("}bind def\n", x->file);
-  fputs ("/K{0 rmoveto}bind def\n", x->file);
-  fputs ("%%EndProlog\n", x->file);
-  fputs ("%%BeginSetup\n", x->file);
-  for (i = 0; i < OUTP_FONT_CNT; i++)
-    setup_font (this, x->fonts[i], i);
-  fputs ("%%EndSetup\n", x->file);
-}
-
-/* Returns STRING as a Postscript name, which is just '/'
-   followed by STRING unless characters need to be quoted.
-   The caller must free the string. */
-static char *
-quote_ps_name (const char *string)
-{
-  const char *cp;
-
-  for (cp = string; *cp != '\0'; cp++)
-    {
-      unsigned char c = *cp;
-      if (!isalpha (c) && strchr ("^_|!$&:;.,-+", c) == NULL
-          && (cp == string || !isdigit (c)))
-        {
-          struct string out = DS_EMPTY_INITIALIZER;
-          ds_put_char (&out, '<');
-         for (cp = string; *cp != '\0'; cp++)
-            {
-              c = *cp;
-              ds_put_format (&out, "%02x", c);
-            }
-         ds_put_cstr (&out, ">cvn");
-          return ds_cstr (&out);
-        }
-    }
-  return xasprintf ("/%s", string);
-}
-
-static void
-ps_open_page (struct outp_driver *this)
-{
-  struct ps_driver_ext *x = this->ext;
-
-  /* Assure page independence. */
-  x->last_font = -1;
-
-  x->page_number++;
-
-  fprintf (x->file,
-          "%%%%Page: %d %d\n"
-          "%%%%BeginPageSetup\n"
-          "/pg save def 0.001 dup scale\n",
-          x->page_number, x->page_number);
-
-  if (!x->portrait)
-    fprintf (x->file,
-            "%d 0 translate 90 rotate\n",
-            x->paper_width);
-
-  if (x->bottom_margin != 0 || x->left_margin != 0)
-    fprintf (x->file,
-            "%d %d translate\n",
-            x->left_margin, x->bottom_margin);
-
-  fprintf (x->file,
-          "/LW %d def %d setlinewidth\n"
-          "%%%%EndPageSetup\n",
-          x->line_width, x->line_width);
-
-  if (x->draw_headers)
-    draw_headers (this);
-}
-
-static void
-ps_close_page (struct outp_driver *this)
-{
-  struct ps_driver_ext *x = this->ext;
-  fputs ("%%PageTrailer\n"
-         "EP\n",
-         x->file);
-}
-
-static void
-ps_submit (struct outp_driver *this UNUSED, struct som_entity *s)
-{
-  switch (s->type)
-    {
-    case SOM_CHART:
-      break;
-    default:
-      NOT_REACHED ();
-    }
-}
-\f
-/* Draws a line from (x0,y0) to (x1,y1). */
-static void
-dump_line (struct outp_driver *this, int x0, int y0, int x1, int y1)
-{
-  struct ps_driver_ext *ext = this->ext;
-  fprintf (ext->file, "%d %d %d %d L\n", x0, YT (y0), x1, YT (y1));
-}
-
-/* Draws a horizontal line X0...X2 at Y if LEFT says so,
-   shortening it to X0...X1 if SHORTEN is true.
-   Draws a horizontal line X1...X3 at Y if RIGHT says so,
-   shortening it to X2...X3 if SHORTEN is true. */
-static void
-horz_line (struct outp_driver *this,
-           int x0, int x1, int x2, int x3, int y,
-           enum outp_line_style left, enum outp_line_style right,
-           bool shorten)
-{
-  if (left != OUTP_L_NONE && right != OUTP_L_NONE && !shorten)
-    dump_line (this, x0, y, x3, y);
-  else
-    {
-      if (left != OUTP_L_NONE)
-        dump_line (this, x0, y, shorten ? x1 : x2, y);
-      if (right != OUTP_L_NONE)
-        dump_line (this, shorten ? x2 : x1, y, x3, y);
-    }
-}
-
-/* Draws a vertical line Y0...Y2 at X if TOP says so,
-   shortening it to Y0...Y1 if SHORTEN is true.
-   Draws a vertical line Y1...Y3 at X if BOTTOM says so,
-   shortening it to Y2...Y3 if SHORTEN is true. */
-static void
-vert_line (struct outp_driver *this,
-           int y0, int y1, int y2, int y3, int x,
-           enum outp_line_style top, enum outp_line_style bottom,
-           bool shorten)
-{
-  if (top != OUTP_L_NONE && bottom != OUTP_L_NONE && !shorten)
-    dump_line (this, x, y0, x, y3);
-  else
-    {
-      if (top != OUTP_L_NONE)
-        dump_line (this, x, y0, x, shorten ? y1 : y2);
-      if (bottom != OUTP_L_NONE)
-        dump_line (this, x, shorten ? y2 : y1, x, y3);
-    }
-}
-
-/* Draws a generalized intersection of lines in the rectangle
-   (X0,Y0)-(X3,Y3).  The line coming from the top to the center
-   is of style TOP, from left to center of style LEFT, from
-   bottom to center of style BOTTOM, and from right to center of
-   style RIGHT. */
-static void
-ps_line (struct outp_driver *this,
-         int x0, int y0, int x3, int y3,
-         enum outp_line_style top, enum outp_line_style left,
-         enum outp_line_style bottom, enum outp_line_style right)
-{
-  /* The algorithm here is somewhat subtle, to allow it to handle
-     all the kinds of intersections that we need.
-
-     Three additional ordinates are assigned along the x axis.  The
-     first is xc, midway between x0 and x3.  The others are x1 and
-     x2; for a single vertical line these are equal to xc, and for
-     a double vertical line they are the ordinates of the left and
-     right half of the double line.
-
-     yc, y1, and y2 are assigned similarly along the y axis.
-
-     The following diagram shows the coordinate system and output
-     for double top and bottom lines, single left line, and no
-     right line:
-
-                 x0       x1 xc  x2      x3
-               y0 ________________________
-                  |        #     #       |
-                  |        #     #       |
-                  |        #     #       |
-                  |        #     #       |
-                  |        #     #       |
-     y1 = y2 = yc |#########     #       |
-                  |        #     #       |
-                  |        #     #       |
-                  |        #     #       |
-                  |        #     #       |
-               y3 |________#_____#_______|
-  */
-  struct ps_driver_ext *ext = this->ext;
-
-  /* Offset from center of each line in a pair of double lines. */
-  int double_line_ofs = (ext->line_space + ext->line_width) / 2;
-
-  /* Are the lines along each axis single or double?
-     (It doesn't make sense to have different kinds of line on the
-     same axis, so we don't try to gracefully handle that case.) */
-  bool double_vert = top == OUTP_L_DOUBLE || bottom == OUTP_L_DOUBLE;
-  bool double_horz = left == OUTP_L_DOUBLE || right == OUTP_L_DOUBLE;
-
-  /* When horizontal lines are doubled,
-     the left-side line along y1 normally runs from x0 to x2,
-     and the right-side line along y1 from x3 to x1.
-     If the top-side line is also doubled, we shorten the y1 lines,
-     so that the left-side line runs only to x1,
-     and the right-side line only to x2.
-     Otherwise, the horizontal line at y = y1 below would cut off
-     the intersection, which looks ugly:
-               x0       x1     x2      x3
-             y0 ________________________
-                |        #     #       |
-                |        #     #       |
-                |        #     #       |
-                |        #     #       |
-             y1 |#########     ########|
-                |                      |
-                |                      |
-             y2 |######################|
-                |                      |
-                |                      |
-             y3 |______________________|
-     It is more of a judgment call when the horizontal line is
-     single.  We actually choose to cut off the line anyhow, as
-     shown in the first diagram above.
-  */
-  bool shorten_y1_lines = top == OUTP_L_DOUBLE;
-  bool shorten_y2_lines = bottom == OUTP_L_DOUBLE;
-  bool shorten_yc_line = shorten_y1_lines && shorten_y2_lines;
-  int horz_line_ofs = double_vert ? double_line_ofs : 0;
-  int xc = (x0 + x3) / 2;
-  int x1 = xc - horz_line_ofs;
-  int x2 = xc + horz_line_ofs;
-
-  bool shorten_x1_lines = left == OUTP_L_DOUBLE;
-  bool shorten_x2_lines = right == OUTP_L_DOUBLE;
-  bool shorten_xc_line = shorten_x1_lines && shorten_x2_lines;
-  int vert_line_ofs = double_horz ? double_line_ofs : 0;
-  int yc = (y0 + y3) / 2;
-  int y1 = yc - vert_line_ofs;
-  int y2 = yc + vert_line_ofs;
-
-  if (!double_horz)
-    horz_line (this, x0, x1, x2, x3, yc, left, right, shorten_yc_line);
-  else
-    {
-      horz_line (this, x0, x1, x2, x3, y1, left, right, shorten_y1_lines);
-      horz_line (this, x0, x1, x2, x3, y2, left, right, shorten_y2_lines);
-    }
-
-  if (!double_vert)
-    vert_line (this, y0, y1, y2, y3, xc, top, bottom, shorten_xc_line);
-  else
-    {
-      vert_line (this, y0, y1, y2, y3, x1, top, bottom, shorten_x1_lines);
-      vert_line (this, y0, y1, y2, y3, x2, top, bottom, shorten_x2_lines);
-    }
-}
-
-/* Writes STRING at location (X,Y) trimmed to the given MAX_WIDTH
-   and with the given JUSTIFICATION for THIS driver. */
-static int
-draw_text (struct outp_driver *this,
-           const char *string, int x, int y, int max_width,
-           enum outp_justification justification)
-{
-  struct outp_text text;
-  int width;
-
-  text.font = OUTP_PROPORTIONAL;
-  text.justification = justification;
-  text.string = ss_cstr (string);
-  text.h = max_width;
-  text.v = this->font_height;
-  text.x = x;
-  text.y = y;
-  this->class->text_metrics (this, &text, &width, NULL);
-  this->class->text_draw (this, &text);
-  return width;
-}
-
-/* Writes LEFT left-justified and RIGHT right-justified within
-   (X0...X1) at Y.  LEFT or RIGHT or both may be null. */
-static void
-draw_header_line (struct outp_driver *this,
-                  const char *left, const char *right,
-                  int x0, int x1, int y)
-{
-  int right_width = 0;
-  if (right != NULL)
-    right_width = (draw_text (this, right, x0, y, x1 - x0, OUTP_RIGHT)
-                   + this->prop_em_width);
-  if (left != NULL)
-    draw_text (this, left, x0, y, x1 - x0 - right_width, OUTP_LEFT);
-}
-
-/* Draw top of page headers for THIS driver. */
-static void
-draw_headers (struct outp_driver *this)
-{
-  struct ps_driver_ext *ext = this->ext;
-  char *r1, *r2;
-  int x0, x1;
-  int y;
-
-  y = -3 * this->font_height;
-  x0 = this->prop_em_width;
-  x1 = this->width - this->prop_em_width;
-
-  /* Draw box. */
-  fprintf (ext->file, "%d %d %d %d GB\n",
-          0, YT (y),
-           this->width, YT (y + 2 * this->font_height + ext->line_gutter));
-  y += ext->line_width + ext->line_gutter;
-
-  r1 = xasprintf (_("%s - Page %d"), get_start_date (), ext->page_number);
-  r2 = xasprintf ("%s - %s", version, host_system);
-
-  draw_header_line (this, outp_title, r1, x0, x1, y);
-  y += this->font_height;
-
-  draw_header_line (this, outp_subtitle, r2, x0, x1, y);
-
-  free (r1);
-  free (r2);
-}
-\f
-/* Writes the CHAR_CNT characters in CHARS at (X0,Y0), using the
-   given FONT.
-   The characters are justified according to JUSTIFICATION in a
-   field that has WIDTH_LEFT space remaining after the characters
-   themselves are accounted for.
-   Before character I is written, its x-position is adjusted by
-   KERNS[I]. */
-static void
-write_text (struct outp_driver *this,
-            int x0, int y0,
-            enum outp_font font,
-            enum outp_justification justification,
-            const struct afm_character **chars, int *kerns, size_t char_cnt,
-            int width_left)
-{
-  struct ps_driver_ext *ext = this->ext;
-  struct afm *afm = ext->fonts[font]->metrics;
-  struct string out;
-  size_t i, j;
-
-  if (justification == OUTP_RIGHT)
-    x0 += width_left;
-  else if (justification == OUTP_CENTER)
-    x0 += width_left / 2;
-  y0 += afm_get_ascent (afm) * this->font_height / 1000;
-
-  fprintf (ext->file, "\n%d %d moveto\n", x0, YT (y0));
-
-  if (ext->last_font != font)
-    {
-      ext->last_font = font;
-      fprintf (ext->file, "F%d setfont\n", font);
-    }
-
-  ds_init_empty (&out);
-  for (i = 0; i < char_cnt; i = j)
-    {
-      for (j = i + 1; j < char_cnt; j++)
-        if (kerns[j] != 0)
-          break;
-
-      if (kerns[i] != 0)
-        fprintf (ext->file, "%d K", kerns[i]);
-      while (i < j)
-        {
-          size_t encoded = afm_encode_string (afm, chars + i, j - i, &out);
-          if (encoded > 0)
-            {
-              fprintf (ext->file, "%sS\n", ds_cstr (&out));
-              ds_clear (&out);
-              i += encoded;
-            }
-
-          if (i < j)
-            {
-              fprintf (ext->file, "/%s GS\n", chars[i]->name);
-              i++;
-            }
-        }
-    }
-  ds_destroy (&out);
-}
-
-/* State of a text formatting operation. */
-struct text_state
-  {
-    /* Input. */
-    const struct outp_text *text;
-    bool draw;
-
-    /* Output. */
-    const struct afm_character **glyphs;
-    int *glyph_kerns;
-
-    /* State. */
-    size_t glyph_cnt;           /* Number of glyphs output. */
-    int width_left;            /* Width left over. */
-    int height_left;            /* Height left over. */
-
-    /* State as of last space. */
-    const char *space_char;     /* Just past last space. */
-    size_t space_glyph_cnt;     /* Number of glyphs as of last space. */
-    int space_width_left;       /* Width left over as of last space. */
-
-    /* Statistics. */
-    int max_width;             /* Widest line so far. */
-  };
-
-/* Adjusts S to complete a line of text,
-   and draws the current line if appropriate. */
-static void
-finish_line (struct outp_driver *this, struct text_state *s)
-{
-  int width;
-
-  if (s->draw)
-    {
-      write_text (this,
-                  s->text->x, s->text->y + (s->text->v - s->height_left),
-                  s->text->font,
-                  s->text->justification,
-                  s->glyphs, s->glyph_kerns, s->glyph_cnt,
-                  s->width_left);
-      s->glyph_cnt = 0;
-    }
-
-  /* Update maximum width. */
-  width = s->text->h - s->width_left;
-  if (width > s->max_width)
-    s->max_width = width;
-
-  /* Move to next line. */
-  s->width_left = s->text->h;
-  s->height_left -= this->font_height;
-
-  /* No spaces on this line yet. */
-  s->space_char = NULL;
-}
-
-/* Format TEXT on THIS driver.
-   If DRAW is nonzero, draw the text.
-   The width of the widest line is stored into *WIDTH, if WIDTH
-   is nonnull.
-   The total height of the text written is stored into *HEIGHT,
-   if HEIGHT is nonnull. */
-static void
-text (struct outp_driver *this, const struct outp_text *text, bool draw,
-      int *width, int *height)
-{
-  struct ps_driver_ext *ext = this->ext;
-  struct afm *afm = ext->fonts[text->font]->metrics;
-  const char *cp;
-  size_t glyph_cap;
-  struct text_state s;
-
-  s.text = text;
-  s.draw = draw;
-
-  s.glyphs = NULL;
-  s.glyph_kerns = NULL;
-  glyph_cap = 0;
-
-  s.glyph_cnt = 0;
-  s.width_left = s.text->h;
-  s.height_left = s.text->v;
-
-  s.space_char = 0;
-
-  s.max_width = 0;
-
-  cp = ss_data (s.text->string);
-  while (s.height_left >= this->font_height && cp < ss_end (s.text->string))
-    {
-      const struct afm_character *cur;
-      int char_width;
-      int kern_adjust;
-
-      if (*cp == '\n')
-        {
-          finish_line (this, &s);
-          cp++;
-          continue;
-        }
-
-      /* Get character and resolve ligatures. */
-      cur = afm_get_character (afm, *cp);
-      while (++cp < ss_end (s.text->string))
-        {
-          const struct afm_character *next = afm_get_character (afm, *cp);
-          const struct afm_character *ligature = afm_get_ligature (cur, next);
-          if (ligature == NULL)
-            break;
-          cur = ligature;
-        }
-      char_width = cur->width * this->font_height / 1000;
-
-      /* Get kern adjustment. */
-      if (s.glyph_cnt > 0)
-        kern_adjust = (afm_get_kern_adjustment (s.glyphs[s.glyph_cnt - 1], cur)
-                       * this->font_height / 1000);
-      else
-        kern_adjust = 0;
-
-      /* Record the current status if this is a space character. */
-      if (cur->code == ' ' && cp > ss_data (s.text->string))
-       {
-         s.space_char = cp;
-         s.space_glyph_cnt = s.glyph_cnt;
-          s.space_width_left = s.width_left;
-       }
-
-      /* Enough room on this line? */
-      if (char_width + kern_adjust > s.width_left)
-       {
-         if (s.space_char == NULL)
-            {
-              finish_line (this, &s);
-              kern_adjust = 0;
-            }
-          else
-            {
-              cp = s.space_char;
-              s.glyph_cnt = s.space_glyph_cnt;
-              s.width_left = s.space_width_left;
-              finish_line (this, &s);
-              continue;
-            }
-       }
-
-      if (s.glyph_cnt >= glyph_cap)
-        {
-          glyph_cap = 2 * (glyph_cap + 8);
-          s.glyphs = xnrealloc (s.glyphs, glyph_cap, sizeof *s.glyphs);
-          s.glyph_kerns = xnrealloc (s.glyph_kerns,
-                                     glyph_cap, sizeof *s.glyph_kerns);
-        }
-      s.glyphs[s.glyph_cnt] = cur;
-      s.glyph_kerns[s.glyph_cnt] = kern_adjust;
-      s.glyph_cnt++;
-
-      s.width_left -= char_width + kern_adjust;
-    }
-  if (s.height_left >= this->font_height && s.glyph_cnt > 0)
-    finish_line (this, &s);
-
-  if (width != NULL)
-    *width = s.max_width;
-  if (height != NULL)
-    *height = text->v - s.height_left;
-  free (s.glyphs);
-  free (s.glyph_kerns);
-}
-
-static void
-ps_text_metrics (struct outp_driver *this, const struct outp_text *t,
-                 int *width, int *height)
-{
-  text (this, t, false, width, height);
-}
-
-static void
-ps_text_draw (struct outp_driver *this, const struct outp_text *t)
-{
-  assert (this->page_open);
-  text (this, t, true, NULL, NULL);
-}
-\f
-static void
-ps_chart_initialise (struct outp_driver *this UNUSED, struct chart *ch)
-{
-#ifdef NO_CHARTS
-  ch->lp = NULL;
-#else
-  struct ps_driver_ext *x = this->ext;
-  char page_size[128];
-  int size;
-  int x_origin, y_origin;
-
-  ch->file = tmpfile ();
-  if (ch->file == NULL)
-    {
-      ch->lp = NULL;
-      return;
-    }
-
-  size = this->width < this->length ? this->width : this->length;
-  x_origin = x->left_margin + (size - this->width) / 2;
-  y_origin = x->bottom_margin + (size - this->length) / 2;
-
-  snprintf (page_size, sizeof page_size,
-            "a,xsize=%.3f,ysize=%.3f,xorigin=%.3f,yorigin=%.3f",
-            (double) size / PSUS, (double) size / PSUS,
-            (double) x_origin / PSUS, (double) y_origin / PSUS);
-
-  ch->pl_params = pl_newplparams ();
-  pl_setplparam (ch->pl_params, "PAGESIZE", page_size);
-  ch->lp = pl_newpl_r ("ps", NULL, ch->file, stderr, ch->pl_params);
-#endif
-}
-
-static void
-ps_chart_finalise (struct outp_driver *this UNUSED, struct chart *ch UNUSED)
-{
-#ifndef NO_CHARTS
-  struct ps_driver_ext *x = this->ext;
-  char buf[BUFSIZ];
-  static int doc_num = 0;
-
-  outp_eject_page (this);
-  fprintf (x->file,
-           "/sp save def\n"
-           "%d %d translate 1000 dup scale\n"
-           "userdict begin\n"
-           "/showpage { } def\n"
-           "0 setgray 0 setlinecap 1 setlinewidth\n"
-           "0 setlinejoin 10 setmiterlimit [ ] 0 setdash newpath clear\n"
-           "%%%%BeginDocument: %d\n",
-           -x->left_margin, -x->bottom_margin,
-           doc_num++);
-
-  rewind (ch->file);
-  while (fwrite (buf, 1, fread (buf, 1, sizeof buf, ch->file), x->file))
-    continue;
-  fclose (ch->file);
-
-  fputs ("%%EndDocument\n"
-         "end\n"
-         "sp restore\n",
-         x->file);
-  outp_close_page (this);
-#endif
-}
-\f
-static void embed_font (struct outp_driver *this, struct font *font);
-static void reencode_font (struct outp_driver *this, struct font *font);
-
-/* Loads and returns the font for STRING, which has the format
-   "AFM,PFA,ENC", where AFM is the AFM file's name, PFA is the
-   PFA or PFB file's name, and ENC is the encoding file's name.
-   PFA and ENC are optional.
-   Returns a null pointer if unsuccessful. */
-static struct font *
-load_font (const char *string_)
-{
-  char *string = xstrdup (string_);
-  struct font *font;
-  char *position = string;
-  char *token;
-  char *afm_file_name;
-
-  font = xmalloc (sizeof *font);
-  font->metrics = NULL;
-  font->embed_fn = NULL;
-  font->encoding_fn = NULL;
-
-  token = strsep (&position, ",");
-  if (token == NULL)
-    {
-      error (0, 0, _("\"%s\": bad font specification"), string);
-      goto error;
-    }
-
-  /* Read AFM file. */
-  afm_file_name = find_ps_file (token);
-  if (afm_file_name == NULL)
-    {
-      error (0, 0, _("could not find AFM file \"%s\""), token);
-      goto error;
-    }
-  font->metrics = afm_open (afm_file_name);
-  free (afm_file_name);
-  if (font->metrics == NULL)
-    goto error;
-
-  /* Find font file to embed. */
-  token = strsep (&position, ",");
-  if (token != NULL && *token != '\0')
-    {
-      font->embed_fn = find_ps_file (token);
-      if (font->embed_fn == NULL)
-        error (0, 0, _("could not find font \"%s\""), token);
-    }
-
-  /* Find encoding. */
-  token = strsep (&position, ",");
-  if (token != NULL && *token == '\0')
-    {
-      font->encoding_fn = find_ps_file (token);
-      if (font->encoding_fn == NULL)
-        error (0, 0, _("could not find encoding \"%s\""), token);
-    }
-
-  free (string);
-  return font;
-
- error:
-  free (string);
-  free_font (font);
-  return NULL;
-}
-
-/* Frees FONT. */
-static void
-free_font (struct font *font)
-{
-  if (font != NULL)
-    {
-      afm_close (font->metrics);
-      free (font->embed_fn);
-      free (font->encoding_fn);
-      free (font);
-    }
-}
-
-/* Emits PostScript code to embed FONT (if necessary), scale it
-   to the proper size, re-encode it (if necessary), and store the
-   resulting font as an object named F#, where INDEX is
-   substituted for #. */
-static void
-setup_font (struct outp_driver *this, struct font *font, int index)
-{
-  struct ps_driver_ext *x = this->ext;
-  char *ps_name;
-
-  if (font->embed_fn != NULL)
-    embed_font (this, font);
-  else
-    fprintf (x->file, "%%%%IncludeResource: font %s\n",
-             afm_get_findfont_name (font->metrics));
-
-  ps_name = quote_ps_name (afm_get_findfont_name (font->metrics));
-  fprintf (x->file, "%s findfont %d scalefont\n", ps_name, this->font_height);
-  free (ps_name);
-
-  if (font->encoding_fn != NULL)
-    reencode_font (this, font);
-
-  fprintf (x->file, "/F%d ED\n", index);
-}
-
-/* Copies up to COPY_BYTES bytes from SRC to DST, stopping at
-   end-of-file or on error. */
-static void
-copy_bytes_literally (FILE *src, FILE *dst, unsigned long copy_bytes)
-{
-  while (copy_bytes > 0)
-    {
-      char buffer[BUFSIZ];
-      unsigned long chunk_bytes = MIN (copy_bytes, sizeof buffer);
-      size_t read_bytes = fread (buffer, 1, chunk_bytes, src);
-      size_t write_bytes = fwrite (buffer, 1, read_bytes, dst);
-      if (write_bytes != chunk_bytes)
-        break;
-      copy_bytes -= chunk_bytes;
-    }
-}
-
-/* Copies up to COPY_BYTES bytes from SRC to DST, stopping at
-   end-of-file or on error.  The bytes are translated into
-   hexadecimal during copying and broken into lines with
-   new-line characters. */
-static void
-copy_bytes_as_hex (FILE *src, FILE *dst, unsigned long copy_bytes)
-{
-  unsigned long i;
-
-  for (i = 0; i < copy_bytes; i++)
-    {
-      int c = getc (src);
-      if (c == EOF)
-        break;
-      if (i > 0 && i % 36 == 0)
-        putc ('\n', dst);
-      fprintf (dst, "%02X", c);
-    }
-  putc ('\n', dst);
-}
-
-/* Embeds the given FONT into THIS driver's output stream. */
-static void
-embed_font (struct outp_driver *this, struct font *font)
-{
-  struct ps_driver_ext *x = this->ext;
-  FILE *file;
-  int c;
-
-  file = fopen (font->embed_fn, "rb");
-  if (file == NULL)
-    {
-      error (errno, 0, _("cannot open font file \"%s\""), font->embed_fn);
-      return;
-    }
-
-  fprintf (x->file, "%%%%BeginResource: font %s\n",
-           afm_get_findfont_name (font->metrics));
-
-  c = getc (file);
-  ungetc (c, file);
-  if (c != 128)
-    {
-      /* PFA file.  Copy literally. */
-      copy_bytes_literally (file, x->file, ULONG_MAX);
-    }
-  else
-    {
-      /* PFB file.  Translate as specified in Adobe Technical
-         Note #5040. */
-      while ((c = getc (file)) == 128)
-        {
-          int type;
-          unsigned long length;
-
-          type = getc (file);
-          if (type == 3)
-            break;
-
-          length = getc (file);
-          length |= (unsigned long) getc (file) << 8;
-          length |= (unsigned long) getc (file) << 16;
-          length |= (unsigned long) getc (file) << 24;
-
-          if (type == 1)
-            copy_bytes_literally (file, x->file, length);
-          else if (type == 2)
-            copy_bytes_as_hex (file, x->file, length);
-          else
-            break;
-        }
-    }
-  if (freaderror (file))
-    error (errno, 0, _("reading font file \"%s\""), font->embed_fn);
-  fputs ("%%EndResource\n", x->file);
-}
-
-/* Re-encodes FONT according to the specified encoding. */
-static void
-reencode_font (struct outp_driver *this, struct font *font)
-{
-  struct ps_driver_ext *x = this->ext;
-
-  struct string line;
-
-  int line_number;
-  FILE *file;
-
-  char *tab[256];
-
-  int i;
-
-  file = fopen (font->encoding_fn, "r");
-  if (file == NULL)
-    {
-      error (errno, 0, _("cannot open font encoding file \"%s\""),
-             font->encoding_fn);
-      return;
-    }
-
-  for (i = 0; i < 256; i++)
-    tab[i] = NULL;
-
-  line_number = 0;
-
-  ds_init_empty (&line);
-  while (ds_read_config_line (&line, &line_number, file))
-    {
-      char *pschar, *code;
-      char *save_ptr, *tail;
-      int code_val;
-
-      if (ds_is_empty (&line) == 0)
-        continue;
-
-      pschar = strtok_r (ds_cstr (&line), " \t\r\n", &save_ptr);
-      code = strtok_r (NULL, " \t\r\n", &save_ptr);
-      if (pschar == NULL || code == NULL)
-        continue;
-
-      code_val = strtol (code, &tail, 0);
-      if (*tail)
-        {
-          error_at_line (0, 0, font->encoding_fn, line_number,
-                         _("invalid numeric format"));
-          continue;
-        }
-      if (code_val < 0 || code_val > 255)
-        continue;
-      if (tab[code_val] != 0)
-        free (tab[code_val]);
-      tab[code_val] = xstrdup (pschar);
-    }
-  ds_destroy (&line);
-
-  fputs ("[", x->file);
-  for (i = 0; i < 256; i++)
-    {
-      char *name = quote_ps_name (tab[i] != NULL ? tab[i] : ".notdef");
-      fprintf (x->file, "%s\n", name);
-      free (name);
-      free (tab[i]);
-    }
-  fputs ("] RF\n", x->file);
-
-  if (freaderror (file) != 0)
-    error (errno, 0, _("closing Postscript encoding \"%s\""),
-           font->encoding_fn);
-}
-
-/* PostScript driver class. */
-const struct outp_class postscript_class =
-{
-  "postscript",
-  0,
-
-  ps_open_driver,
-  ps_close_driver,
-
-  ps_open_page,
-  ps_close_page,
-  NULL,
-
-  ps_submit,
-
-  ps_line,
-  ps_text_metrics,
-  ps_text_draw,
-
-  ps_chart_initialise,
-  ps_chart_finalise
-};
diff --git a/src/output/render.c b/src/output/render.c
new file mode 100644 (file)
index 0000000..1b92b8b
--- /dev/null
@@ -0,0 +1,1314 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libpspp/assertion.h"
+#include "libpspp/hash-functions.h"
+#include "libpspp/hmap.h"
+#include "output/render.h"
+#include "output/table.h"
+
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
+
+/* This file uses TABLE_HORZ and TABLE_VERT enough to warrant abbreviating. */
+#define H TABLE_HORZ
+#define V TABLE_VERT
+\f
+/* A layout for rendering a specific table on a specific device.
+
+   May represent the layout of an entire table presented to
+   render_page_create(), or a rectangular subregion of a table broken out using
+   render_page_next() to allow a table to be broken across multiple pages. */
+struct render_page
+  {
+    const struct render_params *params; /* Parameters of the target device. */
+    struct table *table;                /* Table rendered. */
+    int ref_cnt;
+
+    /* Local copies of table->n and table->h, for convenience. */
+    int n[TABLE_N_AXES];
+    int h[TABLE_N_AXES][2];
+
+    /* cp[H] represents x positions within the table.
+       cp[H][0] = 0.
+       cp[H][1] = the width of the leftmost vertical rule.
+       cp[H][2] = cp[H][1] + the width of the leftmost column.
+       cp[H][3] = cp[H][2] + the width of the second-from-left vertical rule.
+       and so on:
+       cp[H][2 * nc] = x position of the rightmost vertical rule.
+       cp[H][2 * nc + 1] = total table width including all rules.
+
+       Similarly, cp[V] represents y positions within the table.
+       cp[V][0] = 0.
+       cp[V][1] = the height of the topmost horizontal rule.
+       cp[V][2] = cp[V][1] + the height of the topmost column.
+       cp[V][3] = cp[V][2] + the height of the second-from-top horizontal rule.
+       and so on:
+       cp[V][2 * nr] = y position of the bottommost horizontal rule.
+       cp[V][2 * nr + 1] = total table height including all rules.
+
+       Rules and columns can have width or height 0, in which case consecutive
+       values in this array are equal. */
+    int *cp[TABLE_N_AXES];
+
+    /* render_break_next() can break a table such that some cells are not fully
+       contained within a render_page.  This will happen if a cell is too wide
+       or two tall to fit on a single page, or if a cell spans multiple rows or
+       columns and the page only includes some of those rows or columns.
+
+       This hash table contains "struct render_overflow"s that represents each
+       such cell that doesn't completely fit on this page.
+
+       Each overflow cell borders at least one header edge of the table and may
+       border more.  (A single table cell that is so large that it fills the
+       entire page can overflow on all four sides!) */
+    struct hmap overflows;
+
+    /* If a single column (or row) is too wide (or tall) to fit on a page
+       reasonably, then render_break_next() will split a single row or column
+       across multiple render_pages.  This member indicates when this has
+       happened:
+
+       is_edge_cutoff[H][0] is true if pixels have been cut off the left side
+       of the leftmost column in this page, and false otherwise.
+
+       is_edge_cutoff[H][1] is true if pixels have been cut off the right side
+       of the rightmost column in this page, and false otherwise.
+
+       is_edge_cutoff[V][0] and is_edge_cutoff[V][1] are similar for the top
+       and bottom of the table.
+
+       The effect of is_edge_cutoff is to prevent rules along the edge in
+       question from being rendered.
+
+       When is_edge_cutoff is true for a given edge, the 'overflows' hmap will
+       contain a node for each cell along that edge. */
+    bool is_edge_cutoff[TABLE_N_AXES][2];
+
+    /* If part of a joined cell would be cut off by breaking a table along
+       'axis' at the rule with offset 'z' (where 0 <= z <= n[axis]), then
+       join_crossing[axis][z] is the thickness of the rule that would be cut
+       off.
+
+       This is used to know to allocate extra space for breaking at such a
+       position, so that part of the cell's content is not lost.
+
+       This affects breaking a table only when headers are present.  When
+       headers are not present, the rule's thickness is used for cell content,
+       so no part of the cell's content is lost (and in fact it is duplicated
+       across both pages). */
+    int *join_crossing[TABLE_N_AXES];
+  };
+
+/* Returns the offset in struct render_page's cp[axis] array of the rule with
+   index RULE_IDX.  That is, if RULE_IDX is 0, then the offset is that of the
+   leftmost or topmost rule; if RULE_IDX is 1, then the offset is that of the
+   next rule to the right (or below); and so on. */
+static int
+rule_ofs (int rule_idx)
+{
+  return rule_idx * 2;
+}
+
+/* Returns the offset in struct render_page's cp[axis] array of the rule with
+   index RULE_IDX_R, which counts from the right side (or bottom) of the page
+   left (or up), according to whether AXIS is H or V, respectively.  That is,
+   if RULE_IDX_R is 0, then the offset is that of the rightmost or bottommost
+   rule; if RULE_IDX is 1, then the offset is that of the next rule to the left
+   (or above); and so on. */
+static int
+rule_ofs_r (const struct render_page *page, int axis, int rule_idx_r)
+{
+  return (page->n[axis] - rule_idx_r) * 2;
+}
+
+/* Returns the offset in struct render_page's cp[axis] array of the cell with
+   index CELL_IDX.  That is, if CELL_IDX is 0, then the offset is that of the
+   leftmost or topmost cell; if CELL_IDX is 1, then the offset is that of the
+   next cell to the right (or below); and so on. */
+static int
+cell_ofs (int cell_idx)
+{
+  return cell_idx * 2 + 1;
+}
+
+/* Returns the width of PAGE along AXIS from OFS0 to OFS1, exclusive. */
+static int
+axis_width (const struct render_page *page, int axis, int ofs0, int ofs1)
+{
+  return page->cp[axis][ofs1] - page->cp[axis][ofs0];
+}
+
+/* Returns the width of the headers in PAGE along AXIS. */
+static int
+headers_width (const struct render_page *page, int axis)
+{
+  int h0 = page->h[axis][0];
+  int w0 = axis_width (page, axis, rule_ofs (0), cell_ofs (h0));
+  int n = page->n[axis];
+  int h1 = page->h[axis][1];
+  int w1 = axis_width (page, axis, rule_ofs_r (page, axis, h1), cell_ofs (n));
+  return w0 + w1;
+}
+
+/* Returns the width of cell X along AXIS in PAGE. */
+static int
+cell_width (const struct render_page *page, int axis, int x)
+{
+  return axis_width (page, axis, cell_ofs (x), cell_ofs (x) + 1);
+}
+
+/* Returns the width of cells X0 through X1, exclusive, along AXIS in PAGE. */
+static int
+joined_width (const struct render_page *page, int axis, int x0, int x1)
+{
+  return axis_width (page, axis, cell_ofs (x0), cell_ofs (x1) - 1);
+}
+
+/* Returns the width of the widest cell, excluding headers, along AXIS in
+   PAGE. */
+static int
+max_cell_width (const struct render_page *page, int axis)
+{
+  int n = page->n[axis];
+  int x0 = page->h[axis][0];
+  int x1 = n - page->h[axis][1];
+  int x, max;
+
+  max = 0;
+  for (x = x0; x < x1; x++)
+    {
+      int w = cell_width (page, axis, x);
+      if (w > max)
+        max = w;
+    }
+  return max;
+}
+\f
+/* A cell that doesn't completely fit on the render_page. */
+struct render_overflow
+  {
+    struct hmap_node node;      /* In render_page's 'overflows' hmap. */
+
+    /* Occupied region of page.
+
+       d[H][0] is the leftmost column.
+       d[H][1] is the rightmost column, plus 1.
+       d[V][0] is the top row.
+       d[V][1] is the bottom row, plus 1.
+
+       The cell in its original table might occupy a larger region.  This
+       member reflects the size of the cell in the current render_page, after
+       trimming off any rows or columns due to page-breaking. */
+    int d[TABLE_N_AXES];
+
+    /* The space that has been trimmed off the cell:
+
+       overflow[H][0]: space trimmed off its left side.
+       overflow[H][1]: space trimmed off its right side.
+       overflow[V][0]: space trimmed off its top.
+       overflow[V][1]: space trimmed off its bottom.
+
+       During rendering, this information is used to position the rendered
+       portion of the cell within the available space.
+
+       When a cell is rendered, sometimes it is permitted to spill over into
+       space that is ordinarily reserved for rules.  Either way, this space is
+       still included in overflow values.
+
+       Suppose, for example, that a cell that joins 2 columns has a width of 60
+       pixels and content "abcdef", that the 2 columns that it joins have
+       widths of 20 and 30 pixels, respectively, and that therefore the rule
+       between the two joined columns has a width of 10 (20 + 10 + 30 = 60).
+       It might render like this, if each character is 10x10, and showing a few
+       extra table cells for context:
+
+                                     +------+
+                                     |abcdef|
+                                     +--+---+
+                                     |gh|ijk|
+                                     +--+---+
+
+       If this render_page is broken at the rule that separates "gh" from
+       "ijk", then the page that contains the left side of the "abcdef" cell
+       will have overflow[H][1] of 10 + 30 = 40 for its portion of the cell,
+       and the page that contains the right side of the cell will have
+       overflow[H][0] of 20 + 10 = 30.  The two resulting pages would look like
+       this:
+
+
+                                       +---
+                                       |abc
+                                       +--+
+                                       |gh|
+                                       +--+
+
+       and:
+
+                                       ----+
+                                       cdef|
+                                       +---+
+                                       |ijk|
+                                       +---+
+    */
+    int overflow[TABLE_N_AXES][2];
+  };
+
+/* Returns a hash value for (X,Y). */
+static unsigned int
+hash_overflow (int x, int y)
+{
+  return hash_int (x + (y << 16), 0);
+}
+
+/* Searches PAGE's set of render_overflow for one whose top-left cell is
+   (X,Y).  Returns it, if there is one, otherwise a null pointer. */
+static const struct render_overflow *
+find_overflow (const struct render_page *page, int x, int y)
+{
+  if (!hmap_is_empty (&page->overflows))
+    {
+      const struct render_overflow *of;
+
+      HMAP_FOR_EACH_WITH_HASH (of, struct render_overflow, node,
+                               hash_overflow (x, y), &page->overflows)
+        if (x == of->d[H] && y == of->d[V])
+          return of;
+    }
+
+  return NULL;
+}
+\f
+/* Row or column dimensions.  Used to figure the size of a table in
+   render_page_create() and discarded after that. */
+struct render_row
+  {
+    /* Width without considering rows (or columns) that span more than one (or
+       column). */
+    int unspanned;
+
+    /* Width taking spanned rows (or columns) into consideration. */
+    int width;
+  };
+
+/* Modifies the 'width' members of the N elements of ROWS so that their sum,
+   when added to rule widths RULES[1] through RULES[N - 1] inclusive, is at
+   least WIDTH. */
+static void
+distribute_spanned_width (int width,
+                          struct render_row *rows, const int *rules, int n)
+{
+  int total_unspanned;
+  double w, d0, d1, d;
+  int x;
+
+  /* Sum up the unspanned widths of the N rows for use as weights. */
+  total_unspanned = 0;
+  for (x = 0; x < n; x++)
+    total_unspanned += rows[x].unspanned;
+  for (x = 0; x < n - 1; x++)
+    total_unspanned += rules[x + 1];
+  if (total_unspanned >= width)
+    return;
+
+  /* The algorithm used here is based on the following description from HTML 4:
+
+         For cells that span multiple columns, a simple approach consists of
+         apportioning the min/max widths evenly to each of the constituent
+         columns.  A slightly more complex approach is to use the min/max
+         widths of unspanned cells to weight how spanned widths are
+         apportioned.  Experiments suggest that a blend of the two approaches
+         gives good results for a wide range of tables.
+
+     We blend the two approaches half-and-half, except that we cannot use the
+     unspanned weights when 'total_unspanned' is 0 (because that would cause a
+     division by zero).
+
+     This implementation uses floating-point types and operators, but all the
+     values involved are integers.  For integers smaller than 53 bits, this
+     should not lose any precision, and it should degrade gracefully for larger
+     values.
+
+     The calculation we want to do is this:
+
+        w0 = width / n
+        w1 = width * (column's unspanned width) / (total unspanned width)
+        (column's width) = (w0 + w1) / 2
+
+     We implement it as a precise calculation in integers by multiplying w0 and
+     w1 by the common denominator of all three calculations (d), dividing that
+     out in the column width calculation, and then keeping the remainder for
+     the next iteration.
+  */
+  d0 = n;
+  d1 = total_unspanned * 2.0;
+  d = d0 * d1;
+  if (total_unspanned > 0)
+    d *= 2.0;
+  w = floor (d / 2.0);
+  for (x = 0; x < n; x++)
+    {
+      w += width * d1;
+      if (total_unspanned > 0)
+        {
+          double unspanned = rows[x].unspanned * 2.0;
+          if (x < n - 1)
+            unspanned += rules[x + 1];
+          if (x > 0)
+            unspanned += rules[x];
+          w += width * unspanned * d0;
+        }
+
+      rows[x].width = w / d;
+      w -= rows[x].width * d;
+    }
+}
+
+/* Initializes PAGE->cp[AXIS] from the row widths in ROWS and the rule widths
+   in RULES. */
+static void
+accumulate_row_widths (const struct render_page *page, enum table_axis axis,
+                       const struct render_row *rows, const int *rules)
+{
+  int n = page->n[axis];
+  int *cp;
+  int z;
+
+  cp = page->cp[axis];
+  cp[0] = 0;
+  for (z = 0; z < n; z++)
+    {
+      cp[1] = cp[0] + rules[z];
+      cp[2] = cp[1] + rows[z].width;
+      cp += 2;
+    }
+  cp[1] = cp[0] + rules[n];
+}
+
+/* Returns the sum of widths of the N ROWS and N+1 RULES. */
+static int
+calculate_table_width (int n, const struct render_row *rows, int *rules)
+{
+  int width;
+  int x;
+
+  width = 0;
+  for (x = 0; x < n; x++)
+    width += rows[x].width;
+  for (x = 0; x <= n; x++)
+    width += rules[x];
+
+  return width;
+}
+\f
+/* Rendering utility functions. */
+
+/* Returns the line style to use for drawing a rule of the given TYPE. */
+static enum render_line_style
+rule_to_render_type (unsigned char type)
+{
+  switch (type)
+    {
+    case TAL_0:
+    case TAL_GAP:
+      return RENDER_LINE_NONE;
+    case TAL_1:
+      return RENDER_LINE_SINGLE;
+    case TAL_2:
+      return RENDER_LINE_DOUBLE;
+    default:
+      NOT_REACHED ();
+    }
+}
+
+/* Returns the width of the rule in TABLE that is at offset Z along axis A, if
+   rendered with PARAMS.  */
+static int
+measure_rule (const struct render_params *params, const struct table *table,
+              enum table_axis a, int z)
+{
+  enum table_axis b = !a;
+  unsigned int rules;
+  int d[TABLE_N_AXES];
+  int width, i;
+
+  /* Determine all types of rules that are present, as a bitmap in 'rules'
+     where rule type 't' is present if bit 2**t is set. */
+  rules = 0;
+  d[a] = z;
+  for (d[b] = 0; d[b] < table->n[b]; d[b]++)
+    rules |= 1u << table_get_rule (table, a, d[H], d[V]);
+
+  /* Calculate maximum width of the rules that are present. */
+  width = 0;
+  for (i = 0; i < N_LINES; i++)
+    if (rules & (1u << i))
+      width = MAX (width, params->line_widths[a][rule_to_render_type (i)]);
+
+  return width;
+}
+
+/* Allocates and returns a new render_page using PARAMS and TABLE.  Allocates
+   space for all of the members of the new page, but the caller must initialize
+   the 'cp' member itself. */
+static struct render_page *
+render_page_allocate (const struct render_params *params,
+                      struct table *table)
+{
+  struct render_page *page;
+  int i;
+
+  page = xmalloc (sizeof *page);
+  page->params = params;
+  page->table = table;
+  page->ref_cnt = 1;
+  page->n[H] = table->n[H];
+  page->n[V] = table->n[V];
+  page->h[H][0] = table->h[H][0];
+  page->h[H][1] = table->h[H][1];
+  page->h[V][0] = table->h[V][0];
+  page->h[V][1] = table->h[V][1];
+
+  for (i = 0; i < TABLE_N_AXES; i++)
+    {
+      page->cp[i] = xmalloc ((2 * page->n[i] + 2) * sizeof *page->cp[i]);
+      page->join_crossing[i] = xzalloc ((page->n[i] + 1) * sizeof *page->join_crossing[i]);
+    }
+
+  hmap_init (&page->overflows);
+  memset (page->is_edge_cutoff, 0, sizeof page->is_edge_cutoff);
+
+  return page;
+}
+
+/* Allocates and returns a new render_page for PARAMS and TABLE, initializing
+   cp[H] in the new page from ROWS and RULES.  The caller must still initialize
+   cp[V]. */
+static struct render_page *
+create_page_with_exact_widths (const struct render_params *params,
+                               struct table *table,
+                               const struct render_row *rows, int *rules)
+{
+  struct render_page *page = render_page_allocate (params, table);
+  accumulate_row_widths (page, H, rows, rules);
+  return page;
+}
+
+/* Allocates and returns a new render_page for PARAMS and TABLE.
+
+   Initializes cp[H] in the new page by setting the width of each row 'i' to
+   somewhere between the minimum cell width ROW_MIN[i].width and the maximum
+   ROW_MAX[i].width.  Sets the width of rules to those in RULES.
+
+   W_MIN is the sum of ROWS_MIN[].width.
+
+   W_MAX is the sum of ROWS_MAX[].width.
+
+   The caller must still initialize cp[V]. */
+static struct render_page *
+create_page_with_interpolated_widths (const struct render_params *params,
+                                      struct table *table,
+                                      const struct render_row *rows_min,
+                                      const struct render_row *rows_max,
+                                      int w_min, int w_max, const int *rules)
+{
+  /* This implementation uses floating-point types and operators, but all the
+     values involved are integers.  For integers smaller than 53 bits, this
+     should not lose any precision, and it should degrade gracefully for larger
+     values. */
+  const int n = table->n[H];
+  const double avail = params->size[H] - w_min;
+  const double wanted = w_max - w_min;
+  struct render_page *page;
+  double w;
+  int *cph;
+  int x;
+
+  assert (wanted > 0);
+
+  page = render_page_allocate (params, table);
+
+  cph = page->cp[H];
+  *cph = 0;
+  w = (int) wanted / 2;
+  for (x = 0; x < n; x++)
+    {
+      int extra;
+
+      w += avail * (rows_max[x].width - rows_min[x].width);
+      extra = w / wanted;
+      w -= extra * wanted;
+
+      cph[1] = cph[0] + rules[x];
+      cph[2] = cph[1] + rows_min[x].width + extra;
+      cph += 2;
+    }
+  cph[1] = cph[0] + rules[n];
+
+  assert (page->cp[H][n * 2 + 1] == params->size[H]);
+  return page;
+}
+
+\f
+static void
+set_join_crossings (struct render_page *page, enum table_axis axis,
+                    const struct table_cell *cell, int *rules)
+{
+  int z;
+
+  for (z = cell->d[axis][0] + 1; z <= cell->d[axis][1] - 1; z++)
+    page->join_crossing[axis][z] = rules[z];
+}
+
+/* Creates and returns a new render_page for rendering TABLE on a device
+   described by PARAMS.
+
+   The new render_page will be suitable for rendering on a device whose page
+   size is PARAMS->size, but the caller is responsible for actually breaking it
+   up to fit on such a device, using the render_break abstraction.  */
+struct render_page *
+render_page_create (const struct render_params *params,
+                    const struct table *table_)
+{
+  struct render_page *page;
+  struct table *table;
+  enum { MIN, MAX };
+  struct render_row *columns[2];
+  struct render_row *rows;
+  int table_widths[2];
+  int *rules[TABLE_N_AXES];
+  int nr, nc;
+  int x, y;
+  int i;
+  enum table_axis axis;
+
+  table = table_ref (table_);
+  nc = table_nc (table);
+  nr = table_nr (table);
+
+  /* Figure out rule widths. */
+  for (axis = 0; axis < TABLE_N_AXES; axis++)
+    {
+      int n = table->n[axis] + 1;
+      int z;
+
+      rules[axis] = xnmalloc (n, sizeof *rules);
+      for (z = 0; z < n; z++)
+        rules[axis][z] = measure_rule (params, table, axis, z);
+    }
+
+  /* Calculate minimum and maximum widths of cells that do not
+     span multiple columns. */
+  for (i = 0; i < 2; i++)
+    columns[i] = xzalloc (nc * sizeof *columns[i]);
+  for (y = 0; y < nr; y++)
+    for (x = 0; x < nc; )
+      {
+        struct table_cell cell;
+
+        table_get_cell (table, x, y, &cell);
+        if (y == cell.d[V][0] && table_cell_colspan (&cell) == 1)
+          {
+            int w[2];
+            int i;
+
+            params->measure_cell_width (params->aux, &cell, &w[MIN], &w[MAX]);
+            for (i = 0; i < 2; i++)
+              if (columns[i][x].unspanned < w[i])
+                columns[i][x].unspanned = w[i];
+          }
+        x = cell.d[H][1];
+        table_cell_free (&cell);
+      }
+
+  /* Distribute widths of spanned columns. */
+  for (i = 0; i < 2; i++)
+    for (x = 0; x < nc; x++)
+      columns[i][x].width = columns[i][x].unspanned;
+  for (y = 0; y < nr; y++)
+    for (x = 0; x < nc; )
+      {
+        struct table_cell cell;
+
+        table_get_cell (table, x, y, &cell);
+        if (y == cell.d[V][0] && table_cell_colspan (&cell) > 1)
+          {
+            int w[2];
+
+            params->measure_cell_width (params->aux, &cell, &w[MIN], &w[MAX]);
+            for (i = 0; i < 2; i++)
+              distribute_spanned_width (w[i], &columns[i][cell.d[H][0]],
+                                        rules[H], table_cell_colspan (&cell));
+          }
+        x = cell.d[H][1];
+        table_cell_free (&cell);
+      }
+
+  /* Decide final column widths. */
+  for (i = 0; i < 2; i++)
+    table_widths[i] = calculate_table_width (table_nc (table),
+                                             columns[i], rules[H]);
+  if (table_widths[MAX] <= params->size[H])
+    {
+      /* Fits even with maximum widths.  Use them. */
+      page = create_page_with_exact_widths (params, table, columns[MAX],
+                                            rules[H]);
+    }
+  else if (table_widths[MIN] <= params->size[H])
+    {
+      /* Fits with minimum widths, so distribute the leftover space. */
+      page = create_page_with_interpolated_widths (
+        params, table, columns[MIN], columns[MAX],
+        table_widths[MIN], table_widths[MAX], rules[H]);
+    }
+  else
+    {
+      /* Doesn't fit even with minimum widths.  Assign minimums for now, and
+         later we can break it horizontally into multiple pages. */
+      page = create_page_with_exact_widths (params, table, columns[MIN],
+                                            rules[H]);
+    }
+
+  /* Calculate heights of cells that do not span multiple rows. */
+  rows = xzalloc (nr * sizeof *rows);
+  for (y = 0; y < nr; y++)
+    {
+      for (x = 0; x < nc; )
+        {
+          struct render_row *r = &rows[y];
+          struct table_cell cell;
+
+          table_get_cell (table, x, y, &cell);
+          if (y == cell.d[V][0])
+            {
+              if (table_cell_rowspan (&cell) == 1)
+                {
+                  int w = joined_width (page, H, cell.d[H][0], cell.d[H][1]);
+                  int h = params->measure_cell_height (params->aux, &cell, w);
+                  if (h > r->unspanned)
+                    r->unspanned = r->width = h;
+                }
+              else
+                set_join_crossings (page, V, &cell, rules[V]);
+
+              if (table_cell_colspan (&cell) > 1)
+                set_join_crossings (page, H, &cell, rules[H]);
+            }
+          x = cell.d[H][1];
+          table_cell_free (&cell);
+        }
+    }
+  for (i = 0; i < 2; i++)
+    free (columns[i]);
+
+  /* Distribute heights of spanned rows. */
+  for (y = 0; y < nr; y++)
+    for (x = 0; x < nc; )
+      {
+        struct table_cell cell;
+
+        table_get_cell (table, x, y, &cell);
+        if (y == cell.d[V][0] && table_cell_rowspan (&cell) > 1)
+          {
+            int w = joined_width (page, H, cell.d[H][0], cell.d[H][1]);
+            int h = params->measure_cell_height (params->aux, &cell, w);
+            distribute_spanned_width (h, &rows[cell.d[V][0]], rules[V],
+                                      table_cell_rowspan (&cell));
+          }
+        x = cell.d[H][1];
+        table_cell_free (&cell);
+      }
+
+  /* Decide final row heights. */
+  accumulate_row_widths (page, V, rows, rules[V]);
+  free (rows);
+
+  /* Measure headers.  If they are "too big", get rid of them.  */
+  for (axis = 0; axis < TABLE_N_AXES; axis++)
+    {
+      int hw = headers_width (page, axis);
+      if (hw * 2 >= page->params->size[axis]
+          || hw + max_cell_width (page, axis) > page->params->size[axis])
+        {
+          page->table = table_unshare (page->table);
+          page->table->h[axis][0] = page->table->h[axis][1] = 0;
+          page->h[axis][0] = page->h[axis][1] = 0;
+        }
+    }
+
+  free (rules[H]);
+  free (rules[V]);
+
+  return page;
+}
+
+/* Increases PAGE's reference count. */
+struct render_page *
+render_page_ref (const struct render_page *page_)
+{
+  struct render_page *page = CONST_CAST (struct render_page *, page_);
+  page->ref_cnt++;
+  return page;
+}
+
+/* Decreases PAGE's reference count and destroys PAGE if this causes the
+   reference count to fall to zero. */
+void
+render_page_unref (struct render_page *page)
+{
+  if (page != NULL && --page->ref_cnt == 0)
+    {
+      struct render_overflow *overflow, *next;
+
+      HMAP_FOR_EACH_SAFE (overflow, next, struct render_overflow, node,
+                          &page->overflows)
+        free (overflow);
+      hmap_destroy (&page->overflows);
+
+      table_unref (page->table);
+      free (page->cp[H]);
+      free (page->cp[V]);
+      free (page);
+    }
+}
+
+/* Returns the size of PAGE along AXIS.  (This might be larger than the page
+   size specified in the parameters passed to render_page_create().  Use a
+   render_break to break up a render_page into page-sized chunks.) */
+int
+render_page_get_size (const struct render_page *page, enum table_axis axis)
+{
+  return page->cp[axis][page->n[axis] * 2 + 1];
+}
+\f
+/* Drawing render_pages. */
+
+static enum render_line_style
+get_rule (const struct render_page *page, enum table_axis axis,
+          const int d[TABLE_N_AXES])
+{
+  return rule_to_render_type (table_get_rule (page->table,
+                                              axis, d[H] / 2, d[V] / 2));
+}
+
+static bool
+is_rule (int z)
+{
+  return !(z & 1);
+}
+
+static void
+render_rule (const struct render_page *page, const int d[TABLE_N_AXES])
+{
+  enum render_line_style styles[TABLE_N_AXES][2];
+  enum table_axis a;
+
+  for (a = 0; a < TABLE_N_AXES; a++)
+    {
+      enum table_axis b = !a;
+
+      styles[a][0] = styles[a][1] = RENDER_LINE_NONE;
+
+      if (!is_rule (d[a])
+          || (page->is_edge_cutoff[a][0] && d[a] == 0)
+          || (page->is_edge_cutoff[a][1] && d[a] == page->n[a] * 2))
+        continue;
+
+      if (is_rule (d[b]))
+        {
+          if (d[b] > 0)
+            {
+              int e[TABLE_N_AXES];
+              e[H] = d[H];
+              e[V] = d[V];
+              e[b]--;
+              styles[a][0] = get_rule (page, a, e);
+            }
+
+          if (d[b] / 2 < page->table->n[b])
+            styles[a][1] = get_rule (page, a, d);
+        }
+      else
+        styles[a][0] = styles[a][1] = get_rule (page, a, d);
+    }
+
+  if (styles[H][0] != RENDER_LINE_NONE || styles[H][1] != RENDER_LINE_NONE
+      || styles[V][0] != RENDER_LINE_NONE || styles[V][1] != RENDER_LINE_NONE)
+    {
+      int bb[TABLE_N_AXES][2];
+
+      bb[H][0] = page->cp[H][d[H]];
+      bb[H][1] = page->cp[H][d[H] + 1];
+      bb[V][0] = page->cp[V][d[V]];
+      bb[V][1] = page->cp[V][d[V] + 1];
+      page->params->draw_line (page->params->aux, bb, styles);
+    }
+}
+
+static void
+render_cell (const struct render_page *page, const struct table_cell *cell)
+{
+  const struct render_overflow *of;
+  int bb[TABLE_N_AXES][2];
+  int clip[TABLE_N_AXES][2];
+
+  bb[H][0] = clip[H][0] = page->cp[H][cell->d[H][0] * 2 + 1];
+  bb[H][1] = clip[H][1] = page->cp[H][cell->d[H][1] * 2];
+  bb[V][0] = clip[V][0] = page->cp[V][cell->d[V][0] * 2 + 1];
+  bb[V][1] = clip[V][1] = page->cp[V][cell->d[V][1] * 2];
+
+  of = find_overflow (page, cell->d[H][0], cell->d[V][0]);
+  if (of)
+    {
+      enum table_axis axis;
+
+      for (axis = 0; axis < TABLE_N_AXES; axis++)
+        {
+          if (of->overflow[axis][0])
+            {
+              bb[axis][0] -= of->overflow[axis][0];
+              if (cell->d[axis][0] == 0)
+                clip[axis][0] = page->cp[axis][cell->d[axis][0] * 2];
+            }
+          if (of->overflow[axis][1])
+            {
+              bb[axis][1] += of->overflow[axis][1];
+              if (cell->d[axis][1] == page->n[axis])
+                clip[axis][1] = page->cp[axis][cell->d[axis][1] * 2 + 1];
+            }
+        }
+    }
+
+  page->params->draw_cell (page->params->aux, cell, bb, clip);
+}
+
+/* Renders PAGE, by calling the 'draw_line' and 'draw_cell' functions from the
+   render_params provided to render_page_create(). */
+void
+render_page_draw (const struct render_page *page)
+{
+  int x, y;
+
+  for (y = 0; y <= page->n[V] * 2; y++)
+    for (x = 0; x <= page->n[H] * 2; )
+      if (is_rule (x) || is_rule (y))
+        {
+          int d[TABLE_N_AXES];
+          d[H] = x;
+          d[V] = y;
+          render_rule (page, d);
+          x++;
+        }
+      else
+        {
+          struct table_cell cell;
+
+          table_get_cell (page->table, x / 2, y / 2, &cell);
+          if (y / 2 == cell.d[V][0])
+            render_cell (page, &cell);
+          x = rule_ofs (cell.d[H][1]);
+          table_cell_free (&cell);
+        }
+}
+\f
+/* Breaking up tables to fit on a page. */
+
+static int needed_size (const struct render_break *, int cell);
+static bool cell_is_breakable (const struct render_break *, int cell);
+static struct render_page *render_page_select (const struct render_page *,
+                                               enum table_axis,
+                                               int z0, int p0,
+                                               int z1, int p1);
+
+/* Initializes render_break B for breaking PAGE along AXIS.
+
+   Ownership of PAGE is transferred to B.  The caller must use
+   render_page_ref() if it needs to keep a copy of PAGE. */
+void
+render_break_init (struct render_break *b, struct render_page *page,
+                   enum table_axis axis)
+{
+  b->page = page;
+  b->axis = axis;
+  b->cell = page->h[axis][0];
+  b->pixel = 0;
+  b->hw = headers_width (page, axis);
+}
+
+/* Initializes B as a render_break structure for which
+   render_break_has_next() always returns false. */
+void
+render_break_init_empty (struct render_break *b)
+{
+  b->page = NULL;
+  b->axis = TABLE_HORZ;
+  b->cell = 0;
+  b->pixel = 0;
+  b->hw = 0;
+}
+
+/* Frees B and unrefs the render_page that it owns. */
+void
+render_break_destroy (struct render_break *b)
+{
+  if (b != NULL)
+    render_page_unref (b->page);
+}
+
+/* Returns true if B still has cells that are yet to be returned,
+   false if all of B's page has been processed. */
+bool
+render_break_has_next (const struct render_break *b)
+{
+  const struct render_page *page = b->page;
+  enum table_axis axis = b->axis;
+
+  return page != NULL && b->cell < page->n[axis] - page->h[axis][1];
+}
+
+/* Returns the minimum SIZE argument that, if passed to render_break_next(),
+   will avoid a null return value (if cells are still left). */
+int
+render_break_next_size (const struct render_break *b)
+{
+  const struct render_page *page = b->page;
+  enum table_axis axis = b->axis;
+
+  return (!render_break_has_next (b) ? 0
+          : !cell_is_breakable (b, b->cell) ? needed_size (b, b->cell + 1)
+          : b->hw + page->params->font_size[axis]);
+}
+
+/* Returns a new render_page that is up to SIZE pixels wide along B's axis.
+   Returns a null pointer if B has already been completely broken up, or if
+   SIZE is too small to reasonably render any cells.  The latter will never
+   happen if SIZE is at least as large as the page size passed to
+   render_page_create() along B's axis. */
+struct render_page *
+render_break_next (struct render_break *b, int size)
+{
+  const struct render_page *page = b->page;
+  enum table_axis axis = b->axis;
+  struct render_page *subpage;
+  int cell, pixel;
+
+  if (!render_break_has_next (b))
+    return NULL;
+
+  pixel = 0;
+  for (cell = b->cell; cell < page->n[axis] - page->h[axis][1]; cell++)
+    if (needed_size (b, cell + 1) > size)
+      {
+        if (!cell_is_breakable (b, cell))
+          {
+            if (cell == b->cell)
+              return NULL;
+          }
+        else
+          pixel = (cell == b->cell
+                   ? b->pixel + size - b->hw
+                   : size - needed_size (b, cell));
+        break;
+      }
+
+  subpage = render_page_select (page, axis, b->cell, b->pixel,
+                                pixel ? cell + 1 : cell,
+                                pixel ? cell_width (page, axis, cell) - pixel
+                                : 0);
+  b->cell = cell;
+  b->pixel = pixel;
+  return subpage;
+}
+
+/* Returns the width that would be required along B's axis to render a page
+   from B's current position up to but not including CELL. */
+static int
+needed_size (const struct render_break *b, int cell)
+{
+  const struct render_page *page = b->page;
+  enum table_axis axis = b->axis;
+  int size;
+
+  size = joined_width (page, axis, b->cell, cell) + b->hw - b->pixel;
+  if (page->h[axis][0] && page->h[axis][1])
+    size += page->join_crossing[axis][b->cell];
+
+  return size;
+}
+
+/* Returns true if CELL along B's axis may be broken across a page boundary.
+
+   This is just a heuristic.  Breaking cells across page boundaries can save
+   space, but it looks ugly. */
+static bool
+cell_is_breakable (const struct render_break *b, int cell)
+{
+  const struct render_page *page = b->page;
+  enum table_axis axis = b->axis;
+
+  return cell_width (page, axis, cell) > page->params->size[axis] / 2;
+}
+\f
+/* render_page_select() and helpers. */
+
+struct render_page_selection
+  {
+    const struct render_page *page; /* Page whose slice we are selecting. */
+    struct render_page *subpage; /* New page under construction. */
+    enum table_axis a;   /* Axis of 'page' along which 'subpage' is a slice. */
+    enum table_axis b;   /* The opposite of 'a'. */
+    int z0;              /* First cell along 'a' being selected. */
+    int z1;              /* Last cell being selected, plus 1. */
+    int p0;              /* Number of pixels to trim off left side of z0. */
+    int p1;              /* Number of pixels to trim off right side of z1-1. */
+  };
+
+static void cell_to_subpage (struct render_page_selection *,
+                             const struct table_cell *,
+                             int subcell[TABLE_N_AXES]);
+static const struct render_overflow *find_overflow_for_cell (
+  struct render_page_selection *, const struct table_cell *);
+static struct render_overflow *insert_overflow (struct render_page_selection *,
+                                                const struct table_cell *);
+
+/* Creates and returns a new render_page whose contents are a subregion of
+   PAGE's contents.  The new render_page includes cells Z0 through Z1 along
+   AXIS, plus any headers on AXIS.
+
+   If P0 is nonzero, then it is a number of pixels to exclude from the left or
+   top (according to AXIS) of cell Z0.  Similarly, P1 is a number of pixels to
+   exclude from the right or bottom of cell Z1 - 1.  (P0 and P1 are used to
+   render cells that are too large to fit on a single page.)
+
+   The whole of axis !AXIS is included.  (The caller may follow up with another
+   call to render_page_select() to select on !AXIS to select on that axis as
+   well.)
+
+   The caller retains ownership of PAGE, which is not modified. */
+static struct render_page *
+render_page_select (const struct render_page *page, enum table_axis axis,
+                    int z0, int p0, int z1, int p1)
+{
+  struct render_page_selection s;
+  enum table_axis a = axis;
+  enum table_axis b = !a;
+  struct render_page *subpage;
+  struct render_overflow *ro;
+  int *dcp, *scp;
+  int *jc;
+  int z;
+
+
+  /* Optimize case where all of PAGE is selected by just incrementing the
+     reference count. */
+  if (z0 == page->h[a][0] && p0 == 0
+      && z1 == page->n[a] - page->h[a][1] && p1 == 0)
+    {
+      struct render_page *page_rw = (struct render_page *) page;
+      page_rw->ref_cnt++;
+      return page_rw;
+    }
+
+  /* Allocate subpage. */
+  subpage = render_page_allocate (page->params,
+                                  table_select_slice (
+                                    table_ref (page->table),
+                                    a, z0, z1, true));
+
+  /* An edge is cut off if it was cut off in PAGE or if we're trimming pixels
+     off that side of the page and there are no headers. */
+  subpage->is_edge_cutoff[a][0] =
+    subpage->h[a][0] == 0 && (p0 || (z0 == 0 && page->is_edge_cutoff[a][0]));
+  subpage->is_edge_cutoff[a][1] =
+    subpage->h[a][1] == 0 && (p1 || (z1 == page->n[a]
+                                     && page->is_edge_cutoff[a][1]));
+  subpage->is_edge_cutoff[b][0] = page->is_edge_cutoff[b][0];
+  subpage->is_edge_cutoff[b][1] = page->is_edge_cutoff[b][1];
+
+  /* Select join crossings from PAGE into subpage. */
+  jc = subpage->join_crossing[a];
+  for (z = 0; z < page->h[a][0]; z++)
+    *jc++ = page->join_crossing[a][z];
+  for (z = z0; z <= z1; z++)
+    *jc++ = page->join_crossing[a][z];
+  for (z = page->n[a] - page->h[a][1]; z < page->n[a]; z++)
+    *jc++ = page->join_crossing[a][z];
+  assert (jc == &subpage->join_crossing[a][subpage->n[a] + 1]);
+
+  memcpy (subpage->join_crossing[b], page->join_crossing[b],
+          (subpage->n[b] + 1) * sizeof **subpage->join_crossing);
+
+  /* Select widths from PAGE into subpage. */
+  scp = page->cp[a];
+  dcp = subpage->cp[a];
+  *dcp = 0;
+  for (z = 0; z <= rule_ofs (subpage->h[a][0]); z++, dcp++)
+    dcp[1] = dcp[0] + (scp[z + 1] - scp[z]);
+  for (z = cell_ofs (z0); z <= cell_ofs (z1 - 1); z++, dcp++)
+    {
+      dcp[1] = dcp[0] + (scp[z + 1] - scp[z]);
+      if (z == cell_ofs (z0))
+        {
+          dcp[1] -= p0;
+          if (page->h[a][0] && page->h[a][1])
+            dcp[1] += page->join_crossing[a][z / 2];
+        }
+      if (z == cell_ofs (z1 - 1))
+        dcp[1] -= p1;
+    }
+  for (z = rule_ofs_r (page, a, subpage->h[a][1]);
+       z <= rule_ofs_r (page, a, 0); z++, dcp++)
+    dcp[1] = dcp[0] + (scp[z + 1] - scp[z]);
+  assert (dcp == &subpage->cp[a][2 * subpage->n[a] + 1]);
+
+  for (z = 0; z < page->n[b] * 2 + 2; z++)
+    subpage->cp[b][z] = page->cp[b][z];
+
+  /* Add new overflows. */
+  s.page = page;
+  s.a = a;
+  s.b = b;
+  s.z0 = z0;
+  s.z1 = z1;
+  s.p0 = p0;
+  s.p1 = p1;
+  s.subpage = subpage;
+
+  for (z = 0; z < page->n[b]; z++)
+    {
+      struct table_cell cell;
+      int d[TABLE_N_AXES];
+
+      d[a] = z0;
+      d[b] = z;
+      table_get_cell (page->table, d[H], d[V], &cell);
+      if ((z == cell.d[b][0] && (p0 || cell.d[a][0] < z0))
+          || (z == cell.d[b][1] - 1 && p1))
+        {
+          ro = insert_overflow (&s, &cell);
+          ro->overflow[a][0] += p0 + axis_width (page, a,
+                                                 cell_ofs (cell.d[a][0]),
+                                                 cell_ofs (z0));
+          if (z1 == z0 + 1)
+            ro->overflow[a][1] += p1;
+          if (page->h[a][0] && page->h[a][1])
+            ro->overflow[a][0] -= page->join_crossing[a][cell.d[a][0] + 1];
+          if (cell.d[a][1] > z1)
+            ro->overflow[a][1] += axis_width (page, a, cell_ofs (z1),
+                                              cell_ofs (cell.d[a][1]));
+        }
+      table_cell_free (&cell);
+    }
+
+  for (z = 0; z < page->n[b]; z++)
+    {
+      struct table_cell cell;
+      int d[TABLE_N_AXES];
+
+      /* XXX need to handle p1 below */
+      d[a] = z1 - 1;
+      d[b] = z;
+      table_get_cell (page->table, d[H], d[V], &cell);
+      if (z == cell.d[b][0] && cell.d[a][1] > z1
+          && find_overflow_for_cell (&s, &cell) == NULL)
+        {
+          ro = insert_overflow (&s, &cell);
+          ro->overflow[a][1] += axis_width (page, a, cell_ofs (z1),
+                                            cell_ofs (cell.d[a][1]));
+        }
+      table_cell_free (&cell);
+    }
+
+  /* Copy overflows from PAGE into subpage. */
+  HMAP_FOR_EACH (ro, struct render_overflow, node, &page->overflows)
+    {
+      struct table_cell cell;
+
+      table_get_cell (page->table, ro->d[H], ro->d[V], &cell);
+      if (cell.d[a][1] > z0 && cell.d[a][0] < z1
+          && find_overflow_for_cell (&s, &cell) == NULL)
+        insert_overflow (&s, &cell);
+      table_cell_free (&cell);
+    }
+
+  return subpage;
+}
+
+/* Given CELL, a table_cell within S->page, stores in SUBCELL the (x,y)
+   coordinates of the top-left cell as it will appear in S->subpage.
+
+   CELL must actually intersect the region of S->page that is being selected
+   by render_page_select() or the results will not make any sense. */
+static void
+cell_to_subpage (struct render_page_selection *s,
+                 const struct table_cell *cell, int subcell[TABLE_N_AXES])
+{
+  enum table_axis a = s->a;
+  enum table_axis b = s->b;
+  int ha0 = s->subpage->h[a][0];
+
+  subcell[a] = MAX (cell->d[a][0] - s->z0 + ha0, ha0);
+  subcell[b] = cell->d[b][0];
+}
+
+/* Given CELL, a table_cell within S->page, returns the render_overflow for
+   that cell in S->subpage, if there is one, and a null pointer otherwise.
+
+   CELL must actually intersect the region of S->page that is being selected
+   by render_page_select() or the results will not make any sense. */
+static const struct render_overflow *
+find_overflow_for_cell (struct render_page_selection *s,
+                        const struct table_cell *cell)
+{
+  int subcell[2];
+
+  cell_to_subpage (s, cell, subcell);
+  return find_overflow (s->subpage, subcell[H], subcell[V]);
+}
+
+/* Given CELL, a table_cell within S->page, inserts a render_overflow for that
+   cell in S->subpage (which must not already exist).  Initializes the new
+   render_overflow's 'overflow' member from the overflow for CELL in S->page,
+   if there is one.
+
+   CELL must actually intersect the region of S->page that is being selected
+   by render_page_select() or the results will not make any sense. */
+static struct render_overflow *
+insert_overflow (struct render_page_selection *s,
+                 const struct table_cell *cell)
+{
+  const struct render_overflow *old;
+  struct render_overflow *of;
+
+  of = xzalloc (sizeof *of);
+  cell_to_subpage (s, cell, of->d);
+  hmap_insert (&s->subpage->overflows, &of->node,
+               hash_overflow (of->d[H], of->d[V]));
+
+  old = find_overflow (s->page, cell->d[H][0], cell->d[V][0]);
+  if (old != NULL)
+    memcpy (of->overflow, old->overflow, sizeof of->overflow);
+
+  return of;
+}
+
diff --git a/src/output/render.h b/src/output/render.h
new file mode 100644 (file)
index 0000000..af77984
--- /dev/null
@@ -0,0 +1,116 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_RENDER_H
+#define OUTPUT_RENDER_H 1
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <output/table-provider.h>
+
+struct table;
+
+enum render_line_style
+  {
+    RENDER_LINE_NONE,           /* No line. */
+    RENDER_LINE_SINGLE,         /* Single line. */
+    RENDER_LINE_DOUBLE,         /* Double line. */
+    RENDER_N_LINES
+  };
+
+struct render_params
+  {
+    /* Measures CELL's width.  Stores in *MIN_WIDTH the minimum width required
+       to avoid splitting a single word across multiple lines (normally, this
+       is the width of the longest word in the cell) and in *MAX_WIDTH the
+       minimum width required to avoid line breaks other than at new-lines. */
+    void (*measure_cell_width) (void *aux, const struct table_cell *cell,
+                                int *min_width, int *max_width);
+
+    /* Returns the height required to render CELL given a width of WIDTH. */
+    int (*measure_cell_height) (void *aux, const struct table_cell *cell,
+                                int width);
+
+    /* Draws a generalized intersection of lines in the rectangle whose
+       top-left corner is (BB[TABLE_HORZ][0], BB[TABLE_VERT][0]) and whose
+       bottom-right corner is (BB[TABLE_HORZ][1], BB[TABLE_VERT][1]).
+
+       STYLES is interpreted this way:
+
+       STYLES[TABLE_HORZ][0]: style of line from top of BB to its center.
+       STYLES[TABLE_HORZ][1]: style of line from bottom of BB to its center.
+       STYLES[TABLE_VERT][0]: style of line from left of BB to its center.
+       STYLES[TABLE_VERT][1]: style of line from right of BB to its center. */
+    void (*draw_line) (void *aux, int bb[TABLE_N_AXES][2],
+                       enum render_line_style styles[TABLE_N_AXES][2]);
+
+    /* Draws CELL within bounding box BB.  CLIP is the same as BB (the common
+       case) or a subregion enclosed by BB.  In the latter case only the part
+       of the cell that lies within CLIP should actually be drawn, although BB
+       should used to determine the layout of the cell. */
+    void (*draw_cell) (void *aux, const struct table_cell *cell,
+                       int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2]);
+
+    /* Auxiliary data passed to each of the above functions. */
+    void *aux;
+
+    /* Page size to try to fit the rendering into.  Some tables will, of
+       course, overflow this size. */
+    int size[TABLE_N_AXES];
+
+    /* Nominal size of a character in the most common font:
+       font_size[TABLE_HORZ]: Em width.
+       font_size[TABLE_VERT]: Line spacing. */
+    int font_size[TABLE_N_AXES];
+
+    /* Width of different kinds of lines. */
+    int line_widths[TABLE_N_AXES][RENDER_N_LINES];
+  };
+\f
+/* A "page" of content that is ready to be rendered.
+
+   A page's size is not limited to the size passed in as part of render_params.
+   Use render_break (see below) to break a too-big render_page into smaller
+   render_pages that will fit in the available space. */
+struct render_page *render_page_create (const struct render_params *,
+                                        const struct table *);
+
+struct render_page *render_page_ref (const struct render_page *);
+void render_page_unref (struct render_page *);
+
+int render_page_get_size (const struct render_page *, enum table_axis);
+void render_page_draw (const struct render_page *);
+\f
+/* An iterator for breaking render_pages into smaller chunks. */
+struct render_break
+  {
+    struct render_page *page;   /* Page being broken up. */
+    enum table_axis axis;       /* Axis along which 'page' is being broken. */
+    int cell;                   /* Next cell. */
+    int pixel;                  /* Pixel offset within 'cell' (usually 0). */
+    int hw;                     /* Width of headers of 'page' along 'axis'. */
+  };
+
+void render_break_init (struct render_break *, struct render_page *,
+                        enum table_axis);
+void render_break_init_empty (struct render_break *);
+void render_break_destroy (struct render_break *);
+
+bool render_break_has_next (const struct render_break *);
+int render_break_next_size (const struct render_break *);
+struct render_page *render_break_next (struct render_break *, int size);
+
+#endif /* output/render.h */
diff --git a/src/output/tab.c b/src/output/tab.c
new file mode 100644 (file)
index 0000000..f6b4886
--- /dev/null
@@ -0,0 +1,767 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/tab.h>
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#include <data/data-out.h>
+#include <data/format.h>
+#include <data/settings.h>
+#include <data/value.h>
+#include <data/dictionary.h>
+#include <libpspp/assertion.h>
+#include <libpspp/compiler.h>
+#include <libpspp/misc.h>
+#include <libpspp/pool.h>
+#include <output/driver.h>
+#include <output/table-item.h>
+#include <output/table-provider.h>
+#include <output/text-item.h>
+
+#include "error.h"
+#include "minmax.h"
+#include "xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+\f
+/* Set in the options field of cells that  */
+#define TAB_JOIN (1u << TAB_FIRST_AVAILABLE)
+
+/* Joined cell. */
+struct tab_joined_cell
+  {
+    int d[TABLE_N_AXES][2];     /* Table region, same as struct table_cell. */
+    char *contents;
+  };
+
+static const struct table_class tab_table_class;
+
+/* Creates and returns a new table with NC columns and NR rows and initially no
+   header rows or columns.  The table's cells are initially empty. */
+struct tab_table *
+tab_create (int nc, int nr)
+{
+  struct tab_table *t;
+
+  t = pool_create_container (struct tab_table, container);
+  table_init (&t->table, &tab_table_class);
+  table_set_nc (&t->table, nc);
+  table_set_nr (&t->table, nr);
+
+  t->title = NULL;
+  t->cf = nc;
+  t->cc = pool_calloc (t->container, nr * nc, sizeof *t->cc);
+  t->ct = pool_malloc (t->container, nr * nc);
+  memset (t->ct, 0, nc * nr);
+
+  t->rh = pool_nmalloc (t->container, nc, nr + 1);
+  memset (t->rh, 0, nc * (nr + 1));
+
+  t->rv = pool_nmalloc (t->container, nr, nc + 1);
+  memset (t->rv, TAL_GAP, nr * (nc + 1));
+
+  t->col_ofs = t->row_ofs = 0;
+
+  return t;
+}
+
+/* Sets the width and height of a table, in columns and rows,
+   respectively.  Use only to reduce the size of a table, since it
+   does not change the amount of allocated memory.
+
+   This function is obsolete.  Please do not add new uses of it.  (Instead, use
+   table_select() or one of its helper functions.) */
+void
+tab_resize (struct tab_table *t, int nc, int nr)
+{
+  if (nc != -1)
+    {
+      assert (nc + t->col_ofs <= t->cf);
+      table_set_nc (&t->table, nc + t->col_ofs);
+    }
+  if (nr != -1)
+    {
+      assert (nr + t->row_ofs <= tab_nr (t));
+      table_set_nr (&t->table, nr + t->row_ofs);
+    }
+}
+
+/* Changes either or both dimensions of a table and reallocates memory as
+   necessary.
+
+   This function is obsolete.  Please do not add new uses of it.  (Instead, use
+   table_paste() or one of its helper functions to paste multiple tables
+   together into a larger one.) */
+void
+tab_realloc (struct tab_table *t, int nc, int nr)
+{
+  int ro, co;
+
+  ro = t->row_ofs;
+  co = t->col_ofs;
+  if (ro || co)
+    tab_offset (t, 0, 0);
+
+  if (nc == -1)
+    nc = tab_nc (t);
+  if (nr == -1)
+    nr = tab_nr (t);
+
+  assert (nc == tab_nc (t));
+
+  if (nc > t->cf)
+    {
+      int mr1 = MIN (nr, tab_nr (t));
+      int mc1 = MIN (nc, tab_nc (t));
+
+      void **new_cc;
+      unsigned char *new_ct;
+      int r;
+
+      new_cc = pool_calloc (t->container, nr * nc, sizeof *new_cc);
+      new_ct = pool_malloc (t->container, nr * nc);
+      for (r = 0; r < mr1; r++)
+       {
+         memcpy (&new_cc[r * nc], &t->cc[r * tab_nc (t)], mc1 * sizeof *t->cc);
+         memcpy (&new_ct[r * nc], &t->ct[r * tab_nc (t)], mc1);
+         memset (&new_ct[r * nc + tab_nc (t)], 0, nc - tab_nc (t));
+       }
+      pool_free (t->container, t->cc);
+      pool_free (t->container, t->ct);
+      t->cc = new_cc;
+      t->ct = new_ct;
+      t->cf = nc;
+    }
+  else if (nr != tab_nr (t))
+    {
+      t->cc = pool_nrealloc (t->container, t->cc, nr * nc, sizeof *t->cc);
+      t->ct = pool_realloc (t->container, t->ct, nr * nc);
+
+      t->rh = pool_nrealloc (t->container, t->rh, nc, nr + 1);
+      t->rv = pool_nrealloc (t->container, t->rv, nr, nc + 1);
+
+      if (nr > tab_nr (t))
+       {
+         memset (&t->rh[nc * (tab_nr (t) + 1)], TAL_0, (nr - tab_nr (t)) * nc);
+         memset (&t->rv[(nc + 1) * tab_nr (t)], TAL_GAP,
+                  (nr - tab_nr (t)) * (nc + 1));
+       }
+    }
+
+  memset (&t->ct[nc * tab_nr (t)], 0, nc * (nr - tab_nr (t)));
+  memset (&t->cc[nc * tab_nr (t)], 0, nc * (nr - tab_nr (t)) * sizeof *t->cc);
+
+  table_set_nr (&t->table, nr);
+  table_set_nc (&t->table, nc);
+
+  if (ro || co)
+    tab_offset (t, co, ro);
+}
+
+/* Sets the number of header rows on each side of TABLE to L on the
+   left, R on the right, T on the top, B on the bottom.  Header rows
+   are repeated when a table is broken across multiple columns or
+   multiple pages. */
+void
+tab_headers (struct tab_table *table, int l, int r, int t, int b)
+{
+  table_set_hl (&table->table, l);
+  table_set_hr (&table->table, r);
+  table_set_ht (&table->table, t);
+  table_set_hb (&table->table, b);
+}
+\f
+/* Rules. */
+
+/* Draws a vertical line to the left of cells at horizontal position X
+   from Y1 to Y2 inclusive in style STYLE, if style is not -1. */
+void
+tab_vline (struct tab_table *t, int style, int x, int y1, int y2)
+{
+#if DEBUGGING
+  if (x + t->col_ofs < 0 || x + t->col_ofs > tab_nc (t)
+      || y1 + t->row_ofs < 0 || y1 + t->row_ofs >= tab_nr (t)
+      || y2 + t->row_ofs < 0 || y2 + t->row_ofs >= tab_nr (t))
+    {
+      printf (_("bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in "
+               "table size (%d,%d)\n"),
+             x, t->col_ofs, x + t->col_ofs,
+             y1, t->row_ofs, y1 + t->row_ofs,
+             y2, t->row_ofs, y2 + t->row_ofs,
+             tab_nc (t), tab_nr (t));
+      return;
+    }
+#endif
+
+  x += t->col_ofs;
+  y1 += t->row_ofs;
+  y2 += t->row_ofs;
+
+  assert (x >= 0);
+  assert (x <= tab_nc (t));
+  assert (y1 >= 0);
+  assert (y2 >= y1);
+  assert (y2 <= tab_nr (t));
+
+  if (style != -1)
+    {
+      int y;
+      for (y = y1; y <= y2; y++)
+        t->rv[x + (t->cf + 1) * y] = style;
+    }
+}
+
+/* Draws a horizontal line above cells at vertical position Y from X1
+   to X2 inclusive in style STYLE, if style is not -1. */
+void
+tab_hline (struct tab_table * t, int style, int x1, int x2, int y)
+{
+#if DEBUGGING
+  if (y + t->row_ofs < 0 || y + t->row_ofs > tab_nr (t)
+      || x1 + t->col_ofs < 0 || x1 + t->col_ofs >= tab_nc (t)
+      || x2 + t->col_ofs < 0 || x2 + t->col_ofs >= tab_nc (t))
+    {
+      printf (_("bad hline: x=(%d+%d=%d,%d+%d=%d) y=%d+%d=%d in "
+               "table size (%d,%d)\n"),
+              x1, t->col_ofs, x1 + t->col_ofs,
+              x2, t->col_ofs, x2 + t->col_ofs,
+              y, t->row_ofs, y + t->row_ofs,
+             tab_nc (t), tab_nr (t));
+      return;
+    }
+#endif
+
+  x1 += t->col_ofs;
+  x2 += t->col_ofs;
+  y += t->row_ofs;
+
+  assert (y >= 0);
+  assert (y <= tab_nr (t));
+  assert (x2 >= x1 );
+  assert (x1 >= 0 );
+  assert (x2 < tab_nc (t));
+
+  if (style != -1)
+    {
+      int x;
+      for (x = x1; x <= x2; x++)
+        t->rh[x + t->cf * y] = style;
+    }
+}
+
+/* Draws a box around cells (X1,Y1)-(X2,Y2) inclusive with horizontal
+   lines of style F_H and vertical lines of style F_V.  Fills the
+   interior of the box with horizontal lines of style I_H and vertical
+   lines of style I_V.  Any of the line styles may be -1 to avoid
+   drawing those lines.  This is distinct from 0, which draws a null
+   line. */
+void
+tab_box (struct tab_table *t, int f_h, int f_v, int i_h, int i_v,
+        int x1, int y1, int x2, int y2)
+{
+#if DEBUGGING
+  if (x1 + t->col_ofs < 0 || x1 + t->col_ofs >= tab_nc (t)
+      || x2 + t->col_ofs < 0 || x2 + t->col_ofs >= tab_nc (t)
+      || y1 + t->row_ofs < 0 || y1 + t->row_ofs >= tab_nr (t)
+      || y2 + t->row_ofs < 0 || y2 + t->row_ofs >= tab_nr (t))
+    {
+      printf (_("bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) "
+               "in table size (%d,%d)\n"),
+             x1, t->col_ofs, x1 + t->col_ofs,
+             y1, t->row_ofs, y1 + t->row_ofs,
+             x2, t->col_ofs, x2 + t->col_ofs,
+             y2, t->row_ofs, y2 + t->row_ofs,
+             tab_nc (t), tab_nr (t));
+      NOT_REACHED ();
+    }
+#endif
+
+  x1 += t->col_ofs;
+  x2 += t->col_ofs;
+  y1 += t->row_ofs;
+  y2 += t->row_ofs;
+
+  assert (x2 >= x1);
+  assert (y2 >= y1);
+  assert (x1 >= 0);
+  assert (y1 >= 0);
+  assert (x2 < tab_nc (t));
+  assert (y2 < tab_nr (t));
+
+  if (f_h != -1)
+    {
+      int x;
+      for (x = x1; x <= x2; x++)
+        {
+          t->rh[x + t->cf * y1] = f_h;
+          t->rh[x + t->cf * (y2 + 1)] = f_h;
+        }
+    }
+  if (f_v != -1)
+    {
+      int y;
+      for (y = y1; y <= y2; y++)
+        {
+          t->rv[x1 + (t->cf + 1) * y] = f_v;
+          t->rv[(x2 + 1) + (t->cf + 1) * y] = f_v;
+        }
+    }
+
+  if (i_h != -1)
+    {
+      int y;
+
+      for (y = y1 + 1; y <= y2; y++)
+       {
+         int x;
+
+          for (x = x1; x <= x2; x++)
+            t->rh[x + t->cf * y] = i_h;
+       }
+    }
+  if (i_v != -1)
+    {
+      int x;
+
+      for (x = x1 + 1; x <= x2; x++)
+       {
+         int y;
+
+          for (y = y1; y <= y2; y++)
+            t->rv[x + (t->cf + 1) * y] = i_v;
+       }
+    }
+}
+\f
+/* Cells. */
+
+/* Sets cell (C,R) in TABLE, with options OPT, to have a value taken
+   from V, displayed with format spec F. */
+void
+tab_value (struct tab_table *table, int c, int r, unsigned char opt,
+          const union value *v, const struct dictionary *dict, 
+          const struct fmt_spec *f)
+{
+  char *contents;
+
+#if DEBUGGING
+  if (c + table->col_ofs < 0 || r + table->row_ofs < 0
+      || c + table->col_ofs >= tab_nc (table)
+      || r + table->row_ofs >= tab_nr (table))
+    {
+      printf ("tab_value(): bad cell (%d+%d=%d,%d+%d=%d) in table size "
+             "(%d,%d)\n",
+             c, table->col_ofs, c + table->col_ofs,
+             r, table->row_ofs, r + table->row_ofs,
+             tab_nc (table), tab_nr (table));
+      return;
+    }
+#endif
+
+  contents = data_out_pool (v, dict_get_encoding (dict), f, table->container);
+
+  table->cc[c + r * table->cf] = contents;
+  table->ct[c + r * table->cf] = opt;
+}
+
+/* Sets cell (C,R) in TABLE, with options OPT, to have value VAL
+   with NDEC decimal places. */
+void
+tab_fixed (struct tab_table *table, int c, int r, unsigned char opt,
+          double val, int w, int d)
+{
+  struct fmt_spec f;
+  union value double_value;
+  char *s;
+
+  assert (c >= 0);
+  assert (c < tab_nc (table));
+  assert (r >= 0);
+  assert (r < tab_nr (table));
+
+  f = fmt_for_output (FMT_F, w, d);
+
+#if DEBUGGING
+  if (c + table->col_ofs < 0 || r + table->row_ofs < 0
+      || c + table->col_ofs >= tab_nc (table)
+      || r + table->row_ofs >= tab_nr (table))
+    {
+      printf ("tab_fixed(): bad cell (%d+%d=%d,%d+%d=%d) in table size "
+             "(%d,%d)\n",
+             c, table->col_ofs, c + table->col_ofs,
+             r, table->row_ofs, r + table->row_ofs,
+             tab_nc (table), tab_nr (table));
+      return;
+    }
+#endif
+
+  double_value.f = val;
+  s = data_out_pool (&double_value, LEGACY_NATIVE, &f, table->container);
+
+  table->cc[c + r * table->cf] = s + strspn (s, " ");
+  table->ct[c + r * table->cf] = opt;
+}
+
+/* Sets cell (C,R) in TABLE, with options OPT, to have value VAL as
+   formatted by FMT.
+   If FMT is null, then the default print format will be used.
+*/
+void
+tab_double (struct tab_table *table, int c, int r, unsigned char opt,
+          double val, const struct fmt_spec *fmt)
+{
+  union value double_value ;
+  char *s;
+
+  assert (c >= 0);
+  assert (c < tab_nc (table));
+  assert (r >= 0);
+  assert (r < tab_nr (table));
+
+  if ( fmt == NULL)
+    fmt = settings_get_format ();
+
+  fmt_check_output (fmt);
+
+#if DEBUGGING
+  if (c + table->col_ofs < 0 || r + table->row_ofs < 0
+      || c + table->col_ofs >= tab_nc (table)
+      || r + table->row_ofs >= tab_nr (table))
+    {
+      printf ("tab_double(): bad cell (%d+%d=%d,%d+%d=%d) in table size "
+             "(%d,%d)\n",
+             c, table->col_ofs, c + table->col_ofs,
+             r, table->row_ofs, r + table->row_ofs,
+             tab_nc (table), tab_nr (table));
+      return;
+    }
+#endif
+
+  double_value.f = val;
+  s = data_out_pool (&double_value, LEGACY_NATIVE, fmt, table->container);
+  table->cc[c + r * table->cf] = s + strspn (s, " ");
+  table->ct[c + r * table->cf] = opt;
+}
+
+
+static void
+do_tab_text (struct tab_table *table, int c, int r, unsigned opt, char *text)
+{
+  assert (c >= 0 );
+  assert (r >= 0 );
+  assert (c < tab_nc (table));
+  assert (r < tab_nr (table));
+
+#if DEBUGGING
+  if (c + table->col_ofs < 0 || r + table->row_ofs < 0
+      || c + table->col_ofs >= tab_nc (table)
+      || r + table->row_ofs >= tab_nr (table))
+    {
+      printf ("tab_text(): bad cell (%d+%d=%d,%d+%d=%d) in table size "
+             "(%d,%d)\n",
+             c, table->col_ofs, c + table->col_ofs,
+             r, table->row_ofs, r + table->row_ofs,
+             tab_nc (table), tab_nr (table));
+      return;
+    }
+#endif
+
+  table->cc[c + r * table->cf] = text;
+  table->ct[c + r * table->cf] = opt;
+}
+
+/* Sets cell (C,R) in TABLE, with options OPT, to have text value
+   TEXT. */
+void
+tab_text (struct tab_table *table, int c, int r, unsigned opt,
+          const char *text)
+{
+  do_tab_text (table, c, r, opt, pool_strdup (table->container, text));
+}
+
+/* Sets cell (C,R) in TABLE, with options OPT, to have text value
+   FORMAT, which is formatted as if passed to printf. */
+void
+tab_text_format (struct tab_table *table, int c, int r, unsigned opt,
+                 const char *format, ...)
+{
+  va_list args;
+
+  va_start (args, format);
+  do_tab_text (table, c, r, opt,
+               pool_vasprintf (table->container, format, args));
+  va_end (args);
+}
+
+static void
+do_tab_joint_text (struct tab_table *table, int x1, int y1, int x2, int y2,
+                   unsigned opt, char *text)
+{
+  struct tab_joined_cell *j;
+
+  assert (x1 + table->col_ofs >= 0);
+  assert (y1 + table->row_ofs >= 0);
+  assert (y2 >= y1);
+  assert (x2 >= x1);
+  assert (y2 + table->row_ofs < tab_nr (table));
+  assert (x2 + table->col_ofs < tab_nc (table));
+
+#if DEBUGGING
+  if (x1 + table->col_ofs < 0 || x1 + table->col_ofs >= tab_nc (table)
+      || y1 + table->row_ofs < 0 || y1 + table->row_ofs >= tab_nr (table)
+      || x2 < x1 || x2 + table->col_ofs >= tab_nc (table)
+      || y2 < y2 || y2 + table->row_ofs >= tab_nr (table))
+    {
+      printf ("tab_joint_text(): bad cell "
+             "(%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n",
+             x1, table->col_ofs, x1 + table->col_ofs,
+             y1, table->row_ofs, y1 + table->row_ofs,
+             x2, table->col_ofs, x2 + table->col_ofs,
+             y2, table->row_ofs, y2 + table->row_ofs,
+             tab_nc (table), tab_nr (table));
+      return;
+    }
+#endif
+
+  tab_box (table, -1, -1, TAL_0, TAL_0, x1, y1, x2, y2);
+
+  j = pool_alloc (table->container, sizeof *j);
+  j->d[TABLE_HORZ][0] = x1 + table->col_ofs;
+  j->d[TABLE_VERT][0] = y1 + table->row_ofs;
+  j->d[TABLE_HORZ][1] = ++x2 + table->col_ofs;
+  j->d[TABLE_VERT][1] = ++y2 + table->row_ofs;
+  j->contents = text;
+
+  opt |= TAB_JOIN;
+
+  {
+    void **cc = &table->cc[x1 + y1 * table->cf];
+    unsigned char *ct = &table->ct[x1 + y1 * table->cf];
+    const int ofs = table->cf - (x2 - x1);
+
+    int y;
+
+    for (y = y1; y < y2; y++)
+      {
+       int x;
+
+       for (x = x1; x < x2; x++)
+         {
+           *cc++ = j;
+           *ct++ = opt;
+         }
+
+       cc += ofs;
+       ct += ofs;
+      }
+  }
+}
+
+/* Joins cells (X1,X2)-(Y1,Y2) inclusive in TABLE, and sets them with
+   options OPT to have text value TEXT. */
+void
+tab_joint_text (struct tab_table *table, int x1, int y1, int x2, int y2,
+                unsigned opt, const char *text)
+{
+  do_tab_joint_text (table, x1, y1, x2, y2, opt,
+                     pool_strdup (table->container, text));
+}
+
+/* Joins cells (X1,X2)-(Y1,Y2) inclusive in TABLE, and sets them
+   with options OPT to have text value FORMAT, which is formatted
+   as if passed to printf. */
+void
+tab_joint_text_format (struct tab_table *table, int x1, int y1, int x2, int y2,
+                       unsigned opt, const char *format, ...)
+{
+  va_list args;
+
+  va_start (args, format);
+  do_tab_joint_text (table, x1, y1, x2, y2, opt,
+                     pool_vasprintf (table->container, format, args));
+  va_end (args);
+}
+
+bool
+tab_cell_is_empty (const struct tab_table *table, int c, int r)
+{
+  return table->cc[c + r * table->cf] == NULL;
+}
+\f
+/* Miscellaneous. */
+
+/* Set the title of table T to TITLE, which is formatted as if
+   passed to printf(). */
+void
+tab_title (struct tab_table *t, const char *title, ...)
+{
+  va_list args;
+
+  free (t->title);
+  va_start (args, title);
+  t->title = xvasprintf (title, args);
+  va_end (args);
+}
+
+/* Easy, type-safe way to submit a tab table to som. */
+void
+tab_submit (struct tab_table *t)
+{
+  table_item_submit (table_item_create (&t->table, t->title));
+}
+\f
+/* Editing. */
+
+/* Set table row and column offsets for all functions that affect
+   cells or rules. */
+void
+tab_offset (struct tab_table *t, int col, int row)
+{
+  int diff = 0;
+
+#if DEBUGGING
+  if (row < -1 || row > tab_nr (t))
+    {
+      printf ("tab_offset(): row=%d in %d-row table\n", row, tab_nr (t));
+      NOT_REACHED ();
+    }
+  if (col < -1 || col > tab_nc (t))
+    {
+      printf ("tab_offset(): col=%d in %d-column table\n", col, tab_nc (t));
+      NOT_REACHED ();
+    }
+#endif
+
+  if (row != -1)
+    diff += (row - t->row_ofs) * t->cf, t->row_ofs = row;
+  if (col != -1)
+    diff += (col - t->col_ofs), t->col_ofs = col;
+
+  t->cc += diff;
+  t->ct += diff;
+}
+
+/* Increment the row offset by one. If the table is too small,
+   increase its size. */
+void
+tab_next_row (struct tab_table *t)
+{
+  t->cc += t->cf;
+  t->ct += t->cf;
+  if (++t->row_ofs >= tab_nr (t))
+    tab_realloc (t, -1, tab_nr (t) * 4 / 3);
+}
+\f
+/* Writes STRING to the output.  OPTIONS may be any valid combination of TAB_*
+   bits.
+
+   This function is obsolete.  Please do not add new uses of it.  Instead, use
+   a text_item (see output/text-item.h). */
+void
+tab_output_text (int options, const char *string)
+{
+  enum text_item_type type = (options & TAB_EMPH ? TEXT_ITEM_SUBHEAD
+                              : options & TAB_FIX ? TEXT_ITEM_MONOSPACE
+                              : TEXT_ITEM_PARAGRAPH);
+  text_item_submit (text_item_create (type, string));
+}
+
+/* Same as tab_output_text(), but FORMAT is passed through printf-like
+   formatting before output. */
+void
+tab_output_text_format (int options, const char *format, ...)
+{
+  va_list args;
+  char *text;
+
+  va_start (args, format);
+  text = xvasprintf (format, args);
+  va_end (args);
+
+  tab_output_text (options, text);
+
+  free (text);
+}
+\f
+/* Table class implementation. */
+
+static void
+tab_destroy (struct table *table)
+{
+  struct tab_table *t = tab_cast (table);
+  pool_destroy (t->container);
+}
+
+static void
+tab_get_cell (const struct table *table, int x, int y, struct table_cell *cell)
+{
+  const struct tab_table *t = tab_cast (table);
+  int index = x + y * t->cf;
+  unsigned char opt = t->ct[index];
+  const void *content = t->cc[index];
+
+  cell->options = opt;
+  if (opt & TAB_JOIN)
+    {
+      const struct tab_joined_cell *jc = content;
+      cell->d[TABLE_HORZ][0] = jc->d[TABLE_HORZ][0];
+      cell->d[TABLE_HORZ][1] = jc->d[TABLE_HORZ][1];
+      cell->d[TABLE_VERT][0] = jc->d[TABLE_VERT][0];
+      cell->d[TABLE_VERT][1] = jc->d[TABLE_VERT][1];
+      cell->contents = jc->contents;
+    }
+  else
+    {
+      cell->d[TABLE_HORZ][0] = x;
+      cell->d[TABLE_HORZ][1] = x + 1;
+      cell->d[TABLE_VERT][0] = y;
+      cell->d[TABLE_VERT][1] = y + 1;
+      cell->contents = content != NULL ? content : "";
+    }
+  cell->destructor = NULL;
+}
+
+static int
+tab_get_rule (const struct table *table, enum table_axis axis, int x, int y)
+{
+  const struct tab_table *t = tab_cast (table);
+  return (axis == TABLE_VERT
+          ? t->rh[x + t->cf * y]
+          : t->rv[x + (t->cf + 1) * y]);
+}
+
+static const struct table_class tab_table_class =
+  {
+    tab_destroy,
+    tab_get_cell,
+    tab_get_rule,
+    NULL,                       /* paste */
+    NULL,                       /* select */
+  };
+
+struct tab_table *
+tab_cast (const struct table *table)
+{
+  assert (table->class == &tab_table_class);
+  return UP_CAST (table, struct tab_table, table);
+}
diff --git a/src/output/tab.h b/src/output/tab.h
new file mode 100644 (file)
index 0000000..db38b6b
--- /dev/null
@@ -0,0 +1,150 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 1997, 1998, 1999, 2000, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_TAB_H
+#define OUTPUT_TAB_H
+
+/* Simple table class.
+
+   This is a type of table (see output/table.h) whose content is composed
+   manually by the code that generates it, by filling in cells one by one.
+
+   Some of the features of this type of table are obsolete but have not yet
+   been removed, because some code still uses them.  These features are:
+
+       - The title.  The title (or caption, actually) is a property of the
+         table_item (see output/table-item.h) in which a table is embedded,
+         not a property of the table itself.
+
+       - Row and columns offsets (via tab_offset(), tab_next_row()).  This
+         feature simply isn't used enough to justify keeping it.
+
+       - Table resizing.  The code that does use this feature is just as well
+         served by creating multiple tables and pasting them together with
+         table_paste().  Eliminating this feature would also slightly simplify
+         the table code here.
+*/
+
+#include <libpspp/compiler.h>
+#include <output/table.h>
+
+/* A table. */
+struct tab_table
+  {
+    struct table table;
+    struct pool *container;
+
+    /* Table title, or a null pointer if no title has been set.
+
+       The table title is properly part of struct table_item, not struc*/
+    char *title;
+    int cf;                    /* Column factor for indexing purposes. */
+
+    /* Table contents.
+
+       Each array element in cc[] is ordinarily a "char *" pointer to a
+       string.  If TAB_JOIN (defined in tab.c) is set in ct[] for the element,
+       however, it is a joined cell and the corresponding element of cc[]
+       points to a struct tab_joined_cell. */
+    void **cc;                  /* Cell contents; void *[nr][nc]. */
+    unsigned char *ct;         /* Cell types; unsigned char[nr][nc]. */
+
+    /* Rules. */
+    unsigned char *rh;         /* Horiz rules; unsigned char[nr+1][nc]. */
+    unsigned char *rv;         /* Vert rules; unsigned char[nr][nc+1]. */
+
+    /* X and Y offsets. */
+    int col_ofs, row_ofs;
+  };
+
+struct tab_table *tab_cast (const struct table *);
+
+/* Number of rows or columns in TABLE. */
+static inline int tab_nr (const struct tab_table *table)
+        { return table_nr (&table->table); }
+static inline int tab_nc (const struct tab_table *table)
+        { return table_nc (&table->table); }
+
+/* Number of left/right/top/bottom header columns/rows in TABLE. */
+static inline int tab_l (const struct tab_table *table)
+        { return table_hl (&table->table); }
+static inline int tab_r (const struct tab_table *table)
+        { return table_hr (&table->table); }
+static inline int tab_t (const struct tab_table *table)
+        { return table_ht (&table->table); }
+static inline int tab_b (const struct tab_table *table)
+        { return table_hb (&table->table); }
+
+/* Tables. */
+struct tab_table *tab_create (int nc, int nr);
+void tab_resize (struct tab_table *, int nc, int nr);
+void tab_realloc (struct tab_table *, int nc, int nr);
+void tab_headers (struct tab_table *, int l, int r, int t, int b);
+void tab_title (struct tab_table *, const char *, ...)
+     PRINTF_FORMAT (2, 3);
+void tab_submit (struct tab_table *);
+
+/* Rules. */
+void tab_hline (struct tab_table *, int style, int x1, int x2, int y);
+void tab_vline (struct tab_table *, int style, int x, int y1, int y2);
+void tab_box (struct tab_table *, int f_h, int f_v, int i_h, int i_v,
+             int x1, int y1, int x2, int y2);
+
+/* Obsolete cell options. */
+#define TAT_TITLE TAB_EMPH      /* Title attributes. */
+
+/* Cells. */
+struct fmt_spec;
+struct dictionary;
+union value;
+void tab_value (struct tab_table *, int c, int r, unsigned char opt,
+               const union value *, const struct dictionary *dict,
+               const struct fmt_spec *);
+
+void tab_fixed (struct tab_table *, int c, int r, unsigned char opt,
+               double v, int w, int d);
+
+void tab_double (struct tab_table *, int c, int r, unsigned char opt,
+               double v, const struct fmt_spec *);
+
+void tab_text (struct tab_table *, int c, int r, unsigned opt, const char *);
+void tab_text_format (struct tab_table *, int c, int r, unsigned opt,
+                      const char *, ...)
+     PRINTF_FORMAT (5, 6);
+
+void tab_joint_text (struct tab_table *, int x1, int y1, int x2, int y2,
+                    unsigned opt, const char *);
+void tab_joint_text_format (struct tab_table *, int x1, int y1, int x2, int y2,
+                            unsigned opt, const char *, ...)
+     PRINTF_FORMAT (7, 8);
+
+bool tab_cell_is_empty (const struct tab_table *, int c, int r);
+
+/* Editing. */
+void tab_offset (struct tab_table *, int col, int row);
+void tab_next_row (struct tab_table *);
+
+/* Current row/column offset. */
+#define tab_row(TABLE) ((TABLE)->row_ofs)
+#define tab_col(TABLE) ((TABLE)->col_ofs)
+
+/* Simple output. */
+void tab_output_text (int options, const char *string);
+void tab_output_text_format (int options, const char *, ...)
+     PRINTF_FORMAT (2, 3);
+
+#endif /* output/tab.h */
+
diff --git a/src/output/table-casereader.c b/src/output/table-casereader.c
new file mode 100644 (file)
index 0000000..4a1452c
--- /dev/null
@@ -0,0 +1,155 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/table-provider.h>
+
+#include <data/casereader.h>
+#include <data/data-out.h>
+#include <data/format.h>
+#include <libpspp/i18n.h>
+
+#include "gl/xalloc.h"
+
+struct table_casereader
+  {
+    struct table table;
+    struct casereader *reader;
+    char *heading;
+    struct fmt_spec format;
+  };
+
+static const struct table_class table_casereader_class;
+
+static struct table_casereader *
+table_casereader_cast (const struct table *table)
+{
+  assert (table->class == &table_casereader_class);
+  return UP_CAST (table, struct table_casereader, table);
+}
+
+/* Returns a new table that has one column and the same number of rows as
+   READER.  Each row in the table is derived from column COLUMN in the same row
+   of READER by formatting with data_out() using the specified FORMAT (which
+   must be a valid format for the column's width).
+
+   If HEADING is nonnull, adds an additional row above the first row of data
+   that contains HEADING, and sets that row as a header row.
+
+   The returned table has no rules, except that if HEADING is nonnull, a single
+   line (TAL_1) separates HEADING from the first row if data. */
+struct table *
+table_from_casereader (const struct casereader *reader, size_t column,
+                       const char *heading, const struct fmt_spec *format)
+{
+  struct table_casereader *tc;
+  struct table *t;
+
+  assert (fmt_check_width_compat (format,
+                                  caseproto_get_width (
+                                    casereader_get_proto (reader), column)));
+
+  tc = xmalloc (sizeof *tc);
+  t = &tc->table;
+  table_init (t, &table_casereader_class);
+  table_set_nc (t, 1);
+  table_set_nr (t, casereader_count_cases (reader));
+  tc->reader = casereader_project_1 (casereader_clone (reader), column);
+  tc->heading = NULL;
+  tc->format = *format;
+
+  if (heading != NULL)
+    {
+      tc->heading = xstrdup (heading);
+      table_set_nr (t, table_nr (t) + 1);
+      table_set_ht (t, 1);
+    }
+
+  return t;
+}
+
+static void
+table_casereader_destroy (struct table *t)
+{
+  struct table_casereader *tc = table_casereader_cast (t);
+  casereader_destroy (tc->reader);
+  free (tc->heading);
+  free (t);
+}
+
+static void
+free_string (void *s_)
+{
+  char *s = s_;
+  free (s);
+}
+
+static void
+table_casereader_get_cell (const struct table *t, int x, int y,
+                           struct table_cell *cell)
+{
+  struct table_casereader *tc = table_casereader_cast (t);
+  struct ccase *c;
+  char *s;
+
+  cell->d[TABLE_HORZ][0] = x;
+  cell->d[TABLE_HORZ][1] = x + 1;
+  cell->d[TABLE_VERT][0] = y;
+  cell->d[TABLE_VERT][1] = y + 1;
+  cell->options = TAB_RIGHT;
+  if (tc->heading != NULL)
+    {
+      if (y == 0)
+        {
+          s = xstrdup (tc->heading);
+          cell->contents = s;
+          cell->destructor = free_string;
+          cell->destructor_aux = s;
+          return;
+        }
+      y--;
+    }
+
+  c = casereader_peek (tc->reader, y);
+  if (c == NULL)
+    s = xstrdup ("I/O Error");
+  else
+    {
+      s = data_out (case_data_idx (c, 0), UTF8, &tc->format);
+      case_unref (c);
+    }
+  cell->contents = s;
+  cell->destructor = free_string;
+  cell->destructor_aux = s;
+}
+
+static int
+table_casereader_get_rule (const struct table *t, enum table_axis axis,
+                           int x UNUSED, int y)
+{
+  struct table_casereader *tc = table_casereader_cast (t);
+  return axis == TABLE_VERT && tc->heading != NULL && y == 1 ? TAL_1 : TAL_0;
+}
+
+static const struct table_class table_casereader_class =
+  {
+    table_casereader_destroy,
+    table_casereader_get_cell,
+    table_casereader_get_rule,
+    NULL,                       /* paste */
+    NULL,                       /* select (XXX) */
+  };
diff --git a/src/output/table-item.c b/src/output/table-item.c
new file mode 100644 (file)
index 0000000..b709273
--- /dev/null
@@ -0,0 +1,92 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/table-provider.h>
+
+#include <assert.h>
+
+#include <libpspp/assertion.h>
+#include <libpspp/cast.h>
+#include <output/driver.h>
+#include <output/output-item-provider.h>
+#include <output/table-item.h>
+
+#include "gl/xalloc.h"
+
+/* Initializes ITEM as a table item for rendering TABLE.  The new table item
+   initially has the specified CAPTION, which may be NULL if no caption is yet
+   available.  The caller retains ownership of CAPTION. */
+struct table_item *
+table_item_create (struct table *table, const char *caption)
+{
+  struct table_item *item = xmalloc (sizeof *item);
+  output_item_init (&item->output_item, &table_item_class);
+  item->table = table;
+  item->caption = caption != NULL ? xstrdup (caption) : NULL;
+  return item;
+}
+
+/* Returns the table contained by TABLE_ITEM.  The caller must not modify or
+   unref the returned table. */
+const struct table *
+table_item_get_table (const struct table_item *table_item)
+{
+  return table_item->table;
+}
+
+/* Returns ITEM's caption, which is a null pointer if no caption has been
+   set. */
+const char *
+table_item_get_caption (const struct table_item *item)
+{
+  return item->caption;
+}
+
+/* Sets ITEM's caption to CAPTION, replacing any previous caption.  Specify
+   NULL for CAPTION to clear any caption from ITEM.  The caller retains
+   ownership of CAPTION.
+
+   This function may only be used on a table_item that is unshared. */
+void
+table_item_set_caption (struct table_item *item, const char *caption)
+{
+  assert (!table_item_is_shared (item));
+  free (item->caption);
+  item->caption = caption != NULL ? xstrdup (caption) : NULL;
+}
+
+/* Submits TABLE_ITEM to the configured output drivers, and transfers ownership
+   to the output subsystem. */
+void
+table_item_submit (struct table_item *table_item)
+{
+  output_submit (&table_item->output_item);
+}
+\f
+static void
+table_item_destroy (struct output_item *output_item)
+{
+  struct table_item *item = to_table_item (output_item);
+  free (item->caption);
+  table_unref (item->table);
+}
+
+const struct output_item_class table_item_class =
+  {
+    table_item_destroy,
+  };
diff --git a/src/output/table-item.h b/src/output/table-item.h
new file mode 100644 (file)
index 0000000..01e9899
--- /dev/null
@@ -0,0 +1,103 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_TABLE_ITEM_H
+#define OUTPUT_TABLE_ITEM_H 1
+
+/* Table items.
+
+   A table item is a subclass of an output item (see output-item.h) that
+   contains a table (see table.h) and some formatting properties (currently
+   just a caption). */
+
+#include <libpspp/compiler.h>
+#include <output/output-item.h>
+
+/* A table item.
+
+   The members of struct table_item should not be accessed directly.  Use one
+   of the accessor functions defined below. */
+struct table_item
+  {
+    struct output_item output_item; /* Superclass. */
+    struct table *table;        /* The table to be rendered. */
+    char *caption;              /* May be null if there is no caption. */
+  };
+
+struct table_item *table_item_create (struct table *, const char *caption);
+
+const struct table *table_item_get_table (const struct table_item *);
+
+const char *table_item_get_caption (const struct table_item *);
+void table_item_set_caption (struct table_item *, const char *);
+\f
+/* This boilerplate for table_item, a subclass of output_item, was
+   autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct output_item_class table_item_class;
+
+/* Returns true if SUPER is a table_item, otherwise false. */
+static inline bool
+is_table_item (const struct output_item *super)
+{
+  return super->class == &table_item_class;
+}
+
+/* Returns SUPER converted to table_item.  SUPER must be a table_item, as
+   reported by is_table_item. */
+static inline struct table_item *
+to_table_item (const struct output_item *super)
+{
+  assert (is_table_item (super));
+  return UP_CAST (super, struct table_item, output_item);
+}
+
+/* Returns INSTANCE converted to output_item. */
+static inline struct output_item *
+table_item_super (const struct table_item *instance)
+{
+  return CONST_CAST (struct output_item *, &instance->output_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct table_item *
+table_item_ref (const struct table_item *instance)
+{
+  return to_table_item (output_item_ref (&instance->output_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+table_item_unref (struct table_item *instance)
+{
+  output_item_unref (&instance->output_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+table_item_is_shared (const struct table_item *instance)
+{
+  return output_item_is_shared (&instance->output_item);
+}
+
+void table_item_submit (struct table_item *);
+\f
+#endif /* output/table-item.h */
diff --git a/src/output/table-paste.c b/src/output/table-paste.c
new file mode 100644 (file)
index 0000000..102b514
--- /dev/null
@@ -0,0 +1,317 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <libpspp/assertion.h>
+#include <libpspp/tower.h>
+#include <output/table-provider.h>
+
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
+
+struct paste_subtable
+  {
+    struct tower_node node;
+    struct table *table;
+  };
+
+static struct paste_subtable *
+paste_subtable_cast (struct tower_node *node)
+{
+  return tower_data (node, struct paste_subtable, node);
+}
+
+struct table_paste
+  {
+    struct table table;
+    struct tower subtables;
+    enum table_axis orientation;
+  };
+
+static const struct table_class table_paste_class;
+
+static struct table_paste *
+table_paste_cast (const struct table *table)
+{
+  assert (table->class == &table_paste_class);
+  return UP_CAST (table, struct table_paste, table);
+}
+
+static bool
+is_table_paste (const struct table *table, int orientation)
+{
+  return (table->class == &table_paste_class
+          && table_paste_cast (table)->orientation == orientation);
+}
+
+static struct paste_subtable *
+paste_subtable_lookup (struct table_paste *tp, unsigned long int offset,
+                       unsigned long int *start)
+{
+  return paste_subtable_cast (tower_lookup (&tp->subtables, offset, start));
+}
+
+/* This must be called *before* adding TABLE to TP, otherwise the test for
+   whether TP is empty will not have the correct effect. */
+static void
+table_paste_increase_size (struct table_paste *tp,
+                           const struct table *table)
+{
+  int o = tp->orientation;
+  int h0, h1;
+
+  tp->table.n[o] += table->n[o];
+  tp->table.n[!o] = MAX (tp->table.n[!o], table->n[!o]);
+
+  h0 = table->h[!o][0];
+  h1 = table->h[!o][1];
+  if (tower_is_empty (&tp->subtables))
+    {
+      tp->table.h[!o][0] = h0;
+      tp->table.h[!o][1] = h1;
+    }
+  else
+    {
+      tp->table.h[!o][0] = MIN (tp->table.h[!o][0], h0);
+
+      /* XXX this is not quite right */
+      tp->table.h[!o][1] = MIN (tp->table.h[!o][1], h1);
+    }
+}
+
+static void
+reassess_headers (struct table_paste *tp)
+{
+  int o = tp->orientation;
+  if (tower_is_empty (&tp->subtables))
+    tp->table.h[o][0] = tp->table.h[o][1] = 0;
+  else
+    {
+      struct paste_subtable *h0, *h1;
+
+      h0 = paste_subtable_cast (tower_first (&tp->subtables));
+      tp->table.h[o][0] = h0->table->h[o][0];
+
+      h1 = paste_subtable_cast (tower_last (&tp->subtables));
+      tp->table.h[o][1] = h1->table->h[o][1];
+    }
+}
+
+static void
+table_paste_insert_subtable (struct table_paste *tp,
+                             struct table *table,
+                             struct tower_node *under)
+{
+  struct paste_subtable *subtable;
+
+  subtable = xmalloc (sizeof *subtable);
+  table_paste_increase_size (tp, table);
+  tower_insert (&tp->subtables, table->n[tp->orientation],
+                &subtable->node, under);
+  subtable->table = table;
+  reassess_headers (tp);
+}
+
+/* Takes ownership of A and B and returns a table that consists of tables A and
+   B "pasted together", that is, a table whose size is the sum of the sizes of
+   A and B along the axis specified by ORIENTATION.  A and B should have the
+   same size along the axis opposite ORIENTATION; the handling of tables that
+   have different sizes along that axis may vary.
+
+   The rules at the seam between A and B are combined.  The exact way in which
+   they are combined is unspecified, but the method of table_rule_combine() is
+   typical.
+
+   If A or B is null, returns the other argument. */
+struct table *
+table_paste (struct table *a, struct table *b, enum table_axis orientation)
+{
+  struct table_paste *tp;
+
+  /* Handle nulls. */
+  if (a == NULL)
+    return b;
+  if (b == NULL)
+    return a;
+
+  /* Handle tables that know how to paste themselves. */
+  if (!table_is_shared (a) && !table_is_shared (b) && a != b)
+    {
+      if (a->class->paste != NULL)
+        {
+          struct table *new = a->class->paste (a, b, orientation);
+          if (new != NULL)
+            return new;
+        }
+      if (b->class->paste != NULL && a->class != b->class)
+        {
+          struct table *new = b->class->paste (a, b, orientation);
+          if (new != NULL)
+            return new;
+        }
+    }
+
+  /* Create new table_paste and insert A and B into it. */
+  tp = xmalloc (sizeof *tp);
+  table_init (&tp->table, &table_paste_class);
+  tower_init (&tp->subtables);
+  tp->orientation = orientation;
+  table_paste_insert_subtable (tp, a, NULL);
+  table_paste_insert_subtable (tp, b, NULL);
+  return &tp->table;
+}
+
+/* Shorthand for table_paste (left, right, TABLE_HORZ). */
+struct table *
+table_hpaste (struct table *left, struct table *right)
+{
+  return table_paste (left, right, TABLE_HORZ);
+}
+
+/* Shorthand for table_paste (left, right, TABLE_VERT). */
+struct table *
+table_vpaste (struct table *left, struct table *right)
+{
+  return table_paste (left, right, TABLE_VERT);
+}
+
+static void
+table_paste_destroy (struct table *t)
+{
+  struct table_paste *tp = table_paste_cast (t);
+  struct tower_node *node, *next;
+
+  for (node = tower_first (&tp->subtables); node != NULL; node = next)
+    {
+      struct paste_subtable *ps = paste_subtable_cast (node);
+      table_unref (ps->table);
+      next = tower_delete (&tp->subtables, node);
+      free (node);
+    }
+  free (tp);
+}
+
+static void
+table_paste_get_cell (const struct table *t, int x, int y,
+                      struct table_cell *cell)
+{
+  struct table_paste *tp = table_paste_cast (t);
+  struct paste_subtable *ps;
+  unsigned long int start;
+  int d[TABLE_N_AXES];
+
+  d[TABLE_HORZ] = x;
+  d[TABLE_VERT] = y;
+  ps = paste_subtable_lookup (tp, d[tp->orientation], &start);
+  d[tp->orientation] -= start;
+  table_get_cell (ps->table, d[TABLE_HORZ], d[TABLE_VERT], cell);
+  cell->d[tp->orientation][0] += start;
+  cell->d[tp->orientation][1] += start;
+}
+
+static int
+table_paste_get_rule (const struct table *t,
+                      enum table_axis axis, int x, int y)
+{
+  struct table_paste *tp = table_paste_cast (t);
+  int h = tp->orientation == TABLE_HORZ ? x : y;
+  int k = tp->orientation == TABLE_HORZ ? y : x;
+  struct paste_subtable *ps;
+  unsigned long int start;
+
+  if (tp->orientation == axis)
+    {
+      int r;
+
+      ps = paste_subtable_lookup (tp, h == 0 ? 0 : h - 1, &start);
+      if (tp->orientation == TABLE_HORZ) /* XXX */
+        r = table_get_rule (ps->table, axis, h - start, k);
+      else
+        r = table_get_rule (ps->table, axis, k, h - start);
+      if (h == start + tower_node_get_size (&ps->node))
+        {
+          struct tower_node *ps2_ = tower_next (&tp->subtables, &ps->node);
+          if (ps2_ != NULL)
+            {
+              struct paste_subtable *ps2 = paste_subtable_cast (ps2_);
+              int r2;
+
+              if (tp->orientation == TABLE_HORZ) /* XXX */
+                r2 = table_get_rule (ps2->table, axis, 0, k);
+              else
+                r2 = table_get_rule (ps2->table, axis, k, 0);
+              return table_rule_combine (r, r2);
+            }
+        }
+      return r;
+    }
+  else
+    {
+      ps = paste_subtable_lookup (tp, h, &start);
+      if (tp->orientation == TABLE_HORZ) /* XXX */
+        return table_get_rule (ps->table, axis, h - start, k);
+      else
+        return table_get_rule (ps->table, axis, k, h - start);
+    }
+}
+
+static struct table *
+table_paste_paste (struct table *a, struct table *b,
+                   enum table_axis orientation)
+{
+  struct table_paste *ta, *tb;
+
+  ta = is_table_paste (a, orientation) ? table_paste_cast (a) : NULL;
+  tb = is_table_paste (b, orientation) ? table_paste_cast (b) : NULL;
+
+  if (ta != NULL)
+    {
+      if (tb != NULL)
+        {
+          /* Append all of B's subtables onto A, then destroy B. */
+          table_paste_increase_size (ta, b);
+          tower_splice (&ta->subtables, NULL,
+                        &tb->subtables, tower_first (&tb->subtables), NULL);
+          table_unref (b);
+        }
+      else
+        {
+          /* Append B to A's stack of subtables. */
+          table_paste_insert_subtable (ta, b, NULL);
+        }
+      reassess_headers (ta);
+      return a;
+    }
+  else if (tb != NULL)
+    {
+      /* Insert A at the beginning of B's stack of subtables. */
+      table_paste_insert_subtable (tb, a, tower_first (&tb->subtables));
+      reassess_headers (tb);
+      return b;
+    }
+  else
+    return NULL;
+}
+
+static const struct table_class table_paste_class =
+  {
+    table_paste_destroy,
+    table_paste_get_cell,
+    table_paste_get_rule,
+    table_paste_paste,
+    NULL,                       /* select */
+  };
diff --git a/src/output/table-provider.h b/src/output/table-provider.h
new file mode 100644 (file)
index 0000000..6d1a415
--- /dev/null
@@ -0,0 +1,177 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 1997, 1998, 1999, 2000, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_TABLE_PROVIDER
+#define OUTPUT_TABLE_PROVIDER 1
+
+#include <output/table.h>
+
+/* A cell in a table. */
+struct table_cell
+  {
+    /* Occupied table region.
+
+       d[TABLE_HORZ][0] is the leftmost column.
+       d[TABLE_HORZ][1] is the rightmost column, plus 1.
+       d[TABLE_VERT][0] is the top row.
+       d[TABLE_VERT][1] is the bottom row, plus 1.
+
+       For an ordinary cell:
+           d[TABLE_HORZ][1] == d[TABLE_HORZ][0] + 1
+       and d[TABLE_VERT][1] == d[TABLE_VERT][0] + 1
+
+       For a joined cell:
+          d[TABLE_HORZ][1] > d[TABLE_HORZ][0] + 1
+       or d[TABLE_VERT][1] > d[TABLE_VERT][0] + 1
+       or both. */
+    int d[TABLE_N_AXES][2];
+
+    const char *contents;       /* Text string contents. */
+    unsigned int options;       /* TAB_* values. */
+
+    /* Called to free the cell's data, if nonnull. */
+    void (*destructor) (void *destructor_aux);
+    void *destructor_aux;
+  };
+
+void table_cell_free (struct table_cell *);
+
+/* Returns the number of columns that CELL spans.  This is 1 for an ordinary
+   cell and greater than one for a cell that joins multiple columns. */
+static inline int
+table_cell_colspan (const struct table_cell *cell)
+{
+  return cell->d[TABLE_HORZ][1] - cell->d[TABLE_HORZ][0];
+}
+
+/* Returns the number of rows that CELL spans.  This is 1 for an ordinary cell
+   and greater than one for a cell that joins multiple rows. */
+static inline int
+table_cell_rowspan (const struct table_cell *cell)
+{
+  return cell->d[TABLE_VERT][1] - cell->d[TABLE_VERT][0];
+}
+
+/* Returns true if CELL is a joined cell, that is, if it spans multiple rows
+   or columns.  Otherwise, returns false. */
+static inline bool
+table_cell_is_joined (const struct table_cell *cell)
+{
+  return table_cell_colspan (cell) > 1 || table_cell_rowspan (cell) > 1;
+}
+\f
+/* Declarations to allow defining table classes. */
+
+struct table_class
+  {
+    /* Frees TABLE.
+
+       The table class may assume that any cells that were retrieved by calling
+       the 'get_cell' function have been freed (by calling their destructors)
+       before this function is called. */
+    void (*destroy) (struct table *table);
+
+    /* Initializes CELL with the contents of the table cell at column X and row
+       Y within TABLE.  All members of CELL must be initialized, except that if
+       'destructor' is set to a null pointer, then 'destructor_aux' need not be
+       initialized.  The 'contents' member of CELL must be set to a nonnull
+       value.
+
+       The table class must allow any number of cells in the table to be
+       retrieved simultaneously; that is, TABLE must not assume that a given
+       cell will be freed before another one is retrieved using 'get_cell'.
+
+       The table class must allow joined cells to be retrieved, with identical
+       contents, using any (X,Y) location inside the cell.
+
+       The table class must not allow cells to overlap.
+
+       The table class should not allow a joined cell to cross the border
+       between header rows/columns and the interior of the table.  That is, a
+       joined cell should be entirely within headers rows and columns or
+       entirely outside them.
+
+       The table class may assume that CELL will be freed before TABLE is
+       destroyed. */
+    void (*get_cell) (const struct table *table, int x, int y,
+                      struct table_cell *cell);
+
+    /* Returns one of the TAL_* enumeration constants (declared in
+       output/table.h) representing a rule running alongside one of the cells
+       in TABLE.
+
+       See table_get_rule() in table.c for a detailed explanation of the
+       meaning of AXIS and X and Y, including a diagram. */
+    int (*get_rule) (const struct table *table,
+                     enum table_axis axis, int x, int y);
+
+    /* This function is optional and most table classes will not implement it.
+
+       If provided, this function must take ownership of A and B and return a
+       table that consists of tables A and B "pasted together", that is, a
+       table whose size is the sum of the sizes of A and B along the axis
+       specified by ORIENTATION.  A and B will ordinarily have the same size
+       along the axis opposite ORIENTATION; no particular handling of tables
+       that have different sizes along that axis is required.
+
+       The handling of rules at the seam between A and B is not specified, but
+       table_rule_combine() is one reasonable way to do it.
+
+       Called only if neither A and B is shared (as returned by
+       table_is_shared()).
+
+       Called if A or B or both is of the class defined by this table class.
+       That is, the implementation must be prepared to deal with the case where
+       A or B is not the ordinarily expected table class.
+
+       This function may return a null pointer if it cannot implement the paste
+       operation, in which case the caller will use a fallback
+       implementation.
+
+       This function is used to implement table_paste(). */
+    struct table *(*paste) (struct table *a, struct table *b,
+                            enum table_axis orientation);
+
+    /* This function is optional and most table classes will not implement it.
+
+       If provided, this function must take ownership of TABLE and return a new
+       table whose contents are the TABLE's rows RECT[TABLE_VERT][0] through
+       RECT[TABLE_VERT][1], exclusive, and the TABLE's columns
+       RECT[TABLE_HORZ][0] through RECT[TABLE_HORZ][1].
+
+       Called only if TABLE is not shared (as returned by table_is_shared()).p
+
+       This function may return a null pointer if it cannot implement the
+       select operation, in which case the caller will use a fallback
+       implementation.
+
+       This function is used to implement table_select(). */
+    struct table *(*select) (struct table *table, int rect[TABLE_N_AXES][2]);
+  };
+
+void table_init (struct table *, const struct table_class *);
+
+/* Table class implementations can call these functions or just set the
+   table's n[] and h[][] members directly. */
+void table_set_nc (struct table *, int nc);
+void table_set_nr (struct table *, int nr);
+\f
+/* For use primarily by output drivers. */
+
+void table_get_cell (const struct table *, int x, int y, struct table_cell *);
+int table_get_rule (const struct table *, enum table_axis, int x, int y);
+
+#endif /* output/table-provider.h */
diff --git a/src/output/table-select.c b/src/output/table-select.c
new file mode 100644 (file)
index 0000000..1c2956a
--- /dev/null
@@ -0,0 +1,236 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <libpspp/assertion.h>
+#include <libpspp/cast.h>
+#include <output/table-provider.h>
+
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
+
+struct table_select
+  {
+    struct table table;
+    struct table *subtable;
+    int ofs[2];
+  };
+
+static const struct table_class table_select_class;
+
+static struct table_select *
+table_select_cast (const struct table *table)
+{
+  assert (table->class == &table_select_class);
+  return UP_CAST (table, struct table_select, table);
+}
+
+/* Takes ownership of SUBTABLE and returns a new table whose contents are the
+   rectangular subregion of SUBTABLE that contains rows RECT[TABLE_VERT][0]
+   through RECT[TABLE_VERT][1], exclusive, and columns RECT[TABLE_HORZ][0]
+   through RECT[TABLE_HORZ][1]. */
+struct table *
+table_select (struct table *subtable, int rect[TABLE_N_AXES][2])
+{
+  struct table_select *ts;
+  int axis;
+
+  if (rect[TABLE_HORZ][0] == 0
+      && rect[TABLE_HORZ][1] == subtable->n[TABLE_HORZ]
+      && rect[TABLE_VERT][0] == 0
+      && rect[TABLE_VERT][1] == subtable->n[TABLE_VERT])
+    return subtable;
+
+  if (!table_is_shared (subtable) && subtable->class->select != NULL)
+    {
+      struct table *selected = subtable->class->select (subtable, rect);
+      if (selected != NULL)
+        return selected;
+    }
+
+  ts = xmalloc (sizeof *ts);
+  table_init (&ts->table, &table_select_class);
+  ts->subtable = subtable;
+  for (axis = 0; axis < TABLE_N_AXES; axis++)
+    {
+      int h1;
+      ts->ofs[axis] = rect[axis][0];
+      ts->table.n[axis] = rect[axis][1] - rect[axis][0];
+      if (subtable->h[axis][0] > rect[axis][0])
+        ts->table.h[axis][0] = subtable->h[axis][0] - rect[axis][0];
+      h1 = subtable->n[axis] - subtable->h[axis][1];
+      if (h1 < rect[axis][1])
+        ts->table.h[axis][1] = rect[axis][1] - h1;
+    }
+  return &ts->table;
+}
+
+/* Takes ownership of TABLE and returns a new table whose contents are:
+
+        - If AXIS is TABLE_HORZ, columns Z0 through Z1 (exclusive) of SUBTABLE.
+          If ADD_HEADERS is true, the returned table also includes any header
+          columns in SUBTABLE.
+
+        - If AXIS is TABLE_VERT, rows Z0 through Z1 (exclusive) of SUBTABLE.
+          If ADD_HEADERS is true, the returned table also includes any header
+          rows in SUBTABLE. */
+struct table *
+table_select_slice (struct table *subtable, enum table_axis axis,
+                    int z0, int z1, bool add_headers)
+{
+  struct table *table;
+  int rect[TABLE_N_AXES][2];
+
+  if (add_headers)
+    {
+      if (z0 == subtable->h[axis][0] && z1 == subtable->h[axis][1])
+        return subtable;
+
+      if (subtable->h[axis][0])
+        table_ref (subtable);
+      if (subtable->h[axis][1])
+        table_ref (subtable);
+    }
+  else
+    {
+      if (z0 == 0 && z1 == subtable->n[axis])
+        return subtable;
+    }
+
+  rect[TABLE_HORZ][0] = 0;
+  rect[TABLE_VERT][0] = 0;
+  rect[TABLE_HORZ][1] = subtable->n[TABLE_HORZ];
+  rect[TABLE_VERT][1] = subtable->n[TABLE_VERT];
+  rect[axis][0] = z0;
+  rect[axis][1] = z1;
+  table = table_select (subtable, rect);
+
+  if (add_headers)
+    {
+      if (subtable->h[axis][0])
+        table = table_paste (
+          table_select_slice (subtable, axis, 0, subtable->h[axis][0],
+                              false),
+          table, axis);
+
+      if (subtable->h[axis][1])
+        table = table_paste (
+          table,
+          table_select_slice (subtable, axis,
+                              subtable->n[axis] - subtable->h[axis][1],
+                              subtable->n[axis], false),
+          axis);
+    }
+
+  return table;
+}
+
+/* Takes ownership of TABLE and returns a new table whose contents are columns
+   X0 through X1 (exclusive) of SUBTABLE.  If ADD_HEADERS is true, the
+   returned table also includes any header columns in SUBTABLE. */
+struct table *
+table_select_columns (struct table *subtable, int x0, int x1,
+                      bool add_headers)
+{
+  return table_select_slice (subtable, TABLE_HORZ, x0, x1, add_headers);
+}
+
+/* Takes ownership of TABLE and returns a new table whose contents are rows Y0
+   through Y1 (exclusive) of SUBTABLE.  If ADD_HEADERS is true, the returned
+   table also includes any header rows in SUBTABLE. */
+struct table *
+table_select_rows (struct table *subtable, int y0, int y1,
+                   bool add_headers)
+{
+  return table_select_slice (subtable, TABLE_VERT, y0, y1, add_headers);
+}
+
+static void
+table_select_destroy (struct table *ti)
+{
+  struct table_select *ts = table_select_cast (ti);
+  table_unref (ts->subtable);
+  free (ts);
+}
+
+static void
+table_select_get_cell (const struct table *ti, int x, int y,
+                       struct table_cell *cell)
+{
+  struct table_select *ts = table_select_cast (ti);
+  int axis;
+
+  table_get_cell (ts->subtable,
+                  x + ts->ofs[TABLE_HORZ],
+                  y + ts->ofs[TABLE_VERT], cell);
+
+  for (axis = 0; axis < TABLE_N_AXES; axis++)
+    {
+      int *d = cell->d[axis];
+      int ofs = ts->ofs[axis];
+
+      d[0] = MAX (d[0] - ofs, 0);
+      d[1] = MIN (d[1] - ofs, ti->n[axis]);
+    }
+}
+
+static int
+table_select_get_rule (const struct table *ti,
+                       enum table_axis axis,
+                       int x, int y)
+{
+  struct table_select *ts = table_select_cast (ti);
+  return table_get_rule (ts->subtable, axis,
+                         x + ts->ofs[TABLE_HORZ],
+                         y + ts->ofs[TABLE_VERT]);
+}
+
+static struct table *
+table_select_select (struct table *ti, int rect[TABLE_N_AXES][2])
+{
+  struct table_select *ts = table_select_cast (ti);
+  int axis;
+
+  for (axis = 0; axis < TABLE_N_AXES; axis++)
+    {
+      int h1;
+
+      if (ts->table.h[axis][0] > rect[axis][0])
+        ts->table.h[axis][0] = ts->table.h[axis][0] - rect[axis][0];
+      else
+        ts->table.h[axis][0] = 0;
+
+      h1 = ts->table.n[axis] - ts->table.h[axis][1];
+      if (h1 < rect[axis][1])
+        ts->table.h[axis][1] = rect[axis][1] - h1;
+      else
+        ts->table.h[axis][1] = 0;
+
+      ts->ofs[axis] += rect[axis][0];
+      ts->table.n[axis] = rect[axis][1] - rect[axis][0];
+    }
+  return ti;
+}
+
+static const struct table_class table_select_class =
+  {
+    table_select_destroy,
+    table_select_get_cell,
+    table_select_get_rule,
+    NULL,                       /* paste */
+    table_select_select,
+  };
diff --git a/src/output/table-transpose.c b/src/output/table-transpose.c
new file mode 100644 (file)
index 0000000..5980194
--- /dev/null
@@ -0,0 +1,119 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <libpspp/assertion.h>
+#include <libpspp/cast.h>
+#include <output/table-provider.h>
+
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
+
+struct table_transpose
+  {
+    struct table table;
+    struct table *subtable;
+  };
+
+static const struct table_class table_transpose_class;
+
+static struct table_transpose *
+table_transpose_cast (const struct table *table)
+{
+  assert (table->class == &table_transpose_class);
+  return UP_CAST (table, struct table_transpose, table);
+}
+
+/* Takes ownership of SUBTABLE and returns a new table whose contents are
+   SUBTABLE with rows and columns transposed. */
+struct table *
+table_transpose (struct table *subtable)
+{
+  if (subtable->n[TABLE_HORZ] == subtable->n[TABLE_VERT]
+      && subtable->n[TABLE_HORZ] <= 1)
+    return subtable;
+  else if (subtable->class == &table_transpose_class)
+    {
+      struct table_transpose *tt = table_transpose_cast (subtable);
+      struct table *table = table_ref (tt->subtable);
+      table_unref (subtable);
+      return table;
+    }
+  else
+    {
+      struct table_transpose *tt;
+      int axis;
+
+      tt = xmalloc (sizeof *tt);
+      table_init (&tt->table, &table_transpose_class);
+      tt->subtable = subtable;
+
+      for (axis = 0; axis < TABLE_N_AXES; axis++)
+        {
+          tt->table.n[axis] = subtable->n[!axis];
+          tt->table.h[axis][0] = subtable->h[!axis][0];
+          tt->table.h[axis][1] = subtable->h[!axis][1];
+        }
+      return &tt->table;
+    }
+}
+
+static void
+table_transpose_destroy (struct table *ti)
+{
+  struct table_transpose *tt = table_transpose_cast (ti);
+  table_unref (tt->subtable);
+  free (tt);
+}
+
+static void
+swap (int *x, int *y)
+{
+  int t = *x;
+  *x = *y;
+  *y = t;
+}
+
+static void
+table_transpose_get_cell (const struct table *ti, int x, int y,
+                          struct table_cell *cell)
+{
+  struct table_transpose *tt = table_transpose_cast (ti);
+  int i;
+
+  table_get_cell (tt->subtable, y, x, cell);
+  for (i = 0; i < 2; i++)
+    swap (&cell->d[TABLE_HORZ][i], &cell->d[TABLE_VERT][i]);
+}
+
+static int
+table_transpose_get_rule (const struct table *ti,
+                          enum table_axis axis,
+                          int x, int y)
+{
+  struct table_transpose *tt = table_transpose_cast (ti);
+  return table_get_rule (tt->subtable, !axis, y, x);
+}
+
+static const struct table_class table_transpose_class =
+  {
+    table_transpose_destroy,
+    table_transpose_get_cell,
+    table_transpose_get_rule,
+    NULL,                       /* paste */
+    NULL,                       /* select */
+  };
index 72edf17f08b7f6e9e0dec91ad8b56f5b9e87b88b..696931ae50980147be4212dd1af477a73c2448d1 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include "table.h"
+#include <output/table.h>
+#include <output/table-provider.h>
 
-#include <ctype.h>
-#include <stdarg.h>
-#include <limits.h>
+#include <assert.h>
 #include <stdlib.h>
 
-#include "output.h"
-#include "manager.h"
-
-#include <data/data-out.h>
-#include <data/format.h>
-#include <data/value.h>
-#include <data/dictionary.h>
-#include <libpspp/assertion.h>
+#include <libpspp/cast.h>
 #include <libpspp/compiler.h>
-#include <libpspp/misc.h>
-#include <libpspp/pool.h>
-
-#include <data/settings.h>
-
-#include "minmax.h"
-#include "xalloc.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-\f
-const struct som_table_class tab_table_class;
-static char *command_name;
-
-/* Returns the font to use for a cell with the given OPTIONS. */
-static enum outp_font
-options_to_font (unsigned options)
-{
-  return (options & TAB_FIX ? OUTP_FIXED
-          : options & TAB_EMPH ? OUTP_EMPHASIS
-          : OUTP_PROPORTIONAL);
-}
-
-/* Creates a table with NC columns and NR rows. */
-struct tab_table *
-tab_create (int nc, int nr, int reallocable UNUSED)
-{
-  struct tab_table *t;
-
-  t = pool_create_container (struct tab_table, container);
-  t->col_style = TAB_COL_NONE;
-  t->col_group = 0;
-  t->title = NULL;
-  t->flags = SOMF_NONE;
-  t->nr = nr;
-  t->nc = t->cf = nc;
-  t->l = t->r = t->t = t->b = 0;
-
-  t->cc = pool_nmalloc (t->container, nr * nc, sizeof *t->cc);
-  t->ct = pool_malloc (t->container, nr * nc);
-  memset (t->ct, TAB_EMPTY, nc * nr);
 
-  t->rh = pool_nmalloc (t->container, nc, nr + 1);
-  memset (t->rh, 0, nc * (nr + 1));
+#include "gl/xalloc.h"
 
-  t->rv = pool_nmalloc (t->container, nr, nc + 1);
-  memset (t->rv, UCHAR_MAX, nr * (nc + 1));
-
-  t->dim = NULL;
-  t->w = t->h = NULL;
-  t->col_ofs = t->row_ofs = 0;
-
-  return t;
-}
-
-/* Destroys table T. */
-void
-tab_destroy (struct tab_table *t)
-{
-  assert (t != NULL);
-  free (t->title);
-  pool_destroy (t->container);
-}
-
-/* Sets the width and height of a table, in columns and rows,
-   respectively.  Use only to reduce the size of a table, since it
-   does not change the amount of allocated memory. */
-void
-tab_resize (struct tab_table *t, int nc, int nr)
+/* Increases TABLE's reference count, indicating that it has an additional
+   owner.  An table that is shared among multiple owners must not be
+   modified. */
+struct table *
+table_ref (const struct table *table_)
 {
-  assert (t != NULL);
-  if (nc != -1)
-    {
-      assert (nc + t->col_ofs <= t->cf);
-      t->nc = nc + t->col_ofs;
-    }
-  if (nr != -1)
-    {
-      assert (nr + t->row_ofs <= t->nr);
-      t->nr = nr + t->row_ofs;
-    }
+  struct table *table = CONST_CAST (struct table *, table_);
+  table->ref_cnt++;
+  return table;
 }
 
-/* Changes either or both dimensions of a table.  Consider using the
-   above routine instead if it won't waste a lot of space.
-
-   Changing the number of columns in a table is particularly expensive
-   in space and time.  Avoid doing such.  FIXME: In fact, transferring
-   of rules isn't even implemented yet. */
+/* Decreases TABLE's reference count, indicating that it has one fewer owner.
+   If TABLE no longer has any owners, it is freed. */
 void
-tab_realloc (struct tab_table *t, int nc, int nr)
+table_unref (struct table *table)
 {
-  int ro, co;
-
-  assert (t != NULL);
-  ro = t->row_ofs;
-  co = t->col_ofs;
-  if (ro || co)
-    tab_offset (t, 0, 0);
-
-  if (nc == -1)
-    nc = t->nc;
-  if (nr == -1)
-    nr = t->nr;
-
-  assert (nc == t->nc);
-
-  if (nc > t->cf)
+  if (table != NULL)
     {
-      int mr1 = MIN (nr, t->nr);
-      int mc1 = MIN (nc, t->nc);
-
-      struct substring *new_cc;
-      unsigned char *new_ct;
-      int r;
-
-      new_cc = pool_nmalloc (t->container, nr * nc, sizeof *new_cc);
-      new_ct = pool_malloc (t->container, nr * nc);
-      for (r = 0; r < mr1; r++)
-       {
-         memcpy (&new_cc[r * nc], &t->cc[r * t->nc], mc1 * sizeof *t->cc);
-         memcpy (&new_ct[r * nc], &t->ct[r * t->nc], mc1);
-         memset (&new_ct[r * nc + t->nc], TAB_EMPTY, nc - t->nc);
-       }
-      pool_free (t->container, t->cc);
-      pool_free (t->container, t->ct);
-      t->cc = new_cc;
-      t->ct = new_ct;
-      t->cf = nc;
-    }
-  else if (nr != t->nr)
-    {
-      t->cc = pool_nrealloc (t->container, t->cc, nr * nc, sizeof *t->cc);
-      t->ct = pool_realloc (t->container, t->ct, nr * nc);
-
-      t->rh = pool_nrealloc (t->container, t->rh, nc, nr + 1);
-      t->rv = pool_nrealloc (t->container, t->rv, nr, nc + 1);
-
-      if (nr > t->nr)
-       {
-         memset (&t->rh[nc * (t->nr + 1)], TAL_0, (nr - t->nr) * nc);
-         memset (&t->rv[(nc + 1) * t->nr], UCHAR_MAX,
-                  (nr - t->nr) * (nc + 1));
-       }
-    }
-
-  memset (&t->ct[nc * t->nr], TAB_EMPTY, nc * (nr - t->nr));
-
-  t->nr = nr;
-  t->nc = nc;
-
-  if (ro || co)
-    tab_offset (t, co, ro);
-}
-
-/* Sets the number of header rows on each side of TABLE to L on the
-   left, R on the right, T on the top, B on the bottom.  Header rows
-   are repeated when a table is broken across multiple columns or
-   multiple pages. */
-void
-tab_headers (struct tab_table *table, int l, int r, int t, int b)
-{
-  assert (table != NULL);
-  assert (l < table->nc);
-  assert (r < table->nc);
-  assert (t < table->nr);
-  assert (b < table->nr);
-
-
-  table->l = l;
-  table->r = r;
-  table->t = t;
-  table->b = b;
-}
-
-/* Set up table T so that, when it is an appropriate size, it will be
-   displayed across the page in columns.
-
-   STYLE is a TAB_COL_* constant.  GROUP is the number of rows to take
-   as a unit. */
-void
-tab_columns (struct tab_table *t, int style, int group)
-{
-  assert (t != NULL);
-  t->col_style = style;
-  t->col_group = group;
-}
-\f
-/* Rules. */
-
-/* Draws a vertical line to the left of cells at horizontal position X
-   from Y1 to Y2 inclusive in style STYLE, if style is not -1. */
-void
-tab_vline (struct tab_table *t, int style, int x, int y1, int y2)
-{
-  assert (t != NULL);
-
-#if DEBUGGING
-  if (x + t->col_ofs < 0 || x + t->col_ofs > t->nc
-      || y1 + t->row_ofs < 0 || y1 + t->row_ofs >= t->nr
-      || y2 + t->row_ofs < 0 || y2 + t->row_ofs >= t->nr)
-    {
-      printf (_("bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in "
-               "table size (%d,%d)\n"),
-             x, t->col_ofs, x + t->col_ofs,
-             y1, t->row_ofs, y1 + t->row_ofs,
-             y2, t->row_ofs, y2 + t->row_ofs,
-             t->nc, t->nr);
-      return;
-    }
-#endif
-
-  x += t->col_ofs;
-  y1 += t->row_ofs;
-  y2 += t->row_ofs;
-
-  assert (x  > 0);
-  assert (x  < t->nc);
-  assert (y1 >= 0);
-  assert (y2 >= y1);
-  assert (y2 <=  t->nr);
-
-  if (style != -1)
-    {
-      int y;
-      for (y = y1; y <= y2; y++)
-        t->rv[x + (t->cf + 1) * y] = style;
-    }
-}
-
-/* Draws a horizontal line above cells at vertical position Y from X1
-   to X2 inclusive in style STYLE, if style is not -1. */
-void
-tab_hline (struct tab_table * t, int style, int x1, int x2, int y)
-{
-  assert (t != NULL);
-
-  x1 += t->col_ofs;
-  x2 += t->col_ofs;
-  y += t->row_ofs;
-
-  assert (y >= 0);
-  assert (y <= t->nr);
-  assert (x2 >= x1 );
-  assert (x1 >= 0 );
-  assert (x2 < t->nc);
-
-  if (style != -1)
-    {
-      int x;
-      for (x = x1; x <= x2; x++)
-        t->rh[x + t->cf * y] = style;
-    }
-}
-
-/* Draws a box around cells (X1,Y1)-(X2,Y2) inclusive with horizontal
-   lines of style F_H and vertical lines of style F_V.  Fills the
-   interior of the box with horizontal lines of style I_H and vertical
-   lines of style I_V.  Any of the line styles may be -1 to avoid
-   drawing those lines.  This is distinct from 0, which draws a null
-   line. */
-void
-tab_box (struct tab_table *t, int f_h, int f_v, int i_h, int i_v,
-        int x1, int y1, int x2, int y2)
-{
-  assert (t != NULL);
-
-#if DEBUGGING
-  if (x1 + t->col_ofs < 0 || x1 + t->col_ofs >= t->nc
-      || x2 + t->col_ofs < 0 || x2 + t->col_ofs >= t->nc
-      || y1 + t->row_ofs < 0 || y1 + t->row_ofs >= t->nr
-      || y2 + t->row_ofs < 0 || y2 + t->row_ofs >= t->nr)
-    {
-      printf (_("bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) "
-               "in table size (%d,%d)\n"),
-             x1, t->col_ofs, x1 + t->col_ofs,
-             y1, t->row_ofs, y1 + t->row_ofs,
-             x2, t->col_ofs, x2 + t->col_ofs,
-             y2, t->row_ofs, y2 + t->row_ofs,
-             t->nc, t->nr);
-      NOT_REACHED ();
-    }
-#endif
-
-  x1 += t->col_ofs;
-  x2 += t->col_ofs;
-  y1 += t->row_ofs;
-  y2 += t->row_ofs;
-
-  assert (x2 >= x1);
-  assert (y2 >= y1);
-  assert (x1 >= 0);
-  assert (y1 >= 0);
-  assert (x2 < t->nc);
-  assert (y2 < t->nr);
-
-  if (f_h != -1)
-    {
-      int x;
-      for (x = x1; x <= x2; x++)
-        {
-          t->rh[x + t->cf * y1] = f_h;
-          t->rh[x + t->cf * (y2 + 1)] = f_h;
-        }
-    }
-  if (f_v != -1)
-    {
-      int y;
-      for (y = y1; y <= y2; y++)
-        {
-          t->rv[x1 + (t->cf + 1) * y] = f_v;
-          t->rv[(x2 + 1) + (t->cf + 1) * y] = f_v;
-        }
-    }
-
-  if (i_h != -1)
-    {
-      int y;
-
-      for (y = y1 + 1; y <= y2; y++)
-       {
-         int x;
-
-          for (x = x1; x <= x2; x++)
-            t->rh[x + t->cf * y] = i_h;
-       }
-    }
-  if (i_v != -1)
-    {
-      int x;
-
-      for (x = x1 + 1; x <= x2; x++)
-       {
-         int y;
-
-          for (y = y1; y <= y2; y++)
-            t->rv[x + (t->cf + 1) * y] = i_v;
-       }
+      assert (table->ref_cnt > 0);
+      if (--table->ref_cnt == 0)
+        table->class->destroy (table);
     }
 }
 
-/* Set the title of table T to TITLE, which is formatted as if
-   passed to printf(). */
-void
-tab_title (struct tab_table *t, const char *title, ...)
-{
-  va_list args;
-
-  assert (t != NULL && title != NULL);
-  va_start (args, title);
-  t->title = xvasprintf (title, args);
-  va_end (args);
-}
-
-/* Set DIM_FUNC as the dimension function for table T. */
-void
-tab_dim (struct tab_table *t, tab_dim_func *dim_func, void *aux)
-{
-  assert (t != NULL && t->dim == NULL);
-  t->dim = dim_func;
-  t->dim_aux = aux;
-}
-
-/* Returns the natural width of column C in table T for driver D, that
-   is, the smallest width necessary to display all its cells without
-   wrapping.  The width will be no larger than the page width minus
-   left and right rule widths. */
-int
-tab_natural_width (struct tab_table *t, struct outp_driver *d, int c)
-{
-  int width;
-
-  assert (t != NULL && c >= 0 && c < t->nc);
-  {
-    int r;
-
-    for (width = r = 0; r < t->nr; r++)
-      {
-       struct outp_text text;
-       unsigned char opt = t->ct[c + r * t->cf];
-        int w;
-
-       if (opt & (TAB_JOIN | TAB_EMPTY))
-         continue;
-
-       text.string = t->cc[c + r * t->cf];
-       text.justification = OUTP_LEFT;
-        text.font = options_to_font (opt);
-        text.h = text.v = INT_MAX;
-
-       d->class->text_metrics (d, &text, &w, NULL);
-       if (w > width)
-         width = w;
-      }
-  }
-
-  if (width == 0)
-    {
-      /* FIXME: This is an ugly kluge to compensate for the fact
-         that we don't let joined cells contribute to column
-         widths. */
-      width = d->prop_em_width * 8;
-    }
-
-  {
-    const int clamp = d->width - t->wrv[0] - t->wrv[t->nc];
-
-    if (width > clamp)
-      width = clamp;
-  }
-
-  return width;
-}
-
-/* Returns the natural height of row R in table T for driver D, that
-   is, the minimum height necessary to display the information in the
-   cell at the widths set for each column. */
-int
-tab_natural_height (struct tab_table *t, struct outp_driver *d, int r)
-{
-  int height;
-
-  assert (t != NULL && r >= 0 && r < t->nr);
-
-  {
-    int c;
-
-    for (height = d->font_height, c = 0; c < t->nc; c++)
-      {
-       struct outp_text text;
-       unsigned char opt = t->ct[c + r * t->cf];
-        int h;
-
-       if (opt & (TAB_JOIN | TAB_EMPTY))
-         continue;
-
-       text.string = t->cc[c + r * t->cf];
-        text.justification = OUTP_LEFT;
-        text.font = options_to_font (opt);
-       text.h = t->w[c];
-        text.v = INT_MAX;
-       d->class->text_metrics (d, &text, NULL, &h);
-
-       if (h > height)
-         height = h;
-      }
-  }
-
-  return height;
-}
-
-/* Callback function to set all columns and rows to their natural
-   dimensions.  Not really meant to be called directly.  */
-void
-tab_natural_dimensions (struct tab_table *t, struct outp_driver *d,
-                        void *aux UNUSED)
-{
-  int i;
-
-  assert (t != NULL);
-
-  for (i = 0; i < t->nc; i++)
-    t->w[i] = tab_natural_width (t, d, i);
-
-  for (i = 0; i < t->nr; i++)
-    t->h[i] = tab_natural_height (t, d, i);
-}
-
-\f
-/* Cells. */
-
-/* Sets cell (C,R) in TABLE, with options OPT, to have a value taken
-   from V, displayed with format spec F. */
-void
-tab_value (struct tab_table *table, int c, int r, unsigned char opt,
-          const union value *v, const struct dictionary *dict, 
-          const struct fmt_spec *f)
-{
-  char *contents;
-
-  assert (table != NULL && v != NULL && f != NULL);
-#if DEBUGGING
-  if (c + table->col_ofs < 0 || r + table->row_ofs < 0
-      || c + table->col_ofs >= table->nc
-      || r + table->row_ofs >= table->nr)
-    {
-      printf ("tab_value(): bad cell (%d+%d=%d,%d+%d=%d) in table size "
-             "(%d,%d)\n",
-             c, table->col_ofs, c + table->col_ofs,
-             r, table->row_ofs, r + table->row_ofs,
-             table->nc, table->nr);
-      return;
-    }
-#endif
-
-  contents = data_out_pool (v, dict_get_encoding (dict), f, table->container);
-
-  table->cc[c + r * table->cf] = ss_cstr (contents);
-  table->ct[c + r * table->cf] = opt;
-}
-
-/* Sets cell (C,R) in TABLE, with options OPT, to have value VAL
-   with NDEC decimal places. */
-void
-tab_fixed (struct tab_table *table, int c, int r, unsigned char opt,
-          double val, int w, int d)
-{
-  char *s, *cp;
-
-  struct fmt_spec f;
-  union value double_value;
-
-  assert (table != NULL && w <= 40);
-
-  assert (c >= 0);
-  assert (c < table->nc);
-  assert (r >= 0);
-  assert (r < table->nr);
-
-  f = fmt_for_output (FMT_F, w, d);
-
-#if DEBUGGING
-  if (c + table->col_ofs < 0 || r + table->row_ofs < 0
-      || c + table->col_ofs >= table->nc
-      || r + table->row_ofs >= table->nr)
-    {
-      printf ("tab_fixed(): bad cell (%d+%d=%d,%d+%d=%d) in table size "
-             "(%d,%d)\n",
-             c, table->col_ofs, c + table->col_ofs,
-             r, table->row_ofs, r + table->row_ofs,
-             table->nc, table->nr);
-      return;
-    }
-#endif
-
-  double_value.f = val;
-  s = data_out_pool (&double_value, LEGACY_NATIVE, &f, table->container);
-
-  cp = s;
-  while (isspace ((unsigned char) *cp) && cp < &s[w])
-    cp++;
-  f.w = w - (cp - s);
-
-  table->cc[c + r * table->cf] = ss_buffer (cp, f.w);
-  table->ct[c + r * table->cf] = opt;
-}
-
-/* Sets cell (C,R) in TABLE, with options OPT, to have value VAL as
-   formatted by FMT.
-   If FMT is null, then the default print format will be used.
-*/
-void
-tab_double (struct tab_table *table, int c, int r, unsigned char opt,
-          double val, const struct fmt_spec *fmt)
-{
-  struct substring ss;
-  union value double_value ;
-
-  assert (table != NULL);
-
-  assert (c >= 0);
-  assert (c < table->nc);
-  assert (r >= 0);
-  assert (r < table->nr);
-
-  if ( fmt == NULL)
-    fmt = settings_get_format ();
-
-  fmt_check_output (fmt);
-
-#if DEBUGGING
-  if (c + table->col_ofs < 0 || r + table->row_ofs < 0
-      || c + table->col_ofs >= table->nc
-      || r + table->row_ofs >= table->nr)
-    {
-      printf ("tab_double(): bad cell (%d+%d=%d,%d+%d=%d) in table size "
-             "(%d,%d)\n",
-             c, table->col_ofs, c + table->col_ofs,
-             r, table->row_ofs, r + table->row_ofs,
-             table->nc, table->nr);
-      return;
-    }
-#endif
-
-  double_value.f = val;
-  ss = ss_cstr (data_out_pool (&double_value, LEGACY_NATIVE, fmt, table->container));
-
-  ss_ltrim (&ss, ss_cstr (" "));
-
-  table->cc[c + r * table->cf] = ss;
-  table->ct[c + r * table->cf] = opt;
-}
-
-
-static void
-do_tab_text (struct tab_table *table, int c, int r, unsigned opt, char *text)
-{
-  assert (c >= 0);
-  assert (r >= 0);
-  assert (c < table->nc);
-  assert (r < table->nr);
-
-#if DEBUGGING
-  if (c + table->col_ofs < 0 || r + table->row_ofs < 0
-      || c + table->col_ofs >= table->nc
-      || r + table->row_ofs >= table->nr)
-    {
-      printf ("tab_text(): bad cell (%d+%d=%d,%d+%d=%d) in table size "
-             "(%d,%d)\n",
-             c, table->col_ofs, c + table->col_ofs,
-             r, table->row_ofs, r + table->row_ofs,
-             table->nc, table->nr);
-      return;
-    }
-#endif
-
-  table->cc[c + r * table->cf] = ss_cstr (text);
-  table->ct[c + r * table->cf] = opt;
-}
-
-/* Sets cell (C,R) in TABLE, with options OPT, to have text value
-   TEXT. */
-void
-tab_text (struct tab_table *table, int c, int r, unsigned opt,
-          const char *text)
+/* Returns true if TABLE has more than one owner.  A table item that is shared
+   among multiple owners must not be modified. */
+bool
+table_is_shared (const struct table *table)
 {
-  do_tab_text (table, c, r, opt, pool_strdup (table->container, text));
+  return table->ref_cnt > 1;
 }
 
-/* Sets cell (C,R) in TABLE, with options OPT, to have text value
-   FORMAT, which is formatted as if passed to printf. */
+/* Sets the number of left header columns in TABLE to HL. */
 void
-tab_text_format (struct tab_table *table, int c, int r, unsigned opt,
-                 const char *format, ...)
+table_set_hl (struct table *table, int hl)
 {
-  va_list args;
-
-  va_start (args, format);
-  do_tab_text (table, c, r, opt,
-               pool_vasprintf (table->container, format, args));
-  va_end (args);
-}
-
-static void
-do_tab_joint_text (struct tab_table *table, int x1, int y1, int x2, int y2,
-                   unsigned opt, char *text)
-{
-  struct tab_joined_cell *j;
-
-  assert (x1 + table->col_ofs >= 0);
-  assert (y1 + table->row_ofs >= 0);
-  assert (y2 >= y1);
-  assert (x2 >= x1);
-  assert (y2 + table->row_ofs < table->nr);
-  assert (x2 + table->col_ofs < table->nc);
-
-#if DEBUGGING
-  if (x1 + table->col_ofs < 0 || x1 + table->col_ofs >= table->nc
-      || y1 + table->row_ofs < 0 || y1 + table->row_ofs >= table->nr
-      || x2 < x1 || x2 + table->col_ofs >= table->nc
-      || y2 < y2 || y2 + table->row_ofs >= table->nr)
-    {
-      printf ("tab_joint_text(): bad cell "
-             "(%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n",
-             x1, table->col_ofs, x1 + table->col_ofs,
-             y1, table->row_ofs, y1 + table->row_ofs,
-             x2, table->col_ofs, x2 + table->col_ofs,
-             y2, table->row_ofs, y2 + table->row_ofs,
-             table->nc, table->nr);
-      return;
-    }
-#endif
-
-  tab_box (table, -1, -1, TAL_0, TAL_0, x1, y1, x2, y2);
-
-  j = pool_alloc (table->container, sizeof *j);
-  j->hit = 0;
-  j->x1 = x1 + table->col_ofs;
-  j->y1 = y1 + table->row_ofs;
-  j->x2 = ++x2 + table->col_ofs;
-  j->y2 = ++y2 + table->row_ofs;
-  j->contents = ss_cstr (text);
-
-  opt |= TAB_JOIN;
-
-  {
-    struct substring *cc = &table->cc[x1 + y1 * table->cf];
-    unsigned char *ct = &table->ct[x1 + y1 * table->cf];
-    const int ofs = table->cf - (x2 - x1);
-
-    int y;
-
-    for (y = y1; y < y2; y++)
-      {
-       int x;
-
-       for (x = x1; x < x2; x++)
-         {
-           *cc++ = ss_buffer ((char *) j, 0);
-           *ct++ = opt;
-         }
-
-       cc += ofs;
-       ct += ofs;
-      }
-  }
+  assert (!table_is_shared (table));
+  table->h[TABLE_HORZ][0] = hl;
 }
 
-/* Joins cells (X1,X2)-(Y1,Y2) inclusive in TABLE, and sets them with
-   options OPT to have text value TEXT. */
+/* Sets the number of right header columns in TABLE to HR. */
 void
-tab_joint_text (struct tab_table *table, int x1, int y1, int x2, int y2,
-                unsigned opt, const char *text)
+table_set_hr (struct table *table, int hr)
 {
-  do_tab_joint_text (table, x1, y1, x2, y2, opt,
-                     pool_strdup (table->container, text));
+  assert (!table_is_shared (table));
+  table->h[TABLE_HORZ][1] = hr;
 }
 
-/* Joins cells (X1,X2)-(Y1,Y2) inclusive in TABLE, and sets them
-   with options OPT to have text value FORMAT, which is formatted
-   as if passed to printf. */
+/* Sets the number of top header rows in TABLE to HT. */
 void
-tab_joint_text_format (struct tab_table *table, int x1, int y1, int x2, int y2,
-                       unsigned opt, const char *format, ...)
+table_set_ht (struct table *table, int ht)
 {
-  va_list args;
-
-  va_start (args, format);
-  do_tab_joint_text (table, x1, y1, x2, y2, opt,
-                     pool_vasprintf (table->container, format, args));
-  va_end (args);
+  assert (!table_is_shared (table));
+  table->h[TABLE_VERT][0] = ht;
 }
 
-/* Sets cell (C,R) in TABLE, with options OPT, to contents STRING. */
+/* Sets the number of top header rows in TABLE to HB. */
 void
-tab_raw (struct tab_table *table, int c, int r, unsigned opt,
-        struct substring *string)
+table_set_hb (struct table *table, int hb)
 {
-  assert (table != NULL && string != NULL);
-
-#if DEBUGGING
-  if (c + table->col_ofs < 0 || r + table->row_ofs < 0
-      || c + table->col_ofs >= table->nc
-      || r + table->row_ofs >= table->nr)
-    {
-      printf ("tab_raw(): bad cell (%d+%d=%d,%d+%d=%d) in table size "
-             "(%d,%d)\n",
-             c, table->col_ofs, c + table->col_ofs,
-             r, table->row_ofs, r + table->row_ofs,
-             table->nc, table->nr);
-      return;
-    }
-#endif
-
-  table->cc[c + r * table->cf] = *string;
-  table->ct[c + r * table->cf] = opt;
+  assert (!table_is_shared (table));
+  table->h[TABLE_VERT][1] = hb;
 }
 \f
-/* Miscellaneous. */
-
-/* Sets the widths of all the columns and heights of all the rows in
-   table T for driver D. */
-static void
-nowrap_dim (struct tab_table *t, struct outp_driver *d, void *aux UNUSED)
-{
-  t->w[0] = tab_natural_width (t, d, 0);
-  t->h[0] = d->font_height;
-}
-
-/* Sets the widths of all the columns and heights of all the rows in
-   table T for driver D. */
-static void
-wrap_dim (struct tab_table *t, struct outp_driver *d, void *aux UNUSED)
-{
-  t->w[0] = tab_natural_width (t, d, 0);
-  t->h[0] = tab_natural_height (t, d, 0);
-}
-
-static void
-do_tab_output_text (struct tab_table *t, int options, char *text)
-{
-  do_tab_text (t, 0, 0, options, text);
-  tab_flags (t, SOMF_NO_TITLE | SOMF_NO_SPACING);
-  tab_dim (t, options & TAT_NOWRAP ? nowrap_dim : wrap_dim, NULL);
-  tab_submit (t);
-}
+/* Initializes TABLE as a table of the specified CLASS, initially with a
+   reference count of 1.
 
-/* Outputs TEXT as a table with a single cell having cell options
-   OPTIONS, which is a combination of the TAB_* and TAT_*
-   constants.  */
-void
-tab_output_text (int options, const char *text)
-{
-  struct tab_table *table = tab_create (1, 1, 0);
-  do_tab_output_text (table, options, pool_strdup (table->container, text));
-}
+   TABLE initially has 0 rows and columns and no headers.  The table
+   implementation should update the numbers of rows and columns.  The table
+   implementation (or its client) may update the header rows and columns.
 
-/* Outputs FORMAT as a table with a single cell having cell
-   options OPTIONS, which is a combination of the TAB_* and TAT_*
-   constants.  FORMAT is formatted as if it was passed through
-   printf. */
+   A table is an abstract class, that is, a plain struct table is not useful on
+   its own.  Thus, this function is normally called from the initialization
+   function of some subclass of table. */
 void
-tab_output_text_format (int options, const char *format, ...)
+table_init (struct table *table, const struct table_class *class)
 {
-  struct tab_table *table;
-  va_list args;
-
-  table = tab_create (1, 1, 0);
-
-  va_start (args, format);
-  do_tab_output_text (table, options,
-                      pool_vasprintf (table->container, format, args));
-  va_end (args);
+  table->class = class;
+  table->n[TABLE_HORZ] = table->n[TABLE_VERT] = 0;
+  table->h[TABLE_HORZ][0] = table->h[TABLE_HORZ][1] = 0;
+  table->h[TABLE_VERT][0] = table->h[TABLE_VERT][1] = 0;
+  table->ref_cnt = 1;
 }
 
-/* Set table flags to FLAGS. */
+/* Sets the number of columns in TABLE to NC. */
 void
-tab_flags (struct tab_table *t, unsigned flags)
+table_set_nc (struct table *table, int nc)
 {
-  assert (t != NULL);
-  t->flags = flags;
+  assert (!table_is_shared (table));
+  table->n[TABLE_HORZ] = nc;
 }
 
-/* Easy, type-safe way to submit a tab table to som. */
+/* Sets the number of rows in TABLE to NR. */
 void
-tab_submit (struct tab_table *t)
+table_set_nr (struct table *table, int nr)
 {
-  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);
+  assert (!table_is_shared (table));
+  table->n[TABLE_VERT] = nr;
 }
 \f
-/* Editing. */
+/* Initializes CELL with the contents of the table cell at column X and row Y
+   within TABLE.  When CELL is no longer needed, the caller is responsible for
+   freeing it by calling table_cell_free(CELL).
 
-/* Set table row and column offsets for all functions that affect
-   cells or rules. */
+   The caller must ensure that CELL is destroyed before TABLE is unref'ed. */
 void
-tab_offset (struct tab_table *t, int col, int row)
+table_get_cell (const struct table *table, int x, int y,
+                struct table_cell *cell)
 {
-  int diff = 0;
-
-  assert (t != NULL);
-#if DEBUGGING
-  if (row < -1 || row > t->nr)
-    {
-      printf ("tab_offset(): row=%d in %d-row table\n", row, t->nr);
-      NOT_REACHED ();
-    }
-  if (col < -1 || col > t->nc)
-    {
-      printf ("tab_offset(): col=%d in %d-column table\n", col, t->nc);
-      NOT_REACHED ();
-    }
-#endif
-
-  if (row != -1)
-    diff += (row - t->row_ofs) * t->cf, t->row_ofs = row;
-  if (col != -1)
-    diff += (col - t->col_ofs), t->col_ofs = col;
-
-  t->cc += diff;
-  t->ct += diff;
+  assert (x >= 0 && x < table->n[TABLE_HORZ]);
+  assert (y >= 0 && y < table->n[TABLE_VERT]);
+  table->class->get_cell (table, x, y, cell);
 }
 
-/* Increment the row offset by one. If the table is too small,
-   increase its size. */
+/* Frees CELL, which should have been initialized by calling
+   table_get_cell(). */
 void
-tab_next_row (struct tab_table *t)
+table_cell_free (struct table_cell *cell)
+{
+  if (cell->destructor != NULL)
+    cell->destructor (cell->destructor_aux);
+}
+
+/* Returns one of the TAL_* enumeration constants (declared in output/table.h)
+   representing a rule running alongside one of the cells in TABLE.
+
+   Suppose NC is the number of columns in TABLE and NR is the number of rows.
+   Then, if AXIS is TABLE_HORZ, then 0 <= X <= NC and 0 <= Y < NR.  If (X,Y) =
+   (0,0), the return value is the rule that runs vertically on the left side of
+   cell (0,0); if (X,Y) = (1,0), it is the vertical rule between that cell and
+   cell (1,0); and so on, up to (NC,0), which runs vertically on the right of
+   cell (NC-1,0).
+
+   The following diagram illustrates the meaning of (X,Y) for AXIS = TABLE_HORZ
+   within a 7x7 table.  The '|' characters at the intersection of the X labels
+   and Y labels show the rule whose style would be returned by calling
+   table_get_rule with those X and Y values:
+
+                           0  1  2  3  4  5  6  7
+                           +--+--+--+--+--+--+--+
+                         0 |  |  |  |  |  |  |  |
+                           +--+--+--+--+--+--+--+
+                         1 |  |  |  |  |  |  |  |
+                           +--+--+--+--+--+--+--+
+                         2 |  |  |  |  |  |  |  |
+                           +--+--+--+--+--+--+--+
+                         3 |  |  |  |  |  |  |  |
+                           +--+--+--+--+--+--+--+
+                         4 |  |  |  |  |  |  |  |
+                           +--+--+--+--+--+--+--+
+                         5 |  |  |  |  |  |  |  |
+                           +--+--+--+--+--+--+--+
+                         6 |  |  |  |  |  |  |  |
+                           +--+--+--+--+--+--+--+
+
+   Similarly, if AXIS is TABLE_VERT, then 0 <= X < NC and 0 <= Y <= NR.  If
+   (X,Y) = (0,0), the return value is the rule that runs horizontally above
+   the top of cell (0,0); if (X,Y) = (0,1), it is the horizontal rule
+   between that cell and cell (0,1); and so on, up to (0,NR), which runs
+   horizontally below cell (0,NR-1). */
+int
+table_get_rule (const struct table *table, enum table_axis axis, int x, int y)
 {
-  assert (t != NULL);
-  t->cc += t->cf;
-  t->ct += t->cf;
-  if (++t->row_ofs >= t->nr)
-    tab_realloc (t, -1, t->nr * 4 / 3);
+  assert (x >= 0 && x < table->n[TABLE_HORZ] + (axis == TABLE_HORZ));
+  assert (y >= 0 && y < table->n[TABLE_VERT] + (axis == TABLE_VERT));
+  return table->class->get_rule (table, axis, x, y);
 }
 \f
-static struct tab_table *t;
-static struct outp_driver *d;
-static int tab_hit;
-
-/* Set the current table to TABLE. */
-static void
-tabi_table (struct som_entity *table)
-{
-  assert (table != NULL);
-  assert (table->type == SOM_TABLE);
-
-  t = table->ext;
-  tab_offset (t, 0, 0);
-
-  assert (t->w == NULL && t->h == NULL);
-  t->w = pool_nalloc (t->container, t->nc, sizeof *t->w);
-  t->h = pool_nalloc (t->container, t->nr, sizeof *t->h);
-  t->hrh = pool_nmalloc (t->container, t->nr + 1, sizeof *t->hrh);
-  t->wrv = pool_nmalloc (t->container, t->nc + 1, sizeof *t->wrv);
-}
-
-/* Returns the line style to use for spacing purposes for a rule
-   of the given TYPE. */
-static enum outp_line_style
-rule_to_spacing_type (unsigned char type)
-{
-  switch (type)
-    {
-    case TAL_0:
-      return OUTP_L_NONE;
-    case TAL_GAP:
-    case TAL_1:
-      return OUTP_L_SINGLE;
-    case TAL_2:
-      return OUTP_L_DOUBLE;
-    default:
-      NOT_REACHED ();
-    }
-}
-
-/* Set the current output device to DRIVER. */
-static void
-tabi_driver (struct outp_driver *driver)
-{
-  int c, r;
-  int i;
-
-  assert (driver != NULL);
-  d = driver;
-
-  /* Figure out sizes of rules. */
-  for (r = 0; r <= t->nr; r++)
-    {
-      int width = 0;
-      for (c = 0; c < t->nc; c++)
-        {
-          unsigned char rh = t->rh[c + r * t->cf];
-          int w = driver->horiz_line_width[rule_to_spacing_type (rh)];
-          if (w > width)
-            width = w;
-        }
-      t->hrh[r] = width;
-    }
-
-  for (c = 0; c <= t->nc; c++)
-    {
-      int width = 0;
-      for (r = 0; r < t->nr; r++)
-        {
-          unsigned char *rv = &t->rv[c + r * (t->cf + 1)];
-          int w;
-          if (*rv == UCHAR_MAX)
-            *rv = c != 0 && c != t->nc ? TAL_GAP : TAL_0;
-          w = driver->vert_line_width[rule_to_spacing_type (*rv)];
-          if (w > width)
-            width = w;
-        }
-      t->wrv[c] = width;
-    }
-
-#if DEBUGGING
-  for (i = 0; i < t->nr; i++)
-    t->h[i] = -1;
-  for (i = 0; i < t->nc; i++)
-    t->w[i] = -1;
-#endif
-
-  assert (t->dim != NULL);
-  t->dim (t, d, t->dim_aux);
-
-#if DEBUGGING
+struct table_unshared
   {
-    int error = 0;
-
-    for (i = 0; i < t->nr; i++)
-      {
-       if (t->h[i] == -1)
-         {
-           printf ("Table row %d height not initialized.\n", i);
-           error = 1;
-         }
-       assert (t->h[i] > 0);
-      }
-
-    for (i = 0; i < t->nc; i++)
-      {
-       if (t->w[i] == -1)
-         {
-           printf ("Table column %d width not initialized.\n", i);
-           error = 1;
-         }
-       assert (t->w[i] > 0);
-      }
-  }
-#endif
-
-  /* Add up header sizes. */
-  for (i = 0, t->wl = t->wrv[0]; i < t->l; i++)
-    t->wl += t->w[i] + t->wrv[i + 1];
-  for (i = 0, t->ht = t->hrh[0]; i < t->t; i++)
-    t->ht += t->h[i] + t->hrh[i + 1];
-  for (i = t->nc - t->r, t->wr = t->wrv[i]; i < t->nc; i++)
-    t->wr += t->w[i] + t->wrv[i + 1];
-  for (i = t->nr - t->b, t->hb = t->hrh[i]; i < t->nr; i++)
-    t->hb += t->h[i] + t->hrh[i + 1];
-
-  /* Title. */
-  if (!(t->flags & SOMF_NO_TITLE))
-    t->ht += d->font_height;
-}
-
-/* Return the number of columns and rows in the table into N_COLUMNS
-   and N_ROWS, respectively. */
-static void
-tabi_count (int *n_columns, int *n_rows)
-{
-  assert (n_columns != NULL && n_rows != NULL);
-  *n_columns = t->nc;
-  *n_rows = t->nr;
-}
-
-static void tabi_cumulate (int cumtype, int start, int *end, int max, int *actual);
-
-/* Return the horizontal and vertical size of the entire table,
-   including headers, for the current output device, into HORIZ and
-   VERT. */
-static void
-tabi_area (int *horiz, int *vert)
-{
-  assert (horiz != NULL && vert != NULL);
+    struct table table;
+    struct table *subtable;
+  };
 
-  {
-    int w, c;
+static const struct table_class table_unshared_class;
 
-    for (c = t->l + 1, w = t->wl + t->wr + t->w[t->l];
-        c < t->nc - t->r; c++)
-      w += t->w[c] + t->wrv[c];
-    *horiz = w;
-  }
+/* Takes ownership of TABLE and returns a table with the same contents but
+   which is guaranteed not to be shared (as returned by table_is_shared()).
 
-  {
-    int h, r;
-    for (r = t->t + 1, h = t->ht + t->hb + t->h[t->t];
-        r < t->nr - t->b; r++)
-      h += t->h[r] + t->hrh[r];
-    *vert = h;
-  }
-}
+   If TABLE is unshared, just returns TABLE.
 
-/* Return the column style for this table into STYLE. */
-static void
-tabi_columns (int *style)
-{
-  assert (style != NULL);
-  *style = t->col_style;
-}
-
-/* Return the number of header rows/columns on the left, right, top,
-   and bottom sides into HL, HR, HT, and HB, respectively. */
-static void
-tabi_headers (int *hl, int *hr, int *ht, int *hb)
+   The only real use for this function is to create a copy of TABLE in which
+   the headers can be adjusted, which is a pretty specialized use case. */
+struct table *
+table_unshare (struct table *table)
 {
-  assert (hl != NULL && hr != NULL && ht != NULL && hb != NULL);
-  *hl = t->l;
-  *hr = t->r;
-  *ht = t->t;
-  *hb = t->b;
-}
-
-/* Determines the number of rows or columns (including appropriate
-   headers), depending on CUMTYPE, that will fit into the space
-   specified.  Takes rows/columns starting at index START and attempts
-   to fill up available space MAX.  Returns in END the index of the
-   last row/column plus one; returns in ACTUAL the actual amount of
-   space the selected rows/columns (including appropriate headers)
-   filled. */
-static void
-tabi_cumulate (int cumtype, int start, int *end, int max, int *actual)
-{
-  int n;
-  int *d;
-  int *r;
-  int total;
-
-  assert (end != NULL && (cumtype == SOM_ROWS || cumtype == SOM_COLUMNS));
-  if (cumtype == SOM_ROWS)
-    {
-      assert (start >= 0 && start < t->nr);
-      n = t->nr - t->b;
-      d = &t->h[start];
-      r = &t->hrh[start + 1];
-      total = t->ht + t->hb;
-    }
+  if (!table_is_shared (table))
+    return table;
   else
     {
-      assert (start >= 0 && start < t->nc);
-      n = t->nc - t->r;
-      d = &t->w[start];
-      r = &t->wrv[start + 1];
-      total = t->wl + t->wr;
-    }
-
-  total += *d++;
-  if (total > max)
-    {
-      if (end)
-       *end = start;
-      if (actual)
-       *actual = 0;
-      return;
+      struct table_unshared *tiu = xmalloc (sizeof *tiu);
+      table_init (&tiu->table, &table_unshared_class);
+      table_set_nc (&tiu->table, table_nc (table));
+      table_set_nr (&tiu->table, table_nr (table));
+      table_set_hl (&tiu->table, table_hl (table));
+      table_set_hr (&tiu->table, table_hr (table));
+      table_set_ht (&tiu->table, table_ht (table));
+      table_set_hb (&tiu->table, table_hb (table));
+      tiu->subtable = table;
+      return &tiu->table;
     }
-
-  {
-    int x;
-
-    for (x = start + 1; x < n; x++)
-      {
-       int amt = *d++ + *r++;
-
-       total += amt;
-       if (total > max)
-         {
-           total -= amt;
-           break;
-         }
-      }
-
-    if (end)
-      *end = x;
-
-    if (actual)
-      *actual = total;
-  }
-}
-
-/* Return flags set for the current table into FLAGS. */
-static void
-tabi_flags (unsigned *flags)
-{
-  assert (flags != NULL);
-  *flags = t->flags;
 }
 
-/* Returns true if the table will fit in the given page WIDTH,
-   false otherwise. */
-static bool
-tabi_fits_width (int width)
+static struct table_unshared *
+table_unshared_cast (const struct table *table)
 {
-  int i;
-
-  for (i = t->l; i < t->nc - t->r; i++)
-    if (t->wl + t->wr + t->w[i] > width)
-      return false;
-
-  return true;
+  assert (table->class == &table_unshared_class);
+  return UP_CAST (table, struct table_unshared, table);
 }
 
-/* Returns true if the table will fit in the given page LENGTH,
-   false otherwise. */
-static bool
-tabi_fits_length (int length)
-{
-  int i;
-
-  for (i = t->t; i < t->nr - t->b; i++)
-    if (t->ht + t->hb + t->h[i] > length)
-      return false;
-
-  return true;
-}
-
-/* Sets the number of header rows/columns on the left, right, top,
-   and bottom sides to HL, HR, HT, and HB, respectively. */
 static void
-tabi_set_headers (int hl, int hr, int ht, int hb)
+table_unshared_destroy (struct table *tiu_)
 {
-  t->l = hl;
-  t->r = hr;
-  t->t = ht;
-  t->b = hb;
+  struct table_unshared *tiu = table_unshared_cast (tiu_);
+  table_unref (tiu->subtable);
+  free (tiu);
 }
 
-/* Render title for current table, with major index X and minor index
-   Y.  Y may be zero, or X and Y may be zero, but X should be nonzero
-   if Y is nonzero. */
 static void
-tabi_title (int x, int y)
+table_unshared_get_cell (const struct table *tiu_, int x, int y,
+                              struct table_cell *cell)
 {
-  char buf[1024];
-  char *cp;
-
-  if (t->flags & SOMF_NO_TITLE)
-    return;
-
-  cp = spprintf (buf, "%d.%d", table_num, subtable_num);
-  if (x && y)
-    cp = spprintf (cp, "(%d:%d)", x, y);
-  else if (x)
-    cp = spprintf (cp, "(%d)", x);
-  if (command_name != NULL)
-    cp = spprintf (cp, " %s", command_name);
-  cp = stpcpy (cp, ".  ");
-  if (t->title != NULL)
-    {
-      size_t length = strlen (t->title);
-      memcpy (cp, t->title, length);
-      cp += length;
-    }
-  *cp = 0;
-
-  {
-    struct outp_text text;
-
-    text.font = OUTP_PROPORTIONAL;
-    text.justification = OUTP_LEFT;
-    text.string = ss_buffer (buf, cp - buf);
-    text.h = d->width;
-    text.v = d->font_height;
-    text.x = 0;
-    text.y = d->cp_y;
-    d->class->text_draw (d, &text);
-  }
+  struct table_unshared *tiu = table_unshared_cast (tiu_);
+  table_get_cell (tiu->subtable, x, y, cell);
 }
 
-static int render_strip (int x, int y, int r, int c1, int c2, int r1, int r2);
-
-/* Renders columns C0...C1, plus headers, of rows R0...R1,
-   at the given vertical position Y.
-   C0 and C1 count vertical rules as columns,
-   but R0 and R1 do not count horizontal rules as rows.
-   Returns the vertical position after rendering. */
 static int
-render_rows (int y, int c0, int c1, int r0, int r1)
+table_unshared_get_rule (const struct table *tiu_,
+                              enum table_axis axis, int x, int y)
 {
-  int r;
-  for (r = r0; r < r1; r++)
-    {
-      int x = d->cp_x;
-      x = render_strip (x, y, r, 0, t->l * 2 + 1, r0, r1);
-      x = render_strip (x, y, r, c0 * 2 + 1, c1 * 2, r0, r1);
-      x = render_strip (x, y, r, (t->nc - t->r) * 2, t->nc * 2 + 1, r0, r1);
-      y += (r & 1) ? t->h[r / 2] : t->hrh[r / 2];
-    }
-  return y;
+  struct table_unshared *tiu = table_unshared_cast (tiu_);
+  return table_get_rule (tiu->subtable, axis, x, y);
 }
 
-/* Draws table region (C0,R0)-(C1,R1), plus headers, at the
-   current position on the current output device.  */
-static void
-tabi_render (int c0, int r0, int c1, int r1)
-{
-  int y;
-
-  tab_hit++;
-
-  y = d->cp_y;
-  if (!(t->flags & SOMF_NO_TITLE))
-    y += d->font_height;
-
-  y = render_rows (y, c0, c1, 0, t->t * 2 + 1);
-  y = render_rows (y, c0, c1, r0 * 2 + 1, r1 * 2);
-  y = render_rows (y, c0, c1, (t->nr - t->b) * 2, t->nr * 2 + 1);
-}
-
-const struct som_table_class tab_table_class =
+static const struct table_class table_unshared_class =
   {
-    tabi_table,
-    tabi_driver,
-
-    tabi_count,
-    tabi_area,
-    NULL,
-    NULL,
-    tabi_columns,
-    NULL,
-    tabi_headers,
-    NULL,
-    tabi_cumulate,
-    tabi_flags,
-    tabi_fits_width,
-    tabi_fits_length,
-
-    NULL,
-    NULL,
-    tabi_set_headers,
-
-    tabi_title,
-    tabi_render,
+    table_unshared_destroy,
+    table_unshared_get_cell,
+    table_unshared_get_rule,
+    NULL,                       /* paste */
+    NULL,                       /* select */
   };
 \f
-static enum outp_justification
-translate_justification (unsigned int opt)
-{
-  switch (opt & TAB_ALIGN_MASK)
-    {
-    case TAB_RIGHT:
-      return OUTP_RIGHT;
-    case TAB_LEFT:
-      return OUTP_LEFT;
-    case TAB_CENTER:
-      return OUTP_CENTER;
-    default:
-      NOT_REACHED ();
-    }
-}
-
-/* Returns the line style to use for drawing a rule of the given
-   TYPE. */
-static enum outp_line_style
-rule_to_draw_type (unsigned char type)
-{
-  switch (type)
-    {
-    case TAL_0:
-    case TAL_GAP:
-      return OUTP_L_NONE;
-    case TAL_1:
-      return OUTP_L_SINGLE;
-    case TAL_2:
-      return OUTP_L_DOUBLE;
-    default:
-      NOT_REACHED ();
-    }
-}
+struct table_string
+  {
+    struct table table;
+    char *string;
+    unsigned int options;
+  };
 
-/* Returns the horizontal rule at the given column and row. */
-static int
-get_hrule (int c, int r)
-{
-  return t->rh[c + r * t->cf];
-}
+static const struct table_class table_string_class;
 
-/* Returns the vertical rule at the given column and row. */
-static int
-get_vrule (int c, int r)
+/* Returns a table that contains a single cell, whose contents are S with
+   options OPTIONS (a combination of TAB_* values).  */
+struct table *
+table_from_string (unsigned int options, const char *s)
 {
-  return t->rv[c + r * (t->cf + 1)];
+  struct table_string *ts = xmalloc (sizeof *ts);
+  table_init (&ts->table, &table_string_class);
+  ts->table.n[TABLE_HORZ] = ts->table.n[TABLE_VERT] = 1;
+  ts->string = xstrdup (s);
+  ts->options = options;
+  return &ts->table;
 }
 
-/* Renders the horizontal rule at the given column and row
-   at (X,Y) on the page. */
-static void
-render_horz_rule (int x, int y, int c, int r)
+static struct table_string *
+table_string_cast (const struct table *table)
 {
-  enum outp_line_style style = rule_to_draw_type (get_hrule (c, r));
-  if (style != OUTP_L_NONE)
-    d->class->line (d, x, y, x + t->w[c], y + t->hrh[r],
-                    OUTP_L_NONE, style, OUTP_L_NONE, style);
+  assert (table->class == &table_string_class);
+  return UP_CAST (table, struct table_string, table);
 }
 
-/* Renders the vertical rule at the given column and row
-   at (X,Y) on the page. */
 static void
-render_vert_rule (int x, int y, int c, int r)
+table_string_destroy (struct table *ts_)
 {
-  enum outp_line_style style = rule_to_draw_type (get_vrule (c, r));
-  if (style != OUTP_L_NONE)
-    d->class->line (d, x, y, x + t->wrv[c], y + t->h[r],
-                    style, OUTP_L_NONE, style, OUTP_L_NONE);
+  struct table_string *ts = table_string_cast (ts_);
+  free (ts->string);
+  free (ts);
 }
 
-/* Renders the rule intersection at the given column and row
-   at (X,Y) on the page. */
 static void
-render_rule_intersection (int x, int y, int c, int r)
+table_string_get_cell (const struct table *ts_, int x UNUSED, int y UNUSED,
+                       struct table_cell *cell)
 {
-  /* Bounds of intersection. */
-  int x0 = x;
-  int y0 = y;
-  int x1 = x + t->wrv[c];
-  int y1 = y + t->hrh[r];
-
-  /* Lines on each side of intersection. */
-  int top = r > 0 ? get_vrule (c, r - 1) : TAL_0;
-  int left = c > 0 ? get_hrule (c - 1, r) : TAL_0;
-  int bottom = r < t->nr ? get_vrule (c, r) : TAL_0;
-  int right = c < t->nc ? get_hrule (c, r) : TAL_0;
-
-  /* Output style for each line. */
-  enum outp_line_style o_top = rule_to_draw_type (top);
-  enum outp_line_style o_left = rule_to_draw_type (left);
-  enum outp_line_style o_bottom = rule_to_draw_type (bottom);
-  enum outp_line_style o_right = rule_to_draw_type (right);
-
-  if (o_top != OUTP_L_NONE || o_left != OUTP_L_NONE
-      || o_bottom != OUTP_L_NONE || o_right != OUTP_L_NONE)
-    d->class->line (d, x0, y0, x1, y1, o_top, o_left, o_bottom, o_right);
+  struct table_string *ts = table_string_cast (ts_);
+  cell->d[TABLE_HORZ][0] = 0;
+  cell->d[TABLE_HORZ][1] = 1;
+  cell->d[TABLE_VERT][0] = 0;
+  cell->d[TABLE_VERT][1] = 1;
+  cell->contents = ts->string;
+  cell->options = ts->options;
+  cell->destructor = NULL;
 }
 
-/* Returns the width of columns C1...C2 exclusive,
-   including interior but not exterior rules. */
-static int
-strip_width (int c1, int c2)
-{
-  int width = 0;
-  int c;
-
-  for (c = c1; c < c2; c++)
-    width += t->w[c] + t->wrv[c + 1];
-  if (c1 < c2)
-    width -= t->wrv[c2];
-  return width;
-}
 
-/* Returns the height of rows R1...R2 exclusive,
-   including interior but not exterior rules. */
 static int
-strip_height (int r1, int r2)
+table_string_get_rule (const struct table *ts UNUSED,
+                       enum table_axis axis UNUSED, int x UNUSED, int y UNUSED)
 {
-  int height = 0;
-  int r;
-
-  for (r = r1; r < r2; r++)
-    height += t->h[r] + t->hrh[r + 1];
-  if (r1 < r2)
-    height -= t->hrh[r2];
-  return height;
+  return TAL_0;
 }
 
-/* Renders the cell at the given column and row at (X,Y) on the
-   page.  Also renders joined cells that extend as far to the
-   right as C1 and as far down as R1. */
-static void
-render_cell (int x, int y, int c, int r, int c1, int r1)
-{
-  const int index = c + (r * t->cf);
-  unsigned char type = t->ct[index];
-  struct substring *content = &t->cc[index];
-
-  if (!(type & TAB_JOIN))
-    {
-      if (!(type & TAB_EMPTY))
-        {
-          struct outp_text text;
-          text.font = options_to_font (type);
-          text.justification = translate_justification (type);
-          text.string = *content;
-          text.h = t->w[c];
-          text.v = t->h[r];
-          text.x = x;
-          text.y = y;
-          d->class->text_draw (d, &text);
-        }
-    }
-  else
-    {
-      struct tab_joined_cell *j
-        = (struct tab_joined_cell *) ss_data (*content);
-
-      if (j->hit != tab_hit)
-        {
-          j->hit = tab_hit;
-
-          if (j->x1 == c && j->y1 == r)
-            {
-              struct outp_text text;
-              text.font = options_to_font (type);
-              text.justification = translate_justification (type);
-              text.string = j->contents;
-              text.x = x;
-              text.y = y;
-              text.h = strip_width (j->x1, MIN (j->x2, c1));
-              text.v = strip_height (j->y1, MIN (j->y2, r1));
-              d->class->text_draw (d, &text);
-            }
-        }
-    }
-}
-
-/* Render contiguous strip consisting of columns C0...C1, exclusive,
-   on row R, at (X,Y).  Returns X position after rendering.
-   Also renders joined cells that extend beyond that strip,
-   cropping them to lie within rendering region (C0,R0)-(C1,R1).
-   C0 and C1 count vertical rules as columns.
-   R counts horizontal rules as rows, but R0 and R1 do not. */
-static int
-render_strip (int x, int y, int r, int c0, int c1, int r0 UNUSED, int r1)
-{
-  int c;
-
-  for (c = c0; c < c1; c++)
-    if (c & 1)
-      {
-        if (r & 1)
-          render_cell (x, y, c / 2, r / 2, c1 / 2, r1);
-        else
-          render_horz_rule (x, y, c / 2, r / 2);
-        x += t->w[c / 2];
-      }
-    else
-      {
-        if (r & 1)
-          render_vert_rule (x, y, c / 2, r / 2);
-        else
-          render_rule_intersection (x, y, c / 2, r / 2);
-        x += t->wrv[c / 2];
-      }
-
-  return x;
-}
-
-/* Sets COMMAND_NAME as the name of the current command,
-   for embedding in output. */
-void
-tab_set_command_name (const char *command_name_)
-{
-  free (command_name);
-  command_name = command_name_ ? xstrdup (command_name_) : NULL;
-}
+static const struct table_class table_string_class =
+  {
+    table_string_destroy,
+    table_string_get_cell,
+    table_string_get_rule,
+    NULL,                       /* paste */
+    NULL,                       /* select */
+  };
index 1748c24c855e71ec8c0212dac76d00662db76f67..06427ac32b75bac0d91670840c3a10c4307b8484 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
-#if !tab_h
-#define tab_h 1
+#ifndef OUTPUT_TABLE_H
+#define OUTPUT_TABLE_H 1
 
-#include <limits.h>
-#include <libpspp/str.h>
+/* Tables.
 
-/* Cell options. */
-enum
-  {
-    TAB_NONE = 0,
+.  A table is a rectangular grid of cells.  Cells can be joined to form larger
+   cells.  Rows and columns can be separated by rules of various types.  Rows
+   at the top and bottom of a table and columns at the left and right edges of
+   a table can be designated as headers, which means that if the table must be
+   broken across more than one page, those rows or columns are repeated on each
+   page.
 
-    TAB_ALIGN_MASK = 03,       /* Alignment mask. */
-    TAB_RIGHT = 00,            /* Right justify. */
-    TAB_LEFT = 01,             /* Left justify. */
-    TAB_CENTER = 02,           /* Center. */
+   Every table is an instance of a particular table class that is responsible
+   for keeping track of cell data.  By far the most common table class is
+   struct tab_table (see output/tab.h).  This header also declares some other
+   kinds of table classes, near the end of the file.
 
-    /* Cell types. */
-    TAB_JOIN = 004,            /* Joined cell. */
-    TAB_EMPTY = 010,           /* Empty cell. */
+   A table is not itself an output_item, and thus a table cannot by itself be
+   used for output, but they can be embedded inside struct table_item (see
+   table-item.h) for that purpose. */
 
-    /* Flags. */
-    TAB_EMPH = 020,             /* Emphasize cell contents. */
-    TAB_FIX = 040,              /* Use fixed font. */
-  };
+#include <stdbool.h>
+#include <stddef.h>
 
-/* Line styles. */
-enum
-  {
-    TAL_0 = 0,                 /* No line. */
-    TAL_1 = 1,                 /* Single line. */
-    TAL_2 = 2,                 /* Double line. */
-    TAL_GAP = 3,                /* Spacing but no line. */
-    TAL_COUNT,                 /* Number of line styles. */
-  };
+struct casereader;
+struct fmt_spec;
+struct variable;
 
-/* Column styles.  Must correspond to SOM_COL_*. */
+/* Properties of a table cell. */
 enum
   {
-    TAB_COL_NONE,                      /* No columns. */
-    TAB_COL_DOWN                       /* Columns down first. */
-  };
+    TAB_NONE = 0,
 
-/* Joined cell. */
-struct tab_joined_cell
-  {
-    int x1, y1;
-    int x2, y2;
-    int hit;
-    struct substring contents;
-  };
+    /* Alignment of cell contents. */
+    TAB_RIGHT      = 0 << 0,    /* Right justify. */
+    TAB_LEFT       = 1 << 0,    /* Left justify. */
+    TAB_CENTER     = 2 << 0,    /* Centered. */
+    TAB_ALIGNMENT  = 3 << 0,   /* Alignment mask. */
 
-struct outp_driver;
-struct tab_table;
-typedef void tab_dim_func (struct tab_table *, struct outp_driver *,
-                           void *aux);
+    /* These flags may be combined with any alignment. */
+    TAB_EMPH       = 1 << 2,    /* Emphasize cell contents. */
+    TAB_FIX        = 1 << 3,    /* Use fixed font. */
 
-/* A table. */
-struct tab_table
-  {
-    struct pool *container;
-
-    /* Contents. */
-    int col_style;             /* Columns: One of TAB_COL_*. */
-    int col_group;             /* Number of rows per column group. */
-    char *title;                /* Table title. */
-    unsigned flags;            /* SOMF_*. */
-    int nc, nr;                        /* Number of columns, rows. */
-    int cf;                    /* Column factor for indexing purposes. */
-    int l, r, t, b;            /* Number of header rows on each side. */
-    struct substring *cc;      /* Cell contents; substring *[nr][nc]. */
-    unsigned char *ct;         /* Cell types; unsigned char[nr][nc]. */
-    unsigned char *rh;         /* Horiz rules; unsigned char[nr+1][nc]. */
-    unsigned char *rv;         /* Vert rules; unsigned char[nr][nc+1]. */
-    tab_dim_func *dim;         /* Calculates cell widths and heights. */
-    void *dim_aux;              /* Auxiliary data for dim function. */
-
-    /* Calculated during output. */
-    int *w;                    /* Column widths; [nc]. */
-    int *h;                    /* Row heights; [nr]. */
-    int *hrh;                  /* Heights of horizontal rules; [nr+1]. */
-    int *wrv;                  /* Widths of vertical rules; [nc+1]. */
-    int wl, wr, ht, hb;                /* Width/height of header rows/columns. */
-
-    /* Editing info. */
-    int col_ofs, row_ofs;      /* X and Y offsets. */
+    /* Bits with values (1 << TAB_FIRST_AVAILABLE) and higher are
+       not used, so they are available for subclasses to use as
+       they wish. */
+    TAB_FIRST_AVAILABLE = 4
   };
 
-/* Number of rows in TABLE. */
-#define tab_nr(TABLE) ((TABLE)->nr)
-
-/* Number of columns in TABLE. */
-#define tab_nc(TABLE) ((TABLE)->nc)
-
-/* Number of left header columns in TABLE. */
-#define tab_l(TABLE) ((TABLE)->l)
-
-/* Number of right header columns in TABLE. */
-#define tab_r(TABLE) ((TABLE)->r)
-
-/* Number of top header rows in TABLE. */
-#define tab_t(TABLE) ((TABLE)->t)
-
-/* Number of bottom header rows in TABLE. */
-#define tab_b(TABLE) ((TABLE)->b)
-
-/* Tables. */
-struct tab_table *tab_create (int nc, int nr, int reallocable);
-void tab_destroy (struct tab_table *);
-void tab_resize (struct tab_table *, int nc, int nr);
-void tab_realloc (struct tab_table *, int nc, int nr);
-void tab_headers (struct tab_table *, int l, int r, int t, int b);
-void tab_columns (struct tab_table *, int style, int group);
-void tab_title (struct tab_table *, const char *, ...)
-     PRINTF_FORMAT (2, 3);
-void tab_flags (struct tab_table *, unsigned);
-void tab_submit (struct tab_table *);
-
-/* Dimensioning. */
-tab_dim_func tab_natural_dimensions;
-int tab_natural_width (struct tab_table *t, struct outp_driver *d, int c);
-int tab_natural_height (struct tab_table *t, struct outp_driver *d, int r);
-void tab_dim (struct tab_table *, tab_dim_func *, void *aux);
-
-/* Rules. */
-void tab_hline (struct tab_table *, int style, int x1, int x2, int y);
-void tab_vline (struct tab_table *, int style, int x, int y1, int y2);
-void tab_box (struct tab_table *, int f_h, int f_v, int i_h, int i_v,
-             int x1, int y1, int x2, int y2);
-
-/* Text options, passed in the `opt' argument. */
+/* Styles for the rules around table cells. */
 enum
   {
-    TAT_NONE = 0,              /* No options. */
-    TAT_TITLE = 0x0200 | TAB_EMPH, /* Title attributes. */
-    TAT_NOWRAP = 0x0800         /* No text wrap (tab_output_text() only). */
+    TAL_0,                     /* No line. */
+    TAL_GAP,                    /* Spacing but no line. */
+    TAL_1,                     /* Single line. */
+    TAL_2,                     /* Double line. */
+    N_LINES
   };
 
-/* Cells. */
-struct fmt_spec;
-struct dictionary;
-union value;
-void tab_value (struct tab_table *, int c, int r, unsigned char opt,
-               const union value *, const struct dictionary *dict,
-               const struct fmt_spec *);
+/* Given line styles A and B (each one of the TAL_* enumeration constants
+   above), returns a line style that "combines" them, that is, that gives a
+   reasonable line style choice for a rule for different reasons should have
+   both styles A and B.
+
+   Used especially for pasting tables together (see table_paste()). */
+static inline int table_rule_combine (int a, int b)
+{
+  return a > b ? a : b;
+}
 
-void tab_fixed (struct tab_table *, int c, int r, unsigned char opt,
-               double v, int w, int d);
+/* A table axis.
 
-void tab_double (struct tab_table *, int c, int r, unsigned char opt,
-               double v, const struct fmt_spec *);
+   Many table-related declarations use 2-element arrays in place of "x" and "y"
+   variables.  This reduces code duplication significantly, because much table
+   code has treat rows and columns the same way.
 
-void tab_text (struct tab_table *, int c, int r, unsigned opt, const char *);
-void tab_text_format (struct tab_table *, int c, int r, unsigned opt,
-                      const char *, ...)
-     PRINTF_FORMAT (5, 6);
+   A lot of code that uses these enumerations assumes that the two values are 0
+   and 1, so don't change them to other values. */
+enum table_axis
+  {
+    TABLE_HORZ,
+    TABLE_VERT,
+    TABLE_N_AXES
+  };
 
-void tab_joint_text (struct tab_table *, int x1, int y1, int x2, int y2,
-                    unsigned opt, const char *);
-void tab_joint_text_format (struct tab_table *, int x1, int y1, int x2, int y2,
-                            unsigned opt, const char *, ...)
-     PRINTF_FORMAT (7, 8);
+/* A table. */
+struct table
+  {
+    const struct table_class *class;
 
-/* Cell low-level access. */
-#define tab_alloc(TABLE, AMT) pool_alloc ((TABLE)->container, (AMT))
-void tab_raw (struct tab_table *, int c, int r, unsigned opt,
-             struct substring *);
+    /* Table size.
 
-/* Editing. */
-void tab_offset (struct tab_table *, int col, int row);
-void tab_next_row (struct tab_table *);
+       n[TABLE_HORZ]: Number of columns.
+       n[TABLE_VERT]: Number of rows. */
+    int n[TABLE_N_AXES];
 
-/* Current row/column offset. */
-#define tab_row(TABLE) ((TABLE)->row_ofs)
-#define tab_col(TABLE) ((TABLE)->col_ofs)
+    /* Table headers.
 
-/* Simple output. */
-void tab_output_text (int options, const char *string);
-void tab_output_text_format (int options, const char *, ...)
-     PRINTF_FORMAT (2, 3);
+       Rows at the top and bottom of a table and columns at the left and right
+       edges of a table can be designated as headers.  If the table must be
+       broken across more than one page for output, headers rows and columns
+       are repeated on each page.
 
-/* Embedding the command name in the output. */
-void tab_set_command_name (const char *);
+       h[TABLE_HORZ][0]: Left header columns.
+       h[TABLE_HORZ][1]: Right header columns.
+       h[TABLE_VERT][0]: Top header rows.
+       h[TABLE_VERT][1]: Bottom header rows. */
+    int h[TABLE_N_AXES][2];
 
-#endif /* tab_h */
+    /* Reference count.  A table may be shared between multiple owners,
+       indicated by a reference count greater than 1.  When this is the case,
+       the table must not be modified. */
+    int ref_cnt;
+  };
 
+/* Reference counting. */
+struct table *table_ref (const struct table *);
+void table_unref (struct table *);
+bool table_is_shared (const struct table *);
+struct table *table_unshare (struct table *);
+
+/* Returns the number of columns or rows, respectively, in T. */
+static inline int table_nc (const struct table *t)
+        { return t->n[TABLE_HORZ]; }
+static inline int table_nr (const struct table *t)
+        { return t->n[TABLE_VERT]; }
+
+/* Returns the number of left, right, top, or bottom headers, respectively, in
+   T.  */
+static inline int table_hl (const struct table *t)
+        { return t->h[TABLE_HORZ][0]; }
+static inline int table_hr (const struct table *t)
+        { return t->h[TABLE_HORZ][1]; }
+static inline int table_ht (const struct table *t)
+        { return t->h[TABLE_VERT][0]; }
+static inline int table_hb (const struct table *t)
+        { return t->h[TABLE_VERT][1]; }
+
+/* Set headers. */
+void table_set_hl (struct table *, int hl);
+void table_set_hr (struct table *, int hr);
+void table_set_ht (struct table *, int ht);
+void table_set_hb (struct table *, int hb);
+\f
+/* Table classes. */
+
+/* Simple kinds of tables. */
+struct table *table_from_string (unsigned int options, const char *);
+struct table *table_from_variables (unsigned int options,
+                                    struct variable **, size_t);
+struct table *table_from_casereader (const struct casereader *,
+                                     size_t column,
+                                     const char *heading,
+                                     const struct fmt_spec *);
+
+/* Combining tables. */
+struct table *table_paste (struct table *, struct table *,
+                           enum table_axis orientation);
+struct table *table_hpaste (struct table *left, struct table *right);
+struct table *table_vpaste (struct table *top, struct table *bottom);
+
+/* Taking subsets of tables. */
+struct table *table_select (struct table *, int rect[TABLE_N_AXES][2]);
+struct table *table_select_slice (struct table *, enum table_axis,
+                                  int z0, int z1, bool add_headers);
+struct table *table_select_columns (struct table *,
+                                    int x0, int x1, bool add_headers);
+struct table *table_select_rows (struct table *,
+                                 int y0, int y1, bool add_headers);
+
+/* Miscellaneous table operations. */
+struct table *table_transpose (struct table *);
+
+#endif /* output/table.h */
diff --git a/src/output/text-item.c b/src/output/text-item.c
new file mode 100644 (file)
index 0000000..16588ae
--- /dev/null
@@ -0,0 +1,102 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <output/text-item.h>
+
+#include <assert.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+#include <libpspp/cast.h>
+#include <output/driver.h>
+#include <output/output-item-provider.h>
+
+#include "xalloc.h"
+#include "xvasprintf.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+static struct text_item *
+allocate_text_item (enum text_item_type type, char *text)
+{
+  struct text_item *item = xmalloc (sizeof *item);
+  output_item_init (&item->output_item, &text_item_class);
+  item->text = text;
+  item->type = type;
+  return item;
+}
+
+/* Creates and returns a new text item containing a copy of TEXT and the
+   specified TYPE.  The caller retains ownership of TEXT. */
+struct text_item *
+text_item_create (enum text_item_type type, const char *text)
+{
+  return allocate_text_item (type, xstrdup (text));
+}
+
+/* Creates and returns a new text item containing a copy of FORMAT, which is
+   formatted as if by printf(), and the specified TYPE.  The caller retains
+   ownership of FORMAT. */
+struct text_item *
+text_item_create_format (enum text_item_type type, const char *format, ...)
+{
+  struct text_item *item;
+  va_list args;
+
+  va_start (args, format);
+  item = allocate_text_item (type, xvasprintf (format, args));
+  va_end (args);
+
+  return item;
+}
+
+/* Returns ITEM's type. */
+enum text_item_type
+text_item_get_type (const struct text_item *item)
+{
+  return item->type;
+}
+
+/* Returns ITEM's text, which the caller may not modify or free. */
+const char *
+text_item_get_text (const struct text_item *item)
+{
+  return item->text;
+}
+
+/* Submits ITEM to the configured output drivers, and transfers ownership to
+   the output subsystem. */
+void
+text_item_submit (struct text_item *item)
+{
+  output_submit (&item->output_item);
+}
+\f
+static void
+text_item_destroy (struct output_item *output_item)
+{
+  struct text_item *item = to_text_item (output_item);
+  free (item->text);
+  free (item);
+}
+
+const struct output_item_class text_item_class =
+  {
+    text_item_destroy,
+  };
diff --git a/src/output/text-item.h b/src/output/text-item.h
new file mode 100644 (file)
index 0000000..b62e7dc
--- /dev/null
@@ -0,0 +1,133 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009 Free Sonftware Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_TEXT_ITEM_H
+#define OUTPUT_TEXT_ITEM_H 1
+
+/* Text items.
+
+   A text item is a subclass of an output item (see
+   output/output-item.h).
+
+   A text item is just a text string. */
+
+#include <stdbool.h>
+#include <libpspp/compiler.h>
+#include <output/output-item.h>
+
+enum text_item_type
+  {
+    /* Each PSPP command is bracketed between a pair of these text items.  The
+       text item's string is the full name of the command.  The syntax text
+       items associated with the command, as well as all output produced
+       directly by the command, are contained within the pair.  There is no
+       nesting. */
+    TEXT_ITEM_COMMAND_OPEN,     /* Command starting. */
+    TEXT_ITEM_COMMAND_CLOSE,    /* Command completed. */
+
+    /* Headings. */
+    TEXT_ITEM_TITLE,            /* TITLE command. */
+    TEXT_ITEM_SUBTITLE,         /* SUBTITLE command. */
+    TEXT_ITEM_SUBHEAD,          /* Heading within a command's output.*/
+
+    /* Syntax. */
+    TEXT_ITEM_SYNTAX,           /* A single line of PSPP syntax. */
+    TEXT_ITEM_COMMENT,          /* COMMENT command. */
+    TEXT_ITEM_ECHO,             /* ECHO command. */
+
+    /* Ordinary text. */
+    TEXT_ITEM_PARAGRAPH,        /* Normal paragraph of text. */
+    TEXT_ITEM_MONOSPACE,        /* Paragraph of monospaced text. */
+
+    /* Spacing.  Some output drivers that are not based on lines and pages
+       (e.g. CSV, HTML) may ignore these. */
+    TEXT_ITEM_BLANK_LINE,       /* Blank line. */
+    TEXT_ITEM_EJECT_PAGE        /* Eject page. */
+  };
+
+/* A text item. */
+struct text_item
+  {
+    struct output_item output_item;
+    char *text;                 /* The content. */
+    enum text_item_type type;   /* Type. */
+  };
+
+struct text_item *text_item_create (enum text_item_type, const char *text);
+struct text_item *text_item_create_format (enum text_item_type,
+                                           const char *format, ...)
+  PRINTF_FORMAT (2, 3);
+
+enum text_item_type text_item_get_type (const struct text_item *);
+const char *text_item_get_text (const struct text_item *);
+\f
+/* This boilerplate for text_item, a subclass of output_item, was
+   autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include <libpspp/cast.h>
+
+extern const struct output_item_class text_item_class;
+
+/* Returns true if SUPER is a text_item, otherwise false. */
+static inline bool
+is_text_item (const struct output_item *super)
+{
+  return super->class == &text_item_class;
+}
+
+/* Returns SUPER converted to text_item.  SUPER must be a text_item, as
+   reported by is_text_item. */
+static inline struct text_item *
+to_text_item (const struct output_item *super)
+{
+  assert (is_text_item (super));
+  return UP_CAST (super, struct text_item, output_item);
+}
+
+/* Returns INSTANCE converted to output_item. */
+static inline struct output_item *
+text_item_super (const struct text_item *instance)
+{
+  return CONST_CAST (struct output_item *, &instance->output_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct text_item *
+text_item_ref (const struct text_item *instance)
+{
+  return to_text_item (output_item_ref (&instance->output_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+   the reference count is now zero. */
+static inline void
+text_item_unref (struct text_item *instance)
+{
+  output_item_unref (&instance->output_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+   false otherwise. */
+static inline bool
+text_item_is_shared (const struct text_item *instance)
+{
+  return output_item_is_shared (&instance->output_item);
+}
+
+void text_item_submit (struct text_item *);
+\f
+#endif /* output/text-item.h */
index c21b681d1f289f980e8bbcd274c2743726c73275..a4eeebf11cb48e50b639928d26abad1e2a1b0381 100644 (file)
@@ -1,15 +1,12 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
 include $(top_srcdir)/src/ui/terminal/automake.mk
-if WITHGUI
 include $(top_srcdir)/src/ui/gui/automake.mk
-endif
 
 
 noinst_LTLIBRARIES += src/ui/libuicommon.la
 
 src_ui_libuicommon_la_SOURCES = \
-       src/ui/command-line.c src/ui/command-line.h \
        src/ui/debugger.c src/ui/debugger.h \
        src/ui/source-init-opts.c src/ui/source-init-opts.h \
        src/ui/syntax-gen.c src/ui/syntax-gen.h
diff --git a/src/ui/command-line.c b/src/ui/command-line.c
deleted file mode 100644 (file)
index 46dddd4..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
-
-   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 3 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, see <http://www.gnu.org/licenses/>. */
-
-
-#include <config.h>
-#include "command-line.h"
-#include <argp.h>
-#include <gl/xalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <libpspp/compiler.h>
-#include <assert.h>
-
-
-struct clp_child
-{
-  void *aux;
-};
-
-struct command_line_processor
-{
-  struct argp master_parser;
-
-  struct clp_child *child_lookup_table;
-  struct argp_child *children;
-  int n_children;
-
-  const char *doc;
-  const char *args_doc;
-
-  void *aux;
-};
-
-
-/* Convenience function for use in parsing functions.
-   Returns the object for this parser */
-struct command_line_processor *
-get_subject (struct argp_state *state)
-{
-  const struct argp *root = state->root_argp;
-
-  const struct argp_child *children = root->children;
-
-  return  (struct command_line_processor *) children[0].argp;
-}
-
-
-/* Create a command line processor.
-   DOC is typically the name of the program and short description.
-   ARGS_DOC is a short description of the non option arguments.
-   AUX is an arbitrary pointer.
- */
-struct command_line_processor *
-command_line_processor_create (const char *doc, const char *args_doc, void *aux)
-{
-  struct command_line_processor *clp = xzalloc (sizeof (*clp));
-
-  clp->children = NULL;
-  clp->child_lookup_table = NULL;
-
-  clp->doc = doc;
-  clp->args_doc = args_doc;
-  clp->aux = aux;
-
-  return clp;
-}
-
-/* Destroy a command line processor */
-void
-command_line_processor_destroy (struct command_line_processor *clp)
-{
-  free (clp->children);
-  free (clp->child_lookup_table);
-  free (clp);
-}
-
-
-/* Add a CHILD to the processor CLP, with the doc string DOC.
-   AUX is an auxilliary pointer, specific to CHILD.
-   If AUX is not known or not needed then it may be set to NULL
-*/
-void
-command_line_processor_add_options (struct command_line_processor *clp, const struct argp *child,
-                              const char *doc, void *aux)
-{
-  clp->n_children++;
-
-  clp->children = xrealloc (clp->children, (clp->n_children + 1) * sizeof (*clp->children));
-  memset (&clp->children[clp->n_children - 1], 0, sizeof (*clp->children));
-
-  clp->child_lookup_table = xrealloc (clp->child_lookup_table,
-                                     clp->n_children * sizeof (*clp->child_lookup_table));
-
-  clp->child_lookup_table [clp->n_children - 1].aux = aux;
-
-  clp->children [clp->n_children - 1].argp = child;
-  clp->children [clp->n_children - 1].header = doc;
-  clp->children [clp->n_children].argp = NULL;
-}
-
-
-/* Set the aux paramter for CHILD in CLP to AUX.
-   Any previous value will be overwritten.
- */
-void
-command_line_processor_replace_aux (struct command_line_processor *clp, const struct argp *child, void *aux)
-{
-  int i;
-  for (i = 0 ; i < clp->n_children; ++i )
-    {
-      if (child->options == clp->children[i].argp->options)
-       {
-         clp->child_lookup_table[i].aux = aux;
-         break;
-       }
-    }
-  assert (i < clp->n_children);
-}
-
-
-static error_t
-top_level_parser (int key UNUSED, char *arg UNUSED, struct argp_state *state)
-{
-  int i;
-  struct command_line_processor *clp = state->input;
-
-  if ( key == ARGP_KEY_INIT)
-    {
-
-      for (i = 0;  i < clp->n_children ; ++i)
-       {
-         state->child_inputs[i] = clp->child_lookup_table[i].aux;
-       }
-    }
-
-  return ARGP_ERR_UNKNOWN;
-}
-
-
-/* Parse the command line specified by (ARGC, ARGV) using CLP */
-void
-command_line_processor_parse (struct command_line_processor *clp, int argc, char **argv)
-{
-  clp->master_parser.parser = top_level_parser;
-  clp->master_parser.args_doc = clp->args_doc;
-
-  clp->master_parser.doc = clp->doc;
-
-  clp->master_parser.children = clp->children;
-
-  argp_parse (&clp->master_parser, argc, argv, 0, 0, clp);
-}
-
diff --git a/src/ui/command-line.h b/src/ui/command-line.h
deleted file mode 100644 (file)
index 98edbea..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
-
-   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 3 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, see <http://www.gnu.org/licenses/>. */
-
-#ifndef SRC_UI_COMMAND_LINE_H
-#define SRC_UI_COMMAND_LINE_H
-
-#include <argp.h>
-
-struct command_line_processor;
-
-struct command_line_processor * get_subject (struct argp_state *state);
-
-struct command_line_processor *command_line_processor_create (const char *, const char *, void *);
-
-void command_line_processor_add_options (struct command_line_processor *cla, const struct argp *child, const char *doc, void *aux);
-
-void command_line_processor_replace_aux (struct command_line_processor *cla, const struct argp *child, void *aux);
-
-void command_line_processor_destroy (struct command_line_processor *);
-
-void command_line_processor_parse (struct command_line_processor *, int argc, char **argv);
-
-#endif
index 765b529f4382c7d190414dbe643899c76ceb7d34..5ecf6695b3231122bc77cb05fa19844907b67bfc 100644 (file)
@@ -1,2 +1 @@
 psppire
-*.ui
diff --git a/src/ui/gui/about.c b/src/ui/gui/about.c
deleted file mode 100644 (file)
index f520762..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2006, 2007  Free Software Foundation
-
-   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 3 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, see <http://www.gnu.org/licenses/>. */
-
-
-#include <config.h>
-
-#include <gtk/gtk.h>
-
-#include <libpspp/copyleft.h>
-#include <libpspp/version.h>
-#include "about.h"
-#include "helper.h"
-
-#include <gettext.h>
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-
-static const gchar *artists[] = { "Patrick Brunier", "Dondi Bogusky", NULL};
-
-void
-about_new (GtkMenuItem *m, GtkWindow *parent)
-{
-  GtkWidget *about =  gtk_about_dialog_new ();
-
-  GdkPixbuf *pb =
-    gdk_pixbuf_new_from_file_at_size (relocate (PKGDATADIR "/pspplogo.png"),
-                                     64, 64, 0);
-
-  gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (about), pb);
-
-
-  gtk_window_set_icon_name (GTK_WINDOW (about), "psppicon");
-
-  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about),
-                               "http://www.gnu.org/software/pspp");
-
-  gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (about),
-                               bare_version);
-
-  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about),
-                               (const gchar **) authors);
-
-  gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG (about),
-                               artists);
-
-  gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (about),
-                               copyleft);
-
-  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (about),
-                                _("A program for the analysis of sampled data"));
-
-  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about),
-                                 "Free Software Foundation");
-
-  gtk_about_dialog_set_translator_credits 
-    (
-     GTK_ABOUT_DIALOG (about),
-     /* TRANSLATORS: Use this string to list the people who have helped with
-       translation to your language. */
-     _("translator-credits")
-     );
-
-  gtk_window_set_transient_for (GTK_WINDOW (about), parent);
-
-  gtk_window_set_modal (GTK_WINDOW (about), TRUE);
-
-  gtk_window_set_keep_above (GTK_WINDOW (about), TRUE);
-
-  gtk_dialog_run (GTK_DIALOG (about));
-
-  gtk_widget_hide (about);
-}
-
diff --git a/src/ui/gui/about.h b/src/ui/gui/about.h
deleted file mode 100644 (file)
index e42667a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007  Free Software Foundation
-
-   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 3 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, see <http://www.gnu.org/licenses/>. */
-
-
-
-
-void about_new (GtkMenuItem *m, GtkWindow *parent);
index 9b938cf8dcc7e986c95f1c677afd06a1857f557c..4774e2ae5ec320a0ece1073c3c197b794ab5fb3e 100644 (file)
@@ -2,6 +2,39 @@
 
 include $(top_srcdir)/src/ui/gui/sheet/automake.mk
 
+UI_FILES = \
+       src/ui/gui/binomial.ui \
+       src/ui/gui/correlation.ui \
+       src/ui/gui/crosstabs.ui \
+       src/ui/gui/chi-square.ui \
+       src/ui/gui/descriptives.ui \
+       src/ui/gui/examine.ui \
+       src/ui/gui/factor.ui \
+       src/ui/gui/find.ui \
+       src/ui/gui/frequencies.ui \
+       src/ui/gui/oneway.ui \
+       src/ui/gui/psppire.ui \
+       src/ui/gui/rank.ui \
+       src/ui/gui/sort.ui \
+       src/ui/gui/recode.ui \
+       src/ui/gui/regression.ui \
+       src/ui/gui/reliability.ui \
+       src/ui/gui/roc.ui \
+       src/ui/gui/t-test.ui \
+       src/ui/gui/text-data-import.ui \
+       src/ui/gui/var-sheet-dialogs.ui \
+       src/ui/gui/variable-info.ui \
+       src/ui/gui/data-editor.ui \
+       src/ui/gui/output-viewer.ui \
+       src/ui/gui/syntax-editor.ui
+
+EXTRA_DIST += \
+       src/ui/gui/OChangeLog \
+       src/ui/gui/psppicon.png \
+       src/ui/gui/marshaller-list \
+       src/ui/gui/pspp.desktop
+
+if HAVE_GUI
 bin_PROGRAMS += src/ui/gui/psppire 
 
 src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1
@@ -26,7 +59,8 @@ src_ui_gui_psppire_LDADD = \
        src/libpspp.la \
        src/libpspp-core.la \
        $(GTK_LIBS) \
-       @LIBINTL@
+       $(CAIRO_LIBS) \
+       $(LIBINTL)
 
 src_ui_gui_psppiredir = $(pkgdatadir)
 
@@ -46,36 +80,14 @@ INSTALL_DATA_HOOKS += install-icons
 
 uninstall-icons:
        for size in 16x16 ; do \
-          $(RM) $(themedir)/$$size/$(context)/psppicon.png ; \
+          rm -f $(themedir)/$$size/$(context)/psppicon.png ; \
        done 
        gtk-update-icon-cache --ignore-theme-index $(themedir)
 
 UNINSTALL_DATA_HOOKS += uninstall-icons
 
-
-nodist_src_ui_gui_psppire_DATA = \
-       $(top_builddir)/src/ui/gui/crosstabs.ui \
-       $(top_builddir)/src/ui/gui/descriptives-dialog.ui \
-       $(top_builddir)/src/ui/gui/data-editor.ui \
-       $(top_builddir)/src/ui/gui/examine.ui \
-       $(top_builddir)/src/ui/gui/find.ui \
-       $(top_builddir)/src/ui/gui/frequencies.ui \
-       $(top_builddir)/src/ui/gui/message-dialog.ui \
-       $(top_builddir)/src/ui/gui/psppire.ui \
-       $(top_builddir)/src/ui/gui/oneway.ui \
-       $(top_builddir)/src/ui/gui/output-viewer.ui \
-       $(top_builddir)/src/ui/gui/rank.ui \
-       $(top_builddir)/src/ui/gui/recode.ui \
-       $(top_builddir)/src/ui/gui/regression.ui \
-       $(top_builddir)/src/ui/gui/reliability.ui \
-       $(top_builddir)/src/ui/gui/syntax-editor.ui \
-       $(top_builddir)/src/ui/gui/text-data-import.ui \
-       $(top_builddir)/src/ui/gui/t-test.ui \
-       $(top_builddir)/src/ui/gui/var-sheet-dialogs.ui \
-       $(top_builddir)/src/ui/gui/variable-info-dialog.ui
-
-
 dist_src_ui_gui_psppire_DATA = \
+       $(UI_FILES) \
        $(top_srcdir)/src/ui/gui/pspplogo.png \
        $(top_srcdir)/src/ui/gui/icons/value-labels.png \
        $(top_srcdir)/src/ui/gui/icons/goto-variable.png\
@@ -101,14 +113,18 @@ src_ui_gui_psppire_SOURCES = \
        src/ui/gui/psppire-hbuttonbox.c \
        src/ui/gui/psppire-vbuttonbox.c \
        src/ui/gui/psppire-acr.c \
-       src/ui/gui/about.c \
-       src/ui/gui/about.h \
+       src/ui/gui/binomial-dialog.c \
+       src/ui/gui/binomial-dialog.h \
        src/ui/gui/checkbox-treeview.c \
        src/ui/gui/checkbox-treeview.h \
        src/ui/gui/comments-dialog.c \
        src/ui/gui/comments-dialog.h \
        src/ui/gui/compute-dialog.c \
        src/ui/gui/compute-dialog.h \
+       src/ui/gui/chi-square-dialog.c \
+       src/ui/gui/chi-square-dialog.h \
+       src/ui/gui/correlation-dialog.c \
+       src/ui/gui/correlation-dialog.h \
        src/ui/gui/crosstabs-dialog.c \
        src/ui/gui/crosstabs-dialog.h \
        src/ui/gui/customentry.c \
@@ -125,15 +141,17 @@ src_ui_gui_psppire_SOURCES = \
        src/ui/gui/executor.h \
        src/ui/gui/find-dialog.c \
        src/ui/gui/find-dialog.h \
+       src/ui/gui/factor-dialog.c \
+       src/ui/gui/factor-dialog.h \
        src/ui/gui/frequencies-dialog.c \
        src/ui/gui/frequencies-dialog.h \
        src/ui/gui/goto-case-dialog.c \
        src/ui/gui/goto-case-dialog.h \
        src/ui/gui/helper.c \
+       src/ui/gui/help-menu.c \
+       src/ui/gui/help-menu.h \
        src/ui/gui/helper.h \
        src/ui/gui/main.c \
-       src/ui/gui/message-dialog.c \
-       src/ui/gui/message-dialog.h \
        src/ui/gui/missing-val-dialog.c \
        src/ui/gui/missing-val-dialog.h \
         src/ui/gui/oneway-anova-dialog.c \
@@ -159,7 +177,11 @@ src_ui_gui_psppire_SOURCES = \
        src/ui/gui/psppire-keypad.h \
        src/ui/gui/psppire-output-window.c \
        src/ui/gui/psppire-output-window.h \
+       src/ui/gui/psppire-var-view.c \
+       src/ui/gui/psppire-var-view.h \
        src/ui/gui/psppire-selector.h \
+       src/ui/gui/psppire-select-dest.c \
+       src/ui/gui/psppire-select-dest.h \
        src/ui/gui/psppire-syntax-window.c \
        src/ui/gui/psppire-syntax-window.h \
        src/ui/gui/psppire-var-ptr.c \
@@ -181,6 +203,8 @@ src_ui_gui_psppire_SOURCES = \
        src/ui/gui/regression-dialog.h \
        src/ui/gui/reliability-dialog.c \
        src/ui/gui/reliability-dialog.h \
+       src/ui/gui/roc-dialog.c \
+       src/ui/gui/roc-dialog.h \
        src/ui/gui/select-cases-dialog.c \
        src/ui/gui/select-cases-dialog.h \
        src/ui/gui/sort-cases-dialog.c \
@@ -214,27 +238,7 @@ src_ui_gui_psppire_SOURCES = \
        src/ui/gui/widget-io.c \
        src/ui/gui/widget-io.h \
        src/ui/gui/widgets.c \
-       src/ui/gui/widgets.h \
-       src/ui/gui/crosstabs.glade \
-       src/ui/gui/descriptives-dialog.glade \
-       src/ui/gui/data-editor.glade \
-       src/ui/gui/examine.glade \
-       src/ui/gui/find.glade \
-       src/ui/gui/frequencies.glade \
-       src/ui/gui/message-dialog.glade \
-       src/ui/gui/psppire.glade \
-       src/ui/gui/oneway.glade \
-       src/ui/gui/output-viewer.glade \
-       src/ui/gui/rank.glade \
-       src/ui/gui/recode.glade \
-       src/ui/gui/regression.glade \
-       src/ui/gui/reliability.glade \
-       src/ui/gui/syntax-editor.glade \
-       src/ui/gui/text-data-import.glade \
-       src/ui/gui/t-test.glade \
-       src/ui/gui/var-sheet-dialogs.glade \
-       src/ui/gui/variable-info-dialog.glade
-
+       src/ui/gui/widgets.h
 
 nodist_src_ui_gui_psppire_SOURCES = \
        src/ui/gui/psppire-marshal.c \
@@ -257,24 +261,15 @@ AM_CPPFLAGS += -Isrc
 
 src/ui/gui/psppire-marshal.c: src/ui/gui/marshaller-list
        echo '#include <config.h>' > $@
-       glib-genmarshal --body --prefix=psppire_marshal $< >> $@
+       $(GLIB_GENMARSHAL) --body --prefix=psppire_marshal $? >> $@
 
 src/ui/gui/psppire-marshal.h: src/ui/gui/marshaller-list
-       glib-genmarshal --header --prefix=psppire_marshal $< > $@
-
-.glade.ui:
-       $(top_srcdir)/lib/gtk-contrib/gtk-builder-convert $< $@
+       $(GLIB_GENMARSHAL) --header --prefix=psppire_marshal $? > $@
 
 desktopdir = $(datadir)/applications
 desktop_DATA = src/ui/gui/pspp.desktop
 
-EXTRA_DIST += src/ui/gui/OChangeLog\
-       src/ui/gui/psppicon.png \
-       src/ui/gui/marshaller-list \
-       $(desktop_DATA)
-
 BUILT_SOURCES += src/ui/gui/psppire-marshal.c src/ui/gui/psppire-marshal.h
 CLEANFILES += src/ui/gui/psppire-marshal.c src/ui/gui/psppire-marshal.h \
        $(nodist_src_ui_gui_psppire_DATA)
-
-
+endif HAVE_GUI
diff --git a/src/ui/gui/binomial-dialog.c b/src/ui/gui/binomial-dialog.c
new file mode 100644 (file)
index 0000000..130c3dd
--- /dev/null
@@ -0,0 +1,211 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2010  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "binomial-dialog.h"
+
+#include <language/syntax-string-source.h>
+
+#include "psppire-dialog.h"
+#include "psppire-var-view.h"
+#include "psppire-acr.h"
+#include "dialog-common.h"
+
+#include "helper.h"
+#include "executor.h"
+
+
+#include <gtk/gtk.h>
+
+struct binomial_dialog
+{
+  PsppireDict *dict;
+  GtkWidget *var_view;
+
+  GtkWidget *button1;
+
+  GtkWidget *prop_entry;
+
+  GtkWidget *cutpoint_button;
+  GtkWidget *cutpoint_entry;
+};
+
+static void
+set_sensitivity (GtkToggleButton *button, GtkWidget *w)
+{
+  gboolean state = gtk_toggle_button_get_active (button);
+  gtk_widget_set_sensitive (w, state);
+}
+
+
+static gboolean
+get_proportion (const struct binomial_dialog *bin_d, double *prop)
+{
+    const gchar *text = gtk_entry_get_text (GTK_ENTRY (bin_d->prop_entry));
+    gchar *endptr = NULL;
+     *prop = g_strtod (text, &endptr);
+
+    if (endptr == text)
+      return FALSE;
+
+    return TRUE; 
+}
+
+static gboolean
+dialog_state_valid (gpointer data)
+{
+  double prop;
+  struct binomial_dialog *bin_d = data;
+
+  GtkTreeModel *vars =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (bin_d->var_view));
+
+  GtkTreeIter notused;
+
+  if ( !gtk_tree_model_get_iter_first (vars, &notused) )
+    return FALSE;
+
+  if ( ! get_proportion (bin_d, &prop))
+    return FALSE;
+
+  if (prop < 0 || prop > 1.0)
+    return FALSE;
+
+  return TRUE;
+}
+
+
+static void
+refresh (struct binomial_dialog *bin_d)
+{
+  GtkTreeModel *liststore =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (bin_d->var_view));
+
+  gtk_list_store_clear (GTK_LIST_STORE (liststore));
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bin_d->button1), TRUE);
+
+  gtk_entry_set_text (GTK_ENTRY (bin_d->prop_entry), "0.5");
+
+  gtk_entry_set_text (GTK_ENTRY (bin_d->cutpoint_entry), "");
+}
+
+
+
+static char *
+generate_syntax (const struct binomial_dialog *scd)
+{
+  gchar *text;
+  double prop;
+  GString *string;
+
+  string = g_string_new ("NPAR TEST\n\t/BINOMIAL");
+
+  if ( get_proportion (scd, &prop))
+    g_string_append_printf (string, "(%g)", prop);
+
+  g_string_append (string, " =");
+
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (scd->var_view), 0, string);
+
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->cutpoint_button)))
+    {
+      const gchar *cutpoint = gtk_entry_get_text (GTK_ENTRY (scd->cutpoint_entry));
+      g_string_append_printf (string, "(%s)", cutpoint);
+    }
+
+  g_string_append (string, ".\n");
+
+  text = string->str;
+
+  g_string_free (string, FALSE);
+
+  return text;
+}
+
+
+
+/* Pops up the Chi-Square dialog box */
+void
+binomial_dialog (PsppireDataWindow *dw)
+{
+  gint response;
+
+  struct binomial_dialog bin_d;
+
+  GtkBuilder *xml = builder_new ("binomial.ui");
+  PsppireVarStore *vs;
+
+  GtkWidget *dialog = get_widget_assert   (xml, "binomial-dialog");
+
+
+
+  GtkWidget *dict_view = get_widget_assert   (xml, "dict-view");
+
+  g_object_get (dw->data_editor, "var-store", &vs, NULL);
+
+  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (dw));
+
+  bin_d.var_view  = get_widget_assert (xml, "variables-treeview");
+  bin_d.button1   = get_widget_assert (xml, "radiobutton3");
+  bin_d.prop_entry = get_widget_assert (xml, "proportion-entry");
+
+  bin_d.cutpoint_entry =     get_widget_assert   (xml, "cutpoint-entry");
+  bin_d.cutpoint_button =    get_widget_assert   (xml, "radiobutton4");
+
+  g_object_get (vs, "dictionary", &bin_d.dict, NULL);
+  g_object_set (dict_view,
+               "model", bin_d.dict, 
+               "predicate", var_is_numeric,
+               NULL);
+
+  g_signal_connect (bin_d.cutpoint_button, "toggled", G_CALLBACK (set_sensitivity),
+                   bin_d.cutpoint_entry);
+
+  g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh),  &bin_d);
+
+  psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
+                                     dialog_state_valid, &bin_d);
+
+  response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
+
+
+  switch (response)
+    {
+    case GTK_RESPONSE_OK:
+      {
+       gchar *syntax = generate_syntax (&bin_d);
+
+       struct getl_interface *sss = create_syntax_string_source (syntax);
+       execute_syntax (sss);
+
+       g_free (syntax);
+      }
+      break;
+    case PSPPIRE_RESPONSE_PASTE:
+      {
+       gchar *syntax = generate_syntax (&bin_d);
+       paste_syntax_to_window (syntax);
+       g_free (syntax);
+      }
+      break;
+    default:
+      break;
+    }
+
+  g_object_unref (xml);
+}
diff --git a/src/ui/gui/binomial-dialog.h b/src/ui/gui/binomial-dialog.h
new file mode 100644 (file)
index 0000000..8f2f9a1
--- /dev/null
@@ -0,0 +1,25 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2010  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef __BINOMIAL_DIALOG_H
+#define __BINOMIAL_DIALOG_H
+
+#include <gtk/gtk.h>
+#include "psppire-data-window.h"
+
+void binomial_dialog (PsppireDataWindow * data);
+
+#endif
diff --git a/src/ui/gui/binomial.ui b/src/ui/gui/binomial.ui
new file mode 100644 (file)
index 0000000..d078391
--- /dev/null
@@ -0,0 +1,253 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <requires lib="psppire" version="2053.63976"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="PsppireDialog" id="binomial-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Binomial Test</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox13">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <object class="GtkTable" id="table1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="n_rows">3</property>
+            <property name="n_columns">3</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow5">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="dict-view">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="headers_visible">False</property>
+                    <property name="headers_clickable">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Test Variable List:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="PsppireVarView" id="variables-treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                        <property name="headers_clickable">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireSelector" id="psppire-selector1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">dict-view</property>
+                <property name="dest_widget">variables-treeview</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options">GTK_EXPAND</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox4">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton3">
+                            <property name="label" translatable="yes">_Get from data</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox1">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkRadioButton" id="radiobutton4">
+                                <property name="label" translatable="yes">_Cut point:</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">radiobutton3</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="cutpoint-entry">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x2022;</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Define Dichotomy</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options">GTK_FILL</property>
+                <property name="x_padding">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox2">
+                <property name="visible">True</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Test _Proportion:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="proportion-entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x2022;</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 837fcc789550e13b0463dc28987ca5c34c967985..de85d18ad52aab45f4b6f8ce5b12e280ad2c144e 100644 (file)
@@ -62,7 +62,7 @@ treeview_create_checkbox_model (GtkTreeView *treeview,
       GtkTreeIter iter;
       gtk_list_store_append (list, &iter);
       gtk_list_store_set (list, &iter,
-                          CHECKBOX_COLUMN_LABEL, items[i].label,
+                          CHECKBOX_COLUMN_LABEL, gettext (items[i].label),
                           CHECKBOX_COLUMN_SELECTED,
                          (default_items & (1u << i)) != 0,
                           -1);
diff --git a/src/ui/gui/chi-square-dialog.c b/src/ui/gui/chi-square-dialog.c
new file mode 100644 (file)
index 0000000..6bb42e4
--- /dev/null
@@ -0,0 +1,254 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2010  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "chi-square-dialog.h"
+
+#include <language/syntax-string-source.h>
+
+#include "psppire-dialog.h"
+#include "psppire-var-view.h"
+#include "psppire-acr.h"
+#include "dialog-common.h"
+
+#include "helper.h"
+#include "executor.h"
+
+
+#include <gtk/gtk.h>
+
+struct chisquare_dialog
+{
+  PsppireDict *dict;
+  GtkWidget *var_view;
+
+  GtkWidget *button1;
+  GtkWidget *button2;
+
+  GtkWidget *range_button;
+  GtkWidget *value_lower;
+  GtkWidget *value_upper;
+
+  GtkWidget *values_button;
+
+  GtkListStore *expected_list;
+};
+
+static void
+set_sensitivity (GtkToggleButton *button, GtkWidget *w)
+{
+  gboolean state = gtk_toggle_button_get_active (button);
+  gtk_widget_set_sensitive (w, state);
+}
+
+
+static gboolean
+dialog_state_valid (gpointer data)
+{
+  struct chisquare_dialog *csd = data;
+
+  GtkTreeModel *vars =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (csd->var_view));
+
+  GtkTreeIter notused;
+
+  if ( !gtk_tree_model_get_iter_first (vars, &notused) )
+    return FALSE;
+
+  return TRUE;
+}
+
+
+static void
+refresh (struct chisquare_dialog *csd)
+{
+  GtkTreeModel *liststore =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (csd->var_view));
+
+  gtk_list_store_clear (GTK_LIST_STORE (liststore));
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (csd->button1), TRUE);
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (csd->button2), TRUE);
+}
+
+
+
+static char *
+generate_syntax (const struct chisquare_dialog *scd)
+{
+  gchar *text;
+  GString *string;
+
+
+  string = g_string_new ("NPAR TEST\n\t/CHISQUARE=");
+
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (scd->var_view), 0, string);
+
+
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->range_button)))
+    {
+      g_string_append (string, "(");
+      
+      g_string_append (string, 
+                      gtk_entry_get_text (GTK_ENTRY (scd->value_lower)));
+
+      g_string_append (string, ", ");
+
+      g_string_append (string,
+                      gtk_entry_get_text (GTK_ENTRY (scd->value_upper)));
+
+      g_string_append (string, ")");
+    }
+
+
+
+
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->values_button)))
+    {
+      GtkListStore *ls = scd->expected_list;
+      GtkTreeIter iter;
+      gboolean ok;
+
+      g_string_append (string, "\n\t");
+      g_string_append (string, "/EXPECTED = ");
+
+      
+      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL(ls),
+                                              &iter);
+          ok;
+          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (ls), &iter))
+       {
+         gdouble v;
+
+         gtk_tree_model_get (GTK_TREE_MODEL (ls), &iter, 0, &v, -1);
+
+         g_string_append_printf (string, " %g", v);
+       }
+
+
+
+    }
+
+  g_string_append (string, ".\n");
+
+  text = string->str;
+
+  g_string_free (string, FALSE);
+
+  return text;
+}
+
+
+
+/* Pops up the Chi-Square dialog box */
+void
+chisquare_dialog (PsppireDataWindow *dw)
+{
+  gint response;
+
+  struct chisquare_dialog csd;
+
+  GtkBuilder *xml = builder_new ("chi-square.ui");
+  PsppireVarStore *vs;
+
+  GtkWidget *dialog = get_widget_assert   (xml, "chisquare-dialog");
+
+  GtkWidget *range_table = get_widget_assert   (xml, "range-table");
+
+
+
+  GtkWidget *values_acr = get_widget_assert   (xml, "psppire-acr1");
+  GtkWidget *expected_value_entry =
+    get_widget_assert   (xml, "expected-value-entry");
+
+
+  GtkWidget *dict_view = get_widget_assert   (xml, "dict-view");
+
+  csd.expected_list = gtk_list_store_new (1, G_TYPE_DOUBLE);
+
+  csd.button1 = get_widget_assert   (xml, "radiobutton1");
+  csd.button2 = get_widget_assert   (xml, "radiobutton3");
+  csd.var_view = get_widget_assert   (xml, "variables-treeview");
+
+  csd.range_button = get_widget_assert   (xml, "radiobutton4");
+  csd.value_lower = get_widget_assert   (xml, "entry1");
+  csd.value_upper = get_widget_assert   (xml, "entry2");
+
+  csd.values_button = get_widget_assert   (xml, "radiobutton2");
+
+  g_object_get (dw->data_editor, "var-store", &vs, NULL);
+
+  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (dw));
+
+  g_object_get (vs, "dictionary", &csd.dict, NULL);
+  g_object_set (dict_view,
+               "model", csd.dict, 
+               "predicate", var_is_numeric,
+               NULL);
+
+
+  g_signal_connect (csd.range_button, "toggled", G_CALLBACK (set_sensitivity), 
+                   range_table);
+
+
+  g_signal_connect (csd.values_button, "toggled", G_CALLBACK (set_sensitivity), 
+                   values_acr);
+
+  g_signal_connect (csd.values_button, "toggled", G_CALLBACK (set_sensitivity), 
+                   expected_value_entry);
+
+
+  psppire_acr_set_entry (PSPPIRE_ACR (values_acr),
+                        GTK_ENTRY (expected_value_entry));
+
+  psppire_acr_set_model(PSPPIRE_ACR (values_acr), csd.expected_list);
+
+  g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh),  &csd);
+
+  psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
+                                     dialog_state_valid, &csd);
+
+  response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
+
+
+  switch (response)
+    {
+    case GTK_RESPONSE_OK:
+      {
+       gchar *syntax = generate_syntax (&csd);
+
+       struct getl_interface *sss = create_syntax_string_source (syntax);
+       execute_syntax (sss);
+
+       g_free (syntax);
+      }
+      break;
+    case PSPPIRE_RESPONSE_PASTE:
+      {
+       gchar *syntax = generate_syntax (&csd);
+       paste_syntax_to_window (syntax);
+       g_free (syntax);
+      }
+      break;
+    default:
+      break;
+    }
+
+  g_object_unref (xml);
+}
diff --git a/src/ui/gui/chi-square-dialog.h b/src/ui/gui/chi-square-dialog.h
new file mode 100644 (file)
index 0000000..8292ff9
--- /dev/null
@@ -0,0 +1,25 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2010  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef __CHI_SQUARE_DIALOG_H
+#define __CHI_SQUARE_DIALOG_H
+
+#include <gtk/gtk.h>
+#include "psppire-data-window.h"
+
+void chisquare_dialog (PsppireDataWindow * data);
+
+#endif
diff --git a/src/ui/gui/chi-square.ui b/src/ui/gui/chi-square.ui
new file mode 100644 (file)
index 0000000..5bcc08d
--- /dev/null
@@ -0,0 +1,339 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <requires lib="psppire" version="2053.63976"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="PsppireDialog" id="chisquare-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Chi-Square Test</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox13">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <object class="GtkTable" id="table1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="n_rows">2</property>
+            <property name="n_columns">3</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow5">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="dict-view">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="headers_visible">False</property>
+                    <property name="headers_clickable">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Test Variable List:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="PsppireVarView" id="variables-treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                        <property name="headers_clickable">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireSelector" id="psppire-selector1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">dict-view</property>
+                <property name="dest_widget">variables-treeview</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options">GTK_EXPAND</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox4">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton3">
+                            <property name="label" translatable="yes">_Get from data</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton4">
+                            <property name="label" translatable="yes">Use _specified range</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton3</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkTable" id="range-table">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">5</property>
+                            <child>
+                              <object class="GtkLabel" id="label4">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">_Lower:</property>
+                                <property name="use_markup">True</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label5">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">_Upper:</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="entry1">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x2022;</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="entry2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x2022;</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Expected Range:</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+                <property name="x_padding">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox3">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton1">
+                            <property name="label" translatable="yes">All categor_ies equal</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox1">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkRadioButton" id="radiobutton2">
+                                <property name="label" translatable="yes">_Values</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">radiobutton1</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="expected-value-entry">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x2022;</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="PsppireAcr" id="psppire-acr1">
+                            <property name="visible">True</property>
+                            <property name="border_width">5</property>
+                          </object>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Expected Values:</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+                <property name="x_padding">5</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 02d6d96c763d3064840fe72ebcd6d590aaa4acf7..306e3b40a20846b3c0512bec74783d19b70315bb 100644 (file)
@@ -91,11 +91,10 @@ wrap_line (GtkTextBuffer *buffer,
 
 
 void
-comments_dialog (GObject *o, gpointer data)
+comments_dialog (PsppireDataWindow *de)
 {
   GtkTextIter iter;
   gint response ;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
   struct comment_dialog cd;
 
   GtkBuilder *xml = builder_new ("psppire.ui");
@@ -178,7 +177,7 @@ comments_dialog (GObject *o, gpointer data)
       {
        gchar *syntax = generate_syntax (&cd);
 
-       paste_syntax_in_new_window (syntax);
+       paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
index bccd8e5e8690e2d745a37eb3f02a14427dd3b1ea..9295d4c3a2302a9ddaa6c66a679b04f71f56b846 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef COMMENTS_DIALOG_H
 #define COMMENTS_DIALOG_H
 
-void comments_dialog (GObject *o, gpointer data);
+#include "psppire-data-window.h"
+
+void comments_dialog (PsppireDataWindow * data);
 
 #endif /*  COMMENTS_DIALOG_H */
index c09c7571936fa4e4ca493bd0647b2586629caa6d..7add5379908595ddd7b046d6930a784031777208 100644 (file)
@@ -363,10 +363,9 @@ contents_plausible (gpointer data)
 
 /* Pops up the Compute dialog box */
 void
-compute_dialog (GObject *o, gpointer data)
+compute_dialog (PsppireDataWindow *de)
 {
   gint response;
-  PsppireDataWindow *de = data;
 
   PsppireVarStore *vs = NULL;
   struct compute_dialog scd;
@@ -379,7 +378,6 @@ compute_dialog (GObject *o, gpointer data)
   GtkWidget *functions = get_widget_assert (xml, "compute-treeview2");
   GtkWidget *keypad    = get_widget_assert (xml, "psppire-keypad1");
   GtkWidget *target    = get_widget_assert (xml, "compute-entry1");
-  GtkWidget *syntax_area = get_widget_assert (xml, "compute-textview1");
   GtkWidget *var_selector = get_widget_assert (xml, "compute-selector1");
   GtkWidget *func_selector = get_widget_assert (xml, "compute-selector2");
   GtkWidget *type_and_label = get_widget_assert (xml, "compute-button1");
@@ -398,25 +396,17 @@ compute_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   
-  g_object_set (dict_view, "dictionary", scd.dict,
+  g_object_set (dict_view, "model", scd.dict,
                "selection-mode", GTK_SELECTION_SINGLE,
                NULL);
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (var_selector),
-                                dict_view, syntax_area,
-                                insert_source_row_into_text_view,
-                                NULL,
-                                NULL);
-
+  psppire_selector_set_select_func (PSPPIRE_SELECTOR (var_selector),
+                                   insert_source_row_into_text_view, NULL);
 
   function_list_populate (GTK_TREE_VIEW (functions));
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (func_selector),
-                                functions, syntax_area,
-                                insert_function_into_syntax_area,
-                                NULL,
-                                NULL);
-
+  psppire_selector_set_select_func (PSPPIRE_SELECTOR (func_selector),
+                                   insert_function_into_syntax_area, NULL);
 
   scd.xml = xml;
 
@@ -458,7 +448,7 @@ compute_dialog (GObject *o, gpointer data)
       {
        gchar *syntax = generate_syntax (&scd);
 
-       paste_syntax_in_new_window (syntax);
+       paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
index 3611865e15de360bf1fa8d5688e14bbcbf547a20..4594f5c2797de8f5e3dc6ac998124c71c6cda71c 100644 (file)
@@ -19,7 +19,8 @@
 
 
 #include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-void compute_dialog (GObject *o, gpointer data);
+void compute_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/correlation-dialog.c b/src/ui/gui/correlation-dialog.c
new file mode 100644 (file)
index 0000000..04e11ba
--- /dev/null
@@ -0,0 +1,179 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dialog-common.h"
+#include <language/syntax-string-source.h>
+#include <ui/syntax-gen.h>
+#include <libpspp/str.h>
+
+#include "correlation-dialog.h"
+#include "psppire-selector.h"
+#include "psppire-dictview.h"
+#include "psppire-dialog.h"
+
+#include "psppire-data-window.h"
+#include "psppire-var-view.h"
+
+#include "executor.h"
+#include "helper.h"
+
+#include <gtk/gtk.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
+struct correlation
+{
+  PsppireDict *dict;
+
+  GtkWidget *variables ;
+
+  GtkWidget *significant;
+  GtkWidget *two_tailed;
+};
+
+
+static char * generate_syntax (const struct correlation *rd);
+
+
+static void
+refresh (struct correlation *rd)
+{
+  GtkTreeModel *liststore =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variables));
+  gtk_list_store_clear (GTK_LIST_STORE (liststore));
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->significant), FALSE);
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->two_tailed), TRUE);
+}
+
+
+static gboolean
+dialog_state_valid (gpointer data)
+{
+  struct correlation *corr = data;
+
+  GtkTreeModel *liststore =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (corr->variables));
+
+  if  (gtk_tree_model_iter_n_children (liststore, NULL) >= 1)
+    return TRUE;
+
+  return FALSE;
+}
+
+
+/* Pops up the Correlation dialog box */
+void
+correlation_dialog (PsppireDataWindow *de)
+{
+  struct correlation rd;
+  gint response;
+
+  GtkBuilder *xml = builder_new ("correlation.ui");
+  PsppireVarStore *vs;
+
+  GtkWidget *dialog = get_widget_assert   (xml, "correlation-dialog");
+  GtkWidget *source = get_widget_assert   (xml, "dict-view");
+
+  g_object_get (de->data_editor, "var-store", &vs, NULL);
+
+  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
+
+  g_object_get (vs, "dictionary", &rd.dict, NULL);
+  g_object_set (source,
+               "model", rd.dict, 
+               "predicate", var_is_numeric,
+               NULL);
+
+  rd.variables = get_widget_assert (xml, "psppire-var-view1");
+  rd.significant = get_widget_assert (xml, "button-flag-significants");
+  rd.two_tailed = get_widget_assert (xml, "button-two-tailed");
+
+  g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh),  &rd);
+
+  psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
+                                     dialog_state_valid, &rd);
+
+  response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
+
+  switch (response)
+    {
+    case GTK_RESPONSE_OK:
+      {
+       gchar *syntax = generate_syntax (&rd);
+
+       struct getl_interface *sss = create_syntax_string_source (syntax);
+       execute_syntax (sss);
+
+       g_free (syntax);
+      }
+      break;
+    case PSPPIRE_RESPONSE_PASTE:
+      {
+       gchar *syntax = generate_syntax (&rd);
+        paste_syntax_to_window (syntax);
+
+       g_free (syntax);
+      }
+      break;
+    default:
+      break;
+    }
+
+  g_object_unref (xml);
+}
+
+
+\f
+
+static char *
+generate_syntax (const struct correlation *rd)
+{
+  gchar *text;
+  GString *string = g_string_new ("CORRELATION");
+  g_string_append (string, "\n\t/VARIABLES = ");
+
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->variables), 0, string);
+
+
+  g_string_append (string, "\n\t/PRINT =");
+
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->two_tailed)))
+    g_string_append (string, " TWOTAIL");
+  else
+    g_string_append (string, " ONETAIL");
+
+
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->significant)))
+    g_string_append (string, " NOSIG");
+  else
+    g_string_append (string, " SIG");
+
+
+  g_string_append (string, ".\n");
+
+  text = string->str;
+
+  g_string_free (string, FALSE);
+
+  return text;
+}
diff --git a/src/ui/gui/correlation-dialog.h b/src/ui/gui/correlation-dialog.h
new file mode 100644 (file)
index 0000000..f9342f2
--- /dev/null
@@ -0,0 +1,25 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef __CORRELATION_DIALOG_H
+#define __CORRELATION_DIALOG_H
+
+#include <gtk/gtk.h>
+#include "psppire-data-window.h"
+
+void correlation_dialog (PsppireDataWindow * data);
+
+#endif
diff --git a/src/ui/gui/correlation.ui b/src/ui/gui/correlation.ui
new file mode 100644 (file)
index 0000000..1fad344
--- /dev/null
@@ -0,0 +1,265 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires psppire 0.0 -->
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="correlation-dialog">
+    <property name="title" translatable="yes">Bivariate Correlations</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="PsppireDictView" id="dict-view">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="border_width">5</property>
+                        <property name="headers_visible">False</property>
+                        <property name="headers_clickable">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="PsppireSelector" id="psppire-selector1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="border_width">5</property>
+                        <property name="source_widget">dict-view</property>
+                        <property name="dest_widget">psppire-var-view1</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">5</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="PsppireVarView" id="psppire-var-view1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="border_width">5</property>
+                        <property name="headers_visible">False</property>
+                        <property name="headers_clickable">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkHButtonBox" id="hbuttonbox2">
+                        <property name="visible">True</property>
+                        <property name="layout_style">start</property>
+                        <child>
+                          <object class="GtkCheckButton" id="button-pearson">
+                            <property name="label" translatable="yes">Pearso_n</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="button-kendall">
+                            <property name="label" translatable="yes">_Kendall's tau-b</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="button-spearman">
+                            <property name="label" translatable="yes">_Spearman</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Correlation Coefficients</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkHButtonBox" id="hbuttonbox1">
+                        <property name="visible">True</property>
+                        <property name="layout_style">start</property>
+                        <child>
+                          <object class="GtkRadioButton" id="button-two-tailed">
+                            <property name="label" translatable="yes">_Two-tailed</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="button-one-tailed">
+                            <property name="label" translatable="yes">One-tai_led</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">button-two-tailed</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Test of Significance</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="button-flag-significants">
+                <property name="label" translatable="yes">_Flag significant correlations</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">2</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 019d8c361dffe49c35b58b2f2799f701abd392b8..7d94e375c0ab3042e91edb9e7ee239a1f6f15a01 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "checkbox-treeview.h"
 #include "crosstabs-dialog.h"
+#include "psppire-var-view.h"
 
 #include <gtk/gtk.h>
 #include <stdlib.h>
@@ -259,9 +260,9 @@ generate_syntax (const struct crosstabs_dialog *cd)
   GString *string = g_string_new ("CROSSTABS");
 
   g_string_append (string, "\n\t/TABLES=");
-  append_variable_names (string, cd->dict, GTK_TREE_VIEW (cd->row_vars), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (cd->row_vars), 0, string);
   g_string_append (string, "\tBY\t");
-  append_variable_names (string, cd->dict, GTK_TREE_VIEW (cd->col_vars), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (cd->col_vars), 0, string);
 
   g_string_append (string, "\n\t/FORMAT=");
 
@@ -382,7 +383,7 @@ dialog_state_valid (gpointer data)
 
 /* Pops up the Crosstabs dialog box */
 void
-crosstabs_dialog (GObject *o, gpointer data)
+crosstabs_dialog (PsppireDataWindow *de)
 {
   gint response;
   struct crosstabs_dialog cd;
@@ -391,15 +392,11 @@ crosstabs_dialog (GObject *o, gpointer data)
   PsppireVarStore *vs = NULL;
   PsppireDict *dict = NULL;
 
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
-
 
   GtkWidget *dialog = get_widget_assert   (xml, "crosstabs-dialog");
   GtkWidget *source = get_widget_assert   (xml, "dict-treeview");
   GtkWidget *dest_rows =   get_widget_assert   (xml, "rows");
   GtkWidget *dest_cols =   get_widget_assert   (xml, "cols");
-  GtkWidget *row_selector = get_widget_assert (xml, "row-selector");
-  GtkWidget *col_selector = get_widget_assert (xml, "col-selector");
   GtkWidget *format_button = get_widget_assert (xml, "format-button");
   GtkWidget *stat_button = get_widget_assert (xml, "stats-button");
   GtkWidget *cell_button = get_widget_assert (xml, "cell-button");
@@ -424,24 +421,7 @@ crosstabs_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   g_object_get (vs, "dictionary", &dict, NULL);
-  g_object_set (source, "dictionary", dict, NULL);
-
-  set_dest_model (GTK_TREE_VIEW (dest_rows), dict);
-  set_dest_model (GTK_TREE_VIEW (dest_cols), dict);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (row_selector),
-                                source,
-                                dest_rows,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (col_selector),
-                                source,
-                                dest_cols,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
+  g_object_set (source, "model", dict, NULL);
 
   cd.row_vars = GTK_TREE_VIEW (dest_rows);
   cd.col_vars = GTK_TREE_VIEW (dest_cols);
@@ -497,7 +477,7 @@ crosstabs_dialog (GObject *o, gpointer data)
       {
        gchar *syntax = generate_syntax (&cd);
 
-       paste_syntax_in_new_window (syntax);
+       paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
index 11da9814cfa462a37ab2960c5c16226f99b6b3ed..dee6110b865f302c0d57b9ebc31c93b8ec8922a1 100644 (file)
@@ -19,8 +19,8 @@
 
 
 #include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-
-void crosstabs_dialog (GObject *o, gpointer data);
+void crosstabs_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/crosstabs.glade b/src/ui/gui/crosstabs.glade
deleted file mode 100644 (file)
index 0409d9e..0000000
+++ /dev/null
@@ -1,465 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.2 on Thu Feb  7 10:02:16 2008 by jhs@debs-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="crosstabs-dialog">
-    <property name="title">Crosstabs</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkTable" id="table1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="n_rows">3</property>
-            <property name="n_columns">3</property>
-            <child>
-              <widget class="GtkFrame" id="frame1">
-                <property name="visible">True</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment4">
-                    <property name="visible">True</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="rows">
-                            <property name="visible">True</property>
-                            <property name="headers_visible">False</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Rows</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="frame2">
-                <property name="visible">True</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment5">
-                    <property name="visible">True</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="cols">
-                            <property name="visible">True</property>
-                            <property name="headers_visible">False</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Columns</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                <child>
-                  <widget class="PsppireDictView" id="dict-treeview">
-                    <property name="visible">True</property>
-                    <property name="headers_visible">False</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHButtonBox" id="hbuttonbox3">
-                <property name="visible">True</property>
-                <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-                <child>
-                  <widget class="GtkButton" id="format-button">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Format...</property>
-                    <property name="response_id">0</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="stats-button">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Statistics...</property>
-                    <property name="response_id">0</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="cell-button">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Cells...</property>
-                    <property name="response_id">0</property>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="right_attach">3</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireSelector" id="row-selector">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">5</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="x_options"></property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireSelector" id="col-selector">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">5</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options"></property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="format-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Crosstabs: Format</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkCheckButton" id="print-tables">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Print tables</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkCheckButton" id="pivot">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Pivot</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkCheckButton" id="ascending">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Ascending</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="Labeling">
-                <property name="visible">True</property>
-                <property name="label_xalign">0</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox2">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton1">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Label</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton2">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">No label</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton3">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Suppress value labels</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label4">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Labeling</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="homogeneous">True</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="cell-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Crosstabs: Cells</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox3">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">GTK_SHADOW_NONE</property>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow4">
-                <property name="width_request">128</property>
-                <property name="height_request">180</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <child>
-                  <widget class="GtkTreeView" id="cell-view">
-                    <property name="visible">True</property>
-                    <property name="headers_visible">False</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="frame3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Cell Display</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="stat-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Crosstabs: Statistics</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox4">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">GTK_SHADOW_NONE</property>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow5">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <child>
-                  <widget class="GtkTreeView" id="stats-view">
-                    <property name="width_request">128</property>
-                    <property name="height_request">150</property>
-                    <property name="visible">True</property>
-                    <property name="headers_visible">False</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Statistics</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/crosstabs.ui b/src/ui/gui/crosstabs.ui
new file mode 100644 (file)
index 0000000..7f0c028
--- /dev/null
@@ -0,0 +1,489 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <requires lib="psppire" version="2054.22072"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="PsppireDialog" id="crosstabs-dialog">
+    <property name="title" translatable="yes">Crosstabs</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkTable" id="table1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="n_rows">3</property>
+            <property name="n_columns">3</property>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment4">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="rows">
+                            <property name="visible">True</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Rows</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment5">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="cols">
+                            <property name="visible">True</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Columns</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="dict-treeview">
+                    <property name="visible">True</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHButtonBox" id="hbuttonbox3">
+                <property name="visible">True</property>
+                <property name="layout_style">spread</property>
+                <child>
+                  <object class="GtkButton" id="format-button">
+                    <property name="label" translatable="yes">Format...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="stats-button">
+                    <property name="label" translatable="yes">Statistics...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="cell-button">
+                    <property name="label" translatable="yes">Cells...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="right_attach">3</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireSelector" id="row-selector">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">dict-treeview</property>
+                <property name="dest_widget">rows</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireSelector" id="col-selector">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">dict-treeview</property>
+                <property name="dest_widget">cols</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="format-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Crosstabs: Format</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkCheckButton" id="print-tables">
+                <property name="label" translatable="yes">Print tables</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="pivot">
+                <property name="label" translatable="yes">Pivot</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="ascending">
+                <property name="label" translatable="yes">Ascending</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="Labeling">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox2">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton1">
+                            <property name="label" translatable="yes">Label</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton2">
+                            <property name="label" translatable="yes">No label</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton3">
+                            <property name="label" translatable="yes">Suppress value labels</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                          </object>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Labeling</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="homogeneous">True</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="cell-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Crosstabs: Cells</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="frame4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow4">
+                <property name="width_request">128</property>
+                <property name="height_request">180</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <child>
+                  <object class="GtkTreeView" id="cell-view">
+                    <property name="visible">True</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label999">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Cell Display</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="stat-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Crosstabs: Statistics</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox4">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="frame3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow5">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <child>
+                  <object class="GtkTreeView" id="stats-view">
+                    <property name="width_request">128</property>
+                    <property name="height_request">150</property>
+                    <property name="visible">True</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Statistics</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index b40c11cd0301588c14309485e348a86723e19764..7b3104693589d95d28aa03745d8811baa9b8e176 100644 (file)
@@ -54,9 +54,6 @@
  */
 
 #include <config.h>
-#include <gettext.h>
-#define _(msgid) gettext (msgid)
-
 
 #include <gtk/gtksignal.h>
 #include <gtk/gtkentry.h>
@@ -331,7 +328,7 @@ psppire_custom_entry_class_init (PsppireCustomEntryClass *klass)
     (widget_class,
      g_param_spec_enum ("shadow_type",
                        "Shadow Type",
-                       _("Style of bevel around the custom entry button"),
+                       "Style of bevel around the custom entry button",
                        GTK_TYPE_SHADOW_TYPE,
                        GTK_SHADOW_ETCHED_IN,
                        G_PARAM_READABLE),
diff --git a/src/ui/gui/data-editor.glade b/src/ui/gui/data-editor.glade
deleted file mode 100644 (file)
index 0677624..0000000
+++ /dev/null
@@ -1,1078 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <widget class="GtkMenuBar" id="menubar">
-    <property name="visible">True</property>
-    <child>
-      <widget class="GtkMenuItem" id="file">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">_File</property>
-        <property name="use_underline">True</property>
-        <child>
-          <widget class="GtkMenu" id="menuitem1_menu">
-            <child>
-              <widget class="GtkImageMenuItem" id="new1">
-                <property name="visible">True</property>
-                <property name="label">gtk-new</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-                <child>
-                  <widget class="GtkMenu" id="new1_menu">
-                    <child>
-                      <widget class="GtkMenuItem" id="file_new_syntax">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Syntax</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="file_new_data">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Data</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="open1">
-                <property name="visible">True</property>
-                <property name="label">gtk-open</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-                <child>
-                  <widget class="GtkMenu" id="open1_menu">
-                    <child>
-                      <widget class="GtkMenuItem" id="file_open_syntax">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Syntax</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="file_open_data">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Data</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="file_import-text">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Import Delimited Text Data</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="file_separator1">
-                <property name="visible">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="file_save">
-                <property name="visible">True</property>
-                <property name="label">gtk-save</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="file_save_as">
-                <property name="visible">True</property>
-                <property name="label">gtk-save-as</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="file_separator2">
-                <property name="visible">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="file-information">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">D_isplay Data File Information</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="file-info-menu">
-                    <property name="visible">True</property>
-                    <property name="tearoff_state">True</property>
-                    <child>
-                      <widget class="GtkMenuItem" id="file_information_working-file">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Working File</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="file_information_external-file">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">External File</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                <property name="visible">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="file_recent-data">
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Recently Used Da_ta</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="file_recent-files">
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Recently Used _Files</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="file_separator3">
-                <property name="visible">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="file_quit">
-                <property name="visible">True</property>
-                <property name="label">gtk-quit</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-    <child>
-      <widget class="GtkMenuItem" id="edit">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">_Edit</property>
-        <property name="use_underline">True</property>
-        <child>
-          <widget class="GtkMenu" id="edit_menu">
-            <child>
-              <widget class="GtkMenuItem" id="edit_insert-variable">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label" translatable="yes">Insert Variable</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="edit_insert-case">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label" translatable="yes">Insert Cases</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="edit_goto-case">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label" translatable="yes">Go To Case</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="separator4">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="edit_cut">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label">gtk-cut</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="edit_copy">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label">gtk-copy</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="edit_paste">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label">gtk-paste</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="edit_clear-variables">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label" translatable="yes">Cl_ear Variables</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="edit_clear-cases">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label" translatable="yes">_Clear Cases</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="separator6">
-                <property name="visible">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="edit_find">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label" translatable="yes">gtk-find</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-    <child>
-      <widget class="GtkMenuItem" id="view">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">_View</property>
-        <property name="use_underline">True</property>
-        <child>
-          <widget class="GtkMenu" id="menuitem3_menu">
-            <child>
-              <widget class="GtkCheckMenuItem" id="view_statusbar">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Status Bar</property>
-                <property name="use_underline">True</property>
-                <property name="active">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="separator1">
-                <property name="visible">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="view_fonts">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Fonts</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkCheckMenuItem" id="view_gridlines">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Grid Lines</property>
-                <property name="use_underline">True</property>
-                <property name="active">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkCheckMenuItem" id="view_value-labels">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Value _Labels</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="separator3">
-                <property name="visible">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="view_data">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Data</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="view_variables">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Variables</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-    <child>
-      <widget class="GtkMenuItem" id="data">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">_Data</property>
-        <property name="use_underline">True</property>
-        <child>
-          <widget class="GtkMenu" id="data_menu">
-            <child>
-              <widget class="GtkImageMenuItem" id="data_sort-cases">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Sort Cases</property>
-                <property name="use_underline">True</property>
-                <child internal-child="image">
-                  <widget class="GtkImage" id="menu-item-image1">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-sort-ascending</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="data_transpose">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label" translatable="yes">_Transpose</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="separator5">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="data_split-file">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">S_plit File</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="data_select-cases">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label" translatable="yes">Select _Cases</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="data_weight-cases">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Weight Cases</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-    <child>
-      <widget class="GtkMenuItem" id="transform">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="label" translatable="yes">_Transform</property>
-        <property name="use_underline">True</property>
-        <child>
-          <widget class="GtkMenu" id="menu2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkMenuItem" id="transform_compute">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Compute</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="transform_rank">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Ran_k Cases</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="separator8">
-                <property name="visible">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="transform_recode-same">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Recode into _Same Variables</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="transform_recode-different">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Recode into _Different Variables</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSeparatorMenuItem" id="separator7">
-                <property name="visible">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="transform_run-pending">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="label" translatable="yes">_Run Pending Transforms</property>
-                <property name="use_underline">True</property>
-                <accelerator key="G" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-    <child>
-      <widget class="GtkMenuItem" id="analyze">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="label" translatable="yes">_Analyze</property>
-        <property name="use_underline">True</property>
-        <child>
-          <widget class="GtkMenu" id="menu3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkMenuItem" id="descriptive-statistics">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Descriptive Statistics</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu5">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkMenuItem" id="analyze_frequencies">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Frequencies</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="analyze_descriptives">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Descriptives</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="analyze_explore">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Explore</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="crosstabs">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Crosstabs</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="compare-means">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Compare _Means</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu6">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkMenuItem" id="one-sample-t-test">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_One Sample T Test</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="indep-t-test">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Independent Samples T Test</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="paired-t-test">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Paired Samples T Test</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="oneway-anova">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">One Way _ANOVA</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="reliability">
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Re_liability</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="linear-regression">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Linear _Regression</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="non-parametrics">
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Non-Parametric Statistics</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu4">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkMenuItem" id="chi-square">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Chi-Square</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="binomial">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Binomial</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-    <child>
-      <widget class="GtkMenuItem" id="utilities">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="label" translatable="yes">_Utilities</property>
-        <property name="use_underline">True</property>
-        <child>
-          <widget class="GtkMenu" id="menu1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkMenuItem" id="utilities_variables">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Variables</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="utilities_comments">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Data File _Comments</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-    <child>
-      <widget class="GtkMenuItem" id="windows">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">_Windows</property>
-        <property name="use_underline">True</property>
-        <child>
-          <widget class="GtkMenu" id="Windows_menu">
-            <child>
-              <widget class="GtkMenuItem" id="windows_minimise_all">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Minimize All Windows</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkCheckMenuItem" id="windows_split">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Split</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-    <child>
-      <widget class="GtkMenuItem" id="help">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">_Help</property>
-        <property name="use_underline">True</property>
-        <child>
-          <widget class="GtkMenu" id="menuitem5_menu">
-            <child>
-              <widget class="GtkImageMenuItem" id="help_reference">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Reference Manual</property>
-                <property name="use_underline">True</property>
-                <child internal-child="image">
-                  <widget class="GtkImage" id="menu-item-image2">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-help</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="help_about">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_About</property>
-                <property name="use_underline">True</property>
-                <child internal-child="image">
-                  <widget class="GtkImage" id="menu-item-image3">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-about</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkHandleBox" id="handlebox1">
-    <property name="visible">True</property>
-    <property name="shadow_type">GTK_SHADOW_OUT</property>
-    <child>
-      <widget class="GtkToolbar" id="toolbar1">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkToolButton" id="button-open">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Open</property>
-            <property name="stock_id">gtk-open</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-save">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Save</property>
-            <property name="stock_id">gtk-save</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-print">
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Print</property>
-            <property name="stock_id">gtk-print</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-recent">
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Recall</property>
-            <property name="stock_id">gtk-missing-image</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkSeparatorToolItem" id="separatortoolitem1">
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="homogeneous">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-undo">
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Undo</property>
-            <property name="stock_id">gtk-undo</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-redo">
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Redo</property>
-            <property name="stock_id">gtk-redo</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkSeparatorToolItem" id="separatortoolitem2">
-            <property name="visible">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="homogeneous">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-goto-case">
-            <property name="visible">True</property>
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Go To Case</property>
-            <property name="stock_id">gtk-jump-to</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-goto-variable">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Variables</property>
-            <property name="use_underline">True</property>
-            <property name="stock_id">gtk-missing-image</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkSeparatorToolItem" id="separatortoolitem5">
-            <property name="visible">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="homogeneous">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-find">
-            <property name="visible">True</property>
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Find</property>
-            <property name="stock_id">gtk-find</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkSeparatorToolItem" id="separatortoolitem4">
-            <property name="visible">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="homogeneous">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-insert-case">
-            <property name="visible">True</property>
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Insert Case</property>
-            <property name="use_underline">True</property>
-            <property name="stock_id">gtk-missing-image</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-insert-variable">
-            <property name="visible">True</property>
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Insert Variable</property>
-            <property name="use_underline">True</property>
-            <property name="stock_id">gtk-missing-image</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkSeparatorToolItem" id="separatortoolitem6">
-            <property name="visible">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="homogeneous">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-split-file">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Split File</property>
-            <property name="use_underline">True</property>
-            <property name="stock_id">gtk-missing-image</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-weight-cases">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Weight Cases</property>
-            <property name="use_underline">True</property>
-            <property name="stock_id">gtk-missing-image</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-select-cases">
-            <property name="visible">True</property>
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Select Cases</property>
-            <property name="use_underline">True</property>
-            <property name="stock_id">gtk-missing-image</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkSeparatorToolItem" id="separatortoolitem7">
-            <property name="visible">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="homogeneous">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToggleToolButton" id="togglebutton-value-labels">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Value Labels</property>
-            <property name="use_underline">True</property>
-            <property name="stock_id">gtk-missing-image</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkToolButton" id="button-use-sets">
-            <property name="sensitive">False</property>
-            <property name="tooltip" translatable="yes">Use Sets</property>
-            <property name="use_underline">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkHBox" id="status-bar">
-    <property name="visible">True</property>
-    <property name="spacing">6</property>
-    <child>
-      <widget class="GtkFrame" id="frame2">
-        <property name="visible">True</property>
-        <property name="label_xalign">0</property>
-        <property name="shadow_type">GTK_SHADOW_IN</property>
-        <child>
-          <widget class="GtkEventBox" id="eventbox1">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Information Area</property>
-            <child>
-              <widget class="GtkLabel" id="information-area">
-                <property name="visible">True</property>
-                <property name="single_line_mode">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-    <child>
-      <widget class="GtkFrame" id="frame3">
-        <property name="visible">True</property>
-        <property name="label_xalign">0</property>
-        <property name="shadow_type">GTK_SHADOW_IN</property>
-        <child>
-          <widget class="GtkEventBox" id="eventbox2">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Processor Area</property>
-            <child>
-              <widget class="GtkLabel" id="processor-area">
-                <property name="visible">True</property>
-                <property name="width_chars">35</property>
-                <property name="single_line_mode">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">False</property>
-        <property name="position">1</property>
-      </packing>
-    </child>
-    <child>
-      <widget class="GtkFrame" id="frame5">
-        <property name="visible">True</property>
-        <property name="label_xalign">0</property>
-        <property name="shadow_type">GTK_SHADOW_IN</property>
-        <child>
-          <widget class="GtkEventBox" id="eventbox4">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Case Counter Area</property>
-            <child>
-              <widget class="GtkLabel" id="case-counter-area">
-                <property name="visible">True</property>
-                <property name="width_chars">20</property>
-                <property name="single_line_mode">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">False</property>
-        <property name="position">3</property>
-      </packing>
-    </child>
-    <child>
-      <widget class="GtkFrame" id="frame6">
-        <property name="visible">True</property>
-        <property name="label_xalign">0</property>
-        <property name="shadow_type">GTK_SHADOW_IN</property>
-        <child>
-          <widget class="GtkEventBox" id="eventbox5">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Filter Use Status Area</property>
-            <child>
-              <widget class="GtkLabel" id="filter-use-status-area">
-                <property name="visible">True</property>
-                <property name="ellipsize">PANGO_ELLIPSIZE_START</property>
-                <property name="width_chars">10</property>
-                <property name="single_line_mode">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">False</property>
-        <property name="position">4</property>
-      </packing>
-    </child>
-    <child>
-      <widget class="GtkFrame" id="frame7">
-        <property name="visible">True</property>
-        <property name="label_xalign">0</property>
-        <property name="shadow_type">GTK_SHADOW_IN</property>
-        <child>
-          <widget class="GtkEventBox" id="eventbox6">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Weight Status Area</property>
-            <child>
-              <widget class="GtkLabel" id="weight-status-area">
-                <property name="visible">True</property>
-                <property name="ellipsize">PANGO_ELLIPSIZE_START</property>
-                <property name="width_chars">15</property>
-                <property name="single_line_mode">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">False</property>
-        <property name="position">5</property>
-      </packing>
-    </child>
-    <child>
-      <widget class="GtkFrame" id="frame8">
-        <property name="visible">True</property>
-        <property name="label_xalign">0</property>
-        <property name="shadow_type">GTK_SHADOW_IN</property>
-        <child>
-          <widget class="GtkEventBox" id="eventbox7">
-            <property name="visible">True</property>
-            <property name="tooltip" translatable="yes">Split File Status Area</property>
-            <child>
-              <widget class="GtkLabel" id="split-file-status-area">
-                <property name="visible">True</property>
-                <property name="ellipsize">PANGO_ELLIPSIZE_START</property>
-                <property name="width_chars">15</property>
-                <property name="single_line_mode">True</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-      </widget>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">False</property>
-        <property name="position">6</property>
-      </packing>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/data-editor.ui b/src/ui/gui/data-editor.ui
new file mode 100644 (file)
index 0000000..e05f4ff
--- /dev/null
@@ -0,0 +1,773 @@
+<?xml version="1.0"?>
+<interface>
+  <object class="GtkUIManager" id="uimanager1">
+    <child>
+      <object class="GtkActionGroup" id="actiongroup2">
+        <child>
+          <object class="GtkAction" id="sort-up">
+            <property name="stock-id">gtk-sort-ascending</property>
+            <property name="label" translatable="yes">Sort Ascending</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="sort-down">
+            <property name="stock-id">gtk-sort-descending</property>
+            <property name="label" translatable="yes">Sort Descending</property>
+          </object>
+        </child>
+      </object>
+   </child>
+       
+    <child>
+      <object class="GtkActionGroup" id="actiongroup1">
+        <child>
+          <object class="GtkAction" id="file">
+            <property name="name">file</property>
+            <property name="label" translatable="yes">_File</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="new1">
+            <property name="stock-id">gtk-new</property>
+            <property name="name">new1</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_new_syntax">
+            <property name="name">file_new_syntax</property>
+            <property name="label" translatable="yes">_Syntax</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_new_data">
+            <property name="name">file_new_data</property>
+            <property name="label" translatable="yes">_Data</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_open">
+            <property name="stock-id">gtk-open</property>
+            <property name="name">file_open</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_import-text">
+            <property name="name">file_import-text</property>
+            <property name="label" translatable="yes">_Import Delimited Text Data</property>
+           <property name="stock-id">gtk-convert</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_save">
+            <property name="stock-id">gtk-save</property>
+            <property name="name">file_save</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_save_as">
+            <property name="stock-id">gtk-save-as</property>
+            <property name="name">file_save_as</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file-information">
+            <property name="name">file-information</property>
+            <property name="label" translatable="yes">D_isplay Data File Information</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_information_working-file">
+            <property name="name">file_information_working-file</property>
+            <property name="label" translatable="yes">Working File</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_information_external-file">
+            <property name="name">file_information_external-file</property>
+            <property name="label" translatable="yes">External File</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_recent-data">
+            <property name="name">file_recent-data</property>
+            <property name="label" translatable="yes">Recently Used Da_ta</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_recent-files">
+            <property name="name">file_recent-files</property>
+            <property name="label" translatable="yes">Recently Used _Files</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_quit">
+            <property name="stock-id">gtk-quit</property>
+            <property name="name">file_quit</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit">
+            <property name="name">edit</property>
+            <property name="label" translatable="yes">_Edit</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="action_insert-variable">
+            <property name="name">action_insert-variable</property>
+            <property name="label" translatable="yes">Insert Variable</property>
+            <property name="tooltip" translatable="yes">Create a new variable at the current position</property>
+           <property name="stock-id">pspp-insert-variable</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit_insert-case">
+            <property name="name">edit_insert-case</property>
+            <property name="label" translatable="yes">Insert Cases</property>
+            <property name="tooltip" translatable="yes">Create a new case at the current position</property>
+           <property name="stock-id">pspp-insert-case</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit_goto-case">
+            <property name="label" translatable="yes">Go To Case</property>
+            <property name="name">edit_goto-case</property>
+            <property name="tooltip" translatable="yes">Jump to a case in the data sheet</property>
+           <property name="stock-id">gtk-jump-to</property>
+
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit_cut">
+            <property name="stock-id">gtk-cut</property>
+            <property name="name">edit_cut</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit_copy">
+            <property name="stock-id">gtk-copy</property>
+            <property name="name">edit_copy</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit_paste">
+            <property name="stock-id">gtk-paste</property>
+            <property name="name">edit_paste</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit_clear-variables">
+            <property name="name">edit_clear-variables</property>
+            <property name="label" translatable="yes">Cl_ear Variables</property>
+           <property name="tooltip" translatable="yes">Delete the variables at the selected position(s)</property>
+            <property name="stock-id">gtk-clear</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit_clear-cases">
+            <property name="name">edit_clear-cases</property>
+            <property name="stock-id">gtk-clear</property>
+            <property name="label" translatable="yes">_Clear Cases</property>
+            <property name="tooltip" translatable="yes">Delete the cases at the selected position(s)</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="edit_find">
+            <property name="stock-id">gtk-find</property>
+            <property name="name">edit_find</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="view">
+            <property name="name">view</property>
+            <property name="label" translatable="yes">_View</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkToggleAction" id="view_statusbar">
+            <property name="active">True</property>
+            <property name="name">view_statusbar</property>
+            <property name="label" translatable="yes">_Status Bar</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="view_fonts">
+            <property name="name">view_fonts</property>
+            <property name="label" translatable="yes">_Fonts</property>
+            <property name="stock-id">gtk-select-font</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkToggleAction" id="view_gridlines">
+            <property name="active">True</property>
+            <property name="name">view_gridlines</property>
+            <property name="label" translatable="yes">_Grid Lines</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkToggleAction" id="view_value-labels">
+            <property name="name">view_value-labels</property>
+            <property name="label" translatable="yes">Value _Labels</property>
+           <property name="tooltip" translatable="yes">Show/hide value labels</property>
+           <property name="stock-id">pspp-value-labels</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="view_data">
+            <property name="name">view_data</property>
+            <property name="label" translatable="yes">_Data</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="view_variables">
+            <property name="name">view_variables</property>
+            <property name="label" translatable="yes">_Variables</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="data">
+            <property name="name">data</property>
+            <property name="label" translatable="yes">_Data</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="data_sort-cases">
+            <property name="label" translatable="yes">_Sort Cases</property>
+            <property name="name">data_sort-cases</property>
+           <property name="stock-id">gtk-sort-ascending</property>
+           <property name="tooltip" translatable="yes">Sort cases in the active file</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="data_transpose">
+           <property name="stock-id">pspp-transpose</property>
+            <property name="name">data_transpose</property>
+            <property name="label" translatable="yes">_Transpose</property>
+           <property name="tooltip" translatable="yes">Transpose the cases with the variables</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="data_split-file">
+            <property name="name">data_split-file</property>
+            <property name="label" translatable="yes">S_plit File</property>
+           <property name="tooltip" translatable="yes">Split the active file</property>
+           <property name="stock-id">pspp-split-file</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="data_select-cases">
+            <property name="name">data_select-cases</property>
+            <property name="label" translatable="yes">Select _Cases</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="data_weight-cases">
+            <property name="name">data_weight-cases</property>
+            <property name="label" translatable="yes">_Weight Cases</property>
+           <property name="tooltip" translatable="yes">Weight cases by variable</property>
+           <property name="stock-id">pspp-weight-cases</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="transform">
+            <property name="name">transform</property>
+            <property name="label" translatable="yes">_Transform</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="transform_compute">
+            <property name="name">transform_compute</property>
+            <property name="label" translatable="yes">_Compute</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="transform_rank">
+            <property name="name">transform_rank</property>
+            <property name="label" translatable="yes">Ran_k Cases</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="transform_recode-same">
+            <property name="name">transform_recode-same</property>
+            <property name="label" translatable="yes">Recode into _Same Variables</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="transform_recode-different">
+            <property name="name">transform_recode-different</property>
+            <property name="label" translatable="yes">Recode into _Different Variables</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="transform_run-pending">
+            <property name="name">transform_run-pending</property>
+            <property name="label" translatable="yes">_Run Pending Transforms</property>
+          </object>
+          <accelerator key="G" modifiers="GDK_CONTROL_MASK"/>
+        </child>
+        <child>
+          <object class="GtkAction" id="analyze">
+            <property name="name">analyze</property>
+            <property name="label" translatable="yes">_Analyze</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="descriptive-statistics">
+            <property name="name">descriptive-statistics</property>
+            <property name="label" translatable="yes">_Descriptive Statistics</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="analyze_frequencies">
+            <property name="name">analyze_frequencies</property>
+            <property name="label" translatable="yes">_Frequencies</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="analyze_descriptives">
+            <property name="name">analyze_descriptives</property>
+            <property name="label" translatable="yes">_Descriptives</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="analyze_explore">
+            <property name="name">analyze_explore</property>
+            <property name="label" translatable="yes">_Explore</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="crosstabs">
+            <property name="name">crosstabs</property>
+            <property name="label" translatable="yes">_Crosstabs</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="compare-means">
+            <property name="name">compare-means</property>
+            <property name="label" translatable="yes">Compare _Means</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="one-sample-t-test">
+            <property name="name">one-sample-t-test</property>
+            <property name="label" translatable="yes">_One Sample T Test</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="indep-t-test">
+            <property name="name">indep-t-test</property>
+            <property name="label" translatable="yes">_Independent Samples T Test</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="paired-t-test">
+            <property name="name">paired-t-test</property>
+            <property name="label" translatable="yes">_Paired Samples T Test</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="oneway-anova">
+            <property name="name">oneway-anova</property>
+            <property name="label" translatable="yes">One Way _ANOVA</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="correlation">
+            <property name="name">correlation</property>
+            <property name="label" translatable="yes">Bivariate _Correlation...</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="factor-analysis">
+            <property name="name">factor-analysis</property>
+            <property name="label" translatable="yes">Factor _Analysis</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="reliability">
+            <property name="name">reliability</property>
+            <property name="label" translatable="yes">Re_liability</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="linear-regression">
+            <property name="name">linear-regression</property>
+            <property name="label" translatable="yes">Linear _Regression</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="non-parametrics">
+            <property name="name">non-parametrics</property>
+            <property name="label" translatable="yes">_Non-Parametric Statistics</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="chi-square">
+            <property name="name">chi-square</property>
+            <property name="label" translatable="yes">_Chi-Square</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="binomial">
+            <property name="name">binomial</property>
+            <property name="label" translatable="yes">_Binomial</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="roc-curve">
+            <property name="name">roc-curve</property>
+            <property name="label" translatable="yes">ROC Cur_ve...</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="utilities">
+            <property name="name">utilities</property>
+            <property name="label" translatable="yes">_Utilities</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="utilities_variables">
+            <property name="name">utilities_variables</property>
+            <property name="label" translatable="yes">_Variables</property>
+           <property name="tooltip" translatable="yes">Jump to variable</property>
+           <property name="stock-id">pspp-goto-variable</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="utilities_comments">
+            <property name="name">utilities_comments</property>
+            <property name="label" translatable="yes">Data File _Comments</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="windows">
+            <property name="name">windows</property>
+            <property name="label" translatable="yes">_Windows</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="windows_minimise_all">
+            <property name="name">windows_minimise_all</property>
+            <property name="label" translatable="yes">_Minimize All Windows</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkToggleAction" id="windows_split">
+            <property name="name">windows_split</property>
+            <property name="label" translatable="yes">_Split</property>
+          </object>
+        </child>
+      </object>
+    </child>
+    <ui>
+      <menubar name="menubar">
+        <menu action="file">
+          <menu action="new1">
+            <menuitem action="file_new_syntax"/>
+            <menuitem action="file_new_data"/>
+          </menu>
+          <menuitem action="file_open"/>
+          <menuitem action="file_import-text"/>
+          <separator/>
+          <menuitem action="file_save"/>
+          <menuitem action="file_save_as"/>
+          <separator/>
+          <menu action="file-information">
+            <menuitem action="file_information_working-file"/>
+            <menuitem action="file_information_external-file"/>
+          </menu>
+          <separator/>
+          <menuitem action="file_recent-data"/>
+          <menuitem action="file_recent-files"/>
+          <separator/>
+          <menuitem action="file_quit"/>
+        </menu>
+        <menu action="edit">
+          <menuitem action="action_insert-variable"/>
+          <menuitem action="edit_insert-case"/>
+          <menuitem action="edit_goto-case"/>
+          <separator/>
+          <menuitem action="edit_cut"/>
+          <menuitem action="edit_copy"/>
+          <menuitem action="edit_paste"/>
+          <menuitem action="edit_clear-variables"/>
+          <menuitem action="edit_clear-cases"/>
+          <separator/>
+          <menuitem action="edit_find"/>
+        </menu>
+        <menu action="view">
+          <menuitem action="view_statusbar"/>
+          <separator/>
+          <menuitem action="view_fonts"/>
+          <menuitem action="view_gridlines"/>
+          <menuitem action="view_value-labels"/>
+          <separator/>
+          <menuitem action="view_data"/>
+          <menuitem action="view_variables"/>
+        </menu>
+        <menu action="data">
+          <menuitem action="data_sort-cases"/>
+          <menuitem action="data_transpose"/>
+          <separator/>
+          <menuitem action="data_split-file"/>
+          <menuitem action="data_select-cases"/>
+          <menuitem action="data_weight-cases"/>
+        </menu>
+        <menu action="transform">
+          <menuitem action="transform_compute"/>
+          <menuitem action="transform_rank"/>
+          <separator/>
+          <menuitem action="transform_recode-same"/>
+          <menuitem action="transform_recode-different"/>
+          <separator/>
+          <menuitem action="transform_run-pending"/>
+        </menu>
+        <menu action="analyze">
+          <menu action="descriptive-statistics">
+            <menuitem action="analyze_frequencies"/>
+            <menuitem action="analyze_descriptives"/>
+            <menuitem action="analyze_explore"/>
+            <menuitem action="crosstabs"/>
+          </menu>
+          <menu action="compare-means">
+            <menuitem action="one-sample-t-test"/>
+            <menuitem action="indep-t-test"/>
+            <menuitem action="paired-t-test"/>
+            <menuitem action="oneway-anova"/>
+          </menu>
+          <menuitem action="correlation"/>
+          <menuitem action="factor-analysis"/>
+          <menuitem action="reliability"/>
+          <menuitem action="linear-regression"/>
+          <menu action="non-parametrics">
+            <menuitem action="chi-square"/>
+            <menuitem action="binomial"/>
+          </menu>
+          <menuitem action="roc-curve"/>
+        </menu>
+        <menu action="utilities">
+          <menuitem action="utilities_variables"/>
+          <menuitem action="utilities_comments"/>
+        </menu>
+        <menu action="windows">
+          <menuitem action="windows_minimise_all"/>
+          <menuitem action="windows_split"/>
+        </menu>
+      </menubar>
+      <toolbar action="toolbar">
+        <placeholder name="tool-items">
+          <toolitem name="toolbar_open" action="file_open"/>
+          <toolitem name="toolbar_save" action="file_save"/>
+         <separator/>
+          <toolitem name="toolbar_goto-case" action="edit_goto-case"/>
+          <toolitem name="toolbar_goto-variable" action="utilities_variables"/>
+         <separator/>
+          <toolitem name="toolbar_find" action="edit_find"/>
+         <separator/>
+         <toolitem name="toolbar_insert-cases" action="edit_insert-case"/>
+         <toolitem name="toolbar_insert-variable" action="action_insert-variable"/>
+         <separator/>
+         <toolitem name="toolbar_split-file" action="data_split-file"/>
+         <toolitem name="toolbar_weight-cases" action="data_weight-cases"/>
+         <toolitem name="toolbar_select-cases" action="data_select-cases"/>
+         <separator/>
+         <toolitem name="toolbar_select-cases" action="view_value-labels"/>
+        </placeholder>
+      </toolbar>
+      <popup name="datasheet-variable-popup">
+         <menuitem action="action_insert-variable"/>
+         <separator/>
+         <menuitem action="edit_clear-variables"/>
+         <separator/>
+          <menuitem action="sort-up"/>
+          <menuitem action="sort-down"/>
+      </popup>
+      <popup name="varsheet-variable-popup">
+         <menuitem action="action_insert-variable"/>
+         <separator/>
+         <menuitem action="edit_clear-variables"/>
+      </popup>
+      <popup name="datasheet-cases-popup">
+         <menuitem action="edit_insert-case"/>
+         <separator/>
+         <menuitem action="edit_clear-cases"/>
+      </popup>
+</ui>
+  </object>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkMenuBar" constructor="uimanager1" id="menubar">
+    <property name="visible">True</property>
+  </object>
+  <object class="GtkMenu" constructor="uimanager1" id="datasheet-variable-popup">
+    <property name="visible">True</property>
+  </object>
+  <object class="GtkMenu" constructor="uimanager1" id="varsheet-variable-popup">
+    <property name="visible">True</property>
+  </object>
+  <object class="GtkMenu" constructor="uimanager1" id="datasheet-cases-popup">
+    <property name="visible">True</property>
+  </object>
+  <object class="GtkHandleBox" id="handlebox1">
+    <property name="visible">True</property>
+    <child>
+      <object class="GtkToolbar" constructor="uimanager1" id="toolbar">
+        <property name="visible">True</property>
+      </object>
+    </child>
+  </object>
+
+  <object class="GtkHBox" id="status-bar">
+    <property name="visible">True</property>
+    <property name="spacing">6</property>
+    <child>
+      <object class="GtkFrame" id="frame2">
+        <property name="visible">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">in</property>
+        <child>
+          <object class="GtkEventBox" id="eventbox1">
+            <property name="visible">True</property>
+            <property name="tooltip-text" translatable="yes">Information Area</property>
+            <child>
+              <object class="GtkLabel" id="information-area">
+                <property name="visible">True</property>
+                <property name="single_line_mode">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame3">
+        <property name="visible">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">in</property>
+        <child>
+          <object class="GtkEventBox" id="eventbox2">
+            <property name="visible">True</property>
+            <property name="tooltip-text" translatable="yes">Processor Area</property>
+            <child>
+              <object class="GtkLabel" id="processor-area">
+                <property name="visible">True</property>
+                <property name="width_chars">35</property>
+                <property name="single_line_mode">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame5">
+        <property name="visible">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">in</property>
+        <child>
+          <object class="GtkEventBox" id="eventbox4">
+            <property name="visible">True</property>
+            <property name="tooltip-text" translatable="yes">Case Counter Area</property>
+            <child>
+              <object class="GtkLabel" id="case-counter-area">
+                <property name="visible">True</property>
+                <property name="width_chars">20</property>
+                <property name="single_line_mode">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">3</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame6">
+        <property name="visible">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">in</property>
+        <child>
+          <object class="GtkEventBox" id="eventbox5">
+            <property name="visible">True</property>
+            <property name="tooltip-text" translatable="yes">Filter Use Status Area</property>
+            <child>
+              <object class="GtkLabel" id="filter-use-status-area">
+                <property name="visible">True</property>
+                <property name="ellipsize">start</property>
+                <property name="width_chars">10</property>
+                <property name="single_line_mode">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">4</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame7">
+        <property name="visible">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">in</property>
+        <child>
+          <object class="GtkEventBox" id="eventbox6">
+            <property name="visible">True</property>
+            <property name="tooltip-text" translatable="yes">Weight Status Area</property>
+            <child>
+              <object class="GtkLabel" id="weight-status-area">
+                <property name="visible">True</property>
+                <property name="ellipsize">start</property>
+                <property name="width_chars">15</property>
+                <property name="single_line_mode">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">5</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame8">
+        <property name="visible">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">in</property>
+        <child>
+          <object class="GtkEventBox" id="eventbox7">
+            <property name="visible">True</property>
+            <property name="tooltip-text" translatable="yes">Split File Status Area</property>
+            <child>
+              <object class="GtkLabel" id="split-file-status-area">
+                <property name="visible">True</property>
+                <property name="ellipsize">start</property>
+                <property name="width_chars">15</property>
+                <property name="single_line_mode">True</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">6</property>
+      </packing>
+    </child>
+  </object>
+</interface>
index a1e65ea7d7971a9fbb4643dac59ccfabad308628..5a774902556e43e36e21e8a39cd3c90df6e5703f 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007  Free Software Foundation
+   Copyright (C) 2007, 2010  Free Software Foundation
 
    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
@@ -18,6 +18,7 @@
 
 #include "checkbox-treeview.h"
 #include "descriptives-dialog.h"
+#include "psppire-var-view.h"
 
 #include <gtk/gtk.h>
 #include <stdlib.h>
@@ -117,7 +118,7 @@ generate_syntax (const struct descriptives_dialog *scd)
 
   string = g_string_new ("DESCRIPTIVES");
   g_string_append (string, "\n    /VARIABLES=");
-  append_variable_names (string, scd->dict, GTK_TREE_VIEW (scd->stat_vars), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (scd->stat_vars), 0, string);
 
   listwise = gtk_toggle_button_get_active (scd->exclude_missing_listwise);
   include = gtk_toggle_button_get_active (scd->include_user_missing);
@@ -176,6 +177,9 @@ generate_syntax (const struct descriptives_dialog *scd)
 
   g_string_append (string, ".");
 
+  if (gtk_toggle_button_get_active (scd->save_z_scores))
+    g_string_append (string, "\nEXECUTE.");
+
   text = string->str;
 
   g_string_free (string, FALSE);
@@ -199,20 +203,18 @@ dialog_state_valid (gpointer data)
 
 /* Pops up the Descriptives dialog box */
 void
-descriptives_dialog (GObject *o, gpointer data)
+descriptives_dialog (PsppireDataWindow *de)
 {
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   struct descriptives_dialog scd;
 
-  GtkBuilder *xml = builder_new ("descriptives-dialog.ui");
+  GtkBuilder *xml = builder_new ("descriptives.ui");
 
   GtkWidget *dialog = get_widget_assert   (xml, "descriptives-dialog");
 
 
   GtkWidget *source = get_widget_assert   (xml, "all-variables");
-  GtkWidget *selector = get_widget_assert (xml, "stat-var-selector");
   GtkWidget *dest =   get_widget_assert   (xml, "stat-variables");
 
   GtkWidget *stats_treeview = get_widget_assert    (xml, "statistics");
@@ -226,18 +228,9 @@ descriptives_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
 
-  g_object_set (source, "dictionary", dict,
+  g_object_set (source, "model", dict,
        "predicate", var_is_numeric, NULL);
 
-  set_dest_model (GTK_TREE_VIEW (dest), dict);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                source,
-                                dest,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
   put_checkbox_items_in_treeview (GTK_TREE_VIEW (stats_treeview),
                                  B_DS_DEFAULT,
                                  N_DESCRIPTIVE_STATS, stats);
@@ -277,7 +270,7 @@ descriptives_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&scd);
-       paste_syntax_in_new_window (syntax);
+       paste_syntax_to_window (syntax);
        g_free (syntax);
       }
       break;
diff --git a/src/ui/gui/descriptives-dialog.glade b/src/ui/gui/descriptives-dialog.glade
deleted file mode 100644 (file)
index 3fa67a5..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.2 on Fri Oct  5 21:18:15 2007 by blp@blp-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="descriptives-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Descriptives</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox16">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox29">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkHBox" id="hbox24">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow16">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                    <child>
-                      <widget class="PsppireDictView" id="all-variables">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="headers_visible">False</property>
-                        <property name="headers_clickable">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkAlignment" id="alignment19">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="yalign">0.25</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <widget class="PsppireSelector" id="stat-var-selector">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="border_width">5</property>
-                        <property name="response_id">0</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox30">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox31">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkLabel" id="label37">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Variables:</property>
-                            <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow17">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                            <child>
-                              <widget class="GtkTreeView" id="stat-variables">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="headers_visible">False</property>
-                                <property name="headers_clickable">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="padding">5</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkVBox" id="vbox28">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkLabel" id="label36">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Statistics:</property>
-                            <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow14">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                            <child>
-                              <widget class="GtkTreeView" id="statistics">
-                                <property name="height_request">200</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="headers_visible">False</property>
-                                <property name="headers_clickable">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="padding">5</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="frame11">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label_xalign">0</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment20">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox5">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkCheckButton" id="exclude_missing_listwise">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Exclude entire case if any selected variable is missing</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="include_user_missing">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Include user-missing data in analysis</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="save_z_scores">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Save Z-scores of selected variables as new variables</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label40">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Options:</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-buttonbox6">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
index 745663e73139eb35ce2d05026a55fb78a0569dc8..b0dc7fab2d2c143d7abb12fb0283b2e6a2e01949 100644 (file)
@@ -19,8 +19,9 @@
 
 
 #include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
 
-void descriptives_dialog (GObject *o, gpointer data);
+void descriptives_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/descriptives.ui b/src/ui/gui/descriptives.ui
new file mode 100644 (file)
index 0000000..c1831db
--- /dev/null
@@ -0,0 +1,273 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="psppire" version="2054.17080"/>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="descriptives-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Descriptives</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox16">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox29">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkHBox" id="hbox24">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow16">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="PsppireDictView" id="all-variables">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkAlignment" id="alignment19">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">0.25</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="PsppireSelector" id="stat-var-selector">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="border_width">5</property>
+                        <property name="source_widget">all-variables</property>
+                        <property name="dest_widget">stat-variables</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox30">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox31">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkLabel" id="label37">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Variables:</property>
+                            <property name="wrap_mode">word-char</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow17">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="hscrollbar_policy">never</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">etched-in</property>
+                            <child>
+                              <object class="PsppireVarView" id="stat-variables">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="headers_visible">False</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="padding">5</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVBox" id="vbox28">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkLabel" id="label36">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Statistics:</property>
+                            <property name="wrap_mode">word-char</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow14">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="hscrollbar_policy">automatic</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">etched-in</property>
+                            <child>
+                              <object class="GtkTreeView" id="statistics">
+                                <property name="height_request">200</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="headers_visible">False</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="padding">5</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame11">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment20">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVButtonBox" id="vbuttonbox5">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <object class="GtkCheckButton" id="exclude_missing_listwise">
+                            <property name="label" translatable="yes">Exclude entire case if any selected variable is missing</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="include_user_missing">
+                            <property name="label" translatable="yes">Include user-missing data in analysis</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="save_z_scores">
+                            <property name="label" translatable="yes">Save Z-scores of selected variables as new variables</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label40">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Options:</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-buttonbox6">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 5d52204ce566ad89cdb1807adda7be338bf846e5..c61cb14a64a88ef4b3dba174f194277c5c552216 100644 (file)
 #include "helper.h"
 
 
-/* Append the names of selected variables to STRING.
-   TREEVIEW is the treeview containing the variables.
-   COLUMN is the column in the treeview containing the variables.
-   DICT is the dictionary for those variables.
-*/
-gint
-append_variable_names (GString *string,
-                      PsppireDict *dict, GtkTreeView *treeview, gint column)
-{
-  gint n_vars = 0;
-  GtkTreeIter iter;
-
-  GtkTreeModel *list_store =
-    gtk_tree_view_get_model (treeview);
-
-  if ( gtk_tree_model_get_iter_first (list_store, &iter) )
-    {
-      do
-       {
-         GValue value = {0};
-         struct variable *var = NULL;
-         GtkTreePath *path = gtk_tree_model_get_path (list_store, &iter);
-
-         gtk_tree_model_get_value (list_store, &iter, column, &value);
-
-         /* FIXME:  G_TYPE_INT should be deprecated.
-            As well as being simpler, it'd be unecessary to pass dict */
-         if ( G_VALUE_TYPE (&value) == G_TYPE_INT )
-         var = psppire_dict_get_variable (dict, g_value_get_int (&value));
-
-         else if ( G_VALUE_TYPE (&value) == PSPPIRE_VAR_PTR_TYPE)
-           var = g_value_get_boxed (&value);
-
-         else
-           g_critical ("Unsupported type \"%s\", in variable name treeview.",
-                       G_VALUE_TYPE_NAME (&value));
-
-         g_value_unset (&value);
-
-         g_string_append (string, " ");
-         g_string_append (string, var_get_name (var));
-
-         gtk_tree_path_free (path);
-         n_vars++;
-       }
-      while (gtk_tree_model_iter_next (list_store, &iter));
-    }
-
-  return n_vars;
-}
-
-
-
-struct variable *
-get_selected_variable (GtkTreeModel *treemodel,
-                      GtkTreeIter *iter,
-                      PsppireDict *dict)
-{
-  struct variable *var;
-  GValue value = {0};
-
-  GtkTreePath *path = gtk_tree_model_get_path (treemodel, iter);
-
-  gtk_tree_model_get_value (treemodel, iter, 0, &value);
-
-  gtk_tree_path_free (path);
-
-  var =  psppire_dict_get_variable (dict, g_value_get_int (&value));
-
-  g_value_unset (&value);
-
-  return var;
-}
-
-
-
-
-/* A (*GtkTreeCellDataFunc) function.
-   This function expects TREEMODEL to hold G_TYPE_INT.  The ints it holds
-   are the indices of the variables in the dictionary, which DATA points to.
-   It renders the name of the variable into CELL.
-*/
-void
-cell_var_name (GtkTreeViewColumn *tree_column,
-              GtkCellRenderer *cell,
-              GtkTreeModel *tree_model,
-              GtkTreeIter *iter,
-              gpointer data)
-{
-  PsppireDict *dict = data;
-  const struct variable *var = get_selected_variable (tree_model, iter, dict);
-
-  g_object_set (cell, "text", var_get_name (var), NULL);
-}
-
-
-
-/* Set a model for DEST, which is an GtkListStore of g_int's
-   whose values are the indices into DICT */
-void
-set_dest_model (GtkTreeView *dest, PsppireDict *dict)
-{
-  GtkTreeViewColumn *col;
-  GtkListStore *dest_list = gtk_list_store_new (1, G_TYPE_INT);
-  GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
-
-  gtk_tree_view_set_model (GTK_TREE_VIEW (dest), GTK_TREE_MODEL (dest_list));
-
-  col = gtk_tree_view_column_new_with_attributes ("Var",
-                                                 renderer,
-                                                 "text",
-                                                 0,
-                                                 NULL);
-
-  gtk_tree_view_column_set_cell_data_func (col, renderer,
-                                          cell_var_name,
-                                          dict, 0);
-
-  /* FIXME: make this a value in terms of character widths */
-  g_object_set (col, "min-width",  100, NULL);
-
-  gtk_tree_view_column_set_sizing (col, GTK_TREE_VIEW_COLUMN_FIXED);
-
-  gtk_tree_view_append_column (GTK_TREE_VIEW (dest), col);
-}
-
-
-
 /* Returns FALSE if the variables represented by the union of the rows
    currently selected by SOURCE widget, and contents of the DEST
    widget, are of different types.
@@ -224,11 +96,8 @@ homogeneous_types (GtkWidget *source, GtkWidget *dest)
        ok;
        ok = gtk_tree_model_iter_next (model, &iter))
     {
-      gint idx;
       const struct variable *v;
-      gtk_tree_model_get (model, &iter, 0, &idx, -1);
-
-      v = psppire_dict_get_variable (dict, idx);
+      gtk_tree_model_get (model, &iter, 0, &v, -1);
 
       if ( type != -1 )
        {
@@ -242,7 +111,6 @@ homogeneous_types (GtkWidget *source, GtkWidget *dest)
       type = var_get_type (v);
     }
 
-
   return retval;
 }
 
index 9a003f35a20e84941b6ec83cc92870295ac38e0d..328904acfc9643fbf669cf6cd0f2f3451166d9c1 100644 (file)
 #include <gtk/gtk.h>
 #include "psppire-dict.h"
 
-/* Append the names of selected variables to STRING.
-   TREEVIEW is the treeview containing the variables.
-   COLUMN is column in treeview containing the variables.
-   DICT is the dictionary for those variables.
-*/
-gint append_variable_names (GString *string, PsppireDict *dict,
-                           GtkTreeView *treeview, gint column);
-
-
-/* Returns the variable currently selected by the iterator
-   pointing to TREEMODEL */
-struct variable * get_selected_variable (GtkTreeModel *treemodel,
-                                        GtkTreeIter *iter,
-                                        PsppireDict *dict);
-
-
-
 /* A (*GtkTreeCellDataFunc) function.
    This function expects TREEMODEL to hold G_TYPE_INT.  The ints it holds
    are the indices of the variables in the dictionary, which DATA points to.
    It renders the name of the variable into CELL.
 */
-void cell_var_name (GtkTreeViewColumn *tree_column,
+void XXX_cell_var_name (GtkTreeViewColumn *tree_column,
                    GtkCellRenderer *cell,
                    GtkTreeModel *tree_model,
                    GtkTreeIter *iter,
                    gpointer data);
 
 
-/* Set a model for DEST, which is an GtkListStore of g_int's
-   whose values are the indices into DICT */
-void set_dest_model (GtkTreeView *dest, PsppireDict *dict);
-
-
 /* Returns FALSE if the variables represented by the union of the rows
    currently selected by SOURCE widget, and contents of the DEST
    widget, are of different types.
index 1665d7ff3f7a3c0a4bc8e1b4ebeb12b99cc8cfb9..160cdb2a1b8e635c4ad72a08892ca11edbddef9d 100644 (file)
@@ -54,7 +54,6 @@ get_base_model (GtkTreeModel *top_model, GtkTreeIter *top_iter,
 }
 
 
-
 void
 insert_source_row_into_entry (GtkTreeIter iter,
                              GtkWidget *dest,
@@ -84,7 +83,6 @@ insert_source_row_into_entry (GtkTreeIter iter,
 }
 
 
-
 void
 insert_source_row_into_tree_view (GtkTreeIter iter,
                                  GtkWidget *dest,
@@ -96,24 +94,28 @@ insert_source_row_into_tree_view (GtkTreeIter iter,
   GtkTreeIter dest_iter;
   GtkTreeIter dict_iter;
   gint *row ;
-  GtkTreeModel *destmodel = gtk_tree_view_get_model ( GTK_TREE_VIEW (dest));
+  GtkTreeModel *destmodel = gtk_tree_view_get_model (GTK_TREE_VIEW (dest));
 
+  const struct variable *var;
   GtkTreeModel *dict;
 
-
   get_base_model (model, &iter, &dict, &dict_iter);
 
   path = gtk_tree_model_get_path (dict, &dict_iter);
 
   row = gtk_tree_path_get_indices (path);
 
+  var = psppire_dict_get_variable (PSPPIRE_DICT (dict), *row);
+
   gtk_list_store_append (GTK_LIST_STORE (destmodel),  &dest_iter);
-  gtk_list_store_set (GTK_LIST_STORE (destmodel), &dest_iter, 0, *row, -1);
+
+  gtk_list_store_set (GTK_LIST_STORE (destmodel), &dest_iter, 0, var, -1);
 
   gtk_tree_path_free (path);
 }
 
 
+
 gboolean
 is_currently_in_entry (GtkTreeModel *model, GtkTreeIter *iter,
                       PsppireSelector *selector)
@@ -125,7 +127,12 @@ is_currently_in_entry (GtkTreeModel *model, GtkTreeIter *iter,
   gint dict_index;
   gint *indeces;
   GtkTreePath *path;
-  const gchar *text =  gtk_entry_get_text (GTK_ENTRY (selector->dest));
+  GtkWidget *entry = NULL;
+  const gchar *text = NULL;
+
+  g_object_get (selector, "dest-widget", &entry, NULL);
+
+  text = gtk_entry_get_text (GTK_ENTRY (entry));
 
   get_base_model (model, iter, &dict, &dict_iter);
 
index 2c8df4407655e7d48cd4aedca7bd880d3130227a..f1a8a0016f9aa2c9920cc9b6424f9b0c34b251ca 100644 (file)
@@ -31,7 +31,6 @@ void insert_source_row_into_tree_view (GtkTreeIter source_iter,
                                       gpointer data
                                       );
 
-
 /* A SelectItemsFunc function for GtkEntry widgets */
 void insert_source_row_into_entry (GtkTreeIter source_iter,
                                   GtkWidget *dest,
index 470c4dbbe37797ac23e23d3430741c56da0aa94b..87a048acfe3d4e07bd6f2697cfd9b692fa660ef7 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007, 2008  Free Software Foundation
+   Copyright (C) 2007, 2008, 2009  Free Software Foundation
 
    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
@@ -17,6 +17,7 @@
 #include <config.h>
 
 #include "examine-dialog.h"
+#include "psppire-var-view.h"
 
 #include <gtk/gtk.h>
 #include <stdlib.h>
@@ -96,13 +97,13 @@ generate_syntax (const struct examine_dialog *ed)
   GString *str = g_string_new ("EXAMINE ");
 
   g_string_append (str, "\n\t/VARIABLES=");
-  append_variable_names (str, ed->dict, GTK_TREE_VIEW (ed->dep_list), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (ed->dep_list), 0, str);
 
   if ( 0  < gtk_tree_model_iter_n_children
        (gtk_tree_view_get_model (GTK_TREE_VIEW (ed->fct_list)), NULL))
     {
       g_string_append (str, "\n\tBY ");
-      append_variable_names (str, ed->dict, GTK_TREE_VIEW (ed->fct_list), 0);
+      psppire_var_view_append_names (PSPPIRE_VAR_VIEW (ed->fct_list), 0, str);
     }
 
   label = gtk_entry_get_text (GTK_ENTRY (ed->id_entry));
@@ -233,10 +234,9 @@ run_opts_dialog (struct examine_dialog *ed)
 
 /* Pops up the Examine dialog box */
 void
-examine_dialog (GObject *o, gpointer data)
+examine_dialog (PsppireDataWindow *de)
 {
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   struct examine_dialog ex_d;
 
@@ -250,8 +250,6 @@ examine_dialog (GObject *o, gpointer data)
 
 
   GtkWidget *dep_selector = get_widget_assert (xml, "psppire-selector1");
-  GtkWidget *fct_selector = get_widget_assert (xml, "psppire-selector2");
-  GtkWidget *id_selector = get_widget_assert (xml, "psppire-selector3");
 
   PsppireVarStore *vs = NULL;
 
@@ -280,36 +278,11 @@ examine_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (ex_d.opts_dialog), GTK_WINDOW (de));
 
   g_object_get (vs, "dictionary", &ex_d.dict, NULL);
-  g_object_set (source, "dictionary", ex_d.dict, NULL);
-
-  set_dest_model (GTK_TREE_VIEW (ex_d.dep_list), ex_d.dict);
-
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (dep_selector),
-                                source,
-                                ex_d.dep_list,
-                                insert_source_row_into_tree_view,
-                                NULL, NULL);
+  g_object_set (source, "model", ex_d.dict, NULL);
 
   psppire_selector_set_allow (PSPPIRE_SELECTOR (dep_selector),
                              numeric_only);
 
-  set_dest_model (GTK_TREE_VIEW (ex_d.fct_list), ex_d.dict);
-
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (fct_selector),
-                                source,
-                                ex_d.fct_list,
-                                insert_source_row_into_tree_view,
-                                NULL, NULL);
-
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (id_selector),
-                                source,
-                                ex_d.id_entry,
-                                insert_source_row_into_entry,
-                                NULL, NULL);
-
   g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  &ex_d);
 
   psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
@@ -341,7 +314,7 @@ examine_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&ex_d);
-       paste_syntax_in_new_window (syntax);
+       paste_syntax_to_window (syntax);
        g_free (syntax);
       }
       break;
index d8e3fb6c259cab1560ff88645c1609689803d61e..707b4f0c59160189336c6167cb544294a5b36347 100644 (file)
@@ -19,7 +19,8 @@
 
 
 #include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-void examine_dialog (GObject *o, gpointer data);
+void examine_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/examine.glade b/src/ui/gui/examine.glade
deleted file mode 100644 (file)
index a6f7ca8..0000000
+++ /dev/null
@@ -1,458 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.2 on Mon Dec 15 07:18:17 2008 by john@marilyn-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="examine-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Explore</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkTable" id="table1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="n_rows">3</property>
-                <property name="n_columns">3</property>
-                <child>
-                  <widget class="GtkFrame" id="frame3">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="shadow_type">GTK_SHADOW_NONE</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment3">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkEntry" id="entry1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label3">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Label Cases by:</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="shadow_type">GTK_SHADOW_NONE</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                            <child>
-                              <widget class="GtkTreeView" id="treeview3">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="headers_visible">False</property>
-                                <property name="headers_clickable">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Factor List:</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="shadow_type">GTK_SHADOW_NONE</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                            <child>
-                              <widget class="GtkTreeView" id="treeview2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="headers_visible">False</property>
-                                <property name="headers_clickable">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Dependent List:</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="PsppireSelector" id="psppire-selector3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options"></property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="PsppireSelector" id="psppire-selector2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options"></property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="PsppireSelector" id="psppire-selector1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="x_options"></property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                    <child>
-                      <widget class="PsppireDictView" id="treeview1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="headers_visible">False</property>
-                        <property name="headers_clickable">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="bottom_attach">3</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkHButtonBox" id="hbuttonbox1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-                <child>
-                  <widget class="GtkButton" id="stats-button">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Statistics...</property>
-                    <property name="response_id">0</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="opts-button">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Options...</property>
-                    <property name="response_id">0</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="padding">5</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="statistics-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Explore: Statistics</property>
-    <property name="modal">True</property>
-    <property name="orientation">PSPPIRE_VERTICAL</property>
-    <child internal-child="hbox">
-      <widget class="GtkVBox" id="dialog-hbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="homogeneous">True</property>
-            <child>
-              <widget class="GtkCheckButton" id="descriptives-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Descriptives</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkCheckButton" id="extremes-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Extremes</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkCheckButton" id="percentiles-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Percentiles</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireHButtonBox" id="psppire-hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="options-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Explore: Options</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox3">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame5">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment5">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox4">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Exclude cases listwise</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Exclude cases pairwise</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">radiobutton1</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Repeat values</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">radiobutton1</property>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label5">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Missing Values</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/examine.ui b/src/ui/gui/examine.ui
new file mode 100644 (file)
index 0000000..754d6e8
--- /dev/null
@@ -0,0 +1,481 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <requires lib="psppire" version="2054.17080"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="examine-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Explore</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkTable" id="table1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="n_rows">3</property>
+                <property name="n_columns">3</property>
+                <child>
+                  <object class="GtkFrame" id="frame3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkEntry" id="entry1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Label Cases by:</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="hscrollbar_policy">never</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">etched-in</property>
+                            <child>
+                              <object class="PsppireVarView" id="treeview3">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="headers_visible">False</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Factor List:</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="hscrollbar_policy">never</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">etched-in</property>
+                            <child>
+                              <object class="PsppireVarView" id="treeview2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="headers_visible">False</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Dependent List:</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="PsppireSelector" id="psppire-selector3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">treeview1</property>
+                    <property name="dest_widget">entry1</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="PsppireSelector" id="psppire-selector2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">treeview1</property>
+                    <property name="dest_widget">treeview3</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="PsppireSelector" id="psppire-selector1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                    <property name="primary">True</property>
+                    <property name="source_widget">treeview1</property>
+                    <property name="dest_widget">treeview2</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="PsppireDictView" id="treeview1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="bottom_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHButtonBox" id="hbuttonbox1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="layout_style">spread</property>
+                <child>
+                  <object class="GtkButton" id="stats-button">
+                    <property name="label" translatable="yes">Statistics...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="opts-button">
+                    <property name="label" translatable="yes">Options...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="statistics-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Explore: Statistics</property>
+    <property name="modal">True</property>
+    <property name="orientation">Vertical</property>
+    <child internal-child="hbox">
+      <object class="GtkVBox" id="dialog-hbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkCheckButton" id="descriptives-button">
+                <property name="label" translatable="yes">Descriptives</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="extremes-button">
+                <property name="label" translatable="yes">Extremes</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="percentiles-button">
+                <property name="label" translatable="yes">Percentiles</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="layout_style">spread</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="options-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Explore: Options</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="frame5">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkVBox" id="vbox4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton1">
+                        <property name="label" translatable="yes">Exclude cases listwise</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton2">
+                        <property name="label" translatable="yes">Exclude cases pairwise</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton1</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton3">
+                        <property name="label" translatable="yes">Repeat values</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton1</property>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Missing Values</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 9336f7ce3d4dbe318fb8ed5fbdd5a890e3be57ed..6ccb5a534deca402d8e879dd2f3f6376a13e30e3 100644 (file)
@@ -23,7 +23,7 @@
 #include <libpspp/getl.h>
 #include <language/lexer/lexer.h>
 #include <language/command.h>
-#include <output/manager.h>
+#include <output/driver.h>
 #include "psppire-output-window.h"
 
 extern struct dataset *the_dataset;
@@ -102,9 +102,7 @@ execute_syntax (struct getl_interface *sss)
   if (!lazy_casereader_destroy (reader, lazy_serial))
     psppire_data_store_set_reader (the_data_store, reader);
 
-  som_flush ();
-
-  psppire_output_window_reload ();
+  output_flush ();
 
   return retval;
 }
diff --git a/src/ui/gui/factor-dialog.c b/src/ui/gui/factor-dialog.c
new file mode 100644 (file)
index 0000000..61427cc
--- /dev/null
@@ -0,0 +1,504 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dialog-common.h"
+#include <language/syntax-string-source.h>
+#include <ui/syntax-gen.h>
+#include <libpspp/str.h>
+
+#include "factor-dialog.h"
+#include "psppire-selector.h"
+#include "psppire-dictview.h"
+#include "psppire-dialog.h"
+
+#include "psppire-data-window.h"
+#include "psppire-var-view.h"
+
+#include "widget-io.h"
+
+#include "executor.h"
+#include "helper.h"
+
+#include <gtk/gtk.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
+struct extraction_parameters
+{
+  gdouble mineigen;
+  gint n_factors;
+  gint n_iterations;
+
+  gboolean explicit_nfactors;  
+  gboolean covariance;
+
+  gboolean scree;
+  gboolean unrotated;
+
+  gboolean paf;
+};
+
+enum rotation_type {
+  ROT_NONE,
+  ROT_VARIMAX,
+  ROT_QUARTIMAX,
+  ROT_EQUIMAX
+};
+
+static const char *rot_method_syntax[] = 
+  {
+    "NOROTATE",
+    "VARIMAX",
+    "QUARTIMAX",
+    "EQUAMAX"
+  };
+
+struct rotation_parameters
+{
+  gboolean rotated_solution;
+  gint iterations;
+
+  enum rotation_type method;
+};
+
+
+
+static const struct extraction_parameters default_extraction_parameters = {1.0, 0, 25, FALSE, TRUE, FALSE, TRUE, FALSE};
+
+static const struct rotation_parameters default_rotation_parameters = {TRUE, 25, ROT_VARIMAX};
+
+struct factor
+{
+  GtkBuilder *xml;
+  PsppireDict *dict;
+
+  GtkWidget *variables;
+  PsppireDataWindow *de ;
+
+  /* The Extraction subdialog */
+  GtkWidget *extraction_dialog;
+  GtkWidget *rotation_dialog;
+
+  GtkWidget *n_factors;
+  GtkWidget *mineigen;
+  GtkWidget *extract_iterations;
+
+  GtkWidget *nfactors_toggle;
+  GtkWidget *mineigen_toggle;
+
+  GtkWidget *covariance_toggle;
+  GtkWidget *correlation_toggle;
+
+  GtkWidget *scree_button;
+  GtkWidget *unrotated_button;
+
+  GtkWidget *extraction_combo;
+
+
+  /* Rotation Widgets */
+  GtkWidget *rotate_iterations;
+  GtkWidget *display_rotated_solution;
+  GtkWidget *rotation_none;
+  GtkWidget *rotation_varimax;
+  GtkWidget *rotation_quartimax;
+  GtkWidget *rotation_equimax;
+
+
+  struct extraction_parameters extraction;
+  struct rotation_parameters rotation;
+};
+
+static void
+load_rotation_parameters (struct factor *fd, const struct rotation_parameters *p)
+{
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->display_rotated_solution),
+                               p->rotated_solution);
+  
+  gtk_spin_button_set_value (GTK_SPIN_BUTTON (fd->rotate_iterations),
+                            p->iterations);
+
+  switch (p->method)
+    {
+    case ROT_NONE:
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->rotation_none), TRUE);
+      break;
+    case ROT_VARIMAX:
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->rotation_varimax), TRUE);
+      break;
+    case ROT_QUARTIMAX:
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->rotation_quartimax), TRUE);
+      break;
+    case ROT_EQUIMAX:
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->rotation_equimax), TRUE);
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+}
+
+static void
+load_extraction_parameters (struct factor *fd, const struct extraction_parameters *p)
+{
+  gtk_spin_button_set_value (GTK_SPIN_BUTTON (fd->mineigen), p->mineigen);
+  gtk_spin_button_set_value (GTK_SPIN_BUTTON (fd->n_factors), p->n_factors);
+
+  gtk_spin_button_set_value (GTK_SPIN_BUTTON (fd->extract_iterations), p->n_iterations);
+
+
+  if (p->explicit_nfactors)
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->nfactors_toggle), TRUE);
+  else
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->mineigen_toggle), TRUE);
+
+  if (p->covariance)
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->covariance_toggle), TRUE);
+  else
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->correlation_toggle), TRUE);
+
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->scree_button), p->scree);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->unrotated_button), p->unrotated);
+
+  if ( p->paf )
+    gtk_combo_box_set_active (GTK_COMBO_BOX (fd->extraction_combo), 1);
+  else
+    gtk_combo_box_set_active (GTK_COMBO_BOX (fd->extraction_combo), 0);
+    
+}
+
+static void
+set_rotation_parameters (const struct factor *fd, struct rotation_parameters *p)
+{
+  p->iterations = gtk_spin_button_get_value (GTK_SPIN_BUTTON (fd->rotate_iterations));
+  p->rotated_solution = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->display_rotated_solution));
+
+
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->rotation_none)))
+    p->method = ROT_NONE;
+
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->rotation_varimax)))
+    p->method = ROT_VARIMAX;
+
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->rotation_quartimax)))
+    p->method = ROT_QUARTIMAX;
+
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->rotation_equimax)))
+    p->method = ROT_EQUIMAX;
+}
+
+static void
+set_extraction_parameters (const struct factor *fd, struct extraction_parameters *p)
+{
+  p->mineigen = gtk_spin_button_get_value (GTK_SPIN_BUTTON (fd->mineigen));
+  p->n_factors = gtk_spin_button_get_value (GTK_SPIN_BUTTON (fd->n_factors));
+  p->n_iterations = gtk_spin_button_get_value (GTK_SPIN_BUTTON (fd->extract_iterations));
+
+  p->explicit_nfactors = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->nfactors_toggle));
+  p->covariance = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->covariance_toggle));
+
+  p->scree = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->scree_button));
+  p->unrotated = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->unrotated_button));
+
+  p->paf = (gtk_combo_box_get_active (GTK_COMBO_BOX (fd->extraction_combo)) == 1);
+}
+
+static void
+run_extractions_subdialog (struct factor *fd)
+{
+  struct extraction_parameters *ex = &fd->extraction;
+
+  gint response = psppire_dialog_run (PSPPIRE_DIALOG (fd->extraction_dialog));
+
+  if ( response == PSPPIRE_RESPONSE_CONTINUE )
+    {
+      /* Set the parameters from their respective widgets */
+      set_extraction_parameters (fd, ex);
+    }
+  else
+    {
+      /* Cancelled.  Reset the widgets to their old state */
+      load_extraction_parameters (fd, ex);
+    }
+}
+
+static void
+run_rotations_subdialog (struct factor *fd)
+{
+  struct rotation_parameters *rot = &fd->rotation;
+
+  gint response = psppire_dialog_run (PSPPIRE_DIALOG (fd->rotation_dialog));
+
+  if ( response == PSPPIRE_RESPONSE_CONTINUE )
+    {
+      /* Set the parameters from their respective widgets */
+      set_rotation_parameters (fd, rot);
+    }
+  else
+    {
+      /* Cancelled.  Reset the widgets to their old state */
+      load_rotation_parameters (fd, rot);
+    }
+}
+
+
+static char * generate_syntax (const struct factor *rd);
+
+
+static void
+refresh (struct factor *fd)
+{
+  GtkTreeModel *liststore =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (fd->variables));
+  gtk_list_store_clear (GTK_LIST_STORE (liststore));
+
+  load_extraction_parameters (fd, &default_extraction_parameters);
+  load_rotation_parameters (fd, &default_rotation_parameters);
+}
+
+
+static gboolean
+dialog_state_valid (gpointer data)
+{
+  struct factor *fd = data;
+
+  GtkTreeModel *liststore = gtk_tree_view_get_model (GTK_TREE_VIEW (fd->variables));
+
+  if  (gtk_tree_model_iter_n_children (liststore, NULL) < 2)
+    return FALSE;
+
+  return TRUE;
+}
+
+static void
+on_show (struct factor *fd, GtkWidget *dialog)
+{
+  GtkTreeModel *liststore = gtk_tree_view_get_model (GTK_TREE_VIEW (fd->variables));
+
+  gint n_vars = gtk_tree_model_iter_n_children (liststore, NULL);
+
+  gtk_spin_button_set_range (GTK_SPIN_BUTTON (fd->n_factors), 1, n_vars - 1);
+}
+
+
+static void
+on_extract_toggle (GtkToggleButton *button, struct factor *f)
+{
+  gboolean active = gtk_toggle_button_get_active (button);
+
+  gtk_widget_set_sensitive (GTK_WIDGET (f->n_factors), active);
+  gtk_widget_set_sensitive (GTK_WIDGET (f->mineigen), ! active);
+}
+
+/* Pops up the Factor dialog box */
+void
+factor_dialog (PsppireDataWindow *dw)
+{
+  struct factor fd;
+  gint response;
+
+  PsppireVarStore *vs;
+
+  GtkWidget *dialog ;
+  GtkWidget *source ;
+  GtkWidget *extraction_button ;
+  GtkWidget *rotation_button ;
+
+  fd.xml = builder_new ("factor.ui");
+
+  fd.extraction = default_extraction_parameters;
+  fd.rotation = default_rotation_parameters;
+  
+  dialog = get_widget_assert   (fd.xml, "factor-dialog");
+  source = get_widget_assert   (fd.xml, "dict-view");
+  extraction_button = get_widget_assert (fd.xml, "button-extractions");
+  rotation_button = get_widget_assert (fd.xml, "button-rotations");
+
+  fd.extraction_dialog = get_widget_assert (fd.xml, "extractions-dialog");
+  fd.rotation_dialog = get_widget_assert (fd.xml, "rotations-dialog");
+
+  fd.de = dw;
+
+  g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh),  &fd);
+
+  {
+    GtkWidget *hbox = get_widget_assert (fd.xml, "hbox6");
+    GtkWidget *eigenvalue_extraction = widget_scanf (_("Eigenvalues over %4.2f times the mean eigenvalue"), &fd.mineigen);
+
+    fd.nfactors_toggle = get_widget_assert (fd.xml, "nfactors-radiobutton");
+    fd.mineigen_toggle = get_widget_assert (fd.xml, "mineigen-radiobutton");
+    fd.n_factors = get_widget_assert (fd.xml, "spinbutton-nfactors");
+    fd.extract_iterations = get_widget_assert (fd.xml, "spinbutton-extract-iterations");
+    fd.covariance_toggle = get_widget_assert (fd.xml,  "covariance-radiobutton");
+    fd.correlation_toggle = get_widget_assert (fd.xml, "correlations-radiobutton");
+
+    fd.scree_button = get_widget_assert (fd.xml, "scree-button");
+    fd.unrotated_button = get_widget_assert (fd.xml, "unrotated-button");
+    fd.extraction_combo = get_widget_assert (fd.xml, "combobox1");
+
+    gtk_container_add (GTK_CONTAINER (hbox), eigenvalue_extraction);
+
+    g_signal_connect (fd.nfactors_toggle, "toggled", G_CALLBACK (on_extract_toggle), &fd);
+
+    gtk_widget_show_all (eigenvalue_extraction);
+  }
+
+  {
+    fd.rotate_iterations = get_widget_assert (fd.xml, "spinbutton-rot-iterations");
+
+    fd.display_rotated_solution = get_widget_assert (fd.xml, "checkbutton-rotated-solution");
+
+    fd.rotation_none      = get_widget_assert (fd.xml, "radiobutton-none");
+    fd.rotation_varimax   = get_widget_assert (fd.xml, "radiobutton-varimax");
+    fd.rotation_quartimax = get_widget_assert (fd.xml, "radiobutton-quartimax");
+    fd.rotation_equimax   = get_widget_assert (fd.xml, "radiobutton-equimax");
+  }
+
+  g_signal_connect_swapped (extraction_button, "clicked", G_CALLBACK (run_extractions_subdialog), &fd);
+  g_signal_connect_swapped (rotation_button, "clicked", G_CALLBACK (run_rotations_subdialog), &fd);
+
+  g_signal_connect_swapped (fd.extraction_dialog, "show", G_CALLBACK (on_show), &fd);
+
+  fd.variables = get_widget_assert   (fd.xml, "psppire-var-view1");
+
+  g_object_get (fd.de->data_editor, "var-store", &vs, NULL);
+
+  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (fd.de));
+  gtk_window_set_transient_for (GTK_WINDOW (fd.extraction_dialog), GTK_WINDOW (fd.de));
+  gtk_window_set_transient_for (GTK_WINDOW (fd.rotation_dialog), GTK_WINDOW (fd.de));
+
+  g_object_get (vs, "dictionary", &fd.dict, NULL);
+  g_object_set (source, "model", fd.dict, NULL);
+
+
+  psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
+                                     dialog_state_valid, &fd);
+
+  psppire_selector_set_allow (PSPPIRE_SELECTOR (get_widget_assert (fd.xml, "dep-selector")),
+                             numeric_only);
+
+  response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
+
+  switch (response)
+    {
+    case GTK_RESPONSE_OK:
+      {
+       gchar *syntax = generate_syntax (&fd);
+
+       struct getl_interface *sss = create_syntax_string_source (syntax);
+       execute_syntax (sss);
+
+       g_free (syntax);
+      }
+      break;
+    case PSPPIRE_RESPONSE_PASTE:
+      {
+       gchar *syntax = generate_syntax (&fd);
+        paste_syntax_to_window (syntax);
+
+       g_free (syntax);
+      }
+      break;
+    default:
+      break;
+    }
+
+  g_object_unref (fd.xml);
+}
+
+
+\f
+
+static char *
+generate_syntax (const struct factor *rd)
+{
+  gchar *text;
+
+  GString *string = g_string_new ("FACTOR ");
+
+  g_string_append (string, "VARIABLES =  ");
+
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->variables), 0, string);
+
+
+  g_string_append (string, "\n\t/CRITERIA = ");
+  if ( rd->extraction.explicit_nfactors )
+    g_string_append_printf (string, "FACTORS (%d)", rd->extraction.n_factors);
+  else
+    g_string_append_printf (string, "MINEIGEN (%g)", rd->extraction.mineigen);
+
+  /*
+    The CRITERIA = ITERATE subcommand is overloaded.
+     It applies to the next /ROTATION and/or EXTRACTION command whatever comes first.
+  */
+  g_string_append_printf (string, " ITERATE (%d)", rd->extraction.n_iterations);
+
+
+  g_string_append (string, "\n\t/EXTRACTION =");
+  if ( rd->extraction.paf)
+    g_string_append (string, "PAF");
+  else
+    g_string_append (string, "PC");
+
+
+
+
+  g_string_append (string, "\n\t/METHOD = ");
+  if ( rd->extraction.covariance )
+    g_string_append (string, "COVARIANCE");
+  else
+    g_string_append (string, "CORRELATION");
+
+
+
+  if ( rd->extraction.scree )
+    {
+      g_string_append (string, "\n\t/PLOT = ");
+      g_string_append (string, "EIGEN");
+    }
+
+  g_string_append (string, "\n\t/PRINT = ");
+  g_string_append (string, "INITIAL ");
+
+  if ( rd->extraction.unrotated )  
+    g_string_append (string, "EXTRACTION ");
+
+  if ( rd->rotation.rotated_solution )
+    g_string_append (string, "ROTATION");
+
+
+  /* The CRITERIA = ITERATE subcommand is overloaded.
+     It applies to the next /ROTATION and/or EXTRACTION command whatever comes first.
+  */
+  g_string_append_printf (string, "\n\t/CRITERIA = ITERATE (%d)",  rd->rotation.iterations  );
+
+  g_string_append (string, "\n\t/ROTATION = ");
+  g_string_append (string, rot_method_syntax[rd->rotation.method]);
+
+
+  g_string_append (string, ".\n");
+
+  text = string->str;
+
+  g_string_free (string, FALSE);
+
+  return text;
+}
diff --git a/src/ui/gui/factor-dialog.h b/src/ui/gui/factor-dialog.h
new file mode 100644 (file)
index 0000000..b735d46
--- /dev/null
@@ -0,0 +1,26 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef __FACTOR_DIALOG_H
+#define __FACTOR_DIALOG_H
+
+
+#include <gtk/gtk.h>
+#include "psppire-data-window.h"
+
+void factor_dialog (PsppireDataWindow * data);
+
+#endif
diff --git a/src/ui/gui/factor.ui b/src/ui/gui/factor.ui
new file mode 100644 (file)
index 0000000..4d2c612
--- /dev/null
@@ -0,0 +1,713 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-requires psppire 0.0 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkListStore" id="extraction-methods">
+    <columns>
+      <!-- column-name Method-Name -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Principal Components Analysis</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Principal Axis Factoring</col>
+      </row>
+    </data>
+  </object>
+  <object class="PsppireDialog" id="factor-dialog">
+    <property name="title" translatable="yes">Factor Analysis</property>
+    <property name="modal">True</property>
+    <property name="orientation">Tabular</property>
+    <child internal-child="hbox">
+      <object class="GtkTable" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="n_rows">2</property>
+        <property name="n_columns">2</property>
+        <property name="row_spacing">5</property>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="x_options"></property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="layout_style">spread</property>
+            <child>
+              <object class="GtkButton" id="button-descriptives">
+                <property name="label" translatable="yes">_Descriptives...</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button-extractions">
+                <property name="label" translatable="yes">_Extraction...</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button-rotations">
+                <property name="label" translatable="yes">_Rotations...</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="right_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="y_options"></property>
+            <property name="x_padding">5</property>
+            <property name="y_padding">5</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="PsppireDictView" id="dict-view">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="border_width">5</property>
+                    <property name="headers_visible">False</property>
+                    <property name="headers_clickable">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment2">
+                <property name="visible">True</property>
+                <property name="xscale">0.5</property>
+                <property name="yscale">0</property>
+                <child>
+                  <object class="PsppireSelector" id="dep-selector">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">dict-view</property>
+                    <property name="dest_widget">psppire-var-view1</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="PsppireVarView" id="psppire-var-view1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="border_width">5</property>
+                            <property name="headers_visible">False</property>
+                            <property name="headers_clickable">False</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Variables:</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="x_padding">5</property>
+            <property name="y_padding">5</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="extractions-dialog">
+    <property name="title" translatable="yes">Factor Analysis: Extraction</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox4">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkAlignment" id="alignment3">
+            <property name="visible">True</property>
+            <property name="top_padding">5</property>
+            <property name="bottom_padding">5</property>
+            <property name="left_padding">5</property>
+            <property name="right_padding">5</property>
+            <child>
+              <object class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="GtkHBox" id="hbox3">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkLabel" id="label5">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Method: </property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBox" id="combobox1">
+                        <property name="visible">True</property>
+                        <property name="model">extraction-methods</property>
+                        <property name="active">0</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="renderer1"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <object class="GtkFrame" id="frame3">
+                        <property name="visible">True</property>
+                        <property name="label_xalign">0</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment4">
+                            <property name="visible">True</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkVButtonBox" id="vbuttonbox1">
+                                <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
+                                <property name="layout_style">spread</property>
+                                <child>
+                                  <object class="GtkRadioButton" id="correlations-radiobutton">
+                                    <property name="label" translatable="yes">Correlation matrix</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioButton" id="covariance-radiobutton">
+                                    <property name="label" translatable="yes">Covariance matrix</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                    <property name="group">correlations-radiobutton</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Analyse</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame4">
+                        <property name="visible">True</property>
+                        <property name="label_xalign">0</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment5">
+                            <property name="visible">True</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkVButtonBox" id="vbuttonbox2">
+                                <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
+                                <property name="layout_style">spread</property>
+                                <child>
+                                  <object class="GtkCheckButton" id="unrotated-button">
+                                    <property name="label" translatable="yes">Unrotatated factor solution</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="scree-button">
+                                    <property name="label" translatable="yes">Scree plot</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label4">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Display</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="padding">5</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame2">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment6">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox2">
+                            <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox6">
+                                <property name="visible">True</property>
+                                <child>
+                                  <object class="GtkRadioButton" id="mineigen-radiobutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_indicator">True</property>
+                                    <property name="group">nfactors-radiobutton</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox5">
+                                <property name="visible">True</property>
+                                <child>
+                                  <object class="GtkRadioButton" id="nfactors-radiobutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label7">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Number of factors:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" id="spinbutton-nfactors">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="invisible_char">&#x2022;</property>
+                                    <property name="adjustment">adjustment1</property>
+                                    <property name="numeric">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Extract</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox4">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkLabel" id="label6">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Maximum iterations for convergence:</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="spinbutton-extract-iterations">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">&#x2022;</property>
+                        <property name="adjustment">adjustment2</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="spacing">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="PsppireDialog" id="rotations-dialog">
+    <property name="title" translatable="yes">Factor Analysis: Rotation</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox8">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkAlignment" id="alignment7">
+            <property name="visible">True</property>
+            <property name="top_padding">5</property>
+            <property name="bottom_padding">5</property>
+            <property name="left_padding">5</property>
+            <property name="right_padding">5</property>
+            <child>
+              <object class="GtkVBox" id="vbox3">
+                <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="GtkFrame" id="frame5">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment8">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table1">
+                            <property name="visible">True</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <object class="GtkRadioButton" id="radiobutton-none">
+                                <property name="label" translatable="yes">_None</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="radiobutton-varimax">
+                                <property name="label" translatable="yes">_Varimax</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">radiobutton-none</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="radiobutton-quartimax">
+                                <property name="label" translatable="yes">_Quartimax</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">radiobutton-none</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="radiobutton-equimax">
+                                <property name="label" translatable="yes">_Equimax</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">radiobutton-none</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label9">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Method</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="checkbutton-rotated-solution">
+                    <property name="label" translatable="yes">_Display rotated solution</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox11">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkLabel" id="label13">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Maximum iterations for convergence:</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="spinbutton-rot-iterations">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">&#x2022;</property>
+                        <property name="adjustment">adjustment3</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 11ec0603d4dfd98ee65954b1fed34af49feb4bc2..63604cf496e4a0ccb71329d18376f6571c6f1760 100644 (file)
@@ -34,6 +34,7 @@ which match particular strings */
 #include <ctype.h>
 #include <sys/types.h>
 #include <regex.h>
+#include <libpspp/cast.h>
 #include <libpspp/message.h>
 
 #include <gtk/gtk.h>
@@ -183,10 +184,8 @@ value_labels_toggled (GtkToggleButton *tb, gpointer data)
 /* Pops up the Find dialog box
  */
 void
-find_dialog (GObject *o, gpointer data)
+find_dialog (PsppireDataWindow *de)
 {
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
-
   struct find_dialog fd;
 
   GtkWidget *dialog ;
@@ -207,7 +206,7 @@ find_dialog (GObject *o, gpointer data)
 
   buttonbox = get_widget_assert (fd.xml, "find-buttonbox");
 
-  gtk_box_pack_start_defaults (GTK_BOX (buttonbox), find_button);
+  psppire_box_pack_start_defaults (GTK_BOX (buttonbox), find_button);
   gtk_box_reorder_child (GTK_BOX (buttonbox), find_button, 0);
 
   dialog = get_widget_assert (fd.xml, "find-dialog");
@@ -242,17 +241,13 @@ find_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
 
-  g_object_set (source, "dictionary", fd.dict,
+  g_object_set (source, "model", fd.dict,
        "selection-mode", GTK_SELECTION_SINGLE,
        NULL);
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                source,
-                                fd.variable_entry,
-                                insert_source_row_into_entry,
-                                is_currently_in_entry,
-                                NULL
-                                );
+
+  psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector),
+                                   is_currently_in_entry);
 
   g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  &fd);
 
@@ -570,7 +565,8 @@ regexp_label_compare (const struct comparator *cmptr,
 static void
 regexp_destroy (struct comparator *cmptr)
 {
-  struct regexp_comparator *rec = (struct regexp_comparator *) cmptr;
+  struct regexp_comparator *rec
+    = UP_CAST (cmptr, struct regexp_comparator, parent);
 
   regfree (&rec->re);
 }
@@ -578,7 +574,8 @@ regexp_destroy (struct comparator *cmptr)
 static void
 cmptr_value_destroy (struct comparator *cmptr)
 {
-  struct value_comparator *vc = (struct value_comparator *) cmptr;
+  struct value_comparator *vc
+    = UP_CAST (cmptr, struct value_comparator, parent);
   value_destroy (&vc->pattern, var_get_width (cmptr->var));
 }
 
@@ -587,7 +584,7 @@ static struct comparator *
 value_comparator_create (const struct variable *var, const PsppireDict *dict, const char *target)
 {
   struct value_comparator *vc = xzalloc (sizeof (*vc));
-  struct comparator *cmptr = (struct comparator *) vc;
+  struct comparator *cmptr = &vc->parent;
 
   cmptr->flags = 0;
   cmptr->var = var;
@@ -606,7 +603,7 @@ string_comparator_create (const struct variable *var, const PsppireDict *dict,
                          enum string_cmp_flags flags)
 {
   struct string_comparator *ssc = xzalloc (sizeof (*ssc));
-  struct comparator *cmptr = (struct comparator *) ssc;
+  struct comparator *cmptr = &ssc->parent;
 
   cmptr->flags = flags;
   cmptr->var = var;
@@ -629,7 +626,7 @@ regexp_comparator_create (const struct variable *var, const PsppireDict *dict, c
 {
   int code;
   struct regexp_comparator *rec = xzalloc (sizeof (*rec));
-  struct comparator *cmptr = (struct comparator *) rec;
+  struct comparator *cmptr = &rec->parent;
 
   cmptr->flags = flags;
   cmptr->var = var;
index 3d4a50fff4a4f549f611fbd0c54dde9f9ea840f7..bba986bca6c11c9bbb4388255531361538303aa0 100644 (file)
@@ -19,9 +19,9 @@
 #define FIND_DIALOG_H
 
 #include <glib.h>
-#include <glib-object.h>
+#include "psppire-data-window.h"
 
 /* Pops up the Find dialog box */
-void find_dialog (GObject *o, gpointer data);
+void find_dialog (PsppireDataWindow *);
 
 #endif
diff --git a/src/ui/gui/find.glade b/src/ui/gui/find.glade
deleted file mode 100644 (file)
index 3ab4f4e..0000000
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="find-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Find Case</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox14">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkHBox" id="hbox10">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow13">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                <child>
-                  <widget class="PsppireDictView" id="find-variable-treeview">
-                    <property name="height_request">300</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="headers_visible">False</property>
-                    <property name="fixed_height_mode">True</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox27">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="PsppireSelector" id="find-selector">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox10">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox11">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label33">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Variable:</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">5</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="find-variable-entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox15">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label34">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Value:</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">5</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="find-value-entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="find-value-labels-checkbutton">
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Search value labels</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVButtonBox" id="bb1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkCheckButton" id="find-match-regexp-checkbutton">
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Regular expression Match</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="find-match-substring-checkbutton">
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Search substrings</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="find-wrap">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Wrap around</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="find-backwards">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Search backward</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="find-buttonbox">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK | PSPPIRE_BUTTON_RESET_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/find.ui b/src/ui/gui/find.ui
new file mode 100644 (file)
index 0000000..ed226ad
--- /dev/null
@@ -0,0 +1,264 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="psppire" version="2053.63976"/>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="find-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Find Case</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox14">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkHBox" id="hbox10">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow13">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="find-variable-treeview">
+                    <property name="height_request">300</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                    <property name="fixed_height_mode">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox27">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="PsppireSelector" id="find-selector">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">find-variable-treeview</property>
+                    <property name="dest_widget">find-variable-entry</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox10">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkVBox" id="vbox11">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkLabel" id="label33">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Variable:</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">5</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="find-variable-entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox15">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label34">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Value:</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">5</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="find-value-entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="find-value-labels-checkbutton">
+                        <property name="label" translatable="yes">Search value labels</property>
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVButtonBox" id="bb1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkCheckButton" id="find-match-regexp-checkbutton">
+                        <property name="label" translatable="yes">Regular expression Match</property>
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="find-match-substring-checkbutton">
+                        <property name="label" translatable="yes">Search substrings</property>
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="find-wrap">
+                        <property name="label" translatable="yes">Wrap around</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="find-backwards">
+                        <property name="label" translatable="yes">Search backward</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="find-buttonbox">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK | PSPPIRE_BUTTON_RESET_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 8706f3a4e63ac105e0caee6a46e597cee048fc40..2bbb5546cdd9bc9dec38664bdab5d4df9f7fc146 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007  Free Software Foundation
+   Copyright (C) 2007, 2010  Free Software Foundation
 
    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
@@ -18,6 +18,7 @@
 
 #include "checkbox-treeview.h"
 #include "frequencies-dialog.h"
+#include "psppire-var-view.h"
 
 #include <gtk/gtk.h>
 #include <stdlib.h>
@@ -87,23 +88,59 @@ enum frq_order
     FRQ_DCOUNT
   };
 
-struct format_options
+enum frq_table
+  {
+    FRQ_TABLE,
+    FRQ_NOTABLE,
+    FRQ_LIMIT
+  };
+
+struct tables_options
 {
   enum frq_order order;
-  gboolean use_limits;
+  enum frq_table table;
   int limit;
 };
 
+enum frq_scale
+  {
+    FRQ_FREQ,
+    FRQ_PERCENT
+  };
+
+struct charts_options
+  {
+    bool use_min;
+    double min;
+    bool use_max;
+    double max;
+    bool draw_hist;
+    bool draw_normal;
+    enum frq_scale scale;
+    bool draw_pie;
+    bool pie_include_missing;
+  };
+
 struct frequencies_dialog
 {
+  /* Main dialog. */
   GtkTreeView *stat_vars;
   PsppireDict *dict;
 
-  GtkWidget *table_button;
+  GtkWidget *tables_button;
+  GtkWidget *charts_button;
+
+  GtkToggleButton *include_missing;
 
-  GtkWidget *format_dialog;
-  GtkWidget *maximum_cats;
-  GtkWidget *limit_toggle_button;
+  GtkTreeModel *stats;
+
+  /* Frequency Tables dialog. */
+  GtkWidget *tables_dialog;
+  struct tables_options tables_opts;
+
+  GtkToggleButton *always;
+  GtkToggleButton *never;
+  GtkToggleButton *limit;
   GtkSpinButton *limit_spinbutton;
 
   GtkToggleButton  *avalue;
@@ -111,9 +148,23 @@ struct frequencies_dialog
   GtkToggleButton  *afreq;
   GtkToggleButton  *dfreq;
 
-  struct format_options current_opts;
+  /* Charts dialog. */
+  GtkWidget *charts_dialog;
+  struct charts_options charts_opts;
 
-  GtkTreeModel *stats;
+  GtkToggleButton *freqs;
+  GtkToggleButton *percents;
+
+  GtkToggleButton *min;
+  GtkSpinButton *min_spin;
+  GtkToggleButton *max;
+  GtkSpinButton *max_spin;
+
+  GtkToggleButton *hist;
+  GtkToggleButton *normal;
+
+  GtkToggleButton *pie;
+  GtkToggleButton *pie_include_missing;
 };
 
 static void
@@ -131,8 +182,6 @@ refresh (PsppireDialog *dialog, struct frequencies_dialog *fd)
     gtk_list_store_set (GTK_LIST_STORE (fd->stats), &iter,
                        CHECKBOX_COLUMN_SELECTED,
                         (B_FS_DEFAULT & (1u << i)) ? true : false, -1);
-
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->table_button), TRUE);
 }
 
 static char *
@@ -147,11 +196,11 @@ generate_syntax (const struct frequencies_dialog *fd)
   GString *string = g_string_new ("FREQUENCIES");
 
   g_string_append (string, "\n\t/VARIABLES=");
-  append_variable_names (string, fd->dict, GTK_TREE_VIEW (fd->stat_vars), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (fd->stat_vars), 0, string);
 
   g_string_append (string, "\n\t/FORMAT=");
 
-  switch (fd->current_opts.order)
+  switch (fd->tables_opts.order)
     {
     case FRQ_AVALUE:
       g_string_append (string, "AVALUE");
@@ -171,16 +220,17 @@ generate_syntax (const struct frequencies_dialog *fd)
 
   g_string_append (string, " ");
 
-  if ( fd->current_opts.use_limits )
-    {
-      g_string_append_printf (string, "LIMIT (%d)", fd->current_opts.limit);
-    }
-  else
+  switch (fd->tables_opts.table)
     {
-      if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->table_button)))
-       g_string_append (string, "TABLE");
-      else
-       g_string_append (string, "NOTABLE");
+    case FRQ_TABLE:
+      g_string_append (string, "TABLE");
+      break;
+    case FRQ_NOTABLE:
+      g_string_append (string, "NOTABLE");
+      break;
+    case FRQ_LIMIT:
+      g_string_append_printf (string, "LIMIT (%d)", fd->tables_opts.limit);
+      break;
     }
 
 
@@ -220,6 +270,37 @@ generate_syntax (const struct frequencies_dialog *fd)
         }
     }
 
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->include_missing)))
+    g_string_append (string, "\n\t/MISSING=INCLUDE");
+
+  if (fd->charts_opts.draw_hist)
+    {
+      g_string_append (string, "\n\t/HISTOGRAM=");
+      g_string_append (string,
+                       fd->charts_opts.draw_normal ? "NORMAL" : "NONORMAL");
+
+      if (fd->charts_opts.scale == FRQ_PERCENT)
+        g_string_append (string, " PERCENT");
+
+      if (fd->charts_opts.use_min)
+        g_string_append_printf (string, " MIN(%.15g)", fd->charts_opts.min);
+      if (fd->charts_opts.use_max)
+        g_string_append_printf (string, " MAX(%.15g)", fd->charts_opts.max);
+    }
+
+  if (fd->charts_opts.draw_pie)
+    {
+      g_string_append (string, "\n\t/PIECHART=");
+
+      if (fd->charts_opts.pie_include_missing)
+        g_string_append (string, " MISSING");
+
+      if (fd->charts_opts.use_min)
+        g_string_append_printf (string, " MIN(%.15g)", fd->charts_opts.min);
+      if (fd->charts_opts.use_max)
+        g_string_append_printf (string, " MAX(%.15g)", fd->charts_opts.max);
+    }
+
   g_string_append (string, ".\n");
 
   text = string->str;
@@ -244,12 +325,11 @@ dialog_state_valid (gpointer data)
 
 
 static void
-on_format_clicked (struct frequencies_dialog *fd)
+on_tables_clicked (struct frequencies_dialog *fd)
 {
   int ret;
-  g_signal_emit_by_name (fd->limit_toggle_button, "toggled");
 
-  switch (fd->current_opts.order)
+  switch (fd->tables_opts.order)
     {
     case FRQ_AVALUE:
       gtk_toggle_button_set_active (fd->avalue, TRUE);
@@ -258,37 +338,106 @@ on_format_clicked (struct frequencies_dialog *fd)
       gtk_toggle_button_set_active (fd->dvalue, TRUE);
       break;
     case FRQ_ACOUNT:
-      gtk_toggle_button_set_active (fd->dfreq, TRUE);
+      gtk_toggle_button_set_active (fd->afreq, TRUE);
       break;
     case FRQ_DCOUNT:
       gtk_toggle_button_set_active (fd->dfreq, TRUE);
       break;
     };
 
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->limit_toggle_button),
-                               fd->current_opts.use_limits);
-
+  switch (fd->tables_opts.table)
+    {
+    case FRQ_TABLE:
+      gtk_toggle_button_set_active (fd->always, TRUE);
+      break;
+    case FRQ_NOTABLE:
+      gtk_toggle_button_set_active (fd->never, TRUE);
+      break;
+    case FRQ_LIMIT:
+      gtk_toggle_button_set_active (fd->limit, TRUE);
+      break;
+    }
   gtk_spin_button_set_value (fd->limit_spinbutton,
-                            fd->current_opts.limit);
+                            fd->tables_opts.limit);
+  g_signal_emit_by_name (fd->limit, "toggled");
 
-  ret = psppire_dialog_run (PSPPIRE_DIALOG (fd->format_dialog));
+  ret = psppire_dialog_run (PSPPIRE_DIALOG (fd->tables_dialog));
 
   if ( ret == PSPPIRE_RESPONSE_CONTINUE )
     {
       if (gtk_toggle_button_get_active (fd->avalue))
-       fd->current_opts.order = FRQ_AVALUE;
+       fd->tables_opts.order = FRQ_AVALUE;
       else if (gtk_toggle_button_get_active (fd->dvalue))
-       fd->current_opts.order = FRQ_DVALUE;
+       fd->tables_opts.order = FRQ_DVALUE;
       else if (gtk_toggle_button_get_active (fd->afreq))
-       fd->current_opts.order = FRQ_ACOUNT;
+       fd->tables_opts.order = FRQ_ACOUNT;
       else if (gtk_toggle_button_get_active (fd->dfreq))
-       fd->current_opts.order = FRQ_DCOUNT;
+       fd->tables_opts.order = FRQ_DCOUNT;
 
-      fd->current_opts.use_limits = gtk_toggle_button_get_active
-       (GTK_TOGGLE_BUTTON (fd->limit_toggle_button));
+      if (gtk_toggle_button_get_active (fd->always))
+        fd->tables_opts.table = FRQ_TABLE;
+      else if (gtk_toggle_button_get_active (fd->never))
+        fd->tables_opts.table = FRQ_NOTABLE;
+      else
+        fd->tables_opts.table = FRQ_LIMIT;
 
-      fd->current_opts.limit =
-       gtk_spin_button_get_value (fd->limit_spinbutton);
+      fd->tables_opts.limit = gtk_spin_button_get_value (fd->limit_spinbutton);
+    }
+}
+
+static void
+on_charts_clicked (struct frequencies_dialog *fd)
+{
+  int ret;
+
+  gtk_toggle_button_set_active (fd->min, fd->charts_opts.use_min);
+  gtk_spin_button_set_value (fd->min_spin, fd->charts_opts.min);
+  g_signal_emit_by_name (fd->min, "toggled");
+
+  gtk_toggle_button_set_active (fd->max, fd->charts_opts.use_max);
+  gtk_spin_button_set_value (fd->max_spin, fd->charts_opts.max);
+  g_signal_emit_by_name (fd->max, "toggled");
+
+  gtk_toggle_button_set_active (fd->hist, fd->charts_opts.draw_hist);
+  gtk_toggle_button_set_active (fd->normal, fd->charts_opts.draw_normal);
+  g_signal_emit_by_name (fd->hist, "toggled");
+
+  switch (fd->charts_opts.scale)
+    {
+    case FRQ_FREQ:
+      gtk_toggle_button_set_active (fd->freqs, TRUE);
+      break;
+    case FRQ_DVALUE:
+      gtk_toggle_button_set_active (fd->percents, TRUE);
+      break;
+    };
+
+
+  gtk_toggle_button_set_active (fd->pie, fd->charts_opts.draw_pie);
+  gtk_toggle_button_set_active (fd->pie_include_missing,
+                                fd->charts_opts.pie_include_missing);
+  g_signal_emit_by_name (fd->pie, "toggled");
+
+  ret = psppire_dialog_run (PSPPIRE_DIALOG (fd->charts_dialog));
+
+  if ( ret == PSPPIRE_RESPONSE_CONTINUE )
+    {
+      fd->charts_opts.use_min = gtk_toggle_button_get_active (fd->min);
+      fd->charts_opts.min = gtk_spin_button_get_value (fd->min_spin);
+
+      fd->charts_opts.use_max = gtk_toggle_button_get_active (fd->max);
+      fd->charts_opts.max = gtk_spin_button_get_value (fd->max_spin);
+
+      fd->charts_opts.draw_hist = gtk_toggle_button_get_active (fd->hist);
+      fd->charts_opts.draw_normal = gtk_toggle_button_get_active (fd->normal);
+      if (gtk_toggle_button_get_active (fd->freqs))
+       fd->charts_opts.scale = FRQ_FREQ;
+      else if (gtk_toggle_button_get_active (fd->percents))
+       fd->charts_opts.scale = FRQ_PERCENT;
+
+      fd->charts_opts.draw_pie = gtk_toggle_button_get_active (fd->pie);
+      fd->charts_opts.pie_include_missing
+        = gtk_toggle_button_get_active (fd->pie_include_missing);
     }
 }
 
@@ -304,10 +453,9 @@ sensitive_if_active (GtkToggleButton *toggle, GtkWidget *w)
 
 /* Pops up the Frequencies dialog box */
 void
-frequencies_dialog (GObject *o, gpointer data)
+frequencies_dialog (PsppireDataWindow *de)
 {
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   struct frequencies_dialog fd;
 
@@ -316,8 +464,8 @@ frequencies_dialog (GObject *o, gpointer data)
   GtkWidget *dialog = get_widget_assert   (xml, "frequencies-dialog");
   GtkWidget *source = get_widget_assert   (xml, "dict-treeview");
   GtkWidget *dest =   get_widget_assert   (xml, "var-treeview");
-  GtkWidget *selector = get_widget_assert (xml, "selector1");
-  GtkWidget *format_button = get_widget_assert (xml, "button1");
+  GtkWidget *tables_button = get_widget_assert (xml, "tables-button");
+  GtkWidget *charts_button = get_widget_assert (xml, "charts-button");
   GtkWidget *stats_treeview = get_widget_assert (xml, "stats-treeview");
 
   PsppireVarStore *vs = NULL;
@@ -334,55 +482,87 @@ frequencies_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   g_object_get (vs, "dictionary", &fd.dict, NULL);
-  g_object_set (source, "dictionary", fd.dict, NULL);
-
-
-  set_dest_model (GTK_TREE_VIEW (dest), fd.dict);
-
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                source,
-                                dest,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
+  g_object_set (source, "model", fd.dict, NULL);
 
   fd.stat_vars = GTK_TREE_VIEW (dest);
-  fd.table_button = get_widget_assert (xml, "checkbutton1");
-  fd.format_dialog = get_widget_assert (xml, "format-dialog");
-  fd.maximum_cats = get_widget_assert (xml, "hbox5");
-  fd.limit_toggle_button = get_widget_assert (xml, "checkbutton2");
-  fd.limit_spinbutton =
-    GTK_SPIN_BUTTON (get_widget_assert (xml, "spinbutton1"));
+  fd.tables_button = get_widget_assert (xml, "tables-button");
+  fd.charts_button = get_widget_assert (xml, "charts-button");
 
-  fd.stats = gtk_tree_view_get_model (GTK_TREE_VIEW (stats_treeview));
-
-  fd.avalue = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton1"));
-  fd.dvalue = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton2"));
-  fd.afreq  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton3"));
-  fd.dfreq  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton4"));
-
-  fd.current_opts.order = FRQ_AVALUE;
-  fd.current_opts.use_limits = FALSE;
-  fd.current_opts.limit = 50;
+  fd.include_missing = GTK_TOGGLE_BUTTON (
+    get_widget_assert (xml, "include_missing"));
 
+  fd.stats = gtk_tree_view_get_model (GTK_TREE_VIEW (stats_treeview));
 
-  gtk_window_set_transient_for (GTK_WINDOW (fd.format_dialog), GTK_WINDOW (de));
-
+  /* Frequency Tables dialog. */
+  fd.tables_dialog = get_widget_assert (xml, "tables-dialog");
+  fd.tables_opts.order = FRQ_AVALUE;
+  fd.tables_opts.table = FRQ_TABLE;
+  fd.tables_opts.limit = 50;
 
+  fd.always = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "always"));
+  fd.never = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "never"));
+  fd.limit  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "limit"));
+  fd.limit_spinbutton =
+    GTK_SPIN_BUTTON (get_widget_assert (xml, "limit-spin"));
+  g_signal_connect (fd.limit, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.limit_spinbutton);
+
+  fd.avalue = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "avalue"));
+  fd.dvalue = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "dvalue"));
+  fd.afreq  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "afreq"));
+  fd.dfreq  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "dfreq"));
+
+  gtk_window_set_transient_for (GTK_WINDOW (fd.tables_dialog),
+                                GTK_WINDOW (de));
+
+  /* Charts dialog. */
+  fd.charts_dialog = get_widget_assert (xml, "charts-dialog");
+  fd.charts_opts.use_min = false;
+  fd.charts_opts.min = 0;
+  fd.charts_opts.use_max = false;
+  fd.charts_opts.max = 100;
+  fd.charts_opts.draw_hist = false;
+  fd.charts_opts.draw_normal = false;
+  fd.charts_opts.scale = FRQ_FREQ;
+  fd.charts_opts.draw_pie = false;
+  fd.charts_opts.pie_include_missing = false;
+
+  fd.freqs = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "freqs"));
+  fd.percents = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "percents"));
+
+  fd.min = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "min"));
+  fd.min_spin = GTK_SPIN_BUTTON (get_widget_assert (xml, "min-spin"));
+  g_signal_connect (fd.min, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.min_spin);
+  fd.max = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "max"));
+  fd.max_spin = GTK_SPIN_BUTTON (get_widget_assert (xml, "max-spin"));
+  g_signal_connect (fd.max, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.max_spin);
+
+  fd.hist = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "hist"));
+  fd.normal = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "normal"));
+  g_signal_connect (fd.hist, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.normal);
+
+  fd.pie = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "pie"));
+  fd.pie_include_missing = GTK_TOGGLE_BUTTON (
+    get_widget_assert (xml, "pie-include-missing"));
+  g_signal_connect (fd.pie, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.pie_include_missing);
+
+  gtk_window_set_transient_for (GTK_WINDOW (fd.charts_dialog),
+                                GTK_WINDOW (de));
+
+  /* Main dialog. */
   g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  &fd);
 
   psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
                                      dialog_state_valid, &fd);
 
-
-  g_signal_connect_swapped (format_button, "clicked",
-                           G_CALLBACK (on_format_clicked),  &fd);
-
-  g_signal_connect (fd.limit_toggle_button, "toggled",
-                   G_CALLBACK (sensitive_if_active), fd.maximum_cats);
-
+  g_signal_connect_swapped (tables_button, "clicked",
+                           G_CALLBACK (on_tables_clicked),  &fd);
+  g_signal_connect_swapped (charts_button, "clicked",
+                           G_CALLBACK (on_charts_clicked),  &fd);
 
   response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
 
@@ -402,7 +582,7 @@ frequencies_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&fd);
-       paste_syntax_in_new_window (syntax);
+       paste_syntax_to_window (syntax);
        g_free (syntax);
       }
       break;
index f4d44f35b35f2e565b49fcacd510856949d51504..605f1de13195dc8a2f6766786e62d0c09fd585ba 100644 (file)
@@ -19,7 +19,8 @@
 
 
 #include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-void frequencies_dialog (GObject *o, gpointer data);
+void frequencies_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/frequencies.glade b/src/ui/gui/frequencies.glade
deleted file mode 100644 (file)
index 3e5e921..0000000
+++ /dev/null
@@ -1,429 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.2 on Fri Nov 30 15:42:55 2007 by john@marilyn-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="frequencies-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Frequencies</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                    <child>
-                      <widget class="PsppireDictView" id="dict-treeview">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="headers_visible">False</property>
-                        <property name="headers_clickable">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="yalign">0.05000000074505806</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <widget class="PsppireSelector" id="selector1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="no_show_all">True</property>
-                        <property name="border_width">5</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox3">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkFrame" id="frame1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label_xalign">0</property>
-                        <property name="shadow_type">GTK_SHADOW_NONE</property>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                            <child>
-                              <widget class="GtkTreeView" id="var-treeview">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="headers_visible">False</property>
-                                <property name="headers_clickable">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label1">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Variable(s):</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkFrame" id="frame1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label_xalign">0</property>
-                        <property name="shadow_type">GTK_SHADOW_NONE</property>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                            <child>
-                              <widget class="GtkTreeView" id="stats-treeview">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="headers_visible">False</property>
-                                <property name="headers_clickable">True</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label1">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Statistics:</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkCheckButton" id="checkbutton1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Display Frequency Table</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="spacing">5</property>
-                    <property name="homogeneous">True</property>
-                    <child>
-                      <widget class="GtkButton" id="button1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Format...</property>
-                        <property name="response_id">0</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="padding">5</property>
-                    <property name="pack_type">GTK_PACK_END</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="padding">5</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="format-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Frequencies: Format</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkHBox" id="hbox4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkFrame" id="frame2">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label_xalign">0</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="homogeneous">True</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Ascending Order</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Descending Order</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Ascending Counts</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton4">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Descending Counts</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                          </widget>
-                          <packing>
-                            <property name="position">3</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Order by</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkAlignment" id="alignment3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="yalign">0</property>
-                <property name="yscale">0</property>
-                <property name="top_padding">5</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkCheckButton" id="checkbutton2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                        <child>
-                          <widget class="GtkLabel" id="label4">
-                            <property name="width_request">180</property>
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Supress tables with more than N categories</property>
-                            <property name="wrap">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox5">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkLabel" id="label3">
-                            <property name="width_request">120</property>
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Maximum no of categories</property>
-                            <property name="wrap">True</property>
-                            <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkSpinButton" id="spinbutton1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="adjustment">100 1 65536 1 10 10</property>
-                            <property name="numeric">True</property>
-                            <property name="update_policy">GTK_UPDATE_IF_VALID</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="padding">5</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="padding">5</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/frequencies.ui b/src/ui/gui/frequencies.ui
new file mode 100644 (file)
index 0000000..a83c4f6
--- /dev/null
@@ -0,0 +1,802 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <requires lib="psppire" version="2054.22072"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkListStore" id="liststore1"/>
+  <object class="PsppireDialog" id="frequencies-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Frequencies</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkHBox" id="hbox2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="PsppireDictView" id="dict-treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">0.05000000074505806</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="PsppireSelector" id="selector1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="no_show_all">True</property>
+                        <property name="border_width">5</property>
+                       <property name="source_widget">dict-treeview</property>
+                       <property name="dest_widget">var-treeview</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkFrame" id="frame3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hscrollbar_policy">automatic</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <child>
+                              <object class="PsppireVarView" id="var-treeview">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="headers_visible">False</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label1">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Variable(s):</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="hscrollbar_policy">never</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">etched-in</property>
+                            <child>
+                              <object class="GtkTreeView" id="stats-treeview">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="headers_visible">False</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Statistics:</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="include_missing">
+                        <property name="label" translatable="yes">Include missing values</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkHBox" id="hbox4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="spacing">5</property>
+                    <property name="homogeneous">True</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="charts-button">
+                        <property name="label" translatable="yes">Charts...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="tables-button">
+                        <property name="label" translatable="yes">Frequency Tables...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">5</property>
+                    <property name="pack_type">end</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="tables-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Frequencies: Frequency Tables</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox6">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkFrame" id="frame5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVButtonBox" id="vbuttonbox2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <property name="homogeneous">True</property>
+                        <child>
+                          <object class="GtkRadioButton" id="always">
+                            <property name="label" translatable="yes">Always</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="never">
+                            <property name="label" translatable="yes">Never</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">always</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox5">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkRadioButton" id="limit">
+                                <property name="label" translatable="yes">If no more than </property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">always</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="limit-spin">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK | GDK_SUBSTRUCTURE_MASK</property>
+                                <property name="invisible_char">&#x25CF;</property>
+                                <property name="adjustment">adjustment1</property>
+                                <property name="numeric">True</property>
+                                <property name="update_policy">if-valid</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label4">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">values</property>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Display frequency tables</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame7">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVButtonBox" id="vbuttonbox1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <property name="homogeneous">True</property>
+                        <child>
+                          <object class="GtkRadioButton" id="avalue">
+                            <property name="label" translatable="yes">Ascending value</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="dvalue">
+                            <property name="label" translatable="yes">Descending value</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">avalue</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="afreq">
+                            <property name="label" translatable="yes">Ascending frequency</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">avalue</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="dfreq">
+                            <property name="label" translatable="yes">Descending frequency</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">avalue</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label6">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Order by</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="value">100</property>
+    <property name="lower">1</property>
+    <property name="upper">65536</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="PsppireDialog" id="charts-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Frequencies: Charts</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox5">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <object class="GtkVBox" id="vbox4">
+            <property name="visible">True</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkFrame" id="frame6">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment4">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox5">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox7">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkCheckButton" id="min">
+                                <property name="label" translatable="yes">Exclude values below </property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="min-spin">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x25CF;</property>
+                                <property name="adjustment">adjustment2</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox8">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkCheckButton" id="max">
+                                <property name="label" translatable="yes">Exclude values above </property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="max-spin">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x25CF;</property>
+                                <property name="adjustment">adjustment3</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label9">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Chart Formatting&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame8">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment5">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox6">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkCheckButton" id="hist">
+                            <property name="label" translatable="yes">Draw histograms</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="normal">
+                            <property name="label" translatable="yes">Superimpose normal curve</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox6">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkLabel" id="label7">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Scale:</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="freqs">
+                                <property name="label" translatable="yes">Frequencies</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="percents">
+                                <property name="label" translatable="yes">Percentages</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">freqs</property>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label10">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Histograms&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame4">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment6">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox7">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkCheckButton" id="pie">
+                            <property name="label" translatable="yes">Draw pie charts</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="pie-include-missing">
+                            <property name="label" translatable="yes">Include slices for missing values</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label11">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Pie Charts&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">-10000000000</property>
+    <property name="upper">10000000000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="value">100</property>
+    <property name="lower">-10000000000</property>
+    <property name="upper">10000000000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+</interface>
index 9a523943b1c5686e639d4df34b56530d4f1b55a5..7c152c3b96c0cc0767dbf677c7db3dc909e10a59 100644 (file)
@@ -40,15 +40,13 @@ refresh (const PsppireDataWindow *de, GtkBuilder *xml)
 }
 
 void
-goto_case_dialog (GObject *o, gpointer data)
+goto_case_dialog (PsppireDataWindow *de)
 {
   gint response;
   GtkBuilder *xml = builder_new ("psppire.ui");
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   GtkWidget *dialog = get_widget_assert   (xml, "goto-case-dialog");
 
-
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   refresh (de, xml);
index 7b3da66d59969de80f0320405cf57db29d3ba62c..3a3cbac0657863b1864b72f8306c0a505f5c79d7 100644 (file)
@@ -19,7 +19,8 @@
 
 
 #include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-void goto_case_dialog (GObject *o, gpointer data);
+void goto_case_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/help-menu.c b/src/ui/gui/help-menu.c
new file mode 100644 (file)
index 0000000..c24125d
--- /dev/null
@@ -0,0 +1,150 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2006, 2007, 2010  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+#include <gtk/gtk.h>
+
+#include <libpspp/copyleft.h>
+#include <libpspp/version.h>
+#include "help-menu.h"
+#include <libpspp/message.h>
+
+#include "gl/configmake.h"
+#include "gl/relocatable.h"
+
+#include <gettext.h>
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
+static const gchar *artists[] = { "Patrick Brunier", "Dondi Bogusky", NULL};
+
+static void
+about_new (GtkMenuItem *m, GtkWindow *parent)
+{
+  GtkWidget *about =  gtk_about_dialog_new ();
+
+  GdkPixbuf *pb =
+    gdk_pixbuf_new_from_file_at_size (relocate (PKGDATADIR "/pspplogo.png"),
+                                     64, 64, 0);
+
+  gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (about), pb);
+
+
+  gtk_window_set_icon_name (GTK_WINDOW (about), "psppicon");
+
+  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about),
+                               "http://www.gnu.org/software/pspp");
+
+  gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (about),
+                               bare_version);
+
+  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about),
+                               (const gchar **) authors);
+
+  gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG (about),
+                               artists);
+
+  gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (about),
+                               copyleft);
+
+  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (about),
+                                _("A program for the analysis of sampled data"));
+
+  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about),
+                                 "Free Software Foundation");
+
+  gtk_about_dialog_set_translator_credits 
+    (
+     GTK_ABOUT_DIALOG (about),
+     /* TRANSLATORS: Use this string to list the people who have helped with
+       translation to your language. */
+     _("translator-credits")
+     );
+
+  gtk_window_set_transient_for (GTK_WINDOW (about), parent);
+
+  gtk_window_set_modal (GTK_WINDOW (about), TRUE);
+
+  gtk_dialog_run (GTK_DIALOG (about));
+
+  gtk_widget_hide (about);
+}
+
+
+static void
+reference_manual (GtkMenuItem *menu, gpointer data)
+{
+  GError *err = NULL;
+  gchar *cmd = g_strdup_printf ("yelp file://%s", relocate (DOCDIR "/pspp.xml"));
+
+  if ( ! g_spawn_command_line_async (cmd, &err) )
+    {
+      msg (ME, _("Cannot open reference manual: %s.  The PSPP user manual is "
+                 "also available at "
+                 "http://www.gnu.org/software/pspp/documentation.html"),
+           err->message);
+    }
+
+  g_free (cmd);
+  g_clear_error (&err);
+}
+
+void
+merge_help_menu (GtkUIManager *uim)
+{
+  GtkActionGroup *action_group = gtk_action_group_new ("help");
+
+  static const GtkActionEntry entries[] =
+    {
+      {
+       "help", NULL,                               /* name, stock id */
+       N_("_Help"), NULL,                          /* label, accelerator */
+       NULL,
+       NULL,
+      },
+    
+      {
+       "help_reference", GTK_STOCK_HELP,            /* name, stock id */
+       N_("_Reference Manual"), NULL,               /* label, accelerator */
+       NULL,                                        /* tooltip */
+       G_CALLBACK (reference_manual)
+      },
+    
+      {
+       "help_about", GTK_STOCK_ABOUT,
+       NULL, NULL, NULL,
+       G_CALLBACK (about_new)
+      },
+    };
+
+  gtk_action_group_set_translation_domain (action_group, PACKAGE);
+
+  gtk_ui_manager_add_ui_from_string   (uim, "\
+      <menubar name=\"menubar\">\
+        <menu action=\"help\">\
+          <menuitem action=\"help_reference\"/>\
+          <menuitem action=\"help_about\"/>\
+        </menu>\
+       </menubar>\
+       ", -1, 0);
+
+  gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), NULL);
+
+  gtk_ui_manager_insert_action_group  (uim, action_group, 0);
+}
diff --git a/src/ui/gui/help-menu.h b/src/ui/gui/help-menu.h
new file mode 100644 (file)
index 0000000..ff3740f
--- /dev/null
@@ -0,0 +1,25 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2007, 2010  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef HELP_MENU_H
+#define HELP_MENU_H
+
+#include <gtk/gtk.h>
+
+
+void merge_help_menu (GtkUIManager *uim);
+
+#endif
index b09a2f58c3f1cc7bff73e36aecbb4775a81c1049..492797dbbad8885b405a866329fd5d94982295b0 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007, 2009  Free Software Foundation
+   Copyright (C) 2007, 2009, 2010  Free Software Foundation
 
    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
@@ -24,7 +24,6 @@
 
 #include <glib.h>
 #include "helper.h"
-#include "message-dialog.h"
 #include <data/format.h>
 #include <data/data-in.h>
 #include <data/data-out.h>
@@ -41,7 +40,9 @@
 #include <data/settings.h>
 
 #include "psppire-data-store.h"
+#include "psppire.h"
 
+#include "gl/configmake.h"
 #include "xalloc.h"
 
 #include <gettext.h>
@@ -132,8 +133,7 @@ get_object_assert (GtkBuilder *builder, const gchar *name, GType type)
 
   if ( !o )
     g_critical ("Object \"%s\" could not be found\n", name);
-
-  if ( ! g_type_is_a (G_OBJECT_TYPE (o), type))
+  else if ( ! g_type_is_a (G_OBJECT_TYPE (o), type))
    {
      g_critical ("Object \"%s\" was expected to have type %s, but in fact has type %s", 
        name, g_type_name (type), G_OBJECT_TYPE_NAME (o));
@@ -231,22 +231,6 @@ connect_help (GtkBuilder *xml)
 }
 
 
-void
-reference_manual (GtkMenuItem *menu, gpointer data)
-{
-  GError *err = NULL;
-  gchar *cmd = g_strdup_printf ("yelp file://%s", relocate (DOCDIR "/pspp.xml"));
-
-  if ( ! g_spawn_command_line_async (cmd, &err) )
-    {
-      msg (ME, _("Cannot open reference manual: %s"), err->message);
-    }
-
-  g_free (cmd);
-  g_clear_error (&err);
-}
-
-
 /* Create a deep copy of SRC */
 GtkListStore *
 clone_list_store (const GtkListStore *src)
@@ -291,12 +275,42 @@ clone_list_store (const GtkListStore *src)
 }
 
 
+
+
+static gboolean 
+on_delete (GtkWindow *window, GdkEvent *e, GtkWindow **addr)
+{
+  *addr = NULL;
+
+  return FALSE;
+}
+
 void
-paste_syntax_in_new_window (const gchar *syntax)
+paste_syntax_to_window (const gchar *syntax)
 {
-  GtkWidget *se = psppire_syntax_window_new ();
+  static GtkWidget *the_syntax_pasteboard = NULL;
+
+  if ( NULL == the_syntax_pasteboard)
+    {
+      the_syntax_pasteboard = psppire_syntax_window_new ();
+      g_signal_connect (the_syntax_pasteboard, "delete-event", G_CALLBACK (on_delete),
+                       &the_syntax_pasteboard);
+    }
 
-  gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
+  gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (the_syntax_pasteboard)->buffer,
+                                   syntax, -1);
 
-  gtk_widget_show (se);
+  gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (the_syntax_pasteboard)->buffer,
+                                   "\n", 1);
+
+  gtk_widget_show (the_syntax_pasteboard);
+}
+
+
+/* gtk_box_pack_start_defaults is deprecated.
+   Therefore we roll our own until a better solution is found */
+void
+psppire_box_pack_start_defaults (GtkBox *box, GtkWidget *widget)
+{
+  gtk_box_pack_start (box, widget, TRUE, TRUE, 0);
 }
index dfdd89323a7bd5c7a9982f1f03b4aef133b601d8..77abc1d8742214046c794f8ba96fc7694eaa5dce 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2004, 2009  Free Software Foundation
+   Copyright (C) 2004, 2009, 2010  Free Software Foundation
 
    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
@@ -27,7 +27,9 @@
 
 #include "psppire-dict.h"
 
-void paste_syntax_in_new_window (const gchar *syntax);
+#include "gl/configmake.h"
+
+void paste_syntax_to_window (const gchar *syntax);
 
 struct fmt_spec;
 
@@ -52,8 +54,6 @@ gchar * convert_glib_filename_to_system_filename (const gchar *fname,
 
 void connect_help (GtkBuilder *);
 
-void reference_manual (GtkMenuItem *, gpointer);
-
 #define builder_new(NAME) builder_new_real (relocate (PKGDATADIR "/" NAME))
 
 GtkBuilder *builder_new_real (const gchar *name);
@@ -62,5 +62,7 @@ GtkBuilder *builder_new_real (const gchar *name);
 /* Create a deep copy of SRC */
 GtkListStore * clone_list_store (const GtkListStore *src);
 
+void psppire_box_pack_start_defaults (GtkBox *box, GtkWidget *widget);
+
 
 #endif
index 05cc421b3ede67e4f08ef4ded3c10b0f065c5ec9..7c952283a8128055a0b5da6fb3a5ca4887f6c921 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2004, 2005, 2006  Free Software Foundation
+   Copyright (C) 2004, 2005, 2006, 2010  Free Software Foundation
 
    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
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
-#include <gl/xalloc.h>
+
+#include "ui/gui/psppire.h"
+
 #include <gtk/gtk.h>
-#include "psppire.h"
-#include "progname.h"
 #include <stdlib.h>
-#include <argp.h>
-#include <gl/relocatable.h>
-#include <ui/command-line.h>
-#include <ui/source-init-opts.h>
 
-#include <libpspp/version.h>
-#include <libpspp/copyleft.h>
+#include "libpspp/argv-parser.h"
+#include "libpspp/assertion.h"
+#include "libpspp/getl.h"
+#include "libpspp/version.h"
+#include "libpspp/copyleft.h"
+#include "ui/source-init-opts.h"
+
+#include "gl/configmake.h"
+#include "gl/progname.h"
+#include "gl/relocatable.h"
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
-const char *argp_program_version = version;
-const char *argp_program_bug_address = PACKAGE_BUGREPORT;
-
 \f
 /* Arguments to be interpreted before the X server gets initialised */
 
-static const struct argp_option startup_options [] =
+enum
   {
-    {"no-splash",  'q',  0,  0,  N_("Don't show the splash screen"), 0 },
-    { 0, 0, 0, 0, 0, 0 }
+    OPT_NO_SPLASH,
+    N_STARTUP_OPTIONS
   };
 
-static error_t
-parse_startup_opts (int key, char *arg, struct argp_state *state)
+static const struct argv_option startup_options[N_STARTUP_OPTIONS] =
+  {
+    {"no-splash", 'q', no_argument, OPT_NO_SPLASH}
+  };
+
+static void
+startup_option_callback (int id, void *show_splash_)
 {
-  gboolean *showsplash = state->input;
+  gboolean *show_splash = show_splash_;
 
-  switch (key)
+  switch (id)
     {
-    case 'q':
-      *showsplash = FALSE;
+    case OPT_NO_SPLASH:
+      *show_splash = FALSE;
       break;
+
     default:
-      return ARGP_ERR_UNKNOWN;
+      NOT_REACHED ();
     }
-  return 0;
 }
-
-static const struct argp startup_argp = {startup_options, parse_startup_opts, 0, 0, 0, 0, 0};
-
 \f
-
 static GtkWidget *
 create_splash_window (void)
 {
@@ -108,10 +111,9 @@ quit_one_loop (gpointer data)
 
 struct initialisation_parameters
 {
-  int argc;
-  char **argv;
+  struct source_stream *ss;
+  const char *data_file;
   GtkWidget *splash_window;
-  struct command_line_processor *clp;
 };
 
 
@@ -119,7 +121,7 @@ static gboolean
 run_inner_loop (gpointer data)
 {
   struct initialisation_parameters *ip = data;
-  initialize (ip->clp, ip->argc, ip->argv);
+  initialize (ip->ss, ip->data_file);
 
   g_timeout_add (500, hide_splash_window, ip->splash_window);
 
@@ -144,10 +146,10 @@ static GMemVTable vtable =
 int
 main (int argc, char *argv[])
 {
-  struct command_line_processor *clp ;
   struct initialisation_parameters init_p;
   gboolean show_splash = TRUE;
-
+  struct argv_parser *parser;
+  struct source_stream *ss;
   const gchar *vers;
 
   set_program_name (argv[0]);
@@ -167,24 +169,25 @@ main (int argc, char *argv[])
                                 GTK_MINOR_VERSION,
                                 GTK_MICRO_VERSION)) )
     {
-      g_warning (vers);
+      g_warning ("%s", vers);
     }
 
-  clp = command_line_processor_create (_("PSPPIRE --- A user interface for PSPP"), "[ DATA-FILE ]", 0);
-
-  command_line_processor_add_options (clp, &startup_argp, _("Miscellaneous options:"),  &show_splash);
-  command_line_processor_add_options (clp, &post_init_argp,
-                                     _("Options affecting syntax and behavior:"),  NULL);
-  command_line_processor_add_options (clp, &non_option_argp, NULL, NULL);
-
-  command_line_processor_parse (clp, argc, argv);
-
+  /* Let GDK remove any options that it owns. */
   gdk_init (&argc, &argv);
 
+  /* Parse our own options. */
+  ss = create_source_stream ();
+  parser = argv_parser_create ();
+  argv_parser_add_options (parser, startup_options, N_STARTUP_OPTIONS,
+                           startup_option_callback, &show_splash);
+  source_init_register_argv_parser (parser, ss);
+  if (!argv_parser_run (parser, argc, argv))
+    exit (EXIT_FAILURE);
+  argv_parser_destroy (parser);
+
   init_p.splash_window = create_splash_window ();
-  init_p.argc = argc;
-  init_p.argv = argv;
-  init_p.clp = clp;
+  init_p.ss = ss;
+  init_p.data_file = optind < argc ? argv[optind] : NULL;
 
   if ( show_splash )
     gtk_widget_show (init_p.splash_window);
diff --git a/src/ui/gui/message-dialog.c b/src/ui/gui/message-dialog.c
deleted file mode 100644 (file)
index 7513295..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-/* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
-
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#include <config.h>
-#include <gettext.h>
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-#include <libpspp/message.h>
-#include <libpspp/str.h>
-#include <libpspp/msg-locator.h>
-#include "message-dialog.h"
-#include "progname.h"
-
-
-#include <gtk/gtk.h>
-#include <glib.h>
-
-#include "helper.h"
-
-static void enqueue_msg (const struct msg *m);
-static gboolean popup_messages (gpointer);
-
-#define MAX_EARLY_MESSAGES 100
-static GQueue *early_queue;
-
-static unsigned long dropped_messages;
-
-#define MAX_LATE_MESSAGES 10
-static GQueue *late_queue;
-
-static int error_cnt, warning_cnt, note_cnt;
-
-static GtkBuilder *message_xml;
-static GtkWidget *message_dialog;
-
-void
-message_dialog_init (struct source_stream *ss)
-{
-  early_queue = g_queue_new ();
-  dropped_messages = 0;
-  late_queue = g_queue_new ();
-  error_cnt = warning_cnt = note_cnt = 0;
-  msg_init (ss, enqueue_msg);
-  message_xml = builder_new ("message-dialog.ui");
-  message_dialog = get_widget_assert (message_xml, "message-dialog");
-
-  GTK_WIDGET_SET_FLAGS (get_widget_assert (message_xml, "close-button"),
-                       GTK_CAN_DEFAULT);
-
-}
-
-void
-message_dialog_done (void)
-{
-  msg_done ();
-  g_queue_free (early_queue);
-  dropped_messages = 0;
-  g_queue_free (late_queue);
-  gtk_widget_destroy (message_dialog);
-  g_object_unref (message_xml);
-}
-
-static void
-format_message (struct msg *m, struct string *msg)
-{
-  const char *label;
-
-  if (m->where.file_name)
-    ds_put_format (msg, "%s:", m->where.file_name);
-  if (m->where.line_number != -1)
-    ds_put_format (msg, "%d:", m->where.line_number);
-  if (m->where.file_name || m->where.line_number != -1)
-    ds_put_char (msg, ' ');
-
-  switch (m->severity)
-    {
-    case MSG_ERROR:
-      switch (m->category)
-       {
-       case MSG_SYNTAX:
-         label = _("syntax error");
-         break;
-
-       case MSG_DATA:
-         label = _("data file error");
-         break;
-
-       case MSG_GENERAL:
-       default:
-         label = _("PSPP error");
-         break;
-       }
-      break;
-    case MSG_WARNING:
-      switch (m->category)
-       {
-       case MSG_SYNTAX:
-         label = _("syntax warning");
-          break;
-
-       case MSG_DATA:
-         label = _("data file warning");
-         break;
-
-       case MSG_GENERAL:
-        default:
-         label = _("PSPP warning");
-          break;
-        }
-      break;
-    case MSG_NOTE:
-    default:
-      switch (m->category)
-        {
-        case MSG_SYNTAX:
-         label = _("syntax information");
-          break;
-
-        case MSG_DATA:
-         label = _("data file information");
-          break;
-
-        case MSG_GENERAL:
-        default:
-         label = _("PSPP information");
-         break;
-       }
-      break;
-    }
-  ds_put_format (msg, "%s: %s\n", label, m->text);
-  msg_destroy (m);
-}
-
-static void
-enqueue_msg (const struct msg *msg)
-{
-  struct msg *m = msg_dup (msg);
-
-  switch (m->severity)
-    {
-    case MSG_ERROR:
-      error_cnt++;
-      break;
-    case MSG_WARNING:
-      warning_cnt++;
-      break;
-    case MSG_NOTE:
-      note_cnt++;
-      break;
-    }
-
-  if (g_queue_get_length (early_queue) < MAX_EARLY_MESSAGES)
-    {
-      if (g_queue_is_empty (early_queue))
-        g_idle_add (popup_messages, NULL);
-      g_queue_push_tail (early_queue, m);
-    }
-  else
-    {
-      if (g_queue_get_length (late_queue) >= MAX_LATE_MESSAGES)
-        {
-          struct msg *m = g_queue_pop_head (late_queue);
-          msg_destroy (m);
-          dropped_messages++;
-        }
-      g_queue_push_tail (late_queue, m);
-    }
-}
-
-static gboolean
-popup_messages (gpointer unused UNUSED)
-{
-  GtkTextBuffer *text_buffer;
-  GtkTextIter end;
-  GtkTextView *text_view;
-  GtkLabel *label;
-  struct string lead = DS_EMPTY_INITIALIZER;
-  struct string msg = DS_EMPTY_INITIALIZER;
-  int message_cnt;
-
-  gdk_threads_enter ();
-
-  /* Set up the dialog. */
-  if (message_xml == NULL || message_dialog == NULL)
-    goto use_fallback;
-
-  /* If a pointer grab is in effect, then the combination of that, and
-     a modal dialog box, will cause an impossible situation.
-     So don't pop it up just yet.
-  */
-  if ( gdk_display_pointer_is_grabbed (gtk_widget_get_display (message_dialog)))
-    {
-      ds_destroy (&lead);
-      ds_destroy (&msg);
-      gdk_threads_leave ();
-      return TRUE;
-    }
-
-  /* Compose the lead-in. */
-  message_cnt = error_cnt + warning_cnt + note_cnt;
-  if (dropped_messages == 0)
-    ds_put_format (
-      &lead,
-      ngettext ("The PSPP processing engine reported the following message:",
-                "The PSPP processing engine reported the following messages:",
-                message_cnt));
-  else
-    {
-      ds_put_format (
-        &lead,
-        ngettext ("The PSPP processing engine reported %d message.",
-                  "The PSPP processing engine reported %d messages.",
-                  message_cnt),
-        message_cnt);
-      ds_put_cstr (&lead, "  ");
-      ds_put_format (
-        &lead,
-        ngettext ("%d of these messages are displayed below.",
-                  "%d of these messages are displayed below.",
-                  MAX_EARLY_MESSAGES + MAX_LATE_MESSAGES),
-        MAX_EARLY_MESSAGES + MAX_LATE_MESSAGES);
-    }
-
-
-  /* Compose the messages. */
-  while (!g_queue_is_empty (early_queue))
-    format_message (g_queue_pop_head (early_queue), &msg);
-  if (dropped_messages)
-    {
-      ds_put_format (&msg, "...\nOmitting %lu messages\n...\n",
-                     dropped_messages);
-      dropped_messages = 0;
-    }
-  while (!g_queue_is_empty (late_queue))
-    format_message (g_queue_pop_head (late_queue), &msg);
-
-  text_buffer = gtk_text_buffer_new (NULL);
-  gtk_text_buffer_get_end_iter (text_buffer, &end);
-  gtk_text_buffer_insert (text_buffer, &end, ds_data (&msg), ds_length (&msg));
-
-  label = GTK_LABEL (get_widget_assert (message_xml, "lead-in"));
-  if (label == NULL)
-    goto use_fallback;
-  gtk_label_set_text (label, ds_cstr (&lead));
-
-  text_view = GTK_TEXT_VIEW (get_widget_assert (message_xml, "message"));
-  if (text_view == NULL)
-    goto use_fallback;
-  gtk_text_view_set_buffer (text_view, text_buffer);
-
-  gtk_widget_grab_default (get_widget_assert (message_xml, "close-button"));
-  gtk_widget_grab_focus (get_widget_assert (message_xml, "close-button"));
-  gtk_dialog_run ( GTK_DIALOG (message_dialog));
-  gtk_widget_hide (message_dialog);
-
-  ds_destroy (&lead);
-  ds_destroy (&msg);
-
-  gdk_threads_leave ();
-  return FALSE;
-
-use_fallback:
-  g_warning ("Could not create message dialog.  "
-             "Is PSPPIRE properly installed?");
-  fputs (ds_cstr (&msg), stderr);
-  ds_destroy (&lead);
-  ds_destroy (&msg);
-  gdk_threads_leave ();
-  return FALSE;
-}
-
diff --git a/src/ui/gui/message-dialog.glade b/src/ui/gui/message-dialog.glade
deleted file mode 100644 (file)
index 1069fc1..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Thu Dec 18 20:43:13 2008 -->
-<glade-interface>
-  <widget class="GtkDialog" id="message-dialog">
-    <property name="width_request">600</property>
-    <property name="height_request">350</property>
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">12</property>
-    <property name="title" translatable="yes">Messages Reported</property>
-    <property name="modal">True</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">24</property>
-        <child>
-          <widget class="GtkHBox" id="hbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">12</property>
-            <child>
-              <widget class="GtkImage" id="image1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="yalign">0</property>
-                <property name="stock">gtk-dialog-info</property>
-                <property name="icon_size">6</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="spacing">6</property>
-                <child>
-                  <widget class="GtkLabel" id="lead-in">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">The PSPP processor reported # errors.  The first # and last # are shown below:</property>
-                    <property name="wrap">True</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                    <child>
-                      <widget class="GtkTextView" id="message">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="editable">False</property>
-                        <property name="wrap_mode">GTK_WRAP_WORD</property>
-                        <property name="left_margin">6</property>
-                        <property name="right_margin">6</property>
-                        <property name="cursor_visible">False</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="close-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">gtk-close</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/message-dialog.h b/src/ui/gui/message-dialog.h
deleted file mode 100644 (file)
index 45eeca6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2004,2005  Free Software Foundation
-
-   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 3 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, see <http://www.gnu.org/licenses/>. */
-
-#ifndef ERROR_DIALOG_H
-#define ERROR_DIALOG_H
-
-#include <libpspp/message.h>
-
-struct source_stream ;
-
-void message_dialog_init (struct source_stream *);
-void message_dialog_done (void);
-
-#endif
index 1814dd6737562a1d922722141d9e6c6f3c2b0a63..0d6f5aa546694fddf4c404427d2582119f61db60 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include <config.h>
 #include <gtk/gtk.h>
 #include "oneway-anova-dialog.h"
 #include "psppire-dict.h"
 #include "psppire-var-store.h"
+#include "psppire-var-view.h"
 #include "helper.h"
 #include "psppire-data-window.h"
 #include "psppire-dialog.h"
@@ -29,7 +29,6 @@
 #include "psppire-selector.h"
 #include "dict-display.h"
 
-
 #include <language/syntax-string-source.h>
 #include "executor.h"
 
@@ -124,10 +123,9 @@ refresh (struct oneway_anova_dialog *ow)
 
 /* Pops up the dialog box */
 void
-oneway_anova_dialog (GObject *o, gpointer data)
+oneway_anova_dialog (PsppireDataWindow *de)
 {
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   PsppireVarStore *vs = NULL;
 
@@ -141,9 +139,6 @@ oneway_anova_dialog (GObject *o, gpointer data)
   GtkWidget *selector2 =
     get_widget_assert (builder, "oneway-anova-selector2");
 
-  GtkWidget *selector1 =
-    get_widget_assert (builder, "oneway-anova-selector1");
-
   GtkWidget *contrasts_button =
     get_widget_assert (builder, "contrasts-button");
 
@@ -171,24 +166,11 @@ oneway_anova_dialog (GObject *o, gpointer data)
 
   gtk_window_set_transient_for (ow.dialog, GTK_WINDOW (de));
 
-  g_object_set (dict_view, "dictionary", ow.dict, NULL);
-
-  set_dest_model (GTK_TREE_VIEW (ow.vars_treeview), ow.dict);
-
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector1),
-                                dict_view, ow.vars_treeview,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
+  g_object_set (dict_view, "model", ow.dict, NULL);
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector2),
-                                dict_view, ow.factor_entry,
-                                insert_source_row_into_entry,
-                                is_currently_in_entry,
-                                NULL);
 
+  psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector2),
+                                   is_currently_in_entry);
 
 
   g_signal_connect_swapped (ow.dialog, "refresh", G_CALLBACK (refresh),  &ow);
@@ -241,7 +223,7 @@ oneway_anova_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&ow);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
@@ -265,7 +247,7 @@ static gchar * generate_syntax (const struct oneway_anova_dialog *ow)
 
   GString *str = g_string_new ("ONEWAY /VARIABLES=");
 
-  append_variable_names (str, ow->dict, GTK_TREE_VIEW (ow->vars_treeview), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (ow->vars_treeview), 0, str);
 
   g_string_append (str, " BY ");
 
index 21043b4362a3b71c46b709aeec6d92e9760388c7..d9e29af19dba1b3162f09fcc6cc4f9e5980da503 100644 (file)
@@ -1,7 +1,9 @@
 #ifndef ONEWAY_ANOVA_DIALOG
 #define ONEWAY_ANOVA_DIALOG
 
-void oneway_anova_dialog (GObject *o, gpointer data);
+#include "psppire-data-window.h"
+
+void oneway_anova_dialog (PsppireDataWindow * data);
 
 
 #endif
diff --git a/src/ui/gui/oneway.glade b/src/ui/gui/oneway.glade
deleted file mode 100644 (file)
index 4b12f68..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="oneway-anova-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">One-Way ANOVA</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox15">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkTable" id="table4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="n_rows">3</property>
-            <property name="n_columns">3</property>
-            <child>
-              <widget class="GtkVBox" id="vbox30">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkLabel" id="label36">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">_Factor:</property>
-                    <property name="use_underline">True</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="oneway-anova-entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox29">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkLabel" id="label35">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Dependent _Variable(s):</property>
-                    <property name="use_underline">True</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow15">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                    <child>
-                      <widget class="GtkTreeView" id="oneway-anova-treeview2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="headers_visible">False</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireSelector" id="oneway-anova-selector2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">5</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options"></property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireSelector" id="oneway-anova-selector1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">5</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="x_options"></property>
-                <property name="y_options">GTK_EXPAND</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                <child>
-                  <widget class="PsppireDictView" id="oneway-anova-treeview1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="headers_visible">False</property>
-                    <property name="headers_clickable">True</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="bottom_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox2">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkFrame" id="frame2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkVButtonBox" id="vbuttonbox1">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkCheckButton" id="checkbutton1">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">_Descriptives</property>
-                                <property name="use_underline">True</property>
-                                <property name="response_id">0</property>
-                                <property name="draw_indicator">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="checkbutton2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">_Homogeneity</property>
-                                <property name="use_underline">True</property>
-                                <property name="response_id">0</property>
-                                <property name="draw_indicator">True</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Statistics</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkVButtonBox" id="vbuttonbox2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkButton" id="contrasts-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Contrasts...</property>
-                        <property name="use_underline">True</property>
-                        <property name="response_id">0</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="y_options"></property>
-                <property name="x_padding">5</property>
-                <property name="y_padding">5</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="contrasts-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">One-Way ANOVA: Contrasts</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <child>
-          <widget class="GtkFrame" id="frame1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="top_padding">5</property>
-                <property name="bottom_padding">5</property>
-                <property name="left_padding">5</property>
-                <property name="right_padding">5</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="spacing">5</property>
-                    <child>
-                      <widget class="GtkHButtonBox" id="hbuttonbox1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="homogeneous">True</property>
-                        <property name="layout_style">GTK_BUTTONBOX_EDGE</property>
-                        <child>
-                          <widget class="GtkButton" id="prev-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">gtk-go-back</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="next-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">gtk-go-forward</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox3">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkLabel" id="label4">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes">_Coefficients:</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="entry1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="fill">False</property>
-                            <property name="pack_type">GTK_PACK_END</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="PsppireAcr" id="psppire-acr1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="border_width">5</property>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkLabel" id="label2">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Coefficient Total: </property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="entry2">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="editable">False</property>
-                            <property name="max_length">5</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="contrast-stack-label">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Contrast 1 of 1</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/oneway.ui b/src/ui/gui/oneway.ui
new file mode 100644 (file)
index 0000000..16334ef
--- /dev/null
@@ -0,0 +1,480 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <requires lib="psppire" version="2054.17080"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="oneway-anova-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">One-Way ANOVA</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox15">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkTable" id="table4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="n_rows">3</property>
+            <property name="n_columns">3</property>
+            <child>
+              <object class="GtkVBox" id="vbox30">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkLabel" id="label36">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Factor:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="oneway-anova-entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox29">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkLabel" id="label35">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Dependent _Variable(s):</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow15">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="PsppireVarView" id="oneway-anova-treeview2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireSelector" id="oneway-anova-selector2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">oneway-anova-treeview1</property>
+                <property name="dest_widget">oneway-anova-entry</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireSelector" id="oneway-anova-selector1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="primary">True</property>
+                <property name="source_widget">oneway-anova-treeview1</property>
+                <property name="dest_widget">oneway-anova-treeview2</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options">GTK_EXPAND</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="oneway-anova-treeview1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="bottom_attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="GtkFrame" id="frame2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVButtonBox" id="vbuttonbox1">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <object class="GtkCheckButton" id="checkbutton1">
+                                <property name="label" translatable="yes">_Descriptives</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="checkbutton2">
+                                <property name="label" translatable="yes">_Homogeneity</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Statistics</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVButtonBox" id="vbuttonbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkButton" id="contrasts-button">
+                        <property name="label" translatable="yes">_Contrasts...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options"></property>
+                <property name="x_padding">5</property>
+                <property name="y_padding">5</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="contrasts-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">One-Way ANOVA: Contrasts</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="top_padding">5</property>
+                <property name="bottom_padding">5</property>
+                <property name="left_padding">5</property>
+                <property name="right_padding">5</property>
+                <child>
+                  <object class="GtkVBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <object class="GtkHButtonBox" id="hbuttonbox1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="homogeneous">True</property>
+                        <property name="layout_style">edge</property>
+                        <child>
+                          <object class="GtkButton" id="prev-button">
+                            <property name="label">gtk-go-back</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="next-button">
+                            <property name="label">gtk-go-forward</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHBox" id="hbox3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <object class="GtkLabel" id="label4">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">_Coefficients:</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="entry1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                          <packing>
+                            <property name="fill">False</property>
+                            <property name="pack_type">end</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="PsppireAcr" id="psppire-acr1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="border_width">5</property>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHBox" id="hbox1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <object class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">Coefficient Total: </property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="entry2">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="editable">False</property>
+                            <property name="max_length">5</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="contrast-stack-label">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Contrast 1 of 1</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/ui/gui/output-viewer.glade b/src/ui/gui/output-viewer.glade
deleted file mode 100644 (file)
index 0b709ee..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.0 on Sat Aug 11 17:19:54 2007 by john@marilyn-->
-<glade-interface>
-  <widget class="GtkWindow" id="output-viewer-window">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="default_width">600</property>
-    <property name="default_height">400</property>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <child>
-          <widget class="GtkMenuBar" id="menubar1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkMenuItem" id="menuitem1">
-                <property name="visible">False</property>
-                <property name="sensitive">False</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_File</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="file_save">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">gtk-save</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="file_save-as">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">gtk-save-as</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="menuitem2">
-                <property name="visible">False</property>
-                <property name="sensitive">False</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Edit</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem7">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">gtk-copy</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="windows_menuitem">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Windows</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="windows_menu">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkMenuItem" id="windows_minimise-all">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Minimize All Windows</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="menuitem9">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Help</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menuitem9_menu">
-                    <child>
-                      <widget class="GtkMenuItem" id="help_reference">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Reference Manual</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="help_about">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_About</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <child>
-              <widget class="GtkTextView" id="output-viewer-textview">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="editable">False</property>
-                <property name="left_margin">5</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/output-viewer.ui b/src/ui/gui/output-viewer.ui
new file mode 100644 (file)
index 0000000..00d113a
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<interface>
+  <object class="GtkUIManager" id="uimanager1">
+    <child>
+      <object class="GtkActionGroup" id="actiongroup1">
+        <child>
+          <object class="GtkAction" id="menuitem1">
+            <property name="name">menuitem1</property>
+            <property name="label" translatable="yes">_File</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_print">
+            <property name="name">file_print</property>
+            <property name="stock-id">gtk-print</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_export">
+            <property name="name">file_export</property>
+            <property name="stock-id">gtk-convert</property>
+            <property name="label" translatable="yes">_Export</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="menuitem2">
+            <property name="name">menuitem2</property>
+            <property name="label" translatable="yes">_Edit</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="imagemenuitem7">
+            <property name="stock-id">gtk-copy</property>
+            <property name="name">imagemenuitem7</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="windows_menuitem">
+            <property name="name">windows_menuitem</property>
+            <property name="label" translatable="yes">_Windows</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="windows_minimise-all">
+            <property name="name">windows_minimise-all</property>
+            <property name="label" translatable="yes">_Minimize All Windows</property>
+          </object>
+        </child>
+      </object>
+    </child>
+    <ui>
+      <menubar name="menubar">
+        <menu action="menuitem1">
+          <menuitem action="file_export"/>
+          <menuitem action="file_print"/>
+        </menu>
+        <menu action="menuitem2">
+          <menuitem action="imagemenuitem7"/>
+        </menu>
+        <menu action="windows_menuitem">
+          <menuitem action="windows_minimise-all"/>
+        </menu>
+      </menubar>
+    </ui>
+  </object>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkWindow" id="output-viewer-window">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="default_width">600</property>
+    <property name="default_height">400</property>
+    <child>
+      <object class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <object class="GtkMenuBar" constructor="uimanager1" id="menubar">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHPaned" id="hpaned1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="position">112</property>
+            <property name="position_set">True</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <child>
+                  <object class="GtkTreeView" id="overview">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">False</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <child>
+                  <object class="GtkLayout" id="output">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index c0988d84d7bffcafa00beaf21c3fd8f25902ec22..f11283ba69c485362cfc0ae374fbb9cb8f6f385a 100644 (file)
@@ -38,6 +38,7 @@
 #include <gtk/gtk.h>
 
 #include "psppire-acr.h"
+#include "helper.h"
 
 static void psppire_acr_init (PsppireAcr *);
 
@@ -283,9 +284,9 @@ psppire_acr_init (PsppireAcr *acr)
   gtk_widget_set_sensitive (acr->remove_button, FALSE);
   gtk_widget_set_sensitive (acr->add_button, FALSE);
 
-  gtk_box_pack_start_defaults (GTK_BOX (bb), acr->add_button);
-  gtk_box_pack_start_defaults (GTK_BOX (bb), acr->change_button);
-  gtk_box_pack_start_defaults (GTK_BOX (bb), acr->remove_button);
+  psppire_box_pack_start_defaults (GTK_BOX (bb), acr->add_button);
+  psppire_box_pack_start_defaults (GTK_BOX (bb), acr->change_button);
+  psppire_box_pack_start_defaults (GTK_BOX (bb), acr->remove_button);
 
   gtk_box_pack_start (GTK_BOX (acr), bb, FALSE, TRUE, 5);
 
index 071751ad6fdeb6372cdd590c1ea8dcf47a347a5e..ab7fe3d41bb976f996a4ca27b075c85c564dbdb5 100644 (file)
@@ -23,6 +23,8 @@
 #include "psppire-buttonbox.h"
 #include "psppire-dialog.h"
 
+#include "helper.h"
+
 #include <gettext.h>
 
 #define _(msgid) gettext (msgid)
@@ -140,8 +142,8 @@ psppire_button_box_class_init (PsppireButtonBoxClass *class)
 
   button_flags =
     g_param_spec_flags ("buttons",
-                       _("Buttons"),
-                       _("The mask that decides what buttons appear in the button box"),
+                       "Buttons",
+                       "The mask that decides what buttons appear in the button box",
                        PSPPIRE_TYPE_BUTTON_MASK,
                        PSPPIRE_BUTTON_OK_MASK |
                        PSPPIRE_BUTTON_CANCEL_MASK |
@@ -255,7 +257,7 @@ psppire_button_box_init (PsppireButtonBox *bb)
 {
 
   bb->button[PSPPIRE_BUTTON_OK] = gtk_button_new_from_stock (GTK_STOCK_OK);
-  gtk_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_OK]);
+  psppire_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_OK]);
   g_signal_connect (bb->button[PSPPIRE_BUTTON_OK], "clicked",
                    G_CALLBACK (ok_button_clicked), NULL);
   g_object_set (bb->button[PSPPIRE_BUTTON_OK], "no-show-all", TRUE, NULL);
@@ -263,7 +265,7 @@ psppire_button_box_init (PsppireButtonBox *bb)
 
   bb->button[PSPPIRE_BUTTON_GOTO] =
     gtk_button_new_from_stock (GTK_STOCK_JUMP_TO);
-  gtk_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_GOTO]);
+  psppire_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_GOTO]);
   g_signal_connect (bb->button[PSPPIRE_BUTTON_GOTO], "clicked",
                    G_CALLBACK (goto_button_clicked), NULL);
   g_object_set (bb->button[PSPPIRE_BUTTON_GOTO], "no-show-all", TRUE, NULL);
@@ -278,7 +280,7 @@ psppire_button_box_init (PsppireButtonBox *bb)
   g_signal_connect (bb->button[PSPPIRE_BUTTON_CONTINUE], "realize",
         G_CALLBACK (gtk_widget_grab_default), NULL);
 
-  gtk_box_pack_start_defaults (GTK_BOX (bb),
+  psppire_box_pack_start_defaults (GTK_BOX (bb),
                               bb->button[PSPPIRE_BUTTON_CONTINUE]);
   g_signal_connect (bb->button[PSPPIRE_BUTTON_CONTINUE], "clicked",
                    G_CALLBACK (continue_button_clicked), NULL);
@@ -291,25 +293,25 @@ psppire_button_box_init (PsppireButtonBox *bb)
   bb->button[PSPPIRE_BUTTON_PASTE] = gtk_button_new_from_stock (GTK_STOCK_PASTE);
   g_signal_connect (bb->button[PSPPIRE_BUTTON_PASTE], "clicked",
                    G_CALLBACK (paste_button_clicked), NULL);
-  gtk_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_PASTE]);
+  psppire_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_PASTE]);
   g_object_set (bb->button[PSPPIRE_BUTTON_PASTE], "no-show-all", TRUE, NULL);
 
   bb->button[PSPPIRE_BUTTON_CANCEL] = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
   g_signal_connect (bb->button[PSPPIRE_BUTTON_CANCEL], "clicked",
                    G_CALLBACK (close_dialog), NULL);
-  gtk_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_CANCEL]);
+  psppire_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_CANCEL]);
   g_object_set (bb->button[PSPPIRE_BUTTON_CANCEL], "no-show-all", TRUE, NULL);
 
 
   bb->button[PSPPIRE_BUTTON_RESET] = gtk_button_new_from_stock ("pspp-stock-reset");
   g_signal_connect (bb->button[PSPPIRE_BUTTON_RESET], "clicked",
                    G_CALLBACK (refresh_clicked), NULL);
-  gtk_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_RESET]);
+  psppire_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_RESET]);
   g_object_set (bb->button[PSPPIRE_BUTTON_RESET], "no-show-all", TRUE, NULL);
 
 
   bb->button[PSPPIRE_BUTTON_HELP] = gtk_button_new_from_stock (GTK_STOCK_HELP);
-  gtk_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_HELP]);
+  psppire_box_pack_start_defaults (GTK_BOX (bb), bb->button[PSPPIRE_BUTTON_HELP]);
   g_object_set (bb->button[PSPPIRE_BUTTON_HELP], "no-show-all", TRUE, NULL);
 
 
index 4090b74c3ea9dce414e42cb59bb643c6c312a15e..07db3b58c21e5d07e16d8789a285f2ad20978450 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2009  Free Software Foundation
+   Copyright (C) 2009, 2010  Free Software Foundation
 
    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
@@ -262,36 +262,29 @@ psppire_conf_set_window_geometry (PsppireConf *conf,
 void
 psppire_conf_save_window_geometry (PsppireConf *conf,
                                   const gchar *base,
-                                  GdkEvent *e)
+                                  GtkWindow *gtk_window)
 {
-  switch (e->type)
-    {
-    case GDK_CONFIGURE:
-      {
-       GdkEventConfigure *event = &e->configure;
+  gboolean maximized;
+  GdkWindow *w;
 
-       if ( gdk_window_get_state (event->window) &
-            GDK_WINDOW_STATE_MAXIMIZED )
-         return;
+  w = gtk_widget_get_window (GTK_WIDGET (gtk_window));
+  if (w == NULL)
+    return;
 
-       psppire_conf_set_int (conf, base, "height", event->height);
-       psppire_conf_set_int (conf, base, "width", event->width);
+  maximized = (gdk_window_get_state (w) & GDK_WINDOW_STATE_MAXIMIZED) != 0;
+  psppire_conf_set_boolean (conf, base, "maximize", maximized);
 
-       psppire_conf_set_int (conf, base, "x", event->x);
-       psppire_conf_set_int (conf, base, "y", event->y);
-      }
-      break;
-    case GDK_WINDOW_STATE:
-      {
-       GdkEventWindowState *event = &e->window_state;
+  if (!maximized)
+    {
+      gint width, height;
+      gint x, y;
 
-       psppire_conf_set_boolean (conf, base, "maximize",
-                                 event->new_window_state &
-                                 GDK_WINDOW_STATE_MAXIMIZED );
-      }
-      break;
-    default:
-      break;
-    };
+      gdk_drawable_get_size (w, &width, &height);
+      gdk_window_get_position (w, &x, &y);
 
+      psppire_conf_set_int (conf, base, "height", height);
+      psppire_conf_set_int (conf, base, "width", width);
+      psppire_conf_set_int (conf, base, "x", x);
+      psppire_conf_set_int (conf, base, "y", y);
+    }
 }
index a7415b2451010b081b0774c9b014c8b205c34613..4e7ece0a5a6ce2c1f1c922c5d097ad474ced7367 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2009  Free Software Foundation
+   Copyright (C) 2009, 2010  Free Software Foundation
 
    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
@@ -96,7 +96,7 @@ void psppire_conf_set_window_geometry (PsppireConf *conf,
 
 void psppire_conf_save_window_geometry (PsppireConf *,
                                        const gchar *,
-                                       GdkEvent *);
+                                       GtkWindow *);
 
 
 G_END_DECLS
index 58aa0b8f91f740ba2630763ac7703cad8a243148..036b9b7746cbabd9cf878662cdc63a435a84e877 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1624,10 +1624,7 @@ data_sheet_set_clip (PsppireSheet *sheet)
   clip_dict = dict_create ();
   dict_set_encoding (clip_dict, dict_get_encoding (ds->dict->dict));
   for (i = col0; i <= coli; i++)
-    {
-      const struct variable *old = dict_get_var (ds->dict->dict, i);
-      dict_clone_var_assert (clip_dict, old, var_get_name (old));
-    }
+    dict_clone_var_assert (clip_dict, dict_get_var (ds->dict->dict, i));
 
   /* Construct clip data. */
   map = case_map_by_name (ds->dict->dict, clip_dict);
@@ -1656,14 +1653,13 @@ enum {
 
 /* Perform data_out for case CC, variable V, appending to STRING */
 static void
-data_out_g_string (GString *string, const struct dictionary *dict, 
-                  const struct variable *v,
+data_out_g_string (GString *string, const struct variable *v,
                   const struct ccase *cc)
 {
   const struct fmt_spec *fs = var_get_print_format (v);
   const union value *val = case_data (cc, v);
 
-  char *s = data_out (val, dict_get_encoding (dict), fs);
+  char *s = data_out (val, var_get_encoding (v), fs);
 
   g_string_append (string, s);
 
@@ -1697,7 +1693,7 @@ clip_to_text (void)
       for (c = 0 ; c < var_cnt ; ++c)
        {
          const struct variable *v = dict_get_var (clip_dict, c);
-         data_out_g_string (string, clip_dict, v, cc);
+         data_out_g_string (string, v, cc);
          if ( c < val_cnt - 1 )
            g_string_append (string, "\t");
        }
@@ -1744,7 +1740,7 @@ clip_to_html (void)
        {
          const struct variable *v = dict_get_var (clip_dict, c);
          g_string_append (string, "<td>");
-         data_out_g_string (string, clip_dict, v, cc);
+         data_out_g_string (string, v, cc);
          g_string_append (string, "</td>\n");
        }
 
index 2707498c7929038cafc9d55f1e85f0ad93ad0272..ec75e086b099bdec25e9a93597aa6152917d5a4d 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008, 2009  Free Software Foundation
+   Copyright (C) 2008, 2009, 2010  Free Software Foundation
 
    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
 
 #include <gtk/gtksignal.h>
 #include <gtk/gtkbox.h>
-#include "executor.h"
-#include "helper.h"
-
-#include "text-data-import-dialog.h"
-
-
-#include <ui/syntax-gen.h>
-#include <language/syntax-string-source.h>
-#include <libpspp/message.h>
 #include <stdlib.h>
 
-#include <data/procedure.h>
-
-#include "psppire.h"
-#include "psppire-window.h"
-#include "psppire-data-window.h"
-#include "psppire-syntax-window.h"
-
-#include "about.h"
-
-#include "goto-case-dialog.h"
-#include "weight-cases-dialog.h"
-#include "split-file-dialog.h"
-#include "transpose-dialog.h"
-#include "sort-cases-dialog.h"
-#include "select-cases-dialog.h"
-#include "compute-dialog.h"
-#include "find-dialog.h"
-#include "rank-dialog.h"
-#include "recode-dialog.h"
-#include "comments-dialog.h"
-#include "variable-info-dialog.h"
-#include "descriptives-dialog.h"
-#include "crosstabs-dialog.h"
-#include "frequencies-dialog.h"
-#include "examine-dialog.h"
-#include "regression-dialog.h"
-#include "reliability-dialog.h"
-#include "oneway-anova-dialog.h"
-#include "t-test-independent-samples-dialog.h"
-#include "t-test-one-sample.h"
-#include "t-test-paired-samples.h"
-
+#include "data/any-reader.h"
+#include "data/procedure.h"
+#include "language/syntax-string-source.h"
+#include "libpspp/message.h"
+#include "ui/gui/help-menu.h"
+#include "ui/gui/binomial-dialog.h"
+#include "ui/gui/comments-dialog.h"
+#include "ui/gui/compute-dialog.h"
+#include "ui/gui/correlation-dialog.h"
+#include "ui/gui/chi-square-dialog.h"
+#include "ui/gui/crosstabs-dialog.h"
+#include "ui/gui/descriptives-dialog.h"
+#include "ui/gui/examine-dialog.h"
+#include "ui/gui/executor.h"
+#include "ui/gui/factor-dialog.h"
+#include "ui/gui/find-dialog.h"
+#include "ui/gui/frequencies-dialog.h"
+#include "ui/gui/goto-case-dialog.h"
+#include "ui/gui/helper.h"
+#include "ui/gui/oneway-anova-dialog.h"
+#include "ui/gui/psppire-data-window.h"
+#include "ui/gui/psppire-syntax-window.h"
+#include "ui/gui/psppire-window.h"
+#include "ui/gui/psppire.h"
+#include "ui/gui/rank-dialog.h"
+#include "ui/gui/recode-dialog.h"
+#include "ui/gui/regression-dialog.h"
+#include "ui/gui/reliability-dialog.h"
+#include "ui/gui/roc-dialog.h"
+#include "ui/gui/select-cases-dialog.h"
+#include "ui/gui/sort-cases-dialog.h"
+#include "ui/gui/split-file-dialog.h"
+#include "ui/gui/t-test-independent-samples-dialog.h"
+#include "ui/gui/t-test-one-sample.h"
+#include "ui/gui/t-test-paired-samples.h"
+#include "ui/gui/text-data-import-dialog.h"
+#include "ui/gui/transpose-dialog.h"
+#include "ui/gui/variable-info-dialog.h"
+#include "ui/gui/weight-cases-dialog.h"
+#include "ui/syntax-gen.h"
 
 #include <gettext.h>
 #define _(msgid) gettext (msgid)
@@ -108,7 +107,7 @@ psppire_data_window_get_type (void)
        g_type_register_static (PSPPIRE_TYPE_WINDOW, "PsppireDataWindow",
                                &psppire_data_window_info, 0);
 
-      
+
       g_type_add_interface_static (psppire_data_window_type,
                                   PSPPIRE_TYPE_WINDOW_MODEL,
                                   &window_interface_info);
@@ -184,7 +183,7 @@ set_cut_copy_menuitem_sensitivity (PsppireDataWindow *de, gboolean x)
 
 /* Run the EXECUTE command. */
 static void
-execute (GtkMenuItem *mi, gpointer data)
+execute (void)
 {
   struct getl_interface *sss = create_syntax_string_source ("EXECUTE.");
 
@@ -309,7 +308,7 @@ on_weight_change (GObject *o, gint weight_index, gpointer data)
 
       g_object_get (de->data_editor, "var-store", &vs, NULL);
       g_object_get (vs, "dictionary", &dict, NULL);
-      
+
       var = psppire_dict_get_variable (dict, weight_index);
 
       text = g_strdup_printf (_("Weight by %s"), var_get_name (var));
@@ -387,7 +386,19 @@ sysfile_chooser_dialog (PsppireWindow *toplevel)
                                 GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
                                 NULL);
 
-  GtkFileFilter *filter = gtk_file_filter_new ();
+  GtkFileFilter *filter;
+
+  filter = gtk_file_filter_new ();
+  gtk_file_filter_set_name (filter, _("Data and Syntax Files"));
+  gtk_file_filter_add_pattern (filter, "*.sav");
+  gtk_file_filter_add_pattern (filter, "*.SAV");
+  gtk_file_filter_add_pattern (filter, "*.por");
+  gtk_file_filter_add_pattern (filter, "*.POR");
+  gtk_file_filter_add_pattern (filter, "*.sps");
+  gtk_file_filter_add_pattern (filter, "*.SPS");
+  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
+
+  filter = gtk_file_filter_new ();
   gtk_file_filter_set_name (filter, _("System Files (*.sav)"));
   gtk_file_filter_add_pattern (filter, "*.sav");
   gtk_file_filter_add_pattern (filter, "*.SAV");
@@ -399,6 +410,12 @@ sysfile_chooser_dialog (PsppireWindow *toplevel)
   gtk_file_filter_add_pattern (filter, "*.POR");
   gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
 
+  filter = gtk_file_filter_new ();
+  gtk_file_filter_set_name (filter, _("Syntax Files (*.sps) "));
+  gtk_file_filter_add_pattern (filter, "*.sps");
+  gtk_file_filter_add_pattern (filter, "*.SPS");
+  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
+
   filter = gtk_file_filter_new ();
   gtk_file_filter_set_name (filter, _("All Files"));
   gtk_file_filter_add_pattern (filter, "*");
@@ -431,7 +448,7 @@ sysfile_chooser_dialog (PsppireWindow *toplevel)
 /* Callback for the data_open action.
    Prompts for a filename and opens it */
 static void
-open_data_dialog (GtkAction *action, PsppireWindow *de)
+open_window (PsppireWindow *de)
 {
   GtkWidget *dialog = sysfile_chooser_dialog (de);
 
@@ -442,7 +459,10 @@ open_data_dialog (GtkAction *action, PsppireWindow *de)
        gchar *name =
          gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
 
-       psppire_window_load (de, name);
+       if (any_reader_may_open (name))
+         psppire_window_load (de, name);
+       else
+         open_syntax_window (name);
 
        g_free (name);
       }
@@ -522,17 +542,15 @@ save_file (PsppireWindow *w)
 
 
 static void
-insert_case (GtkAction *action, gpointer data)
+insert_case (PsppireDataWindow *dw)
 {
-  PsppireDataWindow *dw = PSPPIRE_DATA_WINDOW (data);
   psppire_data_editor_insert_case (dw->data_editor);
 }
 
 static void
-on_insert_variable (GtkAction *action, gpointer data)
+on_insert_variable (PsppireDataWindow *dw)
 {
-  PsppireDataEditor *de = PSPPIRE_DATA_EDITOR (data);
-  psppire_data_editor_insert_variable (de);
+  psppire_data_editor_insert_variable (dw->data_editor);
 }
 
 
@@ -617,8 +635,8 @@ data_save_as_dialog (PsppireDataWindow *de)
       (gtk_radio_button_get_group (GTK_RADIO_BUTTON(button_sys)),
        _("Portable File"));
 
-    gtk_box_pack_start_defaults (GTK_BOX (vbox), button_sys);
-    gtk_box_pack_start_defaults (GTK_BOX (vbox), button_por);
+    psppire_box_pack_start_defaults (GTK_BOX (vbox), button_sys);
+    psppire_box_pack_start_defaults (GTK_BOX (vbox), button_por);
 
     gtk_widget_show_all (vbox);
 
@@ -678,7 +696,7 @@ data_save (PsppireWindow *de)
 /* Callback for data_new action.
    Performs the NEW FILE command */
 static void
-new_file (GtkAction *action, PsppireDataWindow *de)
+new_file (PsppireDataWindow *de)
 {
   struct getl_interface *sss =
     create_syntax_string_source ("NEW FILE.");
@@ -691,39 +709,32 @@ new_file (GtkAction *action, PsppireDataWindow *de)
 
 
 static void
-on_edit_paste (GtkAction *a, gpointer data)
+on_edit_paste (PsppireDataWindow  *de)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
-
   psppire_data_editor_clip_paste (de->data_editor);
 }
 
 static void
-on_edit_copy (GtkMenuItem *m, gpointer data)
+on_edit_copy (PsppireDataWindow  *de)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
-
   psppire_data_editor_clip_copy (de->data_editor);
 }
 
 
 
 static void
-on_edit_cut (GtkMenuItem *m, gpointer data)
+on_edit_cut (PsppireDataWindow  *de)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
-
   psppire_data_editor_clip_cut (de->data_editor);
 }
 
 
 static void
-status_bar_activate (GtkToggleAction *action, gpointer data)
+status_bar_activate (PsppireDataWindow  *de, GtkToggleAction *action)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
   GtkWidget *statusbar = get_widget_assert (de->builder, "status-bar");
 
-  if ( gtk_toggle_action_get_active (action) )
+  if ( gtk_toggle_action_get_active (action))
     gtk_widget_show (statusbar);
   else
     gtk_widget_hide (statusbar);
@@ -731,36 +742,30 @@ status_bar_activate (GtkToggleAction *action, gpointer data)
 
 
 static void
-grid_lines_activate (GtkToggleAction *action, gpointer data)
+grid_lines_activate (PsppireDataWindow  *de, GtkToggleAction *action)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
   const gboolean grid_visible = gtk_toggle_action_get_active (action);
 
   psppire_data_editor_show_grid (de->data_editor, grid_visible);
 }
 
 static void
-data_view_activate (GtkCheckMenuItem *menuitem, gpointer data)
+data_view_activate (PsppireDataWindow  *de)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
-
   gtk_notebook_set_current_page (GTK_NOTEBOOK (de->data_editor), PSPPIRE_DATA_EDITOR_DATA_VIEW);
 }
 
 
 static void
-variable_view_activate (GtkCheckMenuItem *menuitem, gpointer data)
+variable_view_activate (PsppireDataWindow  *de)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
-
   gtk_notebook_set_current_page (GTK_NOTEBOOK (de->data_editor), PSPPIRE_DATA_EDITOR_VARIABLE_VIEW);
 }
 
 
 static void
-fonts_activate (GtkMenuItem *menuitem, gpointer data)
+fonts_activate (PsppireDataWindow  *de)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
   GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (de));
   PangoFontDescription *current_font;
   gchar *font_name;
@@ -796,25 +801,21 @@ fonts_activate (GtkMenuItem *menuitem, gpointer data)
 
 /* Callback for the value labels action */
 static void
-toggle_value_labels (GtkToggleAction *ta, gpointer data)
+toggle_value_labels (PsppireDataWindow  *de, GtkToggleAction *ta)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
-
   g_object_set (de->data_editor, "value-labels", gtk_toggle_action_get_active (ta), NULL);
 }
 
 static void
-toggle_split_window (GtkToggleAction *ta, gpointer data)
+toggle_split_window (PsppireDataWindow  *de, GtkToggleAction *ta)
 {
-  PsppireDataWindow  *de = PSPPIRE_DATA_WINDOW (data);
-
   psppire_data_editor_split_window (de->data_editor,
                                    gtk_toggle_action_get_active (ta));
 }
 
 
 static void
-file_quit (GtkCheckMenuItem *menuitem, gpointer data)
+file_quit (void)
 {
   /* FIXME: Need to be more intelligent here.
      Give the user the opportunity to save any unsaved data.
@@ -825,145 +826,6 @@ file_quit (GtkCheckMenuItem *menuitem, gpointer data)
 }
 
 
-
-static GtkWidget *
-create_data_sheet_variable_popup_menu (PsppireDataWindow *de)
-{
-  GtkWidget *menu = gtk_menu_new ();
-
-  GtkWidget *sort_ascending =
-    gtk_action_create_menu_item (gtk_action_new ("sort-up",
-                                                _("Sort Ascending"),
-                                                NULL,
-                                                "gtk-sort-ascending"));
-
-  GtkWidget *sort_descending =
-    gtk_action_create_menu_item (gtk_action_new ("sort-down",
-                                                _("Sort Descending"),
-                                                NULL,
-                                                "gtk-sort-descending"));
-
-  GtkWidget *insert_variable =
-    gtk_menu_item_new_with_label (_("Insert Variable"));
-
-  GtkWidget *clear_variable =
-    gtk_menu_item_new_with_label (_("Clear"));
-
-
-  gtk_action_connect_proxy (de->delete_variables,
-                           clear_variable );
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_variable);
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu),
-                        gtk_separator_menu_item_new ());
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), clear_variable);
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu),
-                        gtk_separator_menu_item_new ());
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), sort_ascending);
-
-
-  g_signal_connect_swapped (sort_ascending, "activate",
-                           G_CALLBACK (psppire_data_editor_sort_ascending),
-                           de->data_editor);
-
-  g_signal_connect_swapped (sort_descending, "activate",
-                           G_CALLBACK (psppire_data_editor_sort_descending),
-                           de->data_editor);
-
-  g_signal_connect_swapped (insert_variable, "activate",
-                           G_CALLBACK (gtk_action_activate),
-                           de->insert_variable);
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), sort_descending);
-
-  gtk_widget_show_all (menu);
-
-  return menu;
-}
-
-
-static GtkWidget *
-create_data_sheet_cases_popup_menu (PsppireDataWindow *de)
-{
-  GtkWidget *menu = gtk_menu_new ();
-
-  GtkWidget *insert_case =
-    gtk_menu_item_new_with_label (_("Insert Case"));
-
-  GtkWidget *delete_case =
-    gtk_menu_item_new_with_label (_("Clear"));
-
-
-  gtk_action_connect_proxy (de->delete_cases,
-                           delete_case);
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_case);
-
-  g_signal_connect_swapped (insert_case, "activate",
-                           G_CALLBACK (gtk_action_activate),
-                           de->insert_case);
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu),
-                        gtk_separator_menu_item_new ());
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), delete_case);
-
-
-  gtk_widget_show_all (menu);
-
-  return menu;
-}
-
-
-static GtkWidget *
-create_var_sheet_variable_popup_menu (PsppireDataWindow *de)
-{
-  GtkWidget *menu = gtk_menu_new ();
-
-  GtkWidget *insert_variable =
-    gtk_menu_item_new_with_label (_("Insert Variable"));
-
-  GtkWidget *delete_variable =
-    gtk_menu_item_new_with_label (_("Clear"));
-
-
-  gtk_action_connect_proxy (de->delete_variables,
-                           delete_variable);
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_variable);
-
-  g_signal_connect_swapped (insert_variable, "activate",
-                           G_CALLBACK (gtk_action_activate),
-                           de->insert_variable);
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu),
-                        gtk_separator_menu_item_new ());
-
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), delete_variable);
-
-
-  gtk_widget_show_all (menu);
-
-  return menu;
-}
-
-
 static void
 on_recent_data_select (GtkMenuShell *menushell,
                       PsppireWindow *window)
@@ -1067,22 +929,6 @@ on_switch_sheet (GtkNotebook *notebook,
 }
 
 
-static GtkAction *
-resolve_action (GtkBuilder *builder, const gchar *action, const gchar *proxy)
-{
-  GtkWidget *pr = NULL;
-  GtkAction *act = get_action_assert (builder, action);
-  g_assert (GTK_IS_ACTION (act));
-
-  if ( proxy )
-    pr = get_widget_assert (builder, proxy);
-
-  if ( pr )
-    gtk_action_connect_proxy (act, pr);
-
-  return act;
-}
-
 
 static void
 set_unsaved (gpointer w)
@@ -1090,6 +936,21 @@ set_unsaved (gpointer w)
   psppire_window_set_unsaved (PSPPIRE_WINDOW (w));
 }
 
+
+/* Connects the action called ACTION_NAME to HANDLER passing DW as the auxilliary data.
+   Returns a pointer to the action
+*/
+static GtkAction *
+connect_action (PsppireDataWindow *dw, const char *action_name, 
+                                   GCallback handler)
+{
+  GtkAction *action = get_action_assert (dw->builder, action_name);
+  g_signal_connect_swapped (action, "activate", handler, dw);
+
+  return action;
+}
+
 static void
 psppire_data_window_init (PsppireDataWindow *de)
 {
@@ -1133,13 +994,13 @@ psppire_data_window_init (PsppireDataWindow *de)
   set_cut_copy_menuitem_sensitivity (de, FALSE);
 
   g_signal_connect_swapped (de->data_editor, "data-selection-changed",
-                   G_CALLBACK (set_cut_copy_menuitem_sensitivity), de);
+                           G_CALLBACK (set_cut_copy_menuitem_sensitivity), de);
 
 
   set_paste_menuitem_sensitivity (de, FALSE);
 
   g_signal_connect_swapped (de->data_editor, "data-available-changed",
-                   G_CALLBACK (set_paste_menuitem_sensitivity), de);
+                           G_CALLBACK (set_paste_menuitem_sensitivity), de);
 
   dataset_add_transform_change_callback (the_dataset,
                                         transformation_change_callback,
@@ -1165,533 +1026,104 @@ psppire_data_window_init (PsppireDataWindow *de)
                    de);
 
 
-  g_signal_connect (get_action_assert (de->builder, "edit_copy"),
-                   "activate",
-                   G_CALLBACK (on_edit_copy), de);
-
-  g_signal_connect (get_action_assert (de->builder, "edit_cut"),
-                   "activate",
-                   G_CALLBACK (on_edit_cut), de);
-
-
-
-  {
-    GtkWidget *toolbarbutton = get_widget_assert (de->builder, "button-open");
-
-    GtkAction *action_data_open =
-      resolve_action (de->builder, "file_open_data", NULL);
-
-    g_object_set (action_data_open,
-                 "tooltip",  _("Open a data file"),
-                 "stock-id", "gtk-open",
-                 NULL);
-
-    g_signal_connect (action_data_open, "activate",
-                     G_CALLBACK (open_data_dialog), de);
-
-    g_signal_connect_swapped (toolbarbutton, "clicked",
-                     G_CALLBACK (gtk_action_activate), action_data_open);
-  }
+  connect_action (de, "edit_copy", G_CALLBACK (on_edit_copy));
 
+  connect_action (de, "edit_cut", G_CALLBACK (on_edit_cut));
 
+  connect_action (de, "file_new_data", G_CALLBACK (new_file));
 
-  {
-    GtkAction *action_data_new =
-      resolve_action (de->builder, "file_new_data", NULL);
+  connect_action (de, "file_import-text", G_CALLBACK (text_data_import_assistant));
 
-    g_object_set (action_data_new,
-                 "tooltip", _("New data file"),
-                 "stock-id", "gtk-new",
-                 NULL);
+  connect_action (de, "file_save", G_CALLBACK (data_save));
+  connect_action (de, "file_open", G_CALLBACK (open_window));
 
-    g_signal_connect (action_data_new, "activate",
-                     G_CALLBACK (new_file), de);
-  }
+  connect_action (de, "file_save_as", G_CALLBACK (data_save_as_dialog));
 
+  connect_action (de, "file_information_working-file", G_CALLBACK (display_dict));
 
+  connect_action (de, "file_information_external-file", G_CALLBACK (sysfile_info));
 
-  {
-    GtkAction *invoke_text_import_assistant =
-      resolve_action (de->builder, "file_import-text", NULL);
+  connect_action (de, "edit_paste", G_CALLBACK (on_edit_paste));
 
-    g_object_set (invoke_text_import_assistant,
-                 "tooltip",  _("Import text data file"),
-                 "stock-id", "gtk-convert",
-                 NULL);
+  de->insert_case = connect_action (de, "edit_insert-case", G_CALLBACK (insert_case));
 
-    g_signal_connect (invoke_text_import_assistant, "activate",
-                     G_CALLBACK (text_data_import_assistant), de);
-  }
+  de->insert_variable = connect_action (de, "action_insert-variable", G_CALLBACK (on_insert_variable));
 
+  de->invoke_goto_dialog = connect_action (de, "edit_goto-case", G_CALLBACK (goto_case_dialog));
 
+  g_signal_connect_swapped (get_action_assert (de->builder, "view_value-labels"), "toggled", G_CALLBACK (toggle_value_labels), de);
 
   {
-    GtkAction *action_data_save =
-      resolve_action (de->builder, "file_save", "button-save");
-
-
-    g_object_set (action_data_save,
-                 "tooltip", _("Save data to file"),
-                 "stock-id", "gtk-save",
-                 NULL);
+    de->delete_cases = get_action_assert (de->builder, "edit_clear-cases");
 
-    g_signal_connect_swapped (action_data_save, "activate",
-                             G_CALLBACK (data_save), de);
-  }
-
-
-
-
-  {
-    GtkAction *action_data_save_as =
-      resolve_action (de->builder, "file_save_as", NULL);
-
-    g_object_set (action_data_save_as,
-                 "tooltip", _("Save data to file"),
-                 "stock-id", "gtk-save-as",
-                 NULL);
-
-    g_signal_connect_swapped (action_data_save_as, "activate",
-                     G_CALLBACK (data_save_as_dialog), de);
-  }
-
-
-  {
-    GtkAction *action_info_working_file =
-      resolve_action (de->builder,
-                     "file_information_working-file", NULL);
-
-
-    g_signal_connect_swapped (action_info_working_file, "activate",
-                     G_CALLBACK (display_dict), de);
-  }
-
-
-  {
-    GtkAction *action_info_external_file =
-      resolve_action (de->builder,
-                     "file_information_external-file", NULL);
-
-
-    g_signal_connect_swapped (action_info_external_file, "activate",
-                     G_CALLBACK (sysfile_info), de);
-  }
-
-
-
-  {
-    GtkAction *value_labels_action =
-      resolve_action (de->builder,
-                     "view_value-labels", "togglebutton-value-labels");
-
-    g_object_set (value_labels_action,
-                 "tooltip",  _("Show/hide value labels"),
-                 "stock-id", "pspp-value-labels",
-                 NULL);
-
-    g_signal_connect (value_labels_action, "toggled",
-                     G_CALLBACK (toggle_value_labels), de);
-  }
-
-
-  g_signal_connect (get_action_assert (de->builder, "edit_paste"), "activate",
-                   G_CALLBACK (on_edit_paste),
-                   de);
-
-  {
-    de->delete_cases =
-      resolve_action (de->builder, "edit_clear-cases", NULL);
-
-
-    g_object_set (de->delete_cases,
-                 "label", _("Clear"),
-                 "tooltip", _("Delete the cases at the selected position(s)"),
-                 "stock-id", "gtk-clear",
-                 NULL);
-
-    g_signal_connect_swapped (de->delete_cases, "activate",
-                             G_CALLBACK (psppire_data_editor_delete_cases),
-                             de->data_editor);
+    g_signal_connect_swapped (de->delete_cases, "activate", G_CALLBACK (psppire_data_editor_delete_cases), de->data_editor);
 
     gtk_action_set_visible (de->delete_cases, FALSE);
   }
 
 
   {
-    de->delete_variables =
-      resolve_action (de->builder, "edit_clear-variables", NULL);
-
-    g_object_set (de->delete_variables,
-                 "label", _("Clear"),
-                 "tooltip", _("Delete the variables at the selected position(s)"),
-                 "stock-id", "gtk-clear",
-                 NULL);
+    de->delete_variables = get_action_assert (de->builder, "edit_clear-variables");
 
-
-    g_signal_connect_swapped (de->delete_variables, "activate",
-                             G_CALLBACK (psppire_data_editor_delete_variables),
-                             de->data_editor);
+    g_signal_connect_swapped (de->delete_variables, "activate", G_CALLBACK (psppire_data_editor_delete_variables), de->data_editor);
 
     gtk_action_set_visible (de->delete_variables, FALSE);
   }
 
 
-  de->insert_variable =
-    resolve_action (de->builder, "edit_insert-variable",
-                   "button-insert-variable");
-
-  g_object_set (de->insert_variable,
-               "tooltip", _("Create a new variable at the current position"),
-               "stock-id", "pspp-insert-variable",
-               NULL);
-
-  g_signal_connect (de->insert_variable, "activate",
-                   G_CALLBACK (on_insert_variable), de->data_editor);
-
-
+  connect_action (de, "data_transpose", G_CALLBACK (transpose_dialog));
 
+  connect_action (de, "data_sort-cases", G_CALLBACK (sort_cases_dialog));
 
+  connect_action (de, "transform_compute", G_CALLBACK (compute_dialog));
 
-  de->insert_case =
-    resolve_action (de->builder, "edit_insert-case", "button-insert-case");
+  connect_action (de, "edit_find", G_CALLBACK (find_dialog));
 
-  g_object_set (de->insert_case,
-               "tooltip", _("Create a new case at the current position"),
-               "stock-id", "pspp-insert-case",
-               NULL);
+  connect_action (de, "data_split-file", G_CALLBACK (split_file_dialog));
 
-  g_signal_connect (de->insert_case, "activate",
-                   G_CALLBACK (insert_case), de);
+  connect_action (de, "data_weight-cases", G_CALLBACK (weight_cases_dialog));
 
+  connect_action (de, "utilities_variables", G_CALLBACK (variable_info_dialog));
+  connect_action (de, "oneway-anova", G_CALLBACK (oneway_anova_dialog));
 
+  connect_action (de, "indep-t-test", G_CALLBACK (t_test_independent_samples_dialog));
 
+  connect_action (de, "paired-t-test", G_CALLBACK (t_test_paired_samples_dialog));
 
+  connect_action (de, "one-sample-t-test", G_CALLBACK (t_test_one_sample_dialog));
 
-  de->invoke_goto_dialog =
-    resolve_action (de->builder, "edit_goto-case", "button-goto-case");
+  connect_action (de, "utilities_comments", G_CALLBACK (comments_dialog));
+  connect_action (de, "transform_rank", G_CALLBACK (rank_dialog));
+  connect_action (de, "transform_recode-same", G_CALLBACK (recode_same_dialog));
+  connect_action (de, "transform_recode-different", G_CALLBACK (recode_different_dialog));
 
+  connect_action (de, "analyze_descriptives", G_CALLBACK (descriptives_dialog));
+  connect_action (de, "analyze_frequencies", G_CALLBACK (frequencies_dialog));
+  connect_action (de, "crosstabs", G_CALLBACK (crosstabs_dialog));
+  connect_action (de, "analyze_explore", G_CALLBACK (examine_dialog));
+  connect_action (de, "linear-regression", G_CALLBACK (regression_dialog));
+  connect_action (de, "reliability", G_CALLBACK (reliability_dialog));
+  connect_action (de, "roc-curve", G_CALLBACK (roc_dialog));
+  connect_action (de, "correlation", G_CALLBACK (correlation_dialog));
+  connect_action (de, "factor-analysis", G_CALLBACK (factor_dialog));
 
-  g_object_set (de->invoke_goto_dialog,
-               "tooltip", _("Jump to a Case in the Data Sheet"),
-               "stock-id", "gtk-jump-to",
-               NULL);
-
-  g_signal_connect (de->invoke_goto_dialog, "activate",
-                   G_CALLBACK (goto_case_dialog), de);
-
-
-
-  {
-    GtkAction *invoke_weight_cases_dialog =
-      resolve_action (de->builder, "data_weight-cases", "button-weight-cases");
-
-
-    g_object_set (invoke_weight_cases_dialog,
-                 "stock-id", "pspp-weight-cases",
-                 "tooltip", _("Weight cases by variable"),
-                 NULL);
-
-    g_signal_connect (invoke_weight_cases_dialog, "activate",
-                     G_CALLBACK (weight_cases_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_transpose_dialog =
-      resolve_action (de->builder, "data_transpose", NULL);
-
-
-    g_object_set (invoke_transpose_dialog,
-                 "tooltip", _("Transpose the cases with the variables"),
-                 "stock-id", "pspp-transpose",
-                 NULL);
-
-    g_signal_connect (invoke_transpose_dialog, "activate",
-                     G_CALLBACK (transpose_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_split_file_dialog =
-      resolve_action (de->builder, "data_split-file", "button-split-file");
-
-    g_object_set (invoke_split_file_dialog,
-                 "tooltip", _("Split the active file"),
-                 "stock-id", "pspp-split-file",
-                 NULL);
-
-    g_signal_connect (invoke_split_file_dialog, "activate",
-                     G_CALLBACK (split_file_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_sort_cases_dialog =
-      resolve_action (de->builder, "data_sort-cases", NULL);
-
-
-    g_object_set (invoke_sort_cases_dialog,
-                 "tooltip", _("Sort cases in the active file"),
-                 "stock-id", "gtk-sort-ascending",
-                 NULL);
-
-    g_signal_connect (invoke_sort_cases_dialog, "activate",
-                     G_CALLBACK (sort_cases_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_select_cases_dialog =
-      resolve_action (de->builder, "data_select-cases", "button-select-cases");
-
-    g_object_set (invoke_select_cases_dialog,
-                 "tooltip", _("Select cases from the active file"),
-                 "stock-id", "pspp-select-cases",
-                 NULL);
-
-    g_signal_connect (invoke_select_cases_dialog, "activate",
-                     G_CALLBACK (select_cases_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_compute_dialog =
-      resolve_action (de->builder, "transform_compute", NULL);
-
-    g_object_set (invoke_compute_dialog,
-                 "tooltip", _("Compute new values for a variable"),
-                 "stock-id", "pspp-compute",
-                 NULL);
-
-    g_signal_connect (invoke_compute_dialog, "activate",
-                     G_CALLBACK (compute_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_oneway_anova_dialog =
-      resolve_action (de->builder, "oneway-anova", NULL);
-
-    g_object_set (invoke_oneway_anova_dialog,
-                 "tooltip", _("Perform one way analysis of variance"),
-                 NULL);
-
-    g_signal_connect (invoke_oneway_anova_dialog, "activate",
-                     G_CALLBACK (oneway_anova_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_t_test_independent_samples_dialog =
-      resolve_action (de->builder, "indep-t-test", NULL);
-
-
-    g_object_set (invoke_t_test_independent_samples_dialog,
-                 "tooltip",
-                 _("Calculate T Test for samples from independent groups"),
-                 NULL);
-
-    g_signal_connect (invoke_t_test_independent_samples_dialog, "activate",
-                     G_CALLBACK (t_test_independent_samples_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_t_test_paired_samples_dialog =
-      resolve_action (de->builder, "paired-t-test", NULL);
-
-    g_object_set (invoke_t_test_paired_samples_dialog,
-                 "tooltip",
-                 _("Calculate T Test for paired samples"),
-                 NULL);
-
-    g_signal_connect (invoke_t_test_paired_samples_dialog, "activate",
-                     G_CALLBACK (t_test_paired_samples_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_t_test_one_sample_dialog =
-      resolve_action (de->builder, "one-sample-t-test", NULL);
-
-    g_object_set (invoke_t_test_one_sample_dialog,
-                 "tooltip",
-                 _("Calculate T Test for sample from a single distribution"),
-                 NULL);
-
-    g_signal_connect (invoke_t_test_one_sample_dialog, "activate",
-                     G_CALLBACK (t_test_one_sample_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_comments_dialog =
-      resolve_action (de->builder, "utilities_comments", NULL);
-
-
-    g_object_set (invoke_comments_dialog,
-                 "tooltip",
-                 _("Commentary text for the data file"),
-                 NULL);
-
-    g_signal_connect (invoke_comments_dialog, "activate",
-                     G_CALLBACK (comments_dialog), de);
-  }
-
-
-
-  {
-    GtkAction *invoke_find_dialog =
-      resolve_action (de->builder, "edit_find", "button-find");
-
-    g_object_set (invoke_find_dialog, "stock-id", "gtk-find", NULL);
-
-    g_signal_connect (invoke_find_dialog, "activate",
-                     G_CALLBACK (find_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_rank_dialog =
-      resolve_action (de->builder, "transform_rank", NULL);
-
-    g_object_set (invoke_rank_dialog,
-                 "stock-id", "pspp-rank-cases",
-                 "tooltip", _("Rank Cases"),
-                 NULL);
-
-    g_signal_connect (invoke_rank_dialog, "activate",
-                     G_CALLBACK (rank_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_recode_same_dialog =
-      resolve_action (de->builder, "transform_recode-same", NULL);
-
-    g_object_set (invoke_recode_same_dialog,
-                 "stock-id", "pspp-recode-same",
-                 "tooltip", _("Recode values into the same variables"),
-                 NULL);
-
-    g_signal_connect (invoke_recode_same_dialog, "activate",
-                     G_CALLBACK (recode_same_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_recode_different_dialog  =
-      resolve_action (de->builder, "transform_recode-different", NULL);
-
-    g_object_set (invoke_recode_different_dialog,
-                 "stock-id", "pspp-recode-different",
-                 "tooltip", _("Recode values into different variables"),
-                 NULL);
-
-    g_signal_connect (invoke_recode_different_dialog, "activate",
-                     G_CALLBACK (recode_different_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_variable_info_dialog  =
-      resolve_action (de->builder, "utilities_variables", "button-goto-variable");
-
-    g_object_set (invoke_variable_info_dialog,
-                 "stock-id", "pspp-goto-variable",
-                 "tooltip", _("Jump to variable"),
-                 NULL);
-
-    g_signal_connect (invoke_variable_info_dialog, "activate",
-                     G_CALLBACK (variable_info_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_descriptives_dialog =
-      resolve_action (de->builder,  "analyze_descriptives", NULL);
-
-    g_object_set (invoke_descriptives_dialog,
-                 "tooltip", _("Calculate descriptive statistics (mean, variance, ...)"),
-                 "stock-id", "pspp-descriptives",
-                 NULL);
-
-    g_signal_connect (invoke_descriptives_dialog, "activate",
-                     G_CALLBACK (descriptives_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_frequencies_dialog =
-      resolve_action (de->builder,  "analyze_frequencies", NULL);
-
-    g_object_set (invoke_frequencies_dialog,
-                 "tooltip", _("Generate frequency statistics"),
-                 "stock-id", "pspp-frequencies",
-                 NULL);
-
-    g_signal_connect (invoke_frequencies_dialog, "activate",
-                     G_CALLBACK (frequencies_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_crosstabs_dialog =
-      resolve_action (de->builder, "crosstabs", NULL);
-
-    g_object_set (invoke_crosstabs_dialog,
-                 "tooltip", _("Generate crosstabulations"),
-                 "stock-id", "pspp-crosstabs",
-                 NULL);
-
-    g_signal_connect (invoke_crosstabs_dialog, "activate",
-                     G_CALLBACK (crosstabs_dialog), de);
-  }
-
-
-
-  {
-    GtkAction *invoke_examine_dialog =
-      resolve_action (de->builder, "analyze_explore", NULL);
-
-    g_object_set (invoke_examine_dialog,
-                 "tooltip", _("Examine Data by Factors"),
-                 "stock-id", "pspp-examine",
-                 NULL);
-
-    g_signal_connect (invoke_examine_dialog, "activate",
-                     G_CALLBACK (examine_dialog), de);
-  }
-
-
-  {
-    GtkAction *invoke_regression_dialog =
-      resolve_action (de->builder, "linear-regression", NULL);
-
-    g_object_set (invoke_regression_dialog,
-                 "tooltip", _("Estimate parameters of the linear model"),
-                 "stock-id", "pspp-regression",
-                 NULL
-                 );
-
-    g_signal_connect (invoke_regression_dialog, "activate",
-                     G_CALLBACK (regression_dialog), de);
-  }
-
-  {
-    GtkAction *invoke_reliability_dialog =
-      resolve_action (de->builder, "reliability", NULL);
-
-    g_object_set (invoke_reliability_dialog,
-                 "tooltip", _("Reliability Analysis"),
-                 "stock-id", "pspp-reliability",
-                 NULL
-                 );
-
-    g_signal_connect (invoke_reliability_dialog, "activate",
-                     G_CALLBACK (reliability_dialog), de);
-  }
+  connect_action (de, "chi-square", G_CALLBACK (chisquare_dialog));
 
+  connect_action (de, "binomial", G_CALLBACK (binomial_dialog));
 
   {
     GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (de->builder, "uimanager1", GTK_TYPE_UI_MANAGER));
@@ -1725,9 +1157,7 @@ psppire_data_window_init (PsppireDataWindow *de)
     gtk_menu_item_set_submenu (GTK_MENU_ITEM (recent_data), menu_data);
 
 
-    g_signal_connect (menu_data, "selection-done",
-                     G_CALLBACK (on_recent_data_select),
-                     de);
+    g_signal_connect (menu_data, "selection-done", G_CALLBACK (on_recent_data_select), de);
 
     {
       GtkRecentFilter *filter = gtk_recent_filter_new ();
@@ -1742,36 +1172,11 @@ psppire_data_window_init (PsppireDataWindow *de)
 
     gtk_menu_item_set_submenu (GTK_MENU_ITEM (recent_files), menu_files);
 
-    g_signal_connect (menu_files, "selection-done",
-                     G_CALLBACK (on_recent_files_select),
-                     de);
+    g_signal_connect (menu_files, "selection-done", G_CALLBACK (on_recent_files_select), de);
 
   }
 
-  g_signal_connect (get_action_assert (de->builder,"file_new_syntax"),
-                   "activate",
-                   G_CALLBACK (create_syntax_window),
-                   NULL);
-
-  g_signal_connect (get_action_assert (de->builder,"file_open_syntax"),
-                   "activate",
-                   G_CALLBACK (open_syntax_window),
-                   de);
-
-  {
-    GtkAction *abt = get_action_assert (de->builder, "help_about");
-    g_object_set (abt, "stock-id", "gtk-about", NULL);
-    g_signal_connect (abt,
-                     "activate",
-                     G_CALLBACK (about_new),
-                     de);
-  }
-
-
-  g_signal_connect (get_action_assert (de->builder,"help_reference"),
-                   "activate",
-                   G_CALLBACK (reference_manual),
-                   de);
+  connect_action (de, "file_new_syntax", G_CALLBACK (create_syntax_window));
 
 
   g_signal_connect (de->data_editor,
@@ -1792,85 +1197,50 @@ psppire_data_window_init (PsppireDataWindow *de)
   gtk_notebook_set_current_page (GTK_NOTEBOOK (de->data_editor), PSPPIRE_DATA_EDITOR_VARIABLE_VIEW);
   gtk_notebook_set_current_page (GTK_NOTEBOOK (de->data_editor), PSPPIRE_DATA_EDITOR_DATA_VIEW);
 
-  g_signal_connect (get_action_assert (de->builder, "view_statusbar"),
-                   "activate",
-                   G_CALLBACK (status_bar_activate), de);
-
+  connect_action (de, "view_statusbar", G_CALLBACK (status_bar_activate));
 
-  g_signal_connect (get_action_assert (de->builder, "view_gridlines"),
-                   "activate",
-                   G_CALLBACK (grid_lines_activate), de);
+  connect_action (de, "view_gridlines", G_CALLBACK (grid_lines_activate));
 
+  connect_action (de, "view_data", G_CALLBACK (data_view_activate));
 
+  connect_action (de, "view_variables", G_CALLBACK (variable_view_activate));
 
-  g_signal_connect (get_action_assert (de->builder, "view_data"),
-                   "activate",
-                   G_CALLBACK (data_view_activate), de);
+  connect_action (de, "view_fonts", G_CALLBACK (fonts_activate));
 
-  g_signal_connect (get_action_assert (de->builder, "view_variables"),
-                   "activate",
-                   G_CALLBACK (variable_view_activate), de);
+  connect_action (de, "file_quit", G_CALLBACK (file_quit));
 
+  connect_action (de, "transform_run-pending", G_CALLBACK (execute));
 
-  {
-    GtkAction *font_action =
-      resolve_action (de->builder, "view_fonts", NULL);
-
-    g_object_set (font_action,
-                 "stock-id", "gtk-select-font",
-                 NULL);
-
-    g_signal_connect (font_action,
-                     "activate",
-                     G_CALLBACK (fonts_activate), de);
-  }
-
-
-
-  g_signal_connect (get_action_assert (de->builder, "file_quit"),
-                   "activate",
-                   G_CALLBACK (file_quit), de);
-
-  g_signal_connect (get_action_assert (de->builder, "transform_run-pending"),
-                   "activate",
-                   G_CALLBACK (execute), de);
-
-
-  g_signal_connect (get_action_assert (de->builder, "windows_minimise_all"),
-                   "activate",
-                   G_CALLBACK (psppire_window_minimise_all), NULL);
+  connect_action (de, "windows_minimise_all", G_CALLBACK (psppire_window_minimise_all));
 
-
-  {
-    GtkAction *split_window_action =
-      resolve_action (de->builder, "windows_split", NULL);
-
-    g_object_set (split_window_action,
-                 "tooltip", _("Split the window vertically and horizontally"),
-                 "stock-id", "pspp-split-window",
-                 NULL);
-
-    g_signal_connect (split_window_action, "toggled",
-                     G_CALLBACK (toggle_split_window),
-                     de);
-  }
+  g_signal_connect_swapped (get_action_assert (de->builder, "windows_split"), "toggled", G_CALLBACK (toggle_split_window), de);
 
   {
     GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (de->builder, "uimanager1", GTK_TYPE_UI_MANAGER));
 
+    merge_help_menu (uim);
+    
     PSPPIRE_WINDOW (de)->menu =
       GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar/windows/windows_minimise_all")->parent);
   }
 
   {
-    GtkMenu *data_sheet_variable_popup_menu =
-      GTK_MENU (create_data_sheet_variable_popup_menu (de));
+    GtkWidget *data_sheet_cases_popup_menu = get_widget_assert (de->builder,
+                                                               "datasheet-cases-popup");
+
+    GtkWidget *var_sheet_variable_popup_menu = get_widget_assert (de->builder,
+                                                                 "varsheet-variable-popup");
 
-    GtkMenu *var_sheet_variable_popup_menu =
-      GTK_MENU (create_var_sheet_variable_popup_menu (de));
+    GtkWidget *data_sheet_variable_popup_menu = get_widget_assert (de->builder,
+                                                                  "datasheet-variable-popup");
 
-    GtkMenu *data_sheet_cases_popup_menu =
-      GTK_MENU (create_data_sheet_cases_popup_menu (de));
+    g_signal_connect_swapped (get_action_assert (de->builder, "sort-up"), "activate",
+                             G_CALLBACK (psppire_data_editor_sort_ascending),
+                             de->data_editor);
+
+    g_signal_connect_swapped (get_action_assert (de->builder, "sort-down"), "activate",
+                             G_CALLBACK (psppire_data_editor_sort_descending),
+                             de->data_editor);
 
     g_object_set (de->data_editor,
                  "datasheet-column-menu", data_sheet_variable_popup_menu,
@@ -1893,13 +1263,10 @@ psppire_data_window_new (void)
 }
 
 
-
-
-\f
-
 static void
 psppire_data_window_iface_init (PsppireWindowIface *iface)
 {
   iface->save = save_file;
   iface->load = load_file;
 }
+
index cea5134630c8483e095c365e95693b595fddb47e..e4d04a1fa3cfecccdb3468c916dbb636e2543f75 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007  Free Software Foundation
+   Copyright (C) 2007, 2010  Free Software Foundation
 
    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
@@ -305,7 +305,7 @@ configure_event_callback (GtkDialog *dialog,
 
   g_object_get (dialog, "name", &base, NULL);
 
-  psppire_conf_save_window_geometry (conf, base, event);
+  psppire_conf_save_window_geometry (conf, base, GTK_WINDOW (dialog));
 
   return FALSE;
 }
@@ -481,7 +481,7 @@ connect_notify_signal (GtkWidget *w, gpointer data)
 
       while ((col = gtk_tree_view_get_column (tv, i++)))
        {
-         GList *renderers = gtk_tree_view_column_get_cell_renderers (col);
+         GList *renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (col));
          GList *start = renderers;
          while (renderers)
            {
index c82395f2ebdc047e1f8678b9e9d6873df2452207..bc31022a5d7056876007cb9b95a6f1fa1e2fa48a 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
+
+#include "ui/gui/psppire-dict.h"
+
 #include <string.h>
 #include <stdlib.h>
-
 #include <gtk/gtk.h>
-#include <ui/gui/psppire-marshal.h>
-
-#include "psppire-dict.h"
-#include <data/dictionary.h>
-#include <data/missing-values.h>
-#include <data/value-labels.h>
-#include <data/variable.h>
-#include <libpspp/i18n.h>
-
-#include "helper.h"
-#include "message-dialog.h"
 
+#include "data/dictionary.h"
+#include "data/missing-values.h"
+#include "data/value-labels.h"
+#include "data/variable.h"
+#include "libpspp/i18n.h"
+#include "libpspp/message.h"
+#include "ui/gui/helper.h"
+#include "ui/gui/psppire-marshal.h"
+#include "ui/gui/psppire-var-ptr.h"
 
 enum  {
   BACKEND_CHANGED,
@@ -648,7 +648,7 @@ tree_model_column_type (GtkTreeModel *model, gint index)
       return G_TYPE_STRING;
       break;
     case DICT_TVM_COL_VAR:
-      return G_TYPE_POINTER;
+      return PSPPIRE_VAR_PTR_TYPE;
       break;
     default:
       g_return_val_if_reached ((GType)0);
@@ -765,8 +765,8 @@ tree_model_get_value (GtkTreeModel *model, GtkTreeIter *iter,
       }
       break;
     case DICT_TVM_COL_VAR:
-      g_value_init (value, G_TYPE_POINTER);
-      g_value_set_pointer (value, var);
+      g_value_init (value, PSPPIRE_VAR_PTR_TYPE);
+      g_value_set_boxed (value, var);
       break;
     default:
       g_return_if_reached ();
index 243d907826f909a933f1fe8a73478b888da83c5c..4d56eda9052318128e2b6575edfe296b6226dbd8 100644 (file)
@@ -75,7 +75,6 @@ psppire_dict_view_finalize (GObject *object)
 enum
 {
   PROP_0,
-  PROP_MODEL,
   PROP_DICTIONARY,
   PROP_PREDICATE,
   PROP_SELECTION_MODE
@@ -137,11 +136,6 @@ psppire_dict_view_set_property (GObject         *object,
     case PROP_DICTIONARY:
       dict_view->dict = g_value_get_object (value);
       break;
-    case PROP_MODEL:
-      g_critical ("Don't set the \"model\" property on %s. "
-                 "Use the \"dictionary\" property instead.",
-                 G_OBJECT_TYPE_NAME (dict_view));
-      break;
     case PROP_PREDICATE:
       dict_view->predicate = g_value_get_pointer (value);
       break;
@@ -201,45 +195,27 @@ psppire_dict_view_class_init (PsppireDictViewClass *class)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (class);
 
-  GParamSpec *dictionary_spec =
-    g_param_spec_object ("dictionary",
-                        "Dictionary",
-                        _("The dictionary to be displayed by this widget"),
-                        PSPPIRE_TYPE_DICT,
-                        G_PARAM_READABLE | G_PARAM_WRITABLE);
-
   GParamSpec *predicate_spec =
     g_param_spec_pointer ("predicate",
                          "Predicate",
-                         _("A predicate function"),
+                         "A predicate function",
                          G_PARAM_READABLE | G_PARAM_WRITABLE);
 
 
   GParamSpec *selection_mode_spec =
     g_param_spec_enum ("selection-mode",
                       "Selection Mode",
-                      _("How many things can be selected"),
+                      "How many things can be selected",
                       GTK_TYPE_SELECTION_MODE,
                       GTK_SELECTION_MULTIPLE,
                       G_PARAM_CONSTRUCT | G_PARAM_READABLE | G_PARAM_WRITABLE);
 
-
-  GParamSpec *dummy_spec =
-    g_param_spec_pointer ("model",
-                         "Model",
-                         "Don't set the property",
-                         G_PARAM_WRITABLE);
-
   object_class->set_property = psppire_dict_view_set_property;
   object_class->get_property = psppire_dict_view_get_property;
 
-  g_object_class_install_property (object_class,
-                                   PROP_MODEL,
-                                   dummy_spec);
-
-  g_object_class_install_property (object_class,
-                                   PROP_DICTIONARY,
-                                   dictionary_spec);
+  g_object_class_override_property (object_class,
+                                   PROP_DICTIONARY,
+                                   "model");
 
   g_object_class_install_property (object_class,
                                    PROP_PREDICATE,
@@ -271,8 +247,7 @@ psppire_dict_view_base_finalize (PsppireDictViewClass *class,
 
 static void
 dv_get_base_model (GtkTreeModel *top_model, GtkTreeIter *top_iter,
-               GtkTreeModel **model, GtkTreeIter *iter
-               )
+               GtkTreeModel **model, GtkTreeIter *iter)
 {
   *model = top_model;
 
@@ -336,7 +311,7 @@ var_description_cell_data_func (GtkTreeViewColumn *col,
 
   if ( var_has_label (var) && dv->prefer_labels)
     {
-      gchar *text = g_strdup_printf (
+      gchar *text = g_markup_printf_escaped (
                                     "<span stretch=\"condensed\">%s</span>",
                                     var_get_label (var));
 
index b0eff950c7e5e6b466b70edda79e9faf40702a8b..6d1cd46ca0085c82ad5f7f4715c7bc914b92990b 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
+   Copyright (C) 2008, 2009, 2010  Free Software Foundation
 
    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
 #include <gtk/gtkbox.h>
 #include "helper.h"
 
+#include <libpspp/cast.h>
 #include <libpspp/message.h>
+#include <libpspp/string-map.h>
+#include <output/cairo.h>
+#include <output/chart-item.h>
+#include <output/driver-provider.h>
+#include <output/output-item.h>
+#include <output/table-item.h>
+#include <output/text-item.h>
+#include <output/tab.h>
 #include <stdlib.h>
 
-#include "about.h"
+#include "help-menu.h"
 
 #include "psppire-output-window.h"
 
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
-
+enum
+  {
+    COL_TITLE,                  /* Table title. */
+    COL_Y,                      /* Y position of top of title. */
+    N_COLS
+  };
 
 static void psppire_output_window_base_finalize (PsppireOutputWindowClass *, gpointer);
 static void psppire_output_window_base_init     (PsppireOutputWindowClass *class);
@@ -84,10 +98,31 @@ psppire_output_window_finalize (GObject *object)
 }
 
 
+static void
+psppire_output_window_dispose (GObject *obj)
+{
+  PsppireOutputWindow *viewer = PSPPIRE_OUTPUT_WINDOW (obj);
+  size_t i;
+
+  for (i = 0; i < viewer->n_items; i++)
+    output_item_unref (viewer->items[i]);
+  free (viewer->items);
+  viewer->items = NULL;
+  viewer->n_items = viewer->allocated_items = 0;
+
+  g_object_unref (viewer->print_settings);
+
+  /* Chain up to the parent class */
+  G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
 static void
 psppire_output_window_class_init (PsppireOutputWindowClass *class)
 {
+  GObjectClass *object_class = G_OBJECT_CLASS (class);
+
   parent_class = g_type_class_peek_parent (class);
+  object_class->dispose = psppire_output_window_dispose;
 }
 
 
@@ -106,13 +141,220 @@ psppire_output_window_base_finalize (PsppireOutputWindowClass *class,
                                     gpointer class_data)
 {
 }
+\f
+/* Output driver class. */
 
+struct psppire_output_driver
+  {
+    struct output_driver driver;
+    PsppireOutputWindow *viewer;
+    struct xr_driver *xr;
+  };
 
-\f
+static struct output_driver_class psppire_output_class;
+
+static struct psppire_output_driver *
+psppire_output_cast (struct output_driver *driver)
+{
+  assert (driver->class == &psppire_output_class);
+  return UP_CAST (driver, struct psppire_output_driver, driver);
+}
+
+static gboolean
+expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
+{
+  struct xr_rendering *r = g_object_get_data (G_OBJECT (widget), "rendering");
+  cairo_t *cr;
+
+  cr = gdk_cairo_create (widget->window);
+  xr_rendering_draw (r, cr);
+  cairo_destroy (cr);
 
-static PsppireOutputWindow *the_output_viewer = NULL;
+  return TRUE;
+}
 
+static void
+psppire_output_submit (struct output_driver *this,
+                       const struct output_item *item)
+{
+  struct psppire_output_driver *pod = psppire_output_cast (this);
+  PsppireOutputWindow *viewer;
+  GtkWidget *drawing_area;
+  struct xr_rendering *r;
+  struct string title;
+  GtkTreeStore *store;
+  GtkTreePath *path;
+  GtkTreeIter iter;
+  cairo_t *cr;
+  int tw, th;
+
+  if (pod->viewer == NULL)
+    {
+      pod->viewer = PSPPIRE_OUTPUT_WINDOW (psppire_output_window_new ());
+      gtk_widget_show_all (GTK_WIDGET (pod->viewer));
+      pod->viewer->driver = pod;
+    }
+  viewer = pod->viewer;
+
+  if (viewer->n_items >= viewer->allocated_items)
+    viewer->items = x2nrealloc (viewer->items, &viewer->allocated_items,
+                                sizeof *viewer->items);
+  viewer->items[viewer->n_items++] = output_item_ref (item);
+
+  if (is_text_item (item))
+    {
+      const struct text_item *text_item = to_text_item (item);
+      enum text_item_type type = text_item_get_type (text_item);
+      const char *text = text_item_get_text (text_item);
+
+      if (type == TEXT_ITEM_COMMAND_CLOSE)
+        {
+          viewer->in_command = false;
+          return;
+        }
+      else if (text[0] == '\0')
+        return;
+    }
 
+  cr = gdk_cairo_create (GTK_WIDGET (pod->viewer)->window);
+  if (pod->xr == NULL)
+    {
+      const GtkStyle *style = gtk_widget_get_style (GTK_WIDGET (viewer));
+      struct string_map options = STRING_MAP_INITIALIZER (options);
+      PangoFontDescription *font_desc;
+      char *font_name;
+
+      /* Use GTK+ default font as proportional font. */
+      font_name = pango_font_description_to_string (style->font_desc);
+      string_map_insert (&options, "prop-font", font_name);
+      g_free (font_name);
+
+      /* Derived emphasized font from proportional font. */
+      font_desc = pango_font_description_copy (style->font_desc);
+      pango_font_description_set_style (font_desc, PANGO_STYLE_ITALIC);
+      font_name = pango_font_description_to_string (font_desc);
+      string_map_insert (&options, "emph-font", font_name);
+      g_free (font_name);
+      pango_font_description_free (font_desc);
+
+      /* Pretend that the "page" has a reasonable width and a very big length,
+         so that most tables can be conveniently viewed on-screen with vertical
+         scrolling only.  (The length should not be increased very much because
+         it is already close enough to INT_MAX when expressed as thousands of a
+         point.) */
+      string_map_insert (&options, "paper-size", "300x200000mm");
+      string_map_insert (&options, "headers", "off");
+      string_map_insert (&options, "left-margin", "0");
+      string_map_insert (&options, "right-margin", "0");
+      string_map_insert (&options, "top-margin", "0");
+      string_map_insert (&options, "bottom-margin", "0");
+
+      pod->xr = xr_driver_create (cr, &options);
+
+      string_map_destroy (&options);
+    }
+
+  r = xr_rendering_create (pod->xr, item, cr);
+  if (r == NULL)
+    goto done;
+
+  xr_rendering_measure (r, &tw, &th);
+
+  drawing_area = gtk_drawing_area_new ();
+  gtk_widget_modify_bg (
+    GTK_WIDGET (drawing_area), GTK_STATE_NORMAL,
+    &gtk_widget_get_style (drawing_area)->base[GTK_STATE_NORMAL]);
+  g_object_set_data (G_OBJECT (drawing_area), "rendering", r);
+  gtk_widget_set_size_request (drawing_area, tw, th);
+  gtk_layout_put (pod->viewer->output, drawing_area, 0, pod->viewer->y);
+  gtk_widget_show (drawing_area);
+  g_signal_connect (G_OBJECT (drawing_area), "expose_event",
+                     G_CALLBACK (expose_event_callback), NULL);
+
+  if (!is_text_item (item)
+      || text_item_get_type (to_text_item (item)) != TEXT_ITEM_SYNTAX
+      || !viewer->in_command)
+    {
+      store = GTK_TREE_STORE (gtk_tree_view_get_model (viewer->overview));
+
+      ds_init_empty (&title);
+      if (is_text_item (item)
+          && text_item_get_type (to_text_item (item)) == TEXT_ITEM_COMMAND_OPEN)
+        {
+          gtk_tree_store_append (store, &iter, NULL);
+          viewer->cur_command = iter; /* XXX shouldn't save a GtkTreeIter */
+          viewer->in_command = true;
+        }
+      else
+        {
+          GtkTreeIter *p = viewer->in_command ? &viewer->cur_command : NULL;
+          gtk_tree_store_append (store, &iter, p);
+        }
+
+      ds_clear (&title);
+      if (is_text_item (item))
+        ds_put_cstr (&title, text_item_get_text (to_text_item (item)));
+      else if (is_table_item (item))
+        {
+          const char *caption = table_item_get_caption (to_table_item (item));
+          if (caption != NULL)
+            ds_put_format (&title, "Table: %s", caption);
+          else
+            ds_put_cstr (&title, "Table");
+        }
+      else if (is_chart_item (item))
+        {
+          const char *s = chart_item_get_title (to_chart_item (item));
+          if (s != NULL)
+            ds_put_format (&title, "Chart: %s", s);
+          else
+            ds_put_cstr (&title, "Chart");
+        }
+      gtk_tree_store_set (store, &iter,
+                          COL_TITLE, ds_cstr (&title),
+                          COL_Y, viewer->y,
+                          -1);
+      ds_destroy (&title);
+
+      path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
+      gtk_tree_view_expand_row (viewer->overview, path, TRUE);
+      gtk_tree_path_free (path);
+    }
+
+  if (pod->viewer->max_width < tw)
+    pod->viewer->max_width = tw;
+  pod->viewer->y += th;
+
+  gtk_layout_set_size (pod->viewer->output,
+                       pod->viewer->max_width, pod->viewer->y);
+
+  gtk_window_set_urgency_hint (GTK_WINDOW (pod->viewer), TRUE);
+
+done:
+  cairo_destroy (cr);
+}
+
+static struct output_driver_class psppire_output_class =
+  {
+    "PSPPIRE",                  /* name */
+    NULL,                       /* destroy */
+    psppire_output_submit,      /* submit */
+    NULL,                       /* flush */
+  };
+
+void
+psppire_output_window_setup (void)
+{
+  struct psppire_output_driver *pod;
+  struct output_driver *d;
+
+  pod = xzalloc (sizeof *pod);
+  d = &pod->driver;
+  output_driver_init (d, &psppire_output_class, "PSPPIRE",
+                      SETTINGS_DEVICE_UNFILTERED);
+  output_driver_register (d);
+}
+\f
 int viewer_length = 16;
 int viewer_width = 59;
 
@@ -125,9 +367,7 @@ on_delete (GtkWidget *w, GdkEvent *event, gpointer user_data)
 
   gtk_widget_destroy (GTK_WIDGET (ow));
 
-  the_output_viewer = NULL;
-
-  unlink (output_file_name());
+  ow->driver->viewer = NULL;
 
   return FALSE;
 }
@@ -139,109 +379,197 @@ cancel_urgency (GtkWindow *window,  gpointer data)
 {
   gtk_window_set_urgency_hint (window, FALSE);
 }
-/* Sets width and length according to the new size
-   of the output window */
+
 static void
-on_textview_resize (GtkWidget     *widget,
-                   GtkAllocation *allocation,
-                   gpointer       user_data)
+on_row_activate (GtkTreeView *overview,
+                 GtkTreePath *path,
+                 GtkTreeViewColumn *column,
+                 PsppireOutputWindow *window)
 {
-  PangoContext * context ;
-  PangoLayout *layout ;
-  PangoRectangle logical;
-  GtkStyle *style;
-  gint right_margin, left_margin;
-  GtkTextView *text_view = GTK_TEXT_VIEW (widget);
-
-  context = gtk_widget_create_pango_context (widget);
-  layout = pango_layout_new (context);
-
-  style = gtk_widget_get_style (widget);
+  GtkTreeModel *model;
+  GtkTreeIter iter;
+  GtkAdjustment *vadj;
+  GValue value = {0};
+  double y, min, max;
+
+  model = gtk_tree_view_get_model (overview);
+  if (!gtk_tree_model_get_iter (model, &iter, path))
+    return;
+
+  gtk_tree_model_get_value (model, &iter, COL_Y, &value);
+  y = g_value_get_long (&value);
+  g_value_unset (&value);
+
+  vadj = gtk_layout_get_vadjustment (window->output);
+  min = vadj->lower;
+  max = vadj->upper - vadj->page_size;
+  if (y < min)
+    y = min;
+  else if (y > max)
+    y = max;
+  gtk_adjustment_set_value (vadj, y);
+}
 
-  pango_layout_set_font_description (layout, style->font_desc);
+static void psppire_output_window_print (PsppireOutputWindow *window);
 
-  /* Find the width of one character.  We can use any character, because
-     the textview has a monospaced font */
-  pango_layout_set_text (layout, "M", 1);
 
-  pango_layout_get_extents (layout,  NULL, &logical);
+static GtkFileFilter *
+add_filter (GtkFileChooser *chooser, const char *name, const char *pattern)
+{
+  GtkFileFilter *filter = gtk_file_filter_new ();
+  g_object_ref_sink (G_OBJECT (filter));
+  gtk_file_filter_set_name (filter, name);
+  gtk_file_filter_add_pattern (filter, pattern);
+  gtk_file_chooser_add_filter (chooser, filter);
+  return filter;
+}
 
-  left_margin = gtk_text_view_get_left_margin (text_view);
-  right_margin = gtk_text_view_get_right_margin (text_view);
+static void
+export_output (PsppireOutputWindow *window, struct string_map *options,
+               const char *format)
+{
+  struct output_driver *driver;
+  size_t i;
 
-  viewer_length = allocation->height / PANGO_PIXELS (logical.height);
-  viewer_width = (allocation->width - right_margin - left_margin)
-    / PANGO_PIXELS (logical.width);
+  string_map_insert (options, "format", format);
+  driver = output_driver_create (options);
+  if (driver == NULL)
+    return;
 
-  g_object_unref (G_OBJECT (layout));
-  g_object_unref (G_OBJECT (context));
+  for (i = 0; i < window->n_items; i++)
+    driver->class->submit (driver, window->items[i]);
+  output_driver_destroy (driver);
 }
 
-
 static void
-psppire_output_window_init (PsppireOutputWindow *window)
+psppire_output_window_export (PsppireOutputWindow *window)
 {
-  GtkBuilder *xml = builder_new ("output-viewer.ui");
-
-  GtkWidget *box = gtk_vbox_new (FALSE, 0);
+  gint response;
+
+  GtkFileFilter *pdf_filter;
+  GtkFileFilter *html_filter;
+  GtkFileFilter *odt_filter;
+  GtkFileFilter *txt_filter;
+  GtkFileFilter *ps_filter;
+  GtkFileFilter *csv_filter;
+  GtkFileChooser *chooser;
+  GtkWidget *dialog;
+
+  dialog = gtk_file_chooser_dialog_new (_("Export Output"),
+                                        GTK_WINDOW (window),
+                                        GTK_FILE_CHOOSER_ACTION_SAVE,
+                                        GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                                        GTK_STOCK_SAVE,   GTK_RESPONSE_ACCEPT,
+                                        NULL);
+  chooser = GTK_FILE_CHOOSER (dialog);
+
+  pdf_filter = add_filter (chooser, _("PDF Files (*.pdf)"), "*.pdf");
+  html_filter = add_filter (chooser, _("HTML Files (*.html)"), "*.html");
+  odt_filter = add_filter (chooser, _("OpenDocument Files (*.odt)"), "*.odt");
+  txt_filter = add_filter (chooser, _("Text Files (*.txt)"), "*.txt");
+  ps_filter = add_filter (chooser, _("PostScript Files (*.ps)"), "*.ps");
+  csv_filter = add_filter (chooser, _("Comma-Separated Value Files (*.csv)"),
+                           "*.csv");
+
+  gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE);
+  gtk_file_chooser_set_filter (chooser, pdf_filter);
+
+  response = gtk_dialog_run (GTK_DIALOG (dialog));
+
+  if ( response == GTK_RESPONSE_ACCEPT )
+    {
+      char *filename = gtk_file_chooser_get_filename (chooser);
+      GtkFileFilter *filter = gtk_file_chooser_get_filter (chooser);
+      struct string_map options;
+
+      g_return_if_fail (filename);
+      g_return_if_fail (filter);
+
+      string_map_init (&options);
+      string_map_insert (&options, "output-file", filename);
+      if (filter == pdf_filter)
+        {
+          export_output (window, &options, "pdf");
+        }
+      else if (filter == html_filter)
+        export_output (window, &options, "html");
+      else if (filter == odt_filter)
+        export_output (window, &options, "odt");
+      else if (filter == txt_filter)
+        {
+          string_map_insert (&options, "headers", "false");
+          string_map_insert (&options, "paginate", "false");
+          string_map_insert (&options, "squeeze", "true");
+          string_map_insert (&options, "emphasis", "none");
+          string_map_insert (&options, "charts", "none");
+          string_map_insert (&options, "top-margin", "0");
+          string_map_insert (&options, "bottom-margin", "0");
+          export_output (window, &options, "txt");
+        }
+      else if (filter == ps_filter)
+        export_output (window, &options, "ps");
+      else if (filter == csv_filter)
+        export_output (window, &options, "csv");
+      else
+        g_return_if_reached ();
+
+      free (filename);
+    }
 
-  GtkWidget *sw = get_widget_assert (xml, "scrolledwindow1");
+  g_object_unref (G_OBJECT (pdf_filter));
+  g_object_unref (G_OBJECT (html_filter));
+  g_object_unref (G_OBJECT (txt_filter));
+  g_object_unref (G_OBJECT (ps_filter));
+  g_object_unref (G_OBJECT (csv_filter));
 
-  GtkWidget *menubar = get_widget_assert (xml, "menubar1");
+  gtk_widget_destroy (dialog);
+}
 
-  window->textview = get_widget_assert (xml, "output-viewer-textview");
+static void
+psppire_output_window_init (PsppireOutputWindow *window)
+{
+  GtkTreeViewColumn *column;
+  GtkCellRenderer *renderer;
+  GtkBuilder *xml;
 
+  xml = builder_new ("output-viewer.ui");
 
-  gtk_container_add (GTK_CONTAINER (window), box);
+  gtk_widget_reparent (get_widget_assert (xml, "vbox1"), GTK_WIDGET (window));
 
+  window->output = GTK_LAYOUT (get_widget_assert (xml, "output"));
+  window->y = 0;
 
-  g_object_ref (menubar);
-  gtk_widget_unparent (menubar);
+  window->overview = GTK_TREE_VIEW (get_widget_assert (xml, "overview"));
+  gtk_tree_view_set_model (window->overview,
+                           GTK_TREE_MODEL (gtk_tree_store_new (
+                                             N_COLS,
+                                             G_TYPE_STRING, /* COL_TITLE */
+                                             G_TYPE_LONG))); /* COL_Y */
 
-  g_object_ref (sw);
-  gtk_widget_unparent (sw);
+  window->in_command = false;
 
+  window->items = NULL;
+  window->n_items = window->allocated_items = 0;
 
-  gtk_box_pack_start (GTK_BOX (box), menubar, FALSE, TRUE, 0);
-  gtk_box_pack_start (GTK_BOX (box), sw, TRUE, TRUE, 0);
+  column = gtk_tree_view_column_new ();
+  gtk_tree_view_append_column (GTK_TREE_VIEW (window->overview), column);
+  renderer = gtk_cell_renderer_text_new ();
+  gtk_tree_view_column_pack_start (column, renderer, TRUE);
+  gtk_tree_view_column_add_attribute (column, renderer, "text", COL_TITLE);
 
+  g_signal_connect (GTK_TREE_VIEW (window->overview),
+                    "row-activated", G_CALLBACK (on_row_activate), window);
 
-  gtk_widget_show_all (box);
+  gtk_widget_modify_bg (GTK_WIDGET (window->output), GTK_STATE_NORMAL,
+                        &gtk_widget_get_style (GTK_WIDGET (window->output))->base[GTK_STATE_NORMAL]);
 
   connect_help (xml);
 
-  window->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (window->textview));
-
   g_signal_connect (window,
                    "focus-in-event",
                    G_CALLBACK (cancel_urgency),
                    NULL);
 
-  {
-    /* Output uses ascii characters for tabular material.
-       So we need a monospaced font otherwise it'll look silly */
-    PangoFontDescription *font_desc =
-      pango_font_description_from_string ("monospace");
-
-    gtk_widget_modify_font (window->textview, font_desc);
-    pango_font_description_free (font_desc);
-  }
-
-  g_signal_connect (window->textview, "size-allocate",
-                   G_CALLBACK (on_textview_resize), NULL);
-
-  window->fp = NULL;
-
-  g_signal_connect (get_action_assert (xml,"help_about"),
-                   "activate",
-                   G_CALLBACK (about_new),
-                   window);
-
-  g_signal_connect (get_action_assert (xml,"help_reference"),
-                   "activate",
-                   G_CALLBACK (reference_manual),
-                   NULL);
-
   g_signal_connect (get_action_assert (xml,"windows_minimise-all"),
                    "activate",
                    G_CALLBACK (psppire_window_minimise_all),
@@ -249,11 +577,19 @@ psppire_output_window_init (PsppireOutputWindow *window)
 
   {
     GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (xml, "uimanager1", GTK_TYPE_UI_MANAGER));
+    merge_help_menu (uim);
 
     PSPPIRE_WINDOW (window)->menu =
-      GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar1/windows_menuitem/windows_minimise-all")->parent);
+      GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar/windows_menuitem/windows_minimise-all")->parent);
   }
 
+  g_signal_connect_swapped (get_action_assert (xml, "file_export"), "activate",
+                            G_CALLBACK (psppire_output_window_export), window);
+
+
+  g_signal_connect_swapped (get_action_assert (xml, "file_print"), "activate",
+                            G_CALLBACK (psppire_output_window_print), window);
+
   g_object_unref (xml);
 
   g_signal_connect (window, "delete-event",
@@ -270,107 +606,130 @@ psppire_output_window_new (void)
                                   NULL));
 }
 
-static void reload_viewer (PsppireOutputWindow *ow);
 
-void
-psppire_output_window_reload (void)
+\f
+static void
+create_xr_print_driver (GtkPrintContext *context, PsppireOutputWindow *window)
 {
-  struct stat buf;
-
-  /* If there is no output, then don't do anything */
-  if (0 != stat (output_file_name(), &buf))
-    return ;
+  struct string_map options;
+  GtkPageSetup *page_setup;
+  double width, height;
+  double left_margin;
+  double right_margin;
+  double top_margin;
+  double bottom_margin;
+
+  page_setup = gtk_print_context_get_page_setup (context);
+  width = gtk_page_setup_get_paper_width (page_setup, GTK_UNIT_MM);
+  height = gtk_page_setup_get_paper_height (page_setup, GTK_UNIT_MM);
+  left_margin = gtk_page_setup_get_left_margin (page_setup, GTK_UNIT_MM);
+  right_margin = gtk_page_setup_get_right_margin (page_setup, GTK_UNIT_MM);
+  top_margin = gtk_page_setup_get_top_margin (page_setup, GTK_UNIT_MM);
+  bottom_margin = gtk_page_setup_get_bottom_margin (page_setup, GTK_UNIT_MM);
+
+  string_map_init (&options);
+  string_map_insert_nocopy (&options, xstrdup ("paper-size"),
+                            xasprintf("%.2fx%.2fmm", width, height));
+  string_map_insert_nocopy (&options, xstrdup ("left-margin"),
+                            xasprintf ("%.2fmm", left_margin));
+  string_map_insert_nocopy (&options, xstrdup ("right-margin"),
+                            xasprintf ("%.2fmm", right_margin));
+  string_map_insert_nocopy (&options, xstrdup ("top-margin"),
+                            xasprintf ("%.2fmm", top_margin));
+  string_map_insert_nocopy (&options, xstrdup ("bottom-margin"),
+                            xasprintf ("%.2fmm", bottom_margin));
+
+  window->print_xrd =
+    xr_driver_create (gtk_print_context_get_cairo_context (context), &options);
+
+  string_map_destroy (&options);
+}
 
-  if ( NULL == the_output_viewer )
+static gboolean
+paginate (GtkPrintOperation *operation,
+         GtkPrintContext   *context,
+         PsppireOutputWindow *window)
+{
+  if ( window->print_item < window->n_items )
     {
-      the_output_viewer = PSPPIRE_OUTPUT_WINDOW (psppire_output_window_new ());
-      gtk_widget_show (GTK_WIDGET (the_output_viewer));
+      xr_driver_output_item (window->print_xrd, window->items[window->print_item++]);
+      if (xr_driver_need_new_page (window->print_xrd))
+       {
+         xr_driver_next_page (window->print_xrd, NULL);
+         window->print_n_pages ++;
+       }
+      return FALSE;
+    }
+  else
+    {
+      gtk_print_operation_set_n_pages (operation, window->print_n_pages);
+      window->print_item = 0;
+      create_xr_print_driver (context, window);
+      return TRUE;
     }
-
-  reload_viewer (the_output_viewer);
-
 }
 
-
 static void
-reload_viewer (PsppireOutputWindow *ow)
+begin_print (GtkPrintOperation *operation,
+            GtkPrintContext   *context,
+            PsppireOutputWindow *window)
 {
-  GtkTextIter end_iter;
-  GtkTextMark *mark ;
+  create_xr_print_driver (context, window);
 
-  char *line = NULL;
+  window->print_item = 0;
+  window->print_n_pages = 1;
+}
 
-  gboolean chars_inserted = FALSE;
+static void
+end_print (GtkPrintOperation *operation,
+          GtkPrintContext   *context,
+          PsppireOutputWindow *window)
+{
+  xr_driver_destroy (window->print_xrd);
+}
 
-  gtk_text_buffer_get_end_iter (ow->buffer, &end_iter);
 
-  line = xrealloc (line, sizeof (char) * (viewer_width + 1));
+static void
+draw_page (GtkPrintOperation *operation,
+          GtkPrintContext   *context,
+          gint               page_number,
+          PsppireOutputWindow *window)
+{
+  xr_driver_next_page (window->print_xrd, gtk_print_context_get_cairo_context (context));
+  while ( window->print_item < window->n_items)
+    {
+      xr_driver_output_item (window->print_xrd, window->items [window->print_item++]);
+      if ( xr_driver_need_new_page (window->print_xrd) )
+         break;          
+    }
+}
 
-  mark = gtk_text_buffer_create_mark (ow->buffer, NULL, &end_iter, TRUE);
 
-#ifdef __CYGWIN__
-  /*
-    Apparently Windoze is not capabale of writing to a file whilst
-    another (or the same) process is reading from it.   Therefore, we
-    must close the file after reading it, and clear the entire buffer
-    before writing to it.
-    This will be slower for large buffers, but should work
-    (in so far as anything ever works on windows).
-  */
-  {
-    GtkTextIter start_iter;
-    FILE *fp = fopen (output_file_name(), "r");
-    if ( !fp)
-      {
-       g_critical ("Cannot open %s\n", output_file_name());
-       return;
-      }
-
-    /* Delete all the entire buffer */
-    gtk_text_buffer_get_start_iter (ow->buffer, &start_iter);
-    gtk_text_buffer_delete (ow->buffer, &start_iter, &end_iter);
+static void
+psppire_output_window_print (PsppireOutputWindow *window)
+{
+  GtkPrintOperationResult res;
 
+  GtkPrintOperation *print = gtk_print_operation_new ();
 
-    gtk_text_buffer_get_start_iter (ow->buffer, &start_iter);
-    /* Read in the next lot of text */
-    while (fgets (line, viewer_width + 1, fp) != NULL)
-      {
-       chars_inserted = TRUE;
-       gtk_text_buffer_insert (ow->buffer, &start_iter, line, -1);
-      }
+  if (window->print_settings != NULL) 
+    gtk_print_operation_set_print_settings (print, window->print_settings);
 
-    fclose (fp);
-  }
-#else
-  {
-    if ( ow->fp == NULL)
-      {
-       ow->fp = fopen (output_file_name(), "r");
-       if ( ow->fp == NULL)
-         {
-           g_critical ("Cannot open %s\n", output_file_name());
-           return;
-         }
-      }
-
-    /* Read in the next lot of text */
-    while (fgets (line, viewer_width + 1, ow->fp) != NULL)
-      {
-       chars_inserted = TRUE;
-       gtk_text_buffer_insert (ow->buffer, &end_iter, line, -1);
-      }
-  }
-#endif
+  g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), window);
+  g_signal_connect (print, "end_print", G_CALLBACK (end_print),     window);
+  g_signal_connect (print, "paginate", G_CALLBACK (paginate),       window);
+  g_signal_connect (print, "draw_page", G_CALLBACK (draw_page),     window);
 
-  /* Scroll to where the start of this lot of text begins */
-  gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW (ow->textview),
-                               mark,
-                               0.1, TRUE, 0.0, 0.0);
+  res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+                                 GTK_WINDOW (window), NULL);
 
+  if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
+    {
+      if (window->print_settings != NULL)
+        g_object_unref (window->print_settings);
+      window->print_settings = g_object_ref (gtk_print_operation_get_print_settings (print));
+      
+    }
 
-  if ( chars_inserted )
-    gtk_window_set_urgency_hint ( GTK_WINDOW (ow), TRUE);
+  g_object_unref (print);
 }
-
-
-
index d11eca618d84c9c18c86e5dc7bd184b6f9771a75..c242e732881f4076e179da6a618b1b04352f463b 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
+   Copyright (C) 2008, 2009  Free Software Foundation
 
    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
@@ -31,10 +31,6 @@ extern int viewer_length;
 extern int viewer_width ;
 
 
-#define OUTPUT_FILE_NAME "psppire.txt"
-
-
-
 G_BEGIN_DECLS
 
 #define PSPPIRE_OUTPUT_WINDOW_TYPE            (psppire_output_window_get_type ())
@@ -56,9 +52,23 @@ struct _PsppireOutputWindow
   PsppireWindow parent;
 
   /* <private> */
-  GtkTextBuffer *buffer;  /* The buffer which contains the text */
-  GtkWidget *textview ;
-  FILE *fp;               /* The file it's viewing */
+  struct psppire_output_driver *driver;
+  GtkLayout *output;
+  int max_width;
+  int y;
+
+  GtkTreeView *overview;
+  GtkTreeIter cur_command;
+  bool in_command;
+
+  struct output_item **items;
+  size_t n_items, allocated_items;
+
+  /* Variables pertaining to printing */
+  GtkPrintSettings *print_settings;
+  struct xr_driver *print_xrd;
+  int print_item;
+  int print_n_pages;
 };
 
 struct _PsppireOutputWindowClass
@@ -70,9 +80,7 @@ struct _PsppireOutputWindowClass
 GType      psppire_output_window_get_type        (void);
 GtkWidget* psppire_output_window_new             (void);
 
-
-void psppire_output_window_reload (void);
-
+void psppire_output_window_setup (void);
 
 G_END_DECLS
 
diff --git a/src/ui/gui/psppire-select-dest.c b/src/ui/gui/psppire-select-dest.c
new file mode 100644 (file)
index 0000000..c46abce
--- /dev/null
@@ -0,0 +1,57 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+#include "psppire-select-dest.h"
+#include <gtk/gtkwidget.h>
+
+GType
+psppire_select_dest_widget_get_type (void)
+{
+  static GType dest_widget_type = 0;
+
+  if (! dest_widget_type)
+    {
+      const GTypeInfo dest_widget_info =
+      {
+        sizeof (PsppireSelectDestWidgetIface), /* class_size */
+       NULL,           /* base_init */
+       NULL,           /* base_finalize */
+       NULL,
+       NULL,           /* class_finalize */
+       NULL,           /* class_data */
+       0,
+       0,              /* n_preallocs */
+       NULL
+      };
+
+      dest_widget_type =
+       g_type_register_static (G_TYPE_INTERFACE, "PsppireSelectDestWidget",
+                               &dest_widget_info, 0);
+
+      g_type_interface_add_prerequisite (dest_widget_type, GTK_TYPE_WIDGET);
+    }
+
+  return dest_widget_type;
+}
+
+
+gboolean
+psppire_select_dest_widget_contains_var (PsppireSelectDestWidget *sdm, const GValue *value)
+{
+  return PSPPIRE_SELECT_DEST_GET_IFACE (sdm)->contains_var (sdm, value);
+}
diff --git a/src/ui/gui/psppire-select-dest.h b/src/ui/gui/psppire-select-dest.h
new file mode 100644 (file)
index 0000000..74f0165
--- /dev/null
@@ -0,0 +1,49 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __PSPPIRE_SELECT_DEST_H__
+#define __PSPPIRE_SELECT_DEST_H__
+
+#include <glib-object.h>
+
+GType              psppire_select_dest_widget_get_type   (void) G_GNUC_CONST;
+
+#define PSPPIRE_TYPE_SELECT_DEST_WIDGET      (psppire_select_dest_widget_get_type ())
+#define PSPPIRE_SELECT_DEST_WIDGET(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_TYPE_SELECT_DEST_WIDGET, PsppireSelectDestWidget))
+#define PSPPIRE_IS_SELECT_DEST_WIDGET(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_SELECT_DEST_WIDGET))
+
+
+#define PSPPIRE_SELECT_DEST_GET_IFACE(obj) \
+   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PSPPIRE_TYPE_SELECT_DEST_WIDGET, PsppireSelectDestWidgetIface))
+
+typedef struct _PsppireSelectDestWidgetIface  PsppireSelectDestWidgetIface;
+
+
+typedef struct _PsppireSelectDestWidget  PsppireSelectDestWidget;  /* Dummy typedef */
+
+struct _PsppireSelectDestWidgetIface
+{
+  GTypeInterface g_iface;
+
+  /* Return TRUE iff DEST contains V */
+  gboolean (*contains_var) (PsppireSelectDestWidget *dest, const GValue *v);
+};
+
+
+gboolean psppire_select_dest_widget_contains_var (PsppireSelectDestWidget *m, const GValue *v);
+
+#endif
index d6ea3375257186d0566aa8a7706da717030db17c..83fe2d82792a04fb34425b3f0f5a221dde2238fb 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007  Free Software Foundation
+   Copyright (C) 2007, 2009 Free Software Foundation
 
    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
@@ -12,7 +12,8 @@
    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, see <http://www.gnu.org/licenses/>. */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
 /*
   This module provides a widget, PsppireSelector derived from
 
 #include <config.h>
 
+#include "psppire-dictview.h"
+#include "psppire-var-view.h"
+#include "psppire-dict.h"
+#include "psppire-select-dest.h"
+
 #include <gtk/gtksignal.h>
 #include <gtk/gtkbutton.h>
 #include <gtk/gtkentry.h>
@@ -112,22 +118,50 @@ psppire_selector_get_type (void)
   return psppire_selector_type;
 }
 
+static GObjectClass * parent_class = NULL;
 
 static void
-psppire_selector_finalize (GObject *object)
+psppire_selector_finalize (GObject *obj)
 {
+   /* Chain up to the parent class */
+   G_OBJECT_CLASS (parent_class)->finalize (obj);
 }
 
+
+static void
+psppire_selector_dispose (GObject *obj)
+{
+  PsppireSelector *sel = PSPPIRE_SELECTOR (obj);
+
+  if (sel->dispose_has_run)
+    return;
+
+  /* Make sure dispose does not run twice. */
+  sel->dispose_has_run = TRUE;
+
+  g_object_unref (sel->dest);
+  g_object_unref (sel->source);
+
+  /* Chain up to the parent class */
+  G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
+
 /* Properties */
 enum
 {
   PROP_0,
-  PROP_ORIENTATION
+  PROP_ORIENTATION,
+  PROP_PRIMARY,
+  PROP_SOURCE_WIDGET,
+  PROP_DEST_WIDGET
 };
 
 
 static void on_activate (PsppireSelector *selector, gpointer data);
 
+static void update_subjects (PsppireSelector *selector);
+
 
 static void
 psppire_selector_set_property (GObject         *object,
@@ -143,6 +177,18 @@ psppire_selector_set_property (GObject         *object,
       selector->orientation = g_value_get_enum (value);
       set_direction (selector, selector->direction);
       break;
+    case PROP_PRIMARY:
+      selector->primary_requested = TRUE;
+      update_subjects (selector);
+      break;
+    case PROP_SOURCE_WIDGET:
+      selector->source = g_value_dup_object (value);
+      update_subjects (selector);
+      break;
+    case PROP_DEST_WIDGET:
+      selector->dest = g_value_dup_object (value);
+      update_subjects (selector);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -163,14 +209,18 @@ psppire_selector_get_property (GObject         *object,
     case PROP_ORIENTATION:
       g_value_set_enum (value, selector->orientation);
       break;
+    case PROP_SOURCE_WIDGET:
+      g_value_take_object (value, selector->source);
+      break;
+    case PROP_DEST_WIDGET:
+      g_value_take_object (value, selector->dest);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
     };
 }
 
-
-
 static void
 psppire_selector_class_init (PsppireSelectorClass *class)
 {
@@ -184,6 +234,29 @@ psppire_selector_class_init (PsppireSelectorClass *class)
                       G_PARAM_CONSTRUCT_ONLY |G_PARAM_READWRITE);
 
 
+ /* Meaningfull only if more than one selector shares this selectors source */
+  GParamSpec *primary_spec =
+    g_param_spec_boolean ("primary",
+                         "Primary",
+                         "Whether this selector should be the primary selector for the source",
+                         FALSE,
+                         G_PARAM_READWRITE);
+
+  GParamSpec *source_widget_spec = 
+    g_param_spec_object ("source-widget",
+                        "Source Widget",
+                        "The widget to be used as the source for this selector",
+                        GTK_TYPE_WIDGET,
+                        G_PARAM_READWRITE);
+
+  GParamSpec *dest_widget_spec = 
+    g_param_spec_object ("dest-widget",
+                        "Destination Widget",
+                        "The widget to be used as the destination for this selector",
+                        GTK_TYPE_WIDGET,
+                        G_PARAM_READWRITE);
+
+
   object_class->set_property = psppire_selector_set_property;
   object_class->get_property = psppire_selector_get_property;
 
@@ -191,6 +264,20 @@ psppire_selector_class_init (PsppireSelectorClass *class)
                                    PROP_ORIENTATION,
                                    orientation_spec);
 
+  g_object_class_install_property (object_class,
+                                   PROP_PRIMARY,
+                                   primary_spec);
+
+  g_object_class_install_property (object_class,
+                                   PROP_SOURCE_WIDGET,
+                                   source_widget_spec);
+
+  g_object_class_install_property (object_class,
+                                   PROP_DEST_WIDGET,
+                                   dest_widget_spec);
+
+  parent_class = g_type_class_peek_parent (class);
+
   signals [SELECTED] =
     g_signal_new ("selected",
                  G_TYPE_FROM_CLASS (class),
@@ -210,6 +297,8 @@ psppire_selector_class_init (PsppireSelectorClass *class)
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE,
                  0);
+
+  class->default_selection_funcs = g_hash_table_new (g_direct_hash, g_direct_equal);
 }
 
 
@@ -219,6 +308,7 @@ psppire_selector_base_init (PsppireSelectorClass *class)
   GObjectClass *object_class = G_OBJECT_CLASS (class);
 
   object_class->finalize = psppire_selector_finalize;
+  object_class->dispose = psppire_selector_dispose;
 
   class->source_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
 }
@@ -230,13 +320,82 @@ psppire_selector_base_finalize(PsppireSelectorClass *class,
                                gpointer class_data)
 {
   g_hash_table_destroy (class->source_hash);
+  g_hash_table_destroy (class->default_selection_funcs);
+}
+
+/* Callback for when the source treeview is activated (double clicked) */
+static void
+on_row_activate (GtkTreeView       *tree_view,
+                GtkTreePath       *path,
+                GtkTreeViewColumn *column,
+                gpointer           data)
+{
+  PsppireSelector *selector  = data;
+
+  gtk_action_activate (selector->action);
+}
+
+/* Callback for when the source selection changes */
+static void
+on_source_select (GtkTreeSelection *treeselection, gpointer data)
+{
+  PsppireSelector *selector = data;
+
+  set_direction (selector, PSPPIRE_SELECTOR_SOURCE_TO_DEST);
+
+  if ( selector->allow_selection )
+    {
+      gtk_action_set_sensitive (selector->action,
+                               selector->allow_selection (selector->source, selector->dest));
+    }
+  else if ( GTK_IS_ENTRY (selector->dest) )
+    {
+      gtk_action_set_sensitive (selector->action,
+                               gtk_tree_selection_count_selected_rows
+                               (treeselection) <= 1 );
+    }
 }
 
 
+static void
+on_realize (PsppireSelector *selector)
+{
+  PsppireSelectorClass *class = g_type_class_peek (PSPPIRE_SELECTOR_TYPE);
+  GtkTreeSelection* selection ;
+
+  GList *list = g_hash_table_lookup (class->source_hash, selector->source);
+
+  if ( NULL == list)
+    return;
+
+  if ( g_list_first (list)->data == selector)
+    {
+      if ( selector->row_activate_id )
+       g_signal_handler_disconnect (selector->source, selector->row_activate_id);
+
+      selector->row_activate_id =  
+       g_signal_connect (selector->source, "row-activated", G_CALLBACK (on_row_activate), selector);
+    }
+
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (selector->source));
+
+  if ( selector->source_select_id )
+    g_signal_handler_disconnect (selection, selector->source_select_id);
+
+  selector->source_select_id = 
+    g_signal_connect (selection, "changed", G_CALLBACK (on_source_select), selector);
+}
+
 
 static void
 psppire_selector_init (PsppireSelector *selector)
 {
+  selector->primary_requested = FALSE;
+  selector->select_user_data = NULL;
+  selector->select_items = NULL;
+  selector->allow_selection = NULL;
+  selector->filter = NULL;
+
   selector->arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
   selector->filtered_source = NULL;
 
@@ -251,6 +410,18 @@ psppire_selector_init (PsppireSelector *selector)
   g_signal_connect_swapped (selector->action, "activate", G_CALLBACK (on_activate), selector);
 
   selector->selecting = FALSE;
+
+  selector->source = NULL;
+  selector->dest = NULL;
+  selector->dispose_has_run = FALSE;
+
+
+  selector->row_activate_id = 0;
+  selector->source_select_id  = 0;
+
+  g_signal_connect (selector, "realize",
+                   G_CALLBACK (on_realize), NULL);
+
 }
 
 
@@ -313,27 +484,6 @@ set_direction (PsppireSelector *selector, enum psppire_selector_dir d)
     }
 }
 
-/* Callback for when the source selection changes */
-static void
-on_source_select (GtkTreeSelection *treeselection, gpointer data)
-{
-  PsppireSelector *selector = data;
-
-  set_direction (selector, PSPPIRE_SELECTOR_SOURCE_TO_DEST);
-
-  if ( selector->allow_selection )
-    {
-      gtk_action_set_sensitive (selector->action,
-                               selector->allow_selection (selector->source, selector->dest));
-    }
-  else if ( GTK_IS_ENTRY (selector->dest) )
-    {
-      gtk_action_set_sensitive (selector->action,
-                               gtk_tree_selection_count_selected_rows
-                               (treeselection) <= 1 );
-    }
-}
-
 /* Callback for when the destination treeview selection changes */
 static void
 on_dest_treeview_select (GtkTreeSelection *treeselection, gpointer data)
@@ -480,18 +630,6 @@ select_selection (PsppireSelector *selector)
   selector->selecting = FALSE;
 }
 
-/* Callback for when the source treeview is activated (double clicked) */
-static void
-on_row_activate (GtkTreeView       *tree_view,
-                GtkTreePath       *path,
-                GtkTreeViewColumn *column,
-                gpointer           data)
-{
-  PsppireSelector *selector  = data;
-
-  gtk_action_activate (selector->action);
-}
-
 /* Callback for when the selector button is clicked,
    or other event which causes the selector's action to occur.
  */
@@ -512,25 +650,21 @@ on_activate (PsppireSelector *selector, gpointer data)
     }
 }
 
-/* Default visibility filter for GtkTreeView DEST widget */
 static gboolean
-is_item_in_dest (GtkTreeModel *model, GtkTreeIter *iter,
-                PsppireSelector *selector)
+is_item_in_dest (GtkTreeModel *model, GtkTreeIter *iter, PsppireSelector *selector)
 {
-  GtkTreeModel *dest_model;
-  GtkTreeIter dest_iter;
+  gboolean result = FALSE;
   GtkTreeIter source_iter;
-  gint index;
-  GtkTreePath *path ;
   GtkTreeModel *source_model;
+  GValue value = {0};
 
-  if ( GTK_IS_TREE_MODEL_FILTER (model) )
+  if (GTK_IS_TREE_MODEL_FILTER (model))
     {
       source_model = gtk_tree_model_filter_get_model
        (GTK_TREE_MODEL_FILTER (model));
 
       gtk_tree_model_filter_convert_iter_to_child_iter
-       ( GTK_TREE_MODEL_FILTER (model),  &source_iter,  iter  );
+       (GTK_TREE_MODEL_FILTER (model),  &source_iter, iter);
     }
   else
     {
@@ -538,40 +672,17 @@ is_item_in_dest (GtkTreeModel *model, GtkTreeIter *iter,
       source_iter = *iter;
     }
 
-  dest_model = gtk_tree_view_get_model (GTK_TREE_VIEW (selector->dest));
-
-  path = gtk_tree_model_get_path (source_model, &source_iter);
-
-  index = *gtk_tree_path_get_indices (path);
+  gtk_tree_model_get_value (source_model, &source_iter, DICT_TVM_COL_VAR, &value);
 
-  gtk_tree_path_free (path);
-
-  if ( ! gtk_tree_model_get_iter_first (dest_model, &dest_iter) )
-    return FALSE;
-
-  do
-    {
-      int x;
-      GValue value = {0};
-      GValue int_value = {0};
-      gtk_tree_model_get_value (dest_model, &dest_iter, 0, &value);
+  result = psppire_select_dest_widget_contains_var (PSPPIRE_SELECT_DEST_WIDGET (selector->dest),
+                                                   &value);
 
-      g_value_init (&int_value, G_TYPE_INT);
+  g_value_unset (&value);
 
-      g_value_transform (&value, &int_value);
-
-      x = g_value_get_int (&int_value);
-
-      g_value_unset (&int_value);
-      g_value_unset (&value);
+  return result;
+}
 
-      if ( x == index )
-       return TRUE;
-    }
-  while (gtk_tree_model_iter_next (dest_model, &dest_iter));
 
-  return FALSE;
-}
 
 /* Visibility function for items in the SOURCE widget.
    Returns TRUE iff *all* the selectors for which SOURCE is associated
@@ -606,18 +717,16 @@ static void
 set_tree_view_source (PsppireSelector *selector,
                      GtkTreeView *source)
 {
-  GtkTreeSelection* selection ;
   GList *list = NULL;
 
   PsppireSelectorClass *class = g_type_class_peek (PSPPIRE_SELECTOR_TYPE);
+  
+  GtkTreeModel *model = gtk_tree_view_get_model (source);
 
   if ( ! (list = g_hash_table_lookup (class->source_hash, source)))
     {
       selector->filtered_source =
-       GTK_TREE_MODEL_FILTER (gtk_tree_model_filter_new
-                              (gtk_tree_view_get_model (source),  NULL));
-
-      gtk_tree_view_set_model (source, NULL);
+       GTK_TREE_MODEL_FILTER (gtk_tree_model_filter_new (model, NULL));
 
       gtk_tree_view_set_model (source,
                               GTK_TREE_MODEL (selector->filtered_source));
@@ -635,20 +744,17 @@ set_tree_view_source (PsppireSelector *selector,
     {  /* Append this selector to the list and push the <source,list>
          pair onto the hash table */
 
-      selector->filtered_source = GTK_TREE_MODEL_FILTER (
-       gtk_tree_view_get_model (source));
+      selector->filtered_source = GTK_TREE_MODEL_FILTER (model);
 
-      list = g_list_append (list, selector);
-      g_hash_table_replace (class->source_hash, source, list);
+      if ( NULL == g_list_find (list, selector) )
+       {
+         if ( selector->primary_requested )
+           list = g_list_prepend (list, selector);
+         else
+           list = g_list_append (list, selector);
+         g_hash_table_replace (class->source_hash, source, list);
+       }
     }
-
-  selection = gtk_tree_view_get_selection (source);
-
-  g_signal_connect (source, "row-activated", G_CALLBACK (on_row_activate),
-                   selector);
-
-  g_signal_connect (selection, "changed", G_CALLBACK (on_source_select),
-                   selector);
 }
 
 
@@ -682,7 +788,17 @@ on_dest_data_delete (GtkTreeModel *tree_model,
 }
 
 
+static void
+on_dest_model_changed (PsppireSelector *selector)
+{
+  GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (selector->dest));
+
+  g_signal_connect (model, "row-changed", G_CALLBACK (on_dest_data_change),
+                   selector);
 
+  g_signal_connect (model, "row-deleted", G_CALLBACK (on_dest_data_delete),
+                   selector);
+}
 
 /* Set the destination widget to DEST */
 static void
@@ -690,21 +806,19 @@ set_tree_view_dest (PsppireSelector *selector,
                    GtkTreeView *dest)
 {
   GtkTreeSelection* selection = gtk_tree_view_get_selection (dest);
-  GtkTreeModel *model = gtk_tree_view_get_model (dest);
+
 
   gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
 
   g_signal_connect (selection, "changed", G_CALLBACK (on_dest_treeview_select),
                    selector);
 
-  g_signal_connect (model, "row-changed", G_CALLBACK (on_dest_data_change),
-                     selector);
-
-  g_signal_connect (model, "row-deleted", G_CALLBACK (on_dest_data_delete),
-                     selector);
-
+  on_dest_model_changed (selector);
+  g_signal_connect_swapped (dest, "notify::model",
+                           G_CALLBACK (on_dest_model_changed), selector);
 }
 
+
 /* Callback which causes the filter to be refiltered.
    Called when the DEST GtkEntry is activated (Enter is pressed), or when it
    looses focus.
@@ -716,6 +830,7 @@ refilter (PsppireSelector *selector)
   return FALSE;
 }
 
+
 /* Callback for when the DEST GtkEntry is selected (clicked) */
 static gboolean
 on_entry_dest_select (GtkWidget *widget, GdkEventFocus *event, gpointer data)
@@ -729,7 +844,6 @@ on_entry_dest_select (GtkWidget *widget, GdkEventFocus *event, gpointer data)
 }
 
 
-
 /* Callback for when an item disappears from the source list.
    By implication, this means that the item has been inserted into the
    destination.
@@ -777,67 +891,120 @@ set_entry_dest (PsppireSelector *selector,
                    G_CALLBACK (on_row_inserted), selector);
 }
 
+static void
+set_default_filter (PsppireSelector *selector)
+{
+  if ( selector->filter == NULL)
+    {
+      if  (GTK_IS_TREE_VIEW (selector->dest))
+       selector->filter = is_item_in_dest;
+    }
+}
 
-/* Set SOURCE and DEST for this selector, and
-   set SELECT_FUNC and FILTER_FUNC */
-void
-psppire_selector_set_subjects (PsppireSelector *selector,
-                              GtkWidget *source,
-                              GtkWidget *dest,
-                              SelectItemsFunc *select_func,
-                              FilterItemsFunc *filter_func,
-                              gpointer user_data)
+static void
+update_subjects (PsppireSelector *selector)
 {
-  g_assert(selector);
+  GtkTreeModel *model = NULL;
 
-  selector->filter = filter_func ;
+  if ( NULL == selector->dest )
+    return;
 
-  selector->source = source;
-  selector->dest = dest;
-  selector->select_user_data = user_data;
+  set_default_filter (selector);
 
-  if ( filter_func == NULL)
-    {
-      if  (GTK_IS_TREE_VIEW (dest))
-       selector->filter = is_item_in_dest;
-    }
+  if ( NULL == selector->source )
+    return;
 
-  if ( GTK_IS_TREE_VIEW (source))
-    set_tree_view_source (selector, GTK_TREE_VIEW (source) );
-  else
-    g_error ("Unsupported source widget: %s", G_OBJECT_TYPE_NAME (source));
+  g_signal_connect_swapped (selector->source, "notify::model",
+                           G_CALLBACK (update_subjects), selector);
+
+  model = gtk_tree_view_get_model (GTK_TREE_VIEW (selector->source));
+
+  if ( NULL == model)
+    return;
 
-  g_assert ( GTK_IS_TREE_MODEL_FILTER (selector->filtered_source));
 
-  if ( NULL == dest)
+  if ( GTK_IS_TREE_VIEW (selector->source))
+    set_tree_view_source (selector, GTK_TREE_VIEW (selector->source) );
+  else
+    g_error ("Unsupported source widget: %s", G_OBJECT_TYPE_NAME (selector->source));
+
+  if ( NULL == selector->dest)
     ;
-  else if  ( GTK_IS_TREE_VIEW (dest))
-    set_tree_view_dest (selector, GTK_TREE_VIEW (dest));
+  else if  ( GTK_IS_TREE_VIEW (selector->dest))
+    {
+      set_tree_view_dest (selector, GTK_TREE_VIEW (selector->dest));
+    }
 
-  else if ( GTK_IS_ENTRY (dest))
-    set_entry_dest (selector, GTK_ENTRY (dest));
+  else if ( GTK_IS_ENTRY (selector->dest))
+    set_entry_dest (selector, GTK_ENTRY (selector->dest));
 
-  else if (GTK_IS_TEXT_VIEW (dest))
+  else if (GTK_IS_TEXT_VIEW (selector->dest))
     {
       /* Nothing to be done */
     }
-
   else
-    g_error ("Unsupported destination widget: %s", G_OBJECT_TYPE_NAME (dest));
+    g_error ("Unsupported destination widget: %s", G_OBJECT_TYPE_NAME (selector->dest));
+
+
+  /* FIXME: Remove this dependency */
+  if ( PSPPIRE_IS_DICT_VIEW (selector->source) )
+    {
+      GObjectClass *class = G_OBJECT_GET_CLASS (selector);
+      GType type = G_OBJECT_TYPE (selector->dest);
 
+      SelectItemsFunc *func  = 
+       g_hash_table_lookup (PSPPIRE_SELECTOR_CLASS (class)->default_selection_funcs, (gpointer) type);
+
+      if ( func )
+       psppire_selector_set_select_func (PSPPIRE_SELECTOR (selector),
+                                         func, NULL);
+    }
+}
+
+
+void
+psppire_selector_set_default_selection_func (GType type, SelectItemsFunc *func)
+{
+  GObjectClass *class = g_type_class_ref (PSPPIRE_SELECTOR_TYPE);
+
+  g_hash_table_insert (PSPPIRE_SELECTOR_CLASS (class)->default_selection_funcs, (gpointer) type, func);
+
+  g_type_class_unref (class);
+}
+
+
+
+
+/* Set FILTER_FUNC for this selector */
+void
+psppire_selector_set_filter_func (PsppireSelector *selector,
+                                 FilterItemsFunc *filter_func)
+{
+  selector->filter = filter_func ;
+  
+  set_default_filter (selector);
+}
+
+
+/* Set SELECT_FUNC for this selector */
+void
+psppire_selector_set_select_func (PsppireSelector *selector,
+                              SelectItemsFunc *select_func,
+                              gpointer user_data)
+{
+  selector->select_user_data = user_data;
   selector->select_items = select_func;
 }
 
 
 
 void
-psppire_selector_set_allow        (PsppireSelector *selector , AllowSelectionFunc *allow)
+psppire_selector_set_allow (PsppireSelector *selector, AllowSelectionFunc *allow)
 {
   selector->allow_selection = allow;
 }
 
 
-
 GType
 psppire_selector_orientation_get_type (void)
 {
index 6fff5d4269da20286062e0f8c36def77374f1fa5..bb267cd49cf08631a02e5cfd07e19cf54f31df4a 100644 (file)
@@ -77,7 +77,10 @@ struct _PsppireSelector
   GtkWidget *arrow;
   GtkAction *action;
 
+  gboolean dispose_has_run;
+
   enum psppire_selector_dir direction;
+
   GtkWidget *source;
   GtkWidget *dest;
 
@@ -97,6 +100,12 @@ struct _PsppireSelector
   FilterItemsFunc *filter;
 
   AllowSelectionFunc *allow_selection;
+
+  gulong row_activate_id ;
+
+  gulong source_select_id ;
+
+  gboolean primary_requested;
 };
 
 struct _PsppireSelectorClass
@@ -106,18 +115,26 @@ struct _PsppireSelectorClass
   /* This is a hash of Lists of FilterItemsFunc pointers, keyed by address of
      the source widget */
   GHashTable *source_hash;
+
+  /* A hash of SelectItemFuncs indexed by GType */
+  GHashTable *default_selection_funcs;
 };
 
 GType      psppire_selector_get_type        (void);
 GtkWidget* psppire_selector_new             (void);
-void       psppire_selector_set_subjects    (PsppireSelector *,
-                                            GtkWidget *,
-                                            GtkWidget *,
-                                            SelectItemsFunc *,
-                                            FilterItemsFunc *,
-                                            gpointer );
 
-void      psppire_selector_set_allow        (PsppireSelector *, AllowSelectionFunc *);
+
+/* Set FILTER_FUNC for this selector */
+void psppire_selector_set_filter_func (PsppireSelector *selector,
+                                      FilterItemsFunc *filter_func);
+
+/* Set SELECT_FUNC for this selector */
+void psppire_selector_set_select_func (PsppireSelector *selector,
+                                      SelectItemsFunc *select_func,
+                                      gpointer user_data);
+
+
+void psppire_selector_set_allow (PsppireSelector *, AllowSelectionFunc *);
 
 
 GType psppire_selector_orientation_get_type (void) G_GNUC_CONST;
@@ -134,6 +151,8 @@ typedef enum {
   (psppire_selector_orientation_get_type())
 
 
+void psppire_selector_set_default_selection_func (GType type, SelectItemsFunc *);
+
 
 G_END_DECLS
 
index 48a77fc03ec21a7fa3f9cfc4a3ddc6cceedb3c4f..de12be49f21d7d96d6a1e9145d599f84bd1ef2bf 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008, 2009  Free Software Foundation
+   Copyright (C) 2008, 2009, 2010  Free Software Foundation
 
    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
@@ -30,7 +30,7 @@
 #include "psppire-data-window.h"
 #include "psppire-window-register.h"
 #include "psppire.h"
-#include "about.h"
+#include "help-menu.h"
 #include "psppire-syntax-window.h"
 #include "syntax-editor-source.h"
 #include <language/lexer/lexer.h>
@@ -311,7 +311,7 @@ syntax_save_as (PsppireWindow *se)
 
       if ( ! save_editor_to_file (PSPPIRE_SYNTAX_WINDOW (se), filename, &err) )
        {
-         msg ( ME, err->message );
+         msg ( ME, "%s", err->message );
          g_error_free (err);
        }
 
@@ -336,7 +336,7 @@ syntax_save (PsppireWindow *se)
       save_editor_to_file (PSPPIRE_SYNTAX_WINDOW (se), filename, &err);
       if ( err )
        {
-         msg (ME, err->message);
+         msg (ME, "%s", err->message);
          g_error_free (err);
        }
     }
@@ -360,51 +360,17 @@ create_syntax_window (void)
   gtk_widget_show (w);
 }
 
-/* Callback for the File->Open->Syntax menuitem */
 void
-open_syntax_window (GtkMenuItem *menuitem, gpointer parent)
+open_syntax_window (const char *file_name)
 {
-  GtkFileFilter *filter;
-  gint response;
+  GtkWidget *se = psppire_syntax_window_new ();
 
-  GtkWidget *dialog =
-    gtk_file_chooser_dialog_new (_("Open Syntax"),
-                                GTK_WINDOW (parent),
-                                GTK_FILE_CHOOSER_ACTION_OPEN,
-                                GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                GTK_STOCK_OPEN,   GTK_RESPONSE_ACCEPT,
-                                NULL);
-
-  filter = gtk_file_filter_new ();
-  gtk_file_filter_set_name (filter, _("Syntax Files (*.sps) "));
-  gtk_file_filter_add_pattern (filter, "*.sps");
-  gtk_file_filter_add_pattern (filter, "*.SPS");
-  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
-
-  filter = gtk_file_filter_new ();
-  gtk_file_filter_set_name (filter, _("All Files"));
-  gtk_file_filter_add_pattern (filter, "*");
-  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
-
-  response = gtk_dialog_run (GTK_DIALOG (dialog));
-
-  if (response == GTK_RESPONSE_ACCEPT)
-    {
-      const char *file_name = gtk_file_chooser_get_filename
-       (GTK_FILE_CHOOSER (dialog));
-
-      GtkWidget *se = psppire_syntax_window_new ();
-
-      if ( psppire_window_load (PSPPIRE_WINDOW (se), file_name) ) 
-       gtk_widget_show (se);
-      else
-       gtk_widget_destroy (se);
-    }
-
-  gtk_widget_destroy (dialog);
+  if ( psppire_window_load (PSPPIRE_WINDOW (se), file_name) )
+    gtk_widget_show (se);
+  else
+    gtk_widget_destroy (se);
 }
 
-
 static void
 on_text_changed (GtkTextBuffer *buffer, PsppireSyntaxWindow *window)
 {
@@ -426,7 +392,7 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window)
   GtkBuilder *xml = builder_new ("syntax-editor.ui");
   GtkWidget *box = gtk_vbox_new (FALSE, 0);
 
-  GtkWidget *menubar = get_widget_assert (xml, "menubar2");
+  GtkWidget *menubar = get_widget_assert (xml, "menubar");
   GtkWidget *sw = get_widget_assert (xml, "scrolledwindow8");
 
 
@@ -459,15 +425,7 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window)
 
   gtk_widget_show_all (box);
 
-  g_signal_connect (get_action_assert (xml,"file_new_syntax"),
-                   "activate",
-                   G_CALLBACK (create_syntax_window),
-                   NULL);
-
-  g_signal_connect (get_action_assert (xml,"file_open_syntax"),
-                   "activate",
-                   G_CALLBACK (open_syntax_window),
-                   window);
+  g_signal_connect_swapped (get_action_assert (xml,"file_new_syntax"), "activate", G_CALLBACK (create_syntax_window), NULL);
 
 #if 0
   g_signal_connect (get_action_assert (xml,"file_new_data"),
@@ -476,21 +434,6 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window)
                    window);
 #endif
 
-  {
-    GtkAction *abt = get_action_assert (xml, "help_about");
-    g_object_set (abt, "stock-id", "gtk-about", NULL);
-
-    g_signal_connect (abt,
-                     "activate",
-                     G_CALLBACK (about_new),
-                     window);
-  }
-
-  g_signal_connect (get_action_assert (xml,"help_reference"),
-                   "activate",
-                   G_CALLBACK (reference_manual),
-                   NULL);
-
   g_signal_connect_swapped (get_action_assert (xml, "file_save"),
                    "activate",
                    G_CALLBACK (syntax_save),
@@ -535,8 +478,10 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window)
   {
   GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (xml, "uimanager1", GTK_TYPE_UI_MANAGER));
 
+  merge_help_menu (uim);
+
   PSPPIRE_WINDOW (window)->menu =
-    GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar2/windows/windows_minimise_all")->parent);
+    GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar/windows/windows_minimise_all")->parent);
   }
 
   g_object_unref (xml);
@@ -570,7 +515,7 @@ error_dialog (GtkWindow *w, const gchar *filename,  GError *err)
   g_object_set (dialog, "icon-name", "psppicon", NULL);
 
   gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                                           err->message);
+                                           "%s", err->message);
 
   gtk_dialog_run (GTK_DIALOG (dialog));
 
@@ -580,16 +525,30 @@ error_dialog (GtkWindow *w, const gchar *filename,  GError *err)
 /*
   Loads the buffer from the file called FILENAME
 */
-static gboolean
+gboolean
 syntax_load (PsppireWindow *window, const gchar *filename)
 {
   GError *err = NULL;
-  gchar *text;
+  gchar *text_locale = NULL;
+  gchar *text_utf8 = NULL;
+  gsize len_locale = -1;
+  gsize len_utf8 = -1;
   GtkTextIter iter;
   PsppireSyntaxWindow *sw = PSPPIRE_SYNTAX_WINDOW (window);
 
   /* FIXME: What if it's a very big file ? */
-  if ( ! g_file_get_contents (filename, &text, NULL, &err) )
+  if ( ! g_file_get_contents (filename, &text_locale, &len_locale, &err) )
+    {
+      error_dialog (GTK_WINDOW (window), filename, err);
+      g_clear_error (&err);
+      return FALSE;
+    }
+
+  text_utf8 = g_locale_to_utf8 (text_locale, len_locale, NULL, &len_utf8, &err);
+
+  free (text_locale);
+
+  if ( text_utf8 == NULL )
     {
       error_dialog (GTK_WINDOW (window), filename, err);
       g_clear_error (&err);
@@ -598,10 +557,12 @@ syntax_load (PsppireWindow *window, const gchar *filename)
 
   gtk_text_buffer_get_iter_at_line (sw->buffer, &iter, 0);
 
-  gtk_text_buffer_insert (sw->buffer, &iter, text, -1);
+  gtk_text_buffer_insert (sw->buffer, &iter, text_utf8, len_utf8);
 
   gtk_text_buffer_set_modified (sw->buffer, FALSE);
 
+  free (text_utf8);
+
   return TRUE;
 }
 
index c863a92f1a24e335439c43721a2c0c11da215ace..3816a1319f8d6d57b0ee11fcc03823b0bbcf4860 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
+   Copyright (C) 2008, 2010  Free Software Foundation
 
    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
@@ -62,9 +62,8 @@ struct _PsppireSyntaxWindowClass
 GType      psppire_syntax_window_get_type        (void);
 GtkWidget* psppire_syntax_window_new             (void);
 
-void open_syntax_window (GtkMenuItem *menuitem, gpointer parent);
 void create_syntax_window (void);
-
+void open_syntax_window (const char *file_name);
 
 G_END_DECLS
 
index 70e1044fcb25ed9d46dbc2fcc8d2232c3687fda6..48f34f6d03f9ae7211b3bb63d95cecfe923ca011 100644 (file)
@@ -453,9 +453,9 @@ var_sheet_change_active_cell (PsppireVarSheet *vs,
                  }
 
                adj = gtk_adjustment_new (current_value,
-                                        r_min, r_max,
-                                        1.0, 1.0, 1.0 /* steps */
-                                        );
+                                         r_min, r_max,
+                                         1.0, 1.0, /* steps */
+                                         0);
 
                psppire_sheet_change_entry (sheet, GTK_TYPE_SPIN_BUTTON);
 
@@ -487,7 +487,8 @@ psppire_var_sheet_realize (GtkWidget *w)
                                                PSPPIRE_VAR_STORE (psppire_sheet_get_model (PSPPIRE_SHEET (vs))));
 
   vs->missing_val_dialog = missing_val_dialog_create (GTK_WINDOW (toplevel));
-  vs->var_type_dialog = var_type_dialog_create (GTK_WINDOW (toplevel));
+  vs->var_type_dialog = var_type_dialog_create (GTK_WINDOW (toplevel),
+                                               PSPPIRE_VAR_STORE (psppire_sheet_get_model (PSPPIRE_SHEET (vs))));
 
   /* Chain up to the parent class */
   GTK_WIDGET_CLASS (parent_class)->realize (w);
index ece728127c142733b6986844146d22e06129b9fb..1a2fc1fcee1429d5e83d68f35204b88fca68bef2 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2006, 2009  Free Software Foundation
+   Copyright (C) 2006, 2009, 2010  Free Software Foundation
 
    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
@@ -643,16 +643,16 @@ text_for_column (PsppireVarStore *vs,
        switch ( write_spec->type )
          {
          case FMT_F:
-           return g_locale_to_utf8 (gettext (type_label[VT_NUMERIC]), -1, 0, 0, err);
+           return xstrdup (gettext (type_label[VT_NUMERIC]));
            break;
          case FMT_COMMA:
-           return g_locale_to_utf8 (gettext (type_label[VT_COMMA]), -1, 0, 0, err);
+           return xstrdup (gettext (type_label[VT_COMMA]));
            break;
          case FMT_DOT:
-           return g_locale_to_utf8 (gettext (type_label[VT_DOT]), -1, 0, 0, err);
+           return xstrdup (gettext (type_label[VT_DOT]));
            break;
          case FMT_E:
-           return g_locale_to_utf8 (gettext (type_label[VT_SCIENTIFIC]), -1, 0, 0, err);
+           return xstrdup (gettext (type_label[VT_SCIENTIFIC]));
            break;
          case FMT_DATE:
          case FMT_EDATE:
@@ -667,20 +667,20 @@ text_for_column (PsppireVarStore *vs,
          case FMT_DTIME:
          case FMT_WKDAY:
          case FMT_MONTH:
-           return g_locale_to_utf8 (type_label[VT_DATE], -1, 0, 0, err);
+           return xstrdup (gettext (type_label[VT_DATE]));
            break;
          case FMT_DOLLAR:
-           return g_locale_to_utf8 (type_label[VT_DOLLAR], -1, 0, 0, err);
+           return xstrdup (gettext (type_label[VT_DOLLAR]));
            break;
          case FMT_CCA:
          case FMT_CCB:
          case FMT_CCC:
          case FMT_CCD:
          case FMT_CCE:
-           return g_locale_to_utf8 (gettext (type_label[VT_CUSTOM]), -1, 0, 0, err);
+           return xstrdup (gettext (type_label[VT_CUSTOM]));
            break;
          case FMT_A:
-           return g_locale_to_utf8 (gettext (type_label[VT_STRING]), -1, 0, 0, err);
+           return xstrdup (gettext (type_label[VT_STRING]));
            break;
          default:
             {
@@ -739,7 +739,7 @@ text_for_column (PsppireVarStore *vs,
     case PSPPIRE_VAR_STORE_COL_VALUES:
       {
        if ( ! var_has_value_labels (pv))
-         return g_locale_to_utf8 (gettext (none), -1, 0, 0, err);
+         return xstrdup (gettext (none));
        else
          {
            const struct val_labs *vls = var_get_value_labels (pv);
@@ -762,12 +762,12 @@ text_for_column (PsppireVarStore *vs,
        const gint align = var_get_alignment (pv);
 
        g_assert (align < n_ALIGNMENTS);
-       return g_locale_to_utf8 (gettext (alignments[align]), -1, 0, 0, err);
+       return xstrdup (gettext (alignments[align]));
       }
       break;
     case PSPPIRE_VAR_STORE_COL_MEASURE:
       {
-       return measure_to_string (pv, err);
+       return xstrdup (measure_to_string (pv, err));
       }
       break;
     }
diff --git a/src/ui/gui/psppire-var-view.c b/src/ui/gui/psppire-var-view.c
new file mode 100644 (file)
index 0000000..f7a017b
--- /dev/null
@@ -0,0 +1,332 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <gtk/gtktreeview.h>
+#include <gtk/gtkcellrenderertext.h>
+#include "psppire-var-view.h"
+#include "psppire-var-ptr.h"
+#include "psppire-select-dest.h"
+
+#include <data/variable.h>
+
+#include <gettext.h>
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+static void psppire_var_view_base_finalize (PsppireVarViewClass *, gpointer);
+static void psppire_var_view_base_init     (PsppireVarViewClass *class);
+static void psppire_var_view_class_init    (PsppireVarViewClass *class);
+static void psppire_var_view_init          (PsppireVarView      *var_view);
+
+/* Returns TRUE iff VV contains the item V.
+   V must be an initialised value containing a
+   PSPPIRE_VAR_PTR_TYPE.
+*/
+static gboolean
+var_view_contains_var (PsppireSelectDestWidget *sdm, const GValue *v)
+{
+  gboolean ok;
+  GtkTreeIter iter;
+  PsppireVarView *vv = PSPPIRE_VAR_VIEW (sdm);
+  g_return_val_if_fail (G_VALUE_HOLDS (v, PSPPIRE_VAR_PTR_TYPE), FALSE);
+
+  for (ok = psppire_var_view_get_iter_first (vv, &iter);
+       ok;
+       ok = psppire_var_view_get_iter_next (vv, &iter))
+    {
+      const struct variable *var = psppire_var_view_get_variable (vv, 0, &iter);
+      if (var == g_value_get_boxed (v))
+       return TRUE;
+    }
+
+  return FALSE;
+}
+
+static void
+model_init (PsppireSelectDestWidgetIface *iface)
+{
+  iface->contains_var = var_view_contains_var;
+}
+
+GType
+psppire_var_view_get_type (void)
+{
+  static GType psppire_var_view_type = 0;
+
+  if (!psppire_var_view_type)
+    {
+      static const GTypeInfo psppire_var_view_info =
+      {
+       sizeof (PsppireVarViewClass),
+       (GBaseInitFunc) psppire_var_view_base_init,
+        (GBaseFinalizeFunc) psppire_var_view_base_finalize,
+       (GClassInitFunc)psppire_var_view_class_init,
+       (GClassFinalizeFunc) NULL,
+       NULL,
+        sizeof (PsppireVarView),
+       0,
+       (GInstanceInitFunc) psppire_var_view_init,
+      };
+
+      static const GInterfaceInfo var_view_model_info = {
+       (GInterfaceInitFunc) model_init, /* Fill this in */
+       NULL,
+       NULL
+      };
+
+      psppire_var_view_type =
+       g_type_register_static (GTK_TYPE_TREE_VIEW, "PsppireVarView",
+                               &psppire_var_view_info, 0);
+
+      g_type_add_interface_static (psppire_var_view_type,
+                                  PSPPIRE_TYPE_SELECT_DEST_WIDGET,
+                                  &var_view_model_info);
+    }
+
+  return psppire_var_view_type;
+}
+
+
+static void
+psppire_var_view_finalize (GObject *object)
+{
+  PsppireVarView *var_view = PSPPIRE_VAR_VIEW (object);
+  g_free (var_view->nums);
+}
+
+/* Properties */
+enum
+{
+  PROP_0,
+  PROP_N_COLS
+};
+
+/* A (*GtkTreeCellDataFunc) function.
+   This function expects TREEMODEL to hold PSPPIRE_VAR_PTR_TYPE.
+   It renders the name of the variable into CELL.
+*/
+static void
+display_cell_var_name (GtkTreeViewColumn *tree_column,
+                      GtkCellRenderer *cell,
+                      GtkTreeModel *treemodel,
+                      GtkTreeIter *iter,
+                      gpointer data)
+{
+  struct variable *var;
+  GValue value = {0};
+  gint *col = data;
+
+  GtkTreePath *path = gtk_tree_model_get_path (treemodel, iter);
+
+  gtk_tree_model_get_value (treemodel, iter, *col, &value);
+
+  gtk_tree_path_free (path);
+
+  var = g_value_get_boxed (&value);
+
+  g_value_unset (&value);
+
+  g_object_set (cell, "text", var_get_name (var), NULL);
+}
+
+
+static void
+psppire_var_view_get_property (GObject         *object,
+                              guint            prop_id,
+                              GValue          *value,
+                              GParamSpec      *pspec)
+{
+  PsppireVarView *var_view = PSPPIRE_VAR_VIEW (object);
+
+  switch (prop_id)
+    {
+    case PROP_N_COLS:
+      g_value_set_int (value,  gtk_tree_model_iter_n_children (GTK_TREE_MODEL (var_view->list), NULL));
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    };
+}
+
+
+static void
+psppire_var_view_set_property (GObject         *object,
+                              guint            prop_id,
+                              const GValue    *value,
+                              GParamSpec      *pspec)
+{
+  PsppireVarView *var_view = PSPPIRE_VAR_VIEW (object);
+
+  switch (prop_id)
+    {
+    case PROP_N_COLS:
+      {
+       gint n_cols = g_value_get_int (value);
+       gint c;
+
+
+       GType *array = g_alloca (sizeof (GType) *  n_cols);
+
+       var_view->nums = g_malloc (sizeof *var_view->nums * n_cols);
+
+       for (c = 0 ; c < n_cols; ++c)
+       {
+         GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
+         GtkTreeViewColumn *col = gtk_tree_view_column_new ();
+
+         gchar *label = g_strdup_printf (_("Var%d"), c + 1);
+
+         gtk_tree_view_column_set_min_width (col, 100);
+         gtk_tree_view_column_set_sizing (col, GTK_TREE_VIEW_COLUMN_FIXED);
+         gtk_tree_view_column_set_resizable (col, TRUE);
+         gtk_tree_view_column_set_title (col, label);
+
+         g_free (label);
+
+         var_view->nums[c] = c;
+
+         gtk_tree_view_column_pack_start (col, renderer, TRUE);
+         gtk_tree_view_column_set_cell_data_func (col, renderer,
+                                                  display_cell_var_name,
+                                                  &var_view->nums[c], 0);
+
+         gtk_tree_view_append_column (GTK_TREE_VIEW (var_view), col);
+         array[c] = PSPPIRE_VAR_PTR_TYPE;
+       }
+
+       /* Set a model, which is an GtkListStore of gpointers which point to a variable */
+       var_view->list = gtk_list_store_newv  (n_cols, array);
+       gtk_tree_view_set_model (GTK_TREE_VIEW (var_view), GTK_TREE_MODEL (var_view->list));
+      }
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    };
+}
+
+static void
+psppire_var_view_class_init (PsppireVarViewClass *class)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+  GParamSpec *n_cols_spec =
+    g_param_spec_int ("n-cols",
+                     "Number of columns",
+                     "The Number of Columns in the Variable View",
+                     1, 20,
+                     1,
+                     G_PARAM_CONSTRUCT_ONLY | G_PARAM_READABLE | G_PARAM_WRITABLE);
+
+
+  object_class->set_property = psppire_var_view_set_property;
+  object_class->get_property = psppire_var_view_get_property;
+
+  g_object_class_install_property (object_class,
+                                   PROP_N_COLS,
+                                   n_cols_spec);
+}
+
+
+static void
+psppire_var_view_base_init (PsppireVarViewClass *class)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+  object_class->finalize = psppire_var_view_finalize;
+}
+
+
+
+static void
+psppire_var_view_base_finalize (PsppireVarViewClass *class,
+                                gpointer class_data)
+{
+}
+
+
+
+static void
+psppire_var_view_init (PsppireVarView *var_view)
+{
+}
+
+
+GtkWidget*
+psppire_var_view_new (void)
+{
+  return GTK_WIDGET (g_object_new (psppire_var_view_get_type (), NULL));
+}
+
+
+gboolean
+psppire_var_view_get_iter_first (PsppireVarView *vv, GtkTreeIter *iter)
+{
+  return gtk_tree_model_get_iter_first (GTK_TREE_MODEL (vv->list), iter);
+}
+
+gboolean
+psppire_var_view_get_iter_next (PsppireVarView *vv, GtkTreeIter *iter)
+{
+  return gtk_tree_model_iter_next (GTK_TREE_MODEL (vv->list), iter);
+}
+
+const struct variable *
+psppire_var_view_get_variable (PsppireVarView *vv, gint column, GtkTreeIter *iter)
+{
+  const struct variable *var = NULL;
+  GValue value = {0};
+  gtk_tree_model_get_value (GTK_TREE_MODEL (vv->list), iter, column, &value);
+
+  if ( G_VALUE_TYPE (&value) == PSPPIRE_VAR_PTR_TYPE)
+    var = g_value_get_boxed (&value);
+  else
+    g_critical ("Unsupported type \"%s\", in variable name treeview.",
+               G_VALUE_TYPE_NAME (&value));
+
+  g_value_unset (&value);
+
+  return var;
+}
+
+/*
+  Append the names of selected variables to STRING.
+  Returns the number of variables appended.
+*/
+gint
+psppire_var_view_append_names (PsppireVarView *vv, gint column, GString *string)
+{
+  gint n_vars = 0;
+  GtkTreeIter iter;
+
+  if ( psppire_var_view_get_iter_first (vv, &iter) )
+    {
+      do
+       {
+         const struct variable *var = psppire_var_view_get_variable (vv, column, &iter);
+         g_string_append (string, " ");
+         g_string_append (string, var_get_name (var));
+
+         n_vars++;
+       }
+      while (psppire_var_view_get_iter_next (vv, &iter));
+    }
+
+  return n_vars;
+}
diff --git a/src/ui/gui/psppire-var-view.h b/src/ui/gui/psppire-var-view.h
new file mode 100644 (file)
index 0000000..35dc91d
--- /dev/null
@@ -0,0 +1,72 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+
+#ifndef __PSPPIRE_VAR_VIEW_H__
+#define __PSPPIRE_VAR_VIEW_H__
+
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtktreeview.h>
+
+G_BEGIN_DECLS
+
+#define PSPPIRE_VAR_VIEW_TYPE            (psppire_var_view_get_type ())
+#define PSPPIRE_VAR_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_VAR_VIEW_TYPE, PsppireVarView))
+#define PSPPIRE_VAR_VIEW_CLASS(class)    (G_TYPE_CHECK_CLASS_CAST ((class), \
+    PSPPIRE_VAR_VIEW_TYPE, PsppireVarViewClass))
+#define PSPPIRE_IS_VAR_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+    PSPPIRE_VAR_VIEW_TYPE))
+#define PSPPIRE_IS_VAR_VIEW_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
+    PSPPIRE_VAR_VIEW_TYPE))
+
+
+typedef struct _PsppireVarView       PsppireVarView;
+typedef struct _PsppireVarViewClass  PsppireVarViewClass;
+
+struct variable;
+
+struct _PsppireVarView
+{
+  GtkTreeView parent;
+
+  GtkListStore *list;
+  
+  gint *nums;
+};
+
+struct _PsppireVarViewClass
+{
+  GtkTreeViewClass parent_class;
+
+};
+
+GType      psppire_var_view_get_type        (void);
+
+gint psppire_var_view_append_names (PsppireVarView *vv, gint column, GString *string);
+
+gboolean psppire_var_view_get_iter_first (PsppireVarView *vv, GtkTreeIter *iter);
+
+gboolean psppire_var_view_get_iter_next (PsppireVarView *vv, GtkTreeIter *iter);
+
+const struct variable * psppire_var_view_get_variable (PsppireVarView *vv, gint column, GtkTreeIter *iter);
+
+
+
+G_END_DECLS
+
+#endif /* __PSPPIRE_VAR_VIEW_H__ */
index 70500e6a0b4f1fa8a78228aa95fdb05ba58c1b2b..d3137ff2234d0d036329596a0c8ad0746d72dcd7 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2009  Free Software Foundation
+   Copyright (C) 2009, 2010  Free Software Foundation
 
    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
@@ -203,19 +203,6 @@ on_realize (GtkWindow *window, gpointer data)
 }
 
 
-static gboolean
-save_geometry (GtkWidget *window, GdkEvent *event, gpointer data)
-{
-  const gchar *base = G_OBJECT_TYPE_NAME (window);
-
-  PsppireConf *conf = psppire_conf_new ();
-
-  psppire_conf_save_window_geometry (conf, base, event);
-
-  return FALSE;
-}
-
-
 static void
 psppire_window_finalize (GObject *object)
 {
@@ -382,6 +369,13 @@ on_delete (PsppireWindow *w, GdkEvent *event, gpointer user_data)
 {
   PsppireWindowRegister *reg = psppire_window_register_new ();
 
+  const gchar *base = G_OBJECT_TYPE_NAME (w);
+
+  PsppireConf *conf = psppire_conf_new ();
+
+  psppire_conf_save_window_geometry (conf, base, GTK_WINDOW (w));
+
+
   if ( w->dirty )
     {
       gint response = psppire_window_query_save (w);
@@ -435,12 +429,6 @@ psppire_window_init (PsppireWindow *window)
 
   g_object_set (window, "icon-name", "psppicon", NULL);
 
-  g_signal_connect (window, "configure-event",
-                   G_CALLBACK (save_geometry), window);
-
-  g_signal_connect (window, "window-state-event",
-                   G_CALLBACK (save_geometry), window);
-
   g_signal_connect (window, "realize",
                    G_CALLBACK (on_realize), window);
 
index 1cd7ee803c736a740b373a53b035c7dcef6bd90a..d75bff359b1d33aac4b0d8f177a259e47d014903 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2004, 2005, 2006, 2009  Free Software Foundation
+   Copyright (C) 2004, 2005, 2006, 2009, 2010  Free Software Foundation
 
    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
 
 #include <config.h>
 
-#include <libpspp/i18n.h>
+#include "ui/gui/psppire.h"
+
 #include <assert.h>
-#include <libintl.h>
 #include <gsl/gsl_errno.h>
-
-#include <xalloc.h>
-#include <argp.h>
-#include <ui/command-line.h>
-#include "relocatable.h"
-
-#include "psppire-data-window.h"
-#include "psppire.h"
-#include "widgets.h"
-
-#include <libpspp/getl.h>
-#include <unistd.h>
-#include <data/casereader.h>
-#include <data/datasheet.h>
-#include <data/file-handle-def.h>
-#include <data/settings.h>
-#include <data/file-name.h>
-#include <data/procedure.h>
-#include <libpspp/getl.h>
-#include <language/lexer/lexer.h>
-#include <libpspp/version.h>
-#include <output/output.h>
-#include <output/journal.h>
-#include <language/syntax-string-source.h>
-
 #include <gtk/gtk.h>
-#include "psppire-dict.h"
-#include "psppire-var-store.h"
-#include "psppire-data-store.h"
-#include "executor.h"
-#include "message-dialog.h"
-#include <ui/syntax-gen.h>
-
-#include "psppire-window-register.h"
-#include "psppire-output-window.h"
-
-#include <data/sys-file-reader.h>
-#include <data/por-file-reader.h>
+#include <libintl.h>
+#include <unistd.h>
 
-#include <ui/source-init-opts.h>
+#include "data/casereader.h"
+#include "data/datasheet.h"
+#include "data/file-handle-def.h"
+#include "data/file-name.h"
+#include "data/por-file-reader.h"
+#include "data/procedure.h"
+#include "data/settings.h"
+#include "data/sys-file-reader.h"
+#include "language/lexer/lexer.h"
+#include "language/syntax-string-source.h"
+#include "libpspp/getl.h"
+#include "libpspp/i18n.h"
+#include "libpspp/message.h"
+#include "libpspp/version.h"
+#include "output/driver.h"
+#include "output/journal.h"
+#include "output/message-item.h"
+#include "ui/gui/dict-display.h"
+#include "ui/gui/executor.h"
+#include "ui/gui/psppire-data-store.h"
+#include "ui/gui/psppire-data-window.h"
+#include "ui/gui/psppire-dict.h"
+#include "ui/gui/psppire-output-window.h"
+#include "ui/gui/psppire-selector.h"
+#include "ui/gui/psppire-var-store.h"
+#include "ui/gui/psppire-var-view.h"
+#include "ui/gui/psppire-window-register.h"
+#include "ui/gui/psppire.h"
+#include "ui/gui/widgets.h"
+#include "ui/source-init-opts.h"
+#include "ui/syntax-gen.h"
+
+#include "gl/configmake.h"
+#include "gl/xalloc.h"
+#include "gl/relocatable.h"
 
 GtkRecentManager *the_recent_mgr = 0;
 PsppireDataStore *the_data_store = 0;
@@ -72,6 +71,9 @@ struct dataset * the_dataset = NULL;
 
 static GtkWidget *the_data_window;
 
+static void handle_msg (const struct msg *);
+static void load_data_file (const char *);
+
 static void
 replace_casereader (struct casereader *s)
 {
@@ -85,7 +87,7 @@ replace_casereader (struct casereader *s)
 
 
 void
-initialize (struct command_line_processor *clp, int argc, char **argv)
+initialize (struct source_stream *ss, const char *data_file)
 {
   PsppireDict *dictionary = 0;
 
@@ -94,19 +96,13 @@ initialize (struct command_line_processor *clp, int argc, char **argv)
   preregister_widgets ();
 
   gsl_set_error_handler_off ();
-  fn_init ();
-  outp_init ();
   settings_init (&viewer_width, &viewer_length);
   fh_init ();
-  the_source_stream =
-    create_source_stream (
-                         fn_getenv_default ("STAT_INCLUDE_PATH", include_path)
-                         );
 
   the_dataset = create_dataset ();
 
-
-  message_dialog_init (the_source_stream);
+  the_source_stream = ss;
+  msg_init (ss, handle_msg);
 
   dictionary = psppire_dict_new_from_dict (dataset_dict (the_dataset));
 
@@ -120,25 +116,7 @@ initialize (struct command_line_processor *clp, int argc, char **argv)
 
   create_icon_factory ();
 
-  {
-    const char *filename = output_file_name ();
-
-    struct string config_string;
-
-    ds_init_empty (&config_string);
-
-    ds_put_format (&config_string,
-                  "gui:ascii:screen:squeeze=on headers=off top-margin=0 "
-                  "bottom-margin=0 paginate=off length=auto width=auto "
-                  "emphasis=none "
-                  "output-file=\"%s\" append=yes", filename);
-
-    outp_configure_driver_line (ds_ss (&config_string));
-
-    unlink (filename);
-
-    ds_destroy (&config_string);
-  }
+  psppire_output_window_setup ();
 
   journal_enable ();
   textdomain (PACKAGE);
@@ -146,12 +124,13 @@ initialize (struct command_line_processor *clp, int argc, char **argv)
 
   the_recent_mgr = gtk_recent_manager_get_default ();
 
-  the_data_window = psppire_data_window_new ();
-
-  command_line_processor_replace_aux (clp, &post_init_argp, the_source_stream);
-  command_line_processor_replace_aux (clp, &non_option_argp, the_source_stream);
+  psppire_selector_set_default_selection_func (GTK_TYPE_ENTRY, insert_source_row_into_entry);
+  psppire_selector_set_default_selection_func (PSPPIRE_VAR_VIEW_TYPE, insert_source_row_into_tree_view);
+  psppire_selector_set_default_selection_func (GTK_TYPE_TREE_VIEW, insert_source_row_into_tree_view);
 
-  command_line_processor_parse (clp, argc, argv);
+  the_data_window = psppire_data_window_new ();
+  if (data_file != NULL)
+    load_data_file (data_file);
 
   execute_syntax (create_syntax_string_source (""));
 
@@ -163,9 +142,8 @@ void
 de_initialize (void)
 {
   destroy_source_stream (the_source_stream);
-  message_dialog_done ();
   settings_done ();
-  outp_done ();
+  output_close ();
   i18n_done ();
 }
 
@@ -260,94 +238,67 @@ create_icon_factory (void)
 
   gtk_icon_factory_add_default (factory);
 }
-
 \f
-
-static error_t
-parse_non_options (int key, char *arg, struct argp_state *state)
+static void
+load_data_file (const char *arg)
 {
-  struct source_stream *ss = state->input;
-
-  if ( NULL == ss )
-    return 0;
-
-  switch (key)
+  gchar *filename = NULL;
+  gchar *utf8 = NULL;
+  const gchar *local_encoding = NULL;
+  gsize written = -1;
+  const gboolean local_is_utf8 = g_get_charset (&local_encoding);
+
+  /* There seems to be no Glib function to convert from local encoding
+     to filename encoding.  Therefore it has to be done in two steps:
+     the intermediate encoding is UTF8.
+
+     Either step could fail.  However, in many cases the file can still
+     be loaded even if the conversion fails. So in those cases, after showing
+     a warning, we simply copy the locally encoded filename to the destination
+     and hope for the best.
+  */
+
+  if ( local_is_utf8)
     {
-    case ARGP_KEY_ARG:
-      {
-       gchar *filename = NULL;
-       gchar *utf8 = NULL;
-       const gchar *local_encoding = NULL;
-       gsize written = -1;
-       const gboolean local_is_utf8 = g_get_charset (&local_encoding);
-
-       /* There seems to be no Glib function to convert from local encoding
-          to filename encoding.  Therefore it has to be done in two steps:
-          the intermediate encoding is UTF8.
-
-          Either step could fail.  However, in many cases the file can still
-          be loaded even if the conversion fails. So in those cases, after showing
-          a warning, we simply copy the locally encoded filename to the destination
-          and hope for the best.
-       */
-
-       if ( local_is_utf8)
-         {
-           utf8 = xstrdup (arg);
-         }
-       else
-         {
-           GError *err = NULL;
-           utf8 = g_locale_to_utf8 (arg, -1, NULL, &written, &err);
-           if ( NULL == utf8)
-             {
-               g_warning ("Cannot convert filename from local encoding \"%s\" to UTF-8: %s",
-                          local_encoding,
-                          err->message);
-               g_clear_error (&err);
-             }
-         }
-
-       if ( NULL != utf8)
-         {
-           GError *err = NULL;
-           filename = g_filename_from_utf8 (utf8, written, NULL, NULL, &err);
-           if ( NULL == filename)
-             {
-               g_warning ("Cannot convert filename from UTF8 to filename encoding: %s",
-                          err->message);
-               g_clear_error (&err);
-             }
-         }
-
-       g_free (utf8);
-
-       if ( filename == NULL)
-         filename = xstrdup (arg);
-
-       psppire_window_load (PSPPIRE_WINDOW (the_data_window), filename);
-
-       g_free (filename);
-       break;
-      }
-    default:
-      return ARGP_ERR_UNKNOWN;
+      utf8 = xstrdup (arg);
+    }
+  else
+    {
+      GError *err = NULL;
+      utf8 = g_locale_to_utf8 (arg, -1, NULL, &written, &err);
+      if ( NULL == utf8)
+        {
+          g_warning ("Cannot convert filename from local encoding \"%s\" to UTF-8: %s",
+                     local_encoding,
+                     err->message);
+          g_clear_error (&err);
+        }
     }
-  return 0;
-}
 
+  if ( NULL != utf8)
+    {
+      GError *err = NULL;
+      filename = g_filename_from_utf8 (utf8, written, NULL, NULL, &err);
+      if ( NULL == filename)
+        {
+          g_warning ("Cannot convert filename from UTF8 to filename encoding: %s",
+                     err->message);
+          g_clear_error (&err);
+        }
+    }
 
-const struct argp non_option_argp = {NULL, parse_non_options, 0, 0, 0, 0, 0};
+  g_free (utf8);
 
+  if ( filename == NULL)
+    filename = xstrdup (arg);
 
-const char *
-output_file_name (void)
-{
-  const char *dir = default_output_path ();
-  static char *filename = NULL;
+  psppire_window_load (PSPPIRE_WINDOW (the_data_window), filename);
 
-  if ( NULL == filename )
-    filename = xasprintf ("%s%s", dir, OUTPUT_FILE_NAME);
+  g_free (filename);
+}
 
-  return filename;
+static void
+handle_msg (const struct msg *m)
+{
+  message_item_submit (message_item_create (m));
 }
diff --git a/src/ui/gui/psppire.glade b/src/ui/gui/psppire.glade
deleted file mode 100644 (file)
index a096752..0000000
+++ /dev/null
@@ -1,2316 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="weight-cases-dialog">
-    <property name="title">Weight Cases</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkHBox" id="hbox1">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                <child>
-                  <widget class="PsppireDictView" id="weight-cases-treeview">
-                    <property name="visible">True</property>
-                    <property name="headers_visible">False</property>
-                    <property name="fixed_height_mode">True</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox1">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkFrame" id="frame1">
-                    <property name="visible">True</property>
-                    <property name="border_width">5</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox2">
-                        <property name="visible">True</property>
-                        <property name="border_width">5</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="weight-cases-radiobutton1">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Do not weight cases</property>
-                            <property name="focus_on_click">False</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton2">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="label" translatable="yes">Weight cases by</property>
-                            <property name="focus_on_click">False</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">weight-cases-radiobutton1</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox3">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="PsppireSelector" id="weight-cases-selector">
-                                <property name="visible">True</property>
-                                <property name="border_width">5</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkVBox" id="vbox3">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label1">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Frequency Variable</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="weight-cases-entry">
-                                    <property name="visible">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <placeholder/>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkLabel" id="label3">
-                        <property name="visible">True</property>
-                        <property name="xalign">1</property>
-                        <property name="label" translatable="yes">Current Status: </property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="weight-status-label">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Do not weight cases</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-buttonbox1">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="transpose-dialog">
-    <property name="title">Transpose</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkHBox" id="hbox4">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkFrame" id="frame3">
-                <property name="visible">True</property>
-                <property name="shadow_type">GTK_SHADOW_IN</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <child>
-                      <widget class="PsppireDictView" id="source-treeview">
-                        <property name="visible">True</property>
-                        <property name="headers_visible">False</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <placeholder/>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkTable" id="table1">
-                <property name="visible">True</property>
-                <property name="n_rows">2</property>
-                <property name="n_columns">2</property>
-                <property name="column_spacing">5</property>
-                <property name="row_spacing">5</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox5">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkLabel" id="label4">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Name Variable:</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="new-name-entry">
-                        <property name="visible">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox4">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkLabel" id="label2">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Variable(s):</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkFrame" id="frame2">
-                        <property name="visible">True</property>
-                        <property name="shadow_type">GTK_SHADOW_IN</property>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <child>
-                              <widget class="GtkTreeView" id="variables-treeview">
-                                <property name="visible">True</property>
-                                <property name="headers_visible">False</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <placeholder/>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="PsppireSelector" id="psppire-selector3">
-                    <property name="visible">True</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options"></property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="PsppireSelector" id="psppire-selector2">
-                    <property name="visible">True</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options"></property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="padding">5</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-buttonbox2">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="split-file-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Split File</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox3">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox6">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkHBox" id="hbox5">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkFrame" id="frame5">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="shadow_type">GTK_SHADOW_IN</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <child>
-                          <widget class="PsppireDictView" id="split-file-dict-treeview">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                            <property name="fixed_height_mode">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <placeholder/>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox7">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="split-radiobutton0">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Analyze all cases.  Do not create groups.</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="split-radiobutton1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Compare groups.</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">split-radiobutton0</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="split-radiobutton2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Organize output by groups.</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">split-radiobutton0</property>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox6">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment1">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="yscale">0.5</property>
-                            <child>
-                              <widget class="PsppireSelector" id="split-file-selector">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="border_width">5</property>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="padding">18</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox8">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkLabel" id="label5">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">Groups based on:</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkFrame" id="frame4">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label_yalign">0</property>
-                                <property name="shadow_type">GTK_SHADOW_IN</property>
-                                <child>
-                                  <widget class="GtkScrolledWindow" id="scrolledwindow4">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                                    <child>
-                                      <widget class="GtkTreeView" id="split-file-grouping-vars">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="headers_visible">False</property>
-                                        <property name="fixed_height_mode">True</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                  <packing>
-                                    <property name="type">label_item</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="homogeneous">True</property>
-                        <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="split-radiobutton3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Sort the file by grouping variables.</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="split-radiobutton4">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">File is already sorted.</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">split-radiobutton3</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="padding">5</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkHSeparator" id="hseparator1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox7">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkLabel" id="label6">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Current Status : </property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label7">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Analysis by groups is off</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-buttonbox3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="sort-cases-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Sort Cases</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox4">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkHBox" id="hbox14">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow6">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                <child>
-                  <widget class="PsppireDictView" id="sort-cases-treeview1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="headers_visible">False</property>
-                    <property name="headers_clickable">True</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkAlignment" id="alignment6">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="yalign">0.25</property>
-                <property name="xscale">0</property>
-                <property name="yscale">0</property>
-                <child>
-                  <widget class="PsppireSelector" id="sort-cases-selector">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox12">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox16">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label18">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Sort by:</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow7">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="sort-cases-treeview2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                            <property name="headers_clickable">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="padding">5</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame9">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment5">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkVButtonBox" id="vbuttonbox4">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-                            <child>
-                              <widget class="GtkRadioButton" id="sort-cases-radiobutton0">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Ascending</property>
-                                <property name="response_id">0</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkRadioButton" id="sort-cases-radiobutton1">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Descending</property>
-                                <property name="response_id">0</property>
-                                <property name="draw_indicator">True</property>
-                                <property name="group">sort-cases-radiobutton0</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label17">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Sort Order</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="padding">5</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-buttonbox4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="compute-variable-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Compute Variable</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox5">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkAlignment" id="alignment8">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="bottom_padding">5</property>
-            <property name="left_padding">5</property>
-            <child>
-              <widget class="GtkHBox" id="hbox15">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox19">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="spacing">5</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox20">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkLabel" id="label20">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Target Variable:</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="compute-entry1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="compute-button1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Type &amp; Label</property>
-                        <property name="response_id">0</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow9">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_IN</property>
-                        <child>
-                          <widget class="PsppireDictView" id="compute-treeview1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox21">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label21">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">=</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="PsppireSelector" id="compute-selector1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="border_width">5</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkVBox" id="vbox17">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkVBox" id="vbox18">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkLabel" id="label19">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Numeric Expressions:</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow8">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_IN</property>
-                    <child>
-                      <widget class="GtkTextView" id="compute-textview1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox16">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="PsppireKeypad" id="psppire-keypad1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox22">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox17">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkLabel" id="label22">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Functions:</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="PsppireSelector" id="compute-selector2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="border_width">5</property>
-                            <property name="orientation">PSPPIRE_SELECT_SOURCE_BELOW_DEST</property>
-                          </widget>
-                          <packing>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow10">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="shadow_type">GTK_SHADOW_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="compute-treeview2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox18">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkButton" id="button4">
-                    <property name="sensitive">False</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">If...</property>
-                    <property name="response_id">0</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label23">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireHButtonBox" id="psppire-hbuttonbox2">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">5</property>
-                <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="pack_type">GTK_PACK_END</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="select-cases-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Select Cases</property>
-    <property name="modal">True</property>
-    <property name="orientation">PSPPIRE_VERTICAL</property>
-    <child internal-child="hbox">
-      <widget class="GtkVBox" id="dialog-hbox6">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkAlignment" id="alignment2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="top_padding">5</property>
-            <property name="left_padding">5</property>
-            <property name="right_padding">5</property>
-            <child>
-              <widget class="GtkHBox" id="hbox8">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow5">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_IN</property>
-                    <child>
-                      <widget class="PsppireDictView" id="select-cases-treeview">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="headers_visible">False</property>
-                        <property name="fixed_height_mode">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox13">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkFrame" id="Select5">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment11">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xscale">0</property>
-                            <property name="left_padding">12</property>
-                            <property name="right_padding">5</property>
-                            <child>
-                              <widget class="GtkTable" id="table2">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="n_rows">5</property>
-                                <property name="n_columns">2</property>
-                                <property name="row_spacing">5</property>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radiobutton-all">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="response_id">0</property>
-                                    <property name="active">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkAlignment" id="alignment18">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0</property>
-                                    <property name="xscale">0</property>
-                                    <property name="yscale">0</property>
-                                    <child>
-                                      <widget class="GtkRadioButton" id="radiobutton-filter-variable">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="response_id">0</property>
-                                        <property name="active">True</property>
-                                        <property name="draw_indicator">True</property>
-                                        <property name="group">radiobutton-all</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="top_attach">4</property>
-                                    <property name="bottom_attach">5</property>
-                                    <property name="x_options"></property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkAlignment" id="alignment17">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0</property>
-                                    <property name="xscale">0</property>
-                                    <property name="yscale">0</property>
-                                    <child>
-                                      <widget class="GtkRadioButton" id="radiobutton-range">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="response_id">0</property>
-                                        <property name="active">True</property>
-                                        <property name="draw_indicator">True</property>
-                                        <property name="group">radiobutton-all</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                    <property name="x_options"></property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkAlignment" id="alignment16">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0</property>
-                                    <property name="xscale">0</property>
-                                    <property name="yscale">0</property>
-                                    <child>
-                                      <widget class="GtkRadioButton" id="radiobutton-sample">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="response_id">0</property>
-                                        <property name="active">True</property>
-                                        <property name="draw_indicator">True</property>
-                                        <property name="group">radiobutton-all</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="x_options"></property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkAlignment" id="alignment13">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0</property>
-                                    <property name="xscale">0</property>
-                                    <property name="yscale">0</property>
-                                    <child>
-                                      <widget class="GtkRadioButton" id="radiobutton-if">
-                                        <property name="sensitive">False</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="response_id">0</property>
-                                        <property name="active">True</property>
-                                        <property name="draw_indicator">True</property>
-                                        <property name="group">radiobutton-all</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                    <property name="x_options"></property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkVBox" id="vbox26">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <child>
-                                      <widget class="GtkLabel" id="label25">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Use filter variable</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox19">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <child>
-                                          <widget class="PsppireSelector" id="psppire-selector-filter">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="border_width">5</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkEntry" id="filter-variable-entry">
-                                            <property name="visible">True</property>
-                                            <property name="sensitive">False</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">4</property>
-                                    <property name="bottom_attach">5</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkVBox" id="vbox25">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <child>
-                                      <widget class="GtkLabel" id="label15">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Based on time or case range</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox12">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <child>
-                                          <widget class="GtkButton" id="button-range">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Range...</property>
-                                            <property name="response_id">0</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="range-sample-label">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkVBox" id="vbox24">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <child>
-                                      <widget class="GtkLabel" id="label13">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Random sample of cases</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox11">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="spacing">5</property>
-                                        <child>
-                                          <widget class="GtkButton" id="button-sample">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Sample...</property>
-                                            <property name="response_id">0</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="random-sample-label">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkVBox" id="vbox14">
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <child>
-                                      <widget class="GtkLabel" id="label11">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">If condition is satisfied</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox9">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <child>
-                                          <widget class="GtkButton" id="button-if">
-                                            <property name="visible">True</property>
-                                            <property name="sensitive">False</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">If...</property>
-                                            <property name="response_id">0</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="label26">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkLabel" id="label10">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">All Cases</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="Select6">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Select</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkFrame" id="frame8">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment12">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="left_padding">12</property>
-                            <child>
-                              <widget class="GtkHButtonBox" id="filter-delete-button-box">
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radiobutton-filter">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="label" translatable="yes">Filtered</property>
-                                    <property name="response_id">0</property>
-                                    <property name="active">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radiobutton-delete">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="label" translatable="yes">Deleted</property>
-                                    <property name="response_id">0</property>
-                                    <property name="active">True</property>
-                                    <property name="draw_indicator">True</property>
-                                    <property name="group">radiobutton-filter</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label9">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Unselected Cases Are</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="pack_type">GTK_PACK_END</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireHButtonBox" id="psppire-hbuttonbox3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="comments-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Data File Comments</property>
-    <property name="modal">True</property>
-    <property name="orientation">PSPPIRE_VERTICAL</property>
-    <child internal-child="hbox">
-      <widget class="GtkVBox" id="dialog-hbox7">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkAlignment" id="alignment7">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="left_padding">5</property>
-            <property name="right_padding">5</property>
-            <child>
-              <widget class="GtkVBox" id="vbox9">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkLabel" id="label16">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Comments:</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow11">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_IN</property>
-                    <child>
-                      <widget class="GtkTextView" id="comments-textview1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox13">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkCheckButton" id="comments-checkbutton1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Display comments in output</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="padding">5</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="column-number-label">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="xalign">1</property>
-                <property name="label" translatable="yes">Column Number: 0</property>
-              </widget>
-              <packing>
-                <property name="padding">5</property>
-                <property name="pack_type">GTK_PACK_END</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireHButtonBox" id="psppire-hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="select-cases-range-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Select Cases: Range</property>
-    <property name="modal">True</property>
-    <property name="orientation">PSPPIRE_VERTICAL</property>
-    <child internal-child="hbox">
-      <widget class="GtkVBox" id="dialog-hbox10">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkTable" id="table3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">3</property>
-            <property name="column_spacing">5</property>
-            <child>
-              <widget class="GtkSpinButton" id="range-dialog-last">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="truncate_multiline">True</property>
-                <property name="adjustment">1 1 100 1 10 10</property>
-              </widget>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkSpinButton" id="range-dialog-first">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="truncate_multiline">True</property>
-                <property name="adjustment">0 1 0 1 10 10</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label8">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">First case</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="x_options"></property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label12">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Last case</property>
-              </widget>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="x_options"></property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label14">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Observation</property>
-              </widget>
-              <packing>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="fill">False</property>
-            <property name="padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireHButtonBox" id="psppire-hbuttonbox4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="type-and-label-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Compute Variable: Type and Label</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox9">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox24">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkFrame" id="Label">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">5</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment11">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkTable" id="table2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="border_width">5</property>
-                        <property name="n_rows">2</property>
-                        <property name="n_columns">2</property>
-                        <child>
-                          <widget class="GtkLabel" id="label27">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Use expression as label</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox19">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="spacing">5</property>
-                            <child>
-                              <widget class="GtkLabel" id="label26">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Label:</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkEntry" id="type-and-label-label-entry">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                              </widget>
-                              <packing>
-                                <property name="pack_type">GTK_PACK_END</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radio-button-expression-label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radio-button-user-label</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radio-button-user-label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options"></property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label25">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Label</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="frame7">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">5</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment10">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkTable" id="table3">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="border_width">5</property>
-                        <property name="n_rows">2</property>
-                        <property name="n_columns">2</property>
-                        <child>
-                          <widget class="GtkHBox" id="hbox20">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkLabel" id="label29">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">String</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox21">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label30">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="label" translatable="yes">Width</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkSpinButton" id="type-and-label-width">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="adjustment">8 1 32767 1 10 10</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radio-button-string">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options"></property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radio-button-numeric">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radio-button-string</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options"></property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label28">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Numeric</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label15">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Type</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="goto-case-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Goto Case</property>
-    <property name="modal">True</property>
-    <property name="orientation">PSPPIRE_VERTICAL</property>
-    <child internal-child="hbox">
-      <widget class="GtkVBox" id="dialog-hbox10">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">5</property>
-        <child>
-          <widget class="GtkHBox" id="hbox22">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkLabel" id="label31">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="xalign">1</property>
-                <property name="label" translatable="yes">Goto Case Number:</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkSpinButton" id="goto-case-case-num-entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="adjustment">1 1 100 1 10 10</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="fill">False</property>
-            <property name="padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireHButtonBox" id="psppire-hbuttonbox4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-            <property name="buttons">PSPPIRE_BUTTON_GOTO_MASK | PSPPIRE_BUTTON_CANCEL_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="select-cases-random-sample-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Select Cases: Random Sample</property>
-    <property name="modal">True</property>
-    <property name="orientation">PSPPIRE_VERTICAL</property>
-    <child internal-child="hbox">
-      <widget class="GtkVBox" id="dialog-hbox13">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame6">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="top_padding">5</property>
-                <property name="bottom_padding">5</property>
-                <property name="left_padding">5</property>
-                <property name="right_padding">5</property>
-                <child>
-                  <widget class="GtkTable" id="select-cases-random-sample-table">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="n_rows">2</property>
-                    <property name="n_columns">2</property>
-                    <property name="column_spacing">5</property>
-                    <property name="row_spacing">5</property>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton-sample-percent">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="x_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton-sample-n-cases">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">radiobutton-sample-percent</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment4">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="xscale">0</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment9">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="xscale">0</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label32">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Sample Size</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireHButtonBox" id="psppire-hbuttonbox5">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
index 27a633f2ecf35c57cd30dc01ac85aa4a61db28a9..ee747ef90606b200b195d9fa497ce239457fe58d 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2004, 2005, 2006, 2009  Free Software Foundation
+   Copyright (C) 2004, 2005, 2006, 2009, 2010  Free Software Foundation
 
    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
 #ifndef PSPPIRE_H
 #define PSPPIRE_H
 
-#include <argp.h>
+struct source_stream;
 
-struct command_line_processor ;
-extern const struct argp non_option_argp ;
-
-void initialize (struct command_line_processor *, int argc, char **argv);
+void initialize (struct source_stream *, const char *data_file);
 void de_initialize (void);
 
 void psppire_quit (void);
diff --git a/src/ui/gui/psppire.ui b/src/ui/gui/psppire.ui
new file mode 100644 (file)
index 0000000..d1075c0
--- /dev/null
@@ -0,0 +1,2274 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="psppire" version="2054.17080"/>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="weight-cases-dialog">
+    <property name="title" translatable="yes">Weight Cases</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkHBox" id="hbox4">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="weight-cases-treeview">
+                    <property name="visible">True</property>
+                    <property name="headers_visible">False</property>
+                    <property name="fixed_height_mode">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox4">
+                <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkFrame" id="frame1">
+                    <property name="visible">True</property>
+                    <property name="border_width">5</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox2">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkRadioButton" id="weight-cases-radiobutton1">
+                            <property name="label" translatable="yes">Do not weight cases</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="receives_default">False</property>
+                            <property name="focus_on_click">False</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton2">
+                            <property name="label" translatable="yes">Weight cases by</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">False</property>
+                            <property name="receives_default">False</property>
+                            <property name="focus_on_click">False</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">weight-cases-radiobutton1</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox3">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="PsppireSelector" id="weight-cases-selector">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="receives_default">False</property>
+                                <property name="border_width">5</property>
+                                <property name="source_widget">weight-cases-treeview</property>
+                                <property name="dest_widget">weight-cases-entry</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkVBox" id="vbox3">
+                                <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkLabel" id="label3">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Frequency Variable</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" id="weight-cases-entry">
+                                    <property name="visible">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label_item">
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</property>
+                        <property name="label" translatable="yes">Current Status: </property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="weight-status-label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Do not weight cases</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-buttonbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="transpose-dialog">
+    <property name="title" translatable="yes">Transpose</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkFrame" id="frame3">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <child>
+                      <object class="PsppireDictView" id="source-treeview">
+                        <property name="visible">True</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label_item">
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="table2">
+                <property name="visible">True</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">2</property>
+                <property name="column_spacing">5</property>
+                <property name="row_spacing">5</property>
+                <child>
+                  <object class="GtkVBox" id="vbox5">
+                    <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Name Variable:</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="new-name-entry">
+                        <property name="visible">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox1">
+                    <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Variable(s):</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame2">
+                        <property name="visible">True</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hscrollbar_policy">never</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <child>
+                              <object class="PsppireVarView" id="variables-treeview">
+                                <property name="visible">True</property>
+                                <property name="headers_visible">False</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label_item">
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="PsppireSelector" id="psppire-selector3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">source-treeview</property>
+                    <property name="dest_widget">new-name-entry</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options"></property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="PsppireSelector" id="psppire-selector2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">5</property>
+                    <property name="primary">True</property>
+                    <property name="source_widget">source-treeview</property>
+                    <property name="dest_widget">variables-treeview</property>
+                  </object>
+                  <packing>
+                    <property name="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-buttonbox2">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="split-file-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Split File</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox6">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkHBox" id="hbox5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkFrame" id="frame5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <child>
+                          <object class="PsppireDictView" id="split-file-dict-treeview">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                            <property name="fixed_height_mode">True</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label_item">
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox7">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkVButtonBox" id="vbuttonbox2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="layout_style">spread</property>
+                        <child>
+                          <object class="GtkRadioButton" id="split-radiobutton0">
+                            <property name="label" translatable="yes">Analyze all cases.  Do not create groups.</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="split-radiobutton1">
+                            <property name="label" translatable="yes">Compare groups.</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">split-radiobutton0</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="split-radiobutton2">
+                            <property name="label" translatable="yes">Organize output by groups.</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">split-radiobutton0</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHBox" id="hbox6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment2">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="yscale">0.5</property>
+                            <child>
+                              <object class="PsppireSelector" id="split-file-selector">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="border_width">5</property>
+                                <property name="source_widget">split-file-dict-treeview</property>
+                                <property name="dest_widget">split-file-grouping-vars</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">18</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkVBox" id="vbox8">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkLabel" id="label5">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Groups based on:</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkFrame" id="frame4">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label_xalign">0</property>
+                                <property name="label_yalign">0</property>
+                                <property name="shadow_type">in</property>
+                                <child>
+                                  <object class="GtkScrolledWindow" id="scrolledwindow5">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="hscrollbar_policy">never</property>
+                                    <property name="vscrollbar_policy">automatic</property>
+                                    <child>
+                                      <object class="PsppireVarView" id="split-file-grouping-vars">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="headers_visible">False</property>
+                                        <property name="fixed_height_mode">True</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child type="label_item">
+                                  <placeholder/>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVButtonBox" id="vbuttonbox1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="homogeneous">True</property>
+                        <property name="layout_style">spread</property>
+                        <child>
+                          <object class="GtkRadioButton" id="split-radiobutton3">
+                            <property name="label" translatable="yes">Sort the file by grouping variables.</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="split-radiobutton4">
+                            <property name="label" translatable="yes">File is already sorted.</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">split-radiobutton3</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="padding">5</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHSeparator" id="hseparator1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox7">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkLabel" id="label6">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Current Status : </property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label7">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Analysis by groups is off</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-buttonbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="compute-variable-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Compute Variable</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox5">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkAlignment" id="alignment8">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="bottom_padding">5</property>
+            <property name="left_padding">5</property>
+            <child>
+              <object class="GtkHBox" id="hbox15">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkVBox" id="vbox19">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox20">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkLabel" id="label20">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Target Variable:</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="compute-entry1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="compute-button1">
+                        <property name="label" translatable="yes">Type &amp; Label</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow9">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="PsppireDictView" id="compute-treeview1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox21">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label21">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">=</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="PsppireSelector" id="compute-selector1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="border_width">5</property>
+                        <property name="source_widget">compute-treeview1</property>
+                        <property name="dest_widget">compute-textview1</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox17">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkVBox" id="vbox18">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkLabel" id="label19">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Numeric Expressions:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow8">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkTextView" id="compute-textview1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox16">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="PsppireKeypad" id="psppire-keypad1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox22">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkHBox" id="hbox17">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <object class="GtkLabel" id="label22">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Functions:</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="PsppireSelector" id="compute-selector2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="border_width">5</property>
+                            <property name="orientation">source below destination</property>
+                            <property name="source_widget">compute-treeview2</property>
+                            <property name="dest_widget">compute-textview1</property>
+                          </object>
+                          <packing>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow10">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTreeView" id="compute-treeview2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox18">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkButton" id="button4">
+                    <property name="label" translatable="yes">If...</property>
+                    <property name="sensitive">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label23">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="layout_style">spread</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="pack_type">end</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="select-cases-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Select Cases</property>
+    <property name="modal">True</property>
+    <property name="orientation">Vertical</property>
+    <child internal-child="hbox">
+      <object class="GtkVBox" id="dialog-hbox6">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkAlignment" id="alignment1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="top_padding">5</property>
+            <property name="left_padding">5</property>
+            <property name="right_padding">5</property>
+            <child>
+              <object class="GtkHBox" id="hbox8">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow11">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="PsppireDictView" id="select-cases-treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                        <property name="fixed_height_mode">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox13">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkFrame" id="Select5">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label_xalign">0</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment11">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xscale">0</property>
+                            <property name="left_padding">12</property>
+                            <property name="right_padding">5</property>
+                            <child>
+                              <object class="GtkTable" id="table1">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="n_rows">5</property>
+                                <property name="n_columns">2</property>
+                                <property name="row_spacing">5</property>
+                                <child>
+                                  <object class="GtkRadioButton" id="radiobutton-all">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkAlignment" id="alignment18">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <object class="GtkRadioButton" id="radiobutton-filter-variable">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="active">True</property>
+                                        <property name="draw_indicator">True</property>
+                                        <property name="group">radiobutton-all</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">4</property>
+                                    <property name="bottom_attach">5</property>
+                                    <property name="x_options"></property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkAlignment" id="alignment17">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <object class="GtkRadioButton" id="radiobutton-range">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="active">True</property>
+                                        <property name="draw_indicator">True</property>
+                                        <property name="group">radiobutton-all</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">3</property>
+                                    <property name="bottom_attach">4</property>
+                                    <property name="x_options"></property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkAlignment" id="alignment16">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <object class="GtkRadioButton" id="radiobutton-sample">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="active">True</property>
+                                        <property name="draw_indicator">True</property>
+                                        <property name="group">radiobutton-all</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                    <property name="x_options"></property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkAlignment" id="alignment13">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <object class="GtkRadioButton" id="radiobutton-if">
+                                        <property name="sensitive">False</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="active">True</property>
+                                        <property name="draw_indicator">True</property>
+                                        <property name="group">radiobutton-all</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                    <property name="x_options"></property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkVBox" id="vbox26">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label25">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">Use filter variable</property>
+                                      </object>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkHBox" id="hbox19">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <child>
+                                          <object class="PsppireSelector" id="psppire-selector-filter">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="border_width">5</property>
+                                            <property name="source_widget">select-cases-treeview</property>
+                                            <property name="dest_widget">filter-variable-entry</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkEntry" id="filter-variable-entry">
+                                            <property name="visible">True</property>
+                                            <property name="sensitive">False</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">4</property>
+                                    <property name="bottom_attach">5</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkVBox" id="vbox25">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label15">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">Based on time or case range</property>
+                                      </object>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkHBox" id="hbox12">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <child>
+                                          <object class="GtkButton" id="button-range">
+                                            <property name="label" translatable="yes">Range...</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="range-sample-label">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">3</property>
+                                    <property name="bottom_attach">4</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkVBox" id="vbox24">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label13">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">Random sample of cases</property>
+                                      </object>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkHBox" id="hbox11">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="spacing">5</property>
+                                        <child>
+                                          <object class="GtkButton" id="button-sample">
+                                            <property name="label" translatable="yes">Sample...</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="random-sample-label">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkVBox" id="vbox14">
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label11">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">If condition is satisfied</property>
+                                      </object>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkHBox" id="hbox9">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <child>
+                                          <object class="GtkButton" id="button-if">
+                                            <property name="label" translatable="yes">If...</property>
+                                            <property name="visible">True</property>
+                                            <property name="sensitive">False</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="label26">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label10">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">All Cases</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="Select6">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Select</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame8">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label_xalign">0</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment12">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkHButtonBox" id="filter-delete-button-box">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="layout_style">spread</property>
+                                <child>
+                                  <object class="GtkRadioButton" id="radiobutton-filter">
+                                    <property name="label" translatable="yes">Filtered</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioButton" id="radiobutton-delete">
+                                    <property name="label" translatable="yes">Deleted</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_indicator">True</property>
+                                    <property name="group">radiobutton-filter</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label9">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Unselected Cases Are</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="pack_type">end</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireHButtonBox" id="psppire-hbuttonbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="comments-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Data File Comments</property>
+    <property name="modal">True</property>
+    <property name="orientation">Vertical</property>
+    <child internal-child="hbox">
+      <object class="GtkVBox" id="dialog-hbox7">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkAlignment" id="alignment7">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="left_padding">5</property>
+            <property name="right_padding">5</property>
+            <child>
+              <object class="GtkVBox" id="vbox9">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkLabel" id="label16">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Comments:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow12">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkTextView" id="comments-textview1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox13">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <object class="GtkCheckButton" id="comments-checkbutton1">
+                <property name="label" translatable="yes">Display comments in output</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">5</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="column-number-label">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="xalign">1</property>
+                <property name="label" translatable="yes">Column Number: 0</property>
+              </object>
+              <packing>
+                <property name="padding">5</property>
+                <property name="pack_type">end</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireHButtonBox" id="psppire-hbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="select-cases-range-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Select Cases: Range</property>
+    <property name="modal">True</property>
+    <property name="orientation">Vertical</property>
+    <child internal-child="hbox">
+      <object class="GtkVBox" id="dialog-hbox10">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkTable" id="table3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="n_rows">2</property>
+            <property name="n_columns">3</property>
+            <property name="column_spacing">5</property>
+            <child>
+              <object class="GtkSpinButton" id="range-dialog-last">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="truncate_multiline">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="range-dialog-first">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="truncate_multiline">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label8">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">First case</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label12">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Last case</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label14">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Observation</property>
+              </object>
+              <packing>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="fill">False</property>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireHButtonBox" id="psppire-hbuttonbox4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="type-and-label-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Compute Variable: Type and Label</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox9">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox10">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkFrame" id="Label">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkTable" id="table4">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="border_width">5</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">2</property>
+                        <child>
+                          <object class="GtkLabel" id="label27">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Use expression as label</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox10">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="spacing">5</property>
+                            <child>
+                              <object class="GtkLabel" id="label24">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Label:</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="type-and-label-label-entry">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                              </object>
+                              <packing>
+                                <property name="pack_type">end</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radio-button-expression-label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radio-button-user-label</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radio-button-user-label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="x_options"></property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label28">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Label</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame7">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment10">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkTable" id="table5">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="border_width">5</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">2</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox20">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <object class="GtkLabel" id="label29">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">String</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox21">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <object class="GtkLabel" id="label30">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label" translatable="yes">Width</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" id="type-and-label-width">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radio-button-string">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options"></property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radio-button-numeric">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radio-button-string</property>
+                          </object>
+                          <packing>
+                            <property name="x_options"></property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label31">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Numeric</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label32">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Type</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="goto-case-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Goto Case</property>
+    <property name="modal">True</property>
+    <property name="orientation">Vertical</property>
+    <child internal-child="hbox">
+      <object class="GtkVBox" id="dialog-hbox8">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkHBox" id="hbox22">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkLabel" id="label33">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="xalign">1</property>
+                <property name="label" translatable="yes">Goto Case Number:</property>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="goto-case-case-num-entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="fill">False</property>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireHButtonBox" id="psppire-hbuttonbox5">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="layout_style">spread</property>
+            <property name="buttons">PSPPIRE_BUTTON_GOTO_MASK | PSPPIRE_BUTTON_CANCEL_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="select-cases-random-sample-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Select Cases: Random Sample</property>
+    <property name="modal">True</property>
+    <property name="orientation">Vertical</property>
+    <child internal-child="hbox">
+      <object class="GtkVBox" id="dialog-hbox13">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="frame6">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment4">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="top_padding">5</property>
+                <property name="bottom_padding">5</property>
+                <property name="left_padding">5</property>
+                <property name="right_padding">5</property>
+                <child>
+                  <object class="GtkTable" id="select-cases-random-sample-table">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="n_rows">2</property>
+                    <property name="n_columns">2</property>
+                    <property name="column_spacing">5</property>
+                    <property name="row_spacing">5</property>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton-sample-percent">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton-sample-n-cases">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton-sample-percent</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkAlignment" id="alignment9">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkAlignment" id="alignment14">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label34">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Sample Size</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireHButtonBox" id="psppire-hbuttonbox6">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index b2894095b76c69335e6b3f73d3276305967b5787..fa998b47116b0c5d4ffff0d1e9b821f3b009cd83 100644 (file)
@@ -28,6 +28,7 @@
 #include <ui/gui/helper.h>
 #include <ui/gui/psppire-dialog.h>
 #include <ui/gui/psppire-var-store.h>
+#include <ui/gui/psppire-var-view.h>
 #include "executor.h"
 
 #include "gettext.h"
@@ -110,7 +111,7 @@ generate_syntax (const struct rank_dialog *rd)
 
   GString *str = g_string_new ("RANK VARIABLES=");
 
-  append_variable_names (str, rd->dict, GTK_TREE_VIEW (rd->rank_vars), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->rank_vars), 0, str);
 
   g_string_append_printf (str, " (%c)",
                   gtk_toggle_button_get_active (rd->ascending_togglebutton)
@@ -120,7 +121,7 @@ generate_syntax (const struct rank_dialog *rd)
     {
       g_string_append (str, "\n\tBY ");
 
-      append_variable_names (str, rd->dict, GTK_TREE_VIEW (rd->group_vars), 0);
+      psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->group_vars),  0, str);
     }
 
   g_string_append (str, "\n\t/PRINT = ");
@@ -217,19 +218,15 @@ set_sensitivity (struct rank_dialog *rd)
 
 /* Pops up the Rank dialog box */
 void
-rank_dialog (GObject *o, gpointer data)
+rank_dialog (PsppireDataWindow *de)
 {
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   struct rank_dialog rd;
 
   GtkBuilder * builder = builder_new ("rank.ui");
 
   GtkWidget *vars = get_widget_assert   (builder, "dict-treeview");
-  GtkWidget *selector1 = get_widget_assert (builder, "psppire-selector1");
-  GtkWidget *selector2 = get_widget_assert (builder, "psppire-selector2");
-
 
   GtkWidget *types_button = get_widget_assert (builder, "button1");
   GtkWidget *ties_button = get_widget_assert (builder, "button2");
@@ -306,26 +303,7 @@ rank_dialog (GObject *o, gpointer data)
 
   gtk_window_set_transient_for (GTK_WINDOW (rd.dialog), GTK_WINDOW (de));
 
-  g_object_set (vars, "dictionary", rd.dict, NULL);
-
-  set_dest_model (GTK_TREE_VIEW (rd.rank_vars), rd.dict);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector1),
-                                vars,
-                                rd.rank_vars,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
-  set_dest_model (GTK_TREE_VIEW (rd.group_vars), rd.dict);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector2),
-                                vars,
-                                rd.group_vars,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
+  g_object_set (vars, "model", rd.dict, NULL);
 
   g_signal_connect (types_button, "clicked",
                    G_CALLBACK (run_types_dialog),  &rd);
@@ -356,7 +334,7 @@ rank_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&rd);
-       paste_syntax_in_new_window (syntax);
+       paste_syntax_to_window (syntax);
        g_free (syntax);
       }
       break;
index 8a5064f5c7e58bbb5c7d9071a4a3cfab5be82447..8c21bd07b8900708ad95d0d01c91ea0478ec5fe6 100644 (file)
@@ -18,8 +18,8 @@
 #define __RANK_DIALOG_H
 
 
-#include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-void rank_dialog (GObject *o, gpointer data);
+void rank_dialog (PsppireDataWindow *);
 
 #endif
diff --git a/src/ui/gui/rank.glade b/src/ui/gui/rank.glade
deleted file mode 100644 (file)
index fd412df..0000000
+++ /dev/null
@@ -1,707 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.2 on Mon Dec 15 06:55:22 2008 by john@marilyn-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="rank-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Rank Cases</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkTable" id="table1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="n_rows">2</property>
-                <property name="n_columns">3</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow5">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                    <child>
-                      <widget class="PsppireDictView" id="dict-treeview">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="headers_visible">False</property>
-                        <property name="headers_clickable">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox4">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label3">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">By:</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="group-vars-treeview">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                            <property name="headers_clickable">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Variable(s):</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="variables-treeview">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                            <property name="headers_clickable">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="PsppireSelector" id="psppire-selector2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options"></property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="PsppireSelector" id="psppire-selector1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="x_options"></property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkFrame" id="frame1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkVButtonBox" id="vbuttonbox1">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="homogeneous">True</property>
-                            <child>
-                              <widget class="GtkRadioButton" id="radiobutton1">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">_Smallest Value</property>
-                                <property name="use_underline">True</property>
-                                <property name="response_id">0</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkRadioButton" id="radiobutton2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">_Largest Value</property>
-                                <property name="use_underline">True</property>
-                                <property name="response_id">0</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                                <property name="group">radiobutton1</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label4">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Assign rank 1 to:</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox5">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkCheckButton" id="summary-checkbutton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Display summary tables</property>
-                        <property name="use_underline">True</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkHButtonBox" id="hbuttonbox1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkButton" id="button1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Rank T_ypes</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="button2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">_Ties...</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="rank-types-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Rank Cases: Types</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkTable" id="table2">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="n_rows">3</property>
-                <property name="n_columns">2</property>
-                <child>
-                  <widget class="GtkCheckButton" id="sum-checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Sum of case weights</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="percent-checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Fractional rank as %</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="rfrac-checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Fractional rank</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="savage-checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Savage score</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="rank-checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Rank</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkCheckButton" id="ntiles-checkbutton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Ntiles</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkSpinButton" id="ntiles-entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="adjustment">0 0 100 1 10 10</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbbox3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkCheckButton" id="prop-checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Proportion Estimates</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="normal-checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Normal Scores</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="formula-frame">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbbox2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="spacing">5</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="blom-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Blom</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="tukey-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Tukey</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">blom-button</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="rankit-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Rankit</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">blom-button</property>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="vw-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Van der Wärden</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">blom-button</property>
-                          </widget>
-                          <packing>
-                            <property name="position">3</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Proportion Estimation Formula</property>
-                    <property name="use_markup">True</property>
-                    <property name="justify">GTK_JUSTIFY_FILL</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="ties-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Rank Cases: Ties</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox3">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <child>
-          <widget class="GtkFrame" id="frame2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox6">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkHButtonBox" id="hbuttonbox2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="mean-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">_Mean</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="low-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">_Low</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">mean-button</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="high-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">_High</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">mean-button</property>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="condense-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Sequential ranks to unique values</property>
-                        <property name="use_underline">True</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">mean-button</property>
-                      </widget>
-                      <packing>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label5">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Rank Assigned to Ties</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/rank.ui b/src/ui/gui/rank.ui
new file mode 100644 (file)
index 0000000..3dc0d28
--- /dev/null
@@ -0,0 +1,765 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="psppire" version="2053.63976"/>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="PsppireDialog" id="rank-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Rank Cases</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkTable" id="table1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">3</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="PsppireDictView" id="dict-treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">By:</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="group-vars-treeview">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Variable(s):</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="variables-treeview">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="PsppireSelector" id="psppire-selector2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">dict-treeview</property>
+                    <property name="dest_widget">group-vars-treeview</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="PsppireSelector" id="psppire-selector1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                    <property name="primary">True</property>
+                    <property name="source_widget">dict-treeview</property>
+                    <property name="dest_widget">variables-treeview</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="GtkFrame" id="frame1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVButtonBox" id="vbuttonbox1">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <object class="GtkRadioButton" id="radiobutton1">
+                                <property name="label" translatable="yes">_Smallest Value</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="radiobutton2">
+                                <property name="label" translatable="yes">_Largest Value</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">radiobutton1</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Assign rank 1 to:</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkCheckButton" id="summary-checkbutton">
+                        <property name="label" translatable="yes">_Display summary tables</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHButtonBox" id="hbuttonbox1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <object class="GtkButton" id="button1">
+                            <property name="label" translatable="yes">Rank T_ypes</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button2">
+                            <property name="label" translatable="yes">_Ties...</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="rank-types-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Rank Cases: Types</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkTable" id="table2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="n_rows">3</property>
+                <property name="n_columns">2</property>
+                <child>
+                  <object class="GtkCheckButton" id="sum-checkbutton">
+                    <property name="label" translatable="yes">Sum of case weights</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="percent-checkbutton">
+                    <property name="label" translatable="yes">Fractional rank as %</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="rfrac-checkbutton">
+                    <property name="label" translatable="yes">Fractional rank</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="savage-checkbutton">
+                    <property name="label" translatable="yes">Savage score</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="rank-checkbutton">
+                    <property name="label" translatable="yes">Rank</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkCheckButton" id="ntiles-checkbutton">
+                        <property name="label" translatable="yes">Ntiles</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="ntiles-entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="adjustment">adjustment1</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbbox3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkCheckButton" id="prop-checkbutton">
+                    <property name="label" translatable="yes">Proportion Estimates</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="normal-checkbutton">
+                    <property name="label" translatable="yes">Normal Scores</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="formula-frame">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkHBox" id="hbbox2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <object class="GtkRadioButton" id="blom-button">
+                            <property name="label" translatable="yes">Blom</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="tukey-button">
+                            <property name="label" translatable="yes">Tukey</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">blom-button</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="rankit-button">
+                            <property name="label" translatable="yes">Rankit</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">blom-button</property>
+                          </object>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="vw-button">
+                            <property name="label" translatable="yes">Van der W&#xE4;rden</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">blom-button</property>
+                          </object>
+                          <packing>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Proportion Estimation Formula</property>
+                    <property name="use_markup">True</property>
+                    <property name="justify">fill</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="ties-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Rank Cases: Ties</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <object class="GtkFrame" id="frame2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkVBox" id="vbox6">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkHButtonBox" id="hbuttonbox2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <object class="GtkRadioButton" id="mean-button">
+                            <property name="label" translatable="yes">_Mean</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="low-button">
+                            <property name="label" translatable="yes">_Low</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">mean-button</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="high-button">
+                            <property name="label" translatable="yes">_High</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">mean-button</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="condense-button">
+                        <property name="label" translatable="yes">_Sequential ranks to unique values</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="use_underline">True</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">mean-button</property>
+                      </object>
+                      <packing>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Rank Assigned to Ties</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+    <property name="page_size">0</property>
+  </object>
+</interface>
index 0bb82eb335a9a6d3c75a13f6c1cf34e47863c8a3..0a3ab0dafc5799acf0d999a749d2cdce57a5aae4 100644 (file)
@@ -26,6 +26,8 @@
 
 #include "executor.h"
 
+#include "psppire-var-view.h"
+
 #include <gtk/gtk.h>
 
 #include <xalloc.h>
@@ -337,13 +339,15 @@ struct recode_dialog
 
   gboolean input_var_is_string;
 
-  GtkListStore *var_map;
   GtkWidget *new_name_entry;
   GtkWidget *new_label_entry;
   GtkWidget *change_button;
 
   GtkWidget *string_button;
   GtkWidget *width_entry;
+
+  /* A hash table of struct nlp's indexed by variable */
+  GHashTable *varmap;
 };
 
 
@@ -352,33 +356,23 @@ static void run_old_and_new_dialog (struct recode_dialog *rd);
 static void
 refresh (PsppireDialog *dialog, struct recode_dialog *rd)
 {
+  GtkTreeModel *vars =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview));
+
+  gtk_list_store_clear (GTK_LIST_STORE (vars));
+
   gtk_widget_set_sensitive (rd->change_button, FALSE);
   gtk_widget_set_sensitive (rd->new_name_entry, FALSE);
   gtk_widget_set_sensitive (rd->new_label_entry, FALSE);
 
-
   if ( rd->different )
-    gtk_list_store_clear (GTK_LIST_STORE (rd->var_map));
-  else
-    {
-      GtkTreeModel *vars =
-       gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview));
-
-      gtk_list_store_clear (GTK_LIST_STORE (vars));
-    }
+    g_hash_table_remove_all (rd->varmap);
 
   gtk_list_store_clear (GTK_LIST_STORE (rd->value_map));
 }
 
 static char * generate_syntax (const struct recode_dialog *rd);
 
-enum {
-  COL_OLD,
-  COL_NEW_NAME,
-  COL_NEW_LABEL,
-  n_COL_VARS
-};
-
 enum {
   COL_VALUE_OLD,
   COL_VALUE_NEW,
@@ -403,26 +397,10 @@ dialog_state_valid (gpointer data)
 
   if ( rd->different )
     {
-      GtkTreeIter iter;
-
-      gboolean ok;
+      GtkTreeModel *model = GTK_TREE_MODEL (PSPPIRE_VAR_VIEW (rd->variable_treeview)->list);
 
-      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->var_map),
-                                              &iter);
-          ok;
-          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (rd->var_map),
-                                         &iter))
-       {
-         gchar *name = NULL;
-
-         gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
-                             COL_NEW_NAME, &name, -1);
-
-         if ( name == NULL )
-           return FALSE;
-
-         g_free (name);
-       }
+      if (g_hash_table_size (rd->varmap) != gtk_tree_model_iter_n_children (model, NULL) )
+       return FALSE;
     }
   else
     {
@@ -431,7 +409,6 @@ dialog_state_valid (gpointer data)
 
       if ( !gtk_tree_model_get_iter_first (vars, &not_used))
        return FALSE;
-
     }
 
   return TRUE;
@@ -478,38 +455,18 @@ static void recode_dialog (PsppireDataWindow *de, gboolean diff);
 
 /* Pops up the Recode Same version of the dialog box */
 void
-recode_same_dialog (GObject *o, gpointer data)
+recode_same_dialog (PsppireDataWindow *de)
 {
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
-
   recode_dialog (de, FALSE);
 }
 
 /* Pops up the Recode Different version of the dialog box */
 void
-recode_different_dialog (GObject *o, gpointer data)
+recode_different_dialog (PsppireDataWindow *de)
 {
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
-
   recode_dialog (de, TRUE);
 }
 
-static void
-render_new_var_name (GtkTreeViewColumn *tree_column,
-                    GtkCellRenderer *cell,
-                    GtkTreeModel *tree_model,
-                    GtkTreeIter *iter,
-                    gpointer data)
-{
-  gchar *new_var_name = NULL;
-
-  gtk_tree_model_get (tree_model, iter, COL_NEW_NAME, &new_var_name, -1);
-
-  g_object_set (cell, "text", new_var_name, NULL);
-
-  g_free (new_var_name);
-}
-
 
 /* This might need to be changed to something less naive.
    In particular, what happends with dates, etc?
@@ -686,6 +643,41 @@ on_acr_selection_change (GtkTreeSelection *selection, gpointer data)
     }
 }
 
+/* Name-Label pair */
+struct nlp
+{
+  char *name;
+  char *label;
+};
+
+static struct nlp *
+nlp_create (const char *name, const char *label)
+{
+  struct nlp *nlp = xmalloc (sizeof *nlp);
+
+  nlp->name = g_strdup (name);
+
+  nlp->label = NULL;
+
+  if ( 0 != strcmp ("", label))
+    nlp->label = g_strdup (label);
+
+  return nlp;
+}
+
+static void
+nlp_destroy (gpointer data)
+{
+  struct nlp *nlp = data ;
+  if ( ! nlp )
+    return;
+
+  g_free (nlp->name);
+  g_free (nlp->label);
+  g_free (nlp);
+}
+
+
 /* Callback which gets called when a new row is selected
    in the variable treeview.
    It sets the name and label entry widgets to reflect the
@@ -695,18 +687,18 @@ static void
 on_selection_change (GtkTreeSelection *selection, gpointer data)
 {
   struct recode_dialog *rd = data;
-  GtkTreeModel *model = GTK_TREE_MODEL (rd->var_map);
+
+  GtkTreeModel *model = GTK_TREE_MODEL (PSPPIRE_VAR_VIEW (rd->variable_treeview)->list);
 
   GList *rows = gtk_tree_selection_get_selected_rows (selection, &model);
 
   if ( rows && !rows->next)
     {
       /* Exactly one row is selected */
-
+      struct nlp *nlp;
+      struct variable *var;
       gboolean ok;
       GtkTreeIter iter;
-      gchar *name = NULL;
-      gchar *label = NULL;
 
       gtk_widget_set_sensitive  (rd->change_button, TRUE);
       gtk_widget_set_sensitive  (rd->new_name_entry, TRUE);
@@ -714,16 +706,22 @@ on_selection_change (GtkTreeSelection *selection, gpointer data)
 
       ok = gtk_tree_model_get_iter (model, &iter, (GtkTreePath*) rows->data);
 
-      gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
-                         COL_NEW_NAME, &name,
-                         COL_NEW_LABEL, &label,
+      gtk_tree_model_get (model, &iter,
+                         0, &var, 
                          -1);
 
-      gtk_entry_set_text (GTK_ENTRY (rd->new_name_entry), name ? name : "");
-      gtk_entry_set_text (GTK_ENTRY (rd->new_label_entry), label ? label : "");
+      nlp = g_hash_table_lookup (rd->varmap, var);
 
-      g_free (name);
-      g_free (label);
+      if (nlp)
+       {
+         gtk_entry_set_text (GTK_ENTRY (rd->new_name_entry), nlp->name ? nlp->name : "");
+         gtk_entry_set_text (GTK_ENTRY (rd->new_label_entry), nlp->label ? nlp->label : "");
+       }
+      else
+       {
+         gtk_entry_set_text (GTK_ENTRY (rd->new_name_entry), "");
+         gtk_entry_set_text (GTK_ENTRY (rd->new_label_entry), "");
+       }
     }
   else
     {
@@ -735,6 +733,7 @@ on_selection_change (GtkTreeSelection *selection, gpointer data)
       gtk_entry_set_text (GTK_ENTRY (rd->new_label_entry), "");
     }
 
+
   g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
   g_list_free (rows);
 }
@@ -762,12 +761,13 @@ on_convert_toggled (GtkToggleButton *b, struct recode_dialog *rd)
   gtk_widget_set_sensitive (rd->string_button, !active);
 }
 
-
 static void
 on_change_clicked (GObject *obj, gpointer data)
 {
   struct recode_dialog *rd = data;
-  GtkTreeModel *model = GTK_TREE_MODEL (rd->var_map);
+  struct variable *var = NULL;
+  struct nlp *nlp;
+  GtkTreeModel *model = GTK_TREE_MODEL (PSPPIRE_VAR_VIEW (rd->variable_treeview)->list);
   GtkTreeIter iter;
   GtkTreeSelection *selection =
     gtk_tree_view_get_selection (GTK_TREE_VIEW (rd->variable_treeview));
@@ -780,16 +780,22 @@ on_change_clicked (GObject *obj, gpointer data)
   const gchar *dest_var_label =
     gtk_entry_get_text (GTK_ENTRY (rd->new_label_entry));
 
-  if ( NULL == rows )
-    return;
+  if ( NULL == rows || rows->next != NULL)
+    goto finish;
 
   gtk_tree_model_get_iter (model, &iter, rows->data);
 
-  gtk_list_store_set (rd->var_map, &iter,
-                     COL_NEW_NAME, dest_var_name,
-                     COL_NEW_LABEL, dest_var_label,
-                     -1);
+  gtk_tree_model_get (model, &iter, 0, &var, -1);
+
+  g_hash_table_remove (rd->varmap, var);
+
+  nlp = nlp_create (dest_var_name, dest_var_label);
 
+  g_hash_table_insert (rd->varmap, var, nlp);
+
+  gtk_tree_model_row_changed (model, rows->data, &iter);
+
+ finish:
   g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
   g_list_free (rows);
 }
@@ -838,6 +844,32 @@ set_acr (struct recode_dialog *rd)
   psppire_acr_set_enabled (rd->acr, !g_str_equal (text, ""));
 }
 
+static void
+render_new_var_name (GtkTreeViewColumn *tree_column,
+                    GtkCellRenderer *cell,
+                    GtkTreeModel *tree_model,
+                    GtkTreeIter *iter,
+                    gpointer data)
+{
+  struct nlp *nlp = NULL;
+  struct recode_dialog *rd = data;
+
+  struct variable *var = NULL;
+
+  gtk_tree_model_get (tree_model, iter, 
+                     0, &var,
+                     -1);
+
+  nlp = g_hash_table_lookup (rd->varmap, var);
+
+  if ( nlp )
+    g_object_set (cell, "text", nlp->name, NULL);
+  else
+    g_object_set (cell, "text", "", NULL);
+}
+
+
+
 static void
 recode_dialog (PsppireDataWindow *de, gboolean diff)
 {
@@ -854,13 +886,11 @@ recode_dialog (PsppireDataWindow *de, gboolean diff)
 
   GtkWidget *output_variable_box = get_widget_assert (builder,"frame4");
 
-
   PsppireVarStore *vs = NULL;
-
   g_object_get (de->data_editor, "var-store", &vs, NULL);
 
   rd.change_button = get_widget_assert (builder, "change-button");
-
+  rd.varmap = NULL;
   rd.dialog = get_widget_assert   (builder, "recode-dialog");
   rd.dict_treeview = get_widget_assert (builder, "treeview1");
   rd.variable_treeview =   get_widget_assert (builder, "treeview2");
@@ -887,77 +917,50 @@ recode_dialog (PsppireDataWindow *de, gboolean diff)
 
   gtk_window_set_transient_for (GTK_WINDOW (rd.dialog), GTK_WINDOW (de));
 
+  g_object_set (rd.dict_treeview, "model", rd.dict, NULL);
 
-  g_object_set (rd.dict_treeview, "dictionary", rd.dict, NULL);
-
-  if ( ! rd.different )
-    {
-      set_dest_model (GTK_TREE_VIEW (rd.variable_treeview), rd.dict);
-    }
-  else
+  if (rd.different)
     {
+      GtkTreeModel *model = GTK_TREE_MODEL (PSPPIRE_VAR_VIEW (rd.variable_treeview)->list);
       GtkTreeSelection *sel;
-      GtkTreeViewColumn *col;
-      GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
-
-      rd.var_map = gtk_list_store_new (n_COL_VARS, G_TYPE_INT,
-                                                   G_TYPE_STRING,
-                                                   G_TYPE_STRING);
-
 
+      GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
 
-      gtk_tree_view_set_model (GTK_TREE_VIEW (rd.variable_treeview),
-                              GTK_TREE_MODEL (rd.var_map));
-
-      col = gtk_tree_view_column_new_with_attributes (_("Old"),
-                                                 renderer,
-                                                 "text", NULL,
-                                                 NULL);
+      GtkTreeViewColumn *col = gtk_tree_view_column_new_with_attributes (_("New"),
+                                                                        renderer,
+                                                                        "text", NULL,
+                                                                        NULL);
 
       gtk_tree_view_column_set_cell_data_func (col, renderer,
-                                              cell_var_name,
-                                              rd.dict, 0);
+                                              render_new_var_name,
+                                              &rd, NULL);
 
 
       gtk_tree_view_append_column (GTK_TREE_VIEW (rd.variable_treeview), col);
 
 
-      renderer = gtk_cell_renderer_text_new ();
-
-      col = gtk_tree_view_column_new_with_attributes (_("New"),
-                                                 renderer,
-                                                 "text", NULL,
-                                                 NULL);
-
-      gtk_tree_view_column_set_cell_data_func (col, renderer,
-                                              render_new_var_name,
-                                              NULL, NULL);
+      col = gtk_tree_view_get_column (GTK_TREE_VIEW (rd.variable_treeview), 0);
 
-
-      gtk_tree_view_append_column (GTK_TREE_VIEW (rd.variable_treeview), col);
+      g_object_set (col, "title", _("Old"), NULL);
 
       g_object_set (rd.variable_treeview, "headers-visible", TRUE, NULL);
 
-      g_signal_connect (rd.change_button, "clicked",
-                       G_CALLBACK (on_change_clicked),  &rd);
+      rd.varmap = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, nlp_destroy);
 
       sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (rd.variable_treeview));
+
       g_signal_connect (sel, "changed",
                        G_CALLBACK (on_selection_change), &rd);
 
-      g_signal_connect (rd.var_map, "row-inserted",
+      g_signal_connect (rd.change_button, "clicked",
+                       G_CALLBACK (on_change_clicked),  &rd);
+
+#if 0
+      g_signal_connect (model, "row-inserted",
                        G_CALLBACK (select_something), &rd);
+#endif
     }
 
-
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                rd.dict_treeview,
-                                rd.variable_treeview,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
   psppire_selector_set_allow (PSPPIRE_SELECTOR (selector), homogeneous_types);
 
   /* Set up the Old & New Values subdialog */
@@ -1094,7 +1097,7 @@ recode_dialog (PsppireDataWindow *de, gboolean diff)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&rd);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
@@ -1103,6 +1106,7 @@ recode_dialog (PsppireDataWindow *de, gboolean diff)
       break;
     }
 
+  g_hash_table_destroy (rd.varmap);
 
   gtk_list_store_clear (GTK_LIST_STORE (rd.value_map));
   g_object_unref (rd.value_map);
@@ -1276,7 +1280,6 @@ run_old_and_new_dialog (struct recode_dialog *rd)
     /* Find the type of the first variable (it's invariant that
        all variables are of the same type) */
     const struct variable *v;
-    gint idx;
     GtkTreeIter iter;
     GtkTreeModel *model =
       gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview));
@@ -1285,9 +1288,7 @@ run_old_and_new_dialog (struct recode_dialog *rd)
 
     g_return_if_fail (not_empty);
 
-    gtk_tree_model_get (model, &iter, 0, &idx, -1);
-
-    v = psppire_dict_get_variable (rd->dict, idx);
+    gtk_tree_model_get (model, &iter, 0, &v, -1);
 
     rd->input_var_is_string = var_is_alpha (v);
 
@@ -1416,33 +1417,26 @@ generate_syntax (const struct recode_dialog *rd)
   if ( rd->different &&
        gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->string_button)))
     {
-      GtkTreeIter iter;
+      GHashTableIter iter;
 
+      struct variable *var = NULL;
+      struct nlp *nlp = NULL;
 
-      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->var_map),
-                                              &iter);
-          ok;
-          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (rd->var_map), &iter))
+      g_hash_table_iter_init (&iter, rd->varmap);
+      while (g_hash_table_iter_next (&iter, (void**) &var, (void**) &nlp))
        {
-         gchar *name = NULL;
-
-         gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
-                             COL_NEW_NAME, &name, -1);
-
          g_string_append (str, "\nSTRING ");
-         g_string_append (str, name);
+         g_string_append (str, nlp->name);
          g_string_append_printf (str, " (A%d).",
                                  (int)
                                  gtk_spin_button_get_value (GTK_SPIN_BUTTON (rd->width_entry) )
                                  );
-
-         g_free (name);
        }
     }
 
   g_string_append (str, "\nRECODE ");
 
-  append_variable_names (str, rd->dict, GTK_TREE_VIEW (rd->variable_treeview), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->variable_treeview), 0, str);
 
   g_string_append (str, "\n\t");
 
@@ -1483,67 +1477,43 @@ generate_syntax (const struct recode_dialog *rd)
 
   if ( rd->different )
     {
+
       GtkTreeIter iter;
       g_string_append (str, "\n\tINTO ");
 
-      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->var_map),
-                                              &iter);
+      for (ok = psppire_var_view_get_iter_first (PSPPIRE_VAR_VIEW (rd->variable_treeview), &iter);
           ok;
-          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (rd->var_map), &iter))
-       {
-         gchar *name = NULL;
-
-         gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
-                             COL_NEW_NAME, &name, -1);
-
-         g_string_append (str, name);
-         g_string_append (str, " ");
+          ok = psppire_var_view_get_iter_next (PSPPIRE_VAR_VIEW (rd->variable_treeview), &iter))
+         {
+           struct nlp *nlp = NULL;
+           const struct variable *var = psppire_var_view_get_variable (PSPPIRE_VAR_VIEW (rd->variable_treeview), 0, &iter);
 
-         g_free (name);
-       }
+           nlp = g_hash_table_lookup (rd->varmap, var);
+           
+           g_string_append (str, nlp->name);
+           g_string_append (str, " ");
+         }
     }
 
   g_string_append (str, ".");
 
-
   /* If applicable, set labels for the new variables. */
   if ( rd->different )
     {
-      GtkTreeIter iter;
+      GHashTableIter iter;
 
-      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->var_map),
-                                              &iter);
-          ok;
-          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (rd->var_map), &iter))
+      struct variable *var = NULL;
+      struct nlp *nlp = NULL;
+
+      g_hash_table_iter_init (&iter, rd->varmap);
+      while (g_hash_table_iter_next (&iter, (void**) &var, (void**) &nlp))
        {
-         struct string ls;
-         gchar *label = NULL;
-         gchar *name = NULL;
-
-         gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
-                             COL_NEW_NAME, &name,
-                             COL_NEW_LABEL, &label, -1);
-
-         if ( 0 == strcmp (label, "") )
-           {
-             g_free (name);
-             g_free (label);
-             continue;
-           }
-
-         ds_init_empty (&ls);
-         syntax_gen_string (&ls, ss_cstr (label));
-         g_free (label);
-
-         g_string_append_printf (str, "\nVARIABLE LABELS %s %s.",
-                                 name, ds_cstr (&ls));
-
-         g_free (name);
-         ds_destroy (&ls);
+         if (nlp->label)
+           g_string_append_printf (str, "\nVARIABLE LABELS %s %s.",
+                                   nlp->name, nlp->label);
        }
     }
 
-
   g_string_append (str, "\nEXECUTE.\n");
 
 
index 8f251e1edd39c831b5d5872e6e62f3b03fd8f3eb..03e4a348e08418964d110c76958d41e5c1895d7d 100644 (file)
@@ -18,9 +18,9 @@
 #define __RECODE_DIALOG_H
 
 
-#include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-void recode_same_dialog (GObject *o, gpointer data);
-void recode_different_dialog (GObject *o, gpointer data);
+void recode_same_dialog (PsppireDataWindow * data);
+void recode_different_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/recode.glade b/src/ui/gui/recode.glade
deleted file mode 100644 (file)
index a643b9d..0000000
+++ /dev/null
@@ -1,988 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.2 on Sat Nov 10 12:40:56 2007 by john@marilyn-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="old-new-values-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">5</property>
-        <child>
-          <widget class="GtkFrame" id="frame2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <property name="right_padding">5</property>
-                <child>
-                  <widget class="GtkTable" id="table2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="n_rows">11</property>
-                    <property name="n_columns">2</property>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment11">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="xscale">0</property>
-                        <child>
-                          <widget class="GtkEntry" id="entry7">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">9</property>
-                        <property name="bottom_attach">10</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment10">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="xscale">0</property>
-                        <child>
-                          <widget class="GtkEntry" id="entry6">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">7</property>
-                        <property name="bottom_attach">8</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton4">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="x_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton6">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">radiobutton4</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                        <property name="x_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton7">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">radiobutton4</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                        <property name="x_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton8">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">radiobutton4</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">4</property>
-                        <property name="bottom_attach">5</property>
-                        <property name="x_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton10">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">radiobutton4</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">6</property>
-                        <property name="bottom_attach">7</property>
-                        <property name="x_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton5">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">radiobutton4</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">8</property>
-                        <property name="bottom_attach">9</property>
-                        <property name="x_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label6">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Value:</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label7">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">System Missing</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label8">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">System or User Missing</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkVBox" id="vbox2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment9">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="xscale">0</property>
-                            <child>
-                              <widget class="GtkEntry" id="entry5">
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label9">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">through</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment7">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="xscale">0</property>
-                            <child>
-                              <widget class="GtkEntry" id="entry3">
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">5</property>
-                        <property name="bottom_attach">6</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label11">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Range, LOWEST thru value</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">6</property>
-                        <property name="bottom_attach">7</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label12">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Range, value thru HIGHEST</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">8</property>
-                        <property name="bottom_attach">9</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioButton" id="radiobutton11">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">radiobutton4</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">10</property>
-                        <property name="bottom_attach">11</property>
-                        <property name="x_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label13">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">All other values</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">10</property>
-                        <property name="bottom_attach">11</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment6">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="xscale">0</property>
-                        <child>
-                          <widget class="GtkEntry" id="entry2">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label10">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Range:</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">4</property>
-                        <property name="bottom_attach">5</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label5">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Old Value</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkFrame" id="frame1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label_xalign">0</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkTable" id="table1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="n_rows">3</property>
-                        <property name="n_columns">2</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="x_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label2">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">System Missing</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label3">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Copy old values</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment2">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="xscale">0</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox1">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label4">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="xalign">1</property>
-                                    <property name="label" translatable="yes">Value: </property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="entry1">
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">New Value</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireAcr" id="psppire-acr1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">5</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="table3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="n_rows">2</property>
-                <property name="n_columns">2</property>
-                <child>
-                  <widget class="GtkCheckButton" id="checkbutton1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="checkbutton2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label14">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Convert numeric strings to numbers ('5' -&gt; 5)</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label15">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Output variables are strings</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox3">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkLabel" id="label16">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Width: </property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkSpinButton" id="spinbutton1">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="adjustment">8 1 255 1 8 0</property>
-                            <property name="numeric">True</property>
-                            <property name="update_policy">GTK_UPDATE_IF_VALID</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireHButtonBox" id="psppire-hbuttonbox1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">10</property>
-                <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="pack_type">GTK_PACK_END</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="recode-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Recode into Same Variables</property>
-    <property name="modal">True</property>
-    <property name="orientation">PSPPIRE_TABULAR</property>
-    <child internal-child="hbox">
-      <widget class="GtkTable" id="dialog-hbox3">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="n_rows">3</property>
-        <property name="n_columns">4</property>
-        <property name="column_spacing">5</property>
-        <property name="row_spacing">5</property>
-        <child>
-          <widget class="GtkLabel" id="label22">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-          </widget>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="right_attach">2</property>
-            <property name="top_attach">2</property>
-            <property name="bottom_attach">3</property>
-            <property name="y_options"></property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireSelector" id="psppire-selector1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="right_attach">2</property>
-            <property name="x_options"></property>
-            <property name="y_options"></property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox4">
-            <property name="visible">False</property>
-            <property name="sensitive">False</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkButton" id="button2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">If...</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label18">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">(optional case selection condition)</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="right_attach">4</property>
-            <property name="top_attach">2</property>
-            <property name="bottom_attach">3</property>
-            <property name="y_options"></property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="right_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow2">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-            <child>
-              <widget class="PsppireDictView" id="treeview1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="headers_visible">False</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="bottom_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label23">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-          </widget>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="right_attach">2</property>
-            <property name="top_attach">1</property>
-            <property name="bottom_attach">2</property>
-            <property name="x_options"></property>
-            <property name="y_options"></property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkFrame" id="frame4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment8">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox3">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label20">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Name:</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="dest-name-entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label21">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Label:</property>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="dest-label-entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                      </widget>
-                      <packing>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHButtonBox" id="hbuttonbox3">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <child>
-                          <widget class="GtkButton" id="change-button">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Change</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="padding">5</property>
-                        <property name="position">4</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label19">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Output Variable</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="right_attach">4</property>
-            <property name="top_attach">1</property>
-            <property name="bottom_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkVBox" id="vbox4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkFrame" id="frame3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment4">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="treeview2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label17">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Variables:</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkAlignment" id="alignment5">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="xalign">0</property>
-                <property name="xscale">0</property>
-                <child>
-                  <widget class="GtkHButtonBox" id="hbuttonbox1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkButton" id="button1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Old and New Values</property>
-                        <property name="response_id">0</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="right_attach">3</property>
-            <property name="bottom_attach">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/recode.ui b/src/ui/gui/recode.ui
new file mode 100644 (file)
index 0000000..af5ebef
--- /dev/null
@@ -0,0 +1,1019 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <requires lib="psppire" version="2054.17080"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="PsppireDialog" id="old-new-values-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkFrame" id="frame2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <property name="right_padding">5</property>
+                <child>
+                  <object class="GtkTable" id="table2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="n_rows">11</property>
+                    <property name="n_columns">2</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment11">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <object class="GtkEntry" id="entry7">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">9</property>
+                        <property name="bottom_attach">10</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkAlignment" id="alignment10">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <object class="GtkEntry" id="entry6">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">7</property>
+                        <property name="bottom_attach">8</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton6">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton7">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton8">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton10">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">6</property>
+                        <property name="bottom_attach">7</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">8</property>
+                        <property name="bottom_attach">9</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Value:</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label7">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">System Missing</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label8">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">System or User Missing</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVBox" id="vbox2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment9">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="xscale">0</property>
+                            <child>
+                              <object class="GtkEntry" id="entry5">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label9">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">through</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment7">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="xscale">0</property>
+                            <child>
+                              <object class="GtkEntry" id="entry3">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">5</property>
+                        <property name="bottom_attach">6</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label11">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Range, LOWEST thru value</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">6</property>
+                        <property name="bottom_attach">7</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label12">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Range, value thru HIGHEST</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">8</property>
+                        <property name="bottom_attach">9</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton11">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">10</property>
+                        <property name="bottom_attach">11</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label13">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">All other values</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">10</property>
+                        <property name="bottom_attach">11</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkAlignment" id="alignment6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <object class="GtkEntry" id="entry2">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label10">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Range:</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Old Value</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkTable" id="table1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">3</property>
+                        <property name="n_columns">2</property>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="x_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="x_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">System Missing</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Copy old values</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment2">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="xscale">0</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox1">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <object class="GtkLabel" id="label4">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="xalign">1</property>
+                                    <property name="label" translatable="yes">Value: </property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" id="entry1">
+                                    <property name="visible">True</property>
+                                    <property name="sensitive">False</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">New Value</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireAcr" id="psppire-acr1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="table3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">2</property>
+                <child>
+                  <object class="GtkCheckButton" id="checkbutton1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="x_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="checkbutton2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label14">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Convert numeric strings to numbers ('5' -&gt; 5)</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkLabel" id="label15">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Output variables are strings</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHBox" id="hbox3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <object class="GtkLabel" id="label16">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">Width: </property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="spinbutton1">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="adjustment">adjustment1</property>
+                            <property name="numeric">True</property>
+                            <property name="update_policy">if-valid</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">10</property>
+                <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="pack_type">end</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="recode-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Recode into Same Variables</property>
+    <property name="modal">True</property>
+    <property name="orientation">Tabular</property>
+    <child internal-child="hbox">
+      <object class="GtkTable" id="dialog-hbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="n_rows">3</property>
+        <property name="n_columns">4</property>
+        <property name="column_spacing">5</property>
+        <property name="row_spacing">5</property>
+        <child>
+          <object class="GtkLabel" id="label22">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+            <property name="y_options"></property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireSelector" id="psppire-selector1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="source_widget">treeview1</property>
+            <property name="dest_widget">treeview2</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="x_options"></property>
+            <property name="y_options"></property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox4">
+            <property name="sensitive">False</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkButton" id="button2">
+                <property name="label" translatable="yes">If...</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label18">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">(optional case selection condition)</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="right_attach">4</property>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+            <property name="y_options"></property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="right_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow2">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="hscrollbar_policy">never</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">etched-in</property>
+            <child>
+              <object class="PsppireDictView" id="treeview1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="headers_visible">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="bottom_attach">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label23">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="x_options"></property>
+            <property name="y_options"></property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment8">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkVBox" id="vbox3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label20">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Name:</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="dest-name-entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label21">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Label:</property>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="dest-label-entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHButtonBox" id="hbuttonbox3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <object class="GtkButton" id="change-button">
+                            <property name="label" translatable="yes">Change</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="padding">5</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label19">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Output Variable</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="right_attach">4</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkFrame" id="frame3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="treeview2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label17">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Variables:</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="xalign">0</property>
+                <property name="xscale">0</property>
+                <child>
+                  <object class="GtkHButtonBox" id="hbuttonbox1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkButton" id="button1">
+                        <property name="label" translatable="yes">Old and New Values</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="right_attach">3</property>
+            <property name="bottom_attach">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="value">8</property>
+    <property name="lower">1</property>
+    <property name="upper">255</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">8</property>
+  </object>
+</interface>
index eaca17e074e49aef32c5cbbb7447ef3c012b94b8..d6997f74e716d6065b3477db92d95cfbc3934b7a 100644 (file)
@@ -30,6 +30,7 @@
 #include <ui/gui/helper.h>
 #include <ui/gui/psppire-dialog.h>
 #include <ui/gui/psppire-var-store.h>
+#include <ui/gui/psppire-var-view.h>
 
 
 #include "gettext.h"
@@ -157,9 +158,9 @@ generate_syntax (const struct regression_dialog *rd)
   GString *string = g_string_new ("REGRESSION");
 
   g_string_append (string, "\n\t/VARIABLES=");
-  append_variable_names (string, rd->dict, GTK_TREE_VIEW (rd->indep_vars), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->indep_vars), 0, string);
   g_string_append (string, "\n\t/DEPENDENT=\t");
-  append_variable_names (string, rd->dict, GTK_TREE_VIEW (rd->dep_vars), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->dep_vars), 0, string);
 
   selected = 0;
   for (i = 0, ok = gtk_tree_model_get_iter_first (rd->stat, &iter); ok; 
@@ -221,24 +222,22 @@ dialog_state_valid (gpointer data)
 
 /* Pops up the Regression dialog box */
 void
-regression_dialog (GObject *o, gpointer data)
+regression_dialog (PsppireDataWindow *de)
 {
   gint response;
   struct regression_dialog rd;
 
   GtkBuilder *xml = builder_new ("regression.ui");
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
   PsppireVarStore *vs;
 
   GtkWidget *dialog = get_widget_assert   (xml, "regression-dialog");
   GtkWidget *source = get_widget_assert   (xml, "dict-view");
   GtkWidget *dest_dep =   get_widget_assert   (xml, "dep-view");
   GtkWidget *dest_indep =   get_widget_assert   (xml, "indep-view");
-  GtkWidget *dep_selector = get_widget_assert (xml, "dep-selector");
-  GtkWidget *indep_selector = get_widget_assert (xml, "indep-selector");
   GtkWidget *stat_button = get_widget_assert (xml, "stat-button");
   GtkWidget *save_button = get_widget_assert (xml, "save-button");
 
+  GtkWidget *dep_selector = get_widget_assert (xml, "dep-selector");
 
   rd.stat_view = get_widget_assert (xml, "stat-view");
 
@@ -254,28 +253,12 @@ regression_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   g_object_get (vs, "dictionary", &rd.dict, NULL);
-  g_object_set (source, "dictionary", rd.dict, NULL);
-
-  set_dest_model (GTK_TREE_VIEW (dest_dep), rd.dict);
-  set_dest_model (GTK_TREE_VIEW (dest_indep), rd.dict);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (dep_selector),
-                                source,
-                                dest_dep,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (indep_selector),
-                                source,
-                                dest_indep,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
+  g_object_set (source, "model", rd.dict, NULL);
 
   rd.dep_vars = GTK_TREE_VIEW (dest_dep);
   rd.indep_vars = GTK_TREE_VIEW (dest_indep);
 
+  psppire_selector_set_allow (PSPPIRE_SELECTOR (dep_selector), numeric_only);
 
   rd.save_dialog = get_widget_assert (xml, "save-dialog");
   rd.pred_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "pred-button"));
@@ -317,7 +300,7 @@ regression_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&rd);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
index d34a61c9f059a496999d873d85d2b9ce8e057383..32067cc9725152ccf06fb3b669b2e32fa99ca0ac 100644 (file)
@@ -18,8 +18,8 @@
 #define __REGRESSION_DIALOG_H
 
 
-#include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-void regression_dialog (GObject *o, gpointer data);
+void regression_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/regression.glade b/src/ui/gui/regression.glade
deleted file mode 100644 (file)
index e6bac4d..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.0 on Sat Mar  1 12:42:34 2008 by john@marilyn-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="regression-dialog">
-    <property name="title">Regression</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkTable" id="table1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="n_rows">3</property>
-            <property name="n_columns">3</property>
-            <child>
-              <widget class="GtkHButtonBox" id="hbuttonbox1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-                <child>
-                  <widget class="GtkButton" id="stat-button">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Statistics...</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="save-button">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Save...</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="right_attach">3</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="y_options"></property>
-                <property name="y_padding">5</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireSelector" id="dep-selector">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="no_show_all">True</property>
-                <property name="border_width">5</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="x_options"></property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireSelector" id="indep-selector">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="no_show_all">True</property>
-                <property name="border_width">5</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options"></property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkScrolledWindow" id="variables">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                <child>
-                  <widget class="PsppireDictView" id="dict-view">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="headers_visible">False</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="frame2">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="dep-view">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                            <property name="headers_clickable">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Dependent</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="frame3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="indep-view">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                            <property name="headers_clickable">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label3">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Independent</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="save-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Regression: Save</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox5">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkCheckButton" id="pred-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Predicted values</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkCheckButton" id="resid-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Residuals</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="statistics-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Regression: Statistics</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox3">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="shadow_type">GTK_SHADOW_NONE</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow4">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                    <child>
-                      <widget class="GtkTreeView" id="stat-view">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="headers_visible">False</property>
-                        <property name="headers_clickable">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Statistics</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/regression.ui b/src/ui/gui/regression.ui
new file mode 100644 (file)
index 0000000..7c454b7
--- /dev/null
@@ -0,0 +1,367 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <requires lib="psppire" version="2054.17080"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="regression-dialog">
+    <property name="title" translatable="yes">Regression</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkTable" id="table1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="n_rows">3</property>
+            <property name="n_columns">3</property>
+            <child>
+              <object class="GtkHButtonBox" id="hbuttonbox1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="layout_style">spread</property>
+                <child>
+                  <object class="GtkButton" id="stat-button">
+                    <property name="label" translatable="yes">Statistics...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="save-button">
+                    <property name="label" translatable="yes">Save...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="right_attach">3</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options"></property>
+                <property name="y_padding">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireSelector" id="dep-selector">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="no_show_all">True</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">dict-view</property>
+                <property name="dest_widget">dep-view</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireSelector" id="indep-selector">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="no_show_all">True</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">dict-view</property>
+                <property name="dest_widget">indep-view</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="variables">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="dict-view">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="dep-view">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Dependent</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="indep-view">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Independent</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="save-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Regression: Save</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox5">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkCheckButton" id="pred-button">
+                <property name="label" translatable="yes">Predicted values</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="resid-button">
+                <property name="label" translatable="yes">Residuals</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="statistics-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Regression: Statistics</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="GtkTreeView" id="stat-view">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Statistics</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 66c8bf5ce4b3eed41425643db8bd3eb5ec043790..8587b723f023eea6234aaadf344e3d075c53905e 100644 (file)
@@ -24,6 +24,7 @@
 #include "psppire-dialog.h"
 
 #include "psppire-data-window.h"
+#include "psppire-var-view.h"
 
 #include "executor.h"
 #include "helper.h"
@@ -109,20 +110,17 @@ dialog_state_valid (gpointer data)
 
 /* Pops up the Reliability dialog box */
 void
-reliability_dialog (GObject *o, gpointer data)
+reliability_dialog (PsppireDataWindow *de)
 {
   struct reliability rd;
   gint response;
 
   GtkBuilder *xml = builder_new ("reliability.ui");
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
   PsppireVarStore *vs;
 
   GtkWidget *dialog = get_widget_assert   (xml, "reliability-dialog");
   GtkWidget *source = get_widget_assert   (xml, "dict-view");
 
-  GtkWidget *selector = get_widget_assert (xml, "psppire-selector1");
-
   rd.split_point_hbox = get_widget_assert (xml, "split-point-hbox");
 
   rd.variables = get_widget_assert   (xml, "treeview2");
@@ -138,16 +136,7 @@ reliability_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   g_object_get (vs, "dictionary", &rd.dict, NULL);
-  g_object_set (source, "dictionary", rd.dict, NULL);
-
-  set_dest_model (GTK_TREE_VIEW (rd.variables), rd.dict);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                source,
-                                rd.variables,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
+  g_object_set (source, "model", rd.dict, NULL);
 
   {
     GtkTreeModel *tm =
@@ -184,7 +173,7 @@ reliability_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&rd);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
@@ -206,7 +195,7 @@ generate_syntax (const struct reliability *rd)
   GString *string = g_string_new ("RELIABILITY");
 
   g_string_append (string, "\n\t/VARIABLES=");
-  append_variable_names (string, rd->dict, GTK_TREE_VIEW (rd->variables), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->variables), 0, string);
 
 
   g_string_append (string, "\n\t/MODEL=");
index 5e8bfbfc18e662a6c8b6d74361d30b06fa43d7a1..b79483a024995c6c5b132df57e34065e5151c211 100644 (file)
@@ -18,8 +18,8 @@
 #define __RELIABILITY_DIALOG_H
 
 
-#include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-void reliability_dialog (GObject *o, gpointer data);
+void reliability_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/reliability.glade b/src/ui/gui/reliability.glade
deleted file mode 100644 (file)
index fd10686..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Fri Apr  3 12:11:45 2009 -->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="reliability-dialog">
-    <property name="title" translatable="yes">Reliability Analysis</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox1">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="spacing">12</property>
-            <child>
-              <widget class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                    <child>
-                      <widget class="PsppireDictView" id="dict-view">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="has_tooltip">True</property>
-                        <property name="border_width">5</property>
-                        <property name="headers_visible">False</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <widget class="PsppireSelector" id="psppire-selector1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="no_show_all">True</property>
-                        <property name="border_width">5</property>
-                        <property name="response_id">0</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame1">
-                    <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">GTK_SHADOW_NONE</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment1">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                            <child>
-                              <widget class="GtkTreeView" id="treeview2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="headers_visible">False</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Items:</property>
-                        <property name="use_markup">True</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox2">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkLabel" id="">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Model:   </property>
-                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="combobox1">
-                    <property name="visible">True</property>
-                    <property name="items" translatable="yes">Alpha
-Split</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="split-point-hbox">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Variables in first split:</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="spinbutton1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="adjustment">0 0 100 1 10 10</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/reliability.ui b/src/ui/gui/reliability.ui
new file mode 100644 (file)
index 0000000..588e5e2
--- /dev/null
@@ -0,0 +1,219 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-requires psppire 0.0 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+    <property name="page_size">0</property>
+  </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Alpha</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Split</col>
+      </row>
+    </data>
+  </object>
+  <object class="PsppireDialog" id="reliability-dialog">
+    <property name="title" translatable="yes">Reliability Analysis</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox5">
+        <property name="visible">True</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="PsppireDictView" id="dict-view">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="border_width">5</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="PsppireSelector" id="psppire-selector1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="no_show_all">True</property>
+                        <property name="border_width">5</property>
+                        <property name="source_widget">dict-view</property>
+                        <property name="dest_widget">treeview2</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame1">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hscrollbar_policy">never</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">etched-in</property>
+                            <child>
+                              <object class="PsppireVarView" id="treeview2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="headers_visible">False</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Items:</property>
+                        <property name="use_markup">True</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox2">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Model:   </property>
+                    <property name="justify">right</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="combobox1">
+                    <property name="visible">True</property>
+                    <property name="model">model1</property>
+                    <child>
+                      <object class="GtkCellRendererText" id="renderer1"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="split-point-hbox">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Variables in first split:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="spinbutton1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="adjustment">adjustment1</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/ui/gui/roc-dialog.c b/src/ui/gui/roc-dialog.c
new file mode 100644 (file)
index 0000000..45972d5
--- /dev/null
@@ -0,0 +1,259 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dialog-common.h"
+#include <language/syntax-string-source.h>
+#include <ui/syntax-gen.h>
+#include <libpspp/str.h>
+
+#include "roc-dialog.h"
+#include "psppire-selector.h"
+#include "psppire-dictview.h"
+#include "psppire-dialog.h"
+
+#include "psppire-data-window.h"
+#include "psppire-var-view.h"
+
+#include "executor.h"
+#include "helper.h"
+
+#include <gtk/gtk.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
+struct roc
+{
+  PsppireDict *dict;
+
+  GtkWidget *test_variables;
+  GtkWidget *state_variable;
+  GtkWidget *state_value;
+
+  GtkWidget *curve;
+  GtkWidget *reference;
+  GtkWidget *standard_error;
+  GtkWidget *coordinates;
+};
+
+
+static char * generate_syntax (const struct roc *rd);
+
+
+static void
+refresh (struct roc *rd)
+{
+  GtkTreeModel *liststore =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (rd->test_variables));
+  gtk_list_store_clear (GTK_LIST_STORE (liststore));
+
+  gtk_entry_set_text (GTK_ENTRY (rd->state_variable), "");
+  gtk_entry_set_text (GTK_ENTRY (rd->state_value), "");
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->curve),          TRUE);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->reference),      FALSE);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->standard_error), FALSE);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->coordinates),    FALSE);
+}
+
+
+static gboolean
+dialog_state_valid (gpointer data)
+{
+  struct roc *rd = data;
+  const gchar *text;
+
+  GtkTreeModel *liststore =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (rd->test_variables));
+
+  if  (gtk_tree_model_iter_n_children (liststore, NULL) < 1)
+    return FALSE;
+
+  
+  text = gtk_entry_get_text (GTK_ENTRY (rd->state_variable));
+  if ( 0 == strcmp ("", text))
+    return FALSE;
+
+
+  text = gtk_entry_get_text (GTK_ENTRY (rd->state_value));
+  if ( 0 == strcmp ("", text))
+    return FALSE;
+
+
+  return TRUE;
+}
+
+static void
+on_curve_button_toggle  (GtkCheckButton *curve, struct roc *rd)
+{
+  if ( !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (curve)))
+    {
+      if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->reference)))
+       g_object_set (rd->reference, "inconsistent", TRUE, NULL);
+      g_object_set (rd->reference, "sensitive", FALSE, NULL);
+    }
+  else 
+    {
+      g_object_set (rd->reference, "inconsistent", FALSE, NULL);
+      g_object_set (rd->reference, "sensitive", TRUE, NULL);
+    }
+}
+
+
+/* Pops up the Roc dialog box */
+void
+roc_dialog (PsppireDataWindow *de)
+{
+  struct roc rd;
+  gint response;
+
+  GtkBuilder *xml = builder_new ("roc.ui");
+  PsppireVarStore *vs;
+
+  GtkWidget *dialog = get_widget_assert   (xml, "roc-dialog");
+  GtkWidget *source = get_widget_assert   (xml, "dict-view");
+
+  rd.test_variables    = get_widget_assert   (xml, "psppire-var-view1");
+  rd.state_variable    = get_widget_assert   (xml, "entry1");
+  rd.state_value       = get_widget_assert   (xml, "entry2");
+
+  rd.curve          = get_widget_assert   (xml, "curve");
+  rd.reference      = get_widget_assert   (xml, "reference-line");
+  rd.standard_error = get_widget_assert   (xml, "standard-error");
+  rd.coordinates    = get_widget_assert   (xml, "co-ordinates");
+
+
+  g_object_get (de->data_editor, "var-store", &vs, NULL);
+
+  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
+
+  g_object_get (vs, "dictionary", &rd.dict, NULL);
+  g_object_set (source, "model", rd.dict, NULL);
+
+  g_signal_connect (rd.curve, "toggled", G_CALLBACK (on_curve_button_toggle), &rd);
+
+  g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh),  &rd);
+
+  psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
+                                     dialog_state_valid, &rd);
+
+  psppire_selector_set_allow (PSPPIRE_SELECTOR (get_widget_assert (xml, "dep-selector")),
+                             numeric_only);
+
+  response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
+
+  switch (response)
+    {
+    case GTK_RESPONSE_OK:
+      {
+       gchar *syntax = generate_syntax (&rd);
+
+       struct getl_interface *sss = create_syntax_string_source (syntax);
+       execute_syntax (sss);
+
+       g_free (syntax);
+      }
+      break;
+    case PSPPIRE_RESPONSE_PASTE:
+      {
+       gchar *syntax = generate_syntax (&rd);
+        paste_syntax_to_window (syntax);
+
+       g_free (syntax);
+      }
+      break;
+    default:
+      break;
+    }
+
+  g_object_unref (xml);
+}
+
+
+\f
+
+static char *
+generate_syntax (const struct roc *rd)
+{
+  gchar *text;
+  const gchar *var_name = gtk_entry_get_text (GTK_ENTRY (rd->state_variable));
+  GString *string = g_string_new ("ROC");
+
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->test_variables), 0, string);
+
+  g_string_append (string, " BY ");
+
+  g_string_append (string, var_name);
+
+  g_string_append (string, " (");
+  {
+    const gchar *value = gtk_entry_get_text (GTK_ENTRY (rd->state_value));
+
+    const struct variable *var = psppire_dict_lookup_var (rd->dict, var_name);
+
+    g_return_val_if_fail (var, NULL);
+
+    if ( var_is_alpha (var))
+      {
+       struct string xx;
+       ds_init_empty (&xx);
+       syntax_gen_string (&xx, ss_cstr (value));
+       g_string_append (string, ds_cstr (&xx));
+       ds_destroy (&xx);
+      }
+    else
+      g_string_append (string, value);
+  }
+  g_string_append (string, ")");
+
+
+  /* The /PLOT subcommand */
+  g_string_append (string, "\n\t/PLOT ");
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->curve)))
+    {
+      g_string_append (string, "CURVE");
+      if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->reference)))
+       g_string_append (string, " (REFERENCE)");
+    }
+  else
+    g_string_append (string, "NONE");
+
+
+  /* The /PRINT subcommand */
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->standard_error)) ||
+       gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->coordinates)) )
+    {
+      g_string_append (string, "\n\t/PRINT");
+
+      if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->standard_error)))
+       g_string_append (string, " SE");
+
+      if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->coordinates)))
+       g_string_append (string, " COORDINATES");
+    }
+
+  g_string_append (string, ".\n");
+
+  text = string->str;
+
+  g_string_free (string, FALSE);
+
+  return text;
+}
diff --git a/src/ui/gui/roc-dialog.h b/src/ui/gui/roc-dialog.h
new file mode 100644 (file)
index 0000000..3a178c3
--- /dev/null
@@ -0,0 +1,25 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2009  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef __ROC_DIALOG_H
+#define __ROC_DIALOG_H
+
+
+#include "psppire-data-window.h"
+
+void roc_dialog (PsppireDataWindow * data);
+
+#endif
diff --git a/src/ui/gui/roc.ui b/src/ui/gui/roc.ui
new file mode 100644 (file)
index 0000000..74bd815
--- /dev/null
@@ -0,0 +1,327 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="psppire" version="2054.17080"/>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="roc-dialog">
+    <property name="title" translatable="yes">ROC Curve</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkTable" id="table1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="n_rows">3</property>
+            <property name="n_columns">3</property>
+            <child>
+              <object class="PsppireSelector" id="dep-selector">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="no_show_all">True</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">dict-view</property>
+                <property name="dest_widget">psppire-var-view1</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireSelector" id="indep-selector">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="no_show_all">True</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">dict-view</property>
+                <property name="dest_widget">entry1</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="variables">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="dict-view">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="bottom_attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="psppire-var-view1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="border_width">5</property>
+                            <property name="headers_visible">False</property>
+                            <property name="headers_clickable">False</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">_Test Variable:</property>
+                    <property name="use_markup">True</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkEntry" id="entry1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">&#x2022;</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">_State Variable:</property>
+                    <property name="use_markup">True</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkHBox" id="hbox1">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</property>
+                        <property name="label" translatable="yes">_Value of state variable:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">entry2</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="entry2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">&#x2022;</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame3">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVButtonBox" id="vbuttonbox1">
+                            <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkCheckButton" id="curve">
+                                <property name="label" translatable="yes">ROC C_urve</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox2">
+                                <property name="visible">True</property>
+                                <child>
+                                  <object class="GtkCheckButton" id="reference-line">
+                                    <property name="label" translatable="yes">_With diagonal reference line</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">12</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="standard-error">
+                                <property name="label" translatable="yes">Standard _Error and Confidence Interval</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="co-ordinates">
+                                <property name="label" translatable="yes">_Coordinate points of the ROC Curve</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Display</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options">GTK_FILL</property>
+                <property name="x_padding">5</property>
+                <property name="y_padding">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 56b10d2c5482e382da1b8b2df32f5646bb8fe127..244ad9d3e80dbfb91c15226626b39f6c814c4a77 100644 (file)
@@ -237,12 +237,11 @@ set_radiobutton (GtkWidget *button, gpointer data)
 
 /* Pops up the Select Cases dialog box */
 void
-select_cases_dialog (GObject *o, gpointer data)
+select_cases_dialog (PsppireDataWindow *de)
 {
   gint response;
   struct select_cases_dialog scd = {0,0,0,0,0,0};
   GtkWidget *dialog   ;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
   GtkWidget *entry = NULL;
   GtkWidget *selector ;
   GtkWidget *button_range;
@@ -326,17 +325,13 @@ select_cases_dialog (GObject *o, gpointer data)
   {
     GtkWidget *source = get_widget_assert   (scd.xml, "select-cases-treeview");
 
-    g_object_set (source, "dictionary",
+    g_object_set (source, "model",
                  scd.data_store->dict,
                  "selection-mode",
                  GTK_SELECTION_SINGLE, NULL);
 
-    psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                  source,
-                                  entry,
-                                  insert_source_row_into_entry,
-                                  is_currently_in_entry,
-                                  NULL);
+    psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector),
+                                  is_currently_in_entry);
   }
 
 
@@ -366,7 +361,7 @@ select_cases_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&scd);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
index b585b096fc43c966a342b8b692be714d1939894d..fa21d0176df87f5fd8392d0a57394e349fc9206a 100644 (file)
@@ -18,9 +18,8 @@
 #define __SELECT_CASES_DIALOG_H
 
 
-#include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-
-void select_cases_dialog (GObject *o, gpointer data);
+void select_cases_dialog (PsppireDataWindow * data);
 
 #endif
index b95de451a1cc03380e1dc38a9b864bc393650bb7..1043a5736b2f0defb62347befc6fe669dc441d1b 100644 (file)
@@ -1,5 +1,6 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
+if HAVE_GUI
 noinst_LTLIBRARIES += src/ui/gui/sheet/libsheet.la
 
 src_ui_gui_sheet_libsheet_la_CFLAGS = $(GTK_CFLAGS)
@@ -9,4 +10,4 @@ src_ui_gui_sheet_libsheet_la_SOURCES = \
        src/ui/gui/sheet/psppire-axis.h \
        src/ui/gui/sheet/psppire-sheetmodel.c \
        src/ui/gui/sheet/psppire-sheetmodel.h
-
+endif
index e229c9489f265fc84f2323084d7f1d8e6d260010..9cc879dc124c789333b6b7ed721a3d2e556bb5a0 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008, 2009  Free Software Foundation
+   Copyright (C) 2008, 2009, 2010  Free Software Foundation
 
    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
@@ -172,7 +172,7 @@ psppire_axis_start_pixel (const PsppireAxis *a, gint unit)
   fraction = (unit - start) / (gdouble) tower_node_get_size (&an->unit_node);
 
   return  tower_node_get_level (&an->pixel_node) +
-    nearbyint (fraction * tower_node_get_size (&an->pixel_node));
+    rint (fraction * tower_node_get_size (&an->pixel_node));
 }
 
 gint
@@ -196,8 +196,8 @@ psppire_axis_unit_size (const PsppireAxis *axis, gint unit)
 
   an = tower_data (n, struct axis_node, unit_node);
 
-  return nearbyint (tower_node_get_size (&an->pixel_node)
-                    / (gdouble) tower_node_get_size (&an->unit_node));
+  return rint (tower_node_get_size (&an->pixel_node)
+               / (gdouble) tower_node_get_size (&an->unit_node));
 }
 
 
@@ -472,7 +472,7 @@ split (PsppireAxis *a, gint posn)
   tower_resize (&a->unit_tower, &existing_node->unit_node, posn - start);
 
   tower_resize (&a->pixel_tower, &existing_node->pixel_node,
-               nearbyintf (fraction * existing_pixel_size));
+               rintf (fraction * existing_pixel_size));
 
   tower_insert (&a->unit_tower,
                existing_unit_size - (posn - start),
@@ -481,7 +481,7 @@ split (PsppireAxis *a, gint posn)
 
 
   tower_insert (&a->pixel_tower,
-               nearbyintf (existing_pixel_size * (1 - fraction)),
+               rintf (existing_pixel_size * (1 - fraction)),
                &new_node->pixel_node,
                tower_next (&a->pixel_tower, &existing_node->pixel_node));
 }
index 4e7ac61f5ca94ddd2670ccd8baadfeb65c0529e7..8252e3208f1d6c3362a2414940a8921287801d85 100644 (file)
@@ -24,6 +24,7 @@
 #include "dialog-common.h"
 #include "psppire-selector.h"
 #include "dict-display.h"
+#include "psppire-var-view.h"
 
 #include <language/syntax-string-source.h>
 #include "helper.h"
@@ -40,7 +41,7 @@ refresh (PsppireDialog *dialog, GtkTreeView *dest)
 
 struct sort_cases_dialog
 {
-  GtkTreeView *tv;
+  PsppireVarView *tv;
   PsppireDict *dict;
   GtkToggleButton *ascending;
 };
@@ -50,7 +51,7 @@ static gboolean
 dialog_state_valid (gpointer data)
 {
   struct sort_cases_dialog *scd = data;
-  GtkTreeModel *model = gtk_tree_view_get_model (scd->tv);
+  GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (scd->tv));
 
   gint n_rows = gtk_tree_model_iter_n_children  (model, NULL);
 
@@ -65,8 +66,8 @@ generate_syntax (const struct sort_cases_dialog *scd)
 {
   gchar *text;
   GString *string = g_string_new ("SORT CASES BY ");
-  gint n_vars = append_variable_names (string,
-                                      scd->dict, GTK_TREE_VIEW (scd->tv), 0);
+
+  gint n_vars = psppire_var_view_append_names (scd->tv, 0, string);
 
   if ( n_vars == 0 )
     g_string_assign (string, "");
@@ -89,22 +90,19 @@ generate_syntax (const struct sort_cases_dialog *scd)
 
 /* Pops up the Sort Cases dialog box */
 void
-sort_cases_dialog (GObject *o, gpointer data)
+sort_cases_dialog (PsppireDataWindow *de)
 {
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   struct sort_cases_dialog scd;
 
-  GtkBuilder *xml = builder_new ("psppire.ui");
+  GtkBuilder *xml = builder_new ("sort.ui");
 
   GtkWidget *dialog = get_widget_assert   (xml, "sort-cases-dialog");
 
 
   GtkWidget *source = get_widget_assert   (xml, "sort-cases-treeview1");
-  GtkWidget *selector = get_widget_assert (xml, "sort-cases-selector");
   GtkWidget *dest =   get_widget_assert   (xml, "sort-cases-treeview2");
-
   PsppireVarStore *vs = NULL;
 
   g_object_get (de->data_editor, "var-store", &vs, NULL);
@@ -112,20 +110,11 @@ sort_cases_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   g_object_get (vs, "dictionary", &scd.dict, NULL);
-  g_object_set (source, "dictionary", scd.dict, NULL);
-
-  set_dest_model (GTK_TREE_VIEW (dest), scd.dict);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                source,
-                                dest,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
+  g_object_set (source, "model", scd.dict, NULL);
 
   g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  dest);
 
-  scd.tv = GTK_TREE_VIEW (dest);
+  scd.tv = PSPPIRE_VAR_VIEW (dest);
   scd.ascending =
     GTK_TOGGLE_BUTTON (get_widget_assert (xml, "sort-cases-radiobutton0"));
 
@@ -152,7 +141,7 @@ sort_cases_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&scd);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
index 000d2c00810634bbecc07a921b8dbca26afe7477..0c2814f1a53589c4e9492b94ef2edcd5c7e76a78 100644 (file)
@@ -17,9 +17,8 @@
 #ifndef __SORT_CASES_DIALOG_H
 #define __SORT_CASES_DIALOG_H
 
+#include "psppire-data-window.h"
 
-#include <gtk/gtk.h>
-
-void sort_cases_dialog (GObject *o, gpointer data);
+void sort_cases_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/sort.ui b/src/ui/gui/sort.ui
new file mode 100644 (file)
index 0000000..096340e
--- /dev/null
@@ -0,0 +1,204 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="psppire" version="2054.17080"/>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="sort-cases-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Sort Cases</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox4">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkHBox" id="hbox14">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow6">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="sort-cases-treeview1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment6">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="yalign">0.25</property>
+                <property name="xscale">0</property>
+                <property name="yscale">0</property>
+                <child>
+                  <object class="PsppireSelector" id="sort-cases-selector">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">sort-cases-treeview1</property>
+                    <property name="dest_widget">sort-cases-treeview2</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox12">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkVBox" id="vbox16">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Sort by:</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow7">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="sort-cases-treeview2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="padding">5</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame9">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment5">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVButtonBox" id="vbuttonbox4">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="layout_style">spread</property>
+                            <child>
+                              <object class="GtkRadioButton" id="sort-cases-radiobutton0">
+                                <property name="label" translatable="yes">Ascending</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="sort-cases-radiobutton1">
+                                <property name="label" translatable="yes">Descending</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">sort-cases-radiobutton0</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label17">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Sort Order</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="padding">5</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-buttonbox4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 613f8e91fe601cf544f32bb62933c00211c3869a..9088046ec29b805c3bfca90158ed5302d747cc4a 100644 (file)
@@ -26,6 +26,8 @@
 #include "helper.h"
 #include <data/dictionary.h>
 
+#include "psppire-var-view.h"
+
 #include <gtk/gtk.h>
 
 
@@ -68,8 +70,7 @@ generate_syntax (const struct split_file_dialog *sfd)
       GString * varlist = g_string_sized_new (80);
       GtkWidget *sort = get_widget_assert (sfd->xml, "split-radiobutton3");
       GtkWidget *layered = get_widget_assert (sfd->xml, "split-radiobutton1");
-      gint n_vars = append_variable_names (varlist,
-                                          sfd->dict, GTK_TREE_VIEW (vars), 0);
+      gint n_vars = psppire_var_view_append_names (PSPPIRE_VAR_VIEW (vars), 0, varlist);
 
       if ( n_vars > 0 )
        {
@@ -163,10 +164,9 @@ refresh (PsppireDialog *dialog, struct split_file_dialog *d)
 
 /* Pops up the Split File dialog box */
 void
-split_file_dialog (GObject *o, gpointer data)
+split_file_dialog (PsppireDataWindow *de)
 {
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
   struct split_file_dialog sfd;
   PsppireVarStore *vs ;
 
@@ -191,19 +191,10 @@ split_file_dialog (GObject *o, gpointer data)
   sfd.selector  = PSPPIRE_SELECTOR (
                                    get_widget_assert   (sfd.xml, "split-file-selector"));
 
-  g_object_set (source, "dictionary", sfd.dict, NULL);
+  g_object_set (source, "model", sfd.dict, NULL);
 
   g_signal_connect (on_off, "toggled", G_CALLBACK(on_off_toggled),  sfd.xml);
 
-  set_dest_model (GTK_TREE_VIEW (dest), sfd.dict);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                source,
-                                dest,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
   g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  &sfd);
 
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
@@ -226,7 +217,7 @@ split_file_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&sfd);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
index 012853c1260d44d03198af5d9558ea0161821eee..13250ad4470026f5abbccc1b0e9fec5d5f5a3756 100644 (file)
 #ifndef SPLIT_FILE_DIALOG_H
 #define SPLIT_FILE_DIALOG_H
 
-#include <glib.h>
-#include <glib-object.h>
+#include "psppire-data-window.h"
 
 /* Pops up the Split File dialog box */
-void split_file_dialog (GObject *o, gpointer data);
+void split_file_dialog (PsppireDataWindow * data);
 
 
 #endif
index 214370513b7369087344f60c636f450704f3b7a7..6ec866c93a11d7997f2de2fd66583b040e5b06b3 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2006  Free Software Foundation
+   Copyright (C) 2006, 2009  Free Software Foundation
 
    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
@@ -19,6 +19,7 @@
 
 #include <libpspp/getl.h>
 #include <libpspp/compiler.h>
+#include <libpspp/cast.h>
 #include <libpspp/str.h>
 
 #include <stdlib.h>
@@ -72,7 +73,8 @@ read_line_from_buffer (struct getl_interface *i,
   gchar *text;
   GtkTextIter next_line;
 
-  struct syntax_editor_source *ses = (struct syntax_editor_source *) i;
+  struct syntax_editor_source *ses
+    = UP_CAST (i, struct syntax_editor_source, parent);
 
   if ( gtk_text_iter_compare (&ses->i, &ses->end) >= 0)
     return false;
@@ -124,5 +126,5 @@ create_syntax_editor_source (GtkTextBuffer *buffer,
   ses->parent.location = location;
 
 
-  return (struct getl_interface *) ses;
+  return &ses->parent;
 }
diff --git a/src/ui/gui/syntax-editor.glade b/src/ui/gui/syntax-editor.glade
deleted file mode 100644 (file)
index 8f565e1..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-       <widget class="GtkMenuBar" id="menubar2">
-         <property name="visible">True</property>
-         <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
-         <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
-
-         <child>
-           <widget class="GtkMenuItem" id="menu_syntax_file">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_File</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menu_syntax_file_menu">
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="new2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-new</property>
-                     <property name="use_stock">True</property>
-
-                     <child>
-                       <widget class="GtkMenu" id="new2_menu">
-
-                         <child>
-                           <widget class="GtkMenuItem" id="file_new_syntax">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Syntax</property>
-                             <property name="use_underline">True</property>
-                           </widget>
-                         </child>
-
-                         <child>
-                           <widget class="GtkMenuItem" id="file_new_data">
-                             <property name="visible">True</property>
-                             <property name="sensitive">False</property>
-                             <property name="label" translatable="yes">_Data</property>
-                             <property name="use_underline">True</property>
-                           </widget>
-                         </child>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="open2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-open</property>
-                     <property name="use_stock">True</property>
-
-                     <child>
-                       <widget class="GtkMenu" id="open2_menu">
-
-                         <child>
-                           <widget class="GtkMenuItem" id="file_open_syntax">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Syntax</property>
-                             <property name="use_underline">True</property>
-                           </widget>
-                         </child>
-
-                         <child>
-                           <widget class="GtkMenuItem" id="file_open_data">
-                             <property name="visible">True</property>
-                             <property name="sensitive">False</property>
-                             <property name="label" translatable="yes">_Data</property>
-                             <property name="use_underline">True</property>
-                           </widget>
-                         </child>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="file_save">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-save</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="file_save_as">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-save-as</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="file_quit">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-quit</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="menuitem7">
-             <property name="visible">False</property>
-             <property name="sensitive">False</property>
-             <property name="label" translatable="yes">_Edit</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menuitem7_menu">
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="cut2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-cut</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="copy2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-copy</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="paste2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-paste</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="delete1">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-delete</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="run1">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Run</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="run1_menu">
-
-                 <child>
-                   <widget class="GtkMenuItem" id="run_all">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">All</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="run_selection">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Selection</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="run_current_line">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Current Line</property>
-                     <property name="use_underline">True</property>
-                      <accelerator key="R" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="run_to_end">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">To End</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="windows">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Windows</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="windows_menu">
-
-                 <child>
-                   <widget class="GtkMenuItem" id="windows_minimise_all">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_Minimize All Windows</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-         <child>
-           <widget class="GtkMenuItem" id="menuitem9">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Help</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menuitem9_menu">
-                 <child>
-                   <widget class="GtkMenuItem" id="help_reference">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_Reference Manual</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-                 <child>
-                   <widget class="GtkMenuItem" id="help_about">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_About</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-       </widget>
-
-
-       <widget class="GtkScrolledWindow" id="scrolledwindow8">
-         <property name="visible">True</property>
-         <property name="can_focus">True</property>
-         <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-         <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-         <property name="shadow_type">GTK_SHADOW_IN</property>
-         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-         <child>
-           <widget class="GtkTextView" id="syntax_text_view">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="editable">True</property>
-             <property name="overwrite">False</property>
-             <property name="accepts_tab">True</property>
-             <property name="justification">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap_mode">GTK_WRAP_NONE</property>
-             <property name="cursor_visible">True</property>
-             <property name="pixels_above_lines">0</property>
-             <property name="pixels_below_lines">0</property>
-             <property name="pixels_inside_wrap">0</property>
-             <property name="left_margin">0</property>
-             <property name="right_margin">0</property>
-             <property name="indent">0</property>
-             <property name="text" translatable="yes"></property>
-           </widget>
-         </child>
-       </widget>
-
-       <widget class="GtkStatusbar" id="statusbar2">
-         <property name="visible">True</property>
-         <property name="has_resize_grip">True</property>
-       </widget>
-
-</glade-interface>
diff --git a/src/ui/gui/syntax-editor.ui b/src/ui/gui/syntax-editor.ui
new file mode 100644 (file)
index 0000000..5666b49
--- /dev/null
@@ -0,0 +1,211 @@
+<?xml version="1.0"?>
+<!--*- mode: xml -*-->
+<interface>
+  <object class="GtkUIManager" id="uimanager1">
+    <child>
+      <object class="GtkActionGroup" id="actiongroup1">
+        <child>
+          <object class="GtkAction" id="menu_syntax_file">
+            <property name="name">menu_syntax_file</property>
+            <property name="label" translatable="yes">_File</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="new2">
+            <property name="stock-id">gtk-new</property>
+            <property name="name">new2</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_new_syntax">
+            <property name="name">file_new_syntax</property>
+            <property name="label" translatable="yes">_Syntax</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_new_data">
+            <property name="name">file_new_data</property>
+            <property name="label" translatable="yes">_Data</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="open2">
+            <property name="stock-id">gtk-open</property>
+            <property name="name">open2</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_open_syntax">
+            <property name="name">file_open_syntax</property>
+            <property name="label" translatable="yes">_Syntax</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_open_data">
+            <property name="name">file_open_data</property>
+            <property name="label" translatable="yes">_Data</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_save">
+            <property name="stock-id">gtk-save</property>
+            <property name="name">file_save</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_save_as">
+            <property name="stock-id">gtk-save-as</property>
+            <property name="name">file_save_as</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="file_quit">
+            <property name="stock-id">gtk-quit</property>
+            <property name="name">file_quit</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="menuitem7">
+            <property name="name">menuitem7</property>
+            <property name="label" translatable="yes">_Edit</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="cut2">
+            <property name="stock-id">gtk-cut</property>
+            <property name="name">cut2</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="copy2">
+            <property name="stock-id">gtk-copy</property>
+            <property name="name">copy2</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="paste2">
+            <property name="stock-id">gtk-paste</property>
+            <property name="name">paste2</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="delete1">
+            <property name="stock-id">gtk-delete</property>
+            <property name="name">delete1</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="run1">
+            <property name="name">run1</property>
+            <property name="label" translatable="yes">_Run</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="run_all">
+            <property name="name">run_all</property>
+            <property name="label" translatable="yes">All</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="run_selection">
+            <property name="name">run_selection</property>
+            <property name="label" translatable="yes">Selection</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="run_current_line">
+            <property name="name">run_current_line</property>
+            <property name="label" translatable="yes">Current Line</property>
+          </object>
+          <accelerator key="R" modifiers="GDK_CONTROL_MASK"/>
+        </child>
+        <child>
+          <object class="GtkAction" id="run_to_end">
+            <property name="name">run_to_end</property>
+            <property name="label" translatable="yes">To End</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="windows">
+            <property name="name">windows</property>
+            <property name="label" translatable="yes">_Windows</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkAction" id="windows_minimise_all">
+            <property name="name">windows_minimise_all</property>
+            <property name="label" translatable="yes">_Minimize All Windows</property>
+          </object>
+        </child>
+      </object>
+    </child>
+    <ui>
+      <menubar name="menubar">
+        <menu action="menu_syntax_file">
+          <menu action="new2">
+            <menuitem action="file_new_syntax"/>
+            <menuitem action="file_new_data"/>
+          </menu>
+          <menu action="open2">
+            <menuitem action="file_open_syntax"/>
+            <menuitem action="file_open_data"/>
+          </menu>
+          <menuitem action="file_save"/>
+          <menuitem action="file_save_as"/>
+          <separator/>
+          <menuitem action="file_quit"/>
+        </menu>
+        <menu action="menuitem7">
+          <menuitem action="cut2"/>
+          <menuitem action="copy2"/>
+          <menuitem action="paste2"/>
+          <menuitem action="delete1"/>
+        </menu>
+        <menu action="run1">
+          <menuitem action="run_all"/>
+          <menuitem action="run_selection"/>
+          <menuitem action="run_current_line"/>
+          <menuitem action="run_to_end"/>
+        </menu>
+        <menu action="windows">
+          <menuitem action="windows_minimise_all"/>
+        </menu>
+      </menubar>
+    </ui>
+  </object>
+  <object class="GtkMenuBar" constructor="uimanager1" id="menubar">
+    <property name="visible">True</property>
+    <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
+    <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
+  </object>
+  <object class="GtkScrolledWindow" id="scrolledwindow8">
+    <property name="visible">True</property>
+    <property name="can_focus">True</property>
+    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+    <property name="shadow_type">GTK_SHADOW_IN</property>
+    <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+    <child>
+      <object class="GtkTextView" id="syntax_text_view">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="editable">True</property>
+        <property name="overwrite">False</property>
+        <property name="accepts_tab">True</property>
+        <property name="justification">GTK_JUSTIFY_LEFT</property>
+        <property name="wrap_mode">GTK_WRAP_NONE</property>
+        <property name="cursor_visible">True</property>
+        <property name="pixels_above_lines">0</property>
+        <property name="pixels_below_lines">0</property>
+        <property name="pixels_inside_wrap">0</property>
+        <property name="left_margin">0</property>
+        <property name="right_margin">0</property>
+        <property name="indent">0</property>
+      </object>
+    </child>
+  </object>
+  <object class="GtkStatusbar" id="statusbar2">
+    <property name="visible">True</property>
+    <property name="has_resize_grip">True</property>
+  </object>
+</interface>
index 5d77ce43031ea7e46b37c3f0de57e9f9a22e67eb..93102c058166f6785e685448ab790a6ae7c3b47f 100644 (file)
@@ -21,6 +21,7 @@
 #include "t-test-independent-samples-dialog.h"
 #include "psppire-dict.h"
 #include "psppire-var-store.h"
+#include "psppire-var-view.h"
 #include "executor.h"
 #include "psppire-data-window.h"
 #include "psppire-dialog.h"
@@ -160,7 +161,7 @@ generate_syntax (const struct tt_indep_samples_dialog *d)
 
   GString *str = g_string_new ("T-TEST /VARIABLES=");
 
-  append_variable_names (str, d->dict, GTK_TREE_VIEW (tv), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (tv), 0, str);
 
   g_string_append (str, "\n\t/GROUPS=");
 
@@ -387,11 +388,10 @@ dialog_state_valid (gpointer data)
 
 /* Pops up the dialog box */
 void
-t_test_independent_samples_dialog (GObject *o, gpointer data)
+t_test_independent_samples_dialog (PsppireDataWindow *de)
 {
   struct tt_indep_samples_dialog tt_d;
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   PsppireVarStore *vs = NULL;
 
@@ -400,9 +400,6 @@ t_test_independent_samples_dialog (GObject *o, gpointer data)
   GtkWidget *dict_view =
     get_widget_assert (xml, "indep-samples-t-test-treeview1");
 
-  GtkWidget *test_variables_treeview =
-    get_widget_assert (xml, "indep-samples-t-test-treeview2");
-
   GtkWidget *selector2 =
     get_widget_assert (xml, "indep-samples-t-test-selector2");
 
@@ -426,26 +423,14 @@ t_test_independent_samples_dialog (GObject *o, gpointer data)
 
   gtk_window_set_transient_for (GTK_WINDOW (tt_d.dialog), GTK_WINDOW (de));
 
-  g_object_set (dict_view, "dictionary", tt_d.dict, NULL);
-
-  set_dest_model (GTK_TREE_VIEW (test_variables_treeview), tt_d.dict);
-
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector1),
-                                dict_view, test_variables_treeview,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
+  g_object_set (dict_view, "model", tt_d.dict, NULL);
 
   psppire_selector_set_allow (PSPPIRE_SELECTOR (selector1),
                              numeric_only);
 
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector2),
-                                dict_view, tt_d.groups_entry,
-                                insert_source_row_into_entry,
-                                is_currently_in_entry,
-                                NULL);
+  psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector2),
+                                is_currently_in_entry);
 
   g_signal_connect_swapped (tt_d.define_groups_button, "clicked",
                            G_CALLBACK (run_define_groups), &tt_d);
@@ -482,7 +467,7 @@ t_test_independent_samples_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&tt_d);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
        g_free (syntax);
       }
       break;
index 175cbfd63e061a2f2d0ce9c02b6acfc7697577e4..409443c34847e290a5f584517257b168db87a16d 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef T_TEST_INDEPENDENT_SAMPLES_DIALOG
 #define T_TEST_INDEPENDENT_SAMPLES_DIALOG
 
-void t_test_independent_samples_dialog (GObject *, gpointer) ;
+#include "psppire-data-window.h"
+
+void t_test_independent_samples_dialog (PsppireDataWindow *) ;
 
 #endif
index 8b2d8af795e055552e3cec44981e1e6b5f2ed4f9..ea92a9212946f05a5fdf9a932751c80616a496de 100644 (file)
@@ -21,6 +21,7 @@
 #include "t-test-one-sample.h"
 #include "psppire-dict.h"
 #include "psppire-var-store.h"
+#include "psppire-var-view.h"
 #include "helper.h"
 #include "psppire-data-window.h"
 #include "psppire-dialog.h"
@@ -58,7 +59,7 @@ generate_syntax (const struct tt_one_sample_dialog *d)
 
   g_string_append (str, "\n\t/VARIABLES=");
 
-  append_variable_names (str, d->dict, GTK_TREE_VIEW (d->vars_treeview), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (d->vars_treeview), 0, str);
 
   tt_options_dialog_append_syntax (d->opt, str);
 
@@ -119,11 +120,10 @@ dialog_state_valid (gpointer data)
 
 /* Pops up the dialog box */
 void
-t_test_one_sample_dialog (GObject *o, gpointer data)
+t_test_one_sample_dialog (PsppireDataWindow *de)
 {
   struct tt_one_sample_dialog tt_d;
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   PsppireVarStore *vs = NULL;
 
@@ -135,8 +135,6 @@ t_test_one_sample_dialog (GObject *o, gpointer data)
   GtkWidget *options_button =
     get_widget_assert (xml, "button1");
 
-  GtkWidget *selector = get_widget_assert (xml, "psppire-selector1");
-
   GtkWidget *dialog = get_widget_assert (xml, "t-test-one-sample-dialog");
 
   g_object_get (de->data_editor, "var-store", &vs, NULL);
@@ -148,21 +146,11 @@ t_test_one_sample_dialog (GObject *o, gpointer data)
 
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
-  g_object_set (dict_view, "dictionary",
+  g_object_set (dict_view, "model",
                tt_d.dict,
                "predicate",
                var_is_numeric, NULL);
 
-  set_dest_model (GTK_TREE_VIEW (tt_d.vars_treeview), tt_d.dict);
-
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                dict_view, tt_d.vars_treeview,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
-
   g_signal_connect_swapped (dialog, "refresh",
                            G_CALLBACK (refresh),  &tt_d);
 
@@ -191,7 +179,7 @@ t_test_one_sample_dialog (GObject *o, gpointer data)
       {
        gchar *syntax = generate_syntax (&tt_d);
 
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
index 6d50f1162706af01c43e51bd756a31508191b617..3c8e14407029ec53745b39f31211bb75758c388f 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef T_TEST_ONE_SAMPLE_DIALOG
 #define T_TEST_ONE_SAMPLE_DIALOG
 
-void t_test_one_sample_dialog (GObject *, gpointer) ;
+#include "psppire-data-window.h"
+
+void t_test_one_sample_dialog (PsppireDataWindow *) ;
 
 #endif
index ed8ac042daaf7e3e420eb739dcfd0e32a6ef24a1..224b022caa670cc5d52710af4f2ae562d92e9031 100644 (file)
@@ -69,7 +69,7 @@ tt_options_dialog_create (GtkBuilder *xml, GtkWindow *parent)
 
   gtk_widget_show (tto->confidence);
 
-  gtk_box_pack_start_defaults (GTK_BOX (tto->box), tto->confidence);
+  psppire_box_pack_start_defaults (GTK_BOX (tto->box), tto->confidence);
 
   gtk_window_set_transient_for (GTK_WINDOW (tto->dialog), parent);
 
index 15b99ad21914c6e3b119b5ab810dc54e6941dc48..5f226d4e194a2963881d5ac05c09f3835ca04558 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
+   Copyright (C) 2008, 2010  Free Software Foundation
 
    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
@@ -21,6 +21,7 @@
 
 #include "psppire-data-window.h"
 #include "psppire-selector.h"
+#include "psppire-var-view.h"
 
 #include "psppire-dict.h"
 #include "psppire-var-store.h"
@@ -56,11 +57,11 @@ generate_syntax (const struct tt_paired_samples_dialog *d)
   gchar *text = NULL;
   GString *str =   g_string_new ("T-TEST \n\tPAIRS = ");
 
-  append_variable_names (str, d->dict, GTK_TREE_VIEW (d->pairs_treeview), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (d->pairs_treeview), 0, str);
 
   g_string_append (str, " WITH ");
 
-  append_variable_names (str, d->dict, GTK_TREE_VIEW (d->pairs_treeview), 1);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (d->pairs_treeview), 1, str);
 
   g_string_append (str, " (PAIRED)");
   g_string_append (str, "\n");
@@ -132,6 +133,8 @@ select_as_pair_member (GtkTreeIter source_iter,
 
       gtk_tree_model_get (tt_d->list_store, &dest_iter, 1, &v1, -1);
     }
+  else
+    v1 = NULL;
 
   if ( n_rows == 0 || v1 != NULL)
     {
@@ -151,38 +154,12 @@ select_as_pair_member (GtkTreeIter source_iter,
     }
 }
 
-
-/* Append a new column to TV at position C, and heading TITLE */
-static void
-add_new_column (GtkTreeView *tv, const gchar *title, gint c)
-{
-  GtkTreeViewColumn *col = gtk_tree_view_column_new ();
-  GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
-
-  gtk_tree_view_column_set_min_width (col, 100);
-  gtk_tree_view_column_set_sizing (col, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
-  gtk_tree_view_column_set_resizable (col, TRUE);
-
-
-  gtk_tree_view_column_set_title (col, title);
-
-  gtk_tree_view_column_pack_start (col, renderer, TRUE);
-
-  gtk_tree_view_column_set_sizing (col, GTK_TREE_VIEW_COLUMN_FIXED);
-
-  gtk_tree_view_append_column (tv, col);
-
-  gtk_tree_view_column_add_attribute  (col, renderer, "text", c);
-}
-
-
 /* Pops up the dialog box */
 void
-t_test_paired_samples_dialog (GObject *o, gpointer data)
+t_test_paired_samples_dialog (PsppireDataWindow *de)
 {
   struct tt_paired_samples_dialog tt_d;
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
   PsppireVarStore *vs = NULL;
 
@@ -207,34 +184,16 @@ t_test_paired_samples_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
 
-  g_object_set (dict_view, "dictionary", tt_d.dict,
+  g_object_set (dict_view, "model", tt_d.dict,
                "predicate",
                var_is_numeric, NULL);
 
-  {
-    tt_d.list_store =
-      GTK_TREE_MODEL (
-                     gtk_list_store_new (2,
-                                         PSPPIRE_VAR_PTR_TYPE,
-                                         PSPPIRE_VAR_PTR_TYPE));
-
-
-    gtk_tree_view_set_model (GTK_TREE_VIEW (tt_d.pairs_treeview),
-                            GTK_TREE_MODEL (tt_d.list_store));
-
-
-    add_new_column (GTK_TREE_VIEW (tt_d.pairs_treeview), _("Var 1"), 0);
-    add_new_column (GTK_TREE_VIEW (tt_d.pairs_treeview), _("Var 2"), 1);
-  }
-
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                dict_view,
-                                tt_d.pairs_treeview,
-                                select_as_pair_member,
-                                NULL,
-                                &tt_d);
+  
+  tt_d.list_store = gtk_tree_view_get_model (GTK_TREE_VIEW (tt_d.pairs_treeview));
 
+  psppire_selector_set_select_func (PSPPIRE_SELECTOR (selector),
+                                   select_as_pair_member,
+                                   &tt_d);
 
   g_signal_connect_swapped (dialog, "refresh",
                            G_CALLBACK (refresh),  &tt_d);
@@ -263,7 +222,7 @@ t_test_paired_samples_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&tt_d);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
index c77d9c11f35529f8c20df8478c7b7b447b8198d9..d7941fc5b7d18b26b2b98ec014332ff3d430c795 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef T_TEST_PAIRED_SAMPLES_DIALOG
 #define T_TEST_PAIRED_SAMPLES_DIALOG
 
-void t_test_paired_samples_dialog (GObject *, gpointer) ;
+#include "psppire-data-window.h"
+
+void t_test_paired_samples_dialog (PsppireDataWindow *) ;
 
 #endif
diff --git a/src/ui/gui/t-test.glade b/src/ui/gui/t-test.glade
deleted file mode 100644 (file)
index 040a99e..0000000
+++ /dev/null
@@ -1,813 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="t-test-independent-samples-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Independent-Samples T Test</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox15">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkHBox" id="hbox23">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow14">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                <child>
-                  <widget class="PsppireDictView" id="indep-samples-t-test-treeview1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="headers_visible">False</property>
-                    <property name="headers_clickable">True</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkTable" id="table4">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="n_rows">3</property>
-                <property name="n_columns">2</property>
-                <child>
-                  <widget class="GtkHButtonBox" id="hbuttonbox1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-                    <child>
-                      <widget class="GtkButton" id="define-groups-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Define Groups</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="indep-samples-t-test-options-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Options...</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                    <property name="y_padding">5</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="PsppireSelector" id="indep-samples-t-test-selector1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options"></property>
-                    <property name="y_options">GTK_EXPAND</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="PsppireSelector" id="indep-samples-t-test-selector2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options"></property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox29">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label35">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Test Variable(s):</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow15">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="indep-samples-t-test-treeview2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_visible">False</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox30">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkLabel" id="label36">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Define Groups</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="indep-samples-t-test-entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="define-groups-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Define Groups</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkTable" id="table1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="n_rows">3</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">5</property>
-            <property name="row_spacing">5</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton3">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-              <packing>
-                <property name="x_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="table2">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="n_rows">2</property>
-                <property name="n_columns">2</property>
-                <property name="column_spacing">5</property>
-                <property name="row_spacing">5</property>
-                <child>
-                  <widget class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Group_2 value:</property>
-                    <property name="use_underline">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Group_1 value:</property>
-                    <property name="use_underline">True</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="group2-entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="group1-entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options">GTK_EXPAND</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkLabel" id="label5">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">_Cut point:</property>
-                    <property name="use_underline">True</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="cut-point-entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="y_options"></property>
-                <property name="y_padding">5</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">_Use specified values:</property>
-                <property name="use_underline">True</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton4">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">radiobutton3</property>
-              </widget>
-              <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="x_options"></property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="options-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Options</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox3">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="frame1">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Exclude cases _analysis by analysis</property>
-                            <property name="use_underline">True</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Exclude cases _listwise</property>
-                            <property name="use_underline">True</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label3">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Missing Values</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="pack_type">GTK_PACK_END</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-            <property name="homogeneous">True</property>
-            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="t-test-one-sample-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">One - Sample T Test</property>
-    <property name="modal">True</property>
-    <property name="orientation">PSPPIRE_TABULAR</property>
-    <child internal-child="hbox">
-      <widget class="GtkTable" id="dialog-hbox5">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="n_rows">2</property>
-        <property name="n_columns">4</property>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox5">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="right_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkFrame" id="frame2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="shadow_type">GTK_SHADOW_NONE</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment2">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                    <child>
-                      <widget class="GtkTreeView" id="one-sample-t-test-treeview1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="headers_visible">False</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label6">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Test Variable(s):</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="right_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow4">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-            <child>
-              <widget class="PsppireDictView" id="one-sample-t-test-treeview2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="headers_visible">False</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="bottom_attach">2</property>
-            <property name="x_padding">5</property>
-            <property name="y_padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkLabel" id="label7">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Test Value: </property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="test-value-entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="padding">5</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="right_attach">3</property>
-            <property name="top_attach">1</property>
-            <property name="bottom_attach">2</property>
-            <property name="y_options"></property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkButton" id="button1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label" translatable="yes">Options...</property>
-          </widget>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="right_attach">4</property>
-            <property name="top_attach">1</property>
-            <property name="bottom_attach">2</property>
-            <property name="y_options"></property>
-            <property name="x_padding">5</property>
-            <property name="y_padding">5</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkAlignment" id="alignment3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="yalign">0.059999998658895493</property>
-            <property name="yscale">0</property>
-            <child>
-              <widget class="PsppireSelector" id="psppire-selector1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="no_show_all">True</property>
-                <property name="border_width">5</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="right_attach">2</property>
-            <property name="bottom_attach">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="PsppireDialog" id="t-test-paired-samples-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Paired Samples T Test</property>
-    <property name="modal">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHBox" id="dialog-hbox6">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkHBox" id="hbox3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                <child>
-                  <widget class="PsppireDictView" id="paired-samples-t-test-treeview1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="headers_visible">False</property>
-                    <property name="headers_clickable">True</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkAlignment" id="alignment5">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="yalign">0.059999998658895493</property>
-                <property name="yscale">0</property>
-                <child>
-                  <widget class="PsppireSelector" id="psppire-selector3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="no_show_all">True</property>
-                    <property name="border_width">5</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkFrame" id="frame4">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="shadow_type">GTK_SHADOW_NONE</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment6">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                            <child>
-                              <widget class="GtkTreeView" id="paired-samples-t-test-treeview2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="enable_search">False</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label13">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Test Variable(s):</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkVButtonBox" id="vbuttonbox2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkButton" id="paired-samples-t-test-options-button">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Options...</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox4">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="border_width">5</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/t-test.ui b/src/ui/gui/t-test.ui
new file mode 100644 (file)
index 0000000..1a763ae
--- /dev/null
@@ -0,0 +1,865 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="psppire" version="2054.17080"/>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="t-test-independent-samples-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Independent-Samples T Test</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox15">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkHBox" id="hbox23">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow14">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="indep-samples-t-test-treeview1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="table4">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="n_rows">3</property>
+                <property name="n_columns">2</property>
+                <child>
+                  <object class="GtkHButtonBox" id="hbuttonbox1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="layout_style">spread</property>
+                    <child>
+                      <object class="GtkButton" id="define-groups-button">
+                        <property name="label" translatable="yes">Define Groups</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="indep-samples-t-test-options-button">
+                        <property name="label" translatable="yes">Options...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                    <property name="y_padding">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="PsppireSelector" id="indep-samples-t-test-selector1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">indep-samples-t-test-treeview1</property>
+                    <property name="dest_widget">indep-samples-t-test-treeview2</property>
+                  </object>
+                  <packing>
+                    <property name="x_options"></property>
+                    <property name="y_options">GTK_EXPAND</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="PsppireSelector" id="indep-samples-t-test-selector2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">indep-samples-t-test-treeview1</property>
+                    <property name="dest_widget">indep-samples-t-test-entry</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox29">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label35">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Test Variable(s):</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow15">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="PsppireVarView" id="indep-samples-t-test-treeview2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox30">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="label36">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Define Groups</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="indep-samples-t-test-entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="define-groups-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Define Groups</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkTable" id="table1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="n_rows">3</property>
+            <property name="n_columns">2</property>
+            <property name="column_spacing">5</property>
+            <property name="row_spacing">5</property>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton3">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="x_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="table2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">2</property>
+                <property name="column_spacing">5</property>
+                <property name="row_spacing">5</property>
+                <child>
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Group_2 value:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Group_1 value:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="x_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="group2-entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="group1-entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options">GTK_EXPAND</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Cut point:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="cut-point-entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options"></property>
+                <property name="y_padding">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">_Use specified values:</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton4">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radiobutton3</property>
+              </object>
+              <packing>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="options-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Options</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVButtonBox" id="vbuttonbox1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="layout_style">spread</property>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton1">
+                            <property name="label" translatable="yes">Exclude cases _analysis by analysis</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton2">
+                            <property name="label" translatable="yes">Exclude cases _listwise</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Missing Values</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="pack_type">end</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+            <property name="homogeneous">True</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="t-test-one-sample-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">One - Sample T Test</property>
+    <property name="modal">True</property>
+    <property name="orientation">Tabular</property>
+    <child internal-child="hbox">
+      <object class="GtkTable" id="dialog-hbox5">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="n_rows">2</property>
+        <property name="n_columns">4</property>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox5">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="right_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="PsppireVarView" id="one-sample-t-test-treeview1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label6">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Test Variable(s):</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="right_attach">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow4">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="hscrollbar_policy">never</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">etched-in</property>
+            <child>
+              <object class="PsppireDictView" id="one-sample-t-test-treeview2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="headers_visible">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="bottom_attach">2</property>
+            <property name="x_padding">5</property>
+            <property name="y_padding">5</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <object class="GtkLabel" id="label7">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Test Value: </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="test-value-entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="right_attach">3</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="y_options"></property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button1">
+            <property name="label" translatable="yes">Options...</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="right_attach">4</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="y_options"></property>
+            <property name="x_padding">5</property>
+            <property name="y_padding">5</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkAlignment" id="alignment3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="yalign">0.059999998658895493</property>
+            <property name="yscale">0</property>
+            <child>
+              <object class="PsppireSelector" id="psppire-selector1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="no_show_all">True</property>
+                <property name="border_width">5</property>
+                <property name="source_widget">one-sample-t-test-treeview2</property>
+                <property name="dest_widget">one-sample-t-test-treeview1</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="bottom_attach">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="PsppireDialog" id="t-test-paired-samples-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Paired Samples T Test</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox6">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkHBox" id="hbox3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="PsppireDictView" id="paired-samples-t-test-treeview1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="yalign">0.059999998658895493</property>
+                <property name="yscale">0</property>
+                <child>
+                  <object class="PsppireSelector" id="psppire-selector3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="no_show_all">True</property>
+                    <property name="border_width">5</property>
+                    <property name="source_widget">paired-samples-t-test-treeview1</property>
+                    <property name="dest_widget">paired-samples-t-test-treeview2</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="GtkFrame" id="frame4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="hscrollbar_policy">always</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">etched-in</property>
+                            <child>
+                              <object class="PsppireVarView" id="paired-samples-t-test-treeview2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="enable_search">False</property>
+                                <property name="n-cols">2</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label13">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Test Variable(s):</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVButtonBox" id="vbuttonbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkButton" id="paired-samples-t-test-options-button">
+                        <property name="label" translatable="yes">Options...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 6f33ff6d8bb8b6547a76a91bc06d35260a3a1881..3c3089f15047ed9047e0a2a36e317ebeb9362ce5 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008, 2009  Free Software Foundation
+   Copyright (C) 2008, 2009, 2010  Free Software Foundation
 
    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
@@ -233,7 +233,7 @@ static void pop_watch_cursor (struct import_assistant *);
 
 /* Pops up the Text Data Import assistant. */
 void
-text_data_import_assistant (GObject *o, GtkWindow *parent_window)
+text_data_import_assistant (GtkWindow *parent_window)
 {
   struct import_assistant *ia;
 
@@ -268,7 +268,7 @@ text_data_import_assistant (GObject *o, GtkWindow *parent_window)
     case PSPPIRE_RESPONSE_PASTE:
       {
        char *syntax = generate_syntax (ia);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
        free (syntax);
       }
       break;
@@ -1615,7 +1615,7 @@ prepare_formats_page (struct import_assistant *ia)
           if (!dict_make_unique_var_name (dict, var_get_name (modified_var),
                                           &number, name))
             NOT_REACHED ();
-          dict_clone_var_assert (dict, modified_var, name);
+          dict_clone_var_as_assert (dict, modified_var, name);
         }
     }
   fmt_guesser_destroy (fg);
diff --git a/src/ui/gui/text-data-import.glade b/src/ui/gui/text-data-import.glade
deleted file mode 100644 (file)
index 3b74c8c..0000000
+++ /dev/null
@@ -1,733 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Thu Dec 18 20:39:52 2008 -->
-<glade-interface>
-  <widget class="GtkWindow" id="Intro">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">12</property>
-    <property name="title" translatable="yes">Importing Textual Data</property>
-    <child>
-      <widget class="GtkVBox" id="vbox3">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">12</property>
-        <child>
-          <widget class="GtkLabel" id="intro-label">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label" translatable="yes">This assistant will guide you through the process of importing data into PSPP from a text file with one line per case,  in which fields are separated by tabs, commas, or other delimiters.
-
-The selected file contains N lines of text.  Only the first M of these will be shown for preview purposes in the following screens.  You may choose below how much of the file should actually be imported.</property>
-            <property name="wrap">True</property>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkAlignment" id="alignment10">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="xscale">0</property>
-            <child>
-              <widget class="GtkFrame" id="frame7">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment11">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="import-all-cases">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">All cases</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox1">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="spacing">6</property>
-                            <child>
-                              <widget class="GtkRadioButton" id="import-n-cases">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Only first </property>
-                                <property name="response_id">0</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                                <property name="group">import-all-cases</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkSpinButton" id="n-cases-spin">
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="adjustment">1000 0 100000000 1 10 10</property>
-                                <property name="climb_rate">10</property>
-                                <property name="snap_to_ticks">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label1">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes"> cases</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox3">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="spacing">6</property>
-                            <child>
-                              <widget class="GtkRadioButton" id="import-percent">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Only first </property>
-                                <property name="response_id">0</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                                <property name="group">import-all-cases</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkSpinButton" id="percent-spin">
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="adjustment">100 1 100 1 10 10</property>
-                                <property name="snap_to_ticks">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label2">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">% of file (approximately)</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label8">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Amount to Import&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkWindow" id="FirstLine">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">12</property>
-    <property name="title" translatable="yes">Select Data to Import</property>
-    <child>
-      <widget class="GtkVBox" id="vbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">6</property>
-        <child>
-          <widget class="GtkLabel" id="label3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label" translatable="yes">Select the first line of the data file that contains data.</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkScrolledWindow" id="first-line-scroller">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <child>
-              <widget class="GtkTreeView" id="first-line">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="headers_clickable">True</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkCheckButton" id="variable-names">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label" translatable="yes">Line above selected line contains variable names</property>
-            <property name="response_id">0</property>
-            <property name="draw_indicator">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkWindow" id="Separators">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">12</property>
-    <property name="title" translatable="yes">Choose Separators</property>
-    <child>
-      <widget class="GtkVBox" id="vbox4">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">12</property>
-        <child>
-          <widget class="GtkHBox" id="hbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">12</property>
-            <child>
-              <widget class="GtkFrame" id="foo">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment1">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkTable" id="table1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="n_rows">4</property>
-                        <property name="n_columns">3</property>
-                        <property name="column_spacing">6</property>
-                        <property name="row_spacing">6</property>
-                        <child>
-                          <widget class="GtkEntry" id="custom-entry">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="custom-cb">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">C_ustom</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="slash">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Slas_h (/)</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="semicolon">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Semicolo_n (;)</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="pipe">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">P_ipe (|)</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="hyphen">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">H_yphen (-)</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="comma">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Co_mma (,)</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="colon">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">_Colon (:)</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="bang">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Ban_g (!)</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="tab">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Ta_b</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="space">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">_Space</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label5">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Separators&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="frame2">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkTable" id="table2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="n_rows">2</property>
-                        <property name="n_columns">2</property>
-                        <property name="column_spacing">6</property>
-                        <property name="row_spacing">6</property>
-                        <child>
-                          <widget class="GtkCheckButton" id="escape">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Doubled quote mark treated as escape</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkComboBoxEntry" id="quote-combo">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="has_frame">False</property>
-                            <child internal-child="entry">
-                              <widget class="GtkEntry" id="quote">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="width_chars">2</property>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="x_options"></property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="quote-cb">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Quote separator characters with</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options"></property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label7">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Quoting&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkFrame" id="frame3">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">GTK_SHADOW_NONE</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment3">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="fields-scroller">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                    <child>
-                      <widget class="GtkTreeView" id="fields">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="headers_clickable">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label9">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">&lt;b&gt;Fields Preview&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkWindow" id="Formats">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">12</property>
-    <property name="title" translatable="yes">Adjust Variable Formats</property>
-    <child>
-      <widget class="GtkVBox" id="vbox5">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">12</property>
-        <child>
-          <widget class="GtkLabel" id="label12">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label" translatable="yes">Check the data formats displayed below and fix any that are incorrect.  You may set other variable properties now or later.</property>
-            <property name="wrap">True</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkVPaned" id="vpaned1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="position">94</property>
-            <child>
-              <widget class="GtkFrame" id="frame4">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment5">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="vars-scroller">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label10">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Variables&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="resize">False</property>
-                <property name="shrink">True</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="frame5">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">GTK_SHADOW_NONE</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment6">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="data-scroller">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <child>
-                          <widget class="GtkTreeView" id="data">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="headers_clickable">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label11">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Data Preview&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="resize">True</property>
-                <property name="shrink">True</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/text-data-import.ui b/src/ui/gui/text-data-import.ui
new file mode 100644 (file)
index 0000000..d312592
--- /dev/null
@@ -0,0 +1,738 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkWindow" id="Intro">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Importing Textual Data</property>
+    <child>
+      <object class="GtkVBox" id="vbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkLabel" id="intro-label">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label" translatable="yes">This assistant will guide you through the process of importing data into PSPP from a text file with one line per case,  in which fields are separated by tabs, commas, or other delimiters.
+
+The selected file contains N lines of text.  Only the first M of these will be shown for preview purposes in the following screens.  You may choose below how much of the file should actually be imported.</property>
+            <property name="wrap">True</property>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkAlignment" id="alignment10">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="xscale">0</property>
+            <child>
+              <object class="GtkFrame" id="frame7">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment11">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkRadioButton" id="import-all-cases">
+                            <property name="label" translatable="yes">All cases</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox1">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkRadioButton" id="import-n-cases">
+                                <property name="label" translatable="yes">Only first </property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">import-all-cases</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="n-cases-spin">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="adjustment">adjustment2</property>
+                                <property name="climb_rate">10</property>
+                                <property name="snap_to_ticks">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label1">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes"> cases</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox3">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkRadioButton" id="import-percent">
+                                <property name="label" translatable="yes">Only first </property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">import-all-cases</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="percent-spin">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="adjustment">adjustment1</property>
+                                <property name="snap_to_ticks">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label2">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">% of file (approximately)</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label8">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Amount to Import&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="FirstLine">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Select Data to Import</property>
+    <child>
+      <object class="GtkVBox" id="vbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label" translatable="yes">Select the first line of the data file that contains data.</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" id="first-line-scroller">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <child>
+              <object class="GtkTreeView" id="first-line">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="variable-names">
+            <property name="label" translatable="yes">Line above selected line contains variable names</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="Separators">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Choose Separators</property>
+    <child>
+      <object class="GtkVBox" id="vbox4">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkHBox" id="hbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkFrame" id="foo">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkTable" id="table1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">4</property>
+                        <property name="n_columns">3</property>
+                        <property name="column_spacing">6</property>
+                        <property name="row_spacing">6</property>
+                        <child>
+                          <object class="GtkEntry" id="custom-entry">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="custom-cb">
+                            <property name="label" translatable="yes">C_ustom</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="slash">
+                            <property name="label" translatable="yes">Slas_h (/)</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="semicolon">
+                            <property name="label" translatable="yes">Semicolo_n (;)</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="pipe">
+                            <property name="label" translatable="yes">P_ipe (|)</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="hyphen">
+                            <property name="label" translatable="yes">H_yphen (-)</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="comma">
+                            <property name="label" translatable="yes">Co_mma (,)</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="colon">
+                            <property name="label" translatable="yes">_Colon (:)</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bang">
+                            <property name="label" translatable="yes">Ban_g (!)</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="tab">
+                            <property name="label" translatable="yes">Ta_b</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="space">
+                            <property name="label" translatable="yes">_Space</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Separators&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkTable" id="table2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">2</property>
+                        <property name="column_spacing">6</property>
+                        <property name="row_spacing">6</property>
+                        <child>
+                          <object class="GtkCheckButton" id="escape">
+                            <property name="label" translatable="yes">Doubled quote mark treated as escape</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBoxEntry" id="quote-combo">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="has_frame">False</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="x_options"></property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="quote-cb">
+                            <property name="label" translatable="yes">Quote separator characters with</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="x_options"></property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label7">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Quoting&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame3">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="fields-scroller">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <child>
+                      <object class="GtkTreeView" id="fields">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label9">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">&lt;b&gt;Fields Preview&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="Formats">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Adjust Variable Formats</property>
+    <child>
+      <object class="GtkVBox" id="vbox5">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkLabel" id="label12">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label" translatable="yes">Check the data formats displayed below and fix any that are incorrect.  You may set other variable properties now or later.</property>
+            <property name="wrap">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVPaned" id="vpaned1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="position">94</property>
+            <child>
+              <object class="GtkFrame" id="frame4">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="vars-scroller">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label10">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Variables&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">False</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment6">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="data-scroller">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <child>
+                          <object class="GtkTreeView" id="data">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label11">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Data Preview&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="value">100</property>
+    <property name="lower">1</property>
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+    <property name="page_size">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="value">1000</property>
+    <property name="upper">100000000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+    <property name="page_size">0</property>
+  </object>
+</interface>
index 36640f6f752a71829b391c1310a243d97de8eb17..ebc34bd8546f253d97a0c72d4ad3e61e48e99d38 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "transpose-dialog.h"
 #include "psppire-selector.h"
+#include "psppire-var-view.h"
 #include "psppire-dialog.h"
 #include "executor.h"
 #include "psppire-data-window.h"
@@ -76,10 +77,9 @@ dialog_state_valid (gpointer data)
 
 
 void
-transpose_dialog (GObject *o, gpointer data)
+transpose_dialog (PsppireDataWindow *de)
 {
   gint response ;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
   PsppireDict *dict = NULL;
 
   GtkBuilder *xml = builder_new ("psppire.ui");
@@ -88,30 +88,15 @@ transpose_dialog (GObject *o, gpointer data)
 
   GtkWidget *dialog = get_widget_assert (xml, "transpose-dialog");
   GtkWidget *source = get_widget_assert (xml, "source-treeview");
-  GtkWidget *dest = get_widget_assert (xml, "variables-treeview");
-  GtkWidget *selector1 = get_widget_assert (xml, "psppire-selector2");
   GtkWidget *selector2 = get_widget_assert (xml, "psppire-selector3");
-  GtkWidget *new_name_entry = get_widget_assert (xml, "new-name-entry");
 
   g_object_get (de->data_editor, "var-store", &vs, NULL);
 
   g_object_get (vs, "dictionary", &dict, NULL);
-  g_object_set (source, "dictionary", dict, NULL);
-
-  set_dest_model (GTK_TREE_VIEW (dest), dict);
-
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector1),
-                                source, dest,
-                                insert_source_row_into_tree_view,
-                                NULL,
-                                NULL);
-
+  g_object_set (source, "model", dict, NULL);
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector2),
-                                source, new_name_entry,
-                                insert_source_row_into_entry,
-                                is_currently_in_entry,
-                                NULL);
+  psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector2),
+                                is_currently_in_entry);
 
 
   g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  xml);
@@ -138,7 +123,7 @@ transpose_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (dict, xml);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
@@ -166,7 +151,7 @@ generate_syntax (PsppireDict *dict, GtkBuilder *xml)
 
   g_string_append (string, " /VARIABLES = ");
 
-  append_variable_names (string, dict, GTK_TREE_VIEW (dest), 0);
+  psppire_var_view_append_names (PSPPIRE_VAR_VIEW (dest), 0, string);
 
   text = gtk_entry_get_text (GTK_ENTRY (entry));
 
index cdcf0ecf55c042766398fe9c176374ccf770d779..91ab97db5d5c8750923c55f2ccb9bacaac474518 100644 (file)
 #ifndef TRANSPOSE_DIALOG_H
 #define TRANSPOSE_DIALOG_H
 
-#include <glib.h>
-#include <glib-object.h>
+#include "psppire-data-window.h"
 
-void transpose_dialog (GObject *o, gpointer data);
+void transpose_dialog (PsppireDataWindow * data);
 
 
 #endif
index 14eacabfadddb5842e81f444855233b0e903ec03..5f43ff498f10a6c4910a53bec9fc5bfda82a87fb 100644 (file)
@@ -324,7 +324,7 @@ on_remove (GtkWidget *w, gpointer data)
   struct val_labs_dialog *dialog = data;
 
   union value value;
-  const struct val_lab *vl;
+  struct val_lab *vl;
 
   get_selected_tuple (dialog, &value, NULL);
   vl = val_labs_lookup (dialog->labs, &value);
index 7081e9e2c0bde74fc4c9424f729733ba8a74c1c2..1b9bf71c4764db71d4a3b88fef9ca0035035b68b 100644 (file)
@@ -22,8 +22,7 @@ measure_to_string (const struct variable *var, GError **err)
   const gint measure = var_get_measure (var);
 
   g_assert (measure < n_MEASURES);
-  return g_locale_to_utf8 (gettext (measures[measure]),
-                          -1, 0, 0, err);
+  return gettext (measures[measure]);
 }
 
 
@@ -34,7 +33,7 @@ missing_values_to_string (const PsppireDict *dict, const struct variable *pv, GE
   gchar *s;
   const struct missing_values *miss = var_get_missing_values (pv);
   if ( mv_is_empty (miss))
-    return g_locale_to_utf8 (gettext (none), -1, 0, 0, err);
+    return xstrdup (gettext (none));
   else
     {
       if ( ! mv_has_range (miss))
diff --git a/src/ui/gui/var-sheet-dialogs.glade b/src/ui/gui/var-sheet-dialogs.glade
deleted file mode 100644 (file)
index 658ca0a..0000000
+++ /dev/null
@@ -1,921 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <widget class="GtkWindow" id="var_type_dialog">
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes">Variable Type</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="default_width">485</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="skip_taskbar_hint">True</property>
-    <property name="skip_pager_hint">True</property>
-    <child>
-      <widget class="GtkHBox" id="hbox1">
-        <property name="visible">True</property>
-        <property name="border_width">5</property>
-        <property name="spacing">5</property>
-        <child>
-          <widget class="GtkVBox" id="vbox2">
-            <property name="visible">True</property>
-            <property name="border_width">13</property>
-            <property name="homogeneous">True</property>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Numeric</property>
-                <property name="use_underline">True</property>
-                <property name="response_id">0</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Comma</property>
-                <property name="use_underline">True</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">radiobutton1</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton3">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Dot</property>
-                <property name="use_underline">True</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">radiobutton1</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton4">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Scientific notation</property>
-                <property name="use_underline">True</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">radiobutton1</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton5">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Date</property>
-                <property name="use_underline">True</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">radiobutton1</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton6">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Dollar</property>
-                <property name="use_underline">True</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">radiobutton1</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">5</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton7">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Custom currency</property>
-                <property name="use_underline">True</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">radiobutton1</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">6</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="radiobutton8">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">String</property>
-                <property name="use_underline">True</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">radiobutton1</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">7</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkVBox" id="middle_box">
-            <property name="visible">True</property>
-            <property name="spacing">10</property>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow4">
-                <property name="width_request">20</property>
-                <property name="height_request">194</property>
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="shadow_type">GTK_SHADOW_IN</property>
-                <child>
-                  <widget class="GtkTreeView" id="date_format_list_view">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="headers_visible">False</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="custom_currency_hbox">
-                <property name="spacing">15</property>
-                <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow5">
-                    <property name="width_request">1</property>
-                    <property name="height_request">120</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <property name="shadow_type">GTK_SHADOW_IN</property>
-                    <child>
-                      <widget class="GtkTreeView" id="custom_treeview">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="headers_visible">False</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="Sample">
-                    <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment2">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkVBox" id="vbox10">
-                            <property name="visible">True</property>
-                            <property name="homogeneous">True</property>
-                            <child>
-                              <widget class="GtkLabel" id="psample_label">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">positive</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="nsample_label">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">negative</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label13">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Sample</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="pack_type">GTK_PACK_END</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkScrolledWindow" id="dollar_window">
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="shadow_type">GTK_SHADOW_IN</property>
-                <child>
-                  <widget class="GtkTreeView" id="dollar_treeview">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="headers_visible">False</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="width_decimals">
-                <property name="width_request">100</property>
-                <property name="height_request">50</property>
-                <property name="visible">True</property>
-                <property name="n_rows">2</property>
-                <property name="n_columns">2</property>
-                <property name="column_spacing">2</property>
-                <property name="row_spacing">1</property>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkLabel" id="width_label">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Width:</property>
-                        <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="pack_type">GTK_PACK_END</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="decimals_entry">
-                    <property name="width_request">25</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="width_entry">
-                    <property name="width_request">25</property>
-                    <property name="can_focus">True</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="decimals_label">
-                    <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Decimal Places:</property>
-                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkVButtonBox" id="vbuttonbox6">
-            <property name="visible">True</property>
-            <property name="spacing">5</property>
-            <property name="layout_style">GTK_BUTTONBOX_START</property>
-            <child>
-              <widget class="GtkButton" id="var_type_ok">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-ok</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="var_type_cancel">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-cancel</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="help_button_variable_type">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-help</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkWindow" id="val_labs_dialog">
-    <property name="title" translatable="yes">Value Labels</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="skip_taskbar_hint">True</property>
-    <property name="skip_pager_hint">True</property>
-    <child>
-      <widget class="GtkHBox" id="hbox3">
-        <property name="visible">True</property>
-        <property name="border_width">5</property>
-        <child>
-          <widget class="GtkFrame" id="frame1">
-            <property name="visible">True</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment1">
-                <property name="visible">True</property>
-                <property name="border_width">8</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkTable" id="table3">
-                    <property name="visible">True</property>
-                    <property name="n_rows">2</property>
-                    <property name="n_columns">2</property>
-                    <property name="row_spacing">5</property>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="treeview1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="headers_visible">False</property>
-                            <property name="enable_search">False</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkTable" id="table4">
-                        <property name="visible">True</property>
-                        <property name="border_width">5</property>
-                        <property name="n_rows">2</property>
-                        <property name="n_columns">2</property>
-                        <property name="column_spacing">5</property>
-                        <property name="row_spacing">4</property>
-                        <child>
-                          <widget class="GtkHBox" id="hbox4">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkEntry" id="value_entry">
-                                <property name="width_request">85</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="padding">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="label_entry">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label6">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Value Label:</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label5">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Value:</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox2">
-                        <property name="visible">True</property>
-                        <property name="border_width">5</property>
-                        <child>
-                          <widget class="GtkButton" id="val_labs_add">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="label">gtk-add</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="val_labs_change">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="label">gtk-apply</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="val_labs_remove">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="label">gtk-remove</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label7">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Value Labels</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">10</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkVButtonBox" id="vbuttonbox3">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-            <property name="spacing">5</property>
-            <property name="layout_style">GTK_BUTTONBOX_START</property>
-            <child>
-              <widget class="GtkButton" id="val_labs_ok">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-ok</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="val_labs_cancel">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-cancel</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="help_button_value_labels">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-help</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkWindow" id="missing_values_dialog">
-    <property name="border_width">12</property>
-    <property name="title" translatable="yes">Missing Values</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="skip_taskbar_hint">True</property>
-    <property name="skip_pager_hint">True</property>
-    <child>
-      <widget class="GtkVBox" id="vbox3">
-        <property name="visible">True</property>
-        <property name="spacing">12</property>
-        <child>
-          <widget class="GtkFrame" id="frame9">
-            <property name="visible">True</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">GTK_SHADOW_NONE</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment4">
-                <property name="visible">True</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="no_missing">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">_No missing values</property>
-                <property name="use_underline">True</property>
-                <property name="response_id">0</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkFrame" id="frame4">
-            <property name="visible">True</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">GTK_SHADOW_NONE</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment3">
-                <property name="visible">True</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkHBox" id="hbox5">
-                    <property name="visible">True</property>
-                    <property name="border_width">5</property>
-                    <property name="spacing">6</property>
-                    <property name="homogeneous">True</property>
-                    <child>
-                      <widget class="GtkEntry" id="mv0">
-                        <property name="width_request">75</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="mv1">
-                        <property name="width_request">75</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="mv2">
-                        <property name="width_request">75</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="discrete_missing">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">_Discrete missing values</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">no_missing</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkFrame" id="frame10">
-            <property name="visible">True</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">GTK_SHADOW_NONE</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment5">
-                <property name="visible">True</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkTable" id="table1">
-                    <property name="visible">True</property>
-                    <property name="n_rows">3</property>
-                    <property name="n_columns">2</property>
-                    <property name="column_spacing">6</property>
-                    <property name="row_spacing">6</property>
-                    <child>
-                      <widget class="GtkLabel" id="label11">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_Low:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">mv-low</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="mv-low">
-                        <property name="width_request">75</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label12">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_High:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">mv-high</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="mv-high">
-                        <property name="width_request">75</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label10">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Di_screte value:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">mv-discrete</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="mv-discrete">
-                        <property name="width_request">75</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkRadioButton" id="range_missing">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">_Range plus one optional discrete missing value</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">no_missing</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="spacing">6</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="missing_val_cancel">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-cancel</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="help_button_missing_values">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-help</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="missing_val_ok">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-ok</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">3</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/src/ui/gui/var-sheet-dialogs.ui b/src/ui/gui/var-sheet-dialogs.ui
new file mode 100644 (file)
index 0000000..fdc8171
--- /dev/null
@@ -0,0 +1,961 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkWindow" id="var_type_dialog">
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Variable Type</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="default_width">485</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <child>
+      <object class="GtkHBox" id="hbox1">
+        <property name="visible">True</property>
+        <property name="border_width">5</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkVBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="border_width">13</property>
+            <property name="orientation">vertical</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton1">
+                <property name="label" translatable="yes">Numeric</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton2">
+                <property name="label" translatable="yes">Comma</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radiobutton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton3">
+                <property name="label" translatable="yes">Dot</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radiobutton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton4">
+                <property name="label" translatable="yes">Scientific notation</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radiobutton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton5">
+                <property name="label" translatable="yes">Date</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radiobutton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton6">
+                <property name="label" translatable="yes">Dollar</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radiobutton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton7">
+                <property name="label" translatable="yes">Custom currency</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radiobutton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">6</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radiobutton8">
+                <property name="label" translatable="yes">String</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radiobutton1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">7</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="middle_box">
+            <property name="visible">True</property>
+            <property name="spacing">10</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow4">
+                <property name="width_request">20</property>
+                <property name="height_request">194</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="date_format_list_view">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="custom_currency_hbox">
+                <property name="spacing">15</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow5">
+                    <property name="width_request">1</property>
+                    <property name="height_request">120</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">never</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkTreeView" id="custom_treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="headers_visible">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="Sample">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox10">
+                            <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <object class="GtkLabel" id="psample_label">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">positive</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="nsample_label">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">negative</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label13">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Sample</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="pack_type">end</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="dollar_window">
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="dollar_treeview">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="width_decimals">
+                <property name="width_request">100</property>
+                <property name="height_request">50</property>
+                <property name="visible">True</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">2</property>
+                <property name="column_spacing">2</property>
+                <property name="row_spacing">1</property>
+                <child>
+                  <object class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkLabel" id="width_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Width:</property>
+                        <property name="justify">right</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="pack_type">end</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="decimals_entry">
+                    <property name="width_request">25</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="width_entry">
+                    <property name="width_request">25</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="decimals_label">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Decimal Places:</property>
+                    <property name="justify">right</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVButtonBox" id="vbuttonbox6">
+            <property name="visible">True</property>
+            <property name="spacing">5</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkButton" id="var_type_ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="var_type_cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help_button_variable_type">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="val_labs_dialog">
+    <property name="title" translatable="yes">Value Labels</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <child>
+      <object class="GtkHBox" id="hbox3">
+        <property name="visible">True</property>
+        <property name="border_width">5</property>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="border_width">8</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkTable" id="table3">
+                    <property name="visible">True</property>
+                    <property name="n_rows">2</property>
+                    <property name="n_columns">2</property>
+                    <property name="row_spacing">5</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="GtkTreeView" id="treeview1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="headers_visible">False</property>
+                            <property name="enable_search">False</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkTable" id="table4">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">2</property>
+                        <property name="column_spacing">5</property>
+                        <property name="row_spacing">4</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox4">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkEntry" id="value_entry">
+                                <property name="width_request">85</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="padding">1</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="label_entry">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label6">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Value Label:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label5">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Value:</property>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVButtonBox" id="vbuttonbox2">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <child>
+                          <object class="GtkButton" id="val_labs_add">
+                            <property name="label">gtk-add</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="can_default">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="val_labs_change">
+                            <property name="label">gtk-apply</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="can_default">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="val_labs_remove">
+                            <property name="label">gtk-remove</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="can_default">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label7">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Value Labels</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">10</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVButtonBox" id="vbuttonbox3">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="spacing">5</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkButton" id="val_labs_ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="val_labs_cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help_button_value_labels">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="missing_values_dialog">
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Missing Values</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <child>
+      <object class="GtkVBox" id="vbox3">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkFrame" id="frame9">
+            <property name="visible">True</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment4">
+                <property name="visible">True</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkRadioButton" id="no_missing">
+                <property name="label" translatable="yes">_No missing values</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame4">
+            <property name="visible">True</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkHBox" id="hbox5">
+                    <property name="visible">True</property>
+                    <property name="border_width">5</property>
+                    <property name="spacing">6</property>
+                    <property name="homogeneous">True</property>
+                    <child>
+                      <object class="GtkEntry" id="mv0">
+                        <property name="width_request">75</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="mv1">
+                        <property name="width_request">75</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="mv2">
+                        <property name="width_request">75</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkRadioButton" id="discrete_missing">
+                <property name="label" translatable="yes">_Discrete missing values</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">no_missing</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame10">
+            <property name="visible">True</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment5">
+                <property name="visible">True</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkTable" id="table1">
+                    <property name="visible">True</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">2</property>
+                    <property name="column_spacing">6</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <object class="GtkLabel" id="label11">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Low:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">mv-low</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="mv-low">
+                        <property name="width_request">75</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label12">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_High:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">mv-high</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="mv-high">
+                        <property name="width_request">75</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label10">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Di_screte value:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">mv-discrete</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="mv-discrete">
+                        <property name="width_request">75</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkRadioButton" id="range_missing">
+                <property name="label" translatable="yes">_Range plus one optional discrete missing value</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">no_missing</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="spacing">6</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="missing_val_cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help_button_missing_values">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="missing_val_ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 05ba5d3c9e748c61662bc8ee48914a521938490f..f196e554f9d0c224ee6bfc5a268814e566472050 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-    Copyright (C) 2005, 2006  Free Software Foundation
+    Copyright (C) 2005, 2006, 2010  Free Software Foundation
 
    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
@@ -262,12 +262,12 @@ preview_custom (GtkWidget *w, gpointer data)
       union value v;
       v.f = 1234.56;
 
-      sample_text = value_to_text (v, NULL, dialog->fmt_l);
+      sample_text = value_to_text (v, dialog->vs->dictionary, dialog->fmt_l);
       gtk_label_set_text (GTK_LABEL (dialog->label_psample), sample_text);
       g_free (sample_text);
 
       v.f = -v.f;
-      sample_text = value_to_text (v, NULL, dialog->fmt_l);
+      sample_text = value_to_text (v, dialog->vs->dictionary, dialog->fmt_l);
       gtk_label_set_text (GTK_LABEL (dialog->label_nsample), sample_text);
       g_free (sample_text);
     }
@@ -315,21 +315,20 @@ set_format_type_from_treeview (GtkTreeView *treeview, gpointer data)
 
   dialog->fmt_l = custom_format;
   dialog->fmt_l.type = *(int*) g_value_get_pointer (&the_value);
-
 }
 
 
-
-
 /* Create the structure */
 struct var_type_dialog *
-var_type_dialog_create (GtkWindow *toplevel)
+var_type_dialog_create (GtkWindow *toplevel, PsppireVarStore *vs)
 {
   gint i;
   struct var_type_dialog *dialog = g_malloc (sizeof (struct var_type_dialog));
 
   GtkBuilder *xml = builder_new ("var-sheet-dialogs.ui");
 
+  dialog->vs = vs;
+
   dialog->window = get_widget_assert (xml,"var_type_dialog");
   dialog->active_button = -1;
 
@@ -445,7 +444,7 @@ var_type_dialog_create (GtkWindow *toplevel)
   g_object_unref (list_store);
 
   g_signal_connect (dialog->date_format_treeview, "cursor-changed",
-                  GTK_SIGNAL_FUNC (set_format_from_treeview), dialog);
+                  G_CALLBACK (set_format_from_treeview), dialog);
 
 
   /* populate the dollar treeview */
@@ -483,11 +482,11 @@ var_type_dialog_create (GtkWindow *toplevel)
 
   g_signal_connect (dialog->dollar_treeview,
                   "cursor-changed",
-                  GTK_SIGNAL_FUNC (set_format_from_treeview), dialog);
+                  G_CALLBACK (set_format_from_treeview), dialog);
 
   g_signal_connect_swapped (dialog->dollar_treeview,
                   "cursor-changed",
-                  GTK_SIGNAL_FUNC (update_width_decimals), dialog);
+                  G_CALLBACK (update_width_decimals), dialog);
 
 
   /* populate the custom treeview */
@@ -527,22 +526,22 @@ var_type_dialog_create (GtkWindow *toplevel)
 
   g_signal_connect (dialog->custom_treeview,
                   "cursor-changed",
-                  GTK_SIGNAL_FUNC (set_format_type_from_treeview), dialog);
+                  G_CALLBACK (set_format_type_from_treeview), dialog);
 
 
   g_signal_connect (dialog->custom_treeview,
                   "cursor-changed",
-                  GTK_SIGNAL_FUNC (preview_custom), dialog);
+                  G_CALLBACK (preview_custom), dialog);
 
 
   g_signal_connect (dialog->entry_width,
                   "changed",
-                  GTK_SIGNAL_FUNC (preview_custom), dialog);
+                  G_CALLBACK (preview_custom), dialog);
 
 
   g_signal_connect (dialog->entry_decimals,
                   "changed",
-                  GTK_SIGNAL_FUNC (preview_custom), dialog);
+                  G_CALLBACK (preview_custom), dialog);
 
 
   /* Connect to the OK button */
@@ -790,14 +789,12 @@ on_var_type_ok_clicked (GtkWidget *w, gpointer data)
     gint decimals = atoi (gtk_entry_get_text
                         (GTK_ENTRY (dialog->entry_decimals)));
 
-    gint new_type = VAL_NUMERIC;
     gint new_width = 0;
     bool result = false;
     struct fmt_spec spec;
     switch (dialog->active_button)
       {
       case BUTTON_STRING:
-       new_type = VAL_STRING;
        new_width = width;
        result = make_output_format_try (&spec, FMT_A, width, 0);
        break;
index 504b5c7abb04b1f64f9cbb508c937b49186a9730..4bb681aaa0e0688e96965fb73c1a82eff0c3505b 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <data/format.h>
 
+#include "psppire-var-store.h"
+
 /*  This module describes the behaviour of the Variable Type dialog box,
     used for input of the variable type parameter in the var sheet */
 
@@ -38,14 +40,16 @@ enum
 
 struct variable;
 
-typedef void (*variable_changed_func)(struct variable *var);
-
 struct var_type_dialog
 {
   GtkWidget *window;
 
   /* Variable to be updated */
   struct variable *pv;
+  
+  /* The variable store to which this dialog relates */
+  PsppireVarStore *vs;
+  
 
   /* Local copy of format specifier */
   struct fmt_spec fmt_l;
@@ -84,12 +88,7 @@ struct var_type_dialog
 };
 
 
-struct var_type_dialog * var_type_dialog_create (GtkWindow *);
-
-
-void var_type_dialog_set_variable (struct var_type_dialog *dialog,
-                                 variable_changed_func set_variable_changed,
-                                 struct variable *var);
+struct var_type_dialog * var_type_dialog_create (GtkWindow *, PsppireVarStore *vs);
 
 void var_type_dialog_show (struct var_type_dialog *dialog);
 
index 2fdf2df87440ce8beec883aa65aab02dce988123..521864f417c6cd041570a705c91d6638bbe570ac 100644 (file)
@@ -17,6 +17,7 @@
 #include <config.h>
 #include <gtk/gtk.h>
 
+#include "variable-info-dialog.h"
 #include "var-display.h"
 #include <data/variable.h>
 #include <data/format.h>
@@ -65,7 +66,7 @@ populate_text (PsppireDictView *treeview, gpointer data)
   if ( var == NULL)
     return;
 
-  g_object_get (treeview, "dictionary", &dict,
+  g_object_get (treeview, "model", &dict,
                NULL);
 
   gstring = g_string_sized_new (200);
@@ -91,8 +92,6 @@ populate_text (PsppireDictView *treeview, gpointer data)
   text = measure_to_string (var, NULL);
   g_string_append_printf (gstring, _("Measurement Level: %s\n"),
                          text);
-  g_free (text);
-
 
 
   /* Value Labels */
@@ -145,13 +144,11 @@ static gchar * generate_syntax (PsppireDictView *treeview);
 
 
 void
-variable_info_dialog (GObject *o, gpointer data)
+variable_info_dialog (PsppireDataWindow *de)
 {
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
-
   gint response ;
 
-  GtkBuilder *xml = builder_new ("variable-info-dialog.ui");
+  GtkBuilder *xml = builder_new ("variable-info.ui");
 
   GtkWidget *dialog = get_widget_assert (xml, "variable-info-dialog");
   GtkWidget *treeview = get_widget_assert (xml, "treeview2");
@@ -165,7 +162,7 @@ variable_info_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   g_object_get (vs, "dictionary", &dict, NULL);
-  g_object_set (treeview, "dictionary", dict,
+  g_object_set (treeview, "model", dict,
                "selection-mode", GTK_SELECTION_SINGLE,
                NULL);
 
@@ -199,7 +196,7 @@ variable_info_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (PSPPIRE_DICT_VIEW (treeview));
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
 
        g_free (syntax);
       }
diff --git a/src/ui/gui/variable-info-dialog.glade b/src/ui/gui/variable-info-dialog.glade
deleted file mode 100644 (file)
index 1acb84e..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <requires lib="psppire"/>
-  <widget class="PsppireDialog" id="variable-info-dialog">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Variables</property>
-    <property name="modal">True</property>
-    <property name="slidable">True</property>
-    <child internal-child="hbox">
-      <widget class="GtkHPaned" id="dialog-hbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow13">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="shadow_type">GTK_SHADOW_IN</property>
-            <child>
-              <widget class="PsppireDictView" id="treeview2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="headers_visible">False</property>
-                <property name="reorderable">True</property>
-                <property name="fixed_height_mode">True</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="resize">False</property>
-            <property name="shrink">True</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkVBox" id="vbox23">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
-            <child>
-              <widget class="GtkLabel" id="label24">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Variable Information:</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="padding">5</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow14">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                <property name="shadow_type">GTK_SHADOW_IN</property>
-                <child>
-                  <widget class="GtkTextView" id="textview1">
-                    <property name="height_request">200</property>
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="editable">False</property>
-                    <property name="wrap_mode">GTK_WRAP_WORD_CHAR</property>
-                    <property name="left_margin">3</property>
-                    <property name="cursor_visible">False</property>
-                    <property name="accepts_tab">False</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="padding">5</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="PsppireHButtonBox" id="psppire-hbuttonbox4">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="border_width">5</property>
-                <property name="homogeneous">True</property>
-                <property name="buttons">PSPPIRE_BUTTON_GOTO_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK | PSPPIRE_BUTTON_PASTE_MASK</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="pack_type">GTK_PACK_END</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="resize">True</property>
-            <property name="shrink">True</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
index e775506f3ec30d0eeb2747865dc4425708fda1e2..c08f6c998c3a8b5c84bd449aa1855ffc5e930201 100644 (file)
@@ -17,8 +17,8 @@
 #ifndef __VARIABLE_DIALOG_H
 #define __VARIABLE_DIALOG_H
 
-#include <gtk/gtk.h>
+#include "psppire-data-window.h"
 
-void variable_info_dialog (GObject *o, gpointer data);
+void variable_info_dialog (PsppireDataWindow * data);
 
 #endif
diff --git a/src/ui/gui/variable-info.ui b/src/ui/gui/variable-info.ui
new file mode 100644 (file)
index 0000000..b8f66fe
--- /dev/null
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="psppire" version="2054.22072"/>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="PsppireDialog" id="variable-info-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Variables</property>
+    <property name="modal">True</property>
+    <property name="slidable">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHPaned" id="dialog-hbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow13">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="hscrollbar_policy">never</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="PsppireDictView" id="treeview2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="headers_visible">False</property>
+                <property name="reorderable">True</property>
+                <property name="fixed_height_mode">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="resize">False</property>
+            <property name="shrink">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox23">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">5</property>
+            <child>
+              <object class="GtkLabel" id="label24">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Variable Information:</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">5</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow14">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTextView" id="textview1">
+                    <property name="height_request">200</property>
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="editable">False</property>
+                    <property name="wrap_mode">word-char</property>
+                    <property name="left_margin">3</property>
+                    <property name="cursor_visible">False</property>
+                    <property name="accepts_tab">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="padding">5</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="PsppireHButtonBox" id="psppire-hbuttonbox4">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+                <property name="homogeneous">True</property>
+                <property name="buttons">PSPPIRE_BUTTON_GOTO_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK | PSPPIRE_BUTTON_PASTE_MASK</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="pack_type">end</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="resize">True</property>
+            <property name="shrink">True</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index b3087159f941adf7d16b7d2dc1d66f7165ee38d5..fc50aea944b56889a7dd31009a31047fbbee4df2 100644 (file)
 
 #include "psppire-var-store.h"
 
+struct weight_cases_dialog
+{
+  PsppireDict *dict;
+  GtkEntry *entry;
+  GtkLabel *status;
+  GtkToggleButton *off;
+  GtkToggleButton *on;
+};
+
 static void
 on_select (PsppireSelector *sel, gpointer data)
 {
-  GtkRadioButton *radiobutton2 = data;
+  struct weight_cases_dialog *wcd = data;
 
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton2), TRUE);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wcd->on), TRUE);
+  gtk_widget_set_sensitive (GTK_WIDGET (wcd->on), TRUE);
 }
 
 static void
 on_deselect (PsppireSelector *sel, gpointer data)
 {
-  GtkRadioButton *radiobutton1 = data;
+  struct weight_cases_dialog *wcd = data;
 
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton1), TRUE);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wcd->off), TRUE);
+  gtk_widget_set_sensitive (GTK_WIDGET (wcd->on), FALSE);
 }
 
 
@@ -59,15 +70,6 @@ on_toggle (GtkToggleButton *button, gpointer data)
     gtk_entry_set_text (entry, "");
 }
 
-struct weight_cases_dialog
-{
-  PsppireDict *dict;
-  GtkEntry *entry;
-  GtkLabel *status;
-  GtkToggleButton *off;
-  GtkToggleButton *on;
-};
-
 static void
 refresh (PsppireDialog *dialog, const struct weight_cases_dialog *wcd)
 {
@@ -100,10 +102,9 @@ static gchar * generate_syntax (const struct weight_cases_dialog *wcd);
 
 /* Pops up the Weight Cases dialog box */
 void
-weight_cases_dialog (GObject *o, gpointer data)
+weight_cases_dialog (PsppireDataWindow *de)
 {
   gint response;
-  PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
   struct weight_cases_dialog wcd;
 
   GtkBuilder *xml = builder_new ("psppire.ui");
@@ -111,12 +112,13 @@ weight_cases_dialog (GObject *o, gpointer data)
   GtkWidget *dialog = get_widget_assert (xml, "weight-cases-dialog");
   GtkWidget *source = get_widget_assert (xml, "weight-cases-treeview");
   GtkWidget *entry = get_widget_assert (xml, "weight-cases-entry");
-  GtkWidget *selector = get_widget_assert (xml, "weight-cases-selector");
   GtkWidget *radiobutton1 = get_widget_assert (xml,
                                               "weight-cases-radiobutton1");
   GtkWidget *radiobutton2 = get_widget_assert (xml, "radiobutton2");
   GtkWidget *status  = get_widget_assert (xml, "weight-status-label");
 
+  GtkWidget *selector = get_widget_assert (xml, "weight-cases-selector");
+
   PsppireVarStore *vs = NULL;
 
   g_object_get (de->data_editor, "var-store", &vs,  NULL);
@@ -125,27 +127,17 @@ weight_cases_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
   g_signal_connect (radiobutton1, "toggled", G_CALLBACK (on_toggle), entry);
-  g_signal_connect (selector, "selected", G_CALLBACK (on_select),
-                   radiobutton2);
-
-  g_signal_connect (selector, "de-selected", G_CALLBACK (on_deselect),
-                   radiobutton1);
 
+  g_signal_connect (selector, "selected", G_CALLBACK (on_select), &wcd);
+  g_signal_connect (selector, "de-selected", G_CALLBACK (on_deselect), &wcd);
   
-  g_object_set (source, "dictionary", wcd.dict,
+  g_object_set (source, "model", wcd.dict,
                                 "selection-mode", GTK_SELECTION_SINGLE,
                                 "predicate", var_is_numeric,
                                 NULL);
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
-                                source,
-                                entry,
-                                insert_source_row_into_entry,
-                                is_currently_in_entry,
-                                NULL
-                                );
-
-
+  psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector),
+                                   is_currently_in_entry);
 
   wcd.entry = GTK_ENTRY (entry);
   wcd.status = GTK_LABEL (status);
@@ -172,7 +164,7 @@ weight_cases_dialog (GObject *o, gpointer data)
     case PSPPIRE_RESPONSE_PASTE:
       {
        gchar *syntax = generate_syntax (&wcd);
-        paste_syntax_in_new_window (syntax);
+        paste_syntax_to_window (syntax);
        g_free (syntax);
       }
       break;
index e6572e63bf8550aacc2bb5ada3ef33611e755169..e7a3d0b906d5715dff2ba2f9958e762eeae5924b 100644 (file)
 #ifndef WEIGHT_CASES_DIALOG_H
 #define WEIGHT_CASES_DIALOG_H
 
-#include <glib.h>
-#include <glib-object.h>
+#include "psppire-data-window.h"
 
 /* Pops up the Weight Cases dialog box */
-void weight_cases_dialog (GObject *o, gpointer data);
+void weight_cases_dialog (PsppireDataWindow * data);
 
 
 #endif
index 979224fe4152331227d6597cf3259e08fb996cb5..a1a55d1453a3816bd1a3bdf68c7b0b833bf3bccc 100644 (file)
@@ -10,6 +10,7 @@
 #include "psppire-keypad.h"
 #include "psppire-acr.h"
 #include "psppire-dictview.h"
+#include "psppire-var-view.h"
 
 
 /* Any custom widgets which are to be used in GtkBuilder ui files
@@ -25,4 +26,5 @@ preregister_widgets (void)
   psppire_keypad_get_type ();
   psppire_acr_get_type ();
   psppire_dict_view_get_type ();
+  psppire_var_view_get_type ();
 }
index 43ae5c629ac1098998c480a09175af95bd457326..c91a9fef1a8956c4bd856d58fa26fd998194df69 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
+   Copyright (C) 2008, 2010  Free Software Foundation
 
    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
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
-#include <argp.h>
+
 #include "source-init-opts.h"
+
 #include <stdbool.h>
-#include <xalloc.h>
-#include <string.h>
-#include <output/output.h>
-#include <data/file-name.h>
-#include <libpspp/getl.h>
-#include <language/syntax-file.h>
 #include <stdlib.h>
-#include <libpspp/llx.h>
-#include <data/por-file-reader.h>
-#include <data/sys-file-reader.h>
-#include <libpspp/message.h>
-#include <ui/syntax-gen.h>
-#include <language/syntax-string-source.h>
-#include <data/file-name.h>
-#include <data/settings.h>
+#include <string.h>
+
+#include "data/file-name.h"
+#include "data/por-file-reader.h"
+#include "data/settings.h"
+#include "data/sys-file-reader.h"
+#include "language/syntax-file.h"
+#include "language/syntax-string-source.h"
+#include "libpspp/assertion.h"
+#include "libpspp/argv-parser.h"
+#include "libpspp/getl.h"
+#include "libpspp/llx.h"
+#include "libpspp/message.h"
+#include "ui/syntax-gen.h"
+
+#include "gl/error.h"
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
-static const struct argp_option post_init_options [] = {
-  {"algorithm", 'a', "{compatible|enhanced}", 0, N_("set to `compatible' if you want output calculated from broken algorithms"), 0},
-  {"include", 'I', "DIR", 0, N_("Append DIR to include path"), 0},
-  {"no-include", 'I', 0, 0, N_("Clear include path"), 0},
-  {"no-statrc", 'r', 0, 0, N_("Disable execution of .pspp/rc at startup"), 0},
-  {"config-dir", 'B', "DIR", 0, N_("Set configuration directory to DIR"), 0},
-  {"safer", 's', 0, 0,  N_("Don't allow some unsafe operations"), 0},
-  {"syntax", 'x', "{compatible|enhanced}", 0, N_("Set to `compatible' if you want only to accept SPSS compatible syntax"), 0},
-  { 0, 0, 0, 0, 0, 0 }
-};
-
-static error_t
-parse_post_init_opts (int key, char *arg, struct argp_state *state)
-{
-  struct source_init
+enum
   {
-    bool process_statrc;
+    OPT_ALGORITHM,
+    OPT_INCLUDE,
+    OPT_NO_INCLUDE,
+    OPT_SAFER,
+    OPT_SYNTAX,
+    N_SOURCE_INIT_OPTIONS
   };
 
-  struct source_init *sip = state->hook;
-
-  struct source_stream *ss = state->input;
+static const struct argv_option source_init_options[N_SOURCE_INIT_OPTIONS] =
+  {
+    {"algorithm", 'a', required_argument, OPT_ALGORITHM},
+    {"include", 'I', required_argument, OPT_INCLUDE},
+    {"no-include", 0, no_argument, OPT_NO_INCLUDE},
+    {"safer", 's', no_argument, OPT_SAFER},
+    {"syntax", 'x', required_argument, OPT_SYNTAX},
+  };
 
-  if ( state->input == NULL)
-    return 0;
+static void
+source_init_option_callback (int id, void *ss_)
+{
+  struct source_stream *ss = ss_;
 
-  switch (key)
+  switch (id)
     {
-    case ARGP_KEY_INIT:
-      state->hook = sip = xzalloc (sizeof (struct source_init));
-      sip->process_statrc = true;
-      break;
-    case ARGP_KEY_FINI:
-      free (sip);
-      break;
-    case  'a':
-      if ( 0 == strcmp (arg, "compatible") )
+    case OPT_ALGORITHM:
+      if (!strcmp (optarg, "compatible"))
        settings_set_algorithm (COMPATIBLE);
-      else if ( 0 == strcmp (arg, "enhanced"))
+      else if (!strcmp (optarg, "enhanced"))
        settings_set_algorithm (ENHANCED);
       else
-       {
-         argp_failure (state, 1, 0, _("Algorithm must be either \"compatible\" or \"enhanced\"."));
-       }
-      break;
-    case 'B':
-      config_path = arg;
+        error (1, 0,
+               _("Algorithm must be either \"compatible\" or \"enhanced\"."));
       break;
-    case 'I':
-      if (arg == NULL || !strcmp (arg, "-"))
+
+    case OPT_INCLUDE:
+      if (!strcmp (optarg, "-"))
        getl_clear_include_path (ss);
       else
-       getl_add_include_dir (ss, arg);
+       getl_add_include_dir (ss, optarg);
       break;
-    case 'r':
-      sip->process_statrc = false;
-      break;
-    case ARGP_KEY_SUCCESS:
-      if (sip->process_statrc)
-       {
-         char *pspprc_fn = fn_search_path ("rc", config_path);
-         if (pspprc_fn != NULL)
-           {
-             getl_append_source (ss,
-                                 create_syntax_file_source (pspprc_fn),
-                                 GETL_BATCH,
-                                 ERRMODE_CONTINUE
-                                 );
-
-             free (pspprc_fn);
-           }
-       }
+
+    case OPT_NO_INCLUDE:
+      getl_clear_include_path (ss);
       break;
-    case 's':
+
+    case OPT_SAFER:
       settings_set_safer_mode ();
       break;
-    case 'x':
-      if ( 0 == strcmp (arg, "compatible") )
+
+    case OPT_SYNTAX:
+      if (!strcmp (optarg, "compatible") )
        settings_set_syntax (COMPATIBLE);
-      else if ( 0 == strcmp (arg, "enhanced"))
+      else if (!strcmp (optarg, "enhanced"))
        settings_set_syntax (ENHANCED);
       else
-       {
-         argp_failure (state, 1, 0, _("Syntax must be either \"compatible\" or \"enhanced\"."));
-       }
+        error (1, 0,
+               _("Syntax must be either \"compatible\" or \"enhanced\"."));
       break;
+
     default:
-      return ARGP_ERR_UNKNOWN;
+      NOT_REACHED ();
     }
-
-  return 0;
 }
 
-const struct argp post_init_argp =
-  {post_init_options, parse_post_init_opts, 0, 0, 0, 0, 0};
-
+void
+source_init_register_argv_parser (struct argv_parser *ap,
+                                  struct source_stream *ss)
+{
+  argv_parser_add_options (ap, source_init_options, N_SOURCE_INIT_OPTIONS,
+                           source_init_option_callback, ss);
+}
index 874935313ae2554daf9dc6de3ce65ddbbfca52e1..cfd87f3fa0322266114d346b850b73332dfd42bf 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
+   Copyright (C) 2008, 2010  Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 
-#ifndef SOURCE_INIT_OPTS
-#define SOURCE_INIT_OPTS
+#ifndef UI_SOURCE_INIT_OPTS
+#define UI_SOURCE_INIT_OPTS
 
-extern const struct argp post_init_argp;
+struct argv_parser;
+struct source_stream;
 
-#endif
+void source_init_register_argv_parser (struct argv_parser *,
+                                       struct source_stream *);
 
+#endif /* ui/source/source-init-opts.h */
index 0bfa32ccad62ac1169ce23da07717f9e16f7a1f5..81b896dc878839d44590f9e3205ebc53d5e07fb0 100644 (file)
@@ -25,9 +25,10 @@ src_ui_terminal_pspp_LDADD = \
        src/ui/libuicommon.la \
        src/libpspp.la \
        src/libpspp-core.la \
+       $(CAIRO_LIBS) \
        $(NCURSES_LIBS) \
        $(LIBICONV) \
-       @LIBINTL@ @LIBREADLINE@
+       $(LIBINTL) $(LIBREADLINE)
 
 
 src_ui_terminal_pspp_LDFLAGS = $(PSPP_LDFLAGS) $(PG_LDFLAGS)
index 7ad162fca6d40b746a0155d891d8e08784e2e4df..02be4f78c0e777f1e93df1719fc7fc0ed48f13f2 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <ieeefp.h>
 #endif
 
-
-#include <libpspp/i18n.h>
-#include <data/dictionary.h>
-#include <data/file-handle-def.h>
-#include <libpspp/getl.h>
-#include <data/file-name.h>
-#include <data/procedure.h>
-#include <data/settings.h>
-#include <data/variable.h>
-#include <gsl/gsl_errno.h>
-#include <language/command.h>
-#include <language/lexer/lexer.h>
-#include <language/prompt.h>
-#include <libpspp/compiler.h>
-#include <libpspp/message.h>
-#include <libpspp/version.h>
-#include <math/random.h>
-#include <output/output.h>
-#include <ui/debugger.h>
-#include <ui/terminal/msg-ui.h>
-#include <ui/terminal/read-line.h>
-#include <ui/terminal/terminal.h>
-#include <ui/terminal/terminal-opts.h>
-#include <ui/command-line.h>
-#include <ui/source-init-opts.h>
-
-#include "fatal-signal.h"
-#include "progname.h"
-#include "relocatable.h"
+#include "data/dictionary.h"
+#include "data/file-handle-def.h"
+#include "data/file-name.h"
+#include "data/procedure.h"
+#include "data/settings.h"
+#include "data/variable.h"
+#include "gsl/gsl_errno.h"
+#include "language/command.h"
+#include "language/lexer/lexer.h"
+#include "language/prompt.h"
+#include "libpspp/argv-parser.h"
+#include "libpspp/compiler.h"
+#include "libpspp/getl.h"
+#include "libpspp/i18n.h"
+#include "libpspp/message.h"
+#include "libpspp/version.h"
+#include "math/random.h"
+#include "output/driver.h"
+#include "ui/debugger.h"
+#include "ui/source-init-opts.h"
+#include "ui/terminal/msg-ui.h"
+#include "ui/terminal/read-line.h"
+#include "ui/terminal/terminal-opts.h"
+#include "ui/terminal/terminal.h"
+
+#include "gl/fatal-signal.h"
+#include "gl/progname.h"
+#include "gl/relocatable.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -76,15 +75,14 @@ static struct dataset * the_dataset = NULL;
 static struct lexer *the_lexer;
 static struct source_stream *the_source_stream ;
 
-const char *argp_program_version = version;
-const char *argp_program_bug_address = PACKAGE_BUGREPORT;
-
 /* Program entry point. */
 int
 main (int argc, char **argv)
 {
   int *view_width_p, *view_length_p;
-  struct command_line_processor *clp;
+  struct terminal_opts *terminal_opts;
+  struct argv_parser *parser;
+
   set_program_name (argv[0]);
 
   signal (SIGABRT, bug_handler);
@@ -96,13 +94,8 @@ main (int argc, char **argv)
   fpu_init ();
   gsl_set_error_handler_off ();
 
-  outp_init ();
-  fn_init ();
   fh_init ();
-  the_source_stream =
-    create_source_stream (
-                         fn_getenv_default ("STAT_INCLUDE_PATH", include_path)
-                         );
+  the_source_stream = create_source_stream ();
   prompt_init ();
   readln_initialize ();
   terminal_init (&view_width_p, &view_length_p);
@@ -111,38 +104,16 @@ main (int argc, char **argv)
 
   the_dataset = create_dataset ();
 
-
-
-  clp = command_line_processor_create (_("PSPP --- A program for statistical analysis"),
-                                      _("FILE1, FILE2 ... FILEn"), NULL);
-
-  command_line_processor_add_options (clp, &io_argp,
-                                     _("Options affecting input and output locations:"), the_source_stream);
-
-  command_line_processor_add_options (clp, &test_argp,
-                                     _("Diagnostic options:"), the_source_stream);
-
-  command_line_processor_add_options (clp, &post_init_argp,
-                                     _("Options affecting syntax and behavior:"), the_source_stream);
-
-  command_line_processor_parse (clp, argc, argv);
+  parser = argv_parser_create ();
+  terminal_opts = terminal_opts_init (parser, the_source_stream);
+  source_init_register_argv_parser (parser, the_source_stream);
+  if (!argv_parser_run (parser, argc, argv))
+    exit (EXIT_FAILURE);
+  terminal_opts_done (terminal_opts, argc, argv);
+  argv_parser_destroy (parser);
 
   msg_ui_init (the_source_stream);
 
-  if (!settings_get_testing_mode ())
-    {
-      outp_read_devices ();
-    }
-  else
-    {
-      outp_configure_driver_line
-       (
-        ss_cstr ("raw-ascii:ascii:listing:width=9999 length=9999 "
-                 "output-file=\"pspp.list\" emphasis=none "
-                 "headers=off paginate=off squeeze=on "
-                 "top-margin=0 bottom-margin=0"));
-    }
-
   the_lexer = lex_create (the_source_stream);
 
   for (;;)
@@ -158,13 +129,13 @@ main (int argc, char **argv)
                     "a cascade of dependent command failures."));
          getl_abort_noninteractive (the_source_stream);
        }
-      else
-       check_msg_count (the_source_stream);
+      else if (msg_ui_too_many_errors ())
+        getl_abort_noninteractive (the_source_stream);
     }
 
 
   clean_up ();
-  return any_errors ();
+  return msg_ui_any_errors ();
 }
 \f
 
@@ -219,7 +190,7 @@ clean_up (void)
       destroy_source_stream (the_source_stream);
       prompt_done ();
       readln_uninitialize ();
-      outp_done ();
+      output_close ();
       msg_ui_done ();
       i18n_done ();
     }
index 682d753d8fbd36200f68e33677c239e5ef5b6c17..c657f096f3c16d9679f3bfafff44fa57017d2994 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include "msg-ui.h"
+#include "ui/terminal/msg-ui.h"
 
-#include "unilbrk.h"
-#include "localcharset.h"
-
-#include <libpspp/msg-locator.h>
-#include <libpspp/getl.h>
-#include <data/settings.h>
-#include <libpspp/message.h>
-#include <libpspp/str.h>
-#include <output/journal.h>
-#include <output/output.h>
-#include <output/table.h>
 #include <errno.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "data/settings.h"
+#include "libpspp/getl.h"
+#include "libpspp/message.h"
+#include "libpspp/msg-locator.h"
+#include "libpspp/str.h"
+#include "output/journal.h"
+#include "output/driver.h"
+#include "output/tab.h"
+#include "output/message-item.h"
+
+#include "gl/unilbrk.h"
+#include "gl/localcharset.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
-/* Number of errors, warnings reported. */
-static int error_count;
-static int warning_count;
-static const char *error_file;
+/* Number of messages reported, by severity level. */
+static int counts[MSG_N_SEVERITIES];
 
-static void handle_msg (const struct msg *);
+/* True after the maximum number of errors or warnings has been exceeded. */
+static bool too_many_errors;
 
-static FILE *msg_file ;
+/* True after the maximum number of notes has been exceeded. */
+static bool too_many_notes;
 
-void
-msg_ui_set_error_file (const char *filename)
-{
-  error_file = filename;
-}
+static void handle_msg (const struct msg *);
 
 void
 msg_ui_init (struct source_stream *ss)
 {
-  msg_file = stdout;
-
-  if ( error_file )
-    {
-      msg_file = fopen (error_file, "a");
-      if ( NULL == msg_file )
-       {
-         int err = errno;
-         printf ( _("Cannot open %s (%s). "
-                    "Writing errors to stdout instead.\n"),
-                  error_file, strerror(err) );
-         msg_file = stdout;
-       }
-    }
   msg_init (ss, handle_msg);
 }
 
@@ -78,198 +63,80 @@ msg_ui_done (void)
 {
   msg_done ();
   msg_locator_done ();
-
-  if ( msg_file ) /* FIXME: do we really want to close stdout ?? */
-    fclose (msg_file);
 }
 
 /* Checks whether we've had so many errors that it's time to quit
    processing this syntax file. */
-void
-check_msg_count (struct source_stream *ss)
+bool
+msg_ui_too_many_errors (void)
 {
-  if (!getl_is_interactive (ss))
-    {
-      if (settings_get_errorbreak () && error_count)
-        msg (MN, _("Terminating execution of syntax file due to error."));
-      else if (error_count > settings_get_mxerrs () )
-        msg (MN, _("Errors (%d) exceeds limit (%d)."),
-             error_count, settings_get_mxerrs ());
-      else if (error_count + warning_count > settings_get_mxwarns () )
-        msg (MN, _("Warnings (%d) exceed limit (%d)."),
-             error_count + warning_count, settings_get_mxwarns () );
-      else
-        return;
-
-      getl_abort_noninteractive (ss);
-    }
+  return too_many_errors;
 }
 
 void
-reset_msg_count (void)
+msg_ui_reset_counts (void)
 {
-  error_count = warning_count = 0;
+  int i;
+
+  for (i = 0; i < MSG_N_SEVERITIES; i++)
+    counts[i] = 0;
+  too_many_errors = false;
+  too_many_notes = false;
 }
 
 bool
-any_errors (void)
+msg_ui_any_errors (void)
 {
-  return error_count > 0;
+  return counts[MSG_S_ERROR] > 0;
 }
-\f
-typedef void write_line_func (int indent, struct substring line, void *aux);
-static void dump_message (char *msg, unsigned width, unsigned indent,
-                          write_line_func *, void *aux);
-static write_line_func write_stream;
-static write_line_func write_journal;
 
 static void
-handle_msg (const struct msg *m)
+submit_note (char *s)
 {
-  struct category
-    {
-      bool show_command_name;   /* Show command name with error? */
-      bool show_file_location;  /* Show syntax file location? */
-    };
-
-  static const struct category categories[] =
-    {
-      {false, false},           /* MSG_GENERAL. */
-      {true, true},             /* MSG_SYNTAX. */
-      {false, true},            /* MSG_DATA. */
-    };
-
-  struct severity
-    {
-      const char *name;         /* How to identify this severity. */
-      int *count;               /* Number of msgs with this severity so far. */
-    };
-
-  static struct severity severities[] =
-    {
-      {N_("error"), &error_count},          /* MSG_ERROR. */
-      {N_("warning"), &warning_count},      /* MSG_WARNING. */
-      {NULL, NULL},                         /* MSG_NOTE. */
-    };
-
-  const struct category *category = &categories[m->category];
-  const struct severity *severity = &severities[m->severity];
-  struct string string = DS_EMPTY_INITIALIZER;
-
-  if (category->show_file_location && m->where.file_name)
-    {
-      ds_put_format (&string, "%s:", m->where.file_name);
-      if (m->where.line_number != -1)
-       ds_put_format (&string, "%d:", m->where.line_number);
-      ds_put_char (&string, ' ');
-    }
-
-  if (severity->name != NULL)
-    ds_put_format (&string, "%s: ", gettext (severity->name));
-
-  if (severity->count != NULL)
-    ++*severity->count;
-
-  if (category->show_command_name && msg_get_command_name () != NULL)
-    ds_put_format (&string, "%s: ", msg_get_command_name ());
-
-  ds_put_cstr (&string, m->text);
-
-  if (msg_file != stdout || settings_get_error_routing_to_terminal ())
-    dump_message (ds_cstr (&string),
-                  isatty (fileno (msg_file)) ? settings_get_viewwidth () : INT_MAX, 8,
-                  write_stream, msg_file);
-
-  dump_message (ds_cstr (&string), 78, 0, write_journal, NULL);
-
-  if (settings_get_error_routing_to_listing ())
-    {
-      /* Disable screen output devices, because the error should
-         already have been reported to the screen with the
-         dump_message call above. */
-      outp_enable_device (false, OUTP_DEV_SCREEN);
-      tab_output_text (TAB_LEFT, ds_cstr (&string));
-      outp_enable_device (true, OUTP_DEV_SCREEN);
-    }
-
-  ds_destroy (&string);
+  struct msg m;
+
+  m.category = MSG_C_GENERAL;
+  m.severity = MSG_S_NOTE;
+  m.where.file_name = NULL;
+  m.where.line_number = -1;
+  m.text = s;
+  message_item_submit (message_item_create (&m));
+  free (s);
 }
 
-/* Divides MSG into lines of WIDTH width for the first line and
-   WIDTH - INDENT width for each succeeding line, and writes the
-   lines by calling DUMP_LINE for each line, passing AUX as
-   auxiliary data. */
 static void
-dump_message (char *msg, unsigned width, unsigned indent,
-              write_line_func *dump_line, void *aux)
+handle_msg (const struct msg *m)
 {
-  size_t length = strlen (msg);
-  char *string, *breaks;
-  int line_indent;
-  size_t line_start, i;
-
-  /* Allocate temporary buffers.
-     If we can't get memory for them, then just dump the whole
-     message. */
-  string = strdup (msg);
-  breaks = malloc (length);
-  if (string == NULL || breaks == NULL)
-    {
-      free (string);
-      free (breaks);
-      dump_line (0, ss_cstr (msg), aux);
-      return;
-    }
-
-  /* Break into lines. */
-  if (indent > width / 3)
-    indent = width / 3;
-  ulc_width_linebreaks (string, length,
-                        width - indent, -indent, 0,
-                        NULL, locale_charset (), breaks);
+  int n_msgs, max_msgs;
 
-  /* Write out lines. */
-  line_start = 0;
-  line_indent = 0;
-  for (i = 0; i < length; i++)
-    if (breaks[i] == UC_BREAK_POSSIBLE || breaks[i] == UC_BREAK_MANDATORY)
-      {
-        dump_line (line_indent,
-                   ss_buffer (string + line_start, i - line_start), aux);
-        line_indent = indent;
+  if (too_many_errors || (too_many_notes && m->severity == MSG_S_NOTE))
+    return;
 
-        /* UC_BREAK_POSSIBLE means that a line break can be
-           inserted, and that the character should be included
-           in the next line.
-           UC_BREAK_MANDATORY means that this character is a line
-           break, so it should not be included in the next line. */
-        line_start = i + (breaks[i] == UC_BREAK_MANDATORY);
-      }
-  if (line_start < length)
-    dump_line (line_indent,
-               ss_buffer (string + line_start, length - line_start), aux);
-
-  free (string);
-  free (breaks);
-}
+  message_item_submit (message_item_create (m));
 
-/* Write LINE_INDENT spaces, LINE, then a new-line to STREAM. */
-static void
-write_stream (int line_indent, struct substring line, void *stream_)
-{
-  FILE *stream = stream_;
-  int i;
-  for (i = 0; i < line_indent; i++)
-    putc (' ', stream);
-  fwrite (ss_data (line), 1, ss_length (line), stream);
-  putc ('\n', stream);
-}
-
-/* Writes LINE to the journal. */
-static void
-write_journal (int line_indent UNUSED, struct substring line, void *unused UNUSED)
-{
-  char *s = xstrndup (ss_data (line), ss_length (line));
-  journal_write (true, s);
-  free (s);
+  counts[m->severity]++;
+  max_msgs = settings_get_max_messages (m->severity);
+  n_msgs = counts[m->severity];
+  if (m->severity == MSG_S_WARNING)
+    n_msgs += counts[MSG_S_ERROR];
+  if (n_msgs > max_msgs)
+    {
+      if (m->severity == MSG_S_NOTE)
+        {
+          too_many_notes = true;
+          submit_note (xasprintf (_("Notes (%d) exceed limit (%d).  "
+                                    "Suppressing further notes."),
+                                  n_msgs, max_msgs));
+        }
+      else
+        {
+          too_many_errors = true;
+          if (m->severity == MSG_S_WARNING)
+            submit_note (xasprintf (_("Warnings (%d) exceed limit (%d)."),
+                                    n_msgs, max_msgs));
+          else
+            submit_note (xasprintf (_("Errors (%d) exceed limit (%d)."),
+                                    n_msgs, max_msgs));
+        }
+    }
 }
index aa49e730e012d681db53f25dfdf35e2deeb39795..2c08a8822aa4f9948da02f8b13f466882dca76d1 100644 (file)
 #define MSG_UI_H 1
 
 #include <stdbool.h>
+#include <stdio.h>
 
-struct source_stream ;
+struct source_stream;
 
-void msg_ui_set_error_file (const char *filename);
+void msg_ui_set_error_file (FILE *);
 void msg_ui_init (struct source_stream *);
 void msg_ui_done (void);
-void check_msg_count (struct source_stream *);
-void reset_msg_count (void);
-bool any_errors (void);
+bool msg_ui_too_many_errors (void);
+void msg_ui_reset_counts (void);
+bool msg_ui_any_errors (void);
 
 #endif /* msg-ui.h */
index 7b23f38d2f359b58ecec1635970904d732edad5c..0fa145c98ac502edb7f29f25e471a2ca6ee885b7 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <data/file-name.h>
 #include <data/settings.h>
 #include <language/command.h>
+#include <libpspp/cast.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
 #include <libpspp/version.h>
 #include <language/prompt.h>
 #include <output/journal.h>
-#include <output/manager.h>
+#include <output/driver.h>
 #include <ui/terminal/terminal.h>
 
 #include "xalloc.h"
@@ -107,8 +108,7 @@ static bool
 read_interactive (struct getl_interface *s,
                   struct string *line)
 {
-  struct readln_source *is  =
-    (struct readln_source *) s ;
+  struct readln_source *is  = UP_CAST (s, struct readln_source, parent);
 
   return is->interactive_func (line, prompt_get_style ());
 }
@@ -151,12 +151,11 @@ readln_read (struct string *line, enum prompt_style style)
 
   assert (initialised);
 
-  reset_msg_count ();
+  msg_ui_reset_counts ();
 
   welcome ();
 
-  if (style == PROMPT_FIRST)
-    som_flush ();
+  output_flush ();
 
 #if HAVE_READLINE
   rl_attempted_completion_function = (style == PROMPT_FIRST
@@ -215,7 +214,7 @@ create_readln_source (void)
   rlns->parent.read = read_interactive;
   rlns->parent.close = readln_close;
 
-  return (struct getl_interface *) rlns;
+  return &rlns->parent;
 }
 
 
index d2ddc6eeffa2b611f9d524d5b13fb8453d4dcb9e..d1296a36252ac449734bb6bd15875a23febd3e3f 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
+   Copyright (C) 2008, 2010  Free Software Foundation
 
    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
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
-#include <argp.h>
+
+#include "terminal-opts.h"
+
 #include <stdbool.h>
 #include <xalloc.h>
 #include <stdlib.h>
-#include <data/settings.h>
-#include <output/output.h>
-#include "msg-ui.h"
-#include <ui/command-line.h>
-#include <libpspp/verbose-msg.h>
-#include <libpspp/llx.h>
-#include <data/file-name.h>
-#include "terminal-opts.h"
-#include <libpspp/getl.h>
-#include <language/syntax-file.h>
-#include "read-line.h"
+#include <unistd.h>
+
+#include "data/settings.h"
+#include "data/file-name.h"
+#include "language/syntax-file.h"
+#include "libpspp/argv-parser.h"
+#include "libpspp/assertion.h"
+#include "libpspp/compiler.h"
+#include "libpspp/getl.h"
+#include "libpspp/llx.h"
+#include "libpspp/str.h"
+#include "libpspp/string-array.h"
+#include "libpspp/string-map.h"
+#include "libpspp/string-set.h"
+#include "libpspp/version.h"
+#include "output/driver.h"
+#include "output/driver-provider.h"
+#include "output/msglog.h"
+#include "ui/terminal/msg-ui.h"
+#include "ui/terminal/read-line.h"
+
+#include "gl/error.h"
+#include "gl/progname.h"
+#include "gl/version-etc.h"
+#include "gl/xmemdup0.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
+struct terminal_opts
+  {
+    struct source_stream *source_stream;
+    enum syntax_mode syntax_mode;
+    struct string_map options;  /* Output driver options. */
+    bool has_output_driver;
+    bool has_terminal_driver;
+    bool has_error_file;
+    bool process_statrc;
+  };
 
-static const struct argp_option test_options [] =
+enum
   {
-    {"verbose", 'v', 0, 0, N_("Increase diagnostic verbosity level"), 0},
-    {"testing-mode", 'T', 0, OPTION_HIDDEN, 0, 0},
+    OPT_TESTING_MODE,
+    OPT_ERROR_FILE,
+    OPT_OUTPUT,
+    OPT_OUTPUT_OPTION,
+    OPT_INTERACTIVE,
+    OPT_NO_STATRC,
+    OPT_HELP,
+    OPT_VERSION,
+    N_TERMINAL_OPTIONS
+  };
 
-    { 0, 0, 0, 0, 0, 0 }
+static struct argv_option terminal_argv_options[N_TERMINAL_OPTIONS] =
+  {
+    {"testing-mode", 0, no_argument, OPT_TESTING_MODE},
+    {"error-file", 'e', required_argument, OPT_ERROR_FILE},
+    {"output", 'o', required_argument, OPT_OUTPUT},
+    {NULL, 'O', required_argument, OPT_OUTPUT_OPTION},
+    {"interactive", 'i', no_argument, OPT_INTERACTIVE},
+    {"no-statrc", 'r', no_argument, OPT_NO_STATRC},
+    {"help", 'h', no_argument, OPT_HELP},
+    {"version", 'V', no_argument, OPT_VERSION},
   };
 
-static error_t
-parse_test_opts (int key, char *arg, struct argp_state *state)
+static void
+register_output_driver (struct terminal_opts *to)
 {
-  switch (key)
+  if (!string_map_is_empty (&to->options))
     {
-    case 'T':
-      settings_set_testing_mode (true);
-      break;
-    case 'v':
-      verbose_increment_level ();
-      break;
-    default:
-      return ARGP_ERR_UNKNOWN;
+      struct output_driver *driver;
+
+      driver = output_driver_create (&to->options);
+      if (driver != NULL)
+        {
+          output_driver_register (driver);
+
+          to->has_output_driver = true;
+          if (driver->device_type == SETTINGS_DEVICE_TERMINAL)
+            to->has_terminal_driver = true;
+        }
+      string_map_clear (&to->options);
     }
-
-  return 0;
 }
 
-static const struct argp_option io_options [] =
-  {
-    {"error-file", 'e', "FILE", 0,
-     N_("Send error messages to FILE (appended)"), 0},
-
-    {"device", 'o', "DEVICE", 0,
-     N_("Select output driver DEVICE and disable defaults"), 0},
-
-    {"list", 'l', 0, 0,
-     N_("Print a list of known driver classes, then exit"), 0},
+static void
+parse_output_option (struct terminal_opts *to, const char *option)
+{
+  const char *equals;
+  char *key, *value;
 
-    {"interactive", 'i', 0, 0, N_("Start an interactive session"), 0},
+  equals = strchr (option, '=');
+  if (equals == NULL)
+    {
+      error (0, 0, _("%s: output option missing `='"), option);
+      return;
+    }
 
-    { 0, 0, 0, 0, 0, 0 }
-  };
+  key = xmemdup0 (option, equals - option);
+  if (string_map_contains (&to->options, key))
+    {
+      error (0, 0, _("%s: output option specified more than once"), key);
+      free (key);
+      return;
+    }
 
+  value = xmemdup0 (equals + 1, strlen (equals + 1));
+  string_map_insert_nocopy (&to->options, key, value);
+}
 
-static error_t
-parse_io_opts (int key, char *arg, struct argp_state *state)
+static char *
+get_supported_formats (void)
 {
-  struct source_init
-  {
-    struct llx_list file_list;
-    bool cleared_device_defaults;
-    bool interactive;
-  };
-
-  struct fn_element {
-    struct ll ll;
-    const char *fn;
-  };
+  const struct string_set_node *node;
+  struct string_array format_array;
+  struct string_set format_set;
+  char *format_string;
+  const char *format;
+  size_t i;
+
+  /* Get supported formats as unordered set. */
+  string_set_init (&format_set);
+  output_get_supported_formats (&format_set);
+
+  /* Converted supported formats to sorted array. */
+  string_array_init (&format_array);
+  STRING_SET_FOR_EACH (format, node, &format_set)
+    string_array_append (&format_array, format);
+  string_array_sort (&format_array);
+  string_set_destroy (&format_set);
+
+  /* Converted supported formats to string. */
+  format_string = string_array_join (&format_array, " ");
+  string_array_destroy (&format_array);
+  return format_string;
+}
 
-  struct source_init *sip = state->hook;
+static char *
+get_default_include_path (void)
+{
+  struct source_stream *ss;
+  struct string dst;
+  char **path;
+  size_t i;
+
+  ss = create_source_stream ();
+  path = getl_include_path (ss);
+  ds_init_empty (&dst);
+  for (i = 0; path[i] != NULL; i++)
+    ds_put_format (&dst, " %s", path[i]);
+  destroy_source_stream (ss);
+
+  return ds_steal_cstr (&dst);
+}
 
-  struct source_stream *ss = state->input;
+static void
+usage (void)
+{
+  char *supported_formats = get_supported_formats ();
+  char *default_include_path = get_default_include_path ();
+
+  printf ("\
+PSPP, a program for statistical analysis of sample data.\n\
+Usage: %s [OPTION]... FILE...\n\
+\n\
+Arguments to long options also apply to equivalent short options.\n\
+\n\
+Output options:\n\
+  -o, --output=FILE         output to FILE, default format from FILE's name\n\
+  -O format=FORMAT          override format for previous -o\n\
+  -O OPTION=VALUE           set output option to customize previous -o\n\
+  -O device={terminal|listing}  override device type for previous -o\n\
+  -e, --error-file=FILE     append errors, warnings, and notes to FILE\n\
+Supported output formats: %s\n\
+\n\
+Language options:\n\
+  -I, --include=DIR         append DIR to search path\n\
+  -I-, --no-include         clear search path\n\
+  -r, --no-statrc           disable running rc file at startup\n\
+  -a, --algorithm={compatible|enhanced}\n\
+                            set to `compatible' if you want output\n\
+                            calculated from broken algorithms\n\
+  -x, --syntax={compatible|enhanced}\n\
+                            set to `compatible' to disable PSPP extensions\n\
+  -i, --interactive         interpret syntax in interactive mode\n\
+  -s, --safer               don't allow some unsafe operations\n\
+Default search path:%s\n\
+\n\
+Informative output:\n\
+  -h, --help                display this help and exit\n\
+  -V, --version             output version information and exit\n\
+\n\
+Non-option arguments are interpreted as syntax files to execute.\n",
+          program_name, supported_formats, default_include_path);
+
+  free (supported_formats);
+  free (default_include_path);
+
+  emit_bug_reporting_address ();
+  exit (EXIT_SUCCESS);
+}
 
-  struct command_line_processor *clp = get_subject (state);
+static void
+terminal_option_callback (int id, void *to_)
+{
+  struct terminal_opts *to = to_;
 
-  switch (key)
+  switch (id)
     {
-    case ARGP_KEY_INIT:
-      state->hook = sip = xzalloc (sizeof (struct source_init));
-      llx_init (&sip->file_list);
-      break;
-    case ARGP_KEY_ARG:
-      if (strchr (arg, '='))
-       outp_configure_macro (arg);
-      else
-       {
-         llx_push_tail (&sip->file_list, arg, &llx_malloc_mgr);
-       }
-      break;
-    case ARGP_KEY_SUCCESS:
-      {
-      struct llx *llx = llx_null (&sip->file_list);
-      while ((llx = llx_next (llx)) != llx_null (&sip->file_list))
-       {
-         const char *fn = llx_data (llx);
-         /* Assume it's a syntax file */
-         getl_append_source (ss,
-                             create_syntax_file_source (fn),
-                             GETL_BATCH,
-                             ERRMODE_CONTINUE
-                             );
-
-       }
-
-      if (sip->interactive || llx_is_empty (&sip->file_list))
-       {
-         getl_append_source (ss, create_readln_source (),
-                             GETL_INTERACTIVE,
-                             ERRMODE_CONTINUE
-                             );
-
-         if (!sip->cleared_device_defaults)
-           outp_configure_add ("interactive");
-       }
-      }
+    case OPT_TESTING_MODE:
+      settings_set_testing_mode (true);
       break;
-    case ARGP_KEY_FINI:
-      free (sip);
+
+    case OPT_ERROR_FILE:
+      if (!strcmp (optarg, "none") || msglog_create (optarg))
+        to->has_error_file = true;
       break;
-    case 'e':
-      msg_ui_set_error_file (arg);
+
+    case OPT_OUTPUT:
+      register_output_driver (to);
+      string_map_insert (&to->options, "output-file", optarg);
       break;
-    case 'i':
-      sip->interactive = true;
+
+    case OPT_OUTPUT_OPTION:
+      parse_output_option (to, optarg);
       break;
-    case 'l':
-      outp_list_classes ();
+
+    case OPT_INTERACTIVE:
+      to->syntax_mode = GETL_INTERACTIVE;
       break;
-    case 'o':
-      if (! sip->cleared_device_defaults)
-       {
-         outp_configure_clear ();
-         sip->cleared_device_defaults = true;
-       }
-      outp_configure_add (arg);
+
+    case OPT_NO_STATRC:
+      to->process_statrc = false;
       break;
+
+    case OPT_HELP:
+      usage ();
+      exit (EXIT_SUCCESS);
+
+    case OPT_VERSION:
+      version_etc (stdout, "pspp", PACKAGE_NAME, PACKAGE_VERSION,
+                   "Ben Pfaff", "John Darrington", "Jason Stover",
+                   (char *) NULL);
+      exit (EXIT_SUCCESS);
+
     default:
-      return ARGP_ERR_UNKNOWN;
+      NOT_REACHED ();
     }
-
-  return 0;
 }
 
-const struct argp io_argp =  {io_options, parse_io_opts, 0, 0, 0, 0, 0};
-const struct argp test_argp =  {test_options, parse_test_opts, 0, 0, 0, 0, 0};
-
-#if 0
-static const struct argp_child children [] =
-  {
-    {&io_argp, 0, N_("Options affecting input and output locations:"), 0},
-    {&test_argp, 0, N_("Diagnostic options:"), 0},
-    {0, 0, 0, 0}
-  };
+struct terminal_opts *
+terminal_opts_init (struct argv_parser *ap, struct source_stream *ss)
+{
+  struct terminal_opts *to;
+
+  to = xmalloc (sizeof *to);
+  to->source_stream = ss;
+  to->syntax_mode = GETL_BATCH;
+  string_map_init (&to->options);
+  to->has_output_driver = false;
+  to->has_error_file = false;
+  to->process_statrc = true;
+
+  argv_parser_add_options (ap, terminal_argv_options, N_TERMINAL_OPTIONS,
+                           terminal_option_callback, to);
+  return to;
+}
 
+static void
+add_syntax_file (struct terminal_opts *to, const char *file_name)
+{
+  if (!strcmp (file_name, "-") && isatty (STDIN_FILENO))
+    getl_append_source (to->source_stream, create_readln_source (),
+                        GETL_INTERACTIVE, ERRMODE_CONTINUE);
+  else
+    getl_append_source (to->source_stream,
+                        create_syntax_file_source (file_name),
+                        to->syntax_mode, ERRMODE_CONTINUE);
+}
 
-static error_t
-propagate_aux (int key, char *arg, struct argp_state *state)
+void
+terminal_opts_done (struct terminal_opts *to, int argc, char *argv[])
 {
-  if ( key == ARGP_KEY_INIT)
+  if (to->process_statrc)
+    {
+      char *rc = fn_search_path ("rc", getl_include_path (to->source_stream));
+      if (rc != NULL)
+        {
+          getl_append_source (to->source_stream,
+                              create_syntax_file_source (rc), GETL_BATCH,
+                              ERRMODE_CONTINUE);
+          free (rc);
+        }
+    }
+
+  if (optind < argc)
     {
       int i;
-      for (i = 0 ; i < sizeof (children) / sizeof (children[0]) - 1 ; ++i)
-       state->child_inputs[i] = state->input;
+
+      for (i = optind; i < argc; i++)
+        add_syntax_file (to, argv[i]);
     }
+  else
+    add_syntax_file (to, "-");
 
-  return ARGP_ERR_UNKNOWN;
-}
+  register_output_driver (to);
+  if (!to->has_output_driver)
+    {
+      string_map_insert (&to->options, "output-file", "-");
+      string_map_insert (&to->options, "format", "txt");
+      register_output_driver (to);
+    }
 
-const struct argp terminal_argp =  {NULL, propagate_aux, 0, 0, children, 0, 0};
+  if (!to->has_terminal_driver && !to->has_error_file)
+    msglog_create ("-");
 
-#endif
+  string_map_destroy (&to->options);
+  free (to);
+}
index e5d032d18efcc156d28e2c7b3a613993affdc20d..12251123db3623b71cf65d5745bada2ddc78eb43 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008  Free Software Foundation
+   Copyright (C) 2008, 2010  Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 
-#ifndef TERMINAL_OPTS
-#define TERMINAL_OPTS
+#ifndef UI_TERMINAL_TERMINAL_OPTS_H
+#define UI_TERMINAL_TERMINAL_OPTS_H 1
 
-extern const struct argp io_argp ;
-extern const struct argp test_argp ;
+struct argv_parser;
+struct source_stream;
+struct terminal_opts;
 
-extern const struct argp terminal_argp;
-
-#endif
+struct terminal_opts *terminal_opts_init (struct argv_parser *,
+                                          struct source_stream *);
+void terminal_opts_done (struct terminal_opts *, int argc, char *argv[]);
 
+#endif /* ui/terminal/terminal-opts.h */
index 282522db0342d8750454b3dc162493b5fc709cc8..8174e64562800e55a632a7c48f789d18013920b1 100644 (file)
@@ -1,2 +1,3 @@
 Makefile
 Makefile.in
+/testsuite
diff --git a/tests/atlocal.in b/tests/atlocal.in
new file mode 100644 (file)
index 0000000..ecfd2d7
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- shell-script -*-
+PERL='@PERL@'
+CHARSETALIASDIR="$abs_top_builddir/gl"
+export CHARSETALIASDIR
+WITH_PERL_MODULE='@WITH_PERL_MODULE@'
index 7fb70931514f518b375a46a7523d3fa76fc1cfa1..9b09474c35c5adb68c8b57e7fa57740203a5fab0 100644 (file)
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
 TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)' top_builddir='$(top_builddir)'
-TESTS_ENVIRONMENT += PERL='@PERL@' PG_CONFIG='@PG_CONFIG@'
+TESTS_ENVIRONMENT += PERL='$(PERL)' PG_CONFIG='$(PG_CONFIG)'
 
 # Allow locale_charset to find charset.alias before running "make install".
 TESTS_ENVIRONMENT += CHARSETALIASDIR='$(abs_top_builddir)/gl'
@@ -10,9 +10,7 @@ TESTS_ENVIRONMENT += LC_ALL=C
 
 dist_TESTS = \
        tests/command/add-files.sh \
-       tests/command/aggregate.sh \
        tests/command/attributes.sh \
-       tests/command/autorecod.sh \
        tests/command/beg-data.sh \
        tests/command/bignum.sh \
        tests/command/count.sh \
@@ -100,22 +98,13 @@ dist_TESTS = \
        tests/formats/wkday-in.sh \
        tests/formats/wkday-out.sh \
        tests/formats/360.sh \
-       tests/bugs/agg_crash.sh \
-       tests/bugs/agg-crash-2.sh \
-       tests/bugs/alpha-freq.sh \
        tests/bugs/big-input.sh \
        tests/bugs/big-input-2.sh \
        tests/bugs/case-map.sh \
        tests/bugs/comment-at-eof.sh \
-       tests/bugs/compute-fmt.sh \
        tests/bugs/compression.sh \
-       tests/bugs/crosstabs.sh \
-       tests/bugs/crosstabs2.sh \
-       tests/bugs/crosstabs-crash.sh \
-       tests/bugs/crosstabs-crash2.sh \
        tests/bugs/curtailed.sh \
        tests/bugs/data-crash.sh \
-       tests/bugs/double-frequency.sh \
        tests/bugs/empty-do-repeat.sh \
        tests/bugs/get.sh \
        tests/bugs/examine-crash.sh \
@@ -124,9 +113,7 @@ dist_TESTS = \
        tests/bugs/examine-1sample.sh \
        tests/bugs/examine-missing.sh \
        tests/bugs/examine-missing2.sh \
-       tests/bugs/freq-nolabels.sh \
        tests/bugs/get-no-file.sh \
-       tests/bugs/html-frequency.sh \
        tests/bugs/if_crash.sh \
        tests/bugs/input-crash.sh \
        tests/bugs/lag_crash.sh \
@@ -135,7 +122,6 @@ dist_TESTS = \
        tests/bugs/multipass.sh \
        tests/bugs/overwrite-input-file.sh \
        tests/bugs/overwrite-special-file.sh \
-       tests/bugs/piechart.sh \
        tests/bugs/random.sh \
        tests/bugs/shbang.sh \
        tests/bugs/signals.sh \
@@ -149,24 +135,12 @@ dist_TESTS = \
        tests/bugs/unwritable-dir.sh \
        tests/bugs/val-labs.sh \
        tests/bugs/val-labs-trailing-slash.sh \
-       tests/bugs/recode-copy-bug.sh \
-       tests/bugs/computebug.sh \
-       tests/bugs/compute-lv.sh \
-       tests/bugs/compute-sum.sh \
-       tests/bugs/temp-freq.sh \
        tests/bugs/print-crash.sh \
        tests/bugs/keep-all.sh \
        tests/data/datasheet-test.sh \
        tests/libpspp/sparse-xarray-test.sh \
        tests/output/paper-size.sh \
-       tests/xforms/recode.sh \
-       tests/stats/descript-basic.sh \
-       tests/stats/descript-missing.sh \
-       tests/stats/descript-mean-bug.sh \
        tests/stats/moments.sh \
-       tests/stats/percentiles-compatible.sh \
-       tests/stats/ntiles.sh \
-       tests/stats/percentiles-enhanced.sh \
        tests/expressions/expressions.sh \
        tests/expressions/epoch.sh \
        tests/expressions/randist.sh \
@@ -194,6 +168,10 @@ nodist_TESTS = \
        tests/libpspp/range-set-test \
        tests/libpspp/sparse-array-test \
        tests/libpspp/str-test \
+       tests/libpspp/string-map-test \
+       tests/libpspp/stringi-map-test \
+       tests/libpspp/string-set-test \
+       tests/libpspp/stringi-set-test \
        tests/libpspp/tower-test
 
 TESTS = $(dist_TESTS) $(nodist_TESTS)
@@ -202,25 +180,19 @@ check_PROGRAMS += \
        $(nodist_TESTS) \
        tests/data/datasheet-test \
        tests/formats/inexactify \
-       tests/libpspp/sparse-xarray-test
+       tests/libpspp/sparse-xarray-test \
+       tests/output/render-test
 
 tests_data_datasheet_test_SOURCES = \
        tests/data/datasheet-test.c
-tests_data_datasheet_test_LDADD = gl/libgl.la src/libpspp-core.la @LIBINTL@ 
+tests_data_datasheet_test_LDADD = gl/libgl.la src/libpspp-core.la $(LIBINTL) 
 tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS)
 
-# This seems to be necessary as the libtool artifacts aren't removed
-# Automake bug ?
-tests_data_datasheet_test_CLEAN:
-       $(RM) -r tests/data
-
-CLEAN_LOCAL += tests_data_datasheet_test_CLEAN
-
 tests_libpspp_ll_test_SOURCES = \
        src/libpspp/ll.c \
        src/libpspp/ll.h \
        tests/libpspp/ll-test.c
-tests_libpspp_ll_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_ll_test_LDADD = gl/libgl.la $(LIBINTL)
 tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
 
 tests_libpspp_llx_test_SOURCES = \
@@ -229,7 +201,7 @@ tests_libpspp_llx_test_SOURCES = \
        src/libpspp/llx.c \
        src/libpspp/llx.h \
        tests/libpspp/llx-test.c
-tests_libpspp_llx_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_llx_test_LDADD = gl/libgl.la $(LIBINTL)
 tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
 
 tests_libpspp_heap_test_SOURCES = \
@@ -238,14 +210,14 @@ tests_libpspp_heap_test_SOURCES = \
        src/libpspp/pool.c \
        src/libpspp/pool.h \
        tests/libpspp/heap-test.c
-tests_libpspp_heap_test_LDADD = gl/libgl.la @LIBINTL@ 
+tests_libpspp_heap_test_LDADD = gl/libgl.la $(LIBINTL) 
 tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_hmap_test_SOURCES = \
        src/libpspp/hmap.c \
        src/libpspp/hmap.h \
        tests/libpspp/hmap-test.c
-tests_libpspp_hmap_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_hmap_test_LDADD = gl/libgl.la $(LIBINTL)
 tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_hmapx_test_SOURCES = \
@@ -254,14 +226,14 @@ tests_libpspp_hmapx_test_SOURCES = \
        src/libpspp/hmapx.c \
        src/libpspp/hmapx.h \
        tests/libpspp/hmapx-test.c
-tests_libpspp_hmapx_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_hmapx_test_LDADD = gl/libgl.la $(LIBINTL)
 tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_abt_test_SOURCES = \
        src/libpspp/abt.c \
        src/libpspp/abt.h \
        tests/libpspp/abt-test.c
-tests_libpspp_abt_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_abt_test_LDADD = gl/libgl.la $(LIBINTL)
 tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_bt_test_SOURCES = \
@@ -277,7 +249,7 @@ tests_libpspp_range_map_test_SOURCES = \
        src/libpspp/range-map.c \
        src/libpspp/range-map.h \
        tests/libpspp/range-map-test.c
-tests_libpspp_range_map_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_range_map_test_LDADD = gl/libgl.la $(LIBINTL)
 tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_range_set_test_SOURCES = \
@@ -288,12 +260,51 @@ tests_libpspp_range_set_test_SOURCES = \
        src/libpspp/range-set.c \
        src/libpspp/range-set.h \
        tests/libpspp/range-set-test.c
-tests_libpspp_range_set_test_LDADD = gl/libgl.la @LIBINTL@ 
+tests_libpspp_range_set_test_LDADD = gl/libgl.la $(LIBINTL) 
 tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_str_test_SOURCES = \
        tests/libpspp/str-test.c
-tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la @LIBINTL@ 
+tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL) 
+
+tests_libpspp_string_map_test_SOURCES = \
+       src/libpspp/hash-functions.c \
+       src/libpspp/hmap.c \
+       src/libpspp/string-map.c \
+       src/libpspp/string-set.c \
+       tests/libpspp/string-map-test.c
+tests_libpspp_string_map_test_LDADD = gl/libgl.la $(LIBINTL)
+tests_libpspp_string_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_stringi_map_test_SOURCES = \
+       src/libpspp/hash-functions.c \
+       src/libpspp/hmap.c \
+       src/libpspp/pool.c \
+       src/libpspp/str.c \
+       src/libpspp/stringi-map.c \
+       src/libpspp/string-set.c \
+       src/libpspp/stringi-set.c \
+       tests/libpspp/stringi-map-test.c
+tests_libpspp_stringi_map_test_LDADD = gl/libgl.la $(LIBINTL)
+tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_string_set_test_SOURCES = \
+       src/libpspp/hash-functions.c \
+       src/libpspp/hmap.c \
+       src/libpspp/string-set.c \
+       tests/libpspp/string-set-test.c
+tests_libpspp_string_set_test_LDADD = gl/libgl.la $(LIBINTL)
+tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_stringi_set_test_SOURCES = \
+       src/libpspp/hash-functions.c \
+       src/libpspp/hmap.c \
+       src/libpspp/pool.c \
+       src/libpspp/str.c \
+       src/libpspp/stringi-set.c \
+       tests/libpspp/stringi-set-test.c
+tests_libpspp_stringi_set_test_LDADD = gl/libgl.la $(LIBINTL)
+tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_tower_test_SOURCES = \
        src/libpspp/abt.c \
@@ -303,7 +314,7 @@ tests_libpspp_tower_test_SOURCES = \
        src/libpspp/tower.c \
        src/libpspp/tower.h \
        tests/libpspp/tower-test.c
-tests_libpspp_tower_test_LDADD = gl/libgl.la @LIBINTL@ 
+tests_libpspp_tower_test_LDADD = gl/libgl.la $(LIBINTL) 
 tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_sparse_array_test_SOURCES = \
@@ -312,7 +323,7 @@ tests_libpspp_sparse_array_test_SOURCES = \
        src/libpspp/pool.c \
        src/libpspp/pool.h \
        tests/libpspp/sparse-array-test.c
-tests_libpspp_sparse_array_test_LDADD = gl/libgl.la @LIBINTL@ 
+tests_libpspp_sparse_array_test_LDADD = gl/libgl.la $(LIBINTL) 
 tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_sparse_xarray_test_SOURCES = \
@@ -327,7 +338,7 @@ tests_libpspp_sparse_xarray_test_SOURCES = \
        src/libpspp/pool.c \
        src/libpspp/tmpfile.c \
        tests/libpspp/sparse-xarray-test.c
-tests_libpspp_sparse_xarray_test_LDADD = gl/libgl.la @LIBINTL@ 
+tests_libpspp_sparse_xarray_test_LDADD = gl/libgl.la $(LIBINTL) 
 tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_formats_inexactify_SOURCES = tests/formats/inexactify.c
@@ -337,9 +348,18 @@ tests_dissect_sysfile_SOURCES = \
        src/libpspp/integer-format.c \
        src/libpspp/float-format.c \
        tests/dissect-sysfile.c
-tests_dissect_sysfile_LDADD = gl/libgl.la @LIBINTL@ 
+tests_dissect_sysfile_LDADD = gl/libgl.la $(LIBINTL) 
 tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
 
+check_PROGRAMS += tests/output/render-test
+tests_output_render_test_SOURCES = tests/output/render-test.c
+tests_output_render_test_LDADD = \
+       src/libpspp.la \
+       src/libpspp-core.la \
+       $(CAIRO_LIBS) \
+       $(LIBICONV) \
+       $(LIBINTL)
+
 EXTRA_DIST += \
        $(dist_TESTS) \
         tests/Book1.gnm.unzipped \
@@ -347,9 +367,6 @@ EXTRA_DIST += \
        tests/no_case_size.sav \
        tests/coverage.sh tests/test_template \
        tests/v13.sav tests/v14.sav \
-       tests/bugs/computebug.stat tests/bugs/computebug.out \
-       tests/bugs/recode-copy-bug-1.stat tests/bugs/recode-copy-bug-2.stat \
-       tests/bugs/recode-copy-bug-1.out tests/bugs/recode-copy-bug-2.out \
        tests/expressions/randist/beta.out \
        tests/expressions/randist/cauchy.out \
        tests/expressions/randist/chisq.out \
@@ -389,3 +406,53 @@ check-for-export-var-val:
 DIST_HOOKS += check-for-export-var-val
 
 EXTRA_DIST += tests/OChangeLog
+\f
+# Autotest testsuite
+
+EXTRA_DIST += \
+       $(TESTSUITE_AT) \
+       $(TESTSUITE) \
+       tests/atlocal.in \
+       $(srcdir)/package.m4 \
+       $(TESTSUITE)
+TESTSUITE_AT = \
+       tests/testsuite.at \
+       tests/language/dictionary/mrsets.at \
+       tests/language/stats/aggregate.at \
+       tests/language/stats/autorecode.at \
+       tests/language/stats/crosstabs.at \
+       tests/language/stats/descriptives.at \
+       tests/language/stats/factor.at \
+       tests/language/stats/frequencies.at \
+       tests/language/xforms/compute.at \
+       tests/language/xforms/recode.at \
+       tests/output/render.at \
+       tests/perl-module.at
+TESTSUITE = $(srcdir)/tests/testsuite
+DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
+
+CHECK_LOCAL += tests_check
+tests_check: tests/atconfig tests/atlocal $(TESTSUITE)
+       $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=tests/output:src/ui/terminal $(TESTSUITEFLAGS)
+
+CLEAN_LOCAL += tests_clean
+tests_clean:
+       test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
+
+AUTOM4TE = $(SHELL) $(srcdir)/missing --run autom4te
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): package.m4 $(TESTSUITE_AT)
+       $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+       mv $@.tmp $@
+
+# The `:;' works around a Bash 3.2 bug when the output is not writeable.
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac
+       :;{ \
+         echo '# Signature of the current package.' && \
+         echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])' && \
+         echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])' && \
+         echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])' && \
+         echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])' && \
+         echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
+         echo 'm4_define([AT_PACKAGE_URL],       [$(PACKAGE_URL)])'; \
+       } >'$(srcdir)/package.m4'
diff --git a/tests/bugs/agg-crash-2.sh b/tests/bugs/agg-crash-2.sh
deleted file mode 100755 (executable)
index 0b00678..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug which caused AGGREGATE to crash when
-# the MAX function was used.
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-DATA LIST LIST /X (F8.2) Y (a25).
-
-BEGIN DATA.
-87.50 foo
-87.34 bar
-1 bar
-END DATA.
-
-
-
-AGGREGATE OUTFILE=* /BREAK=y /X=MAX(x).
-LIST /x y.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
-
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|X       |F8.2  |
-|Y       |A25   |
-+--------+------+
-        X                         Y
---------- -------------------------
-    87.34 bar                       
-    87.50 foo                       
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
diff --git a/tests/bugs/agg_crash.sh b/tests/bugs/agg_crash.sh
deleted file mode 100755 (executable)
index 43fd9f8..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug which crashed pspp when doing a aggregate 
-# procedure
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-INPUT PROGRAM.
-LOOP c=1 TO 20.
-  COMPUTE x=UNIFORM(10)
-  END CASE.
-END LOOP.
-END FILE.
-END INPUT PROGRAM.
-
-AGGREGATE /BREAK=x .
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-# The above input is invalid.
-# So this will have a non zero error status.
-# But it shouldn't crash!
-activity="run_program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
-if [ $? -ne 1 ] ; then fail ; fi
-
-
-pass;
diff --git a/tests/bugs/alpha-freq.sh b/tests/bugs/alpha-freq.sh
deleted file mode 100755 (executable)
index ae60e79..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug where the FREQUENCIES command would 
-# crash if given an alphanumeric variable
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-cat > $TEMPDIR/prog.sps <<EOF
-DATA LIST FREE/
-   name  (A8) value * quantity .
-BEGIN DATA.
-Cables 829 3 
-END DATA.
-EXECUTE.
-
-FREQUENCIES /VAR = name.
-
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass;
index b0da13bbf3a0af4075e27f87e4ba1ee51e2c2585..c400e2e905cc9246d7eb3bf42dd960e9b4fd11d2 100755 (executable)
@@ -84,7 +84,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="appending to data"
@@ -93,7 +93,7 @@ $PERL -e 'for ($i=0; $i<25000; $i++) { print "AB04\nAB12\n" };' >> $TEMPDIR/larg
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass;
index 3c9365dfce520d6ea7c4cf7154a59c0fa90a343b..9cc3ad93075e15721c2087bd881dbf93f7d833cf 100755 (executable)
@@ -75,7 +75,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass;
index 011c344d059ed8a406995bd3e5123ebc065e71e9..17f4fedf64c62560750f3995c89c0ca890147dc3 100755 (executable)
@@ -72,7 +72,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass;
index 342f9bc08ab95eeeb7531e97087c4206d678372a..f28762d19495c4048722ab0363beb8593028e26a 100755 (executable)
@@ -63,7 +63,7 @@ COMMENT this is a comment at end of file.
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail; fi
 
 pass;
index 71f9eab48d329ed0e2ab8673d48c7578c50ffd3a..d8c838888e747d873e7218315705359921c531f7 100755 (executable)
@@ -74,7 +74,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 # Make sure the file really was compressed
diff --git a/tests/bugs/compute-fmt.sh b/tests/bugs/compute-fmt.sh
deleted file mode 100755 (executable)
index 0d4a313..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug which caused a crash after SAVE FILE
-# was called on a COMPUTEd variable
-
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-INPUT PROGRAM.
-       COMPUTE num = 3.
-END FILE.
-END INPUT PROGRAM.
-EXECUTE.
-
-SAVE outfile='$TEMPDIR/temp.sav'.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
-if [ $? -ne 0 ] ; then fail; fi
-
-
-
-pass;
diff --git a/tests/bugs/compute-lv.sh b/tests/bugs/compute-lv.sh
deleted file mode 100755 (executable)
index b0baf4f..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug involving COMPUTE and long variable names
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="Create prog"
-cat > $TESTFILE <<EOF
-DATA LIST LIST /longVariablename * x *.
-BEGIN DATA.
-1 2
-3 4
-END DATA.
-
-
-COMPUTE longvariableName=100-longvariablename.
-
-LIST.
-
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="run prog"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-activity="compare output"
-perl -pi -e 's/^\s*$//g' pspp.list
-diff -b pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+----------------+------+
-|    Variable    |Format|
-#================#======#
-|longVariablename|F8.0  |
-|x               |F8.0  |
-+----------------+------+
-longVariablename        x
----------------- -------- 
-           99.00     2.00
-           97.00     4.00
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass;
diff --git a/tests/bugs/compute-sum.sh b/tests/bugs/compute-sum.sh
deleted file mode 100755 (executable)
index 83aeae0..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug in the `compute' command, in which it
-# failed to allow a newly created variable to be used as part of the
-# computation, which actually makes sense for "LEAVE" variables.
-
-TEMPDIR=/tmp/pspp-tst-$$
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-cd $TEMPDIR
-
-activity="copy file"
-cat > compute-sum.stat <<EOF
-DATA LIST /ITEM 1-3.
-COMPUTE SUM=SUM+ITEM.
-PRINT OUTFILE='compute-sum.out' /ITEM SUM.
-LEAVE SUM
-BEGIN DATA.
-123
-404
-555
-999
-END DATA.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/compute-sum.stat
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="compare output"
-diff compute-sum.out - <<EOF
- 123   123.00 
- 404   527.00 
- 555  1082.00 
- 999  2081.00 
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
diff --git a/tests/bugs/computebug.out b/tests/bugs/computebug.out
deleted file mode 100644 (file)
index 61fc7d0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|A       |A161  |
-|B       |A3    |
-+--------+------+
-                                                                                                                                                                A   B
------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---
-ABC                                                                                                                                                               def 
-GHI                                                                                                                                                               jkl 
diff --git a/tests/bugs/computebug.sh b/tests/bugs/computebug.sh
deleted file mode 100755 (executable)
index dfa5990..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug in the `compute' command
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-activity="copy file"
-cp $top_srcdir/tests/bugs/computebug.stat $TEMPDIR
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="chdir"
-cd $TEMPDIR
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/computebug.stat
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list $top_srcdir/tests/bugs/computebug.out
-diff -b -w $TEMPDIR/pspp.list $top_srcdir/tests/bugs/computebug.out
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
diff --git a/tests/bugs/computebug.stat b/tests/bugs/computebug.stat
deleted file mode 100644 (file)
index e308301..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-DATA LIST LIST
- /A (A161)
- B (A3).
-
-BEGIN DATA
-abc   def
-ghi   jkl
-END DATA.
-
-COMPUTE A=upcase(A).
-EXECUTE.
-LIST.
-
-
diff --git a/tests/bugs/crosstabs-crash.sh b/tests/bugs/crosstabs-crash.sh
deleted file mode 100755 (executable)
index 4454319..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug which caused CROSSTABS to crash in
-# integer mode.
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-DATA LIST LIST /A * B * X * Y * .
-BEGIN DATA.
-2 3 4 5
-END DATA.
-
-CROSSTABS VARIABLES X (1,7) Y (1,7) /TABLES X BY Y.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|A       |F8.0  |
-|B       |F8.0  |
-|X       |F8.0  |
-|Y       |F8.0  |
-+--------+------+
-2.1 CROSSTABS.  Summary.
-#===============#=====================================================#
-#               #                        Cases                        #
-#               #-----------------+-----------------+-----------------#
-#               #      Valid      |     Missing     |      Total      #
-#               #--------+--------+--------+--------+--------+--------#
-#               #       N| Percent|       N| Percent|       N| Percent#
-#---------------#--------+--------+--------+--------+--------+--------#
-#X * Y          #       1|  100.0%|       0|    0.0%|       1|  100.0%#
-#===============#========#========#========#========#========#========#
-2.2 CROSSTABS.  X * Y [count].
-#===============#==============================================================#========#
-#               #                               Y                              |        #
-#               #--------+--------+--------+--------+--------+--------+--------+        #
-#              X#    1.00|    2.00|    3.00|    4.00|    5.00|    6.00|    7.00|  Total #
-#---------------#--------+--------+--------+--------+--------+--------+--------+--------#
-#           1.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           2.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           3.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           4.00#      .0|      .0|      .0|      .0|     1.0|      .0|      .0|     1.0#
-#           5.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           6.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           7.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#Total          #      .0|      .0|      .0|      .0|     1.0|      .0|      .0|     1.0#
-#===============#========#========#========#========#========#========#========#========#
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
diff --git a/tests/bugs/crosstabs-crash2.sh b/tests/bugs/crosstabs-crash2.sh
deleted file mode 100755 (executable)
index b0db128..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/sh
-
-# This program tests for bug #22037, which caused CROSSTABS to crash.
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-data list list /x * y (a18).
-
-begin data.
-
-   1. 'zero none'
-
-1 'one unity'
-2 'two duality'
-3 'three lots'
-end data.
-
-CROSSTABS /TABLES = x BY y.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-$SUPERVISOR $PSPP --testing-mode $TESTFILE > /dev/null
-if [ $? -ne 0 ] ; then no_result ; fi
-
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|x       |F8.0  |
-|y       |A18   |
-+--------+------+
-$TEMPDIR/crosstabs-crash2.sh.sps:4: warning: BEGIN DATA: Missing value(s) for all variables from x onward.  These will be filled with the system-missing value or blanks, as appropriate.
-$TEMPDIR/crosstabs-crash2.sh.sps:6: warning: BEGIN DATA: Missing value(s) for all variables from x onward.  These will be filled with the system-missing value or blanks, as appropriate.
-2.1 CROSSTABS.  Summary.
-#===============#=====================================================#
-#               #                        Cases                        #
-#               #-----------------+-----------------+-----------------#
-#               #      Valid      |     Missing     |      Total      #
-#               #--------+--------+--------+--------+--------+--------#
-#               #       N| Percent|       N| Percent|       N| Percent#
-#---------------#--------+--------+--------+--------+--------+--------#
-#x * y          #       4|   66.7%|       2|   33.3%|       6|  100.0%#
-#===============#========#========#========#========#========#========#
-2.2 CROSSTABS.  x * y [count].
-#===============#===================================#========#
-#               #                 y                 |        #
-#               #--------+--------+--------+--------+        #
-#              x#     one|   three|     two|    zero|  Total #
-#               #unity   |lots    |duality |none    |        #
-#               #        |        |        |        |        #
-#---------------#--------+--------+--------+--------+--------#
-#           1.00#     1.0|      .0|      .0|     1.0|     2.0#
-#           2.00#      .0|      .0|     1.0|      .0|     1.0#
-#           3.00#      .0|     1.0|      .0|      .0|     1.0#
-#Total          #     1.0|     1.0|     1.0|     1.0|     4.0#
-#===============#========#========#========#========#========#
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
diff --git a/tests/bugs/crosstabs.sh b/tests/bugs/crosstabs.sh
deleted file mode 100755 (executable)
index 3ef691f..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug which crashed pspp when doing a crosstabs
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TEMPDIR/ct.stat <<EOF
-DATA LIST FIXED
-     / x   1-2
-       y   3
-       z   4.
-
-BEGIN DATA.
-0111 
-0222 
-0311 
-0412 
-0521 
-0612 
-0711 
-0811 
-0912 
-END DATA.
-
-LIST.
-
-
-CROSSTABS TABLES  y by z.
-
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/ct.stat
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass;
diff --git a/tests/bugs/crosstabs2.sh b/tests/bugs/crosstabs2.sh
deleted file mode 100755 (executable)
index 3e66299..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/bin/sh
-
-# This program tests for bug #26739, which caused CROSSTABS to crash
-# or to fail to output chi-square results.
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-DATA LIST LIST /x * y *.
-BEGIN DATA.
-2 2
-3 1
-4 2
-4 1
-END DATA.
-
-CROSSTABS
-        /TABLES= x BY y
-        /STATISTICS=CHISQ
-       .
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|x       |F8.0  |
-|y       |F8.0  |
-+--------+------+
-2.1 CROSSTABS.  Summary.
-#===============#=====================================================#
-#               #                        Cases                        #
-#               #-----------------+-----------------+-----------------#
-#               #      Valid      |     Missing     |      Total      #
-#               #--------+--------+--------+--------+--------+--------#
-#               #       N| Percent|       N| Percent|       N| Percent#
-#---------------#--------+--------+--------+--------+--------+--------#
-#x * y          #       4|  100.0%|       0|    0.0%|       4|  100.0%#
-#===============#========#========#========#========#========#========#
-2.2 CROSSTABS.  x * y [count].
-#===============#=================#========#
-#               #        y        |        #
-#               #--------+--------+        #
-#              x#    1.00|    2.00|  Total #
-#---------------#--------+--------+--------#
-#           2.00#      .0|     1.0|     1.0#
-#           3.00#     1.0|      .0|     1.0#
-#           4.00#     1.0|     1.0|     2.0#
-#Total          #     2.0|     2.0|     4.0#
-#===============#========#========#========#
-2.3 CROSSTABS.  Chi-square tests.
-#===============#========#========#========#
-#Statistic      #   Value|      df|  Asymp.#
-#               #        |        |    Sig.#
-#               #        |        |(2-sided#
-#               #        |        |       )#
-#---------------#--------+--------+--------#
-#Pearson        #    2.00|       2|     .37#
-#Chi-Square     #        |        |        #
-#Likelihood     #    2.77|       2|     .25#
-#Ratio          #        |        |        #
-#Linear-by-Linea#     .27|       1|     .60#
-#r Association  #        |        |        #
-#N of Valid     #       4|        |        #
-#Cases          #        |        |        #
-#===============#========#========#========#
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
index 26de22b2390a61b4eb0ddae36ea429bf344582dc..624f5a5ba69da7f8fade089dc597ee68be2a8bb6 100755 (executable)
@@ -74,7 +74,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 #This must fail
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE
 if [ $? -ne 1 ] ; then fail ; fi
 
 
index dfdcbfdc60f2da20c2fe29075cc452bafd2372e4..15ba9e2cb51321c7b55017ed6ae081655822b08c 100755 (executable)
@@ -67,7 +67,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 #This must fail
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TEMPDIR/ct.stat 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TEMPDIR/ct.stat 
 if [ $? -ne 1 ] ; then fail ; fi
 
 pass;
diff --git a/tests/bugs/double-frequency.sh b/tests/bugs/double-frequency.sh
deleted file mode 100755 (executable)
index ca958cd..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug where pspp would crash if two frequencies
-# Commands existed in a input file
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-
-activity="create data"
-cat << EOF > $TEMPDIR/ff.stat 
-
-data list free /v1 v2.
-begin data.
-0 1
-2 3 
-4 5
-3 4
-end data.
-
-frequencies v1 v2.
-frequencies v1 v2.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-cd $TEMPDIR
-
-activity="run data"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/ff.stat
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass;
index b96b2feab28075dbe117f3a25763d6e3373a21f0..ddc2e7a62fe7421dd9b47ac11bd2feba98395dfe 100755 (executable)
@@ -71,7 +71,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 # Must not crash.
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/repeat.stat 
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/repeat.stat 
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass;
index 49ce086c592d07a44bccf306cef5d20443ff18e7..dd4449d80dbd5ed2f4f67fdb89b9800e6f166833 100755 (executable)
@@ -73,7 +73,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass
index 6cd172fde54abab2387bee19c804881774a27787..03c51c6fe90cb50f662f97dda43a02f4fe2724ad 100755 (executable)
@@ -73,7 +73,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 01fe8f9a3288e88489801976bbbb4c37dbd72190..32f0e99fc4e117806f8d0e75b9d3810e582bf394 100755 (executable)
@@ -74,7 +74,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 6093c343901f21f391040c83c4ad9fb7417e672f..2afc044f90c53c0ba1925eec6c92084bcfb449ce 100755 (executable)
@@ -75,7 +75,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 5e3edec3dadf176d60bfb12f0c0aab1aa9108e2a..86b382e65bd47e47c64e0b16f5387fa8ba41f9f9 100755 (executable)
@@ -74,7 +74,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 2> /dev/null
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 2> /dev/null
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass;
index 2cd6c14a6a00d930722149a77d5fc5da0d86fe7e..2ea650c88166f2e8d414edd358d077895dcb83b9 100755 (executable)
@@ -78,40 +78,28 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|x       |F8.0  |
-|y       |F8.0  |
-+--------+------+
-2.1 EXAMINE.  Case Processing Summary
-#=#===============================#
-# #             Cases             #
-# #----------+----------+---------#
-# #   Valid  |  Missing |  Total  #
-# #-+--------+-+--------+-+-------#
-# #N| Percent|N| Percent|N|Percent#
-#=#=#========#=#========#=#=======#
-#x#6|85.7143%|1|14.2857%|7|   100%#
-#=#=#========#=#========#=#=======#
-2.2 EXAMINE.  Case Processing Summary
-#==========#===============================#
-#          #             Cases             #
-#          #----------+----------+---------#
-#          #   Valid  |  Missing |  Total  #
-#          #-+--------+-+--------+-+-------#
-#      y   #N| Percent|N| Percent|N|Percent#
-#==========#=#========#=#========#=#=======#
-#x     1.00#4|    100%|0|      0%|4|   100%#
-#      2.00#2|66.6667%|1|33.3333%|3|   100%#
-#==========#=#========#=#========#=#=======#
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+x,F8.0
+y,F8.0
+
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+x,6,85.7143%,1,14.2857%,7,100%
+
+Table: Case Processing Summary
+,,Cases,,,,,
+,,Valid,,Missing,,Total,
+,y,N,Percent,N,Percent,N,Percent
+x,1.00,4,100%,0,0%,4,100%
+,2.00,2,66.6667%,1,33.3333%,3,100%
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -138,7 +126,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 
diff --git a/tests/bugs/freq-nolabels.sh b/tests/bugs/freq-nolabels.sh
deleted file mode 100755 (executable)
index b5c44b5..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug which crashed frequencies when the
-# /FORMAT=nolabels was given.
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_srcdir and top_builddir  are absolute
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-top_srcdir=`cd $top_srcdir; pwd`
-top_builddir=`cd $top_builddir; pwd`
-
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR"
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create script"
-cat > $TESTFILE  <<EOF
-DATA LIST LIST /x * w *.
-BEGIN DATA.
-1 4
-2 2
-END DATA.
-
-WEIGHT BY w.
-
-FREQUENCIES x
-  /FORMAT=nolabels
-  .
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-
-pass;
index d047b76758a332ff398ab56ecc5d65c2d4f80c19..88e539c159d2d2374b5682d387ef403e6ce3f570 100755 (executable)
@@ -68,7 +68,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 # We use the stdinput here, because the bug seems to manifest itself only in 
 # interactive mode.
 activity="run program"
-cat $TESTFILE | $SUPERVISOR $PSPP --testing-mode  > /dev/null
-if [ $? -ne 0 ] ; then fail ; fi
+cat $TESTFILE | $SUPERVISOR $PSPP -o pspp.csv  > /dev/null
+if [ $? -ne 1 ] ; then fail ; fi
 
 pass
index 2cc6cfc5a3e26ec7f0b8d24a629fb75728e4f2d5..aa76a8c0c723294f7ac5b9b7c6dfde17eadc89e0 100755 (executable)
@@ -87,35 +87,35 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-LOCATION   EDITOR    SHELL     FREQ
- -------- -------- -------- --------
-     1.00     1.00     1.00     2.00 
-     1.00     1.00     2.00    30.00 
-     1.00     2.00     1.00     8.00 
-     1.00     2.00     2.00    20.00 
-     2.00     1.00     1.00     2.00 
-     2.00     1.00     2.00    22.00 
-     2.00     2.00     1.00     1.00 
-     2.00     2.00     2.00     3.00 
-LOCATION   EDITOR    SHELL     FREQ
- -------- -------- -------- --------
-     1.00     1.00     1.00     2.00 
-     1.00     1.00     2.00    30.00 
-     1.00     2.00     1.00     8.00 
-     1.00     2.00     2.00    20.00 
-     2.00     1.00     1.00     2.00 
-     2.00     1.00     2.00    22.00 
-     2.00     2.00     1.00     1.00 
-     2.00     2.00     2.00     3.00 
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+LOCATION,EDITOR,SHELL,FREQ
+1.00,1.00,1.00,2.00
+1.00,1.00,2.00,30.00
+1.00,2.00,1.00,8.00
+1.00,2.00,2.00,20.00
+2.00,1.00,1.00,2.00
+2.00,1.00,2.00,22.00
+2.00,2.00,1.00,1.00
+2.00,2.00,2.00,3.00
+
+Table: Data List
+LOCATION,EDITOR,SHELL,FREQ
+1.00,1.00,1.00,2.00
+1.00,1.00,2.00,30.00
+1.00,2.00,1.00,8.00
+1.00,2.00,2.00,20.00
+2.00,1.00,1.00,2.00
+2.00,1.00,2.00,22.00
+2.00,2.00,1.00,1.00
+2.00,2.00,2.00,3.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
diff --git a/tests/bugs/html-frequency.sh b/tests/bugs/html-frequency.sh
deleted file mode 100755 (executable)
index 789fe32..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug where pspp would crash 
-# when a FREQUENCIES command was used with the html 
-# driver.
-
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-cd $top_srcdir ; top_srcdir=`pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-
-activity="create data"
-cat << EOF > $TESTFILE
-
-data list free /v1 v2.
-begin data.
-0 1
-2 3 
-4 5
-3 4
-end data.
-
-list.
-
-frequencies v1 v2.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-cd $TEMPDIR
-
-activity="run data"
-$SUPERVISOR $PSPP -o html $TESTFILE
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass;
index 4f07d30281e5173da39d667bd64efab363560e68..9882d0da7017df854f3218f64268939137bfdac2 100755 (executable)
@@ -80,7 +80,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 # So this will have a non zero error status.
 # But it shouldn't crash!
 activity="run_program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 1 ] ; then fail ; fi
 
 
index 600ca729457745f6c77fec0ba64acd124db73fb7..947e782b9ce705e0db260920f45d9174f0507f83 100755 (executable)
@@ -73,7 +73,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 # The above syntax is invalid, so this program should fail to parse
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 1 ] ; then fail ; fi
 
 
@@ -92,7 +92,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 # The above syntax is invalid, so this program should fail to parse
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE
 if [ $? -ne 1 ] ; then fail ; fi
 
 
index f64674ded977c02b35b080e4ac00d8bb68247c74..dce41774962eca44cabe26e17629f582e57807f9 100755 (executable)
@@ -73,19 +73,19 @@ EOF
     if [ $? -ne 0 ] ; then no_result ; fi
 
     activity="run PSPP ($mode)"
-    $SUPERVISOR $PSPP --testing-mode $TESTFILE
+    $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
     if [ $? -ne 0 ] ; then no_result ; fi
 
 
     activity="compare output ($mode)"
-    perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-    diff -u -b  -w $TEMPDIR/pspp.list - << EOF
- a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z
--- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
- x  y  z  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w
--- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-24 25 26  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 
+    diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
+
+Table: Data List
+x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w
+24,25,26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
 EOF
     if [ $? -ne 0 ] ; then fail ; fi
 done
index 73bce147237c8dd1d60ca98babc529096ddd7cea..e848639cdfad46eaaa72a694b4d0dd9b2c7d2db4 100755 (executable)
@@ -74,7 +74,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run_program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE 
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index e89ecadf81d1030ba1d1268f2a817d1ecd52a012..296952ce01724a294fe8842782b09c125bc44082 100755 (executable)
@@ -78,7 +78,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE 
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass;
index dd95c2c0772f9a404fb2e30a7dfd2d4bac5d8602..25b0dcfbaa1518d9ce1fa1c10c349a756855aeac 100755 (executable)
@@ -78,24 +78,21 @@ FINISH.
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|w       |F8.0  |
-|x       |F8.0  |
-|y       |F8.0  |
-+--------+------+
-       x        y        j
--------- -------- --------
-    5.00     6.00    55.00 
-    2.00     3.00    55.00 
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+w,F8.0
+x,F8.0
+y,F8.0
+
+Table: Data List
+x,y,j
+5.00,6.00,55.00
+2.00,3.00,55.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 5272063094049e75f1513c7c8b2538bafb020f93..1ec496eb7b9d1efa1a336160d07d59ba5789561f 100755 (executable)
@@ -78,25 +78,19 @@ DESCRIPTIVES
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|ID      |F8.0  |
-|ABC     |F8.0  |
-+--------+------+
-2.1 DESCRIPTIVES.  Valid cases = 6; cases with missing value(s) = 0.
-+--------#-+----+-------+-------+-------+
-|Variable#N|Mean|Std Dev|Minimum|Maximum|
-#========#=#====#=======#=======#=======#
-|ABC     #6|3.00|    .84|   2.00|   4.00|
-+--------#-+----+-------+-------+-------+
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+ID,F8.0
+ABC,F8.0
+
+Table: Valid cases = 6; cases with missing value(s) = 0.
+Variable,N,Mean,Std Dev,Minimum,Maximum
+ABC,6,3.00,.84,2.00,4.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index d9f3e59cb5ce81d0ad33c56ba807be4e3117b5b5..27795114aaabda7e048e4a6c00644991d30a65c4 100755 (executable)
@@ -77,7 +77,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="check and save copy of output files"
@@ -103,7 +103,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 2"
-{ $SUPERVISOR $PSPP --testing-mode $TESTFILE -e /dev/null; } >/dev/null 2>&1
+{ $SUPERVISOR $PSPP -o pspp.csv $TESTFILE -e /dev/null; } >/dev/null 2>&1
 # PSPP should have terminated with a signal.  POSIX requires that the exit
 # status of a process terminated by a signal be greater than 128.
 if [ $? -le 128 ] ; then no_result ; fi
@@ -142,7 +142,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 3"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE -e /dev/null
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE -e /dev/null
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="check for remaining temporary files"
@@ -162,33 +162,34 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 4"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE -e /dev/null
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE -e /dev/null
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b pspp.list - << EOF
-       X        Y
--------- --------
-    1.00     2.00
-    2.00     3.00
-    3.00     4.00
-    4.00     5.00
-    5.00     6.00
-X        Y
-- --------
-1     3.00
-2     4.00
-3     5.00
-4     6.00
-5     7.00
-X        Y
-- --------
-1     4.00
-2     5.00
-3     6.00
-4     7.00
-5     8.00
+diff -c pspp.csv - << EOF
+Table: Data List
+X,Y
+1.00,2.00
+2.00,3.00
+3.00,4.00
+4.00,5.00
+5.00,6.00
+
+Table: Data List
+X,Y
+1,3.00
+2,4.00
+3,5.00
+4,6.00
+5,7.00
+
+Table: Data List
+X,Y
+1,4.00
+2,5.00
+3,6.00
+4,7.00
+5,8.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 2bac4413014e0d57e0bb084cf0953ae4e0916511..8089a21acae3808c60b66eaabe6b5a8aec218995 100755 (executable)
@@ -84,11 +84,10 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="check that foo2.out was created"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
 diff -b foo2.out - << EOF
  1
  2
diff --git a/tests/bugs/piechart.sh b/tests/bugs/piechart.sh
deleted file mode 100755 (executable)
index 657e538..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug which crashed pspp when a
-# piechart with too many segments was requested.
-
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     chmod u+w $TEMPDIR
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create test syntax"
-cat > $TESTFILE <<EOF
-data list list /x * w *.
-begin data.
-1  4
-34 10
--9 15
-232 6
-11  4
-134 1
-9  5
-32 16
--2 6
-2  16
-20  6
-end data.
-
-weight by w.
-
-frequencies /x
-       /piechart.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass;
index 22b215660708b355e9780b563080a0caec5fab0c..0b66ddb19e0738eb8cc5cec7de07254a21f83376 100755 (executable)
@@ -70,7 +70,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 1 ] ; then fail ; fi
 
 
index e423f3e8b4c6318241adc54718902d22a1697b41..7d931d460ba19a02d43bad73d6724548d10fba4a 100755 (executable)
@@ -75,35 +75,35 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-      R1
---------
-     7.71 
-     2.99 
-      .21 
-     4.95 
-     6.34 
-     4.43 
-     7.49 
-     8.32 
-     4.99 
-     5.83 
-     2.25 
-      .25 
-     1.98 
-     7.09 
-     7.61 
-     2.66 
-     1.69 
-     2.64 
-      .88 
-     1.50 
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.csv
+diff -b  -w $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+R1
+7.71
+2.99
+.21
+4.95
+6.34
+4.43
+7.49
+8.32
+4.99
+5.83
+2.25
+.25
+1.98
+7.09
+7.61
+2.66
+1.69
+2.64
+.88
+1.50
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
diff --git a/tests/bugs/recode-copy-bug-1.out b/tests/bugs/recode-copy-bug-1.out
deleted file mode 100644 (file)
index 659eba5..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|A       |A1    |
-|B       |A1    |
-+--------+------+
-A B
-- -
-3 2 
-2 3 
-1 4 
diff --git a/tests/bugs/recode-copy-bug-1.stat b/tests/bugs/recode-copy-bug-1.stat
deleted file mode 100644 (file)
index c493a15..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-TITLE 'Test for regression of recode COPY bug'
-
-DATA LIST LIST
- /A (A1)
- B (A1).
-
-BEGIN DATA
-1     2
-2     3
-3     4
-END DATA.
-
-** Clearly, the else=copy is superfluous here
-RECODE A ("1"="3") ("3"="1") (ELSE=COPY).
-EXECUTE.
-LIST.
-
diff --git a/tests/bugs/recode-copy-bug-2.out b/tests/bugs/recode-copy-bug-2.out
deleted file mode 100644 (file)
index 50899a8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|A       |A1    |
-|B       |A1    |
-+--------+------+
-A B A1
-- - --
-1 2  3 
-2 3  2 
-3 4  1 
diff --git a/tests/bugs/recode-copy-bug-2.stat b/tests/bugs/recode-copy-bug-2.stat
deleted file mode 100644 (file)
index 95873d7..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-DATA LIST LIST
- /A (A1)
- B (A1).
-
-BEGIN DATA
-1     2
-2     3
-3     4
-END DATA.
-
-STRING A1 (A1).
-RECODE A ("1"="3") ("3"="1") (ELSE=COPY) INTO a1.
-EXECUTE.
-LIST.
-
-
diff --git a/tests/bugs/recode-copy-bug.sh b/tests/bugs/recode-copy-bug.sh
deleted file mode 100755 (executable)
index 912590a..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/sh
-
-# This program tests ....
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-activity="copy template 1" 
-cp $top_srcdir/tests/bugs/recode-copy-bug-1.stat $TEMPDIR
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="copy template 2" 
-cp $top_srcdir/tests/bugs/recode-copy-bug-2.stat $TEMPDIR
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="chdir"
-cd $TEMPDIR
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/recode-copy-bug-1.stat
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="compare output 1"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list $top_srcdir/tests/bugs/recode-copy-bug-1.out
-diff -b -w $TEMPDIR/pspp.list $top_srcdir/tests/bugs/recode-copy-bug-1.out
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/recode-copy-bug-2.stat
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="compare output 2"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list $top_srcdir/tests/bugs/recode-copy-bug-2.out
-diff -b -w $TEMPDIR/pspp.list $top_srcdir/tests/bugs/recode-copy-bug-2.out
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
index 826d5dc4d898cff3983404316b677d5fc84259f7..b0961302ff3b474ae7798293c2e47a563a3df209 100755 (executable)
@@ -69,17 +69,17 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 0 ] ; then fail ; fi
 
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-       a
---------
-    1.00
-    2.00
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.csv
+diff -b  -w $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+a
+1.00
+2.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index dedfc6c834a8f20129ba3766e9cbbdc19c55acf8..b6cddb2a4113de8302a24159f961fc06d3fea9b1 100755 (executable)
@@ -59,7 +59,7 @@ mkdir -p $TEMPDIR
 cd $TEMPDIR
 
 activity="sending SIGINT to pspp"
-echo 'host kill -INT $PPID' | $PSPP --testing-mode > /dev/null 2> $TEMPDIR/stderr1
+echo 'host kill -INT $PPID' | $PSPP -o pspp.csv > /dev/null 2> $TEMPDIR/stderr1
 if [ $? -ne 0 ] ; then no_result ; fi
 
 # SIGINT should have caused a clean shutdown
@@ -68,7 +68,7 @@ activity="checking for absence of error messages 1"
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="sending SIGSEGV to pspp"
-echo 'host kill -SEGV $PPID' | $PSPP --testing-mode > /dev/null 2> $TEMPDIR/stderr2
+echo 'host kill -SEGV $PPID' | $PSPP -o pspp.csv > /dev/null 2> $TEMPDIR/stderr2
 if [ $? -eq 0 ] ; then no_result ; fi
 
 # SIGSEGV should have caused an error message
index 5565d31ad4b5faf6ca12db873d1d933e7fb72c12..205a7d4c7514d968a3a6cee91ecccbbbdaa0f9f9 100755 (executable)
@@ -82,43 +82,33 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|ID      |F8.0  |
-|INDEP   |A1    |
-|DEP1    |F8.0  |
-|DEP2    |F8.0  |
-+--------+------+
-2.1 T-TEST.  Group Statistics
-#==========#=#====#==============#=========#
-#     INDEP|N|Mean|Std. Deviation|S.E. Mean#
-#==========#=#====#==============#=========#
-#DEP1 a    |5|2.00|           .71|      .32#
-#     b    |5|4.00|           .71|      .32#
-#DEP2 a    |5|4.00|           .71|      .32#
-#     b    |5|2.00|           .71|      .32#
-#==========#=#====#==============#=========#
-2.2 T-TEST.  Independent Samples Test
-#===============================#========#============================================================================#
-#                               #Levene's|                        t-test for Equality of Means                        #
-#                               #---+----+-----+----+---------------+---------------+---------------------+-----------#
-#                               #   |    |     |    |               |               |                     |    95%    #
-#                               #   |    |     |    |               |               |                     +-----+-----#
-#                               # F |Sig.|  t  | df |Sig. (2-tailed)|Mean Difference|Std. Error Difference|Lower|Upper#
-#===============================#===#====#=====#====#===============#===============#=====================#=====#=====#
-#DEP1Equal variances assumed    #.00|1.00|-4.47|8.00|            .00|          -2.00|                  .45|-3.03| -.97#
-#    Equal variances not assumed#   |    |-4.47|8.00|            .00|          -2.00|                  .45|-3.03| -.97#
-#DEP2Equal variances assumed    #.00|1.00| 4.47|8.00|            .00|           2.00|                  .45|  .97| 3.03#
-#    Equal variances not assumed#   |    | 4.47|8.00|            .00|           2.00|                  .45|  .97| 3.03#
-#===============================#===#====#=====#====#===============#===============#=====================#=====#=====#
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+ID,F8.0
+INDEP,A1
+DEP1,F8.0
+DEP2,F8.0
+
+Table: Group Statistics
+,INDEP,N,Mean,Std. Deviation,S.E. Mean
+DEP1,a,5,2.00,.71,.32
+,b,5,4.00,.71,.32
+DEP2,a,5,4.00,.71,.32
+,b,5,2.00,.71,.32
+
+Table: Independent Samples Test
+,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,,
+,,,,,,,,,95% Confidence Interval of the Difference,
+,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper
+DEP1,Equal variances assumed,.00,1.00,-4.47,8.00,.00,-2.00,.45,-3.03,-.97
+,Equal variances not assumed,,,-4.47,8.00,.00,-2.00,.45,-3.03,-.97
+DEP2,Equal variances assumed,.00,1.00,4.47,8.00,.00,2.00,.45,.97,3.03
+,Equal variances not assumed,,,4.47,8.00,.00,2.00,.45,.97,3.03
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index c49103a88292fe1f5fc1ad051c08151b72669fb3..0fdac2afcfee2065729b53140d49c1b763bdbf79 100755 (executable)
@@ -81,7 +81,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE > /dev/null
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null
 #invert  v
 if [ $? -eq 0 ] ; then fail ; fi
 
index c54bba3cf541a1ce7c738487e88ec6db09bb7a1e..5504e6cc46fcab384954b550f2492d405d4fa307 100755 (executable)
@@ -79,38 +79,28 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b  $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|x       |F8.0  |
-|gv      |A8    |
-+--------+------+
-2.1 T-TEST.  Group Statistics
-#==========#=#====#==============#=========#
-#     gv   |N|Mean|Std. Deviation|S.E. Mean#
-#==========#=#====#==============#=========#
-#x One     |5|2.60|           .55|      .24#
-#  Two     |3|3.50|           .50|      .29#
-#==========#=#====#==============#=========#
-2.2 T-TEST.  Independent Samples Test
-#============================#=========#============================================================================#
-#                            # Levene's|                        t-test for Equality of Means                        #
-#                            #----+----+-----+----+---------------+---------------+---------------------+-----------#
-#                            #    |    |     |    |               |               |                     |    95%    #
-#                            #    |    |     |    |               |               |                     +-----+-----#
-#                            #  F |Sig.|  t  | df |Sig. (2-tailed)|Mean Difference|Std. Error Difference|Lower|Upper#
-#============================#====#====#=====#====#===============#===============#=====================#=====#=====#
-#xEqual variances assumed    #1.13| .33|-2.32|6.00|            .06|           -.90|                  .38|-1.83|  .03#
-# Equal variances not assumed#    |    |-2.38|4.70|            .07|           -.90|                  .38|-1.89|  .09#
-#============================#====#====#=====#====#===============#===============#=====================#=====#=====#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+x,F8.0
+gv,A8
+
+Table: Group Statistics
+,gv,N,Mean,Std. Deviation,S.E. Mean
+x,One     ,5,2.60,.55,.24
+,Two     ,3,3.50,.50,.29
+
+Table: Independent Samples Test
+,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,,
+,,,,,,,,,95% Confidence Interval of the Difference,
+,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper
+x,Equal variances assumed,1.13,.33,-2.32,6.00,.06,-.90,.38,-1.83,.03
+,Equal variances not assumed,,,-2.38,4.70,.07,-.90,.38,-1.89,.09
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index a9a311b7cc63290d4377f2c49e7208cbf741586e..47b096425ce42d0a642e69af513d59366387b1f3 100755 (executable)
@@ -73,43 +73,31 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b  $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|A       |F8.0  |
-|B       |F8.0  |
-+--------+------+
-2.1 T-TEST.  Paired Sample Statistics
-#========#=====#=#==============#=========#
-#        # Mean|N|Std. Deviation|S.E. Mean#
-#========#=====#=#==============#=========#
-#Pair 0 A#4.333|3|         5.774|    3.333#
-#       B#1.333|3|          .577|     .333#
-#========#=====#=#==============#=========#
-2.2 T-TEST.  Paired Samples Correlations
-#======#=====#=#===========#====#
-#      |     #N|Correlation|Sig.#
-#======#=====#=#===========#====#
-#Pair 0|A & B#3|      1.000|.000#
-#======#=====#=#===========#====#
-2.3 T-TEST.  Paired Samples Test
-#===========#==================================================#=====#==#===============#
-#           #                Paired Differences                |     |  |               #
-#           #-----+--------------+---------------+-------------+     |  |               #
-#           #     |              |               |     95%     |     |  |               #
-#           #     |              |               +------+------+     |  |               #
-#           # Mean|Std. Deviation|Std. Error Mean| Lower| Upper|  t  |df|Sig. (2-tailed)#
-#===========#=====#==============#===============#======#======#=====#==#===============#
-#Pair 0A - B#3.000|         5.196|          3.000|-9.908|15.908|1.000| 2|           .423#
-#===========#=====#==============#===============#======#======#=====#==#===============#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+A,F8.0
+B,F8.0
+
+Table: Paired Sample Statistics
+,,Mean,N,Std. Deviation,S.E. Mean
+Pair 0,A,4.333,3,5.774,3.333
+,B,1.333,3,.577,.333
+
+Table: Paired Samples Correlations
+,,N,Correlation,Sig.
+Pair 0,A & B,3,1.000,.000
+
+Table: Paired Samples Test
+,,Paired Differences,,,,,,,
+,,,,,95% Confidence Interval of the Difference,,,,
+,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
+Pair 0,A - B,3.000,5.196,3.000,-9.908,15.908,1.000,2,.423
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 92dc3fb02b057f8215dd2907e8e340732b4521a1..3413a51ffb7ba9f57635114022764f907e1e5777 100755 (executable)
@@ -75,11 +75,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy output"
-cp $TEMPDIR/pspp.list $TEMPDIR/first.list
+cp $TEMPDIR/pspp.csv $TEMPDIR/first.csv
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create program 2"
@@ -103,8 +103,8 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list $TEMPDIR/first.list
-diff -b $TEMPDIR/pspp.list $TEMPDIR/first.list
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.csv $TEMPDIR/first.csv
+diff -b $TEMPDIR/pspp.csv $TEMPDIR/first.csv
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index e8c43ebca02d3c890ccb676a1c5df86714d8db7f..e4940c080de376a41f660a150982c5d95ac0f813 100755 (executable)
@@ -77,7 +77,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 #The syntax was invalid.  Therefore pspp must return non zero.
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 1 ] ; then fail ; fi
 
 pass;
diff --git a/tests/bugs/temp-freq.sh b/tests/bugs/temp-freq.sh
deleted file mode 100755 (executable)
index 6168f4b..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/bin/sh
-
-# This program tests for a bug which caused FREQUENCIES following
-# TEMPORARY to crash (PR 11492).
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-DATA LIST LIST /SEX (A1) X *.
-BEGIN DATA.
-M 31
-F 21
-M 41
-F 31
-M 13
-F 12
-M 14
-F 13
-END DATA.
-
-
-TEMPORARY
-SELECT IF SEX EQ 'F'
-FREQUENCIES /X .
-
-FINISH
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
-
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|SEX     |A1    |
-|X       |F8.0  |
-+--------+------+
-2.1 FREQUENCIES.  X
-+-----------+--------+---------+--------+-------------+-----------+
-|Value Label|  Value |Frequency| Percent|Valid Percent|Cum Percent|
-#===========#========#=========#========#=============#===========#
-|           |   12.00|        1|   25.00|        25.00|      25.00|
-|           |   13.00|        1|   25.00|        25.00|      50.00|
-|           |   21.00|        1|   25.00|        25.00|      75.00|
-|           |   31.00|        1|   25.00|        25.00|     100.00|
-#===========#========#=========#========#=============#===========#
-|               Total|        4|   100.0|        100.0|           |
-+--------------------+---------+--------+-------------+-----------+
-+---------------+-----+
-|N       Valid  |    4|
-|        Missing|    0|
-|Mean           |19.25|
-|Std Dev        | 8.81|
-|Minimum        |12.00|
-|Maximum        |31.00|
-+---------------+-----+
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
index 8ffa86115999566dbca7c821aca16e67cb2aa793..96856d5a51c37c3194176853d2b85e1233619201 100755 (executable)
@@ -80,29 +80,29 @@ list.
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-       X
---------
-    6.00 
-    7.00 
-    8.00 
-    9.00 
-       X
---------
-    1.00 
-    2.00 
-    3.00 
-    4.00 
-    5.00 
-    6.00 
-    7.00 
-    8.00 
-    9.00 
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+X
+6.00
+7.00
+8.00
+9.00
+
+Table: Data List
+X
+1.00
+2.00
+3.00
+4.00
+5.00
+6.00
+7.00
+8.00
+9.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 774b6230b6a68e7d0f3a2f9bf5e2237aa24bbcf1..3f3a40adcf4fa1ca414d3cdb92f180b30fff31ce 100755 (executable)
@@ -81,12 +81,12 @@ chmod u-w $TEMPDIR
 # on a single PSPP invocation, except that charts are only supported for
 # a single driver at a time, and we'd prefer to test chart support for
 # all of our driver types.
-for driver in list-ascii list-ps html; do
+for file in pspp.csv pspp.html pspp.odt pspp.pdf pspp.txt; do
     # PSPP will fail to create the output file.  Currently this doesn't cause
     # PSPP's exit status to be nonzero, although this is arguably incorrect.
     # At any rate, PSPP should not crash.
-    activity="run pspp with $driver driver"
-    $SUPERVISOR $PSPP -o $driver test.pspp >/dev/null 2>&1
+    activity="run pspp with $file driver"
+    $SUPERVISOR $PSPP -o $file test.pspp >/dev/null 2>&1
     if [ $? -ne 0 ] ; then fail ; fi
 done
 
index 7388caaa2466f296c2b0dcf5b588accf33c40a07..d552041e8980bbf3d96bc0ef299c8106e7ce00c5 100755 (executable)
@@ -77,7 +77,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass
index 4d57f661e79511acfb522e2ddd2f0590a91814d4..1f07ca6d37adc88cab27c0fbea2b2ab90f6832c1 100755 (executable)
@@ -77,7 +77,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 #Invalid syntax --- return value is non zero.
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 1 ] ; then fail ; fi
 
 pass;
index 48232f2e4828303d4b0862754b73375478ff5f03..d2b164bf4f0a06ebcd69efa0d374eb761211f226 100755 (executable)
@@ -84,52 +84,52 @@ cat > b.data <<EOF
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
-cat > concatenate.out <<EOF
-A B C D INA INB
-- - - - --- ---
-1 a B     1   0
-8 a M     1   0
-3 a E     1   0
-5 a G     1   0
-0 a A     1   0
-5 a H     1   0
-6 a I     1   0
-7 a J     1   0
-2 a D     1   0
-7 a K     1   0
-1 a C     1   0
-7 a L     1   0
-4 a F     1   0
-1 b   N   0   1
-3 b   O   0   1
-4 b   P   0   1
-6 b   Q   0   1
-7 b   R   0   1
-9 b   S   0   1
+cat > concatenate.csv <<EOF
+Table: Data List
+A,B,C,D,INA,INB
+1,a,B,,1,0
+8,a,M,,1,0
+3,a,E,,1,0
+5,a,G,,1,0
+0,a,A,,1,0
+5,a,H,,1,0
+6,a,I,,1,0
+7,a,J,,1,0
+2,a,D,,1,0
+7,a,K,,1,0
+1,a,C,,1,0
+7,a,L,,1,0
+4,a,F,,1,0
+1,b,,N,0,1
+3,b,,O,0,1
+4,b,,P,0,1
+6,b,,Q,0,1
+7,b,,R,0,1
+9,b,,S,0,1
 EOF
 
-cat > interleave.out <<EOF
-A B C D INA INB FIRST LAST
-- - - - --- --- ----- ----
-0 a A     1   0     1   1
-1 a B     1   0            1    0
-1 a C     1   0            0    0
-1 b   N   0   1            0    1
-2 a D     1   0            1    1
-3 a E     1   0            1    0
-3 b   O   0   1            0    1
-4 a F     1   0            1    0
-4 b   P   0   1            0    1
-5 a G     1   0            1    0
-5 a H     1   0            0    1
-6 a I     1   0            1    0
-6 b   Q   0   1            0    1
-7 a J     1   0            1    0
-7 a K     1   0            0    0
-7 a L     1   0            0    0
-7 b   R   0   1            0    1
-8 a M     1   0            1    1
-9 b   S   0   1            1    1
+cat > interleave.csv <<EOF
+Table: Data List
+A,B,C,D,INA,INB,FIRST,LAST
+0,a,A,,1,0,1,1
+1,a,B,,1,0,1,0
+1,a,C,,1,0,0,0
+1,b,,N,0,1,0,1
+2,a,D,,1,0,1,1
+3,a,E,,1,0,1,0
+3,b,,O,0,1,0,1
+4,a,F,,1,0,1,0
+4,b,,P,0,1,0,1
+5,a,G,,1,0,1,0
+5,a,H,,1,0,0,1
+6,a,I,,1,0,1,0
+6,b,,Q,0,1,0,1
+7,a,J,,1,0,1,0
+7,a,K,,1,0,0,0
+7,a,L,,1,0,0,0
+7,b,,R,0,1,0,1
+8,a,M,,1,0,1,1
+9,b,,S,0,1,1,1
 EOF
 
 # Test ADD FILES.
@@ -186,13 +186,13 @@ EOF
        if [ $? -ne 0 ] ; then no_result ; fi
 
        activity="run $name.pspp"
-       $SUPERVISOR $PSPP --testing-mode $name.pspp 
+       $SUPERVISOR $PSPP -o pspp.csv $name.pspp 
        if [ $? -ne 0 ] ; then no_result ; fi
 
        activity="check $name output"
-       perl -pi -e 's/^\s*$//g' pspp.list
-       perl -pi -e 's/^\s*$//g' $type.out
-       diff -u -b -w pspp.list $type.out
+       perl -pi -e 's/^\s*$//g' pspp.csv
+       perl -pi -e 's/^\s*$//g' $type.csv
+       diff -u -b -w pspp.csv $type.csv
        if [ $? -ne 0 ] ; then fail ; fi
     done
 done
diff --git a/tests/command/aggregate.sh b/tests/command/aggregate.sh
deleted file mode 100755 (executable)
index 63abc6f..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-#!/bin/sh
-
-# This program tests the aggregate procedure
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/aggregate.pspp
-
-
-# ensure that top_srcdir and top_builddir  are absolute
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-top_srcdir=`cd $top_srcdir; pwd`
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="data create"
-cat > aggregate.data <<EOF
-2 42
-1001
-4 41
-3112
-1112
-2661
-1221
-2771
-1331
-1441
-2881
-1551
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="command skeleton create"
-cat > agg-skel.pspp <<EOF
-       /document
-       /break=g
-       /N = n
-       /NI = n./
-       NU = nu
-       /NUI = nu./
-       NFGT2 = fgt(n, 2)
-       /NFGT2I = fgt.(n, 2)
-       /SFGT2 = fgt(s, '2')
-       /SFGT2I = fgt.(s, '2')
-       /NFIN23 = fin(n, 2, 3)
-       /NFIN23I = fin.(n, 2, 3)
-       /SFIN23 = fin(s, '2', '3')
-       /SFIN23I = fin.(s, '2', '3')
-       /NFLT2 = flt(n, 2)
-       /NFLT2I = flt.(n, 2)
-       /SFLT2 = flt(s, '2')
-       /SFLT2I = flt.(s, '2')
-       /NFIRST = first(n)
-       /NFIRSTI = first.(n)
-       /SFIRST = first(s)
-       /SFIRSTI = first.(s)
-       /NFOUT23 = fout(n, 3, 2)
-       /NFOUT23I = fout.(n, 3, 2)
-       /SFOUT23 = fout(s, '3', '2')
-       /SFOUT23I = fout.(s, '3', '2')
-       /NLAST = last(n)
-       /NLASTI = last.(n)
-       /SLAST = last(s)
-       /SLASTI = last.(s)
-       /NMAX = max(n)
-       /NMAXI = max.(n)
-       /SMAX = max(s)
-       /SMAXI = max.(s)
-       /NMEAN = mean(n)
-       /NMEANI = mean.(n)
-       /NMIN = min(n)
-       /NMINI = min.(n)
-       /SMIN = min(s)
-       /SMINI = min.(s)
-       /NN = n(n)
-       /NNI = n.(n)
-       /SN = n(s)
-       /SNI = n.(s)
-       /NNMISS = nmiss(n)
-       /NNMISSI = nmiss.(n)
-       /SNMISS = nmiss(s)
-       /SNMISSI = nmiss.(s)
-       /NNU = nu(n)
-       /NNUI = nu.(n)
-       /SNU = nu(s)
-       /SNUI = nu.(s)
-       /NNUMISS = numiss(n)
-       /NNUMISSI = numiss.(n)
-       /SNUMISS = numiss(s)
-       /SNUMISSI = numiss.(s)
-       /NPGT2 = pgt(n, 2)
-       /NPGT2I = pgt.(n, 2)
-       /SPGT2 = pgt(s, '2')
-       /SPGT2I = pgt.(s, '2')
-       /NPIN23 = pin(n, 2, 3)
-       /NPIN23I = pin.(n, 2, 3)
-       /SPIN23 = pin(s, '2', '3')
-       /SPIN23I = pin.(s, '2', '3')
-       /NPLT2 = plt(n, 2)
-       /NPLT2I = plt.(n, 2)
-       /SPLT2 = plt(s, '2')
-       /SPLT2I = plt.(s, '2')
-       /NPOUT23 = pout(n, 2, 3)
-       /NPOUT23I = pout.(n, 2, 3)
-       /SPOUT23 = pout(s, '2', '3')
-       /SPOUT23I = pout.(s, '2', '3')
-       /NMEDIAN = median(n)
-       /NMEDIANI = median.(n)
-       /NSD = sd(n)
-       /NSDI = sd.(n)
-       /NSUM = sum(n)
-       /NSUMI = sum.(n).
-EOF
-
-activity="expected output (itemwise missing) create"
-cat > agg-itemwise.out <<EOF
-warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
-warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
-warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
-warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
-G        N       NI      NU     NUI NFGT2 NFGT2I SFGT2 SFGT2I NFIN23 NFIN23I SFIN23 SFIN23I NFLT2 NFLT2I SFLT2 SFLT2I NFIRST NFIRSTI SFIRST SFIRSTI NFOUT23 NFOUT23I SFOUT23 SFOUT23I NLAST NLASTI SLAST SLASTI NMAX NMAXI SMAX SMAXI    NMEAN   NMEANI NMIN NMINI SMIN SMINI       NN      NNI       SN      SNI   NNMISS  NNMISSI   SNMISS  SNMISSI     NNU    NNUI     SNU    SNUI NNUMISS NNUMISSI SNUMISS SNUMISSI NPGT2 NPGT2I SPGT2 SPGT2I NPIN23 NPIN23I SPIN23 SPIN23I NPLT2 NPLT2I SPLT2 SPLT2I NPOUT23 NPOUT23I SPOUT23 SPOUT23I  NMEDIAN NMEDIANI      NSD     NSDI     NSUM    NSUMI
-- -------- -------- ------- ------- ----- ------ ----- ------ ------ ------- ------ ------- ----- ------ ----- ------ ------ ------- ------ ------- ------- -------- ------- -------- ----- ------ ----- ------ ---- ----- ---- ----- -------- -------- ---- ----- ---- ----- -------- -------- -------- -------- -------- -------- -------- -------- ------- ------- ------- ------- ------- -------- ------- -------- ----- ------ ----- ------ ------ ------- ------ ------- ----- ------ ----- ------ ------- -------- ------- -------- -------- -------- -------- -------- -------- --------
-1     7.00     7.00       6       6  .333   .429  .333   .429   .333    .286   .333    .286  .500   .429  .500   .429      0       0      0       0    .667     .714    .667     .714     5      5     5      5    5     5    5     5     2.00     2.29    0     0    0     0     6.00     7.00     6.00     7.00     1.00      .00     1.00      .00       5       6       5       6       1        0       1        0  33.3   42.9  33.3   42.9   33.3    28.6   33.3    28.6  50.0   42.9  50.0   42.9    66.7     71.4    66.7     71.4     1.50     2.00     1.79     1.80    12.00    16.00 
-2     5.00     5.00       4       4 1.000  1.000 1.000  1.000   .000    .000   .000    .000  .000   .000  .000   .000      6       6      6       4   1.000    1.000   1.000    1.000     8      8     8      8    8     8    8     8     7.00     7.00    6     6    6     4     3.00     3.00     3.00     5.00     2.00     2.00     2.00      .00       3       3       3       4       1        1       1        0 100.0  100.0 100.0  100.0     .0      .0     .0      .0    .0     .0    .0     .0   100.0    100.0   100.0    100.0     7.00     7.00     1.00     1.00    21.00    21.00 
-3     2.00     2.00       1       1  .000   .000  .000   .000   .000    .000   .000    .000 1.000  1.000 1.000  1.000      1       1      1       1   1.000    1.000   1.000    1.000     1      1     1      1    1     1    1     1     1.00     1.00    1     1    1     1     2.00     2.00     2.00     2.00      .00      .00      .00      .00       1       1       1       1       0        0       0        0    .0     .0    .0     .0     .0      .0     .0      .0 100.0  100.0 100.0  100.0   100.0    100.0   100.0    100.0     1.00     1.00      .00      .00     2.00     2.00 
-4     1.00     1.00       1       1  .      .     .     1.000   .       .      .       .000  .      .     .      .000      .       .              4    .        .       .       1.000     .      .            4    .     .          4      .        .      .     .          4      .00      .00      .00     1.00     1.00     1.00     1.00      .00       0       0       0       1       1        1       1        0    .      .     .   100.0     .       .      .       .0    .      .     .      .0      .        .       .     100.0      NaN      NaN      .        .        .        .   
-
-EOF
-
-activity="expected output (columnwise missing) create"
-cat > agg-columnwise.out <<EOF
-warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
-warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
-warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
-warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
-G        N       NI      NU     NUI NFGT2 NFGT2I SFGT2 SFGT2I NFIN23 NFIN23I SFIN23 SFIN23I NFLT2 NFLT2I SFLT2 SFLT2I NFIRST NFIRSTI SFIRST SFIRSTI NFOUT23 NFOUT23I SFOUT23 SFOUT23I NLAST NLASTI SLAST SLASTI NMAX NMAXI SMAX SMAXI    NMEAN   NMEANI NMIN NMINI SMIN SMINI       NN      NNI       SN      SNI   NNMISS  NNMISSI   SNMISS  SNMISSI     NNU    NNUI     SNU    SNUI NNUMISS NNUMISSI SNUMISS SNUMISSI NPGT2 NPGT2I SPGT2 SPGT2I NPIN23 NPIN23I SPIN23 SPIN23I NPLT2 NPLT2I SPLT2 SPLT2I NPOUT23 NPOUT23I SPOUT23 SPOUT23I  NMEDIAN NMEDIANI      NSD     NSDI     NSUM    NSUMI
-- -------- -------- ------- ------- ----- ------ ----- ------ ------ ------- ------ ------- ----- ------ ----- ------ ------ ------- ------ ------- ------- -------- ------- -------- ----- ------ ----- ------ ---- ----- ---- ----- -------- -------- ---- ----- ---- ----- -------- -------- -------- -------- -------- -------- -------- -------- ------- ------- ------- ------- ------- -------- ------- -------- ----- ------ ----- ------ ------ ------- ------ ------- ----- ------ ----- ------ ------- -------- ------- -------- -------- -------- -------- -------- -------- --------
-1     7.00     7.00       6       6  .      .429  .      .429   .       .286   .       .286  .      .429  .      .429      .       0              0    .        .714    .        .714     .      5            5    .     5          5      .       2.29    .     0          0     6.00     7.00     6.00     7.00     1.00      .00     1.00      .00       5       6       5       6       1        0       1        0    .    42.9    .    42.9     .     28.6     .     28.6    .    42.9    .    42.9      .      71.4      .      71.4      .       2.00      .       1.80      .      16.00 
-2     5.00     5.00       4       4  .      .     .     1.000   .       .      .       .000  .      .     .      .000      .       .              4    .        .       .       1.000     .      .            8    .     .          8      .        .      .     .          4     3.00     3.00     3.00     5.00     2.00     2.00     2.00      .00       3       3       3       4       1        1       1        0    .      .     .   100.0     .       .      .       .0    .      .     .      .0      .        .       .     100.0      .        .        .        .        .        .   
-3     2.00     2.00       1       1  .000   .000  .000   .000   .000    .000   .000    .000 1.000  1.000 1.000  1.000      1       1      1       1   1.000    1.000   1.000    1.000     1      1     1      1    1     1    1     1     1.00     1.00    1     1    1     1     2.00     2.00     2.00     2.00      .00      .00      .00      .00       1       1       1       1       0        0       0        0    .0     .0    .0     .0     .0      .0     .0      .0 100.0  100.0 100.0  100.0   100.0    100.0   100.0    100.0     1.00     1.00      .00      .00     2.00     2.00 
-4     1.00     1.00       1       1  .      .     .     1.000   .       .      .       .000  .      .     .      .000      .       .              4    .        .       .       1.000     .      .            4    .     .          4      .        .      .     .          4      .00      .00      .00     1.00     1.00     1.00     1.00      .00       0       0       0       1       1        1       1        0    .      .     .   100.0     .       .      .       .0    .      .     .      .0      .        .       .     100.0      .        .        .        .        .        .   
-EOF
-
-for outfile in scratch active external; do
-    for sort in presorted unsorted; do
-       for missing in itemwise columnwise; do
-           name=$outfile-$sort-$missing
-
-           activity="create $name.pspp"
-           {
-               echo "data list notable file='aggregate.data' /G N 1-2 S 3(a) W 4."
-               echo "weight by w."
-               echo "missing values n(4) s('4')."
-               if [ "$sort" = "presorted" ]; then
-                   echo "sort cases by g."
-               fi
-               echo "aggregate"
-               if [ "$outfile" = "active" ]; then
-                   echo "      outfile=*"
-               elif [ "$outfile" = "external" ]; then
-                   echo "      outfile='aggregate.sys'"
-               else
-                   echo "      outfile=#AGGREGATE"
-               fi
-               if [ "$sort" = "presorted" ]; then
-                   echo "      /presorted"
-               fi
-               if [ "$missing" = "columnwise" ]; then
-                   echo "      /missing=columnwise"
-               fi
-               cat agg-skel.pspp
-               if [ "$outfile" = "external" ]; then
-                   echo "get file='aggregate.sys'."
-               elif [ "$outfile" = "scratch" ]; then
-                   echo "get file=#AGGREGATE."
-               fi
-               echo "list."
-           } > $name.pspp
-           if [ $? -ne 0 ] ; then no_result ; fi
-           
-           activity="run $name.pspp"
-           $SUPERVISOR $PSPP --testing-mode -e /dev/null $name.pspp 
-           if [ $? -ne 0 ] ; then no_result ; fi
-
-           activity="check $name output"
-           perl -pi -e 's/^\s*$//g;s/^.*:\d+: //;' pspp.list agg-$missing.out
-           diff -b -w pspp.list agg-$missing.out
-           if [ $? -ne 0 ] ; then fail ; fi
-       done
-    done
-done
-
-pass;
index d4d36e603a737ce4e64081fb174266e91314c390..d4dece6c47d89242e074b91e13201e6e4ca6444c 100755 (executable)
@@ -96,52 +96,37 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-1.1 DISPLAY.  
-+--------+-----------------+-----------------------------------+
-|Variable|Description      |                                   |
-#========#=================#===================================#
-|a       |Custom attributes|                                   |
-|        |ValidationRule[1]|a * b > 3                          |
-|        |ValidationRule[2]|a + b > 2                          |
-+--------+-----------------+-----------------------------------+
-|b       |Custom attributes|                                   |
-|        |ValidationRule[1]|a * b > 3                          |
-|        |ValidationRule[2]|a + b > 2                          |
-+--------+-----------------+-----------------------------------+
-|c       |Custom attributes|                                   |
-|        |QuestionWording  |X or Y?                            |
-+--------+-----------------+-----------------------------------+
-1.2 DISPLAY.  Custom data file attributes.
-+---------+---------------+
-|Attribute|Value          |
-#=========#===============#
-|array[1] |array element 1|
-|array[2] |array element 2|
-|key      |value          |
-+---------+---------------+
-2.1 DISPLAY.  
-+--------+---------------+-----------------------------------+
-|Variable|Description    |                                   |
-#========#===============#===================================#
-|b       |Custom attribut|s:                                 |
-|        |ValidationRule |a * b > 3                          |
-+--------+---------------+-----------------------------------+
-|c       |Custom attribut|s:                                 |
-|        |QuestionWording|X or Y?                            |
-+--------+---------------+-----------------------------------+
-2.2 DISPLAY.  Custom data file attributes.
-+---------+---------------+
-|Attribute|Value          |
-#=========#===============#
-|array    |array element 2|
-|key      |value          |
-+---------+---------------+
+diff -c $TEMPDIR/pspp.csv - << EOF
+Variable,Description,
+a,Custom attributes:,
+,ValidationRule[1],a * b > 3
+,ValidationRule[2],a + b > 2
+b,Custom attributes:,
+,ValidationRule[1],a * b > 3
+,ValidationRule[2],a + b > 2
+c,Custom attributes:,
+,QuestionWording,X or Y?
+
+Table: Custom data file attributes.
+Attribute,Value
+array[1],array element 1
+array[2],array element 2
+key,value
+
+Variable,Description,
+b,Custom attributes:,
+,ValidationRule,a * b > 3
+c,Custom attributes:,
+,QuestionWording,X or Y?
+
+Table: Custom data file attributes.
+Attribute,Value
+array,array element 2
+key,value
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
diff --git a/tests/command/autorecod.sh b/tests/command/autorecod.sh
deleted file mode 100755 (executable)
index e956fcf..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/bin/sh
-
-# This program tests the autorecode command
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-/* Tries AUTORECODE on some random but similar strings of characters.
-data list /X 1-5(a) Y 7.
-begin data.
-lasdj 1 1                                                           3
-asdfk 0 3 <---- These are the numbers that should be produced for a 4
-asdfj 2 4                                                           2
-asdfj 1 4                                                           3
-asdfk 2 3                                                           2
-asdfj 9 4                                                           1
-lajks 9 2                                                           1
-asdfk 0 3 These are the numbers that should be produced for b ----> 4
-asdfk 1 3                                                           3
-end data.
-
-autorecode x y into A B/descend.
-
-list.
-/* Just to make sure it works on second & subsequent executions,
-/* try it again.
-compute Z=trunc(y/2).
-autorecode z into W.
-list.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="test output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|X       |     1|  1-  5|A5    |
-|Y       |     1|  7-  7|F1.0  |
-+--------+------+-------+------+
-    X Y        A        B
------ - -------- --------
-lasdj 1     1.00     3.00 
-asdfk 0     3.00     4.00 
-asdfj 2     4.00     2.00 
-asdfj 1     4.00     3.00 
-asdfk 2     3.00     2.00 
-asdfj 9     4.00     1.00 
-lajks 9     2.00     1.00 
-asdfk 0     3.00     4.00 
-asdfk 1     3.00     3.00 
-    X Y        A        B        Z        W
------ - -------- -------- -------- --------
-lasdj 1     1.00     3.00      .00     1.00 
-asdfk 0     3.00     4.00      .00     1.00 
-asdfj 2     4.00     2.00     1.00     2.00 
-asdfj 1     4.00     3.00      .00     1.00 
-asdfk 2     3.00     2.00     1.00     2.00 
-asdfj 9     4.00     1.00     4.00     3.00 
-lajks 9     2.00     1.00     4.00     3.00 
-asdfk 0     3.00     4.00      .00     1.00 
-asdfk 1     3.00     3.00      .00     1.00 
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass
-
-
-
index 6d835015e7e3d6ade18ccbe7cf0b45caa957cc70..45752fc7a71ac46efe3fe3d445101745b1281d9c 100755 (executable)
@@ -86,40 +86,38 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare data"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - << foobar
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|A       |     1|  1-  1|F1.0  |
-|B       |     1|  2-  2|F1.0  |
-+--------+------+-------+------+
-A B
-- -
-1 2 
-3 4 
-5 6 
-7 8 
-9 0 
-2.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|A       |     1|  1-  1|F1.0  |
-|B       |     1|  2-  2|F1.0  |
-+--------+------+-------+------+
-A B
-- -
-0 9 
-8 7 
-6 5 
-4 3 
-2 1 
+diff -c $TEMPDIR/pspp.csv - << foobar
+Title: Test BEGIN DATA ... END DATA
+
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+A,1,1-  1,F1.0
+B,1,2-  2,F1.0
+
+Table: Data List
+A,B
+1,2
+3,4
+5,6
+7,8
+9,0
+
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+A,1,1-  1,F1.0
+B,1,2-  2,F1.0
+
+Table: Data List
+A,B
+0,9
+8,7
+6,5
+4,3
+2,1
 foobar
 if [ $? -ne 0 ] ; then fail ; fi
 
index 41e1963c170c1106ae024cdbf052be1dc9ab164b..8caa95c4908e4f296b6ce85d209cd8ee27332a21 100755 (executable)
@@ -138,7 +138,7 @@ foobar
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 # Like the above comments say ...
index d8fcb1cbbcb1893dfc8ff31c65d1be4b060b418f..06c1d24519c5bbbc2028dab5f98f97555bfef696 100755 (executable)
@@ -94,58 +94,43 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare results 1"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 CORRELATIONS.  Correlations
-#========================#=====#=====#=====#=====#
-#                        #foo  |bar  |wiz  |bang #
-#----+-------------------#-----+-----+-----+-----#
-#foo |Pearson Correlation#1.000| .802| .890|-.308#
-#    |Sig. (2-tailed)    #     | .055| .017| .553#
-#----+-------------------#-----+-----+-----+-----#
-#bar |Pearson Correlation# .802|1.000| .519| .118#
-#    |Sig. (2-tailed)    # .055|     | .291| .824#
-#----+-------------------#-----+-----+-----+-----#
-#wiz |Pearson Correlation# .890| .519|1.000|-.344#
-#    |Sig. (2-tailed)    # .017| .291|     | .505#
-#----+-------------------#-----+-----+-----+-----#
-#bang|Pearson Correlation#-.308| .118|-.344|1.000#
-#    |Sig. (2-tailed)    # .553| .824| .505|     #
-#====#===================#=====#=====#=====#=====#
-2.1 CORRELATIONS.  Correlations
-#=======================#=====#=====#
-#                       #bar  |wiz  #
-#---+-------------------#-----+-----#
-#bar|Pearson Correlation#1.000| .497#
-#   |Sig. (2-tailed)    #     | .210#
-#---+-------------------#-----+-----#
-#wiz|Pearson Correlation# .497|1.000#
-#   |Sig. (2-tailed)    # .210|     #
-#===#===================#=====#=====#
-3.1 CORRELATIONS.  Correlations
-#========================#=====#=====#=====#=====#
-#                        #foo  |bar  |wiz  |bang #
-#----+-------------------#-----+-----+-----+-----#
-#foo |Pearson Correlation#1.000| .805| .883|-.308#
-#    |Sig. (2-tailed)    #     | .029| .008| .553#
-#    |N                  #    7|    7|    7|    6#
-#----+-------------------#-----+-----+-----+-----#
-#bar |Pearson Correlation# .805|1.000| .497| .164#
-#    |Sig. (2-tailed)    # .029|     | .210| .725#
-#    |N                  #    7|    8|    8|    7#
-#----+-------------------#-----+-----+-----+-----#
-#wiz |Pearson Correlation# .883| .497|1.000|-.337#
-#    |Sig. (2-tailed)    # .008| .210|     | .460#
-#    |N                  #    7|    8|    8|    7#
-#----+-------------------#-----+-----+-----+-----#
-#bang|Pearson Correlation#-.308| .164|-.337|1.000#
-#    |Sig. (2-tailed)    # .553| .725| .460|     #
-#    |N                  #    6|    7|    7|    7#
-#====#===================#=====#=====#=====#=====#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Correlations
+,,foo,bar,wiz,bang
+foo,Pearson Correlation,1.000,.802,.890,-.308
+,Sig. (2-tailed),,.055,.017,.553
+bar,Pearson Correlation,.802,1.000,.519,.118
+,Sig. (2-tailed),.055,,.291,.824
+wiz,Pearson Correlation,.890,.519,1.000,-.344
+,Sig. (2-tailed),.017,.291,,.505
+bang,Pearson Correlation,-.308,.118,-.344,1.000
+,Sig. (2-tailed),.553,.824,.505,
+
+Table: Correlations
+,,bar,wiz
+bar,Pearson Correlation,1.000,.497
+,Sig. (2-tailed),,.210
+wiz,Pearson Correlation,.497,1.000
+,Sig. (2-tailed),.210,
+
+Table: Correlations
+,,foo,bar,wiz,bang
+foo,Pearson Correlation,1.000,.805,.883,-.308
+,Sig. (2-tailed),,.029,.008,.553
+,N,7,7,7,6
+bar,Pearson Correlation,.805,1.000,.497,.164
+,Sig. (2-tailed),.029,,.210,.725
+,N,7,8,8,7
+wiz,Pearson Correlation,.883,.497,1.000,-.337
+,Sig. (2-tailed),.008,.210,,.460
+,N,7,8,8,7
+bang,Pearson Correlation,-.308,.164,-.337,1.000
+,Sig. (2-tailed),.553,.725,.460,
+,N,6,7,7,7
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -177,11 +162,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy results"
-cp $TEMPDIR/pspp.list $TEMPDIR/weighted
+cp $TEMPDIR/pspp.csv $TEMPDIR/weighted
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create program 3"
@@ -211,11 +196,11 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 3"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="Compare weighted and unweighted results"
-diff $TEMPDIR/pspp.list $TEMPDIR/weighted
+diff $TEMPDIR/pspp.csv $TEMPDIR/weighted
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass;
index 0813c428aa647d9bfc40dad03b4f60b7b4a818d7..bba7d06268a6cad26d0a9a5545164bef358ab124 100755 (executable)
@@ -80,29 +80,28 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="Run pspp 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results 1"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|V1      |     1|  1-  2|A2    |
-|V2      |     1|  3-  4|A2    |
-+--------+------+-------+------+
-V1 V2        C
--- -- --------
-12 34      .00 
-32 1      1.00 
-2  13     1.00 
-41 21      .00 
-11 04      .00 
-03  4     1.00 
-01 93      .00 
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Title: Test COUNT transformation
+
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+V1,1,1-  2,A2
+V2,1,3-  4,A2
+
+Table: Data List
+V1,V2,C
+12,34,.00
+32,1 ,1.00
+2 ,13,1.00
+41,21,.00
+11,04,.00
+03,4,1.00
+01,93,.00
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
@@ -128,27 +127,24 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="Run pspp 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|x       |F8.0  |
-|y       |F8.0  |
-+--------+------+
-       x        y        C
--------- -------- --------
-    1.00     2.00     1.00 
-    2.00     3.00     1.00 
-    4.00     5.00      .00 
-    2.00     2.00     2.00 
-    5.00     6.00      .00 
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+x,F8.0
+y,F8.0
+
+Table: Data List
+x,y,C
+1.00,2.00,1.00
+2.00,3.00,1.00
+4.00,5.00,.00
+2.00,2.00,2.00
+5.00,6.00,.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 3f821199ff3e2d10f22627e6ce35c93ec7b1f157..13c2a683c61cd83ac90908ca47ae9d0aaff1f8a7 100755 (executable)
@@ -147,64 +147,65 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|A       |F8.0  |
-|B       |F8.0  |
-|C       |F8.0  |
-|D       |F8.0  |
-+--------+------+
-       A        B        C        D
--------- -------- -------- --------
-    1.00    23.00    45.00     2.03 
-    2.00    22.00    34.00    23.00 
-    3.00    34.00    34.00    34.00 
-       A        B        C        D
--------- -------- -------- --------
-     .       1.00     2.00     3.00 
-     .       4.00      .       5.00 
-    6.00     7.00     8.00     9.00 
-     .00     1.00      .        .   
-     .        .        .        .   
-    2.00     3.00     4.00     5.00 
-       A        B        C        D
--------- -------- -------- --------
-    1.00     2.00     3.00     4.00 
-    1.00     2.00     3.00      .   
-    1.00     2.00      .       4.00 
-    1.00     2.00      .        .   
-    1.00      .       3.00     4.00 
-    1.00      .       3.00      .   
-    1.00      .        .       4.00 
-    1.00      .        .        .   
-     .       2.00     3.00     4.00 
-     .       2.00     3.00      .   
-     .       2.00      .       4.00 
-     .       2.00      .        .   
-     .        .       3.00     4.00 
-     .        .       3.00      .   
-     .        .        .       4.00 
-     .        .        .        .   
-               start                  end count
--------------------- -------------------- -----
-          07/22/2007           10/06/2007   321
-          07/14/1789           08/26/1789     4
-          01/01/1972           12/31/1999   682
-x y
-- -
-1 2
-3 4
-5 6
-7 8
-9 0
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+A,F8.0
+B,F8.0
+C,F8.0
+D,F8.0
+
+Table: Data List
+A,B,C,D
+1.00,23.00,45.00,2.03
+2.00,22.00,34.00,23.00
+3.00,34.00,34.00,34.00
+
+Table: Data List
+A,B,C,D
+.  ,1.00,2.00,3.00
+.  ,4.00,.  ,5.00
+6.00,7.00,8.00,9.00
+.00,1.00,.  ,.  
+.  ,.  ,.  ,.  
+2.00,3.00,4.00,5.00
+
+Table: Data List
+A,B,C,D
+1.00,2.00,3.00,4.00
+1.00,2.00,3.00,.  
+1.00,2.00,.  ,4.00
+1.00,2.00,.  ,.  
+1.00,.  ,3.00,4.00
+1.00,.  ,3.00,.  
+1.00,.  ,.  ,4.00
+1.00,.  ,.  ,.  
+.  ,2.00,3.00,4.00
+.  ,2.00,3.00,.  
+.  ,2.00,.  ,4.00
+.  ,2.00,.  ,.  
+.  ,.  ,3.00,4.00
+.  ,.  ,3.00,.  
+.  ,.  ,.  ,4.00
+.  ,.  ,.  ,.  
+
+Table: Data List
+start,end,count
+07/22/2007,10/06/2007,321
+07/14/1789,08/26/1789,4
+01/01/1972,12/31/1999,682
+
+Table: Data List
+x,y
+1,2
+3,4
+5,6
+7,8
+9,0
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 8cb6b824016542a45e54326d9f52091e05a1ce23..8d2dcdae12e21653ae49bf72d725a1731f8f7795 100755 (executable)
@@ -108,11 +108,10 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run test1"
-$SUPERVISOR $PSPP --testing-mode test1.pspp
+$SUPERVISOR $PSPP -o pspp.csv test1.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare test1 results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
 diff -u $TEMPDIR/test1.out $TEMPDIR/test1.expected
 if [ $? -ne 0 ] ; then fail ; fi
 
index 0f395422f50180cb5b736f86ab9c37358e063c5d..8c68a8b9a7250566116ce154c4016da58dab106a 100755 (executable)
@@ -84,15 +84,15 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE 
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-a       h0       h1       h2       h3       v1       v2       v3       v4       v5       v6
-- -------- -------- -------- -------- -------- -------- -------- -------- -------- --------
-0     8.00     8.50     8.00     8.00     4.00     5.00     6.00     5.00     6.00     7.00 
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.csv
+diff -b  $TEMPDIR/pspp.csv - <<EOF
+Table: Data List
+a,h0,h1,h2,h3,v1,v2,v3,v4,v5,v6
+0,8.00,8.50,8.00,8.00,4.00,5.00,6.00,5.00,6.00,7.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 491f79aa3bf4f96317b75769473c706bc8001509..4276661442bb1f2111f3f8b893bbffbe0620aa19 100755 (executable)
@@ -81,7 +81,7 @@ if [ ! -f $TEMPDIR/foobar ] ; then fail ; fi
 
 # This command must fail
 activity="run prog 1"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -eq 0 ] ; then fail ; fi
 
 
@@ -95,7 +95,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run prog 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 # foobar should now be gone
index 67dfed0a5757fa0d859d743e6a407ef26a3a10eb..71d7d27982f9d6e8ea72d776299dc8479bbf2a64 100755 (executable)
@@ -95,40 +95,31 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 EXAMINE.  Case Processing Summary
-#==#=======================================#
-#  #                 Cases                 #
-#  #-------------+-----------+-------------#
-#  #    Valid    |  Missing  |    Total    #
-#  #-----+-------+---+-------+-----+-------#
-#  #  N  |Percent| N |Percent|  N  |Percent#
-#==#=====#=======#===#=======#=====#=======#
-#V1#23.00|   100%|.00|     0%|23.00|   100%#
-#==#=====#=======#===#=======#=====#=======#
-1.2 EXAMINE.  Extreme Values
-#============#===========#=====#
-#            #Case Number|Value#
-#============#===========#=====#
-#V1 Highest 1#         21|20.00#
-#           2#         20|19.00#
-#           3#         19|18.00#
-#           4#         19|18.00#
-#           5#         18|17.00#
-#           6#         17|16.00#
-#  ----------#-----------+-----#
-#    Lowest 1#          1| 1.00#
-#           2#          2| 2.00#
-#           3#          3| 3.00#
-#           4#          3| 3.00#
-#           5#          4| 3.00#
-#           6#          5| 4.00#
-#============#===========#=====#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+V1,23.00,100%,.00,0%,23.00,100%
+
+Table: Extreme Values
+,,,Case Number,Value
+V1,Highest,1,21,20.00
+,,2,20,19.00
+,,3,19,18.00
+,,4,19,18.00
+,,5,18,17.00
+,,6,17,16.00
+,Lowest,1,1,1.00
+,,2,2,2.00
+,,3,3,3.00
+,,4,3,3.00
+,,5,4,3.00
+,,6,5,4.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 708e5342b27c1f5a9a722acc89023233a03b4fad..9cb0b9593277fd6b605d74f1b7036a50702bf946 100755 (executable)
@@ -88,114 +88,75 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|X       |F8.0  |
-+--------+------+
-2.1 EXAMINE.  Case Processing Summary
-#=#=============================#
-# #            Cases            #
-# #---------+---------+---------#
-# #  Valid  | Missing |  Total  #
-# #-+-------+-+-------+-+-------#
-# #N|Percent|N|Percent|N|Percent#
-#=#=#=======#=#=======#=#=======#
-#X#3|   100%|0|     0%|3|   100%#
-#=#=#=======#=#=======#=#=======#
-2.2 EXAMINE.  Percentiles
-#================#================================#
-#                #             Percentiles        #
-#                #---+---+----+----+----+----+----#
-#                # 5 | 10| 25 | 50 | 75 | 90 | 95 #
-#=#==============#===#===#====#====#====#====#====#
-#X|HAverage      #.40|.80|2.00|5.00|8.00|8.00|8.00#
-# |Tukey's Hinges#   |   |3.50|5.00|6.50|    |    #
-#=#==============#===#===#====#====#====#====#====#
-3.1 EXAMINE.  Case Processing Summary
-#=#=============================#
-# #            Cases            #
-# #---------+---------+---------#
-# #  Valid  | Missing |  Total  #
-# #-+-------+-+-------+-+-------#
-# #N|Percent|N|Percent|N|Percent#
-#=#=#=======#=#=======#=#=======#
-#X#3|   100%|0|     0%|3|   100%#
-#=#=#=======#=#=======#=#=======#
-3.2 EXAMINE.  Percentiles
-#==================#================================#
-#                  #             Percentiles        #
-#                  #---+---+----+----+----+----+----#
-#                  # 5 | 10| 25 | 50 | 75 | 90 | 95 #
-#=#================#===#===#====#====#====#====#====#
-#X|Weighted Average#.30|.60|1.50|3.50|5.75|7.10|7.55#
-# |Tukey's Hinges  #   |   |3.50|5.00|6.50|    |    #
-#=#================#===#===#====#====#====#====#====#
-4.1 EXAMINE.  Case Processing Summary
-#=#=============================#
-# #            Cases            #
-# #---------+---------+---------#
-# #  Valid  | Missing |  Total  #
-# #-+-------+-+-------+-+-------#
-# #N|Percent|N|Percent|N|Percent#
-#=#=#=======#=#=======#=#=======#
-#X#3|   100%|0|     0%|3|   100%#
-#=#=#=======#=#=======#=#=======#
-4.2 EXAMINE.  Percentiles
-#================#================================#
-#                #             Percentiles        #
-#                #---+---+----+----+----+----+----#
-#                # 5 | 10| 25 | 50 | 75 | 90 | 95 #
-#=#==============#===#===#====#====#====#====#====#
-#X|Rounded       #.00|.00|2.00|5.00|5.00|8.00|8.00#
-# |Tukey's Hinges#   |   |3.50|5.00|6.50|    |    #
-#=#==============#===#===#====#====#====#====#====#
-5.1 EXAMINE.  Case Processing Summary
-#=#=============================#
-# #            Cases            #
-# #---------+---------+---------#
-# #  Valid  | Missing |  Total  #
-# #-+-------+-+-------+-+-------#
-# #N|Percent|N|Percent|N|Percent#
-#=#=#=======#=#=======#=#=======#
-#X#3|   100%|0|     0%|3|   100%#
-#=#=#=======#=#=======#=#=======#
-5.2 EXAMINE.  Percentiles
-#================#==================================#
-#                #              Percentiles         #
-#                #----+----+----+----+----+----+----#
-#                #  5 | 10 | 25 | 50 | 75 | 90 | 95 #
-#=#==============#====#====#====#====#====#====#====#
-#X|Empirical     #2.00|2.00|2.00|5.00|8.00|8.00|8.00#
-# |Tukey's Hinges#    |    |3.50|5.00|6.50|    |    #
-#=#==============#====#====#====#====#====#====#====#
-6.1 EXAMINE.  Case Processing Summary
-#=#=============================#
-# #            Cases            #
-# #---------+---------+---------#
-# #  Valid  | Missing |  Total  #
-# #-+-------+-+-------+-+-------#
-# #N|Percent|N|Percent|N|Percent#
-#=#=#=======#=#=======#=#=======#
-#X#3|   100%|0|     0%|3|   100%#
-#=#=#=======#=#=======#=#=======#
-6.2 EXAMINE.  Percentiles
-#==========================#==================================#
-#                          #              Percentiles         #
-#                          #----+----+----+----+----+----+----#
-#                          #  5 | 10 | 25 | 50 | 75 | 90 | 95 #
-#=#========================#====#====#====#====#====#====#====#
-#X|Empirical with averaging#2.00|2.00|2.00|5.00|8.00|8.00|8.00#
-# |Tukey's Hinges          #    |    |3.50|5.00|6.50|    |    #
-#=#========================#====#====#====#====#====#====#====#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+X,F8.0
+
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+X,3,100%,0,0%,3,100%
+
+Table: Percentiles
+,,Percentiles,,,,,,
+,,5,10,25,50,75,90,95
+X,HAverage,.40,.80,2.00,5.00,8.00,8.00,8.00
+,Tukey's Hinges,,,3.50,5.00,6.50,,
+
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+X,3,100%,0,0%,3,100%
+
+Table: Percentiles
+,,Percentiles,,,,,,
+,,5,10,25,50,75,90,95
+X,Weighted Average,.30,.60,1.50,3.50,5.75,7.10,7.55
+,Tukey's Hinges,,,3.50,5.00,6.50,,
+
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+X,3,100%,0,0%,3,100%
+
+Table: Percentiles
+,,Percentiles,,,,,,
+,,5,10,25,50,75,90,95
+X,Rounded,.00,.00,2.00,5.00,5.00,8.00,8.00
+,Tukey's Hinges,,,3.50,5.00,6.50,,
+
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+X,3,100%,0,0%,3,100%
+
+Table: Percentiles
+,,Percentiles,,,,,,
+,,5,10,25,50,75,90,95
+X,Empirical,2.00,2.00,2.00,5.00,8.00,8.00,8.00
+,Tukey's Hinges,,,3.50,5.00,6.50,,
+
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+X,3,100%,0,0%,3,100%
+
+Table: Percentiles
+,,Percentiles,,,,,,
+,,5,10,25,50,75,90,95
+X,Empirical with averaging,2.00,2.00,2.00,5.00,8.00,8.00,8.00
+,Tukey's Hinges,,,3.50,5.00,6.50,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 11534385ce509ff3f8f5153aa6cb88c09b0cfd0e..1e5b0db0ee0b58a683e686f94dbe9bd6ea2d5839 100755 (executable)
@@ -98,166 +98,139 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 # NOTE:  In the following data: Only the extreme values have been checked
 # The descriptives have been blindly pasted.
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|QUALITY |F8.0  |
-|W       |F8.0  |
-|BRAND   |F8.0  |
-+--------+------+
-Case#  QUALITY        W    BRAND
------ -------- -------- --------
-    1     3.00     1.00     1.00 
-    2     2.00     2.00     1.00 
-    3     1.00     2.00     1.00 
-    4     1.00     1.00     1.00 
-    5     4.00     1.00     1.00 
-    6     4.00     1.00     1.00 
-    7     5.00     1.00     2.00 
-    8     2.00     1.00     2.00 
-    9     4.00     4.00     2.00 
-   10     2.00     1.00     2.00 
-   11     3.00     1.00     2.00 
-   12     7.00     1.00     3.00 
-   13     4.00     2.00     3.00 
-   14     5.00     3.00     3.00 
-   15     3.00     1.00     3.00 
-   16     6.00     1.00     3.00 
-2.1 EXAMINE.  Case Processing Summary
-#===============#=======================================#
-#               #                 Cases                 #
-#               #-------------+-----------+-------------#
-#               #    Valid    |  Missing  |    Total    #
-#               #-----+-------+---+-------+-----+-------#
-#               #  N  |Percent| N |Percent|  N  |Percent#
-#===============#=====#=======#===#=======#=====#=======#
-#Breaking Strain#24.00|   100%|.00|     0%|24.00|   100%#
-#===============#=====#=======#===#=======#=====#=======#
-2.2 EXAMINE.  Extreme Values
-#=========================#===========#=====#
-#                         #Case Number|Value#
-#=========================#===========#=====#
-#Breaking Strain Highest 1#         12| 7.00#
-#                        2#         16| 6.00#
-#                               3#          7| 5.00#
-#               ----------#-----------+-----#
-#                 Lowest 1#          3| 1.00#
-#                        2#          3| 1.00#
-#                        3#          4| 1.00#
-#=========================#===========#=====#
-2.3 EXAMINE.  Descriptives
-#============================================================#=========#==========#
-#                                                            #Statistic|Std. Error#
-#============================================================#=========#==========#
-#Breaking Strain Mean                                        #   3.54  |    .32   #
-#                95% Confidence Interval for Mean Lower Bound#   2.87  |          #
-#                                                 Upper Bound#   4.21  |          #
-#                5% Trimmed Mean                             #   3.50  |          #
-#                Median                                      #   4.00  |          #
-#                Variance                                    #   2.52  |          #
-#                Std. Deviation                              #   1.59  |          #
-#                Minimum                                     #   1.00  |          #
-#                Maximum                                     #   7.00  |          #
-#                Range                                       #   6.00  |          #
-#                Interquartile Range                         #   2.75  |          #
-#                Skewness                                    #   .06   |    .47   #
-#                Kurtosis                                    #   -.36  |    .92   #
-#============================================================#=========#==========#
-2.4 EXAMINE.  Case Processing Summary
-#============================#=====================================#
-#                            #                Cases                #
-#                            #------------+-----------+------------#
-#                            #    Valid   |  Missing  |    Total   #
-#                            #----+-------+---+-------+----+-------#
-#                Manufacturer#  N |Percent| N |Percent|  N |Percent#
-#============================#====#=======#===#=======#====#=======#
-#Breaking Strain Aspeger     #8.00|   100%|.00|     0%|8.00|   100%#
-#                Bloggs      #8.00|   100%|.00|     0%|8.00|   100%#
-#                Charlies    #8.00|   100%|.00|     0%|8.00|   100%#
-#============================#====#=======#===#=======#====#=======#
-2.5 EXAMINE.  Extreme Values
-#======================================#===========#=====#
-#                Manufacturer          #Case Number|Value#
-#======================================#===========#=====#
-#Breaking Strain Aspeger      Highest 1#          5| 4.00#
-#                                     2#          6| 4.00#
-#                                     3#          1| 3.00#
-#                            ----------#-----------+-----#
-#                              Lowest 1#          3| 1.00#
-#                                     2#          3| 1.00#
-#                                     3#          4| 1.00#
-#               -----------------------#-----------+-----#
-#                Bloggs       Highest 1#          7| 5.00#
-#                                     2#          9| 4.00#
-#                                     3#          9| 4.00#
-#                            ----------#-----------+-----#
-#                              Lowest 1#          8| 2.00#
-#                                     2#         10| 2.00#
-#                                     3#         11| 3.00#
-#               -----------------------#-----------+-----#
-#                       Charlies     Highest 1#         12| 7.00#
-#                                     2#         16| 6.00#
-#                                     3#         14| 5.00#
-#                            ----------#-----------+-----#
-#                              Lowest 1#         15| 3.00#
-#                                     2#         13| 4.00#
-#                                     3#         13| 4.00#
-#======================================#===========#=====#
-2.6 EXAMINE.  Descriptives
-#=========================================================================#=========#==========#
-#                Manufacturer                                             #Statistic|Std. Error#
-#=========================================================================#=========#==========#
-#Breaking Strain Aspeger      Mean                                        #   2.25  |    .45   #
-#                             95% Confidence Interval for Mean Lower Bound#   1.18  |          #
-#                                                              Upper Bound#   3.32  |          #
-#                             5% Trimmed Mean                             #   2.22  |          #
-#                             Median                                      #   2.00  |          #
-#                             Variance                                    #   1.64  |          #
-#                             Std. Deviation                              #   1.28  |          #
-#                             Minimum                                     #   1.00  |          #
-#                             Maximum                                     #   4.00  |          #
-#                             Range                                       #   3.00  |          #
-#                             Interquartile Range                         #   2.75  |          #
-#                             Skewness                                    #   .47   |    .75   #
-#                             Kurtosis                                    #  -1.55  |   1.48   #
-#               ----------------------------------------------------------#---------+----------#
-#                Bloggs       Mean                                        #   3.50  |    .38   #
-#                             95% Confidence Interval for Mean Lower Bound#   2.61  |          #
-#                                                              Upper Bound#   4.39  |          #
-#                             5% Trimmed Mean                             #   3.50  |          #
-#                             Median                                      #   4.00  |          #
-#                             Variance                                    #   1.14  |          #
-#                             Std. Deviation                              #   1.07  |          #
-#                             Minimum                                     #   2.00  |          #
-#                             Maximum                                     #   5.00  |          #
-#                             Range                                       #   3.00  |          #
-#                             Interquartile Range                         #   1.75  |          #
-#                             Skewness                                    #   -.47  |    .75   #
-#                             Kurtosis                                    #   -.83  |   1.48   #
-#               ----------------------------------------------------------#---------+----------#
-#                Charlies     Mean                                        #   4.88  |    .44   #
-#                             95% Confidence Interval for Mean Lower Bound#   3.83  |          #
-#                                                              Upper Bound#   5.92  |          #
-#                             5% Trimmed Mean                             #   4.86  |          #
-#                             Median                                      #   5.00  |          #
-#                             Variance                                    #   1.55  |          #
-#                             Std. Deviation                              #   1.25  |          #
-#                             Minimum                                     #   3.00  |          #
-#                             Maximum                                     #   7.00  |          #
-#                             Range                                       #   4.00  |          #
-#                             Interquartile Range                         #   1.75  |          #
-#                             Skewness                                    #   .30   |    .75   #
-#                             Kurtosis                                    #   .15   |   1.48   #
-#=========================================================================#=========#==========#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+QUALITY,F8.0
+W,F8.0
+BRAND,F8.0
+
+Table: Data List
+Case Number,QUALITY,W,BRAND
+1,3.00,1.00,1.00
+2,2.00,2.00,1.00
+3,1.00,2.00,1.00
+4,1.00,1.00,1.00
+5,4.00,1.00,1.00
+6,4.00,1.00,1.00
+7,5.00,1.00,2.00
+8,2.00,1.00,2.00
+9,4.00,4.00,2.00
+10,2.00,1.00,2.00
+11,3.00,1.00,2.00
+12,7.00,1.00,3.00
+13,4.00,2.00,3.00
+14,5.00,3.00,3.00
+15,3.00,1.00,3.00
+16,6.00,1.00,3.00
+
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+Breaking Strain,24.00,100%,.00,0%,24.00,100%
+
+Table: Extreme Values
+,,,Case Number,Value
+Breaking Strain,Highest,1,12,7.00
+,,2,16,6.00
+,,3,7,5.00
+,Lowest,1,3,1.00
+,,2,3,1.00
+,,3,4,1.00
+
+Table: Descriptives
+,,,Statistic,Std. Error
+Breaking Strain,Mean,,3.54,.32
+,95% Confidence Interval for Mean,Lower Bound,2.87,
+,,Upper Bound,4.21,
+,5% Trimmed Mean,,3.50,
+,Median,,4.00,
+,Variance,,2.52,
+,Std. Deviation,,1.59,
+,Minimum,,1.00,
+,Maximum,,7.00,
+,Range,,6.00,
+,Interquartile Range,,2.75,
+,Skewness,,.06,.47
+,Kurtosis,,-.36,.92
+
+Table: Case Processing Summary
+,,Cases,,,,,
+,,Valid,,Missing,,Total,
+,Manufacturer,N,Percent,N,Percent,N,Percent
+Breaking Strain,Aspeger,8.00,100%,.00,0%,8.00,100%
+,Bloggs,8.00,100%,.00,0%,8.00,100%
+,Charlies,8.00,100%,.00,0%,8.00,100%
+
+Table: Extreme Values
+,Manufacturer,,,Case Number,Value
+Breaking Strain,Aspeger,Highest,1,5,4.00
+,,,2,6,4.00
+,,,3,1,3.00
+,,Lowest,1,3,1.00
+,,,2,3,1.00
+,,,3,4,1.00
+,Bloggs,Highest,1,7,5.00
+,,,2,9,4.00
+,,,3,9,4.00
+,,Lowest,1,8,2.00
+,,,2,10,2.00
+,,,3,11,3.00
+,Charlies,Highest,1,12,7.00
+,,,2,16,6.00
+,,,3,14,5.00
+,,Lowest,1,15,3.00
+,,,2,13,4.00
+,,,3,13,4.00
+
+Table: Descriptives
+,Manufacturer,,,Statistic,Std. Error
+Breaking Strain,Aspeger,Mean,,2.25,.45
+,,95% Confidence Interval for Mean,Lower Bound,1.18,
+,,,Upper Bound,3.32,
+,,5% Trimmed Mean,,2.22,
+,,Median,,2.00,
+,,Variance,,1.64,
+,,Std. Deviation,,1.28,
+,,Minimum,,1.00,
+,,Maximum,,4.00,
+,,Range,,3.00,
+,,Interquartile Range,,2.75,
+,,Skewness,,.47,.75
+,,Kurtosis,,-1.55,1.48
+,Bloggs,Mean,,3.50,.38
+,,95% Confidence Interval for Mean,Lower Bound,2.61,
+,,,Upper Bound,4.39,
+,,5% Trimmed Mean,,3.50,
+,,Median,,4.00,
+,,Variance,,1.14,
+,,Std. Deviation,,1.07,
+,,Minimum,,2.00,
+,,Maximum,,5.00,
+,,Range,,3.00,
+,,Interquartile Range,,1.75,
+,,Skewness,,-.47,.75
+,,Kurtosis,,-.83,1.48
+,Charlies,Mean,,4.88,.44
+,,95% Confidence Interval for Mean,Lower Bound,3.83,
+,,,Upper Bound,5.92,
+,,5% Trimmed Mean,,4.86,
+,,Median,,5.00,
+,,Variance,,1.55,
+,,Std. Deviation,,1.25,
+,,Minimum,,3.00,
+,,Maximum,,7.00,
+,,Range,,4.00,
+,,Interquartile Range,,1.75,
+,,Skewness,,.30,.75
+,,Kurtosis,,.15,1.48
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 3dfe52f10be98f1d213041303d85bac8fae4cff6..937f05f79e625d5a063293c9380d746f6d3daade 100755 (executable)
@@ -76,26 +76,22 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output"
-diff  -b  $TEMPDIR/pspp.list - << EOF 
-1.1 DATA LIST.  Reading free-form data from myhandle.
-+--------+------+
-|Variable|Format|
-#========#======#
-|x       |F8.0  |
-+--------+------+
-
-       x
---------
-    1.00 
-    2.00 
-    5.00 
-  109.00 
-
+diff -c $TEMPDIR/pspp.csv - << EOF 
+Table: Reading free-form data from myhandle.
+Variable,Format
+x,F8.0
+
+Table: Data List
+x
+1.00
+2.00
+5.00
+109.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index e6211b4d4b8090189628ddd8c11e6fcc4de98122..a275f2957bbe2207a8bbae73e8d81cfa6f8a07bb 100755 (executable)
@@ -119,54 +119,98 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 # We need to filter out the dates/times
 activity="date filter"
-grep -v '[Ee]ntered' $TEMPDIR/pspp.list > $TEMPDIR/pspp.filtered
+sed 's/(Entered [^)]*)/(Entered <date>)/' $TEMPDIR/pspp.csv > $TEMPDIR/pspp.filtered
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.filtered
-diff -b  $TEMPDIR/pspp.filtered - <<EOF
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|X       |     1|  1-  1|F1.0  |
-|Y       |     1|  2-  2|F1.0  |
-+--------+------+-------+------+
+diff -c $TEMPDIR/pspp.filtered - <<EOF
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+X,1,1-  1,F1.0
+Y,1,2-  2,F1.0
+
 Documents in the active file:
+
 document First line of a document
+
 Second line of a document
+
 The last line should end with a period: .
+
+(Entered <date>)
+
 File label:
+
 This is a test file label
+
 Documents in the active file:
+
 document First line of a document
+
 Second line of a document
+
 The last line should end with a period: .
+
+(Entered <date>)
+
 Line one
+
 Line two
+
+(Entered <date>)
+
 File label:
+
 This is a test file label
+
 Documents in the active file:
+
 document First line of a document
+
 Second line of a document
+
 The last line should end with a period: .
+
+(Entered <date>)
+
 Line one
+
 Line two
+
+(Entered <date>)
+
 document There should be another document now.
+
+(Entered <date>)
+
 Documents in the active file:
+
 document First line of a document
+
 Second line of a document
+
 The last line should end with a period: .
+
+(Entered <date>)
+
 Line one
+
 Line two
+
+(Entered <date>)
+
 document There should be another document now.
+
+(Entered <date>)
+
 File label:
+
 This is a test file label
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
index ec76fba9f099c08157cd123ec647a01df6c8450d..13704791e19dafa5aba16ea5f2fa5f590cc595e9 100755 (executable)
@@ -86,39 +86,40 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="check results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - << EOF
- X FILTER_$
--- --------
- 1     1.00 
- 3     1.00 
- 5     1.00 
- 7     1.00 
- 9     1.00 
- X FILTER_$
--- --------
- 1     1.00 
- 2      .00 
- 3     1.00 
- 4      .00 
- 5     1.00 
- 6      .00 
- 7     1.00 
- 8      .00 
- 9     1.00 
-10      .00 
- X FILTER_$
--- --------
- 2     1.00 
- 4     1.00 
- 6     1.00 
- 8     1.00 
-10     1.00 
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+X,FILTER_$
+1,1.00
+3,1.00
+5,1.00
+7,1.00
+9,1.00
+
+Table: Data List
+X,FILTER_$
+1,1.00
+2,.00
+3,1.00
+4,.00
+5,1.00
+6,.00
+7,1.00
+8,.00
+9,1.00
+10,.00
+
+Table: Data List
+X,FILTER_$
+2,1.00
+4,1.00
+6,1.00
+8,1.00
+10,1.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index a3e5caf2c896cc84ebad3058ad7bb59d775a398c..141a75cc4a641cdd8acb038c90828d4da4cb55c1 100755 (executable)
@@ -92,48 +92,51 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/flip.stat
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/flip.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b  $TEMPDIR/pspp.list - << EOF
-N  A  B  C  D
-- -- -- -- --
-v  1  2  3  4 
-w  6  7  8  9 
-x 11 12 13 14 
-y 16 17 18 19 
-z 21 22 23 24 
-CASE_LBL        V        W        X        Y        Z
--------- -------- -------- -------- -------- --------
-A            1.00     6.00    11.00    16.00    21.00 
-B            2.00     7.00    12.00    17.00    22.00 
-C            3.00     8.00    13.00    18.00    23.00 
-D            4.00     9.00    14.00    19.00    24.00 
-CASE_LBL        A        B        C        D
--------- -------- -------- -------- --------
-V            1.00     2.00     3.00     4.00 
-W            6.00     7.00     8.00     9.00 
-X           11.00    12.00    13.00    14.00 
-Y           16.00    17.00    18.00    19.00 
-Z           21.00    22.00    23.00    24.00 
-v1 v2 v3 v4 v5 v6 v7 v8 v9 v10
--- -- -- -- -- -- -- -- -- ---
- 1  2  3  4  5  6  7  8  9  10 
- 4  5  6  7  8  9 10 11 12  13 
-CASE_LBL   VAR000   VAR001
--------- -------- --------
-v1           1.00     4.00 
-v2           2.00     5.00 
-v3           3.00     6.00 
-v4           4.00     7.00 
-v5           5.00     8.00 
-v6           6.00     9.00 
-v7           7.00    10.00 
-v8           8.00    11.00 
-v9           9.00    12.00 
-v10         10.00    13.00 
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+N,A,B,C,D
+v,1,2,3,4
+w,6,7,8,9
+x,11,12,13,14
+y,16,17,18,19
+z,21,22,23,24
+
+Table: Data List
+CASE_LBL,V,W,X,Y,Z
+A       ,1.00,6.00,11.00,16.00,21.00
+B       ,2.00,7.00,12.00,17.00,22.00
+C       ,3.00,8.00,13.00,18.00,23.00
+D       ,4.00,9.00,14.00,19.00,24.00
+
+Table: Data List
+CASE_LBL,A,B,C,D
+V       ,1.00,2.00,3.00,4.00
+W       ,6.00,7.00,8.00,9.00
+X       ,11.00,12.00,13.00,14.00
+Y       ,16.00,17.00,18.00,19.00
+Z       ,21.00,22.00,23.00,24.00
+
+Table: Data List
+v1,v2,v3,v4,v5,v6,v7,v8,v9,v10
+1,2,3,4,5,6,7,8,9,10
+4,5,6,7,8,9,10,11,12,13
+
+Table: Data List
+CASE_LBL,VAR000,VAR001
+v1      ,1.00,4.00
+v2      ,2.00,5.00
+v3      ,3.00,6.00
+v4      ,4.00,7.00
+v5      ,5.00,8.00
+v6      ,6.00,9.00
+v7      ,7.00,10.00
+v8      ,8.00,11.00
+v9      ,9.00,12.00
+v10     ,10.00,13.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index c28c8dd478c9f6dc4dd04ea8ddd5dbb2ac27a069..c6cf630c039c5819d3d60f2c5a4886ad9dd8fb7c 100755 (executable)
@@ -87,125 +87,99 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output 1"
-diff $TEMPDIR/pspp.list - <<EOF
-1.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|VAR001  |Format: F8.2                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|VAR002  |Format: A8                                 |       2|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|VAR003  |Format: F8.2                               |       3|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-
-  VAR001   VAR002   VAR003
--------- -------- --------
-     .00 fred        20.00 
-    1.00 11          21.00 
-    2.00 twelve      22.00 
-    3.00 13          23.00 
-    4.00 14          24.00 
-
-2.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|V1      |Format: F8.2                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|V2      |Format: A8                                 |       2|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|VAR001  |Format: F8.2                               |       3|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-
-      V1       V2   VAR001
--------- -------- --------
-     .00 fred        20.00 
-    1.00 11          21.00 
-    2.00 twelve      22.00 
-    3.00 13          23.00 
-    4.00 14          24.00 
-
-3.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|name    |Format: A8                                 |       1|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|id      |Format: F8.2                               |       2|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|height  |Format: F8.2                               |       3|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-
-    name       id   height
--------- -------- --------
-fred          .00    23.40 
-bert         1.00      .56 
-charlie      2.00      .   
-dick         3.00   -34.09 
-
-4.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|vone    |Format: F8.2                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|vtwo    |Format: F8.2                               |       2|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|vthree  |Format: A8                                 |       3|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|v4      |Format: F8.2                               |       4|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-
-    vone     vtwo   vthree       v4
--------- -------- -------- --------
-    1.00     3.00              5.00 
-    2.00     4.00              6.00 
-
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Variable,Description,,Position
+VAR001,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+VAR002,Format: A8,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+VAR003,Format: F8.2,,3
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
+Table: Data List
+VAR001,VAR002,VAR003
+.00,fred    ,20.00
+1.00,11      ,21.00
+2.00,twelve  ,22.00
+3.00,13      ,23.00
+4.00,14      ,24.00
+
+Variable,Description,,Position
+V1,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+V2,Format: A8,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+VAR001,Format: F8.2,,3
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
+Table: Data List
+V1,V2,VAR001
+.00,fred    ,20.00
+1.00,11      ,21.00
+2.00,twelve  ,22.00
+3.00,13      ,23.00
+4.00,14      ,24.00
+
+Variable,Description,,Position
+name,Format: A8,,1
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+id,Format: F8.2,,2
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+height,Format: F8.2,,3
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
+Table: Data List
+name,id,height
+fred    ,.00,23.40
+bert    ,1.00,.56
+charlie ,2.00,.  
+dick    ,3.00,-34.09
+
+Variable,Description,,Position
+vone,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+vtwo,Format: F8.2,,2
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+vthree,Format: A8,,3
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+v4,Format: F8.2,,4
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
+Table: Data List
+vone,vtwo,vthree,v4
+1.00,3.00,,5.00
+2.00,4.00,,6.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -223,14 +197,14 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare output 2"
-diff $TEMPDIR/pspp.list - <<EOF
-warning: Selected sheet or range of spreadsheet "$TEMPDIR/Book1.gnumeric" is empty.
-warning: Selected sheet or range of spreadsheet "$TEMPDIR/Book1.gnumeric" is empty.
+diff -c $TEMPDIR/pspp.csv - <<EOF
+"warning: Selected sheet or range of spreadsheet ""$TEMPDIR/Book1.gnumeric"" is empty."
 
+"warning: Selected sheet or range of spreadsheet ""$TEMPDIR/Book1.gnumeric"" is empty."
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 1d8afadaa815f2ece469e7d488845844540f8951..e15080ab92cbe43a4c2e711c0ebe55be11633334 100755 (executable)
@@ -202,131 +202,106 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output 1"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << 'EOF'
-1.1 DISPLAY.  
-+---------------+-------------------------------------------+--------+
-|Variable       |Description                                |Position|
-#===============#===========================================#========#
-|bool           |Format: F8.2                               |       1|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|bytea          |Format: AHEX2                              |       2|
-|               |Measure: Nominal                           |        |
-|               |Display Alignment: Left                    |        |
-|               |Display Width: 1                           |        |
-+---------------+-------------------------------------------+--------+
-|char           |Format: A8                                 |       3|
-|               |Measure: Nominal                           |        |
-|               |Display Alignment: Left                    |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|int8           |Format: F8.2                               |       4|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|int2           |Format: F8.2                               |       5|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|int4           |Format: F8.2                               |       6|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|numeric        |Format: E40.6                              |       7|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|text           |Format: A16                                |       8|
-|               |Measure: Nominal                           |        |
-|               |Display Alignment: Left                    |        |
-|               |Display Width: 16                          |        |
-+---------------+-------------------------------------------+--------+
-|oid            |Format: F8.2                               |       9|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|float4         |Format: F8.2                               |      10|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|float8         |Format: F8.2                               |      11|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|money          |Format: DOLLAR8.2                          |      12|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|pbchar         |Format: A8                                 |      13|
-|               |Measure: Nominal                           |        |
-|               |Display Alignment: Left                    |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|varchar        |Format: A8                                 |      14|
-|               |Measure: Nominal                           |        |
-|               |Display Alignment: Left                    |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|date           |Format: DATE11                             |      15|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|time           |Format: TIME11.0                           |      16|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|timestamp      |Format: DATETIME22.0                       |      17|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|timestamptz    |Format: DATETIME22.0                       |      18|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|interval       |Format: DTIME13.0                          |      19|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|interval_months|Format: F3.0                               |      20|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|timetz         |Format: TIME11.0                           |      21|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-|timetz_zone    |Format: F8.2                               |      22|
-|               |Measure: Scale                             |        |
-|               |Display Alignment: Right                   |        |
-|               |Display Width: 8                           |        |
-+---------------+-------------------------------------------+--------+
-    bool bytea     char     int8     int2     int4                                  numeric             text      oid   float4   float8    money   pbchar  varchar        date        time              timestamp            timestamptz      interval interval_months      timetz timetz_zone
--------- ----- -------- -------- -------- -------- ---------------------------------------- ---------------- -------- -------- -------- -------- -------- -------- ----------- ----------- ---------------------- ---------------------- ------------- --------------- ----------- -----------
-     .00    30 a             .00      .00      .00                           -2.560980E+002 this-long-text        .00      .00      .00     $.01 a        A        01-JAN-2000     0:00:00   08-JAN-1999 04:05:06   08-JAN-1999 12:05:06    0 00:01:00               0    10:09:00        4.00 
-     .      20               .        .        .                                .                                 .        .        .        .                               .           .                      .                      .             .               .           .         .   
-    1.00    31 b            1.00     1.00     1.00                            6.553500E+004 that-long-text        .00     1.00     1.00    $1.23 b        B        10-JAN-1963     1:05:02   10-JAN-1963 23:58:00   10-JAN-1963 22:58:00   12 01:03:04              25     1:05:02       -7.00 
+diff -c $TEMPDIR/pspp.csv - << 'EOF'
+Variable,Description,,Position
+bool,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+bytea,Format: AHEX2,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 1,,
+char,Format: A8,,3
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+int8,Format: F8.2,,4
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+int2,Format: F8.2,,5
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+int4,Format: F8.2,,6
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+numeric,Format: E40.6,,7
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+text,Format: A16,,8
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 16,,
+oid,Format: F8.2,,9
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+float4,Format: F8.2,,10
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+float8,Format: F8.2,,11
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+money,Format: DOLLAR8.2,,12
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+pbchar,Format: A8,,13
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+varchar,Format: A8,,14
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+date,Format: DATE11,,15
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+time,Format: TIME11.0,,16
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+timestamp,Format: DATETIME22.0,,17
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+timestamptz,Format: DATETIME22.0,,18
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+interval,Format: DTIME13.0,,19
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+interval_months,Format: F3.0,,20
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+timetz,Format: TIME11.0,,21
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+timetz_zone,Format: F8.2,,22
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
+Table: Data List
+bool,bytea,char,int8,int2,int4,numeric,text,oid,float4,float8,money,pbchar,varchar,date,time,timestamp,timestamptz,interval,interval_months,timetz,timetz_zone
+.00,30,a       ,.00,.00,.00,-2.560980E+002,this-long-text  ,.00,.00,.00,$.01,a       ,A       ,01-JAN-2000,0:00:00,08-JAN-1999 04:05:06,08-JAN-1999 12:05:06,0 00:01:00,0,10:09:00,4.00
+.  ,20,,.  ,.  ,.  ,.          ,,.  ,.  ,.  ,.  ,,,.,.,.,.,.,.,.,.  
+1.00,31,b       ,1.00,1.00,1.00,6.553500E+004,that-long-text  ,.00,1.00,1.00,$1.23,b       ,B       ,10-JAN-1963,1:05:02,10-JAN-1963 23:58:00,10-JAN-1963 22:58:00,12 01:03:04,25,1:05:02,-7.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -345,31 +320,24 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output 2"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << 'EOF'
-1.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|a       |Format: F8.2                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|b       |Format: DATE11                             |       2|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|c       |Format: E40.2                              |       3|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
+diff -c $TEMPDIR/pspp.csv - << 'EOF'
+Variable,Description,,Position
+a,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+b,Format: DATE11,,2
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+c,Format: E40.2,,3
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -402,28 +370,28 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 3"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output 3"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << 'EOF'
-       x     diff
--------- --------
-    1.00      .   
-    2.00     1.00 
-    3.00     1.00 
-    4.00     1.00 
-    5.00     1.00 
-    6.00     1.00 
-       x     diff
--------- --------
- 1000.00     1.00 
-  999.00     1.00 
-  998.00     1.00 
-  997.00     1.00 
-  996.00     1.00 
-  995.00     1.00 
+diff -c $TEMPDIR/pspp.csv - << 'EOF'
+Table: Data List
+x,diff
+1.00,.  
+2.00,1.00
+3.00,1.00
+4.00,1.00
+5.00,1.00
+6.00,1.00
+
+Table: Data List
+x,diff
+1000.00,1.00
+999.00,1.00
+998.00,1.00
+997.00,1.00
+996.00,1.00
+995.00,1.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -463,7 +431,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 4"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
index c601b50672bce576545f530392d815b59937af7e..3cc68499a32d66f55e9836fd18f3d4ba3819c115 100755 (executable)
@@ -132,36 +132,38 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run test"
-$SUPERVISOR $PSPP --testing-mode test.pspp
+$SUPERVISOR $PSPP -o pspp.csv test.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare test results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<'EOF'
-            username                                 password        uid        gid                                    gecos                                     home                                    shell
--------------------- ---------------------------------------- ---------- ---------- ---------------------------------------- ---------------------------------------- ----------------------------------------
-root                 $1$nyeSP5gD$pDq/                                  0          0 ,,,                                      /root                                    /bin/bash
-blp                  $1$BrP/pFg4$g7OG                               1000       1000 Ben Pfaff,,,                             /home/blp                                /bin/bash
-john                 $1$JBuq/Fioq$g4A                               1001       1001 John Darrington,,,                       /home/john                               /bin/bash
-jhs                  $1$D3li4hPL$88X1                               1002       1002 Jason Stover,,,                          /home/jhs                                /bin/csh
-   model year mileage price type age
--------- ---- ------- ----- ---- ---
-Civic    2002   29883 15900 Si     2
-Civic    2003   13415 15900 EX     1
-Civic    1992  107000  3800 n/a   12
-Accord   2002   26613 17900 EX     1
-   model     year  mileage    price     type      age
--------- -------- -------- -------- -------- --------
-Civic        2002    29883    15900 Si              2
-Civic        2003    13415    15900 EX              1
-Civic        1992   107000     3800 n/a            12
-Accord       2002    26613    17900 EX              1
-      name  age color   received  price height       type
----------- ---- ----- ---------- ------ ------ ----------
-Rover       4.5 Brown 12.02.2004  80.00  1'4"  Dog
-Charlie      .  Gold  05.04.2007  12.30  3"    Fish
-Molly       2.0 Black 12.12.2006  25.00  5"    Cat
-Gilly        .  White 10.04.2007  10.00  3"    Guinea Pig
+diff -c $TEMPDIR/pspp.csv - <<'EOF'
+Table: Data List
+username,password,uid,gid,gecos,home,shell
+root                ,$1$nyeSP5gD$pDq/                        ,0,0,",,,                                     ",/root                                   ,/bin/bash                               
+blp                 ,$1$BrP/pFg4$g7OG                        ,1000,1000,"Ben Pfaff,,,                            ",/home/blp                               ,/bin/bash                               
+john                ,$1$JBuq/Fioq$g4A                        ,1001,1001,"John Darrington,,,                      ",/home/john                              ,/bin/bash                               
+jhs                 ,$1$D3li4hPL$88X1                        ,1002,1002,"Jason Stover,,,                         ",/home/jhs                               ,/bin/csh                                
+
+Table: Data List
+model,year,mileage,price,type,age
+Civic   ,2002,29883,15900,Si  ,2
+Civic   ,2003,13415,15900,EX  ,1
+Civic   ,1992,107000,3800,n/a ,12
+Accord  ,2002,26613,17900,EX  ,1
+
+Table: Data List
+model,year,mileage,price,type,age
+Civic   ,2002,29883,15900,Si      ,2
+Civic   ,2003,13415,15900,EX      ,1
+Civic   ,1992,107000,3800,n/a     ,12
+Accord  ,2002,26613,17900,EX      ,1
+
+Table: Data List
+name,age,color,received,price,height,type
+Rover     ,4.5,Brown,12.02.2004,80.00,"1'4"" ",Dog       
+Charlie   ,. ,Gold ,05.04.2007,12.30,"3""   ",Fish      
+Molly     ,2.0,Black,12.12.2006,25.00,"5""   ",Cat       
+Gilly     ,. ,White,10.04.2007,10.00,"3""   ",Guinea Pig
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 1c7b7cefca8e99ce9b4b3682ca37292769ca653e..54d6cf869301df4f9f718e73659f2772f4a81992 100755 (executable)
@@ -86,266 +86,269 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-       x
---------
-       1
-       2
-       3
-       4
-       5
-       6
-       7
-       8
-       9
-      10
-       x
---------
-       1
-       2
-       x
---------
-       1
-       2
-       3
-       4
-       5
-       6
-       7
-       8
-       9
-      10
-      11
-      12
-      13
-      14
-      15
-      16
-      17
-      18
-      19
-      20
-      21
-      22
-      23
-      24
-      25
-      26
-      27
-      28
-      29
-      30
-      31
-      32
-      33
-      34
-      35
-      36
-       x
---------
-       1
-       2
-       3
-       4
-       5
-       6
-       7
-       8
-       9
-      10
-      11
-      12
-      13
-      14
-      15
-      16
-      17
-      18
-      19
-      20
-      21
-      22
-      23
-      24
-      25
-      26
-      27
-      28
-      29
-      30
-      31
-      32
-      33
-      34
-      35
-      36
-      37
-      38
-      39
-      40
-      41
-      42
-      43
-      44
-      45
-      46
-      47
-      48
-      49
-      50
-      51
-      52
-      53
-      54
-      55
-      56
-      57
-      58
-      59
-      60
-      61
-      62
-      63
-      64
-      65
-      66
-      67
-      68
-      69
-      70
-      71
-      72
-      73
-      74
-      75
-      76
-      77
-      78
-      79
-      80
-      81
-      82
-      83
-      84
-      85
-      86
-      87
-      88
-      89
-      90
-      91
-      92
-      93
-      94
-      95
-      96
-       x
---------
-       1
-       2
-       3
-       4
-       5
-       6
-       7
-       8
-       9
-      10
-      11
-      12
-      13
-      14
-      15
-      16
-      17
-      18
-      19
-      20
-      21
-      22
-      23
-      24
-      25
-      26
-      27
-      28
-      29
-      30
-      31
-      32
-      33
-      34
-      35
-      36
-      37
-      38
-      39
-      40
-      41
-      42
-      43
-      44
-      45
-      46
-      47
-      48
-      49
-      50
-      51
-      52
-      53
-      54
-      55
-      56
-      57
-      58
-      59
-      60
-      61
-      62
-      63
-      64
-      65
-      66
-      67
-      68
-      69
-      70
-      71
-      72
-      73
-      74
-      75
-      76
-      77
-      78
-      79
-      80
-      81
-      82
-      83
-      84
-      85
-      86
-      87
-      88
-      89
-      90
-      91
-      92
-      93
-      94
-      95
-      96
-      97
-      98
-      99
-     100
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+x
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+
+Table: Data List
+x
+1
+2
+
+Table: Data List
+x
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+
+Table: Data List
+x
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+
+Table: Data List
+x
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 2bd0346b52f826eafe95b7e0cdca3fbcf03bb465..f0560495bb91c719606a3d517c60b7adc7579b9c 100755 (executable)
@@ -152,56 +152,59 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-       A        B        C        D
--------- -------- -------- --------
-    1.00    23.00    45.00     2.03
-    2.00    22.00    34.00    23.00
-    3.00    34.00    34.00    34.00
-       A        B        C        D
--------- -------- -------- --------
-     .       1.00     2.00     3.00
-     .       4.00      .       5.00
-    6.00     7.00      .       8.00
-    9.00      .00     1.00      .
-     .        .        .        .
-     .        .        .       2.00
-     .       3.00     4.00     5.00
-       A        B        C        D
--------- -------- -------- --------
-    1.00     2.00     3.00     4.00
-    1.00     2.00     3.00      .
-    1.00     2.00      .       4.00
-    1.00     2.00      .        .
-    1.00      .       3.00     4.00
-    1.00      .       3.00      .
-    1.00      .        .       4.00
-    1.00      .        .        .
-     .       2.00     3.00     4.00
-     .       2.00     3.00      .
-     .       2.00      .       4.00
-     .       2.00      .        .
-     .        .       3.00     4.00
-     .        .       3.00      .
-     .        .        .       4.00
-     .        .        .        .
-               start                  end count
--------------------- -------------------- -----
-          07/22/2007           10/06/2007   321
-          07/14/1789           08/26/1789     4
-          01/01/1972           12/31/1999   682
-x y
-- -
-1 2
-3 4
-5 6
-7 8
-9 0
+diff -b  $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+A,B,C,D
+1.00,23.00,45.00,2.03
+2.00,22.00,34.00,23.00
+3.00,34.00,34.00,34.00
+
+Table: Data List
+A,B,C,D
+.  ,1.00,2.00,3.00
+.  ,4.00,.  ,5.00
+6.00,7.00,.  ,8.00
+9.00,.00,1.00,.
+.  ,.  ,.  ,.
+.  ,.  ,.  ,2.00
+.  ,3.00,4.00,5.00
+
+Table: Data List
+A,B,C,D
+1.00,2.00,3.00,4.00
+1.00,2.00,3.00,.
+1.00,2.00,.  ,4.00
+1.00,2.00,.  ,.
+1.00,.  ,3.00,4.00
+1.00,.  ,3.00,.
+1.00,.  ,.  ,4.00
+1.00,.  ,.  ,.
+.  ,2.00,3.00,4.00
+.  ,2.00,3.00,.
+.  ,2.00,.  ,4.00
+.  ,2.00,.  ,.
+.  ,.  ,3.00,4.00
+.  ,.  ,3.00,.
+.  ,.  ,.  ,4.00
+.  ,.  ,.  ,.
+
+Table: Data List
+start,end,count
+07/22/2007,10/06/2007,321
+07/14/1789,08/26/1789,4
+01/01/1972,12/31/1999,682
+
+Table: Data List
+x,y
+1,2
+3,4
+5,6
+7,8
+9,0
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 0cb178bf5776ade7e26ac28b5218f2eefd18e70f..b519d4695e03ebff38d17fdb7975a8643562bea0 100755 (executable)
@@ -74,17 +74,16 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-       X        Y
--------- --------
-    1.00     2.00 
-    3.00     .
-    5.00     6.00 
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+X,Y
+1.00,2.00
+3.00,.  
+5.00,6.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index a6e8c7784a2c1666793fe934fcd02eb58c808bc6..0740128667d633ab11316a3ebe47d56d3d4412ef 100755 (executable)
@@ -87,17 +87,16 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run test1"
-$SUPERVISOR $PSPP --testing-mode test1.pspp
+$SUPERVISOR $PSPP -o pspp.csv test1.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare test1 results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-         X          Y
----------- ----------
-         1          4
-         2          5
-         3          6
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+X,Y
+1,4
+2,5
+3,6
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -122,19 +121,19 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run test2"
-$SUPERVISOR $PSPP --testing-mode test2.pspp
+$SUPERVISOR $PSPP -o pspp.csv test2.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare test2 results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-         X          Y
----------- ----------
-         1          4
-         2          5
-         3          6
-         .          7
-         .          8
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.csv
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+X,Y
+1,4
+2,5
+3,6
+.,7
+.,8
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -162,22 +161,22 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run test3"
-$SUPERVISOR $PSPP --testing-mode test3.pspp
+$SUPERVISOR $PSPP -o pspp.csv test3.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare test3 results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-         X
-----------
-         1
-         2
-         3
-         4
-         5
-         6
-         7
-         8
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.csv
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+X
+1
+2
+3
+4
+5
+6
+7
+8
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -208,22 +207,22 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run test4"
-$SUPERVISOR $PSPP --testing-mode test4.pspp
+$SUPERVISOR $PSPP -o pspp.csv test4.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare test4 results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-         X
-----------
-         1
-         2
-         3
-         4
-         5
-         6
-         7
-         8
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.csv
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+X
+1
+2
+3
+4
+5
+6
+7
+8
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -245,64 +244,64 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run test5"
-$SUPERVISOR $PSPP --testing-mode test5.pspp
+$SUPERVISOR $PSPP -o pspp.csv test5.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare test5 results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-Case#        X
------ --------
-    1     3.00
-    2     6.00
-    3     9.00
-    4    12.00
-    5    15.00
-    6    18.00
-    7    21.00
-    8    24.00
-    9    27.00
-   10    30.00
-   11    33.00
-   12    36.00
-   13    39.00
-   14    42.00
-   15    45.00
-   16    48.00
-   17    51.00
-   18    54.00
-   19    57.00
-   20    60.00
-   21    63.00
-   22    66.00
-   23    69.00
-   24    72.00
-   25    75.00
-   26    78.00
-   27    81.00
-   28    84.00
-   29    87.00
-   30    90.00
-   31    93.00
-   32    96.00
-   33    99.00
-   34   102.00
-   35   105.00
-   36   108.00
-   37   111.00
-   38   114.00
-   39   117.00
-   40   120.00
-   41   123.00
-   42   126.00
-   43   129.00
-   44   132.00
-   45   135.00
-   46   138.00
-   47   141.00
-   48   144.00
-   49   147.00
-   50   150.00
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.csv
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+Case Number,X
+1,3.00
+2,6.00
+3,9.00
+4,12.00
+5,15.00
+6,18.00
+7,21.00
+8,24.00
+9,27.00
+10,30.00
+11,33.00
+12,36.00
+13,39.00
+14,42.00
+15,45.00
+16,48.00
+17,51.00
+18,54.00
+19,57.00
+20,60.00
+21,63.00
+22,66.00
+23,69.00
+24,72.00
+25,75.00
+26,78.00
+27,81.00
+28,84.00
+29,87.00
+30,90.00
+31,93.00
+32,96.00
+33,99.00
+34,102.00
+35,105.00
+36,108.00
+37,111.00
+38,114.00
+39,117.00
+40,120.00
+41,123.00
+42,126.00
+43,129.00
+44,132.00
+45,135.00
+46,138.00
+47,141.00
+48,144.00
+49,147.00
+50,150.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index f80dc5fc4a0df3f1c4250ef32e0bf3bb45e7a524..0d8f1697aa36ee1fb6950dfcf4b94728f7fac10e 100755 (executable)
@@ -92,7 +92,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 #This command should fail
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null
 if [ $? -eq 0 ] ; then fail ; fi
 
 
@@ -110,7 +110,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 
@@ -158,7 +158,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 # This command should fail
 activity="run program 3"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null
 if [ $? -eq 0 ] ; then fail ; fi
 
 activity="create wrapper 6"
@@ -174,7 +174,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 4"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 
@@ -210,15 +210,16 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 5"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null
 if [ $? -ne 1 ] ; then no_result ; fi
 
 activity="examine output 1"
-diff $TEMPDIR/pspp.list - <<EOF
+diff -c $TEMPDIR/pspp.csv - <<EOF
 $TEMPDIR/foo.sps:10: error: DISPLAY: AKSDJ is not a variable name.
+
 warning: Error encountered while ERROR=STOP is effective.
-$TEMPDIR/foo.sps:10: error: Stopping syntax file processing here to avoid a cascade of dependent command failures.
 
+$TEMPDIR/foo.sps:10: error: Stopping syntax file processing here to avoid a cascade of dependent command failures.
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -236,19 +237,18 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 6"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null
 if [ $? -ne 1 ] ; then no_result ; fi
 
 activity="examine output 2"
-diff $TEMPDIR/pspp.list - <<EOF
+diff $TEMPDIR/pspp.csv - <<EOF
 $TEMPDIR/foo.sps:10: error: DISPLAY: AKSDJ is not a variable name.
 
-       x
---------
-    1.00 
-    2.00 
-    3.00 
-
+Table: Data List
+x
+1.00
+2.00
+3.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -268,7 +268,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 #This command should fail
 activity="run program 7"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null
 if [ $? -eq 0 ] ; then no_result ; fi
 
 pass;
index bc14e1a93dfc2a6b1b5ef1c7b733b5e31b82956b..e8c39dd2c9d0caa58868950bd4520cb10856a766 100755 (executable)
@@ -77,25 +77,22 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/lag.stat
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/lag.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare result"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|W       |     1|  1-  1|F1.0  |
-+--------+------+-------+------+
-W        X        Y        Z
-- -------- -------- --------
-1      .        .        .   
-2     1.00      .        .   
-3     2.00     1.00     1.00 
-4     3.00     2.00     2.00 
-5     4.00     3.00     3.00 
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+W,1,1-  1,F1.0
+
+Table: Data List
+W,X,Y,Z
+1,.  ,.  ,.  
+2,1.00,.  ,.  
+3,2.00,1.00,1.00
+4,3.00,2.00,2.00
+5,4.00,3.00,3.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index ca03b5cad88ae341abd2eb833ad8bdc5ce4b2eea..14612b9075e903e4c032023d7d7ce85bfb55ea85 100755 (executable)
@@ -83,21 +83,20 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-       a        b        c
--------- -------- --------
-    1.00     2.00     3.00
-    4.00     5.00     6.00
-    7.00     8.00     9.00
-   10.00    11.00    12.00
-   13.00    14.00    15.00
-   16.00    17.00    18.00
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+a,b,c
+1.00,2.00,3.00
+4.00,5.00,6.00
+7.00,8.00,9.00
+10.00,11.00,12.00
+13.00,14.00,15.00
+16.00,17.00,18.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 504314a9601c1d977d405a48df05cddb71f281e0..7079fd4d290cf753fbfe3c787877d4d5a4ca9f57 100755 (executable)
@@ -66,7 +66,7 @@ data list file='$top_srcdir/tests/weighting.data'/AVAR 1-5 BVAR 6-10.
 weight by BVAR.
 list.
 *list /cases=from 5 to 20 by 2 /format numbered.
-list /format numbered weight.
+list /format numbered.
 
 *** Multiple lines.
 data list file='$top_srcdir/tests/list.data' notable /X000 to X126 1-127.
@@ -78,182 +78,182 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from "$top_srcdir/tests/weighting.data".
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|AVAR    |     1|  1-  5|F5.0  |
-|BVAR    |     1|  6- 10|F5.0  |
-+--------+------+-------+------+
- AVAR  BVAR
------ -----
-   18     1 
-   19     7 
-   20    26 
-   21    76 
-   22    57 
-   23    58 
-   24    38 
-   25    38 
-   26    30 
-   27    21 
-   28    23 
-   29    24 
-   30    23 
-   31    14 
-   32    21 
-   33    21 
-   34    14 
-   35    14 
-   36    17 
-   37    11 
-   38    16 
-   39    14 
-   40    15 
-   41    14 
-   42    14 
-   43     8 
-   44    15 
-   45    10 
-   46    12 
-   47    13 
-   48    13 
-   49     5 
-   50     5 
-   51     3 
-   52     7 
-   53     6 
-   54     2 
-   55     2 
-   56     2 
-   57     3 
-   58     1 
-   59     3 
-   61     1 
-   62     3 
-   63     1 
-   64     1 
-   65     2 
-   70     1 
-   78     1 
-   79     1 
-   80     1 
-   94     1 
-Case#  AVAR  BVAR
------ ----- -----
-    1    18     1 
-    2    19     7 
-    3    20    26 
-    4    21    76 
-    5    22    57 
-    6    23    58 
-    7    24    38 
-    8    25    38 
-    9    26    30 
-   10    27    21 
-   11    28    23 
-   12    29    24 
-   13    30    23 
-   14    31    14 
-   15    32    21 
-   16    33    21 
-   17    34    14 
-   18    35    14 
-   19    36    17 
-   20    37    11 
-   21    38    16 
-   22    39    14 
-   23    40    15 
-   24    41    14 
-   25    42    14 
-   26    43     8 
-   27    44    15 
-   28    45    10 
-   29    46    12 
-   30    47    13 
-   31    48    13 
-   32    49     5 
-   33    50     5 
-   34    51     3 
-   35    52     7 
-   36    53     6 
-   37    54     2 
-   38    55     2 
-   39    56     2 
-   40    57     3 
-   41    58     1 
-   42    59     3 
-   43    61     1 
-   44    62     3 
-   45    63     1 
-   46    64     1 
-   47    65     2 
-   48    70     1 
-   49    78     1 
-   50    79     1 
-   51    80     1 
-   52    94     1 
-X000 X001 X002 X003 X004 X005 X006 X007 X008 X009 X010 X011 X012 X013 X014 X015 X016 X017 X018 X019 X020 X021 X022 X023 X024 X025 X026 X027 X028 X029 X030
----- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
-   7    6    7    5    3    2    4    6    6    3    4    8    5    1    3    7    8    9    0    7    3    4    8    3    1    0    6    4    0    9    1 
-   8    8    8    6    9    3    0    8    9    4    2    4    1    7    7    5    4    2    3    7    8    3    3    4    1    8    6    7    6    0    3 
-   4    9    2    6    1    1    5    0    7    9    0    9    1    8    7    1    5    2    7    2    6    4    2    7    8    5    2    2    4    2    4 
-   8    1    9    8    4    8    8    9    2    0    2    3    1    9    5    8    7    5    8    7    9    3    3    2    0    0    1    4    9    1    7 
-   4    5    2    7    7    7    8    9    8    7    0    9    5    6    3    7    2    9    8    4    5    5    4    1    5    1    6    6    5    0    6 
-   2    3    9    9    6    1    9    6    7    0    7    7    7    3    2    7    6    0    6    6    3    5    2    5    1    1    5    0    7    3    5 
-   1    6    6    7    7    9    9    6    9    1    2    6    6    4    7    6    9    9    4    4    0    4    7    4    3    9    8    9    2    3    7 
-   1    6    2    3    9    1    4    6    8    4    1    9    6    8    9    2    3    1    6    8    4    7    1    1    7    0    1    1    5    4    3 
-   3    6    8    1    3    9    3    2    3    3    7    6    0    1    2    9    4    8    9    1    1    3    1    2    1    8    2    9    5    9    9 
-   6    4    1    8    7    3    1    1    4    5    4    3    1    0    8    2    9    9    4    8    5    6    8    1    6    5    0    5    0    3    5 
-   2    2    8    4    5    3    4    0    8    3    7    4    9    5    0    7    7    1    6    6    5    1    0    8    6    4    2    9    0    7    1 
-   6    6    1    7    6    3    7    4    5    2    0    4    0    7    4    9    1    8    1    3    4    9    9    1    1    7    8    8    9    7    4 
-   9    8    6    5    7    1    3    5    8    2    6    8    6    6    1    2    0    0    7    2    2    2    0    1    0    7    8    2    6    8    2 
-   1    1    6    3    2    3    4    5    3    7    7    6    2    2    0    0    8    0    7    7    9    4    9    6    0    2    5    2    4    4    7 
-   9    9    8    1    6    6    3    6    3    7    5    6    3    8    3    3    3    0    0    0    3    5    4    2    6    1    3    6    7    0    2 
-   6    8    2    1    5    6    7    7    4    6    0    5    9    1    0    3    5    6    5    0    0    5    7    3    8    9    6    0    2    4    8 
-   0    9    5    2    7    7    4    9    5    2    6    7    5    2    6    1    5    4    5    9    5    5    2    8    0    8    0    5    3    4    0 
-   1    6    4    1    7    9    0    1    9    3    2    1    1    8    6    1    5    0    9    1    0    6    8    3    9    2    1    7    1    1    9 
-   3    7    6    3    1    8    2    8    7    1    5    8    0    1    7    4    7    8    9    3    2    8    8    3    7    1    9    4    9    6    8 
-   2    0    4    6    8    2    0    7    5    3    0    6    2    2    2    4    0    4    5    5    3    5    8    9    0    9    3    2    7    2    1 
-   7    9    7    0    6    2    0    0    9    1    9    4    0    3    8    5    9    2    8    7    6    2    6    3    2    7    6    4    6    1    8 
-   4    8    4    1    1    7    6    0    1    7    0    2    5    1    0    5    7    7    4    5    0    6    5    0    0    8    9    6    2    5    2 
-   6    9    4    9    9    7    3    7    9    7    9    9    0    9    5    6    2    9    1    0    7    2    1    5    8    1    2    3    8    8    7 
-   1    3    9    6    2    8    5    9    9    6    5    3    5    4    8    9    4    4    0    8    1    6    1    2    4    7    0    0    6    8    2 
-   0    7    0    0    4    8    9    5    2    4    3    5    8    2    0    8    3    5    8    6    9    7    3    4    9    4    5    0    0    3    6 
-X000 X001 X002 X003 X004 X005 X006 X007 X008 X009 X010 X011 X012 X013 X014 X015 X016 X017 X018 X019 X020 X021 X022 X023 X024 X025 X026 X027 X028 X029 X030 X031 X032 X033 X034 X035 X036 X037 X038 X039 X040 X041 X042 X043 X044 X045 X046 X047 X048 X049 X050 X051 X052 X053 X054 X055 X056 X057 X058 X059 X060 X061 X062 X063 X064 X065 X066 X067 X068 X069 X070 X071 X072 X073 X074 X075 X076 X077 X078 X079 X080 X081 X082 X083 X084 X085 X086 X087 X088 X089 X090 X091 X092 X093 X094 X095 X096 X097 X098 X099 X100 X101 X102 X103 X104 X105 X106 X107 X108 X109 X110 X111 X112 X113 X114 X115 X116 X117 X118 X119 X120 X121 X122 X123 X124 X125 X126
----- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
-   7    6    7    5    3    2    4    6    6    3    4    8    5    1    3    7    8    9    0    7    3    4    8    3    1    0    6    4    0    9    1    7    5    8    5    9    2    9    5    8    4    2    8    1    5    2    9    5    1    1    3    7    5    3    2    6    5    9    4    1    8    7    5    2    3    3    8    1    5    7    6    7    5    3    2    4    6    6    3    4    8    5    1    3    7    8    9    0    7    3    4    8    3    1    0    6    4    0    9    1    7    5    8    5    9    2    9    5    8    4    2    8    1    5    2    9    5    1    1    3    7    5    3    2    6    5    8 
-   8    8    8    6    9    3    0    8    9    4    2    4    1    7    7    5    4    2    3    7    8    3    3    4    1    8    6    7    6    0    3    6    8    1    4    7    5    5    8    6    9    0    0    2    7    9    7    3    1    0    2    2    6    6    8    7    4    1    6    8    4    5    5    5    0    6    7    1    4    8    8    8    6    9    3    0    8    9    4    2    4    1    7    7    5    4    2    3    7    8    3    3    4    1    8    6    7    6    0    3    6    8    1    4    7    5    5    8    6    9    0    0    2    7    9    7    3    1    0    2    2    6    6    8    7    4    6 
-   4    9    2    6    1    1    5    0    7    9    0    9    1    8    7    1    5    2    7    2    6    4    2    7    8    5    2    2    4    2    4    8    3    8    5    6    2    0    6    9    9    8    0    2    7    8    3    4    2    1    8    8    7    2    5    5    8    6    2    6    0    0    4    1    5    2    6    0    2    4    9    2    6    1    1    5    0    7    9    0    9    1    8    7    1    5    2    7    2    6    4    2    7    8    5    2    2    4    2    4    8    3    8    5    6    2    0    6    9    9    8    0    2    7    8    3    4    2    1    8    8    7    2    5    5    8    9 
-   8    1    9    8    4    8    8    9    2    0    2    3    1    9    5    8    7    5    8    7    9    3    3    2    0    0    1    4    9    1    7    7    3    6    8    9    6    8    8    0    1    3    3    2    2    1    0    1    6    0    8    8    4    4    0    6    4    0    2    3    6    2    6    5    7    2    7    0    0    8    1    9    8    4    8    8    9    2    0    2    3    1    9    5    8    7    5    8    7    9    3    3    2    0    0    1    4    9    1    7    7    3    6    8    9    6    8    8    0    1    3    3    2    2    1    0    1    6    0    8    8    4    4    0    6    4    1 
-   4    5    2    7    7    7    8    9    8    7    0    9    5    6    3    7    2    9    8    4    5    5    4    1    5    1    6    6    5    0    6    9    5    0    6    4    7    7    4    6    6    4    5    1    2    0    8    4    9    8    8    7    6    4    0    1    6    0    6    5    9    5    0    5    3    9    1    4    9    4    5    2    7    7    7    8    9    8    7    0    9    5    6    3    7    2    9    8    4    5    5    4    1    5    1    6    6    5    0    6    9    5    0    6    4    7    7    4    6    6    4    5    1    2    0    8    4    9    8    8    7    6    4    0    1    6    6 
-   2    3    9    9    6    1    9    6    7    0    7    7    7    3    2    7    6    0    6    6    3    5    2    5    1    1    5    0    7    3    5    1    8    6    0    5    9    1    1    8    1    8    6    9    1    0    8    8    0    4    6    5    1    9    0    3    2    8    1    9    6    2    4    6    8    9    6    7    5    2    3    9    9    6    1    9    6    7    0    7    7    7    3    2    7    6    0    6    6    3    5    2    5    1    1    5    0    7    3    5    1    8    6    0    5    9    1    1    8    1    8    6    9    1    0    8    8    0    4    6    5    1    9    0    3    2    5 
-   1    6    6    7    7    9    9    6    9    1    2    6    6    4    7    6    9    9    4    4    0    4    7    4    3    9    8    9    2    3    7    3    1    5    3    9    4    2    7    6    4    1    2    0    7    9    7    6    0    3    1    0    7    0    6    3    9    5    1    0    3    2    9    9    4    4    1    5    7    1    6    6    7    7    9    9    6    9    1    2    6    6    4    7    6    9    9    4    4    0    4    7    4    3    9    8    9    2    3    7    3    1    5    3    9    4    2    7    6    4    1    2    0    7    9    7    6    0    3    1    0    7    0    6    3    9    4 
-   1    6    2    3    9    1    4    6    8    4    1    9    6    8    9    2    3    1    6    8    4    7    1    1    7    0    1    1    5    4    3    6    2    7    1    1    9    5    9    7    9    0    8    5    9    9    7    4    0    5    2    5    2    4    6    1    6    4    1    9    1    5    0    8    0    1    3    2    0    1    6    2    3    9    1    4    6    8    4    1    9    6    8    9    2    3    1    6    8    4    7    1    1    7    0    1    1    5    4    3    6    2    7    1    1    9    5    9    7    9    0    8    5    9    9    7    4    0    5    2    5    2    4    6    1    6    8 
-   3    6    8    1    3    9    3    2    3    3    7    6    0    1    2    9    4    8    9    1    1    3    1    2    1    8    2    9    5    9    9    8    5    7    2    8    8    5    0    1    0    9    9    1    2    3    2    8    3    1    9    6    6    2    8    7    1    4    1    4    8    9    6    5    0    8    4    5    7    3    6    8    1    3    9    3    2    3    3    7    6    0    1    2    9    4    8    9    1    1    3    1    2    1    8    2    9    5    9    9    8    5    7    2    8    8    5    0    1    0    9    9    1    2    3    2    8    3    1    9    6    6    2    8    7    1    0 
-   6    4    1    8    7    3    1    1    4    5    4    3    1    0    8    2    9    9    4    8    5    6    8    1    6    5    0    5    0    3    5    9    9    7    9    8    2    0    9    6    7    3    2    1    5    0    3    5    9    7    5    4    5    4    7    2    9    9    6    1    8    4    8    7    8    8    5    3    0    6    4    1    8    7    3    1    1    4    5    4    3    1    0    8    2    9    9    4    8    5    6    8    1    6    5    0    5    0    3    5    9    9    7    9    8    2    0    9    6    7    3    2    1    5    0    3    5    9    7    5    4    5    4    7    2    9    7 
-   2    2    8    4    5    3    4    0    8    3    7    4    9    5    0    7    7    1    6    6    5    1    0    8    6    4    2    9    0    7    1    2    1    9    7    6    5    1    6    3    7    5    9    8    2    9    7    9    3    4    7    8    5    8    7    1    4    7    2    3    4    3    4    1    2    3    4    4    2    2    2    8    4    5    3    4    0    8    3    7    4    9    5    0    7    7    1    6    6    5    1    0    8    6    4    2    9    0    7    1    2    1    9    7    6    5    1    6    3    7    5    9    8    2    9    7    9    3    4    7    8    5    8    7    1    4    9 
-   6    6    1    7    6    3    7    4    5    2    0    4    0    7    4    9    1    8    1    3    4    9    9    1    1    7    8    8    9    7    4    7    5    7    5    2    2    4    6    9    6    6    4    8    3    8    8    6    7    9    0    1    0    1    4    1    8    2    4    8    6    6    9    7    5    7    2    9    5    6    6    1    7    6    3    7    4    5    2    0    4    0    7    4    9    1    8    1    3    4    9    9    1    1    7    8    8    9    7    4    7    5    7    5    2    2    4    6    9    6    6    4    8    3    8    8    6    7    9    0    1    0    1    4    1    8    5 
-   9    8    6    5    7    1    3    5    8    2    6    8    6    6    1    2    0    0    7    2    2    2    0    1    0    7    8    2    6    8    2    7    7    8    2    6    9    8    3    9    2    9    9    8    7    1    3    9    3    0    1    5    4    3    6    4    0    2    0    2    6    9    8    5    4    0    9    0    8    9    8    6    5    7    1    3    5    8    2    6    8    6    6    1    2    0    0    7    2    2    2    0    1    0    7    8    2    6    8    2    7    7    8    2    6    9    8    3    9    2    9    9    8    7    1    3    9    3    0    1    5    4    3    6    4    0    6 
-   1    1    6    3    2    3    4    5    3    7    7    6    2    2    0    0    8    0    7    7    9    4    9    6    0    2    5    2    4    4    7    7    7    3    0    9    8    4    4    3    3    4    0    7    6    2    8    4    4    7    3    4    3    5    0    3    7    8    7    5    0    4    4    0    9    0    2    9    5    1    1    6    3    2    3    4    5    3    7    7    6    2    2    0    0    8    0    7    7    9    4    9    6    0    2    5    2    4    4    7    7    7    3    0    9    8    4    4    3    3    4    0    7    6    2    8    4    4    7    3    4    3    5    0    3    7    7 
-   9    9    8    1    6    6    3    6    3    7    5    6    3    8    3    3    3    0    0    0    3    5    4    2    6    1    3    6    7    0    2    8    9    3    9    8    9    4    6    4    1    2    3    5    2    6    0    8    7    3    8    0    8    3    4    4    4    5    1    3    2    8    0    7    9    0    5    5    4    9    9    8    1    6    6    3    6    3    7    5    6    3    8    3    3    3    0    0    0    3    5    4    2    6    1    3    6    7    0    2    8    9    3    9    8    9    4    6    4    1    2    3    5    2    6    0    8    7    3    8    0    8    3    4    4    4    9 
-   6    8    2    1    5    6    7    7    4    6    0    5    9    1    0    3    5    6    5    0    0    5    7    3    8    9    6    0    2    4    8    8    4    2    1    9    8    9    9    5    5    9    0    6    0    2    2    8    8    7    0    0    4    7    6    2    8    2    3    0    7    1    1    0    2    9    1    6    8    6    8    2    1    5    6    7    7    4    6    0    5    9    1    0    3    5    6    5    0    0    5    7    3    8    9    6    0    2    4    8    8    4    2    1    9    8    9    9    5    5    9    0    6    0    2    2    8    8    7    0    0    4    7    6    2    8    4 
-   0    9    5    2    7    7    4    9    5    2    6    7    5    2    6    1    5    4    5    9    5    5    2    8    0    8    0    5    3    4    0    3    5    7    5    4    5    9    4    2    4    0    0    1    5    6    2    0    1    9    1    8    6    3    8    7    4    2    0    8    2    1    3    4    2    4    3    3    3    0    9    5    2    7    7    4    9    5    2    6    7    5    2    6    1    5    4    5    9    5    5    2    8    0    8    0    5    3    4    0    3    5    7    5    4    5    9    4    2    4    0    0    1    5    6    2    0    1    9    1    8    6    3    8    7    4    8 
-   1    6    4    1    7    9    0    1    9    3    2    1    1    8    6    1    5    0    9    1    0    6    8    3    9    2    1    7    1    1    9    4    9    6    8    6    5    8    7    7    1    1    8    4    0    6    5    7    9    6    1    9    4    9    2    6    1    4    7    4    4    1    1    4    8    6    9    0    2    1    6    4    1    7    9    0    1    9    3    2    1    1    8    6    1    5    0    9    1    0    6    8    3    9    2    1    7    1    1    9    4    9    6    8    6    5    8    7    7    1    1    8    4    0    6    5    7    9    6    1    9    4    9    2    6    1    5 
-   3    7    6    3    1    8    2    8    7    1    5    8    0    1    7    4    7    8    9    3    2    8    8    3    7    1    9    4    9    6    8    5    3    6    8    7    6    0    7    4    3    4    4    5    6    2    9    3    2    1    8    7    9    6    0    8    9    3    2    7    5    8    8    1    6    5    6    4    4    3    7    6    3    1    8    2    8    7    1    5    8    0    1    7    4    7    8    9    3    2    8    8    3    7    1    9    4    9    6    8    5    3    6    8    7    6    0    7    4    3    4    4    5    6    2    9    3    2    1    8    7    9    6    0    8    9    1 
-   2    0    4    6    8    2    0    7    5    3    0    6    2    2    2    4    0    4    5    5    3    5    8    9    0    9    3    2    7    2    1    1    3    7    8    1    9    8    0    7    3    3    3    7    5    7    1    7    1    9    2    6    4    2    5    4    4    2    9    7    3    4    3    9    4    2    6    7    9    2    0    4    6    8    2    0    7    5    3    0    6    2    2    2    4    0    4    5    5    3    5    8    9    0    9    3    2    7    2    1    1    3    7    8    1    9    8    0    7    3    3    3    7    5    7    1    7    1    9    2    6    4    2    5    4    4    1 
-   7    9    7    0    6    2    0    0    9    1    9    4    0    3    8    5    9    2    8    7    6    2    6    3    2    7    6    4    6    1    8    5    2    5    8    9    9    8    9    0    1    8    6    1    3    5    9    2    9    7    9    7    1    7    0    4    5    6    3    3    9    5    8    9    3    1    8    3    4    7    9    7    0    6    2    0    0    9    1    9    4    0    3    8    5    9    2    8    7    6    2    6    3    2    7    6    4    6    1    8    5    2    5    8    9    9    8    9    0    1    8    6    1    3    5    9    2    9    7    9    7    1    7    0    4    5    8 
-   4    8    4    1    1    7    6    0    1    7    0    2    5    1    0    5    7    7    4    5    0    6    5    0    0    8    9    6    2    5    2    7    5    7    0    7    6    6    9    0    3    9    2    0    3    4    6    0    1    2    8    3    8    3    4    0    4    8    3    0    8    8    4    3    6    3    2    6    4    4    8    4    1    1    7    6    0    1    7    0    2    5    1    0    5    7    7    4    5    0    6    5    0    0    8    9    6    2    5    2    7    5    7    0    7    6    6    9    0    3    9    2    0    3    4    6    0    1    2    8    3    8    3    4    0    4    5 
-   6    9    4    9    9    7    3    7    9    7    9    9    0    9    5    6    2    9    1    0    7    2    1    5    8    1    2    3    8    8    7    4    7    3    5    8    2    9    6    2    6    7    3    8    7    8    5    1    9    6    1    9    8    3    4    8    6    8    8    0    1    5    6    8    5    3    6    3    2    6    9    4    9    9    7    3    7    9    7    9    9    0    9    5    6    2    9    1    0    7    2    1    5    8    1    2    3    8    8    7    4    7    3    5    8    2    9    6    2    6    7    3    8    7    8    5    1    9    6    1    9    8    3    4    8    6    8 
-   1    3    9    6    2    8    5    9    9    6    5    3    5    4    8    9    4    4    0    8    1    6    1    2    4    7    0    0    6    8    2    9    3    3    8    7    4    3    6    5    1    2    8    7    8    6    8    2    3    8    2    4    7    5    8    1    3    3    4    6    1    1    5    6    6    4    9    7    2    1    3    9    6    2    8    5    9    9    6    5    3    5    4    8    9    4    4    0    8    1    6    1    2    4    7    0    0    6    8    2    9    3    3    8    7    4    3    6    5    1    2    8    7    8    6    8    2    3    8    2    4    7    5    8    1    3    8 
-   0    7    0    0    4    8    9    5    2    4    3    5    8    2    0    8    3    5    8    6    9    7    3    4    9    4    5    0    0    3    6    2    0    8    3    7    8    4    2    1    8    7    8    8    0    0    6    3    6    4    2    7    1    5    1    2    1    1    1    8    5    3    2    0    1    9    4    6    6    0    7    0    0    4    8    9    5    2    4    3    5    8    2    0    8    3    5    8    6    9    7    3    4    9    4    5    0    0    3    6    2    0    8    3    7    8    4    2    1    8    7    8    8    0    0    6    3    6    4    2    7    1    5    1    2    1    8 
+diff -c $TEMPDIR/pspp.csv - <<EOF
+"Table: Reading 1 record from ""$top_srcdir/tests/weighting.data""."
+Variable,Record,Columns,Format
+AVAR,1,1-  5,F5.0
+BVAR,1,6- 10,F5.0
+
+Table: Data List
+AVAR,BVAR
+18,1
+19,7
+20,26
+21,76
+22,57
+23,58
+24,38
+25,38
+26,30
+27,21
+28,23
+29,24
+30,23
+31,14
+32,21
+33,21
+34,14
+35,14
+36,17
+37,11
+38,16
+39,14
+40,15
+41,14
+42,14
+43,8
+44,15
+45,10
+46,12
+47,13
+48,13
+49,5
+50,5
+51,3
+52,7
+53,6
+54,2
+55,2
+56,2
+57,3
+58,1
+59,3
+61,1
+62,3
+63,1
+64,1
+65,2
+70,1
+78,1
+79,1
+80,1
+94,1
+
+Table: Data List
+Case Number,AVAR,BVAR
+1,18,1
+2,19,7
+3,20,26
+4,21,76
+5,22,57
+6,23,58
+7,24,38
+8,25,38
+9,26,30
+10,27,21
+11,28,23
+12,29,24
+13,30,23
+14,31,14
+15,32,21
+16,33,21
+17,34,14
+18,35,14
+19,36,17
+20,37,11
+21,38,16
+22,39,14
+23,40,15
+24,41,14
+25,42,14
+26,43,8
+27,44,15
+28,45,10
+29,46,12
+30,47,13
+31,48,13
+32,49,5
+33,50,5
+34,51,3
+35,52,7
+36,53,6
+37,54,2
+38,55,2
+39,56,2
+40,57,3
+41,58,1
+42,59,3
+43,61,1
+44,62,3
+45,63,1
+46,64,1
+47,65,2
+48,70,1
+49,78,1
+50,79,1
+51,80,1
+52,94,1
+
+Table: Data List
+X000,X001,X002,X003,X004,X005,X006,X007,X008,X009,X010,X011,X012,X013,X014,X015,X016,X017,X018,X019,X020,X021,X022,X023,X024,X025,X026,X027,X028,X029,X030
+7,6,7,5,3,2,4,6,6,3,4,8,5,1,3,7,8,9,0,7,3,4,8,3,1,0,6,4,0,9,1
+8,8,8,6,9,3,0,8,9,4,2,4,1,7,7,5,4,2,3,7,8,3,3,4,1,8,6,7,6,0,3
+4,9,2,6,1,1,5,0,7,9,0,9,1,8,7,1,5,2,7,2,6,4,2,7,8,5,2,2,4,2,4
+8,1,9,8,4,8,8,9,2,0,2,3,1,9,5,8,7,5,8,7,9,3,3,2,0,0,1,4,9,1,7
+4,5,2,7,7,7,8,9,8,7,0,9,5,6,3,7,2,9,8,4,5,5,4,1,5,1,6,6,5,0,6
+2,3,9,9,6,1,9,6,7,0,7,7,7,3,2,7,6,0,6,6,3,5,2,5,1,1,5,0,7,3,5
+1,6,6,7,7,9,9,6,9,1,2,6,6,4,7,6,9,9,4,4,0,4,7,4,3,9,8,9,2,3,7
+1,6,2,3,9,1,4,6,8,4,1,9,6,8,9,2,3,1,6,8,4,7,1,1,7,0,1,1,5,4,3
+3,6,8,1,3,9,3,2,3,3,7,6,0,1,2,9,4,8,9,1,1,3,1,2,1,8,2,9,5,9,9
+6,4,1,8,7,3,1,1,4,5,4,3,1,0,8,2,9,9,4,8,5,6,8,1,6,5,0,5,0,3,5
+2,2,8,4,5,3,4,0,8,3,7,4,9,5,0,7,7,1,6,6,5,1,0,8,6,4,2,9,0,7,1
+6,6,1,7,6,3,7,4,5,2,0,4,0,7,4,9,1,8,1,3,4,9,9,1,1,7,8,8,9,7,4
+9,8,6,5,7,1,3,5,8,2,6,8,6,6,1,2,0,0,7,2,2,2,0,1,0,7,8,2,6,8,2
+1,1,6,3,2,3,4,5,3,7,7,6,2,2,0,0,8,0,7,7,9,4,9,6,0,2,5,2,4,4,7
+9,9,8,1,6,6,3,6,3,7,5,6,3,8,3,3,3,0,0,0,3,5,4,2,6,1,3,6,7,0,2
+6,8,2,1,5,6,7,7,4,6,0,5,9,1,0,3,5,6,5,0,0,5,7,3,8,9,6,0,2,4,8
+0,9,5,2,7,7,4,9,5,2,6,7,5,2,6,1,5,4,5,9,5,5,2,8,0,8,0,5,3,4,0
+1,6,4,1,7,9,0,1,9,3,2,1,1,8,6,1,5,0,9,1,0,6,8,3,9,2,1,7,1,1,9
+3,7,6,3,1,8,2,8,7,1,5,8,0,1,7,4,7,8,9,3,2,8,8,3,7,1,9,4,9,6,8
+2,0,4,6,8,2,0,7,5,3,0,6,2,2,2,4,0,4,5,5,3,5,8,9,0,9,3,2,7,2,1
+7,9,7,0,6,2,0,0,9,1,9,4,0,3,8,5,9,2,8,7,6,2,6,3,2,7,6,4,6,1,8
+4,8,4,1,1,7,6,0,1,7,0,2,5,1,0,5,7,7,4,5,0,6,5,0,0,8,9,6,2,5,2
+6,9,4,9,9,7,3,7,9,7,9,9,0,9,5,6,2,9,1,0,7,2,1,5,8,1,2,3,8,8,7
+1,3,9,6,2,8,5,9,9,6,5,3,5,4,8,9,4,4,0,8,1,6,1,2,4,7,0,0,6,8,2
+0,7,0,0,4,8,9,5,2,4,3,5,8,2,0,8,3,5,8,6,9,7,3,4,9,4,5,0,0,3,6
+
+Table: Data List
+X000,X001,X002,X003,X004,X005,X006,X007,X008,X009,X010,X011,X012,X013,X014,X015,X016,X017,X018,X019,X020,X021,X022,X023,X024,X025,X026,X027,X028,X029,X030,X031,X032,X033,X034,X035,X036,X037,X038,X039,X040,X041,X042,X043,X044,X045,X046,X047,X048,X049,X050,X051,X052,X053,X054,X055,X056,X057,X058,X059,X060,X061,X062,X063,X064,X065,X066,X067,X068,X069,X070,X071,X072,X073,X074,X075,X076,X077,X078,X079,X080,X081,X082,X083,X084,X085,X086,X087,X088,X089,X090,X091,X092,X093,X094,X095,X096,X097,X098,X099,X100,X101,X102,X103,X104,X105,X106,X107,X108,X109,X110,X111,X112,X113,X114,X115,X116,X117,X118,X119,X120,X121,X122,X123,X124,X125,X126
+7,6,7,5,3,2,4,6,6,3,4,8,5,1,3,7,8,9,0,7,3,4,8,3,1,0,6,4,0,9,1,7,5,8,5,9,2,9,5,8,4,2,8,1,5,2,9,5,1,1,3,7,5,3,2,6,5,9,4,1,8,7,5,2,3,3,8,1,5,7,6,7,5,3,2,4,6,6,3,4,8,5,1,3,7,8,9,0,7,3,4,8,3,1,0,6,4,0,9,1,7,5,8,5,9,2,9,5,8,4,2,8,1,5,2,9,5,1,1,3,7,5,3,2,6,5,8
+8,8,8,6,9,3,0,8,9,4,2,4,1,7,7,5,4,2,3,7,8,3,3,4,1,8,6,7,6,0,3,6,8,1,4,7,5,5,8,6,9,0,0,2,7,9,7,3,1,0,2,2,6,6,8,7,4,1,6,8,4,5,5,5,0,6,7,1,4,8,8,8,6,9,3,0,8,9,4,2,4,1,7,7,5,4,2,3,7,8,3,3,4,1,8,6,7,6,0,3,6,8,1,4,7,5,5,8,6,9,0,0,2,7,9,7,3,1,0,2,2,6,6,8,7,4,6
+4,9,2,6,1,1,5,0,7,9,0,9,1,8,7,1,5,2,7,2,6,4,2,7,8,5,2,2,4,2,4,8,3,8,5,6,2,0,6,9,9,8,0,2,7,8,3,4,2,1,8,8,7,2,5,5,8,6,2,6,0,0,4,1,5,2,6,0,2,4,9,2,6,1,1,5,0,7,9,0,9,1,8,7,1,5,2,7,2,6,4,2,7,8,5,2,2,4,2,4,8,3,8,5,6,2,0,6,9,9,8,0,2,7,8,3,4,2,1,8,8,7,2,5,5,8,9
+8,1,9,8,4,8,8,9,2,0,2,3,1,9,5,8,7,5,8,7,9,3,3,2,0,0,1,4,9,1,7,7,3,6,8,9,6,8,8,0,1,3,3,2,2,1,0,1,6,0,8,8,4,4,0,6,4,0,2,3,6,2,6,5,7,2,7,0,0,8,1,9,8,4,8,8,9,2,0,2,3,1,9,5,8,7,5,8,7,9,3,3,2,0,0,1,4,9,1,7,7,3,6,8,9,6,8,8,0,1,3,3,2,2,1,0,1,6,0,8,8,4,4,0,6,4,1
+4,5,2,7,7,7,8,9,8,7,0,9,5,6,3,7,2,9,8,4,5,5,4,1,5,1,6,6,5,0,6,9,5,0,6,4,7,7,4,6,6,4,5,1,2,0,8,4,9,8,8,7,6,4,0,1,6,0,6,5,9,5,0,5,3,9,1,4,9,4,5,2,7,7,7,8,9,8,7,0,9,5,6,3,7,2,9,8,4,5,5,4,1,5,1,6,6,5,0,6,9,5,0,6,4,7,7,4,6,6,4,5,1,2,0,8,4,9,8,8,7,6,4,0,1,6,6
+2,3,9,9,6,1,9,6,7,0,7,7,7,3,2,7,6,0,6,6,3,5,2,5,1,1,5,0,7,3,5,1,8,6,0,5,9,1,1,8,1,8,6,9,1,0,8,8,0,4,6,5,1,9,0,3,2,8,1,9,6,2,4,6,8,9,6,7,5,2,3,9,9,6,1,9,6,7,0,7,7,7,3,2,7,6,0,6,6,3,5,2,5,1,1,5,0,7,3,5,1,8,6,0,5,9,1,1,8,1,8,6,9,1,0,8,8,0,4,6,5,1,9,0,3,2,5
+1,6,6,7,7,9,9,6,9,1,2,6,6,4,7,6,9,9,4,4,0,4,7,4,3,9,8,9,2,3,7,3,1,5,3,9,4,2,7,6,4,1,2,0,7,9,7,6,0,3,1,0,7,0,6,3,9,5,1,0,3,2,9,9,4,4,1,5,7,1,6,6,7,7,9,9,6,9,1,2,6,6,4,7,6,9,9,4,4,0,4,7,4,3,9,8,9,2,3,7,3,1,5,3,9,4,2,7,6,4,1,2,0,7,9,7,6,0,3,1,0,7,0,6,3,9,4
+1,6,2,3,9,1,4,6,8,4,1,9,6,8,9,2,3,1,6,8,4,7,1,1,7,0,1,1,5,4,3,6,2,7,1,1,9,5,9,7,9,0,8,5,9,9,7,4,0,5,2,5,2,4,6,1,6,4,1,9,1,5,0,8,0,1,3,2,0,1,6,2,3,9,1,4,6,8,4,1,9,6,8,9,2,3,1,6,8,4,7,1,1,7,0,1,1,5,4,3,6,2,7,1,1,9,5,9,7,9,0,8,5,9,9,7,4,0,5,2,5,2,4,6,1,6,8
+3,6,8,1,3,9,3,2,3,3,7,6,0,1,2,9,4,8,9,1,1,3,1,2,1,8,2,9,5,9,9,8,5,7,2,8,8,5,0,1,0,9,9,1,2,3,2,8,3,1,9,6,6,2,8,7,1,4,1,4,8,9,6,5,0,8,4,5,7,3,6,8,1,3,9,3,2,3,3,7,6,0,1,2,9,4,8,9,1,1,3,1,2,1,8,2,9,5,9,9,8,5,7,2,8,8,5,0,1,0,9,9,1,2,3,2,8,3,1,9,6,6,2,8,7,1,0
+6,4,1,8,7,3,1,1,4,5,4,3,1,0,8,2,9,9,4,8,5,6,8,1,6,5,0,5,0,3,5,9,9,7,9,8,2,0,9,6,7,3,2,1,5,0,3,5,9,7,5,4,5,4,7,2,9,9,6,1,8,4,8,7,8,8,5,3,0,6,4,1,8,7,3,1,1,4,5,4,3,1,0,8,2,9,9,4,8,5,6,8,1,6,5,0,5,0,3,5,9,9,7,9,8,2,0,9,6,7,3,2,1,5,0,3,5,9,7,5,4,5,4,7,2,9,7
+2,2,8,4,5,3,4,0,8,3,7,4,9,5,0,7,7,1,6,6,5,1,0,8,6,4,2,9,0,7,1,2,1,9,7,6,5,1,6,3,7,5,9,8,2,9,7,9,3,4,7,8,5,8,7,1,4,7,2,3,4,3,4,1,2,3,4,4,2,2,2,8,4,5,3,4,0,8,3,7,4,9,5,0,7,7,1,6,6,5,1,0,8,6,4,2,9,0,7,1,2,1,9,7,6,5,1,6,3,7,5,9,8,2,9,7,9,3,4,7,8,5,8,7,1,4,9
+6,6,1,7,6,3,7,4,5,2,0,4,0,7,4,9,1,8,1,3,4,9,9,1,1,7,8,8,9,7,4,7,5,7,5,2,2,4,6,9,6,6,4,8,3,8,8,6,7,9,0,1,0,1,4,1,8,2,4,8,6,6,9,7,5,7,2,9,5,6,6,1,7,6,3,7,4,5,2,0,4,0,7,4,9,1,8,1,3,4,9,9,1,1,7,8,8,9,7,4,7,5,7,5,2,2,4,6,9,6,6,4,8,3,8,8,6,7,9,0,1,0,1,4,1,8,5
+9,8,6,5,7,1,3,5,8,2,6,8,6,6,1,2,0,0,7,2,2,2,0,1,0,7,8,2,6,8,2,7,7,8,2,6,9,8,3,9,2,9,9,8,7,1,3,9,3,0,1,5,4,3,6,4,0,2,0,2,6,9,8,5,4,0,9,0,8,9,8,6,5,7,1,3,5,8,2,6,8,6,6,1,2,0,0,7,2,2,2,0,1,0,7,8,2,6,8,2,7,7,8,2,6,9,8,3,9,2,9,9,8,7,1,3,9,3,0,1,5,4,3,6,4,0,6
+1,1,6,3,2,3,4,5,3,7,7,6,2,2,0,0,8,0,7,7,9,4,9,6,0,2,5,2,4,4,7,7,7,3,0,9,8,4,4,3,3,4,0,7,6,2,8,4,4,7,3,4,3,5,0,3,7,8,7,5,0,4,4,0,9,0,2,9,5,1,1,6,3,2,3,4,5,3,7,7,6,2,2,0,0,8,0,7,7,9,4,9,6,0,2,5,2,4,4,7,7,7,3,0,9,8,4,4,3,3,4,0,7,6,2,8,4,4,7,3,4,3,5,0,3,7,7
+9,9,8,1,6,6,3,6,3,7,5,6,3,8,3,3,3,0,0,0,3,5,4,2,6,1,3,6,7,0,2,8,9,3,9,8,9,4,6,4,1,2,3,5,2,6,0,8,7,3,8,0,8,3,4,4,4,5,1,3,2,8,0,7,9,0,5,5,4,9,9,8,1,6,6,3,6,3,7,5,6,3,8,3,3,3,0,0,0,3,5,4,2,6,1,3,6,7,0,2,8,9,3,9,8,9,4,6,4,1,2,3,5,2,6,0,8,7,3,8,0,8,3,4,4,4,9
+6,8,2,1,5,6,7,7,4,6,0,5,9,1,0,3,5,6,5,0,0,5,7,3,8,9,6,0,2,4,8,8,4,2,1,9,8,9,9,5,5,9,0,6,0,2,2,8,8,7,0,0,4,7,6,2,8,2,3,0,7,1,1,0,2,9,1,6,8,6,8,2,1,5,6,7,7,4,6,0,5,9,1,0,3,5,6,5,0,0,5,7,3,8,9,6,0,2,4,8,8,4,2,1,9,8,9,9,5,5,9,0,6,0,2,2,8,8,7,0,0,4,7,6,2,8,4
+0,9,5,2,7,7,4,9,5,2,6,7,5,2,6,1,5,4,5,9,5,5,2,8,0,8,0,5,3,4,0,3,5,7,5,4,5,9,4,2,4,0,0,1,5,6,2,0,1,9,1,8,6,3,8,7,4,2,0,8,2,1,3,4,2,4,3,3,3,0,9,5,2,7,7,4,9,5,2,6,7,5,2,6,1,5,4,5,9,5,5,2,8,0,8,0,5,3,4,0,3,5,7,5,4,5,9,4,2,4,0,0,1,5,6,2,0,1,9,1,8,6,3,8,7,4,8
+1,6,4,1,7,9,0,1,9,3,2,1,1,8,6,1,5,0,9,1,0,6,8,3,9,2,1,7,1,1,9,4,9,6,8,6,5,8,7,7,1,1,8,4,0,6,5,7,9,6,1,9,4,9,2,6,1,4,7,4,4,1,1,4,8,6,9,0,2,1,6,4,1,7,9,0,1,9,3,2,1,1,8,6,1,5,0,9,1,0,6,8,3,9,2,1,7,1,1,9,4,9,6,8,6,5,8,7,7,1,1,8,4,0,6,5,7,9,6,1,9,4,9,2,6,1,5
+3,7,6,3,1,8,2,8,7,1,5,8,0,1,7,4,7,8,9,3,2,8,8,3,7,1,9,4,9,6,8,5,3,6,8,7,6,0,7,4,3,4,4,5,6,2,9,3,2,1,8,7,9,6,0,8,9,3,2,7,5,8,8,1,6,5,6,4,4,3,7,6,3,1,8,2,8,7,1,5,8,0,1,7,4,7,8,9,3,2,8,8,3,7,1,9,4,9,6,8,5,3,6,8,7,6,0,7,4,3,4,4,5,6,2,9,3,2,1,8,7,9,6,0,8,9,1
+2,0,4,6,8,2,0,7,5,3,0,6,2,2,2,4,0,4,5,5,3,5,8,9,0,9,3,2,7,2,1,1,3,7,8,1,9,8,0,7,3,3,3,7,5,7,1,7,1,9,2,6,4,2,5,4,4,2,9,7,3,4,3,9,4,2,6,7,9,2,0,4,6,8,2,0,7,5,3,0,6,2,2,2,4,0,4,5,5,3,5,8,9,0,9,3,2,7,2,1,1,3,7,8,1,9,8,0,7,3,3,3,7,5,7,1,7,1,9,2,6,4,2,5,4,4,1
+7,9,7,0,6,2,0,0,9,1,9,4,0,3,8,5,9,2,8,7,6,2,6,3,2,7,6,4,6,1,8,5,2,5,8,9,9,8,9,0,1,8,6,1,3,5,9,2,9,7,9,7,1,7,0,4,5,6,3,3,9,5,8,9,3,1,8,3,4,7,9,7,0,6,2,0,0,9,1,9,4,0,3,8,5,9,2,8,7,6,2,6,3,2,7,6,4,6,1,8,5,2,5,8,9,9,8,9,0,1,8,6,1,3,5,9,2,9,7,9,7,1,7,0,4,5,8
+4,8,4,1,1,7,6,0,1,7,0,2,5,1,0,5,7,7,4,5,0,6,5,0,0,8,9,6,2,5,2,7,5,7,0,7,6,6,9,0,3,9,2,0,3,4,6,0,1,2,8,3,8,3,4,0,4,8,3,0,8,8,4,3,6,3,2,6,4,4,8,4,1,1,7,6,0,1,7,0,2,5,1,0,5,7,7,4,5,0,6,5,0,0,8,9,6,2,5,2,7,5,7,0,7,6,6,9,0,3,9,2,0,3,4,6,0,1,2,8,3,8,3,4,0,4,5
+6,9,4,9,9,7,3,7,9,7,9,9,0,9,5,6,2,9,1,0,7,2,1,5,8,1,2,3,8,8,7,4,7,3,5,8,2,9,6,2,6,7,3,8,7,8,5,1,9,6,1,9,8,3,4,8,6,8,8,0,1,5,6,8,5,3,6,3,2,6,9,4,9,9,7,3,7,9,7,9,9,0,9,5,6,2,9,1,0,7,2,1,5,8,1,2,3,8,8,7,4,7,3,5,8,2,9,6,2,6,7,3,8,7,8,5,1,9,6,1,9,8,3,4,8,6,8
+1,3,9,6,2,8,5,9,9,6,5,3,5,4,8,9,4,4,0,8,1,6,1,2,4,7,0,0,6,8,2,9,3,3,8,7,4,3,6,5,1,2,8,7,8,6,8,2,3,8,2,4,7,5,8,1,3,3,4,6,1,1,5,6,6,4,9,7,2,1,3,9,6,2,8,5,9,9,6,5,3,5,4,8,9,4,4,0,8,1,6,1,2,4,7,0,0,6,8,2,9,3,3,8,7,4,3,6,5,1,2,8,7,8,6,8,2,3,8,2,4,7,5,8,1,3,8
+0,7,0,0,4,8,9,5,2,4,3,5,8,2,0,8,3,5,8,6,9,7,3,4,9,4,5,0,0,3,6,2,0,8,3,7,8,4,2,1,8,7,8,8,0,0,6,3,6,4,2,7,1,5,1,2,1,1,1,8,5,3,2,0,1,9,4,6,6,0,7,0,0,4,8,9,5,2,4,3,5,8,2,0,8,3,5,8,6,9,7,3,4,9,4,5,0,0,3,6,2,0,8,3,7,8,4,2,1,8,7,8,8,0,0,6,3,6,4,2,7,1,5,1,2,1,8
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 3501f2183f04034748f9c6da83f6499952e815ba..a57e57323d7a3a5b6079a0eb061656d7d34be294 100755 (executable)
@@ -77,50 +77,39 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------------+------+
-|   Variable   |Format|
-#==============#======#
-|AlphaBetaGamma|F8.0  |
-|B             |F8.0  |
-|X             |F8.0  |
-|Yabbadabbadoo |F8.0  |
-+--------------+------+
-AlphaBetaGamma        B        X Yabbadabbadoo
--------------- -------- -------- -------------
-          2.00     3.00     4.00          5.00 
-2.1 CROSSTABS.  Summary.
-#===============#=====================================================#
-#               #                        Cases                        #
-#               #-----------------+-----------------+-----------------#
-#               #      Valid      |     Missing     |      Total      #
-#               #--------+--------+--------+--------+--------+--------#
-#               #       N| Percent|       N| Percent|       N| Percent#
-#---------------#--------+--------+--------+--------+--------+--------#
-#X *            #       1|  100.0%|       0|    0.0%|       1|  100.0%#
-#Yabbadabbadoo  #        |        |        |        |        |        #
-#===============#========#========#========#========#========#========#
-2.2 CROSSTABS.  X * Yabbadabbadoo [count].
-#===============#==============================================================#========#
-#               #                         Yabbadabbadoo                        |        #
-#               #--------+--------+--------+--------+--------+--------+--------+        #
-#              X#    1.00|    2.00|    3.00|    4.00|    5.00|    6.00|    7.00|  Total #
-#---------------#--------+--------+--------+--------+--------+--------+--------+--------#
-#           1.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           2.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           3.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           4.00#      .0|      .0|      .0|      .0|     1.0|      .0|      .0|     1.0#
-#           5.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           6.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#           7.00#      .0|      .0|      .0|      .0|      .0|      .0|      .0|      .0#
-#Total          #      .0|      .0|      .0|      .0|     1.0|      .0|      .0|     1.0#
-#===============#========#========#========#========#========#========#========#========#
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+AlphaBetaGamma,F8.0
+B,F8.0
+X,F8.0
+Yabbadabbadoo,F8.0
+
+Table: Data List
+AlphaBetaGamma,B,X,Yabbadabbadoo
+2.00,3.00,4.00,5.00
+
+Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+X * Yabbadabbadoo,1,100.0%,0,0.0%,1,100.0%
+
+Table: X * Yabbadabbadoo [count].
+,Yabbadabbadoo,,,,,,,
+X,1.00,2.00,3.00,4.00,5.00,6.00,7.00,Total
+1.00,.0,.0,.0,.0,.0,.0,.0,.0
+2.00,.0,.0,.0,.0,.0,.0,.0,.0
+3.00,.0,.0,.0,.0,.0,.0,.0,.0
+4.00,.0,.0,.0,.0,1.0,.0,.0,1.0
+5.00,.0,.0,.0,.0,.0,.0,.0,.0
+6.00,.0,.0,.0,.0,.0,.0,.0,.0
+7.00,.0,.0,.0,.0,.0,.0,.0,.0
+Total,.0,.0,.0,.0,1.0,.0,.0,1.0
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 813777f4acea547542e62ce827faecb439877bac..c49633e61767065742f8ae89ed98527d4701d05b 100755 (executable)
@@ -131,7 +131,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e $TEMPDIR/stdout $TEMPDIR/loop.stat 
+$SUPERVISOR $PSPP -o pspp.csv -e $TEMPDIR/stdout $TEMPDIR/loop.stat 
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare stdout"
@@ -141,82 +141,155 @@ EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list  - <<EOF
+diff -c $TEMPDIR/pspp.csv  - <<EOF
 Loop with index
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
-    9.00 
+
+3.00 
+
+6.00 
+
+9.00 
+
 --------
+
 --------
+
 Loop with IF condition
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
-    9.00 
+
+3.00 
+
+6.00 
+
+9.00 
+
 --------
+
 --------
+
 Loop with END IF condition
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
-    9.00 
+
+3.00 
+
+6.00 
+
+9.00 
+
 --------
-    4.00 
+
+4.00 
+
 --------
+
 Loop with index and IF condition based on index
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
+
+2.00 
+
 --------
-    3.00 
+
+3.00 
+
 --------
+
 --------
+
 Loop with index and END IF condition based on index
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
+
+3.00 
+
+6.00 
+
 --------
+
 --------
+
 Loop with index and IF and END IF condition based on index
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
+
 --------
+
 --------
+
 Loop with no conditions
-    1.00 
+
+1.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
+
+3.00 
+
+6.00 
+
 --------
-    4.00 
+
+4.00 
+
 --------
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
index 9726b065c7da65d9bf09a13e188da46d062d8ad8..29d566961753387677ebbfb87b2b9d166d3a8f13 100755 (executable)
@@ -85,40 +85,40 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 cat > ff.out <<EOF
-A B C D INA INB FIRST LAST
-- - - - --- --- ----- ----
-0 a A     1   0     1    1
-1 a B N   1   1     1    0
-1 a C     1   0     0    1
-2 a D     1   0     1    1
-3 a E O   1   1     1    1
-4 a F P   1   1     1    1
-5 a G     1   0     1    0
-5 a H     1   0     0    1
-6 a I Q   1   1     1    1
-7 a J R   1   1     1    0
-7 a K     1   0     0    0
-7 a L     1   0     0    1
-8 a M     1   0     1    1
-9 b   S   0   1     1    1
+Table: Data List
+A,B,C,D,INA,INB,FIRST,LAST
+0,a,A,,1,0,1,1
+1,a,B,N,1,1,1,0
+1,a,C,,1,0,0,1
+2,a,D,,1,0,1,1
+3,a,E,O,1,1,1,1
+4,a,F,P,1,1,1,1
+5,a,G,,1,0,1,0
+5,a,H,,1,0,0,1
+6,a,I,Q,1,1,1,1
+7,a,J,R,1,1,1,0
+7,a,K,,1,0,0,0
+7,a,L,,1,0,0,1
+8,a,M,,1,0,1,1
+9,b,,S,0,1,1,1
 EOF
 
 cat > ft.out <<EOF
-A B C D INA INB FIRST LAST
-- - - - --- --- ----- ----
-0 a A     1   0     1    1
-1 a B N   1   1     1    0
-1 a C N   1   1     0    1
-2 a D     1   0     1    1
-3 a E O   1   1     1    1
-4 a F P   1   1     1    1
-5 a G     1   0     1    0
-5 a H     1   0     0    1
-6 a I Q   1   1     1    1
-7 a J R   1   1     1    0
-7 a K R   1   1     0    0
-7 a L R   1   1     0    1
-8 a M     1   0     1    1
+Table: Data List
+A,B,C,D,INA,INB,FIRST,LAST
+0,a,A,,1,0,1,1
+1,a,B,N,1,1,1,0
+1,a,C,N,1,1,0,1
+2,a,D,,1,0,1,1
+3,a,E,O,1,1,1,1
+4,a,F,P,1,1,1,1
+5,a,G,,1,0,1,0
+5,a,H,,1,0,0,1
+6,a,I,Q,1,1,1,1
+7,a,J,R,1,1,1,0
+7,a,K,R,1,1,0,0
+7,a,L,R,1,1,0,1
+8,a,M,,1,0,1,1
 EOF
 
 # Test nonparallel match and table lookup.
@@ -174,13 +174,11 @@ EOF
        if [ $? -ne 0 ] ; then no_result ; fi
 
        activity="run $name.pspp"
-       $SUPERVISOR $PSPP --testing-mode -e /dev/null $name.pspp 
+       $SUPERVISOR $PSPP -o pspp.csv -e /dev/null $name.pspp 
        if [ $? -ne 0 ] ; then no_result ; fi
 
        activity="check $name output"
-       perl -pi -e 's/^\s*$//g' pspp.list
-       perl -pi -e 's/^\s*$//g' $types.out
-       diff -b -w pspp.list $types.out
+       diff -c pspp.csv $types.out
        if [ $? -ne 0 ] ; then fail ; fi
     done
 done
@@ -199,27 +197,26 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run $name.pspp"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $name.pspp 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $name.pspp 
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="check $name output"
-perl -pi -e 's/^\s*$//g' pspp.list
-diff -b -w - pspp.list <<EOF
-A B C D E F
-- - - - - -
-1 a B 1 b N
-8 a M 3 b O
-3 a E 4 b P
-5 a G 6 b Q
-0 a A 7 b R
-5 a H 9 b S
-6 a I
-7 a J
-2 a D
-7 a K
-1 a C
-7 a L
-4 a F
+diff -c - pspp.csv <<EOF
+Table: Data List
+A,B,C,D,E,F
+1,a,B,1,b,N
+8,a,M,3,b,O
+3,a,E,4,b,P
+5,a,G,6,b,Q
+0,a,A,7,b,R
+5,a,H,9,b,S
+6,a,I,,,
+7,a,J,,,
+2,a,D,,,
+7,a,K,,,
+1,a,C,,,
+7,a,L,,,
+4,a,F,,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -248,17 +245,16 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run $name.pspp"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $name.pspp 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $name.pspp 
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="check $name output"
-perl -pi -e 's/^\s*$//g' pspp.list
-diff -b -w - pspp.list <<EOF | perl -e 's/^\s*$//g'
-        x        z        y
- -------- -------- --------
-     3.00     8.00    30.00 
-     2.00      .      21.00 
-     1.00      .      22.00 
+diff -c - pspp.csv <<EOF
+Table: Data List
+x,z,y
+3.00,8.00,30.00
+2.00,.  ,21.00
+1.00,.  ,22.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index c01adf3112749194e5037eb80cfe3cf8fc01d4fa..a4cde41ba952b58680ae119f9fde138c9f65403b 100755 (executable)
@@ -119,7 +119,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode --error-file=$TEMPDIR/errs $TEMPDIR/missing-values.stat 
+$SUPERVISOR $PSPP -o pspp.csv --error-file=$TEMPDIR/errs $TEMPDIR/missing-values.stat 
 # Note   vv   --- there are errors in input.  Therefore, the  command must FAIL
 if [ $? -eq 0 ] ; then fail ; fi
 
index 547135559f13de4dc1b815d9cbcdbda13ca6eced..bb685f84ac311bb5da2918ecdfa731f4dad1934e 100755 (executable)
@@ -76,30 +76,29 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-       X
---------
-    1.00 
-    2.00 
-    3.00 
-    4.00 
-    5.00 
-    6.00 
-    7.00 
-    8.00 
-    9.00 
-   10.00 
-   11.00 
-   12.00 
-   13.00 
-   14.00 
-   15.00 
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Data List
+X
+1.00
+2.00
+3.00
+4.00
+5.00
+6.00
+7.00
+8.00
+9.00
+10.00
+11.00
+12.00
+13.00
+14.00
+15.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 0c94051a1eb8e5e8098e42d5b50cee7b5938a483..9e7921225b9aaab00cac5b1f87228235272bd3d9 100755 (executable)
@@ -68,49 +68,42 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' pspp.list
-diff -b -w pspp.list - <<EOF
-1.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|cont    |continents of the world                    |       1|
-|        |Format: A32                                |        |
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|size    |sq km                                      |       2|
-|        |Format: F8.2                               |        |
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|pop     |population                                 |       3|
-|        |Format: F8.2                               |        |
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|count   |number of countries                        |       4|
-|        |Format: F8.2                               |        |
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-                            cont     size      pop    count
--------------------------------- -------- -------- --------
-Asia                             44579000 3.7E+009    44.00 
-Africa                           30065000 7.8E+008    53.00 
-North America                    24256000 4.8E+008    23.00 
-South America                    17819000 3.4E+008    12.00 
-Antarctica                       13209000      .00      .00 
-Europe                            9938000 7.3E+008    46.00 
-Australia/Oceania                 7687000 31000000    14.00 
+diff -c pspp.csv - <<EOF
+Variable,Description,,Position
+cont,continents of the world,,1
+,Format: A32,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+size,sq km,,2
+,Format: F8.2,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+pop,population,,3
+,Format: F8.2,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+count,number of countries,,4
+,Format: F8.2,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+
+Table: Data List
+cont,size,pop,count
+Asia                            ,44579000,3.7E+009,44.00
+Africa                          ,30065000,7.8E+008,53.00
+North America                   ,24256000,4.8E+008,23.00
+South America                   ,17819000,3.4E+008,12.00
+Antarctica                      ,13209000,.00,.00
+Europe                          ,9938000,7.3E+008,46.00
+Australia/Oceania               ,7687000,31000000,14.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 0db048dd34703054bd88b7da91a17f81ae579812..c2b8b1d73d21a3127deabfceec4ccf528dc043c6 100755 (executable)
@@ -178,7 +178,7 @@ END DATA.
 WEIGHT BY w.
 
 NPAR TESTS
-       /BINOMIAL(0.5) = x
+       /BINOMIAL = x
        .
 
 
@@ -247,111 +247,98 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output 1"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - << EOF
+diff -c $TEMPDIR/pspp.csv - << EOF
 P < 0.5; N1/N2 < 1
-1.1 NPAR TESTS.  Binomial Test
-+-+------#--------+-----+--------------+----------+---------------------+
-| |      #Category|  N  |Observed Prop.|Test Prop.|Exact Sig. (1-tailed)|
-+-+------#--------+-----+--------------+----------+---------------------+
-|x|Group1#    1.00| 6.00|          .286|      .300|                 .551|
-| |Group2#    2.00|15.00|          .714|          |                     |
-| |Total #        |21.00|         1.000|          |                     |
-+-+------#--------+-----+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed)
+x,Group1,1.00,6.00,.286,.300,.551
+,Group2,2.00,15.00,.714,,
+,Total,,21.00,1.000,,
+
 P < 0.5; N1/N2 > 1
-2.1 NPAR TESTS.  Binomial Test
-+-+------#--------+--+--------------+----------+---------------------+
-| |      #Category| N|Observed Prop.|Test Prop.|Exact Sig. (1-tailed)|
-+-+------#--------+--+--------------+----------+---------------------+
-|x|Group1#       1| 7|          .538|      .400|                 .229|
-| |Group2#       2| 6|          .462|          |                     |
-| |Total #        |13|         1.000|          |                     |
-+-+------#--------+--+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed)
+x,Group1,1,7,.538,.400,.229
+,Group2,2,6,.462,,
+,Total,,13,1.000,,
+
 P < 0.5; N1/N2 = 1
-3.1 NPAR TESTS.  Binomial Test
-+-+------#--------+--+--------------+----------+---------------------+
-| |      #Category| N|Observed Prop.|Test Prop.|Exact Sig. (1-tailed)|
-+-+------#--------+--+--------------+----------+---------------------+
-|x|Group1#       1| 8|          .500|      .400|                 .284|
-| |Group2#       2| 8|          .500|          |                     |
-| |Total #        |16|         1.000|          |                     |
-+-+------#--------+--+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed)
+x,Group1,1,8,.500,.400,.284
+,Group2,2,8,.500,,
+,Total,,16,1.000,,
+
 P > 0.5; N1/N2 < 1
-4.1 NPAR TESTS.  Binomial Test
-+-+------#--------+--+--------------+----------+---------------------+
-| |      #Category| N|Observed Prop.|Test Prop.|Exact Sig. (1-tailed)|
-+-+------#--------+--+--------------+----------+---------------------+
-|x|Group1#       1|11|          .478|      .600|                 .164|
-| |Group2#       2|12|          .522|          |                     |
-| |Total #        |23|         1.000|          |                     |
-+-+------#--------+--+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed)
+x,Group1,1,11,.478,.600,.164
+,Group2,2,12,.522,,
+,Total,,23,1.000,,
+
 P > 0.5; N1/N2 > 1
-5.1 NPAR TESTS.  Binomial Test
-+-+------#--------+--+--------------+----------+---------------------+
-| |      #Category| N|Observed Prop.|Test Prop.|Exact Sig. (1-tailed)|
-+-+------#--------+--+--------------+----------+---------------------+
-|x|Group1#       1|11|          .550|      .600|                 .404|
-| |Group2#       2| 9|          .450|          |                     |
-| |Total #        |20|         1.000|          |                     |
-+-+------#--------+--+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed)
+x,Group1,1,11,.550,.600,.404
+,Group2,2,9,.450,,
+,Total,,20,1.000,,
+
 P > 0.5; N1/N2 == 1
-6.1 NPAR TESTS.  Binomial Test
-+-+------#--------+--+--------------+----------+---------------------+
-| |      #Category| N|Observed Prop.|Test Prop.|Exact Sig. (1-tailed)|
-+-+------#--------+--+--------------+----------+---------------------+
-|x|Group1#       1|11|          .500|      .600|                 .228|
-| |Group2#       2|11|          .500|          |                     |
-| |Total #        |22|         1.000|          |                     |
-+-+------#--------+--+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed)
+x,Group1,1,11,.500,.600,.228
+,Group2,2,11,.500,,
+,Total,,22,1.000,,
+
 P == 0.5; N1/N2 < 1
-7.1 NPAR TESTS.  Binomial Test
-+-+------#--------+--+--------------+----------+---------------------+
-| |      #Category| N|Observed Prop.|Test Prop.|Exact Sig. (2-tailed)|
-+-+------#--------+--+--------------+----------+---------------------+
-|x|Group1#       1| 8|          .348|      .500|                 .210|
-| |Group2#       2|15|          .652|          |                     |
-| |Total #        |23|         1.000|          |                     |
-+-+------#--------+--+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed)
+x,Group1,1,8,.348,.500,.210
+,Group2,2,15,.652,,
+,Total,,23,1.000,,
+
 P == 0.5; N1/N2 > 1
-8.1 NPAR TESTS.  Binomial Test
-+-+------#--------+--+--------------+----------+---------------------+
-| |      #Category| N|Observed Prop.|Test Prop.|Exact Sig. (2-tailed)|
-+-+------#--------+--+--------------+----------+---------------------+
-|x|Group1#       1|12|          .667|      .500|                 .238|
-| |Group2#       2| 6|          .333|          |                     |
-| |Total #        |18|         1.000|          |                     |
-+-+------#--------+--+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed)
+x,Group1,1,12,.667,.500,.238
+,Group2,2,6,.333,,
+,Total,,18,1.000,,
+
 P == 0.5; N1/N2 == 1
-9.1 NPAR TESTS.  Binomial Test
-+-+------#--------+--+--------------+----------+---------------------+
-| |      #Category| N|Observed Prop.|Test Prop.|Exact Sig. (2-tailed)|
-+-+------#--------+--+--------------+----------+---------------------+
-|x|Group1#       1|10|          .500|      .500|                1.000|
-| |Group2#       2|10|          .500|          |                     |
-| |Total #        |20|         1.000|          |                     |
-+-+------#--------+--+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed)
+x,Group1,1,10,.500,.500,1.000
+,Group2,2,10,.500,,
+,Total,,20,1.000,,
+
 P == 0.5; N1/N2 == 1 Cutpoint
-10.1 NPAR TESTS.  Binomial Test
-+-+------#--------+------+--------------+----------+---------------------+
-| |      #Category|   N  |Observed Prop.|Test Prop.|Exact Sig. (2-tailed)|
-+-+------#--------+------+--------------+----------+---------------------+
-|x|Group1#   <= 10|10.000|          .385|      .500|                 .327|
-| |Group2#        |16.000|          .615|          |                     |
-| |Total #        |26.000|         1.000|          |                     |
-+-+------#--------+------+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed)
+x,Group1,<= 10,10.000,.385,.500,.327
+,Group2,,16.000,.615,,
+,Total,,26.000,1.000,,
+
 P == 0.5; N1/N2 == 1 Named values
-11.1 NPAR TESTS.  Binomial Test
-+-+------#--------+------+--------------+----------+---------------------+
-| |      #Category|   N  |Observed Prop.|Test Prop.|Exact Sig. (2-tailed)|
-+-+------#--------+------+--------------+----------+---------------------+
-|x|Group1#  10.000|10.000|          .435|      .500|                 .678|
-| |Group2#  20.000|13.000|          .565|          |                     |
-| |Total #        |23.000|         1.000|          |                     |
-+-+------#--------+------+--------------+----------+---------------------+
+
+Table: Binomial Test
+,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed)
+x,Group1,10.000,10.000,.435,.500,.678
+,Group2,20.000,13.000,.565,,
+,Total,,23.000,1.000,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 33e2311bc9b49bfcd3756b5ccc91373d35db4fc1..a0f9fd33e6d99552ffab9ff8e9a419271af8631b 100755 (executable)
@@ -92,79 +92,62 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output 1"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - << EOF
-1.1 NPAR TESTS.  x
-+--------#----------+----------+--------+
-|        #Observed N|Expected N|Residual|
-+--------#----------+----------+--------+
-|    1.00#      3.00|      2.33|     .67|
-|    2.00#      3.00|      2.33|     .67|
-|    3.10#      4.00|      2.33|    1.67|
-|    3.20#      1.00|      2.33|   -1.33|
-|    4.00#      2.00|      2.33|    -.33|
-|    5.00#      1.00|      2.33|   -1.33|
-|Total   #     14.00|          |        |
-+--------#----------+----------+--------+
-1.2 NPAR TESTS.  y
-+--------#----------+----------+--------+
-|        #Observed N|Expected N|Residual|
-+--------#----------+----------+--------+
-|    1.00#      7.00|      3.50|    3.50|
-|    2.00#      4.00|      3.50|     .50|
-|    3.00#      1.00|      3.50|   -2.50|
-|    4.00#      2.00|      3.50|   -1.50|
-|Total   #     14.00|          |        |
-+--------#----------+----------+--------+
-1.3 NPAR TESTS.  Test Statistics
-+-----------#----+----+
-|           #  x |  y |
-+-----------#----+----+
-|Chi-Square #3.14|6.00|
-|df         #   5|   3|
-|Asymp. Sig.# .68| .11|
-+-----------#----+----+
-2.1 NPAR TESTS.  y
-+--------#----------+----------+--------+
-|        #Observed N|Expected N|Residual|
-+--------#----------+----------+--------+
-|    1.00#      7.00|      2.63|    4.38|
-|    2.00#      4.00|      3.50|     .50|
-|    3.00#      1.00|      4.38|   -3.38|
-|    4.00#      2.00|      3.50|   -1.50|
-|Total   #     14.00|          |        |
-+--------#----------+----------+--------+
-2.2 NPAR TESTS.  Test Statistics
-+-----------#-----+
-|           #  y  |
-+-----------#-----+
-|Chi-Square #10.61|
-|df         #    3|
-|Asymp. Sig.#  .01|
-+-----------#-----+
-3.1 NPAR TESTS.  Frequencies
-+-----#---------------------------------------#---------------------------------------+
-|     #                   x                   #                   y                   |
-|     #--------+----------+----------+--------#--------+----------+----------+--------+
-|     #Category|Observed N|Expected N|Residual#Category|Observed N|Expected N|Residual|
-+-----#--------+----------+----------+--------#--------+----------+----------+--------+
-|1    #    2.00|      3.00|      3.16|    -.16#    2.00|      4.00|      2.21|    1.79|
-|2    #    3.00|      5.00|      5.26|    -.26#    3.00|      1.00|      3.68|   -2.68|
-|3    #    4.00|      2.00|      1.58|     .42#    4.00|      2.00|      1.11|     .89|
-|Total#        |     10.00|          |        #        |      7.00|          |        |
-+-----#--------+----------+----------+--------#--------+----------+----------+--------+
-3.2 NPAR TESTS.  Test Statistics
-+-----------#---+----+
-|           # x |  y |
-+-----------#---+----+
-|Chi-Square #.13|4.13|
-|df         #  2|   2|
-|Asymp. Sig.#.94| .13|
-+-----------#---+----+
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: x
+,Observed N,Expected N,Residual
+1.00,3.00,2.33,.67
+2.00,3.00,2.33,.67
+3.10,4.00,2.33,1.67
+3.20,1.00,2.33,-1.33
+4.00,2.00,2.33,-.33
+5.00,1.00,2.33,-1.33
+Total,14.00,,
+
+Table: y
+,Observed N,Expected N,Residual
+1.00,7.00,3.50,3.50
+2.00,4.00,3.50,.50
+3.00,1.00,3.50,-2.50
+4.00,2.00,3.50,-1.50
+Total,14.00,,
+
+Table: Test Statistics
+,x,y
+Chi-Square,3.14,6.00
+df,5,3
+Asymp. Sig.,.68,.11
+
+Table: y
+,Observed N,Expected N,Residual
+1.00,7.00,2.63,4.38
+2.00,4.00,3.50,.50
+3.00,1.00,4.38,-3.38
+4.00,2.00,3.50,-1.50
+Total,14.00,,
+
+Table: Test Statistics
+,y
+Chi-Square,10.61
+df,3
+Asymp. Sig.,.01
+
+Table: Frequencies
+,x,,,,y,,,
+,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual
+1,2.00,3.00,3.16,-.16,2.00,4.00,2.21,1.79
+2,3.00,5.00,5.26,-.26,3.00,1.00,3.68,-2.68
+3,4.00,2.00,1.58,.42,4.00,2.00,1.11,.89
+Total,,10.00,,,,7.00,,
+
+Table: Test Statistics
+,x,y
+Chi-Square,.13,4.13
+df,2,2
+Asymp. Sig.,.94,.13
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -193,7 +176,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE  > $TEMPDIR/output
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE -e $TEMPDIR/output
 if [ $? -eq 0 ] ; then no_result ; fi
 
 activity="compare errors 2"
@@ -232,45 +215,36 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 3"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE 
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output 3"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 NPAR TESTS.  Frequencies
-+-----#---------------------------------------#---------------------------------------+
-|     #                   x                   #                   y                   |
-|     #--------+----------+----------+--------#--------+----------+----------+--------+
-|     #Category|Observed N|Expected N|Residual#Category|Observed N|Expected N|Residual|
-+-----#--------+----------+----------+--------#--------+----------+----------+--------+
-|1    #   -2.00|       .00|      1.50|   -1.50#   -2.00|       .00|      1.88|   -1.88|
-|2    #   -1.00|       .00|      1.50|   -1.50#   -1.00|       .00|      1.88|   -1.88|
-|3    #     .00|       .00|      1.50|   -1.50#     .00|       .00|      1.88|   -1.88|
-|4    #    1.00|      3.00|      1.50|    1.50#    1.00|      7.00|      1.88|    5.13|
-|5    #    2.00|      3.00|      1.50|    1.50#    2.00|      4.00|      1.88|    2.13|
-|6    #    3.00|      5.00|      1.50|    3.50#    3.00|      1.00|      1.88|    -.88|
-|7    #    4.00|       .00|      1.50|   -1.50#    4.00|      2.00|      1.88|     .13|
-|8    #    5.00|      1.00|      1.50|    -.50#    5.00|      1.00|      1.88|    -.88|
-|Total#        |     12.00|          |        #        |     15.00|          |        |
-+-----#--------+----------+----------+--------#--------+----------+----------+--------+
-1.2 NPAR TESTS.  Test Statistics
-+-----------#-----+-----+
-|           #  x  |  y  |
-+-----------#-----+-----+
-|Chi-Square #17.33|22.87|
-|df         #    7|    7|
-|Asymp. Sig.#  .02|  .00|
-+-----------#-----+-----+
-1.3 NPAR TESTS.  Descriptive Statistics
-+-#-----+----+----+----+----+
-| #  N  |Mean|Std.|Mini|Maxi|
-| #     |    |Devi| mum| mum|
-#=#=====#====#====#====#====#
-|x#12.00|2.47|1.19|1.00|5.00|
-|y#15.00|2.07|1.33|1.00|5.00|
-+-#-----+----+----+----+----+
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Frequencies
+,x,,,,y,,,
+,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual
+1,-2.00,.00,1.50,-1.50,-2.00,.00,1.88,-1.88
+2,-1.00,.00,1.50,-1.50,-1.00,.00,1.88,-1.88
+3,.00,.00,1.50,-1.50,.00,.00,1.88,-1.88
+4,1.00,3.00,1.50,1.50,1.00,7.00,1.88,5.13
+5,2.00,3.00,1.50,1.50,2.00,4.00,1.88,2.13
+6,3.00,5.00,1.50,3.50,3.00,1.00,1.88,-.88
+7,4.00,.00,1.50,-1.50,4.00,2.00,1.88,.13
+8,5.00,1.00,1.50,-.50,5.00,1.00,1.88,-.88
+Total,,12.00,,,,15.00,,
+
+Table: Test Statistics
+,x,y
+Chi-Square,17.33,22.87
+df,7,7
+Asymp. Sig.,.02,.00
+
+Table: Descriptive Statistics
+,N,Mean,Std. Deviation,Minimum,Maximum
+,,,,,
+x,12.00,2.47,1.19,1.00,5.00
+y,15.00,2.07,1.33,1.00,5.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -303,45 +277,36 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 4"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE 
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output 4"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 NPAR TESTS.  Frequencies
-+-----#---------------------------------------#---------------------------------------+
-|     #                   x                   #                   y                   |
-|     #--------+----------+----------+--------#--------+----------+----------+--------+
-|     #Category|Observed N|Expected N|Residual#Category|Observed N|Expected N|Residual|
-+-----#--------+----------+----------+--------#--------+----------+----------+--------+
-|1    #   -2.00|       .00|      1.75|   -1.75#   -2.00|       .00|      1.75|   -1.75|
-|2    #   -1.00|       .00|      1.75|   -1.75#   -1.00|       .00|      1.75|   -1.75|
-|3    #     .00|       .00|      1.75|   -1.75#     .00|       .00|      1.75|   -1.75|
-|4    #    1.00|      3.00|      1.75|    1.25#    1.00|      7.00|      1.75|    5.25|
-|5    #    2.00|      3.00|      1.75|    1.25#    2.00|      4.00|      1.75|    2.25|
-|6    #    3.00|      5.00|      1.75|    3.25#    3.00|      1.00|      1.75|    -.75|
-|7    #    4.00|      2.00|      1.75|     .25#    4.00|      2.00|      1.75|     .25|
-|8    #    5.00|      1.00|      1.75|    -.75#    5.00|       .00|      1.75|   -1.75|
-|Total#        |     14.00|          |        #        |     14.00|          |        |
-+-----#--------+----------+----------+--------#--------+----------+----------+--------+
-1.2 NPAR TESTS.  Test Statistics
-+-----------#-----+-----+
-|           #  x  |  y  |
-+-----------#-----+-----+
-|Chi-Square #13.43|26.00|
-|df         #    7|    7|
-|Asymp. Sig.#  .06|  .00|
-+-----------#-----+-----+
-1.3 NPAR TESTS.  Descriptive Statistics
-+-#-----+----+----+----+----+
-| #  N  |Mean|Std.|Mini|Maxi|
-| #     |    |Devi| mum| mum|
-#=#=====#====#====#====#====#
-|x#14.00|2.69|1.23|1.00|5.00|
-|y#14.00|1.86|1.10|1.00|4.00|
-+-#-----+----+----+----+----+
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Frequencies
+,x,,,,y,,,
+,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual
+1,-2.00,.00,1.75,-1.75,-2.00,.00,1.75,-1.75
+2,-1.00,.00,1.75,-1.75,-1.00,.00,1.75,-1.75
+3,.00,.00,1.75,-1.75,.00,.00,1.75,-1.75
+4,1.00,3.00,1.75,1.25,1.00,7.00,1.75,5.25
+5,2.00,3.00,1.75,1.25,2.00,4.00,1.75,2.25
+6,3.00,5.00,1.75,3.25,3.00,1.00,1.75,-.75
+7,4.00,2.00,1.75,.25,4.00,2.00,1.75,.25
+8,5.00,1.00,1.75,-.75,5.00,.00,1.75,-1.75
+Total,,14.00,,,,14.00,,
+
+Table: Test Statistics
+,x,y
+Chi-Square,13.43,26.00
+df,7,7
+Asymp. Sig.,.06,.00
+
+Table: Descriptive Statistics
+,N,Mean,Std. Deviation,Minimum,Maximum
+,,,,,
+x,14.00,2.69,1.23,1.00,5.00
+y,14.00,1.86,1.10,1.00,4.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 17c0c239985023f41d098e3e29596bc6956c01a8..03c8117c91ce38cf55b87635c8863bce326c7220 100755 (executable)
@@ -81,35 +81,27 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output 1"
-diff - $TEMPDIR/pspp.list <<EOF
-1.1 NPAR TESTS.  Frequencies
-#=================================#=#
-#                                 |N#
-#---------------------------------+-#
-#height - age Negative Differences|1#
-#             Positive Differences|3#
-#             Ties                |2#
-#             Total               |6#
-#---------------------------------+-#
-#rank - heightNegative Differences|3#
-#             Positive Differences|2#
-#             Ties                |1#
-#             Total               |6#
-#=================================#=#
-
-1.2 NPAR TESTS.  Test Statistics
-#=====================#============#=============#
-#                     |height - age|rank - height#
-#=====================#============#=============#
-#Exact Sig. (2-tailed)|        .625|        1.000#
-#Exact Sig. (1-tailed)|        .312|         .500#
-#Point Probability    |        .250|         .312#
-#=====================#============#=============#
-
+diff -c - $TEMPDIR/pspp.csv <<EOF
+Table: Frequencies
+,,N
+height - age,Negative Differences,1
+,Positive Differences,3
+,Ties,2
+,Total,6
+rank - height,Negative Differences,3
+,Positive Differences,2
+,Ties,1
+,Total,6
+
+Table: Test Statistics
+,height - age,rank - height
+Exact Sig. (2-tailed),.625,1.000
+Exact Sig. (1-tailed),.312,.500
+Point Probability,.250,.312
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 4242b55b6581dcd82e551392856857c7fc3919e0..f259ea957add9dd5b44d6bcb02da4f5bfcabd87e 100755 (executable)
@@ -91,37 +91,30 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="generate results"
-cat > $TEMPDIR/results.txt <<EOF
-1.1 NPAR TESTS.  Ranks
-#============================#==#=========#============#
-#                            # N|Mean Rank|Sum of Ranks#
-#============================#==#=========#============#
-#second - firstNegative Ranks# 5|     8.60|       43.00#
-#              Positive Ranks# 8|     6.00|       48.00#
-#              Ties          # 2|         |            #
-#              Total         #15|         |            #
-#============================#==#=========#============#
-
-1.2 NPAR TESTS.  Test Statistics
-#======================#==============#
-#                      #second - first#
-#======================#==============#
-#Z                     #          -.18#
-#Asymp. Sig. (2-tailed)#           .86#
-#Exact Sig. (2-tailed) #           .89#
-#Exact Sig. (1-tailed) #           .45#
-#======================#==============#
-
+cat > $TEMPDIR/results.csv <<EOF
+Table: Ranks
+,,N,Mean Rank,Sum of Ranks
+second - first,Negative Ranks,5,8.60,43.00
+,Positive Ranks,8,6.00,48.00
+,Ties,2,,
+,Total,15,,
+
+Table: Test Statistics
+,second - first
+Z,-.18
+Asymp. Sig. (2-tailed),.86
+Exact Sig. (2-tailed),.89
+Exact Sig. (1-tailed),.45
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output 1"
-diff pspp.list $TEMPDIR/results.txt
+diff -c pspp.csv $TEMPDIR/results.csv
 if [ $? -ne 0 ] ; then fail ; fi
 
 
@@ -161,11 +154,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output 2"
-diff pspp.list $TEMPDIR/results.txt
+diff pspp.csv $TEMPDIR/results.csv
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 2b16368b121d4c3b270055fe3b87fc381258a6bc..5fe701b0a225270dafe7c41fa83dce55c2d154fa 100755 (executable)
@@ -88,11 +88,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy output"
-cp $TEMPDIR/pspp.list $TEMPDIR/pspp.list1
+cp $TEMPDIR/pspp.csv $TEMPDIR/pspp.csv1
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create program 2"
@@ -126,11 +126,11 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare outputs"
-diff $TEMPDIR/pspp.list $TEMPDIR/pspp.list1
+diff $TEMPDIR/pspp.csv $TEMPDIR/pspp.csv1
 if [ $? -ne 0 ] ; then fail ; fi
 
 # Now try a missing dependent variable
@@ -166,11 +166,11 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 3"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare outputs"
-diff $TEMPDIR/pspp.list $TEMPDIR/pspp.list1
+diff $TEMPDIR/pspp.csv $TEMPDIR/pspp.csv1
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 7197a096f8ee59709e9ef7529ed7baec9c2bbf5d..35cc76de5bf55b9b9e62d759ca737bb2b70fbdd8 100755 (executable)
@@ -96,120 +96,81 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
-perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF | perl -e 's/^\s*$//g'
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|QUALITY |F8.0  |
-|BRAND   |F8.0  |
-|S       |F8.0  |
-+--------+------+
-
-Variable Value    Label
-S            1.00
-
-2.1 ONEWAY.  Descriptives
-#===============#=======#=#====#==============#==========#=======================#=======#=======#
-#               |       # |    |              |          |    95% Confidence     |       |       #
-#               |       # |    |              |          +-----------+-----------+       |       #
-#               |       #N|Mean|Std. Deviation|Std. Error|Lower Bound|Upper Bound|Minimum|Maximum#
-#===============#=======#=#====#==============#==========#===========#===========#=======#=======#
-#Breaking Strain|Aspeger#5|2.20|          1.30|       .58|        .58|       3.82|   1.00|   4.00#
-#               |Bloggs #2|3.50|          2.12|      1.50|     -15.56|      22.56|   2.00|   5.00#
-#               |Total  #7|2.57|          1.51|       .57|       1.17|       3.97|   1.00|   5.00#
-#===============#=======#=#====#==============#==========#===========#===========#=======#=======#
-
-2.2 ONEWAY.  Test of Homogeneity of Variances
-#===============#================#===#===#============#
-#               #Levene Statistic|df1|df2|Significance#
-#===============#================#===#===#============#
-#Breaking Strain#           1.086|  1|  5|        .345#
-#===============#================#===#===#============#
-
-2.3 ONEWAY.  ANOVA
-#==============================#==============#==#===========#=====#============#
-#                              #Sum of Squares|df|Mean Square|  F  |Significance#
-#===============#==============#==============#==#===========#=====#============#
-#Breaking Strain|Between Groups#          2.41| 1|      2.414|1.068|        .349#
-#               |Within Groups #         11.30| 5|      2.260|     |            #
-#               |Total         #         13.71| 6|           |     |            #
-#===============#==============#==============#==#===========#=====#============#
-
-2.4 ONEWAY.  Contrast Coefficients
-#==========#==============#
-#          # Manufacturer #
-#          #-------+------#
-#          #Aspeger|Bloggs#
-#========#=#=======#======#
-#Contrast|1#     -2|     2#
-#        |2#     -1|     1#
-#========#=#=======#======#
-
-2.5 ONEWAY.  Contrast Tests
-#===============================================#=================#==========#=====#=====#===============#
-#                                       Contrast#Value of Contrast|Std. Error|  t  |  df |Sig. (2-tailed)#
-#===============#======================#========#=================#==========#=====#=====#===============#
-#Breaking Strain|Assume equal variances|    1   #             2.60|     2.516|1.034|    5|           .349#
-#               |                      |    2   #             1.30|     1.258|1.034|    5|           .349#
-#               |Does not assume equal |    1   #             2.60|     3.219| .808|1.318|           .539#
-#               |                      |    2   #             1.30|     1.609| .808|1.318|           .539#
-#===============#======================#========#=================#==========#=====#=====#===============#
-
-Variable Value    Label
-S            2.00
-
-2.6 ONEWAY.  Descriptives
-#===============#========#=#====#==============#==========#=======================#=======#=======#
-#               |        # |    |              |          |    95% Confidence     |       |       #
-#               |        # |    |              |          +-----------+-----------+       |       #
-#               |        #N|Mean|Std. Deviation|Std. Error|Lower Bound|Upper Bound|Minimum|Maximum#
-#===============#========#=#====#==============#==========#===========#===========#=======#=======#
-#Breaking Strain|Bloggs  #3|3.00|          1.00|       .58|        .52|       5.48|   2.00|   4.00#
-#               |Charlies#5|5.00|          1.58|       .71|       3.04|       6.96|   3.00|   7.00#
-#               |Total   #8|4.25|          1.67|       .59|       2.85|       5.65|   2.00|   7.00#
-#===============#========#=#====#==============#==========#===========#===========#=======#=======#
-
-2.7 ONEWAY.  Test of Homogeneity of Variances
-#===============#================#===#===#============#
-#               #Levene Statistic|df1|df2|Significance#
-#===============#================#===#===#============#
-#Breaking Strain#            .923|  1|  6|        .374#
-#===============#================#===#===#============#
-
-2.8 ONEWAY.  ANOVA
-#==============================#==============#==#===========#=====#============#
-#                              #Sum of Squares|df|Mean Square|  F  |Significance#
-#===============#==============#==============#==#===========#=====#============#
-#Breaking Strain|Between Groups#          7.50| 1|      7.500|3.750|        .101#
-#               |Within Groups #         12.00| 6|      2.000|     |            #
-#               |Total         #         19.50| 7|           |     |            #
-#===============#==============#==============#==#===========#=====#============#
-
-2.9 ONEWAY.  Contrast Coefficients
-#==========#===============#
-#          #  Manufacturer #
-#          #------+--------#
-#          #Bloggs|Charlies#
-#========#=#======#========#
-#Contrast|1#    -2|       2#
-#        |2#    -1|       1#
-#========#=#======#========#
-
-2.10 ONEWAY.  Contrast Tests
-#===============================================#=================#==========#=====#=====#===============#
-#                                       Contrast#Value of Contrast|Std. Error|  t  |  df |Sig. (2-tailed)#
-#===============#======================#========#=================#==========#=====#=====#===============#
-#Breaking Strain|Assume equal variances|    1   #             4.00|     2.066|1.936|    6|           .101#
-#               |                      |    2   #             2.00|     1.033|1.936|    6|           .101#
-#               |Does not assume equal |    1   #             4.00|     1.826|2.191|5.882|           .072#
-#               |                      |    2   #             2.00|      .913|2.191|5.882|           .072#
-#===============#======================#========#=================#==========#=====#=====#===============#
-
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+QUALITY,F8.0
+BRAND,F8.0
+S,F8.0
+
+Variable,Value,Label
+S,1.00,
+
+Table: Descriptives
+,,,,,,95% Confidence Interval for Mean,,,
+,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum
+Breaking Strain,Aspeger,5,2.20,1.30,.58,.58,3.82,1.00,4.00
+,Bloggs,2,3.50,2.12,1.50,-15.56,22.56,2.00,5.00
+,Total,7,2.57,1.51,.57,1.17,3.97,1.00,5.00
+
+Table: Test of Homogeneity of Variances
+,Levene Statistic,df1,df2,Significance
+Breaking Strain,1.09,1,5,.35
+
+Table: ANOVA
+,,Sum of Squares,df,Mean Square,F,Significance
+Breaking Strain,Between Groups,2.41,1,2.41,1.07,.35
+,Within Groups,11.30,5,2.26,,
+,Total,13.71,6,,,
+
+Table: Contrast Coefficients
+,,Manufacturer,
+,,Aspeger,Bloggs
+Contrast,1,-2,2
+,2,-1,1
+
+Table: Contrast Tests
+,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed)
+Breaking Strain,Assume equal variances,1,2.60,2.52,1.03,5,.35
+,,2,1.30,1.26,1.03,5,.35
+,Does not assume equal,1,2.60,3.22,.81,1.32,.54
+,,2,1.30,1.61,.81,1.32,.54
+
+Variable,Value,Label
+S,2.00,
+
+Table: Descriptives
+,,,,,,95% Confidence Interval for Mean,,,
+,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum
+Breaking Strain,Bloggs,3,3.00,1.00,.58,.52,5.48,2.00,4.00
+,Charlies,5,5.00,1.58,.71,3.04,6.96,3.00,7.00
+,Total,8,4.25,1.67,.59,2.85,5.65,2.00,7.00
+
+Table: Test of Homogeneity of Variances
+,Levene Statistic,df1,df2,Significance
+Breaking Strain,.92,1,6,.37
+
+Table: ANOVA
+,,Sum of Squares,df,Mean Square,F,Significance
+Breaking Strain,Between Groups,7.50,1,7.50,3.75,.10
+,Within Groups,12.00,6,2.00,,
+,Total,19.50,7,,,
+
+Table: Contrast Coefficients
+,,Manufacturer,
+,,Bloggs,Charlies
+Contrast,1,-2,2
+,2,-1,1
+
+Table: Contrast Tests
+,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed)
+Breaking Strain,Assume equal variances,1,4.00,2.07,1.94,6,.10
+,,2,2.00,1.03,1.94,6,.10
+,Does not assume equal,1,4.00,1.83,2.19,5.88,.07
+,,2,2.00,.91,2.19,5.88,.07
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 339456d3d9680dd327fbeebc34344558d3504db4..cb7fb79b1447744ad09b021a13dbfb5ff7f9eff7 100755 (executable)
@@ -93,61 +93,45 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|QUALITY |F8.0  |
-|BRAND   |F8.0  |
-+--------+------+
-2.1 ONEWAY.  Descriptives
-#===============#========#==#====#==============#==========#=======================#=======#=======#
-#               |        #  |    |              |          |95% Confidence Interval|       |       #
-#               |        #  |    |              |          +-----------+-----------+       |       #
-#               |        # N|Mean|Std. Deviation|Std. Error|Lower Bound|Upper Bound|Minimum|Maximum#
-#===============#========#==#====#==============#==========#===========#===========#=======#=======#
-#Breaking Strain|Aspeger # 5|2.20|          1.30|       .58|        .58|       3.82|   1.00|   4.00#
-#               |Bloggs  # 5|3.20|          1.30|       .58|       1.58|       4.82|   2.00|   5.00#
-#               |Charlies# 5|5.00|          1.58|       .71|       3.04|       6.96|   3.00|   7.00#
-#               |Total   #15|3.47|          1.77|       .46|       2.49|       4.45|   1.00|   7.00#
-#===============#========#==#====#==============#==========#===========#===========#=======#=======#
-2.2 ONEWAY.  Test of Homogeneity of Variances
-#===============#================#===#===#============#
-#               #Levene Statistic|df1|df2|Significance#
-#===============#================#===#===#============#
-#Breaking Strain#             .09|  2| 12|         .91#
-#===============#================#===#===#============#
-2.3 ONEWAY.  ANOVA
-#==============================#==============#==#===========#====#============#
-#                              #Sum of Squares|df|Mean Square|  F |Significance#
-#===============#==============#==============#==#===========#====#============#
-#Breaking Strain|Between Groups#         20.13| 2|      10.07|5.12|         .02#
-#               |Within Groups #         23.60|12|       1.97|    |            #
-#               |Total         #         43.73|14|           |    |            #
-#===============#==============#==============#==#===========#====#============#
-2.4 ONEWAY.  Contrast Coefficients
-#==========#=======================#
-#          #      Manufacturer     #
-#          #-------+------+--------#
-#          #Aspeger|Bloggs|Charlies#
-#========#=#=======#======#========#
-#Contrast|1#     -2|     1|       1#
-#        |2#      0|    -1|       1#
-#========#=#=======#======#========#
-2.5 ONEWAY.  Contrast Tests
-#===============================================#=================#==========#====#====#===============#
-#                                       Contrast#Value of Contrast|Std. Error|  t | df |Sig. (2-tailed)#
-#===============#======================#========#=================#==========#====#====#===============#
-#Breaking Strain|Assume equal variances|    1   #             3.80|      1.54|2.47|  12|            .03#
-#               |                      |    2   #             1.80|       .89|2.03|  12|            .07#
-#               |Does not assume equal |    1   #             3.80|      1.48|2.56|8.74|            .03#
-#               |                      |    2   #             1.80|       .92|1.96|7.72|            .09#
-#===============#======================#========#=================#==========#====#====#===============#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+QUALITY,F8.0
+BRAND,F8.0
+
+Table: Descriptives
+,,,,,,95% Confidence Interval for Mean,,,
+,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum
+Breaking Strain,Aspeger,5,2.20,1.30,.58,.58,3.82,1.00,4.00
+,Bloggs,5,3.20,1.30,.58,1.58,4.82,2.00,5.00
+,Charlies,5,5.00,1.58,.71,3.04,6.96,3.00,7.00
+,Total,15,3.47,1.77,.46,2.49,4.45,1.00,7.00
+
+Table: Test of Homogeneity of Variances
+,Levene Statistic,df1,df2,Significance
+Breaking Strain,.09,2,12,.91
+
+Table: ANOVA
+,,Sum of Squares,df,Mean Square,F,Significance
+Breaking Strain,Between Groups,20.13,2,10.07,5.12,.02
+,Within Groups,23.60,12,1.97,,
+,Total,43.73,14,,,
+
+Table: Contrast Coefficients
+,,Manufacturer,,
+,,Aspeger,Bloggs,Charlies
+Contrast,1,-2,1,1
+,2,0,-1,1
+
+Table: Contrast Tests
+,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed)
+Breaking Strain,Assume equal variances,1,3.80,1.54,2.47,12,.03
+,,2,1.80,.89,2.03,12,.07
+,Does not assume equal,1,3.80,1.48,2.56,8.74,.03
+,,2,1.80,.92,1.96,7.72,.09
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index db54cd5ade4ae8ec0b5fd8fbccc07aee8ea8d5e1..0234187ee825d02f276c1dabe38e0d13c20d5541 100755 (executable)
@@ -70,7 +70,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/per.sps
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/per.sps
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="Check Permissions"
@@ -86,7 +86,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/per.sps
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/per.sps
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="Check Permissions"
index 5fb730063ff4721779e0075d515f78bc96944eb1..b8ac189ee5237b8b86f8ed5aae0de66c98a06021 100755 (executable)
@@ -79,7 +79,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
index 4a0527588de2cb321887549d094b5927433e6cbb..a0b806e5e0f6453f55bad717a3a644b9acf5da50 100755 (executable)
@@ -105,7 +105,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode --error-file=$TEMPDIR/errs $TEMPDIR/print.stat 
+$SUPERVISOR $PSPP -o pspp.csv --error-file=$TEMPDIR/errs $TEMPDIR/print.stat 
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare print.out"
@@ -159,32 +159,56 @@ EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare output"
-diff $TEMPDIR/pspp.list - << EOF
+diff $TEMPDIR/pspp.csv - << EOF
 1 2 
 
+
+
 12
+
 1 -2 
 
+
+
 3 4 
 
+
+
 34
+
 3 -4 
 
+
+
 . 6 
 
+
+
 .6
+
 . -6 
 
+
+
 7 . 
 
+
+
 7.
+
 7 -. 
 
+
+
 9 0 
 
+
+
 90
+
 9 -0 
 
+
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index d98c8e2211c67b0316334b2973f84ed9e726f00f..67e19c9fda6bcc5828418a46fa1fe9c58284521e 100755 (executable)
@@ -82,7 +82,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 # Check that it properly handles failed transformations.
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -e $TEMPDIR/err $TESTFILE 
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv -e $TEMPDIR/err $TESTFILE 
 if [ $? -ne 1 ] ; then fail ; fi
 
 activity="diff 1"
@@ -131,12 +131,12 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program (syntax errors)"
-$SUPERVISOR $PSPP --testing-mode -e $TEMPDIR/errs $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e $TEMPDIR/errs $TESTFILE 
 if [ $? -ne 1 ] ; then fail ; fi
 
 activity="compare errors"
 perl -pi -e 's/^\s*$//g' $TEMPDIR/errs
-diff  -b $TEMPDIR/errs - << EOF
+diff -b $TEMPDIR/errs - << EOF
 $TEMPDIR/rank.sh.sps:15: error: RANK: Syntax error expecting \`(' at end of command.
 $TEMPDIR/rank.sh.sps:19: error: RANK: Syntax error expecting integer at \`d'.
 $TEMPDIR/rank.sh.sps:25: error: RANK: Variable x already exists.
@@ -359,199 +359,247 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 3"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output 3"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
+diff -c $TEMPDIR/pspp.csv - <<EOF
 Simple example using defaults
+
 Variables Created By RANK
+
+
+
 x into Rx(RANK of x)
-       x        Rx
--------- ---------
-      -1     1.000 
-       0     2.000 
-       1     3.000 
-       2     4.500 
-       2     4.500 
-       4     6.000 
-       5     7.000 
+
+Table: Data List
+x,Rx
+-1,1.000
+0,2.000
+1,3.000
+2,4.500
+2,4.500
+4,6.000
+5,7.000
+
 Variables Created By RANK
+
+
+
 a into Ra(RANK of a)
+
 b into Rb(RANK of b)
+
 a into RFR001(RFRACTION of a)
+
 b into RFR002(RFRACTION of b)
+
 a into count(N of a)
+
 b into Nb(N of b)
-1.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|a       |Format: F8.2                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|b       |Format: F8.2                               |       2|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|count   |N of a                                     |       3|
-|        |Format: F6.0                               |        |
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|Ra      |RANK of a                                  |       4|
-|        |Format: F9.3                               |        |
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|Rb      |RANK of b                                  |       5|
-|        |Format: F9.3                               |        |
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|RFR001  |RFRACTION of a                             |       6|
-|        |Format: F6.4                               |        |
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|RFR002  |RFRACTION of b                             |       7|
-|        |Format: F6.4                               |        |
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|Nb      |N of b                                     |       8|
-|        |Format: F6.0                               |        |
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-       a        b  count        Ra        Rb RFR001 RFR002     Nb
--------- -------- ------ --------- --------- ------ ------ ------
-     .00    24.00     10    10.000     8.000 1.0000  .8889      9 
-    1.00    32.00     10     9.000     4.000  .9000  .4444      9 
-    2.00    31.00     10     8.000     5.000  .8000  .5556      9 
-    2.00    32.00     10     8.000     4.000  .8000  .4444      9 
-    4.00    30.00     10     6.000     6.000  .6000  .6667      9 
-    5.00    29.00     10     5.000     7.000  .5000  .7778      9 
-    6.00     1.00     10     4.000     9.000  .4000 1.0000      9 
-    7.00    43.00     10     3.000     2.000  .3000  .2222      9 
-    8.00      .       10     2.000      .     .2000  .          . 
-    9.00    45.00     10     1.000     1.000  .1000  .1111      9 
+
+Variable,Description,,Position
+a,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+b,Format: F8.2,,2
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+count,N of a,,3
+,Format: F6.0,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+Ra,RANK of a,,4
+,Format: F9.3,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+Rb,RANK of b,,5
+,Format: F9.3,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+RFR001,RFRACTION of a,,6
+,Format: F6.4,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+RFR002,RFRACTION of b,,7
+,Format: F6.4,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+Nb,N of b,,8
+,Format: F6.0,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
+Table: Data List
+a,b,count,Ra,Rb,RFR001,RFR002,Nb
+.00,24.00,10,10.000,8.000,1.0000,.8889,9
+1.00,32.00,10,9.000,4.000,.9000,.4444,9
+2.00,31.00,10,8.000,5.000,.8000,.5556,9
+2.00,32.00,10,8.000,4.000,.8000,.4444,9
+4.00,30.00,10,6.000,6.000,.6000,.6667,9
+5.00,29.00,10,5.000,7.000,.5000,.7778,9
+6.00,1.00,10,4.000,9.000,.4000,1.0000,9
+7.00,43.00,10,3.000,2.000,.3000,.2222,9
+8.00,.  ,10,2.000,.   ,.2000,.    ,.
+9.00,45.00,10,1.000,1.000,.1000,.1111,9
+
 Test variable name fallback
+
 Variables Created By RANK
+
+
+
 foo into RAN001(RANK of foo)
-2.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|foo     |Format: F8.2                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|rfoo    |Format: F8.2                               |       2|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|ran003  |Format: F8.2                               |       3|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
-|RAN001  |RANK of foo                                |       4|
-|        |Format: F9.3                               |        |
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 8                           |        |
-+--------+-------------------------------------------+--------+
+
+Variable,Description,,Position
+foo,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+rfoo,Format: F8.2,,2
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+ran003,Format: F8.2,,3
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+RAN001,RANK of foo,,4
+,Format: F9.3,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
 Variables Created By RANK
+
+
+
 a into Sa(SAVAGE of a)
+
 a into Pa(PERCENT of a)
+
 a into PRO001(PROPORTION of a using BLOM)
+
 a into Na(NTILES of a)
+
 a into NOR001(NORMAL of a using BLOM)
-       a        b       Sa     Pa PRO001  Na NOR001
--------- -------- -------- ------ ------ --- ------
-     .00    24.00   -.9000  10.00  .0610   1 -1.547 
-    1.00    32.00   -.7889  20.00  .1585   1 -1.000 
-    2.00    31.00   -.5925  30.00  .2561   2 -.6554 
-    2.00    32.00   -.5925  30.00  .2561   2 -.6554 
-    4.00    30.00   -.3544  40.00  .3537   2 -.3755 
-    5.00    29.00   -.1544  50.00  .4512   2 -.1226 
-    6.00     1.00    .0956  60.00  .5488   3  .1226 
-    7.00    43.00    .4290  70.00  .6463   3  .3755 
-    8.00     8.00    .9290  80.00  .7439   3  .6554 
-    9.00    45.00   1.9290  90.00  .8415   4 1.0005 
+
+Table: Data List
+a,b,Sa,Pa,PRO001,Na,NOR001
+.00,24.00,-.9000,10.00,.0610,1,-1.547
+1.00,32.00,-.7889,20.00,.1585,1,-1.000
+2.00,31.00,-.5925,30.00,.2561,2,-.6554
+2.00,32.00,-.5925,30.00,.2561,2,-.6554
+4.00,30.00,-.3544,40.00,.3537,2,-.3755
+5.00,29.00,-.1544,50.00,.4512,2,-.1226
+6.00,1.00,.0956,60.00,.5488,3,.1226
+7.00,43.00,.4290,70.00,.6463,3,.3755
+8.00,8.00,.9290,80.00,.7439,3,.6554
+9.00,45.00,1.9290,90.00,.8415,4,1.0005
+
 Variables Created By RANK
+
+
+
 a into Ra(RANK of a BY g2 g1)
+
 a into Na(NORMAL of a using RANKIT BY g2 g1)
+
 Variables Created By RANK
+
+
+
 a into RAN001(RANK of a BY g2)
+
 a into NOR001(NORMAL of a using RANKIT BY g2)
-       a       g1       g2        Ra     Na    RAN001 NOR001 
--------- -------- -------- --------- ------ --------- ------ 
-    2.00     1.00     2.00     8.000  .9674     4.000  .5244  
-    2.00     1.00     2.00     8.000  .9674     4.000  .5244  
-    3.00     1.00     2.00     7.000  .5895     3.000  .0000  
-    4.00     1.00     2.00     6.000  .2822     2.000 -.5244  
-    5.00     1.00     2.00     5.000  .0000     1.000 -1.282  
-    1.00      .00     2.00     8.000 1.5341     8.000 1.5341  
-    2.00      .00     2.00     7.000  .8871     7.000  .8871  
-    3.00      .00     2.00     6.000  .4888     6.000  .4888  
-    4.00      .00     2.00     5.000  .1573     5.000  .1573  
-    5.00      .00     2.00     4.000 -.1573     4.000 -.1573  
-    6.00      .00     2.00     3.000 -.4888     3.000 -.4888  
-    7.00      .00     2.00     2.000 -.8871     2.000 -.8871  
-    8.00      .00     2.00     1.000 -1.534     1.000 -1.534  
-    6.00     1.00     2.00     4.000 -.2822     4.000 1.1503  
-    7.00     1.00     2.00     2.000 -.9674     2.000 -.3186  
-    7.00     1.00     2.00     2.000 -.9674     2.000 -.3186  
-    8.00     1.00     2.00     1.000 -1.593     1.000 -1.150  
-    9.00     1.00     1.00     1.000  .0000     1.000  .0000  
+
+Table: Data List
+a,g1,g2,Ra,Na,RAN001,NOR001
+2.00,1.00,2.00,8.000,.9674,4.000,.5244
+2.00,1.00,2.00,8.000,.9674,4.000,.5244
+3.00,1.00,2.00,7.000,.5895,3.000,.0000
+4.00,1.00,2.00,6.000,.2822,2.000,-.5244
+5.00,1.00,2.00,5.000,.0000,1.000,-1.282
+1.00,.00,2.00,8.000,1.5341,8.000,1.5341
+2.00,.00,2.00,7.000,.8871,7.000,.8871
+3.00,.00,2.00,6.000,.4888,6.000,.4888
+4.00,.00,2.00,5.000,.1573,5.000,.1573
+5.00,.00,2.00,4.000,-.1573,4.000,-.1573
+6.00,.00,2.00,3.000,-.4888,3.000,-.4888
+7.00,.00,2.00,2.000,-.8871,2.000,-.8871
+8.00,.00,2.00,1.000,-1.534,1.000,-1.534
+6.00,1.00,2.00,4.000,-.2822,4.000,1.1503
+7.00,1.00,2.00,2.000,-.9674,2.000,-.3186
+7.00,1.00,2.00,2.000,-.9674,2.000,-.3186
+8.00,1.00,2.00,1.000,-1.593,1.000,-1.150
+9.00,1.00,1.00,1.000,.0000,1.000,.0000
+
 fractional ranks ( including small ones for special case of SAVAGE ranks)
+
 Variables Created By RANK
+
+
+
 a into Pa(PROPORTION of a using TUKEY)
+
 a into Sa(SAVAGE of a)
-       a        w     Pa       Sa
--------- -------- ------ --------
-    1.00     1.50  .1285   -.8016 
-    2.00      .20  .1776   -.6905 
-    3.00      .10  .1986   -.6905 
-    4.00     1.00  .3458   -.5305 
-    5.00     1.00  .4860   -.2905 
-    6.00     1.00  .6262    .0262 
-    7.00     1.00  .7664    .4929 
-    8.00     1.00  .9065   1.3929 
+
+Table: Data List
+a,w,Pa,Sa
+1.00,1.50,.1285,-.8016
+2.00,.20,.1776,-.6905
+3.00,.10,.1986,-.6905
+4.00,1.00,.3458,-.5305
+5.00,1.00,.4860,-.2905
+6.00,1.00,.6262,.0262
+7.00,1.00,.7664,.4929
+8.00,1.00,.9065,1.3929
+
 test all the ties cases with low caseweight values
+
 Variables Created By RANK
+
+
+
 x into xl(RANK of x)
+
 Variables Created By RANK
+
+
+
 x into xh(RANK of x)
+
 Variables Created By RANK
+
+
+
 x into xc(RANK of x)
+
 Variables Created By RANK
+
+
+
 x into Nx(NORMAL of x using VW)
-       x        w        xl        xh        xc     Nx
--------- -------- --------- --------- --------- ------
-    1.00      .10      .000      .100     1.000 -1.938 
-    2.00      .10      .100      .200     2.000 -1.412 
-    3.00      .10      .200      .300     3.000 -1.119 
-    4.00      .20      .300      .500     4.000 -.8046 
-    5.00      .10      .500      .600     5.000 -.5549 
-    6.00      .10      .600      .700     6.000 -.4067 
-    7.00      .10      .700      .800     7.000 -.2670 
-    8.00      .10      .800      .900     8.000 -.1323 
+
+Table: Data List
+x,w,xl,xh,xc,Nx
+1.00,.10,.000,.100,1.000,-1.938
+2.00,.10,.100,.200,2.000,-1.412
+3.00,.10,.200,.300,3.000,-1.119
+4.00,.20,.300,.500,4.000,-.8046
+5.00,.10,.500,.600,5.000,-.5549
+6.00,.10,.600,.700,6.000,-.4067
+7.00,.10,.700,.800,7.000,-.2670
+8.00,.10,.800,.900,8.000,-.1323
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -581,31 +629,41 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 4"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 0 ] ; then fail ; fi
 
 
 activity="compare output 4"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - << EOF
-$TEMPDIR/rank.sh.sps:3: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate.
-$TEMPDIR/rank.sh.sps:4: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate.
-$TEMPDIR/rank.sh.sps:5: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate.
-$TEMPDIR/rank.sh.sps:6: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate.
-$TEMPDIR/rank.sh.sps:7: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate.
-$TEMPDIR/rank.sh.sps:8: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate.
-$TEMPDIR/rank.sh.sps:9: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate.
+diff -c $TEMPDIR/pspp.csv - << EOF
+"$TEMPDIR/rank.sh.sps:3: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate."
+
+"$TEMPDIR/rank.sh.sps:4: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate."
+
+"$TEMPDIR/rank.sh.sps:5: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate."
+
+"$TEMPDIR/rank.sh.sps:6: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate."
+
+"$TEMPDIR/rank.sh.sps:7: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate."
+
+"$TEMPDIR/rank.sh.sps:8: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate."
+
+"$TEMPDIR/rank.sh.sps:9: warning: BEGIN DATA: Missing value(s) for all variables from rx onward.  These will be filled with the system-missing value or blanks, as appropriate."
+
 Variables Created By RANK
+
+
+
 x into RNKRA01(RANK of x)
-       x       rx   RNKRA01
--------- -------- ---------
-    1.00      .       1.000 
-    2.00      .       2.000 
-    3.00      .       3.000 
-    4.00      .       4.000 
-    5.00      .       5.000 
-    6.00      .       6.000 
-    7.00      .       7.000 
+
+Table: Data List
+x,rx,RNKRA01
+1.00,.  ,1.000
+2.00,.  ,2.000
+3.00,.  ,3.000
+4.00,.  ,4.000
+5.00,.  ,5.000
+6.00,.  ,6.000
+7.00,.  ,7.000
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 6f9b3490cb96cc1716935fdf46009904919b4fa4..7cbb81564742f7c3790320975c10ba61e2892b33 100755 (executable)
@@ -1566,40 +1566,30 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|v0      |F8.0  |
-|v1      |F8.0  |
-+--------+------+
-2.1 REGRESSION.  Model Summary
-#============#========#=================#==========================#
-#          R #R Square|Adjusted R Square|Std. Error of the Estimate#
-#========#===#========#=================#==========================#
-#        |.05#     .00|              .00|                      8.11#
-#========#===#========#=================#==========================#
-2.2 REGRESSION.  ANOVA
-#===================#==============#====#===========#====#============#
-#                   #Sum of Squares| df |Mean Square|  F |Significance#
-#========#==========#==============#====#===========#====#============#
-#        |Regression#        235.23|   1|     235.23|3.58|         .06#
-#        |Residual  #      98438.40|1498|      65.71|    |            #
-#        |Total     #      98673.63|1499|           |    |            #
-#========#==========#==============#====#===========#====#============#
-2.3 REGRESSION.  Coefficients
-#===================#====#==========#====#====#============#
-#                   #  B |Std. Error|Beta|  t |Significance#
-#========#==========#====#==========#====#====#============#
-#        |(Constant)#1.24|       .42| .00|2.95|         .21#
-#        |    v1    #1.37|       .72| .05|1.89|         .06#
-#        |          #    |          |    |    |            #
-#========#==========#====#==========#====#====#============#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+v0,F8.0
+v1,F8.0
+
+Table: Model Summary
+,R,R Square,Adjusted R Square,Std. Error of the Estimate
+,.05,.00,.00,8.11
+
+Table: ANOVA
+,,Sum of Squares,df,Mean Square,F,Significance
+,Regression,235.23,1,235.23,3.58,.06
+,Residual,98438.40,1498,65.71,,
+,Total,98673.63,1499,,,
+
+Table: Coefficients
+,,B,Std. Error,Beta,t,Significance
+,(Constant),1.24,.42,.00,2.95,.21
+,v1,1.37,.72,.05,1.89,.06
+,,,,,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 9f8da00249a9682aa106bf521f0bf05203d8ddc2..4ff48e51f28bf56928b00f46880910e0eabe2d5b 100755 (executable)
@@ -78,54 +78,45 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|v0      |F8.0  |
-|v1      |F8.0  |
-|v2      |F8.0  |
-+--------+------+
-2.1 REGRESSION.  Model Summary
-#============#========#=================#==========================#
-#          R #R Square|Adjusted R Square|Std. Error of the Estimate#
-#========#===#========#=================#==========================#
-#        |.97#     .94|              .93|                      1.34#
-#========#===#========#=================#==========================#
-2.2 REGRESSION.  ANOVA
-#===================#==============#==#===========#=====#============#
-#                   #Sum of Squares|df|Mean Square|  F  |Significance#
-#========#==========#==============#==#===========#=====#============#
-#        |Regression#        202.75| 2|     101.38|56.75|         .00#
-#        |Residual  #         12.50| 7|       1.79|     |            #
-#        |Total     #        215.26| 9|           |     |            #
-#========#==========#==============#==#===========#=====#============#
-2.3 REGRESSION.  Coefficients
-#===================#=====#==========#=====#======#============#
-#                   #  B  |Std. Error| Beta|   t  |Significance#
-#========#==========#=====#==========#=====#======#============#
-#        |(Constant)# 2.19|      2.36|  .00|   .93|         .52#
-#        |    v0    # 1.81|      1.05|  .17|  1.72|         .12#
-#        |    v1    #-3.43|       .33|-1.03|-10.33|         .00#
-#        |          #     |          |     |      |            #
-#========#==========#=====#==========#=====#======#============#
-      v0       v1       v2     RES1    PRED1
--------- -------- -------- -------- --------
-     .65     7.74   -23.98     -.84   -23.13 
-    -.13     6.14   -19.64     -.54   -19.10 
-     .35     7.65   -25.27    -1.87   -23.40 
-     .69     6.13   -16.57      .97   -17.54 
-    -.07     8.25   -25.80      .40   -26.20 
-    -.34     6.03   -17.57     1.53   -19.10 
-     .76     9.83   -28.36     1.77   -30.13 
-    -.47     5.34   -16.80      .18   -16.97 
-    -.06     8.84   -29.26    -1.05   -28.21 
-     .56     6.20   -18.58     -.54   -18.04 
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+v0,F8.0
+v1,F8.0
+v2,F8.0
+
+Table: Model Summary
+,R,R Square,Adjusted R Square,Std. Error of the Estimate
+,.97,.94,.93,1.34
+
+Table: ANOVA
+,,Sum of Squares,df,Mean Square,F,Significance
+,Regression,202.75,2,101.38,56.75,.00
+,Residual,12.50,7,1.79,,
+,Total,215.26,9,,,
+
+Table: Coefficients
+,,B,Std. Error,Beta,t,Significance
+,(Constant),2.19,2.36,.00,.93,.52
+,v0,1.81,1.05,.17,1.72,.12
+,v1,-3.43,.33,-1.03,-10.33,.00
+,,,,,,
+
+Table: Data List
+v0,v1,v2,RES1,PRED1
+.65,7.74,-23.98,-.84,-23.13
+-.13,6.14,-19.64,-.54,-19.10
+.35,7.65,-25.27,-1.87,-23.40
+.69,6.13,-16.57,.97,-17.54
+-.07,8.25,-25.80,.40,-26.20
+-.34,6.03,-17.57,1.53,-19.10
+.76,9.83,-28.36,1.77,-30.13
+-.47,5.34,-16.80,.18,-16.97
+-.06,8.84,-29.26,-1.05,-28.21
+.56,6.20,-18.58,-.54,-18.04
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index ed4b4b854c4a67f416be869d0705b8839fda9318..518fb10286758db91bd9ec8d0e44899c5ec862d3 100755 (executable)
@@ -245,99 +245,72 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-diff pspp.list - << EOF
+diff -c pspp.csv - << EOF
 Scale: Everything
 
-1.1 RELIABILITY.  Case Processing Summary
-#==============#===#======#
-#              # N |   %  #
-#==============#===#======#
-#Cases Valid   #131| 92.91#
-#      Excluded# 10|  7.09#
-#      Total   #141|100.00#
-#==============#===#======#
-
-1.2 RELIABILITY.  Reliability Statistics
-#================#==========#
-#Cronbach's Alpha#N of items#
-#================#==========#
-#             .75#         4#
-#================#==========#
+Table: Case Processing Summary
+,,N,%
+Cases,Valid,131,92.91
+,Excluded,10,7.09
+,Total,141,100.00
+
+Table: Reliability Statistics
+Cronbach's Alpha,N of Items
+.75,4
 
 Scale: Nothing
 
-2.1 RELIABILITY.  Case Processing Summary
-#==============#===#======#
-#              # N |   %  #
-#==============#===#======#
-#Cases Valid   #131| 92.91#
-#      Excluded# 10|  7.09#
-#      Total   #141|100.00#
-#==============#===#======#
-
-2.2 RELIABILITY.  Reliability Statistics
-#==========================================================#===#
-#Cronbach's Alpha               Part 1           Value     #.55#
-#                                                N of Items#  2#
-#                               Part 2           Value     #.63#
-#                                                N of Items#  2#
-#                               Total N of Items           #  4#
-#Correlation Between Forms                                 #.61#
-#Spearman-Brown Coefficient     Equal Length               #.75#
-#                               Unequal Length             #.75#
-#Guttman Split-Half Coefficient                            #.75#
-#==========================================================#===#
+Table: Case Processing Summary
+,,N,%
+Cases,Valid,131,92.91
+,Excluded,10,7.09
+,Total,141,100.00
+
+Table: Reliability Statistics
+Cronbach's Alpha,Part 1,Value,.55
+,,N of Items,2
+,Part 2,Value,.63
+,,N of Items,2
+,Total N of Items,,4
+Correlation Between Forms,,,.61
+Spearman-Brown Coefficient,Equal Length,,.75
+,Unequal Length,,.75
+Guttman Split-Half Coefficient,,,.75
 
 Scale: Totals
 
-3.1 RELIABILITY.  Case Processing Summary
-#==============#===#======#
-#              # N |   %  #
-#==============#===#======#
-#Cases Valid   #131| 92.91#
-#      Excluded# 10|  7.09#
-#      Total   #141|100.00#
-#==============#===#======#
-
-3.2 RELIABILITY.  Reliability Statistics
-#================#==========#
-#Cronbach's Alpha#N of items#
-#================#==========#
-#             .75#         4#
-#================#==========#
-
-3.3 RELIABILITY.  Item-Total Statistics
-#=====#==========================#==============================#================================#================================#
-#     #Scale Mean if Item Deleted|Scale Variance if Item Deleted|Corrected Item-Total Correlation|Cronbach's Alpha if Item Deleted#
-#=====#==========================#==============================#================================#================================#
-#var6 #                     15.97|                          8.43|                             .51|                             .71#
-#var8 #                     16.56|                          7.86|                             .53|                             .70#
-#var15#                     16.47|                          8.45|                             .56|                             .68#
-#var17#                     16.60|                          8.00|                             .57|                             .67#
-#=====#==========================#==============================#================================#================================#
+Table: Case Processing Summary
+,,N,%
+Cases,Valid,131,92.91
+,Excluded,10,7.09
+,Total,141,100.00
+
+Table: Reliability Statistics
+Cronbach's Alpha,N of Items
+.75,4
+
+Table: Item-Total Statistics
+,Scale Mean if Item Deleted,Scale Variance if Item Deleted,Corrected Item-Total Correlation,Cronbach's Alpha if Item Deleted
+var6,15.97,8.43,.51,.71
+var8,16.56,7.86,.53,.70
+var15,16.47,8.45,.56,.68
+var17,16.60,8.00,.57,.67
 
 Scale: ANY
 
-4.1 RELIABILITY.  Case Processing Summary
-#==============#===#======#
-#              # N |   %  #
-#==============#===#======#
-#Cases Valid   #131| 92.91#
-#      Excluded# 10|  7.09#
-#      Total   #141|100.00#
-#==============#===#======#
-
-4.2 RELIABILITY.  Reliability Statistics
-#================#==========#
-#Cronbach's Alpha#N of items#
-#================#==========#
-#             .75#         4#
-#================#==========#
+Table: Case Processing Summary
+,,N,%
+Cases,Valid,131,92.91
+,Excluded,10,7.09
+,Total,141,100.00
 
+Table: Reliability Statistics
+Cronbach's Alpha,N of Items
+.75,4
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index ff46486a3f0ef81ae420e90a6bf2da75539f42e0..1e08782a4af0dc434c4008ce5b855683b053dfaa 100755 (executable)
@@ -80,7 +80,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="check sysfile"
@@ -88,27 +88,25 @@ grep -i Brake $TEMPDIR/rename.sav
 if [ $? -eq 0 ] ; then fail ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+----------+------+
-| Variable |Format|
-#==========#======#
-|brakeFluid|F8.0  |
-|y         |F8.0  |
-+----------+------+
-brakeFluid        y
----------- --------
-      1.00     3.00 
-      2.00     3.00 
-      3.00     3.00 
-      4.00     3.00 
-applecarts        y
----------- --------
-      1.00     3.00 
-      2.00     3.00 
-      3.00     3.00 
-      4.00     3.00 
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+brakeFluid,F8.0
+y,F8.0
+
+Table: Data List
+brakeFluid,y
+1.00,3.00
+2.00,3.00
+3.00,3.00
+4.00,3.00
+
+Table: Data List
+applecarts,y
+1.00,3.00
+2.00,3.00
+3.00,3.00
+4.00,3.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 0c24f0c585961f799c6ccd23fdddfd0ab1dd3381..c6ab046145e15863f7faece56d8537e66e66e01b 100755 (executable)
@@ -94,79 +94,59 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 ROC.  Case Summary
-#========#===================#
-#        # Valid N (listwise)#
-#        #==========#========#
-#a       #Unweighted|Weighted#
-#========#==========#========#
-#Positive#         5|  50.000#
-#Negative#         5|  50.000#
-#========#==========#========#
-1.2 ROC.  Area Under the Curve (x)
-#====#==========#===============#=======================#
-#    |          |               | Asymp. 99% Confidence #
-#    |          |               +-----------+-----------#
-#Area|Std. Error|Asymptotic Sig.|Lower Bound|Upper Bound#
-#====#==========#===============#===========#===========#
-#.910|      .030|           .000|       .839|       .981#
-#====#==========#===============#===========#===========#
-1.3 ROC.  Coordinates of the Curve (x)
-#====================================#===========#===============#
-#Positive if greater than or equal to|Sensitivity|1 - Specificity#
-#====================================#===========#===============#
-#                                .000|      1.000|          1.000#
-#                               1.500|       .960|           .440#
-#                               2.500|       .880|           .160#
-#                               3.500|       .680|           .060#
-#                               4.500|       .400|           .020#
-#                               6.000|       .000|           .000#
-#====================================#===========#===============#
-2.1 ROC.  Case Summary
-#========#===================#
-#        # Valid N (listwise)#
-#        #==========#========#
-#a       #Unweighted|Weighted#
-#========#==========#========#
-#Positive#         5|  50.000#
-#Negative#         5|  50.000#
-#========#==========#========#
-See pspp-1.png for a chart.
-2.2 ROC.  Area Under the Curve
-#===================#====#==========#===============#=======================#
-#                   #    |          |               | Asymp. 95%            #
-#                   #    |          |               +-----------+-----------#
-#Variable under test#Area|Std. Error|Asymptotic Sig.|Lower Bound|Upper Bound#
-#===================#====#==========#===============#===========#===========#
-#                  x#.910|      .030|           .000|       .860|       .960#
-#                  y#.697|      .052|           .001|       .611|       .783#
-#===================#====#==========#===============#===========#===========#
-2.3 ROC.  Coordinates of the Curve
-#=============#====================================#===========#===============#
-#Test variable#Positive if greater than or equal to|Sensitivity|1 - Specificity#
-#=============#====================================#===========#===============#
-#            x#                                .000|      1.000|          1.000#
-#             #                               1.500|       .960|           .440#
-#             #                               2.500|       .880|           .160#
-#             #                               3.500|       .680|           .060#
-#             #                               4.500|       .400|           .020#
-#             #                               6.000|       .000|           .000#
-#-------------#------------------------------------+-----------+---------------#
-#            y#                                .000|      1.000|          1.000#
-#             #                               1.500|       .960|           .900#
-#             #                               2.500|       .680|           .340#
-#             #                               3.000|       .600|           .340#
-#             #                               3.500|       .600|           .300#
-#             #                               4.500|       .200|           .020#
-#             #                               6.000|       .000|           .000#
-#=============#====================================#===========#===============#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Case Summary
+,Valid N (listwise),
+a,Unweighted,Weighted
+Positive,5,50.000
+Negative,5,50.000
+
+Table: Area Under the Curve (x)
+,,,Asymp. 99% Confidence Interval,
+Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
+.910,.030,.000,.839,.981
+
+Table: Coordinates of the Curve (x)
+Positive if greater than or equal to,Sensitivity,1 - Specificity
+.000,1.000,1.000
+1.500,.960,.440
+2.500,.880,.160
+3.500,.680,.060
+4.500,.400,.020
+6.000,.000,.000
+
+Table: Case Summary
+,Valid N (listwise),
+a,Unweighted,Weighted
+Positive,5,50.000
+Negative,5,50.000
+
+Table: Area Under the Curve
+,,,,Asymp. 95% Confidence Interval,
+Variable under test,Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
+x,.910,.030,.000,.860,.960
+y,.697,.052,.001,.611,.783
+
+Table: Coordinates of the Curve
+Test variable,Positive if greater than or equal to,Sensitivity,1 - Specificity
+x,.000,1.000,1.000
+,1.500,.960,.440
+,2.500,.880,.160
+,3.500,.680,.060
+,4.500,.400,.020
+,6.000,.000,.000
+y,.000,1.000,1.000
+,1.500,.960,.900
+,2.500,.680,.340
+,3.000,.600,.340
+,3.500,.600,.300
+,4.500,.200,.020
+,6.000,.000,.000
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index a8020b0c26c6c6f901cf1ce203fb69c5a35ac859..7976a6e4ae42f88ae56843e46742c58450de02ef 100755 (executable)
@@ -101,30 +101,22 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 ROC.  Case Summary
-#========#===================#
-#        # Valid N (listwise)#
-#        #==========#========#
-#a       #Unweighted|Weighted#
-#========#==========#========#
-#Positive#        14|  14.000#
-#Negative#        14|  14.000#
-#========#==========#========#
-1.2 ROC.  Area Under the Curve (x)
-#====#==========#===============#=======================#
-#    |          |               | Asymp. 95% Confidence #
-#    |          |               +-----------+-----------#
-#Area|Std. Error|Asymptotic Sig.|Lower Bound|Upper Bound#
-#====#==========#===============#===========#===========#
-#.490|      .111|           .927|       .307|       .673#
-#====#==========#===============#===========#===========#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Case Summary
+,Valid N (listwise),
+a,Unweighted,Weighted
+Positive,14,14.000
+Negative,14,14.000
+
+Table: Area Under the Curve (x)
+,,,Asymp. 95% Confidence Interval,
+Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
+.490,.111,.927,.307,.673
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 4f4515e2be05073a21a85232970a2bdbe77b5069..c8d25e75984e21bb44f8fb06691a7660c74e2857 100755 (executable)
@@ -81,23 +81,21 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/sample.stat 
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/sample.stat 
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create head"
-grep -v '^\ *$' $TEMPDIR/pspp.list | head -2 > $TEMPDIR/head
+grep -v '^\ *$' $TEMPDIR/pspp.csv | head -1 > $TEMPDIR/head
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="extract data"
-grep  '[0-9][0-9]*' $TEMPDIR/pspp.list > $TEMPDIR/data
+grep  '[0-9][0-9]*' $TEMPDIR/pspp.csv > $TEMPDIR/data
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare head"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/head
 diff -b $TEMPDIR/head - << EOF
- A
---
+Table: Data List
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index d66681be7bf9e9b588d4c7be3886f4f9936df6e2..409c11965ffadd42f8578e296d381fc0927d7a81 100755 (executable)
@@ -121,7 +121,7 @@ for count_repeat_buffers in \
   } > sort.pspp || no_result
   
   activity="run program"
-  $SUPERVISOR $PSPP --testing-mode sort.pspp
+  $SUPERVISOR $PSPP --testing-mode -o pspp.csv sort.pspp
   if [ $? -ne 0 ] ; then no_result ; fi
   
   perl -pi -e 's/^\s*$//g' sort.exp sort.out
index eb2c991c1e97d328d120c76fe9915c67fbde93d3..5bebedc75c3b5a9960e5aa2d8dfaa3ed739ba2a4 100755 (executable)
@@ -85,33 +85,37 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/split.stat
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/split.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-Variable Value Label
-X            1
-X Y
-- -
-1 2 
-1 6 
-1 7 
-1 9 
-1 5 
-1 4 
-Variable Value Label
-X            2
-X Y
-- -
-2 7 
-2 0 
-2 6 
-2 5 
-2 8 
-2 9 
-2 4
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Title: Test SPLIT FILE utility
+
+Variable,Value,Label
+X,1,
+
+Table: Data List
+X,Y
+1,2
+1,6
+1,7
+1,9
+1,5
+1,4
+
+Variable,Value,Label
+X,2,
+
+Table: Data List
+X,Y
+2,7
+2,0
+2,6
+2,5
+2,8
+2,9
+2,4
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index d8f8ae3647ffe306e531c945184190eb9d0478a8..35a4e53f32812321dbd742df62426d55f654c3a0 100755 (executable)
@@ -74,47 +74,38 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="filter output"
-egrep -v '^(Created|Endian|Integer Format|Real Format): ' $TEMPDIR/pspp.list > $TEMPDIR/out-filtered
+egrep -v '^(Created|Endian|Integer Format|Real Format):,' $TEMPDIR/pspp.csv > $TEMPDIR/out-filtered
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/out-filtered
-diff -b -w $TEMPDIR/out-filtered - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|x       |F8.0  |
-|name    |A10   |
-+--------+------+
-2.1 SYSFILE INFO.  
-File:           pro.sav
-Label:          No label.
-Variables:      2
-Cases:          3
-Type:           System File
-Weight:         Not weighted.
-Mode:           Compression on.
-Charset:        Unknown
-+--------+-------------+---+
-|Variable|Description  |Pos|
-|        |             |iti|
-|        |             |on |
-#========#=============#===#
-|x       |Format: F8.2 |  1|
-|        |Measure:     |   |
-|        |Display      |   |
-|        |Display      |   |
-+--------+-------------+---+
-|name    |Format: A10  |  2|
-|        |Measure:     |   |
-|        |Display      |   |
-|        |Display      |   |
-+--------+-------------+---+
+diff -c $TEMPDIR/out-filtered - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+x,F8.0
+name,A10
+
+File:,pro.sav
+Label:,No label.
+Variables:,2
+Cases:,3
+Type:,System File
+Weight:,Not weighted.
+Mode:,Compression on.
+Charset:,Unknown
+
+Variable,Description,,Position
+x,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+name,Format: A10,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 10,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index df16690b01e18bba127ff1f7705e95dd528ecbf2..fefe3afccaff4c143093c6e6da9c71c05541f891 100755 (executable)
@@ -84,7 +84,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="check file exists"
@@ -97,18 +97,17 @@ grep  'X=X' $TEMPDIR/foo.sav
 if [ $? -eq 0 ] ; then fail ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-       x variable variab_a variab_b
--------- -------- -------- --------
-    1.00     1.00     1.00     2.00 
-    1.00     1.00     2.00    30.00 
-    1.00     2.00     1.00     8.00 
-    1.00     2.00     2.00    20.00 
-    2.00     1.00     1.00     2.00 
-    2.00     1.00     2.00    22.00 
-    2.00     2.00     1.00     1.00 
-    2.00     2.00     2.00     3.00 
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+x,variable,variab_a,variab_b
+1.00,1.00,1.00,2.00
+1.00,1.00,2.00,30.00
+1.00,2.00,1.00,8.00
+1.00,2.00,2.00,20.00
+2.00,1.00,1.00,2.00
+2.00,1.00,2.00,22.00
+2.00,2.00,1.00,1.00
+2.00,2.00,2.00,3.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index d4f59052de98b9d5e99820a2dce6beffbe221a89..08b28888e267a237465cde420b85b9b0edc465d9 100755 (executable)
@@ -83,22 +83,21 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-variable001 variable002 variable003 variable004
------------ ----------- ----------- -----------
-       1.00        1.00        1.00        2.00  
-       1.00        1.00        2.00       30.00 
-       1.00        2.00        1.00       8.00 
-       1.00        2.00        2.00      20.00 
-       2.00        1.00        1.00       2.00 
-       2.00        1.00        2.00      22.00 
-       2.00        2.00        1.00       1.00 
-       2.00        2.00        2.00       3.00 
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+variable001,variable002,variable003,variable004
+1.00,1.00,1.00,2.00
+1.00,1.00,2.00,30.00
+1.00,2.00,1.00,8.00
+1.00,2.00,2.00,20.00
+2.00,1.00,1.00,2.00
+2.00,1.00,2.00,22.00
+2.00,2.00,1.00,1.00
+2.00,2.00,2.00,3.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index ba3e5c5f4e15aabccc4e8c96da676f4327e29da7..04f6b05e1a792f0848e414742e52996877e60bf7 100755 (executable)
@@ -90,38 +90,28 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|INDEP   |F8.0  |
-|DEP     |F8.0  |
-+--------+------+
-2.1 T-TEST.  Group Statistics
-#===========#==#====#==============#=========#
-#     INDEP | N|Mean|Std. Deviation|S.E. Mean#
-#===========#==#====#==============#=========#
-#DEP >=1.514|11|9.00|          3.82|     1.15#
-#    <1.514 |11|8.00|          2.86|      .86#
-#===========#==#====#==============#=========#
-2.2 T-TEST.  Independent Samples Test
-#==============================#========#============================================================================#
-#                              #Levene's|                        t-test for Equality of Means                        #
-#                              #---+----+----+-----+---------------+---------------+---------------------+-----------#
-#                              #   |    |    |     |               |               |                     |    95%    #
-#                              #   |    |    |     |               |               |                     +-----+-----#
-#                              # F |Sig.|  t |  df |Sig. (2-tailed)|Mean Difference|Std. Error Difference|Lower|Upper#
-#==============================#===#====#====#=====#===============#===============#=====================#=====#=====#
-#DEPEqual variances assumed    #.17| .68|-.69|20.00|            .50|          -1.00|                 1.44|-4.00| 2.00#
-#   Equal variances not assumed#   |    |-.69|18.54|            .50|          -1.00|                 1.44|-4.02| 2.02#
-#==============================#===#====#====#=====#===============#===============#=====================#=====#=====#
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+INDEP,F8.0
+DEP,F8.0
+
+Table: Group Statistics
+,INDEP,N,Mean,Std. Deviation,S.E. Mean
+DEP,>=1.514,11,9.00,3.82,1.15
+,<1.514,11,8.00,2.86,.86
+
+Table: Independent Samples Test
+,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,,
+,,,,,,,,,95% Confidence Interval of the Difference,
+,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper
+DEP,Equal variances assumed,.17,.68,-.69,20.00,.50,-1.00,1.44,-4.00,2.00
+,Equal variances not assumed,,,-.69,18.54,.50,-1.00,1.44,-4.02,2.02
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 4cc2effa5b9c946e0425f714bf1feb1329350060..7694349142936ca42f54fc5683027e12203b6575 100755 (executable)
@@ -75,11 +75,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy output"
-cp $TEMPDIR/pspp.list $TEMPDIR/ref.list
+cp $TEMPDIR/pspp.csv $TEMPDIR/ref.csv
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
@@ -101,11 +101,11 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare outputs"
-diff $TEMPDIR/ref.list $TEMPDIR/pspp.list
+diff $TEMPDIR/ref.csv $TEMPDIR/pspp.csv
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 07471484868d9e27af76a784d8bdca77858275bc..476f2fe0bc9ca15c929c7b74a52066343760c4b1 100755 (executable)
@@ -74,11 +74,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy output"
-cp $TEMPDIR/pspp.list $TEMPDIR/ref.list
+cp $TEMPDIR/pspp.csv $TEMPDIR/ref.csv
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
@@ -101,11 +101,11 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare outputs"
-diff $TEMPDIR/ref.list $TEMPDIR/pspp.list
+diff $TEMPDIR/ref.csv $TEMPDIR/pspp.csv
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 843698182f461315511502fd77861d7c725237b2..b0bb6ab4781695ee8f392eb6fd49ccce79f23407 100755 (executable)
@@ -74,35 +74,25 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|ID      |F8.0  |
-|ABC     |F8.0  |
-+--------+------+
-2.1 T-TEST.  One-Sample Statistics
-#===#=#====#==============#=========#
-#   #N|Mean|Std. Deviation|S.E. Mean#
-#===#=#====#==============#=========#
-#ABC#6|3.00|           .84|      .34#
-#===#=#====#==============#=========#
-2.2 T-TEST.  One-Sample Test
-#===#===================================================#
-#   #               Test Value = 2.000000               #
-#   #----+--+---------------+---------------+-----------#
-#   #    |  |               |               |    95%    #
-#   #    |  |               |               +-----+-----#
-#   #  t |df|Sig. (2-tailed)|Mean Difference|Lower|Upper#
-#===#====#==#===============#===============#=====#=====#
-#ABC#2.93| 5|            .03|           1.00|  .12| 1.88#
-#===#====#==#===============#===============#=====#=====#
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+ID,F8.0
+ABC,F8.0
+
+Table: One-Sample Statistics
+,N,Mean,Std. Deviation,S.E. Mean
+ABC,6,3.00,.84,.34
+
+Table: One-Sample Test
+,Test Value = 2.000000,,,,,
+,,,,,95% Confidence Interval of the Difference,
+,t,df,Sig. (2-tailed),Mean Difference,Lower,Upper
+ABC,2.93,5,.03,1.00,.12,1.88
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 53080bdf8b12c31c6bb4dfd35cca650886cc8a39..c149ea56fae041a2a599de1d08b5f2e7bd52f553 100755 (executable)
@@ -81,45 +81,33 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF | perl -e 's/^\s*$//g'
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|ID      |F8.0  |
-|INDEP   |F8.0  |
-|DEP1    |F8.0  |
-|DEP2    |F8.0  |
-+--------+------+
-
-2.1 T-TEST.  Group Statistics
-#==========#=#====#==============#========#
-#     INDEP|N|Mean|Std. Deviation|SE. Mean#
-#==========#=#====#==============#========#
-#DEP1 1.1  |5|2.00|          .707|    .316#
-#     2.1  |5|4.00|          .707|    .316#
-#DEP2 1.1  |5|4.00|          .707|    .316#
-#     2.1  |5|2.00|          .707|    .316#
-#==========#=#====#==============#========#
-
-2.2 T-TEST.  Independent Samples Test
-#===============================#==========#===============================================================================#
-#                               # Levene's |                          t-test for Equality of Means                         #
-#                               #----+-----+------+-----+---------------+---------------+---------------------+------------#
-#                               #    |     |      |     |               |               |                     |    95%     #
-#                               #    |     |      |     |               |               |                     +------+-----#
-#                               # F  | Sig.|   t  |  df |Sig. (2-tailed)|Mean Difference|Std. Error Difference| Lower|Upper#
-#===============================#====#=====#======#=====#===============#===============#=====================#======#=====#
-#DEP1Equal variances assumed    #.000|1.000|-4.472|    8|           .002|         -2.000|                 .447|-3.031|-.969#
-#    Equal variances not assumed#    |     |-4.472|8.000|           .002|         -2.000|                 .447|-3.031|-.969#
-#DEP2Equal variances assumed    #.000|1.000| 4.472|    8|           .002|          2.000|                 .447|  .969|3.031#
-#    Equal variances not assumed#    |     | 4.472|8.000|           .002|          2.000|                 .447|  .969|3.031#
-#===============================#====#=====#======#=====#===============#===============#=====================#======#=====#
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+ID,F8.0
+INDEP,F8.0
+DEP1,F8.0
+DEP2,F8.0
+
+Table: Group Statistics
+,INDEP,N,Mean,Std. Deviation,S.E. Mean
+DEP1,1.1,5,2.00,.71,.32
+,2.1,5,4.00,.71,.32
+DEP2,1.1,5,4.00,.71,.32
+,2.1,5,2.00,.71,.32
+
+Table: Independent Samples Test
+,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,,
+,,,,,,,,,95% Confidence Interval of the Difference,
+,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper
+DEP1,Equal variances assumed,.00,1.00,-4.47,8.00,.00,-2.00,.45,-3.03,-.97
+,Equal variances not assumed,,,-4.47,8.00,.00,-2.00,.45,-3.03,-.97
+DEP2,Equal variances assumed,.00,1.00,4.47,8.00,.00,2.00,.45,.97,3.03
+,Equal variances not assumed,,,4.47,8.00,.00,2.00,.45,.97,3.03
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index fd307ff339104fc3182b7feb5767ece35152f2a7..8f2e85975ec16c431eda15e80bb90ccec433ff8b 100755 (executable)
@@ -74,11 +74,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy output"
-cp $TEMPDIR/pspp.list $TEMPDIR/ref.list
+cp $TEMPDIR/pspp.csv $TEMPDIR/ref.csv
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create program 2"
@@ -102,12 +102,12 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare outputs"
-diff $TEMPDIR/ref.list $TEMPDIR/pspp.list 
+diff $TEMPDIR/ref.csv $TEMPDIR/pspp.csv 
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 2e62b4d2fb6137106cc13bcf43d8b0bef7aad2b3..b77c5dc129a35aa8e6acfde25deae4c806a74506 100755 (executable)
@@ -75,11 +75,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy output"
-cp $TEMPDIR/pspp.list $TEMPDIR/ref.list
+cp $TEMPDIR/pspp.csv $TEMPDIR/ref.csv
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create program 2"
@@ -100,12 +100,12 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare outputs"
-diff $TEMPDIR/ref.list $TEMPDIR/pspp.list 
+diff $TEMPDIR/ref.csv $TEMPDIR/pspp.csv 
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index a747d4fddc2cd754c1df1050764960a9887943a2..5c40a65ce93c3cbae412fe38fb30743a14fe4b93 100755 (executable)
@@ -74,11 +74,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy output"
-mv $TEMPDIR/pspp.list $TEMPDIR/ref.list
+mv $TEMPDIR/pspp.csv $TEMPDIR/ref.csv
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create program 2"
@@ -100,12 +100,12 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare outputs"
-diff $TEMPDIR/ref.list $TEMPDIR/pspp.list
+diff $TEMPDIR/ref.csv $TEMPDIR/pspp.csv
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 0f96be4e2b49cf0bfb6ecb4a4ed73b5594a4d230..700c1ca96f128b92af61c3d028501d282fcfbef0 100755 (executable)
@@ -74,11 +74,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy output"
-mv $TEMPDIR/pspp.list $TEMPDIR/ref.list
+mv $TEMPDIR/pspp.csv $TEMPDIR/ref.csv
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create program 2"
@@ -100,12 +100,12 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare outputs"
-diff $TEMPDIR/ref.list $TEMPDIR/pspp.list
+diff $TEMPDIR/ref.csv $TEMPDIR/pspp.csv
 if [ $? -ne 0 ] ; then fail ; fi
 
 
index 37f833049b0842adb2d2fc83216c571070809d59..4dc40cd8b7ddfcc6f9511d406eb6d1563c9141db 100755 (executable)
@@ -73,43 +73,31 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|ID      |F8.0  |
-|A       |F8.0  |
-|B       |F8.0  |
-+--------+------+
-2.1 T-TEST.  Paired Sample Statistics
-#========#====#=#==============#=========#
-#        #Mean|N|Std. Deviation|S.E. Mean#
-#========#====#=#==============#=========#
-#Pair 0 A#2.00|5|           .71|      .32#
-#       B#4.00|5|          1.54|      .69#
-#========#====#=#==============#=========#
-2.2 T-TEST.  Paired Samples Correlations
-#======#=====#=#===========#====#
-#      |     #N|Correlation|Sig.#
-#======#=====#=#===========#====#
-#Pair 0|A & B#5|        .92| .03#
-#======#=====#=#===========#====#
-2.3 T-TEST.  Paired Samples Test
-#===========#================================================#=====#==#===============#
-#           #               Paired Differences               |     |  |               #
-#           #-----+--------------+---------------+-----------+     |  |               #
-#           #     |              |               |    95%    |     |  |               #
-#           #     |              |               +-----+-----+     |  |               #
-#           # Mean|Std. Deviation|Std. Error Mean|Lower|Upper|  t  |df|Sig. (2-tailed)#
-#===========#=====#==============#===============#=====#=====#=====#==#===============#
-#Pair 0A - B#-2.00|           .94|            .42|-3.16| -.84|-4.78| 4|            .01#
-#===========#=====#==============#===============#=====#=====#=====#==#===============#
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+ID,F8.0
+A,F8.0
+B,F8.0
+
+Table: Paired Sample Statistics
+,,Mean,N,Std. Deviation,S.E. Mean
+Pair 0,A,2.00,5,.71,.32
+,B,4.00,5,1.54,.69
+
+Table: Paired Samples Correlations
+,,N,Correlation,Sig.
+Pair 0,A & B,5,.92,.03
+
+Table: Paired Samples Test
+,,Paired Differences,,,,,,,
+,,,,,95% Confidence Interval of the Difference,,,,
+,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
+Pair 0,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.01
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index ad530f45c83cb6cbfbb89881911e3b841ce8b8e7..0d05c5ab91cba917f2556394ceb970f850c41b8d 100755 (executable)
@@ -78,18 +78,15 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/tabs.stat
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/tabs.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
-perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - << EOF | perl -e 's/^\s*$//g'
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|X       |     1|  1- 80|A80   |
-+--------+------+-------+------+
+diff -c $TEMPDIR/pspp.csv - << EOF | perl -e 's/^\s*$//g'
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+X,1,1- 80,A80
+
     1   12  123 1234    12345
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
index 660752dd914eda2d4146a9aea42ebc7695597515..f410a9f55bf332b979908a4f44d11d7dc35e9d8c 100755 (executable)
@@ -81,48 +81,38 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|X       |F8.0  |
-|C       |F8.0  |
-+--------+------+
-2.1 EXAMINE.  Case Processing Summary
-#=#=======================================#
-# #                 Cases                 #
-# #-------------+-----------+-------------#
-# #    Valid    |  Missing  |    Total    #
-# #-----+-------+---+-------+-----+-------#
-# #  N  |Percent| N |Percent|  N  |Percent#
-#=#=====#=======#===#=======#=====#=======#
-#X#52.00|   100%|.00|     0%|52.00|   100%#
-#=#=====#=======#===#=======#=====#=======#
-2.2 EXAMINE.  Descriptives
-#==============================================#=========#==========#
-#                                              #Statistic|Std. Error#
-#==============================================#=========#==========#
-#X Mean                                        #   2.02  |    .03   #
-#  95% Confidence Interval for Mean Lower Bound#   1.95  |          #
-#                                   Upper Bound#   2.09  |          #
-#  5% Trimmed Mean                             #   2.00  |          #
-#  Median                                      #   2.00  |          #
-#  Variance                                    #   .06   |          #
-#  Std. Deviation                              #   .24   |          #
-#  Minimum                                     #   1.00  |          #
-#  Maximum                                     #   3.00  |          #
-#  Range                                       #   2.00  |          #
-#  Interquartile Range                         #   .00   |          #
-#  Skewness                                    #   1.19  |    .33   #
-#  Kurtosis                                    #  15.73  |    .65   #
-#==============================================#=========#==========#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+X,F8.0
+C,F8.0
+
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+X,52.00,100%,.00,0%,52.00,100%
+
+Table: Descriptives
+,,,Statistic,Std. Error
+X,Mean,,2.02,.03
+,95% Confidence Interval for Mean,Lower Bound,1.95,
+,,Upper Bound,2.09,
+,5% Trimmed Mean,,2.00,
+,Median,,2.00,
+,Variance,,.06,
+,Std. Deviation,,.24,
+,Minimum,,1.00,
+,Maximum,,3.00,
+,Range,,2.00,
+,Interquartile Range,,.00,
+,Skewness,,1.19,.33
+,Kurtosis,,15.73,.65
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 8bcb56715d5c8980d7f83bdc2a9450c4621f4f17..4d4da661d30720cc7d47a1b1ddd75817c1b65170 100755 (executable)
@@ -84,25 +84,24 @@ cat > b.data <<EOF
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
-cat > update.out <<EOF
-A B C D INA INB
-- - - - --- ---
-0 a A     1   0
-1 b B N   1   1
-1 a C     1   0
-2 a D     1   0
-3 b E O   1   1
-4 b F P   1   1
-5 a G     1   0
-5 a H     1   0
-6 b I Q   1   1
-7 b J R   1   1
-7 a K     1   0
-7 a L     1   0
-8 a M     1   0
-9 b   S   0   1
+cat > update.csv <<EOF
+Table: Data List
+A,B,C,D,INA,INB
+0,a,A,,1,0
+1,b,B,N,1,1
+1,a,C,,1,0
+2,a,D,,1,0
+3,b,E,O,1,1
+4,b,F,P,1,1
+5,a,G,,1,0
+5,a,H,,1,0
+6,b,I,Q,1,1
+7,b,J,R,1,1
+7,a,K,,1,0
+7,a,L,,1,0
+8,a,M,,1,0
+9,b,,S,0,1
 EOF
-perl -pi -e 's/^\s*$//g' update.out
 
 # Test UPDATE.
 dla="data list notable file='a.data' /A B C 1-3 (a)."
@@ -156,12 +155,12 @@ EOF
 
     activity="run $name.pspp"
     rm -f errors
-    $SUPERVISOR $PSPP --testing-mode --error-file=errors $name.pspp
+    $SUPERVISOR $PSPP -o pspp.csv --error-file=errors $name.pspp
     if [ $? -ne 0 ] ; then no_result ; fi
 
     activity="check $name output"
-    perl -pi -e 's/^\s*$//g' pspp.list
-    diff -c -b -w pspp.list update.out
+    perl -pi -e 's/^\s*$//g' pspp.csv
+    diff -c pspp.csv update.csv
     if [ $? -ne 0 ] ; then fail ; fi
     diff -c -b -w - errors <<EOF
 $name.pspp:8: warning: UPDATE: Encountered 3 sets of duplicate cases in the master file.
index 18b66f0f158054209c6b9eec653c08c2a062b663..7b26cd7bda33d9bc196cf59e0588af8d51435718 100755 (executable)
@@ -79,24 +79,23 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP -B $STAT_CONFIG_PATH --testing-mode $TEMPDIR/filter.stat
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/filter.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="check results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - << EOF
- X
---
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+X
+1
+2
+3
+4
+5
+6
+7
+8
+9
 10
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
index d3f680245315d5eb00ed7b0e2d83c1d781e3cb51..5bf717191665bfe9fb2a4033e6ff68542bec546e 100755 (executable)
@@ -70,31 +70,24 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 DISPLAY.
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|x       |Format: F8.2                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 10                          |        |
-+--------+-------------------------------------------+--------+
-|y       |Format: F8.2                               |       2|
-|        |Measure: Ordinal                           |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 12                          |        |
-+--------+-------------------------------------------+--------+
-|z       |Format: F8.2                               |       3|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Center                  |        |
-|        |Display Width: 14                          |        |
-+--------+-------------------------------------------+--------+
+diff -c $TEMPDIR/pspp.csv - << EOF
+Variable,Description,,Position
+x,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Left,,
+,Display Width: 10,,
+y,Format: F8.2,,2
+,Measure: Ordinal,,
+,Display Alignment: Right,,
+,Display Width: 12,,
+z,Format: F8.2,,3
+,Measure: Nominal,,
+,Display Alignment: Center,,
+,Display Width: 14,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index e99fab4b3a3265abcda0b81b3871c8cfa53f89ed..a0da5f1270fe92fff9b84ab8313281935776c367 100755 (executable)
@@ -84,7 +84,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -e $TEMPDIR/stdout $TEMPDIR/vector.stat
+$SUPERVISOR $PSPP -o pspp.csv -e $TEMPDIR/stdout $TEMPDIR/vector.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare stdout"
@@ -94,61 +94,47 @@ EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list  - <<EOF
-+------+--------+--------+------------+
-|Vector|Position|Variable|Print Format|
-#======#========#========#============#
-|v     |       1|v1      |F8.2        |
-|      |       2|v2      |F8.2        |
-|      |       3|v3      |F8.2        |
-|      |       4|v4      |F8.2        |
-+------+--------+--------+------------+
-+------+--------+--------+------------+
-|Vector|Position|Variable|Print Format|
-#======#========#========#============#
-|#vec  |       1|#vec1   |COMMA10.2   |
-|      |       2|#vec2   |COMMA10.2   |
-|      |       3|#vec3   |COMMA10.2   |
-|      |       4|#vec4   |COMMA10.2   |
-+------+--------+--------+------------+
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|x5      |     1|  1-  1|F1.0  |
-|x2      |     1|  2-  2|F1.0  |
-|x3      |     1|  3-  3|F1.0  |
-|x1      |     1|  4-  4|F1.0  |
-|x4      |     1|  5-  5|F1.0  |
-+--------+------+-------+------+
-+------+--------+--------+------------+
-|Vector|Position|Variable|Print Format|
-#======#========#========#============#
-|x     |       1|x1      |F8.2        |
-|      |       2|x2      |F8.2        |
-|      |       3|x3      |F8.2        |
-|      |       4|x4      |F8.2        |
-|      |       5|x5      |F8.2        |
-+------+--------+--------+------------+
-+------+--------+--------+------------+
-|Vector|Position|Variable|Print Format|
-#======#========#========#============#
-|a     |       1|u       |F1.0        |
-|      |       2|w       |F1.0        |
-|      |       3|x       |F1.0        |
-|      |       4|y       |F1.0        |
-+------+--------+--------+------------+
-|b     |       1|x       |F1.0        |
-|      |       2|y       |F1.0        |
-|      |       3|z       |F1.0        |
-+------+--------+--------+------------+
-|c     |       1|u       |F1.0        |
-|      |       2|w       |F1.0        |
-|      |       3|x       |F1.0        |
-|      |       4|y       |F1.0        |
-|      |       5|z       |F1.0        |
-+------+--------+--------+------------+
+diff -c $TEMPDIR/pspp.csv  - <<EOF
+Vector,Position,Variable,Print Format
+v,1,v1,F8.2
+,2,v2,F8.2
+,3,v3,F8.2
+,4,v4,F8.2
+
+Vector,Position,Variable,Print Format
+#vec,1,#vec1,COMMA10.2
+,2,#vec2,COMMA10.2
+,3,#vec3,COMMA10.2
+,4,#vec4,COMMA10.2
+
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+x5,1,1-  1,F1.0
+x2,1,2-  2,F1.0
+x3,1,3-  3,F1.0
+x1,1,4-  4,F1.0
+x4,1,5-  5,F1.0
+
+Vector,Position,Variable,Print Format
+x,1,x1,F8.2
+,2,x2,F8.2
+,3,x3,F8.2
+,4,x4,F8.2
+,5,x5,F8.2
+
+Vector,Position,Variable,Print Format
+a,1,u,F1.0
+,2,w,F1.0
+,3,x,F1.0
+,4,y,F1.0
+b,1,x,F1.0
+,2,y,F1.0
+,3,z,F1.0
+c,1,u,F1.0
+,2,w,F1.0
+,3,x,F1.0
+,4,y,F1.0
+,5,z,F1.0
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 7c09d8dc533265ef1e868955b518a0031d4dec11..e7130c142d69ee1f5d7839d0d2035ce76c11b25b 100755 (executable)
@@ -73,67 +73,55 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 0"
-$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE 
+$SUPERVISOR $PSPP -o pspp.csv -e /dev/null $TESTFILE 
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare variable display 0"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|N       |Format: F8.2                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 10                          |        |
-+--------+-------------------------------------------+--------+
-|A255    |Format: A255                               |       2|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 32                          |        |
-+--------+-------------------------------------------+--------+
-|A258    |Format: A258                               |       3|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 32                          |        |
-+--------+-------------------------------------------+--------+
-|A2000   |Format: A2000                              |       4|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 32                          |        |
-+--------+-------------------------------------------+--------+
-       N                                                                                                                                                                                                                                                            A255                                                                                                                                                                                                                                                               A258                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A2000
--------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-    1.00 a1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA b1BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB c1CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 
-    2.00 a2XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX b2YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY c2ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
-2.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|vl255   |Format: A255                               |       1|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 26                          |        |
-+--------+-------------------------------------------+--------+
-|vl256   |Format: A256                               |       2|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 26                          |        |
-+--------+-------------------------------------------+--------+
-|vl1335  |Format: A1335                              |       3|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 26                          |        |
-+--------+-------------------------------------------+--------+
-|vl2000  |Format: A2000                              |       4|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 26                          |        |
-+--------+-------------------------------------------+--------+
-                                                                                                                                                                                                                                                          vl255                                                                                                                                                                                                                                                            vl256                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  vl1335                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           vl2000
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Variable,Description,,Position
+N,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 10,,
+A255,Format: A255,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 32,,
+A258,Format: A258,,3
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 32,,
+A2000,Format: A2000,,4
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 32,,
+
+Table: Data List
+N,A255,A258,A2000
+1.00,a1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,b1BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,c1CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+2.00,a2XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,b2YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY,c2ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
+
+Variable,Description,,Position
+vl255,Format: A255,,1
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 26,,
+vl256,Format: A256,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 26,,
+vl1335,Format: A1335,,3
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 26,,
+vl2000,Format: A2000,,4
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 26,,
+
+Table: Data List
+vl255,vl256,vl1335,vl2000
+MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -164,7 +152,7 @@ EOF
 
 
     activity="run program 1 ($options)"
-    $SUPERVISOR $PSPP --testing-mode $TESTFILE
+    $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
     if [ $? -ne 0 ] ; then no_result ; fi
 
     activity="Create file2 ($options)"
@@ -185,7 +173,7 @@ EOF
     if [ $? -ne 0 ] ; then no_result ; fi
 
     activity="run program 2 ($options)"
-    $SUPERVISOR $PSPP --testing-mode $TESTFILE
+    $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
     if [ $? -ne 0 ] ; then no_result ; fi
 
 
@@ -197,32 +185,24 @@ EOF
 
 
     activity="compare variable display ($options)"
-    perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-    diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 DISPLAY.  
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|a       |Format: A10                                |       1|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 10                          |        |
-+--------+-------------------------------------------+--------+
-|b       |Format: A256                               |       2|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 32                          |        |
-+--------+-------------------------------------------+--------+
-|c       |Format: A200                               |       3|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 32                          |        |
-+--------+-------------------------------------------+--------+
-|d       |Format: A32767                             |       4|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 32                          |        |
-+--------+-------------------------------------------+--------+
+    diff -c $TEMPDIR/pspp.csv - <<EOF
+Variable,Description,,Position
+a,Format: A10,,1
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 10,,
+b,Format: A256,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 32,,
+c,Format: A200,,3
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 32,,
+d,Format: A32767,,4
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 32,,
 EOF
     if [ $? -ne 0 ] ; then fail ; fi
 done
index 0d4fb3970b21fc685f0c059d72651ff177a75b46..107f3aac1956039bacdafbb9a364fce93f82406d 100755 (executable)
@@ -66,108 +66,100 @@ data list file='$top_srcdir/tests/weighting.data'/AVAR 1-5 BVAR 6-10.
 weight by BVAR.
 
 descriptives AVAR /statistics all /format serial.
-frequencies AVAR /statistics all /format condense.
+frequencies AVAR /statistics all.
 
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from "$top_srcdir/tests/weighting.data".
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|AVAR    |     1|  1-  5|F5.0  |
-|BVAR    |     1|  6- 10|F5.0  |
-+--------+------+-------+------+
-2.1 DESCRIPTIVES.  Valid cases = 730; cases with missing value(s) = 0.
-+--------#-------+---------+------+---------+-------+--------+--------+---------+--------+---------+------+-------+-------+--------+
-|Variable#Valid N|Missing N| Mean |S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew| Range|Minimum|Maximum|   Sum  |
-#========#=======#=========#======#=========#=======#========#========#=========#========#=========#======#=======#=======#========#
-|AVAR    #    730|        0|31.515|     .405| 10.937| 119.608|   2.411|     .181|   1.345|     .090|76.000| 18.000| 94.000|23006.00|
-+--------#-------+---------+------+---------+-------+--------+--------+---------+--------+---------+------+-------+-------+--------+
-3.1 FREQUENCIES.  AVAR
-+--------+--------+---+---+
-|        |        |   |Cum|
-|  Value |  Freq  |Pct|Pct|
-#========#========#===#===#
-|      18|       1|.13|.13|
-|      19|       7|.95|1.0|
-|      20|      26|3.5|4.6|
-|      21|      76|10.|15.|
-|      22|      57|7.8|22.|
-|      23|      58|7.9|30.|
-|      24|      38|5.2|36.|
-|      25|      38|5.2|41.|
-|      26|      30|4.1|45.|
-|      27|      21|2.8|48.|
-|      28|      23|3.1|51.|
-|      29|      24|3.2|54.|
-|      30|      23|3.1|57.|
-|      31|      14|1.9|59.|
-|      32|      21|2.8|62.|
-|      33|      21|2.8|65.|
-|      34|      14|1.9|67.|
-|      35|      14|1.9|69.|
-|      36|      17|2.3|71.|
-|      37|      11|1.5|73.|
-|      38|      16|2.1|75.|
-|      39|      14|1.9|77.|
-|      40|      15|2.0|79.|
-|      41|      14|1.9|81.|
-|      42|      14|1.9|83.|
-|      43|       8|1.0|84.|
-|      44|      15|2.0|86.|
-|      45|      10|1.3|87.|
-|      46|      12|1.6|89.|
-|      47|      13|1.7|91.|
-|      48|      13|1.7|92.|
-|      49|       5|.68|93.|
-|      50|       5|.68|94.|
-|      51|       3|.41|94.|
-|      52|       7|.95|95.|
-|      53|       6|.82|96.|
-|      54|       2|.27|96.|
-|      55|       2|.27|96.|
-|      56|       2|.27|97.|
-|      57|       3|.41|97.|
-|      58|       1|.13|97.|
-|      59|       3|.41|98.|
-|      61|       1|.13|98.|
-|      62|       3|.41|98.|
-|      63|       1|.13|98.|
-|      64|       1|.13|99.|
-|      65|       2|.27|99.|
-|      70|       1|.13|99.|
-|      78|       1|.13|99.|
-|      79|       1|.13|99.|
-|      80|       1|.13|99.|
-|      94|       1|.13|100|
-+--------+--------+---+---+
-+-----------------------+--------+
-|N           Valid      |     730|
-|            Missing    |       0|
-|Mean                   |  31.515|
-|S.E. Mean              |    .405|
-|Mode                   |  21.000|
-|Std Dev                |  10.937|
-|Variance               | 119.608|
-|Kurtosis               |   2.411|
-|S.E. Kurt              |    .181|
-|Skewness               |   1.345|
-|S.E. Skew              |    .090|
-|Range                  |  76.000|
-|Minimum                |  18.000|
-|Maximum                |  94.000|
-|Sum                    |23006.00|
-|Percentiles 50 (Median)|      29|
-+-----------------------+--------+
+diff -c $TEMPDIR/pspp.csv - <<EOF
+"Table: Reading 1 record from ""$top_srcdir/tests/weighting.data""."
+Variable,Record,Columns,Format
+AVAR,1,1-  5,F5.0
+BVAR,1,6- 10,F5.0
+
+Table: Valid cases = 730; cases with missing value(s) = 0.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+AVAR,730,0,31.515,.405,10.937,119.608,2.411,.181,1.345,.090,76.000,18.000,94.000,23006.00
+
+Table: AVAR
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,18,1,.137,.137,.137
+,19,7,.959,.959,1.096
+,20,26,3.562,3.562,4.658
+,21,76,10.411,10.411,15.068
+,22,57,7.808,7.808,22.877
+,23,58,7.945,7.945,30.822
+,24,38,5.205,5.205,36.027
+,25,38,5.205,5.205,41.233
+,26,30,4.110,4.110,45.342
+,27,21,2.877,2.877,48.219
+,28,23,3.151,3.151,51.370
+,29,24,3.288,3.288,54.658
+,30,23,3.151,3.151,57.808
+,31,14,1.918,1.918,59.726
+,32,21,2.877,2.877,62.603
+,33,21,2.877,2.877,65.479
+,34,14,1.918,1.918,67.397
+,35,14,1.918,1.918,69.315
+,36,17,2.329,2.329,71.644
+,37,11,1.507,1.507,73.151
+,38,16,2.192,2.192,75.342
+,39,14,1.918,1.918,77.260
+,40,15,2.055,2.055,79.315
+,41,14,1.918,1.918,81.233
+,42,14,1.918,1.918,83.151
+,43,8,1.096,1.096,84.247
+,44,15,2.055,2.055,86.301
+,45,10,1.370,1.370,87.671
+,46,12,1.644,1.644,89.315
+,47,13,1.781,1.781,91.096
+,48,13,1.781,1.781,92.877
+,49,5,.685,.685,93.562
+,50,5,.685,.685,94.247
+,51,3,.411,.411,94.658
+,52,7,.959,.959,95.616
+,53,6,.822,.822,96.438
+,54,2,.274,.274,96.712
+,55,2,.274,.274,96.986
+,56,2,.274,.274,97.260
+,57,3,.411,.411,97.671
+,58,1,.137,.137,97.808
+,59,3,.411,.411,98.219
+,61,1,.137,.137,98.356
+,62,3,.411,.411,98.767
+,63,1,.137,.137,98.904
+,64,1,.137,.137,99.041
+,65,2,.274,.274,99.315
+,70,1,.137,.137,99.452
+,78,1,.137,.137,99.589
+,79,1,.137,.137,99.726
+,80,1,.137,.137,99.863
+,94,1,.137,.137,100.000
+Total,,730,100.0,100.0,
+
+Table: AVAR
+N,Valid,730
+,Missing,0
+Mean,,31.515
+S.E. Mean,,.405
+Mode,,21.000
+Std Dev,,10.937
+Variance,,119.608
+Kurtosis,,2.411
+S.E. Kurt,,.181
+Skewness,,1.345
+S.E. Skew,,.090
+Range,,76.000
+Minimum,,18.000
+Maximum,,94.000
+Sum,,23006.00
+Percentiles,50 (Median),29
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index de91adc6dcc8e7fad6e8408863dddd9869a46c6e..3a210783c2fed0b507cd50f67c12aa23119c7ee0 100755 (executable)
@@ -47,6 +47,6 @@ FREQUENCIES /COVERAGE
 
 EOF
 
-src/pspp -o html $TEMPDIR/cov.sps
+src/pspp -o pspp.html $TEMPDIR/cov.sps
 
 rm -rf $TEMPDIR
index c46c268376c77031baff7e6c06fa14a44808bd65..98be04fe44b25c73a7cb608596b02296b3b3894c 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -748,7 +748,7 @@ enum
     N_DATASHEET_OPTIONS
   };
 
-static struct argv_option datasheet_argv_options[N_DATASHEET_OPTIONS] =
+static const struct argv_option datasheet_argv_options[N_DATASHEET_OPTIONS] =
   {
     {"max-rows", 0, required_argument, OPT_MAX_ROWS},
     {"max-columns", 0, required_argument, OPT_MAX_COLUMNS},
index 85f3644211d3171423239c59b14ab7136f28b36a..3d26a0fb0275c448faa728d529c8ed72022dbd92 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -45,8 +45,14 @@ struct sfm_reader
 
     int n_variable_records, n_variables;
 
+    int *var_widths;
+    size_t n_var_widths, allocated_var_widths;
+
     enum integer_format integer_format;
     enum float_format float_format;
+
+    bool compressed;
+    double bias;
   };
 
 static void read_header (struct sfm_reader *);
@@ -58,6 +64,7 @@ static void read_machine_integer_info (struct sfm_reader *,
                                        size_t size, size_t count);
 static void read_machine_float_info (struct sfm_reader *,
                                      size_t size, size_t count);
+static void read_mrsets (struct sfm_reader *, size_t size, size_t count);
 static void read_display_parameters (struct sfm_reader *,
                                      size_t size, size_t count);
 static void read_long_var_name_map (struct sfm_reader *r,
@@ -68,10 +75,14 @@ static void read_datafile_attributes (struct sfm_reader *r,
                                       size_t size, size_t count);
 static void read_variable_attributes (struct sfm_reader *r,
                                       size_t size, size_t count);
+static void read_ncases64 (struct sfm_reader *, size_t size, size_t count);
 static void read_character_encoding (struct sfm_reader *r,
                                       size_t size, size_t count);
 static void read_long_string_value_labels (struct sfm_reader *r,
                                            size_t size, size_t count);
+static void read_unknown_extension (struct sfm_reader *,
+                                    size_t size, size_t count);
+static void read_compressed_data (struct sfm_reader *);
 
 static struct text_record *open_text_record (
   struct sfm_reader *, size_t size);
@@ -80,6 +91,8 @@ static bool read_variable_to_value_pair (struct text_record *,
                                          char **key, char **value);
 static char *text_tokenize (struct text_record *, int delimiter);
 static bool text_match (struct text_record *text, int c);
+static const char *text_parse_counted_string (struct text_record *);
+static size_t text_pos (const struct text_record *);
 
 static void usage (int exit_code);
 static void sys_warn (struct sfm_reader *, const char *, ...)
@@ -90,6 +103,7 @@ static void sys_error (struct sfm_reader *, const char *, ...)
 
 static void read_bytes (struct sfm_reader *, void *, size_t);
 static int read_int (struct sfm_reader *);
+static int64_t read_int64 (struct sfm_reader *);
 static double read_float (struct sfm_reader *);
 static void read_string (struct sfm_reader *, char *, size_t);
 static void skip_bytes (struct sfm_reader *, size_t);
@@ -115,6 +129,10 @@ main (int argc, char *argv[])
         error (EXIT_FAILURE, errno, "error opening \"%s\"", r.file_name);
       r.n_variable_records = 0;
       r.n_variables = 0;
+      r.n_var_widths = 0;
+      r.allocated_var_widths = 0;
+      r.var_widths = 0;
+      r.compressed = false;
 
       if (argc > 2)
         printf ("Reading \"%s\":\n", r.file_name);
@@ -147,9 +165,13 @@ main (int argc, char *argv[])
               sys_error (&r, _("Unrecognized record type %d."), rec_type);
             }
         }
-      printf ("%08lx: end-of-dictionary record "
-              "(first byte of data at %08lx)\n",
-              ftell (r.file), ftell (r.file) + 4);
+      printf ("%08llx: end-of-dictionary record "
+              "(first byte of data at %08llx)\n",
+              (long long int) ftello (r.file),
+              (long long int) ftello (r.file) + 4);
+
+      if (r.compressed)
+        read_compressed_data (&r);
 
       fclose (r.file);
     }
@@ -169,7 +191,6 @@ read_header (struct sfm_reader *r)
   int32_t weight_index;
   int32_t ncases;
   uint8_t raw_bias[8];
-  double bias;
   char creation_date[10];
   char creation_time[9];
   char file_label[65];
@@ -193,10 +214,12 @@ read_header (struct sfm_reader *r)
                              raw_layout_code, sizeof raw_layout_code);
 
   nominal_case_size = read_int (r);
-  compressed = read_int (r) != 0;
+  compressed = read_int (r);
   weight_index = read_int (r);
   ncases = read_int (r);
 
+  r->compressed = compressed != 0;
+
   /* Identify floating-point format and obtain compression bias. */
   read_bytes (r, raw_bias, sizeof raw_bias);
   if (float_identify (100.0, raw_bias, sizeof raw_bias, &r->float_format) == 0)
@@ -209,7 +232,7 @@ read_header (struct sfm_reader *r)
       else
         r->float_format = FLOAT_IEEE_DOUBLE_LE;
     }
-  bias = float_get_double (r->float_format, raw_bias);
+  r->bias = float_get_double (r->float_format, raw_bias);
 
   read_string (r, creation_date, sizeof creation_date);
   read_string (r, creation_time, sizeof creation_time);
@@ -223,7 +246,7 @@ read_header (struct sfm_reader *r)
   printf ("\t%17s: %"PRId32"\n", "Compressed", compressed);
   printf ("\t%17s: %"PRId32"\n", "Weight index", weight_index);
   printf ("\t%17s: %"PRId32"\n", "Number of cases", ncases);
-  printf ("\t%17s: %g\n", "Compression bias", bias);
+  printf ("\t%17s: %g\n", "Compression bias", r->bias);
   printf ("\t%17s: %s\n", "Creation date", creation_date);
   printf ("\t%17s: %s\n", "Creation time", creation_time);
   printf ("\t%17s: \"%s\"\n", "File label", file_label);
@@ -287,8 +310,8 @@ read_variable_record (struct sfm_reader *r)
   int write_format;
   char name[9];
 
-  printf ("%08lx: variable record #%d\n",
-          ftell (r->file), r->n_variable_records++);
+  printf ("%08llx: variable record #%d\n",
+          (long long int) ftello (r->file), r->n_variable_records++);
 
   width = read_int (r);
   has_variable_label = read_int (r);
@@ -301,6 +324,11 @@ read_variable_record (struct sfm_reader *r)
   if (width >= 0)
     r->n_variables++;
 
+  if (r->n_var_widths >= r->allocated_var_widths)
+    r->var_widths = x2nrealloc (r->var_widths, &r->allocated_var_widths,
+                                sizeof *r->var_widths);
+  r->var_widths[r->n_var_widths++] = width;
+
   printf ("\tWidth: %d (%s)\n",
           width,
           width > 0 ? "string"
@@ -328,17 +356,21 @@ read_variable_record (struct sfm_reader *r)
     sys_error (r, _("Variable label indicator field is not 0 or 1."));
   if (has_variable_label == 1)
     {
-      long int offset = ftell (r->file);
-      size_t len;
+      long long int offset = ftello (r->file);
+      size_t len, read_len;
       char label[255 + 1];
 
       len = read_int (r);
-      if (len >= sizeof label)
-        sys_error (r, _("Variable %s has label of invalid length %zu."),
-                   name, len);
-      read_string (r, label, len + 1);
-      printf("\t%08lx Variable label: \"%s\"\n", offset, label);
 
+      /* Read up to 255 bytes of label. */
+      read_len = MIN (sizeof label - 1, len);
+      read_string (r, label, read_len + 1);
+      printf("\t%08llx Variable label: \"%s\"\n", offset, label);
+
+      /* Skip unread label bytes. */
+      skip_bytes (r, len - read_len);
+
+      /* Skip label padding up to multiple of 4 bytes. */
       skip_bytes (r, ROUND_UP (len, 4) - len);
     }
 
@@ -347,7 +379,7 @@ read_variable_record (struct sfm_reader *r)
     {
       int i;
 
-      printf ("\t%08lx Missing values:", ftell (r->file));
+      printf ("\t%08llx Missing values:", (long long int) ftello (r->file));
       if (!width)
         {
           if (missing_value_code < -3 || missing_value_code > 3
@@ -380,6 +412,20 @@ read_variable_record (struct sfm_reader *r)
     }
 }
 
+static void
+print_untyped_value (struct sfm_reader *r, char raw_value[8])
+{
+  int n_printable;
+  double value;
+
+  value = float_get_double (r->float_format, raw_value);
+  for (n_printable = 0; n_printable < sizeof raw_value; n_printable++)
+    if (!isprint (raw_value[n_printable]))
+      break;
+
+  printf ("%g/\"%.*s\"", value, n_printable, raw_value);
+}
+
 /* Reads value labels from sysfile R and inserts them into the
    associated dictionary. */
 static void
@@ -388,24 +434,18 @@ read_value_label_record (struct sfm_reader *r)
   int label_cnt, var_cnt;
   int i;
 
-  printf ("%08lx: value labels record\n", ftell (r->file));
+  printf ("%08llx: value labels record\n", (long long int) ftello (r->file));
 
   /* Read number of labels. */
   label_cnt = read_int (r);
   for (i = 0; i < label_cnt; i++)
     {
       char raw_value[8];
-      double value;
-      int n_printable;
       unsigned char label_len;
       size_t padded_len;
       char label[256];
 
       read_bytes (r, raw_value, sizeof raw_value);
-      value = float_get_double (r->float_format, raw_value);
-      for (n_printable = 0; n_printable < sizeof raw_value; n_printable++)
-        if (!isprint (raw_value[n_printable]))
-          break;
 
       /* Read label length. */
       read_bytes (r, &label_len, sizeof label_len);
@@ -415,7 +455,9 @@ read_value_label_record (struct sfm_reader *r)
       read_bytes (r, label, padded_len - 1);
       label[label_len] = 0;
 
-      printf ("\t%g/\"%.*s\": \"%s\"\n", value, n_printable, raw_value, label);
+      printf ("\t");
+      print_untyped_value (r, raw_value);
+      printf (": \"%s\"\n", label);
     }
 
   /* Now, read the type 4 record that has the list of variables
@@ -428,7 +470,7 @@ read_value_label_record (struct sfm_reader *r)
 
   /* Read number of variables associated with value label from type 4
      record. */
-  printf ("\t%08lx: apply to variables", ftell (r->file));
+  printf ("\t%08llx: apply to variables", (long long int) ftello (r->file));
   var_cnt = read_int (r);
   for (i = 0; i < var_cnt; i++)
     printf (" #%d", read_int (r));
@@ -441,14 +483,14 @@ read_document_record (struct sfm_reader *r)
   int n_lines;
   int i;
 
-  printf ("%08lx: document record\n", ftell (r->file));
+  printf ("%08llx: document record\n", (long long int) ftello (r->file));
   n_lines = read_int (r);
   printf ("\t%d lines of documents\n", n_lines);
 
   for (i = 0; i < n_lines; i++)
     {
       char line[81];
-      printf ("\t%08lx: ", ftell (r->file));
+      printf ("\t%08llx: ", (long long int) ftello (r->file));
       read_string (r, line, sizeof line);
       trim_spaces (line);
       printf ("line %d: \"%s\"\n", i, line);
@@ -458,13 +500,13 @@ read_document_record (struct sfm_reader *r)
 static void
 read_extension_record (struct sfm_reader *r)
 {
-  long int offset = ftell (r->file);
+  long long int offset = ftello (r->file);
   int subtype = read_int (r);
   size_t size = read_int (r);
   size_t count = read_int (r);
   size_t bytes = size * count;
 
-  printf ("%08lx: Record 7, subtype %d, size=%zu, count=%zu\n",
+  printf ("%08llx: Record 7, subtype %d, size=%zu, count=%zu\n",
           offset, subtype, size, count);
 
   switch (subtype)
@@ -489,8 +531,9 @@ read_extension_record (struct sfm_reader *r)
       break;
 
     case 7:
-      /* Unknown purpose. */
-      break;
+    case 19:
+      read_mrsets (r, size, count);
+      return;
 
     case 11:
       read_display_parameters (r, size, count);
@@ -505,8 +548,8 @@ read_extension_record (struct sfm_reader *r)
       return;
 
     case 16:
-      /* New in SPSS v14?  Unknown purpose.  */
-      break;
+      read_ncases64 (r, size, count);
+      return;
 
     case 17:
       read_datafile_attributes (r, size, count);
@@ -526,7 +569,8 @@ read_extension_record (struct sfm_reader *r)
 
     default:
       sys_warn (r, _("Unrecognized record type 7, subtype %d."), subtype);
-      break;
+      read_unknown_extension (r, size, count);
+      return;
     }
 
   skip_bytes (r, bytes);
@@ -535,7 +579,7 @@ read_extension_record (struct sfm_reader *r)
 static void
 read_machine_integer_info (struct sfm_reader *r, size_t size, size_t count)
 {
-  long int offset = ftell (r->file);
+  long long int offset = ftello (r->file);
   int version_major = read_int (r);
   int version_minor = read_int (r);
   int version_revision = read_int (r);
@@ -545,7 +589,7 @@ read_machine_integer_info (struct sfm_reader *r, size_t size, size_t count)
   int integer_representation = read_int (r);
   int character_code = read_int (r);
 
-  printf ("%08lx: machine integer info\n", offset);
+  printf ("%08llx: machine integer info\n", offset);
   if (size != 4 || count != 8)
     sys_error (r, _("Bad size (%zu) or count (%zu) field on record type 7, "
                     "subtype 3."),
@@ -571,12 +615,12 @@ read_machine_integer_info (struct sfm_reader *r, size_t size, size_t count)
 static void
 read_machine_float_info (struct sfm_reader *r, size_t size, size_t count)
 {
-  long int offset = ftell (r->file);
+  long long int offset = ftello (r->file);
   double sysmis = read_float (r);
   double highest = read_float (r);
   double lowest = read_float (r);
 
-  printf ("%08lx: machine float info\n", offset);
+  printf ("%08llx: machine float info\n", offset);
   if (size != 8 || count != 3)
     sys_error (r, _("Bad size (%zu) or count (%zu) on extension 4."),
                size, count);
@@ -597,6 +641,108 @@ read_machine_float_info (struct sfm_reader *r, size_t size, size_t count)
               lowest, "LOWEST");
 }
 
+/* Read record type 7, subtype 7. */
+static void
+read_mrsets (struct sfm_reader *r, size_t size, size_t count)
+{
+  struct text_record *text;
+
+  printf ("%08llx: multiple response sets\n",
+          (long long int) ftello (r->file));
+  text = open_text_record (r, size * count);
+  for (;;)
+    {
+      const char *name;
+      enum { MRSET_MC, MRSET_MD } type;
+      bool cat_label_from_counted_values = false;
+      bool label_from_var_label = false;
+      const char *counted;
+      const char *label;
+      const char *variables;
+
+      name = text_tokenize (text, '=');
+      if (name == NULL)
+        break;
+
+      if (text_match (text, 'C'))
+        {
+          type = MRSET_MC;
+          counted = NULL;
+          if (!text_match (text, ' '))
+            {
+              sys_warn (r, "missing space following 'C' at offset %zu "
+                        "in mrsets record", text_pos (text));
+              break;
+            }
+        }
+      else if (text_match (text, 'D'))
+        {
+          type = MRSET_MD;
+        }
+      else if (text_match (text, 'E'))
+        {
+          char *number;
+
+          type = MRSET_MD;
+          cat_label_from_counted_values = true;
+
+          if (!text_match (text, ' '))
+            {
+              sys_warn (r, _("Missing space following 'E' at offset %zu "
+                             "in MRSETS record"), text_pos (text));
+              break;
+            }
+
+          number = text_tokenize (text, ' ');
+          if (!strcmp (number, "11"))
+            label_from_var_label = true;
+          else if (strcmp (number, "1"))
+            sys_warn (r, _("Unexpected label source value \"%s\" "
+                           "following 'E' at offset %zu in MRSETS record"),
+                      number, text_pos (text));
+
+        }
+      else
+        {
+          sys_warn (r, "missing 'C', 'D', or 'E' at offset %zu "
+                    "in mrsets record", text_pos (text));
+          break;
+        }
+
+      if (type == MRSET_MD)
+        {
+          counted = text_parse_counted_string (text);
+          if (counted == NULL)
+            break;
+        }
+
+      label = text_parse_counted_string (text);
+      if (label == NULL)
+        break;
+
+      variables = text_tokenize (text, '\n');
+      if (variables == NULL)
+        {
+          sys_warn (r, "missing variable names following label "
+                    "at offset %zu in mrsets record", text_pos (text));
+          break;
+        }
+
+      printf ("\t\"%s\": multiple %s set",
+              name, type == MRSET_MC ? "category" : "dichotomy");
+      if (counted != NULL)
+        printf (", counted value \"%s\"", counted);
+      if (cat_label_from_counted_values)
+        printf (", category labels from counted values");
+      if (label[0] != '\0')
+        printf (", label \"%s\"", label);
+      if (label_from_var_label)
+        printf (", label from variable label");
+      printf(", variables \"%s\"\n", variables);
+    }
+  close_text_record (text);
+}
+
 /* Read record type 7, subtype 11. */
 static void
 read_display_parameters (struct sfm_reader *r, size_t size, size_t count)
@@ -605,7 +751,8 @@ read_display_parameters (struct sfm_reader *r, size_t size, size_t count)
   bool includes_width;
   size_t i;
 
-  printf ("%08lx: variable display parameters\n", ftell (r->file));
+  printf ("%08llx: variable display parameters\n",
+          (long long int) ftello (r->file));
   if (size != 4)
     {
       sys_warn (r, _("Bad size %zu on extension 11."), size);
@@ -656,7 +803,8 @@ read_long_var_name_map (struct sfm_reader *r, size_t size, size_t count)
   char *var;
   char *long_name;
 
-  printf ("%08lx: long variable names (short => long)\n", ftell (r->file));
+  printf ("%08llx: long variable names (short => long)\n",
+          (long long int) ftello (r->file));
   text = open_text_record (r, size * count);
   while (read_variable_to_value_pair (text, &var, &long_name))
     printf ("\t%s => %s\n", var, long_name);
@@ -672,7 +820,8 @@ read_long_string_map (struct sfm_reader *r, size_t size, size_t count)
   char *var;
   char *length_s;
 
-  printf ("%08lx: very long strings (variable => length)\n", ftell (r->file));
+  printf ("%08llx: very long strings (variable => length)\n",
+          (long long int) ftello (r->file));
   text = open_text_record (r, size * count);
   while (read_variable_to_value_pair (text, &var, &length_s))
     printf ("\t%s => %d\n", var, atoi (length_s));
@@ -720,12 +869,37 @@ read_attributes (struct sfm_reader *r, struct text_record *text,
     }
 }
 
+/* Read extended number of cases record. */
+static void
+read_ncases64 (struct sfm_reader *r, size_t size, size_t count)
+{
+  int64_t unknown, ncases64;
+
+  if (size != 8)
+    {
+      sys_warn (r, _("Bad size %zu for extended number of cases."), size);
+      skip_bytes (r, size * count);
+      return;
+    }
+  if (count != 2)
+    {
+      sys_warn (r, _("Bad count %zu for extended number of cases."), size);
+      skip_bytes (r, size * count);
+      return;
+    }
+  unknown = read_int64 (r);
+  ncases64 = read_int64 (r);
+  printf ("%08llx: extended number of cases: "
+          "unknown=%"PRId64", ncases64=%"PRId64"\n",
+          (long long int) ftello (r->file), unknown, ncases64);
+}
+
 static void
 read_datafile_attributes (struct sfm_reader *r, size_t size, size_t count) 
 {
   struct text_record *text;
   
-  printf ("%08lx: datafile attributes\n", ftell (r->file));
+  printf ("%08llx: datafile attributes\n", (long long int) ftello (r->file));
   text = open_text_record (r, size * count);
   read_attributes (r, text, "datafile");
   close_text_record (text);
@@ -734,22 +908,22 @@ read_datafile_attributes (struct sfm_reader *r, size_t size, size_t count)
 static void
 read_character_encoding (struct sfm_reader *r, size_t size, size_t count)
 {
-  const unsigned long int posn =  ftell (r->file);
+  long long int posn =  ftello (r->file);
   char *encoding = xcalloc (size, count + 1);
   read_string (r, encoding, count + 1);
 
-  printf ("%08lx: Character Encoding: %s\n", posn, encoding);
+  printf ("%08llx: Character Encoding: %s\n", posn, encoding);
 }
 
 static void
 read_long_string_value_labels (struct sfm_reader *r, size_t size, size_t count)
 {
-  const long start = ftell (r->file);
+  long long int start = ftello (r->file);
 
-  printf ("%08lx: long string value labels\n", start);
-  while (ftell (r->file) - start < size * count)
+  printf ("%08llx: long string value labels\n", start);
+  while (ftello (r->file) - start < size * count)
     {
-      long posn = ftell (r->file);
+      long long posn = ftello (r->file);
       char var_name[VAR_NAME_LEN + 1];
       int var_name_len;
       int n_values;
@@ -768,7 +942,7 @@ read_long_string_value_labels (struct sfm_reader *r, size_t size, size_t count)
       width = read_int (r);
       n_values = read_int (r);
 
-      printf ("\t%08lx: %s, width %d, %d values\n",
+      printf ("\t%08llx: %s, width %d, %d values\n",
               posn, var_name, width, n_values);
 
       /* Read values. */
@@ -780,7 +954,7 @@ read_long_string_value_labels (struct sfm_reader *r, size_t size, size_t count)
           char *label;
          int label_length;
 
-          posn = ftell (r->file);
+          posn = ftello (r->file);
 
           /* Read value. */
           value_length = read_int (r);
@@ -792,7 +966,7 @@ read_long_string_value_labels (struct sfm_reader *r, size_t size, size_t count)
           label = xmalloc (label_length + 1);
           read_string (r, label, label_length + 1);
 
-          printf ("\t\t%08lx: \"%s\" (%d bytes) => \"%s\" (%d bytes)\n",
+          printf ("\t\t%08llx: \"%s\" (%d bytes) => \"%s\" (%d bytes)\n",
                   posn, value, value_length, label, label_length);
 
           free (value);
@@ -801,12 +975,86 @@ read_long_string_value_labels (struct sfm_reader *r, size_t size, size_t count)
     }
 }
 
+static void
+hex_dump (size_t offset, const void *buffer_, size_t buffer_size)
+{
+  const uint8_t *buffer = buffer_;
+
+  while (buffer_size > 0)
+    {
+      size_t n = MIN (buffer_size, 16);
+      size_t i;
+
+      printf ("%04zx", offset);
+      for (i = 0; i < 16; i++)
+        {
+          if (i < n)
+            printf ("%c%02x", i == 8 ? '-' : ' ', buffer[i]);
+          else
+            printf ("   ");
+        }
+
+      printf (" |");
+      for (i = 0; i < 16; i++)
+        {
+          unsigned char c = i < n ? buffer[i] : ' ';
+          putchar (isprint (c) ? c : '.');
+        }
+      printf ("|\n");
+
+      offset += n;
+      buffer += n;
+      buffer_size -= n;
+    }
+}
+
+/* Reads and prints any type 7 record that we don't understand. */
+static void
+read_unknown_extension (struct sfm_reader *r, size_t size, size_t count)
+{
+  unsigned char *buffer;
+  size_t i;
+
+  if (size == 0 || count > 65536 / size)
+    skip_bytes (r, size * count);
+  else if (size != 1)
+    {
+      buffer = xmalloc (size);
+      for (i = 0; i < count; i++)
+        {
+          read_bytes (r, buffer, size);
+          hex_dump (i * size, buffer, size);
+        }
+      free (buffer);
+    }
+  else
+    {
+      buffer = xmalloc (count);
+      read_bytes (r, buffer, count);
+      if (memchr (buffer, 0, count) == 0)
+        for (i = 0; i < count; i++)
+          {
+            unsigned char c = buffer[i];
+
+            if (c == '\\')
+              printf ("\\\\");
+            else if (c == '\n' || isprint (c))
+              putchar (c);
+            else
+              printf ("\\%02x", c);
+          }
+      else
+        hex_dump (0, buffer, count);
+      free (buffer);
+    }
+}
+
 static void
 read_variable_attributes (struct sfm_reader *r, size_t size, size_t count) 
 {
   struct text_record *text;
   
-  printf ("%08lx: variable attributes\n", ftell (r->file));
+  printf ("%08llx: variable attributes\n", (long long int) ftello (r->file));
   text = open_text_record (r, size * count);
   for (;;) 
     {
@@ -816,6 +1064,82 @@ read_variable_attributes (struct sfm_reader *r, size_t size, size_t count)
     }
   close_text_record (text);
 }
+
+static void
+read_compressed_data (struct sfm_reader *r)
+{
+  enum { N_OPCODES = 8 };
+  uint8_t opcodes[N_OPCODES];
+  long long int opcode_ofs;
+  int opcode_idx;
+  int case_num;
+  int i;
+
+  read_int (r);
+  printf ("\n%08llx: compressed data:\n", (long long int) ftello (r->file));
+
+  opcode_idx = N_OPCODES;
+  case_num = 0;
+  for (case_num = 0; ; case_num++)
+    {
+      printf ("%08llx: case %d's uncompressible data begins\n",
+              (long long int) ftello (r->file), case_num);
+      for (i = 0; i < r->n_var_widths; i++)
+        {
+          int width = r->var_widths[i];
+          char raw_value[8];
+          int opcode;
+
+          if (opcode_idx >= N_OPCODES)
+            {
+              opcode_ofs = ftello (r->file);
+              read_bytes (r, opcodes, 8);
+              opcode_idx = 0;
+            }
+          opcode = opcodes[opcode_idx];
+          printf ("%08llx: variable %d: opcode %d: ",
+                  opcode_ofs + opcode_idx, i, opcode);
+
+          switch (opcode)
+            {
+            default:
+              printf ("%g", opcode - r->bias);
+              if (width != 0)
+                printf (", but this is a string variable (width=%d)", width);
+              printf ("\n");
+              break;
+
+            case 252:
+              printf ("end of data\n");
+              return;
+
+            case 253:
+              read_bytes (r, raw_value, 8);
+              printf ("uncompressible data: ");
+              print_untyped_value (r, raw_value);
+              printf ("\n");
+              break;
+
+            case 254:
+              printf ("spaces");
+              if (width == 0)
+                printf (", but this is a numeric variable");
+              printf ("\n");
+              break;
+
+            case 255:
+              printf ("SYSMIS");
+              if (width != 0)
+                printf (", but this is a string variable (width=%d)", width);
+
+              printf ("\n");
+              break;
+            }
+
+          opcode_idx++;
+        }
+    }
+}
 \f
 /* Helpers for reading records that consist of structured text
    strings. */
@@ -823,6 +1147,7 @@ read_variable_attributes (struct sfm_reader *r, size_t size, size_t count)
 /* State. */
 struct text_record
   {
+    struct sfm_reader *reader;  /* Reader. */
     char *buffer;               /* Record contents. */
     size_t size;                /* Size of buffer. */
     size_t pos;                 /* Current position in buffer. */
@@ -836,6 +1161,8 @@ open_text_record (struct sfm_reader *r, size_t size)
   struct text_record *text = xmalloc (sizeof *text);
   char *buffer = xmalloc (size + 1);
   read_bytes (r, buffer, size);
+  buffer[size] = '\0';
+  text->reader = r;
   text->buffer = buffer;
   text->size = size;
   text->pos = 0;
@@ -878,6 +1205,54 @@ text_match (struct text_record *text, int c)
     return false;
 }
 
+/* Reads a integer value expressed in decimal, then a space, then a string that
+   consists of exactly as many bytes as specified by the integer, then a space,
+   from TEXT.  Returns the string, null-terminated, as a subset of TEXT's
+   buffer (so the caller should not free the string). */
+static const char *
+text_parse_counted_string (struct text_record *text)
+{
+  size_t start;
+  size_t n;
+  char *s;
+
+  start = text->pos;
+  n = 0;
+  while (isdigit ((unsigned char) text->buffer[text->pos]))
+    n = (n * 10) + (text->buffer[text->pos++] - '0');
+  if (start == text->pos)
+    {
+      sys_error (text->reader, "expecting digit at offset %zu in record",
+                 text->pos);
+      return NULL;
+    }
+
+  if (!text_match (text, ' '))
+    {
+      sys_error (text->reader, "expecting space at offset %zu in record",
+                 text->pos);
+      return NULL;
+    }
+
+  if (text->pos + n > text->size)
+    {
+      sys_error (text->reader, "%zu-byte string starting at offset %zu "
+                 "exceeds record length %zu", n, text->pos, text->size);
+      return NULL;
+    }
+
+  s = &text->buffer[text->pos];
+  if (s[n] != ' ')
+    {
+      sys_error (text->reader, "expecting space at offset %zu following "
+                 "%zu-byte string", text->pos + n, n);
+      return NULL;
+    }
+  s[n] = '\0';
+  text->pos += n + 1;
+  return s;
+}
+
 /* Reads a variable=value pair from TEXT.
    Looks up the variable in DICT and stores it into *VAR.
    Stores a null-terminated value into *VALUE. */
@@ -896,6 +1271,13 @@ read_variable_to_value_pair (struct text_record *text,
     text->pos++;
   return true;
 }
+
+/* Returns the current byte offset inside the TEXT's string. */
+static size_t
+text_pos (const struct text_record *text)
+{
+  return text->pos;
+}
 \f
 static void
 usage (int exit_code)
@@ -910,8 +1292,8 @@ usage (int exit_code)
 static void
 sys_msg (struct sfm_reader *r, const char *format, va_list args)
 {
-  printf ("\"%s\" near offset 0x%lx: ",
-          r->file_name, (unsigned long) ftell (r->file));
+  printf ("\"%s\" near offset 0x%llx: ",
+          r->file_name, (long long int) ftello (r->file));
   vprintf (format, args);
   putchar ('\n');
 }
@@ -981,6 +1363,16 @@ read_int (struct sfm_reader *r)
   return integer_get (r->integer_format, integer, sizeof integer);
 }
 
+/* Reads a 64-bit signed integer from R and returns its value in
+   host format. */
+static int64_t
+read_int64 (struct sfm_reader *r)
+{
+  uint8_t integer[8];
+  read_bytes (r, integer, sizeof integer);
+  return integer_get (r->integer_format, integer, sizeof integer);
+}
+
 /* Reads a 64-bit floating-point number from R and returns its
    value in host format. */
 static double
index 1ceab30801673dc06137b1222f29eb19388c072b..dcbfc0ac4e0d59d650abd12a077db7ed8d562cd4 100755 (executable)
@@ -142,7 +142,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/epoch.stat > $TEMPDIR/epoch.err 2> $TEMPDIR/epoch.out
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv $TEMPDIR/epoch.stat > $TEMPDIR/epoch.err 2> $TEMPDIR/epoch.out
 
 activity="compare results"
 perl -pi -e 's/^\s*$//g' $TEMPDIR/epoch.out
index 339abed4dd90318ffb4fb8a27d5f6103f2c69f0b..49ad4f7d51e55f0fd84579b7a85a3836424ac2bc 100755 (executable)
@@ -1565,7 +1565,7 @@ sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt.stat \
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run optimizing program"
-$SUPERVISOR $PSPP --testing-mode \
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv \
         $TEMPDIR/expr-opt.stat >$TEMPDIR/expr-opt.err 2> $TEMPDIR/expr-opt.out
 
 activity="compare optimizing output"
@@ -1581,7 +1581,7 @@ sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-noopt.stat \
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run non-optimizing program"
-$SUPERVISOR $PSPP --testing-mode \
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv \
        $TEMPDIR/expr-noopt.stat >$TEMPDIR/expr-noopt.err 2> $TEMPDIR/expr-noopt.out
 
 activity="compare non-optimizing output"
@@ -1597,7 +1597,7 @@ sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt-pos.stat \
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run optimizing postfix program"
-$SUPERVISOR $PSPP --testing-mode \
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv \
         $TEMPDIR/expr-opt-pos.stat >$TEMPDIR/expr-opt-pos.err 2> $TEMPDIR/expr-opt-pos.out
 if [ $? -eq 0 ] ; then no_result ; fi
 
@@ -1609,7 +1609,7 @@ sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-noopt-pos.stat \
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run non-optimizing postfix program"
-$SUPERVISOR $PSPP --testing-mode \
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv \
        $TEMPDIR/expr-noopt-pos.stat >$TEMPDIR/expr-noopt-pos.err 2> $TEMPDIR/expr-noopt-pos.out
 if [ $? -eq 0 ] ; then no_result ; fi
 
index 58fe386d291f4738661c0385d1ee67faeaf0d180..88a57e5fcba4d643b2a6614a1ac0308886d9dee2 100755 (executable)
@@ -60,7 +60,7 @@ perl $top_srcdir/tests/expressions/randist/randist.pl \
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run command file"
-$SUPERVISOR $PSPP --testing-mode \
+$SUPERVISOR $PSPP -o pspp.csv \
     $TEMPDIR/randist.pspp >$TEMPDIR/randist.err 2> $TEMPDIR/randist.out
 if [ $? -ne 0 ] ; then fail ; fi
 
index cb0f5ba3a04161a27ca712c4b43df36c7e83e2a8..c751689e1accf24ce93dc0761cb10eefb5c0b189 100755 (executable)
@@ -88,22 +88,21 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/valuelabel.stat
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/valuelabel.stat
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-n s     nlabel     slabel
-- - ---------- ----------
-.                         
-0 a Very dissa Wouldn't b 
-1 b Dissatisfi Unhappy    
-2 c Neutral    Bored      
-3 d Satisfied  Satiated   
-4 e Very satis Elated     
-5 f                       
-6 g                       
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Data List
+n,s,nlabel,slabel
+.,,,
+0,a,Very dissa,Wouldn't b
+1,b,Dissatisfi,Unhappy   
+2,c,Neutral   ,Bored     
+3,d,Satisfied ,Satiated  
+4,e,Very satis,Elated    
+5,f,,
+6,g,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index c4a2d5d46e5908aabd05e5fc3da29f1e61d419c6..64ea80d119c30b8b098532f62f35d44813af0226 100755 (executable)
@@ -101,26 +101,23 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/variables.stat > $TEMPDIR/variables.err 2> $TEMPDIR/variables.out
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/variables.stat > $TEMPDIR/variables.err 2> $TEMPDIR/variables.out
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|N1      |     1|  1-  1|F1.0  |
-|N2      |     1|  2-  2|F1.0  |
-|N3      |     1|  3-  3|F1.0  |
-|N4      |     1|  4-  4|F1.0  |
-|N5      |     1|  5-  5|F1.0  |
-+--------+------+-------+------+
-N1 N2 N3 N4 N5 P1 P2 P3 P4 P5 MC VC S1 S2 S3 S4 S5 M1 M2 M3 M4 M5 V1 V2 V3 V4 V5
--- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 1  2  3  4  5  .  2  .  .  .  4  1  0  0  0  0  0  1  0  1  1  1  1  2  3  4  5 
- 6  7  8  9  .  6  7  8  9  .  1  4  0  0  0  0  1  0  0  0  0  1  6  7  8  9  . 
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+N1,1,1-  1,F1.0
+N2,1,2-  2,F1.0
+N3,1,3-  3,F1.0
+N4,1,4-  4,F1.0
+N5,1,5-  5,F1.0
+
+Table: Data List
+N1,N2,N3,N4,N5,P1,P2,P3,P4,P5,MC,VC,S1,S2,S3,S4,S5,M1,M2,M3,M4,M5,V1,V2,V3,V4,V5
+1,2,3,4,5,.,2,.,.,.,4,1,0,0,0,0,0,1,0,1,1,1,1,2,3,4,5
+6,7,8,9,.,6,7,8,9,.,1,4,0,0,0,0,1,0,0,0,0,1,6,7,8,9,.
 EOF
 
 if [ $? -ne 0 ] ; then no_result ; fi
index 57cef8b6607da8d3cba4f6ab98db333088d2e468..3eb4140476c509ae919252fc2a46f3d7e4e557dc 100755 (executable)
@@ -78,26 +78,23 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/vectors.stat > $TEMPDIR/vectors.err 2> $TEMPDIR/vectors.out
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/vectors.stat > $TEMPDIR/vectors.err 2> $TEMPDIR/vectors.out
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|N1      |     1|  1-  1|F1.0  |
-|N2      |     1|  2-  2|F1.0  |
-|N3      |     1|  3-  3|F1.0  |
-|N4      |     1|  4-  4|F1.0  |
-|N5      |     1|  5-  5|F1.0  |
-+--------+------+-------+------+
-N1 N2 N3 N4 N5 X1 X2 X3 X4 X5  I
--- -- -- -- -- -- -- -- -- -- --
- 1  2  3  4  5  .  3  .  .  .  5 
- 6  7  8  9  .  7  8  9 10  .  5 
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+N1,1,1-  1,F1.0
+N2,1,2-  2,F1.0
+N3,1,3-  3,F1.0
+N4,1,4-  4,F1.0
+N5,1,5-  5,F1.0
+
+Table: Data List
+N1,N2,N3,N4,N5,X1,X2,X3,X4,X5,I
+1,2,3,4,5,.,3,.,.,.,5
+6,7,8,9,.,7,8,9,10,.,5
 EOF
 
 if [ $? -ne 0 ] ; then no_result ; fi
index 5139dd30abcd6ba7565033593913a775119280da..57f928cf7cc11e6371bb47a89fc598873ab3954b 100755 (executable)
@@ -231,26 +231,26 @@ list.
 EOF
     if [ $? -ne 0 ] ; then no_result ; fi
 
-    # Make sure that pspp.list isn't left over from another run.
-    rm -f pspp.list
+    # Make sure that pspp.csv isn't left over from another run.
+    rm -f pspp.csv
 
     activity="run $type.pspp"
-    $SUPERVISOR $PSPP --testing-mode $type.pspp
+    $SUPERVISOR $PSPP -o pspp.csv $type.pspp
     if [ $? -ne 0 ] ; then fail ; fi
 
     activity="compare $type.pspp output"
-    perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-    diff -b  $TEMPDIR/pspp.list - << EOF
-     start        end count
----------- ---------- -----
-07/22/2007 10/06/2007   321
-07/14/1789 08/26/1789     4
-01/01/1972 12/31/1999   682
-     start        end count
----------- ---------- -----
-07/22/2007 10/06/2007   322
-07/14/1789 08/26/1789     5
-01/01/1972 12/31/1999   683
+    diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+start,end,count
+07/22/2007,10/06/2007,321
+07/14/1789,08/26/1789,4
+01/01/1972,12/31/1999,682
+
+Table: Data List
+start,end,count
+07/22/2007,10/06/2007,322
+07/14/1789,08/26/1789,5
+01/01/1972,12/31/1999,683
 EOF
     if [ $? -ne 0 ] ; then fail ; fi
 done
index 934f4302c0fef129cec4fe0469b111aa36ea3836..46c972fead425f8deb770eb0498c448f9ea62db1 100755 (executable)
@@ -71,7 +71,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode bcd-in.pspp
+$SUPERVISOR $PSPP -o pspp.csv bcd-in.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="gunzip expected results"
index caffb03b1a1073236a75549ef7c1e918504da8d0..6fb4a972460a761773313e2bf8adba08c8a0c9f4 100755 (executable)
@@ -154,7 +154,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode binhex-out.pspp
+$SUPERVISOR $PSPP -o pspp.csv binhex-out.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="gunzip expected results"
index edadc3f5b8e184fa1fa28401f7b2359724bad4d2..9488fb9b5abbe168c9dcdbf66a549fb2fe5f7abf 100755 (executable)
@@ -254,7 +254,7 @@ $PERL date-in.pl
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode date-in.pspp
+$SUPERVISOR $PSPP -o pspp.csv date-in.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare adate.out output"
index 6e28083cfaa2dd697561074582ea9ec9748d471b..5f360c73a6121bf0a3d31bcffdd554fb25137849 100755 (executable)
@@ -88,7 +88,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode date-out.pspp
+$SUPERVISOR $PSPP -o pspp.csv date-out.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
@@ -510,7 +510,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode bad-date-out.pspp
+$SUPERVISOR $PSPP -o pspp.csv bad-date-out.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
index 2a6b608740e1e248895056a043513f0bcdf3614d..dee97909567b6bfcfd424dc9c673f8fea89dff56 100755 (executable)
@@ -149,7 +149,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/float-format.pspp
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv $TEMPDIR/float-format.pspp
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass
index 75885a7830c901fc4e0dcaba897cfb8caae28dde..c84860a737920eb090d4ca74f91f93b70836ec30 100755 (executable)
@@ -186,7 +186,7 @@ activity="create syntax file"
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode \
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv \
         $TEMPDIR/test.stat >$TEMPDIR/test.err 2> $TEMPDIR/test.out
 
 activity="compare output"
index 3a54c2f0fc8e515f15fa07158c2bfe67296032c7..50c8c93bea438fc16f18a5b628b4832dfae0e170 100755 (executable)
@@ -72,7 +72,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode ib-in.pspp
+$SUPERVISOR $PSPP -o pspp.csv ib-in.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="gunzip expected results"
index 1087a06f1292a70b1889196cb8a0fc75757f33be..eaab8e143943b03a2ce8d7cd68afecd5b11e3871 100755 (executable)
@@ -71,7 +71,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode legacy-in.pspp
+$SUPERVISOR $PSPP -o pspp.csv legacy-in.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="gunzip expected results"
index 2d32a594ec244bfd5afdeca080cf4ddd9c71eacc..dd5f02724cc418f6c296b5b9da4c2a77f9a086b2 100755 (executable)
@@ -105,7 +105,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode month-in.pspp
+$SUPERVISOR $PSPP -o pspp.csv month-in.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
index 65d0a42ed29faa1106a81ff2762236008f4b6422..fba0ae8990dc17d18b9f9ebea1a23071a602cc1d 100755 (executable)
@@ -41,6 +41,7 @@ cd $TEMPDIR
 activity="write pspp syntax"
 cat > month-out.pspp <<EOF
 set errors=none.
+set mxerr=1000000.
 set mxwarns=10000000.
 data list /x 1-10.
 begin data.
@@ -111,7 +112,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode month-out.pspp
+$SUPERVISOR $PSPP -o pspp.csv month-out.pspp
 if [ $? -eq 0 ] ; then no_result ; fi
 
 activity="compare output"
index b61019f370a57e782d05cfc352b2e6c0b363f139..d515546775d0fbefff5aa1dd3d1fbe70a2ffb7e1 100755 (executable)
@@ -200,7 +200,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 echo -n .
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode num-in.pspp
+$SUPERVISOR $PSPP -o pspp.csv num-in.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 echo -n .
 
index cf4185aea3f453b86688908b9f1181337bb16f44..acf1846f79c291d57acf7f2299360be6040ba700 100755 (executable)
@@ -45,7 +45,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 echo -n .
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode num-out.pspp
+$SUPERVISOR $PSPP -o pspp.csv num-out.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 echo -n .
 
index 69d7b84d7a165c7a4975b22ccb65a4ecfb95c48d..ca80f960d3a145bc40dd2481cadcb0d9eda2b5d4 100755 (executable)
@@ -170,7 +170,7 @@ $PERL time-in.pl
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode time-in.pspp
+$SUPERVISOR $PSPP -o pspp.csv time-in.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare time.out output"
index c110b966a9668f64b51d69f617d6e0c2610e94f7..ed2f36dfc98806b772aeac5572627dfa44c02426 100755 (executable)
@@ -313,7 +313,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode time-out.pspp
+$SUPERVISOR $PSPP -o pspp.csv time-out.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
index 6105ae07c45482ec6a362361e3f1f32b9aa4200d..b9b57484b725ff39d9919a5f88e01586255d2f40 100755 (executable)
@@ -69,7 +69,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode wkday-in.pspp
+$SUPERVISOR $PSPP -o pspp.csv wkday-in.pspp
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
index f4ea9ec34d0351f8f0b5bce97ccd9d59c1bb99b6..4116656e3679492619b230ce094f999a63c60ae3 100755 (executable)
@@ -72,7 +72,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode wkday-out.pspp
+$SUPERVISOR $PSPP -o pspp.csv wkday-out.pspp
 if [ $? -eq 0 ] ; then no_result ; fi
 
 activity="compare output"
diff --git a/tests/language/dictionary/mrsets.at b/tests/language/dictionary/mrsets.at
new file mode 100644 (file)
index 0000000..4567173
--- /dev/null
@@ -0,0 +1,313 @@
+AT_BANNER([MRSETS])
+
+m4_define([DEFINE_MRSETS_DATA],
+  [DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a).
+BEGIN DATA.
+1234acbd
+5678efgh
+END DATA.])
+
+m4_define([DEFINE_MRSETS],
+  [DEFINE_MRSETS_DATA
+
+[VARIABLE LABEL
+    w 'duplicate variable label'
+    x 'Variable x'
+    z 'Duplicate variable label'.
+VALUE LABELS
+    /w 1 'w value 1'
+    /y 1 'duplicate Value label'
+    /z 1 'duplicate value Label'
+    /a b c d 'a' 'burger' 'b' 'fries' 'c' 'shake' 'd' 'taco'.
+ADD VALUE LABELS
+    /b 'b' 'Fries'
+    /c 'b' 'XXX'.
+MRSETS
+    /MDGROUP NAME=$a
+     LABEL='First multiple dichotomy group'
+     CATEGORYLABELS=VARLABELS
+     VARIABLES=w x y z
+     VALUE=5
+    /MDGROUP NAME=$b
+     CATEGORYLABELS=COUNTEDVALUES
+     VARIABLES=z y
+     VALUE=123
+    /MDGROUP NAME=$c
+     LABELSOURCE=VARLABEL
+     CATEGORYLABELS=COUNTEDVALUES
+     VARIABLES=w x y z
+     VALUE=1
+    /MDGROUP NAME=$d
+     LABELSOURCE=VARLABEL
+     VARIABLES=a b c d
+     VALUE='c'
+    /MCGROUP NAME=$e
+     LABEL='First multiple category group'
+     VARIABLES=w x y z
+    /MCGROUP NAME=$f
+     VARIABLES=a b c d.
+]])
+
+m4_define([DEFINE_MRSETS_OUTPUT],
+  [mrsets.sps:25: warning: MRSETS: Variables w and z specified as part of multiple dichotomy group $a have the same variable label.  Categories represented by these variables will not be distinguishable in output.
+
+mrsets.sps:29: warning: MRSETS: Variable z specified as part of multiple dichotomy group $b (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value.  This category will not be distinguishable in output.
+
+mrsets.sps:29: warning: MRSETS: Variable y specified as part of multiple dichotomy group $b (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value.  This category will not be distinguishable in output.
+
+mrsets.sps:34: warning: MRSETS: Variable x specified as part of multiple dichotomy group $c (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value.  This category will not be distinguishable in output.
+
+mrsets.sps:34: warning: MRSETS: Variables y and z specified as part of multiple dichotomy group $c (which has CATEGORYLABELS=COUNTEDVALUES) have the same value label for the the group's counted value.  These categories will not be distinguishable in output.
+
+mrsets.sps:38: warning: MRSETS: MDGROUP subcommand for group $d specifies LABELSOURCE=VARLABEL but not CATEGORYLABELS=COUNTEDVALUES.  Ignoring LABELSOURCE.
+
+"mrsets.sps:41: warning: MRSETS: Variables specified on MCGROUP should have the same categories, but w and y (and possibly others) in multiple category group $e have different value labels for value 1."
+
+"mrsets.sps:42: warning: MRSETS: Variables specified on MCGROUP should have the same categories, but a and c (and possibly others) in multiple category group $f have different value labels for value b."
+])
+
+m4_define([MRSETS_DISPLAY_OUTPUT],
+  [Table: Multiple Response Sets
+Name,Variables,Details
+$a,"w
+x
+y
+z
+","Multiple dichotomy set
+Label: First multiple dichotomy group
+Label source: Provided by user
+Counted value: 5
+Category label source: Variable labels
+"
+$b,"z
+y
+","Multiple dichotomy set
+Counted value: 123
+Category label source: Value labels of counted value
+"
+$c,"w
+x
+y
+z
+","Multiple dichotomy set
+Label: duplicate variable label
+Label source: First variable label among variables
+Counted value: 1
+Category label source: Value labels of counted value
+"
+$d,"a
+b
+c
+d
+","Multiple dichotomy set
+Counted value: ""c""
+Category label source: Variable labels
+"
+$e,"w
+x
+y
+z
+","Multiple category set
+Label: First multiple category group
+"
+$f,"a
+b
+c
+d
+","Multiple category set
+"
+])
+
+AT_SETUP([MRSETS add, display, delete])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS
+[MRSETS
+    /DISPLAY NAME=[$a]
+    /DISPLAY NAME=ALL
+    /DELETE NAME=[$c]
+    /DISPLAY NAME=ALL
+    /DELETE NAME=ALL
+    /DISPLAY NAME=ALL.
+]])
+AT_CHECK([pspp -O format=csv mrsets.sps], [0],
+  [DEFINE_MRSETS_OUTPUT
+Table: Multiple Response Sets
+Name,Variables,Details
+$a,"w
+x
+y
+z
+","Multiple dichotomy set
+Label: First multiple dichotomy group
+Label source: Provided by user
+Counted value: 5
+Category label source: Variable labels
+"
+
+MRSETS_DISPLAY_OUTPUT
+Table: Multiple Response Sets
+Name,Variables,Details
+$a,"w
+x
+y
+z
+","Multiple dichotomy set
+Label: First multiple dichotomy group
+Label source: Provided by user
+Counted value: 5
+Category label source: Variable labels
+"
+$b,"z
+y
+","Multiple dichotomy set
+Counted value: 123
+Category label source: Value labels of counted value
+"
+$d,"a
+b
+c
+d
+","Multiple dichotomy set
+Counted value: ""c""
+Category label source: Variable labels
+"
+$e,"w
+x
+y
+z
+","Multiple category set
+Label: First multiple category group
+"
+$f,"a
+b
+c
+d
+","Multiple category set
+"
+
+mrsets.sps:50: note: MRSETS: The active file dictionary does not contain any multiple response sets.
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS read and write])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS
+SAVE OUTFILE='mrsets.sav'.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [0], [DEFINE_MRSETS_OUTPUT])
+AT_DATA([mrsets2.sps],
+  [GET FILE='mrsets.sav'.
+MRSETS /DISPLAY NAME=ALL.
+])
+AT_CHECK([pspp -O format=csv mrsets2.sps], [0], [MRSETS_DISPLAY_OUTPUT],
+  [], [hd mrsets.sav])
+AT_CLEANUP
+
+AT_SETUP([MRSETS names must begin with $])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+MRSETS /MCGROUP NAME=x.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [1],
+  [mrsets.sps:6: error: MRSETS: x is not a valid name for a multiple response set.  Multiple response set names must begin with `$'.
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS must have at least 2 variables])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+MRSETS /MCGROUP NAME=$x VARIABLES=a.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [1],
+  ["mrsets.sps:6: error: MRSETS: VARIABLES specified only variable a on MCGROUP, but at least two variables are required."
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS does not allow noninteger VALUE])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+MRSETS /MDGROUP VALUE=1.5.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [1],
+  [mrsets.sps:6: error: MRSETS: Numeric VALUE must be an integer.
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS requires NAME to define a group])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+MRSETS /MCGROUP VARIABLES=a b c.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [1],
+  [mrsets.sps:6: error: MRSETS: Required NAME specification missing from MCGROUP subcommand.
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS requires VARIABLES to define a group])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+MRSETS /MCGROUP NAME=$Mcgroup.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [1],
+  [mrsets.sps:6: error: MRSETS: Required VARIABLES specification missing from MCGROUP subcommand.
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS variables must be same type])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+MRSETS /MCGROUP NAME=$mygroup VARIABLES=a b x y.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [1],
+  [mrsets.sps:6: error: MRSETS: a and x are not the same type.  All variables in this variable list must be of the same type.  x will be omitted from the list.
+
+mrsets.sps:6: error: MRSETS: a and y are not the same type.  All variables in this variable list must be of the same type.  y will be omitted from the list.
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS variables and VALUE must be same type])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+MRSETS /MDGROUP NAME=$group1 VARIABLES=a b VALUE=1.
+MRSETS /MDGROUP NAME=$group2 VARIABLES=x y VALUE='abc'.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [1],
+  ["mrsets.sps:6: error: MRSETS: MDGROUP subcommand for group $group1 specifies a string VALUE, but the variables specified for this group are numeric."
+
+"mrsets.sps:7: error: MRSETS: MDGROUP subcommand for group $group2 specifies a string VALUE, but the variables specified for this group are numeric."
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS VALUE must not be too wide])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+MRSETS /MDGROUP NAME=$group1 VARIABLES=a b VALUE='abc'.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [1],
+  ["mrsets.sps:6: error: MRSETS: VALUE string on MDGROUP subcommand for group $group1 is 3 bytes long, but it must be no longer than the narrowest variable in the group, which is a with a width of 1 bytes."
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS LABEL and LABELSOURCE are exclusive])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+MRSETS /MDGROUP NAME=$group1 VARIABLES=a b VALUE='a'
+                LABEL='label' LABELSOURCE=VARLABEL.
+])
+AT_CHECK([pspp -O format=csv mrsets.sps], [0],
+  [mrsets.sps:7: warning: MRSETS: MDGROUP subcommand for group $group1 specifies LABELSOURCE=VARLABEL but not CATEGORYLABELS=COUNTEDVALUES.  Ignoring LABELSOURCE.
+])
+AT_CLEANUP
+
+AT_SETUP([MRSETS DISPLAY or DELETE unknown group])
+AT_DATA([mrsets.sps],
+  [DEFINE_MRSETS_DATA
+[MRSETS /DISPLAY NAME=[$x].
+MRSETS /DELETE NAME=[$y].
+]])
+AT_CHECK([pspp -O format=csv mrsets.sps], [1],
+  [mrsets.sps:6: error: MRSETS: No multiple response set named $x.
+
+mrsets.sps:7: error: MRSETS: No multiple response set named $y.
+])
+AT_CLEANUP
diff --git a/tests/language/stats/aggregate.at b/tests/language/stats/aggregate.at
new file mode 100644 (file)
index 0000000..5e00965
--- /dev/null
@@ -0,0 +1,212 @@
+AT_BANNER([AGGREGATE procedure])
+
+dnl CHECK_AGGREGATE(OUTFILE, SORT, MISSING)
+dnl
+dnl Checks the AGGREGATE procedure with the specified combination of:
+dnl
+dnl - OUTFILE: One of "scratch", "active", or "external" according to
+dnl   where AGGREGATE's output should be directed.
+dnl 
+dnl - SORT: Either "presorted" or "unsorted" according to whether
+dnl   AGGREGATE should received presorted input.
+dnl
+dnl - MISSING: Either "itemwise" or "columnwise" according to the basis
+dnl   on which missing values should be eliminated.
+dnl
+m4_define([CHECK_AGGREGATE], [
+  AT_SETUP([AGGREGATE $2 data to $1 file, $3 missing])
+  AT_DATA([aggregate.data],
+  [2 42
+1001
+4 41
+3112
+1112
+2661
+1221
+2771
+1331
+1441
+2881
+1551
+])
+  AT_DATA([aggregate.sps],
+    [DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4.
+WEIGHT BY w.
+MISSING VALUES n(4) s('4').
+m4_if([$2], [presorted], [SORT CASES BY g.])
+AGGREGATE dnl
+m4_if([$1], [active], [OUTFILE=*],
+      [$1], [external], [OUTFILE='aggregate.sys'],
+      [outfile=@%:@AGGREGATE]) dnl
+m4_if([$2], [presorted], [/PRESORTED]) dnl
+m4_if([$3], [columnwise], [/MISSING=COLUMNWISE])
+       /DOCUMENT
+       /BREAK=g
+       /N = n
+       /NI = n./
+       NU = nu
+       /NUI = nu./
+       NFGT2 = fgt(n, 2)
+       /NFGT2I = fgt.(n, 2)
+       /SFGT2 = fgt(s, '2')
+       /SFGT2I = fgt.(s, '2')
+       /NFIN23 = fin(n, 2, 3)
+       /NFIN23I = fin.(n, 2, 3)
+       /SFIN23 = fin(s, '2', '3')
+       /SFIN23I = fin.(s, '2', '3')
+       /NFLT2 = flt(n, 2)
+       /NFLT2I = flt.(n, 2)
+       /SFLT2 = flt(s, '2')
+       /SFLT2I = flt.(s, '2')
+       /NFIRST = first(n)
+       /NFIRSTI = first.(n)
+       /SFIRST = first(s)
+       /SFIRSTI = first.(s)
+       /NFOUT23 = fout(n, 3, 2)
+       /NFOUT23I = fout.(n, 3, 2)
+       /SFOUT23 = fout(s, '3', '2')
+       /SFOUT23I = fout.(s, '3', '2')
+       /NLAST = last(n)
+       /NLASTI = last.(n)
+       /SLAST = last(s)
+       /SLASTI = last.(s)
+       /NMAX = max(n)
+       /NMAXI = max.(n)
+       /SMAX = max(s)
+       /SMAXI = max.(s)
+       /NMEAN = mean(n)
+       /NMEANI = mean.(n)
+       /NMIN = min(n)
+       /NMINI = min.(n)
+       /SMIN = min(s)
+       /SMINI = min.(s)
+       /NN = n(n)
+       /NNI = n.(n)
+       /SN = n(s)
+       /SNI = n.(s)
+       /NNMISS = nmiss(n)
+       /NNMISSI = nmiss.(n)
+       /SNMISS = nmiss(s)
+       /SNMISSI = nmiss.(s)
+       /NNU = nu(n)
+       /NNUI = nu.(n)
+       /SNU = nu(s)
+       /SNUI = nu.(s)
+       /NNUMISS = numiss(n)
+       /NNUMISSI = numiss.(n)
+       /SNUMISS = numiss(s)
+       /SNUMISSI = numiss.(s)
+       /NPGT2 = pgt(n, 2)
+       /NPGT2I = pgt.(n, 2)
+       /SPGT2 = pgt(s, '2')
+       /SPGT2I = pgt.(s, '2')
+       /NPIN23 = pin(n, 2, 3)
+       /NPIN23I = pin.(n, 2, 3)
+       /SPIN23 = pin(s, '2', '3')
+       /SPIN23I = pin.(s, '2', '3')
+       /NPLT2 = plt(n, 2)
+       /NPLT2I = plt.(n, 2)
+       /SPLT2 = plt(s, '2')
+       /SPLT2I = plt.(s, '2')
+       /NPOUT23 = pout(n, 2, 3)
+       /NPOUT23I = pout.(n, 2, 3)
+       /SPOUT23 = pout(s, '2', '3')
+       /SPOUT23I = pout.(s, '2', '3')
+       /NMEDIAN = median(n)
+       /NMEDIANI = median.(n)
+       /NSD = sd(n)
+       /NSDI = sd.(n)
+       /NSUM = sum(n)
+       /NSUMI = sum.(n).
+m4_if([$1], [external], [GET FILE='aggregate.sys'.],
+      [$1], [scratch], [GET FILE=@%:@AGGREGATE.])
+LIST.
+])
+  AT_CHECK([pspp -O format=csv aggregate.sps], [0], [stdout])
+  AT_CHECK([[sed 's/^[^:]*:[0-9]*: //' < stdout]], [0],
+    [m4_if([$3], [itemwise],
+      [warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
+
+warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
+
+warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
+
+warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
+
+Table: Data List
+G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI
+1,7.00,7.00,6,6,.333,.429,.333,.429,.333,.286,.333,.286,.500,.429,.500,.429,0,0,0,0,.667,.714,.667,.714,5,5,5,5,5,5,5,5,2.00,2.29,0,0,0,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,33.3,42.9,33.3,42.9,33.3,28.6,33.3,28.6,50.0,42.9,50.0,42.9,66.7,71.4,66.7,71.4,1.50,2.00,1.79,1.80,12.00,16.00
+2,5.00,5.00,4,4,1.000,1.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,6,6,6,4,1.000,1.000,1.000,1.000,8,8,8,8,8,8,8,8,7.00,7.00,6,6,6,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,100.0,100.0,100.0,100.0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,7.00,7.00,1.00,1.00,21.00,21.00
+3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00
+4,1.00,1.00,1,1,.   ,.   ,.   ,1.000,.   ,.   ,.   ,.000,.   ,.   ,.   ,.000,.,.,,4,.   ,.   ,.   ,1.000,.,.,,4,.,.,,4,.  ,.  ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,NaN,NaN,.  ,.  ,.  ,.  @&t@
+],
+      [warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
+
+warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
+
+warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
+
+warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order.  They will be treated as if they had been specified in the correct order.
+
+Table: Data List
+G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI
+1,7.00,7.00,6,6,.   ,.429,.   ,.429,.   ,.286,.   ,.286,.   ,.429,.   ,.429,.,0,,0,.   ,.714,.   ,.714,.,5,,5,.,5,,5,.  ,2.29,.,0,,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,. ,42.9,. ,42.9,. ,28.6,. ,28.6,. ,42.9,. ,42.9,. ,71.4,. ,71.4,.  ,2.00,.  ,1.80,.  ,16.00
+2,5.00,5.00,4,4,.   ,.   ,.   ,1.000,.   ,.   ,.   ,.000,.   ,.   ,.   ,.000,.,.,,4,.   ,.   ,.   ,1.000,.,.,,8,.,.,,8,.  ,.  ,.,.,,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,.  ,.  ,.  ,.  ,.  ,.  @&t@
+3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00
+4,1.00,1.00,1,1,.   ,.   ,.   ,1.000,.   ,.   ,.   ,.000,.   ,.   ,.   ,.000,.,.,,4,.   ,.   ,.   ,1.000,.,.,,4,.,.,,4,.  ,.  ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,.  ,.  ,.  ,.  ,.  ,.  @&t@
+])])
+  AT_CLEANUP])
+
+CHECK_AGGREGATE([scratch], [presorted], [itemwise])
+CHECK_AGGREGATE([scratch], [presorted], [columnwise])
+CHECK_AGGREGATE([scratch], [unsorted], [itemwise])
+CHECK_AGGREGATE([scratch], [unsorted], [columnwise])
+CHECK_AGGREGATE([active], [presorted], [itemwise])
+CHECK_AGGREGATE([active], [presorted], [columnwise])
+CHECK_AGGREGATE([active], [unsorted], [itemwise])
+CHECK_AGGREGATE([active], [unsorted], [columnwise])
+CHECK_AGGREGATE([external], [presorted], [itemwise])
+CHECK_AGGREGATE([external], [presorted], [columnwise])
+CHECK_AGGREGATE([external], [unsorted], [itemwise])
+CHECK_AGGREGATE([external], [unsorted], [columnwise])
+
+AT_SETUP([AGGREGATE crash with MAX function])
+AT_DATA([aggregate.sps], 
+  [DATA LIST LIST /X (F8.2) Y (a25).
+
+BEGIN DATA.
+87.50 foo
+87.34 bar
+1 bar
+END DATA.
+
+AGGREGATE OUTFILE=* /BREAK=y /X=MAX(x).
+LIST /x y.
+])
+AT_CHECK([pspp -O format=csv aggregate.sps], [0],
+  [Table: Reading free-form data from INLINE.
+Variable,Format
+X,F8.2
+Y,A25
+
+Table: Data List
+X,Y
+87.34,bar                      @&t@
+87.50,foo                      @&t@
+])
+AT_CLEANUP
+
+AT_SETUP([AGGREGATE crash with invalid syntax])
+AT_DATA([aggregate.sps],
+  [INPUT PROGRAM.
+LOOP c=1 TO 20.
+  COMPUTE x=UNIFORM(10)
+  END CASE.
+END LOOP.
+END FILE.
+END INPUT PROGRAM.
+
+AGGREGATE /BREAK=x .
+])
+AT_CHECK([pspp -O format=csv aggregate.sps], [1], [ignore], [])
+AT_CLEANUP
diff --git a/tests/language/stats/autorecode.at b/tests/language/stats/autorecode.at
new file mode 100644 (file)
index 0000000..b4e9d41
--- /dev/null
@@ -0,0 +1,55 @@
+AT_BANNER([AUTORECODE procedure])
+
+AT_SETUP([AUTORECODE numbers and short strings])
+AT_DATA([autorecode.sps],
+  [data list /X 1-5(a) Y 7.
+begin data.
+lasdj 1
+asdfk 0
+asdfj 2
+asdfj 1
+asdfk 2
+asdfj 9
+lajks 9
+asdfk 0
+asdfk 1
+end data.
+
+autorecode x y into A B/descend.
+
+list.
+compute Z=trunc(y/2).
+autorecode z into W.
+list.
+])
+AT_CHECK([pspp -O format=csv autorecode.sps], [0],
+  [Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+X,1,1-  5,A5
+Y,1,7-  7,F1.0
+
+Table: Data List
+X,Y,A,B
+lasdj,1,1.00,3.00
+asdfk,0,3.00,4.00
+asdfj,2,4.00,2.00
+asdfj,1,4.00,3.00
+asdfk,2,3.00,2.00
+asdfj,9,4.00,1.00
+lajks,9,2.00,1.00
+asdfk,0,3.00,4.00
+asdfk,1,3.00,3.00
+
+Table: Data List
+X,Y,A,B,Z,W
+lasdj,1,1.00,3.00,.00,1.00
+asdfk,0,3.00,4.00,.00,1.00
+asdfj,2,4.00,2.00,1.00,2.00
+asdfj,1,4.00,3.00,.00,1.00
+asdfk,2,3.00,2.00,1.00,2.00
+asdfj,9,4.00,1.00,4.00,3.00
+lajks,9,2.00,1.00,4.00,3.00
+asdfk,0,3.00,4.00,.00,1.00
+asdfk,1,3.00,3.00,.00,1.00
+])
+AT_CLEANUP
diff --git a/tests/language/stats/crosstabs.at b/tests/language/stats/crosstabs.at
new file mode 100644 (file)
index 0000000..633679f
--- /dev/null
@@ -0,0 +1,344 @@
+AT_BANNER([CROSSTABS procedure])
+
+AT_SETUP([CROSSTABS integer mode crash])
+AT_DATA([crosstabs.sps],
+  [DATA LIST LIST /A * B * X * Y * .
+BEGIN DATA.
+2 3 4 5
+END DATA.
+
+CROSSTABS VARIABLES X (1,7) Y (1,7) /TABLES X BY Y.
+])
+AT_CHECK([pspp -O format=csv crosstabs.sps], [0], 
+  [[Table: Reading free-form data from INLINE.
+Variable,Format
+A,F8.0
+B,F8.0
+X,F8.0
+Y,F8.0
+
+Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+X * Y,1,100.0%,0,0.0%,1,100.0%
+
+Table: X * Y [count].
+,Y,,,,,,,
+X,1.00,2.00,3.00,4.00,5.00,6.00,7.00,Total
+1.00,.0,.0,.0,.0,.0,.0,.0,.0
+2.00,.0,.0,.0,.0,.0,.0,.0,.0
+3.00,.0,.0,.0,.0,.0,.0,.0,.0
+4.00,.0,.0,.0,.0,1.0,.0,.0,1.0
+5.00,.0,.0,.0,.0,.0,.0,.0,.0
+6.00,.0,.0,.0,.0,.0,.0,.0,.0
+7.00,.0,.0,.0,.0,.0,.0,.0,.0
+Total,.0,.0,.0,.0,1.0,.0,.0,1.0
+]])
+AT_CLEANUP
+
+# Bug #22037.
+AT_SETUP([CROSSTABS long string crash])
+AT_DATA([crosstabs.sps],
+  [data list list /x * y (a18).
+
+begin data.
+
+   1. 'zero none'
+
+1 'one unity'
+2 'two duality'
+3 'three lots'
+end data.
+
+CROSSTABS /TABLES = x BY y.
+])
+AT_CHECK([pspp -o - -O format=csv crosstabs.sps], [0],
+  [[Table: Reading free-form data from INLINE.
+Variable,Format
+x,F8.0
+y,A18
+
+"crosstabs.sps:4: warning: BEGIN DATA: Missing value(s) for all variables from x onward.  These will be filled with the system-missing value or blanks, as appropriate."
+
+"crosstabs.sps:6: warning: BEGIN DATA: Missing value(s) for all variables from x onward.  These will be filled with the system-missing value or blanks, as appropriate."
+
+Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+x * y,4,66.7%,2,33.3%,6,100.0%
+
+Table: x * y [count].
+,y,,,,
+x,one unity         ,three lots        ,two duality       ,zero none         ,Total
+1.00,1.0,.0,.0,1.0,2.0
+2.00,.0,.0,1.0,.0,1.0
+3.00,.0,1.0,.0,.0,1.0
+Total,1.0,1.0,1.0,1.0,4.0
+]])
+AT_CLEANUP
+
+AT_SETUP([CROSSTABS crash])
+AT_DATA([crosstabs.sps],
+  [[DATA LIST FIXED
+     / x   1-2
+       y   3
+       z   4.
+
+BEGIN DATA.
+0111 
+0222 
+0311 
+0412 
+0521 
+0612 
+0711 
+0811 
+0912 
+END DATA.
+
+LIST.
+
+
+CROSSTABS TABLES  y by z.
+]])
+AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
+  [[Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+x,1,1-  2,F2.0
+y,1,3-  3,F1.0
+z,1,4-  4,F1.0
+
+Table: Data List
+x,y,z
+1,1,1
+2,2,2
+3,1,1
+4,1,2
+5,2,1
+6,1,2
+7,1,1
+8,1,1
+9,1,2
+
+Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+y * z,9,100.0%,0,0.0%,9,100.0%
+
+Table: y * z [count].
+,z,,
+y,1,2,Total
+1,4.0,3.0,7.0
+2,1.0,1.0,2.0
+Total,5.0,4.0,9.0
+]])
+AT_CLEANUP
+
+# Bug #26739, which caused CROSSTABS to crash or to fail to output
+# chi-square results.
+AT_SETUP([CROSSTABS chi-square crash])
+AT_DATA([crosstabs.sps],
+  [[DATA LIST LIST /x * y *.
+BEGIN DATA.
+2 2
+3 1
+4 2
+4 1
+END DATA.
+
+CROSSTABS
+        /TABLES= x BY y
+        /STATISTICS=CHISQ.
+]])
+AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
+  [[Table: Reading free-form data from INLINE.
+Variable,Format
+x,F8.0
+y,F8.0
+
+Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+x * y,4,100.0%,0,0.0%,4,100.0%
+
+Table: x * y [count].
+,y,,
+x,1.00,2.00,Total
+2.00,.0,1.0,1.0
+3.00,1.0,.0,1.0
+4.00,1.0,1.0,2.0
+Total,2.0,2.0,4.0
+
+Table: Chi-square tests.
+Statistic,Value,df,Asymp. Sig. (2-sided)
+Pearson Chi-Square,2.00,2,.37
+Likelihood Ratio,2.77,2,.25
+Linear-by-Linear Association,.27,1,.60
+N of Valid Cases,4,,
+]])
+AT_CLEANUP
+
+# Bug #27883.
+AT_SETUP([CROSSTABS crash with SPLIT FILE])
+AT_DATA([crosstabs.sps],
+  [data list notable / v0 to v2 1-6 (A)
+begin data.
+a c e
+a c e
+a c e
+a d e
+a d f
+b d f
+b d f
+b c f
+b d e
+a c f
+end data.
+SORT CASES BY v0.
+SPLIT FILE SEPARATE BY v0.
+
+CROSSTABS
+    /TABLES= v1 BY v2
+    /FORMAT=AVALUE LABELS TABLES PIVOT
+    /STATISTICS=CHISQ
+    /CELLS=COUNT ROW COLUMN TOTAL.
+])
+AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
+  [[Variable,Value,Label
+v0,a ,
+
+Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+v1 * v2,6,100.0%,0,0.0%,6,100.0%
+
+"Table: v1 * v2 [count, row %, column %, total %]."
+,v2,,
+v1,e ,f ,Total
+c ,3.0,1.0,4.0
+,75.0%,25.0%,100.0%
+,75.0%,50.0%,66.7%
+,50.0%,16.7%,66.7%
+d ,1.0,1.0,2.0
+,50.0%,50.0%,100.0%
+,25.0%,50.0%,33.3%
+,16.7%,16.7%,33.3%
+Total,4.0,2.0,6.0
+,66.7%,33.3%,100.0%
+,100.0%,100.0%,100.0%
+,66.7%,33.3%,100.0%
+
+Table: Chi-square tests.
+Statistic,Value,df,Asymp. Sig. (2-sided),Exact Sig. (2-sided),Exact Sig. (1-sided)
+Pearson Chi-Square,.38,1,.54,,
+Likelihood Ratio,.37,1,.54,,
+Fisher's Exact Test,,,,1.00,.60
+Continuity Correction,.00,1,1.00,,
+N of Valid Cases,6,,,,
+
+Variable,Value,Label
+v0,b ,
+
+Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+v1 * v2,4,100.0%,0,0.0%,4,100.0%
+
+"Table: v1 * v2 [count, row %, column %, total %]."
+,v2,,
+v1,e ,f ,Total
+c ,.0,1.0,1.0
+,.0%,100.0%,100.0%
+,.0%,33.3%,25.0%
+,.0%,25.0%,25.0%
+d ,1.0,2.0,3.0
+,33.3%,66.7%,100.0%
+,100.0%,66.7%,75.0%
+,25.0%,50.0%,75.0%
+Total,1.0,3.0,4.0
+,25.0%,75.0%,100.0%
+,100.0%,100.0%,100.0%
+,25.0%,75.0%,100.0%
+
+Table: Chi-square tests.
+Statistic,Value,df,Asymp. Sig. (2-sided),Exact Sig. (2-sided),Exact Sig. (1-sided)
+Pearson Chi-Square,.44,1,.50,,
+Likelihood Ratio,.68,1,.41,,
+Fisher's Exact Test,,,,1.00,.75
+Continuity Correction,.00,1,1.00,,
+N of Valid Cases,4,,,,
+]])
+AT_CLEANUP
+
+# Bug #24752.
+AT_SETUP([3-way CROSSTABS])
+AT_DATA([crosstabs.sps],
+  [[DATA LIST FIXED
+     / x   1-2
+       y   3
+       z   4.
+
+BEGIN DATA.
+0111 
+0222 
+0311 
+0412 
+0521 
+0612 
+0711 
+0811 
+0912 
+END DATA.
+
+LIST.
+
+
+CROSSTABS TABLES  x by y by z.
+]])
+AT_CHECK([pspp -O format=csv crosstabs.sps], [0],
+  [[Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+x,1,1-  2,F2.0
+y,1,3-  3,F1.0
+z,1,4-  4,F1.0
+
+Table: Data List
+x,y,z
+1,1,1
+2,2,2
+3,1,1
+4,1,2
+5,2,1
+6,1,2
+7,1,1
+8,1,1
+9,1,2
+
+Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+x * y * z,9,100.0%,0,0.0%,9,100.0%
+
+Table: x * y * z [count].
+z,,y,,
+,x,1,2,Total
+1,1,1.0,.0,1.0
+,3,1.0,.0,1.0
+,5,.0,1.0,1.0
+,7,1.0,.0,1.0
+,8,1.0,.0,1.0
+Total,,4.0,1.0,5.0
+2,2,.0,1.0,1.0
+,4,1.0,.0,1.0
+,6,1.0,.0,1.0
+,9,1.0,.0,1.0
+Total,,3.0,1.0,4.0
+]])
+AT_CLEANUP
diff --git a/tests/language/stats/descriptives.at b/tests/language/stats/descriptives.at
new file mode 100644 (file)
index 0000000..ec05f1b
--- /dev/null
@@ -0,0 +1,159 @@
+AT_BANNER([DESCRIPTIVES procedure])
+
+AT_SETUP([DESCRIPTIVES basics])
+AT_DATA([descriptives.sps],
+  [title 'Test DESCRIPTIVES procedure'.
+
+data list / V0 to V16 1-17.
+begin data.
+12128989012389023
+34128080123890128
+56127781237893217
+78127378123793112
+90913781237892318
+37978547878935789
+52878237892378279
+12377912789378932
+26787654347894348
+29137178947891888
+end data.
+
+descript all/stat=all/format=serial.
+])
+AT_CHECK([pspp -O format=csv descriptives.sps], [0],
+  [Title: Test DESCRIPTIVES procedure
+
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+V0,1,1-  1,F1.0
+V1,1,2-  2,F1.0
+V2,1,3-  3,F1.0
+V3,1,4-  4,F1.0
+V4,1,5-  5,F1.0
+V5,1,6-  6,F1.0
+V6,1,7-  7,F1.0
+V7,1,8-  8,F1.0
+V8,1,9-  9,F1.0
+V9,1,10- 10,F1.0
+V10,1,11- 11,F1.0
+V11,1,12- 12,F1.0
+V12,1,13- 13,F1.0
+V13,1,14- 14,F1.0
+V14,1,15- 15,F1.0
+V15,1,16- 16,F1.0
+V16,1,17- 17,F1.0
+
+Table: Valid cases = 10; cases with missing value(s) = 0.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+V0,10,0,3.80,.84,2.66,7.07,-.03,1.33,.89,.69,8.00,1.00,9.00,38.00
+V1,10,0,4.60,.96,3.03,9.16,-1.39,1.33,-.03,.69,9.00,.00,9.00,46.00
+V2,10,0,4.10,1.16,3.67,13.43,-2.02,1.33,.48,.69,8.00,1.00,9.00,41.00
+V3,10,0,4.10,.87,2.77,7.66,-2.05,1.33,.42,.69,7.00,1.00,8.00,41.00
+V4,10,0,7.00,.47,1.49,2.22,7.15,1.33,-2.52,.69,5.00,3.00,8.00,70.00
+V5,10,0,4.90,1.03,3.25,10.54,-1.40,1.33,-.20,.69,9.00,.00,9.00,49.00
+V6,10,0,5.90,.80,2.51,6.32,-.29,1.33,-.96,.69,7.00,1.00,8.00,59.00
+V7,10,0,4.70,1.10,3.47,12.01,-1.99,1.33,-.16,.69,9.00,.00,9.00,47.00
+V8,10,0,4.10,1.10,3.48,12.10,-1.93,1.33,.37,.69,9.00,.00,9.00,41.00
+V9,10,0,4.30,.87,2.75,7.57,-.87,1.33,.73,.69,8.00,1.00,9.00,43.00
+V10,10,0,5.50,.85,2.68,7.17,-1.84,1.33,-.33,.69,7.00,2.00,9.00,55.00
+V11,10,0,6.50,.78,2.46,6.06,-1.28,1.33,-.89,.69,6.00,3.00,9.00,65.00
+V12,10,0,7.90,.60,1.91,3.66,5.24,1.33,-2.21,.69,6.00,3.00,9.00,79.00
+V13,10,0,4.30,.99,3.13,9.79,-1.25,1.33,.33,.69,9.00,.00,9.00,43.00
+V14,10,0,3.60,1.01,3.20,10.27,-.96,1.33,.81,.69,9.00,.00,9.00,36.00
+V15,10,0,3.70,.92,2.91,8.46,-1.35,1.33,.71,.69,7.00,1.00,8.00,37.00
+V16,10,0,6.40,.91,2.88,8.27,-1.14,1.33,-.92,.69,7.00,2.00,9.00,64.00
+])
+AT_CLEANUP
+
+m4_define([DESCRIPTIVES_MISSING_DATA],
+  [data list notable / V1 TO V3 1-3.
+mis val v1 to v3 (1).
+begin data.
+111
+   
+ 1 
+1 1
+112
+123
+234
+end data.
+])
+
+AT_SETUP([DESCRIPTIVES -- excluding missing data])
+AT_DATA([descriptives.sps],
+  [DESCRIPTIVES_MISSING_DATA
+descript all/stat=all/format=serial.
+])
+AT_CHECK([pspp -O format=csv descriptives.sps], [0],
+  [Table: Valid cases = 7; cases with missing value(s) = 6.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+V1,1,6,2.00,.  ,.  ,.  ,.  ,.  ,.  ,.  ,.00,2.00,2.00,2.00
+V2,2,5,2.50,.50,.71,.50,.  ,.  ,.  ,.  ,1.00,2.00,3.00,5.00
+V3,3,4,3.00,.58,1.00,1.00,.  ,.  ,.00,1.22,2.00,2.00,4.00,9.00
+])
+AT_CLEANUP
+
+AT_SETUP([DESCRIPTIVES -- including missing data])
+AT_DATA([descriptives.sps],
+  [DESCRIPTIVES_MISSING_DATA
+descript all/stat=all/format=serial/missing=include.
+])
+AT_CHECK([pspp -O format=csv descriptives.sps], [0],
+  [Table: Valid cases = 7; cases with missing value(s) = 3.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+V1,5,2,1.20,.20,.45,.20,5.00,2.00,2.24,.91,1.00,1.00,2.00,6.00
+V2,5,2,1.60,.40,.89,.80,.31,2.00,1.26,.91,2.00,1.00,3.00,8.00
+V3,5,2,2.20,.58,1.30,1.70,-1.49,2.00,.54,.91,3.00,1.00,4.00,11.00
+])
+AT_CLEANUP
+
+AT_SETUP([DESCRIPTIVES -- excluding missing data listwise])
+AT_DATA([descriptives.sps],
+  [DESCRIPTIVES_MISSING_DATA
+descript all/stat=all/format=serial/missing=listwise.
+])
+AT_CHECK([pspp -O format=csv descriptives.sps], [0],
+  [Table: Valid cases = 1; cases with missing value(s) = 6.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+V1,1,0,2.00,.  ,.  ,.  ,.  ,.  ,.  ,.  ,.00,2.00,2.00,2.00
+V2,1,0,3.00,.  ,.  ,.  ,.  ,.  ,.  ,.  ,.00,3.00,3.00,3.00
+V3,1,0,4.00,.  ,.  ,.  ,.  ,.  ,.  ,.  ,.00,4.00,4.00,4.00
+])
+AT_CLEANUP
+
+AT_SETUP([DESCRIPTIVES -- including missing data listwise])
+AT_DATA([descriptives.sps],
+  [DESCRIPTIVES_MISSING_DATA
+descript all/stat=all/format=serial/missing=listwise include.
+])
+AT_CHECK([pspp -O format=csv descriptives.sps], [0],
+  [Table: Valid cases = 4; cases with missing value(s) = 3.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+V1,4,0,1.25,.25,.50,.25,4.00,2.62,2.00,1.01,1.00,1.00,2.00,5.00
+V2,4,0,1.75,.48,.96,.92,-1.29,2.62,.85,1.01,2.00,1.00,3.00,7.00
+V3,4,0,2.50,.65,1.29,1.67,-1.20,2.62,.00,1.01,3.00,1.00,4.00,10.00
+])
+AT_CLEANUP
+
+AT_SETUP([DESCRIPTIVES bug calculating mean only])
+AT_DATA([descriptives.sps],
+  [SET FORMAT F8.3.
+
+data list notable / X 1.
+begin data.
+0
+1
+2
+3
+4
+5
+end data.
+
+descript all/stat=mean.
+])
+AT_CHECK([pspp -O format=csv descriptives.sps], [0],
+  [Table: Valid cases = 6; cases with missing value(s) = 0.
+Variable,N,Mean
+X,6,2.500
+])
+AT_CLEANUP
diff --git a/tests/language/stats/factor.at b/tests/language/stats/factor.at
new file mode 100644 (file)
index 0000000..f1d4b23
--- /dev/null
@@ -0,0 +1,1778 @@
+AT_BANNER([FACTOR procedure])
+
+AT_SETUP([FACTOR extraction=paf method=correlation])
+dnl This example is based on data from http://www.ats.ucla.edu/stat/Spss/output/factor1.htm
+
+AT_DATA([factor.sps],
+  [set format = F11.3.
+
+data list notable fixed /question13 to question24 1-12.
+begin data.
+555555535543
+544453434443
+545555544444
+444442444433
+554545554554
+554455454455
+555554555244
+554455544443
+555554434344
+544454544344
+555545555555
+555454544455
+555445544455
+455544443343
+544454344344
+555555555455
+555554454455
+555555554445
+555555554555
+545534553343
+555555535554
+555544444445
+545544334433
+554555434443
+555555544454
+555445545453
+555554434244
+444444433233
+545555454443
+554443434243
+444534334333
+454534444332
+555455353444
+555544443243
+555554543243
+555544444343
+445444434443
+555555555544
+444444434340
+455044434334
+555555533433
+554554535040
+434533334232
+443232444432
+555555555555
+555555554544
+555544444445
+444224343344
+444554454355
+444434332433
+555555555555
+043243432433
+444443334333
+453443433434
+443342332232
+554434434533
+444344434443
+444444434443
+554552434133
+453334332432
+444445554444
+431232332223
+555555555544
+544445543443
+444455535543
+444444444433
+444444543243
+555431443333
+444443433433
+444433433443
+454334444433
+111111111544
+444423442433
+555443333353
+555543334344
+055454400000
+555454444355
+555555555555
+055544533333
+555554555554
+555555535554
+555555545355
+555555555455
+555544545543
+555554404455
+555454435454
+555555535554
+555555555555
+555443433544
+555554435454
+555555545344
+555555535454
+555445535453
+444444333544
+555554434444
+455454434454
+555555535555
+554545534455
+555555555443
+454443434444
+555553334444
+555554545454
+555555555555
+555554554454
+555555555555
+544545534544
+555555534454
+555555555455
+555554535544
+555555535555
+555451234443
+555444444544
+555544434354
+555545533444
+555554534443
+545554434554
+554433444433
+544432233524
+411111111111
+445423442233
+555543433344
+444443342233
+555555534455
+545442434223
+554553352333
+544554554445
+555555435455
+444334304234
+455453444434
+444443443245
+555552232132
+555434324345
+544444434344
+534344344444
+445555555344
+444343442132
+444444434344
+444444554334
+444545444333
+434442343224
+443443433233
+555551555554
+544544434444
+454544434433
+555555535434
+555555555555
+455544444444
+454444434233
+555555544344
+454445544445
+444444554434
+555455455443
+555454425444
+444454434443
+544443433233
+444543434433
+555553545354
+544444444433
+444445434433
+555533353333
+555434234333
+444314222411
+555555555555
+455545534443
+455045534433
+555545444444
+455544243543
+444421113343
+554444534444
+555555544554
+555334434452
+555544543455
+555554434554
+555445554454
+555555545344
+555555555555
+554543334245
+554441233333
+555554334545
+555555535544
+555555554554
+555445444543
+444424544432
+444425544333
+555434344443
+555533233223
+544433442343
+555555555555
+555445452234
+555444555444
+555444544455
+555544354554
+545445555555
+555555555555
+455443342232
+555555544454
+455534443455
+555555555055
+444554333244
+444445434543
+555554544455
+444443444434
+444444434445
+334231314323
+444444434433
+555554444443
+444444434443
+555455434444
+444444444444
+555455435455
+444444434344
+444543433232
+544443334454
+555544433244
+534443324224
+555555544444
+444443434444
+555553444344
+443434443333
+444444434333
+554445444343
+444443344434
+445555544543
+555554443443
+322232403322
+444444444433
+444445444443
+444454534445
+544344444344
+554445534544
+555555555554
+555544432333
+444444444443
+555555555554
+455555555554
+555555555543
+555555555544
+555554445555
+444335544455
+555555555555
+555454444454
+555455544454
+444445444444
+555555555555
+555455454554
+555454544554
+555555555455
+555555554444
+444444544434
+334334443333
+422224222211
+121512011111
+443444432332
+434335533344
+444443543433
+554454443453
+555555545454
+555555555344
+555555555554
+555555334555
+454445554444
+454545534444
+555554555444
+455444534455
+555544554544
+444444444444
+555424423133
+222433443224
+544544532344
+545554544544
+555532544144
+444432343433
+434545554545
+444344505443
+555555555544
+555554555344
+444531113112
+555554333133
+455433233233
+354354434345
+454534433433
+433112332321
+555445433333
+454343434143
+555554445555
+455423334322
+443333332222
+444443444443
+553432224134
+444223432233
+454324425444
+344434514443
+555552415255
+354332543353
+444531333233
+443433334133
+444444444433
+444444445533
+445133212223
+343433432213
+442333333332
+345455535244
+443211121122
+555445444444
+555555544344
+453243332232
+443543422533
+554444434344
+554444333444
+555555335343
+444231121133
+454433332233
+455524434244
+554433224354
+555455555444
+454444424444
+554242232134
+555553315443
+555553333454
+455421434211
+111111151111
+454443203123
+454243334132
+355332213144
+554534334134
+555543434355
+555543433255
+444441223334
+555443143255
+444444444454
+444442323544
+454443434343
+445453434444
+454455554433
+554532342234
+444442243233
+444442343334
+555443433444
+555543253444
+554554444455
+555543355344
+555444445444
+434443204222
+444432444234
+222142441111
+111111141111
+334334454433
+555354552543
+433411122112
+455534504444
+543211224233
+344333332532
+344443233333
+444424432434
+555555544454
+555555554544
+555444444444
+555443533443
+555554544344
+555554444444
+544543433343
+444445434444
+555555555555
+555443333233
+545444534454
+555454434343
+555453434544
+544334444333
+555443443444
+555555534544
+444444444433
+555543433343
+555444445334
+555543442433
+455444334443
+554443434443
+555254500544
+555444433344
+555555535544
+444443532232
+544443433433
+555555535544
+555455454444
+555455445544
+544444534433
+555555555554
+555553533444
+555555555554
+555554434343
+555455544443
+555554444443
+555454444445
+333222333223
+444443544233
+543443534433
+555545454533
+444444404033
+455454504543
+455555555454
+454443344343
+555553435244
+555543544444
+555553343044
+444443444433
+445543434434
+555554433545
+555554455445
+455553333234
+555552344243
+444141212213
+444443504234
+445544253444
+555554354555
+534552234543
+555554544544
+444233404224
+555554534444
+444443444344
+422442434324
+554434434344
+444444434334
+443433432444
+555454435344
+252423332214
+454544434434
+444444444244
+555554544445
+443222432333
+555544444332
+545555543445
+554544334444
+555445555544
+554343434433
+555555535554
+444554444333
+553544343534
+555553254433
+555555554554
+544443443344
+555443444344
+544432144123
+555555555555
+555555555354
+555555535545
+455454434444
+455455534445
+455555554455
+555553545445
+445545544444
+545345553555
+444445444433
+443435433433
+555554545353
+444443232223
+444444434433
+555555545454
+555554444343
+555554444443
+434544333422
+444443434343
+555555455443
+555544434343
+455545534444
+555555555553
+444443343434
+555555555445
+433444444434
+344221512132
+333421132223
+333444443444
+435544545533
+444335544443
+333323223323
+334434332333
+444422323213
+324433443423
+555555554555
+555452424444
+555544434444
+555544443343
+555445545453
+555555344453
+555544545550
+454443434334
+444332233344
+555554332344
+554444433444
+555554555554
+555555543544
+444442443132
+555555545555
+544553435533
+044044444444
+444443434533
+555454433434
+555555555454
+555555555555
+454544434444
+444444434333
+554555455554
+555555543444
+423331124132
+445445534455
+555555555554
+444535554434
+555555555554
+354443422232
+555545535443
+555555555555
+555455444453
+455434443333
+455444443233
+343322434411
+555555555534
+453442432333
+445554434544
+345444443333
+454554554355
+444434453434
+555555454443
+555443343341
+545553343433
+222343222201
+444433434443
+535555555544
+552541442423
+545433343334
+455445433443
+444444433433
+455543343433
+434444432333
+444545444444
+555554534444
+452444434433
+454443432533
+555453334433
+444442233432
+555555553433
+545555545445
+335543222333
+554554344445
+243424442212
+133222432411
+343434534233
+222222212211
+445455554434
+455554453344
+223334424434
+555355555544
+455544554434
+544455555444
+444444444444
+444444444344
+444334444444
+444444444434
+555455534243
+555555545555
+555555555555
+444443534343
+555554544444
+555555555454
+444434433433
+455445544444
+555544544455
+444333433333
+455443445343
+444432442444
+443334451543
+555554455555
+555444444444
+555555555455
+555555555554
+555454345154
+555555555555
+555555555455
+555554454544
+454444454544
+554443334544
+455555402535
+555554531534
+455545544554
+444423444223
+555444334533
+455554445243
+453444334344
+555555555554
+555555555455
+555555555554
+455443334344
+555555253555
+555554433454
+555444344455
+550030034433
+555444233343
+555343222133
+555555555554
+555555243243
+555555555355
+555554345555
+555443434454
+545543133133
+555443334154
+444444344454
+555555242254
+555554444344
+545443334454
+554444132454
+555455143154
+555554453044
+555555555455
+555534335454
+555555245555
+545543333444
+555555355454
+555353145133
+555553043454
+555555354554
+555543434454
+555444324454
+444444203443
+555552233355
+555555445455
+555500034354
+555354354444
+555555555555
+555543334144
+555555005254
+454444344254
+555555555554
+555555555255
+555555555455
+444444242243
+555554445154
+444444234333
+555555553455
+444422224243
+555545443344
+545552133143
+555455044344
+555555455555
+555555545454
+454433343144
+555555555555
+555455255155
+555555454455
+555555424455
+555555355555
+555444444455
+555555454455
+544411211314
+223322441123
+444223434233
+444441121232
+555555535555
+454445533444
+434442434433
+545355554454
+555542544333
+445545555444
+321000001011
+444444444444
+333223321322
+444232433233
+425432523122
+455555555544
+555555545555
+555555534354
+554554444243
+555554343443
+444443434333
+555224252443
+555544433433
+344544434423
+555554434344
+555542134233
+444344434444
+445443433233
+455343333434
+455443333445
+355344434433
+234234433333
+445444444445
+455535535545
+443423234443
+455544334544
+345441333323
+445444533433
+455554443355
+445444433243
+455454453444
+444244444444
+554244544154
+555555555555
+454343444444
+555444444344
+545455534454
+555555555555
+555554534454
+555254555444
+544354544453
+553454534445
+555454445355
+545253554454
+433342322233
+544444444443
+555455445544
+424322433233
+444424222233
+555355555544
+000000000000
+555455345344
+000055505450
+434333444333
+444445444444
+555555555545
+555554455545
+555455435533
+544544444243
+444331232323
+555555554444
+443332323233
+444224342433
+555555555544
+433443342333
+555445504554
+555545555544
+555555535555
+555555535345
+454443433333
+555444444555
+444443232435
+555433444443
+555443434543
+555555535555
+555555533544
+555543234444
+433432332221
+443433544233
+443443333334
+444424433444
+552444333123
+233332232211
+223422221122
+434433414133
+332323333102
+552544223222
+542423343232
+555552534132
+455554544134
+433523533132
+433333433433
+435434543333
+434553433444
+555544434345
+443543443433
+555555542344
+544444553144
+555544544243
+535443441342
+344555444333
+444444443333
+443443433432
+545554534544
+443533433433
+333443432223
+333333433123
+322432122213
+555555555555
+554555444433
+444543443234
+444444433433
+452555534433
+244444444233
+433442422232
+555555535555
+555555554455
+555554545244
+555555355455
+555555555555
+555555555555
+444433323233
+555455455455
+434445444433
+555554444455
+454444543445
+555555535455
+555545554455
+555555555555
+555555555555
+555443344353
+455543304132
+444443444433
+555555555355
+434433443333
+444434444433
+444444444433
+555555555555
+445553443323
+445444444444
+555554444054
+455555554543
+555555535555
+555554445454
+555444444443
+555555555454
+555554344455
+555555454454
+554444444454
+555555555353
+555545544454
+553545332223
+444424444332
+545555543433
+555444433444
+555555444445
+444444424433
+444444543434
+124113531311
+555554534543
+555343333333
+545444544344
+555444534444
+555544543444
+555455544443
+444324402121
+555554534544
+555455544444
+555555544454
+444334404433
+555443534444
+555545554444
+555555555555
+455333233433
+455444433433
+455444444444
+444235442443
+555443343433
+444445453444
+454345453432
+555555453444
+344433322323
+444443444244
+444442343133
+554445432233
+555555544444
+555555534444
+555554455554
+454443334244
+544443333233
+444445534445
+444432134121
+555555332243
+555555544433
+555554434444
+454543534233
+454432432343
+444424432433
+545553335344
+555443434344
+454443433333
+555553534444
+554544434355
+552532421235
+454543433434
+544544343234
+555552334125
+555543455555
+443442334222
+554443444344
+555554543334
+555552342444
+554443433333
+443444434445
+555554533344
+442412242121
+454543343244
+445554433344
+444443333433
+444443433333
+444433333334
+444444334444
+432321102223
+444444434443
+444444434343
+454531432331
+445543433434
+554554434554
+334253232333
+444443434244
+444433443234
+444433334334
+444443433333
+553434303222
+454443434244
+444445544444
+443441133433
+444432232133
+444444404344
+444444333243
+455543124243
+555544532344
+444432333132
+554553434244
+454443443333
+433111121111
+555555555544
+444432433222
+444443433233
+443332332133
+445344453243
+444444405434
+554554434343
+455344534443
+444444400434
+444444344344
+544554533443
+555554443455
+555555544544
+555554534444
+323123232311
+444344344443
+555554555544
+343323332333
+444443434444
+444442214340
+555434434444
+455543343444
+445432434433
+455553434455
+243321332322
+444422332332
+555533454444
+555544443433
+354422431422
+333322421211
+444443432434
+344422431322
+333342222321
+444443454433
+443443444433
+553434531334
+554434552343
+545455553544
+554455554443
+555555555533
+555555554543
+454454544433
+555444532143
+554545544443
+444233442434
+544444434234
+554344432233
+555345533355
+554554544433
+455444444344
+555554554554
+555554545555
+444433534434
+444444421134
+334333333333
+334443443343
+122333441413
+434444333333
+444344433233
+444333332143
+555154344133
+324344333223
+244444402233
+454443433543
+444344433344
+455555445555
+555555544433
+454544434443
+344535554533
+333435443433
+444444554544
+343434443333
+544553544455
+555444444455
+244333332222
+333441232233
+544433433433
+555544343344
+344211142124
+442442232113
+433432332223
+333424322222
+444443333233
+344321232223
+442434342422
+545555535555
+455454434454
+455355544444
+454444444445
+555554432430
+555444344144
+455534342234
+555555554354
+213332443111
+555545434433
+555554424444
+443434443433
+555555554443
+555555555544
+435535554433
+555455545443
+555555554533
+554545443455
+555553333233
+434432232323
+443443333433
+443544231534
+434533334334
+555555535544
+555544444445
+555555555555
+555555555555
+555555555555
+555555555555
+544555544544
+555555545555
+545555534354
+445444344344
+555555555555
+444443343334
+555444440000
+555555555554
+555555545455
+454434444345
+555445544443
+555554535433
+454445555555
+555444444355
+555555555555
+555555555555
+555555555555
+555555554555
+555455554455
+454435544255
+545543342243
+555544355345
+555555455354
+435553244333
+555555443454
+444444433445
+121422433111
+555554543244
+555444554444
+444203444433
+344342553322
+554445554344
+545445454454
+444245504233
+334335555533
+554355544444
+444445545444
+555555555344
+454544543233
+444455532434
+555544354243
+535444554433
+444444444444
+455555553243
+244442343235
+554544504043
+444435553433
+455553434354
+555444343314
+555553344453
+555555555544
+544444444433
+434434550033
+555455544444
+455445534344
+454445444554
+555555555555
+555555555555
+555555555454
+555455545412
+334433343132
+555454455455
+555554454443
+555555555555
+555555553433
+555555555555
+555555445555
+555545445455
+555555545554
+555555555555
+445455554443
+555445554433
+555555554445
+555553333144
+555554455143
+554454445444
+555555554533
+334422433422
+555554434444
+433531133222
+443432342224
+555544554433
+553434333333
+555543334443
+444443344323
+555555555555
+555554545344
+555555545554
+555342434333
+444443333233
+444544435444
+555555555555
+555455554354
+555555405054
+555555555555
+554555545545
+555555555544
+555545454344
+555555455555
+433444444343
+454555554444
+453555554544
+444445554444
+544455555455
+555343434343
+555553444454
+555444434443
+555555555444
+555555545443
+555444534455
+555555555555
+444443443434
+555445533543
+555555555444
+555544444354
+445444544243
+555554555455
+555555455444
+555555555544
+555555555454
+554445545454
+555555555543
+344444434443
+555555454453
+455444443433
+344244434433
+355234452132
+555445545455
+444444444444
+455444454433
+555555555555
+344233341155
+333334433233
+444433434333
+444233443334
+454344544444
+555554245253
+444444333344
+554544434333
+555444443343
+555554555445
+005555555544
+554444445244
+555455555555
+555555555444
+444444444433
+555555555444
+555555544454
+555555555544
+444444434444
+555555535553
+545534543334
+554554534533
+555555555554
+554554544544
+454541231221
+555555535544
+445344334432
+444444344333
+555555534444
+555555545555
+443434544232
+545544433343
+343234434333
+444444443233
+555454444455
+555455535455
+554433442243
+444444544454
+554545554544
+454444444444
+554455534455
+555555544355
+555445555555
+555444534444
+455454534444
+555555555544
+444444444455
+454455554344
+443244442233
+350554554434
+455444535343
+344233443433
+454444535545
+244222232232
+245345554344
+355344444443
+555455555444
+444434444233
+334323444322
+333234443233
+455455554454
+555554544434
+555355555444
+444444544443
+555554555544
+344231224131
+444443434433
+454344444431
+555554555553
+454544444443
+444443443532
+334323423222
+455555545554
+555542434443
+554444444443
+554444534344
+555443454555
+555555534554
+444434443343
+444234432233
+334323311333
+444443443233
+355424552242
+233335323322
+234233443333
+123353532334
+444345555244
+332222433422
+545445555443
+555555555555
+555554444443
+455445554455
+455455555455
+555555555555
+444443433445
+555455555544
+355453434232
+555555554344
+444433433433
+434322242112
+444444433433
+444445444544
+555444535444
+544444444443
+454544344334
+454444334333
+434433433332
+334434423423
+444455552233
+442442342233
+445433433343
+555555444355
+555555555555
+455554555545
+555445544444
+544444434443
+555555535333
+554444444344
+555554554445
+345433334121
+555555555554
+545444444233
+555555544455
+555554545555
+555555455555
+555555545555
+555554544455
+444444444333
+544544544445
+555445544544
+555455444455
+555455555454
+554455535444
+453423442244
+444443444444
+454444333333
+555555555542
+555555555543
+555555555544
+555555535534
+555555555444
+444443423333
+555444444444
+555445544453
+444444444443
+555555443444
+444443444333
+554554154344
+555543353333
+554445443333
+555555553455
+554534444243
+554555554545
+555544443443
+555554555555
+555425552422
+555555555555
+454421121321
+555454453433
+555555554443
+244224431223
+455444453444
+454345544455
+344235545044
+555555555544
+555553325554
+554554444244
+555545544544
+454555554545
+444444545444
+545544444455
+454344445443
+545555554453
+444444444443
+545554554453
+555453434444
+005434434454
+455555455544
+555555555554
+455542444433
+545543444555
+445545445444
+555553325454
+555554555554
+444544444443
+555555444454
+443332443222
+454444443444
+344333433332
+555455444455
+555555555445
+555555534454
+445433432343
+555554434444
+555555545444
+544545434455
+454435543444
+555555555555
+555455554555
+555555544554
+555553554455
+555555555555
+545454545444
+555555445555
+554534343444
+555545443343
+545454334444
+554445544544
+555455354344
+555555555355
+554445544354
+455554444444
+555555553543
+555554444444
+555543233444
+555554344433
+333334441223
+543554344434
+055541243244
+555555555544
+555555533444
+555445444544
+444335343433
+544434344333
+544435533333
+444444443333
+555555555554
+555552343233
+444444444433
+544444434444
+555555545555
+555555555554
+445244434444
+445444434444
+445555554521
+443444543343
+444433343434
+355444433442
+555543444455
+555444334544
+555555555555
+554555545555
+555555554555
+555555555555
+454444343445
+444444433444
+354445443444
+555334242132
+455445555543
+254153343433
+354244443333
+554455444344
+343255535444
+455454555553
+555455545555
+444343433343
+343323443323
+455444444424
+555544444455
+343434543444
+555555555544
+555554534243
+555554543344
+555455555544
+555443344343
+444445533133
+555543534555
+444554444444
+444002323320
+444232322222
+244344424441
+555443344334
+555555555555
+555444534443
+555555555555
+555555555550
+455555554555
+555555555555
+
+end data.
+
+missing values 
+       question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24 (0).
+
+factor
+ /variables question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24
+ /print univariate det correlation
+ /format blank(.30)
+ /plot eigen
+ /criteria factors(3)
+ /extraction paf
+ /method = correlation.
+])
+
+AT_CHECK([pspp -O format=csv factor.sps], [0],
+  [Table: Descriptive Statistics
+,Mean,Std. Deviation,Analysis N
+question13,4.462,.729,1365
+question14,4.525,.700,1365
+question15,4.445,.732,1365
+question16,4.281,.829,1365
+question17,4.166,.895,1365
+question18,3.930,1.034,1365
+question19,4.077,.963,1365
+question20,3.777,.909,1365
+question21,3.774,.984,1365
+question22,3.607,1.116,1365
+question23,3.813,.957,1365
+question24,3.666,.926,1365
+
+Table: Correlation Matrix
+,,question13,question14,question15,question16,question17,question18,question19,question20,question21,question22,question23,question24
+Correlations,question13,1.000,.661,.600,.566,.577,.409,.286,.304,.476,.333,.564,.454
+,question14,.661,1.000,.635,.500,.552,.433,.320,.315,.449,.333,.565,.443
+,question15,.600,.635,1.000,.505,.587,.457,.359,.356,.509,.369,.582,.435
+,question16,.566,.500,.505,1.000,.586,.405,.335,.317,.452,.363,.459,.430
+,question17,.577,.552,.587,.586,1.000,.555,.449,.417,.595,.450,.613,.521
+,question18,.409,.433,.457,.405,.555,1.000,.627,.521,.554,.536,.569,.474
+,question19,.286,.320,.359,.335,.449,.627,1.000,.446,.499,.484,.444,.374
+,question20,.304,.315,.356,.317,.417,.521,.446,1.000,.425,.383,.410,.357
+,question21,.476,.449,.509,.452,.595,.554,.499,.425,1.000,.507,.598,.500
+,question22,.333,.333,.369,.363,.450,.536,.484,.383,.507,1.000,.493,.444
+,question23,.564,.565,.582,.459,.613,.569,.444,.410,.598,.493,1.000,.705
+,question24,.454,.443,.435,.430,.521,.474,.374,.357,.500,.444,.705,1.000
+Determinant,.002,,,,,,,,,,,,
+
+Table: Factor Matrix
+,Factor,,
+,1,2,3
+question13,.713,.398,
+question14,.703,.339,
+question15,.721,,
+question16,.648,,
+question17,.783,,
+question18,.740,-.345,
+question19,.616,-.415,
+question20,.550,,
+question21,.732,,
+question22,.613,,
+question23,.819,,.345
+question24,.695,,.386
+Table: Rotated Factor Matrix
+,Factor,,
+,1,2,3
+question13,.771,,
+question14,.726,,
+question15,.676,,
+question16,.591,,
+question17,.587,.446,
+question18,,.739,
+question19,,.727,
+question20,,.540,
+question21,.402,.533,.321
+question22,,.559,
+question23,.449,.377,.668
+question24,.324,.321,.652
+])
+
+AT_CLEANUP
+
+AT_SETUP([FACTOR extraction=pc method=correlation])
+dnl This example is from http://www.ats.ucla.edu/stat/spss/whatstat/whatstat.htm       
+
+AT_DATA([factor2.sps],
+  [set format = F11.3.
+
+
+data list notable list /id female race ses schtyp prog read write math science socst.
+begin data.
+ 70.00      .00  4.00     1.00     1.00     1.00    57.00    52.00    41.00    47.00    57.00
+121.00     1.00  4.00     2.00     1.00     3.00    68.00    59.00    53.00    63.00    61.00
+ 86.00      .00  4.00     3.00     1.00     1.00    44.00    33.00    54.00    58.00    31.00
+141.00      .00  4.00     3.00     1.00     3.00    63.00    44.00    47.00    53.00    56.00
+172.00      .00  4.00     2.00     1.00     2.00    47.00    52.00    57.00    53.00    61.00
+113.00      .00  4.00     2.00     1.00     2.00    44.00    52.00    51.00    63.00    61.00
+ 50.00      .00  3.00     2.00     1.00     1.00    50.00    59.00    42.00    53.00    61.00
+ 11.00      .00  1.00     2.00     1.00     2.00    34.00    46.00    45.00    39.00    36.00
+ 84.00      .00  4.00     2.00     1.00     1.00    63.00    57.00    54.00    58.00    51.00
+ 48.00      .00  3.00     2.00     1.00     2.00    57.00    55.00    52.00    50.00    51.00
+ 75.00      .00  4.00     2.00     1.00     3.00    60.00    46.00    51.00    53.00    61.00
+ 60.00      .00  4.00     2.00     1.00     2.00    57.00    65.00    51.00    63.00    61.00
+ 95.00      .00  4.00     3.00     1.00     2.00    73.00    60.00    71.00    61.00    71.00
+104.00      .00  4.00     3.00     1.00     2.00    54.00    63.00    57.00    55.00    46.00
+ 38.00      .00  3.00     1.00     1.00     2.00    45.00    57.00    50.00    31.00    56.00
+115.00      .00  4.00     1.00     1.00     1.00    42.00    49.00    43.00    50.00    56.00
+ 76.00      .00  4.00     3.00     1.00     2.00    47.00    52.00    51.00    50.00    56.00
+195.00      .00  4.00     2.00     2.00     1.00    57.00    57.00    60.00    58.00    56.00
+114.00      .00  4.00     3.00     1.00     2.00    68.00    65.00    62.00    55.00    61.00
+ 85.00      .00  4.00     2.00     1.00     1.00    55.00    39.00    57.00    53.00    46.00
+167.00      .00  4.00     2.00     1.00     1.00    63.00    49.00    35.00    66.00    41.00
+143.00      .00  4.00     2.00     1.00     3.00    63.00    63.00    75.00    72.00    66.00
+ 41.00      .00  3.00     2.00     1.00     2.00    50.00    40.00    45.00    55.00    56.00
+ 20.00      .00  1.00     3.00     1.00     2.00    60.00    52.00    57.00    61.00    61.00
+ 12.00      .00  1.00     2.00     1.00     3.00    37.00    44.00    45.00    39.00    46.00
+ 53.00      .00  3.00     2.00     1.00     3.00    34.00    37.00    46.00    39.00    31.00
+154.00      .00  4.00     3.00     1.00     2.00    65.00    65.00    66.00    61.00    66.00
+178.00      .00  4.00     2.00     2.00     3.00    47.00    57.00    57.00    58.00    46.00
+196.00      .00  4.00     3.00     2.00     2.00    44.00    38.00    49.00    39.00    46.00
+ 29.00      .00  2.00     1.00     1.00     1.00    52.00    44.00    49.00    55.00    41.00
+126.00      .00  4.00     2.00     1.00     1.00    42.00    31.00    57.00    47.00    51.00
+103.00      .00  4.00     3.00     1.00     2.00    76.00    52.00    64.00    64.00    61.00
+192.00      .00  4.00     3.00     2.00     2.00    65.00    67.00    63.00    66.00    71.00
+150.00      .00  4.00     2.00     1.00     3.00    42.00    41.00    57.00    72.00    31.00
+199.00      .00  4.00     3.00     2.00     2.00    52.00    59.00    50.00    61.00    61.00
+144.00      .00  4.00     3.00     1.00     1.00    60.00    65.00    58.00    61.00    66.00
+200.00      .00  4.00     2.00     2.00     2.00    68.00    54.00    75.00    66.00    66.00
+ 80.00      .00  4.00     3.00     1.00     2.00    65.00    62.00    68.00    66.00    66.00
+ 16.00      .00  1.00     1.00     1.00     3.00    47.00    31.00    44.00    36.00    36.00
+153.00      .00  4.00     2.00     1.00     3.00    39.00    31.00    40.00    39.00    51.00
+176.00      .00  4.00     2.00     2.00     2.00    47.00    47.00    41.00    42.00    51.00
+177.00      .00  4.00     2.00     2.00     2.00    55.00    59.00    62.00    58.00    51.00
+168.00      .00  4.00     2.00     1.00     2.00    52.00    54.00    57.00    55.00    51.00
+ 40.00      .00  3.00     1.00     1.00     1.00    42.00    41.00    43.00    50.00    41.00
+ 62.00      .00  4.00     3.00     1.00     1.00    65.00    65.00    48.00    63.00    66.00
+169.00      .00  4.00     1.00     1.00     1.00    55.00    59.00    63.00    69.00    46.00
+ 49.00      .00  3.00     3.00     1.00     3.00    50.00    40.00    39.00    49.00    47.00
+136.00      .00  4.00     2.00     1.00     2.00    65.00    59.00    70.00    63.00    51.00
+189.00      .00  4.00     2.00     2.00     2.00    47.00    59.00    63.00    53.00    46.00
+  7.00      .00  1.00     2.00     1.00     2.00    57.00    54.00    59.00    47.00    51.00
+ 27.00      .00  2.00     2.00     1.00     2.00    53.00    61.00    61.00    57.00    56.00
+128.00      .00  4.00     3.00     1.00     2.00    39.00    33.00    38.00    47.00    41.00
+ 21.00      .00  1.00     2.00     1.00     1.00    44.00    44.00    61.00    50.00    46.00
+183.00      .00  4.00     2.00     2.00     2.00    63.00    59.00    49.00    55.00    71.00
+132.00      .00  4.00     2.00     1.00     2.00    73.00    62.00    73.00    69.00    66.00
+ 15.00      .00  1.00     3.00     1.00     3.00    39.00    39.00    44.00    26.00    42.00
+ 67.00      .00  4.00     1.00     1.00     3.00    37.00    37.00    42.00    33.00    32.00
+ 22.00      .00  1.00     2.00     1.00     3.00    42.00    39.00    39.00    56.00    46.00
+185.00      .00  4.00     2.00     2.00     2.00    63.00    57.00    55.00    58.00    41.00
+  9.00      .00  1.00     2.00     1.00     3.00    48.00    49.00    52.00    44.00    51.00
+181.00      .00  4.00     2.00     2.00     2.00    50.00    46.00    45.00    58.00    61.00
+170.00      .00  4.00     3.00     1.00     2.00    47.00    62.00    61.00    69.00    66.00
+134.00      .00  4.00     1.00     1.00     1.00    44.00    44.00    39.00    34.00    46.00
+108.00      .00  4.00     2.00     1.00     1.00    34.00    33.00    41.00    36.00    36.00
+197.00      .00  4.00     3.00     2.00     2.00    50.00    42.00    50.00    36.00    61.00
+140.00      .00  4.00     2.00     1.00     3.00    44.00    41.00    40.00    50.00    26.00
+171.00      .00  4.00     2.00     1.00     2.00    60.00    54.00    60.00    55.00    66.00
+107.00      .00  4.00     1.00     1.00     3.00    47.00    39.00    47.00    42.00    26.00
+ 81.00      .00  4.00     1.00     1.00     2.00    63.00    43.00    59.00    65.00    44.00
+ 18.00      .00  1.00     2.00     1.00     3.00    50.00    33.00    49.00    44.00    36.00
+155.00      .00  4.00     2.00     1.00     1.00    44.00    44.00    46.00    39.00    51.00
+ 97.00      .00  4.00     3.00     1.00     2.00    60.00    54.00    58.00    58.00    61.00
+ 68.00      .00  4.00     2.00     1.00     2.00    73.00    67.00    71.00    63.00    66.00
+157.00      .00  4.00     2.00     1.00     1.00    68.00    59.00    58.00    74.00    66.00
+ 56.00      .00  4.00     2.00     1.00     3.00    55.00    45.00    46.00    58.00    51.00
+  5.00      .00  1.00     1.00     1.00     2.00    47.00    40.00    43.00    45.00    31.00
+159.00      .00  4.00     3.00     1.00     2.00    55.00    61.00    54.00    49.00    61.00
+123.00      .00  4.00     3.00     1.00     1.00    68.00    59.00    56.00    63.00    66.00
+164.00      .00  4.00     2.00     1.00     3.00    31.00    36.00    46.00    39.00    46.00
+ 14.00      .00  1.00     3.00     1.00     2.00    47.00    41.00    54.00    42.00    56.00
+127.00      .00  4.00     3.00     1.00     2.00    63.00    59.00    57.00    55.00    56.00
+165.00      .00  4.00     1.00     1.00     3.00    36.00    49.00    54.00    61.00    36.00
+174.00      .00  4.00     2.00     2.00     2.00    68.00    59.00    71.00    66.00    56.00
+  3.00      .00  1.00     1.00     1.00     2.00    63.00    65.00    48.00    63.00    56.00
+ 58.00      .00  4.00     2.00     1.00     3.00    55.00    41.00    40.00    44.00    41.00
+146.00      .00  4.00     3.00     1.00     2.00    55.00    62.00    64.00    63.00    66.00
+102.00      .00  4.00     3.00     1.00     2.00    52.00    41.00    51.00    53.00    56.00
+117.00      .00  4.00     3.00     1.00     3.00    34.00    49.00    39.00    42.00    56.00
+133.00      .00  4.00     2.00     1.00     3.00    50.00    31.00    40.00    34.00    31.00
+ 94.00      .00  4.00     3.00     1.00     2.00    55.00    49.00    61.00    61.00    56.00
+ 24.00      .00  2.00     2.00     1.00     2.00    52.00    62.00    66.00    47.00    46.00
+149.00      .00  4.00     1.00     1.00     1.00    63.00    49.00    49.00    66.00    46.00
+ 82.00     1.00  4.00     3.00     1.00     2.00    68.00    62.00    65.00    69.00    61.00
+  8.00     1.00  1.00     1.00     1.00     2.00    39.00    44.00    52.00    44.00    48.00
+129.00     1.00  4.00     1.00     1.00     1.00    44.00    44.00    46.00    47.00    51.00
+173.00     1.00  4.00     1.00     1.00     1.00    50.00    62.00    61.00    63.00    51.00
+ 57.00     1.00  4.00     2.00     1.00     2.00    71.00    65.00    72.00    66.00    56.00
+100.00     1.00  4.00     3.00     1.00     2.00    63.00    65.00    71.00    69.00    71.00
+  1.00     1.00  1.00     1.00     1.00     3.00    34.00    44.00    40.00    39.00    41.00
+194.00     1.00  4.00     3.00     2.00     2.00    63.00    63.00    69.00    61.00    61.00
+ 88.00     1.00  4.00     3.00     1.00     2.00    68.00    60.00    64.00    69.00    66.00
+ 99.00     1.00  4.00     3.00     1.00     1.00    47.00    59.00    56.00    66.00    61.00
+ 47.00     1.00  3.00     1.00     1.00     2.00    47.00    46.00    49.00    33.00    41.00
+120.00     1.00  4.00     3.00     1.00     2.00    63.00    52.00    54.00    50.00    51.00
+166.00     1.00  4.00     2.00     1.00     2.00    52.00    59.00    53.00    61.00    51.00
+ 65.00     1.00  4.00     2.00     1.00     2.00    55.00    54.00    66.00    42.00    56.00
+101.00     1.00  4.00     3.00     1.00     2.00    60.00    62.00    67.00    50.00    56.00
+ 89.00     1.00  4.00     1.00     1.00     3.00    35.00    35.00    40.00    51.00    33.00
+ 54.00     1.00  3.00     1.00     2.00     1.00    47.00    54.00    46.00    50.00    56.00
+180.00     1.00  4.00     3.00     2.00     2.00    71.00    65.00    69.00    58.00    71.00
+162.00     1.00  4.00     2.00     1.00     3.00    57.00    52.00    40.00    61.00    56.00
+  4.00     1.00  1.00     1.00     1.00     2.00    44.00    50.00    41.00    39.00    51.00
+131.00     1.00  4.00     3.00     1.00     2.00    65.00    59.00    57.00    46.00    66.00
+125.00     1.00  4.00     1.00     1.00     2.00    68.00    65.00    58.00    59.00    56.00
+ 34.00     1.00  1.00     3.00     2.00     2.00    73.00    61.00    57.00    55.00    66.00
+106.00     1.00  4.00     2.00     1.00     3.00    36.00    44.00    37.00    42.00    41.00
+130.00     1.00  4.00     3.00     1.00     1.00    43.00    54.00    55.00    55.00    46.00
+ 93.00     1.00  4.00     3.00     1.00     2.00    73.00    67.00    62.00    58.00    66.00
+163.00     1.00  4.00     1.00     1.00     2.00    52.00    57.00    64.00    58.00    56.00
+ 37.00     1.00  3.00     1.00     1.00     3.00    41.00    47.00    40.00    39.00    51.00
+ 35.00     1.00  1.00     1.00     2.00     1.00    60.00    54.00    50.00    50.00    51.00
+ 87.00     1.00  4.00     2.00     1.00     1.00    50.00    52.00    46.00    50.00    56.00
+ 73.00     1.00  4.00     2.00     1.00     2.00    50.00    52.00    53.00    39.00    56.00
+151.00     1.00  4.00     2.00     1.00     3.00    47.00    46.00    52.00    48.00    46.00
+ 44.00     1.00  3.00     1.00     1.00     3.00    47.00    62.00    45.00    34.00    46.00
+152.00     1.00  4.00     3.00     1.00     2.00    55.00    57.00    56.00    58.00    61.00
+105.00     1.00  4.00     2.00     1.00     2.00    50.00    41.00    45.00    44.00    56.00
+ 28.00     1.00  2.00     2.00     1.00     1.00    39.00    53.00    54.00    50.00    41.00
+ 91.00     1.00  4.00     3.00     1.00     3.00    50.00    49.00    56.00    47.00    46.00
+ 45.00     1.00  3.00     1.00     1.00     3.00    34.00    35.00    41.00    29.00    26.00
+116.00     1.00  4.00     2.00     1.00     2.00    57.00    59.00    54.00    50.00    56.00
+ 33.00     1.00  2.00     1.00     1.00     2.00    57.00    65.00    72.00    54.00    56.00
+ 66.00     1.00  4.00     2.00     1.00     3.00    68.00    62.00    56.00    50.00    51.00
+ 72.00     1.00  4.00     2.00     1.00     3.00    42.00    54.00    47.00    47.00    46.00
+ 77.00     1.00  4.00     1.00     1.00     2.00    61.00    59.00    49.00    44.00    66.00
+ 61.00     1.00  4.00     3.00     1.00     2.00    76.00    63.00    60.00    67.00    66.00
+190.00     1.00  4.00     2.00     2.00     2.00    47.00    59.00    54.00    58.00    46.00
+ 42.00     1.00  3.00     2.00     1.00     3.00    46.00    52.00    55.00    44.00    56.00
+  2.00     1.00  1.00     2.00     1.00     3.00    39.00    41.00    33.00    42.00    41.00
+ 55.00     1.00  3.00     2.00     2.00     2.00    52.00    49.00    49.00    44.00    61.00
+ 19.00     1.00  1.00     1.00     1.00     1.00    28.00    46.00    43.00    44.00    51.00
+ 90.00     1.00  4.00     3.00     1.00     2.00    42.00    54.00    50.00    50.00    52.00
+142.00     1.00  4.00     2.00     1.00     3.00    47.00    42.00    52.00    39.00    51.00
+ 17.00     1.00  1.00     2.00     1.00     2.00    47.00    57.00    48.00    44.00    41.00
+122.00     1.00  4.00     2.00     1.00     2.00    52.00    59.00    58.00    53.00    66.00
+191.00     1.00  4.00     3.00     2.00     2.00    47.00    52.00    43.00    48.00    61.00
+ 83.00     1.00  4.00     2.00     1.00     3.00    50.00    62.00    41.00    55.00    31.00
+182.00     1.00  4.00     2.00     2.00     2.00    44.00    52.00    43.00    44.00    51.00
+  6.00     1.00  1.00     1.00     1.00     2.00    47.00    41.00    46.00    40.00    41.00
+ 46.00     1.00  3.00     1.00     1.00     2.00    45.00    55.00    44.00    34.00    41.00
+ 43.00     1.00  3.00     1.00     1.00     2.00    47.00    37.00    43.00    42.00    46.00
+ 96.00     1.00  4.00     3.00     1.00     2.00    65.00    54.00    61.00    58.00    56.00
+138.00     1.00  4.00     2.00     1.00     3.00    43.00    57.00    40.00    50.00    51.00
+ 10.00     1.00  1.00     2.00     1.00     1.00    47.00    54.00    49.00    53.00    61.00
+ 71.00     1.00  4.00     2.00     1.00     1.00    57.00    62.00    56.00    58.00    66.00
+139.00     1.00  4.00     2.00     1.00     2.00    68.00    59.00    61.00    55.00    71.00
+110.00     1.00  4.00     2.00     1.00     3.00    52.00    55.00    50.00    54.00    61.00
+148.00     1.00  4.00     2.00     1.00     3.00    42.00    57.00    51.00    47.00    61.00
+109.00     1.00  4.00     2.00     1.00     1.00    42.00    39.00    42.00    42.00    41.00
+ 39.00     1.00  3.00     3.00     1.00     2.00    66.00    67.00    67.00    61.00    66.00
+147.00     1.00  4.00     1.00     1.00     2.00    47.00    62.00    53.00    53.00    61.00
+ 74.00     1.00  4.00     2.00     1.00     2.00    57.00    50.00    50.00    51.00    58.00
+198.00     1.00  4.00     3.00     2.00     2.00    47.00    61.00    51.00    63.00    31.00
+161.00     1.00  4.00     1.00     1.00     2.00    57.00    62.00    72.00    61.00    61.00
+112.00     1.00  4.00     2.00     1.00     2.00    52.00    59.00    48.00    55.00    61.00
+ 69.00     1.00  4.00     1.00     1.00     3.00    44.00    44.00    40.00    40.00    31.00
+156.00     1.00  4.00     2.00     1.00     2.00    50.00    59.00    53.00    61.00    61.00
+111.00     1.00  4.00     1.00     1.00     1.00    39.00    54.00    39.00    47.00    36.00
+186.00     1.00  4.00     2.00     2.00     2.00    57.00    62.00    63.00    55.00    41.00
+ 98.00     1.00  4.00     1.00     1.00     3.00    57.00    60.00    51.00    53.00    37.00
+119.00     1.00  4.00     1.00     1.00     1.00    42.00    57.00    45.00    50.00    43.00
+ 13.00     1.00  1.00     2.00     1.00     3.00    47.00    46.00    39.00    47.00    61.00
+ 51.00     1.00  3.00     3.00     1.00     1.00    42.00    36.00    42.00    31.00    39.00
+ 26.00     1.00  2.00     3.00     1.00     2.00    60.00    59.00    62.00    61.00    51.00
+ 36.00     1.00  3.00     1.00     1.00     1.00    44.00    49.00    44.00    35.00    51.00
+135.00     1.00  4.00     1.00     1.00     2.00    63.00    60.00    65.00    54.00    66.00
+ 59.00     1.00  4.00     2.00     1.00     2.00    65.00    67.00    63.00    55.00    71.00
+ 78.00     1.00  4.00     2.00     1.00     2.00    39.00    54.00    54.00    53.00    41.00
+ 64.00     1.00  4.00     3.00     1.00     3.00    50.00    52.00    45.00    58.00    36.00
+ 63.00     1.00  4.00     1.00     1.00     1.00    52.00    65.00    60.00    56.00    51.00
+ 79.00     1.00  4.00     2.00     1.00     2.00    60.00    62.00    49.00    50.00    51.00
+193.00     1.00  4.00     2.00     2.00     2.00    44.00    49.00    48.00    39.00    51.00
+ 92.00     1.00  4.00     3.00     1.00     1.00    52.00    67.00    57.00    63.00    61.00
+160.00     1.00  4.00     2.00     1.00     2.00    55.00    65.00    55.00    50.00    61.00
+ 32.00     1.00  2.00     3.00     1.00     3.00    50.00    67.00    66.00    66.00    56.00
+ 23.00     1.00  2.00     1.00     1.00     2.00    65.00    65.00    64.00    58.00    71.00
+158.00     1.00  4.00     2.00     1.00     1.00    52.00    54.00    55.00    53.00    51.00
+ 25.00     1.00  2.00     2.00     1.00     1.00    47.00    44.00    42.00    42.00    36.00
+188.00     1.00  4.00     3.00     2.00     2.00    63.00    62.00    56.00    55.00    61.00
+ 52.00     1.00  3.00     1.00     1.00     2.00    50.00    46.00    53.00    53.00    66.00
+124.00     1.00  4.00     1.00     1.00     3.00    42.00    54.00    41.00    42.00    41.00
+175.00     1.00  4.00     3.00     2.00     1.00    36.00    57.00    42.00    50.00    41.00
+184.00     1.00  4.00     2.00     2.00     3.00    50.00    52.00    53.00    55.00    56.00
+ 30.00     1.00  2.00     3.00     1.00     2.00    41.00    59.00    42.00    34.00    51.00
+179.00     1.00  4.00     2.00     2.00     2.00    47.00    65.00    60.00    50.00    56.00
+ 31.00     1.00  2.00     2.00     2.00     1.00    55.00    59.00    52.00    42.00    56.00
+145.00     1.00  4.00     2.00     1.00     3.00    42.00    46.00    38.00    36.00    46.00
+187.00     1.00  4.00     2.00     2.00     1.00    57.00    41.00    57.00    55.00    52.00
+118.00     1.00  4.00     2.00     1.00     1.00    55.00    62.00    58.00    58.00    61.00
+137.00     1.00  4.00     3.00     1.00     2.00    63.00    65.00    65.00    53.00    61.00
+end data.
+
+factor
+  /variables read write math science socst  
+  /extraction pc
+  /plot eigen
+  /criteria mineigen (.557)
+  .
+])
+
+AT_CHECK([pspp -O format=csv factor2.sps], [0],
+  [Table: Communalities
+,Initial,Extraction
+read,1.000,.736
+write,1.000,.704
+math,1.000,.750
+science,1.000,.849
+socst,1.000,.900
+
+Table: Total Variance Explained
+,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings,,
+Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
+1,3.381,67.616,67.616,3.381,67.616,67.616,2.113,42.267,42.267
+2,.557,11.148,78.764,.557,11.148,78.764,1.825,36.497,78.764
+3,.407,8.136,86.900,,,,,,
+4,.356,7.123,94.023,,,,,,
+5,.299,5.977,100.000,,,,,,
+
+Table: Component Matrix
+,Component,
+,1,2
+read,.858,.020
+write,.824,-.155
+math,.844,.195
+science,.801,.456
+socst,.783,-.536
+
+Table: Rotated Component Matrix
+,Component,
+,1,2
+read,.650,.559
+write,.508,.667
+math,.757,.421
+science,.900,.198
+socst,.222,.922
+])
+
+AT_CLEANUP
\ No newline at end of file
diff --git a/tests/language/stats/frequencies.at b/tests/language/stats/frequencies.at
new file mode 100644 (file)
index 0000000..cfd992a
--- /dev/null
@@ -0,0 +1,464 @@
+AT_BANNER([FREQUENCIES procedure])
+
+AT_SETUP([FREQUENCIES string variable crash])
+AT_DATA([frequencies.sps],
+  [DATA LIST FREE/
+   name  (A8) value * quantity .
+BEGIN DATA.
+Cables 829 3 
+END DATA.
+EXECUTE.
+
+FREQUENCIES /VAR = name.
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [Table: name
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,Cables  ,1,100.00,100.00,100.00
+Total,,1,100.0,100.0,
+])
+AT_CLEANUP
+
+# Tests for a bug where pspp would crash if two FREQUENCIES commands
+# existed in a input file.
+AT_SETUP([FREQUENCIES two runs crash])
+AT_DATA([frequencies.sps],
+  [data list free /v1 v2.
+begin data.
+0 1
+2 3 
+4 5
+3 4
+end data.
+
+frequencies v1 v2/statistics=none.
+frequencies v1 v2/statistics=none.
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [Table: v1
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,.00,1,25.00,25.00,25.00
+,2.00,1,25.00,25.00,50.00
+,3.00,1,25.00,25.00,75.00
+,4.00,1,25.00,25.00,100.00
+Total,,4,100.0,100.0,
+
+Table: v2
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,1,25.00,25.00,25.00
+,3.00,1,25.00,25.00,50.00
+,4.00,1,25.00,25.00,75.00
+,5.00,1,25.00,25.00,100.00
+Total,,4,100.0,100.0,
+
+Table: v1
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,.00,1,25.00,25.00,25.00
+,2.00,1,25.00,25.00,50.00
+,3.00,1,25.00,25.00,75.00
+,4.00,1,25.00,25.00,100.00
+Total,,4,100.0,100.0,
+
+Table: v2
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,1,25.00,25.00,25.00
+,3.00,1,25.00,25.00,50.00
+,4.00,1,25.00,25.00,75.00
+,5.00,1,25.00,25.00,100.00
+Total,,4,100.0,100.0,
+])
+AT_CLEANUP
+
+# Tests for a bug where PSPP would crash when a FREQUENCIES command
+# was used with the HTML output driver..
+AT_SETUP([FREQUENCIES HTML output crash])
+AT_DATA([frequencies.sps],
+  [data list free /v1 v2.
+begin data.
+0 1
+2 3 
+4 5
+3 4
+end data.
+
+list.
+
+frequencies v1/statistics=none.
+])
+AT_CHECK([pspp -o - -O format=csv -o pspp.html frequencies.sps], [0],
+  [Table: Data List
+v1,v2
+.00,1.00
+2.00,3.00
+4.00,5.00
+3.00,4.00
+
+Table: v1
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,.00,1,25.00,25.00,25.00
+,2.00,1,25.00,25.00,50.00
+,3.00,1,25.00,25.00,75.00
+,4.00,1,25.00,25.00,100.00
+Total,,4,100.0,100.0,
+])
+AT_CHECK([test -s pspp.html])
+AT_CLEANUP
+
+# Tests for a bug which crashed PSPP when a piechart with too many
+# segments was requested..
+AT_SETUP([FREQUENCIES pie chart crash])
+AT_DATA([frequencies.sps],
+  [data list list /x * w *.
+begin data.
+1  4
+34 10
+-9 15
+232 6
+11  4
+134 1
+9  5
+32 16
+-2 6
+2  16
+20  6
+end data.
+
+weight by w.
+
+frequencies /x /format=notable /statistics=none
+       /piechart.
+])
+# Cannot use the CSV driver for this because it does not output charts
+# at all.
+AT_CHECK([pspp frequencies.sps], [0],
+  [DATA LIST
+
+Reading free-form data from INLINE.
++--------+------+
+|Variable|Format|
+#========#======#
+|x       |F8.0  |
+|w       |F8.0  |
++--------+------+
+
+BEGIN DATA
+
+WEIGHT
+
+FREQUENCIES
+])
+AT_CLEANUP
+
+# Tests for a bug which caused FREQUENCIES following TEMPORARY to
+# crash (bug #11492)..
+AT_SETUP([FREQUENCIES crash after TEMPORARY])
+AT_DATA([frequencies.sps],
+  [DATA LIST LIST /SEX (A1) X *.
+BEGIN DATA.
+M 31
+F 21
+M 41
+F 31
+M 13
+F 12
+M 14
+F 13
+END DATA.
+
+
+TEMPORARY
+SELECT IF SEX EQ 'F'
+FREQUENCIES /X .
+
+FINISH
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [Table: Reading free-form data from INLINE.
+Variable,Format
+SEX,A1
+X,F8.0
+
+Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,12.00,1,25.00,25.00,25.00
+,13.00,1,25.00,25.00,50.00
+,21.00,1,25.00,25.00,75.00
+,31.00,1,25.00,25.00,100.00
+Total,,4,100.0,100.0,
+
+Table: X
+N,Valid,4
+,Missing,0
+Mean,,19.25
+Std Dev,,8.81
+Minimum,,12.00
+Maximum,,31.00
+])
+AT_CLEANUP
+
+m4_define([FREQUENCIES_NTILES_OUTPUT],
+  [Table: x
+N,Valid,5
+,Missing,0
+Mean,,3.00
+Std Dev,,1.58
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,2.00
+,33,2.33
+,50 (Median),3.00
+,67,3.67
+,75,4.00
+,100,5.00
+])
+AT_SETUP([FREQUENCIES basic percentiles])
+AT_DATA([frequencies.sps],
+  [DATA LIST LIST notable /x * .
+BEGIN DATA.
+1 
+2 
+3 
+4 
+5
+END DATA.
+
+FREQUENCIES 
+       VAR=x
+       /FORMAT=NOTABLE
+       /PERCENTILES = 0 25 33.333 50 66.666 75 100.
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [FREQUENCIES_NTILES_OUTPUT])
+AT_CLEANUP
+
+AT_SETUP([FREQUENCIES basic n-tiles])
+AT_DATA([frequencies.sps],
+  [DATA LIST LIST notable /x * .
+BEGIN DATA.
+1 
+2 
+3 
+4 
+5
+END DATA.
+
+FREQUENCIES 
+       VAR=x
+       /FORMAT=NOTABLE
+       /NTILES = 3
+       /NTILES = 4.
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [FREQUENCIES_NTILES_OUTPUT])
+AT_CLEANUP
+
+AT_SETUP([FREQUENCIES compatibility percentiles])
+AT_DATA([frequencies.sps],
+  [DATA LIST LIST notable /X * .
+BEGIN DATA.
+1 
+2 
+3 
+4 
+5
+END DATA.
+
+FREQUENCIES 
+       VAR=x
+       /ALGORITHM=COMPATIBLE
+       /PERCENTILES = 0 25 50 75 100.
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,1,20.00,20.00,20.00
+,2.00,1,20.00,20.00,40.00
+,3.00,1,20.00,20.00,60.00
+,4.00,1,20.00,20.00,80.00
+,5.00,1,20.00,20.00,100.00
+Total,,5,100.0,100.0,
+
+Table: X
+N,Valid,5
+,Missing,0
+Mean,,3.00
+Std Dev,,1.58
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,1.50
+,50 (Median),3.00
+,75,4.50
+,100,5.00
+])
+AT_CLEANUP
+
+AT_SETUP([FREQUENCIES enhanced percentiles])
+AT_DATA([frequencies.sps],
+  [DATA LIST LIST notable /X * .
+BEGIN DATA.
+1 
+2 
+3 
+4 
+5
+END DATA.
+
+FREQUENCIES 
+       VAR=x
+       /PERCENTILES = 0 25 50 75 100.
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,1,20.00,20.00,20.00
+,2.00,1,20.00,20.00,40.00
+,3.00,1,20.00,20.00,60.00
+,4.00,1,20.00,20.00,80.00
+,5.00,1,20.00,20.00,100.00
+Total,,5,100.0,100.0,
+
+Table: X
+N,Valid,5
+,Missing,0
+Mean,,3.00
+Std Dev,,1.58
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,2.00
+,50 (Median),3.00
+,75,4.00
+,100,5.00
+])
+AT_CLEANUP
+
+AT_SETUP([FREQUENCIES enhanced percentiles, weighted])
+AT_DATA([frequencies.sps],
+  [DATA LIST LIST notable /X * F *.
+BEGIN DATA.
+1 2
+2 2
+3 2
+4 1
+4 1
+5 1
+5 1
+END DATA.
+
+WEIGHT BY f.
+
+FREQUENCIES 
+       VAR=x
+       /PERCENTILES = 0 25 50 75 100.
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,2.00,20.00,20.00,20.00
+,2.00,2.00,20.00,20.00,40.00
+,3.00,2.00,20.00,20.00,60.00
+,4.00,2.00,20.00,20.00,80.00
+,5.00,2.00,20.00,20.00,100.00
+Total,,10.00,100.0,100.0,
+
+Table: X
+N,Valid,10.00
+,Missing,.00
+Mean,,3.00
+Std Dev,,1.49
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,2.00
+,50 (Median),3.00
+,75,4.00
+,100,5.00
+])
+AT_CLEANUP
+
+AT_SETUP([FREQUENCIES enhanced percentiles, weighted (2)])
+AT_DATA([frequencies.sps],
+  [DATA LIST LIST notable /X * F *.
+BEGIN DATA.
+1 1
+3 2
+4 1
+5 1
+5 1
+END DATA.
+
+WEIGHT BY f.
+
+FREQUENCIES 
+       VAR=x
+       /PERCENTILES = 0 25 50 75 100.
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,1.00,16.67,16.67,16.67
+,3.00,2.00,33.33,33.33,50.00
+,4.00,1.00,16.67,16.67,66.67
+,5.00,2.00,33.33,33.33,100.00
+Total,,6.00,100.0,100.0,
+
+Table: X
+N,Valid,6.00
+,Missing,.00
+Mean,,3.50
+Std Dev,,1.52
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,3.00
+,50 (Median),3.50
+,75,4.75
+,100,5.00
+])
+AT_CLEANUP
+
+AT_SETUP([FREQUENCIES enhanced percentiles, weighted, missing values])
+AT_DATA([frequencies.sps],
+  [DATA LIST LIST notable /X * F *.
+BEGIN DATA.
+1 1
+3 2
+4 1
+5 1
+5 1
+99 4
+END DATA.
+
+MISSING VALUE x (99.0) .
+WEIGHT BY f.
+
+FREQUENCIES 
+       VAR=x
+       /PERCENTILES = 0 25 50 75 100.
+])
+AT_CHECK([pspp -O format=csv frequencies.sps], [0],
+  [Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,1.00,10.00,16.67,16.67
+,3.00,2.00,20.00,33.33,50.00
+,4.00,1.00,10.00,16.67,66.67
+,5.00,2.00,20.00,33.33,100.00
+,99.00,4.00,40.00,Missing,
+Total,,10.00,100.0,100.0,
+
+Table: X
+N,Valid,6.00
+,Missing,4.00
+Mean,,3.50
+Std Dev,,1.52
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,3.00
+,50 (Median),3.50
+,75,4.75
+,100,5.00
+])
+AT_CLEANUP
diff --git a/tests/language/xforms/compute.at b/tests/language/xforms/compute.at
new file mode 100644 (file)
index 0000000..f992d0e
--- /dev/null
@@ -0,0 +1,100 @@
+AT_BANNER([COMPUTE transformation])
+
+AT_SETUP([COMPUTE crash with SAVE])
+AT_DATA([compute.sps],
+  [INPUT PROGRAM.
+COMPUTE num = 3.
+END FILE.
+END INPUT PROGRAM.
+EXECUTE.
+
+SAVE outfile='temp.sav'.
+])
+AT_CHECK([pspp -O format=csv compute.sps])
+AT_DATA([list.sps],
+  [GET FILE='temp.sav'.
+LIST.
+])
+AT_CHECK([pspp -O format=csv list.sps], [0], 
+  [])
+AT_CLEANUP
+
+AT_SETUP([COMPUTE bug in long string UPCASE])
+AT_DATA([compute.sps],
+  [DATA LIST LIST
+ /A (A161)
+ B (A3).
+
+BEGIN DATA
+abc   def
+ghi   jkl
+END DATA.
+
+COMPUTE A=upcase(A).
+EXECUTE.
+LIST.
+])
+AT_CHECK([pspp -O format=csv compute.sps], [0],
+  [Table: Reading free-form data from INLINE.
+Variable,Format
+A,A161
+B,A3
+
+Table: Data List
+A,B
+ABC                                                                                                                                                              ,def
+GHI                                                                                                                                                              ,jkl
+])
+AT_CLEANUP
+
+AT_SETUP([COMPUTE bug with long variable names])
+AT_DATA([compute.sps],
+  [DATA LIST LIST /longVariablename * x *.
+BEGIN DATA.
+1 2
+3 4
+END DATA.
+
+
+COMPUTE longvariableName=100-longvariablename.
+
+LIST.
+])
+AT_CHECK([pspp -O format=csv compute.sps], [0],
+  [Table: Reading free-form data from INLINE.
+Variable,Format
+longVariablename,F8.0
+x,F8.0
+
+Table: Data List
+longVariablename,x
+99.00,2.00
+97.00,4.00
+])
+AT_CLEANUP
+
+AT_SETUP([COMPUTE self-reference to new variable])
+AT_DATA([compute.sps],
+  [DATA LIST /ITEM 1-3.
+COMPUTE SUM=SUM+ITEM.
+PRINT OUTFILE='compute-sum.out' /ITEM SUM.
+LEAVE SUM
+BEGIN DATA.
+123
+404
+555
+999
+END DATA.
+])
+AT_CHECK([pspp -O format=csv compute.sps], [0],
+  [Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+ITEM,1,1-  3,F3.0
+])
+AT_CHECK([cat compute-sum.out], [0],
+  [ 123   123.00 @&t@
+ 404   527.00 @&t@
+ 555  1082.00 @&t@
+ 999  2081.00 @&t@
+])
+AT_CLEANUP
diff --git a/tests/language/xforms/recode.at b/tests/language/xforms/recode.at
new file mode 100644 (file)
index 0000000..aa50054
--- /dev/null
@@ -0,0 +1,296 @@
+AT_BANNER([RECODE transformation])
+
+m4_define([RECODE_SAMPLE_DATA],
+  [DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10).
+MISSING VALUES x(9)/s('xxx').
+BEGIN DATA.
+0, '', ''
+1, a, a
+2, ab, ab
+3, abc, abc
+4, abcd, abcd
+5, 123, 123
+6, ' 123', ' 123'
+7, +1, +1
+8, 1x, 1x
+9, abcd, abcdefghi
+,  xxx, abcdefghij
+END DATA.
+])
+
+AT_SETUP([RECODE numeric to numeric, without INTO])
+AT_DATA([recode.sps],
+  [RECODE_SAMPLE_DATA
+NUMERIC x0 TO x8 (F3).
+MISSING VALUES x0 to x8 (9).
+COMPUTE x0=value(x).
+RECODE x0 (1=9).
+COMPUTE x1=value(x).
+RECODE x1 (1=9)(3=8)(5=7).
+COMPUTE x2=value(x).
+RECODE x2 (1=8)(2,3,4,5,6,8=9)(9=1).
+COMPUTE x3=value(x).
+RECODE x3 (1 THRU 9=10)(MISSING=11).
+COMPUTE x4=value(x).
+RECODE x4 (MISSING=11)(1 THRU 9=10).
+COMPUTE x5=value(x).
+RECODE x5 (LOWEST THRU 5=1).
+COMPUTE x6=value(x).
+RECODE x6 (4 THRU HIGHEST=2).
+COMPUTE x7=value(x).
+RECODE x7 (LO THRU HI=3).
+COMPUTE x8=value(x).
+RECODE x8 (SYSMIS=4).
+LIST x x0 TO x8.
+])
+AT_CHECK([pspp -O format=csv recode.sps], [0],
+  [Table: Data List
+x,x0,x1,x2,x3,x4,x5,x6,x7,x8
+0,0,0,0,0,0,1,0,3,0
+1,9,9,8,10,10,1,1,3,1
+2,2,2,9,10,10,1,2,3,2
+3,3,8,9,10,10,1,3,3,3
+4,4,4,9,10,10,1,2,3,4
+5,5,7,9,10,10,1,2,3,5
+6,6,6,9,10,10,6,2,3,6
+7,7,7,7,10,10,7,2,3,7
+8,8,8,9,10,10,8,2,3,8
+9,9,9,1,10,11,9,2,3,9
+.,.,.,.,11,11,.,.,.,4
+])
+AT_CLEANUP
+
+AT_SETUP([RECODE numeric to numeric, with INTO, without COPY])
+AT_DATA([recode.sps],
+  [RECODE_SAMPLE_DATA
+NUMERIC ix0 TO ix8 (F3).
+RECODE x (1=9) INTO ix0.
+RECODE x (1=9)(3=8)(5=7) INTO ix1.
+RECODE x (1=8)(2,3,4,5,6,8=9)(9=1) INTO ix2.
+RECODE x (1 THRU 9=10)(MISSING=11) INTO ix3.
+RECODE x (MISSING=11)(1 THRU 9=10) INTO ix4.
+RECODE x (LOWEST THRU 5=1) INTO ix5.
+RECODE x (4 THRU HIGHEST=2) INTO ix6.
+RECODE x (LO THRU HI=3) INTO ix7.
+RECODE x (SYSMIS=4) INTO ix8.
+LIST x ix0 TO ix8.
+])
+AT_CHECK([pspp -O format=csv recode.sps], [0],
+  [Table: Data List
+x,ix0,ix1,ix2,ix3,ix4,ix5,ix6,ix7,ix8
+0,.,.,.,.,.,1,.,3,.
+1,9,9,8,10,10,1,.,3,.
+2,.,.,9,10,10,1,.,3,.
+3,.,8,9,10,10,1,.,3,.
+4,.,.,9,10,10,1,2,3,.
+5,.,7,9,10,10,1,2,3,.
+6,.,.,9,10,10,.,2,3,.
+7,.,.,.,10,10,.,2,3,.
+8,.,.,9,10,10,.,2,3,.
+9,.,.,1,10,11,.,2,3,.
+.,.,.,.,11,11,.,.,.,4
+])
+AT_CLEANUP
+
+AT_SETUP([RECODE numeric to numeric, with INTO, with COPY])
+AT_DATA([recode.sps],
+  [RECODE_SAMPLE_DATA
+NUMERIC cx0 TO cx8 (F3).
+RECODE x (1=9)(ELSE=COPY) INTO cx0.
+RECODE x (1=9)(3=8)(5=7)(ELSE=COPY) INTO cx1.
+RECODE x (1=8)(2,3,4,5,6,8=9)(9=1)(ELSE=COPY) INTO cx2.
+RECODE x (1 THRU 9=10)(MISSING=11)(ELSE=COPY) INTO cx3.
+RECODE x (MISSING=11)(1 THRU 9=10)(ELSE=COPY) INTO cx4.
+RECODE x (LOWEST THRU 5=1)(ELSE=COPY) INTO cx5.
+RECODE x (4 THRU HIGHEST=2)(ELSE=COPY) INTO cx6.
+RECODE x (LO THRU HI=3)(ELSE=COPY) INTO cx7.
+RECODE x (SYSMIS=4)(ELSE=COPY) INTO cx8.
+RECODE x (5=COPY)(ELSE=22) INTO cx9.
+LIST x cx0 TO cx9.
+])
+AT_CHECK([pspp -O format=csv recode.sps], [0],
+  [Table: Data List
+x,cx0,cx1,cx2,cx3,cx4,cx5,cx6,cx7,cx8,cx9
+0,0,0,0,0,0,1,0,3,0,22.00
+1,9,9,8,10,10,1,1,3,1,22.00
+2,2,2,9,10,10,1,2,3,2,22.00
+3,3,8,9,10,10,1,3,3,3,22.00
+4,4,4,9,10,10,1,2,3,4,22.00
+5,5,7,9,10,10,1,2,3,5,5.00
+6,6,6,9,10,10,6,2,3,6,22.00
+7,7,7,7,10,10,7,2,3,7,22.00
+8,8,8,9,10,10,8,2,3,8,22.00
+9,9,9,1,10,11,9,2,3,9,22.00
+.,.,.,.,11,11,.,.,.,4,22.00
+])
+AT_CLEANUP
+
+AT_SETUP([RECODE string to string, with INTO, without COPY])
+AT_DATA([recode.sps],
+  [RECODE_SAMPLE_DATA
+STRING s0 TO s3 (A4)/t0 TO t3 (A10).
+RECODE s t ('a'='b')('ab'='bc') INTO s0 t0.
+RECODE s t ('abcd'='xyzw') INTO s1 t1.
+RECODE s t ('abc'='def')(ELSE='xyz') INTO s2 t2.
+RECODE t ('a'='b')('abcdefghi'='xyz')('abcdefghij'='jklmnopqr') INTO t3.
+RECODE s (MISSING='gone') INTO s3.
+LIST s t s0 TO s3 t0 TO t3.
+])
+AT_CHECK([pspp -O format=csv recode.sps], [0],
+  [Table: Data List
+s,t,s0,s1,s2,s3,t0,t1,t2,t3
+,,,,xyz ,,,,xyz       ,
+a   ,a         ,b   ,,xyz ,,b         ,,xyz       ,b         @&t@
+ab  ,ab        ,bc  ,,xyz ,,bc        ,,xyz       ,
+abc ,abc       ,,,def ,,,,def       ,
+abcd,abcd      ,,xyzw,xyz ,,,xyzw      ,xyz       ,
+123 ,123       ,,,xyz ,,,,xyz       ,
+123,123      ,,,xyz ,,,,xyz       ,
++1  ,+1        ,,,xyz ,,,,xyz       ,
+1x  ,1x        ,,,xyz ,,,,xyz       ,
+abcd,abcdefghi ,,xyzw,xyz ,,,,xyz       ,xyz       @&t@
+xxx ,abcdefghij,,,xyz ,gone,,,xyz       ,jklmnopqr @&t@
+])
+AT_CLEANUP
+
+AT_SETUP(RECODE string to string, with INTO, with COPY])
+AT_DATA([recode.sps],
+  [RECODE_SAMPLE_DATA
+STRING cs0 TO cs2 (A4)/ct0 TO ct3 (A10).
+RECODE s t ('a'='b')('ab'='bc')(ELSE=COPY) INTO cs0 ct0.
+RECODE s t ('abcd'='xyzw')(ELSE=COPY) INTO cs1 ct1.
+RECODE s t ('abc'='def')(ELSE='xyz')(ELSE=COPY) INTO cs2 ct2.
+RECODE t ('a'='b')('abcdefghi'='xyz')('abcdefghij'='jklmnopqr')(ELSE=COPY)
+    INTO ct3.
+LIST s t cs0 TO cs2 ct0 TO ct3.
+])
+AT_CHECK([pspp -O format=csv recode.sps], [0],
+  [Table: Data List
+s,t,cs0,cs1,cs2,ct0,ct1,ct2,ct3
+,,,,xyz ,,,xyz       ,
+a   ,a         ,b   ,a   ,xyz ,b         ,a         ,xyz       ,b         @&t@
+ab  ,ab        ,bc  ,ab  ,xyz ,bc        ,ab        ,xyz       ,ab        @&t@
+abc ,abc       ,abc ,abc ,def ,abc       ,abc       ,def       ,abc       @&t@
+abcd,abcd      ,abcd,xyzw,xyz ,abcd      ,xyzw      ,xyz       ,abcd      @&t@
+123 ,123       ,123 ,123 ,xyz ,123       ,123       ,xyz       ,123       @&t@
+123,123      ,123,123,xyz ,123      ,123      ,xyz       ,123      @&t@
++1  ,+1        ,+1  ,+1  ,xyz ,+1        ,+1        ,xyz       ,+1        @&t@
+1x  ,1x        ,1x  ,1x  ,xyz ,1x        ,1x        ,xyz       ,1x        @&t@
+abcd,abcdefghi ,abcd,xyzw,xyz ,abcdefghi ,abcdefghi ,xyz       ,xyz       @&t@
+xxx ,abcdefghij,xxx ,xxx ,xyz ,abcdefghij,abcdefghij,xyz       ,jklmnopqr @&t@
+])
+AT_CLEANUP
+
+AT_SETUP([RECODE string to numeric])
+AT_DATA([recode.sps],
+  [RECODE_SAMPLE_DATA
+NUMERIC ns0 TO ns2 (F3)/nt0 TO nt2 (F3).
+RECODE s t (CONVERT)(' '=0)('abcd'=1) INTO ns0 nt0.
+RECODE s t (' '=0)(CONVERT)('abcd'=1) INTO ns1 nt1.
+RECODE s t ('1x'=1)('abcd'=2)(ELSE=3) INTO ns2 nt2.
+LIST s t ns0 TO ns2 nt0 TO nt2.
+])
+AT_CHECK([pspp -O format=csv recode.sps], [0],
+  [Table: Data List
+s,t,ns0,ns1,ns2,nt0,nt1,nt2
+,,.,0,3,.,0,3
+a   ,a         ,.,.,3,.,.,3
+ab  ,ab        ,.,.,3,.,.,3
+abc ,abc       ,.,.,3,.,.,3
+abcd,abcd      ,1,1,2,1,1,2
+123 ,123       ,123,123,3,123,123,3
+123,123      ,123,123,3,123,123,3
++1  ,+1        ,1,1,3,1,1,3
+1x  ,1x        ,.,.,1,.,.,1
+abcd,abcdefghi ,1,1,2,.,.,3
+xxx ,abcdefghij,.,.,3,.,.,3
+])
+AT_CLEANUP
+
+AT_SETUP([RECODE numeric to string])
+AT_DATA([recode.sps],
+  [RECODE_SAMPLE_DATA
+STRING sx0 TO sx2 (a10).
+RECODE x (1 THRU 9='abcdefghij') INTO sx0.
+RECODE x (0,1,3,5,7,MISSING='xxx') INTO sx1.
+RECODE x (2 THRU 6,SYSMIS='xyz')(ELSE='foobar') INTO sx2.
+LIST x sx0 TO sx2.
+])
+AT_CHECK([pspp -O format=csv recode.sps], [0],
+  [Table: Data List
+x,sx0,sx1,sx2
+0,,xxx       ,foobar    @&t@
+1,abcdefghij,xxx       ,foobar    @&t@
+2,abcdefghij,,xyz       @&t@
+3,abcdefghij,xxx       ,xyz       @&t@
+4,abcdefghij,,xyz       @&t@
+5,abcdefghij,xxx       ,xyz       @&t@
+6,abcdefghij,,xyz       @&t@
+7,abcdefghij,xxx       ,foobar    @&t@
+8,abcdefghij,,foobar    @&t@
+9,abcdefghij,xxx       ,foobar    @&t@
+.,,xxx       ,xyz       @&t@
+])
+AT_CLEANUP
+
+AT_SETUP([RECODE bug in COPY])
+AT_DATA([recode.sps],
+  [DATA LIST LIST
+ /A (A1)
+ B (A1).
+
+BEGIN DATA
+1     2
+2     3
+3     4
+END DATA.
+
+** Clearly, the else=copy is superfluous here
+RECODE A ("1"="3") ("3"="1") (ELSE=COPY).
+EXECUTE.
+LIST.
+])
+AT_CHECK([pspp -O format=csv recode.sps], [0],
+  [Table: Reading free-form data from INLINE.
+Variable,Format
+A,A1
+B,A1
+
+Table: Data List
+A,B
+3,2
+2,3
+1,4
+])
+AT_CLEANUP
+
+AT_SETUP([RECODE bug in COPY with INTO])
+AT_DATA([recode.sps],
+  [DATA LIST LIST
+ /A (A1)
+ B (A1).
+
+BEGIN DATA
+1     2
+2     3
+3     4
+END DATA.
+
+STRING A1 (A1).
+RECODE A ("1"="3") ("3"="1") (ELSE=COPY) INTO a1.
+EXECUTE.
+LIST.
+])
+AT_CHECK([pspp -O format=csv recode.sps], [0],
+  [Table: Reading free-form data from INLINE.
+Variable,Format
+A,A1
+B,A1
+
+Table: Data List
+A,B,A1
+1,2,3
+2,3,2
+3,4,1
+])
+AT_CLEANUP
index 4ca7f92fd73f48316bcc53c1f388bfab69427a11..bbe341388a3ce530b26957afd8e89a3df586d6c1 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -342,6 +342,7 @@ check_hmap (struct hmap *hmap, const int data[], size_t cnt,
   size_t i, j;
   int *order;
 
+  check (hmap_is_empty (hmap) == (cnt == 0));
   check (hmap_count (hmap) == cnt);
   check (cnt <= hmap_capacity (hmap));
 
@@ -378,7 +379,6 @@ check_hmap (struct hmap *hmap, const int data[], size_t cnt,
       for (p = hmap_first (hmap), i = 0; i < cnt; p = hmap_next (hmap, p), i++)
         {
           struct element *e = hmap_node_to_element (p);
-          size_t j;
 
           check (hmap_node_hash (&e->node) == hash (e->data));
           for (j = 0; j < left; j++)
@@ -666,6 +666,10 @@ test_insert_ordered (int max_elems, hash_function *hash)
   struct hmap hmap;
   int i;
 
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 3
+  return;
+#endif  /* GCC 4.3 */
+
   hmap_init (&hmap);
   elements = xnmalloc (max_elems, sizeof *elements);
   values = xnmalloc (max_elems, sizeof *values);
@@ -911,6 +915,45 @@ test_swap_random_hash (void)
   test_swap (128, random_hash);
 }
 
+/* Inserts elements into an hmap in ascending order, then clears the hash table
+   using hmap_clear(). */
+static void
+test_clear (void)
+{
+  const int max_elems = 128;
+  struct element *elements;
+  int *values;
+  struct hmap hmap;
+  int cnt;
+
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 3
+  return;
+#endif  /* GCC 4.3 */
+
+  elements = xnmalloc (max_elems, sizeof *elements);
+  values = xnmalloc (max_elems, sizeof *values);
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int i;
+
+      hmap_init (&hmap);
+      for (i = 0; i < cnt; i++)
+        {
+          values[i] = elements[i].data = i;
+          hmap_insert (&hmap, &elements[i].node,
+                       random_hash (elements[i].data));
+          check_hmap (&hmap, values, i + 1, random_hash);
+        }
+      hmap_clear (&hmap);
+      check_hmap (&hmap, NULL, 0, random_hash);
+      hmap_destroy (&hmap);
+    }
+
+  free (elements);
+  free (values);
+}
+
 static void
 test_destroy_null (void) 
 {
@@ -995,6 +1038,8 @@ main (void)
 
   run_test (test_swap_random_hash, "test swapping tables");
 
+  run_test (test_clear, "test clearing hash table");
+
   run_test (test_destroy_null, "test destroying null table");
   run_test (test_shrink_empty, "test shrinking an empty table");
 
index fc08ca6161040a89d1c54574cb6f6ec2866886fb..18b7aad9d6cc5fd3f0f56dd949e8b1d9e3d95e8b 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -262,6 +262,7 @@ check_hmapx (struct hmapx *hmapx, const int data[], size_t cnt,
   size_t i, j;
   int *order;
 
+  check (hmapx_is_empty (hmapx) == (cnt == 0));
   check (hmapx_count (hmapx) == cnt);
   check (cnt <= hmapx_capacity (hmapx));
 
@@ -934,6 +935,44 @@ test_swap_random_hash (void)
   test_swap (128, random_hash);
 }
 
+/* Inserts elements into an HMAPX in ascending order, then clears the hash
+   table using hmapx_clear(). */
+static void
+test_clear (void)
+{
+  const int max_elems = 128;
+  struct element *elements;
+  struct hmapx_node **nodes;
+  int *values;
+  struct hmapx hmapx;
+  int cnt;
+
+  elements = xnmalloc (max_elems, sizeof *elements);
+  nodes = xnmalloc (max_elems, sizeof *nodes);
+  values = xnmalloc (max_elems, sizeof *values);
+
+  hmapx_init (&hmapx);
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int i;
+
+      for (i = 0; i < cnt; i++)
+        {
+          values[i] = elements[i].data = i;
+          nodes[i] = hmapx_insert (&hmapx, &elements[i],
+                                   random_hash (elements[i].data));
+          check_hmapx (&hmapx, values, i + 1, random_hash);
+        }
+      hmapx_clear (&hmapx);
+      check_hmapx (&hmapx, NULL, 0, random_hash);
+    }
+  hmapx_destroy (&hmapx);
+
+  free (elements);
+  free (nodes);
+  free (values);
+}
+
 static void
 test_destroy_null (void) 
 {
@@ -1025,6 +1064,8 @@ main (void)
 
   run_test (test_swap_random_hash, "test swapping tables");
 
+  run_test (test_clear, "test clearing hash table");
+
   run_test (test_destroy_null, "test destroying null table");
   run_test (test_shrink_empty, "test shrinking an empty table");
 
index 2befd51a4451c899f18fac5a23146444ba9d35a2..f8fe9b73618578f50f8dad56f18a3c261122b3f3 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -865,6 +865,34 @@ test_find_equal (void)
   test_examine_equal_range (test_find_equal_helper);
 }
 
+/* Tests llx_find(). */
+static void
+test_find (void)
+{
+  const int max_elems = 8;
+
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      struct llx_list list;
+      struct element **elems;
+      struct llx **elemp;
+      int *values;
+
+      int i;
+
+      allocate_ascending (cnt, &list, &elems, &elemp, &values);
+
+      for (i = 0; i < cnt; i++)
+        check (llx_find (llx_head (&list), llx_null (&list), elems[i])
+               == elemp[i]);
+      check (llx_find (llx_head (&list), llx_null (&list), NULL) == NULL);
+
+      free_elements (cnt, &list, elems, elemp, values);
+    }
+}
+
 /* Helper function for testing llx_find_if. */
 static void
 test_find_if_helper (int r0, int r1, int eq_pat, struct llx **elemp)
@@ -2040,6 +2068,7 @@ main (void)
   run_test (test_remove_equal, "remove_equal");
   run_test (test_remove_if, "remove_if");
   run_test (test_find_equal, "find_equal");
+  run_test (test_find, "find");
   run_test (test_find_if, "find_if");
   run_test (test_find_adjacent_equal, "find_adjacent_equal");
   run_test (test_count_range, "count_range");
index e8cbffa5e6334408bbd69dc4c7c2a7e9dbb72829..8d6e68316834d707254b5888f92d1b41b1064bb6 100644 (file)
@@ -212,7 +212,7 @@ check_pattern (const struct range_set *rs, unsigned int pattern)
      caching. */
   for (start = 0; start <= 32; start++)
     {
-      struct range_set *nonconst_rs = (struct range_set *) rs;
+      struct range_set *nonconst_rs = CONST_CAST (struct range_set *, rs);
       nonconst_rs->cache_end = 0;
       s1 = range_set_scan (rs, start);
       s2 = next_1bit (pattern, start);
diff --git a/tests/libpspp/string-map-test.c b/tests/libpspp/string-map-test.c
new file mode 100644 (file)
index 0000000..e3f3b79
--- /dev/null
@@ -0,0 +1,906 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+/* This is a test program for the string_map_* routines defined in
+   string-map.c.  This test program aims to be as comprehensive as possible.
+   "gcov -a -b" should report almost complete coverage of lines, blocks and
+   branches in string-map.c, except that one branch caused by hash collision is
+   not exercised because our hash function has so few collisions.  "valgrind
+   --leak-check=yes --show-reachable=yes" should give a clean report. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libpspp/string-map.h>
+
+#include <assert.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <libpspp/hash-functions.h>
+#include <libpspp/compiler.h>
+#include <libpspp/string-set.h>
+\f
+/* Currently running test. */
+static const char *test_name;
+
+/* Exit with a failure code.
+   (Place a breakpoint on this function while debugging.) */
+static void
+check_die (void)
+{
+  exit (EXIT_FAILURE);
+}
+
+/* If OK is not true, prints a message about failure on the
+   current source file and the given LINE and terminates. */
+static void
+check_func (bool ok, int line)
+{
+  if (!ok)
+    {
+      printf ("Check failed in %s test at %s, line %d\n",
+              test_name, __FILE__, line);
+      check_die ();
+    }
+}
+
+/* Verifies that EXPR evaluates to true.
+   If not, prints a message citing the calling line number and
+   terminates. */
+#define check(EXPR) check_func ((EXPR), __LINE__)
+
+/* Prints a message about memory exhaustion and exits with a
+   failure code. */
+static void
+xalloc_die (void)
+{
+  printf ("virtual memory exhausted\n");
+  exit (EXIT_FAILURE);
+}
+
+static void *xmalloc (size_t n) MALLOC_LIKE;
+static void *xnmalloc (size_t n, size_t m) MALLOC_LIKE;
+static void *xmemdup (const void *p, size_t n) MALLOC_LIKE;
+
+/* Allocates and returns N bytes of memory. */
+static void *
+xmalloc (size_t n)
+{
+  if (n != 0)
+    {
+      void *p = malloc (n);
+      if (p == NULL)
+        xalloc_die ();
+
+      return p;
+    }
+  else
+    return NULL;
+}
+
+static void *
+xmemdup (const void *p, size_t n)
+{
+  void *q = xmalloc (n);
+  memcpy (q, p, n);
+  return q;
+}
+
+/* Clone STRING.  */
+static char *
+xstrdup (const char *string)
+{
+  return xmemdup (string, strlen (string) + 1);
+}
+
+/* Allocates and returns N * M bytes of memory. */
+static void *
+xnmalloc (size_t n, size_t m)
+{
+  if ((size_t) -1 / m <= n)
+    xalloc_die ();
+  return xmalloc (n * m);
+}
+\f
+/* Support routines. */
+
+enum {
+  IDX_BITS = 10,
+  MAX_IDX = 1 << IDX_BITS,
+  KEY_MASK = (MAX_IDX - 1),
+  KEY_SHIFT = 0,
+  VALUE_MASK = (MAX_IDX - 1) << IDX_BITS,
+  VALUE_SHIFT = IDX_BITS
+};
+
+static char *string_table[MAX_IDX];
+
+static const char *
+get_string (int idx)
+{
+  char **s;
+
+  assert (idx >= 0 && idx < MAX_IDX);
+  s = &string_table[idx];
+  if (*s == NULL)
+    {
+      *s = xmalloc (16);
+      sprintf (*s, "%d", idx);
+    }
+  return *s;
+}
+
+static void
+free_strings (void)
+{
+  int i;
+
+  for (i = 0; i < MAX_IDX; i++)
+    free (string_table[i]);
+}
+
+static const char *
+make_key (int value)
+{
+  return get_string ((value & KEY_MASK) >> KEY_SHIFT);
+}
+
+static const char *
+make_value (int value)
+{
+  return get_string ((value & VALUE_MASK) >> VALUE_SHIFT);
+}
+
+static int
+random_value (unsigned int seed, int basis)
+{
+  return hash_int (seed, basis) & VALUE_MASK;
+}
+
+/* Swaps *A and *B. */
+static void
+swap (int *a, int *b)
+{
+  int t = *a;
+  *a = *b;
+  *b = t;
+}
+
+/* Reverses the order of the CNT integers starting at VALUES. */
+static void
+reverse (int *values, size_t cnt)
+{
+  size_t i = 0;
+  size_t j = cnt;
+
+  while (j > i)
+    swap (&values[i++], &values[--j]);
+}
+
+/* Arranges the CNT elements in VALUES into the lexicographically next greater
+   permutation.  Returns true if successful.  If VALUES is already the
+   lexicographically greatest permutation of its elements (i.e. ordered from
+   greatest to smallest), arranges them into the lexicographically least
+   permutation (i.e. ordered from smallest to largest) and returns false.
+
+   Comparisons among elements of VALUES consider only the bits in KEY_MASK. */
+static bool
+next_permutation (int *values, size_t cnt)
+{
+  if (cnt > 0)
+    {
+      size_t i = cnt - 1;
+      while (i != 0)
+        {
+          i--;
+          if ((values[i] & KEY_MASK) < (values[i + 1] & KEY_MASK))
+            {
+              size_t j;
+              for (j = cnt - 1;
+                   (values[i] & KEY_MASK) >= (values[j] & KEY_MASK);
+                   j--)
+                continue;
+              swap (values + i, values + j);
+              reverse (values + (i + 1), cnt - (i + 1));
+              return true;
+            }
+        }
+
+      reverse (values, cnt);
+    }
+
+  return false;
+}
+
+/* Returns N!. */
+static unsigned int
+factorial (unsigned int n)
+{
+  unsigned int value = 1;
+  while (n > 1)
+    value *= n--;
+  return value;
+}
+
+/* Randomly shuffles the CNT elements in ARRAY, each of which is
+   SIZE bytes in size. */
+static void
+random_shuffle (void *array_, size_t cnt, size_t size)
+{
+  char *array = array_;
+  char *tmp = xmalloc (size);
+  size_t i;
+
+  for (i = 0; i < cnt; i++)
+    {
+      size_t j = rand () % (cnt - i) + i;
+      if (i != j)
+        {
+          memcpy (tmp, array + j * size, size);
+          memcpy (array + j * size, array + i * size, size);
+          memcpy (array + i * size, tmp, size);
+        }
+    }
+
+  free (tmp);
+}
+
+/* Checks that MAP contains the CNT strings in DATA, that its structure is
+   correct, and that certain operations on MAP produce the expected results. */
+static void
+check_string_map (struct string_map *map, const int data[], size_t cnt)
+{
+  size_t i;
+
+  check (string_map_is_empty (map) == (cnt == 0));
+  check (string_map_count (map) == cnt);
+
+  for (i = 0; i < cnt; i++)
+    {
+      struct string_map_node *node;
+      const char *key = make_key (data[i]);
+      const char *value = make_value (data[i]);
+      const char *found_value;
+
+      check (string_map_contains (map, key));
+
+      node = string_map_find_node (map, key);
+      check (node != NULL);
+      check (!strcmp (key, string_map_node_get_key (node)));
+      check (!strcmp (value, string_map_node_get_value (node)));
+
+      check (node == string_map_insert (map, key, "abc"));
+      check (!strcmp (value, string_map_node_get_value (node)));
+
+      check (node == string_map_insert_nocopy (map, xstrdup (key),
+                                               xstrdup ("def")));
+      check (!strcmp (value, string_map_node_get_value (node)));
+
+      found_value = string_map_find (map, key);
+      check (found_value != NULL);
+      check (!strcmp (found_value, value));
+    }
+
+  check (!string_map_contains (map, "xxx"));
+  check (string_map_find (map, "z") == NULL);
+  check (string_map_find_node (map, "") == NULL);
+  check (!string_map_delete (map, "xyz"));
+
+  if (cnt == 0)
+    check (string_map_first (map) == NULL);
+  else
+    {
+      const struct string_map_node *node;
+      int *data_copy;
+      int left;
+
+      data_copy = xmemdup (data, cnt * sizeof *data);
+      left = cnt;
+      for (node = string_map_first (map), i = 0; i < cnt;
+           node = string_map_next (map, node), i++)
+        {
+          const char *key = string_map_node_get_key (node);
+          const char *value = string_map_node_get_value (node);
+          size_t j;
+
+          for (j = 0; j < left; j++)
+            if (!strcmp (key, make_key (data_copy[j]))
+                || !strcmp (value, make_value (data_copy[j])))
+              {
+                data_copy[j] = data_copy[--left];
+                goto next;
+              }
+          check_die ();
+
+        next: ;
+        }
+      check (node == NULL);
+      free (data_copy);
+    }
+}
+
+/* Inserts the CNT strings from 0 to CNT - 1 (inclusive) into a map in the
+   order specified by INSERTIONS, then deletes them in the order specified by
+   DELETIONS, checking the map's contents for correctness after each
+   operation.  */
+static void
+test_insert_delete (const int insertions[],
+                    const int deletions[],
+                    size_t cnt)
+{
+  struct string_map map;
+  size_t i;
+
+  string_map_init (&map);
+  check_string_map (&map, NULL, 0);
+  for (i = 0; i < cnt; i++)
+    {
+      check (string_map_insert (&map, make_key (insertions[i]),
+                                make_value (insertions[i])));
+      check_string_map (&map, insertions, i + 1);
+    }
+  for (i = 0; i < cnt; i++)
+    {
+      check (string_map_delete (&map, make_key (deletions[i])));
+      check_string_map (&map, deletions + i + 1, cnt - i - 1);
+    }
+  string_map_destroy (&map);
+}
+\f
+/* Inserts strings into a map in each possible order, then removes them in each
+   possible order, up to a specified maximum size. */
+static void
+test_insert_any_remove_any (void)
+{
+  const int basis = 0;
+  const int max_elems = 5;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *insertions, *deletions;
+      unsigned int ins_perm_cnt;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i | random_value (i, basis);
+
+      for (ins_perm_cnt = 0;
+           ins_perm_cnt == 0 || next_permutation (insertions, cnt);
+           ins_perm_cnt++)
+        {
+          unsigned int del_perm_cnt;
+          int i;
+
+          for (i = 0; i < cnt; i++)
+            deletions[i] = i | random_value (i, basis);
+
+          for (del_perm_cnt = 0;
+               del_perm_cnt == 0 || next_permutation (deletions, cnt);
+               del_perm_cnt++)
+            test_insert_delete (insertions, deletions, cnt);
+
+          check (del_perm_cnt == factorial (cnt));
+        }
+      check (ins_perm_cnt == factorial (cnt));
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts strings into a map in each possible order, then removes them in the
+   same order, up to a specified maximum size. */
+static void
+test_insert_any_remove_same (void)
+{
+  const int max_elems = 7;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *values;
+      unsigned int permutation_cnt;
+      int i;
+
+      values = xnmalloc (cnt, sizeof *values);
+      for (i = 0; i < cnt; i++)
+        values[i] = i | random_value (i, 1);
+
+      for (permutation_cnt = 0;
+           permutation_cnt == 0 || next_permutation (values, cnt);
+           permutation_cnt++)
+        test_insert_delete (values, values, cnt);
+      check (permutation_cnt == factorial (cnt));
+
+      free (values);
+    }
+}
+
+/* Inserts strings into a map in each possible order, then
+   removes them in reverse order, up to a specified maximum
+   size. */
+static void
+test_insert_any_remove_reverse (void)
+{
+  const int max_elems = 7;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *insertions, *deletions;
+      unsigned int permutation_cnt;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i | random_value (i, 2);
+
+      for (permutation_cnt = 0;
+           permutation_cnt == 0 || next_permutation (insertions, cnt);
+           permutation_cnt++)
+        {
+          memcpy (deletions, insertions, sizeof *insertions * cnt);
+          reverse (deletions, cnt);
+
+          test_insert_delete (insertions, deletions, cnt);
+        }
+      check (permutation_cnt == factorial (cnt));
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts and removes strings in a map, in random order. */
+static void
+test_random_sequence (void)
+{
+  const int basis = 3;
+  const int max_elems = 64;
+  const int max_trials = 8;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt += 2)
+    {
+      int *insertions, *deletions;
+      int trial;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i | random_value (i, basis);
+      for (i = 0; i < cnt; i++)
+        deletions[i] = i | random_value (i, basis);
+
+      for (trial = 0; trial < max_trials; trial++)
+        {
+          random_shuffle (insertions, cnt, sizeof *insertions);
+          random_shuffle (deletions, cnt, sizeof *deletions);
+
+          test_insert_delete (insertions, deletions, cnt);
+        }
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts strings into a map in ascending order, then delete in ascending
+   order. */
+static void
+test_insert_ordered (void)
+{
+  const int max_elems = 64;
+  int *values;
+  struct string_map map;
+  int i;
+
+  string_map_init (&map);
+  values = xnmalloc (max_elems, sizeof *values);
+  for (i = 0; i < max_elems; i++)
+    {
+      values[i] = i | random_value (i, 4);
+      string_map_insert_nocopy (&map, xstrdup (make_key (values[i])),
+                                xstrdup (make_value (values[i])));
+      check_string_map (&map, values, i + 1);
+    }
+  for (i = 0; i < max_elems; i++)
+    {
+      string_map_delete (&map, make_key (i));
+      check_string_map (&map, values + i + 1, max_elems - i - 1);
+    }
+  string_map_destroy (&map);
+  free (values);
+}
+
+/* Inserts and replaces strings in a map, in random order. */
+static void
+test_replace (void)
+{
+  const int basis = 15;
+  enum { MAX_ELEMS = 16 };
+  const int max_trials = 8;
+  int cnt;
+
+  for (cnt = 0; cnt <= MAX_ELEMS; cnt++)
+    {
+      int insertions[MAX_ELEMS];
+      int trial;
+      int i;
+
+      for (i = 0; i < cnt; i++)
+        insertions[i] = (i / 2) | random_value (i, basis);
+
+      for (trial = 0; trial < max_trials; trial++)
+        {
+          struct string_map map;
+          int data[MAX_ELEMS];
+          int n_data;
+
+          /* Insert with replacement in random order. */
+          n_data = 0;
+          string_map_init (&map);
+          random_shuffle (insertions, cnt, sizeof *insertions);
+          for (i = 0; i < cnt; i++)
+            {
+              const char *key = make_key (insertions[i]);
+              const char *value = make_value (insertions[i]);
+              int j;
+
+              for (j = 0; j < n_data; j++)
+                if ((data[j] & KEY_MASK) == (insertions[i] & KEY_MASK))
+                  {
+                    data[j] = insertions[i];
+                    goto found;
+                  }
+              data[n_data++] = insertions[i];
+            found:
+
+              if (i % 2)
+                string_map_replace (&map, key, value);
+              else
+                string_map_replace_nocopy (&map,
+                                           xstrdup (key), xstrdup (value));
+              check_string_map (&map, data, n_data);
+            }
+
+          /* Delete in original order. */
+          for (i = 0; i < cnt; i++)
+            {
+              const char *expected_value;
+              char *value;
+              int j;
+
+              expected_value = NULL;
+              for (j = 0; j < n_data; j++)
+                if ((data[j] & KEY_MASK) == (insertions[i] & KEY_MASK))
+                  {
+                    expected_value = make_value (data[j]);
+                    data[j] = data[--n_data];
+                    break;
+                  }
+
+              value = string_map_find_and_delete (&map,
+                                                  make_key (insertions[i]));
+              check ((value != NULL) == (expected_value != NULL));
+              check (value == NULL || !strcmp (value, expected_value));
+              free (value);
+            }
+          assert (string_map_is_empty (&map));
+
+          string_map_destroy (&map);
+        }
+    }
+}
+
+static void
+make_patterned_map (struct string_map *map, unsigned int pattern, int basis,
+                    int insertions[], int *np)
+{
+  int n;
+  int i;
+
+  string_map_init (map);
+
+  n = 0;
+  for (i = 0; pattern != 0; i++)
+    if (pattern & (1u << i))
+      {
+        pattern &= pattern - 1;
+        insertions[n] = i | random_value (i, basis);
+        check (string_map_insert (map, make_key (insertions[n]),
+                                  make_value (insertions[n])));
+        n++;
+      }
+  check_string_map (map, insertions, n);
+
+  *np = n;
+}
+
+static void
+for_each_map (void (*cb)(struct string_map *, int data[], int n),
+              int basis)
+{
+  enum { MAX_ELEMS = 5 };
+  unsigned int pattern;
+
+  for (pattern = 0; pattern < (1u << MAX_ELEMS); pattern++)
+    {
+      int data[MAX_ELEMS];
+      struct string_map map;
+      int n;
+
+      make_patterned_map (&map, pattern, basis, data, &n);
+      (*cb) (&map, data, n);
+      string_map_destroy (&map);
+    }
+}
+
+static void
+for_each_pair_of_maps (
+  void (*cb)(struct string_map *a, int a_data[], int n_a,
+             struct string_map *b, int b_data[], int n_b),
+  int a_basis, int b_basis)
+{
+  enum { MAX_ELEMS = 5 };
+  unsigned int a_pattern, b_pattern;
+
+  for (a_pattern = 0; a_pattern < (1u << MAX_ELEMS); a_pattern++)
+    for (b_pattern = 0; b_pattern < (1u << MAX_ELEMS); b_pattern++)
+      {
+        int a_data[MAX_ELEMS], b_data[MAX_ELEMS];
+        struct string_map a_map, b_map;
+        int n_a, n_b;
+
+        make_patterned_map (&a_map, a_pattern, a_basis, a_data, &n_a);
+        make_patterned_map (&b_map, b_pattern, b_basis, b_data, &n_b);
+        (*cb) (&a_map, a_data, n_a, &b_map, b_data, n_b);
+        string_map_destroy (&a_map);
+        string_map_destroy (&b_map);
+      }
+}
+
+static void
+clear_cb (struct string_map *map, int data[] UNUSED, int n UNUSED)
+{
+  string_map_clear (map);
+  check_string_map (map, NULL, 0);
+}
+
+static void
+test_clear (void)
+{
+  for_each_map (clear_cb, 5);
+}
+
+static void
+clone_cb (struct string_map *map, int data[], int n)
+{
+  struct string_map clone;
+
+  string_map_clone (&clone, map);
+  check_string_map (&clone, data, n);
+  string_map_destroy (&clone);
+}
+
+static void
+test_clone (void)
+{
+  for_each_map (clone_cb, 6);
+}
+
+static void
+node_swap_value_cb (struct string_map *map, int data[], int n)
+{
+  int i;
+
+  for (i = 0; i < n; i++)
+    {
+      const char *value = make_value (data[i]);
+      struct string_map_node *node;
+      char *old_value;
+
+      node = string_map_find_node (map, make_key (data[i]));
+      check (node != NULL);
+      check (!strcmp (string_map_node_get_value (node), value));
+      data[i] = (data[i] & KEY_MASK) | random_value (i, 15);
+      old_value = string_map_node_swap_value (node, make_value (data[i]));
+      check (old_value != NULL);
+      check (!strcmp (value, old_value));
+      free (old_value);
+    }
+}
+
+static void
+test_node_swap_value (void)
+{
+  for_each_map (node_swap_value_cb, 14);
+}
+
+static void
+swap_cb (struct string_map *a, int a_data[], int n_a,
+         struct string_map *b, int b_data[], int n_b)
+{
+  string_map_swap (a, b);
+  check_string_map (a, b_data, n_b);
+  check_string_map (b, a_data, n_a);
+}
+
+static void
+test_swap (void)
+{
+  for_each_pair_of_maps (swap_cb, 7, 8);
+}
+
+static void
+insert_map_cb (struct string_map *a, int a_data[], int n_a,
+               struct string_map *b, int b_data[], int n_b)
+{
+  int i, j;
+
+  string_map_insert_map (a, b);
+
+  for (i = 0; i < n_b; i++)
+    {
+      for (j = 0; j < n_a; j++)
+        if ((b_data[i] & KEY_MASK) == (a_data[j] & KEY_MASK))
+          goto found;
+      a_data[n_a++] = b_data[i];
+    found:;
+    }
+  check_string_map (a, a_data, n_a);
+  check_string_map (b, b_data, n_b);
+}
+
+static void
+test_insert_map (void)
+{
+  for_each_pair_of_maps (insert_map_cb, 91, 10);
+}
+
+static void
+replace_map_cb (struct string_map *a, int a_data[], int n_a,
+               struct string_map *b, int b_data[], int n_b)
+{
+  int i, j;
+
+  string_map_replace_map (a, b);
+
+  for (i = 0; i < n_b; i++)
+    {
+      for (j = 0; j < n_a; j++)
+        if ((b_data[i] & KEY_MASK) == (a_data[j] & KEY_MASK))
+          {
+            a_data[j] = (a_data[j] & KEY_MASK) | (b_data[i] & VALUE_MASK);
+            goto found;
+          }
+      a_data[n_a++] = b_data[i];
+    found:;
+    }
+  check_string_map (a, a_data, n_a);
+  check_string_map (b, b_data, n_b);
+}
+
+static void
+test_replace_map (void)
+{
+  for_each_pair_of_maps (replace_map_cb, 11, 12);
+}
+
+static void
+check_set (struct string_set *set, const int *data, int n_data,
+           int mask, int shift)
+{
+  int *unique;
+  int n_unique;
+  int i;
+
+  n_unique = 0;
+  unique = xmalloc (n_data * sizeof *unique);
+  for (i = 0; i < n_data; i++)
+    {
+      int idx = (data[i] & mask) >> shift;
+      int j;
+
+      for (j = 0; j < n_unique; j++)
+        if (unique[j] == idx)
+          goto found;
+      unique[n_unique++] = idx;
+    found:;
+    }
+
+  check (string_set_count (set) == n_unique);
+  for (i = 0; i < n_unique; i++)
+    check (string_set_contains (set, get_string (unique[i])));
+  string_set_destroy (set);
+  free (unique);
+}
+
+static void
+get_keys_and_values_cb (struct string_map *map, int data[], int n)
+{
+  struct string_set keys, values;
+
+  string_set_init (&keys);
+  string_set_init (&values);
+  string_map_get_keys (map, &keys);
+  string_map_get_values (map, &values);
+  check_set (&keys, data, n, KEY_MASK, KEY_SHIFT);
+  check_set (&values, data, n, VALUE_MASK, VALUE_SHIFT);
+}
+
+static void
+test_get_keys_and_values (void)
+{
+  for_each_map (get_keys_and_values_cb, 13);
+}
+
+static void
+test_destroy_null (void)
+{
+  string_map_destroy (NULL);
+}
+\f
+/* Main program. */
+
+/* Runs TEST_FUNCTION and prints a message about NAME. */
+static void
+run_test (void (*test_function) (void), const char *name)
+{
+  test_name = name;
+  putchar ('.');
+  fflush (stdout);
+  test_function ();
+}
+
+int
+main (void)
+{
+  run_test (test_insert_any_remove_any, "insert any order, delete any order");
+  run_test (test_insert_any_remove_same,
+            "insert any order, delete same order");
+  run_test (test_insert_any_remove_reverse,
+            "insert any order, delete reverse order");
+  run_test (test_random_sequence, "insert and delete in random sequence");
+  run_test (test_replace, "insert and replace in random sequence");
+  run_test (test_insert_ordered, "insert in ascending order");
+  run_test (test_clear, "clear");
+  run_test (test_clone, "clone");
+  run_test (test_swap, "swap");
+  run_test (test_node_swap_value, "node_swap_value");
+  run_test (test_insert_map, "insert_map");
+  run_test (test_replace_map, "replace_map");
+  run_test (test_get_keys_and_values, "get keys and values");
+  run_test (test_destroy_null, "destroying null table");
+
+  putchar ('\n');
+
+  free_strings ();
+
+  return 0;
+}
diff --git a/tests/libpspp/string-set-test.c b/tests/libpspp/string-set-test.c
new file mode 100644 (file)
index 0000000..6aafef4
--- /dev/null
@@ -0,0 +1,681 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+/* This is a test program for the string_set_* routines defined in
+   string-set.c.  This test program aims to be as comprehensive as possible.
+   "gcov -a -b" should report almost complete coverage of lines, blocks and
+   branches in string-set.c, except that one branch caused by hash collision is
+   not exercised because our hash function has so few collisions.  "valgrind
+   --leak-check=yes --show-reachable=yes" should give a clean report. */
+
+#include <config.h>
+
+#include <libpspp/string-set.h>
+
+#include <assert.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <libpspp/compiler.h>
+\f
+/* Currently running test. */
+static const char *test_name;
+
+/* Exit with a failure code.
+   (Place a breakpoint on this function while debugging.) */
+static void
+check_die (void)
+{
+  exit (EXIT_FAILURE);
+}
+
+/* If OK is not true, prints a message about failure on the
+   current source file and the given LINE and terminates. */
+static void
+check_func (bool ok, int line)
+{
+  if (!ok)
+    {
+      printf ("Check failed in %s test at %s, line %d\n",
+              test_name, __FILE__, line);
+      check_die ();
+    }
+}
+
+/* Verifies that EXPR evaluates to true.
+   If not, prints a message citing the calling line number and
+   terminates. */
+#define check(EXPR) check_func ((EXPR), __LINE__)
+
+/* Prints a message about memory exhaustion and exits with a
+   failure code. */
+static void
+xalloc_die (void)
+{
+  printf ("virtual memory exhausted\n");
+  exit (EXIT_FAILURE);
+}
+
+static void *xmalloc (size_t n) MALLOC_LIKE;
+static void *xnmalloc (size_t n, size_t m) MALLOC_LIKE;
+static void *xmemdup (const void *p, size_t n) MALLOC_LIKE;
+
+/* Allocates and returns N bytes of memory. */
+static void *
+xmalloc (size_t n)
+{
+  if (n != 0)
+    {
+      void *p = malloc (n);
+      if (p == NULL)
+        xalloc_die ();
+
+      return p;
+    }
+  else
+    return NULL;
+}
+
+static void *
+xmemdup (const void *p, size_t n)
+{
+  void *q = xmalloc (n);
+  memcpy (q, p, n);
+  return q;
+}
+
+/* Clone STRING.  */
+static char *
+xstrdup (const char *string)
+{
+  return xmemdup (string, strlen (string) + 1);
+}
+
+/* Allocates and returns N * M bytes of memory. */
+static void *
+xnmalloc (size_t n, size_t m)
+{
+  if ((size_t) -1 / m <= n)
+    xalloc_die ();
+  return xmalloc (n * m);
+}
+\f
+/* Support routines. */
+
+enum { MAX_VALUE = 1024 };
+
+static char *string_table[MAX_VALUE];
+
+static const char *
+make_string (int value)
+{
+  char **s;
+
+  assert (value >= 0 && value < MAX_VALUE);
+  s = &string_table[value];
+  if (*s == NULL)
+    {
+      *s = xmalloc (16);
+      sprintf (*s, "%d", value);
+    }
+  return *s;
+}
+
+static void
+free_strings (void)
+{
+  int i;
+
+  for (i = 0; i < MAX_VALUE; i++)
+    free (string_table[i]);
+}
+
+/* Swaps *A and *B. */
+static void
+swap (int *a, int *b)
+{
+  int t = *a;
+  *a = *b;
+  *b = t;
+}
+
+/* Reverses the order of the CNT integers starting at VALUES. */
+static void
+reverse (int *values, size_t cnt)
+{
+  size_t i = 0;
+  size_t j = cnt;
+
+  while (j > i)
+    swap (&values[i++], &values[--j]);
+}
+
+/* Arranges the CNT elements in VALUES into the lexicographically
+   next greater permutation.  Returns true if successful.
+   If VALUES is already the lexicographically greatest
+   permutation of its elements (i.e. ordered from greatest to
+   smallest), arranges them into the lexicographically least
+   permutation (i.e. ordered from smallest to largest) and
+   returns false. */
+static bool
+next_permutation (int *values, size_t cnt)
+{
+  if (cnt > 0)
+    {
+      size_t i = cnt - 1;
+      while (i != 0)
+        {
+          i--;
+          if (values[i] < values[i + 1])
+            {
+              size_t j;
+              for (j = cnt - 1; values[i] >= values[j]; j--)
+                continue;
+              swap (values + i, values + j);
+              reverse (values + (i + 1), cnt - (i + 1));
+              return true;
+            }
+        }
+
+      reverse (values, cnt);
+    }
+
+  return false;
+}
+
+/* Returns N!. */
+static unsigned int
+factorial (unsigned int n)
+{
+  unsigned int value = 1;
+  while (n > 1)
+    value *= n--;
+  return value;
+}
+
+/* Randomly shuffles the CNT elements in ARRAY, each of which is
+   SIZE bytes in size. */
+static void
+random_shuffle (void *array_, size_t cnt, size_t size)
+{
+  char *array = array_;
+  char *tmp = xmalloc (size);
+  size_t i;
+
+  for (i = 0; i < cnt; i++)
+    {
+      size_t j = rand () % (cnt - i) + i;
+      if (i != j)
+        {
+          memcpy (tmp, array + j * size, size);
+          memcpy (array + j * size, array + i * size, size);
+          memcpy (array + i * size, tmp, size);
+        }
+    }
+
+  free (tmp);
+}
+
+/* Checks that SET contains the CNT strings in DATA, that its structure is
+   correct, and that certain operations on SET produce the expected results. */
+static void
+check_string_set (struct string_set *set, const int data[], size_t cnt)
+{
+  size_t i;
+
+  check (string_set_is_empty (set) == (cnt == 0));
+  check (string_set_count (set) == cnt);
+
+  for (i = 0; i < cnt; i++)
+    {
+      struct string_set_node *node;
+      const char *s = make_string (data[i]);
+
+      check (string_set_contains (set, s));
+      check (!string_set_insert (set, s));
+      check (!string_set_insert_nocopy (set, xstrdup (s)));
+
+      node = string_set_find_node (set, s);
+      check (node != NULL);
+      check (!strcmp (s, string_set_node_get_string (node)));
+    }
+
+  check (!string_set_contains (set, "xxx"));
+  check (string_set_find_node (set, "") == NULL);
+
+  if (cnt == 0)
+    check (string_set_first (set) == NULL);
+  else
+    {
+      const struct string_set_node *node;
+      int *data_copy;
+      int left;
+
+      data_copy = xmemdup (data, cnt * sizeof *data);
+      left = cnt;
+      for (node = string_set_first (set), i = 0; i < cnt;
+           node = string_set_next (set, node), i++)
+        {
+          const char *s = string_set_node_get_string (node);
+          size_t j;
+
+          for (j = 0; j < left; j++)
+            if (!strcmp (s, make_string (data_copy[j])))
+              {
+                data_copy[j] = data_copy[--left];
+                goto next;
+              }
+          check_die ();
+
+        next: ;
+        }
+      check (node == NULL);
+      free (data_copy);
+    }
+}
+
+/* Inserts the CNT strings from 0 to CNT - 1 (inclusive) into a set in the
+   order specified by INSERTIONS, then deletes them in the order specified by
+   DELETIONS, checking the set's contents for correctness after each
+   operation.  */
+static void
+test_insert_delete (const int insertions[],
+                    const int deletions[],
+                    size_t cnt)
+{
+  struct string_set set;
+  size_t i;
+
+  string_set_init (&set);
+  check_string_set (&set, NULL, 0);
+  for (i = 0; i < cnt; i++)
+    {
+      check (string_set_insert (&set, make_string (insertions[i])));
+      check_string_set (&set, insertions, i + 1);
+    }
+  for (i = 0; i < cnt; i++)
+    {
+      check (string_set_delete (&set, make_string (deletions[i])));
+      check_string_set (&set, deletions + i + 1, cnt - i - 1);
+    }
+  string_set_destroy (&set);
+}
+\f
+/* Inserts strings into a set in each possible order, then removes them in each
+   possible order, up to a specified maximum size. */
+static void
+test_insert_any_remove_any (void)
+{
+  const int max_elems = 5;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *insertions, *deletions;
+      unsigned int ins_perm_cnt;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i;
+
+      for (ins_perm_cnt = 0;
+           ins_perm_cnt == 0 || next_permutation (insertions, cnt);
+           ins_perm_cnt++)
+        {
+          unsigned int del_perm_cnt;
+          int i;
+
+          for (i = 0; i < cnt; i++)
+            deletions[i] = i;
+
+          for (del_perm_cnt = 0;
+               del_perm_cnt == 0 || next_permutation (deletions, cnt);
+               del_perm_cnt++)
+            test_insert_delete (insertions, deletions, cnt);
+
+          check (del_perm_cnt == factorial (cnt));
+        }
+      check (ins_perm_cnt == factorial (cnt));
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts strings into a set in each possible order, then removes them in the
+   same order, up to a specified maximum size. */
+static void
+test_insert_any_remove_same (void)
+{
+  const int max_elems = 7;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *values;
+      unsigned int permutation_cnt;
+      int i;
+
+      values = xnmalloc (cnt, sizeof *values);
+      for (i = 0; i < cnt; i++)
+        values[i] = i;
+
+      for (permutation_cnt = 0;
+           permutation_cnt == 0 || next_permutation (values, cnt);
+           permutation_cnt++)
+        test_insert_delete (values, values, cnt);
+      check (permutation_cnt == factorial (cnt));
+
+      free (values);
+    }
+}
+
+/* Inserts strings into a set in each possible order, then
+   removes them in reverse order, up to a specified maximum
+   size. */
+static void
+test_insert_any_remove_reverse (void)
+{
+  const int max_elems = 7;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *insertions, *deletions;
+      unsigned int permutation_cnt;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i;
+
+      for (permutation_cnt = 0;
+           permutation_cnt == 0 || next_permutation (insertions, cnt);
+           permutation_cnt++)
+        {
+          memcpy (deletions, insertions, sizeof *insertions * cnt);
+          reverse (deletions, cnt);
+
+          test_insert_delete (insertions, deletions, cnt);
+        }
+      check (permutation_cnt == factorial (cnt));
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts and removes strings in a set, in random order. */
+static void
+test_random_sequence (void)
+{
+  const int max_elems = 64;
+  const int max_trials = 8;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt += 2)
+    {
+      int *insertions, *deletions;
+      int trial;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i;
+      for (i = 0; i < cnt; i++)
+        deletions[i] = i;
+
+      for (trial = 0; trial < max_trials; trial++)
+        {
+          random_shuffle (insertions, cnt, sizeof *insertions);
+          random_shuffle (deletions, cnt, sizeof *deletions);
+
+          test_insert_delete (insertions, deletions, cnt);
+        }
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts strings into a set in ascending order, then delete in ascending
+   order. */
+static void
+test_insert_ordered (void)
+{
+  const int max_elems = 64;
+  int *values;
+  struct string_set set;
+  int i;
+
+  string_set_init (&set);
+  values = xnmalloc (max_elems, sizeof *values);
+  for (i = 0; i < max_elems; i++)
+    {
+      values[i] = i;
+      string_set_insert_nocopy (&set, xstrdup (make_string (i)));
+      check_string_set (&set, values, i + 1);
+    }
+  for (i = 0; i < max_elems; i++)
+    {
+      string_set_delete (&set, make_string (i));
+      check_string_set (&set, values + i + 1, max_elems - i - 1);
+    }
+  string_set_destroy (&set);
+  free (values);
+}
+
+static void
+test_boolean_ops (void (*function)(struct string_set *a, struct string_set *b,
+                                   unsigned int *a_pat, unsigned int *b_pat))
+{
+  enum { MAX_STRINGS = 7 };
+  unsigned int a_pat, b_pat;
+
+  for (a_pat = 0; a_pat < (1u << MAX_STRINGS); a_pat++)
+    for (b_pat = 0; b_pat < (1u << MAX_STRINGS); b_pat++)
+      {
+        unsigned int new_a_pat = a_pat;
+        unsigned int new_b_pat = b_pat;
+        struct string_set a, b;
+        int a_strings[MAX_STRINGS], b_strings[MAX_STRINGS];
+        size_t i, n_a, n_b;
+
+        string_set_init (&a);
+        string_set_init (&b);
+        for (i = 0; i < MAX_STRINGS; i++)
+          {
+            if (a_pat & (1u << i))
+              string_set_insert (&a, make_string (i));
+            if (b_pat & (1u << i))
+              string_set_insert (&b, make_string (i));
+          }
+
+        function (&a, &b, &new_a_pat, &new_b_pat);
+
+        n_a = n_b = 0;
+        for (i = 0; i < MAX_STRINGS; i++)
+          {
+            if (new_a_pat & (1u << i))
+              a_strings[n_a++] = i;
+            if (new_b_pat & (1u << i))
+              b_strings[n_b++] = i;
+          }
+        check_string_set (&a, a_strings, n_a);
+        check_string_set (&b, b_strings, n_b);
+        string_set_destroy (&a);
+        string_set_destroy (&b);
+      }
+}
+
+static void
+union_cb (struct string_set *a, struct string_set *b,
+          unsigned int *a_pat, unsigned int *b_pat)
+{
+  string_set_union (a, b);
+  *a_pat |= *b_pat;
+}
+
+static void
+test_union (void)
+{
+  test_boolean_ops (union_cb);
+}
+
+static void
+union_and_intersection_cb (struct string_set *a, struct string_set *b,
+                           unsigned int *a_pat, unsigned int *b_pat)
+{
+  unsigned int orig_a_pat = *a_pat;
+  unsigned int orig_b_pat = *b_pat;
+
+  string_set_union_and_intersection (a, b);
+  *a_pat = orig_a_pat | orig_b_pat;
+  *b_pat = orig_a_pat & orig_b_pat;
+}
+
+static void
+test_union_and_intersection (void)
+{
+  test_boolean_ops (union_and_intersection_cb);
+}
+
+static void
+intersect_cb (struct string_set *a, struct string_set *b,
+              unsigned int *a_pat, unsigned int *b_pat)
+{
+  string_set_intersect (a, b);
+  *a_pat &= *b_pat;
+}
+
+static void
+test_intersect (void)
+{
+  test_boolean_ops (intersect_cb);
+}
+
+static void
+subtract_cb (struct string_set *a, struct string_set *b,
+              unsigned int *a_pat, unsigned int *b_pat)
+{
+  string_set_subtract (a, b);
+  *a_pat &= ~*b_pat;
+}
+
+static void
+test_subtract (void)
+{
+  test_boolean_ops (subtract_cb);
+}
+
+static void
+swap_cb (struct string_set *a, struct string_set *b,
+         unsigned int *a_pat, unsigned int *b_pat)
+{
+  unsigned int tmp;
+  string_set_swap (a, b);
+  tmp = *a_pat;
+  *a_pat = *b_pat;
+  *b_pat = tmp;
+}
+
+static void
+test_swap (void)
+{
+  test_boolean_ops (swap_cb);
+}
+
+static void
+clear_cb (struct string_set *a, struct string_set *b UNUSED,
+         unsigned int *a_pat, unsigned int *b_pat UNUSED)
+{
+  string_set_clear (a);
+  *a_pat = 0;
+}
+
+static void
+test_clear (void)
+{
+  test_boolean_ops (clear_cb);
+}
+
+static void
+clone_cb (struct string_set *a, struct string_set *b,
+         unsigned int *a_pat, unsigned int *b_pat)
+{
+  string_set_destroy (a);
+  string_set_clone (a, b);
+  *a_pat = *b_pat;
+}
+
+static void
+test_clone (void)
+{
+  test_boolean_ops (clone_cb);
+}
+
+static void
+test_destroy_null (void)
+{
+  string_set_destroy (NULL);
+}
+\f
+/* Main program. */
+
+/* Runs TEST_FUNCTION and prints a message about NAME. */
+static void
+run_test (void (*test_function) (void), const char *name)
+{
+  test_name = name;
+  putchar ('.');
+  fflush (stdout);
+  test_function ();
+}
+
+int
+main (void)
+{
+  run_test (test_insert_any_remove_any, "insert any order, delete any order");
+  run_test (test_insert_any_remove_same,
+            "insert any order, delete same order");
+  run_test (test_insert_any_remove_reverse,
+            "insert any order, delete reverse order");
+  run_test (test_random_sequence, "insert and delete in random sequence");
+  run_test (test_insert_ordered, "insert in ascending order");
+  run_test (test_union, "union");
+  run_test (test_union_and_intersection, "union and intersection");
+  run_test (test_intersect, "intersect");
+  run_test (test_subtract, "subtract");
+  run_test (test_swap, "swap");
+  run_test (test_clear, "clear");
+  run_test (test_clone, "clone");
+  run_test (test_destroy_null, "destroying null table");
+
+  putchar ('\n');
+
+  free_strings ();
+
+  return 0;
+}
diff --git a/tests/libpspp/stringi-map-test.c b/tests/libpspp/stringi-map-test.c
new file mode 100644 (file)
index 0000000..626dfac
--- /dev/null
@@ -0,0 +1,959 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+/* This is a test program for the stringi_map_* routines defined in
+   stringi-map.c.  This test program aims to be as comprehensive as possible.
+   "gcov -a -b" should report almost complete coverage of lines, blocks and
+   branches in stringi-map.c, except that one branch caused by hash collision
+   is not exercised because our hash function has so few collisions.  "valgrind
+   --leak-check=yes --show-reachable=yes" should give a clean report. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "libpspp/stringi-map.h"
+
+#include <assert.h>
+#include <ctype.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libpspp/hash-functions.h"
+#include "libpspp/compiler.h"
+#include "libpspp/str.h"
+#include "libpspp/string-set.h"
+#include "libpspp/stringi-set.h"
+\f
+/* Currently running test. */
+static const char *test_name;
+
+/* Exit with a failure code.
+   (Place a breakpoint on this function while debugging.) */
+static void
+check_die (void)
+{
+  exit (EXIT_FAILURE);
+}
+
+/* If OK is not true, prints a message about failure on the
+   current source file and the given LINE and terminates. */
+static void
+check_func (bool ok, int line)
+{
+  if (!ok)
+    {
+      printf ("Check failed in %s test at %s, line %d\n",
+              test_name, __FILE__, line);
+      check_die ();
+    }
+}
+
+/* Verifies that EXPR evaluates to true.
+   If not, prints a message citing the calling line number and
+   terminates. */
+#define check(EXPR) check_func ((EXPR), __LINE__)
+
+/* Prints a message about memory exhaustion and exits with a
+   failure code. */
+static void
+xalloc_die (void)
+{
+  printf ("virtual memory exhausted\n");
+  exit (EXIT_FAILURE);
+}
+
+static void *xmalloc (size_t n) MALLOC_LIKE;
+static void *xnmalloc (size_t n, size_t m) MALLOC_LIKE;
+static void *xmemdup (const void *p, size_t n) MALLOC_LIKE;
+
+/* Allocates and returns N bytes of memory. */
+static void *
+xmalloc (size_t n)
+{
+  if (n != 0)
+    {
+      void *p = malloc (n);
+      if (p == NULL)
+        xalloc_die ();
+
+      return p;
+    }
+  else
+    return NULL;
+}
+
+static void *
+xmemdup (const void *p, size_t n)
+{
+  void *q = xmalloc (n);
+  memcpy (q, p, n);
+  return q;
+}
+
+/* Clone STRING.  */
+static char *
+xstrdup (const char *string)
+{
+  return xmemdup (string, strlen (string) + 1);
+}
+
+/* Allocates and returns N * M bytes of memory. */
+static void *
+xnmalloc (size_t n, size_t m)
+{
+  if ((size_t) -1 / m <= n)
+    xalloc_die ();
+  return xmalloc (n * m);
+}
+\f
+/* Support routines. */
+
+enum {
+  IDX_BITS = 10,
+  MAX_IDX = 1 << IDX_BITS,
+  KEY_MASK = (MAX_IDX - 1),
+  KEY_SHIFT = 0,
+  VALUE_MASK = (MAX_IDX - 1) << IDX_BITS,
+  VALUE_SHIFT = IDX_BITS
+};
+
+static char *string_table[MAX_IDX];
+
+static const char *
+get_string (int idx)
+{
+  char **s;
+
+  assert (idx >= 0 && idx < MAX_IDX);
+  s = &string_table[idx];
+  if (*s == NULL)
+    {
+      *s = xmalloc (16);
+      str_format_26adic (idx + 1, *s, 16);
+    }
+  return *s;
+}
+
+static void
+free_strings (void)
+{
+  int i;
+
+  for (i = 0; i < MAX_IDX; i++)
+    free (string_table[i]);
+}
+
+static const char *
+make_key (int value)
+{
+  return get_string ((value & KEY_MASK) >> KEY_SHIFT);
+}
+
+static const char *
+make_value (int value)
+{
+  return get_string ((value & VALUE_MASK) >> VALUE_SHIFT);
+}
+
+static int
+random_value (unsigned int seed, int basis)
+{
+  return hash_int (seed, basis) & VALUE_MASK;
+}
+
+/* Swaps *A and *B. */
+static void
+swap (int *a, int *b)
+{
+  int t = *a;
+  *a = *b;
+  *b = t;
+}
+
+/* Reverses the order of the CNT integers starting at VALUES. */
+static void
+reverse (int *values, size_t cnt)
+{
+  size_t i = 0;
+  size_t j = cnt;
+
+  while (j > i)
+    swap (&values[i++], &values[--j]);
+}
+
+/* Arranges the CNT elements in VALUES into the lexicographically next greater
+   permutation.  Returns true if successful.  If VALUES is already the
+   lexicographically greatest permutation of its elements (i.e. ordered from
+   greatest to smallest), arranges them into the lexicographically least
+   permutation (i.e. ordered from smallest to largest) and returns false.
+
+   Comparisons among elements of VALUES consider only the bits in KEY_MASK. */
+static bool
+next_permutation (int *values, size_t cnt)
+{
+  if (cnt > 0)
+    {
+      size_t i = cnt - 1;
+      while (i != 0)
+        {
+          i--;
+          if ((values[i] & KEY_MASK) < (values[i + 1] & KEY_MASK))
+            {
+              size_t j;
+              for (j = cnt - 1;
+                   (values[i] & KEY_MASK) >= (values[j] & KEY_MASK);
+                   j--)
+                continue;
+              swap (values + i, values + j);
+              reverse (values + (i + 1), cnt - (i + 1));
+              return true;
+            }
+        }
+
+      reverse (values, cnt);
+    }
+
+  return false;
+}
+
+/* Returns N!. */
+static unsigned int
+factorial (unsigned int n)
+{
+  unsigned int value = 1;
+  while (n > 1)
+    value *= n--;
+  return value;
+}
+
+/* Randomly shuffles the CNT elements in ARRAY, each of which is
+   SIZE bytes in size. */
+static void
+random_shuffle (void *array_, size_t cnt, size_t size)
+{
+  char *array = array_;
+  char *tmp = xmalloc (size);
+  size_t i;
+
+  for (i = 0; i < cnt; i++)
+    {
+      size_t j = rand () % (cnt - i) + i;
+      if (i != j)
+        {
+          memcpy (tmp, array + j * size, size);
+          memcpy (array + j * size, array + i * size, size);
+          memcpy (array + i * size, tmp, size);
+        }
+    }
+
+  free (tmp);
+}
+
+/* Checks that MAP has (KEY, VALUE) as a pair. */
+static void
+check_map_contains (struct stringi_map *map,
+                    const char *key, const char *value)
+{
+  struct stringi_map_node *node;
+  const char *found_value;
+
+  check (stringi_map_contains (map, key));
+
+  node = stringi_map_find_node (map, key);
+  check (node != NULL);
+  check (!strcasecmp (key, stringi_map_node_get_key (node)));
+  check (!strcmp (value, stringi_map_node_get_value (node)));
+
+  check (node == stringi_map_insert (map, key, "012"));
+  check (!strcmp (value, stringi_map_node_get_value (node)));
+
+  check (node == stringi_map_insert_nocopy (map, xstrdup (key),
+                                            xstrdup ("345")));
+  check (!strcmp (value, stringi_map_node_get_value (node)));
+
+  found_value = stringi_map_find (map, key);
+  check (found_value == stringi_map_node_get_value (node));
+  check (found_value != NULL);
+  check (!strcmp (found_value, value));
+}
+
+/* Checks that MAP contains the CNT strings in DATA, that its structure is
+   correct, and that certain operations on MAP produce the expected results. */
+static void
+check_stringi_map (struct stringi_map *map, const int data[], size_t cnt)
+{
+  size_t i;
+
+  check (stringi_map_is_empty (map) == (cnt == 0));
+  check (stringi_map_count (map) == cnt);
+
+  for (i = 0; i < cnt; i++)
+    {
+      const char *key = make_key (data[i]);
+      const char *value = make_value (data[i]);
+      char copy[16];
+      char *p;
+
+      check_map_contains (map, key, value);
+
+      strcpy (copy, key);
+      for (p = copy; *p != '\0'; p++)
+        {
+          assert (isupper (*p));
+          *p = tolower (*p);
+          check_map_contains (map, copy, value);
+        }
+    }
+
+  check (!stringi_map_contains (map, "xxx"));
+  check (stringi_map_find (map, "0") == NULL);
+  check (stringi_map_find_node (map, "") == NULL);
+  check (!stringi_map_delete (map, "xyz"));
+
+  if (cnt == 0)
+    check (stringi_map_first (map) == NULL);
+  else
+    {
+      const struct stringi_map_node *node;
+      int *data_copy;
+      int left;
+
+      data_copy = xmemdup (data, cnt * sizeof *data);
+      left = cnt;
+      for (node = stringi_map_first (map), i = 0; i < cnt;
+           node = stringi_map_next (map, node), i++)
+        {
+          const char *key = stringi_map_node_get_key (node);
+          const char *value = stringi_map_node_get_value (node);
+          size_t j;
+
+          for (j = 0; j < left; j++)
+            if (!strcmp (key, make_key (data_copy[j]))
+                || !strcmp (value, make_value (data_copy[j])))
+              {
+                data_copy[j] = data_copy[--left];
+                goto next;
+              }
+          check_die ();
+
+        next: ;
+        }
+      check (node == NULL);
+      free (data_copy);
+    }
+}
+
+/* Inserts the CNT strings from 0 to CNT - 1 (inclusive) into a map in the
+   order specified by INSERTIONS, then deletes them in the order specified by
+   DELETIONS, checking the map's contents for correctness after each
+   operation.  */
+static void
+test_insert_delete (const int insertions[],
+                    const int deletions[],
+                    size_t cnt)
+{
+  struct stringi_map map;
+  size_t i;
+
+  stringi_map_init (&map);
+  check_stringi_map (&map, NULL, 0);
+  for (i = 0; i < cnt; i++)
+    {
+      check (stringi_map_insert (&map, make_key (insertions[i]),
+                                make_value (insertions[i])));
+      check_stringi_map (&map, insertions, i + 1);
+    }
+  for (i = 0; i < cnt; i++)
+    {
+      check (stringi_map_delete (&map, make_key (deletions[i])));
+      check_stringi_map (&map, deletions + i + 1, cnt - i - 1);
+    }
+  stringi_map_destroy (&map);
+}
+\f
+/* Inserts strings into a map in each possible order, then removes them in each
+   possible order, up to a specified maximum size. */
+static void
+test_insert_any_remove_any (void)
+{
+  const int basis = 0;
+  const int max_elems = 5;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *insertions, *deletions;
+      unsigned int ins_perm_cnt;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i | random_value (i, basis);
+
+      for (ins_perm_cnt = 0;
+           ins_perm_cnt == 0 || next_permutation (insertions, cnt);
+           ins_perm_cnt++)
+        {
+          unsigned int del_perm_cnt;
+          int i;
+
+          for (i = 0; i < cnt; i++)
+            deletions[i] = i | random_value (i, basis);
+
+          for (del_perm_cnt = 0;
+               del_perm_cnt == 0 || next_permutation (deletions, cnt);
+               del_perm_cnt++)
+            test_insert_delete (insertions, deletions, cnt);
+
+          check (del_perm_cnt == factorial (cnt));
+        }
+      check (ins_perm_cnt == factorial (cnt));
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts strings into a map in each possible order, then removes them in the
+   same order, up to a specified maximum size. */
+static void
+test_insert_any_remove_same (void)
+{
+  const int max_elems = 7;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *values;
+      unsigned int permutation_cnt;
+      int i;
+
+      values = xnmalloc (cnt, sizeof *values);
+      for (i = 0; i < cnt; i++)
+        values[i] = i | random_value (i, 1);
+
+      for (permutation_cnt = 0;
+           permutation_cnt == 0 || next_permutation (values, cnt);
+           permutation_cnt++)
+        test_insert_delete (values, values, cnt);
+      check (permutation_cnt == factorial (cnt));
+
+      free (values);
+    }
+}
+
+/* Inserts strings into a map in each possible order, then
+   removes them in reverse order, up to a specified maximum
+   size. */
+static void
+test_insert_any_remove_reverse (void)
+{
+  const int max_elems = 7;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *insertions, *deletions;
+      unsigned int permutation_cnt;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i | random_value (i, 2);
+
+      for (permutation_cnt = 0;
+           permutation_cnt == 0 || next_permutation (insertions, cnt);
+           permutation_cnt++)
+        {
+          memcpy (deletions, insertions, sizeof *insertions * cnt);
+          reverse (deletions, cnt);
+
+          test_insert_delete (insertions, deletions, cnt);
+        }
+      check (permutation_cnt == factorial (cnt));
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts and removes strings in a map, in random order. */
+static void
+test_random_sequence (void)
+{
+  const int basis = 3;
+  const int max_elems = 64;
+  const int max_trials = 8;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt += 2)
+    {
+      int *insertions, *deletions;
+      int trial;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i | random_value (i, basis);
+      for (i = 0; i < cnt; i++)
+        deletions[i] = i | random_value (i, basis);
+
+      for (trial = 0; trial < max_trials; trial++)
+        {
+          random_shuffle (insertions, cnt, sizeof *insertions);
+          random_shuffle (deletions, cnt, sizeof *deletions);
+
+          test_insert_delete (insertions, deletions, cnt);
+        }
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts strings into a map in ascending order, then delete in ascending
+   order. */
+static void
+test_insert_ordered (void)
+{
+  const int max_elems = 64;
+  int *values;
+  struct stringi_map map;
+  int i;
+
+  stringi_map_init (&map);
+  values = xnmalloc (max_elems, sizeof *values);
+  for (i = 0; i < max_elems; i++)
+    {
+      values[i] = i | random_value (i, 4);
+      stringi_map_insert_nocopy (&map, xstrdup (make_key (values[i])),
+                                xstrdup (make_value (values[i])));
+      check_stringi_map (&map, values, i + 1);
+    }
+  for (i = 0; i < max_elems; i++)
+    {
+      stringi_map_delete (&map, make_key (i));
+      check_stringi_map (&map, values + i + 1, max_elems - i - 1);
+    }
+  stringi_map_destroy (&map);
+  free (values);
+}
+
+/* Inserts and replaces strings in a map, in random order. */
+static void
+test_replace (void)
+{
+  const int basis = 15;
+  enum { MAX_ELEMS = 16 };
+  const int max_trials = 8;
+  int cnt;
+
+  for (cnt = 0; cnt <= MAX_ELEMS; cnt++)
+    {
+      int insertions[MAX_ELEMS];
+      int trial;
+      int i;
+
+      for (i = 0; i < cnt; i++)
+        insertions[i] = (i / 2) | random_value (i, basis);
+
+      for (trial = 0; trial < max_trials; trial++)
+        {
+          struct stringi_map map;
+          int data[MAX_ELEMS];
+          int n_data;
+
+          /* Insert with replacement in random order. */
+          n_data = 0;
+          stringi_map_init (&map);
+          random_shuffle (insertions, cnt, sizeof *insertions);
+          for (i = 0; i < cnt; i++)
+            {
+              const char *key = make_key (insertions[i]);
+              const char *value = make_value (insertions[i]);
+              int j;
+
+              for (j = 0; j < n_data; j++)
+                if ((data[j] & KEY_MASK) == (insertions[i] & KEY_MASK))
+                  {
+                    data[j] = insertions[i];
+                    goto found;
+                  }
+              data[n_data++] = insertions[i];
+            found:
+
+              if (i % 2)
+                stringi_map_replace (&map, key, value);
+              else
+                stringi_map_replace_nocopy (&map,
+                                           xstrdup (key), xstrdup (value));
+              check_stringi_map (&map, data, n_data);
+            }
+
+          /* Delete in original order. */
+          for (i = 0; i < cnt; i++)
+            {
+              const char *expected_value;
+              char *value;
+              int j;
+
+              expected_value = NULL;
+              for (j = 0; j < n_data; j++)
+                if ((data[j] & KEY_MASK) == (insertions[i] & KEY_MASK))
+                  {
+                    expected_value = make_value (data[j]);
+                    data[j] = data[--n_data];
+                    break;
+                  }
+
+              value = stringi_map_find_and_delete (&map,
+                                                  make_key (insertions[i]));
+              check ((value != NULL) == (expected_value != NULL));
+              check (value == NULL || !strcmp (value, expected_value));
+              free (value);
+            }
+          assert (stringi_map_is_empty (&map));
+
+          stringi_map_destroy (&map);
+        }
+    }
+}
+
+static void
+make_patterned_map (struct stringi_map *map, unsigned int pattern, int basis,
+                    int insertions[], int *np)
+{
+  int n;
+  int i;
+
+  stringi_map_init (map);
+
+  n = 0;
+  for (i = 0; pattern != 0; i++)
+    if (pattern & (1u << i))
+      {
+        pattern &= pattern - 1;
+        insertions[n] = i | random_value (i, basis);
+        check (stringi_map_insert (map, make_key (insertions[n]),
+                                  make_value (insertions[n])));
+        n++;
+      }
+  check_stringi_map (map, insertions, n);
+
+  *np = n;
+}
+
+static void
+for_each_map (void (*cb)(struct stringi_map *, int data[], int n),
+              int basis)
+{
+  enum { MAX_ELEMS = 5 };
+  unsigned int pattern;
+
+  for (pattern = 0; pattern < (1u << MAX_ELEMS); pattern++)
+    {
+      int data[MAX_ELEMS];
+      struct stringi_map map;
+      int n;
+
+      make_patterned_map (&map, pattern, basis, data, &n);
+      (*cb) (&map, data, n);
+      stringi_map_destroy (&map);
+    }
+}
+
+static void
+for_each_pair_of_maps (
+  void (*cb)(struct stringi_map *a, int a_data[], int n_a,
+             struct stringi_map *b, int b_data[], int n_b),
+  int a_basis, int b_basis)
+{
+  enum { MAX_ELEMS = 5 };
+  unsigned int a_pattern, b_pattern;
+
+  for (a_pattern = 0; a_pattern < (1u << MAX_ELEMS); a_pattern++)
+    for (b_pattern = 0; b_pattern < (1u << MAX_ELEMS); b_pattern++)
+      {
+        int a_data[MAX_ELEMS], b_data[MAX_ELEMS];
+        struct stringi_map a_map, b_map;
+        int n_a, n_b;
+
+        make_patterned_map (&a_map, a_pattern, a_basis, a_data, &n_a);
+        make_patterned_map (&b_map, b_pattern, b_basis, b_data, &n_b);
+        (*cb) (&a_map, a_data, n_a, &b_map, b_data, n_b);
+        stringi_map_destroy (&a_map);
+        stringi_map_destroy (&b_map);
+      }
+}
+
+static void
+clear_cb (struct stringi_map *map, int data[] UNUSED, int n UNUSED)
+{
+  stringi_map_clear (map);
+  check_stringi_map (map, NULL, 0);
+}
+
+static void
+test_clear (void)
+{
+  for_each_map (clear_cb, 5);
+}
+
+static void
+clone_cb (struct stringi_map *map, int data[], int n)
+{
+  struct stringi_map clone;
+
+  stringi_map_clone (&clone, map);
+  check_stringi_map (&clone, data, n);
+  stringi_map_destroy (&clone);
+}
+
+static void
+test_clone (void)
+{
+  for_each_map (clone_cb, 6);
+}
+
+static void
+node_swap_value_cb (struct stringi_map *map, int data[], int n)
+{
+  int i;
+
+  for (i = 0; i < n; i++)
+    {
+      const char *value = make_value (data[i]);
+      struct stringi_map_node *node;
+      char *old_value;
+
+      node = stringi_map_find_node (map, make_key (data[i]));
+      check (node != NULL);
+      check (!strcmp (stringi_map_node_get_value (node), value));
+      data[i] = (data[i] & KEY_MASK) | random_value (i, 15);
+      old_value = stringi_map_node_swap_value (node, make_value (data[i]));
+      check (old_value != NULL);
+      check (!strcmp (value, old_value));
+      free (old_value);
+    }
+}
+
+static void
+test_node_swap_value (void)
+{
+  for_each_map (node_swap_value_cb, 14);
+}
+
+static void
+swap_cb (struct stringi_map *a, int a_data[], int n_a,
+         struct stringi_map *b, int b_data[], int n_b)
+{
+  stringi_map_swap (a, b);
+  check_stringi_map (a, b_data, n_b);
+  check_stringi_map (b, a_data, n_a);
+}
+
+static void
+test_swap (void)
+{
+  for_each_pair_of_maps (swap_cb, 7, 8);
+}
+
+static void
+insert_map_cb (struct stringi_map *a, int a_data[], int n_a,
+               struct stringi_map *b, int b_data[], int n_b)
+{
+  int i, j;
+
+  stringi_map_insert_map (a, b);
+
+  for (i = 0; i < n_b; i++)
+    {
+      for (j = 0; j < n_a; j++)
+        if ((b_data[i] & KEY_MASK) == (a_data[j] & KEY_MASK))
+          goto found;
+      a_data[n_a++] = b_data[i];
+    found:;
+    }
+  check_stringi_map (a, a_data, n_a);
+  check_stringi_map (b, b_data, n_b);
+}
+
+static void
+test_insert_map (void)
+{
+  for_each_pair_of_maps (insert_map_cb, 91, 10);
+}
+
+static void
+replace_map_cb (struct stringi_map *a, int a_data[], int n_a,
+               struct stringi_map *b, int b_data[], int n_b)
+{
+  int i, j;
+
+  stringi_map_replace_map (a, b);
+
+  for (i = 0; i < n_b; i++)
+    {
+      for (j = 0; j < n_a; j++)
+        if ((b_data[i] & KEY_MASK) == (a_data[j] & KEY_MASK))
+          {
+            a_data[j] = (a_data[j] & KEY_MASK) | (b_data[i] & VALUE_MASK);
+            goto found;
+          }
+      a_data[n_a++] = b_data[i];
+    found:;
+    }
+  check_stringi_map (a, a_data, n_a);
+  check_stringi_map (b, b_data, n_b);
+}
+
+static void
+test_replace_map (void)
+{
+  for_each_pair_of_maps (replace_map_cb, 11, 12);
+}
+
+static void
+check_iset (struct stringi_set *set, const int *data, int n_data,
+           int mask, int shift)
+{
+  int *unique;
+  int n_unique;
+  int i;
+
+  n_unique = 0;
+  unique = xmalloc (n_data * sizeof *unique);
+  for (i = 0; i < n_data; i++)
+    {
+      int idx = (data[i] & mask) >> shift;
+      int j;
+
+      for (j = 0; j < n_unique; j++)
+        if (unique[j] == idx)
+          goto found;
+      unique[n_unique++] = idx;
+    found:;
+    }
+
+  check (stringi_set_count (set) == n_unique);
+  for (i = 0; i < n_unique; i++)
+    check (stringi_set_contains (set, get_string (unique[i])));
+  stringi_set_destroy (set);
+  free (unique);
+}
+
+static void
+check_set (struct string_set *set, const int *data, int n_data,
+           int mask, int shift)
+{
+  int *unique;
+  int n_unique;
+  int i;
+
+  n_unique = 0;
+  unique = xmalloc (n_data * sizeof *unique);
+  for (i = 0; i < n_data; i++)
+    {
+      int idx = (data[i] & mask) >> shift;
+      int j;
+
+      for (j = 0; j < n_unique; j++)
+        if (unique[j] == idx)
+          goto found;
+      unique[n_unique++] = idx;
+    found:;
+    }
+
+  check (string_set_count (set) == n_unique);
+  for (i = 0; i < n_unique; i++)
+    check (string_set_contains (set, get_string (unique[i])));
+  string_set_destroy (set);
+  free (unique);
+}
+
+static void
+get_keys_and_values_cb (struct stringi_map *map, int data[], int n)
+{
+  struct stringi_set keys;
+  struct string_set values;
+
+  stringi_set_init (&keys);
+  string_set_init (&values);
+  stringi_map_get_keys (map, &keys);
+  stringi_map_get_values (map, &values);
+  check_iset (&keys, data, n, KEY_MASK, KEY_SHIFT);
+  check_set (&values, data, n, VALUE_MASK, VALUE_SHIFT);
+}
+
+static void
+test_get_keys_and_values (void)
+{
+  for_each_map (get_keys_and_values_cb, 13);
+}
+
+static void
+test_destroy_null (void)
+{
+  stringi_map_destroy (NULL);
+}
+\f
+/* Main program. */
+
+/* Runs TEST_FUNCTION and prints a message about NAME. */
+static void
+run_test (void (*test_function) (void), const char *name)
+{
+  test_name = name;
+  putchar ('.');
+  fflush (stdout);
+  test_function ();
+}
+
+int
+main (void)
+{
+  run_test (test_insert_any_remove_any, "insert any order, delete any order");
+  run_test (test_insert_any_remove_same,
+            "insert any order, delete same order");
+  run_test (test_insert_any_remove_reverse,
+            "insert any order, delete reverse order");
+  run_test (test_random_sequence, "insert and delete in random sequence");
+  run_test (test_replace, "insert and replace in random sequence");
+  run_test (test_insert_ordered, "insert in ascending order");
+  run_test (test_clear, "clear");
+  run_test (test_clone, "clone");
+  run_test (test_swap, "swap");
+  run_test (test_node_swap_value, "node_swap_value");
+  run_test (test_insert_map, "insert_map");
+  run_test (test_replace_map, "replace_map");
+  run_test (test_get_keys_and_values, "get keys and values");
+  run_test (test_destroy_null, "destroying null table");
+
+  putchar ('\n');
+
+  free_strings ();
+
+  return 0;
+}
diff --git a/tests/libpspp/stringi-set-test.c b/tests/libpspp/stringi-set-test.c
new file mode 100644 (file)
index 0000000..25f52c8
--- /dev/null
@@ -0,0 +1,719 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+/* This is a test program for the stringi_set_* routines defined in
+   stringi-set.c.  This test program aims to be as comprehensive as possible.
+   "gcov -a -b" should report almost complete coverage of lines, blocks and
+   branches in stringi-set.c, except that one branch caused by hash collision
+   is not exercised because our hash function has so few collisions.  "valgrind
+   --leak-check=yes --show-reachable=yes" should give a clean report. */
+
+#include <config.h>
+
+#include "libpspp/stringi-set.h"
+
+#include <assert.h>
+#include <ctype.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libpspp/compiler.h"
+#include "libpspp/str.h"
+\f
+/* Currently running test. */
+static const char *test_name;
+
+/* Exit with a failure code.
+   (Place a breakpoint on this function while debugging.) */
+static void
+check_die (void)
+{
+  exit (EXIT_FAILURE);
+}
+
+/* If OK is not true, prints a message about failure on the
+   current source file and the given LINE and terminates. */
+static void
+check_func (bool ok, int line)
+{
+  if (!ok)
+    {
+      printf ("Check failed in %s test at %s, line %d\n",
+              test_name, __FILE__, line);
+      check_die ();
+    }
+}
+
+/* Verifies that EXPR evaluates to true.
+   If not, prints a message citing the calling line number and
+   terminates. */
+#define check(EXPR) check_func ((EXPR), __LINE__)
+
+/* Prints a message about memory exhaustion and exits with a
+   failure code. */
+static void
+xalloc_die (void)
+{
+  printf ("virtual memory exhausted\n");
+  exit (EXIT_FAILURE);
+}
+
+static void *xmalloc (size_t n) MALLOC_LIKE;
+static void *xnmalloc (size_t n, size_t m) MALLOC_LIKE;
+static void *xmemdup (const void *p, size_t n) MALLOC_LIKE;
+
+/* Allocates and returns N bytes of memory. */
+static void *
+xmalloc (size_t n)
+{
+  if (n != 0)
+    {
+      void *p = malloc (n);
+      if (p == NULL)
+        xalloc_die ();
+
+      return p;
+    }
+  else
+    return NULL;
+}
+
+static void *
+xmemdup (const void *p, size_t n)
+{
+  void *q = xmalloc (n);
+  memcpy (q, p, n);
+  return q;
+}
+
+/* Clone STRING.  */
+static char *
+xstrdup (const char *string)
+{
+  return xmemdup (string, strlen (string) + 1);
+}
+
+/* Allocates and returns N * M bytes of memory. */
+static void *
+xnmalloc (size_t n, size_t m)
+{
+  if ((size_t) -1 / m <= n)
+    xalloc_die ();
+  return xmalloc (n * m);
+}
+\f
+/* Support routines. */
+
+enum { MAX_VALUE = 1024 };
+
+static char *string_table[MAX_VALUE];
+
+static const char *
+make_string (int value)
+{
+  char **s;
+
+  assert (value >= 0 && value < MAX_VALUE);
+  s = &string_table[value];
+  if (*s == NULL)
+    {
+      *s = xmalloc (16);
+      str_format_26adic (value + 1, *s, 16);
+    }
+  return *s;
+}
+
+static void
+free_strings (void)
+{
+  int i;
+
+  for (i = 0; i < MAX_VALUE; i++)
+    free (string_table[i]);
+}
+
+/* Swaps *A and *B. */
+static void
+swap (int *a, int *b)
+{
+  int t = *a;
+  *a = *b;
+  *b = t;
+}
+
+/* Reverses the order of the CNT integers starting at VALUES. */
+static void
+reverse (int *values, size_t cnt)
+{
+  size_t i = 0;
+  size_t j = cnt;
+
+  while (j > i)
+    swap (&values[i++], &values[--j]);
+}
+
+/* Arranges the CNT elements in VALUES into the lexicographically
+   next greater permutation.  Returns true if successful.
+   If VALUES is already the lexicographically greatest
+   permutation of its elements (i.e. ordered from greatest to
+   smallest), arranges them into the lexicographically least
+   permutation (i.e. ordered from smallest to largest) and
+   returns false. */
+static bool
+next_permutation (int *values, size_t cnt)
+{
+  if (cnt > 0)
+    {
+      size_t i = cnt - 1;
+      while (i != 0)
+        {
+          i--;
+          if (values[i] < values[i + 1])
+            {
+              size_t j;
+              for (j = cnt - 1; values[i] >= values[j]; j--)
+                continue;
+              swap (values + i, values + j);
+              reverse (values + (i + 1), cnt - (i + 1));
+              return true;
+            }
+        }
+
+      reverse (values, cnt);
+    }
+
+  return false;
+}
+
+/* Returns N!. */
+static unsigned int
+factorial (unsigned int n)
+{
+  unsigned int value = 1;
+  while (n > 1)
+    value *= n--;
+  return value;
+}
+
+/* Randomly shuffles the CNT elements in ARRAY, each of which is
+   SIZE bytes in size. */
+static void
+random_shuffle (void *array_, size_t cnt, size_t size)
+{
+  char *array = array_;
+  char *tmp = xmalloc (size);
+  size_t i;
+
+  for (i = 0; i < cnt; i++)
+    {
+      size_t j = rand () % (cnt - i) + i;
+      if (i != j)
+        {
+          memcpy (tmp, array + j * size, size);
+          memcpy (array + j * size, array + i * size, size);
+          memcpy (array + i * size, tmp, size);
+        }
+    }
+
+  free (tmp);
+}
+
+/* Checks that SET contains STRING. */
+static void
+check_set_contains (struct stringi_set *set, const char *string)
+{
+  struct stringi_set_node *node;
+
+  check (stringi_set_contains (set, string));
+  check (!stringi_set_insert (set, string));
+  check (!stringi_set_insert_nocopy (set, xstrdup (string)));
+
+  node = stringi_set_find_node (set, string);
+  check (node != NULL);
+  check (!strcasecmp (string, stringi_set_node_get_string (node)));
+}
+
+/* Checks that SET contains the CNT strings in DATA, that its structure is
+   correct, and that certain operations on SET produce the expected results. */
+static void
+check_stringi_set (struct stringi_set *set, const int data[], size_t cnt)
+{
+  size_t i;
+
+  check (stringi_set_is_empty (set) == (cnt == 0));
+  check (stringi_set_count (set) == cnt);
+
+  for (i = 0; i < cnt; i++)
+    {
+      const char *s;
+      char copy[16];
+      char *p;
+
+      s = make_string (data[i]);
+      check_set_contains (set, s);
+
+      strcpy (copy, s);
+      for (p = copy; *p != '\0'; p++)
+        {
+          assert (isupper (*p));
+          *p = tolower (*p);
+          check_set_contains (set, copy);
+        }
+    }
+
+  check (!stringi_set_contains (set, "xxx"));
+  check (stringi_set_find_node (set, "") == NULL);
+
+  if (cnt == 0)
+    {
+      check (stringi_set_first (set) == NULL);
+      free (stringi_set_get_array (set));
+    }
+  else
+    {
+      const struct stringi_set_node *node;
+      char **array;
+      int *data_copy;
+      int left;
+
+      array = stringi_set_get_array (set);
+      data_copy = xmemdup (data, cnt * sizeof *data);
+      left = cnt;
+      for (node = stringi_set_first (set), i = 0; i < cnt;
+           node = stringi_set_next (set, node), i++)
+        {
+          const char *s = stringi_set_node_get_string (node);
+          size_t j;
+
+          check (s == array[i]);
+
+          for (j = 0; j < left; j++)
+            if (!strcasecmp (s, make_string (data_copy[j])))
+              {
+                data_copy[j] = data_copy[--left];
+                goto next;
+              }
+          check_die ();
+
+        next: ;
+        }
+      check (node == NULL);
+      free (data_copy);
+      free (array);
+
+      array = stringi_set_get_sorted_array (set);
+      for (i = 0; i < cnt; i++)
+        {
+          if (i > 0)
+            check (strcasecmp (array[i - 1], array[i]) < 0);
+          check (stringi_set_contains (set, array[i]));
+        }
+      free (array);
+    }
+}
+
+/* Inserts the CNT strings from 0 to CNT - 1 (inclusive) into a set in the
+   order specified by INSERTIONS, then deletes them in the order specified by
+   DELETIONS, checking the set's contents for correctness after each
+   operation.  */
+static void
+test_insert_delete (const int insertions[],
+                    const int deletions[],
+                    size_t cnt)
+{
+  struct stringi_set set;
+  size_t i;
+
+  stringi_set_init (&set);
+  check_stringi_set (&set, NULL, 0);
+  for (i = 0; i < cnt; i++)
+    {
+      check (stringi_set_insert (&set, make_string (insertions[i])));
+      check_stringi_set (&set, insertions, i + 1);
+    }
+  for (i = 0; i < cnt; i++)
+    {
+      check (stringi_set_delete (&set, make_string (deletions[i])));
+      check_stringi_set (&set, deletions + i + 1, cnt - i - 1);
+    }
+  stringi_set_destroy (&set);
+}
+\f
+/* Inserts strings into a set in each possible order, then removes them in each
+   possible order, up to a specified maximum size. */
+static void
+test_insert_any_remove_any (void)
+{
+  const int max_elems = 5;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *insertions, *deletions;
+      unsigned int ins_perm_cnt;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i;
+
+      for (ins_perm_cnt = 0;
+           ins_perm_cnt == 0 || next_permutation (insertions, cnt);
+           ins_perm_cnt++)
+        {
+          unsigned int del_perm_cnt;
+          int i;
+
+          for (i = 0; i < cnt; i++)
+            deletions[i] = i;
+
+          for (del_perm_cnt = 0;
+               del_perm_cnt == 0 || next_permutation (deletions, cnt);
+               del_perm_cnt++)
+            test_insert_delete (insertions, deletions, cnt);
+
+          check (del_perm_cnt == factorial (cnt));
+        }
+      check (ins_perm_cnt == factorial (cnt));
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts strings into a set in each possible order, then removes them in the
+   same order, up to a specified maximum size. */
+static void
+test_insert_any_remove_same (void)
+{
+  const int max_elems = 7;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *values;
+      unsigned int permutation_cnt;
+      int i;
+
+      values = xnmalloc (cnt, sizeof *values);
+      for (i = 0; i < cnt; i++)
+        values[i] = i;
+
+      for (permutation_cnt = 0;
+           permutation_cnt == 0 || next_permutation (values, cnt);
+           permutation_cnt++)
+        test_insert_delete (values, values, cnt);
+      check (permutation_cnt == factorial (cnt));
+
+      free (values);
+    }
+}
+
+/* Inserts strings into a set in each possible order, then
+   removes them in reverse order, up to a specified maximum
+   size. */
+static void
+test_insert_any_remove_reverse (void)
+{
+  const int max_elems = 7;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt++)
+    {
+      int *insertions, *deletions;
+      unsigned int permutation_cnt;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i;
+
+      for (permutation_cnt = 0;
+           permutation_cnt == 0 || next_permutation (insertions, cnt);
+           permutation_cnt++)
+        {
+          memcpy (deletions, insertions, sizeof *insertions * cnt);
+          reverse (deletions, cnt);
+
+          test_insert_delete (insertions, deletions, cnt);
+        }
+      check (permutation_cnt == factorial (cnt));
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts and removes strings in a set, in random order. */
+static void
+test_random_sequence (void)
+{
+  const int max_elems = 64;
+  const int max_trials = 8;
+  int cnt;
+
+  for (cnt = 0; cnt <= max_elems; cnt += 2)
+    {
+      int *insertions, *deletions;
+      int trial;
+      int i;
+
+      insertions = xnmalloc (cnt, sizeof *insertions);
+      deletions = xnmalloc (cnt, sizeof *deletions);
+      for (i = 0; i < cnt; i++)
+        insertions[i] = i;
+      for (i = 0; i < cnt; i++)
+        deletions[i] = i;
+
+      for (trial = 0; trial < max_trials; trial++)
+        {
+          random_shuffle (insertions, cnt, sizeof *insertions);
+          random_shuffle (deletions, cnt, sizeof *deletions);
+
+          test_insert_delete (insertions, deletions, cnt);
+        }
+
+      free (insertions);
+      free (deletions);
+    }
+}
+
+/* Inserts strings into a set in ascending order, then delete in ascending
+   order. */
+static void
+test_insert_ordered (void)
+{
+  const int max_elems = 64;
+  int *values;
+  struct stringi_set set;
+  int i;
+
+  stringi_set_init (&set);
+  values = xnmalloc (max_elems, sizeof *values);
+  for (i = 0; i < max_elems; i++)
+    {
+      values[i] = i;
+      stringi_set_insert_nocopy (&set, xstrdup (make_string (i)));
+      check_stringi_set (&set, values, i + 1);
+    }
+  for (i = 0; i < max_elems; i++)
+    {
+      stringi_set_delete (&set, make_string (i));
+      check_stringi_set (&set, values + i + 1, max_elems - i - 1);
+    }
+  stringi_set_destroy (&set);
+  free (values);
+}
+
+static void
+test_boolean_ops (void (*function)(struct stringi_set *a, struct stringi_set *b,
+                                   unsigned int *a_pat, unsigned int *b_pat))
+{
+  enum { MAX_STRINGS = 7 };
+  unsigned int a_pat, b_pat;
+
+  for (a_pat = 0; a_pat < (1u << MAX_STRINGS); a_pat++)
+    for (b_pat = 0; b_pat < (1u << MAX_STRINGS); b_pat++)
+      {
+        unsigned int new_a_pat = a_pat;
+        unsigned int new_b_pat = b_pat;
+        struct stringi_set a, b;
+        int a_strings[MAX_STRINGS], b_strings[MAX_STRINGS];
+        size_t i, n_a, n_b;
+
+        stringi_set_init (&a);
+        stringi_set_init (&b);
+        for (i = 0; i < MAX_STRINGS; i++)
+          {
+            if (a_pat & (1u << i))
+              stringi_set_insert (&a, make_string (i));
+            if (b_pat & (1u << i))
+              stringi_set_insert (&b, make_string (i));
+          }
+
+        function (&a, &b, &new_a_pat, &new_b_pat);
+
+        n_a = n_b = 0;
+        for (i = 0; i < MAX_STRINGS; i++)
+          {
+            if (new_a_pat & (1u << i))
+              a_strings[n_a++] = i;
+            if (new_b_pat & (1u << i))
+              b_strings[n_b++] = i;
+          }
+        check_stringi_set (&a, a_strings, n_a);
+        check_stringi_set (&b, b_strings, n_b);
+        stringi_set_destroy (&a);
+        stringi_set_destroy (&b);
+      }
+}
+
+static void
+union_cb (struct stringi_set *a, struct stringi_set *b,
+          unsigned int *a_pat, unsigned int *b_pat)
+{
+  stringi_set_union (a, b);
+  *a_pat |= *b_pat;
+}
+
+static void
+test_union (void)
+{
+  test_boolean_ops (union_cb);
+}
+
+static void
+union_and_intersection_cb (struct stringi_set *a, struct stringi_set *b,
+                           unsigned int *a_pat, unsigned int *b_pat)
+{
+  unsigned int orig_a_pat = *a_pat;
+  unsigned int orig_b_pat = *b_pat;
+
+  stringi_set_union_and_intersection (a, b);
+  *a_pat = orig_a_pat | orig_b_pat;
+  *b_pat = orig_a_pat & orig_b_pat;
+}
+
+static void
+test_union_and_intersection (void)
+{
+  test_boolean_ops (union_and_intersection_cb);
+}
+
+static void
+intersect_cb (struct stringi_set *a, struct stringi_set *b,
+              unsigned int *a_pat, unsigned int *b_pat)
+{
+  stringi_set_intersect (a, b);
+  *a_pat &= *b_pat;
+}
+
+static void
+test_intersect (void)
+{
+  test_boolean_ops (intersect_cb);
+}
+
+static void
+subtract_cb (struct stringi_set *a, struct stringi_set *b,
+              unsigned int *a_pat, unsigned int *b_pat)
+{
+  stringi_set_subtract (a, b);
+  *a_pat &= ~*b_pat;
+}
+
+static void
+test_subtract (void)
+{
+  test_boolean_ops (subtract_cb);
+}
+
+static void
+swap_cb (struct stringi_set *a, struct stringi_set *b,
+         unsigned int *a_pat, unsigned int *b_pat)
+{
+  unsigned int tmp;
+  stringi_set_swap (a, b);
+  tmp = *a_pat;
+  *a_pat = *b_pat;
+  *b_pat = tmp;
+}
+
+static void
+test_swap (void)
+{
+  test_boolean_ops (swap_cb);
+}
+
+static void
+clear_cb (struct stringi_set *a, struct stringi_set *b UNUSED,
+         unsigned int *a_pat, unsigned int *b_pat UNUSED)
+{
+  stringi_set_clear (a);
+  *a_pat = 0;
+}
+
+static void
+test_clear (void)
+{
+  test_boolean_ops (clear_cb);
+}
+
+static void
+clone_cb (struct stringi_set *a, struct stringi_set *b,
+         unsigned int *a_pat, unsigned int *b_pat)
+{
+  stringi_set_destroy (a);
+  stringi_set_clone (a, b);
+  *a_pat = *b_pat;
+}
+
+static void
+test_clone (void)
+{
+  test_boolean_ops (clone_cb);
+}
+
+static void
+test_destroy_null (void)
+{
+  stringi_set_destroy (NULL);
+}
+\f
+/* Main program. */
+
+/* Runs TEST_FUNCTION and prints a message about NAME. */
+static void
+run_test (void (*test_function) (void), const char *name)
+{
+  test_name = name;
+  putchar ('.');
+  fflush (stdout);
+  test_function ();
+}
+
+int
+main (void)
+{
+  run_test (test_insert_any_remove_any, "insert any order, delete any order");
+  run_test (test_insert_any_remove_same,
+            "insert any order, delete same order");
+  run_test (test_insert_any_remove_reverse,
+            "insert any order, delete reverse order");
+  run_test (test_random_sequence, "insert and delete in random sequence");
+  run_test (test_insert_ordered, "insert in ascending order");
+  run_test (test_union, "union");
+  run_test (test_union_and_intersection, "union and intersection");
+  run_test (test_intersect, "intersect");
+  run_test (test_subtract, "subtract");
+  run_test (test_swap, "swap");
+  run_test (test_clear, "clear");
+  run_test (test_clone, "clone");
+  run_test (test_destroy_null, "destroying null table");
+
+  putchar ('\n');
+
+  free_strings ();
+
+  return 0;
+}
index dfe395b4fb0579287e3a99418d0247b0aa14b255..5ff5d4144d995c3b458c33353a0fc5e7507ae63a 100755 (executable)
@@ -68,7 +68,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="Run pspp 1"
-PAPERSIZE=letter $SUPERVISOR $PSPP --testing-mode paper-size.pspp > paper-size.out
+PAPERSIZE=letter $SUPERVISOR $PSPP --testing-mode -o pspp.csv paper-size.pspp > paper-size.out
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare results"
@@ -88,7 +88,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="Run pspp 2"
-PAPERSIZE=a4 $SUPERVISOR $PSPP --testing-mode paper-size-2.pspp > paper-size-2.out
+PAPERSIZE=a4 $SUPERVISOR $PSPP --testing-mode -o pspp.csv paper-size-2.pspp > paper-size-2.out
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare results 2"
diff --git a/tests/output/render-test.c b/tests/output/render-test.c
new file mode 100644 (file)
index 0000000..54878d8
--- /dev/null
@@ -0,0 +1,301 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <errno.h>
+#include <getopt.h>
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "libpspp/assertion.h"
+#include "libpspp/compiler.h"
+#include "libpspp/string-map.h"
+#include "output/driver.h"
+#include "output/tab.h"
+#include "output/table-item.h"
+
+#include "gl/error.h"
+#include "gl/progname.h"
+#include "gl/xalloc.h"
+#include "gl/xvasprintf.h"
+
+/* --transpose: Transpose the table before outputting? */
+static int transpose;
+
+static const char *parse_options (int argc, char **argv);
+static void usage (void) NO_RETURN;
+static struct table *read_table (FILE *);
+
+int
+main (int argc, char **argv)
+{
+  struct table *table;
+  const char *input_file_name;
+  FILE *input;
+
+  set_program_name (argv[0]);
+  input_file_name = parse_options (argc, argv);
+
+  if (!strcmp (input_file_name, "-"))
+    input = stdin;
+  else
+    {
+      input = fopen (input_file_name, "r");
+      if (input == NULL)
+        error (1, errno, "%s: open failed", input_file_name);
+    }
+  table = read_table (input);
+  if (input != stdin)
+    fclose (input);
+
+  if (transpose)
+    table = table_transpose (table);
+
+  table_item_submit (table_item_create (table, NULL));
+  output_close ();
+
+  return 0;
+}
+
+static void
+configure_drivers (int width, int length)
+{
+  struct string_map options, tmp;
+  struct output_driver *driver;
+
+  string_map_init (&options);
+  string_map_insert (&options, "format", "txt");
+  string_map_insert (&options, "output-file", "-");
+  string_map_insert_nocopy (&options, xstrdup ("width"),
+                            xasprintf ("%d", width));
+  string_map_insert_nocopy (&options, xstrdup ("length"),
+                            xasprintf ("%d", length));
+
+  /* Render to stdout. */
+  string_map_clone (&tmp, &options);
+  driver = output_driver_create (&tmp);
+  if (driver == NULL)
+    exit (EXIT_FAILURE);
+  output_driver_register (driver);
+  string_map_destroy (&tmp);
+
+  /* Render to render.txt. */
+  string_map_replace (&options, "output-file", "render.txt");
+  driver = output_driver_create (&options);
+  if (driver == NULL)
+    exit (EXIT_FAILURE);
+  output_driver_register (driver);
+
+#ifdef HAVE_CAIRO
+  /* Render to render.pdf. */
+  string_map_insert (&options, "output-file", "render.pdf");
+  string_map_insert (&options, "headers", "off");
+  string_map_insert (&options, "top-margin", "0");
+  string_map_insert (&options, "bottom-margin", "0");
+  string_map_insert (&options, "left-margin", "0");
+  string_map_insert (&options, "right-margin", "0");
+  string_map_insert_nocopy (&options, xstrdup ("paper-size"),
+                            xasprintf ("%dx%dpt", width * 5, length * 6));
+  driver = output_driver_create (&options);
+  if (driver == NULL)
+    exit (EXIT_FAILURE);
+  output_driver_register (driver);
+#endif
+
+  string_map_destroy (&options);
+}
+
+static const char *
+parse_options (int argc, char **argv)
+{
+  int width = 79;
+  int length = 66;
+
+  for (;;)
+    {
+      enum {
+        OPT_WIDTH = UCHAR_MAX + 1,
+        OPT_LENGTH,
+        OPT_HELP
+      };
+      static const struct option options[] =
+        {
+          {"width", required_argument, NULL, OPT_WIDTH},
+          {"length", required_argument, NULL, OPT_LENGTH},
+          {"transpose", no_argument, &transpose, 1},
+          {"help", no_argument, NULL, OPT_HELP},
+          {NULL, 0, NULL, 0},
+        };
+
+      int c = getopt_long (argc, argv, "", options, NULL);
+      if (c == -1)
+        break;
+
+      switch (c)
+        {
+        case OPT_WIDTH:
+          width = atoi (optarg);
+          break;
+
+        case OPT_LENGTH:
+          length = atoi (optarg);
+          break;
+
+        case OPT_HELP:
+          usage ();
+
+        case 0:
+          break;
+
+        case '?':
+          exit(EXIT_FAILURE);
+          break;
+
+        default:
+          NOT_REACHED ();
+        }
+
+    }
+
+  configure_drivers (width, length);
+
+  if (optind + 1 != argc)
+    error (1, 0, "exactly one non-option argument required; "
+           "use --help for help");
+  return argv[optind];
+}
+
+static void
+usage (void)
+{
+  printf ("%s, to test rendering of PSPP tables\n"
+          "usage: %s [OPTIONS] INPUT\n"
+          "\nOptions:\n"
+          "  --driver=NAME:CLASS:DEVICE:OPTIONS  set output driver\n",
+          program_name, program_name);
+  exit (EXIT_SUCCESS);
+}
+
+static void
+replace_newlines (char *p)
+{
+  char *q;
+
+  for (q = p; *p != '\0'; )
+    if (*p == '\\' && p[1] == 'n')
+      {
+        *q++ = '\n';
+        p += 2;
+      }
+    else
+      *q++ = *p++;
+  *q = '\0';
+}
+
+static struct table *
+read_table (FILE *stream)
+{
+  struct tab_table *tab;
+  char buffer[1024];
+  int input[6];
+  int n_input = 0;
+  int nr, nc, hl, hr, ht, hb;
+  int r, c;
+
+  if (fgets (buffer, sizeof buffer, stream) == NULL
+      || (n_input = sscanf (buffer, "%d %d %d %d %d %d",
+                            &input[0], &input[1], &input[2],
+                            &input[3], &input[4], &input[5])) < 2)
+    error (1, 0, "syntax error reading row and column count");
+
+  nr = input[0];
+  nc = input[1];
+  hl = n_input >= 3 ? input[2] : 0;
+  hr = n_input >= 4 ? input[3] : 0;
+  ht = n_input >= 5 ? input[4] : 0;
+  hb = n_input >= 6 ? input[5] : 0;
+
+  tab = tab_create (nc, nr);
+  tab_headers (tab, hl, hr, ht, hb);
+  for (r = 0; r < nr; r++)
+    for (c = 0; c < nc; c++)
+      if (tab_cell_is_empty (tab, c, r))
+        {
+          char *new_line;
+          char *text;
+          int rs, cs;
+
+          if (fgets (buffer, sizeof buffer, stream) == NULL)
+            error (1, 0, "unexpected end of input reading row %d, column %d",
+                   r, c);
+          new_line = strchr (buffer, '\n');
+          if (new_line != NULL)
+            *new_line = '\0';
+
+          text = buffer;
+          if (sscanf (text, "%d*%d", &rs, &cs) == 2)
+            {
+              while (*text != ' ' && *text != '\0')
+                text++;
+              if (*text == ' ')
+                text++;
+            }
+          else
+            {
+              rs = 1;
+              cs = 1;
+            }
+
+          while (*text && strchr ("<>^,@", *text))
+            switch (*text++)
+              {
+              case '<':
+                tab_vline (tab, TAL_1, c, r, r + rs - 1);
+                break;
+
+              case '>':
+                tab_vline (tab, TAL_1, c + cs, r, r + rs - 1);
+                break;
+
+              case '^':
+                tab_hline (tab, TAL_1, c, c + cs - 1, r);
+                break;
+
+              case ',':
+                tab_hline (tab, TAL_1, c, c + cs - 1, r + rs);
+                break;
+
+              case '@':
+                tab_box (tab, TAL_1, TAL_1, -1, -1, c, r,
+                         c + cs - 1, r + rs - 1);
+                break;
+
+              default:
+                NOT_REACHED ();
+              }
+
+          replace_newlines (text);
+
+          tab_joint_text (tab, c, r, c + cs - 1, r + rs - 1, 0, text);
+        }
+
+  if (getc (stream) != EOF)
+    error (1, 0, "unread data at end of input");
+
+  return &tab->table;
+}
diff --git a/tests/output/render.at b/tests/output/render.at
new file mode 100644 (file)
index 0000000..b9f8e62
--- /dev/null
@@ -0,0 +1,1710 @@
+m4_define([RENDER_WEAVE_6X6],
+  [AT_DATA([input], [6 6 $1
+@a
+1*2 @bcd
+@e
+2*1 @f\ng\nh
+@i
+2*1 @j\nk\nl
+@m
+1*2 @nop
+2*1 @q\nr\ns
+2*1 @t\nu\nv
+@w
+1*2 @xyz
+@A
+2*1 @B\nC\nD
+@E
+1*2 @FGH
+1*2 @IJK
+2*1 @L\nM\nN
+@O
+@P
+@Q
+1*2 @RST
+@U
+@V
+])])
+
+m4_define([RENDER_8X8],
+  [AT_DATA([input], [8 8 $1
+@a
+@b
+@c
+@d
+@e
+@f
+@g
+@h
+@i
+1*2 @jkl
+@m
+1*2 @nop
+2*1 @q\nr\ns
+@t
+@u
+@v
+1*2 @wxy
+@z
+2*1 @A\nB\nC
+@D
+@E
+2*1 @F\nG\nH
+@I
+1*2 @JKL
+2*1 @M\nN\nO
+@P
+@Q
+2*1 @R\nS\nT
+1*2 @UVW
+@X
+@Y
+@Z
+2*1 @0\n1\n2
+@3
+1*2 @456
+@7
+@8
+@9
+1*2 @abc
+@d
+1*2 @efg
+@h
+@i
+@j
+@k
+@l
+@m
+@n
+@o
+@p
+])])
+
+# This input is something of a counterexample, in that it could render
+# compactly as this if the algorithm for choosing cell widths and
+# heights were smarter:
+#
+# +---+---+---+-+-+
+# |abc|jkl|mno|v|x|
+# |def+---+pqr+-+-+
+# |ghi|yzA|stu|HIJ|
+# +-+-+BCD+-+-+KLM|
+# |Q|V|EFG|W|Z|NOP|
+# |R+-+-+-+X+-+-+-+
+# |S|012|9|Y|abc|j|
+# |T|345+-+-+def|k|
+# |U|678|opq|ghi|l|
+# +-+-+-+rst+---+m|
+# |xyz|G|uvw|JKL|n|
+# |ABC|H+---+-+-+-+
+# |DEF|I|MNOPQ|123|
+# +---+-+RSTUV|456|
+# |abcde|WXYZ0|789|
+# +-----+-----+---+
+m4_define([RENDER_8X8_2],
+  [AT_DATA([input], [8 8 $1
+2*2 @abc\ndef\nghi
+1*2 @jkl
+2*2 @mno\npqr\nstu
+1*2 @vwx
+2*2 @yzA\nBCD\nEFG
+2*2 @HIJ\nKLM\nNOP
+3*1 @Q\nR\nS\nT\nU
+@V
+2*1 @W\nX\nY
+@Z
+2*2 @012\n345\n678
+@9
+2*2 @abc\ndef\nghi
+3*1 @j\nk\nl\nm\nn
+2*2 @opq\nrst\nuvw
+2*2 @xyz\nABC\nDEF
+2*1 @G\nH\nI
+1*2 @JKL
+2*3 @MNOPQ\nRSTUV\nWXYZ0
+2*2 @123\n456\n789
+1*3 @abcde
+])])
+\f
+AT_BANNER([output rendering -- no page breaking])
+
+AT_SETUP([single cell])
+AT_DATA([input], [1 1
+abc
+])
+AT_CHECK([render-test input], [0], [abc
+])
+AT_CLEANUP
+
+AT_SETUP([single cell with border])
+AT_DATA([input], [1 1
+@abc
+])
+AT_CHECK([render-test input], [0], [dnl
++---+
+|abc|
++---+
+])
+AT_CLEANUP
+
+AT_SETUP([joined columns])
+AT_DATA([input], [2 2
+1*2 @abcdefg
+@hij
+@klm
+])
+AT_CHECK([render-test input], [0], [dnl
++-------+
+|abcdefg|
++---+---+
+|hij|klm|
++---+---+
+])
+AT_CLEANUP
+
+AT_SETUP([3x3, joined rows and columns])
+AT_DATA([input], [3 3
+1*2 @abc
+2*1 @d\ne\nf
+2*1 @g\nh\ni
+@j
+1*2 @klm
+])
+AT_CHECK([render-test input], [0], [dnl
++---+-+
+|abc|d|
++-+-+e|
+|g|j|f|
+|h+-+-+
+|i|klm|
++-+---+
+])
+AT_CLEANUP
+
+AT_SETUP([6x6, joined rows and columns])
+RENDER_WEAVE_6X6
+AT_CHECK([render-test input], [0], [dnl
++-+---+-+-+-+
+|a|bcd|e|f|i|
++-+-+-+-+g+-+
+|j|m|nop|h|q|
+|k+-+-+-+-+r|
+|l|t|w|xyz|s|
++-+u+-+-+-+-+
+|A|v|B|E|FGH|
++-+-+C+-+-+-+
+|IJK|D|L|O|P|
++-+-+-+M+-+-+
+|Q|RST|N|U|V|
++-+---+-+-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([3 rows with many joined cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [3 19
+m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
+])@1
+m4_for([x], [2], [19], [1], [1*2 @x
+])@20
+])
+AT_CHECK([render-test input], [0], [dnl
+ a b c d e f g h i j k l m n o p q r  s
++-+---+---+---+---+---+---+---+---+----+
+|1|  2|  3|  4|  5|  6|  7|  8|  9|  10|
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
+| 11| 12| 13| 14| 15| 16| 17| 18| 19|20|
++---+---+---+---+---+---+---+---+---+--+
+])
+AT_CLEANUP
+
+AT_SETUP([3 columns with many joined cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [3 19
+m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
+])@1
+m4_for([x], [2], [19], [1], [1*2 @x\nab\ncd
+])@20
+])
+AT_CHECK([render-test --transpose input], [0], [dnl
+ +--+--+
+a| 1|11|
+ +--+ab|
+b| 2|cd|
+ |ab+--+
+c|cd|12|
+ +--+ab|
+d| 3|cd|
+ |ab+--+
+e|cd|13|
+ +--+ab|
+f| 4|cd|
+ |ab+--+
+g|cd|14|
+ +--+ab|
+h| 5|cd|
+ |ab+--+
+i|cd|15|
+ +--+ab|
+j| 6|cd|
+ |ab+--+
+k|cd|16|
+ +--+ab|
+l| 7|cd|
+ |ab+--+
+m|cd|17|
+ +--+ab|
+n| 8|cd|
+ |ab+--+
+o|cd|18|
+ +--+ab|
+p| 9|cd|
+ |ab+--+
+q|cd|19|
+ +--+ab|
+r|10|cd|
+ |ab+--+
+s|cd|20|
+ +--+--+
+])
+AT_CLEANUP
+
+AT_SETUP([joined rows])
+AT_DATA([input], [2 2
+2*1 @ab\ncd\nef
+@hij
+@klm
+])
+AT_CHECK([render-test input], [0], [dnl
++--+---+
+|ab|hij|
+|cd+---+
+|ef|klm|
++--+---+
+])
+AT_CLEANUP
+
+AT_SETUP([5 big narrow cells])
+AT_DATA([input], [1 5
+@This cell has a lot of text but its minimum width is pretty narrow.
+@This cell also has a lot of text but its minimum width is pretty narrow.
+@A third cell with a lot of text but a pretty narrow minimum width.
+@A fourth cell with a lot of text but a pretty narrow minimum width.
+@A fifth cell with a lot of text but a pretty narrow minimum width.
+])
+AT_CHECK([render-test input], [0], [dnl
++---------------+---------------+--------------+---------------+--------------+
+|This cell has a| This cell also|  A third cell|  A fourth cell|  A fifth cell|
+|lot of text but|   has a lot of| with a lot of|  with a lot of| with a lot of|
+|    its minimum|   text but its|    text but a|     text but a|    text but a|
+|width is pretty|  minimum width| pretty narrow|  pretty narrow| pretty narrow|
+|        narrow.|      is pretty|minimum width.| minimum width.|minimum width.|
+|               |        narrow.|              |               |              |
++---------------+---------------+--------------+---------------+--------------+
+])
+AT_CLEANUP
+
+AT_SETUP([9 big narrow cells])
+AT_DATA([input], [1 9
+@This cell has a lot of text but its minimum width is pretty narrow.
+@This cell also has a lot of text but its minimum width is pretty narrow.
+@A third cell with a lot of text but a pretty narrow minimum width.
+@A fourth cell with a lot of text but a pretty narrow minimum width.
+@A fifth cell with a lot of text but a pretty narrow minimum width.
+@A sixth cell with a lot of text but a pretty narrow minimum width.
+@A seventh cell with a lot of text but a pretty narrow minimum width.
+@A eighth cell with a lot of text but a pretty narrow minimum width.
+@A ninth cell with a lot of text but a pretty narrow minimum width.
+])
+AT_CHECK([render-test input], [0], [dnl
++--------+-------+--------+--------+-------+--------+--------+-------+--------+
+|    This|   This| A third|A fourth|A fifth| A sixth|       A|      A| A ninth|
+|cell has|   cell|    cell|    cell|   cell|    cell| seventh| eighth|    cell|
+|a lot of|   also|  with a|  with a| with a|  with a|    cell|   cell|  with a|
+|text but|  has a|  lot of|  lot of| lot of|  lot of|  with a| with a|  lot of|
+|     its| lot of|text but|text but|   text|text but|  lot of| lot of|text but|
+| minimum|   text|a pretty|a pretty|  but a|a pretty|text but|   text|a pretty|
+|width is|but its|  narrow|  narrow| pretty|  narrow|a pretty|  but a|  narrow|
+|  pretty|minimum| minimum| minimum| narrow| minimum|  narrow| pretty| minimum|
+| narrow.|  width|  width.|  width.|minimum|  width.| minimum| narrow|  width.|
+|        |     is|        |        | width.|        |  width.|minimum|        |
+|        | pretty|        |        |       |        |        | width.|        |
+|        |narrow.|        |        |       |        |        |       |        |
++--------+-------+--------+--------+-------+--------+--------+-------+--------+
+])
+AT_CLEANUP
+
+AT_SETUP([2 big cells with new-lines])
+AT_DATA([input], [1 2
+@PSPP does not place many restrictions on ordering of commands. The main restriction is that variables must be defined before they are otherwise referenced.  This section describes the details of command ordering, but most users will have no need to refer to them. PSPP possesses five internal states, called initial, INPUT PROGRAM, FILE TYPE, transformation, and procedure states.
+@PSPP includes special support\nfor unknown numeric data values.\nMissing observations are assigned\na special value, called the\n``system-missing value''.  This\n``value'' actually indicates the\nabsence of a value; it\nmeans that the actual\nvalue is unknown.
+])
+AT_CHECK([render-test input], [0], [dnl
++----------------------------------------------------------+------------------+
+|      PSPP does not place many restrictions on ordering of|     PSPP includes|
+|  commands. The main restriction is that variables must be|   special support|
+|       defined before they are otherwise referenced.  This|       for unknown|
+|    section describes the details of command ordering, but|      numeric data|
+|       most users will have no need to refer to them. PSPP|           values.|
+|     possesses five internal states, called initial, INPUT|           Missing|
+| PROGRAM, FILE TYPE, transformation, and procedure states.|  observations are|
+|                                                          |          assigned|
+|                                                          |  a special value,|
+|                                                          |        called the|
+|                                                          |  ``system-missing|
+|                                                          |    value''.  This|
+|                                                          |``value'' actually|
+|                                                          |     indicates the|
+|                                                          |      absence of a|
+|                                                          |         value; it|
+|                                                          |    means that the|
+|                                                          |            actual|
+|                                                          | value is unknown.|
++----------------------------------------------------------+------------------+
+])
+AT_CLEANUP
+
+AT_SETUP([8x8 with many 2x2 joins])
+RENDER_8X8_2
+AT_CHECK([render-test input], [0],[dnl
++---+---+----+----+
+|abc|jkl| mno| vwx|
+|def|   | pqr|    |
+|ghi+---+ stu+----+
+|   |yzA|    | HIJ|
++-+-+BCD+-+--+ KLM|
+|Q|V|EFG|W| Z| NOP|
+|R| |   |X|  |    |
+|S+-+-+-+Y+--+-+--+
+|T|012|9| | abc| j|
+|U|345| | | def| k|
+| |678+-+-+ ghi| l|
+| |   |opq|    | m|
++-+-+-+rst+----+ n|
+|xyz|G|uvw| JKL|  |
+|ABC|H|   |    |  |
+|DEF|I+---+--+-+--+
+|   | | MNOPQ| 123|
++---+-+ RSTUV| 456|
+|abcde| WXYZ0| 789|
+|     |      |    |
++-----+------+----+
+])
+AT_CLEANUP
+\f
+AT_BANNER([output rendering -- horizontal page breaks])
+
+AT_SETUP([breaking row of many small cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [1 50
+m4_for([x], [1], [50], [1], [@x
+])])
+AT_CHECK([render-test input], [0], [dnl
++-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|
++-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking row of many small cells, with headers])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [1 54 2 2
+@ha
+@hb
+m4_for([x], [1], [50], [1], [@x
+])dnl
+@hc
+@hd
+])
+AT_CHECK([render-test input], [0], [dnl
++--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+|ha|hb|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|hc|hd|
++--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+|ha|hb|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|hc|hd|
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+
++--+--+--+--+--+--+--+
+|ha|hb|48|49|50|hc|hd|
++--+--+--+--+--+--+--+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking row of many medium-size cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [1 50
+m4_for([x], [1], [50], [1], [@cell x
+])])
+AT_CHECK([render-test input], [0], [dnl
++----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
+|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
+|   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|  11|  12|  13|  14|  15|
++----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
+
++----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
+|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
+|  16|  17|  18|  19|  20|  21|  22|  23|  24|  25|  26|  27|  28|  29|  30|
++----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
+
++----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
+|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
+|  31|  32|  33|  34|  35|  36|  37|  38|  39|  40|  41|  42|  43|  44|  45|
++----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
+
++----+----+----+----+----+
+|cell|cell|cell|cell|cell|
+|  46|  47|  48|  49|  50|
++----+----+----+----+----+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking row of many medium-size cells, with headers])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [1 52 1 1
+header1
+m4_for([x], [1], [50], [1], [@cell x
+])dnl
+header2
+])
+AT_CHECK([render-test input], [0], [dnl
+       +----+----+----+----+----+----+----+----+----+----+----+----+
+header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
+       |   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|  11|  12|
+       +----+----+----+----+----+----+----+----+----+----+----+----+
+
+       +----+----+----+----+----+----+----+----+----+----+----+----+
+header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
+       |  13|  14|  15|  16|  17|  18|  19|  20|  21|  22|  23|  24|
+       +----+----+----+----+----+----+----+----+----+----+----+----+
+
+       +----+----+----+----+----+----+----+----+----+----+----+----+
+header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
+       |  25|  26|  27|  28|  29|  30|  31|  32|  33|  34|  35|  36|
+       +----+----+----+----+----+----+----+----+----+----+----+----+
+
+       +----+----+----+----+----+----+----+----+----+----+----+----+
+header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
+       |  37|  38|  39|  40|  41|  42|  43|  44|  45|  46|  47|  48|
+       +----+----+----+----+----+----+----+----+----+----+----+----+
+
+       +----+----+
+header1|cell|cell|header2
+       |  49|  50|
+       +----+----+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking row of many big narrow cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [1 50
+m4_for([x], [1], [50], [1], [@This is cell x in a series of 50.
+])])
+AT_CHECK([render-test input], [0], [dnl
++------+------+------+------+------+------+------+------+------+------+------+
+|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
+|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
+|cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9|  cell|  cell|
+|  in a|  in a|  in a|  in a|  in a|  in a|  in a|  in a|  in a| 10 in| 11 in|
+|series|series|series|series|series|series|series|series|series|     a|     a|
+|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|
+|      |      |      |      |      |      |      |      |      |of 50.|of 50.|
++------+------+------+------+------+------+------+------+------+------+------+
+
++------+------+------+------+------+------+------+------+------+------+------+
+|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
+|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
+|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
+| 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in|
+|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
+|series|series|series|series|series|series|series|series|series|series|series|
+|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
++------+------+------+------+------+------+------+------+------+------+------+
+
++------+------+------+------+------+------+------+------+------+------+------+
+|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
+|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
+|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
+| 23 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in|
+|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
+|series|series|series|series|series|series|series|series|series|series|series|
+|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
++------+------+------+------+------+------+------+------+------+------+------+
+
++------+------+------+------+------+------+------+------+------+------+------+
+|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
+|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
+|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
+| 34 in| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in|
+|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
+|series|series|series|series|series|series|series|series|series|series|series|
+|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
++------+------+------+------+------+------+------+------+------+------+------+
+
++------+------+------+------+------+------+
+|  This|  This|  This|  This|  This|  This|
+|    is|    is|    is|    is|    is|    is|
+|  cell|  cell|  cell|  cell|  cell|  cell|
+| 45 in| 46 in| 47 in| 48 in| 49 in| 50 in|
+|     a|     a|     a|     a|     a|     a|
+|series|series|series|series|series|series|
+|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
++------+------+------+------+------+------+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking 2 rows of many small cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [2 50
+m4_for([x], [1], [100], [1], [@x
+])])
+AT_CHECK([render-test input], [0], [dnl
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+| 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
+|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
+|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking 3 rows with many joined cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [3 49
+m4_foreach([var], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,dnl
+A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W], [var
+])@1
+m4_for([x], [2], [49], [1], [1*2 @x
+])@50
+])
+AT_CHECK([render-test input], [0], [dnl
+ a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M
++-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+|1|  2|  3|  4|  5|  6|  7|  8|  9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
++---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
+
+ N O P Q R S T U V  W
++---+---+---+---+----+
+| 21| 22| 23| 24|  25|
++-+-+-+-+-+-+-+-+-+--+
+45| 46| 47| 48| 49|50|
+--+---+---+---+---+--+
+])
+AT_CLEANUP
+
+AT_SETUP([horz break 6x6, joined rows and columns])
+RENDER_WEAVE_6X6
+AT_CHECK([render-test --width=6 input], [0], [dnl
++-+--
+|a|bc
++-+-+
+|j|m|
+|k+-+
+|l|t|
++-+u|
+|A|v|
++-+-+
+|IJK|
++-+-+
+|Q|RS
++-+--
+
+--+-+
+cd|e|
++-+-+
+|nop|
++-+-+
+|w|xy
++-+-+
+|B|E|
+|C+-+
+|D|L|
++-+M|
+ST|N|
+--+-+
+
++-+-+
+|f|i|
+|g+-+
+|h|q|
++-+r|
+yz|s|
++-+-+
+|FGH|
++-+-+
+|O|P|
++-+-+
+|U|V|
++-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([horz break 6x6, joined rows and columns, left header])
+RENDER_WEAVE_6X6([1 0 0 0])
+AT_CHECK([render-test --width=10 input], [0], [dnl
++-+---+-+
+|a|bcd|e|
++-+-+-+-+
+|j|m|nop|
+|k+-+-+-+
+|l|t|w|xy
++-+u+-+-+
+|A|v|B|E|
++-+-+C+-+
+|K K|D|L|
++-+-+-+M|
+|Q|RST|N|
++-+---+-+
+
++-+-+-+
+|a|f|i|
++-+g+-+
+|j|h|q|
+|k+-+r|
+|l|z|s|
++-+-+-+
+|A|FGH|
++-+-+-+
+|K|O|P|
++-+-+-+
+|Q|U|V|
++-+-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([horz break 6x6, joined rows and columns, right header])
+RENDER_WEAVE_6X6([0 1 0 0])
+AT_CHECK([render-test --width=10 input], [0], [dnl
++-+---+-+
+|a|bcd|i|
++-+-+-+-+
+|j|m|n|q|
+|k+-+-+r|
+|l|t|w|s|
++-+u+-+-+
+|A|v|B|H|
++-+-+C+-+
+|IJK|D|P|
++-+-+-+-+
+|Q|RST|V|
++-+---+-+
+
++-+-+-+
+|e|f|i|
++-+g+-+
+op|h|q|
++-+-+r|
+|xyz|s|
++-+-+-+
+|E|F H|
++-+-+-+
+|L|O|P|
+|M+-+-+
+|N|U|V|
++-+-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking joined cells too wide for page])
+AT_DATA([input], [4 6
+1*6 @abc def ghi jkl
+1*3 @mno pqr
+1*3 @stu vwx
+1*2 @yzA
+1*2 @BCD
+1*2 @EFG
+@H
+@I
+@J
+@K
+@L
+@M
+])
+AT_CHECK([render-test --width=10 input], [0], [dnl
++--------
+|abc def
+|
++-----+--
+|  mno|
+|  pqr|
++---+-+-+
+|yzA|BCD|
++-+-+-+-+
+|H|I|J|K|
++-+-+-+-+
+
+----+
+ ghi|
+ jkl|
+----+
+ stu|
+ vwx|
++---+
+|EFG|
++-+-+
+|L|M|
++-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking joined cells much too wide for page])
+AT_DATA([input], [4 6
+1*6 @abc def ghi jkl
+1*3 @mno pqr
+1*3 @stu vwx
+1*2 @yzA
+1*2 @BCD
+1*2 @EFG
+@H
+@I
+@J
+@K
+@L
+@M
+])
+AT_CHECK([render-test --width=6 input], [0], [dnl
++----
+|abc
+|
++----
+|  mn
+|  pq
++---+
+|yzA|
++-+-+
+|H|I|
++-+-+
+
+-----
+ def
+
+--+--
+no|
+qr|
++-+-+
+|BCD|
++-+-+
+|J|K|
++-+-+
+
+----+
+ ghi|
+ jkl|
+----+
+ stu|
+ vwx|
++---+
+|EFG|
++-+-+
+|L|M|
++-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking cell too wide for page, no border])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [1 1
+abcdefghijklmnopqrstuvwxyz
+])
+AT_CHECK([render-test --width=6 input], [0], [dnl
+abcdef
+
+ghijkl
+
+mnopqr
+
+stuvwx
+
+yz
+])
+AT_CLEANUP
+
+AT_SETUP([breaking cell too wide for page, with border])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [1 1
+@abcdefghijklmnopqrstuvwxyz
+])
+AT_CHECK([render-test --width=6 input], [0], [dnl
++-----
+|abcde
++-----
+
+------
+defghi
+------
+
+------
+hijklm
+------
+
+------
+lmnopq
+------
+
+------
+pqrstu
+------
+
+------
+tuvwxy
+------
+
+---+
+xyz|
+---+
+])
+AT_CLEANUP
+
+AT_SETUP([horz break 8x8 with many 2x2 joins])
+RENDER_8X8_2
+AT_CHECK([render-test --width=8 input], [0],[dnl
++---+--
+|abc|jk
+|def|  
+|ghi+--
+|   |yz
++-+-+BC
+|Q|V|EF
+|R| |  
+|S+-+-+
+|T|012|
+|U|345|
+| |678|
+| |   |
++-+-+-+
+|xyz|G|
+|ABC|H|
+|DEF|I|
+|   | |
++---+-+
+|abcde|
+|     |
++-----+
+
+--+----+
+kl| mno|
+  | pqr|
+--+ stu|
+zA|    |
+CD+-+--+
+FG|W| Z|
+  |X|  |
++-+Y+--+
+|9| | ab
+| | | de
++-+-+ gh
+|opq|   
+|rst+---
+|uvw| JK
+|   |   
++---+--+
+| MNOPQ|
+| RSTUV|
+| WXYZ0|
+|      |
++------+
+
++----+
+| vwx|
+|    |
++----+
+| HIJ|
+| KLM|
+| NOP|
+|    |
++-+--+
+bc| j|
+ef| k|
+hi| l|
+  | m|
+--+ n|
+KL|  |
+  |  |
++-+--+
+| 123|
+| 456|
+
+| 456|
+| 789|
+|    |
++----+
+])
+AT_CLEANUP
+\f
+AT_BANNER([output rendering -- vertical page breaks])
+
+AT_SETUP([breaking column of many small cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [20 1
+m4_for([x], [1], [20], [1], [@x
+])])
+AT_CHECK([render-test --length=10 input], [0], [dnl
++--+
+| 1|
++--+
+| 2|
++--+
+| 3|
++--+
+| 4|
++--+
+
++--+
+| 5|
++--+
+| 6|
++--+
+| 7|
++--+
+| 8|
++--+
+
++--+
+| 9|
++--+
+|10|
++--+
+|11|
++--+
+|12|
++--+
+
++--+
+|13|
++--+
+|14|
++--+
+|15|
++--+
+|16|
++--+
+
++--+
+|17|
++--+
+|18|
++--+
+|19|
++--+
+|20|
++--+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking column of many small cells, with headers])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [17 1 0 0 1 1
+@a
+m4_for([x], [1], [15], [1], [@x
+])@b
+])
+AT_CHECK([render-test --length=13 input], [0], [dnl
++--+
+| a|
++--+
+| 1|
++--+
+| 2|
++--+
+| 3|
++--+
+| 4|
++--+
+| b|
++--+
+
++--+
+| a|
++--+
+| 5|
++--+
+| 6|
++--+
+| 7|
++--+
+| 8|
++--+
+| b|
++--+
+
++--+
+| a|
++--+
+| 9|
++--+
+|10|
++--+
+|11|
++--+
+|12|
++--+
+| b|
++--+
+
++--+
+| a|
++--+
+|13|
++--+
+|14|
++--+
+|15|
++--+
+| b|
++--+
+])
+AT_CLEANUP
+
+AT_SETUP([disabling too-big headers])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [17 1 0 0 1 1
+@a
+m4_for([x], [1], [15], [1], [@x
+])@b
+])
+AT_CHECK([render-test --length=10 input], [0], [dnl
++--+
+| a|
++--+
+| 1|
++--+
+| 2|
++--+
+| 3|
++--+
+
++--+
+| 4|
++--+
+| 5|
++--+
+| 6|
++--+
+| 7|
++--+
+
++--+
+| 8|
++--+
+| 9|
++--+
+|10|
++--+
+|11|
++--+
+
++--+
+|12|
++--+
+|13|
++--+
+|14|
++--+
+|15|
++--+
+
++--+
+| b|
++--+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking column of many medium-size cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [20 1
+m4_for([x], [1], [20], [1], [@top x\ncell x\nbottom x
+])])
+AT_CHECK([render-test --length 10 input], [0], [dnl
++---------+
+|    top 1|
+|   cell 1|
+| bottom 1|
++---------+
+|    top 2|
+|   cell 2|
+| bottom 2|
++---------+
+
++---------+
+|    top 3|
+|   cell 3|
+| bottom 3|
++---------+
+|    top 4|
+|   cell 4|
+| bottom 4|
++---------+
+
++---------+
+|    top 5|
+|   cell 5|
+| bottom 5|
++---------+
+|    top 6|
+|   cell 6|
+| bottom 6|
++---------+
+
++---------+
+|    top 7|
+|   cell 7|
+| bottom 7|
++---------+
+|    top 8|
+|   cell 8|
+| bottom 8|
++---------+
+
++---------+
+|    top 9|
+|   cell 9|
+| bottom 9|
++---------+
+|   top 10|
+|  cell 10|
+|bottom 10|
++---------+
+
++---------+
+|   top 11|
+|  cell 11|
+|bottom 11|
++---------+
+|   top 12|
+|  cell 12|
+|bottom 12|
++---------+
+
++---------+
+|   top 13|
+|  cell 13|
+|bottom 13|
++---------+
+|   top 14|
+|  cell 14|
+|bottom 14|
++---------+
+
++---------+
+|   top 15|
+|  cell 15|
+|bottom 15|
++---------+
+|   top 16|
+|  cell 16|
+|bottom 16|
++---------+
+
++---------+
+|   top 17|
+|  cell 17|
+|bottom 17|
++---------+
+|   top 18|
+|  cell 18|
+|bottom 18|
++---------+
+
++---------+
+|   top 19|
+|  cell 19|
+|bottom 19|
++---------+
+|   top 20|
+|  cell 20|
+|bottom 20|
++---------+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking 3 columns with many joined cells])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [3 19
+m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
+])@1
+m4_for([x], [2], [19], [1], [1*2 @x\nab\ncd
+])@20
+])
+AT_CHECK([render-test --length=6 --transpose input], [0], [dnl
+ +--+--+
+a| 1|11|
+ +--+ab|
+b| 2|cd|
+ |ab+--+
+
+ |ab+--+
+c|cd|12|
+ +--+ab|
+d| 3|cd|
+ |ab+--+
+
+ |ab+--+
+e|cd|13|
+ +--+ab|
+f| 4|cd|
+ |ab+--+
+
+ |ab+--+
+g|cd|14|
+ +--+ab|
+h| 5|cd|
+ |ab+--+
+
+ |ab+--+
+i|cd|15|
+ +--+ab|
+j| 6|cd|
+ |ab+--+
+
+ |ab+--+
+k|cd|16|
+ +--+ab|
+l| 7|cd|
+ |ab+--+
+
+ |ab+--+
+m|cd|17|
+ +--+ab|
+n| 8|cd|
+ |ab+--+
+
+ |ab+--+
+o|cd|18|
+ +--+ab|
+p| 9|cd|
+ |ab+--+
+
+ |ab+--+
+q|cd|19|
+ +--+ab|
+r|10|cd|
+ |ab+--+
+
+ |ab+--+
+s|cd|20|
+ +--+--+
+])
+AT_CLEANUP
+
+AT_SETUP([vert break 6x6, joined rows and columns])
+RENDER_WEAVE_6X6
+AT_CHECK([render-test --length=6 input], [0], [dnl
++-+---+-+-+-+
+|a|bcd|e|f|i|
++-+-+-+-+g+-+
+|j|m|nop|h|q|
+|k+-+---+-+r|
+
+|k+-+-+---+r|
+|l|t|w|xyz|s|
++-+u+-+-+-+-+
+|A|v|B|E|FGH|
++-+-+C+-+---+
+
++---+C+-+-+-+
+|IJK|D|L|O|P|
++-+-+-+M+-+-+
+|Q|RST|N|U|V|
++-+---+-+-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking joined cells too tall for page])
+AT_DATA([input], [4 6
+1*6 @abc\ndef\nghi\njkl\nmno\npqr\nstu\nvwx\nyzA\nBCD\nEFG
+1*3 @HIJ\nKLM\nOPQ\nRST\nUVW
+1*3 @XYZ\n012\n345\n678\n90a
+1*2 @bcd\nefg\nhij
+1*2 @klm\nnop\nqrs
+1*2 @tuv\nwxy\nzAB
+@C
+@D
+@E
+@F
+@G
+@H
+])
+AT_CHECK([render-test --transpose --length=6 input], [0], [dnl
++---+---+---+-+
+|abc|HIJ|bcd|C|
+|def|KLM|efg+-+
+|ghi|OPQ|hij|D|
+|jkl|RST+---+-+
+
+|jkl|RST+---+-+
+|mno|UVW|klm|E|
+|pqr+---+nop+-+
+|stu|XYZ|qrs|F|
+|vwx|012+---+-+
+
+|vwx|012+---+-+
+|yzA|345|tuv|G|
+|BCD|678|wxy+-+
+|EFG|90a|zAB|H|
++---+---+---+-+
+])
+AT_CLEANUP
+
+AT_SETUP([breaking cell too tall for page, no border])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [1 1
+abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ
+])
+AT_CHECK([render-test --width=6 --length=6 input], [0], [dnl
+   abc
+  defg
+   hij
+  klmn
+   opq
+  rstu
+
+vwx yz
+ ABCDE
+ FGH I
+    JK
+ LMNOP
+QR STU
+
+ VWXYZ
+])
+AT_CLEANUP
+
+AT_SETUP([breaking cell too tall for page, with border])
+AT_CAPTURE_FILE([input])
+AT_DATA([input], [1 1
+@abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ
+])
+AT_CHECK([render-test --width=7 --length=6 input], [0], [dnl
++-----+
+|  abc|
+| defg|
+|  hij|
+| klmn|
+|  opq|
+
+| klmn|
+|  opq|
+| rstu|
+|  vwx|
+|   yz|
+|ABCDE|
+
+|   yz|
+|ABCDE|
+|FGH I|
+|   JK|
+|LMNOP|
+|   QR|
+
+|LMNOP|
+|   QR|
+|  STU|
+|VWXYZ|
++-----+
+])
+AT_CLEANUP
+\f
+AT_BANNER([output rendering -- double page breaks])
+
+AT_SETUP([double break 6x6, joined rows and columns])
+RENDER_WEAVE_6X6
+AT_CHECK([render-test --width=6 --length=6 input], [0], [dnl
++-+--
+|a|bc
++-+-+
+|j|m|
+|k+-+
+
+|k+-+
+|l|t|
++-+u|
+|A|v|
++-+-+
+
++---+
+|IJK|
++-+-+
+|Q|RS
++-+--
+
+--+-+
+cd|e|
++-+-+
+|nop|
++---+
+
++-+--
+|w|xy
++-+-+
+|B|E|
+|C+-+
+
+|C+-+
+|D|L|
++-+M|
+ST|N|
+--+-+
+
++-+-+
+|f|i|
+|g+-+
+|h|q|
++-+r|
+
+--+r|
+yz|s|
++-+-+
+|FGH|
++---+
+
++-+-+
+|O|P|
++-+-+
+|U|V|
++-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([double break 8x8, with joins, left and right headers])
+RENDER_8X8([1 1 0 0])
+AT_CHECK([render-test input --width=14 --length=14], [0], [dnl
++-+-+-+-+-+-+
+|a|b|c|d|e|h|
++-+-+-+-+-+-+
+|i|jkl|m|n|t|
++-+-+-+-+-+-+
+|u|v|wxy|z|D|
++-+-+-+-+-+-+
+|E|F|I|JKL|P|
++-+G+-+---+-+
+|Q|H|R|UVW|Y|
++-+-+S+-+-+-+
+|Z|0|T|3|4|8|
++-+1+-+-+-+-+
+
++-+1+---+-+-+
+|9|2|abc|d|h|
++-+-+-+-+-+-+
+|i|j|k|l|m|p|
++-+-+-+-+-+-+
+
++-+--+-+-+
+|a| f|g|h|
++-+--+-+-+
+|i|op|q|t|
++-+--+r+-+
+|u| A|s|D|
++-+ B+-+-+
+
++-+ B+-+-+
+|E| C|M|P|
++-+--+N+-+
+|Q| X|O|Y|
++-+--+-+-+
+|Z|56|7|8|
++-+--+-+-+
+|9| efg|h|
++-+--+-+-+
+|i| n|o|p|
++-+--+-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([double break 8x8, with joins, top and bottom headers])
+RENDER_8X8([0 0 1 1])
+AT_CHECK([render-test input --width=14 --length=14], [0], [dnl
++-+-+-+-+-+-+
+|a|b|c|d|e|f|
++-+-+-+-+-+-+
+|i|jkl|m|nop|
++-+-+-+-+-+-+
+|u|v|wxy|z|A|
++-+-+-+-+-+B|
+|E|F|I|JKL|C|
++-+G+-+---+-+
+|Q|H|R|UVW|X|
++-+-+-+-+-+-+
+|i|j|k|l|m|n|
++-+-+-+-+-+-+
+
++-+-+-+-+-+-+
+|a|b|c|d|e|f|
++-+-+-+-+-+-+
+|Z|0|S|3|456|
+| |1|T| |   |
++-+2+-+-+-+-+
+|9| |abc|d|ef
++-+-+-+-+-+-+
+|i|j|k|l|m|n|
++-+-+-+-+-+-+
+
++-+-+
+|g|h|
++-+-+
+|q|t|
+|r+-+
+|s|D|
++-+-+
+|M|P|
+|N+-+
+|O|Y|
++-+-+
+|o|p|
++-+-+
+
++-+-+
+|g|h|
++-+-+
+|7|8|
+| | |
++-+-+
+fg|h|
++-+-+
+|o|p|
++-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([double break 8x8, with joins, all headers])
+RENDER_8X8([1 1 1 1])
+AT_CHECK([render-test input --width=14 --length=14], [0], [dnl
++-+-+-+-+-+-+
+|a|b|c|d|e|h|
++-+-+-+-+-+-+
+|i|jkl|m|n|t|
++-+-+-+-+-+-+
+|u|v|wxy|z|D|
++-+-+-+-+-+-+
+|E|F|I|JKL|P|
++-+G+-+---+-+
+|Q|H|R|UVW|Y|
++-+-+-+-+-+-+
+|i|j|k|l|m|p|
++-+-+-+-+-+-+
+
++-+-+-+-+-+-+
+|a|b|c|d|e|h|
++-+-+-+-+-+-+
+|Z|0|S|3|4|8|
+| |1|T| | | |
++-+2+-+-+-+-+
+|9| |abc|d|h|
++-+-+-+-+-+-+
+|i|j|k|l|m|p|
++-+-+-+-+-+-+
+
++-+--+-+-+
+|a| f|g|h|
++-+--+-+-+
+|i|op|q|t|
++-+--+r+-+
+|u| A|s|D|
++-+ B+-+-+
+|E| C|M|P|
++-+--+N+-+
+|Q| X|O|Y|
++-+--+-+-+
+|i| n|o|p|
++-+--+-+-+
+
++-+--+-+-+
+|a| f|g|h|
++-+--+-+-+
+|Z|56|7|8|
+| |  | | |
++-+--+-+-+
+|9| efg|h|
++-+--+-+-+
+|i| n|o|p|
++-+--+-+-+
+])
+AT_CLEANUP
+
+AT_SETUP([double break joined cells too big for page])
+AT_DATA([input], [7 7
+@a
+@b
+@c
+@d
+@e
+@f
+@g
+@h
+6*6 @The MISSING subcommand determines the handling of missing variables.  If INCLUDE is set, then user-missing values are included in the calculations.  If NOINCLUDE is set, which is the default, user-missing values are excluded.
+@i
+@j
+@k
+@l
+@m
+])
+AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl
++-+--+--+---+
+|a| b| c|  d|
++-+--+--+---+
+|h|       The
+| |        su
+| |    determ
++-+       han
+|i|missing va
+| |     If IN
+| |         s
++-+      user
+|j|        va
+| |   include
+| | calculati
++-+ NOINCLUDE
+
++-+ NOINCLUDE
+|k|      whic
+| |
++-+      user
+|l|        va
+| |         e
+| |
++-+
+|m|
+| |
+| |
++-+----------
+
++--+--+--+
+| e| f| g|
++--+--+--+
+e MISSING|
+ubcommand|
+mines the|
+ndling of|
+ariables.|
+NCLUDE is|
+set, then|
+r-missing|
+alues are|
+ed in the|
+ions.  If|
+E is set,|
+
+E is set,|
+ch is the|
+ default,|
+r-missing|
+alues are|
+excluded.|
+         |
+         |
+         |
+         |
+         |
+---------+
+])
+AT_CLEANUP
diff --git a/tests/perl-module.at b/tests/perl-module.at
new file mode 100644 (file)
index 0000000..2be0370
--- /dev/null
@@ -0,0 +1,757 @@
+AT_BANNER([Perl module tests])
+
+dnl This command can be used to run with the PSPP Perl module after it has been
+dnl built (with "make") but before it has been installed.  The -I options are
+dnl equivalent to "use ExtUtils::testlib;" inside the Perl program, but it does
+dnl not need to be run with the perl-module build directory as the current
+dnl working directory.
+m4_define([RUN_PERL_MODULE],
+  [LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \
+   $PERL -I$abs_top_builddir/perl-module/blib/arch \
+         -I$abs_top_builddir/perl-module/blib/lib])
+
+AT_SETUP([Perl create system file])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+AT_DATA([test.pl],
+  [use warnings;
+   use strict;
+   use PSPP;
+
+   my $d = PSPP::Dict->new();
+   die "dictionary creation" if !ref $d;
+   die if $d->get_var_cnt () != 0;
+
+   $d->set_label ("My Dictionary");
+   $d->set_documents ("These Documents");
+
+   # Tests for variable creation
+
+   my $var0 = PSPP::Var->new ($d, "le");
+   die "trap illegal variable name" if ref $var0;
+   die if $d->get_var_cnt () != 0;
+
+   $var0 = PSPP::Var->new ($d, "legal");
+   die "accept legal variable name" if !ref $var0;
+   die if $d->get_var_cnt () != 1;
+
+   my $var1 = PSPP::Var->new ($d, "money", 
+                             (fmt=>PSPP::Fmt::DOLLAR,
+                              width=>4, decimals=>2) );
+   die "cappet valid format" if !ref $var1;
+   die if $d->get_var_cnt () != 2;
+
+   $d->set_weight ($var1);
+
+   my $sysfile = PSPP::Sysfile->new ('testfile.sav', $d);
+   die "create sysfile object" if !ref $sysfile;
+
+   $sysfile->close ();
+])
+AT_CHECK([RUN_PERL_MODULE test.pl])
+AT_DATA([dump-dict.sps],
+  [GET FILE='testfile.sav'.
+DISPLAY FILE LABEL.
+DISPLAY DOCUMENTS.
+DISPLAY DICTIONARY.
+SHOW WEIGHT.
+])
+AT_CHECK([pspp -O format=csv dump-dict.sps], [0],
+  [File label:
+
+My Dictionary
+
+Documents in the active file:
+
+These Documents
+
+Variable,Description,,Position
+legal,Format: F9.2,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+money,Format: DOLLAR6.2,,2
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
+dump-dict.sps:5: note: SHOW: WEIGHT is money.
+])
+AT_CLEANUP
+
+AT_SETUP([Perl writing cases to system files])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+AT_DATA([test.pl],
+  [[use warnings;
+    use strict;
+    use PSPP;
+
+    my $d = PSPP::Dict->new();
+    PSPP::Var->new ($d, "id",
+                   (
+                    fmt=>PSPP::Fmt::F, 
+                    width=>2, 
+                    decimals=>0
+                    )
+                   );
+
+    PSPP::Var->new ($d, "name",
+                          (
+                           fmt=>PSPP::Fmt::A, 
+                           width=>20, 
+                           )
+                          );
+
+    $d->set_documents ("This should not appear");
+    $d->clear_documents ();
+    $d->add_document ("This is a document line");
+
+    $d->set_label ("This is the file label");
+
+    # Check that we can write cases to system files.
+    my $sysfile = PSPP::Sysfile->new ("testfile.sav", $d);
+    my $res = $sysfile->append_case ( [34, "frederick"]);
+    die "append case" if !$res;
+
+    $res = $sysfile->append_case ( [34, "frederick", "extra"]);
+    die "append case with too many variables" if $res;
+    $sysfile->close ();
+
+    # Check that sysfiles are closed properly automaticallly in the destructor.
+    my $sysfile2 = PSPP::Sysfile->new ("testfile2.sav", $d);
+    $res = $sysfile2->append_case ( [21, "wheelbarrow"]);
+    die "append case 2" if !$res;
+
+    $res = $sysfile->append_case ( [34, "frederick", "extra"]);
+    die "append case with too many variables" if $res;
+
+    # Don't close.  We want to test that the destructor does that.
+]])
+AT_CHECK([RUN_PERL_MODULE test.pl])
+AT_DATA([dump-dicts.sps],
+  [GET FILE='testfile.sav'.
+DISPLAY DICTIONARY.
+DISPLAY FILE LABEL.
+DISPLAY DOCUMENTS.
+LIST.
+
+GET FILE='testfile2.sav'.
+DISPLAY DICTIONARY.
+DISPLAY FILE LABEL.
+DISPLAY DOCUMENTS.
+LIST.
+])
+AT_CHECK([pspp -O format=csv dump-dicts.sps], [0],
+  [Variable,Description,,Position
+id,Format: F2.0,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+name,Format: A20,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 20,,
+
+File label:
+
+This is the file label
+
+Documents in the active file:
+
+This is a document line
+
+Table: Data List
+id,name
+34,frederick           @&t@
+
+Variable,Description,,Position
+id,Format: F2.0,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+name,Format: A20,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 20,,
+
+File label:
+
+This is the file label
+
+Documents in the active file:
+
+This is a document line
+
+Table: Data List
+id,name
+21,wheelbarrow         @&t@
+])
+AT_CLEANUP
+
+AT_SETUP([Perl write variable parameters])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+AT_DATA([test.pl],
+  [[use warnings;
+    use strict;
+    use PSPP;
+
+    my $dict = PSPP::Dict->new();
+    die "dictionary creation" if !ref $dict;
+
+    my $int = PSPP::Var->new ($dict, "integer", 
+                             (width=>8, decimals=>0) );
+
+    $int->set_label ("My Integer");
+
+    $int->add_value_label (99, "Silly");
+    $int->clear_value_labels ();
+    $int->add_value_label (0, "Zero");
+    $int->add_value_label (1, "Unity");
+    $int->add_value_label (2, "Duality");
+
+    my $str = PSPP::Var->new ($dict, "string", 
+                             (fmt=>PSPP::Fmt::A, width=>8) );
+
+
+    $str->set_label ("My String");
+    $str->add_value_label ("xx", "foo");
+    $str->add_value_label ("yy", "bar");
+
+    $str->set_missing_values ("this", "that");
+
+    my $longstr = PSPP::Var->new ($dict, "longstring", 
+                             (fmt=>PSPP::Fmt::A, width=>9) );
+
+
+    $longstr->set_label ("My Long String");
+    my $re = $longstr->add_value_label ("xxx", "xfoo");
+
+    $int->set_missing_values (9, 99);
+
+    my $sysfile = PSPP::Sysfile->new ("testfile.sav", $dict);
+
+
+    $sysfile->close ();
+]])
+AT_CHECK([RUN_PERL_MODULE test.pl])
+AT_DATA([dump-dict.sps],
+  [GET FILE='testfile.sav'.
+DISPLAY DICTIONARY.
+])
+AT_CHECK([pspp -O format=csv dump-dict.sps], [0],
+  [Variable,Description,,Position
+integer,My Integer,,1
+,Format: F8.0,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+,Missing Values: 9; 99,,
+,0,Zero,
+,1,Unity,
+,2,Duality,
+string,My String,,2
+,Format: A8,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+,"Missing Values: ""this    ""; ""that    """,,
+,xx      ,foo,
+,yy      ,bar,
+longstring,My Long String,,3
+,Format: A9,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 9,,
+,xxx      ,xfoo,
+])
+AT_CLEANUP
+
+AT_SETUP([Perl dictionary survives system file])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+AT_DATA([test.pl],
+  [[use warnings;
+use strict;
+use PSPP;
+
+my $sysfile ;
+
+    {
+       my $d = PSPP::Dict->new();
+
+       PSPP::Var->new ($d, "id",
+                       (
+                        fmt=>PSPP::Fmt::F, 
+                        width=>2, 
+                        decimals=>0
+                        )
+                       );
+
+       $sysfile = PSPP::Sysfile->new ("testfile.sav", $d);
+    }
+
+    my $res = $sysfile->append_case ([3]);
+    print "Dictionary survives sysfile\n" if $res;
+]])
+AT_CHECK([RUN_PERL_MODULE test.pl], [0],
+  [Dictionary survives sysfile
+])
+AT_CLEANUP
+
+m4_define([PERL_GENERATE_SYSFILE],
+  [AT_DATA([sample.sps],
+    [[data list notable list /string (a8) longstring (a12) numeric (f10) date (date11) dollar (dollar8.2) datetime (datetime17)
+begin data.
+1111 One   1 1/1/1 1   1/1/1+01:01
+2222 Two   2 2/2/2 2   2/2/2+02:02
+3333 Three 3 3/3/3 3   3/3/3+03:03
+.    .     . .     .   .
+5555 Five  5 5/5/5 5   5/5/5+05:05
+end data.
+
+
+variable labels string 'A Short String Variable'
+  /longstring 'A Long String Variable'
+  /numeric 'A Numeric Variable'
+  /date 'A Date Variable'
+  /dollar 'A Dollar Variable'
+  /datetime 'A Datetime Variable'.
+
+
+missing values numeric (9, 5, 999).
+
+missing values string ("3333").
+
+add value labels
+  /string '1111' 'ones' '2222' 'twos' '3333' 'threes'
+  /numeric 1 'Unity' 2 'Duality' 3 'Thripality'.
+
+variable attribute
+    variables = numeric
+    attribute=colour[1]('blue') colour[2]('pink') colour[3]('violet')
+    attribute=size('large') nationality('foreign').
+
+
+save outfile='sample.sav'.
+]])
+   AT_CHECK([pspp -O format=csv sample.sps])])
+
+AT_SETUP([Perl read system file])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+PERL_GENERATE_SYSFILE
+AT_DATA([test.pl],
+  [[use warnings;
+    use strict;
+    use PSPP;
+
+    my $sf = PSPP::Reader->open ("sample.sav");
+
+    my $dict = $sf->get_dict ();
+
+    for (my $v = 0 ; $v < $dict->get_var_cnt() ; $v++)
+    {
+       my $var = $dict->get_var ($v);
+       my $name = $var->get_name ();
+       my $label = $var->get_label ();
+
+       print "Variable $v is \"$name\", label is \"$label\"\n";
+
+       my $vl = $var->get_value_labels ();
+
+       print "Value Labels:\n";
+       print "$_ => $vl->{$_}\n" for keys %$vl;
+    }
+
+    while (my @c = $sf->get_next_case () )
+    {
+       for (my $v = 0; $v < $dict->get_var_cnt(); $v++)
+       {
+          print "val$v: \"$c[$v]\"\n";
+       }
+       print "\n";
+    }
+]])
+AT_CHECK([RUN_PERL_MODULE test.pl], [0],
+  [Variable 0 is "string", label is "A Short String Variable"
+Value Labels:
+3333     => threes
+1111     => ones
+2222     => twos
+Variable 1 is "longstring", label is "A Long String Variable"
+Value Labels:
+Variable 2 is "numeric", label is "A Numeric Variable"
+Value Labels:
+1 => Unity
+3 => Thripality
+2 => Duality
+Variable 3 is "date", label is "A Date Variable"
+Value Labels:
+Variable 4 is "dollar", label is "A Dollar Variable"
+Value Labels:
+Variable 5 is "datetime", label is "A Datetime Variable"
+Value Labels:
+val0: "1111    "
+val1: "One         "
+val2: "1"
+val3: "13197686400"
+val4: "1"
+val5: "13197690060"
+
+val0: "2222    "
+val1: "Two         "
+val2: "2"
+val3: "13231987200"
+val4: "2"
+val5: "13231994520"
+
+val0: "3333    "
+val1: "Three       "
+val2: "3"
+val3: "13266028800"
+val4: "3"
+val5: "13266039780"
+
+val0: ".       "
+val1: ".           "
+val2: ""
+val3: ""
+val4: ""
+val5: ""
+
+val0: "5555    "
+val1: "Five        "
+val2: "5"
+val3: "13334630400"
+val4: "5"
+val5: "13334648700"
+
+])
+AT_CLEANUP
+
+AT_SETUP([Perl copying system files])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+PERL_GENERATE_SYSFILE
+AT_DATA([test.pl],
+  [[use warnings;
+    use strict;
+    use PSPP;
+
+    my $input = PSPP::Reader->open ("sample.sav");
+
+    my $dict = $input->get_dict ();
+
+    my $output = PSPP::Sysfile->new ("copy.sav", $dict);
+
+    while (my (@c) = $input->get_next_case () )
+    {
+      $output->append_case (\@c);
+    }
+
+    $output->close ();
+]])
+AT_CHECK([RUN_PERL_MODULE test.pl])
+AT_DATA([dump-dicts.sps],
+  [GET FILE='sample.sav'.
+DISPLAY DICTIONARY.
+LIST.
+
+GET FILE='copy.sav'.
+DISPLAY DICTIONARY.
+LIST.
+])
+AT_CHECK([pspp -O format=csv dump-dicts.sps], [0],
+  [[Variable,Description,,Position
+string,A Short String Variable,,1
+,Format: A8,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+,"Missing Values: ""3333    """,,
+,1111    ,ones,
+,2222    ,twos,
+,3333    ,threes,
+longstring,A Long String Variable,,2
+,Format: A12,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 12,,
+numeric,A Numeric Variable,,3
+,Format: F10.0,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+,Missing Values: 9; 5; 999,,
+,1,Unity,
+,2,Duality,
+,3,Thripality,
+,Custom attributes:,,
+,size,large,
+,nationality,foreign,
+,colour[1],blue,
+,colour[2],pink,
+,colour[3],violet,
+date,A Date Variable,,4
+,Format: DATE11,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+dollar,A Dollar Variable,,5
+,Format: DOLLAR11.2,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+datetime,A Datetime Variable,,6
+,Format: DATETIME17.0,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
+Table: Data List
+string,longstring,numeric,date,dollar,datetime
+1111    ,One         ,1,01-JAN-2001,$1.00,01-JAN-2001 01:01
+2222    ,Two         ,2,02-FEB-2002,$2.00,02-FEB-2002 02:02
+3333    ,Three       ,3,03-MAR-2003,$3.00,03-MAR-2003 03:03
+.       ,.           ,.,.,.  ,.
+5555    ,Five        ,5,05-MAY-2005,$5.00,05-MAY-2005 05:05
+
+Variable,Description,,Position
+string,A Short String Variable,,1
+,Format: A8,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 8,,
+,"Missing Values: ""3333    """,,
+,1111    ,ones,
+,2222    ,twos,
+,3333    ,threes,
+longstring,A Long String Variable,,2
+,Format: A12,,
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 12,,
+numeric,A Numeric Variable,,3
+,Format: F10.0,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+,Missing Values: 9; 5; 999,,
+,1,Unity,
+,2,Duality,
+,3,Thripality,
+,Custom attributes:,,
+,size,large,
+,nationality,foreign,
+,colour[1],blue,
+,colour[2],pink,
+,colour[3],violet,
+date,A Date Variable,,4
+,Format: DATE11,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+dollar,A Dollar Variable,,5
+,Format: DOLLAR11.2,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+datetime,A Datetime Variable,,6
+,Format: DATETIME17.0,,
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+
+Table: Data List
+string,longstring,numeric,date,dollar,datetime
+1111    ,One         ,1,01-JAN-2001,$1.00,01-JAN-2001 01:01
+2222    ,Two         ,2,02-FEB-2002,$2.00,02-FEB-2002 02:02
+3333    ,Three       ,3,03-MAR-2003,$3.00,03-MAR-2003 03:03
+.       ,.           ,.,.,.  ,.
+5555    ,Five        ,5,05-MAY-2005,$5.00,05-MAY-2005 05:05
+]])
+AT_CLEANUP
+
+AT_SETUP([Perl value formatting])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+AT_DATA([dd.sps],
+  [DATA LIST LIST /d (DATETIME17).
+BEGIN DATA.
+11/9/2001+08:20
+END DATA.
+
+SAVE OUTFILE='dd.sav'.
+])
+AT_CHECK([pspp -O format=csv dd.sps], [0],
+  [Table: Reading free-form data from INLINE.
+Variable,Format
+d,DATETIME17.0
+])
+AT_DATA([test.pl],
+  [[use warnings;
+    use strict;
+    use PSPP;
+
+    my $sf = PSPP::Reader->open ("dd.sav");
+
+    my $dict = $sf->get_dict ();
+
+    my (@c) = $sf->get_next_case ();
+
+    my $var = $dict->get_var (0);
+    my $val = $c[0];
+    my $formatted = PSPP::format_value ($val, $var);
+    my $str = gmtime ($val - PSPP::PERL_EPOCH);
+    print "Formatted string is \"$formatted\"\n";
+    print "Perl representation is \"$str\"\n";
+]])
+AT_CHECK([RUN_PERL_MODULE test.pl], [0],
+  [[Formatted string is "11-SEP-2001 08:20"
+Perl representation is "Tue Sep 11 08:20:00 2001"
+]])
+AT_CLEANUP
+
+AT_SETUP([Perl opening nonexistent file])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+AT_DATA([test.pl],
+  [[use warnings;
+    use strict;
+    use PSPP;
+
+    my $sf = PSPP::Reader->open ("no-such-file.sav");
+
+    die "Returns undef on opening failure" if ref $sf;
+    print $PSPP::errstr, "\n";
+]])
+AT_CHECK([RUN_PERL_MODULE test.pl], [0],
+  [[Error opening "no-such-file.sav" for reading as a system file: No such file or directory.
+]],
+  [[Name "PSPP::errstr" used only once: possible typo at test.pl line 8.
+]])
+AT_CLEANUP
+
+AT_SETUP([Perl missing values])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+PERL_GENERATE_SYSFILE
+AT_DATA([test.pl],
+  [[use warnings;
+    use strict;
+    use PSPP;
+
+    my $sf = PSPP::Reader->open ("sample.sav");
+
+    my $dict = $sf->get_dict ();
+
+    my (@c) = $sf->get_next_case ();
+
+    my $stringvar = $dict->get_var (0);
+    my $numericvar = $dict->get_var (2);
+    my $val = $c[0];
+
+    die "Missing Value Negative String"
+        if PSPP::value_is_missing ($val, $stringvar);
+
+    $val = $c[2];
+
+    die "Missing Value Negative Num"
+        if PSPP::value_is_missing ($val, $numericvar);
+
+    @c = $sf->get_next_case (); 
+    @c = $sf->get_next_case (); 
+
+    $val = $c[0];
+    die "Missing Value Positive"
+        if !PSPP::value_is_missing ($val, $stringvar);
+
+    @c = $sf->get_next_case (); 
+    $val = $c[2];
+    die "Missing Value Positive SYS"
+        if !PSPP::value_is_missing ($val, $numericvar);
+
+    @c = $sf->get_next_case (); 
+    $val = $c[2];
+    die "Missing Value Positive Num"
+        if !PSPP::value_is_missing ($val, $numericvar);
+]])
+AT_CHECK([RUN_PERL_MODULE test.pl])
+AT_CLEANUP
+
+AT_SETUP([Perl custom attributes])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+PERL_GENERATE_SYSFILE
+AT_DATA([test.pl],
+  [[use warnings;
+    use strict;
+    use PSPP;
+
+    my $sf = PSPP::Reader->open ("sample.sav");
+
+    my $dict = $sf->get_dict ();
+
+    my $var = $dict->get_var_by_name ("numeric");
+
+    my $attr = $var->get_attributes ();
+
+    foreach my $k (keys %$attr)
+    {
+       my $ll = $attr->{$k};
+       print "$k =>";
+       print map "$_\n", join ', ', @$ll;
+    }
+]])
+AT_CHECK([RUN_PERL_MODULE test.pl], [0],
+  [[colour =>blue, pink, violet
+nationality =>foreign
+size =>large
+]])
+AT_CLEANUP
+
+AT_SETUP([Perl Pspp.t])
+AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
+AT_CHECK([RUN_PERL_MODULE $abs_top_builddir/perl-module/t/Pspp.t], [0],
+  [[1..36
+ok 1 - use PSPP;
+ok 2 - Dictionary Creation
+ok 3
+ok 4 - Trap illegal variable name
+ok 5
+ok 6 - Accept legal variable name
+ok 7
+ok 8 - Trap duplicate variable name
+ok 9
+ok 10 - Accept valid format
+ok 11
+ok 12 - Create sysfile object
+ok 13 - Write system file
+ok 14 - Append Case
+ok 15 - Appending Case with too many variables
+ok 16 - existance
+ok 17 - Append Case 2
+ok 18 - existance2
+ok 19 - Check output
+ok 20 - Dictionary Creation 2
+ok 21 - Value label for short string
+ok 22 - Value label for long string
+ok 23 - Check output 2
+ok 24 - Dictionary survives sysfile
+ok 25 - Basic reader operation
+ok 26 - Streaming of files
+Formatted string is "11-SEP-2001 08:20"
+ok 27 - format_value function
+ok 28 - Perl representation of time
+ok 29 - Returns undef on opening failure
+ok 30 - Error string on open failure
+ok 31 - Missing Value Negative String
+ok 32 - Missing Value Negative Num
+ok 33 - Missing Value Positive
+ok 34 - Missing Value Positive SYS
+ok 35 - Missing Value Positive Num
+ok 36 - Custom Attributes
+]],
+  [[# @&t@
+# @@ -0,0 +1 @@
+# +
+# @@ -0,0 +1 @@
+# +
+# @@ -0,0 +1 @@
+# +
+# @@ -0,0 +1 @@
+# +
+]])
+AT_CLEANUP
diff --git a/tests/stats/descript-basic.sh b/tests/stats/descript-basic.sh
deleted file mode 100755 (executable)
index a1f4a64..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/bin/sh
-
-# This program tests that the descriptives command actually works
-
-TEMPDIR=/tmp/pspp-tst-$$
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TEMPDIR/descript.stat <<EOF
-title 'Test DESCRIPTIVES procedure'.
-
-data list / V0 to V16 1-17.
-begin data.
-12128989012389023
-34128080123890128
-56127781237893217
-78127378123793112
-90913781237892318
-37978547878935789
-52878237892378279
-12377912789378932
-26787654347894348
-29137178947891888
-end data.
-
-descript all/stat=all/format=serial.
-
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/descript.stat
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|V0      |     1|  1-  1|F1.0  |
-|V1      |     1|  2-  2|F1.0  |
-|V2      |     1|  3-  3|F1.0  |
-|V3      |     1|  4-  4|F1.0  |
-|V4      |     1|  5-  5|F1.0  |
-|V5      |     1|  6-  6|F1.0  |
-|V6      |     1|  7-  7|F1.0  |
-|V7      |     1|  8-  8|F1.0  |
-|V8      |     1|  9-  9|F1.0  |
-|V9      |     1| 10- 10|F1.0  |
-|V10     |     1| 11- 11|F1.0  |
-|V11     |     1| 12- 12|F1.0  |
-|V12     |     1| 13- 13|F1.0  |
-|V13     |     1| 14- 14|F1.0  |
-|V14     |     1| 15- 15|F1.0  |
-|V15     |     1| 16- 16|F1.0  |
-|V16     |     1| 17- 17|F1.0  |
-+--------+------+-------+------+
-2.1 DESCRIPTIVES.  Valid cases = 10; cases with missing value(s) = 0.
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
-|Variable#Valid N|Missing N|Mean|S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew|Range|Minimum|Maximum| Sum |
-#========#=======#=========#====#=========#=======#========#========#=========#========#=========#=====#=======#=======#=====#
-|V0      #     10|        0|3.80|      .84|   2.66|    7.07|    -.03|     1.33|     .89|      .69| 8.00|   1.00|   9.00|38.00|
-|V1      #     10|        0|4.60|      .96|   3.03|    9.16|   -1.39|     1.33|    -.03|      .69| 9.00|    .00|   9.00|46.00|
-|V2      #     10|        0|4.10|     1.16|   3.67|   13.43|   -2.02|     1.33|     .48|      .69| 8.00|   1.00|   9.00|41.00|
-|V3      #     10|        0|4.10|      .87|   2.77|    7.66|   -2.05|     1.33|     .42|      .69| 7.00|   1.00|   8.00|41.00|
-|V4      #     10|        0|7.00|      .47|   1.49|    2.22|    7.15|     1.33|   -2.52|      .69| 5.00|   3.00|   8.00|70.00|
-|V5      #     10|        0|4.90|     1.03|   3.25|   10.54|   -1.40|     1.33|    -.20|      .69| 9.00|    .00|   9.00|49.00|
-|V6      #     10|        0|5.90|      .80|   2.51|    6.32|    -.29|     1.33|    -.96|      .69| 7.00|   1.00|   8.00|59.00|
-|V7      #     10|        0|4.70|     1.10|   3.47|   12.01|   -1.99|     1.33|    -.16|      .69| 9.00|    .00|   9.00|47.00|
-|V8      #     10|        0|4.10|     1.10|   3.48|   12.10|   -1.93|     1.33|     .37|      .69| 9.00|    .00|   9.00|41.00|
-|V9      #     10|        0|4.30|      .87|   2.75|    7.57|    -.87|     1.33|     .73|      .69| 8.00|   1.00|   9.00|43.00|
-|V10     #     10|        0|5.50|      .85|   2.68|    7.17|   -1.84|     1.33|    -.33|      .69| 7.00|   2.00|   9.00|55.00|
-|V11     #     10|        0|6.50|      .78|   2.46|    6.06|   -1.28|     1.33|    -.89|      .69| 6.00|   3.00|   9.00|65.00|
-|V12     #     10|        0|7.90|      .60|   1.91|    3.66|    5.24|     1.33|   -2.21|      .69| 6.00|   3.00|   9.00|79.00|
-|V13     #     10|        0|4.30|      .99|   3.13|    9.79|   -1.25|     1.33|     .33|      .69| 9.00|    .00|   9.00|43.00|
-|V14     #     10|        0|3.60|     1.01|   3.20|   10.27|    -.96|     1.33|     .81|      .69| 9.00|    .00|   9.00|36.00|
-|V15     #     10|        0|3.70|      .92|   2.91|    8.46|   -1.35|     1.33|     .71|      .69| 7.00|   1.00|   8.00|37.00|
-|V16     #     10|        0|6.40|      .91|   2.88|    8.27|   -1.14|     1.33|    -.92|      .69| 7.00|   2.00|   9.00|64.00|
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass
diff --git a/tests/stats/descript-mean-bug.sh b/tests/stats/descript-mean-bug.sh
deleted file mode 100755 (executable)
index eb12331..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-
-# This program tests that DESCRIPTIVES asking for a mean only works,
-# which didn't at one point.
-
-TEMPDIR=/tmp/pspp-tst-$$
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TEMPDIR/descript.stat <<EOF
-SET FORMAT F8.3.
-
-data list notable / X 1.
-begin data.
-0
-1
-2
-3
-4
-5
-end data.
-
-descript all/stat=mean.
-
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/descript.stat
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 DESCRIPTIVES.  Valid cases = 6; cases with missing value(s) = 0.
-+--------#-+-----+
-|Variable#N| Mean|
-#========#=#=====#
-|X       #6|2.500|
-+--------#-+-----+
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass
diff --git a/tests/stats/descript-missing.sh b/tests/stats/descript-missing.sh
deleted file mode 100755 (executable)
index 9de2770..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/bin/sh
-
-# This program tests that the descriptives command actually works
-
-TEMPDIR=/tmp/pspp-tst-$$
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TEMPDIR/descript.stat <<EOF
-title 'Test DESCRIPTIVES procedure'.
-
-data list / V1 TO V3 1-3.
-mis val v1 to v3 (1).
-begin data.
-111
-   
- 1 
-1 1
-112
-123
-234
-end data.
-
-descript all/stat=all/format=serial.
-descript all/stat=all/format=serial/missing=include.
-descript all/stat=all/format=serial/missing=listwise.
-descript all/stat=all/format=serial/missing=listwise include.
-
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/descript.stat
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|V1      |     1|  1-  1|F1.0  |
-|V2      |     1|  2-  2|F1.0  |
-|V3      |     1|  3-  3|F1.0  |
-+--------+------+-------+------+
-2.1 DESCRIPTIVES.  Valid cases = 7; cases with missing value(s) = 6.
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+----+
-|Variable#Valid N|Missing N|Mean|S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew|Range|Minimum|Maximum| Sum|
-#========#=======#=========#====#=========#=======#========#========#=========#========#=========#=====#=======#=======#====#
-|V1      #      1|        6|2.00|      .  |    .  |     .  |     .  |      .  |     .  |      .  |  .00|   2.00|   2.00|2.00|
-|V2      #      2|        5|2.50|      .50|    .71|     .50|     .  |      .  |     .  |      .  | 1.00|   2.00|   3.00|5.00|
-|V3      #      3|        4|3.00|      .58|   1.00|    1.00|     .  |      .  |     .00|     1.22| 2.00|   2.00|   4.00|9.00|
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+----+
-3.1 DESCRIPTIVES.  Valid cases = 7; cases with missing value(s) = 3.
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
-|Variable#Valid N|Missing N|Mean|S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew|Range|Minimum|Maximum| Sum |
-#========#=======#=========#====#=========#=======#========#========#=========#========#=========#=====#=======#=======#=====#
-|V1      #      5|        2|1.20|      .20|    .45|     .20|    5.00|     2.00|    2.24|      .91| 1.00|   1.00|   2.00| 6.00|
-|V2      #      5|        2|1.60|      .40|    .89|     .80|     .31|     2.00|    1.26|      .91| 2.00|   1.00|   3.00| 8.00|
-|V3      #      5|        2|2.20|      .58|   1.30|    1.70|   -1.49|     2.00|     .54|      .91| 3.00|   1.00|   4.00|11.00|
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
-4.1 DESCRIPTIVES.  Valid cases = 1; cases with missing value(s) = 6.
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+----+
-|Variable#Valid N|Missing N|Mean|S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew|Range|Minimum|Maximum| Sum|
-#========#=======#=========#====#=========#=======#========#========#=========#========#=========#=====#=======#=======#====#
-|V1      #      1|        0|2.00|      .  |    .  |     .  |     .  |      .  |     .  |      .  |  .00|   2.00|   2.00|2.00|
-|V2      #      1|        0|3.00|      .  |    .  |     .  |     .  |      .  |     .  |      .  |  .00|   3.00|   3.00|3.00|
-|V3      #      1|        0|4.00|      .  |    .  |     .  |     .  |      .  |     .  |      .  |  .00|   4.00|   4.00|4.00|
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+----+
-5.1 DESCRIPTIVES.  Valid cases = 4; cases with missing value(s) = 3.
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
-|Variable#Valid N|Missing N|Mean|S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew|Range|Minimum|Maximum| Sum |
-#========#=======#=========#====#=========#=======#========#========#=========#========#=========#=====#=======#=======#=====#
-|V1      #      4|        0|1.25|      .25|    .50|     .25|    4.00|     2.62|    2.00|     1.01| 1.00|   1.00|   2.00| 5.00|
-|V2      #      4|        0|1.75|      .48|    .96|     .92|   -1.29|     2.62|     .85|     1.01| 2.00|   1.00|   3.00| 7.00|
-|V3      #      4|        0|2.50|      .65|   1.29|    1.67|   -1.20|     2.62|     .00|     1.01| 3.00|   1.00|   4.00|10.00|
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass
index 89854285a0f0cde4fc9b7ad801a7db58e9970249..5fc7c69092abda94fc73a93caab68c57e0c97fbb 100755 (executable)
@@ -84,7 +84,7 @@ sed < $TEMPDIR/moments-list-2p >> $TEMPDIR/moments-2p.stat \
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run two-pass program"
-$SUPERVISOR $PSPP --testing-mode \
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv \
         $TEMPDIR/moments-2p.stat >$TEMPDIR/moments-2p.err 2> $TEMPDIR/moments-2p.out
 
 activity="compare two-pass output"
@@ -98,7 +98,7 @@ sed < $TEMPDIR/moments-list-1p >> $TEMPDIR/moments-1p.stat \
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run one-pass program"
-$SUPERVISOR $PSPP --testing-mode \
+$SUPERVISOR $PSPP --testing-mode -o pspp.csv \
         $TEMPDIR/moments-1p.stat >$TEMPDIR/moments-1p.err 2> $TEMPDIR/moments-1p.out
 
 activity="compare one-pass output"
diff --git a/tests/stats/ntiles.sh b/tests/stats/ntiles.sh
deleted file mode 100755 (executable)
index dd00a36..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#! /bin/sh
-
-# Tests the NTILE subcommand of the frequencies command
-
-TEMPDIR=/tmp/pspp-tst-$$
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-
-i=1;
-
-activity="create program $i"
-cat > $TEMPDIR/prog.sps <<EOF
-DATA LIST LIST notable /x * .
-BEGIN DATA.
-1 
-2 
-3 
-4 
-5
-END DATA.
-
-FREQUENCIES 
-       VAR=x
-       /PERCENTILES = 0 25 33.333 50 66.666 75 100
-
-EOF
-if [ $? -ne 0 ] ; then no_result; fi
-
-activity="run program $i"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="move output"
-cp $TEMPDIR/pspp.list $TEMPDIR/list.ref
-if [ $? -ne 0 ] ; then no_result ; fi
-
-i=$[$i+1];
-
-activity="create program $i"
-cat > $TEMPDIR/prog.sps <<EOF
-DATA LIST LIST notable /x * .
-BEGIN DATA.
-1 
-2 
-3 
-4 
-5
-END DATA.
-
-FREQUENCIES 
-       VAR=x
-       /NTILES = 3
-       /NTILES = 4
-       .
-EOF
-if [ $? -ne 0 ] ; then no_result; fi
-
-activity="run program $i"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="compare output"
-diff $TEMPDIR/pspp.list $TEMPDIR/list.ref
-if [ $? -ne 0 ] ; then fail; fi
-
-
-pass;
diff --git a/tests/stats/percentiles-compatible.sh b/tests/stats/percentiles-compatible.sh
deleted file mode 100755 (executable)
index 9b17024..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-#! /bin/sh
-
-# Tests calculation of percentiles with the 
-# COMPATIBLE algorithm set.
-
-TEMPDIR=/tmp/pspp-tst-$$
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-
-i=1;
-
-activity="create program $i"
-cat > $TEMPDIR/prog.sps <<EOF
-DATA LIST LIST notable /X * .
-BEGIN DATA.
-1 
-2 
-3 
-4 
-5
-END DATA.
-
-FREQUENCIES 
-       VAR=x
-       /ALGORITHM=COMPATIBLE
-       /PERCENTILES = 0 25 50 75 100
-
-EOF
-if [ $? -ne 0 ] ; then no_result; fi
-
-activity="run program $i"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="compare output $i"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 FREQUENCIES.  X
-+-----------+--------+---------+--------+-------------+-----------+
-|Value Label|  Value |Frequency| Percent|Valid Percent|Cum Percent|
-#===========#========#=========#========#=============#===========#
-|           |    1.00|        1|   20.00|        20.00|      20.00|
-|           |    2.00|        1|   20.00|        20.00|      40.00|
-|           |    3.00|        1|   20.00|        20.00|      60.00|
-|           |    4.00|        1|   20.00|        20.00|      80.00|
-|           |    5.00|        1|   20.00|        20.00|     100.00|
-#===========#========#=========#========#=============#===========#
-|               Total|        5|   100.0|        100.0|           |
-+--------------------+---------+--------+-------------+-----------+
-+-----------------------+----+
-|N           Valid      |   5|
-|            Missing    |   0|
-|Mean                   |3.00|
-|Std Dev                |1.58|
-|Minimum                |1.00|
-|Maximum                |5.00|
-|Percentiles 0          |1.00|
-|            25         |1.50|
-|            50 (Median)|3.00|
-|            75         |4.50|
-|            100        |5.00|
-+-----------------------+----+
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass;
index 9ee5a8c9b7d084a74055e099afc61a97e457db5f..3de785bb46b229d510af787982ff5d127b24a1f0 100755 (executable)
@@ -81,37 +81,32 @@ EOF
 if [ $? -ne 0 ] ; then no_result; fi
 
 activity="run program $i"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/prog.sps
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output $i"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 FREQUENCIES.  X
-+-----------+--------+---------+--------+-------------+-----------+
-|Value Label|  Value |Frequency| Percent|Valid Percent|Cum Percent|
-#===========#========#=========#========#=============#===========#
-|           |    1.00|        1|   20.00|        20.00|      20.00|
-|           |    2.00|        1|   20.00|        20.00|      40.00|
-|           |    3.00|        1|   20.00|        20.00|      60.00|
-|           |    4.00|        1|   20.00|        20.00|      80.00|
-|           |    5.00|        1|   20.00|        20.00|     100.00|
-#===========#========#=========#========#=============#===========#
-|               Total|        5|   100.0|        100.0|           |
-+--------------------+---------+--------+-------------+-----------+
-+-----------------------+----+
-|N           Valid      |   5|
-|            Missing    |   0|
-|Mean                   |3.00|
-|Std Dev                |1.58|
-|Minimum                |1.00|
-|Maximum                |5.00|
-|Percentiles 0          |1.00|
-|            25         |2.00|
-|            50 (Median)|3.00|
-|            75         |4.00|
-|            100        |5.00|
-+-----------------------+----+
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,1,20.00,20.00,20.00
+,2.00,1,20.00,20.00,40.00
+,3.00,1,20.00,20.00,60.00
+,4.00,1,20.00,20.00,80.00
+,5.00,1,20.00,20.00,100.00
+Total,,5,100.0,100.0,
+
+Table: X
+N,Valid,5
+,Missing,0
+Mean,,3.00
+Std Dev,,1.58
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,2.00
+,50 (Median),3.00
+,75,4.00
+,100,5.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -143,37 +138,32 @@ if [ $? -ne 0 ] ; then no_result; fi
 
 
 activity="run program $i"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/prog.sps
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output $i"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 FREQUENCIES.  X
-+-----------+--------+---------+--------+-------------+-----------+
-|Value Label|  Value |Frequency| Percent|Valid Percent|Cum Percent|
-#===========#========#=========#========#=============#===========#
-|           |    1.00|     2.00|   20.00|        20.00|      20.00|
-|           |    2.00|     2.00|   20.00|        20.00|      40.00|
-|           |    3.00|     2.00|   20.00|        20.00|      60.00|
-|           |    4.00|     2.00|   20.00|        20.00|      80.00|
-|           |    5.00|     2.00|   20.00|        20.00|     100.00|
-#===========#========#=========#========#=============#===========#
-|               Total|    10.00|   100.0|        100.0|           |
-+--------------------+---------+--------+-------------+-----------+
-+-----------------------+-----+
-|N           Valid      |10.00|
-|            Missing    |  .00|
-|Mean                   | 3.00|
-|Std Dev                | 1.49|
-|Minimum                | 1.00|
-|Maximum                | 5.00|
-|Percentiles 0          | 1.00|
-|            25         | 2.00|
-|            50 (Median)| 3.00|
-|            75         | 4.00|
-|            100        | 5.00|
-+-----------------------+-----+
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,2.00,20.00,20.00,20.00
+,2.00,2.00,20.00,20.00,40.00
+,3.00,2.00,20.00,20.00,60.00
+,4.00,2.00,20.00,20.00,80.00
+,5.00,2.00,20.00,20.00,100.00
+Total,,10.00,100.0,100.0,
+
+Table: X
+N,Valid,10.00
+,Missing,.00
+Mean,,3.00
+Std Dev,,1.49
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,2.00
+,50 (Median),3.00
+,75,4.00
+,100,5.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -203,36 +193,31 @@ if [ $? -ne 0 ] ; then no_result; fi
 
 
 activity="run program $i"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/prog.sps
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output $i"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - <<EOF
-1.1 FREQUENCIES.  X
-+-----------+--------+---------+--------+-------------+-----------+
-|Value Label|  Value |Frequency| Percent|Valid Percent|Cum Percent|
-#===========#========#=========#========#=============#===========#
-|           |    1.00|     1.00|   16.67|        16.67|      16.67|
-|           |    3.00|     2.00|   33.33|        33.33|      50.00|
-|           |    4.00|     1.00|   16.67|        16.67|      66.67|
-|           |    5.00|     2.00|   33.33|        33.33|     100.00|
-#===========#========#=========#========#=============#===========#
-|               Total|     6.00|   100.0|        100.0|           |
-+--------------------+---------+--------+-------------+-----------+
-+-----------------------+----+
-|N           Valid      |6.00|
-|            Missing    | .00|
-|Mean                   |3.50|
-|Std Dev                |1.52|
-|Minimum                |1.00|
-|Maximum                |5.00|
-|Percentiles 0          |1.00|
-|            25         |3.00|
-|            50 (Median)|3.50|
-|            75         |4.75|
-|            100        |5.00|
-+-----------------------+----+
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,1.00,16.67,16.67,16.67
+,3.00,2.00,33.33,33.33,50.00
+,4.00,1.00,16.67,16.67,66.67
+,5.00,2.00,33.33,33.33,100.00
+Total,,6.00,100.0,100.0,
+
+Table: X
+N,Valid,6.00
+,Missing,.00
+Mean,,3.50
+Std Dev,,1.52
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,3.00
+,50 (Median),3.50
+,75,4.75
+,100,5.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
@@ -262,37 +247,32 @@ if [ $? -ne 0 ] ; then no_result; fi
 
 
 activity="run program $i"
-$SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
+$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/prog.sps
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output $i"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 FREQUENCIES.  X
-+-----------+--------+---------+--------+-------------+-----------+
-|Value Label|  Value |Frequency| Percent|Valid Percent|Cum Percent|
-#===========#========#=========#========#=============#===========#
-|           |    1.00|     1.00|   10.00|        16.67|      16.67|
-|           |    3.00|     2.00|   20.00|        33.33|      50.00|
-|           |    4.00|     1.00|   10.00|        16.67|      66.67|
-|           |    5.00|     2.00|   20.00|        33.33|     100.00|
-|           |   99.00|     4.00|   40.00|      Missing|           |
-#===========#========#=========#========#=============#===========#
-|               Total|    10.00|   100.0|        100.0|           |
-+--------------------+---------+--------+-------------+-----------+
-+-----------------------+----+
-|N           Valid      |6.00|
-|            Missing    |4.00|
-|Mean                   |3.50|
-|Std Dev                |1.52|
-|Minimum                |1.00|
-|Maximum                |5.00|
-|Percentiles 0          |1.00|
-|            25         |3.00|
-|            50 (Median)|3.50|
-|            75         |4.75|
-|            100        |5.00|
-+-----------------------+----+
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Table: X
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,1.00,1.00,10.00,16.67,16.67
+,3.00,2.00,20.00,33.33,50.00
+,4.00,1.00,10.00,16.67,66.67
+,5.00,2.00,20.00,33.33,100.00
+,99.00,4.00,40.00,Missing,
+Total,,10.00,100.0,100.0,
+
+Table: X
+N,Valid,6.00
+,Missing,4.00
+Mean,,3.50
+Std Dev,,1.52
+Minimum,,1.00
+Maximum,,5.00
+Percentiles,0,1.00
+,25,3.00
+,50 (Median),3.50
+,75,4.75
+,100,5.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
index 5c996621ebd3130db798823dd2540fa9f147f6ee..41f00bce4da949340e767891badb24124092fb87 100755 (executable)
@@ -62,7 +62,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
diff --git a/tests/testsuite.at b/tests/testsuite.at
new file mode 100644 (file)
index 0000000..8b328f4
--- /dev/null
@@ -0,0 +1,19 @@
+AT_INIT
+
+# Define SKIP_IF for compatibility with Autotest before 2.64
+m4_ifndef([AT_SKIP_IF],
+  [m4_define([AT_SKIP_IF],
+     [AT_CHECK([($1) \
+&& exit 77 || exit 0], [0], [ignore], [ignore])])])
+
+m4_include([tests/language/dictionary/mrsets.at])
+m4_include([tests/language/stats/aggregate.at])
+m4_include([tests/language/stats/autorecode.at])
+m4_include([tests/language/stats/crosstabs.at])
+m4_include([tests/language/stats/descriptives.at])
+m4_include([tests/language/stats/factor.at])
+m4_include([tests/language/stats/frequencies.at])
+m4_include([tests/language/xforms/compute.at])
+m4_include([tests/language/xforms/recode.at])
+m4_include([tests/output/render.at])
+m4_include([tests/perl-module.at])
diff --git a/tests/xforms/recode.sh b/tests/xforms/recode.sh
deleted file mode 100755 (executable)
index ae29cc4..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-#!/bin/sh
-
-# This program tests the RECODE command
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-
-# ensure that top_builddir  are absolute
-if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
-if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
-top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
-
-# ensure that top_srcdir is absolute
-top_srcdir=`cd $top_srcdir; pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-LANG=C
-export LANG
-
-cleanup()
-{
-     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
-       echo "NOT cleaning $TEMPDIR" 
-       return ; 
-     fi
-     cd /
-     rm -rf $TEMPDIR
-}
-
-
-fail()
-{
-    echo $activity
-    echo FAILED
-    cleanup;
-    exit 1;
-}
-
-
-no_result()
-{
-    echo $activity
-    echo NO RESULT;
-    cleanup;
-    exit 2;
-}
-
-pass()
-{
-    cleanup;
-    exit 0;
-}
-
-mkdir -p $TEMPDIR
-
-cd $TEMPDIR
-
-activity="create program"
-cat > $TESTFILE <<EOF
-DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10).
-MISSING VALUES x(9)/s('xxx').
-BEGIN DATA.
-0, '', ''
-1, a, a
-2, ab, ab
-3, abc, abc
-4, abcd, abcd
-5, 123, 123
-6, ' 123', ' 123'
-7, +1, +1
-8, 1x, 1x
-9, abcd, abcdefghi
-,  xxx, abcdefghij
-END DATA.
-
-* Numeric to numeric, without INTO.
-NUMERIC x0 TO x8 (F3).
-MISSING VALUES x0 to x8 (9).
-COMPUTE x0=value(x).
-RECODE x0 (1=9).
-COMPUTE x1=value(x).
-RECODE x1 (1=9)(3=8)(5=7).
-COMPUTE x2=value(x).
-RECODE x2 (1=8)(2,3,4,5,6,8=9)(9=1).
-COMPUTE x3=value(x).
-RECODE x3 (1 THRU 9=10)(MISSING=11).
-COMPUTE x4=value(x).
-RECODE x4 (MISSING=11)(1 THRU 9=10).
-COMPUTE x5=value(x).
-RECODE x5 (LOWEST THRU 5=1).
-COMPUTE x6=value(x).
-RECODE x6 (4 THRU HIGHEST=2).
-COMPUTE x7=value(x).
-RECODE x7 (LO THRU HI=3).
-COMPUTE x8=value(x).
-RECODE x8 (SYSMIS=4).
-LIST x x0 TO x8.
-
-* Numeric to numeric, with INTO, without COPY.
-NUMERIC ix0 TO ix8 (F3).
-RECODE x (1=9) INTO ix0.
-RECODE x (1=9)(3=8)(5=7) INTO ix1.
-RECODE x (1=8)(2,3,4,5,6,8=9)(9=1) INTO ix2.
-RECODE x (1 THRU 9=10)(MISSING=11) INTO ix3.
-RECODE x (MISSING=11)(1 THRU 9=10) INTO ix4.
-RECODE x (LOWEST THRU 5=1) INTO ix5.
-RECODE x (4 THRU HIGHEST=2) INTO ix6.
-RECODE x (LO THRU HI=3) INTO ix7.
-RECODE x (SYSMIS=4) INTO ix8.
-LIST x ix0 TO ix8.
-
-* Numeric to numeric, with INTO, with COPY.
-NUMERIC cx0 TO cx8 (F3).
-RECODE x (1=9)(ELSE=COPY) INTO cx0.
-RECODE x (1=9)(3=8)(5=7)(ELSE=COPY) INTO cx1.
-RECODE x (1=8)(2,3,4,5,6,8=9)(9=1)(ELSE=COPY) INTO cx2.
-RECODE x (1 THRU 9=10)(MISSING=11)(ELSE=COPY) INTO cx3.
-RECODE x (MISSING=11)(1 THRU 9=10)(ELSE=COPY) INTO cx4.
-RECODE x (LOWEST THRU 5=1)(ELSE=COPY) INTO cx5.
-RECODE x (4 THRU HIGHEST=2)(ELSE=COPY) INTO cx6.
-RECODE x (LO THRU HI=3)(ELSE=COPY) INTO cx7.
-RECODE x (SYSMIS=4)(ELSE=COPY) INTO cx8.
-RECODE x (5=COPY)(ELSE=22) INTO cx9.
-LIST x cx0 TO cx9.
-
-* String to string, with INTO, without COPY.
-STRING s0 TO s3 (A4)/t0 TO t3 (A10).
-RECODE s t ('a'='b')('ab'='bc') INTO s0 t0.
-RECODE s t ('abcd'='xyzw') INTO s1 t1.
-RECODE s t ('abc'='def')(ELSE='xyz') INTO s2 t2.
-RECODE t ('a'='b')('abcdefghi'='xyz')('abcdefghij'='jklmnopqr') INTO t3.
-RECODE s (MISSING='gone') INTO s3.
-LIST s t s0 TO s3 t0 TO t3.
-
-* String to string, with INTO, with COPY.
-STRING cs0 TO cs2 (A4)/ct0 TO ct3 (A10).
-RECODE s t ('a'='b')('ab'='bc')(ELSE=COPY) INTO cs0 ct0.
-RECODE s t ('abcd'='xyzw')(ELSE=COPY) INTO cs1 ct1.
-RECODE s t ('abc'='def')(ELSE='xyz')(ELSE=COPY) INTO cs2 ct2.
-RECODE t ('a'='b')('abcdefghi'='xyz')('abcdefghij'='jklmnopqr')(ELSE=COPY)
-    INTO ct3.
-LIST s t cs0 TO cs2 ct0 TO ct3.
-
-* String to numeric.
-NUMERIC ns0 TO ns2 (F3)/nt0 TO nt2 (F3).
-RECODE s t (CONVERT)(' '=0)('abcd'=1) INTO ns0 nt0.
-RECODE s t (' '=0)(CONVERT)('abcd'=1) INTO ns1 nt1.
-RECODE s t ('1x'=1)('abcd'=2)(ELSE=3) INTO ns2 nt2.
-LIST s t ns0 TO ns2 nt0 TO nt2.
-
-* Numeric to string.
-STRING sx0 TO sx2 (a10).
-RECODE x (1 THRU 9='abcdefghij') INTO sx0.
-RECODE x (0,1,3,5,7,MISSING='xxx') INTO sx1.
-RECODE x (2 THRU 6,SYSMIS='xyz')(ELSE='foobar') INTO sx2.
-LIST x sx0 TO sx2.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="test output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -bu $TEMPDIR/pspp.list - <<EOF
-x  x0  x1  x2  x3  x4  x5  x6  x7  x8
-- --- --- --- --- --- --- --- --- ---
-0   0   0   0   0   0   1   0   3   0 
-1   9   9   8  10  10   1   1   3   1 
-2   2   2   9  10  10   1   2   3   2 
-3   3   8   9  10  10   1   3   3   3 
-4   4   4   9  10  10   1   2   3   4 
-5   5   7   9  10  10   1   2   3   5 
-6   6   6   9  10  10   6   2   3   6 
-7   7   7   7  10  10   7   2   3   7 
-8   8   8   9  10  10   8   2   3   8 
-9   9   9   1  10  11   9   2   3   9 
-.   .   .   .  11  11   .   .   .   4 
-x ix0 ix1 ix2 ix3 ix4 ix5 ix6 ix7 ix8
-- --- --- --- --- --- --- --- --- ---
-0   .   .   .   .   .   1   .   3   . 
-1   9   9   8  10  10   1   .   3   . 
-2   .   .   9  10  10   1   .   3   . 
-3   .   8   9  10  10   1   .   3   . 
-4   .   .   9  10  10   1   2   3   . 
-5   .   7   9  10  10   1   2   3   . 
-6   .   .   9  10  10   .   2   3   . 
-7   .   .   .  10  10   .   2   3   . 
-8   .   .   9  10  10   .   2   3   . 
-9   .   .   1  10  11   .   2   3   . 
-.   .   .   .  11  11   .   .   .   4 
-x cx0 cx1 cx2 cx3 cx4 cx5 cx6 cx7 cx8      cx9
-- --- --- --- --- --- --- --- --- --- --------
-0   0   0   0   0   0   1   0   3   0    22.00 
-1   9   9   8  10  10   1   1   3   1    22.00 
-2   2   2   9  10  10   1   2   3   2    22.00 
-3   3   8   9  10  10   1   3   3   3    22.00 
-4   4   4   9  10  10   1   2   3   4    22.00 
-5   5   7   9  10  10   1   2   3   5     5.00 
-6   6   6   9  10  10   6   2   3   6    22.00 
-7   7   7   7  10  10   7   2   3   7    22.00 
-8   8   8   9  10  10   8   2   3   8    22.00 
-9   9   9   1  10  11   9   2   3   9    22.00 
-.   .   .   .  11  11   .   .   .   4    22.00 
-   s          t   s0   s1   s2   s3         t0         t1         t2         t3
----- ---------- ---- ---- ---- ---- ---------- ---------- ---------- ----------
-                          xyz                             xyz                   
-a    a          b         xyz       b                     xyz        b          
-ab   ab         bc        xyz       bc                    xyz                   
-abc  abc                  def                             def                   
-abcd abcd            xyzw xyz                  xyzw       xyz                   
-123  123                  xyz                             xyz                   
- 123  123                 xyz                             xyz                   
-+1   +1                   xyz                             xyz                   
-1x   1x                   xyz                             xyz                   
-abcd abcdefghi       xyzw xyz                             xyz        xyz        
-xxx  abcdefghij           xyz  gone                       xyz        jklmnopqr  
-   s          t  cs0  cs1  cs2        ct0        ct1        ct2        ct3
----- ---------- ---- ---- ---- ---------- ---------- ---------- ----------
-                          xyz                        xyz                   
-a    a          b    a    xyz  b          a          xyz        b          
-ab   ab         bc   ab   xyz  bc         ab         xyz        ab         
-abc  abc        abc  abc  def  abc        abc        def        abc        
-abcd abcd       abcd xyzw xyz  abcd       xyzw       xyz        abcd       
-123  123        123  123  xyz  123        123        xyz        123        
- 123  123        123  123 xyz   123        123       xyz         123       
-+1   +1         +1   +1   xyz  +1         +1         xyz        +1         
-1x   1x         1x   1x   xyz  1x         1x         xyz        1x         
-abcd abcdefghi  abcd xyzw xyz  abcdefghi  abcdefghi  xyz        xyz        
-xxx  abcdefghij xxx  xxx  xyz  abcdefghij abcdefghij xyz        jklmnopqr  
-   s          t ns0 ns1 ns2 nt0 nt1 nt2
----- ---------- --- --- --- --- --- ---
-                  .   0   3   .   0   3 
-a    a            .   .   3   .   .   3 
-ab   ab           .   .   3   .   .   3 
-abc  abc          .   .   3   .   .   3 
-abcd abcd         1   1   2   1   1   2 
-123  123        123 123   3 123 123   3 
- 123  123       123 123   3 123 123   3 
-+1   +1           1   1   3   1   1   3 
-1x   1x           .   .   1   .   .   1 
-abcd abcdefghi    1   1   2   .   .   3 
-xxx  abcdefghij   .   .   3   .   .   3 
-x        sx0        sx1        sx2
-- ---------- ---------- ----------
-0            xxx        foobar     
-1 abcdefghij xxx        foobar     
-2 abcdefghij            xyz        
-3 abcdefghij xxx        xyz        
-4 abcdefghij            xyz        
-5 abcdefghij xxx        xyz        
-6 abcdefghij            xyz        
-7 abcdefghij xxx        foobar     
-8 abcdefghij            foobar     
-9 abcdefghij xxx        foobar     
-.            xxx        xyz        
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-pass
-
-
-