pspp
8 months agoTemporary change to make cross builds work.
Ben Pfaff [Tue, 5 Sep 2023 15:32:10 +0000 (08:32 -0700)]
Temporary change to make cross builds work.

8 months agowork
Ben Pfaff [Tue, 5 Sep 2023 15:31:49 +0000 (08:31 -0700)]
work

8 months agodocs
Ben Pfaff [Fri, 1 Sep 2023 03:07:45 +0000 (20:07 -0700)]
docs

8 months agoall the header records have parsers
Ben Pfaff [Wed, 30 Aug 2023 15:29:46 +0000 (08:29 -0700)]
all the header records have parsers

9 months agowork
Ben Pfaff [Mon, 28 Aug 2023 16:04:24 +0000 (09:04 -0700)]
work

9 months agomultiple response
Ben Pfaff [Sat, 26 Aug 2023 16:35:28 +0000 (09:35 -0700)]
multiple response

9 months agowork
Ben Pfaff [Mon, 21 Aug 2023 15:55:01 +0000 (08:55 -0700)]
work

9 months agowork
Ben Pfaff [Sun, 20 Aug 2023 21:43:39 +0000 (14:43 -0700)]
work

9 months agowork
Ben Pfaff [Sun, 20 Aug 2023 21:22:45 +0000 (14:22 -0700)]
work

9 months agowork
Ben Pfaff [Sun, 20 Aug 2023 20:57:25 +0000 (13:57 -0700)]
work

9 months agoRevert "find bad utf8"
Ben Pfaff [Sun, 20 Aug 2023 01:39:36 +0000 (18:39 -0700)]
Revert "find bad utf8"

This reverts commit 33820c6420e31b9b7e878eeda38708cc447e4ca2.

9 months agofind bad utf8
Ben Pfaff [Sun, 20 Aug 2023 01:39:32 +0000 (18:39 -0700)]
find bad utf8

9 months agowork
Ben Pfaff [Sat, 19 Aug 2023 22:10:53 +0000 (15:10 -0700)]
work

9 months agowork
Ben Pfaff [Sat, 19 Aug 2023 21:06:50 +0000 (14:06 -0700)]
work

9 months agowork
Ben Pfaff [Sat, 19 Aug 2023 20:30:22 +0000 (13:30 -0700)]
work

9 months agowork
Ben Pfaff [Wed, 16 Aug 2023 04:23:50 +0000 (21:23 -0700)]
work

9 months agowork
Ben Pfaff [Tue, 15 Aug 2023 18:27:41 +0000 (11:27 -0700)]
work

9 months agowork
Ben Pfaff [Sun, 13 Aug 2023 17:25:57 +0000 (10:25 -0700)]
work

9 months agowork
Ben Pfaff [Sat, 12 Aug 2023 20:01:58 +0000 (13:01 -0700)]
work

9 months agowork
Ben Pfaff [Mon, 7 Aug 2023 05:39:05 +0000 (22:39 -0700)]
work

9 months agowork
Ben Pfaff [Sun, 6 Aug 2023 21:50:41 +0000 (14:50 -0700)]
work

9 months agowork
Ben Pfaff [Sun, 6 Aug 2023 19:08:19 +0000 (12:08 -0700)]
work

9 months agowork
Ben Pfaff [Sun, 6 Aug 2023 17:12:52 +0000 (10:12 -0700)]
work

9 months agowork
Ben Pfaff [Sun, 6 Aug 2023 05:13:22 +0000 (22:13 -0700)]
work

9 months agomore work on parser
Ben Pfaff [Sat, 5 Aug 2023 21:02:55 +0000 (14:02 -0700)]
more work on parser

9 months agowork
Ben Pfaff [Thu, 3 Aug 2023 15:44:54 +0000 (08:44 -0700)]
work

9 months agoconverters maps work
Ben Pfaff [Wed, 2 Aug 2023 05:21:13 +0000 (22:21 -0700)]
converters maps work

9 months agowork
Ben Pfaff [Wed, 2 Aug 2023 01:20:25 +0000 (18:20 -0700)]
work

9 months agosack is fully implemented
Ben Pfaff [Tue, 1 Aug 2023 17:07:06 +0000 (10:07 -0700)]
sack is fully implemented

9 months agosack works
Ben Pfaff [Tue, 1 Aug 2023 05:05:29 +0000 (22:05 -0700)]
sack works

