pspp
4 years agoAUTORECODE: Implement PRINT subcommand.
Ben Pfaff [Sat, 5 Oct 2019 03:18:18 +0000 (03:18 +0000)]
AUTORECODE: Implement PRINT subcommand.

4 years agoAUTORECODE: Use minimum width output format for new variables.
Ben Pfaff [Mon, 2 Sep 2019 06:53:23 +0000 (06:53 +0000)]
AUTORECODE: Use minimum width output format for new variables.

The target variables don't need any decimals, since they are always
integers, and only need to be as wide as their largest value, which is
known in advance.

4 years agoAUTORECODE: Style update.
Ben Pfaff [Mon, 2 Sep 2019 06:43:50 +0000 (06:43 +0000)]
AUTORECODE: Style update.

4 years agoAUTORECODE: Properly handle variable labels.
Ben Pfaff [Mon, 2 Sep 2019 06:37:19 +0000 (06:37 +0000)]
AUTORECODE: Properly handle variable labels.

4 years agoAUTORECODE: Properly handle value labels.
Ben Pfaff [Mon, 2 Sep 2019 06:37:02 +0000 (06:37 +0000)]
AUTORECODE: Properly handle value labels.

Value labels are supposed to be copied from source variables, where they
are present.  Also, it's better to format the source values using the
print format rather than just assuming that %g is the right format.

4 years agovariable: New function var_append_value_name__().
Ben Pfaff [Mon, 2 Sep 2019 06:28:08 +0000 (06:28 +0000)]
variable: New function var_append_value_name__().

This variation on var_append_value_name() allows the caller to pass in the
parameter specifying how to show the value, which will be useful in an
upcoming commit.

4 years agovariable: Make var_append_value_name() omit trailing white space.
Ben Pfaff [Mon, 2 Sep 2019 06:27:11 +0000 (06:27 +0000)]
variable: Make var_append_value_name() omit trailing white space.

This seems to be desirable in the cases where it's actually used.  It only
affects one test case in the current testsuite, but it's an improvement for
an upcoming change too.

4 years agoAUTORECODE: Fix whitespace.
Ben Pfaff [Mon, 2 Sep 2019 05:18:58 +0000 (05:18 +0000)]
AUTORECODE: Fix whitespace.

A previous commit introduced tab indentation.  Oops.

4 years agoAUTORECODE: Fix treatment of missing values.
Ben Pfaff [Mon, 2 Sep 2019 05:14:52 +0000 (05:14 +0000)]
AUTORECODE: Fix treatment of missing values.

User-missing values are supposed to be recoded to a separate range above
the non-missing values.  The system-missing value is supposed to not be
recoded at all.  This fixes and documents that behavior.

4 years agoINSTALL: Mention that Python 3 is supported.
Ben Pfaff [Sun, 1 Sep 2019 19:45:48 +0000 (19:45 +0000)]
INSTALL: Mention that Python 3 is supported.

It worked fine but the INSTALL doc claimed that it didn't.

4 years agoAUTORECODE: Do not create value labels when they would be empty.
Ben Pfaff [Sun, 1 Sep 2019 19:23:02 +0000 (19:23 +0000)]
AUTORECODE: Do not create value labels when they would be empty.

4 years agoAUTORECODE: Code style update.
Ben Pfaff [Sun, 1 Sep 2019 18:13:21 +0000 (18:13 +0000)]
AUTORECODE: Code style update.

4 years agoAUTORECODE: Make GROUP option work properly with multi-length strings.
Ben Pfaff [Sun, 21 Jul 2019 01:44:09 +0000 (18:44 -0700)]
AUTORECODE: Make GROUP option work properly with multi-length strings.

When GROUP is used, all of the variables are supposed to be put into a
single table.  The implementation assumed in practice that, for string
variables, all of the strings were the same width, which caused problems.
This commit fixes the problem and updates the test to match.

4 years ago/RENAME subcommand: Allow quoted strings in destination variables.
John Darrington [Sun, 18 Aug 2019 12:26:32 +0000 (14:26 +0200)]
/RENAME subcommand: Allow quoted strings in destination variables.

Allow syntax like /RENAME = old = "new var" old2 = "another new var".

Fixes bug #56771

