pspp
22 months agodocs ctables10
Ben Pfaff [Fri, 3 Jun 2022 21:57:36 +0000 (14:57 -0700)]
docs

22 months agodocs
Ben Pfaff [Fri, 3 Jun 2022 18:40:26 +0000 (11:40 -0700)]
docs

22 months agoFix bug in CLABELS when a missing category was moved, and add test.
Ben Pfaff [Thu, 2 Jun 2022 05:56:33 +0000 (22:56 -0700)]
Fix bug in CLABELS when a missing category was moved, and add test.

22 months agowork on docs
Ben Pfaff [Wed, 1 Jun 2022 23:23:58 +0000 (16:23 -0700)]
work on docs

22 months agowork on CTABLES
Ben Pfaff [Mon, 27 Dec 2021 00:01:47 +0000 (16:01 -0800)]
work on CTABLES

22 months agotests: Add test for doubled parentheses.
Ben Pfaff [Wed, 1 Jun 2022 19:09:43 +0000 (12:09 -0700)]
tests: Add test for doubled parentheses.

I can't reproduce the problem reported in a bug report, but it seems
worthwhile to add a test for it anyway.

Bug #62557.

22 months agolexer: New function lex_ofs_representation().
Ben Pfaff [Sun, 13 Feb 2022 19:07:22 +0000 (11:07 -0800)]
lexer: New function lex_ofs_representation().

This interface is more convenient for situations where it's easier to
consume tokens before getting their representations.

22 months agomode: New order statistic.
Ben Pfaff [Sun, 30 Jan 2022 00:56:30 +0000 (16:56 -0800)]
mode: New order statistic.

22 months agomath: Make 'accumulate' a feature of order statistics, not all stats.
Ben Pfaff [Sun, 30 Jan 2022 00:56:18 +0000 (16:56 -0800)]
math: Make 'accumulate' a feature of order statistics, not all stats.

22 months agosubcase: Rename subcase_destroy() to subcase_uninit().
Ben Pfaff [Sat, 29 Jan 2022 20:21:13 +0000 (12:21 -0800)]
subcase: Rename subcase_destroy() to subcase_uninit().

This reflects the convention that "destroy" frees the pointer passed in
while "uninit" only frees the internals.

22 months agomath: Coding style updates in some order-stat implementations.
Ben Pfaff [Sat, 29 Jan 2022 20:01:16 +0000 (12:01 -0800)]
math: Coding style updates in some order-stat implementations.

I generally find structure assignments clearer than individual assignments
to each of their members these days.

22 months agomath: Improve comments.
Ben Pfaff [Sat, 29 Jan 2022 20:00:16 +0000 (12:00 -0800)]
math: Improve comments.

This includes some changes to parameter names and coding style in
order-stats that I think clarify the code and modernize it.

22 months agomath: Avoid unneeded extra allocations for fixed-size data structures.
Ben Pfaff [Sat, 29 Jan 2022 18:52:49 +0000 (10:52 -0800)]
math: Avoid unneeded extra allocations for fixed-size data structures.

This seems generally a bit cleaner to me.

22 months agospv-legacy-decoder: Always give the pivot table a title.
Ben Pfaff [Tue, 18 Jan 2022 03:19:27 +0000 (19:19 -0800)]
spv-legacy-decoder: Always give the pivot table a title.

A pivot table must have a title.  Some parts of PSPP rely on that.  The
legacy SPV decoder didn't ensure this, and one SPV in my corpus didn't have
one, which led to null pointer dereferences, so this commit fixes the
problem.

22 months agooutput-item: Add missing new-line printing tables in output_item_dump().
Ben Pfaff [Tue, 18 Jan 2022 01:39:37 +0000 (17:39 -0800)]
output-item: Add missing new-line printing tables in output_item_dump().

This only affects "pspp-output dump".

22 months agooutput-item: Fix memory leak in output_item_dump().
Ben Pfaff [Sat, 1 Jan 2022 21:31:39 +0000 (13:31 -0800)]
output-item: Fix memory leak in output_item_dump().