9 months agowork
Ben Pfaff [Mon, 31 Jul 2023 18:06:57 +0000 (11:06 -0700)]
work

9 months agowork
Ben Pfaff [Mon, 31 Jul 2023 17:53:58 +0000 (10:53 -0700)]
work

9 months agowork
Ben Pfaff [Mon, 31 Jul 2023 16:50:46 +0000 (09:50 -0700)]
work

9 months agoAdd file names and line numbers to error messages.
Ben Pfaff [Sun, 30 Jul 2023 15:27:30 +0000 (08:27 -0700)]
Add file names and line numbers to error messages.

9 months agoseparate sack integration test binary
Ben Pfaff [Sun, 30 Jul 2023 14:43:33 +0000 (07:43 -0700)]
separate sack integration test binary

9 months agofinish sack library
Ben Pfaff [Sat, 29 Jul 2023 23:26:22 +0000 (16:26 -0700)]
finish sack library

10 months agosack making progress!
Ben Pfaff [Sat, 29 Jul 2023 19:21:20 +0000 (12:21 -0700)]
sack making progress!

10 months agowork on testing
Ben Pfaff [Sat, 29 Jul 2023 16:17:48 +0000 (09:17 -0700)]
work on testing

10 months agoparse zlib header and trailer
Ben Pfaff [Sat, 29 Jul 2023 04:37:35 +0000 (21:37 -0700)]
parse zlib header and trailer

10 months agoput common state into struct
Ben Pfaff [Sat, 29 Jul 2023 04:28:36 +0000 (21:28 -0700)]
put common state into struct

10 months agoactually use the new state machine
Ben Pfaff [Sat, 29 Jul 2023 03:47:37 +0000 (20:47 -0700)]
actually use the new state machine

10 months agozlib-compressed data compiles
Ben Pfaff [Sat, 29 Jul 2023 03:12:48 +0000 (20:12 -0700)]
zlib-compressed data compiles

10 months agowork (zlib works?)
Ben Pfaff [Fri, 28 Jul 2023 20:19:45 +0000 (13:19 -0700)]
work (zlib works?)

10 months agowork
Ben Pfaff [Fri, 28 Jul 2023 13:38:56 +0000 (06:38 -0700)]
work

10 months agowork
Ben Pfaff [Thu, 27 Jul 2023 16:08:45 +0000 (09:08 -0700)]
work

10 months agowork
Ben Pfaff [Wed, 26 Jul 2023 06:07:57 +0000 (23:07 -0700)]
work

10 months agowork
Ben Pfaff [Wed, 26 Jul 2023 03:38:21 +0000 (20:38 -0700)]
work

10 months agowork
Ben Pfaff [Tue, 25 Jul 2023 05:58:30 +0000 (22:58 -0700)]
work

10 months agowork
Ben Pfaff [Tue, 25 Jul 2023 02:48:39 +0000 (19:48 -0700)]
work

10 months agowork
Ben Pfaff [Tue, 25 Jul 2023 00:34:56 +0000 (17:34 -0700)]
work

10 months agowork on rust
Ben Pfaff [Mon, 24 Jul 2023 16:02:56 +0000 (09:02 -0700)]
work on rust

10 months agomore library work
Ben Pfaff [Sun, 23 Jul 2023 23:00:04 +0000 (16:00 -0700)]
more library work

10 months agomore work on library
Ben Pfaff [Sun, 23 Jul 2023 22:25:27 +0000 (15:25 -0700)]
more work on library

10 months agoWork on system file library.
Ben Pfaff [Sun, 23 Jul 2023 21:19:26 +0000 (14:19 -0700)]
Work on system file library.

10 months agofeature complete
Ben Pfaff [Sun, 23 Jul 2023 18:12:35 +0000 (11:12 -0700)]
feature complete

10 months agoI think it's complete.
Ben Pfaff [Sun, 23 Jul 2023 05:48:28 +0000 (22:48 -0700)]
I think it's complete.

10 months agowork
Ben Pfaff [Sat, 22 Jul 2023 20:09:36 +0000 (13:09 -0700)]
work

13 months agorust
Ben Pfaff [Sun, 16 Apr 2023 23:38:50 +0000 (16:38 -0700)]
rust

