Ben Pfaff [Thu, 1 Mar 2012 06:43:22 +0000 (22:43 -0800)]
encoding-guesser: Fall back to windows-1252 when UTF-8 can't be right.
Until now the encoding-guesser code has used UTF-8 as a fallback in
situations where we can tell that the file is not valid UTF-8. In
this kind of situation having a single-byte character set as a
fallback makes more sense. This commit hard-codes windows-1252 as
that fallback, since it is a widely encountered encoding (and
compatible with ISO-8859-1 as well).
John Darrington originally suggested this, if I recall correctly.
The bug report that spurred this work was from Harry Thijssen. With
this commit, PSPP properly reads his windows-1252 file when the
system locale uses UTF-8 encoding.
John Darrington [Thu, 1 Mar 2012 20:21:44 +0000 (21:21 +0100)]
Don't update the icon cache if DESTDIR is non-empty.
Packagers generally use "make install DESTDIR=xxx" to generate their install
files, which are then copied in place to the target filesystem. In such a
scenario, it's inappropriate to copy the icon.cache files. This change
therefore does not update the icon cache if a DESTDIR has been specified.
Instead it's left to the packager to make his own arrangements for updating
the icon cache on the target filesystem.
John Darrington [Tue, 28 Feb 2012 20:47:09 +0000 (21:47 +0100)]
Postgres test: Create socket in /tmp instead of current directory
It seems that some systems do not allow unix domain sockets with long
pathnames. This change therefore creates a directory in /tmp using
the mktemp command.
John Darrington [Wed, 29 Feb 2012 17:32:20 +0000 (18:32 +0100)]
Kruskal-Wallis: Sort grouped ranks before displaying them.
Debian's autobuilder showed that the KW tests were failing because the
hash which holds the rank entries was being iterated in arbitrary order.
This change sorts the entries before displaying them, so they should
always appear in the same order.
John Darrington [Sun, 26 Feb 2012 17:11:43 +0000 (18:11 +0100)]
Generate pspp.desktop
This change autogenerates the pspp.desktop file instead of simply including it.
This allows us to have the translations updated from the po files instead of
someone having to manually enter the strings directly in the file.
Ben Pfaff [Sat, 18 Feb 2012 19:03:01 +0000 (11:03 -0800)]
str: Skip only up to one-past-the-end in ss_tokenize().
If ss_tokenize() was called with '*save_idx' positioned at
one-past-the-end of a string, it would continue to advance it past
that point, which is surprising. This avoids doing that.
Found by Valgrind. Reported-by: John Darrington <john@darrington.wattle.id.au>
John Darrington [Sat, 18 Feb 2012 11:18:23 +0000 (12:18 +0100)]
Use if(0) instead of #if 0
The Gnu Coding Standards recommend run time conditionals instead of preprocessor
conditionals. I think this makes sense too, since #if 0'd code becomes obsolete
without anyone noticing.
John Darrington [Tue, 14 Feb 2012 10:13:15 +0000 (11:13 +0100)]
Reliability Test: Do not allow splits greater than the number of variables.
It's not meaningful to have a split point which is greater than the number
of variables (and not useful when they are equal). And the system was
exhaughsting its memory when such a test was run. This change therefore
disallows such a combination and updates the behaviour of the GUI accordingly.
John Darrington [Mon, 13 Feb 2012 18:16:37 +0000 (19:16 +0100)]
Use ButtonBox Mask nick field for it's correct purpose.
It seems that the GFlagsValue nick field was mistakenly being used as if
it was a translatable label. Not only was this wrong, but it also created
unnecessary work for translators. This change provides descriptions of the
flags and removes them from the translatable strings.
Ben Pfaff [Sat, 11 Feb 2012 18:16:25 +0000 (10:16 -0800)]
tests: Improve test for supported encodings.
I misunderstood the purpose for the config.charset script. I had a
notion that it was supposed to print all of the character sets that
are supported by the operating system. It doesn't (it prints
character set names that need translation for the operating system).
This change switches to using the same code that will be used at
PSPP runtime to determine whether an encoding is supported, for
determining during the tests whether an encoding is supported.
This should cause fewer tests to be skipped on Mac OS.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Sat, 11 Feb 2012 18:09:28 +0000 (10:09 -0800)]
perl-module: use $(MAKE) directly in rules that call make.
The GNU make manual says that $(MAKE) must appear directly in a rule
rather than through recursive expansion to work properly. (This
change fixes a GNU make warning about an unavailable jobserver.)
Ben Pfaff [Wed, 8 Feb 2012 06:08:41 +0000 (22:08 -0800)]
sys-file: Recode string fields in file header also.
Chris Muller <chris.muller@mullermedia.com> provided an example
EBCDIC-encoded mainframe system file from the 1980s. This commit
goes one step toward being able to read and write these files in
PSPP, by recoding most of the string fields in the file header.
John Darrington [Sat, 4 Feb 2012 07:44:05 +0000 (08:44 +0100)]
New abstract base class: PsppireWindowBase
Created a new abstract base class for windows/dialogs and moved the
psppire_conf manipulation to there. Should fix problems reported by bojo42
where the window geometry wasn't always correctly saved.
Ben Pfaff [Fri, 27 Jan 2012 06:06:02 +0000 (22:06 -0800)]
Move PSPP shared libraries from $(libdir) to $(libdir)/pspp.
The PSPP shared libraries do not have a stable ABI and so they
should not go in a public system library directory. This moves
them to a private library subdirectory.
Ben Pfaff [Fri, 27 Jan 2012 05:27:36 +0000 (21:27 -0800)]
Name the src/libpspp convenience library consistently.
src/libpspp.la and src/libpspp/libpspp.la have the same name,
although they are in different directories. This seems unduly
confusing. This commit renames the latter to liblibpspp.la, which
is at least different from libpspp.la and is also consistent with
the naming of the other libtool convenience libraries as
lib<directory>.la.