Ben Pfaff [Sun, 27 Nov 2022 18:27:48 +0000 (10:27 -0800)]
doc: Make the developers guide just a description of file formats.
The other material in the developers guide was mostly obsolete or very
incomplete. I don't think it really helped any developers.
There were a few possibly valuable parts. I added them to the source tree,
which is where I think developers would be inclined to look.
Ben Pfaff [Sun, 27 Nov 2022 18:05:35 +0000 (10:05 -0800)]
Move all command implementations into a single 'commands' directory.
The original division of commands into subdirectories was fairly arbitrary,
and over time it got more confusing, even to me (who made the divisions
to begin with). I don't see a problem with having them in a single
directory, and it will confuse me less. This commit moves them all into
one place.
Ben Pfaff [Sun, 27 Nov 2022 17:39:27 +0000 (09:39 -0800)]
Remove unneeded #includes.
Ben Pfaff [Fri, 25 Nov 2022 23:20:52 +0000 (15:20 -0800)]
CTABLES: Fix issue with special case for SLABELS POSITION=ROW.
With SLABELS POSITION=ROW and stacked variables with different summaries,
values were shown in the wrong rows. This fixes the problem.
Thanks to Frans Houweling for reporting the bug.
Ben Pfaff [Fri, 25 Nov 2022 20:13:41 +0000 (12:13 -0800)]
pivot-table: Fix memory leak in debug print code.
Ben Pfaff [Thu, 24 Nov 2022 00:51:19 +0000 (16:51 -0800)]
CTABLES: Fix treatment of multiline titles.
Bug #63032.
Thanks to Frans Houweling for reporting this bug.
Ben Pfaff [Thu, 24 Nov 2022 00:39:35 +0000 (16:39 -0800)]
CTABLES: Make EMPTY independent of other settings on CATEGORIES.
Frans Houweling reported that the following two commands behave
differently:
CTABLES /TABLE=class > datum BY size
/CATEGORIES VARIABLES=ALL EMPTY=EXCLUDE
/CATEGORIES VARIABLES=size TOTAL=YES.
CTABLES /TABLE=class > datum BY size
/CATEGORIES VARIABLES=size TOTAL=YES
/CATEGORIES VARIABLES=ALL EMPTY=EXCLUDE.
There was a good reason for this, which is that CATEGORIES always changes
all the category attributes of whatever variables are named. That is,
CATEGORIES VARIABLES=ALL overrides TOTAL even if EMPTY is the only
subcommand given. I don't know what SPSS does here, but this behavior is
surprising enough that I wanted to change it. This commit does that;
afterward, both of the above commands behave the same way, which
combines effects of TOTAL=YES and EMPTY=EXCLUDE for size and just
EMPTY=EXCLUDE for the class and datum.
Ben Pfaff [Wed, 23 Nov 2022 02:47:59 +0000 (18:47 -0800)]
examples: Rename variables for nhtsa example to give them better names.
The existing names were taken from question numbers in the questionnaire
(I guess), which weren't meaningful. This replaces them by meaningful
names.
Thanks to Frans Houweling <fhouweling@email.it> for providing the new
names!
Ben Pfaff [Wed, 23 Nov 2022 01:15:22 +0000 (17:15 -0800)]
spv-driver: Fix memory leak on error path.
Ben Pfaff [Tue, 22 Nov 2022 22:47:45 +0000 (14:47 -0800)]
spv: ALlow an extra 01 at the end of X3.
One sample received in a user report had this present.
Ben Pfaff [Mon, 21 Nov 2022 07:00:19 +0000 (23:00 -0800)]
UPDATE: Improve a test.
Ben Pfaff [Mon, 21 Nov 2022 06:25:33 +0000 (22:25 -0800)]
MEANS: Improve error messages and coding style.
Ben Pfaff [Mon, 21 Nov 2022 06:15:11 +0000 (22:15 -0800)]
OUTPUT MODIFY: Improve error messages and coding style.
Ben Pfaff [Mon, 21 Nov 2022 00:49:55 +0000 (16:49 -0800)]
SET: Improve error messages and coding style.
Ben Pfaff [Mon, 21 Nov 2022 00:46:30 +0000 (16:46 -0800)]
INSERT: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 22:14:04 +0000 (14:14 -0800)]
ROC: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 22:03:13 +0000 (14:03 -0800)]
RANK: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 21:54:37 +0000 (13:54 -0800)]
ONEWAY: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 21:29:12 +0000 (13:29 -0800)]
GRAPH: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 19:28:02 +0000 (11:28 -0800)]
LOGISTIC REGRESSION: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 17:58:01 +0000 (09:58 -0800)]
GLM: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 17:52:31 +0000 (09:52 -0800)]
split-file: New function output_split_file_values_peek().
This helper function encapsulates what most of the callers were doing.
Ben Pfaff [Sun, 20 Nov 2022 17:51:09 +0000 (09:51 -0800)]
casereader: Add const to casereader_peek() and casereader_is_empty().
These don't affect the external state of a casereader even though they can
affect its internal state.
Ben Pfaff [Sun, 20 Nov 2022 17:50:21 +0000 (09:50 -0800)]
casereader-shim: Fix typo in comment.
Ben Pfaff [Sun, 20 Nov 2022 17:02:00 +0000 (09:02 -0800)]
Disentangle the interaction parser from the variable parser.
Both GLM and LOGISTIC REGRESSION used the interaction parser, but only GLM
used it to parse interactions in the full sense. LOGISTIC REGRESSION was
just parsing a list of variables and then creating interactions from them.
This commit moves the interaction parser from variable-parser into GLM and
adds new code to LOGISTIC REGRESSION that satisfies its needs.
Ben Pfaff [Sun, 20 Nov 2022 02:57:53 +0000 (18:57 -0800)]
GLM: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 01:48:08 +0000 (17:48 -0800)]
FACTOR: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 01:00:57 +0000 (17:00 -0800)]
QUICK CLUSTER: Improve error messages and coding style.
Ben Pfaff [Sun, 20 Nov 2022 00:58:49 +0000 (16:58 -0800)]
MATRIX: Improve error messages.
Ben Pfaff [Fri, 11 Nov 2022 17:38:50 +0000 (09:38 -0800)]
EXAMINE: Improve error messages and coding style.
Ben Pfaff [Thu, 17 Nov 2022 22:37:31 +0000 (14:37 -0800)]
expressions: Minor error message improvement.
Ben Pfaff [Fri, 11 Nov 2022 17:40:33 +0000 (09:40 -0800)]
pool: Support null 'pool' argument in pool_vasprintf().
Other similar functions support a null 'pool', so this function should too.
Ben Pfaff [Fri, 11 Nov 2022 06:17:21 +0000 (22:17 -0800)]
DESCRIPTIVES: Improve error messages and coding style.
Ben Pfaff [Fri, 11 Nov 2022 06:15:18 +0000 (22:15 -0800)]
CTABLES: Improve error messages.
Ben Pfaff [Fri, 11 Nov 2022 06:13:32 +0000 (22:13 -0800)]
CROSSTABS: Improve error messages and coding style.
Ben Pfaff [Fri, 11 Nov 2022 06:12:04 +0000 (22:12 -0800)]
CORRELATIONS: Improve error messages and coding style.
Ben Pfaff [Fri, 11 Nov 2022 06:06:26 +0000 (22:06 -0800)]
VECTOR: Improve error messages and coding style.
Ben Pfaff [Fri, 11 Nov 2022 06:04:12 +0000 (22:04 -0800)]
variable-display: Improve coding style and error messages.
Ben Pfaff [Fri, 11 Nov 2022 05:50:26 +0000 (21:50 -0800)]
SORT VARIABLES: Improve error messages.
Ben Pfaff [Fri, 11 Nov 2022 05:48:34 +0000 (21:48 -0800)]
MRSETS: Improve error messages.
Ben Pfaff [Thu, 10 Nov 2022 15:35:01 +0000 (07:35 -0800)]
MATRIX DATA: Improve error messages.
Ben Pfaff [Mon, 7 Nov 2022 03:09:16 +0000 (19:09 -0800)]
REREAD: Improve error messages and coding style.
Ben Pfaff [Sun, 6 Nov 2022 19:54:48 +0000 (11:54 -0800)]
DATASET: Improve error messages and coding style.
Ben Pfaff [Sun, 6 Nov 2022 19:52:58 +0000 (11:52 -0800)]
FILE HANDLE: Improve error messages and coding style.
Ben Pfaff [Sun, 6 Nov 2022 19:33:59 +0000 (11:33 -0800)]
GET DATA: Improve coding style and tests.
Ben Pfaff [Sun, 6 Nov 2022 19:28:59 +0000 (11:28 -0800)]
CORRELATIONS: Rename cmd_correlation() to cmd_correlations() for consistency.
Ben Pfaff [Sun, 6 Nov 2022 19:41:06 +0000 (11:41 -0800)]
Use lex_error_expecting() in more places.
Ben Pfaff [Sun, 6 Nov 2022 19:27:59 +0000 (11:27 -0800)]
file-handle-def: Style improvements.
Ben Pfaff [Sun, 25 Sep 2022 23:01:26 +0000 (16:01 -0700)]
lexer: New function lex_force_match_phrase().
Ben Pfaff [Sun, 6 Nov 2022 18:42:51 +0000 (10:42 -0800)]
spvxml-helpers: Avoid warning on recent versions of libxml2.
Ben Pfaff [Wed, 21 Sep 2022 23:32:26 +0000 (16:32 -0700)]
format: Improve error messages.
Ben Pfaff [Wed, 21 Sep 2022 23:29:46 +0000 (16:29 -0700)]
docs: Improve example in DEFINE.
Ben Pfaff [Wed, 21 Sep 2022 23:29:32 +0000 (16:29 -0700)]
DATA LIST: Improve error messages and coding style.
Ben Pfaff [Wed, 21 Sep 2022 23:33:32 +0000 (16:33 -0700)]
LOOP: Improve error messages and coding style.
Ben Pfaff [Wed, 21 Sep 2022 22:31:54 +0000 (15:31 -0700)]
DO REPEAT: Improve error messages and coding style.
Ben Pfaff [Tue, 20 Sep 2022 06:13:16 +0000 (23:13 -0700)]
RECODE: Improve error messages and coding style.
Ben Pfaff [Mon, 19 Sep 2022 02:59:16 +0000 (19:59 -0700)]
T-TEST: Improve error messages and coding style.
Ben Pfaff [Mon, 19 Sep 2022 02:31:47 +0000 (19:31 -0700)]
SORT CASES: Improve error messages and coding style.
Ben Pfaff [Mon, 19 Sep 2022 02:08:06 +0000 (19:08 -0700)]
RELIABILITY: Improve error messages and coding style.
Ben Pfaff [Mon, 19 Sep 2022 01:43:01 +0000 (18:43 -0700)]
REGRESSION: Improve error messages and coding style.
Ben Pfaff [Mon, 19 Sep 2022 01:15:55 +0000 (18:15 -0700)]
NPAR TESTS: Improve error messages and coding style.
Ben Pfaff [Sun, 18 Sep 2022 23:47:58 +0000 (16:47 -0700)]
MATRIX: Improve error messages.
Ben Pfaff [Sun, 18 Sep 2022 23:47:49 +0000 (16:47 -0700)]
GLM: Improve error messages.
Ben Pfaff [Sun, 18 Sep 2022 23:42:40 +0000 (16:42 -0700)]
FREQUENCIES: Improve error message and coding style.
Ben Pfaff [Sun, 18 Sep 2022 23:42:26 +0000 (16:42 -0700)]
lexer: Make lex_error_expecting_valist() support a longer list.
Ben Pfaff [Sun, 18 Sep 2022 21:08:28 +0000 (14:08 -0700)]
FACTOR: Improve error messages and coding style.
Ben Pfaff [Sun, 18 Sep 2022 21:08:20 +0000 (14:08 -0700)]
EXAMINE: Improve error messages.
Ben Pfaff [Sun, 18 Sep 2022 20:07:13 +0000 (13:07 -0700)]
NUMERIC, STRING, LEAVE: Improve error messages.
Ben Pfaff [Sun, 18 Sep 2022 19:34:19 +0000 (12:34 -0700)]
RENAME VARIABLES: Remove obsolete comment.
Ben Pfaff [Sun, 18 Sep 2022 19:33:03 +0000 (12:33 -0700)]
MODIFY VARS: Remove.
Ben Pfaff [Sat, 17 Sep 2022 16:43:42 +0000 (09:43 -0700)]
MISSING VALUES: Improve error messages.
Ben Pfaff [Fri, 16 Sep 2022 23:14:34 +0000 (16:14 -0700)]
DELETE VARIABLES: Improve error messages.
Ben Pfaff [Fri, 16 Sep 2022 23:08:25 +0000 (16:08 -0700)]
APPLY DICTIONARY: Style improvements.
Ben Pfaff [Tue, 13 Sep 2022 02:19:38 +0000 (19:19 -0700)]
SAVE TRANSLATE: Improve error messages and implementation of RENAME.
Ben Pfaff [Tue, 13 Sep 2022 01:48:46 +0000 (18:48 -0700)]
PRINT: Improve error messages.
Ben Pfaff [Mon, 12 Sep 2022 17:33:13 +0000 (10:33 -0700)]
placement-parser: Improve error messages for format assignment.
Ben Pfaff [Mon, 12 Sep 2022 16:34:59 +0000 (09:34 -0700)]
PRINT SPACE: Improve error messages.
Ben Pfaff [Mon, 12 Sep 2022 06:01:53 +0000 (23:01 -0700)]
MATRIX DATA: Improve error messages.
Ben Pfaff [Mon, 12 Sep 2022 05:51:13 +0000 (22:51 -0700)]
LIST: Improve error messages.
Ben Pfaff [Mon, 12 Sep 2022 05:33:15 +0000 (22:33 -0700)]
SET: Improve error messages for SET CCx.
Ben Pfaff [Mon, 12 Sep 2022 05:10:40 +0000 (22:10 -0700)]
Improve error messages for format specifiers.
Ben Pfaff [Mon, 12 Sep 2022 03:50:33 +0000 (20:50 -0700)]
MATCH FILES, UPDATE, ADD FILES: Improve error messages.
Ben Pfaff [Mon, 12 Sep 2022 01:30:51 +0000 (18:30 -0700)]
SHOW: Display settings in pivot table.
Ben Pfaff [Mon, 12 Sep 2022 00:30:07 +0000 (17:30 -0700)]
Assorted improvements to diagnostics.
Ben Pfaff [Mon, 12 Sep 2022 00:24:42 +0000 (17:24 -0700)]
INSERT: Add testing-only feature for ignoring cascading failures.
This makes it easier to write tests that cause a lot of cascading failures.
Ben Pfaff [Sun, 11 Sep 2022 19:23:10 +0000 (12:23 -0700)]
AGGREGATE: Bring up to speed.
Ben Pfaff [Sun, 11 Sep 2022 19:08:43 +0000 (12:08 -0700)]
DEFINE: Don't label a declaration, for C99 compatibility.
Thanks to Friedrich Beckmann for reporting the problem.
Fixes: 36fc62cea799 ("macro: Coding style improvement in macro_tokens_from_string().")Fixes: b8f7ae6610f0 ("DEFINE: Improve error messages for parsing macro body.")
Ben Pfaff [Sun, 11 Sep 2022 19:04:09 +0000 (12:04 -0700)]
AGGREGATE: Improve stats accumulation data structure.
Ben Pfaff [Sun, 11 Sep 2022 18:40:02 +0000 (11:40 -0700)]
str: Replace ss_alloc_substring() by ss_clone() and similarly with a pool.
This makes it possible to use in an initializer.
Ben Pfaff [Sun, 11 Sep 2022 18:12:21 +0000 (11:12 -0700)]
AGGREGATE: Use array instead of linked list.
Ben Pfaff [Sun, 11 Sep 2022 18:10:11 +0000 (11:10 -0700)]
AGGREGATE: Remove write-only struct member.
Ben Pfaff [Sun, 11 Sep 2022 03:55:25 +0000 (20:55 -0700)]
macro: Coding style improvement in macro_tokens_from_string().
Ben Pfaff [Sun, 11 Sep 2022 16:31:19 +0000 (09:31 -0700)]
value: Update comments.
These used to be true but they no longer are, so remove them.
Ben Pfaff [Sun, 11 Sep 2022 03:55:06 +0000 (20:55 -0700)]
segment: Comment fix.
Ben Pfaff [Sun, 11 Sep 2022 01:23:09 +0000 (18:23 -0700)]
DEFINE: Improve error messages for parsing macro body.
Without this change, errors always got reported following the macro body,
not for the particular token at issue.
Ben Pfaff [Sun, 11 Sep 2022 01:11:18 +0000 (18:11 -0700)]
Improve error messages for missing subcommands.
Ben Pfaff [Sat, 10 Sep 2022 18:12:33 +0000 (11:12 -0700)]
format: Cite variable names in messages reporting incompatible width.
Ben Pfaff [Sat, 10 Sep 2022 18:04:21 +0000 (11:04 -0700)]
Cite tokens when reporting invalid identifiers.
These functions weren't able to cite a specific token in cases where that
was appropriate. This fixes the problem.
Ben Pfaff [Mon, 29 Aug 2022 17:02:48 +0000 (10:02 -0700)]
Improve error messages by citing syntax in more of them.
A while back, PSPP gained the ability to cite particular tokens in
diagnostics, but few of the existing messages were enhanced to do
so. This commit adds this to several more of them, in particular
all of the messages that used lex_error() and variations.
Ben Pfaff [Wed, 7 Sep 2022 15:27:54 +0000 (08:27 -0700)]
CTABLES: Allow CAPTIONS, CORNERS, TITLES in TITLES subcommand.
Matthias Faeth reported that SPSS accepts these spellings.