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.
John Darrington [Wed, 19 Oct 2011 17:55:00 +0000 (19:55 +0200)]
Use variable labels in crosstabs.
Use a variable's label instead of its name (if it has one) in the crosstabs
output. Removed the FORMAT=LABEL subcommand which is no longer supported
by spss. Updated documentation to reflect the code.
John Darrington [Sun, 9 Oct 2011 14:42:56 +0000 (16:42 +0200)]
Fix potential problems with non-literal printf arguments.
In a few places we were passing a constructed string to a printf-like
function as its format argument. This could have been problematic if
the constructed string had contained a % (for example due to that
character occuring in a variable label). This change avoids those
situations.
John Darrington [Fri, 7 Oct 2011 12:15:35 +0000 (14:15 +0200)]
Fix incorrectly ordered arguments to xcalloc
The gnulib xcalloc call has the following signature:
void *calloc(size_t N, size_t S);
where N is the number of objects and S is the size of each object.
In many places, we had these arguments transposed. In many implementations
this doesn't matter since the two arguments are simply multiplied together.
However, on some systems this can cause problems (ie crash), if S is zero.
This change fixes all calls where the size was being passes as the first
argument instead of the second.
John Darrington [Fri, 23 Sep 2011 13:56:45 +0000 (15:56 +0200)]
Move interaction subset predicates out of glm.c into interaction.c
Renamed function: is_subset --> interaction_is_proper_subset
drop_from_submodel --> interaction_is_subset
and moved them into interaction.c This seems to me to be easier
to understand, and more efficient.
John Darrington [Sun, 25 Sep 2011 11:22:56 +0000 (13:22 +0200)]
Added dialog box for univariate anova.
Added a dialog box to conduct a univariate anova using the GLM
command. Currently only entry of the dependent variable and the
factors are possible. Choosing the interactions must be done
through syntax, if the default is not what the user wants.
John Darrington [Sat, 3 Sep 2011 04:54:16 +0000 (06:54 +0200)]
Avoid compiler warnings about uninitialised variables.
Some compilers produced warnings about possible use of
uninitialised variables (although such use was in fact not possible)
These warnings were harmless (perhaps even erroneous) but
it's no problem to avoid them.
John Darrington [Fri, 2 Sep 2011 18:59:54 +0000 (20:59 +0200)]
Fix make makedistcheck and re-organize icon paths.
This change does several things:
* renamed psppicon.png to pspp.png - The word "icon" is redundant
(it's also a misuse of English).
* Changed the install target of the existing 16x16 pictograms out of the apps
directory. Instead, they now go in a directory of their own called "pspp".
This is more in line with what other applications seem to do. It also makes
it a lot easier to deal uninstall them, since we can be reasonably sure that
everything in the "pspp" directory was put there by us.
Ben Pfaff [Fri, 26 Aug 2011 03:28:26 +0000 (20:28 -0700)]
Fix build error if "close" macro is not always visible.
Harry Thijssen <pspp@sjpaes.nl> reported the following errors
with recent Gnulib on Win32:
src/language/lexer/lexer.c: In function 'lex_source_destroy':
src/language/lexer/lexer.c:1455: error: 'const struct
lex_reader_class' has no member named 'rpl_close'
src/language/lexer/lexer.c:1456: error: 'const struct
lex_reader_class' has no member named 'rpl_close'
The problem was that the Gnulib substitute for <unistd.h>
defines close to rpl_close, but this macro definition wasn't
visible when lexer.c included lexer.h and became visible later.
This commit fixes the problem by making sure that the macro
definition is always visible in lexer.h.
A better solution would probably be to rename the 'close'
member to something other than a standard POSIX function name.
The change to control-stack.h is just precautionary; Harry
didn't report the same problem there.
John Darrington [Wed, 24 Aug 2011 07:29:49 +0000 (09:29 +0200)]
Improve paste to Openoffice.org &c
Added "css" and "borders" options to the html driver, and
set these options to false when generating clipboard data.
This produces better looking results when cut & pasting to
OOo
Matìj Cepl [Sat, 20 Aug 2011 10:49:02 +0000 (12:49 +0200)]
gui: Streamline pspp.desktop
Remove the extension for Icon (unnecessary, in case in
future we want to provide for example SVG icon) and removed
unnecessary keys. Do we know for fact that we will never ever
support Notifications? And I guess if we provide the .desktop and
executable as part of the same tarball/package there is not much
chance we would have binary missing. I have also added a Czech
translation of keys.
Ben Pfaff [Tue, 16 Aug 2011 05:39:53 +0000 (22:39 -0700)]
Upgrade to newest Gnulib to help relocatable-prog on Mac OS X.
--enable-relocatable currently fails on Mac OS X due to a link
error related to symbols that Gnulib is supposed to replace.
I see that Gnulib has the following commits, not previously in
PSPP, that mention related changes:
357d319 relocatable-lib: Move AC_LIBOBJ invocations to module description. c2d8c01 relocatable-prog: Move AC_LIBOBJ invocations to module description. 325f131 relocatable-prog-wrapper: Fix possible link error. 886f850 relocatable-prog-wrapper: Assume strerror() exists. 02d4f86 relocatable-prog-wrapper: Update after module 'areadlink' changed. d14f18b relocatable-prog-wrapper: Update after module 'areadlink' changed. 69c99f3 * lib/relocwrapper.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise. ef11bf4 * lib/relocatable.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise. 10d90c8 * lib/progreloc.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise. 4e51bc9 unictype/property-byname: Reduce the number of load-time relocations. fb6aa6a relocatable-prog: fix link error
This commit updates PSPP to capture those changes. It also
makes the changes recommended by Gnulib's NEWS.
Ben Pfaff [Wed, 13 Jul 2011 04:52:37 +0000 (21:52 -0700)]
range-set: Skip some tests on llvm-gcc 4.2.
These tests seem to trigger a bug in llvm-gcc 4.2 on Mac OS X
10.8.0. Experimentation shows that the bug is more likely to
be triggered by the test code than the code under test, so skip
them.
I spent some time trying to narrow down the problem enough to
make a bug report to the llvm-gcc developers, but I ran out of
time before I finished with that.
Thanks to Jeremy Lavergne <jeremy@lavergne.gotdns.org> for
reporting the problem.