14 months agowork on rust version of pspp-dump-sav
Ben Pfaff [Sun, 19 Mar 2023 00:50:19 +0000 (17:50 -0700)]
work on rust version of pspp-dump-sav

14 months agoMATRIX: Check format specifier on PRINT command.
Ben Pfaff [Sat, 18 Mar 2023 21:41:40 +0000 (14:41 -0700)]
MATRIX: Check format specifier on PRINT command.

Thanks to Youngseok Choi for reporting the bug.

14 months agolexer: Avoid reentering the lexer upon error in special cases.
Ben Pfaff [Sat, 18 Mar 2023 21:09:38 +0000 (14:09 -0700)]
lexer: Avoid reentering the lexer upon error in special cases.

Thanks to Youngseok Choi for reporting the bug.

14 months agolexer: Simplify lex_get_error().
Ben Pfaff [Sat, 18 Mar 2023 21:25:08 +0000 (14:25 -0700)]
lexer: Simplify lex_get_error().

14 months agolexer: Get rid of useless code in lex_get_error().
Ben Pfaff [Sat, 18 Mar 2023 20:55:40 +0000 (13:55 -0700)]
lexer: Get rid of useless code in lex_get_error().

This function ellipsized the syntax and then didn't do anything with the
result.

14 months agodata-out: Make binary output buffer big enough for a null terminator.
Ben Pfaff [Sat, 18 Mar 2023 19:34:39 +0000 (12:34 -0700)]
data-out: Make binary output buffer big enough for a null terminator.

The max width for binary output is 16, for P or PK format, plus there
needs to be room for a null terminator, for a total width of 17 bytes.
The buffer here was undersized at only 16 bytes.  This commit fixes the
problem.

Thanks to Youngseok Choi for reporting the bug.

14 months agoMATRIX: Fix multiplication of empty matrices.
Ben Pfaff [Sat, 18 Mar 2023 19:22:42 +0000 (12:22 -0700)]
MATRIX: Fix multiplication of empty matrices.

This crashed due to an assertion failure in blas before.
Thanks to Youngseok Choi for reporting the bug.

14 months agodoc: Improve documentation for GET DATA/TYPE=PSQL.
Ben Pfaff [Sat, 18 Mar 2023 19:10:07 +0000 (12:10 -0700)]
doc: Improve documentation for GET DATA/TYPE=PSQL.

Reported by Kent Nassen.

14 months agoEnsure that interactive output appears without a one-command delay.
Ben Pfaff [Sat, 18 Mar 2023 18:43:16 +0000 (11:43 -0700)]
Ensure that interactive output appears without a one-command delay.

When pspp was run in the text-based mode interactively, output for a given
command only appeared after the next command was read.  This fixes the
problem and adds a test.

Thanks to the anonymous reporter.

Bug #63910.

14 months agoFix typo in manual.
Ben Pfaff [Wed, 8 Mar 2023 01:30:09 +0000 (17:30 -0800)]
Fix typo in manual.

Reported by knassen@chartermi.net.

14 months agoCLOSE FILE HANDLE: Fix bugs and add test.
Ben Pfaff [Tue, 7 Mar 2023 20:37:39 +0000 (12:37 -0800)]
CLOSE FILE HANDLE: Fix bugs and add test.

In addition to the particular bug that was reported, there was a memory
leak.  This commit fixes both.

Reported by knassen@chartermi.net.

14 months agoSHOW: Implement SHOW ENVIRONMENT.
Ben Pfaff [Tue, 7 Mar 2023 05:16:37 +0000 (21:16 -0800)]
SHOW: Implement SHOW ENVIRONMENT.

Requested by knassen@chartermi.net.

14 months agoDATA LIST: Fix crash with a bare / at the end of the command.
Ben Pfaff [Tue, 7 Mar 2023 01:00:13 +0000 (17:00 -0800)]
DATA LIST: Fix crash with a bare / at the end of the command.

Embarrassingly, this was in an example from the manual.

Reported by knassen@chartermi.net.

14 months agocase-map: Make creating a case_map destroy the stage.
Ben Pfaff [Sun, 5 Mar 2023 19:14:45 +0000 (11:14 -0800)]
case-map: Make creating a case_map destroy the stage.

This fit the usage model in every case in practice.

14 months agodataset: Replace 'compactor' by a translating casewriter.
Ben Pfaff [Sun, 5 Mar 2023 19:08:00 +0000 (11:08 -0800)]
dataset: Replace 'compactor' by a translating casewriter.

