Ben Pfaff [Wed, 16 Jun 2010 03:41:12 +0000 (20:41 -0700)]
Do not treat isolated CR in input data as new-line.
User "tvw" on IRC reported that PSPP failed to parse data that SPSS 18
accepted. We found that the problem was carriage return (CR) characters
in the middle of a line. PSPP treated these as new-lines, but SPSS did
not. This commit adopts the SPSS behavior in PSPP and adjusts one test
that checks this behavior.
This will break reading some old Mac OS files, since Mac OS before version
10 used CR without LF as new-line. Time will tell whether this is a real
problem for our users.
Ben Pfaff [Fri, 11 Jun 2010 04:31:59 +0000 (21:31 -0700)]
tmpfile: Rename "struct tmpfile" to "struct temp_file".
Mingw builds were failing because Gnulib was replacing "tmpfile" by
"rpl_tmpfile", and this was visible only to some users of "struct tmpfile".
The safest fix seems to be just renaming struct tmpfile, so that's what
this commit does.
Thanks to Harry Thijssen <pspp@sjpaes.nl> for reporting the problem.
John Darrington [Wed, 9 Jun 2010 18:22:43 +0000 (20:22 +0200)]
perl-module/Makefile.PL: Change DLEXT to SO
Apparently the former is for dynamically loaded modules,
whereas the latter is for shared libraries. So SO is
appropriate here. Thanks to Jeremy Lavergne for reporting
this.
Ben Pfaff [Wed, 9 Jun 2010 17:10:03 +0000 (10:10 -0700)]
configure.ac: Do not define DEPENDS_ON_LIBINTL.
If <config.h> defines DEPENDS_ON_LIBINTL, then the relocation wrapper fails
to link at install time when --enable-relocatable is used on a system that
requires the relocation wrapper (e.g. OpenBSD), because the relocation
wrapper does not link against libintl.
Ben Pfaff [Tue, 8 Jun 2010 04:45:33 +0000 (21:45 -0700)]
gui: Create user settings directory if it doesn't already exist.
The user settings directory doesn't necessarily exist. Some program has to
create it, and PSPPIRE might be the first program that wants it, so it
should try to create it.
Ben Pfaff [Sun, 6 Jun 2010 19:45:01 +0000 (12:45 -0700)]
DEBUG EVALUATE: Eliminate lexical corner case, rewrite tests in Autotest.
The DEBUG EVALUATE command, used only for testing, used the
lex_rest_of_line() function. I'd like to eventually get rid of all of the
uses of this function and other unusual lexical corner cases, so this
commit starts off by removing this one.
Ben Pfaff [Sun, 6 Jun 2010 19:23:33 +0000 (12:23 -0700)]
expressions: Improve error message for bad quarter argument to DATE.QYR.
The error message issued by DATE.QYR for an invalid "quarter" argument
referred instead to a "month" value. This makes the error message more
understandable.
Ben Pfaff [Sun, 6 Jun 2010 19:41:08 +0000 (12:41 -0700)]
expressions: Improve "type mismatch" error messages from expression parser.
Before this commit, type mismatches invoking functions in expressions would
yield confusing error messages due to missing type names, e.g.:
Type mismatch invoking MISSING(number) as missing(string).
This commit fills in the missing type names:
Type mismatch invoking MISSING(number) as missing().
An upcoming commit will start checking error messages as part of the tests
for expressions, which should ensure that the problem does not recur.
Ben Pfaff [Sun, 6 Jun 2010 19:43:10 +0000 (12:43 -0700)]
MOMENTS: Avoid lexical corner case in test case.
The DEBUG MOMENTS command, used only for testing, used the
lex_rest_of_line() function. I'd like to eventually get rid of all of the
uses of this function and other unusual lexical corner cases, so this
commit starts off by removing this one.
John Darrington [Thu, 27 May 2010 14:29:10 +0000 (16:29 +0200)]
Added some very rudimentary tests for charts.
Currently, all these tests do is ensure that the syntax which
should generate charts, can run without crashing. More
rigourous tests should be added in the future, when the infrastructure
allows.
Ben Pfaff [Sat, 17 Oct 2009 23:46:21 +0000 (16:46 -0700)]
Fix get-data-txt-importcases.sh test on Mingw.
On Mingw, ftell() and ftello() are unreliable when used on text files with
plain LF line endings:
http://article.gmane.org/gmane.comp.gnu.m4.bugs/2224
This made the get-data-txt-importcases.sh test fail, because
dfm_get_percent_read() that it depends upon to determine the percentage of
the file that has been read uses ftello(). The solution is to always open
the text file as a binary file. According to my audit of the ways that
the text file is read, this should not cause other problems. In
particular, ds_read_line() handles both LF and CR-LF line endings. But it
cannot handle negative effects on Unix platforms anyway, since they do not
distinguish text and binary modes.
Ben Pfaff [Wed, 26 May 2010 04:46:23 +0000 (21:46 -0700)]
perl-module: Copy perl-module files if missing as well as if changed.
I don't know why the behavior here changed, because I don't see any changes
that would cause the problem, but at least the new version makes equal
sense.
John Darrington [Tue, 25 May 2010 08:53:53 +0000 (10:53 +0200)]
Output viewer: Guess file type from filename suffix.
When choosing File|Export in the output viewer,
the dialog box now guesses the desired file format
based upon the given filename suffix.
Closes bug #29867
Ben Pfaff [Sat, 22 May 2010 18:33:48 +0000 (11:33 -0700)]
sys-file-reader: Fix reading overlong value labels for long string variables.
Commit 6b562f8a8 "Add support for value labels on long string variables"
that added support for reading value labels for long string variables from
system files had a logic error in dealing with too-long label strings: the
sign of the subtraction was reversed.
Problem reported by Michel Boaventura <michel@michelboaventura.com>.
Ben Pfaff [Sat, 22 May 2010 18:28:18 +0000 (11:28 -0700)]
dissect-sysfile: Allow padding compressed data at end of file without error.
Compressed data in a system file can end either with a special opcode or
by padding out the last set of opcodes to an 8-byte boundary with null
bytes. Until now, dissect-sysfile has complained about last with
"unexpected end of file". This commit fixes the problem.
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.