John Darrington [Thu, 30 Sep 2010 19:49:34 +0000 (21:49 +0200)]
Fix memory leak in casegrouper. Closes bug #30764
John Darrington [Thu, 30 Sep 2010 08:59:05 +0000 (10:59 +0200)]
Fix memory leak in sweep.c
John Darrington [Thu, 30 Sep 2010 08:51:49 +0000 (10:51 +0200)]
Fix memory leak in output rendering
Ben Pfaff [Thu, 30 Sep 2010 04:44:36 +0000 (21:44 -0700)]
tests: Remove PG_CONFIG from TESTS_ENVIRONMENT.
This is no longer needed now that the PostgreSQL tests have been converted
to use Autotest.
Ben Pfaff [Thu, 30 Sep 2010 04:39:34 +0000 (21:39 -0700)]
LIST: Convert tests to use Autotest.
Ben Pfaff [Thu, 30 Sep 2010 04:31:43 +0000 (21:31 -0700)]
casereader: Fix casereader_select() with BY argument greater than 1.
This fixes the /CASES=BY subcommand on LIST. The following commit will add
a test.
Ben Pfaff [Thu, 30 Sep 2010 03:34:28 +0000 (20:34 -0700)]
DATA LIST: Convert tests for line-ends compatibility to use Autotest.
Ben Pfaff [Thu, 30 Sep 2010 03:30:24 +0000 (20:30 -0700)]
LAG: Convert tests to use Autotest.
John Darrington [Wed, 29 Sep 2010 20:02:28 +0000 (22:02 +0200)]
Replace glm with a new implementation.
The code is still not ready for use. It's awaiting
a working type 3 sum of squares.
John Darrington [Sun, 26 Sep 2010 10:13:35 +0000 (12:13 +0200)]
Disconnect clip signal handlers when a syntax window is destroyed
Ben Pfaff [Wed, 29 Sep 2010 04:32:25 +0000 (21:32 -0700)]
tests: Merge the four GET DATA /TYPE=PSQL tests into a single one.
This saves about 30 seconds on my laptop, so it seems worth it, even though
it combines tests that might better be separated.
Ben Pfaff [Wed, 29 Sep 2010 04:31:07 +0000 (21:31 -0700)]
tests: Fix typo in GET DATA /TYPE=TXT test.
Not capitalizing the at_ in AT_BANNER apparently just kept the banner
from appearing and didn't seem to cause other problems.
Ben Pfaff [Wed, 29 Sep 2010 04:30:20 +0000 (21:30 -0700)]
INSERT: Convert tests to use Autotest.
Ben Pfaff [Wed, 29 Sep 2010 04:19:59 +0000 (21:19 -0700)]
syntax-file: Open syntax files immediately, instead of delaying.
Until now, syntax files have been opened only when the first line needs to
be read. This commit changes behavior to open syntax files as soon as the
syntax file source is created.
This fixes the behavior INSERT CD=YES when a relative file path is
specified. Without this commit, INSERT checks that the file exists, then
it creates the syntax file source, then it chdirs into the syntax file's
directory, and then the syntax file source tries to open the file, which
fails because the relative path is no longer correct. With this commit,
the file gets opened before the chdir, so it succeeds.
The following commit will add a test to prevent regression.
Ben Pfaff [Wed, 29 Sep 2010 03:30:56 +0000 (20:30 -0700)]
tests: Fix distribution, by adding tests/testsuite.in to EXTRA_DIST.
Ben Pfaff [Tue, 28 Sep 2010 05:06:45 +0000 (22:06 -0700)]
tests: Convert IMPORT and EXPORT test to use Autotest.
Ben Pfaff [Tue, 28 Sep 2010 05:01:38 +0000 (22:01 -0700)]
tests: Convert GET DATA /TYPE=PSQL tests to use Autotest.
Ben Pfaff [Tue, 28 Sep 2010 04:55:17 +0000 (21:55 -0700)]
tests: Break get-data.at up into get-data-gnm.at and get-data-txt.at
Ben Pfaff [Tue, 28 Sep 2010 01:56:15 +0000 (18:56 -0700)]
DO REPEAT: Add test for missing END REPEAT.
Bug #31016.
Ben Pfaff [Tue, 28 Sep 2010 01:51:22 +0000 (18:51 -0700)]
lexer: Properly initialize lexer->prog when lex_get_line_raw() fails.
lex_get_line(), the main caller of lex_get_line_raw(), set lexer->prog to
NULL when reading failed, but other callers need to do the same thing too,
otherwise e.g. DO REPEAT accesses invalid storage when there is a missing
END REPEAT.
Bug #31016.
Ben Pfaff [Tue, 28 Sep 2010 01:49:25 +0000 (18:49 -0700)]
DO REPEAT: Report an error when END REPEAT is missing.
Bug #31016.
Ben Pfaff [Sun, 26 Sep 2010 05:25:16 +0000 (22:25 -0700)]
tests: Convert GET DATA /TYPE=GNM tests to use Autotest.
Ben Pfaff [Sun, 26 Sep 2010 03:55:24 +0000 (20:55 -0700)]
tests: Convert GET DATA /TYPE=TXT tests to use Autotest.
Ben Pfaff [Sun, 26 Sep 2010 03:23:09 +0000 (20:23 -0700)]
tests: Convert FILTER tests to use Autotest.
Ben Pfaff [Sun, 26 Sep 2010 02:46:35 +0000 (19:46 -0700)]
tests: Convert FILE HANDLE tests to use Autotest.
Ben Pfaff [Sun, 26 Sep 2010 02:42:09 +0000 (19:42 -0700)]
tests: Convert FILE LABEL, DOCUMENT, ADD DOCUMENT tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 23:56:06 +0000 (16:56 -0700)]
tests: Convert EXAMINE tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 23:38:27 +0000 (16:38 -0700)]
tests: Convert erase.sh test to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 23:33:01 +0000 (16:33 -0700)]
tests: Convert do-repeat.sh test to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 23:26:49 +0000 (16:26 -0700)]
tests: Convert do-if.sh test to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 23:20:58 +0000 (16:20 -0700)]
tests: Convert correlation.sh test to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 23:13:04 +0000 (16:13 -0700)]
tests: Convert bignum.sh test to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 22:55:16 +0000 (15:55 -0700)]
tower: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 22:45:35 +0000 (15:45 -0700)]
stringi-set: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 22:41:39 +0000 (15:41 -0700)]
string-set: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 22:37:02 +0000 (15:37 -0700)]
stringi-map: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 22:33:43 +0000 (15:33 -0700)]
string-map: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 22:17:10 +0000 (15:17 -0700)]
str: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 21:46:13 +0000 (14:46 -0700)]
sparse-array: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 21:34:46 +0000 (14:34 -0700)]
range-set: Convert tests to use Autotest.
Ben Pfaff [Sat, 25 Sep 2010 21:31:48 +0000 (14:31 -0700)]
range-map: Convert tests to use Autotest.
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