14 months agocase-map: Identity map is only when there are no changes at all.
Ben Pfaff [Sun, 5 Mar 2023 19:07:38 +0000 (11:07 -0800)]
case-map: Identity map is only when there are no changes at all.

case_map_stage_get_case_map() called a mapping an identity map when no
data was reordered, which left the possibility that data was removed from
the end would be called an identity map.  This seems like a bad idea, so
this commit tightens the criteria.

This is a bigger than necessary change that also avoids per-variable
malloc()s that weren't really needed.

This might be a bug fix.  I haven't identified a particular bug that
it fixes.

14 months agocase-map: Optimize case_map_create_output_translator() for no-op case.
Ben Pfaff [Sun, 5 Mar 2023 19:04:29 +0000 (11:04 -0800)]
case-map: Optimize case_map_create_output_translator() for no-op case.

14 months agodictionary: Get rid of case indexes.
Ben Pfaff [Sun, 5 Mar 2023 06:26:03 +0000 (22:26 -0800)]
dictionary: Get rid of case indexes.

Dictionary index (the index into the variables in the dictionary)
and case index (the index into struct ccase for a variable from
the dictionary) have always been independent, but they are
*usually* the same.  It is much cleaner to have an invariant
that they are *always* the same.  This commit makes that the case.

14 months agodictionary: Short-circuit no-op case in dict_reorder_var().
Ben Pfaff [Sun, 5 Mar 2023 17:23:53 +0000 (09:23 -0800)]
dictionary: Short-circuit no-op case in dict_reorder_var().

14 months agodictionary: Always compact immediately upon deletion of a variable.
Ben Pfaff [Sun, 5 Mar 2023 03:06:12 +0000 (19:06 -0800)]
dictionary: Always compact immediately upon deletion of a variable.

With this change, the dictionary has a new invariant that the case_indexes
are always a permutation of [0,N) where N is the number of variables in
the dictionary.  Most commonly, the case_indexes are the same as the
dict_indexes, but reordering the dictionary can permute them.

14 months agopc+-file-reader: Drop unneeded struct member.
Ben Pfaff [Sat, 4 Mar 2023 16:31:29 +0000 (08:31 -0800)]
pc+-file-reader: Drop unneeded struct member.

14 months agodictionary: Get rid of "internal var" concept.
Ben Pfaff [Sat, 4 Mar 2023 02:45:00 +0000 (18:45 -0800)]
dictionary: Get rid of "internal var" concept.

It's nasty and doesn't conform to the usual invariants.

14 months agocase-map: Simplify case_map_stage_get_case_map().
Ben Pfaff [Sat, 4 Mar 2023 01:56:15 +0000 (17:56 -0800)]
case-map: Simplify case_map_stage_get_case_map().

A caseproto can't contain -1s anymore, so don't look for them.

14 months agocase-map: Remove buggy and unused case_map_clone().
Ben Pfaff [Sat, 4 Mar 2023 01:55:12 +0000 (17:55 -0800)]
case-map: Remove buggy and unused case_map_clone().

The xmemdup() in the implementation copied 'old->proto' to 'new->map',
which can't possibly work.  We could fix it but it wasn't used anyway.

14 months agodictionary: Get rid of next_value_idx.
Ben Pfaff [Sat, 4 Mar 2023 01:31:36 +0000 (17:31 -0800)]
dictionary: Get rid of next_value_idx.

At this point, it was always the number of variables in the dictionary.

14 months agocaseproto: Disallow -1 elements in caseprotos.
Ben Pfaff [Sat, 4 Mar 2023 00:49:33 +0000 (16:49 -0800)]
caseproto: Disallow -1 elements in caseprotos.

This is a stronger invariant that should make PSPP code easier to
understand.

It required updating dict_get_proto() to avoid intermediate stages in
which a -1 appeared as a width.

14 months agocaseproto: Allocate base struct and widths separately.
Ben Pfaff [Sat, 4 Mar 2023 00:43:52 +0000 (16:43 -0800)]
caseproto: Allocate base struct and widths separately.

This will allow constructing a caseproto from a passed-in array
without copying it.

14 months agodataset: Before deleting variables, make sure new values are added.
Ben Pfaff [Sat, 4 Mar 2023 00:43:59 +0000 (16:43 -0800)]
dataset: Before deleting variables, make sure new values are added.

