pspp
2 years agosegment: Fix 1-byte read past initialized data when file ends in CR.
Ben Pfaff [Tue, 5 Oct 2021 06:14:32 +0000 (23:14 -0700)]
segment: Fix 1-byte read past initialized data when file ends in CR.

Fixes bug #61253.
Thanks to Irfan Ariq for reporting this bug.

2 years agoRemove some unnecessary gettext macro definitions
John Darrington [Sun, 3 Oct 2021 06:03:44 +0000 (08:03 +0200)]
Remove some unnecessary gettext macro definitions

2 years agoFix compiler warning
John Darrington [Sat, 2 Oct 2021 19:16:55 +0000 (21:16 +0200)]
Fix compiler warning

2 years agoFix memory leak in tokenize_string_segment
John Darrington [Sat, 2 Oct 2021 16:33:21 +0000 (18:33 +0200)]
Fix memory leak in tokenize_string_segment

2 years agoFix memory leak in MCONVERT
John Darrington [Sat, 2 Oct 2021 14:51:37 +0000 (16:51 +0200)]
Fix memory leak in MCONVERT

2 years agoFix memory leak upon failure to create matrix reader
John Darrington [Sat, 2 Oct 2021 14:35:42 +0000 (16:35 +0200)]
Fix memory leak upon failure to create matrix reader

2 years agoMore ASAN_OPTIONS
John Darrington [Sat, 2 Oct 2021 14:31:14 +0000 (16:31 +0200)]
More ASAN_OPTIONS

2 years agoUse XCALLOC / XZALLOC macros where reasonable
John Darrington [Sat, 2 Oct 2021 13:32:40 +0000 (15:32 +0200)]
Use XCALLOC / XZALLOC macros where reasonable

2 years agoFix possible segfault when running RANK with bad syntax
John Darrington [Sat, 2 Oct 2021 04:48:57 +0000 (06:48 +0200)]
Fix possible segfault when running RANK with bad syntax

* src/language/stats/rank.c (): Initialise the vars member

Fixes bug #61257

2 years agoReplace numerous instances of xzalloc with XZALLOC
John Darrington [Sat, 2 Oct 2021 04:47:31 +0000 (06:47 +0200)]
Replace numerous instances of xzalloc with XZALLOC

2 years agoMatrix readers - fix memory leaks
John Darrington [Sun, 26 Sep 2021 18:26:45 +0000 (20:26 +0200)]
Matrix readers - fix memory leaks

* src/language/data-io/matrix-reader.c (matrix_reader_destroy): free members cvar, svars and fvars

2 years agoIgnore sanitizer ODR warnings, during testing with -fsanitize=address
John Darrington [Sun, 26 Sep 2021 18:39:38 +0000 (20:39 +0200)]
Ignore sanitizer ODR warnings, during testing with -fsanitize=address

* tests/libpspp/sparse-xarray-test.at: Set detect_odr_violation=0

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

2 years agolexer: Fix use-after-free error in lex_source_get_lookahead().
Ben Pfaff [Sun, 26 Sep 2021 18:06:45 +0000 (11:06 -0700)]
lexer: Fix use-after-free error in lex_source_get_lookahead().

This code used local variable 'out' as if its value stayed the same from
one iteration of the loop to the next, but in fact its scope meant that
it became indeterminate on each new iteration.  This commit fixes the
problem by moving its declaration to an outer scope.

Thanks to John Darrington for reporting the problem.

2 years agoAvoid numerical problems with missing weights on non-linear cases.
John Darrington [Sun, 26 Sep 2021 14:53:38 +0000 (16:53 +0200)]
Avoid numerical problems with missing weights on non-linear cases.

* src/math/order-stats.c (order_stats_accumulate_idx): Ignore cases
  with missing weight values.

2 years agoFix possible incorrect assertion when creating unique casereaders.
John Darrington [Sat, 25 Sep 2021 16:59:52 +0000 (18:59 +0200)]
Fix possible incorrect assertion when creating unique casereaders.

* src/data/casereader-translator.c (uniquify): Force dir to be an element of  {0, 1, -1}

2 years agoRemove unused module src/math/extrema
John Darrington [Sat, 25 Sep 2021 09:41:04 +0000 (11:41 +0200)]
Remove unused module src/math/extrema

