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.
The default wc application on MacOS does not support the -L option. I added
autotools support to search for GNU wc and use that instead. This assumes
that the application name is gwc which is the case whan using macports.
The tex tests use wc with the -L option. These regression tests fail on MacOS if the default wc application is used.
check gcc version before using gnu_printf attribute
The MacOS clang compiler does not know the gnu_printf attribute.
gnu_printf was introduced with gcc version 4.4 so I check the
gcc version before using gnu_printf. Otherwise I fallback to the
previous __printf__ attribute.
Ben Pfaff [Tue, 27 Oct 2020 02:35:09 +0000 (19:35 -0700)]
Use gnu_printf in attribute(()) to indicate GNU printf extension support.
By writing ordinary printf (or __printf__) inside __attribute__((format)),
one indicates that the system's typical format specifiers are supported.
This is OK for building for glibc, but it falls down for building for
mingw, since PSPP actually supports GNU format specifiers there via gnulib.
By writing gnu_printf instead, we avoid some incorrect warnings on mingw.
John Darrington [Mon, 26 Oct 2020 18:11:28 +0000 (19:11 +0100)]
TeX driver: Conditionally emit "\input graphics" control sequence.
Only emit the \input graphicx control sequence if it is actually needed.
This way, systems which do not have the graphicx package installed will
not fail on examples which need no graphics component.
Ben Pfaff [Mon, 26 Oct 2020 00:29:12 +0000 (17:29 -0700)]
doc: Improve formatting of tutorial in PDF output.
In the PDF version of the manual, excerpts from the output were formatted
awkwardly because output couldn't be split across pages. In one case,
the output spilled off the bottom of the page. This fixes the problem.
This change is pretty big. It's because @float can't split across pages,
but without @float one must write in a different style that doesn't assume
the reader can jump back and forth to figures and tables. I also took
the opportunity to start using pspp-output to excerpt portions of output.
Ben Pfaff [Sun, 25 Oct 2020 06:07:28 +0000 (23:07 -0700)]
doc: Generate output for tutorial examples at build time too.
The trickiest part here is that the final example should only include part
of the output, the coefficients tables only. For that, we can use the
pspp-output utility to pull just those tables from the output file.
John Darrington [Sun, 18 Oct 2020 08:15:35 +0000 (10:15 +0200)]
Restore the mime defintion file pspp.xml
Commit 8ec823cac8dd9eee5d0ad6cee9d001b9fdb673ba inadvertently
removed pspp.xml - the mime definition file. This change
restores it and also takes it out of the gui definition directory.