Ben Pfaff [Sat, 25 Sep 2010 21:27:10 +0000 (14:27 -0700)]
llx: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 21:24:47 +0000 (14:24 -0700)]
ll: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 21:14:44 +0000 (14:14 -0700)]
hmapx: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 21:07:13 +0000 (14:07 -0700)]
hmap: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 19:38:29 +0000 (12:38 -0700)]
heap: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 19:32:39 +0000 (12:32 -0700)]
bt: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 04:42:02 +0000 (21:42 -0700)]
abt: Convert tests to use Autotest.
John Darrington [Sat, 25 Sep 2010 11:18:04 +0000 (13:18 +0200)]
Update to latest Gnulib
John Darrington [Sat, 25 Sep 2010 09:43:23 +0000 (11:43 +0200)]
Created an additional i18n test
John Darrington [Thu, 23 Sep 2010 19:20:59 +0000 (21:20 +0200)]
tests_check target depends upon check_PROGRAMS
Ben Pfaff [Fri, 24 Sep 2010 04:03:36 +0000 (21:03 -0700)]
data-in: Get rid of first_column, last_column arguments.
Most callers can't provide this arguments, and so in the interest of
making the data_in() interface simpler, it seems better to put the
callers in charge of dealing with error messages, since they better
know their own context.
Ben Pfaff [Mon, 20 Sep 2010 04:36:58 +0000 (21:36 -0700)]
data-in: Make data_in() parameters more uniform.
data_in() essentially takes an input encoding and an output encoding but
the parameters were in inconsistent order, inconsistently named, and had
inconsistent types. This commit changes all that to, I hope, be easier to
understand.
Ben Pfaff [Fri, 24 Sep 2010 03:56:50 +0000 (20:56 -0700)]
data-in: Rewrite logic for recoding input, and get rid of src_enc member.
The logic used here seemed actually wrong for non-binary numeric formats
and AHEX format: we want these translated into the native encoding so that
we can interpret digits and letters properly without additional work.
The only case where we care about the output encoding is A format.
Ben Pfaff [Mon, 20 Sep 2010 03:55:06 +0000 (20:55 -0700)]
data-in: Eliminate "implied_decimals" parameter from data_in().
This parameter is usually 0, so break out the associated functionality into
a new function that callers can use if they really need it.
Ben Pfaff [Sat, 18 Sep 2010 00:10:44 +0000 (17:10 -0700)]
calendar: Use sensible error reporting in calendar_gregorian_to_offset().
Ben Pfaff [Sun, 19 Sep 2010 18:07:09 +0000 (11:07 -0700)]
message: Add column range to struct msg_locator.
data_in() can specify a range of columns for the messages that it outputs,
but until now these were not output in the format specified by the GNU
Coding Standards. This commit fixes that.
Ben Pfaff [Sun, 19 Sep 2010 18:04:41 +0000 (11:04 -0700)]
message: Consistently initialize locator; use 0 for "no line number".
A few of the callers of msg_emit() did not initialize the "where" member
of the struct msg, because they expect that msg_emit() will do it for them.
This is currently correct, but I intend to soon introduce the ability for
msg_emit()'s caller to specify a location. With that change, it will be
important for the caller to initialize this member, so this commit makes
sure of that.
At the same time, some callers were using -1 as the default value that
means "no line number" and others were using 0. This commit standardizes
on the latter.
Ben Pfaff [Mon, 19 Jul 2010 04:12:10 +0000 (21:12 -0700)]
command: Add specific DATASET unimplemented commands.
Ben Pfaff [Sun, 18 Jul 2010 21:57:02 +0000 (14:57 -0700)]
command: Remove superfluous trailing spaces from command names.
These spaces made user messages look a little funny but they were otherwise
harmless.
Ben Pfaff [Sun, 18 Jul 2010 21:55:55 +0000 (14:55 -0700)]
command: Remove INSERT from list of unimplemented commands.
This command is implemented, so this was a duplicate entry.
Ben Pfaff [Sun, 12 Sep 2010 21:05:36 +0000 (14:05 -0700)]
lexer: Use lex_is_string() more consistently.
The lexer has this function, so we might as well use it consistently.
Ben Pfaff [Mon, 12 Jul 2010 05:04:17 +0000 (22:04 -0700)]
lexer: Remove DUMP_TOKENS debugging feature.
This feature is not very useful anymore. I have not used it in years.
Ben Pfaff [Sat, 11 Sep 2010 20:54:25 +0000 (13:54 -0700)]
lexer: Improve translatability of lex_error().
In general I believe that it is easier to translate full sentences or
clauses. It seems likely that "Syntax error %s at %s." where the first
%s is an arbitrary English phrase would be impossible to translate
grammatically into some languages, so this changes the general form to
"Syntax error at %s: %s." which seems more likely to be translatable while
not changing the English meaning.
Ben Pfaff [Fri, 17 Sep 2010 03:59:13 +0000 (20:59 -0700)]
Make translation easier.
Many of the invocations of lex_error() were easy to rephrase to be more
easily translated, or to rewrite as calls to other functions.
Ben Pfaff [Tue, 6 Jul 2010 23:17:19 +0000 (16:17 -0700)]
HOST: Use more modern syntax.
An old SPSS paper manual I have describes the syntax that PSPP
implemented for HOST up until this commit, but newer versions
describe the syntax that this commit adopts.
Ben Pfaff [Sun, 12 Sep 2010 21:06:55 +0000 (14:06 -0700)]
AGGREGATE: Simplify code.
ds_chomp() returns whether it trimmed off a character, and we might as well
use that instead of doing a redundant check.
Ben Pfaff [Sun, 12 Sep 2010 21:05:59 +0000 (14:05 -0700)]
PERMISSIONS: Add missing check for string token.
Ben Pfaff [Fri, 17 Sep 2010 23:50:44 +0000 (16:50 -0700)]
syntax-string-source: Fix format string problems.
create_syntax_string_source() treated its argument as a printf-style format
string but wasn't annotated properly. Most of the callers did not pass
string literals and were not escaped, so change it not to format its string
and add a new function create_syntax_format_source() with the previous
behavior.
Ben Pfaff [Fri, 24 Sep 2010 03:45:28 +0000 (20:45 -0700)]
i18n: New function recode_substring_pool().
Occasionally it is necessary to recode a string that might contain a null
byte. This function is useful in such a case.
Ben Pfaff [Fri, 24 Sep 2010 03:40:03 +0000 (20:40 -0700)]
i18n: Use UTF8 macro instead of "UTF8" literal string.
I think that this was just a typo.
Ben Pfaff [Sat, 11 Sep 2010 04:07:00 +0000 (21:07 -0700)]
str: Make ss_alloc_substring() allocate null-terminated strings.
This has little cost and it is occasionally valuable.
Ben Pfaff [Fri, 24 Sep 2010 03:18:01 +0000 (20:18 -0700)]
cast: New macro NULL_SENTINEL.
Ben Pfaff [Mon, 20 Sep 2010 03:55:46 +0000 (20:55 -0700)]
RECODE: Suppress warning about conversion using CHAR_CAST_BUG.
Ben Pfaff [Wed, 22 Sep 2010 05:00:53 +0000 (22:00 -0700)]
tests: Remove unnecessary mention of header files from automake.mk.
These header files don't need to be listed. They just clutter up the
makefile.
Ben Pfaff [Wed, 22 Sep 2010 05:00:13 +0000 (22:00 -0700)]
i18n: Add simple tests.
Ben Pfaff [Tue, 21 Sep 2010 05:42:17 +0000 (22:42 -0700)]
i18n: Handle EINVAL more gracefully.
EINVAL indicates an invalid multibyte sequence at the end of buffer. It
seems to me that there is no point in swallowing up a single byte and going
on at that point; instead, one might as well just declare the conversion
done after adding the fallback character. This is what this commit does.
Ben Pfaff [Tue, 21 Sep 2010 05:40:43 +0000 (22:40 -0700)]
i18n: Refactor for simplicity.
It seems to me that recode_string_pool() is better implemented as a retry
loop around a simpler core. This commit implements that.
Ben Pfaff [Tue, 21 Sep 2010 05:15:38 +0000 (22:15 -0700)]
i18n: Properly restart conversion when output buffer overflows.
The E2BIG case tries to restart the whole conversion, by reinitializing
all variables to their initial states. However the value of 'text' might
already have been advanced somewhat if there was a previous loop for e.g.
an invalid character. This commit fixes the problem by keeping the
original 'text' around and using a moving input pointer instead.
Ben Pfaff [Tue, 21 Sep 2010 05:05:08 +0000 (22:05 -0700)]
i18n: Ensure that every recoding starts from the initial shift state.
Ben Pfaff [Tue, 21 Sep 2010 04:50:21 +0000 (21:50 -0700)]
i18n: Avoid memory leak when create_iconv() fails.
Ben Pfaff [Tue, 21 Sep 2010 04:41:02 +0000 (21:41 -0700)]
i18n: Lightly reformat comments to better resemble other files.
John Darrington [Sun, 19 Sep 2010 16:30:39 +0000 (18:30 +0200)]
Fix bug #31052: Crash on histograms with only one datum
John Darrington [Sun, 19 Sep 2010 14:36:57 +0000 (16:36 +0200)]
Const casts.
Removed some unnecessary casts. Changed some others to use the
macros from src/libpspp/cast.h instead of literal casts.
John Darrington [Sat, 18 Sep 2010 14:54:31 +0000 (16:54 +0200)]
Fix outstanding quote style issues
John Darrington [Sat, 18 Sep 2010 14:26:15 +0000 (16:26 +0200)]
Remove gettext markup from diagnostic string.
Markin a debug string for translattion just puts unnecessary
load on the translators.
John Darrington [Thu, 16 Sep 2010 16:11:17 +0000 (18:11 +0200)]
FLIP: Don't change new variables to upper case.
This was a legacy from the days when variables could only
be upper case.
Ben Pfaff [Sat, 18 Sep 2010 04:25:19 +0000 (21:25 -0700)]
linreg: Delete unused static function.
This function drew attention to itself through a warning about a missing
return type, but it isn't used so just delete it instead of adding a
return type
Ben Pfaff [Sat, 18 Sep 2010 04:17:43 +0000 (21:17 -0700)]
ONEWAY: Fix declaration-after-statement warning.
C90 requires declarations to precede statements within a block.
Ben Pfaff [Sat, 18 Sep 2010 04:03:57 +0000 (21:03 -0700)]
Suppress warnings about conversions between char * and unsigned char *.
For some time PSPP has used "unsigned char *" for string data and "char *"
for most other strings. Transforming between these properly generally
involves recoding, and there are some places where this is possibly
missing. The usual way to "fix" these warnings would be to insert casts,
but this would not fix the problem, just suppress the warnings, and it is
difficult to "grep" for casts so they would be hard to find for fixing
later.
This commit doesn't actually fix the problems, but it does suppress the
warnings while making them easy to find later: just grep for CHAR_CAST_BUG.
Ben Pfaff [Sat, 18 Sep 2010 03:52:56 +0000 (20:52 -0700)]
build-aux: Add generated files to .gitignore.
John Darrington [Thu, 16 Sep 2010 13:21:54 +0000 (15:21 +0200)]
Update string comparision in perl module test
John Darrington [Wed, 15 Sep 2010 13:21:18 +0000 (15:21 +0200)]
Update en_GB localisation
John Darrington [Wed, 15 Sep 2010 12:53:41 +0000 (14:53 +0200)]
Consolidate quoting style in printed strings.
The GNU coding standards say to use `xxxx' for quoted
strings. Previously we've been using a mixture of that style
and "xxxx". This change substitutes all instances of the latter
with the former.
John Darrington [Tue, 14 Sep 2010 14:59:40 +0000 (16:59 +0200)]
Translate the names of aggretation functions. Fixes bug #31035
John Darrington [Sun, 12 Sep 2010 15:58:05 +0000 (17:58 +0200)]
Syntax Window: Don't connect callbacks until all members are initialised.
John Darrington [Sat, 11 Sep 2010 16:48:07 +0000 (18:48 +0200)]
Rename compare_string --> compare_string_3way
John Darrington [Sat, 11 Sep 2010 08:26:05 +0000 (10:26 +0200)]
Prevent critical when closing output viewer
John Darrington [Sat, 11 Sep 2010 06:25:52 +0000 (08:25 +0200)]
Autorecode: /GROUP vs. heterogenous strings.
Fixed a crash which occured when the /GROUP
subcommand was used with string variables of
differing widths.
John Darrington [Thu, 9 Sep 2010 17:08:50 +0000 (19:08 +0200)]
Autorecode: Add the /GROUP subcommand
John Darrington [Mon, 6 Sep 2010 13:07:42 +0000 (15:07 +0200)]
Fixed bug #30969: Crash in split file dialog box
John Darrington [Mon, 6 Sep 2010 12:30:17 +0000 (14:30 +0200)]
Seperate the GtkBuilder definition for Split into its own file.
John Darrington [Sun, 5 Sep 2010 12:16:58 +0000 (14:16 +0200)]
Autorecode: Add value labels indicating the source values.
Autorecode now creates value labels on the new variable to
indicate from which values the new values originate.
Fixes bug #30943
John Darrington [Sun, 5 Sep 2010 12:12:38 +0000 (14:12 +0200)]
Remove obsolete comments.
Value labels are no longer limited to short string
variables. So these comments are no longer relevant.
Michel Boaventura [Sat, 4 Sep 2010 00:02:13 +0000 (21:02 -0300)]
Change charset from html output to utf-8
Ben Pfaff [Sun, 29 Aug 2010 22:17:11 +0000 (15:17 -0700)]
Implement the PRESERVE and RESTORE commands.
Ben Pfaff [Sun, 29 Aug 2010 21:55:41 +0000 (14:55 -0700)]
settings: Avoid using a pointer and global data for algorithms.
Until now the difference between the current and global settings for
the algorithms in uses has been maintained as two values plus a pointer
to the setting actually in use. Using global data like that makes it
harder to save and restore settings, so this commit adopt an alternate
method that avoids using global data or pointers.
Ben Pfaff [Sun, 29 Aug 2010 18:37:19 +0000 (11:37 -0700)]
settings: Make viewwidth, viewlength "int"s instead of pointers.
I don't recall exactly why these were pointers any longer, but it doesn't
seem to be necessary any longer. It is more straightforward if they are
just stored in the same way as the other settings.
Ben Pfaff [Sun, 29 Aug 2010 03:38:18 +0000 (20:38 -0700)]
settings: Reformat the_settings initializer.
I find this formatting easier to read.
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).