22 months agopivot-table: New functions for setting captions, etc.
Ben Pfaff [Sun, 2 Jan 2022 03:27:31 +0000 (19:27 -0800)]
pivot-table: New functions for setting captions, etc.

22 months agopivot-table: Fix pivot_table_dump() null pointer dereference in special case.
Ben Pfaff [Mon, 17 Jan 2022 22:05:09 +0000 (14:05 -0800)]
pivot-table: Fix pivot_table_dump() null pointer dereference in special case.

This function only gets called from "pspp-output dump", so it's not a very
important bug.

22 months agoRelease version 1.6.0.
Ben Pfaff [Wed, 1 Jun 2022 04:34:19 +0000 (21:34 -0700)]
Release version 1.6.0.

22 months agoperl-module: Copy Perl module from srcdir to builddir before distributing.
Ben Pfaff [Mon, 30 May 2022 18:05:45 +0000 (11:05 -0700)]
perl-module: Copy Perl module from srcdir to builddir before distributing.

I ran into an issue where the Perl tests were failing in distcheck, but
not in check.  I changed the sources for the Perl module, but distcheck
still used the old ones.  It turns out that "make dist" uses files from
the builddir, which "make dist" wasn't updating from the srcdir because
that only happened when the Perl module was actually built, which "make
dist" and "make distcheck" don't do.

This commit fixes the problem by ensuring that the Perl module files get
updated in the builddir on "make dist".

22 months agoperl-module: Remove test for memory usage.
Ben Pfaff [Mon, 30 May 2022 17:28:19 +0000 (10:28 -0700)]
perl-module: Remove test for memory usage.

This test only works if you're lucky.  It doesn't work with Address
Sanitizer and it doesn't seem to work with current versions of Perl.
(It might be that there's a real leak, but I don't know how to debug
it in that case.)

22 months agopo: Update translations from translationproject.org.
Ben Pfaff [Mon, 30 May 2022 16:28:39 +0000 (09:28 -0700)]
po: Update translations from translationproject.org.

Many thanks to our translators!

22 months agogui: For text data import, use the same parser for preview as for import.
Ben Pfaff [Sat, 28 May 2022 01:29:20 +0000 (18:29 -0700)]
gui: For text data import, use the same parser for preview as for import.

There were odd discrepancies between the preview code in the GUI for
text data import and the code in GET DATA /TYPE=TXT that implemented the
eventual import.  This commit unifies the two parsers, dropping the one
that was used only for preview.  This should prevent further discrepancies.

Bug #61809.
Thanks to Friedrich Beckmann for reporting this bug.

22 months agodata-parser: Make data parser not require a dictionary.
Ben Pfaff [Sat, 28 May 2022 00:15:02 +0000 (17:15 -0700)]
data-parser: Make data parser not require a dictionary.

An upcoming commit will make the GUI's text import use this code too, in
a context where a dictionary isn't yet available.  The data parser only
uses the dictionary for one specific purpose that isn't relevant for the
GUI, so remove the need for it.

22 months agogui: Make text import assistant accept only one quote character.
Ben Pfaff [Fri, 27 May 2022 22:37:10 +0000 (15:37 -0700)]
gui: Make text import assistant accept only one quote character.

This aligns with what SPSS does.

22 months agogui: Always use the most comma text import settings.
Ben Pfaff [Fri, 27 May 2022 21:38:58 +0000 (14:38 -0700)]
gui: Always use the most comma text import settings.

The heuristic did not perform well in practice according to user reports,
and most files use the defaults.

22 months agogui: Honor quotes in the text data import dialog.
Ben Pfaff [Fri, 27 May 2022 19:55:47 +0000 (12:55 -0700)]
gui: Honor quotes in the text data import dialog.

The text data import dialog's preview of the data to be read
didn't honor the quotes but always treated " and ' and (weirdly)
parentheses as quotes.  This makes it honor the user's settings.

Bug #61809.
Thanks for Friedrich Beckmann for reporting this bug.