* src/math/extrema.c: Delete
* src/math/extrema.h: Delete
* src/math/automake.mk: Remove entries for src/math/extrema.c and
  src/math/extrema.h

2 years agoOptions dialog: add checkbox for startup tips
John Darrington [Sat, 11 Sep 2021 05:39:29 +0000 (07:39 +0200)]
Options dialog: add checkbox for startup tips

2 years agosys-file-encoding: Automatically generate the .c file at build time.
Ben Pfaff [Mon, 6 Sep 2021 17:07:41 +0000 (10:07 -0700)]
sys-file-encoding: Automatically generate the .c file at build time.

Suggested by John Darrington.

2 years agoWindows/build-dependencies: Add -fstack-protector flags
John Darrington [Sun, 5 Sep 2021 11:16:33 +0000 (13:16 +0200)]
Windows/build-dependencies: Add -fstack-protector flags

For some reason this flag seems to be necessary with the latest
x86_64_w64-mingw32 toolchain.

2 years agoWindows/build-dependencies: Use correct logical OR operator
John Darrington [Sun, 5 Sep 2021 11:01:25 +0000 (13:01 +0200)]
Windows/build-dependencies: Use correct logical OR operator

2 years agoWindows/build-dependencies: New flag --no-clean
John Darrington [Sun, 5 Sep 2021 10:59:49 +0000 (12:59 +0200)]
Windows/build-dependencies: New flag --no-clean

2 years agoAdd some missing #include directives
John Darrington [Sat, 4 Sep 2021 07:36:55 +0000 (09:36 +0200)]
Add some missing #include directives

* src/language/stats/crosstabs.c: Add missing #include directive.
* src/libpspp/pool.c: Add missing #include directive.

2 years agoMATRIX DATA: Fully implement.
Ben Pfaff [Fri, 3 Sep 2021 05:15:53 +0000 (22:15 -0700)]
MATRIX DATA: Fully implement.

This command had a partial implementation for correlation matrices that
left out some of the language features.  This commit adds those features.

2 years agocase: Introduce new functions for numbers and substrings in cases.
Ben Pfaff [Fri, 3 Sep 2021 02:59:23 +0000 (19:59 -0700)]
case: Introduce new functions for numbers and substrings in cases.

Use the case_num_*() functions everywhere in the tree for clarity and
brevity.

2 years agosys-file-encoding: Put the buffer-read-only declaration at the very top.
Ben Pfaff [Fri, 3 Sep 2021 01:45:39 +0000 (18:45 -0700)]
sys-file-encoding: Put the buffer-read-only declaration at the very top.

This accidentally got pushed down when license notices were added to a
bunch of files en masse.  It only works if it's at the top.

2 years agoRemove unneeded Emacs declarations that say that a .c file is in C.
Ben Pfaff [Sat, 31 Jul 2021 02:48:08 +0000 (19:48 -0700)]
Remove unneeded Emacs declarations that say that a .c file is in C.

These were there because they were formerly .q files.

2 years agoDEFINE: Properly support redefining a macro.
Ben Pfaff [Thu, 2 Sep 2021 16:23:11 +0000 (09:23 -0700)]
DEFINE: Properly support redefining a macro.

Redefining a macro didn't work in simple cases because the macro name was
being expanded in the DEFINE command.

Thanks to Frans Houweling for reporting the bug.

2 years agomacro: Fix crash for !QUOTE of a quoted string.
Ben Pfaff [Wed, 1 Sep 2021 17:02:26 +0000 (10:02 -0700)]
macro: Fix crash for !QUOTE of a quoted string.

This revealed that the tests didn't include anything for !QUOTE and
!UNQUOTE, even though the manual had lots of examples.  I added a test for
these and for !NULL, which had also been forgotten.

Thanks to Frans Houweling for reporting the bug.

2 years agoAvoid GtkCritical on startup
John Darrington [Sun, 29 Aug 2021 17:45:38 +0000 (19:45 +0200)]
Avoid GtkCritical on startup

2 years agoTeX tests: Use the shell instead of wc to test for maximum line length.
John Darrington [Sat, 28 Aug 2021 08:50:32 +0000 (10:50 +0200)]
TeX tests: Use the shell instead of wc to test for maximum line length.

