Ben Pfaff [Thu, 1 Oct 2009 04:50:13 +0000 (21:50 -0700)]
Fix numerous warnings about an unknown attribute rpl_malloc on mingw32.
On mingw32, Gnulib replaces malloc by defining it as a macro that expands
to rpl_malloc. Since MALLOC_LIKE used malloc as an identifier, even though
it didn't refer to the malloc function per se, this instance of malloc
also expanded to rpl_malloc, confusing GCC.
GCC also accepts __malloc__ here, so this commit uses that spelling
instead, which avoids the warning.
Ben Pfaff [Thu, 1 Oct 2009 04:45:47 +0000 (21:45 -0700)]
Upgrade to latest Gnulib version and fix resulting FreeBSD build failures.
Upgrading the Gnulib version exposed a couple of failures to #include
<config.h> at the very top of a source file via build failures on
FreeBSD 7.2-RELEASE, fixed by this commit.
This probably also fixes a similar OpenBSD issue reported by Jason Stover
at http://lists.gnu.org/archive/html/pspp-dev/2009-09/msg00095.html
Ben Pfaff [Thu, 1 Oct 2009 03:33:34 +0000 (20:33 -0700)]
Rewrite README.Git to mention the Gnulib commit number and explain better.
This commit has three purposes. First, I think that the new version of this
file explains the bootstrapping process a little better. Second, I want
to mention a Gnulib commit number that I have been using, so that other
people can easily figure out a version of Gnulib that will work. Third,
I want the PSPP autobuilder to be able to automatically pick out a working
Gnulib commit.
Ben Pfaff [Wed, 30 Sep 2009 04:47:09 +0000 (21:47 -0700)]
perl-module: Fix build on FreeBSD 7.2
config.h must be included first, otherwise the build fails on FreeBSD 7.2
in gl/string.h at the first instance of "restrict", which <config.h>
#defines as empty.
Ben Pfaff [Wed, 30 Sep 2009 04:33:34 +0000 (21:33 -0700)]
Don't use nonportable "mktemp" utility in perl-module/automake.mk.
In porting to FreeBSD, I noticed that perl-module/automake.mk tries to use
the "mktemp" utility. FreeBSD happens to have this utility, but it
requires an argument, and at any rate it is nonportable and we can avoid
using it here, so do so.
John Darrington [Mon, 28 Sep 2009 18:27:04 +0000 (20:27 +0200)]
Added a new target "programs" to the makefile.
When a source file is changed, the "all" target (correctly) rebuilds
the po/pspp.pot file and remerges the PO files for all supported translations,
and then builds .gmo files for each of them. Whilst this is correct behaviour,
it will become an unmitigated nuisance for developers as more and more
translations are added.
This change adds a new target called "programs" which builds the binaries, but
not the ancilliary targets. This target is more convienient for working on
changes to the source code, when translations are not of interest.
Ben Pfaff [Sat, 26 Sep 2009 04:14:31 +0000 (21:14 -0700)]
perl-module: Additional fixes for Perl version number on PSPP autobuilder.
Commit 30f21302 "perl-module: Tolerate minor PSPP version number
differences" tried to improve the behavior of the PSPP Perl module when
the PSPP version number includes a suffix such as -build40. But it didn't
entirely work, since it overlooked some uses of $(VERSION) in
perl-module/automake.mk. This commit fixes those too.
Ben Pfaff [Sat, 26 Sep 2009 03:38:07 +0000 (20:38 -0700)]
Fix missing @clicksequence problem for building Docbook output also.
Commit 770f21f5 "Fix missing @clicksequence problem with older Texinfo
versions." fixed the problem of missing @clicksequence for building the
main PSPP documentation, partly by adding to $(AM_MAKEINFOFLAGS). However,
$(AM_MAKEINFOFLAGS) wasn't used in building the Docbook output for use by
Yelp as the GUI help. This commit adds $(AM_MAKEINFOFLAGS) to that
command, fixing the problem.
Ben Pfaff [Fri, 25 Sep 2009 04:38:09 +0000 (21:38 -0700)]
perl-module: Tolerate minor PSPP version number differences.
The PSPP autobuilder that I'm working on appends a build number to the PSPP
version number, e.g. "0.7.2-build40". The Perl module has two problems
with this:
1. Perl won't parse version numbers that contain anything other than
digits and periods, so "-build" causes an error. So this commit
drops everything from the hyphen onward from the PSPP version number
passed along to Perl.
2. The Perl module itself does a string comparison operation between the
number it expects and the number that PSPP reports. When we drop
the hyphen onward, the comparison fails. So this commit also relaxes
the comparison to one that does pass.
Ben Pfaff [Thu, 24 Sep 2009 02:45:56 +0000 (19:45 -0700)]
Make GtkItemEntry compatible with GTK+ 2.17.4 and later.
GTK+ 2.17.4 breaks GtkEntry's buffer into a separate class named
GtkEntryBuffer and eliminates the associated members from GtkEntry.
The GtkItemEntry code in lib/gtksheet attempted to use some of those
members directly, which no longer works, so this commit changes that
code to use public function interfaces instead. Some of these public
function interfaces were introduced in GTK+ 2.17.4, so those pieces
are conditionalized on the version of GTK+ detected at build time.
This commit makes PSPPIRE compiled with GTK+ before 2.17.4 work properly
only when used with GTK+ before 2.17.4, and similarly when PSPPIRE is
compiled with GTK+ 2.17.4 or later. There may be a way to avoid that, but
it is not entirely obvious.
Ben Pfaff [Wed, 23 Sep 2009 05:19:17 +0000 (22:19 -0700)]
Fix "make install" with --enable-relocatable.
When PSPP added support for --enable-relocatable back in 2007, PSPP did
not install any shared libraries. Now it does, which requires us to
set RELOCATABLE_LIBRARY_PATH in configure.ac. Otherwise, the installed
binaries will not work automatically but require some manual user
intervention.
Also set RELOCATABLE_STRIP as recommended by the gnulib documentation.
Ben Pfaff [Mon, 21 Sep 2009 04:38:12 +0000 (21:38 -0700)]
hmap-test: Disable tests that GCC 4.3 miscompiles.
Commit ac58b3c51 "Avoid bug in GCC 4.3 in hmap-test." attempted to work
around a bug in GCC 4.3 that was causing test failures in hmap-test.
Unfortunately, the problem has started resurfacing again, probably due to
changes elsewhere, so this commit simply disables the tests in question
when PSPP is built with GCC 4.3.
Ben Pfaff [Sun, 20 Sep 2009 21:04:28 +0000 (14:04 -0700)]
Fix "make check" with --enable-relocatable.
When --enable-relocatable was passed to "configure", "make check" failed
while building datasheet-test:
tests/data/datasheet-test.c: In function 'main':
tests/data/datasheet-test.c:880: error: 'INSTALLDIR' undeclared (first use in this function)
Line 880 of that file is:
set_program_name (argv[0]);
which is a little mysterious until one realizes that --enable-relocatable
defines set_program_name() as a macro that expands to a value that includes
INSTALLDIR.
So this commit fixes the problem by making sure that INSTALLDIR is defined
as part of CPPFLAGS for all compiles.
Ben Pfaff [Thu, 17 Sep 2009 03:19:34 +0000 (20:19 -0700)]
Don't pad variable labels written to system files.
Previously, the code to write variable labels to system files accidentally
padded out the variable labels on the right with spaces to a multiple of 4
bytes in length. With this commit, variable labels will no longer be
padded.
This fixes a genuine bug for variable labels longer than 252 bytes, which
previously were padded out to 256 bytes. Variable labels are limited to
a maximum of 255 bytes, so PSPP refused to read such files.
Reported-by: Robert Westlund <rob@kinesissurvey.com>
Ben Pfaff [Wed, 16 Sep 2009 04:12:34 +0000 (21:12 -0700)]
FREQUENCIES: Make frequency table headings easier to translate.
The headings for frequency tables were broken up into individual words,
which made them hard to translate since in some languages the words needed
to be in the opposite order.
Thanks to Harry Thijssen <pspp@sjpaes.nl> for pointing out the problem.
Ben Pfaff [Tue, 4 Aug 2009 13:01:21 +0000 (06:01 -0700)]
Fix missing @clicksequence problem with older Texinfo versions.
The @clicksequence command was introduced in Texinfo 4.12, which a lot of
users do not yet have. This commit fixes the problem by detecting whether
makeinfo supports @clicksequence and, if not, defining a macro for it as
a substitute.
We also need support for @clicksequence in texinfo.tex. It is possible to
detect whether @clicksequence is defined using TeX code and, if not,
define a TeX macro for it. However, I'm not sure how to do that. So this
commit instead adds a known-good texinfo.tex to the source tree, which
should have the same effect.
Ben Pfaff [Fri, 4 Sep 2009 03:09:36 +0000 (20:09 -0700)]
T-TEST: Avoid NaN in paired-sample correlation significance calcuation.
Sometimes the correlation comes out just above 1.0 due to inaccuracy of
machine calculation, which causes sqrt(1-corr**2) to yield NaN. This
commit forces the correlation into the valid range, fixing the problem.
Thanks to Matej Cepl <mcepl@redhat.com> for reporting the problem.
Thanks to John Darrington for suggesting the fix.
John Darrington [Mon, 31 Aug 2009 16:25:23 +0000 (18:25 +0200)]
Rewrite automake rules for internationalisation files.
I got fed up with battling against the Makefile which
gettext provides. So I rolled my own instead. This change provides
the following advantages over previous situation:
* It doesn't use recursive calls to $(MAKE).
* Merged and unmerged po files are properly seperated into
the buildir and sourcedir respectively. Consequently,
po files get updated only when we really want them to be,
and not (potentially) on every commit.
* The .pot file (and consequently the .po and .gmo files) now
properly depend upon all the distributed source files. There
is no need to run "make -f Smake" to make it aware of new files.
* There's no more need of "timestamp" files.
* Potentially it's easier to add per-source-file options
when generating the .pot file. (and thus avoid warnings about
unrecognised extentions.
John Darrington [Tue, 28 Jul 2009 04:46:24 +0000 (06:46 +0200)]
Fix clipboard export of non-ascii strings.
Fixed problem pasting sheet data from psppire to
openoffice.org and gnumeric which contained non-ascii
characters. Tested with openoffice.org 2.4 and
gnumeric 1.8.3
John Darrington [Mon, 27 Jul 2009 09:22:00 +0000 (11:22 +0200)]
Redraw selection when reducing its area.
This change ensures that the area of the selection
is properly indicated when it's in the process of
being decreasing its area as well as increasing it.
John Darrington [Sat, 25 Jul 2009 14:27:30 +0000 (16:27 +0200)]
Disable extend_selection call.
Temporarily disable the call to psppire_sheet_extend_selection
since it interferes with the active cell border and selection
is currently not working anyway.
John Darrington [Sat, 25 Jul 2009 08:53:05 +0000 (10:53 +0200)]
Add "dictionary" property to PsppireVarStore and use it.
Instead of abusing the encapsulation of PsppireVarStore,
by accessing the internal dictionary member directly, add
a "dictionary" property. This should also take care of the
reference counting of the dict, which wasn't working properly.
John Darrington [Sun, 19 Jul 2009 11:35:35 +0000 (13:35 +0200)]
Fix cleanup of ROC command.
Properly deallocate variables, and use correct
symbols for parser return values. Also, delete
roc.h which is unnecessary. Thanks to Ben Pfaff
for pointing out these problems.
John Darrington [Sat, 18 Jul 2009 10:08:04 +0000 (12:08 +0200)]
Use data_out_pool in crosstabs.q
We were erroneously allocating a buffer before
the size of the contents were known. Using
data_out_pool avoids this problem. Thanks to
Ben Pfaff for pointing this out.
Jason Stover [Fri, 17 Jul 2009 20:02:02 +0000 (16:02 -0400)]
pspp_linreg(): Use cache->n_coeffs to set the dimensions of sw, instead of
cache->n_indeps, which may give incorrect dimension in the case
of categorical variables. Fixes bug referenced in bug report
26861.
Jason Stover [Fri, 17 Jul 2009 20:02:02 +0000 (16:02 -0400)]
pspp_linreg(): Use cache->n_coeffs to set the dimensions of sw, instead of
cache->n_indeps, which may give incorrect dimension in the case
of categorical variables. Fixes bug referenced in bug report
26861.