23 months agoNew command SHOW SYSTEM to easily print information useful in bug reports.
Ben Pfaff [Sat, 21 May 2022 21:56:49 +0000 (14:56 -0700)]
New command SHOW SYSTEM to easily print information useful in bug reports.

2 years agopo: Update translations from translationproject.org.
Ben Pfaff [Mon, 11 Apr 2022 15:12:25 +0000 (08:12 -0700)]
po: Update translations from translationproject.org.

2 years agopo: Update de translation from translationproject.org
Friedrich Beckmann [Mon, 11 Apr 2022 09:22:53 +0000 (11:22 +0200)]
po: Update de translation from translationproject.org

2 years agoRelease version 1.5.5.
Ben Pfaff [Sun, 10 Apr 2022 23:41:58 +0000 (16:41 -0700)]
Release version 1.5.5.

2 years agopo: Update translations from translationproject.org.
Ben Pfaff [Sun, 10 Apr 2022 23:30:29 +0000 (16:30 -0700)]
po: Update translations from translationproject.org.

2 years agoexpressions: Convert SYSMIS into int as INT_MIN during optimization too.
Ben Pfaff [Sun, 10 Apr 2022 15:47:00 +0000 (08:47 -0700)]
expressions: Convert SYSMIS into int as INT_MIN during optimization too.

In an expression like LPAD('abc', $sysmis), the LPAD function is evaluated
using a C function that takes an 'int' as its second argument.  During
expression evaluation, out-of-range values get converted into SYSMIS by
the NUM_TO_INTEGER operator that gets automatically inserted to ensure
that, and then SYSMIS gets converted into INT_MIN to pass to the C
function.  This worked OK for runtime evaluation, but the optimizer failed
to do the conversion of SYSMIS to INT_MIN, which yielded undefined
behavior.  Some platforms (e.g. GCC on x86) converted SYSMIS (which is
the second-smallest 'double' value) into INT_MIN, so no problem showed up
there, but other platforms yielded INT_MAX, causing unexpected failures.

This commit fixes the problem by explicitly converting SYSMIS into INT_MIN
during optimization.

Thanks to Friedrich Beckmann for reporting and uncovering the problem.
Bug #62267.

2 years agopo: Update translations from translationproject.org.
Ben Pfaff [Thu, 7 Apr 2022 22:58:05 +0000 (15:58 -0700)]
po: Update translations from translationproject.org.

2 years agoorg.fsf.pspp.metainfo: changed links to https / added 1.5.4 release
Friedrich Beckmann [Thu, 7 Apr 2022 18:50:57 +0000 (20:50 +0200)]
org.fsf.pspp.metainfo: changed links to https / added 1.5.4 release

The debian checker mentionend the http links for the version info.
So I changed them to https. And I added the 1.5.4 release.

2 years agopo: Update German translation from translationproject.org.
Friedrich Beckmann [Thu, 7 Apr 2022 12:59:11 +0000 (14:59 +0200)]
po: Update German translation from translationproject.org.

Thanks to the german translation team at translationproject.org

2 years agostart message to translators with TRANSLATORS
Friedrich Beckmann [Wed, 6 Apr 2022 19:29:41 +0000 (21:29 +0200)]
start message to translators with TRANSLATORS

All comments which start with TRANSLATORS are visible for the
translators. The previous message is only visible if the translator
looks into the source code.

2 years agoMATRIX: Correct error message.
Ben Pfaff [Wed, 6 Apr 2022 14:56:38 +0000 (07:56 -0700)]
MATRIX: Correct error message.

Thanks to Friedrich Beckmann for reporting the mistake.

2 years agopo: Update Spanish translation from translationproject.org.
Ben Pfaff [Tue, 5 Apr 2022 15:25:25 +0000 (08:25 -0700)]
po: Update Spanish translation from translationproject.org.

Thanks to Francesc Josep Miguel Quesada for the updates!

2 years agopivot-table: Avoid null dereference in "pspp-output dump" in corner cases.
Ben Pfaff [Tue, 5 Apr 2022 15:15:45 +0000 (08:15 -0700)]
pivot-table: Avoid null dereference in "pspp-output dump" in corner cases.

