pspp
11 years agopspp-sheet-view: Make Control+Left, Control+Right go to ends of lines. 20130204032125/pspp
Ben Pfaff [Mon, 4 Feb 2013 08:03:56 +0000 (00:03 -0800)]
pspp-sheet-view: Make Control+Left, Control+Right go to ends of lines.

John Darrington reported that, in Gnumeric, Control+Left goes to the first
column and Control+Right goes to the last column.  This commit changes
the data sheet to do the same

11 years agoMerge 'master' into 'psppsheet'.
Ben Pfaff [Sun, 3 Feb 2013 20:16:49 +0000 (12:16 -0800)]
Merge 'master' into 'psppsheet'.

11 years agocasereader: Remove casereader_split() function. 20130203030502/pspp 20130204030505/pspp 20130205030507/pspp
Ben Pfaff [Sat, 2 Feb 2013 16:52:54 +0000 (08:52 -0800)]
casereader: Remove casereader_split() function.

It no longer has any users.

Reported by John Darrington.

11 years agoRANK: Add support for temporary transformations.
Ben Pfaff [Fri, 1 Feb 2013 06:02:08 +0000 (22:02 -0800)]
RANK: Add support for temporary transformations.

Bug #37999.
Reported by Zoltan Fabian.

11 years agoRANK: Adopt a new ranking implementation.
Ben Pfaff [Thu, 31 Jan 2013 07:03:29 +0000 (23:03 -0800)]
RANK: Adopt a new ranking implementation.

Before this commit, the implementation of RANK made multiple passes
through the active file, opening and closing it (with proc_open()
and proc_commit()) as many times as there were input variables.
This worked in simple cases, but it could never work with
TEMPORARY since the second proc_open() will see a different set
of data from the first one.

This commit rewrites RANK to open and read the active file only
once.  It does not make RANK properly work with TEMPORARY, but
it brings it much closer.  It may also be faster in some cases
because, although it makes the same number of passes through
the input data (necessarily), each pass discards all the input
columns except the ones that are really need for that pass.

11 years agoRANK: Create all variables together, in order.
Ben Pfaff [Thu, 31 Jan 2013 06:51:02 +0000 (22:51 -0800)]
RANK: Create all variables together, in order.

An upcoming commit will rewrite the RANK implementation so that the
new variables are not created until after a pass through the data.
(This makes sense because their values cannot actually be determined
until that pass is complete, so there is no point in allocating space
for them in cases.)  To do that, it is necessary to figure out the
variable names (and that they will be valid variable names) in
advance.  This commit switches to that approach in advance.

This approach has another small advantage: the order of the variables
added by RANK to the dictionary does not depend on whether the
variables are named by the user or by generating a name.  (This
is why the rank.at test case changes.)

11 years agoRANK: Simplify rank_sorted_file() with new function sum_weights().
Ben Pfaff [Thu, 31 Jan 2013 05:19:53 +0000 (21:19 -0800)]
RANK: Simplify rank_sorted_file() with new function sum_weights().

This makes the code easier to read and possibly even faster.

11 years agoRANK: Simplify fraction_name() function.
Ben Pfaff [Thu, 24 Jan 2013 06:55:24 +0000 (22:55 -0800)]
RANK: Simplify fraction_name() function.

The caller only needs a constant string so we might as well just return
one directly rather than through a static buffer.

11 years agoRANK: Put #include directives into typical order.
Ben Pfaff [Thu, 24 Jan 2013 06:54:22 +0000 (22:54 -0800)]
RANK: Put #include directives into typical order.

11 years agoRANK: Remove write-only struct member 'ascending'.
Ben Pfaff [Thu, 24 Jan 2013 06:52:10 +0000 (22:52 -0800)]
RANK: Remove write-only struct member 'ascending'.

11 years agoRANK: Lowercase the name of "enum RANK_FUNC".
Ben Pfaff [Mon, 21 Jan 2013 23:45:58 +0000 (15:45 -0800)]
RANK: Lowercase the name of "enum RANK_FUNC".

It is fairly unusual to give a type an all-uppercase name.  The name looks
more natural to me in lowercase.

11 years agotransformations: Relax the rules for transformation finalizing.
Ben Pfaff [Tue, 29 Jan 2013 06:54:18 +0000 (22:54 -0800)]
transformations: Relax the rules for transformation finalizing.

