John Darrington [Fri, 23 Jan 2015 18:23:43 +0000 (19:23 +0100)]
Ensure that example_dir is relocatable.
commit be1157c5591142920a95d587acf97f5eaf3d04fe added a reference to the
installed data directory. Unfortunately I forgot to allow for relocatable
installations. This change fixes that.
John Darrington [Tue, 6 Jan 2015 06:25:21 +0000 (07:25 +0100)]
New module to perform decimal floating point arithmetic for charts.
This change adds a small module to perform floating point arithmetic
with a decimal base, and uses it to calculate the graticule marks for
charts.
Rationale: Graticule marks want to be displayed in decimal. However
not all decimal values can be represented in a double precision
floating point binary. This approach pushes the precision loss from
the value of the mark, to the position on the chart - we don't
particularly care if a tick mark is a fraction of a pixel out of place,
but we do care if 4.0 is displayed as 3.9999999999
John Darrington [Wed, 7 Jan 2015 19:03:09 +0000 (20:03 +0100)]
Syntax Window: Simplify the Edit|Paste callback.
Apparently pasting into the Syntax Window under Windoze didn't work.
This change makes the EditPaste callback simpler and apparently it
fixes the problem.
Thanks to Alan Mead for reporting the problem and to Harry Thissen
for testing the fix.
Ben Pfaff [Sun, 4 Jan 2015 19:13:01 +0000 (11:13 -0800)]
psppire-output-view: Fix segfault during printing.
psppire-output-view tried to make use of a special feature in the
cairo output driver that allowed the cairo_t to be omitted to avoid
actually rendering anything, for pagination purposes, but the cairo
code had changed and this feature had not been carefully maintained,
resulting in a segfault. This commit stops trying to use that
feature, since it seems like it could easily get broken again in the
future and doesn't have much benefit anyhow.
John Darrington [Sat, 3 Jan 2015 10:37:11 +0000 (11:37 +0100)]
Correct documentation example and add a corresponding test.
The tutorial section of the manual contained an example which
did not correspond to real results. This change corrects the
example and adds a test for it.
Ben Pfaff [Sun, 28 Dec 2014 16:49:36 +0000 (08:49 -0800)]
configure: Drop -Wdeclaration-after-statement.
We keep getting new instances of this warning in the tree, and it's
not really necessary these days since even MSVC supports mid-block
declarations now.
John Darrington [Sun, 14 Dec 2014 00:51:44 +0000 (01:51 +0100)]
File Export: Added a "plain text" option.
In the File|Export menu of the output window, enabled unicode box characters for
the "Text" output, and added a "Text (plain)" menuitem without this feature.
Ben Pfaff [Mon, 8 Dec 2014 06:36:36 +0000 (22:36 -0800)]
doc: Add section on how to exit PSPP to the tutorial.
Daniel Schlieper reported that he had trouble figuring out how to
exit. The FINISH command was already documented, but it wasn't
mentioned in the tutorial, so perhaps this will help.
Ben Pfaff [Mon, 8 Dec 2014 06:34:21 +0000 (22:34 -0800)]
command: Fix delayed execution of FINISH.
PSPP delayed the execution of FINISH until it read the first token
of the next command. This commit changes it to execute immediately,
as one would expect..
Ben Pfaff [Mon, 8 Dec 2014 06:13:44 +0000 (22:13 -0800)]
README.Git: Upgrade recommended Gnulib version.
Harry Thijssen reported that the older version of Gnulib failed to
build (in msvc-inval.c) on Windows, but that the newer version built
fine with the exception of the error that should have been fixed by
the previous commit.
Ben Pfaff [Mon, 8 Dec 2014 06:10:54 +0000 (22:10 -0800)]
lexer: Include <unistd.h> to ensure 'read' is consistently replaced.
On some platforms, Gnulib #defines read to rpl_read. The lexer uses
an unreleated function pointer member named 'read' in struct
lex_reader_class. It doesn't really matter whether this name gets
replaced with rpl_read as long as it always happens consistently.
Adding "#include <unistd.h>" to lexer.h should ensure that.
Ben Pfaff [Sat, 18 Oct 2014 19:11:34 +0000 (12:11 -0700)]
cairo: Add .5pt gutter around table rules.
Commit d3fef25674baf4f4 (output: Add footnote support.) removed the 3-pt
gutter around table rules, instead putting a margin around cell contents.
This usually worked out fine, but for some tables in the GUI it caused the
rightmost rule in the table to disappear. This is probably some kind of
off-by-one error in table size computation or clipping. We may have to
eventually resolve that. However, this commit seems like an adequate
temporary fix: instead of fixing the off-by-one error, add a thin gutter
around the rules, so that the actual content of the rule doesn't get
clipped off.
Ben Pfaff [Sat, 18 Oct 2014 19:06:11 +0000 (12:06 -0700)]
pspp-dev.texi: Add authors as @author arguments.
With a blank @author, makeinfo complains.
Without @author at all, the title page in TeX output looks funny.
So this commit simply names the authors, as determined by "git log" on
the doc/dev directory.
Ben Pfaff [Sat, 18 Oct 2014 17:38:53 +0000 (10:38 -0700)]
psppire-output-view: Properly render the first few items of output.
Commit 18f9e37c8bc5 (psppire-output-view: Only render output items once the
window is realized.) fixed a crashing bug, but when I tested it I didn't
carefully look at the output. In fact, any output items that were rendered
before the window was realized were not displayed, because the widgets
created for them were never shown or properly initialized. This commit
fixes the problem.
Ben Pfaff [Thu, 9 Oct 2014 05:39:18 +0000 (22:39 -0700)]
psppire-output-view: Only render output items once the window is realized.
Otherwise, in environments where the output view is not rendered
immediately upon the call to gtk_widget_show_all() from
psppire_output_submit(), psppire_output_view_put() called later in that
function would dereference a null pointer trying to create a rendering
from a null GTK_WIDGET (view->output)->window.
tests/output/render-test.c: In function ‘read_table’:
tests/output/render-test.c:491:19: error: format not a string literal and
no format arguments [-Werror=format-security]
Ben Pfaff [Sun, 14 Sep 2014 19:35:53 +0000 (12:35 -0700)]
render: Fix bug in render_pager_draw_region().
This bug, introduced in commit f1db96caae4 (ender: Fold caption drawing
into rendering engine.), could cause the title and body of a table to be
drawn overlapping.
Ben Pfaff [Sat, 13 Sep 2014 23:55:19 +0000 (16:55 -0700)]
output: Rename caption to title.
This brings PSPP a small step closer to the table model that SPSS uses,
which allows for a brief title above the table and a more verbose caption
below it.
Ben Pfaff [Sat, 13 Sep 2014 23:41:08 +0000 (16:41 -0700)]
output: Add footnote support.
The initials support for footnotes does not allow the client to specify
the markers and does not merge footnotes with the same text so that they
have the same markers. It might be necessary to implement one or both of
those features.
The footnote feature doesn't have any users yet, outside of the tests.
Ben Pfaff [Sat, 13 Sep 2014 17:24:59 +0000 (10:24 -0700)]
render: Introduce render_pager to factor out code from drivers.
The render_break abstraction requires quite a bit of assistance from
drivers. By introducing a high-level render_pager abstraction we factor
out a bit of common code. Future refinements will allow putting more and
more functional in the common "render" interface.