2 years agoCROSSTABS: Fix computation of adjusted standardized residual.
Ben Pfaff [Tue, 5 Apr 2022 14:49:17 +0000 (07:49 -0700)]
CROSSTABS: Fix computation of adjusted standardized residual.

Bug #60982.

2 years agopsppire-output-view: Export correctly to drivers that don't handle groups.
Ben Pfaff [Tue, 5 Apr 2022 14:31:19 +0000 (07:31 -0700)]
psppire-output-view: Export correctly to drivers that don't handle groups.

Thanks to Elias Tsolis for reporting this bug.
Bug #61549.

2 years agoYuri Chornoivan contributed some typo fixes
Yuri Chornoivan [Fri, 1 Apr 2022 11:40:18 +0000 (14:40 +0300)]
Yuri Chornoivan contributed some typo fixes

Closes: https://savannah.gnu.org/bugs/?62245
Thank you for your contribution!

2 years agopo: Update Ukrainian translation from translationproject.org.
Ben Pfaff [Fri, 1 Apr 2022 16:14:34 +0000 (09:14 -0700)]
po: Update Ukrainian translation from translationproject.org.

Thanks to Yuri Chornoivan for translating.

2 years agoRelease version 1.5.4.
Ben Pfaff [Fri, 1 Apr 2022 02:57:39 +0000 (19:57 -0700)]
Release version 1.5.4.

2 years agosys-file-encoding: Clean up .c file on distclean.
Ben Pfaff [Fri, 1 Apr 2022 02:57:09 +0000 (19:57 -0700)]
sys-file-encoding: Clean up .c file on distclean.

Found by "make distcheck".

2 years agoicons: Fix uninstall.
Ben Pfaff [Fri, 1 Apr 2022 01:52:42 +0000 (18:52 -0700)]
icons: Fix uninstall.

The uninstall target for the icons looked for filenames that began with
"pspp", but the new names for the application icons don't start that way.

Fixes: 25e030629aed ("Rename icon files to match full application ID.")
2 years agobug #62189: Fixed clipped numbers in histogram legend
Friedrich Beckmann [Fri, 18 Mar 2022 23:11:05 +0000 (00:11 +0100)]
bug #62189: Fixed clipped numbers in histogram legend

I modified the legend rendering to avoid the clipping of mean and
standard deviation in the legend of the histogram plot. In addition
I changed the number print format to also show reasonable numbers
for small values.

fixed: https://savannah.gnu.org/bugs/index.php?62198

2 years agoWindows: Native build failed due to missing gnulib dependencies
Friedrich Beckmann [Fri, 18 Mar 2022 15:31:23 +0000 (15:31 +0000)]
Windows: Native build failed due to missing gnulib dependencies

The windows build failed because the gnulib header files were not
build before the compilation of c files for the native build.
The gnulib headers are
listed in the BUILT_SOURCES but that must be the first dependency
before the object files belonging to the executable. This is the
case for the default make target but not for an individual
executable like src/ui/terminal/pspp. I adapted the make file
to use the default make target.
See: https://www.gnu.org/software/automake/manual/html_node/Sources.html

2 years agoWindows build: Adapted icon names to org.fsf.pspp naming
Friedrich Beckmann [Fri, 18 Mar 2022 15:28:03 +0000 (15:28 +0000)]
Windows build: Adapted icon names to org.fsf.pspp naming

Ben changed the icon names to a naming scheme using org.fsf.xxx
The changes were missing in the windows build resulting in a
build failure for the windows target.

2 years agosvg2png: Use rsvg-convert if GIMP is not available.
Ben Pfaff [Mon, 14 Mar 2022 23:47:53 +0000 (16:47 -0700)]
svg2png: Use rsvg-convert if GIMP is not available.

The GNOME flatpak SDK has rsvg-convert, which does just fine, but not GIMP,
and I have no interest in building GIMP as a step in building PSPP.

2 years agoRename pspp.xml to org.fsf.pspp.xml.
Ben Pfaff [Mon, 14 Mar 2022 21:38:48 +0000 (14:38 -0700)]
Rename pspp.xml to org.fsf.pspp.xml.