The trns_chain data structure has a barely useful concept called
"finalization".  In practice this is used to make sure that control
structures (e.g. DO IF) that are opened get closed (e.g. END IF).  There
are currently some restrictions on finalizing: namely, transformations
can't be added after a chain is finalized.  Since finalizers are barely
used, we can relax this restriction, which this commit does.  This will be
used in an upcoming commit where the ability to add a transformation to a
finalized change becomes useful for a corner case.

11 years agosubcase: New function subcase_add_vars_always().
Ben Pfaff [Fri, 25 Jan 2013 07:16:44 +0000 (23:16 -0800)]
subcase: New function subcase_add_vars_always().

This function will be used in an upcoming commit.

11 years agocasegrouper: Add comments.
Ben Pfaff [Tue, 22 Jan 2013 03:28:57 +0000 (19:28 -0800)]
casegrouper: Add comments.

11 years agoEnsure that RELIABILITY is always fully constructed. 20130129030504/pspp 20130130030502/pspp 20130131030506/pspp 20130201030505/pspp 20130202030503/pspp
John Darrington [Mon, 28 Jan 2013 18:00:29 +0000 (19:00 +0100)]
Ensure that RELIABILITY is always fully constructed.

Commit e94a39ff572a51907545497c26faccdf4b2c5ada added a 'no crash' test
checking that RELIABILITY's destructor didn't cause any problems when
the procedure was presented with invalid syntax.  Unfortunately the
associated fix was only half done.  The scale_name variable was being
destroyed when it hadn't been initialised.  This change fixes that.

Reported-by: Jeremy Lavergne
11 years agoReliability: Fix crash on invalid syntax 20130126030502/pspp 20130127030503/pspp 20130128030503/pspp
John Darrington [Fri, 25 Jan 2013 11:34:31 +0000 (12:34 +0100)]
Reliability: Fix crash on invalid syntax

11 years agoImprove the printing size on Windows. 20130121030513/pspp 20130122030515/pspp 20130123030508/pspp 20130124030506/pspp 20130125030503/pspp
John Darrington [Sun, 20 Jan 2013 13:16:19 +0000 (14:16 +0100)]
Improve the printing size on Windows.

There were reports that on Windoze the printed output was tiny.  I
think this commit might improve things a little.

11 years agoFix xr to point unit conversion in cairo output driver.
John Darrington [Sun, 20 Jan 2013 11:49:54 +0000 (12:49 +0100)]
Fix xr to point unit conversion in cairo output driver.

