John Darrington [Fri, 21 May 2010 11:11:04 +0000 (13:11 +0200)]
Fix crash on Windows when calculating a covariance matrix of dimension 1.
Calculating a covariance matrix on a single variable crashed under Windows.
This change fixes that. It also prevents GUI users from attempting to
perform a correlation with only one variable, since if they are trying to
do that, then the have probably made a mistake.
Ben Pfaff [Fri, 21 May 2010 04:56:48 +0000 (21:56 -0700)]
sys-file-reader: Variable attributes record uses long variable names.
Michel Boaventura provided a system file for which PSPP complained about
bad variable attributes records. I found out that this was because the
variables were specified using long names, not short names. This commit
allows PSPP to read these variable attributes properly.
Ben Pfaff [Thu, 20 May 2010 03:59:28 +0000 (20:59 -0700)]
README.Git: Update to newest Gnulib.
This should fix build failures on OpenSUSE, OpenBSD, and possibly on other
platforms that have libintl but on which libintl does not contain a
definition of __printf__, by integrating the following commit:
Ben Pfaff [Wed, 19 May 2010 04:35:05 +0000 (21:35 -0700)]
psppire-axis: Use rint() instead of nearbyint(), for portability.
rint() and nearbyint() are identical except that nearbyint() will not
raise the inexact result exception, which we don't care about. OpenBSD
and probably other OSes have rint() but not nearbyint().
Perhaps a better fix would be to add a nearbyint module to Gnulib.
John Darrington [Sun, 16 May 2010 11:21:47 +0000 (13:21 +0200)]
Paste to a single common syntax window instead of a new one.
Previously, when a dialog box's "paste" button was pressed, a
new syntax window was created and the syntax pasted to it. This
change alters that behaviour. Now there is just one syntax window
that is used for all paste operations. Fixes bug #27686
John Darrington [Fri, 14 May 2010 16:20:48 +0000 (18:20 +0200)]
Translate the contents of frequencies and descriptives checkbox treeviews
Call gettext on the translatable strings which populate the
contents of "Statistics" treeviews in checkbox dialogs.
Thanks to Harry Thijssen for reporting this.
Ben Pfaff [Thu, 13 May 2010 04:41:21 +0000 (21:41 -0700)]
cairo: Allow xr_driver_create()'s caller to usefully set more options.
Until now, xr_driver_create() has only parsed a few of the Cairo driver
options. This commit makes it parse more of them, in preparation for
output viewer printing to set more of them.
Ben Pfaff [Thu, 13 May 2010 03:17:37 +0000 (20:17 -0700)]
Upgrade manuals' licenses to GFDL 1.3 and remove cover texts.
This commit changes the licenses for the PSPP manual from GFDL version 1.1
(or later) to GFDL version 1.3 (or later).
Perhaps more importantly, it removes the Front-Cover Text and Back-Cover
Text, as permitted by the GNU guide for maintainers:
Please adjust the list of invariant sections as appropriate for your
manual. If there are none, then say "with no Invariant Sections". If
your manual is not published by the FSF, and under 400 pages, you can
omit both cover texts.
John Darrington [Thu, 6 May 2010 07:21:07 +0000 (09:21 +0200)]
Don't convert values returned from gettext to UTF8.
Because we have called bind_text_domain_codeset, gettext always
returns strings in UTF8 encoding. It's therefore not correct to
convert them again. Thanks to Michel Boaventura for reporting
this problem.
Ben Pfaff [Mon, 3 May 2010 04:05:42 +0000 (21:05 -0700)]
CROSSTABS: Merge functions into cmd_crosstabs().
It seems to me that this code is more straightforward if it is written as
a single function, instead of four functions, so this commit merges those
functions together.
Ben Pfaff [Mon, 3 May 2010 04:00:06 +0000 (21:00 -0700)]
Take advantage of Gnulib configmake module.
Gnulib provides the "configmake" module for discovering configuration
directories at build time. PSPP already depends on this module indirectly,
so we might as well use it instead of defining our own variables in
Makefile.am and src/automake.mk.
(We can't replace INSTALLDIR by BINDIR because it is used under the
former name by the "relocatable-prog" module.)
John Darrington [Sun, 2 May 2010 13:20:38 +0000 (15:20 +0200)]
Convert syntax files to UTF-8 before loading them.
Convert the contents of a syntax file to UTF-8 before loading
it into the syntax window. Fixes bug #29733
This change assumes that the files to be loaded are in the
encoding of the current locale. If this assumption is not
true, then an error will be displayed and the file not loaded.
Ben Pfaff [Sun, 2 May 2010 02:09:04 +0000 (19:09 -0700)]
Implement MRSETS command.
Thanks to Tom Wilson <tom_wilson@mointel.com> for reporting the format of
the MRSETS record in system files, and to John Darrington for examples of
additional types of records.
The built Perl module is not useful for cross-compilation. By default it
is disabled for cross-compilation, but cross-compilation to Mingw32 is not
always detected as cross-compilation (since some Linux systems can run
Windows binaries directly, via Wine), so this option helps in such cases.
Reported by Michel Boaventura <michel.boaventura@gmail.com>.
Ben Pfaff [Thu, 22 Apr 2010 04:11:48 +0000 (21:11 -0700)]
Document system file record type 7, subtype 16 as 64-bit number of cases.
I found this record type and subtype in all .sav files written by SPSS 14
and later (and in one file written by SPSS 13). After scratching my head
a bit I realized that it always contained the same value as the "ncases"
field in the top-level file header, but written as a 64-bit number. So
presumably the purpose is to allow for a 64-bit count of cases.
Ben Pfaff [Wed, 21 Apr 2010 04:20:30 +0000 (21:20 -0700)]
perl-module: Avoid compiler warning from conflicting "my_strftime" macros.
Avoids the following warnings:
In file included from /usr/lib/perl/5.10/CORE/perl.h:953,
from PSPP.xs:23:
/usr/lib/perl/5.10/CORE/embed.h:2803:1: warning: "my_strftime" redefined
In file included from PSPP.xs:20:
/home/blp/pspp/output/_build/config.h:1968:1: warning: this is the location of the previous definition
Ben Pfaff [Fri, 16 Apr 2010 05:23:09 +0000 (22:23 -0700)]
configure: Improve check for PostgreSQL's libpq.
Previously this test did not check that linking against libpq worked.
This commit fixes that. Besides broken installations this also guards
against pg_config that is applicable to the host when cross-compiling to
Mingw, which doesn't always show up as cross-compiling since some systems
can still run the Mingw binaries if Wine is installed as a binary
interpreter for Windows executables.
This also fixes a minor issue where -lpq was being added to the default
LIBS as well as to PG_LIBS, which meant that every PSPP binary was being
linked against it, not just the ones that needed it (which were being
linked against it twice).
Problem reported by Michel Boaventura <michel@michelboaventura.com>.
Ben Pfaff [Fri, 16 Apr 2010 03:39:47 +0000 (20:39 -0700)]
Move definition of UI_FILES out of HAVE_GUI.
UI_FILES needs to be defined regardless of whether the GUI is being built,
because the .ui files are needed to generate pspp.pot. (We don't want
pspp.pot to depend on whether the GUI is configured, either.)
Problem reported by Michel Boaventura <michel.boaventura@gmail.com>.
Ben Pfaff [Sat, 27 Mar 2010 18:32:07 +0000 (11:32 -0700)]
configure.ac: Define DEPENDS_ON_LIBINTL if LIBINTL is nonempty.
This avoids a collision between the gnulib and libintl printf wrappers.
See http://permalink.gmane.org/gmane.comp.lib.gnulib.bugs/21139 for
more information.
Thanks to Michel Boaventura for reporting the problem and to Bruno Haible
for the fix.
Ben Pfaff [Sat, 27 Mar 2010 18:30:01 +0000 (11:30 -0700)]
configure.ac: Restore use of AM_GNU_GETTEXT.
AM_GNU_GETTEXT is useful for its sophisticated support for finding the
libraries needed to use gettext, but it also calls AM_PO_SUBDIRS, which
we do not want because PSPP has its own "po" directory makefile support.
This commit reintroduces AM_GNU_GETTEXT but disables AM_PO_SUBDIRS by
declaring that we have already called it using AC_PROVIDE. It also
adds a dummy Makefile.in to the "po" directory and an ABOUT-NLS file
because Automake requires both.
Ben Pfaff [Thu, 15 Apr 2010 04:47:07 +0000 (21:47 -0700)]
perl-module: Use Autotest for testing Perl.
The output of the existing Perl test is difficult to understand, in my
opinion. When everything goes right, it prints out plenty of stuff.
When something goes wrong, it prints more stuff, but that stuff usually
doesn't make it clear to me what went wrong or where.
Moving it into Autotest helps in two ways. When everything goes right,
all you get is a clear summary that says that. When something goes wrong,
you get clear log files that explain where.
(This commit actually duplicates the Perl module tests: it makes Autotest
copies of each of the individual tests, and Autotest also runs the
t/Pspp.t unit test. The former are easier to understand; the latter is
what Perl hackers apparently expect to see.)