4 years agoperl-module: Add copyright and licence notices to all files
John Darrington [Sat, 17 Aug 2019 08:24:51 +0000 (10:24 +0200)]
perl-module: Add copyright and licence notices to all files

4 years agoDescriptives: Constness
John Darrington [Thu, 25 Jul 2019 14:46:16 +0000 (16:46 +0200)]
Descriptives: Constness

4 years agoPivot Table: Fix compiler warning.
John Darrington [Mon, 22 Jul 2019 18:48:42 +0000 (20:48 +0200)]
Pivot Table: Fix compiler warning.

Revert part of commit 9bd8bde378997bf189e6aceffe3da5d321d0a837 .
This was ill construed, because the footnote is owned by the pivot table.

4 years agopivot_table: Constness
John Darrington [Tue, 16 Jul 2019 19:31:45 +0000 (21:31 +0200)]
pivot_table: Constness

4 years agoperl-module: Add copyright and licence notices
John Darrington [Sat, 13 Jul 2019 18:57:43 +0000 (20:57 +0200)]
perl-module: Add copyright and licence notices

4 years agodoc/dev/*.texi: Add copyright and licence notices
John Darrington [Sat, 13 Jul 2019 18:33:22 +0000 (20:33 +0200)]
doc/dev/*.texi: Add copyright and licence notices

4 years agodoc/automake.mk: Add copyright and licence notice
John Darrington [Sat, 13 Jul 2019 10:36:22 +0000 (12:36 +0200)]
doc/automake.mk: Add copyright and licence notice

4 years agoAdd copyright and licence notice to Makefile.am
John Darrington [Sat, 13 Jul 2019 09:05:15 +0000 (11:05 +0200)]
Add copyright and licence notice to Makefile.am

4 years agovalue: Get rid of value_str(), value_str_rw(), value_num().
Ben Pfaff [Mon, 22 Jul 2019 00:16:36 +0000 (17:16 -0700)]
value: Get rid of value_str(), value_str_rw(), value_num().

These can now all be replaced now by plain ->s or ->f, which is
shorter and clearer anyway.

4 years agovalue: Drop distinction between long and short string values.
Ben Pfaff [Sun, 21 Jul 2019 02:18:53 +0000 (19:18 -0700)]
value: Drop distinction between long and short string values.

The time has passed when this is a super valuable distinction.  There is
basically no distinction in the language itself anymore, the efficiency
gains sound pretty marginal, and the differences lead to bugs, both
correctness- and memory leak-wise, that are hard to test for (because the
developer must make sure to test both short and long strings everywhere).
This commit changes the code so that both short and long strings are
represented the way that long strings were previously.

4 years agot-test-parser: Re-fix memory leak.
Ben Pfaff [Mon, 22 Jul 2019 00:16:07 +0000 (17:16 -0700)]
t-test-parser: Re-fix memory leak.

I managed to screw this up in untabification.

Fixes: 759791b6dee8 ("t-test-parser: Untabify.")
4 years agoperl-module: Init and destroy for long strings in set_missing_values().
Ben Pfaff [Sun, 21 Jul 2019 18:27:19 +0000 (11:27 -0700)]
perl-module: Init and destroy for long strings in set_missing_values().

Otherwise long strings segfault.

4 years agot-test-parser: Untabify.
Ben Pfaff [Sun, 21 Jul 2019 17:34:39 +0000 (10:34 -0700)]
t-test-parser: Untabify.

This file was inconsistent on tabs versus spaces.  Usually we use spaces
in PSPP.

4 years agot-test-parser: Force values to be specified with a string vars on GROUPS.
Ben Pfaff [Sun, 21 Jul 2019 17:34:23 +0000 (10:34 -0700)]
t-test-parser: Force values to be specified with a string vars on GROUPS.

4 years agot-test-parser: Fix memory leak with GROUPS and long strings.
Ben Pfaff [Sun, 21 Jul 2019 17:29:56 +0000 (10:29 -0700)]
t-test-parser: Fix memory leak with GROUPS and long strings.

4 years agocategoricals: Fix memory leak allocating long string categoricals.
Ben Pfaff [Sun, 21 Jul 2019 17:07:15 +0000 (10:07 -0700)]
categoricals: Fix memory leak allocating long string categoricals.

4 years agoshapiro-wilk: Fix memory leak.
Ben Pfaff [Sun, 21 Jul 2019 04:34:41 +0000 (21:34 -0700)]
shapiro-wilk: Fix memory leak.

CC: John Darrington <john@darrington.wattle.id.au>
Fixes: 0b7e8882ce9b ("EXAMINE: Implement the Shapiro-Wilk Test.")
4 years agoEXAMINE: Fix leak in Shapiro-Wilk test.
Ben Pfaff [Sun, 21 Jul 2019 02:58:56 +0000 (19:58 -0700)]
EXAMINE: Fix leak in Shapiro-Wilk test.

CC: John Darrington <john@darrington.wattle.id.au>
Fixes: 0b7e8882ce9b ("EXAMINE: Implement the Shapiro-Wilk Test.")
4 years agoAUTORECODE: Declare index variables inside 'for' loops.
Ben Pfaff [Sun, 7 Jul 2019 20:37:18 +0000 (13:37 -0700)]
AUTORECODE: Declare index variables inside 'for' loops.

Just a style update.

4 years agoABOUT-NLS: Update to most recent version from gettext-0.20
John Darrington [Fri, 12 Jul 2019 10:54:30 +0000 (12:54 +0200)]
ABOUT-NLS: Update to most recent version from gettext-0.20

4 years agoAUTORECODE: Always report parse errors.
Ben Pfaff [Sun, 7 Jul 2019 18:48:22 +0000 (11:48 -0700)]
AUTORECODE: Always report parse errors.

The code didn't always report syntax errors that it found.

4 years agolexer: Make lex_error_expecting() easier to use.
Ben Pfaff [Sun, 7 Jul 2019 18:44:43 +0000 (11:44 -0700)]
lexer: Make lex_error_expecting() easier to use.

With this change, the caller doesn't have to explicitly supply the null
sentinel since the macro does it automatically.

4 years agopivot-table: Properly allocate pivot_table's current_layer.
Ben Pfaff [Sun, 7 Jul 2019 04:36:59 +0000 (21:36 -0700)]
pivot-table: Properly allocate pivot_table's current_layer.

The default current_layer should be all-zeros, but the code wasn't
allocating current_layer at all.  This didn't cause much of a problem
because nothing in the current tree allocates layers, but it will as
layers are added.

Thanks to John Darrington for reporting the bug.

4 years agosystem-file-format.texi: Correct typo.
Ben Pfaff [Sun, 7 Jul 2019 02:12:01 +0000 (19:12 -0700)]
system-file-format.texi: Correct typo.

Bug #56547.

4 years agoREADME.Git: Advance to Gnulib commit 9ce9be2ef0cb ("autoupdate").
Ben Pfaff [Thu, 4 Jul 2019 23:23:06 +0000 (16:23 -0700)]
README.Git: Advance to Gnulib commit 9ce9be2ef0cb ("autoupdate").

A recent commit to PSPP depended on a more recent version of Gnulib that
includes Gnulib commit 3cd207e1d0fd ("fatal-signal: Pass the signal number
to the action.") but the PSPP commit did not actually advance the Gnulib
dependency to that commit.  This commit does that (actually it advances to
Gnulib tip of master).

Fixes: 21d2449f801c ("unlink_replace_files: Change signature to avoid compiler warning.")
4 years agoRemove UNUSED attributes where they were inappropriate.
John Darrington [Wed, 3 Jul 2019 18:01:30 +0000 (20:01 +0200)]
Remove UNUSED attributes where they were inappropriate.

These parameters were marked UNUSED, when they were in fact,
used.

4 years agoRecent to GTK+3.22
John Darrington [Mon, 1 Jul 2019 19:18:49 +0000 (21:18 +0200)]
Recent to GTK+3.22

4 years agomeans-calc.c: Add comments where needed.
John Darrington [Tue, 2 Jul 2019 16:29:42 +0000 (18:29 +0200)]
means-calc.c: Add comments where needed.

4 years agoApply Dictionary: Fix memory leak.
John Darrington [Sun, 30 Jun 2019 09:17:15 +0000 (11:17 +0200)]
Apply Dictionary: Fix memory leak.

4 years agoAdded test for the APPLY DICTIONARY command.
John Darrington [Sun, 30 Jun 2019 08:23:44 +0000 (10:23 +0200)]
Added test for the APPLY DICTIONARY command.

There appeared to be no existing test for this command.

4 years agoPsppireOutputView.c: Fix memory leak.
John Darrington [Sat, 29 Jun 2019 13:05:26 +0000 (15:05 +0200)]
PsppireOutputView.c: Fix memory leak.

4 years agoConstness
John Darrington [Sat, 29 Jun 2019 12:46:11 +0000 (14:46 +0200)]
Constness

4 years agoPSPP.xs: Remove unused variables.
John Darrington [Sat, 29 Jun 2019 11:27:27 +0000 (13:27 +0200)]
PSPP.xs: Remove unused variables.

4 years agoterminal-reader.c: Remove unused variable.
John Darrington [Sat, 29 Jun 2019 11:17:17 +0000 (13:17 +0200)]
terminal-reader.c: Remove unused variable.

4 years agoPsppireOutputViewer.c: Remove non-functional debug feature.
John Darrington [Sat, 29 Jun 2019 11:05:12 +0000 (13:05 +0200)]
PsppireOutputViewer.c: Remove non-functional debug feature.

4 years agoUse non-deprecated gtk things
John Darrington [Sat, 29 Jun 2019 10:11:48 +0000 (12:11 +0200)]
Use non-deprecated gtk things

4 years agounlink_replace_files: Change signature to avoid compiler warning.
John Darrington [Sat, 29 Jun 2019 06:26:33 +0000 (08:26 +0200)]
unlink_replace_files: Change signature to avoid compiler warning.

4 years agoMEANS: Don't compile debugging functions
John Darrington [Sat, 29 Jun 2019 06:15:58 +0000 (08:15 +0200)]
MEANS: Don't compile debugging functions

4 years agoPsppireDict: Constness
John Darrington [Sat, 29 Jun 2019 06:06:11 +0000 (08:06 +0200)]
PsppireDict: Constness

4 years agoDescriptives: Constness
John Darrington [Sat, 29 Jun 2019 05:57:34 +0000 (07:57 +0200)]
Descriptives: Constness

4 years agoTEST Examine unrepresentable graphs: Ignore stderr
John Darrington [Mon, 24 Jun 2019 17:22:34 +0000 (19:22 +0200)]
TEST Examine unrepresentable graphs: Ignore stderr

4 years agoMEANS: Fix output with unusual formats
John Darrington [Sun, 23 Jun 2019 16:49:47 +0000 (18:49 +0200)]
MEANS: Fix output with unusual formats

4 years agoMEANS: Change the statistic formats to follow their respective variables
John Darrington [Sun, 23 Jun 2019 15:57:30 +0000 (17:57 +0200)]
MEANS: Change the statistic formats to follow their respective variables

4 years agoDon't crash when inserting variables into an empty sheet.
John Darrington [Sun, 23 Jun 2019 04:37:45 +0000 (06:37 +0200)]
Don't crash when inserting variables into an empty sheet.

Fixes bug #56392.

4 years agoAdd a comment
John Darrington [Sun, 23 Jun 2019 04:36:48 +0000 (06:36 +0200)]
Add a comment

4 years agoMEANS: Fix behaviour when splits is active.
John Darrington [Sat, 22 Jun 2019 06:46:38 +0000 (08:46 +0200)]
MEANS: Fix behaviour when splits is active.

4 years agoMEANS: Fix memory leak
John Darrington [Thu, 20 Jun 2019 18:38:37 +0000 (20:38 +0200)]
MEANS: Fix memory leak

4 years agoRe-implement MEANS.
John Darrington [Thu, 20 Jun 2019 09:10:00 +0000 (11:10 +0200)]
Re-implement MEANS.

Fixes bug #44264.

4 years agopivot-table: Better document how to hide empty rows and columns.
Ben Pfaff [Thu, 13 Jun 2019 17:15:15 +0000 (10:15 -0700)]
pivot-table: Better document how to hide empty rows and columns.

Suggested by John Darrington.

4 years agoquick-cluster.c Fix uninitialised variables.
John Darrington [Thu, 13 Jun 2019 15:03:00 +0000 (17:03 +0200)]
quick-cluster.c Fix uninitialised variables.

Gcc 7.4 issued a warning about this.

4 years agodoc: Better describe the effect of OUTFILE on PRINT.
Ben Pfaff [Fri, 7 Jun 2019 00:32:22 +0000 (17:32 -0700)]
doc: Better describe the effect of OUTFILE on PRINT.

Reported by Nolan Void <nolvoa@hanakami.com>.

4 years agoRevert "Restart of new means implementation"
John Darrington [Thu, 6 Jun 2019 15:29:46 +0000 (17:29 +0200)]
Revert "Restart of new means implementation"

This reverts commit ad7ae8bb105c925b951e241fd6a3d1cb93d614a0.
I inadvertently pushed this!

4 years agoRevert "Remove bad tests"
John Darrington [Thu, 6 Jun 2019 15:27:27 +0000 (17:27 +0200)]
Revert "Remove bad tests"

This reverts commit b9a1a1c32d5589e208ea751911d35177b7751720.
I inadvertently pushed this!

4 years agoRemove bad tests
John Darrington [Thu, 6 Jun 2019 15:26:13 +0000 (17:26 +0200)]
Remove bad tests

4 years agoRestart of new means implementation
John Darrington [Thu, 6 Jun 2019 14:20:49 +0000 (16:20 +0200)]
Restart of new means implementation

5 years agoMatrix reader: Remove reliance on hash functions.
John Darrington [Thu, 23 May 2019 08:05:06 +0000 (10:05 +0200)]
Matrix reader: Remove reliance on hash functions.

This code made inappropriate use of hash functions to identify
uniqueness in sets of values.  This code removes that code, and
compares them explicitly.

Partial fix for bug #56363

5 years agoMatrix Data: Identify splits explicitly instead of with hashes.
John Darrington [Thu, 23 May 2019 05:33:55 +0000 (07:33 +0200)]
Matrix Data: Identify splits explicitly instead of with hashes.

The MATRIX DATA command was using hashes to identify splits in the
input.  This works most of the time, but it is not guaranteed that
every combination of split values will produce a unique hash.

This change explicitly compares the values instead.

Partial fix for bug #56363

5 years agosrc/libpspp/hash-functions.c: Add a preprocessor switch to help test hash table imple...
John Darrington [Thu, 23 May 2019 05:07:07 +0000 (07:07 +0200)]
src/libpspp/hash-functions.c: Add a preprocessor switch to help test hash table implementation.

5 years agosrc/libpspp/copyleft.c: Add copyright and licence notice and an explanitory comment.
John Darrington [Sun, 19 May 2019 08:10:23 +0000 (10:10 +0200)]
src/libpspp/copyleft.c: Add copyright and licence notice and an explanitory comment.

5 years agoexamine.c: Add note to translators.
John Darrington [Sat, 18 May 2019 06:53:22 +0000 (08:53 +0200)]
examine.c: Add note to translators.

5 years agoUse msgmerge --previous when merging po files.
John Darrington [Fri, 10 May 2019 16:38:08 +0000 (18:38 +0200)]
Use msgmerge --previous when merging po files.

5 years agoNEWS: fix typo.
John Darrington [Tue, 21 May 2019 13:56:44 +0000 (15:56 +0200)]
NEWS: fix typo.

5 years agosrc/math/levene.c: Fix crash resolving hmap collisions.
John Darrington [Tue, 21 May 2019 13:46:51 +0000 (15:46 +0200)]
src/math/levene.c: Fix crash resolving hmap collisions.

Partial fix for bug #56363

5 years agoRemove diagnostic printf
John Darrington [Tue, 21 May 2019 13:35:42 +0000 (15:35 +0200)]
Remove diagnostic printf

5 years agoAdd the WARN_UNUSED_RESULT attribute to all hash functions.
John Darrington [Tue, 21 May 2019 12:30:46 +0000 (14:30 +0200)]
Add the WARN_UNUSED_RESULT attribute to all hash functions.

A hash function has no purpose if the result is unused, and
tests will typically not pick up a mistake where the
programmer forgets to assign the result - the hash table will
merely degenerate to a linear searched array.

5 years agoroc.at: Remove comma terminating test keywords.
John Darrington [Tue, 21 May 2019 05:50:48 +0000 (07:50 +0200)]
roc.at: Remove comma terminating test keywords.

This was confusing me when trying to run all the ROC tests.

5 years agosrc/language/stats/examine.c: Whitespace changes only.
John Darrington [Thu, 9 May 2019 17:25:24 +0000 (19:25 +0200)]
src/language/stats/examine.c: Whitespace changes only.

5 years agosrc/data/data-in.c: Whitespace change only.
John Darrington [Thu, 9 May 2019 16:37:14 +0000 (18:37 +0200)]
src/data/data-in.c: Whitespace change only.

5 years agoQUICK CLUSTER: Move the parser into its own function.
John Darrington [Wed, 8 May 2019 07:08:09 +0000 (09:08 +0200)]
QUICK CLUSTER: Move the parser into its own function.

5 years agoQUICK CLUSTER (documentation): Clarify behaviour of the SAVE subcommand.
John Darrington [Tue, 7 May 2019 19:55:27 +0000 (21:55 +0200)]
QUICK CLUSTER (documentation): Clarify behaviour of the SAVE subcommand.

5 years agoFix cut and paste error
John Darrington [Tue, 7 May 2019 18:57:33 +0000 (20:57 +0200)]
Fix cut and paste error

5 years agoQUICK CLUSTER: Implement the /SAVE sub-command.
John Darrington [Tue, 7 May 2019 08:07:05 +0000 (10:07 +0200)]
QUICK CLUSTER: Implement the /SAVE sub-command.

5 years agoquick-cluster.c: whitespace changes only.
John Darrington [Tue, 7 May 2019 08:39:44 +0000 (10:39 +0200)]
quick-cluster.c: whitespace changes only.

5 years agoAdjust test to fix previous change
John Darrington [Mon, 6 May 2019 11:12:58 +0000 (13:12 +0200)]
Adjust test to fix previous change

5 years agoSpelling: nonnegative -> non-negative
John Darrington [Mon, 6 May 2019 09:06:55 +0000 (11:06 +0200)]
Spelling: nonnegative -> non-negative

5 years agoSpelling: criterium -> criterion
John Darrington [Mon, 6 May 2019 09:06:21 +0000 (11:06 +0200)]
Spelling: criterium -> criterion

5 years agoRemove en_GB.po
John Darrington [Mon, 6 May 2019 07:06:10 +0000 (09:06 +0200)]
Remove en_GB.po

This file was very out of date, and today there are no strings
which need to be translated anyway.

5 years agoGRAPH (barchart): Percentages display subcategorial percentages.
John Darrington [Sun, 5 May 2019 12:09:47 +0000 (14:09 +0200)]
GRAPH (barchart): Percentages display subcategorial percentages.

When calculating the values for a categorical barchart displaying
percentages, use the sub-category totals as the denominator, rather
than the primary totals.

Fixes bug #56247

5 years agoDump barchart when in testing mode.
John Darrington [Sun, 5 May 2019 14:50:25 +0000 (16:50 +0200)]
Dump barchart when in testing mode.

This change adds a routine to barcharts to print the parameters of the
chart to stdout when --testing is passed.

5 years agoBarchart.h: Add comment.
John Darrington [Sun, 5 May 2019 14:13:56 +0000 (16:13 +0200)]
Barchart.h: Add comment.

5 years agograph.c (run_barchart): Add assertion.
John Darrington [Sun, 5 May 2019 10:19:42 +0000 (12:19 +0200)]
graph.c (run_barchart): Add assertion.

We don't support multidimensional barcharts.

5 years agograph.c: "freqs" --> "cells".
John Darrington [Sun, 5 May 2019 10:13:40 +0000 (12:13 +0200)]
graph.c: "freqs" --> "cells".

The name "cells" is more meaningful in this context.

5 years agoEXAMINE: Implement the Shapiro-Wilk Test.
John Darrington [Sat, 4 May 2019 06:20:09 +0000 (08:20 +0200)]
EXAMINE: Implement the Shapiro-Wilk Test.

Closes bug #42511

5 years agoNEWS: spelling
John Darrington [Sat, 4 May 2019 05:56:06 +0000 (07:56 +0200)]
NEWS: spelling

5 years agoUpdate translations from translationproject.org
John Darrington [Sat, 4 May 2019 05:51:01 +0000 (07:51 +0200)]
Update translations from translationproject.org

5 years agoCorrect thinko in previous commit
John Darrington [Sat, 4 May 2019 04:55:07 +0000 (06:55 +0200)]
Correct thinko in previous commit