John Darrington [Sat, 1 May 2021 05:31:34 +0000 (07:31 +0200)]
src/output/output-item.c (output_item_unref): Fix memory leak
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
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
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
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>
Ben Pfaff [Sun, 18 Apr 2021 19:54:18 +0000 (12:54 -0700)]
lexer: Fix typo in comment.
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.
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.
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.
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.
Ben Pfaff [Tue, 13 Apr 2021 19:17:01 +0000 (12:17 -0700)]
settings: Add macro settings.
Ben Pfaff [Tue, 13 Apr 2021 18:56:49 +0000 (11:56 -0700)]
settings: Use modern initializer style.
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.
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.
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.
John Darrington [Sat, 10 Apr 2021 07:05:31 +0000 (09:05 +0200)]
doc/automake: Use correct syntax for configuring native build
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
John Darrington [Sat, 10 Apr 2021 06:31:48 +0000 (08:31 +0200)]
Remove unused module subcommand-list
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.
John Darrington [Sat, 10 Apr 2021 06:10:08 +0000 (08:10 +0200)]
src/ui/gui/var-display.c (missing_values_to_string): Reduce scope of local variable.
John Darrington [Sat, 10 Apr 2021 06:09:09 +0000 (08:09 +0200)]
src/ui/gui/psppire-output-view.c (psppire_output_view_new): Reduce scope of local variables.
John Darrington [Sat, 10 Apr 2021 06:08:15 +0000 (08:08 +0200)]
src/ui/gui/psppire-dict.c (psppire_dict_set_name): Reduce scope of local variable.
John Darrington [Sat, 10 Apr 2021 06:06:41 +0000 (08:06 +0200)]
src/ui/gui/psppire-dialog-action-regression.c (generate_syntax): Reduce scope of local variables.
John Darrington [Sat, 10 Apr 2021 06:04:39 +0000 (08:04 +0200)]
src/ui/gui/psppire-data-store.c (psppire_data_store_get_reader): Reduce scope of local variable.
John Darrington [Sat, 10 Apr 2021 06:03:26 +0000 (08:03 +0200)]
src/libpspp/float-format.c (extract_hex): Remove useless assignment.
Found by cppcheck.
John Darrington [Sat, 10 Apr 2021 06:00:55 +0000 (08:00 +0200)]
src/language/stats/crosstabs.c (display_risk): Avoid warning found by cppcheck
Ben Pfaff [Fri, 9 Apr 2021 18:24:44 +0000 (11:24 -0700)]
command: DEFINE command is still unimplemented.
Commit
ed109bf49821 ("lexer: Add support for macro punctuation.")
mistakenly changed this.
Ben Pfaff [Fri, 9 Apr 2021 17:53:33 +0000 (10:53 -0700)]
lexer: Add support for DEFINE...!ENDDEFINE.
This doesn't support the command itself, just the lexical analysis needed
for it.
Ben Pfaff [Mon, 22 Mar 2021 06:06:14 +0000 (23:06 -0700)]
lexer: Add support for macro punctuation.
These punctuation symbols can be used to delimit macro arguments, even
though they aren't allowed anywhere else in the language.
Ben Pfaff [Sun, 21 Mar 2021 21:58:09 +0000 (14:58 -0700)]
lexer: Add support for macro identifiers (that begin with '!').
Ben Pfaff [Fri, 9 Apr 2021 17:32:18 +0000 (10:32 -0700)]
segment: Fix segmentation of integer followed by "." at end of file.
Previously this was segmented as a single number containing a trailing dot,
but it should be an integer followed by end-of-command.
John Darrington [Sun, 4 Apr 2021 18:08:42 +0000 (20:08 +0200)]
Mention Harry Thijssen in THANKS
John Darrington [Sat, 3 Apr 2021 07:42:37 +0000 (09:42 +0200)]
src/ui/gui/help-menu.c (open_windows_help): Reimplement
This change reimplements the function open_windows_help, because:
1. It didn't seem to work reliably.
2. It seems overly complicated.
3. It relied upon a binary called "wscript.exe" which according to
a brief web search, many windows users consider a security hole
and routinely remove it.
John Darrington [Sun, 4 Apr 2021 16:38:22 +0000 (18:38 +0200)]
src/language/stats/glm.c: Fix compiler warnings
John Darrington [Sat, 3 Apr 2021 12:32:56 +0000 (14:32 +0200)]
src/libpspp/message.c (prepare_diagnostic_information): Relocate locale_dir
John Darrington [Sun, 28 Mar 2021 16:39:44 +0000 (18:39 +0200)]
Output Window: Fix sensitivity of Save button. Also add option for png and svg files.
src/ui/gui/psppire-output-window.c (on_combo_change): Simplify logic and use
correct limit for number of filename extentions.
John Darrington [Sun, 28 Mar 2021 09:17:16 +0000 (11:17 +0200)]
src/ui/gui/automake.mk [src_ui_gui_psppire_CFLAGS]: Compile for a GUI under w32
John Darrington [Sun, 28 Mar 2021 09:15:33 +0000 (11:15 +0200)]
src/ui/gui/psppire.c: Fold long line
John Darrington [Sat, 27 Mar 2021 18:08:26 +0000 (19:08 +0100)]
src/ui/gui/psppire-dialog-action-runs.c (generate_syntax): Rename 'text' to 'str'
John Darrington [Sat, 27 Mar 2021 17:59:18 +0000 (18:59 +0100)]
src/ui/gui/find-dialog.c (ip -> case_iterator): Rename.
John Darrington [Sat, 27 Mar 2021 17:54:05 +0000 (18:54 +0100)]
src/ui/gui/psppire.c (struct icon_size): Remove --- unused
John Darrington [Sat, 27 Mar 2021 17:53:12 +0000 (18:53 +0100)]
src/ui/gui/helper.c (clone_list_store): Remove unused variable
John Darrington [Sat, 27 Mar 2021 10:33:18 +0000 (11:33 +0100)]
Bump micro version to 1.5.3
John Darrington [Sat, 27 Mar 2021 09:26:08 +0000 (10:26 +0100)]
Generate cosmetics for windows hosts.
On w32 hosts, generate the resource file and link it to the psppire
executable. Also generate the pspp.ico which is associated with the
executable.
Ben Pfaff [Tue, 23 Mar 2021 14:14:35 +0000 (07:14 -0700)]
segment: Properly handle DO REPEAT in batch mode.
In batch mode, a line that begins with a non-blank starts a new command,
but the segmenter didn't properly support this. Without this commit,
the following wasn't properly handled:
DO REPEAT #x=1
ECHO 'hi'
END REPEAT
This commit also adds a test against regression, which also checks that
a blank line to separate DO REPEAT from the repeated syntax works (it
did before too, but there was no test).
Ben Pfaff [Mon, 22 Mar 2021 19:50:23 +0000 (12:50 -0700)]
lexer: New function lex_force_int_range().
This simplifies parsing code that needs an integer in a particular range.
John Darrington [Sun, 21 Mar 2021 21:19:25 +0000 (22:19 +0100)]
Fix bug where attempting to rendering an empty bar chart would crash
Ben Pfaff [Sun, 21 Mar 2021 19:48:01 +0000 (12:48 -0700)]
doc: Update documentation for SET command to match recent code changes.
Ben Pfaff [Sun, 21 Mar 2021 19:03:52 +0000 (12:03 -0700)]
q2c: Remove, since it is no longer used.
This was the only tool that needed the build system's C compiler, so also
remove the parts of the build system that supported that.
Ben Pfaff [Sun, 21 Mar 2021 18:59:30 +0000 (11:59 -0700)]
SET: Reimplement parser without q2c.
Ben Pfaff [Wed, 17 Mar 2021 17:50:28 +0000 (10:50 -0700)]
CROSSTABS: Reimplement parser without q2c.
John Darrington [Sun, 14 Mar 2021 18:39:30 +0000 (19:39 +0100)]
Avoid useless warnings on stderr.
src/libpspp/i18n.c (create_iconv): New argument 'warn'
John Darrington [Sun, 14 Mar 2021 15:33:31 +0000 (16:33 +0100)]
src/ui/gui/main.c: Add a startup tip for Windows
John Darrington [Sun, 14 Mar 2021 21:42:47 +0000 (22:42 +0100)]
psppire-import-spreadsheet.c: Fix typo
John Darrington [Sun, 14 Mar 2021 13:24:01 +0000 (14:24 +0100)]
src/output/spv/automake.mk: Add some explicit dependencies to help cross building
John Darrington [Sun, 14 Mar 2021 12:45:39 +0000 (13:45 +0100)]
src/language/expressions/automake.mk: Fix build issues when cross building
Ben Pfaff [Thu, 11 Mar 2021 03:53:39 +0000 (19:53 -0800)]
gui: Include line number in error messages generated from syntax windows.
Ben Pfaff [Thu, 11 Mar 2021 03:53:21 +0000 (19:53 -0800)]
gui: Label unnamed syntax windows as "Untitled" in error messages.
Seems a little more user-friendly than just omitted a filename entirely.
Ben Pfaff [Thu, 11 Mar 2021 03:42:27 +0000 (19:42 -0800)]
Add syntax mode radio button to syntax editor window.
A number of users have reported problems with the syntax mode. I am not
sure why. This should allow them to select the syntax mode they actually
need to use, just in case. The default should be unchanged (it is still
Auto).
Ben Pfaff [Tue, 9 Mar 2021 02:18:48 +0000 (18:18 -0800)]
pivot-table: Reduce size of struct pivot_value from 80 bytes to 40.
Ben Pfaff [Mon, 8 Mar 2021 06:52:43 +0000 (22:52 -0800)]
pivot-table: Reduce size of struct pivot_value from 96 bytes to 80.
Ben Pfaff [Mon, 8 Mar 2021 05:55:01 +0000 (21:55 -0800)]
format: Reduce size of struct fmt_spec from 6 bytes to 4.
Ben Pfaff [Mon, 8 Mar 2021 05:39:19 +0000 (21:39 -0800)]
format: Reduce size of struct fmt_spec from 12 bytes to 6.
Ben Pfaff [Sun, 7 Mar 2021 23:42:56 +0000 (15:42 -0800)]
DELETE VARIABLES: Fix crash when deleting and adding vars at same time.
Thanks to Ricardo Mejias for reporting the problem:
https://lists.gnu.org/archive/html/pspp-users/2021-03/msg00025.html
Ben Pfaff [Sun, 7 Mar 2021 19:33:00 +0000 (11:33 -0800)]
Improve error message for creating a new string var with COMPUTE or IF.
Ben Pfaff [Sun, 7 Mar 2021 00:39:20 +0000 (16:39 -0800)]
tests: Ignore .pspprc in a different way, to fix running TeX on Fedora.
On Fedora, the 'tex' program generates per-user formats in the user's
home directory. With the way that atlocal previously set $HOME to
/nonexistent, this failed, because formats can't be found or created in
/nonexistent. This fixes the problem by using a different way to avoid
making pspp look for .pspprc.
Ben Pfaff [Sun, 21 Feb 2021 18:32:37 +0000 (10:32 -0800)]
ascii: Always include <sys/ioctl.h> if we're calling ioctl.
This file included sys/ioctl.h if it was necessary to use the TIOCGWINSZ
constant, but in fact it's needed to call ioctl() at all, so this commit
moves the #include so that it's included whenever we use ioctl().
Bug #60069.
Reported by Jeremy Lavergne.
Ben Pfaff [Mon, 15 Feb 2021 06:42:33 +0000 (22:42 -0800)]
psppire-output-view: Remove more dead code.
Ben Pfaff [Mon, 15 Feb 2021 05:55:20 +0000 (21:55 -0800)]
psppire-output-view: Fix display of groups.
Bug introduced in commit
507ebaea3673 ("output: Make groups contain
their subitems, and get rid of spv_item.").
Reported by John Darrington.
Ben Pfaff [Mon, 15 Feb 2021 05:13:09 +0000 (21:13 -0800)]
psppire-output-view: Remove dead code.
John Darrington [Sun, 7 Feb 2021 09:03:54 +0000 (10:03 +0100)]
/ui/gui/psppire-var-info.c (__set_property): Remove redundant test.
Found by cppcheck.
John Darrington [Sun, 7 Feb 2021 09:01:14 +0000 (10:01 +0100)]
src/libpspp/zip-reader.c (probe_magic): Fix inappropriate return value.
Found by cppcheck.
John Darrington [Sun, 7 Feb 2021 09:00:06 +0000 (10:00 +0100)]
src/language/stats/autorecode.c (cmd_autorecode): Remove redundant test.
Found by cppcheck.
John Darrington [Sun, 7 Feb 2021 08:58:01 +0000 (09:58 +0100)]
src/data/sys-file-reader.c: (read_header): Remove redundant test.
Found by cppcheck.
John Darrington [Sun, 7 Feb 2021 08:54:49 +0000 (09:54 +0100)]
src/math/wilcoxon-sig.c (count_sums_to_W): Avoid use of unsigned value.
Use signed long int, not unsigned long int.
Found by cppcheck.
Ben Pfaff [Sun, 7 Feb 2021 04:13:50 +0000 (20:13 -0800)]
spv-light-decoder: Use unsigned int, not int, for %x with sscanf().
Found by cppcheck.
Reported by John Darrington.
Ben Pfaff [Sun, 7 Feb 2021 04:13:19 +0000 (20:13 -0800)]
spv-writer: Avoid obsolete function asctime().
Found by cppcheck.
Reported by John Darrington.
Ben Pfaff [Sun, 7 Feb 2021 03:52:24 +0000 (19:52 -0800)]
spvbin-helpers: Properly handle parsing strings with no destination.
binary-parser-generator will pass a null pointer to spvbin_parse_string()
or spvbin_parse_bestring() for a string that should be parsed but not
stored. In such a case, the implementation would dereference a null
pointer. This fixes the problem.
This is only a theoretical problem because the grammars PSPP uses now
always store the strings that they parse.
Found by cppcheck.
Reported by John Darrington.
Ben Pfaff [Sun, 7 Feb 2021 03:45:58 +0000 (19:45 -0800)]
spv-light-decoder: Fix check for valid decimal point characters.
Found by cppcheck.
Reported by John Darrington.
Ben Pfaff [Mon, 25 Jan 2021 05:23:52 +0000 (21:23 -0800)]
spv: Add support for page breaks.
Ben Pfaff [Mon, 25 Jan 2021 05:17:03 +0000 (21:17 -0800)]
spv: Remove code that was just #if 0'd out before.
Commit
507ebaea3673 ("output: Make groups contain their subitems, and get rid of
spv_item.") should have removed this code, but it was overlooked.
Ben Pfaff [Mon, 25 Jan 2021 05:09:08 +0000 (21:09 -0800)]
output: Replace OUTPUT_ITEM_PAGE_SETUP by a new driver function.
OUTPUT_ITEM_PAGE_SETUP was a special case that only the Cairo and SPV
drivers could implement, and it could only come first in the output stream
anyway, so it didn't make much sense. This commit gets rid of it in favor
of adding a new driver class function for setting the page setup.
Ben Pfaff [Thu, 14 Jan 2021 06:05:05 +0000 (22:05 -0800)]
output: Make groups contain their subitems, and get rid of spv_item.
Until now, the output subsystem has had two different ideas for output
items: struct output_item, which is the primary representation, and
struct spv_item, which represents an output item read from an .spv file.
The biggest difference, until now, has been that spv_item contains its
children, whereas output_item bracketed children inside open/close pairs.
This commit unifies them under output_item, making output_item adopt the
container abstraction.
Ben Pfaff [Sat, 16 Jan 2021 05:52:14 +0000 (21:52 -0800)]
output-item: Add basic support for visibility.
Ben Pfaff [Sat, 23 Jan 2021 23:25:29 +0000 (15:25 -0800)]
zip-reader: Make the zip_reader reference counted.
This will be useful in an upcoming commit.
Ben Pfaff [Sat, 23 Jan 2021 22:34:03 +0000 (14:34 -0800)]
zip-reader: Switch to a more usual error reporting mechanism.
Having the client pass in a string buffer was clever but it gave the
zip_reader some shared state with its client that will be difficult to
deal with in future use cases.
Ben Pfaff [Sat, 23 Jan 2021 22:37:27 +0000 (14:37 -0800)]
zip-reader: Fix file descriptor leak in zip_reader_create().
Ben Pfaff [Sat, 23 Jan 2021 19:59:36 +0000 (11:59 -0800)]
zip-reader: Use endian conversion functions from integer-format.h.
Ben Pfaff [Mon, 25 Jan 2021 00:59:29 +0000 (16:59 -0800)]
DEBUG EVALUATE: Use output_log() instead of printf().
I found that with upcoming changes to the output engine, the relative
ordering of output from printf() and from the output engine changed. This
commit makes it all go through the output engine, which keeps it
consistent as the output engine changes.
Ben Pfaff [Thu, 14 Jan 2021 05:10:04 +0000 (21:10 -0800)]
spv-legacy-decoder: Make 'data' parameter to decode_spvdx_table() const.
Ben Pfaff [Sun, 24 Jan 2021 22:53:41 +0000 (14:53 -0800)]
output: New function output_log().
Ben Pfaff [Sun, 24 Jan 2021 19:35:26 +0000 (11:35 -0800)]
llx: Introduce new iteration macros and some users.
Ben Pfaff [Mon, 25 Jan 2021 00:30:42 +0000 (16:30 -0800)]
str: Avoid passing null pointer to memcpy() in ds_put_substring().
Ben Pfaff [Sun, 24 Jan 2021 21:52:24 +0000 (13:52 -0800)]
pspp-output: Fix typo in user message.
Ben Pfaff [Sun, 24 Jan 2021 05:01:55 +0000 (21:01 -0800)]
output-item: Allocate correct size in message_item_create().
Ben Pfaff [Tue, 12 Jan 2021 04:38:21 +0000 (20:38 -0800)]
configure: Require @clicksequence to be present.
Occasionally someone tries to build with a really old Texinfo. It doesn't
work now, although it once did, but before this commit it would
successfully configure. By preventing configure from finishing, I think
that this will produce a clearer error message earlier in the build
process, ultimately making life easier for users.
Bug #59818.
Ben Pfaff [Mon, 11 Jan 2021 06:32:21 +0000 (22:32 -0800)]
output: Add missing chart.h.
Fixes: 29917c4f5908 ("output-item: Collapse the inheritance hierarchy into a single struct.")
Ben Pfaff [Mon, 11 Jan 2021 06:19:35 +0000 (22:19 -0800)]
output-item: Collapse the inheritance hierarchy into a single struct.
When I designed this inheritance hierarchy, what was really needed was a
bit of a mystery. Now, it's pretty clear what is really going to be here,
and it simplifies and clarifies code a lot to just have a struct with an
embedded union. It also removes, net, about 1000 lines of code.
Ben Pfaff [Mon, 11 Jan 2021 02:20:11 +0000 (18:20 -0800)]
output-item: Make command name part of every output_item.
Until now, group_items and text_items have had a command name, but SPV
files make the command name part of every output_item. This change
make output_item better aligned.
Ben Pfaff [Mon, 11 Jan 2021 02:03:09 +0000 (18:03 -0800)]
cairo-fsm: Remove dead code in xr_fsm_create().
This code can't be reached because code above it exits the function in the
case that it handles.