When testing for maximum line length use the shell rather than
relying on wc -L  : The -L flag is not present on some systems.

tests/tex.at: Remove dependence on wc
configure.ac: Remove test for wc -L

Fixes bug #59859

2 years agoFix import of ods files with repeated column data.
John Darrington [Sat, 28 Aug 2021 07:10:34 +0000 (09:10 +0200)]
Fix import of ods files with repeated column data.

Fixes bug #61078

Reported-by: Elias Tsolis
2 years agoFix crash when double clicking on variable sheet cells when no variable is defined.
John Darrington [Sat, 28 Aug 2021 07:02:14 +0000 (09:02 +0200)]
Fix crash when double clicking on variable sheet cells when no variable is defined.

Reported-by: Maruthi Pathapati
2 years agoDEFINE: Only expand macro functions when the name is followed by '('.
Ben Pfaff [Thu, 26 Aug 2021 16:32:31 +0000 (09:32 -0700)]
DEFINE: Only expand macro functions when the name is followed by '('.

Frans Houweling reported that PSPP was flagging an error for !EVAL(!len)
when !len was the name of a defined macro.  This was because !len is short
for the !LENGTH macro function.  This commit fixes the problem.

2 years agoTolerate pathnames with spaces
John Darrington [Sat, 24 Jul 2021 13:32:04 +0000 (15:32 +0200)]
Tolerate pathnames with spaces

Reported by: Vivien Kraus

2 years agomacro: Continue expanding macro even in face of errors in call.
Ben Pfaff [Sat, 24 Jul 2021 06:17:48 +0000 (23:17 -0700)]
macro: Continue expanding macro even in face of errors in call.

In practice, it was more confusing not to expand it than to expand it.

2 years agomacro: Allow positional arguments to be empty.
Ben Pfaff [Sat, 24 Jul 2021 06:08:31 +0000 (23:08 -0700)]
macro: Allow positional arguments to be empty.

It wasn't clear before that this was allowed, but it seems that it should
be for compatibility.

Reported by Frans Houweling.

2 years agomacro: Make ARG_CHAREND and ARG_ENCLOSE more uniform in struct macro_param.
Ben Pfaff [Sat, 24 Jul 2021 05:50:55 +0000 (22:50 -0700)]
macro: Make ARG_CHAREND and ARG_ENCLOSE more uniform in struct macro_param.

A few pieces of code want to find the end of a parameter and it's easier
if the "end" token is always the same member.

2 years agoidentifier: Make T_STOP always 0.
Ben Pfaff [Sat, 24 Jul 2021 05:51:34 +0000 (22:51 -0700)]
identifier: Make T_STOP always 0.

This is more sensible default if a token is zero-initialized.

2 years agomacro: Allow macro A to use its arguments as part of call to macro B.
Ben Pfaff [Thu, 22 Jul 2021 06:00:10 +0000 (23:00 -0700)]
macro: Allow macro A to use its arguments as part of call to macro B.

I overlooked this possibility before.  This implements it.

Thanks to Frans Houweling for reporting the issue.

2 years agoTurn !* into a single token, for macro expansion purposes.
Ben Pfaff [Thu, 22 Jul 2021 05:48:07 +0000 (22:48 -0700)]
Turn !* into a single token, for macro expansion purposes.

2 years agoDEFINE: Equals sign is optional for both positional and keyword parameters.
Ben Pfaff [Tue, 20 Jul 2021 14:53:59 +0000 (07:53 -0700)]
DEFINE: Equals sign is optional for both positional and keyword parameters.

Thanks to Frans Houweling for reporting this bug.

2 years agomacro: Properly parse !ENCLOSE keyword arguments.
Ben Pfaff [Tue, 20 Jul 2021 05:19:41 +0000 (22:19 -0700)]
macro: Properly parse !ENCLOSE keyword arguments.

The opening delimiter was being included in the argument.

Thanks to Frans Houweling for reporting this bug.

2 years agoDEFINE: Don't use PSPP_CHECK_MACRO_EXPANSION macro in tests.
Ben Pfaff [Tue, 20 Jul 2021 05:10:27 +0000 (22:10 -0700)]
DEFINE: Don't use PSPP_CHECK_MACRO_EXPANSION macro in tests.

I found that this macro just obscured things, so I expanded it in each
case and removed the macro itself.

