John Darrington [Sun, 27 Dec 2020 07:47:51 +0000 (08:47 +0100)]
Remove dummy-prerequisite rule
As Ben pointed out, this probably did more harm than good. So instead,
this change adds some explicit dependencies where prerequisites are
known to be necessary.
Ben Pfaff [Sun, 27 Dec 2020 01:54:07 +0000 (17:54 -0800)]
cairo: Label pages in PDFs with page numbers.
These normally wouldn't do much, but PSPP does support an "initial page
number" setting, and if that is set to anything but 1 then it will make
a difference.
Ben Pfaff [Sat, 26 Dec 2020 05:54:48 +0000 (21:54 -0800)]
cairo: Avoid using cairo_t for a destroyed cairo_surface_t.
xr_pager_destroy() would destroy the latest cairo_t, if there was one.
Generally there wasn't, since in the common case it got destroyed by
xr_pager_run() when the fsm emptied out, but in the case of the last page
in a produced output file, xr_destroy() would call xr_pager_destroy()
after first destroying the surface_t it was drawing on. I don't think this
is an actual bug, because everything is properly reference-counted inside
Cairo (the cairo_t holds a reference on its cairo_surface_t) but I found it
confusing.
Ben Pfaff [Mon, 21 Dec 2020 04:30:18 +0000 (20:30 -0800)]
pivot-table: Change the default format to omit empty rows and columns.
By making this the default, it doesn't become necessary to make a lot of
procedures that yield output change the format to produce reasonable
output. This means that the user's settings for the format won't get
overridden.
This changes a lot of output that had empty columns, in particular
anything that used DISPLAY DICTIONARY with a dictionary that had no
variable labels or missing values. This commit also updates the expected
output to match.
An unexpected side effect was that some tables became empty entirely, for
example LIST with no rows. This seemed undesirable, so I changed
pivot_table_enumerate_axis() so if an axis was entirely empty due to
omit_empty, then omit_empty was suppressed for that axis.
Ben Pfaff [Sun, 6 Dec 2020 01:07:12 +0000 (17:07 -0800)]
psppire-output-view: Consistently apply "transparent" and "systemcolors".
Commit 81dece3642da ("output view: make items selectable and use system
colours") add transparency and system colors to the driver in the GUI,
but it did so somewhat after the driver was created. I don't know why.
It makes more sense to me to set these options when creating the driver.
This commit makes that change. It also deletes the function to change
the options; it had no other user.
Ben Pfaff [Sat, 19 Dec 2020 05:10:28 +0000 (21:10 -0800)]
sys-file-reader: Omit @(#) from file strings in sfm_get_strings().
This function returns strings so that the user can figure out the file's
correct encoding. @(#) has different interpretations in a few encodings
(sometimes 0x23 is not #) and there's no value in displaying different
versions of it, so skip it.
Ben Pfaff [Thu, 17 Dec 2020 06:41:06 +0000 (22:41 -0800)]
tests: Restore tests that were commented out by buggy commit.
These were commented out by commit 691a034d7f21 ("Add copyright and
licence notices to files which lack them."). Subsequent commit 691a034d7f21 ("Add copyright and licence notices to files which lack
them.") fixed some but not all of the bugs. I think that this
commit fixes the rest.
Also, fix the one test that was broken in the meantime.
John Darrington [Sun, 13 Dec 2020 11:25:55 +0000 (12:25 +0100)]
When cross-compiling, also build native binaries, and use them to create
the files in doc/pspp-figures. Obviously an effect of this is that cross
builds require both native and host libraries.
Ben Pfaff [Mon, 30 Nov 2020 04:32:54 +0000 (20:32 -0800)]
cairo: Remove obsolete 'nest' member from struct xr_driver.
Commit a8799bb1d22a ("output: Remove support for nested tables.")
removed the real users for this member but didn't remove the member
itself or two unneeded uses of it.
Ben Pfaff [Sat, 28 Nov 2020 02:56:35 +0000 (18:56 -0800)]
doc: Make figure references relative to doc/, not to doc/pspp-figures.
This frame of reference is what the viewers for the generated XML and Info
files expect (from testing). It also seems to be what the Makefile expects
since this allows us to eliminate a couple of include directory options.
Ben Pfaff [Fri, 27 Nov 2020 23:38:07 +0000 (15:38 -0800)]
doc: Move output examples from "examples" to "pspp-figures".
The Texinfo manual suggests this convention:
If you want to install image files for use by Info readers too, we
recommend putting them in a subdirectory like 'FOO-figures' for a
package FOO. Copying the files into '$(infodir)/FOO-figures/' should be
done in your 'Makefile'.
Although it suggests this convention for the installed Info, it helps to
use the convention for the source and build directories, because "makeinfo"
looks for the files at Info build time.
Ben Pfaff [Fri, 27 Nov 2020 23:05:55 +0000 (15:05 -0800)]
src/libpspp/Makefile.am: Fix atomicity of version.c generation.
If the Makefile has a bug, or someone runs two "make"s in parallel, the
approach of truncating version.c then appending to it line by line,
reopening the file each time, can wind up with a nasty partial result. By
generating it in a single go, and then replacing the file atomically, we
avoid that problem.
Ben Pfaff [Mon, 16 Nov 2020 18:13:21 +0000 (10:13 -0800)]
svg2png: Speed up gimp startup with -d option.
This option prevents gimp from loading patterns, gradients, palettes,
and brushes. I think that these are mostly for interactive use. I didn't
see any difference in output quality.
On my system this sped up "make -f Smake -j128 icons" from 1.8 to 1.6
seconds. On other systems I guess it will make a bigger difference.
John Darrington [Mon, 16 Nov 2020 17:07:17 +0000 (18:07 +0100)]
doc/automake.mk: Re-instate html-local as a dummy rule
commit a58b271cad7e72bc5f2c0e8f7e98fadc27759089 removed the html-local
rule, but did not remove all references to it. I'm intending to use
this rule again for upcoming changes. In the meantime I'm re-instating
it as a rule which does nothing.