The conversion between points (1/72") and xr units was wrong.
This meant that some things were slightly the wrong size.

Reviewed-by: Ben Pfaff
11 years agoOutput window: properly handle the dispose/finalisation
John Darrington [Sun, 20 Jan 2013 13:53:41 +0000 (14:53 +0100)]
Output window: properly handle the dispose/finalisation

11 years agoDocument and implement "precision record" in portable file format. 20130117030512/pspp 20130118030503/pspp 20130119030502/pspp 20130120030506/pspp
Ben Pfaff [Thu, 17 Jan 2013 07:32:26 +0000 (23:32 -0800)]
Document and implement "precision record" in portable file format.

11 years agoRemove configure flag --enable-anachronistic-dependencies 20130116030504/pspp
John Darrington [Tue, 15 Jan 2013 18:04:53 +0000 (19:04 +0100)]
Remove configure flag --enable-anachronistic-dependencies

This flag was a kludge and is not used anymore anyway.

11 years agolexer: Generalize lex_match_phrase() to handle any syntax. 20130113030506/pspp 20130114030505/pspp 20130115030506/pspp
Ben Pfaff [Sat, 12 Jan 2013 20:01:16 +0000 (12:01 -0800)]
lexer: Generalize lex_match_phrase() to handle any syntax.

This makes lex_match_phrase() slightly more useful.  It also eliminates
the ASCII-only requirement.

11 years agoscan: Introduce string_lexer for simple tokenizing of a string.
Ben Pfaff [Sat, 12 Jan 2013 19:10:08 +0000 (11:10 -0800)]
scan: Introduce string_lexer for simple tokenizing of a string.

The following commit will introduce a user outside of the tests.

11 years agosegment: Don't require the input to end in a new-line.
Ben Pfaff [Mon, 7 Jan 2013 06:42:53 +0000 (22:42 -0800)]
segment: Don't require the input to end in a new-line.

11 years agosegment: Separate SEG_N_TYPES from enum segment_type.
Ben Pfaff [Mon, 7 Jan 2013 06:41:17 +0000 (22:41 -0800)]
segment: Separate SEG_N_TYPES from enum segment_type.

With SEG_N_TYPES not actually a member of enum segment_type, GCC doesn't
complain if it's missing from a switch statement on that type.

11 years agoidentifier: Make lex_id_get_length() handle Unicode.
Ben Pfaff [Sun, 6 Jan 2013 23:20:32 +0000 (15:20 -0800)]
identifier: Make lex_id_get_length() handle Unicode.

This function's only caller is documented only to handle ASCII, so this
commit does not fix any bug, but it seems better to generalize our code.

11 years agocairo: Include command name in error messages.
Ben Pfaff [Sat, 12 Jan 2013 17:43:18 +0000 (09:43 -0800)]
cairo: Include command name in error messages.

Commit ddb7b52128d8 (output: Make errors, warnings, and notes into a new
"message_item".) changed command name tracking to a responsibility of
individual output drivers, and converted the output drivers to do it.
However, the conversion of the cairo driver was incomplete.  This commit
fixes that problem.

Reported by John Darrington.

11 years agoGnumeric Reader: Set dictionary to NULL on error
John Darrington [Sat, 12 Jan 2013 13:25:51 +0000 (14:25 +0100)]
Gnumeric Reader: Set dictionary to NULL on error

11 years agoSimplify creation of pango layout in xr driver. 20130112030502/pspp
John Darrington [Fri, 11 Jan 2013 14:26:58 +0000 (15:26 +0100)]
Simplify creation of pango layout in xr driver.

Create the layouts with pango_cairo_create_layout instead of
pango_layout_new.  This seems simpler and avoids a kludge.

Reviewed-By: Ben Pfaff
11 years agodoc: Better describe the meaning of THRU in the RECODE command. 20130110030505/pspp 20130110082819/pspp 20130111030503/pspp 20130111085253/pspp
Ben Pfaff [Thu, 10 Jan 2013 05:52:37 +0000 (21:52 -0800)]
doc: Better describe the meaning of THRU in the RECODE command.

pohaku <pg@hawaii.edu> reported that the description was ambiguous.

11 years agodoc: Improve formatting of RECODE command description.
Ben Pfaff [Thu, 10 Jan 2013 05:51:43 +0000 (21:51 -0800)]
doc: Improve formatting of RECODE command description.

11 years agoMerge 'master' into 'psppsheet'. 20130107032118/pspp 20130108102621/pspp 20130109032153/pspp 20130110031120/pspp 20130110084546/pspp 20130111032139/pspp 20130111091005/pspp 20130112032108/pspp 20130113032104/pspp 20130114032646/pspp 20130115032143/pspp 20130116032122/pspp 20130117032107/pspp 20130118032127/pspp 20130119032130/pspp 20130120032138/pspp 20130121032753/pspp 20130122032130/pspp 20130123032123/pspp 20130124032128/pspp 20130125032106/pspp 20130126032059/pspp 20130127032105/pspp 20130128032115/pspp 20130129032053/pspp 20130130032109/pspp 20130131032120/pspp 20130201032127/pspp 20130202032121/pspp 20130203032041/pspp
Ben Pfaff [Sun, 6 Jan 2013 20:57:23 +0000 (12:57 -0800)]
Merge 'master' into 'psppsheet'.

11 years agoFixed a bug reading gnumeric files. 20130107030506/pspp 20130108100915/pspp 20130109030502/pspp
John Darrington [Sun, 6 Jan 2013 18:14:32 +0000 (19:14 +0100)]
Fixed a bug reading gnumeric files.

Some gnumeric files use <gnm:Name> tags for miscellaneous purposes.  Our code
had always assumed that it represented the name of the Sheet.  Hence these files
would read the wrong sheet of a workbook.  This change fixes it.  Closes 38028

11 years agoGET DATA: Produce explicit error on invalid sheet index.
John Darrington [Sun, 6 Jan 2013 16:01:34 +0000 (17:01 +0100)]
GET DATA: Produce explicit error on invalid sheet index.

11 years agoGET DATA: Add error message on incorrect syntax
John Darrington [Sun, 6 Jan 2013 15:52:58 +0000 (16:52 +0100)]
GET DATA: Add error message on incorrect syntax

Previously, when an incorrect syntax reading a spreadsheet file was used, the procedure
would silently fail.  Now it fails with an error message.

11 years agoGnumeric reader: Avoid potential crash reading invalid gnumeric files 20130106030502/pspp
John Darrington [Sat, 5 Jan 2013 15:49:53 +0000 (16:49 +0100)]
Gnumeric reader: Avoid potential crash reading invalid gnumeric files

11 years agoidentifier: Broaden the class of characters allowed in identifiers. 20130104030504/pspp 20130105030504/pspp
Ben Pfaff [Fri, 4 Jan 2013 05:34:25 +0000 (21:34 -0800)]
identifier: Broaden the class of characters allowed in identifiers.

It appears that SPSS allows almost any Unicode character in an identifier,
and particular U+00B4 ACUTE ACCENT.  This commit adds more permitted
characters to the identifier checks.

Reported by Helen Barghan <kenny4president@web.de>.

11 years agoexpressions: Fix dependency on current year in tests. 20130102030504/pspp 20130103030502/pspp
Ben Pfaff [Wed, 2 Jan 2013 06:06:59 +0000 (22:06 -0800)]
expressions: Fix dependency on current year in tests.

The tests for expressions broke on Jan 1, 2013 because the default epoch
depends on the current year.  This commit fixes the tests by setting a
fixed epoch for dates.

Reported by John Darrington.

11 years agovariable: Remove 'aux' member from struct variable.
Ben Pfaff [Wed, 2 Jan 2013 02:34:56 +0000 (18:34 -0800)]
variable: Remove 'aux' member from struct variable.

11 years agoperl-module: Drop use of variable aux data.
Ben Pfaff [Wed, 2 Jan 2013 05:36:22 +0000 (21:36 -0800)]
perl-module: Drop use of variable aux data.

The variable aux data interfaces are not very clean, and furthermore
they have few users.  This commit eliminates the last user.

11 years agoperl-module: Put struct dictionary inside a wrapper "struct pspp_dict".
Ben Pfaff [Wed, 2 Jan 2013 02:47:53 +0000 (18:47 -0800)]
perl-module: Put struct dictionary inside a wrapper "struct pspp_dict".

In an upcoming commit this will allow an extra member to be associated
with the Perl version of each dictionary.

11 years agoperl-module: Rename sysfile_info to syswriter_info.
Ben Pfaff [Wed, 2 Jan 2013 03:18:31 +0000 (19:18 -0800)]
perl-module: Rename sysfile_info to syswriter_info.

This module had sysfile_info and sysreader_info.  The former was a writer,
the latter a reader.  I found the asymmetric names a little confusing, so
this commit renames them more consistently.

11 years agocase-map: Drop use of variable aux data.
Ben Pfaff [Wed, 2 Jan 2013 02:30:39 +0000 (18:30 -0800)]
case-map: Drop use of variable aux data.

The variable aux data interfaces are not very clean, and furthermore
they have few users.  This commit eliminates one of the users.

11 years agoCROSSTABS: Drop use of variable aux data.
Ben Pfaff [Wed, 2 Jan 2013 03:15:16 +0000 (19:15 -0800)]
CROSSTABS: Drop use of variable aux data.

The variable aux data interfaces are not very clean, and furthermore
they have few users.  This commit eliminates one of the users.

11 years agohmap: New interfaces for iterating a bucket without comparing hashes.
Ben Pfaff [Fri, 27 Aug 2010 05:49:38 +0000 (22:49 -0700)]
hmap: New interfaces for iterating a bucket without comparing hashes.

11 years agoUpdate tests to reflect change in EXAMINE / EXTREME behaviour.
John Darrington [Tue, 1 Jan 2013 17:32:03 +0000 (18:32 +0100)]
Update tests to reflect change in EXAMINE / EXTREME behaviour.

Commit bd156adaff5b7c1bbe48b5c64006ead58d9a37d6 slightly changed the
behaviour of the EXTREME subcommand of the EXAMINE procedure, but the
tests did not reflect this.

This change updates the tests accordingly.  Thanks to Zoltan Fabian
for confirming which was the correct behaviour.

11 years agoFix bug #37984 - EXAMINE extremes vs. fractional weights.
John Darrington [Tue, 1 Jan 2013 15:19:26 +0000 (16:19 +0100)]
Fix bug #37984 - EXAMINE extremes vs. fractional weights.

There was a bug where extreme values were not calculated properly when
weights were fractional.  This change fixes this problem and adds a
test.

11 years agoRemove assertions which compare the sum of weights between passes. 20130101030509/pspp
John Darrington [Mon, 31 Dec 2012 10:33:38 +0000 (11:33 +0100)]
Remove assertions which compare the sum of weights between passes.

These asserted that the sum of case-weights of a dataset calculated
in one pass, was the same as that calculated in a second pass.
Algebraically this is correct.  However, for optimisation purposes,
it is sometimes desireable that the second pass occurs after the
data has been reordered.   If that happens, the sum of weights can
be slightly different due to floating point rounding errors.  This
happens particularly when the caseweights are fractional.

11 years agoMerge 'master' into 'psppsheet'. 20121231032129/pspp 20130101032123/pspp 20130102032118/pspp 20130103032118/pspp 20130104032103/pspp 20130105032146/pspp 20130106032112/pspp
Ben Pfaff [Sun, 30 Dec 2012 03:21:39 +0000 (19:21 -0800)]
Merge 'master' into 'psppsheet'.

11 years agocsv-file-writer: Fix implementation of decimal point option. 20121228030502/pspp 20121229030503/pspp 20121230030503/pspp 20121231030505/pspp
Ben Pfaff [Fri, 28 Dec 2012 05:17:43 +0000 (21:17 -0800)]
csv-file-writer: Fix implementation of decimal point option.

Now that pspp sets LC_NUMERIC, dtoastr() might yield either '.' or ',' as
the decimal point, so the CSV writer needs to check for either one and
replace it by the decimal point requested by the caller.

Reported by John Darrington.

11 years agoi18n: New functions for UTF-8 case conversion.
Ben Pfaff [Fri, 28 Dec 2012 03:51:08 +0000 (19:51 -0800)]
i18n: New functions for UTF-8 case conversion.

Also, use the new functions in a few cases where we want a full UTF-8
conversion.

11 years agoUse UTF-8 case-insensitive hashes and comparisons for language identifiers.
Ben Pfaff [Fri, 28 Dec 2012 03:32:40 +0000 (19:32 -0800)]
Use UTF-8 case-insensitive hashes and comparisons for language identifiers.

The PSPP language has case-insensitive identifiers (variable names, etc.)
but until now it has only implemented case insensitivity for ASCII
characters.  This commit properly implements case insensitivity for all
Unicode characters, using libunistring.

Bug #31072.

11 years agoUse "C" locale comparisons for language constructs.
Ben Pfaff [Wed, 26 Dec 2012 03:09:12 +0000 (19:09 -0800)]
Use "C" locale comparisons for language constructs.

These language constructs are ASCII so there's no need for a
locale-independent comparison and it seems to me that one would not make
sense in edge cases.

11 years agoFixed crash parsing NPAR CHISQUARE 20121227030502/pspp
John Darrington [Wed, 26 Dec 2012 12:56:30 +0000 (13:56 +0100)]
Fixed crash parsing NPAR CHISQUARE

11 years agoSet the LC_NUMERIC locale category on startup.
John Darrington [Mon, 10 Dec 2012 17:32:25 +0000 (18:32 +0100)]
Set the LC_NUMERIC locale category on startup.

Previously, for rather unsatisfactory reasons, pspp and psppire set all locale
categories except LC_NUMERIC.  The reasons for doing this have now been
resolved.  So this change sets all locale categories including LC_NUMERIC.

11 years agoselect cases dialog: Fix syntax generation issues when in non C locales 20121226030505/pspp
John Darrington [Tue, 25 Dec 2012 15:23:25 +0000 (16:23 +0100)]
select cases dialog: Fix syntax generation issues when in non C locales

11 years agoAggregate dialog: Fix locale dependent syntax generation
John Darrington [Tue, 25 Dec 2012 14:56:19 +0000 (15:56 +0100)]
Aggregate dialog: Fix locale dependent syntax generation

11 years agoOneway dialog: Fix locale dependent syntax generation issues
John Darrington [Tue, 25 Dec 2012 14:33:20 +0000 (15:33 +0100)]
Oneway dialog: Fix locale dependent syntax generation issues

11 years agoT-TEST dialogs: Fixe locale dependent issues
John Darrington [Tue, 25 Dec 2012 14:18:45 +0000 (15:18 +0100)]
T-TEST dialogs: Fixe locale dependent issues

11 years agoChi-Square Dialog: Fix locale dependent issues
John Darrington [Tue, 25 Dec 2012 13:47:14 +0000 (14:47 +0100)]
Chi-Square Dialog: Fix locale dependent issues

11 years agoCount Dialog and Recode Dialog: Make syntax generation locale independent 20121225030501/pspp
John Darrington [Tue, 25 Dec 2012 10:49:35 +0000 (11:49 +0100)]
Count Dialog and Recode Dialog: Make syntax generation locale independent

11 years agoBinomial Dialog: Make syntax generation locale independent
John Darrington [Tue, 25 Dec 2012 09:27:32 +0000 (10:27 +0100)]
Binomial Dialog: Make syntax generation locale independent

11 years agoFrequencies Dialog: Make the syntax generator locale independent
John Darrington [Tue, 25 Dec 2012 09:16:35 +0000 (10:16 +0100)]
Frequencies Dialog: Make the syntax generator locale independent

11 years agoPRINT: Support ENCODING subcommand.
Ben Pfaff [Tue, 25 Dec 2012 00:41:44 +0000 (16:41 -0800)]
PRINT: Support ENCODING subcommand.

Bug #35825.

11 years agoplacement-parser: New public function parse_column().
Ben Pfaff [Tue, 25 Dec 2012 00:34:30 +0000 (16:34 -0800)]
placement-parser: New public function parse_column().

This will acquire a new user in an upcoming commit.

11 years agoplacement-parser: Don't allow "/" as a FORTRAN input format.
Ben Pfaff [Tue, 25 Dec 2012 00:33:55 +0000 (16:33 -0800)]
placement-parser: Don't allow "/" as a FORTRAN input format.

DATA LIST allows / to appear inside FORTRAN format specifications but PRINT
does not, so disallow it here.

11 years agou8-line: Add new u8_line_set_length() function.
Ben Pfaff [Mon, 24 Dec 2012 22:18:01 +0000 (14:18 -0800)]
u8-line: Add new u8_line_set_length() function.

The other functions in the u8-line library come directly from the ASCII
output driver.  This function is new, so I broke it into this separate
commit to emphasize that.

11 years agou8-line: Factor out new library for composing lines of text in UTF-8.
Ben Pfaff [Mon, 24 Dec 2012 22:16:51 +0000 (14:16 -0800)]
u8-line: Factor out new library for composing lines of text in UTF-8.

This code from the ASCII driver will also be useful for the PRINT command
in an upcoming commit.

11 years agoAUTORECODE: Fix incorrect #include.
Ben Pfaff [Tue, 25 Dec 2012 01:11:58 +0000 (17:11 -0800)]
AUTORECODE: Fix incorrect #include.

11 years agoReplace dtoastr with c_dtoastr where appropriate
John Darrington [Mon, 24 Dec 2012 08:27:11 +0000 (09:27 +0100)]
Replace dtoastr with c_dtoastr where appropriate

11 years agoNew wrapper function c_dtoastr.
John Darrington [Mon, 24 Dec 2012 07:57:46 +0000 (08:57 +0100)]
New wrapper function c_dtoastr.

This function wraps dtoastr (from gnulib) replacing the first occurance of
, by .   Thanks to Ben Pfaff for this suggested implementation.

11 years agoFactor dialog: use locale independent syntax generator
John Darrington [Sun, 23 Dec 2012 21:03:12 +0000 (22:03 +0100)]
Factor dialog: use locale independent syntax generator

11 years agoAutorecode: use locale independent printf function
John Darrington [Sun, 23 Dec 2012 20:15:26 +0000 (21:15 +0100)]
Autorecode: use locale independent printf function

11 years agoLogistic Regression GUI: make locale independent.
John Darrington [Sun, 23 Dec 2012 16:05:40 +0000 (17:05 +0100)]
Logistic Regression GUI: make locale independent.

The syntax generator for the logistic regression dialog generated commas instead of dots
under some locales.  This change fixes that.

11 years agosyntax-gen.c (syntax_gen_pspp_valist): Add new %g directive
John Darrington [Sun, 23 Dec 2012 16:01:30 +0000 (17:01 +0100)]
syntax-gen.c (syntax_gen_pspp_valist): Add new %g directive

11 years agopsppire-var-view.c: New function psppire_var_view_append_names_str
John Darrington [Sun, 23 Dec 2012 11:49:06 +0000 (12:49 +0100)]
psppire-var-view.c: New function psppire_var_view_append_names_str

11 years agostr.c: New functions ds_put_c_vformat and ds_put_c_format
John Darrington [Sat, 22 Dec 2012 16:40:09 +0000 (17:40 +0100)]
str.c: New functions ds_put_c_vformat and ds_put_c_format

Added a new printf-like functions which are locale independent.
Added this new function, and changed syntax_gen_pspp_valist to use it.
Rationale: syntax generation should never be locale dependent.

11 years agoglade: Add #include <config.h>. 20121223030502/pspp
Ben Pfaff [Sat, 22 Dec 2012 23:01:24 +0000 (15:01 -0800)]
glade: Add #include <config.h>.

I have found that this is necessary with the latest update to Gnulib to
make the glade code compile without errors.

11 years agoUPDATE: Do not update from missing values in transaction files.
Ben Pfaff [Sat, 22 Dec 2012 11:45:42 +0000 (03:45 -0800)]
UPDATE: Do not update from missing values in transaction files.

The documentation said that missing and all-spaces values in transaction
files did not update the master file, but the implementation was wrong.

Reported by Kees Varekamp <kees@mroffice.org>.

11 years agocombine-files: Break apart apply_file_case_and_advance().
Ben Pfaff [Sat, 22 Dec 2012 11:42:10 +0000 (03:42 -0800)]
combine-files: Break apart apply_file_case_and_advance().

An upcoming patch will sometimes need to do something different from
apply_case() before advancing.

11 years agovalue: New function value_is_spaces().
Ben Pfaff [Sat, 22 Dec 2012 11:32:09 +0000 (03:32 -0800)]
value: New function value_is_spaces().

11 years agoUpdate Gnulib hash 20121220030502/pspp 20121221030502/pspp 20121222030502/pspp
John Darrington [Wed, 19 Dec 2012 08:57:06 +0000 (09:57 +0100)]
Update Gnulib hash

11 years agoPsppireOutputWindow (create_xr_print_driver) fix LC_NUMERIC issues.
John Darrington [Wed, 19 Dec 2012 10:59:09 +0000 (11:59 +0100)]
PsppireOutputWindow (create_xr_print_driver) fix LC_NUMERIC issues.

This function used *printf with a %f directive, which  under certain
locales would have generated a string like "270,00x210,00mm" which the
print driver would have rejected.
This change uses the newly available c_xasprintf function from gnulib
to alleviate this problem.

11 years agoReplaced sprintf with c_snprintf where appropriate
John Darrington [Mon, 10 Dec 2012 18:00:49 +0000 (19:00 +0100)]
Replaced sprintf with c_snprintf where appropriate

11 years agoUpdated the German translation from http://translationproject.org 20121218030502/pspp 20121219030502/pspp
John Darrington [Tue, 18 Dec 2012 08:22:19 +0000 (09:22 +0100)]
Updated the German translation from translationproject.org

11 years agoReplaced strtod with c_strtod where appropriate 20121204030504/pspp 20121205030504/pspp 20121206030502/pspp 20121207030505/pspp 20121208030506/pspp 20121209030502/pspp 20121210030502/pspp 20121211030505/pspp 20121212030502/pspp 20121213030503/pspp 20121214030504/pspp 20121215030502/pspp 20121216030502/pspp 20121217030502/pspp
John Darrington [Mon, 3 Dec 2012 21:10:00 +0000 (22:10 +0100)]
Replaced strtod with c_strtod where appropriate

Should LC_NUMERIC ever get set, this will become important.

11 years agoMerge 'master' into 'psppsheet'. 20121202031952/pspp 20121203032039/pspp 20121204032004/pspp 20121205032030/pspp 20121206032021/pspp 20121207032036/pspp 20121208032040/pspp 20121209032019/pspp 20121210032023/pspp 20121211032038/pspp 20121212032028/pspp 20121213032029/pspp 20121214032036/pspp 20121215032028/pspp 20121216032020/pspp 20121217032038/pspp 20121218031957/pspp 20121219032034/pspp 20121220032031/pspp 20121221032037/pspp 20121222032032/pspp 20121223032002/pspp 20121225032008/pspp 20121226032016/pspp 20121227032003/pspp 20121228032058/pspp 20121229032201/pspp 20121230032128/pspp
Ben Pfaff [Sun, 2 Dec 2012 03:39:07 +0000 (19:39 -0800)]
Merge 'master' into 'psppsheet'.

11 years agoConverted crosstabs-dialog to the new way of doing things 20121202030502/pspp 20121203030504/pspp
John Darrington [Sat, 1 Dec 2012 11:15:56 +0000 (12:15 +0100)]
Converted crosstabs-dialog to the new way of doing things

11 years agomeasure.c: Use c_strtod instead of strtod 20121201030503/pspp
John Darrington [Sat, 1 Dec 2012 06:08:55 +0000 (07:08 +0100)]
measure.c: Use c_strtod instead of strtod

Since the input to these function come from hard coded strings, it is not appropriate
to interpret them in a locale dependent manner.

11 years agodata-out.c: Added assertion to avoid out of bounds memory access
John Darrington [Sat, 1 Dec 2012 06:07:13 +0000 (07:07 +0100)]
data-out.c: Added assertion to avoid out of bounds memory access

This could (has!) happened if the locale is not correctly set

11 years agoSHOW: Add JOURNAL subcommand. 20121127030504/pspp 20121128030504/pspp 20121129030503/pspp 20121130030502/pspp
Ben Pfaff [Tue, 27 Nov 2012 05:15:43 +0000 (21:15 -0800)]
SHOW: Add JOURNAL subcommand.

Bug #35665.
Requested by Harry Thijssen.

11 years agohistogram: Add missing #include.
Ben Pfaff [Tue, 27 Nov 2012 05:15:02 +0000 (21:15 -0800)]
histogram: Add missing #include.

Commit 02b9b37698eb "Disable asserts in histogram code except in
--testing-mode" added a use of settings_get_testing_mode() but didn't
include the proper header.  This fixes the problem.

11 years agoDisable asserts in histogram code except in --testing-mode
John Darrington [Mon, 26 Nov 2012 20:09:08 +0000 (21:09 +0100)]
Disable asserts in histogram code except in --testing-mode

The assertions in histogram.c are algebraically correct,
but due to floating point errors may not actually be true.
This change disables them except when in testing mode.
The tests in charts.at rely upon them being enabled.
Closes bug #36395

11 years agoDESCRIPTIVES: Make Z score calculation honor SPLIT FILE. 20121126030509/pspp
Ben Pfaff [Mon, 26 Nov 2012 07:04:50 +0000 (23:04 -0800)]
DESCRIPTIVES: Make Z score calculation honor SPLIT FILE.

Until now, DESCRIPTIVES has not supported SPLIT FILE in Z score
calculations.  That is, Z scores have been calculated on the basis of a
single group for the entire file, which doesn't make any sense.  This
commit properly implements Z score calculation on a per-split group basis.

Bug #16351.

11 years agotests: Add tests to cover corner cases in DATESUM, DATEDIFF.
Ben Pfaff [Sun, 25 Nov 2012 18:32:05 +0000 (10:32 -0800)]
tests: Add tests to cover corner cases in DATESUM, DATEDIFF.

These corner cases weren't covered by previous tests.

Bug #30708.
Reported by Daniel E WILLIAMS <Daniel.E.Williams@state.or.us>.

11 years agoRemove feature to automatically connect to GDB when debugging is enabled.
Ben Pfaff [Sun, 25 Nov 2012 17:04:54 +0000 (09:04 -0800)]
Remove feature to automatically connect to GDB when debugging is enabled.

This feature caused a few problems in "make check" on some distributions
when debugging was enabled at compile time.  It is probably possible to
find and fix those particular problems, but the feature itself is
little-used, so this commit instead removes it.

Bug #37444.
Reported by Mindaugas.

11 years agofile handle properties: Make encoding member const 20121125030503/pspp
John Darrington [Sun, 25 Nov 2012 10:07:44 +0000 (11:07 +0100)]
file handle properties: Make encoding member const

This member is never modified.  So declare it as const.  This way it
can be initialised from a static string.

11 years agoAggregate Dialog: use global callback
John Darrington [Sat, 24 Nov 2012 20:33:20 +0000 (21:33 +0100)]
Aggregate Dialog: use global callback

11 years agoRuns Dialog: use global callback instead of a private one
John Darrington [Sat, 24 Nov 2012 19:56:20 +0000 (20:56 +0100)]
Runs Dialog: use global callback instead of a private one

11 years agopsppire-data-window: Only allow saving a file with at least one variable.
Ben Pfaff [Sun, 25 Nov 2012 05:41:00 +0000 (21:41 -0800)]
psppire-data-window: Only allow saving a file with at least one variable.

A data file with no variables can't be saved to a file.  Until now, this
wasn't detected until the user had already chosen a file name, and the
message used to report it was confusing: "SAVE is allowed only after the
active file has been defined."  With this commit, the menu item and toolbar
item for save operations is, instead, disabled if the file has no
variables.

Bug #30700.
Reported by eric thivant, via Harry Thijssen, with help from Michel
Boaventura.