2 years agoDEFINE: Allow !DEFAULT to follow the argument type declaration.
Ben Pfaff [Tue, 20 Jul 2021 03:49:32 +0000 (20:49 -0700)]
DEFINE: Allow !DEFAULT to follow the argument type declaration.

Frans Houweling reported that SPSS allows either order.

2 years agolexer: Change the pipeline to allow more flexible use of macros.
Ben Pfaff [Sun, 18 Jul 2021 21:21:24 +0000 (14:21 -0700)]
lexer: Change the pipeline to allow more flexible use of macros.

Frans Houweling reported that a use of macros in the following way:

    DEFINE !dir() "/directory/to/my/work" !ENDDEFINE.
    GET FILE=!dir + "/filename.sav".

did not work properly with the newly implemented PSPP macro facility.
Indeed, PSPP has until now implemented string concatenation early in the
lexical pipeline, before macro expansion, so that the above could
not work.  This commit reworks it so that string concatenation happens
as the last stage in lexical analysis.  It allows the above syntax
to work as expected.

2 years agostr: New function ss_swap().
Ben Pfaff [Sun, 18 Jul 2021 21:20:06 +0000 (14:20 -0700)]
str: New function ss_swap().

2 years agosegment: Make negative numbers into single segments.
Ben Pfaff [Mon, 5 Jul 2021 22:15:45 +0000 (15:15 -0700)]
segment: Make negative numbers into single segments.

2 years agoconfigure: Enable GCC warnings to report use of C2x features.
Ben Pfaff [Mon, 5 Jul 2021 20:46:32 +0000 (13:46 -0700)]
configure: Enable GCC warnings to report use of C2x features.

One C2x feature in GCC 11 is the reason that the previous commit
afda22462a88 ("Fix broken build due to missing braces") was needed by
some developers.

2 years agoFix broken build due to missing braces
John Darrington [Sun, 4 Jul 2021 17:44:07 +0000 (19:44 +0200)]
Fix broken build due to missing braces

2 years agoDEFINE: New command.
Ben Pfaff [Sun, 4 Jul 2021 05:05:35 +0000 (22:05 -0700)]
DEFINE: New command.

2 years agolexer: Move lex_ellipsize() into string module, as str_ellipsize().
Ben Pfaff [Sun, 4 Jul 2021 16:43:09 +0000 (09:43 -0700)]
lexer: Move lex_ellipsize() into string module, as str_ellipsize().

2 years agotoken: Update functional interface and add token_copy(), token_equal().
Ben Pfaff [Sun, 4 Jul 2021 05:20:55 +0000 (22:20 -0700)]
token: Update functional interface and add token_copy(), token_equal().

These will have users in an upcoming commit.

2 years agosegment: Ignore !ENDDEFINE in /*comments*/ and "strings".
Ben Pfaff [Sun, 4 Jul 2021 05:10:26 +0000 (22:10 -0700)]
segment: Ignore !ENDDEFINE in /*comments*/ and "strings".

2 years agosegment: Distinguish snippets from full files.
Ben Pfaff [Sun, 4 Jul 2021 05:00:47 +0000 (22:00 -0700)]
segment: Distinguish snippets from full files.

The comment on segmenter_init() explains what this means:

If IS_SNIPPET is false, then the segmenter will parse as if it's being
given a whole file.  This means, for example, that it will interpret -
or + at the beginning of the syntax as a separator between commands
(since - or + at the beginning of a line has this meaning).

If IS_SNIPPET is true, then the segmenter will parse as if it's being
given an isolated piece of syntax.  This means that, for example, that
it will interpret - or + at the beginning of the syntax as an operator
token or (if followed by a digit) as part of a number.

2 years agolexer: Factor out scan error messages into new function.
Ben Pfaff [Sun, 4 Jul 2021 02:35:32 +0000 (19:35 -0700)]
lexer: Factor out scan error messages into new function.

2 years agomessage: Make msg_emit() take full ownership of its argument.
Ben Pfaff [Sat, 3 Jul 2021 18:46:17 +0000 (11:46 -0700)]
message: Make msg_emit() take full ownership of its argument.

The way it treated the argument before was just confusing.

2 years agomessage: Break message location out into a separate struct.
Ben Pfaff [Sat, 3 Jul 2021 18:28:05 +0000 (11:28 -0700)]
message: Break message location out into a separate struct.

