John Darrington [Sun, 8 Apr 2012 15:59:10 +0000 (17:59 +0200)]
Remove KMO and Bartlett statistics from bug check test.
Commit
6b351b28f47c1dfb1ce697eb50cd218b50122fd0 added a test for a bug
fix. This test however included a display of a the KMO and Bartlett
test statistics, which in this case are unstable since the determinant
of the correlation matrix is close to zero. These statistic are not
relevant to the bug being tested. So this change removes them.
John Darrington [Wed, 4 Apr 2012 23:06:29 +0000 (01:06 +0200)]
Documentation: Yet more markup
Ben Pfaff [Wed, 4 Apr 2012 04:57:18 +0000 (21:57 -0700)]
FACTOR: Fix crash with /ROTATION=NOROTATE.
Reported by abderrahim arif <arifabderrahim5@gmail.com>
at http://lists.gnu.org/archive/html/bug-gnu-pspp/2012-04/msg00001.html
Ben Pfaff [Wed, 4 Apr 2012 04:14:03 +0000 (21:14 -0700)]
spreadlevel-plot: Fix missing #include <stdlib.h>
Reported by GCC:
spreadlevel-plot.c: In function ‘spreadlevel_plot_chart_destroy’:
spreadlevel-plot.c:84: error: implicit declaration of function
‘free’
preadlevel-plot.c:84: error: incompatible implicit declaration of
built-in function ‘free’
John Darrington [Sun, 1 Apr 2012 08:34:28 +0000 (10:34 +0200)]
Text Importer: Added filter to the file chooser.
Added a FileChooserFilter to the file chooser for importing text files.
Closes bug #36054
John Darrington [Sun, 1 Apr 2012 07:15:26 +0000 (09:15 +0200)]
Corrected bug in chart rendering which caused the ordinate label to never get displayed
John Darrington [Sat, 31 Mar 2012 20:14:11 +0000 (22:14 +0200)]
Correct typo in examine.ui
John Darrington [Sat, 31 Mar 2012 15:06:52 +0000 (17:06 +0200)]
Examine: Added the /PLOT=SPREADLEVEL option
John Darrington [Sat, 31 Mar 2012 08:21:02 +0000 (10:21 +0200)]
examine.c: Fix a seg fault which caused a crash when recovering from bad syntax
John Darrington [Sat, 31 Mar 2012 06:41:27 +0000 (08:41 +0200)]
Explore Dialog: Replace add hoc functions with the new DialogAction class
John Darrington [Thu, 29 Mar 2012 20:12:46 +0000 (22:12 +0200)]
Documentation: More markup
John Darrington [Wed, 28 Mar 2012 20:36:55 +0000 (22:36 +0200)]
Documentation: New markup for subcommands
John Darrington [Wed, 28 Mar 2012 19:18:18 +0000 (21:18 +0200)]
Documentation: Add a @pspp macro
John Darrington [Tue, 27 Mar 2012 19:28:27 +0000 (21:28 +0200)]
Histograms: Fix the alignment case where little slack exists on either side of the data
John Darrington [Tue, 27 Mar 2012 01:46:08 +0000 (03:46 +0200)]
Correct errors in histogram geometry calcs and add test
John Darrington [Mon, 26 Mar 2012 19:47:41 +0000 (21:47 +0200)]
Fix crash on datasets with single values (again)
John Darrington [Mon, 26 Mar 2012 02:56:38 +0000 (04:56 +0200)]
Readjust histogram parameters if on the first attempt, the number of bins is too large
John Darrington [Mon, 26 Mar 2012 01:18:40 +0000 (03:18 +0200)]
Histograms: Improve the code calculating the bin ranges and comment
John Darrington [Sun, 25 Mar 2012 23:30:56 +0000 (01:30 +0200)]
Simplify algebra
John Darrington [Sun, 25 Mar 2012 22:37:07 +0000 (00:37 +0200)]
xrchart_write_scale: Use integer arithmetic
John Darrington [Sun, 25 Mar 2012 21:30:26 +0000 (23:30 +0200)]
Examine: Print extreme values using the print format of the variable
John Darrington [Mon, 26 Mar 2012 00:52:18 +0000 (01:52 +0100)]
Histogram calculations: Use integer arithmetic
There is no advantage in using floating point numbers in this code.
John Darrington [Sun, 25 Mar 2012 23:55:39 +0000 (00:55 +0100)]
Boxplot: Remove function boxplot_draw_yscale
An identical function exists in a lower level, so use that instead.
John Darrington [Sun, 25 Mar 2012 10:10:53 +0000 (12:10 +0200)]
Histogram plotting: (hist_draw_bar) Added label argument.
Added a boolean argument to indicate whether or not a histogram bar
should be labelled. Labelling every bar leads to overprinted and
hence illegible labels.
John Darrington [Sun, 25 Mar 2012 08:47:27 +0000 (10:47 +0200)]
Histograms: Put hard limit on the number of histogram bins
Histograms with less than one bin are not useful (and tend to cause crashes!)
Histograms with very large numbers of bins are also of little use, and cause
other implementation headaches.
John Darrington [Sun, 25 Mar 2012 07:45:57 +0000 (09:45 +0200)]
Cairo charts: Move check for near zero values to inside of draw_tick
John Darrington [Sun, 25 Mar 2012 07:18:54 +0000 (09:18 +0200)]
Whitespace changes only
John Darrington [Sun, 25 Mar 2012 07:14:39 +0000 (09:14 +0200)]
Fix a crashes where histograms of a single datum were trying to be created.
Reported-by: Ben Pfaff.
John Darrington [Sat, 24 Mar 2012 14:51:40 +0000 (15:51 +0100)]
Fixed yet another problem caused by use of abs where fabs is appropriate
John Darrington [Sat, 24 Mar 2012 12:55:08 +0000 (13:55 +0100)]
Mark histogram legend strings for translation
John Darrington [Sat, 24 Mar 2012 09:10:19 +0000 (10:10 +0100)]
Avoid floating point precision problems in chart scale
Some charts were being drawn with a tick mark at positions
close to but not exactly zero Eg: 2.
187433298e-27
This change avoids this problem.
John Darrington [Sat, 24 Mar 2012 08:53:49 +0000 (09:53 +0100)]
cairo-chart.c: new struct xrchart_axis
This allows a bit of refactoring.
John Darrington [Sat, 24 Mar 2012 06:42:51 +0000 (07:42 +0100)]
Histograms: Ensure that the bins are aligned to an odd number of half bin widths
This has the benefit that the centres of the bins are aligned to integer multiples
of bin widths, and thus the labels are shorter. For example, instead of labels
-1.5 -0.5 0.5 1.5 2.5 we get -2 -1 0 1 2 which is more aesthetically pleasing.
John Darrington [Fri, 23 Mar 2012 21:28:37 +0000 (22:28 +0100)]
Corrected previous commit
John Darrington [Fri, 23 Mar 2012 10:15:11 +0000 (11:15 +0100)]
chart_rounded_tick: Avoid arithmetic problems with inputs close to zero
John Darrington [Fri, 23 Mar 2012 07:48:33 +0000 (08:48 +0100)]
Update the BUGS chapter in the manual
John Darrington [Fri, 23 Mar 2012 07:26:31 +0000 (08:26 +0100)]
Updated the documentation for EXAMINE
John Darrington [Thu, 22 Mar 2012 21:00:01 +0000 (22:00 +0100)]
Improve the way in which histogram bin ranges are chosen
John Darrington [Thu, 22 Mar 2012 09:56:01 +0000 (10:56 +0100)]
EXAMINE: Allow the /ID subcommand to take a non-numeric variable
John Darrington [Tue, 20 Mar 2012 18:49:05 +0000 (19:49 +0100)]
Correct geometrical error plotting histograms
John Darrington [Tue, 20 Mar 2012 18:03:09 +0000 (19:03 +0100)]
histogram.c: histogram_create now takes bin width instead of the number of bins
John Darrington [Tue, 20 Mar 2012 17:33:13 +0000 (18:33 +0100)]
NEWS: Mention changes to EXAMINE
Ben Pfaff [Mon, 19 Mar 2012 04:40:49 +0000 (21:40 -0700)]
sort: Allocate space for sort buffers on demand, not in advance.
Each call to sort_create_writer() was allocating possibly a very
large amount of memory when in many cases only a small fraction of
that memory would actually be used. This commit switches to
allocating a small amount of memory and gradually increasing the
allocation on demand.
Reported by John Darrington.
Bug #35887.
John Darrington [Sun, 18 Mar 2012 21:20:11 +0000 (22:20 +0100)]
Relax NPAR SIGN test
John Darrington [Sun, 18 Mar 2012 21:03:33 +0000 (22:03 +0100)]
Improve translator comments.
Apparently some of the TRANSLATOR comments were not clear enough. This
change makes it less easy for translators to become confused.
John Darrington [Sun, 18 Mar 2012 07:56:10 +0000 (08:56 +0100)]
Fix compiler warnings
John Darrington [Sun, 18 Mar 2012 07:32:58 +0000 (08:32 +0100)]
Whitespace changes only
John Darrington [Sun, 18 Mar 2012 07:28:57 +0000 (08:28 +0100)]
examine.c: Rename xxx0 and xxx1 to something more sensible
Ben Pfaff [Sat, 17 Mar 2012 19:07:53 +0000 (12:07 -0700)]
ods-reader: Fix memory leak.
Found by valgrind.
John Darrington [Sat, 17 Mar 2012 12:09:50 +0000 (13:09 +0100)]
Fix memory leaks in the new EXAMINE implementation.
John Darrington [Fri, 16 Mar 2012 19:37:21 +0000 (20:37 +0100)]
EXAMINE: Complete re-implementation
This change is a complete re-implementation of the EXAMINE command.
It includes a few minor changes to the tests, to accommodate slight
changes in semantics (to bring it in line with other software).
Closes bug #30732
John Darrington [Fri, 16 Mar 2012 18:00:22 +0000 (19:00 +0100)]
order_stats: New function order_state_accumulate_idx
John Darrington [Fri, 16 Mar 2012 13:43:06 +0000 (14:43 +0100)]
Categoricals: Dont crash when getting non-existant user data
Ben Pfaff [Thu, 15 Mar 2012 05:05:54 +0000 (22:05 -0700)]
ods-reader: Fix write beyond end of buffer.
The compiler multiplies by sizeof *var_spec for us here, so doing
it ourselves writes past the end of the allocated space.
Tracked down with valgrind.
Reported-by: bojo42 <bojo42@gmail.com>
John Darrington [Tue, 13 Mar 2012 09:40:51 +0000 (10:40 +0100)]
math/np.c: Change np_create to take 3 doubles rather than a struct moment1*
John Darrington [Wed, 14 Mar 2012 18:56:30 +0000 (19:56 +0100)]
Recode Dialog: Stringify the variable label
Ensure that the generated syntax has quotes around the variable label,
in case the label happens to contain spaces or other metacharacters.
John Darrington [Wed, 14 Mar 2012 18:42:49 +0000 (19:42 +0100)]
Fix GtkCritical in recode dialog.
Commit
2b4fb7e846d62f1a70656bb42a0f769363ed0832 changed the internals of PsppireVarView.
Unfortunately recode-dialog.c was directly accessing the implementation instead of
using the interface. This change fixes that.
Reported-by: kai hansen <kaiowesen@gmail.com>
Ben Pfaff [Wed, 14 Mar 2012 05:11:49 +0000 (22:11 -0700)]
po: Update French translation from translationproject.org.
John Darrington [Sun, 11 Mar 2012 18:00:18 +0000 (19:00 +0100)]
Regression: Fix bug where missing values in the dependent variable were not getting ignored.
Fixes bug #35758
Ben Pfaff [Sun, 11 Mar 2012 00:40:53 +0000 (16:40 -0800)]
psppire-output-window: Use fallback PATH_MAX on GNU/Hurd.
This fallback is from lib/clean-temp.c in Gnulib.
John Darrington [Sat, 3 Mar 2012 11:20:45 +0000 (12:20 +0100)]
interaction.c: interaction_dump: don't crash on empty interactions (ie those with no variables)
John Darrington [Sat, 3 Mar 2012 11:12:54 +0000 (12:12 +0100)]
Remove unnecessary #include
John Darrington [Sat, 3 Mar 2012 11:05:17 +0000 (12:05 +0100)]
moments.c: Implement calc_semean.
This function was always declared, but never implemented. It's fairly
trivial, but for consistency it makes sense to have here.
John Darrington [Sat, 3 Mar 2012 10:56:47 +0000 (11:56 +0100)]
oneway.c: Set destroy pointer to NULL, since it is unused here
John Darrington [Sat, 3 Mar 2012 10:49:22 +0000 (11:49 +0100)]
Categoricals.c: Call payload->destroy inside categoricals_done
John Darrington [Sat, 3 Mar 2012 10:40:44 +0000 (11:40 +0100)]
categoricals.c: Delete redundant function dump_interaction
Remove dump_interaction, since there is such a function in interaction.c
John Darrington [Sat, 3 Mar 2012 10:33:38 +0000 (11:33 +0100)]
Examine tests: Remove leading slash from factor variables.
I haven't seen any examples of syntax which does this, and it leads to
ambiguities: Does /STATISTICS refer to the STATISTICS subcommand or to
a factor variable named "STATISTICS". I think it's better therefore to
disallow a slash here.
Ben Pfaff [Sat, 3 Mar 2012 05:22:16 +0000 (21:22 -0800)]
pool: Use 16-byte alignment on 64-bit architectures.
glibc jmp_buf needs 16-byte alignment on ia64. PSPP allocates
jmp_buf inside a pool in a few places, so this change should fix
many tests on ia64.
Found by Debian autobuilder.
Ben Pfaff [Fri, 2 Mar 2012 07:11:22 +0000 (23:11 -0800)]
Sort attributes by name for display, to make order arch-independent.
When data file attributes or variable attributes were displayed by
e.g. DISPLAY ATTRIBUTES or SYSFILE INFO, they were sorted in hash
order, which varies by architecture. Therefore, the tests that
depended on this order failed on big-endian machines such as mips.
This commit fixes the problem by displaying attributes in sorted
order.
This fixes a failure in the "Perl copying system files" reported
by Debian buildds.
Ben Pfaff [Fri, 2 Mar 2012 06:32:42 +0000 (22:32 -0800)]
identifier: Apply isdigit() only to values in valid range.
Applying isdigit() to a value that is not EOF or in the range
0...UCHAR_MAX yields undefined behavior and in fact caused a
segfault on several Debian architectures for U+FFFD.
Found by "lexer properly reports scan errors" test on Debian buildds.
Ben Pfaff [Fri, 2 Mar 2012 06:12:15 +0000 (22:12 -0800)]
zip-writer: Add missing #include <byteswap.h>.
Fixes a broken build on Debian GNU/Linux, mips architecture.
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.
Ben Pfaff [Mon, 27 Feb 2012 00:14:05 +0000 (16:14 -0800)]
encoding-guesser: Remove spurious blank line.
John Darrington [Thu, 1 Mar 2012 20:48:09 +0000 (21:48 +0100)]
zip-writer.c: Fix incorrect big-endian handling.
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.
Ben Pfaff [Thu, 1 Mar 2012 06:46:40 +0000 (22:46 -0800)]
Updated the German translation from translationproject.org.
Ben Pfaff [Thu, 1 Mar 2012 06:46:03 +0000 (22:46 -0800)]
Updated the Lithuanian translation from translationproject.org.
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 [Tue, 28 Feb 2012 21:50:25 +0000 (22:50 +0100)]
zip-test.c: More thorough error messages
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.
John Darrington [Sun, 26 Feb 2012 17:17:13 +0000 (18:17 +0100)]
Remove translator credits from AUTHORS file.
This was getting hard to maintain, and is redundant, since there is
a "translator-credits" string in each translation.
John Darrington [Sat, 25 Feb 2012 13:59:14 +0000 (14:59 +0100)]
ascii.c: Reallocate the lines after the page is resized
John Darrington [Sat, 25 Feb 2012 13:28:20 +0000 (14:28 +0100)]
Remove redundant assignment
John Darrington [Sat, 25 Feb 2012 11:22:32 +0000 (12:22 +0100)]
ascii.c: Move auto out of the #if HAVE_DECL_SIGWINCH condtional
Whether or not the width/length should be automatic should depend only on whether the
output is a terminal, and not upon the existance of SIGWINCH
John Darrington [Sat, 25 Feb 2012 11:15:03 +0000 (12:15 +0100)]
ascii.c (ascii_reserve) Added assertion.
Added this assertion to catch a yet-to-be fixed array bounds bug.
Ben Pfaff [Sun, 26 Feb 2012 18:01:26 +0000 (10:01 -0800)]
po: Update Dutch translation from translationproject.org.
John Darrington [Sat, 25 Feb 2012 10:57:06 +0000 (11:57 +0100)]
Added SHOW options DIRECTORY, ENVIRONMENT, TEMPDIR and VERSION
John Darrington [Thu, 23 Feb 2012 19:07:27 +0000 (20:07 +0100)]
Fix bug #35532: Error setting PsppireDict predicate
John Darrington [Mon, 20 Feb 2012 08:14:13 +0000 (09:14 +0100)]
MEANS: plug memory leaks
John Darrington [Sun, 19 Feb 2012 18:26:23 +0000 (19:26 +0100)]
Attempt to cope with endian issues in zip reader.
John Darrington [Sun, 19 Feb 2012 08:48:31 +0000 (09:48 +0100)]
ODS Reader: fix uninitialised variables
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>
Ben Pfaff [Sat, 18 Feb 2012 19:01:11 +0000 (11:01 -0800)]
sys-file-reader: Avoid read past end of buffer.
The "unexpected label source in mrsets" test caused a read past the
end of the input buffer in text_parse_counted_string(). This fixes
the problem.
Found by Valgrind.
Reported-by: John Darrington <john@darrington.wattle.id.au>
Ben Pfaff [Sat, 18 Feb 2012 18:59:08 +0000 (10:59 -0800)]
tests: Avoid failure due to race to mkdir tests/valgrind.
Ben Pfaff [Sat, 18 Feb 2012 17:54:58 +0000 (09:54 -0800)]
categoricals: Mark dump_interaction() and categoricals_dump() UNUSED.
This avoids warnings that they are unused.
It might be better to just remove them, since they would still be
present in the Git history.
John Darrington [Sat, 18 Feb 2012 18:05:41 +0000 (19:05 +0100)]
Revert "Mark separator names for translation"
This reverts commit
02c89b93ff0b5942e66fdfbb7562641a0ff29d2c.
Ben pointed out that this change was incorrect.
John Darrington [Sat, 18 Feb 2012 13:36:23 +0000 (14:36 +0100)]
Remove erroneous case_unrefs. Found by valgrind
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 [Sat, 18 Feb 2012 11:12:46 +0000 (12:12 +0100)]
categoricals.c: Fix memory access problems on empty interactions.
Make sure the categoricals behave correctly when passed
an interaction which contains no variables (ie, no catagories).