This fixes a crash reported privately by knassen(at)chartermi.net.

14 months agocaseinit: Introduce new caseinit_translate_casereader_to_init_vars().
Ben Pfaff [Thu, 2 Mar 2023 22:25:30 +0000 (14:25 -0800)]
caseinit: Introduce new caseinit_translate_casereader_to_init_vars().

14 months agoMakefiles: Make a couple of targets build more quietly.
Ben Pfaff [Sun, 5 Mar 2023 17:24:30 +0000 (09:24 -0800)]
Makefiles: Make a couple of targets build more quietly.

14 months agocaseproto: Fix calculation in caseproto_reserve().
Ben Pfaff [Sat, 4 Mar 2023 00:32:24 +0000 (16:32 -0800)]
caseproto: Fix calculation in caseproto_reserve().

This reserved way too much in a lot of cases.

14 months agoDO REPEAT: Order PRINT output correctly.
Ben Pfaff [Thu, 2 Mar 2023 22:16:25 +0000 (14:16 -0800)]
DO REPEAT: Order PRINT output correctly.

This was printed in reverse order, although the commands were executed in
the correct order.

15 months agoUpdate README.
Ben Pfaff [Mon, 27 Feb 2023 18:00:48 +0000 (10:00 -0800)]
Update README.

The PSPP output subsystem is now pretty good and I don't think that it's
necessary to include it as future work anymore.

I haven't heard anything about OpenBSD in a while, so I don't think it's
necessary to list its tests as an explicit caveat.

These days I tend to prefer hearing bug reports via email.

15 months agoAdd support for variable sets in the system file format.
Ben Pfaff [Sun, 26 Feb 2023 01:48:46 +0000 (17:48 -0800)]
Add support for variable sets in the system file format.

Variable sets are primarily a GUI feature, but this commit doesn't
implement them in the GUI.

15 months agodictionary: Avoid name shadowing in dict_clone().
Ben Pfaff [Mon, 27 Feb 2023 04:26:44 +0000 (20:26 -0800)]
dictionary: Avoid name shadowing in dict_clone().

In this case, it wasn't a bug, but it was confusing.

15 months agoAvoid another possible null pointer dereference
John Darrington [Sun, 26 Feb 2023 10:21:24 +0000 (11:21 +0100)]
Avoid another possible null pointer dereference

* modified:   tests/output/tex-strings.c

15 months agoAvoid possible null pointer dereference
John Darrington [Sun, 26 Feb 2023 09:59:50 +0000 (10:59 +0100)]
Avoid possible null pointer dereference

* modified:   src/ui/gui/psppire-encoding-selector.c

15 months agotreewide: Use struct fmt_spec by value instead of pointer in most cases.
Ben Pfaff [Sun, 26 Feb 2023 00:51:00 +0000 (16:51 -0800)]
treewide: Use struct fmt_spec by value instead of pointer in most cases.

struct fmt_spec is a small struct, only 4 bytes in size.  It doesn't make
sense to pass it by pointer in most cases.  This commit makes that change
treewide.

15 months agopivot-table: Force width of weight formats to 40.
Ben Pfaff [Sat, 25 Feb 2023 03:01:15 +0000 (19:01 -0800)]
pivot-table: Force width of weight formats to 40.

It was too confusing when output tables contained **** because of weight
variables with narrow widths.

Recently reported by Andreas Hammer.  I've also noticed the same thing
myself.

15 months agodictionary: Make dict_get_weight_format() return by value, not pointer.
Ben Pfaff [Sat, 25 Feb 2023 02:46:48 +0000 (18:46 -0800)]
dictionary: Make dict_get_weight_format() return by value, not pointer.

This seems like a better interface.

15 months agoDISPLAY MACROS: New command.
Ben Pfaff [Tue, 21 Feb 2023 19:05:16 +0000 (11:05 -0800)]
DISPLAY MACROS: New command.

15 months agoDELETE VARIABLES: Fix bugs related to details of case compaction.
Ben Pfaff [Mon, 20 Feb 2023 22:56:34 +0000 (14:56 -0800)]
DELETE VARIABLES: Fix bugs related to details of case compaction.

We have to change AUTORECODE and RANK so that they don't add a
transformation, since transformations prevent DELETE VARIABLES.

Thanks to Frans Houweling for reporting the problem.