This will make it cleaner to have a stack of locations for use in reporting
macro expansion errors.

2 years agomessage: Get rid of 'shipped' member in struct message.
Ben Pfaff [Sat, 3 Jul 2021 01:07:24 +0000 (18:07 -0700)]
message: Get rid of 'shipped' member in struct message.

It seemed to me that it wasn't a very clean design, since it required a
message to be modified as part of emitting it.

2 years agostringi-set: New functions for not necessarily null terminated strings.
Ben Pfaff [Sat, 26 Jun 2021 21:54:37 +0000 (14:54 -0700)]
stringi-set: New functions for not necessarily null terminated strings.

2 years agostringi-map: Add some support for non-null-terminated strings.
Ben Pfaff [Sun, 4 Jul 2021 21:13:45 +0000 (14:13 -0700)]
stringi-map: Add some support for non-null-terminated strings.

2 years agoTITLE and SUBTITLE: Don't treat an unquoted argument as a quoted string.
Ben Pfaff [Sat, 26 Jun 2021 21:53:23 +0000 (14:53 -0700)]
TITLE and SUBTITLE: Don't treat an unquoted argument as a quoted string.

This will allow the argument to be processed through the macro processor.

2 years agolexer: New function lex_next_representation().
Ben Pfaff [Sun, 27 Jun 2021 18:19:07 +0000 (11:19 -0700)]
lexer: New function lex_next_representation().

2 years agolexer: Factor some token inspectors out into new token functions.
Ben Pfaff [Sun, 13 Jun 2021 17:33:09 +0000 (10:33 -0700)]
lexer: Factor some token inspectors out into new token functions.

2 years agodoc: Fix operator precedence chart.
Ben Pfaff [Sat, 12 Jun 2021 21:39:20 +0000 (14:39 -0700)]
doc: Fix operator precedence chart.

Also, improve a few entries.

2 years agoidentifier: Remove TOKEN_N_TYPES from enum token_type.
Ben Pfaff [Sun, 30 May 2021 22:49:42 +0000 (15:49 -0700)]
identifier: Remove TOKEN_N_TYPES from enum token_type.

2 years agosegment: Refine treatment of start of macro body.
Ben Pfaff [Sun, 30 May 2021 20:31:39 +0000 (13:31 -0700)]
segment: Refine treatment of start of macro body.

Previously, if the first line of the macro body (the same line as the
closing parenthesis in the DEFINE) was blank, we reported it as a blank
line to the lexer.  The parser for DEFINE could check for that (by seeing
whether the first line of macro body was empty or all-spaces) but it seems
more elegant to do it in the segmenter.  This implements that.

2 years agosegment: Fix implementation of is_all_spaces().
Ben Pfaff [Sun, 30 May 2021 20:30:10 +0000 (13:30 -0700)]
segment: Fix implementation of is_all_spaces().

2 years agosegment: The body of DEFINE does not have to be on separate lines.
Ben Pfaff [Sun, 30 May 2021 20:00:24 +0000 (13:00 -0700)]
segment: The body of DEFINE does not have to be on separate lines.

Some examples of one-line DEFINE can be seen at:
https://www.spsstools.net/en/macros/macros-index/utilities/quote-string-on-the-fly/
such as:
DEFINE !client() ABC Inc !ENDDEFINE.

2 years agosegment-test: Make debugging easier for some kinds of test failures.
Ben Pfaff [Sun, 30 May 2021 19:49:45 +0000 (12:49 -0700)]
segment-test: Make debugging easier for some kinds of test failures.

2 years agotoken: Rename token_destroy() to token_uninit().
Ben Pfaff [Sun, 9 May 2021 22:01:34 +0000 (15:01 -0700)]
token: Rename token_destroy() to token_uninit().

This better fits the convention that "destroy" functions free the argument,
whereas "uninit" frees only the members of the argument structure.

2 years agolexer: Remove lex_syntax_mode in favor of segmenter_mode.
Ben Pfaff [Mon, 3 May 2021 00:13:27 +0000 (17:13 -0700)]
lexer: Remove lex_syntax_mode in favor of segmenter_mode.

These two enums have the same meaning and there was no benefit to having
both of them plus translation back and forth.

