Ben Pfaff [Sun, 30 Dec 2018 05:15:43 +0000 (21:15 -0800)]
Add support for reading and writing SPV files.
Ben Pfaff [Tue, 25 Dec 2018 04:53:09 +0000 (20:53 -0800)]
zip-reader: New function zip_reader_contains_member().
This function will have its first user in an upcoming commit.
Ben Pfaff [Mon, 26 Nov 2018 00:20:29 +0000 (16:20 -0800)]
zip-reader: New function zip_member_read_all().
This will have its first user in an upcoming commit.
Ben Pfaff [Mon, 17 Jul 2017 18:38:13 +0000 (11:38 -0700)]
zip-reader: Improve error messages.
With this change, the zip-reader's error messages always include the zip
file name and, when relevant, the member name. Otherwise it wasn't always
clear what a message liek "No such file or directory" was talking about.
Ben Pfaff [Sun, 16 Jul 2017 03:41:08 +0000 (20:41 -0700)]
zip-reader: New function zip_reader_get_member_name().
This allows the caller to obtain a list of .zip members.
Ben Pfaff [Sun, 16 Jul 2017 03:26:31 +0000 (20:26 -0700)]
zip-reader: Don't keep .zip file open for lifetime of zip_reader.
The zip_reader no longer uses the .zip file after it opens it, so close it
when it's no longer needed.
Ben Pfaff [Sun, 16 Jul 2017 03:22:10 +0000 (20:22 -0700)]
zip-reader: Read the whole central directory at .zip open time.
By reading the whole central directory when we open the .zip file, rather
than one entry at a time, we make it easier to get a list of entries and
make it available to the client. (This will be implemented in an upcoming
commit.)
This commit also fixes memory leaks in the error case in zip_member_open().
This commit also changes the usage model. Previously, if the caller opened
a single member more than once, all the members shared a single copy of
the member and read each other's data. Now, each caller that opens a
member gets a separate copy and a separate file pointer. Callers now need
to call zip_member_finish() when they're done with a member.
With this commit, the code only keeps an open FILE for a member if the
caller opened that member. Previously, it kept an open FILE for any
member that had been encountered.
Ben Pfaff [Sun, 16 Jul 2017 00:08:10 +0000 (17:08 -0700)]
zip-reader: Fix memory leak on error path in zip_reader_create().
Ben Pfaff [Sat, 15 Jul 2017 23:47:34 +0000 (16:47 -0700)]
zip-reader: Better hide implementation details from clients.
By integrating the "inflate" code with the zip reader code, it is no
longer necessary to expose the zip_member or decompressor details.
Ben Pfaff [Wed, 2 Jan 2019 05:11:20 +0000 (21:11 -0800)]
output: Move text_item and group_item usage closer to the SPV model.
Ben Pfaff [Sun, 10 Feb 2019 00:00:45 +0000 (16:00 -0800)]
work
Ben Pfaff [Sat, 9 Feb 2019 22:58:37 +0000 (14:58 -0800)]
output: Reimplement table_from_string in terms of tab.
With this change, there is only a single table_class in the tree.
Ben Pfaff [Sat, 9 Feb 2019 22:45:11 +0000 (14:45 -0800)]
output: Remove table_unshare.
It was unused.
Ben Pfaff [Sat, 9 Feb 2019 22:51:33 +0000 (14:51 -0800)]
output: Remove table_select and table_paste.
table_select() was unused, and it was in turn the last user of
table_paste().
Ben Pfaff [Sat, 9 Feb 2019 18:34:18 +0000 (10:34 -0800)]
render: Drop use of table_select().
This is the last use of table_select() in the tree.
Ben Pfaff [Sat, 9 Feb 2019 17:26:00 +0000 (09:26 -0800)]
render: Modernize coding style.
Ben Pfaff [Sat, 9 Feb 2019 23:09:55 +0000 (15:09 -0800)]
pivot-output: Improve variable naming.
'pt' is better than 'st' as the name for a struct pivot_table.
Ben Pfaff [Wed, 23 Jan 2019 04:41:07 +0000 (20:41 -0800)]
line-reader-test: Fix memory leak.
Ben Pfaff [Fri, 18 Jan 2019 05:35:05 +0000 (21:35 -0800)]
string-map: Avoid measuring the length of a string twice.
Ben Pfaff [Wed, 23 Jan 2019 04:27:44 +0000 (20:27 -0800)]
table-transpose: Remove.
This had only only user, which this commit also removes.
John Darrington [Sun, 20 Jan 2019 10:05:36 +0000 (11:05 +0100)]
Fix broken psql tests.
This test seemed to fail on recent Debian systems, due to a combination
of perl,bash,postgresql and autoconf not playing nicely together.
Dave Trollope [Sat, 19 Jan 2019 17:18:27 +0000 (09:18 -0800)]
Improve MDD writer support.
Patch #9742.
Ben Pfaff [Thu, 17 Jan 2019 03:49:36 +0000 (19:49 -0800)]
tests: Make Perl tests work with Address Sanitizer.
Ben Pfaff [Thu, 17 Jan 2019 03:08:46 +0000 (19:08 -0800)]
tests: Add valgrind and Leak Sanitizer suppression files.
Otherwise any of the tests that use Cairo for PDF output end up with a
bunch of leaks due to libfontconfig weirdness.
Ben Pfaff [Wed, 16 Jan 2019 01:28:53 +0000 (17:28 -0800)]
pspp-convert: Add --password-list option.
Ben Pfaff [Sat, 12 Jan 2019 20:53:00 +0000 (12:53 -0800)]
pspp-convert: Add -a and -l options to search for a password.
Ben Pfaff [Sat, 12 Jan 2019 20:14:36 +0000 (12:14 -0800)]
encrypted-file: Extend magic numbers in try_password().
The three-byte magic numbers would match 1 in about every 16 million
guessed passwords, which is too frequent for exhaustive testing. The new
7- and 10-byte magic numbers should not have the same problem.
Ben Pfaff [Sun, 13 Jan 2019 00:51:56 +0000 (16:51 -0800)]
pivot-table: Fix use-after-free error.
Ben Pfaff [Sat, 12 Jan 2019 21:03:46 +0000 (13:03 -0800)]
Fix numerous memory leaks.
Ben Pfaff [Sun, 13 Jan 2019 00:41:25 +0000 (16:41 -0800)]
str: Fix bugs in ds_put_c_vformat().
This code used c_vasnprintf() as if it had the same interface as
vsnprintf(), but it's quite different. It is necessary to make note of its
return value and possibly free it. The code previously here didn't do
that, which led to memory leaks and possibly worse problems. (Fortunately
this function isn't used much.)
Memory leak found by Address Sanitizer.
Ben Pfaff [Sun, 6 Jan 2019 18:38:50 +0000 (10:38 -0800)]
ascii: Always use Unicode boxes by default if appropriate.
This moves code from the command-line UI so that additional users
can benefit. Currently that's just the command-line UI anyway
but others are coming.
Ben Pfaff [Wed, 2 Jan 2019 22:46:11 +0000 (14:46 -0800)]
matrix-data: Only use as many bytes as necessary to initialize string.
Using strncpy() of a 9-character string to initialize an 8-byte field is
odd and seems likely to have been a mistake, although a harmless one.
This makes the situation seem less odd.
Found by GCC 4.9.
Ben Pfaff [Wed, 2 Jan 2019 22:43:02 +0000 (14:43 -0800)]
t-test-paired: Fix format specifiers.
Found by GCC.
Fixes: 5cab4cf3322f ("output: Introduce pivot tables.")
Ben Pfaff [Wed, 2 Jan 2019 22:42:04 +0000 (14:42 -0800)]
regression: Make sure dep_subscript is really initialized.
Found by GCC 4.9.
Ben Pfaff [Wed, 2 Jan 2019 22:39:25 +0000 (14:39 -0800)]
chisquare: Fix format specifier in chisquare_execute().
Found by GCC.
Fixes: 5cab4cf3322f ("output: Introduce pivot tables.")
Ben Pfaff [Wed, 2 Jan 2019 22:36:34 +0000 (14:36 -0800)]
tab: Fix implementation of "middle" vertical alignment in tab_get_cell().
Found by GCC 4.9.
Fixes: a7a300e7d996 ("output: Support decimal and mixed alignment,")
Ben Pfaff [Wed, 2 Jan 2019 22:33:56 +0000 (14:33 -0800)]
pivot-table: Fix format specifiers.
Found by GCC.
Fixes: 5cab4cf3322f ("output: Introduce pivot tables.")
Ben Pfaff [Wed, 2 Jan 2019 22:30:56 +0000 (14:30 -0800)]
driver: Fix format specifiers and avoid fixed-size buffer.
The format specifier problem is real. The fixed-size buffers should not
be, but it is not worth arguing with GCC.
Fixes: a1b7813a6993 ("output: New page-setup-item.")
Ben Pfaff [Wed, 2 Jan 2019 22:29:10 +0000 (14:29 -0800)]
por-file-writer: Use xasprintf() to avoid careful buffer sizing.
GCC 4.9 thinks that this string can overflow the buffer and there's no
reason not to use xasprintf() here.
Ben Pfaff [Wed, 2 Jan 2019 22:26:24 +0000 (14:26 -0800)]
por-file-reader: Use xasprintf() to avoid need for careful buffer sizing.
GCC 4.9 complained about this, saying that the output could exceed the
buffer size. It doesn't seem worth arguing with it.
Ben Pfaff [Wed, 2 Jan 2019 22:22:54 +0000 (14:22 -0800)]
ods-reader: Use proper function type for xml read callback.
The difference between size_t and int is not important on 32-bit, but it
makes a bit difference on 64-bit.
Ben Pfaff [Wed, 2 Jan 2019 22:22:24 +0000 (14:22 -0800)]
pivot-table: Fix type mismatch in equal_indexes().
This function was being called with an 'unsigned int *' but it took it
as a 'size_t *', which worked fine on 32-bit systems but caused an
enormous number of tests to fail on 64-bit systems.
Thanks to Alan Mead and John Darrington for assistance.
Fixes: 5cab4cf3322f ("output: Introduce pivot tables.")
Ben Pfaff [Wed, 2 Jan 2019 21:48:24 +0000 (13:48 -0800)]
tests: Get rid of temporary debugging fix.
Fixes: c70c92497244 ("SYSFILE INFO: Get rid of nested tables.")
Ben Pfaff [Wed, 2 Jan 2019 21:29:49 +0000 (13:29 -0800)]
table: Avoid initializer warnings with GCC 4.9.
Ben Pfaff [Wed, 2 Jan 2019 20:29:38 +0000 (12:29 -0800)]
psppire-output-window: Avoid using options the ascii driver no longer has.
Fixes: 1a4052ac93c4 ("ascii: Get rid of the idea of pages.")
Fixes: 37a14e6b8ab9 ("output: Add support for fonts.")
Ben Pfaff [Wed, 2 Jan 2019 17:20:51 +0000 (09:20 -0800)]
configure: Entirely avoid broken Texinfo.
Texinfo 4.13 was still causing problems on SuSE despite the implemented
workarounds, so this commit removes the workaround in favor of just using
the distributed pspp.xml if makeinfo is broken.
Requested by opensuse.lietuviu.kalba <opensuse.lietuviu.kalba@gmail.com>.
Ben Pfaff [Wed, 2 Jan 2019 05:07:05 +0000 (21:07 -0800)]
psppire-output-view: Only rerender for real changes.
Rerendering is expensive and slow, so only do it when there's a real change
like font size, not just when the cursor moves to a different window.
Ben Pfaff [Tue, 1 Jan 2019 19:12:36 +0000 (11:12 -0800)]
psppire-output-view: Add a little extra space to GtkLayout.
It can be difficult to see the bottom and right sides of the GtkLayout
because of the scroll bars that, on newer versions of GTK+ 3, seem to
actually overlap part of the content. Add a little extra space around
the output items to make it clearer.
Ben Pfaff [Wed, 2 Jan 2019 06:07:47 +0000 (22:07 -0800)]
cairo: Make xr_rendering_measure() tolerate NULL arguments.
Ben Pfaff [Tue, 1 Jan 2019 20:03:54 +0000 (12:03 -0800)]
output-item: Add 'name' member to class structure.
This occasionally makes debugging easier.
Ben Pfaff [Wed, 2 Jan 2019 04:57:17 +0000 (20:57 -0800)]
string-map: New function string_map_equals().
Ben Pfaff [Tue, 1 Jan 2019 17:08:44 +0000 (09:08 -0800)]
output: Fix XML parsing in output_get_text_from_markup().
The XML parser requires the entire input to be enclosed in an element.
Ben Pfaff [Tue, 1 Jan 2019 16:36:05 +0000 (08:36 -0800)]
pspp-dump-sav: Issue error message for too-large extension records.
CVE-2018-20230.
Ben Pfaff [Tue, 1 Jan 2019 07:13:12 +0000 (23:13 -0800)]
pivot-output: Fix argument order that made lots of weird rotated headings.
Fixes: 5cab4cf3322f ("output: Introduce pivot tables.")
Ben Pfaff [Mon, 17 Jul 2017 22:13:16 +0000 (15:13 -0700)]
output: Introduce pivot tables.
Ben Pfaff [Wed, 26 Dec 2018 05:25:56 +0000 (21:25 -0800)]
cairo: Minor cleanup by factoring out new function set_source_rgba().
Ben Pfaff [Wed, 26 Dec 2018 22:07:16 +0000 (14:07 -0800)]
output: Support decimal and mixed alignment,
Ben Pfaff [Wed, 26 Dec 2018 22:14:51 +0000 (14:14 -0800)]
output: Rename a few struct members for consistency.
Ben Pfaff [Wed, 26 Dec 2018 16:22:15 +0000 (08:22 -0800)]
output: Support rotation.
Ben Pfaff [Tue, 4 Dec 2018 04:00:44 +0000 (20:00 -0800)]
table: Make table cells have exactly one piece of content again.
Ben Pfaff [Wed, 26 Dec 2018 00:32:38 +0000 (16:32 -0800)]
output: New page-setup-item.
Ben Pfaff [Wed, 26 Dec 2018 00:32:25 +0000 (16:32 -0800)]
output: Add support for Pango markup of fonts and styles.
Ben Pfaff [Tue, 1 Jan 2019 06:18:19 +0000 (22:18 -0800)]
psppire-output-view: Render only the visible parts of tables.
This greatly improves scrolling performance for large tables.
Ben Pfaff [Tue, 1 Jan 2019 05:50:16 +0000 (21:50 -0800)]
output: Cache the script ltr versus rtl direction.
A profiling run showed that about 10% of the rendering time was occupied
with repeated calls to render_direction_rtl(). This caches the result.
Ben Pfaff [Mon, 31 Dec 2018 21:16:02 +0000 (13:16 -0800)]
psppire-output-viewer: Make sure that initial items are rendered at show.
When output items were shown in the output window, the first item
was not shown until the user moused over it and thereby triggered the
on_style_updated callback. This fixes the problem.
Ben Pfaff [Mon, 31 Dec 2018 21:03:40 +0000 (13:03 -0800)]
psppire-output-view: Fix background color for output viewer.
Ben Pfaff [Mon, 31 Dec 2018 19:06:07 +0000 (11:06 -0800)]
psppire-output-view: Add titles for groups.
Ben Pfaff [Mon, 31 Dec 2018 17:45:15 +0000 (09:45 -0800)]
cairo: Render group_open_items.
Ben Pfaff [Sat, 29 Dec 2018 22:56:54 +0000 (14:56 -0800)]
tutorial: Fix duplicate definition of node name "examine".
Emacs, at least, confused this "examine" with the "EXAMINE" node for the
EXAMINE command, and prevented me from visiting the latter documentation.
Ben Pfaff [Thu, 27 Dec 2018 04:29:50 +0000 (20:29 -0800)]
tests: Tag all the tests that take more than about 1s as "slow".
This makes it possible to run a quicker set of tests, which still have
pretty good coverage, with something like this:
make -j10 check TESTSUITEFLAGS='-j10 -k !slow'
Ben Pfaff [Tue, 4 Dec 2018 02:49:36 +0000 (18:49 -0800)]
table-stomp: Remove dead code.
Nothing used this code anymore.
Ben Pfaff [Wed, 26 Dec 2018 00:19:11 +0000 (16:19 -0800)]
cairo: Improve comment.
Ben Pfaff [Wed, 26 Dec 2018 00:16:41 +0000 (16:16 -0800)]
cairo: Fix word-wrapping of ".000" and similar.
The Unicode line-breaking algorithm (or perhaps Pango's implementation of
it) is willing to break after the period in ".000". This looks odd. This
commit works around the problem.
Ben Pfaff [Tue, 25 Dec 2018 04:54:44 +0000 (20:54 -0800)]
output: Introduce group_item in place of TEXT_ITEM_COMMAND_OPEN and CLOSE.
This allows groups to be nested.
Ben Pfaff [Fri, 30 Nov 2018 05:26:35 +0000 (21:26 -0800)]
text-item: Merge "title" and "subtitle" items into a new "page title".
This better matches SPSS behavior.
Ben Pfaff [Sat, 1 Dec 2018 23:38:57 +0000 (15:38 -0800)]
cairo: New macros XR_LINE_WIDTH and XR_LINE_SPACE.
This makes the code a little easier to read in places.
Ben Pfaff [Mon, 26 Nov 2018 00:58:02 +0000 (16:58 -0800)]
driver: New function output_driver_parse_option().
This moves this function out of terminal-opts.c so that other code can use
it too.
Ben Pfaff [Sat, 24 Nov 2018 20:33:16 +0000 (12:33 -0800)]
output: Add support for alternating row colors.
Ben Pfaff [Fri, 23 Nov 2018 22:50:13 +0000 (14:50 -0800)]
output: Add support for layer info in table output.
Ben Pfaff [Thu, 22 Nov 2018 06:04:12 +0000 (22:04 -0800)]
output: Implement styling for titles and captions.
Ben Pfaff [Thu, 22 Nov 2018 05:25:13 +0000 (21:25 -0800)]
output: Implement styling for footnotes.
Ben Pfaff [Tue, 25 Dec 2018 20:41:27 +0000 (12:41 -0800)]
cairo: Remove debug print.
Ben Pfaff [Thu, 22 Nov 2018 03:42:18 +0000 (19:42 -0800)]
tab: Support cell-specific styles.
Ben Pfaff [Wed, 21 Nov 2018 17:32:23 +0000 (09:32 -0800)]
output: Add support for colors for rules.
Ben Pfaff [Mon, 26 Nov 2018 01:03:16 +0000 (17:03 -0800)]
output: Support styles for text items.
Ben Pfaff [Tue, 20 Nov 2018 18:24:20 +0000 (10:24 -0800)]
output: Add support for fonts.
Ben Pfaff [Mon, 26 Nov 2018 01:01:39 +0000 (17:01 -0800)]
output: Add support for cell margins.
Until now, space between cells was implemented by adding some space on the
sides of rules. That worked fine before cells could have colored
backgrounds, but now it means that the backgrounds don't reach all the way
to the rules. Thus, this commit adds configurable margins to the cells
themselves.
Ben Pfaff [Mon, 19 Nov 2018 06:23:28 +0000 (22:23 -0800)]
output: Add support for colors in cells.
Background colors aren't painted very well until the following commit adds
support for cell margins.
Ben Pfaff [Sat, 17 Nov 2018 23:49:27 +0000 (15:49 -0800)]
output: Add support for dashed, thick, and thin rules.
Ben Pfaff [Sat, 17 Nov 2018 19:12:55 +0000 (11:12 -0800)]
output: Add support for vertical alignment of cells.
It makes sense to bottom-align top headings but to top-align data cells,
for example.
Ben Pfaff [Mon, 19 Nov 2018 01:43:56 +0000 (17:43 -0800)]
tab: Expand space for table options from 8 to 16 bits each.
Upcoming commits will need the extra bits.
Ben Pfaff [Tue, 25 Dec 2018 19:52:44 +0000 (11:52 -0800)]
testsuite: Enable color output for tests.
Ben Pfaff [Mon, 26 Nov 2018 04:43:22 +0000 (20:43 -0800)]
render: Update style of footnote rendering.
Ben Pfaff [Sat, 17 Nov 2018 04:42:13 +0000 (20:42 -0800)]
output: Expand footnote support.
This adds support for multiple footnotes per table cell and the ability
to add footnotes to titles and captions.
Ben Pfaff [Mon, 26 Nov 2018 00:39:55 +0000 (16:39 -0800)]
format: New function fmt_from_u32().
This functionality will be useful for reading SPV files as well as SAV
files.
Ben Pfaff [Fri, 30 Nov 2018 04:51:54 +0000 (20:51 -0800)]
string-map: New functions for searching by non-null terminated keys.
The first user will be added in an upcoming commit.
Ben Pfaff [Mon, 26 Nov 2018 00:41:44 +0000 (16:41 -0800)]
str: New functions ss_starts_with() and ss_find_substring().
These will have their first users in an upcoming commit.
Ben Pfaff [Mon, 26 Nov 2018 00:38:47 +0000 (16:38 -0800)]
integer-format: Add some useful helper functions.
These functions already existed in float-format.c, but they are more
generally useful, so this commit moves them into integer-format.h.
Ben Pfaff [Sun, 16 Dec 2018 16:59:47 +0000 (08:59 -0800)]
CROSSTABS: Make treatment of crosstab variables and values more uniform.
Ben Pfaff [Sat, 15 Dec 2018 22:40:44 +0000 (14:40 -0800)]
CROSSTABS: Rename pivot_table to crosstabulation.
This will make things easier later when real pivot tables are introduced at
a higher level.