This reflects the convention expected by flatpak and seems to reflect the
overall expected convention.

2 years agoRename icon files to match full application ID.
Ben Pfaff [Mon, 14 Mar 2022 21:37:37 +0000 (14:37 -0700)]
Rename icon files to match full application ID.

This seems to be the convention.  It makes building a flatpak easier.

2 years agoorg.fsf.pspp.metainfo.xml.in: Fix release dates.
Ben Pfaff [Mon, 14 Mar 2022 20:20:15 +0000 (13:20 -0700)]
org.fsf.pspp.metainfo.xml.in: Fix release dates.

These dates were in YYYY-DD-MM format, but they should be ISO 8601
compliant YYYY-MM-DD format.

2 years agoconfigure: Also support gtksourceview 4.x.
Ben Pfaff [Mon, 14 Mar 2022 18:51:46 +0000 (11:51 -0700)]
configure: Also support gtksourceview 4.x.

This doesn't require any source code changes because 4.x and 3.x are
source compatible for our purposes.

2 years agoMakefile: Fix running "make dist" before "make all".
Ben Pfaff [Sun, 13 Mar 2022 20:33:51 +0000 (13:33 -0700)]
Makefile: Fix running "make dist" before "make all".

Otherwise, there's a race between generating and using config.h, which
causes build failures.  This happens particularly with the PSPP autobuilder.

2 years agoSwitch from recursive to non-recursive use of Gnulib.
Ben Pfaff [Sun, 13 Mar 2022 19:34:36 +0000 (12:34 -0700)]
Switch from recursive to non-recursive use of Gnulib.

This allows for better use of dependencies in Makefiles.  It causes a new
warning from Automake, which I hope to fix through a change to Gnulib
sometime soon.  I'm consulting the other Gnulib maintainers on that:
https://lists.gnu.org/archive/html/bug-gnulib/2022-03/msg00044.html

2 years agoGnulib needs Automake 1.14 or later.
Ben Pfaff [Sun, 13 Mar 2022 19:12:53 +0000 (12:12 -0700)]
Gnulib needs Automake 1.14 or later.

2 years agotests: Update testsuite results to accomodate new Gnulib.
Ben Pfaff [Sun, 13 Mar 2022 18:41:50 +0000 (11:41 -0700)]
tests: Update testsuite results to accomodate new Gnulib.

It seems that libunistring now does line wrapping slightly differently,
perhaps due to Unicode updates.

2 years agoUpdate to newest gnulib.
Ben Pfaff [Sun, 13 Mar 2022 18:32:58 +0000 (11:32 -0700)]
Update to newest gnulib.

This required a dependency on Automake 1.11 or later.  It also required
dropping C2x compatibility warnings because Gnulib now triggers them.  The
Gnulib tempname module requires linking against $(LIB_GETRANDOM), so this
adds that in each case where the build links against libgl.

2 years agospv-light-decoder: Avoid GCC 11.x warning in decode_spvlb_halign().
Ben Pfaff [Sun, 13 Mar 2022 18:30:49 +0000 (11:30 -0700)]
spv-light-decoder: Avoid GCC 11.x warning in decode_spvlb_halign().

It seems to be wrong, but GCC can't tell and it's hard to blame it.

2 years agoexpressions: Fix value of $TIME variable and add a test.
Ben Pfaff [Sun, 13 Mar 2022 17:55:30 +0000 (10:55 -0700)]
expressions: Fix value of $TIME variable and add a test.

Thanks to Frans Houweling for reporting this bug.
Bug #62003.

2 years agopsppire-dialog-action-crosstabs: Do not add PIVOT or NOPIVOT to command.
Ben Pfaff [Thu, 13 Jan 2022 05:50:54 +0000 (21:50 -0800)]
psppire-dialog-action-crosstabs: Do not add PIVOT or NOPIVOT to command.

