John Darrington [Sun, 22 Aug 2010 10:36:37 +0000 (12:36 +0200)]
SET MXWARNS = 0 to be interpreted as unlimited.
This change introduces a special meaning to the
value of zero for the MXWARNS settings. When
a zero value is set. A single warning will be
emitted informing the user that the setting is
in effect. Thereafter no warning will be emitted.
All warning situations will be ignored.
John Darrington [Sun, 22 Aug 2010 09:05:16 +0000 (11:05 +0200)]
Move MX* processing to libpspp/message.c
This change moves the guts of src/ui/terminal/msg-ui.c
into libpspp/message.c The affected code handles the
processing of the MXWARNS and MXERRS settings. As this
code was under src/ui/terminal these settings were being
ignored in the GUI
John Darrington [Thu, 19 Aug 2010 14:54:45 +0000 (16:54 +0200)]
Fix translation of column header.
The "var" column header in the data view was not getting
translated, due to lack of a call to gettext. Thanks to
Mindaugas embar@super.lt for reporting this.
Ben Pfaff [Sat, 7 Aug 2010 20:47:33 +0000 (13:47 -0700)]
SAVE: Fix UNSELECTED=RETAIN with a filter variable.
Apparently this had never been tested. It assert-failed consistently
because the filter variable being saved was from the dictionary before
reading the data, but the dictionary after reading the data was
different due to the temporary transformation used to drop the
filtered data.
Ben Pfaff [Tue, 3 Aug 2010 05:11:13 +0000 (22:11 -0700)]
Replace S_I[RWX]{USR,GRP,OTH} macros by their values.
POSIX 2008 guarantees that these macros have their traditional Unix values,
so it should no be longer necessary to use the macros for portability's
sake. Personally, I find the values easier to read, especially when
several of them are OR'd together.
John Darrington [Sun, 8 Aug 2010 18:10:04 +0000 (20:10 +0200)]
Aggregate-dialog: Preselect summary function and variable name.
Apparently the most common use of aggregate is to count cases.
Therefore we set the default summary function and variable
name controls, so that the user has fewer keystrokes/mouse
clicks in order to achieve this.
John Darrington [Sun, 8 Aug 2010 09:39:16 +0000 (11:39 +0200)]
Aggregate: Fixed bug when attempting to create duplicate variable
This change fixes a segfault which occured if AGGREGATE MODE=ADDVARIABLES
attempted to create a variable which already exists in the dictionary.
Added a test to check for this bug.
John Darrington [Sat, 31 Jul 2010 09:55:18 +0000 (11:55 +0200)]
FACTOR: prevent crash if the dataset is empty.
The FACTOR command crashed if there were no cases
which had non-missing values for all variables.
This change emits a warning in this case and does
no analysis.
John Darrington [Fri, 30 Jul 2010 21:41:01 +0000 (23:41 +0200)]
Deallocate memory from pool using the correct function
Memory allocated using pool_alloc was being deallocated using
the standard free function instead of pool_free. This change
fixes that. Thanks to Andras Muranyi for reporting this problem.
John Darrington [Fri, 30 Jul 2010 17:49:03 +0000 (19:49 +0200)]
Flush the journal after every write.
Unexpected bugs in the parser, engine or in procedures can cause crashes
in the GUI. If the journal is not flushed *before* running the syntax, then
no record of that syntax exists, and the bug can be hard to reproduce.
This change ensures that the syntax is written to the journal before it is
processed.
Ben Pfaff [Fri, 30 Jul 2010 05:08:33 +0000 (22:08 -0700)]
temp-file: New functions for creating temporary files honoring $TMPDIR.
The tmpfile() function is useful, but it doesn't necessarily honor
the $TMPDIR environment variable. Some of our users find that a problem,
so this commit replaces tmpfile() usage by a new pair of functions
create_temp_file() and close_temp_file() that do honor $TMPDIR.
John Darrington [Wed, 28 Jul 2010 14:32:00 +0000 (16:32 +0200)]
AGGREGATE: New file aggregate.h containing the summary function specifications
Added a header file containing the declaration and type of the agr_func_tab
table, and expanded that type to contain a description of the function and
an explicit declaration of whether a source variable is permitted/needed.
This change is primarily for the benefit of the forthcoming dialog box for
the aggregate command. However it also (in my opinion) makes the existing
implementation a little easier to understand.
Ben Pfaff [Tue, 29 Jun 2010 23:59:42 +0000 (16:59 -0700)]
cairo: Fix handling of font sizes.
Until now this code used pango_font_description_set_absolute_size() to set
the font size. This sets the font size in device units, e.g. pixels on a
display. But font sizes are actual specified by the user in points, so
we should instead use pango_font_description_get_size(). This commit
makes that change.
That change is simple, but it necessitates a larger change.
Until now the cairo driver has just assumed that the size of a font is
the size that we assigned it. But this is no longer the case, since
points and pixels are now different. So now we measure the actual width
and height of characters and use those as the font size. At the same
time, the code no longer ignores font sizes included as part of font
description strings, and allows different fonts to have different sizes.
Ben Pfaff [Wed, 23 Jun 2010 05:36:57 +0000 (22:36 -0700)]
cairo: Remove support for printed headers.
The printed headers on each page do not very attractive, and the
information that they contain by default is not very useful. Because an
upcoming commit makes them harder to properly implement, simply remove
them for now.
With this commit, the cairo driver no longer prints titles and subtitles
at all. This needs to be fixed.
Ben Pfaff [Sat, 26 Jun 2010 19:28:28 +0000 (12:28 -0700)]
output: Fix logic error in table_select_slice().
z1 is a row or column number, not a count of header rows or columns, so it
only makes sense to compare it against another row or column number, not
against a count of rows or columns.
Ben Pfaff [Sat, 26 Jun 2010 17:19:39 +0000 (10:19 -0700)]
Revert unintended change to tests_libpspp_str_test_LDADD.
When I was preparing the previous commit I tested a change to
tests_libpspp_str_test_LDADD and then (I thought) reverted it. But my
revert actually changed the order. Oops.
John Darrington reports that the new order causes link problems for him, so
I'm putting the order back to the original, with this commit.
Ben Pfaff [Sat, 26 Jun 2010 04:33:18 +0000 (21:33 -0700)]
Avoid redundant linking against libtool convenience libraries.
Both libpspp.la and libpspp-core.la linked directly against libgl.la, and
the UI linked against both libpspp.la and libpspp-core.la. This works fine
on ELF systems, but with Mach-O on Mac OS X it silently causes duplicate
symbols at runtime. In particular there are two different copies of
rpl_optarg from libgl.la. Different code sees different copies of these,
which causes a segfault at runtime whenever anyone invokes pspp with an
option that takes an argument.
Reported by Jeremy Lavergne <jeremy@lavergne.gotdns.org>, with debugging
assistance by Jeremy and by John Darrington.
Ben Pfaff [Thu, 17 Jun 2010 03:28:29 +0000 (20:28 -0700)]
README.Git: Upgrade to latest Gnulib.
In particular this incorporates commit 39bdc0a99 "strtod: Stop using
AC_FUNC_STRTOD", which should fix problems with the strtod() replacement
when cross-compiling to Mingw. For more information, see the thread at
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/22091 and PSPP bug
#29965.
Ben Pfaff [Wed, 16 Jun 2010 04:29:50 +0000 (21:29 -0700)]
psppire: Re-implement --help and --version options.
Commit f51ecb4802 "Greatly simplify PSPP configuration." accidentally
removed PSPPIRE support for the --help and --version options. This commit
restores it (and improves upon the text previously displayed).
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.