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: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.)
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.
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.
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 [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 [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 [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 [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 [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 [Sat, 15 Dec 2018 18:43:47 +0000 (10:43 -0800)]
ascii: Get rid of the idea of pages.
In the era when I started writing this code, people still printed output on
dot-matrix printers and fanfold paper. That's no longer a realistic use
case: today, no one prints plain text output. It's just for viewing on a
screen, and on a screen there is no need or desire to break tables up
vertically into virtual "pages".
Ben Pfaff [Sun, 9 Dec 2018 20:46:17 +0000 (12:46 -0800)]
table: Get rid of TAL_GAP.
This is only necessary in pathological cases. Those cases don't really
come up in normal usage and as PSPP shifts toward pivot tables they won't
come up at all.
Ben Pfaff [Sun, 2 Dec 2018 21:28:44 +0000 (13:28 -0800)]
SYSFILE INFO: Get rid of nested tables.
Nested tables aren't really necessary and make a number of things harder in
the output subsystem. SYSFILE INFO and DISPLAY, which share code, were the
only code that used them, so this removes them from that code.
Ben Pfaff [Mon, 3 Dec 2018 02:36:51 +0000 (18:36 -0800)]
get-data-psql.at: Make test work with Debian pg_wrapper arrangement.
It had been years since I tested Postgres, but I was making a change that
would affect the Postgres test, and I found out that the test didn't work.
This fixes it.
Ben Pfaff [Mon, 26 Nov 2018 14:54:52 +0000 (06:54 -0800)]
segment: Fix behavior when #! line is not new-line terminated.
The code here is supposed to maintain a invariant that, when it returns a
nonnegative value, it initializes *type, but it failed to do that when a
#! line did not end in a new-line. This fixes the problem.
Bug #55101.
Thanks for Friedrich Beckmann for narrowing down the problem.
Found by the Debian buildd: https://buildd.debian.org/status/fetch.php?pkg=pspp&arch=arm64&ver=1.2.0-1&stamp=1543183214&raw=0