The CROSSTABS command does not support /FORMAT=PIVOT or /FORMAT=NOPIVOT.
I can't find any evidence that it ever did.  Perhaps q2c ignored keywords
it didn't recognize?  SPSS does not document support for any such format
keywords, so it's better to remove them from the emitted syntax than to
add support to CROSSTABS.

Thanks to Alexandra Younger for reporting the issue.

2 years agolexer: New functions for parsing real numbers in specified ranges.
Ben Pfaff [Sat, 1 Jan 2022 19:10:05 +0000 (11:10 -0800)]
lexer: New functions for parsing real numbers in specified ranges.

These will be more useful in the future.

2 years agoformat-parser: Improve comment.
Ben Pfaff [Sat, 1 Jan 2022 19:09:49 +0000 (11:09 -0800)]
format-parser: Improve comment.

2 years agoFREQUENCIES: Fix percentiles and median calculation for multiple variables.
Ben Pfaff [Sat, 1 Jan 2022 19:01:00 +0000 (11:01 -0800)]
FREQUENCIES: Fix percentiles and median calculation for multiple variables.

The calculations here were using the same space each time for
calculating percentiles and median, but different areas are needed.  This
commit fixes the problem.

Bug #60728.
Thanks to elias tsolis for reporting the problem.

2 years agoFREQUENCIES: Remove unused pool.
Ben Pfaff [Sat, 1 Jan 2022 18:35:17 +0000 (10:35 -0800)]
FREQUENCIES: Remove unused pool.

2 years agoFREQUENCIES: Remove unused struct members.
Ben Pfaff [Sat, 1 Jan 2022 18:34:56 +0000 (10:34 -0800)]
FREQUENCIES: Remove unused struct members.

2 years agoFixed misleading results in the Kruskal-Wallis test
John Darrington [Sat, 1 Jan 2022 08:56:21 +0000 (09:56 +0100)]
Fixed misleading results in the Kruskal-Wallis test

Fixed misleading results if the lower bound was in fact higher
than the upper bound.

2 years agoReplace more uses of 'cnt' by 'n'.
Ben Pfaff [Fri, 31 Dec 2021 19:06:48 +0000 (11:06 -0800)]
Replace more uses of 'cnt' by 'n'.

