Ben Pfaff [Sun, 29 Aug 2010 21:53:01 +0000 (14:53 -0700)]
format: Introduce a new type, struct fmt_settings.
Until now the collection of formatting styles have been poorly abstracted,
as an array. This commit introduces a new type, struct fmt_settings, that
represents all of the formatting styles currently in use.
Ben Pfaff [Sun, 29 Aug 2010 20:48:28 +0000 (13:48 -0700)]
format: Make fmt_number_style_init(), fmt_number_style_destroy() static.
These functions were not used outside format.c anyhow.
Ben Pfaff [Sun, 29 Aug 2010 19:37:48 +0000 (12:37 -0700)]
format: Remove prototypes of unimplemented functions.
Ben Pfaff [Sun, 29 Aug 2010 19:36:24 +0000 (12:36 -0700)]
format: Move is_fmt_type() prototype near more-related functions.
Ben Pfaff [Sun, 29 Aug 2010 18:54:36 +0000 (11:54 -0700)]
format: Remove declaration of data that is never used.
John Darrington [Sat, 28 Aug 2010 11:32:48 +0000 (13:32 +0200)]
Improved the syntax generated by the select-cases dialog
Closes bug #29604
John Darrington [Sat, 28 Aug 2010 11:24:12 +0000 (13:24 +0200)]
Allow translation of default filenames in GUI
John Darrington [Sat, 28 Aug 2010 11:09:49 +0000 (13:09 +0200)]
Allow translation of default variable name.
John Darrington [Tue, 24 Aug 2010 14:17:17 +0000 (16:17 +0200)]
Categoricals: Sort the reverse value map.
The /CONTRAST subcommand of the ONEWAY command
requires that the categorical values are sorted
in ascending order.
John Darrington [Mon, 23 Aug 2010 15:26:10 +0000 (17:26 +0200)]
Oneway: Fixed most compiler warnings
John Darrington [Mon, 23 Aug 2010 15:00:57 +0000 (17:00 +0200)]
Oneway: Fix problems with MISSING=ANALYSIS
John Darrington [Mon, 23 Aug 2010 14:45:27 +0000 (16:45 +0200)]
Categoricals: Use moments instead of keeping cc count ourselves
John Darrington [Sun, 15 Aug 2010 15:50:14 +0000 (17:50 +0200)]
oneway.c: Use the categoricals struct to calculate number of groups
John Darrington [Sun, 15 Aug 2010 15:14:10 +0000 (17:14 +0200)]
oneway: use new structures in the show_contrast_tests function
John Darrington [Sun, 15 Aug 2010 11:10:37 +0000 (13:10 +0200)]
oneway: Fix descriptives for multiple variables
John Darrington [Sat, 14 Aug 2010 17:49:51 +0000 (19:49 +0200)]
Add optional callback functions to categoricals.
Added callback functions to categoricals to enable
per category calculations to be done at the request
of the caller. This change also modifies oneway.c (show_descriptives)
to use this new feature. However at present it doesn't
work properly when multiple dependent variables are
specified.
John Darrington [Sat, 14 Aug 2010 15:09:59 +0000 (17:09 +0200)]
Constness
John Darrington [Sat, 14 Aug 2010 12:03:01 +0000 (14:03 +0200)]
Oneway: Remove group_stats from the show_homogeniety function
John Darrington [Sat, 14 Aug 2010 11:46:39 +0000 (13:46 +0200)]
Oneway: Remove group_values struct from show_contrast_coeffs
John Darrington [Sat, 14 Aug 2010 09:16:21 +0000 (11:16 +0200)]
Covariance matrix interface change.
covariance_2pass_create now takes a pointer to a
struct categoricals which must be created by the caller,
instead of creating this object for itself. This will
(hopefully) make the implementation of interactions and other
features easier.
John Darrington [Sat, 14 Aug 2010 08:06:23 +0000 (10:06 +0200)]
Oneway: Remove dict member from struct and add wv member
John Darrington [Fri, 13 Aug 2010 16:21:16 +0000 (18:21 +0200)]
Oneway: Use covariance matrix and sweep operator
Calculate the anova table using the routines from
src/math/covariance.c and lib/linreg/sweep.c instead
of the add hoc method. This change doesn't remove
all traces of the old method, since the data is still
needed for some subcommands. This will be the subject
of future changes.
John Darrington [Thu, 12 Aug 2010 19:12:30 +0000 (21:12 +0200)]
Oneway: Additional test case.
Add an explicit test for a oneway command run
on several different dependent variables.
John Darrington [Thu, 12 Aug 2010 16:13:26 +0000 (18:13 +0200)]
Oneway: Use lex_get_num instead of lex_parse_value.
Contrast coefficients can only be numeric, so parse_value
is an unnecessary generalisation.
John Darrington [Sun, 8 Aug 2010 11:20:46 +0000 (13:20 +0200)]
Constness
John Darrington [Sun, 8 Aug 2010 08:10:09 +0000 (10:10 +0200)]
Constness
John Darrington [Sun, 8 Aug 2010 08:02:32 +0000 (10:02 +0200)]
ONEWAY: seperate the command specification from the variables used in its calculation
John Darrington [Sun, 8 Aug 2010 07:33:19 +0000 (09:33 +0200)]
Categoricals.c Create entries for all groups.
Although for the purposes of creating a covariance matrix, only
n - 1 entries are needed, for other purposes (such as descriptive
statistics, contrasts, planned comparisons etc) all n entries are required.
(where n is the number of distinct values). This change updates
categories.c so that all n categories are generated. Covariance matrix
routines are free to ignore the ones not of interest.
John Darrington [Tue, 24 Aug 2010 12:46:37 +0000 (14:46 +0200)]
Syntax Window: Dynamically set paste sensitivity
Set the sensitivity of the paste action according to
whether there is anything to be pasted in the clipboard.
John Darrington [Mon, 23 Aug 2010 20:36:32 +0000 (22:36 +0200)]
Implemented Edit->Paste in the syntax viewer
Ben Pfaff [Mon, 16 Aug 2010 05:03:19 +0000 (22:03 -0700)]
format: Optimize fmt_from_io().
A "switch" statement should be much faster than a linear search.
Ben Pfaff [Mon, 16 Aug 2010 05:02:38 +0000 (22:02 -0700)]
format: Fix type code for Z format in system and portable files.
Z format is code 15, not 16 (which is N format).
John Darrington [Mon, 23 Aug 2010 17:30:10 +0000 (19:30 +0200)]
Syntax Window: Edit->* item sensitivity follows selection
Disable the Edit Cut/Copy/Delete menuitems by default
and enable them only when a selection is active.
John Darrington [Mon, 23 Aug 2010 16:57:31 +0000 (18:57 +0200)]
Implemented Cut, Copy and Delete in the syntax editor
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 [Sun, 22 Aug 2010 08:46:58 +0000 (10:46 +0200)]
Update tests to reflect string changes.
Commits
608b1765241e7c6f9bd5e86a8f81cf15edeb413b and
c1a56a1dd2afad462cf76d91c40aa064cc7dce04 changed some
output strings, but didn't update the tests to match.
This change makes that update.
John Darrington [Sat, 21 Aug 2010 10:53:51 +0000 (12:53 +0200)]
syntax-editor.ui cleanup
John Darrington [Sun, 8 Aug 2010 15:46:02 +0000 (17:46 +0200)]
Allow undo/redo of pasted text as a single item
John Darrington [Sat, 21 Aug 2010 09:48:05 +0000 (11:48 +0200)]
Text input dialog: Use widget-io
Use the widget_scanf function instead of manually
juxtaposing widgets. This makes life a lot easier
for translators.
John Darrington [Sat, 21 Aug 2010 08:37:02 +0000 (10:37 +0200)]
Canonicalise 2-tailed vs. 2-sided
John Darrington [Sat, 21 Aug 2010 08:35:32 +0000 (10:35 +0200)]
Consolidate printed strings
John Darrington [Sat, 21 Aug 2010 08:16:58 +0000 (10:16 +0200)]
Correct grammar in printed string
John Darrington [Fri, 20 Aug 2010 16:49:01 +0000 (18:49 +0200)]
file-handle-def.c: replace hash with hmap
John Darrington [Thu, 19 Aug 2010 15:09:02 +0000 (17:09 +0200)]
Fix translation of column headers in text import dialog.
The "Text" and "Line" column headers in the text import dialog were not being
translated. Thanks to Mindaugas embar@super.lt for reporting this.
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.
John Darrington [Wed, 11 Aug 2010 19:31:20 +0000 (21:31 +0200)]
correlations: Fix memory leak
Ben Pfaff [Mon, 9 Aug 2010 05:36:21 +0000 (22:36 -0700)]
tests: Ignore testsuite.at since it is now a generated file.
Ben Pfaff [Mon, 9 Aug 2010 05:34:11 +0000 (22:34 -0700)]
COUNT: Convert tests to use Autotest.
Ben Pfaff [Mon, 9 Aug 2010 05:34:48 +0000 (22:34 -0700)]
BEGIN DATA: Convert tests to use Autotest.
Ben Pfaff [Mon, 9 Aug 2010 05:16:05 +0000 (22:16 -0700)]
ADD FILES: Convert testsuite to use Autotest.
Ben Pfaff [Mon, 9 Aug 2010 05:35:37 +0000 (22:35 -0700)]
tests: Rewrite attributes tests to use Autotest.
Ben Pfaff [Sun, 8 Aug 2010 23:32:08 +0000 (16:32 -0700)]
SET: Add test to avoid regression on bug #30682.
Ben Pfaff [Sun, 8 Aug 2010 20:50:49 +0000 (13:50 -0700)]
Implement SAVE TRANSLATE to comma- and tab-delimited text formats.
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 [Fri, 6 Aug 2010 23:32:04 +0000 (16:32 -0700)]
DATA LIST: Don't report an error for an empty final field in LIST format.
Also add test to prevent inadvertent regressions.
Ben Pfaff [Sun, 8 Aug 2010 02:34:24 +0000 (19:34 -0700)]
DATA LIST: Fix output column reporting for FREE and LIST formats.
Also, add tests to prevent inadvertent regressions.
Ben Pfaff [Sun, 8 Aug 2010 01:42:07 +0000 (18:42 -0700)]
DATA LIST: Convert tests to use Autotest.
Ben Pfaff [Tue, 3 Aug 2010 05:41:19 +0000 (22:41 -0700)]
sys-file-writer: Consistently use "goto error" to exit.
Ben Pfaff [Tue, 3 Aug 2010 05:40:57 +0000 (22:40 -0700)]
sys-file-writer: Make write_error(), close_writer() static.
These functions were never meant to be public (and they were not declared
in a header file).
Ben Pfaff [Tue, 3 Aug 2010 05:11:57 +0000 (22:11 -0700)]
sys-file-writer: Fix comment.
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.
Ben Pfaff [Mon, 2 Aug 2010 04:19:50 +0000 (21:19 -0700)]
i18n: Make a few strings more generic for translators.
This should reduce the amount of work required by translators, by reducing
the number of unique strings to be translated.
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 13:48:41 +0000 (15:48 +0200)]
SET FORMAT: Flag an error if an invalid format is given.
Fixes bug #30682
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, 7 Aug 2010 15:18:53 +0000 (17:18 +0200)]
Aggregate dialog: Initialize HPane widget width on opening.
Set the HPane position to 50% of maximum, when the widget is
realized. Thanks to Fredrik Clementz for suggesting this.
John Darrington [Fri, 6 Aug 2010 18:19:16 +0000 (20:19 +0200)]
ONEWAY: Add explicit tests for the homogeneity and descriptives subcommands
John Darrington [Fri, 6 Aug 2010 17:06:40 +0000 (19:06 +0200)]
Migrate the tests for the ONEWAY command to autotest style
John Darrington [Fri, 6 Aug 2010 14:01:43 +0000 (16:01 +0200)]
Avoid duplicating the list of autotest files.
Reviewed by Ben Pfaff
John Darrington [Thu, 5 Aug 2010 15:07:42 +0000 (17:07 +0200)]
Replace oneway.q with a manually crafted oneway.c file
John Darrington [Thu, 5 Aug 2010 15:06:01 +0000 (17:06 +0200)]
Documentation: Add explanation of ONEWAY/MISSING
John Darrington [Sun, 1 Aug 2010 08:24:28 +0000 (10:24 +0200)]
Avoid compiler warning
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.
John Darrington [Fri, 30 Jul 2010 17:40:36 +0000 (19:40 +0200)]
Removed the gnulib modules which are being flagged as obsolete
Ben Pfaff [Fri, 30 Jul 2010 05:34:24 +0000 (22:34 -0700)]
AGGREGATE: Add .h file to Makefile (fixing "make distcheck").
Ben Pfaff [Fri, 30 Jul 2010 05:15:15 +0000 (22:15 -0700)]
FLIP: Convert tests to use Autotest.
Ben Pfaff [Fri, 30 Jul 2010 05:09:08 +0000 (22:09 -0700)]
make-file: Remove superfluous fflush().
Probably introduced during debugging and accidentally left in.
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.
Bug #30530.
Ben Pfaff [Fri, 30 Jul 2010 04:16:06 +0000 (21:16 -0700)]
temp-file: Rename "ext-array" (for "external array").
I want to introduce a new source module for general creation of temporary
files and this module's name conflicts.
John Darrington [Thu, 29 Jul 2010 16:15:59 +0000 (18:15 +0200)]
AGGREGATE: Fixed a bug with MEDIAN vs. MODE=ADDVARIABLES
John Darrington [Thu, 29 Jul 2010 14:35:56 +0000 (16:35 +0200)]
Added dialog box for the aggregate command
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.
John Darrington [Mon, 26 Jul 2010 13:16:03 +0000 (15:16 +0200)]
Remove URL from translatable string
John Darrington [Mon, 26 Jul 2010 12:34:58 +0000 (14:34 +0200)]
AGGREGATE: Add MODE=ADDVARIABLES subcommand.
Instead of replacing the current dataset with the aggregated
data, this subcommand appends newvariables to the data with the
aggregated values.
Jason H Stover [Sun, 25 Jul 2010 16:34:46 +0000 (12:34 -0400)]
Fix upper bound for subscript in ordered_cols.
John Darrington [Sat, 24 Jul 2010 16:21:15 +0000 (18:21 +0200)]
Fix memory leak in crosstabs
John Darrington [Sat, 24 Jul 2010 15:54:55 +0000 (17:54 +0200)]
Fix memory leak in MRSETS
John Darrington [Sat, 24 Jul 2010 14:37:00 +0000 (16:37 +0200)]
Avoid unused function warning
John Darrington [Tue, 20 Jul 2010 07:26:47 +0000 (09:26 +0200)]
Replaced relibility.q with relibility.c
Replaced the reliability autogenerated parser
with a handcrafted one.
Jason H Stover [Tue, 20 Jul 2010 22:32:35 +0000 (18:32 -0400)]
Add argument specifying column containing dependent variable.
John Darrington [Mon, 19 Jul 2010 18:47:05 +0000 (20:47 +0200)]
Delete file "means.q"
This file contained only the skeleton of the parser.
John Darrington [Mon, 19 Jul 2010 16:47:38 +0000 (18:47 +0200)]
Remove unnecessary include directives of hash.h
John Darrington [Sun, 18 Jul 2010 17:19:53 +0000 (19:19 +0200)]
Fix memory leak in data_in
John Darrington [Fri, 16 Jul 2010 20:53:18 +0000 (22:53 +0200)]
Reliability dialog: Add checkbox for summary subcommand
John Darrington [Fri, 16 Jul 2010 20:44:10 +0000 (22:44 +0200)]
add missing source file to glade support library
John Darrington [Fri, 16 Jul 2010 14:18:07 +0000 (16:18 +0200)]
Fix memory leak
John Darrington [Fri, 16 Jul 2010 13:42:40 +0000 (15:42 +0200)]
Remove const qualifiers from encoding converter components.
These elements have to be freed. Therefore const is not
appropriate.