John Darrington [Thu, 12 Jan 2012 20:21:54 +0000 (21:21 +0100)]
Avoid deprecated Perl syntax.
Apparently new perl versions don't like qw(x y z) without outer parentheses. See
http://search.cpan.org/~flora/perl-5.14.2/pod/perl5140delta.pod#Use_of_qw%28...%29_as_parentheses
John Darrington [Wed, 11 Jan 2012 21:04:14 +0000 (22:04 +0100)]
Use idle callback to write to the local config directory
When the users config directory is on a filesystem with high latency,
moving a dialog box resulted in many writes and thus an unacceptable
delay. This change fixes that by consolidating the writes into a
low priority idle callback.
Ben Pfaff [Wed, 11 Jan 2012 04:52:11 +0000 (20:52 -0800)]
Fix PSPP link on OpenSUSE and possibly Ubuntu 11.10.
Reported-by: friedrich nietzsche <f_nietsje@hotmail.com>
at http://comments.gmane.org/gmane.comp.statistics.pspp.devel/4850 Reported-by: Luis Cebamanos <luiceur@gmail.com>
at http://comments.gmane.org/gmane.comp.statistics.pspp.devel/4869 Reported-by: Mindaugus <embar@super.lt> Tested-by: Mindaugus <embar@super.lt>
Ben Pfaff [Sat, 7 Jan 2012 21:14:02 +0000 (13:14 -0800)]
cairo: Only apply options to table items, to avoid crash.
Most of the members of struct xr_rendering, including the 'xr'
member, are used only for table items. In chart items, these
members are zeroed. But xr_rendering_apply_options() attempted to
use the 'xr' member even for chart items, which caused a crash.
This reverts and replaces the provisional fix already applied by
John Darrington in commit ee7b576822f (Avoid crash rendering charts
in the gui interface.), which also fixed the crash but added extra
unnecessary work.
Reported-by: Nick Macdonald <nick@nickmacdonald.net>
John Darrington [Thu, 22 Dec 2011 19:57:23 +0000 (20:57 +0100)]
Set the output driver parameters dynamically from the output window style.
This change allows the output driver options to be changed after the driver
has been created. This is necessary in the GUI to follow the style changes
(eg from theme engines etc)
John Darrington [Sat, 17 Dec 2011 07:31:03 +0000 (08:31 +0100)]
Output Viewer: Try to adapt to changes in style
Set the fg and bg of viewer's container and its children to the
text and base of the output window upon style change. This means that
the output viewer will respond to changes in style once even after the
program has been started.
We still need some way to set the foreground colours of the cairo output
after the driver has been created, but that doesn't seem to be currently
possible.
Ben Pfaff [Sun, 4 Dec 2011 18:44:07 +0000 (10:44 -0800)]
gui: Fix behavior of print preview in psppire-output-window.
Print preview only showed one page because the GtkPrintOperation emits
"paginate" again even after it returns TRUE once and our "paginate"
implementation was not prepared for that.
Also fixes a memory leak in paginate(): the driver used for pagination was
not being freed.
Reported-by: John Darrington <john@darrington.wattle.id.au>
John Darrington [Sat, 3 Dec 2011 12:06:32 +0000 (13:06 +0100)]
ONEWAY: Fixed crash when the dependent variable contained only missing values.
When forming a struct categoricals, there is no way in advance to know if the
given categorical variables will actually contain any values. If one or more
of them contains no non-missing values, then it's not meaningfull to talk
about categories.
Such cases were causing oneway to crash. Thanks to Dave Purdy
<David_Purdy@btinternet.com> for reporting this problem.
Ben Pfaff [Fri, 2 Dec 2011 06:06:48 +0000 (22:06 -0800)]
gui: Fix printing of tables split across pages in psppire-output-window.
xr_driver_output_item() expects the caller to call xr_driver_next_page()
as long as xr_driver_need_new_page() returns true, but the printing code
didn't do that, so tables split across pages in printouts caused an
assertion failure at the next call to xr_driver_output_item().
Reported-by: John Darrington <john@darrington.wattle.id.au>
John Darrington [Sat, 19 Nov 2011 18:33:03 +0000 (19:33 +0100)]
categoricals.c: Reimpliment the get_binary_by subscript function
Instead of making ad hoc encodings for interactions, use the product
of the encodings of the individual variables. This should not affect
the outcome of any current test cases, but makes the data flow easier
to follow and to debug.
John Darrington [Tue, 15 Nov 2011 14:47:10 +0000 (15:47 +0100)]
sweep.c: Use gsl_matrix_memcpy instead of element by element copying.
Although only the upper triangle needs to be copied, there is no
disadvantage copying the entire matrix (the lower triangle is never read)
and the expense of using two loops is likely to outweigh the saving achieved
by avoiding the other triangle.
John Darrington [Thu, 10 Nov 2011 20:13:32 +0000 (21:13 +0100)]
File Open: Don't try to analyse the file if it's a directory.
The File Open dialog box looks at the contents of the selected file
in order to decide whether to set the sensitivity of the encoding
selector. But if the file was a directory this caused error messages
on windoze. Closes bug #34773
Ben Pfaff [Thu, 10 Nov 2011 05:27:41 +0000 (21:27 -0800)]
GET: Fix confusion over the type of the 'type' parameter.
The 'type' parameter was being used to pass in an "enum reader_command" but
it was then later assigned a value of "enum pfm_type". This renames 'type'
to 'command' for clarity and just deletes the assignment of the "enum
pfm_type" value entirely because the value was not used.
Found by Clang.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Thu, 10 Nov 2011 05:23:46 +0000 (21:23 -0800)]
DO REPEAT: Properly convert lex_syntax_mode to segmenter_mode.
Clang reported that "enum lex_syntax_mode" was being implicitly converted
to "enum segmenter_mode". Luckily, equal values in each enum have the
same meaning, but it seems better to convert by hand, so this patch
implements that.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Thu, 10 Nov 2011 05:16:19 +0000 (21:16 -0800)]
hmap: Mark definition of hmap_node_hash() "static inline".
This suppresses a Clang warning. The prototype earlier in the file
was already marked "static inline", so I don't think that this is a
functional change.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Thu, 10 Nov 2011 05:02:06 +0000 (21:02 -0800)]
str: Mark definition of ss_empty() "static inline".
This suppresses a Clang warning. The prototype earlier in the file
was already marked "static inline", so I don't think that this is a
functional change.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Sun, 6 Nov 2011 21:22:16 +0000 (13:22 -0800)]
configure: Add option --enable-Werror to add -Werror to CFLAGS.
-Werror is useful for development, but it screws up configure because it's
impossible to guess what new warnings compilers will add in the future.
This commit adds a new configure option to add CFLAGS after the configure
checks are done.
The use of AC_CONFIG_COMMANDS_PRE is based on Eric Blake's suggestion on
the autoconf mailing list: "AC_CONFIG_COMMANDS_PRE probably fits the bill
as the ideal macro to use for guaranteeing that you inject your shell code
at the last possible moment."
The Autoconf code added in this commit, as well as this commit message,
come from Open vSwitch.
Ben Pfaff [Sat, 5 Nov 2011 19:46:21 +0000 (12:46 -0700)]
q2c: Remove final untranslated strings from q2c.c.
The "restrictions" that could be specified in q2c put strings
in the output that needed to be translated but could not. This
commit drops the feature and removes all of its prior users.
Some of the users required new validation code to be added, but
many of them in the SET command did not because the value was
not actually used anywhere.
Ben Pfaff [Sat, 5 Nov 2011 23:23:05 +0000 (16:23 -0700)]
lexer: Use error helper functions in more situations.
The error helpers print error messages that are just as helpful
as handwritten error messages in most cases, especially now
that the error messages include column numbers. They also
have advantages for i18n.
One important purpose of this commit is to remove several
strings from q2c.c that require translation but currently are
not translatable.
Ben Pfaff [Sat, 5 Nov 2011 20:07:44 +0000 (13:07 -0700)]
lexer: Drop lexer parameter from lex_sbc_missing().
There's no point in passing in the lexer and using lex_error(),
because the extra information that lex_error() outputs does
not help the user find the error.
Ben Pfaff [Wed, 2 Nov 2011 04:54:46 +0000 (21:54 -0700)]
gui: Fix configuring Unicode box characters.
Commit 14b3603043 "ascii: Add support for multibyte characters"
changed how the box characters are configured but failed to
update psppire-output-window.c, so attempting to paste a table
into an application that accepts UTF-8 text would output many
warnings like "unknown option `box[0201]'" and not actually use
Unicode box characters.