2 years agopo/hu.po: Update to lastest version from translation-project.org
John Darrington [Sun, 2 May 2021 08:29:07 +0000 (10:29 +0200)]
po/hu.po: Update to lastest version from translation-project.org

2 years agopsppire-output-view: Avoid doubling output when exporting or printing.
Ben Pfaff [Sat, 1 May 2021 23:39:15 +0000 (16:39 -0700)]
psppire-output-view: Avoid doubling output when exporting or printing.

Outputting a group outputs its contents, but the code here was also
separately outputing the contents, which effectively doubled it.  (PSPP
doesn't currently use nested groups but these would have led to additional
copies.)

This fixes the problem by only printing items that aren't nested inside
any group.

Bug #60464.
Thanks to John Darrington for reporting this bug.

2 years agobox-whisker: Use consistent array size for box_whisker_hinges().
Ben Pfaff [Sat, 1 May 2021 22:54:18 +0000 (15:54 -0700)]
box-whisker: Use consistent array size for box_whisker_hinges().

The prototype said the 'hinges' parameter has 2 elements but the definition
said that it has 3.  This fixes the prototype.

This is harmless because the C standard says these are actually equivalent.

Reported by GCC 11.

2 years agoformat-parser: Fix inconsistent use of "char *" vs "char[NUMBER]".
Ben Pfaff [Sat, 1 May 2021 22:53:09 +0000 (15:53 -0700)]
format-parser: Fix inconsistent use of "char *" vs "char[NUMBER]".

These are equivalent according to the C standard in function prototypes,
but GCC 11 warns about using them inconsistently between a prototype and
a definition.  This commit avoids the warning.

3 years agosrc/language/utilities/host.c (run_command): Fix memory leak
John Darrington [Sat, 1 May 2021 12:08:27 +0000 (14:08 +0200)]
src/language/utilities/host.c (run_command): Fix memory leak

3 years agosrc/data/format.c (fmt_affix_free): Fix memory leak
John Darrington [Sat, 1 May 2021 11:55:35 +0000 (13:55 +0200)]
src/data/format.c (fmt_affix_free): Fix memory leak

3 years agosrc/output/tex.c (post_process_tokens): Fix memory leak
John Darrington [Sat, 1 May 2021 06:27:46 +0000 (08:27 +0200)]
src/output/tex.c (post_process_tokens): Fix memory leak

3 years agosrc/output/select.c (select_matches): Fix memory leak
John Darrington [Sat, 1 May 2021 05:45:09 +0000 (07:45 +0200)]
src/output/select.c (select_matches): Fix memory leak

3 years agosrc/output/spv/spv.c (spv_read): Remove unused variable
John Darrington [Sat, 1 May 2021 05:35:50 +0000 (07:35 +0200)]
src/output/spv/spv.c (spv_read): Remove unused variable

3 years agosrc/output/output-item.c (output_item_unref): Fix memory leak
John Darrington [Sat, 1 May 2021 05:31:34 +0000 (07:31 +0200)]
src/output/output-item.c (output_item_unref): Fix memory leak

3 years agosrc/output/output-item.h (outpt_item_ref): Add WARN_UNUSED_RESULT attribute
John Darrington [Sat, 1 May 2021 05:30:14 +0000 (07:30 +0200)]
src/output/output-item.h (outpt_item_ref): Add WARN_UNUSED_RESULT attribute

3 years agosrc/ouput/output-item.c (output_item_unshare): Use result of output_item_ref
John Darrington [Sat, 1 May 2021 05:29:24 +0000 (07:29 +0200)]
src/ouput/output-item.c (output_item_unshare): Use result of output_item_ref

3 years agosrc/output/pivot-table.c (pivot_value_ex_destroy): Fix memory leak
John Darrington [Sat, 1 May 2021 05:17:29 +0000 (07:17 +0200)]
src/output/pivot-table.c (pivot_value_ex_destroy): Fix memory leak

3 years agoWindows/automake.mk: Use more portable code
John Darrington [Sun, 18 Apr 2021 05:06:54 +0000 (07:06 +0200)]
Windows/automake.mk: Use more portable code

* Windows/automake.mk (environment_dir): Avoid GNU Make extensions
* Windows/automake.mk (libgcc_dir): Avoid GNU Make extensions

