Ben Pfaff [Sun, 19 Mar 2023 00:50:19 +0000 (17:50 -0700)]
Initial work on Rust implementation of PSPP.
To run what's here, use `cargo run` inside the `rust` directory to run
it in place, or `cargo install` to install it to a local directory. The
`convert` command is the only thing that really works so far.
I changed the way the bundle is build to allow codesigning.
The binary is moved to Content/MacOS and therefore the location
of the resources like icons is changed with respect to the
binary location.
Ben Pfaff [Tue, 28 Jan 2025 22:22:51 +0000 (14:22 -0800)]
QUICK CLUSTER: Use fixed format for cluster centers.
This command used the variables' own formats for their centers. This was
a bad idea for at least two reasons. First, the variables might have a
format that does not show any decimal places, but clusters wouldn't
ordinarily have integer centers, so this is confusing. Second, if a
cluster center happens to have a value label, it could be shown instead,
which is even more confusing. This fixes the problem by using a fixed
format instead.
Thanks to Andreas Hammer for reporting the problem.
message: check if location is present before accessing it
The message location is accessed without checking if the
location is actually present. I added a check if the message
location is there. Thanks to Simon Jacobs for reporting the
bug!
import assistant: fix variable width after guesser with output constraints
The current code fixes the guessed variable width according to
input constraints. But the data output stages checks the
width against output constraints. The minimum width for FMT_E
is 1 for input and 6 for output. When the guesser proposes FMT_E
with width 5, then 5 is chosen. With this patch, the width is
fixed to 6.
Thanks to Fatemeh Ilkhani for reporting the bug and providing a
csv that triggers the crash.
Ben Pfaff [Mon, 21 Oct 2024 17:49:00 +0000 (10:49 -0700)]
MATRIX: Fix test for very large matrix.
I kept getting processes killed as out-of-memory for the "MATRIX - very
large matrices" test. Somehow, GSL was really trying to allocate a
matrix with 230,000,000,000 elements, which would require 1.84 PB of
memory, which I don't have.
This makes the matrix allocator report out-of-memory if a sequence would
have more than about 2 billion elements, fixing my OOM killer problem.
Since gnulib's gettext.h defines pgettext() as macro with string
catenation, it's impossible to add pgettext version API for
pivot_value_new_text(). Rather, the pivot_value creation part is
split into pivot_value_new_text_translate() and let's expand
pgettext() upon calling it.
With this, C_() and NC_() macros are defined for translation with
context.
windows: update spreadsheet build dependency from 0.8 to 0.10
The windows build on cais.etech.fh-augsburg.de failed because
the windows build dependencies script build spread-sheet 0.8
while pspp now insists on 0.10.
When charts are copied to the clipboard, then also text formats
were advertised. This patch restricts the advertised clipboard
formats such that applications choose the correct format.
See: https://savannah.gnu.org/bugs/?65288
The preferred format for charts/images is svg or some image format
For tables no image format is advertised such that John can paste
html as editable table in libreoffice.
The previous commit to fix the "make install" problem in shells which
have a locale setting different from "US" did not work for Bernd on
archlinux. Thanks for reporting the problem!
Ben Pfaff [Sun, 7 Jan 2024 19:09:07 +0000 (11:09 -0800)]
tests: Remove two tests that proved problematic cross-OS and cross-arch.
The test "journal enabled by default interactively" failed in Debian
testing on s390x, powerpc, and ppc64. I can't reproduce the problem on
x86_64. This commit removes it.
The test "interactive output appears immediately" failed in Debian testing
on s390x, hppa, powerpc, and ppc64. It also previously failed on Mac OS.
I can reproduce the problem on x86_64 if readline isn't available, but not
if it is. (I think it would always be available for Debian). This commit
removes it.
Thanks to Friedrich Beckmann for reporting the Debian build problems.
The build process fails if the shell has set a different language
setting the us. This patch sets the language during the generation
of the documentation images.
Ben Pfaff [Sun, 5 Nov 2023 19:12:18 +0000 (11:12 -0800)]
Revert "Revert "MacOS: skip test "convert invalid UTF-8 to ISO-8859-1"""
This reverts commit bcc19d9457129559b836a0cc6cd81e2c71d42bb5.
Just letting Mac OS crash on invalid conversions seems like the
most reasonable path for now. Maybe Apple will fix their buggy
iconv.
Ben Pfaff [Sun, 5 Nov 2023 19:11:41 +0000 (11:11 -0800)]
Revert "i18n.c: added EOPNOTSUPP error code for MacOS"
This reverts commit 1799abc8539bd1a49c72c5723d1fa89ff4463e3f.
Handling EOPNOTSUPP like EILSEQ produced a hang rather than
the expected results, so this was a failed experiment.
With MacOS 14 the iconv library was changed by Apple. pspp uses
the native iconv library. There is a different error code
returned when an illegal 0xc0 UTF-8 code is converted. This
results in a failed "convert invalid UTF-8 to ISO-8859-1" test in
the regression. This patch now handles also EOPNOTSUPP.
MacOS: skip test "convert invalid UTF-8 to ISO-8859-1"
Starting with MacOS 14 Sonoma Apple has changed the behaviour
of the iconv library. The test tests the behaviour for invalid
UTF-8 sequence 0xC0. The native Apple iconv library responds with
a different error number than expected. This patch skips the
test on MacOS until this is hopefully fixed on MacOS.
Ben Pfaff [Thu, 2 Nov 2023 01:41:57 +0000 (18:41 -0700)]
tests: Try another strategy to check for immediate output.
The previous strategy hung on some machines and failed on others. The
failures are sometimes sensitive to whether libreadline is available. I
hope that this avoids the problem.
Ben Pfaff [Wed, 1 Nov 2023 16:40:02 +0000 (09:40 -0700)]
tests: Stop using squish-pty.
squish-pty seems to break easily, so switch to using another way to
simulate interactive behavior. This way requires a small source code
change to PSPP itself but it should be more portable.
Thanks to Friedrich Beckmann for reporting the problem. The problem that
Friedrich reported was a hang in the "interactive output appears
immediately" test on Debian sid. I couldn't reproduce that problem on
Fedora or Debian testing, but I did get failures on Debian testing. I
guess it's best to just avoid ptys at all.
Ben Pfaff [Sat, 30 Sep 2023 20:19:21 +0000 (13:19 -0700)]
MATCH FILES: Fix crash in string variable resizing.
Commmit 638bf380e550 ("combine-files: Allow matching string
variables to have different widths.") introduced a bug in the
case where the variables in data files being combined didn't
have the same variable order. This is kind of an
embarrassing bug since the input files having the same order
of variables is an exceptional case anyhow. This commit
should fix the problem.
The test as updated will crash if the bug regresses.
Ben Pfaff [Sat, 24 Jun 2023 17:04:48 +0000 (10:04 -0700)]
html: Include generic font-family name "sans-serif" as a fallback.
https://developer.mozilla.org/en-US/docs/Web/CSS/font-family recommends
that a font-family specification should always include one of the generic
font-family names to serve as a fallback. For PSPP, sans-serif is a
reasonable fixed fallback.
This addresses bug #63020, which asks for "Sans Serif" to mean sans-serif.
It obviously doesn't generalize to other font name translations, but it
does address the case that the bug filer complained about. If we need a
more general mechanism, we can invent it later.
Thanks to Frans Houweling for reporting this issue.