This continues the work begun in commit 339f1956cc72 ("treewide: Replace
<name>_cnt by n_<name>s and <name>_cap by allocated_<name>.") by replacing
more uses of 'cnt' by 'n', which I think is a better choice these days.

2 years agowindows cross build: Add example build instructions in documentation
Friedrich Beckmann [Fri, 31 Dec 2021 17:40:43 +0000 (18:40 +0100)]
windows cross build: Add example build instructions in documentation

I added a description of the required steps to do a windows cross
build.

2 years agomoments: Spell out "variance" ("var" is easily confused with "variable").
Ben Pfaff [Fri, 31 Dec 2021 05:35:13 +0000 (21:35 -0800)]
moments: Spell out "variance" ("var" is easily confused with "variable").

2 years agoChange how checking for missing values works.
Ben Pfaff [Thu, 30 Dec 2021 21:58:12 +0000 (13:58 -0800)]
Change how checking for missing values works.

It's more flexible to have the functions that check for missing values
return what kind of missing value was found (or 0 if none), than to have
to pass in the kind of missing values to check for.

2 years agoexpressions: Major work to improve error messages.
Ben Pfaff [Sun, 19 Dec 2021 23:41:50 +0000 (15:41 -0800)]
expressions: Major work to improve error messages.

This makes the error messages related to expressions much better, by being
more precise about the location of the problem.  It also fixes a number of
documentation and compatibility issues encountered along the way, as well
as redoing the testsuite for expressions to make it easier to understand
and to work on.

2 years agoexpressions: Fix built sources.
Ben Pfaff [Sat, 25 Dec 2021 22:12:39 +0000 (14:12 -0800)]
expressions: Fix built sources.

The dependencies were incomplete for the built sources, which meant that
build errors often came up if one built particular targets, e.g. for
"make src/ui/terminal/pspp".  This fixes the problem.

2 years agoexpressions: Simplify type declarations for nodes.
Ben Pfaff [Fri, 17 Dec 2021 02:09:14 +0000 (18:09 -0800)]
expressions: Simplify type declarations for nodes.

The widespread availability of C99 anonymous structs and unions helps to
simplify the node structure.

This will make it a lot easier to add a new member to the expression nodes
for source locators in an upcoming commit.

2 years agoConvert all Perl build tools to Python and remove Perl build dependency.
Ben Pfaff [Thu, 16 Dec 2021 05:00:32 +0000 (21:00 -0800)]
Convert all Perl build tools to Python and remove Perl build dependency.

Python is much more commonly used these days and easier for beginners
to pick up.

2 years agonum-out-cmp.pl: Remove unused script.
Ben Pfaff [Thu, 16 Dec 2021 22:08:06 +0000 (14:08 -0800)]
num-out-cmp.pl: Remove unused script.

2 years agoMATRIX: Update EVAL test to avoid failure on i386.
Ben Pfaff [Thu, 16 Dec 2021 04:20:48 +0000 (20:20 -0800)]
MATRIX: Update EVAL test to avoid failure on i386.

The i386 buildbot produced different precision for the eigenvalues
(integers rather than almost-integers), which isn't a significant
difference.  This commit should avoid the problem.

2 years agomatrix: Avoid gsl_linalg_LU_invx() because it was new in GSL 2.6.
Ben Pfaff [Thu, 16 Dec 2021 03:22:46 +0000 (19:22 -0800)]
matrix: Avoid gsl_linalg_LU_invx() because it was new in GSL 2.6.

Debian only added GSL 2.6 in the current stable (bullseye) but one of the
CI systems is using oldstable (buster), thus failures.

Thanks to Friedrich Beckmann for reporting the problem.

2 years agoperl-module: Skip memory test if Address Sanitizer is in use.
Ben Pfaff [Thu, 16 Dec 2021 02:56:45 +0000 (18:56 -0800)]
perl-module: Skip memory test if Address Sanitizer is in use.

Otherwise, Address Sanitizer produces unexpected memory behavior and
causes this test to fail even though there is no real leak.

2 years agoperl-module: Fix build errors and ignore warnings.
Ben Pfaff [Thu, 16 Dec 2021 02:55:44 +0000 (18:55 -0800)]
perl-module: Fix build errors and ignore warnings.

This allows the module to build again, for me.

2 years agoconfigure: Check for Perl modules needed to build PSPP's Perl module.
Ben Pfaff [Thu, 16 Dec 2021 02:54:47 +0000 (18:54 -0800)]
configure: Check for Perl modules needed to build PSPP's Perl module.

Fedora doesn't have Config::Perl::V by default and its absence caused
mysterious build failures.

2 years agoexpressions: Rewrite code generator in Python.
Ben Pfaff [Tue, 14 Dec 2021 05:06:23 +0000 (21:06 -0800)]
expressions: Rewrite code generator in Python.

This doesn't change the code that's generated at all.  It's preparation
for doing that later.

2 years agoFix build requirements by correctly noting that Python is required.
Ben Pfaff [Thu, 16 Dec 2021 01:11:32 +0000 (17:11 -0800)]
Fix build requirements by correctly noting that Python is required.

Building PSPP has required Python since support for the SPV format was
added, because the SPV parser-generators use Python.

Only Python 3+ can reasonably be supported, because support for Python 2.x
ended in April 2020.

2 years agoClean up how transformations work.
Ben Pfaff [Fri, 10 Dec 2021 06:23:59 +0000 (22:23 -0800)]
Clean up how transformations work.

Transformations had a messy system that included "finalizers" that needed
to be called before a chain could be executed and the need to keep track
of relative offsets for control flow.  This commit reworks and simplifies
the whole thing.

Also adds some INPUT PROGRAM, LOOP, and DO IF tests.

2 years agotreewide: Replace <name>_cnt by n_<name>s and <name>_cap by allocated_<name>.
Ben Pfaff [Thu, 9 Dec 2021 23:03:45 +0000 (15:03 -0800)]
treewide: Replace <name>_cnt by n_<name>s and <name>_cap by allocated_<name>.

I used to think that _cnt was a good suffix for a count representing the
number of items in an array, but I haven't used that convention in a long
time and it looks wrong now.  This changes these to an n_ prefix instead.

Similarly, but in far fewer cases, replace <name>_cap for the allocated
capacity of an array by allocated_<name>.

This doesn't change the name of ref_cnt members used as reference counts.
Those are pure counts, not the length of anything.

This doesn't change the Perl library because that's an external API.

2 years agoImplement the MATRIX command.
Ben Pfaff [Mon, 27 Sep 2021 05:35:44 +0000 (22:35 -0700)]
Implement the MATRIX command.

2 years agomessage: Introduce underlining for error message regions.
Ben Pfaff [Mon, 6 Dec 2021 06:03:31 +0000 (22:03 -0800)]
message: Introduce underlining for error message regions.

This will allow for the upcoming matrix language implementation
to give better error messages that clearly show the erroneous
part of the source.

2 years agomessage: Intern file names in msg_location to make them cheaper to copy.
Ben Pfaff [Thu, 25 Nov 2021 01:00:57 +0000 (17:00 -0800)]
message: Intern file names in msg_location to make them cheaper to copy.

2 years agolexer: Allow for negative lookahead within a command.
Ben Pfaff [Tue, 23 Nov 2021 03:16:48 +0000 (19:16 -0800)]
lexer: Allow for negative lookahead within a command.

This allows to getting the location of prior tokens within a command,
which makes it easier to find the end of a group of tokens that was just
parsed by referring to the token at offset -1.

2 years agolexer: Drop 'line_pos' from lex_token and lex_source.
Ben Pfaff [Mon, 22 Nov 2021 20:46:19 +0000 (12:46 -0800)]
lexer: Drop 'line_pos' from lex_token and lex_source.

It can now be calculated by reading backward in the source buffer.

2 years agolexer: Keep entire source file in memory.
Ben Pfaff [Mon, 22 Nov 2021 19:45:48 +0000 (11:45 -0800)]
lexer: Keep entire source file in memory.

Previously, the lexer tried to keep only part of each source file in
memory, the part that wasn't fully parsed yet.  With this commit, the
lexer holds the entire file in memory, even parts that are no longer
needed.  This should make it easier to produce better error messages.

2 years agopivot-table: New function pivot_value_new_variable__().
Ben Pfaff [Mon, 6 Dec 2021 05:21:19 +0000 (21:21 -0800)]
pivot-table: New function pivot_value_new_variable__().

2 years agou8-line: Add definition of an initializer.
Ben Pfaff [Mon, 6 Dec 2021 05:20:53 +0000 (21:20 -0800)]
u8-line: Add definition of an initializer.

2 years agostring-array: New functions for comparing string arrays.
Ben Pfaff [Mon, 6 Dec 2021 05:20:42 +0000 (21:20 -0800)]
string-array: New functions for comparing string arrays.

2 years agovariable-parser: New functions for parsing syntax without a dictionary.
Ben Pfaff [Mon, 6 Dec 2021 05:20:00 +0000 (21:20 -0800)]
variable-parser: New functions for parsing syntax without a dictionary.

This will acquire its first user in an upcoming commit.

2 years agoexpressions: Simplify function name parsing.
Ben Pfaff [Mon, 6 Dec 2021 05:19:12 +0000 (21:19 -0800)]
expressions: Simplify function name parsing.

2 years agodistributions: New module for probability distribution functions.
Ben Pfaff [Mon, 6 Dec 2021 05:18:22 +0000 (21:18 -0800)]
distributions: New module for probability distribution functions.

These functions are currently just used in expressions, but in an upcoming
commit they will also be used in matrices, so this commit makes them more
widely available.

2 years agodata-writer: New function dfm_put_record_utf8().
Ben Pfaff [Mon, 6 Dec 2021 05:15:02 +0000 (21:15 -0800)]
data-writer: New function dfm_put_record_utf8().

This will have another user in the upcoming support for the matrix
language.