Suggested-by: Ben Praff <blp@gnu.org>
3 years agolexer: Fix typo in comment.
Ben Pfaff [Sun, 18 Apr 2021 19:54:18 +0000 (12:54 -0700)]
lexer: Fix typo in comment.

3 years agoOutput drivers: Remove assertions on OUTPUT_ITEM_GROUP
John Darrington [Sun, 18 Apr 2021 18:21:29 +0000 (20:21 +0200)]
Output drivers: Remove assertions on OUTPUT_ITEM_GROUP

This case was indeed not reached when run from the command line, but certainly
was when exporting from the output viewer.

3 years agoAdded rules to build nsis installers for w32
John Darrington [Sun, 18 Apr 2021 11:08:41 +0000 (13:08 +0200)]
Added rules to build nsis installers for w32

* Windows/AdvUninstLog.nsh: New file.
* Windows/MUI_EXTRAPAGES.nsh: New file.
* Windows/automake.mk: New file.
* Windows/pspp.nsi: New file.
* Makefile.am: include Windows/automake.mk.
* configure.ac: Add conditional for sizeof ptr.

3 years agoAdded a script to assist building for w32
John Darrington [Sun, 18 Apr 2021 06:38:48 +0000 (08:38 +0200)]
Added a script to assist building for w32

* Windows/README: New file.
* Windows/build-dependencies: New file.

3 years agoRefactor SET and SHOW commands so it's harder to forget implementing SHOW.
Ben Pfaff [Tue, 13 Apr 2021 20:43:05 +0000 (13:43 -0700)]
Refactor SET and SHOW commands so it's harder to forget implementing SHOW.

3 years agosettings: Add macro settings.
Ben Pfaff [Tue, 13 Apr 2021 19:17:01 +0000 (12:17 -0700)]
settings: Add macro settings.

3 years agosettings: Use modern initializer style.
Ben Pfaff [Tue, 13 Apr 2021 18:56:49 +0000 (11:56 -0700)]
settings: Use modern initializer style.

3 years agosegment: Allow '.' as separate token with a line, for macros.
Ben Pfaff [Tue, 13 Apr 2021 17:35:02 +0000 (10:35 -0700)]
segment: Allow '.' as separate token with a line, for macros.

The description of macros just says that ^ and \ can't be used as macro
delimiters, so . is probably OK.

3 years agopsppire-dialog-action-regression: Fix unused variable warning.
Ben Pfaff [Tue, 13 Apr 2021 17:01:58 +0000 (10:01 -0700)]
psppire-dialog-action-regression: Fix unused variable warning.

GCC said that 'ok' was unused because it's declared in the 'for' loop.

3 years agosegment: Improve segmentation when DEFINE command has early terminator.
Ben Pfaff [Tue, 13 Apr 2021 16:58:46 +0000 (09:58 -0700)]
segment: Improve segmentation when DEFINE command has early terminator.

The DEFINE command should not have a command terminator before the final
!ENDDEFINE.  When it does, that ends the whole thing early.  The segmenter
didn't handle this well, instead treating everything up to !ENDDEFINE as
part of the command.  That's probably not the best way because it makes
for confusing error messages.  This improves the behavior.

3 years agodoc/automake: Use correct syntax for configuring native build
John Darrington [Sat, 10 Apr 2021 07:05:31 +0000 (09:05 +0200)]
doc/automake: Use correct syntax for configuring native build

3 years agoAdd w32 handler for "activate-link" signal
John Darrington [Sat, 10 Apr 2021 07:03:18 +0000 (09:03 +0200)]
Add w32 handler for "activate-link" signal

The default activate-link handler for GtkAboutDialog does not seem to work on
w32.  So this change implements a special one.

src/ui/gui/help-menu.c (about-new): Add signal handler

3 years agoRemove unused module subcommand-list
John Darrington [Sat, 10 Apr 2021 06:31:48 +0000 (08:31 +0200)]
Remove unused module subcommand-list

3 years agotests/automake.mk: Fix building of test runners
John Darrington [Sat, 10 Apr 2021 06:24:47 +0000 (08:24 +0200)]
tests/automake.mk: Fix building of test runners

For certain architectures, the order of libraries is important.  Dependent
libraries must appear before the libraries which depend upon them.