Ben Pfaff [Fri, 24 Jun 2022 23:37:36 +0000 (16:37 -0700)]
Smake: Fix icon rendering by using correct application ID.
PSPP-specific icons were not showing up properly in the GUI because
the compiled-in resources were looking in gnu.pspp whereas the name
is now org.gnu.pspp. This fixes the problem.
Fixes: a421d8d9f61b ("Change application ID from org.fsf.pspp to org.gnu.pspp.")
Ben Pfaff [Fri, 24 Jun 2022 16:34:05 +0000 (09:34 -0700)]
Smake: Fix dependencies for src/ui/gui/resources.xml.
This file is a list of all the icon files, but generating it doesn't use
icon files themselves, so depending on them isn't useful. On the other
hand, the file does need to be regenerated if the icon list changes, and
that icon list is in Smake itself, so this target does need to depend on
the Makefiles.
This commit removes the remaining references to the perl memory test.
The configure step still asked for optional Memory::Usage perl module
which is not used without the perl memory test.
I changed the import assistant window to a modal window such that
the other windows cannot be changed while the import is ongoing.
There are problems when the main window is closed during the import.
but the memory module was still loaded. On debian this
memory module requires an additional dependency
libmemory-usage-perl which is not required. As the
memory module is not used inside the test I removed it.
Ben Pfaff [Fri, 3 Jun 2022 22:01:19 +0000 (15:01 -0700)]
line-reader: Avoid undefined behavior in printf utility in test.
The test used
printf '\"'
assuming that it would print just a double-quote, but on at least one
system it printed a backslash followed by a double-quote. This commit
changes it to
print '"'
which should be reliable everywhere.
Thanks to Michael Orlitzky <michael@orlitzky.com> for reporting this bug.
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.
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".
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.)
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.
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.
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.
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.
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.
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.
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
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.
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
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.
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.
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.