pspp
11 years agoAdded strcasestr to list of gnulib modules
John Darrington [Tue, 23 Apr 2013 14:09:04 +0000 (16:09 +0200)]
Added strcasestr to list of gnulib modules

11 years agoUse the select and pipe2 modules from gnulib 20130423010504/pspp
John Darrington [Mon, 22 Apr 2013 18:04:04 +0000 (20:04 +0200)]
Use the select and pipe2 modules from gnulib

11 years agoWiden the criteria for assuming the terminal is utf capable. 20130422010503/pspp
John Darrington [Sun, 21 Apr 2013 19:44:24 +0000 (21:44 +0200)]
Widen the criteria for assuming the terminal is utf capable.

Assume the terminal is UTF-8 capable if the TERM and XTERM_LOCALE environment
variables seem to suggest that.

11 years agoUpdate documentation for the STRING command. 20130421010505/pspp
John Darrington [Sat, 20 Apr 2013 10:00:22 +0000 (12:00 +0200)]
Update documentation for the STRING command.

The text wasn't entirely clear.  Hopefully this is an improvement.

Reported by: Ronald Crichton

11 years agoChanged "Text files" to "Text Files" 20130419010508/pspp 20130420010514/pspp
John Darrington [Thu, 18 Apr 2013 17:28:17 +0000 (19:28 +0200)]
Changed "Text files" to "Text Files"

Reported-By: Jack Tanner
11 years agoterminal-reader.c: Added missing #include directive
John Darrington [Wed, 17 Apr 2013 17:23:24 +0000 (19:23 +0200)]
terminal-reader.c: Added missing #include directive

11 years agoTerminal reader: Interruptable command line interface 20130417010503/pspp
John Darrington [Sun, 14 Apr 2013 11:36:42 +0000 (13:36 +0200)]
Terminal reader: Interruptable command line interface

This change alters the behaviour of the command line interface such that
upon receiving SIGINT, instead of immediately aborting, the current command
being read will be interrupted and a new PSPP> prompt appears.

Reviewed-by: Ben Pfaff
11 years agoAscii driver: Default to box=unicode iff the charset is UTF8 20130410010506/pspp 20130411010506/pspp 20130415100536/pspp 20130416010502/pspp
John Darrington [Tue, 9 Apr 2013 20:32:04 +0000 (22:32 +0200)]
Ascii driver: Default to box=unicode iff the charset is UTF8

11 years agoAUTORECODE: Avoid use-after-free error with TEMPORARY. 20130408010504/pspp 20130409010502/pspp
Ben Pfaff [Sun, 7 Apr 2013 22:06:35 +0000 (15:06 -0700)]
AUTORECODE: Avoid use-after-free error with TEMPORARY.

When TEMPORARY is in effect, proc_commit() destroys the temporary
dictionary.  This means that any procedure that does not somehow disable
temporary transformations and refers to a variable following proc_commit()
has a use-after-free error.

Until now, AUTORECODE had this problem.  This commit fixes it and adds a
test.

Bug #32757.

11 years agoAUTORECODE: Trim trailing white space correctly.
Ben Pfaff [Sun, 7 Apr 2013 21:14:25 +0000 (14:14 -0700)]
AUTORECODE: Trim trailing white space correctly.

The existing code trimmed off everything starting at the first space.
The new version trims off only trailing spaces.

Found by inspection.

11 years agopo: Update Dutch translation from translationproject.org.
Ben Pfaff [Sun, 26 Feb 2012 18:01:26 +0000 (10:01 -0800)]
po: Update Dutch translation from translationproject.org.

11 years agoascii: Omit whitespace at the end of a line.
Ben Pfaff [Sun, 7 Apr 2013 19:57:32 +0000 (12:57 -0700)]
ascii: Omit whitespace at the end of a line.

Long string variables tend not to be completely filled with data, which
means that they end in a lot of spaces.  The ASCII output driver didn't
handle these well.  Instead, it put a blank line in the cell for each
trailing space.

This fixes the problem and adds a test.

Reported by Ronald Crichton.
Bug #38672.

11 years agoFixed crash when processing regression with bad syntax
John Darrington [Sun, 7 Apr 2013 17:56:44 +0000 (19:56 +0200)]
Fixed crash when processing regression with bad syntax

11 years agoRename some identifiers for consistency
John Darrington [Sun, 7 Apr 2013 13:32:50 +0000 (15:32 +0200)]
Rename some identifiers for consistency

11 years agoCORRELATIONS: Fix crash with separate sets of row and column variables.
Ben Pfaff [Sun, 7 Apr 2013 17:06:23 +0000 (10:06 -0700)]
CORRELATIONS: Fix crash with separate sets of row and column variables.

When WITH is specified, the column variables start at offset corr->n_vars1
within corr->vars.  The calculation previously used here was incorrect and
caused an access beyond the end of the corr->vars array.

The code would be clearer if there were separate row_vars and col_vars
arrays, but that would be a larger change.

Bug #38661.
Reported by William Rogers.

11 years agoascii.c: Use symbol instead of constant literal 20130405030516/pspp 20130406010505/pspp 20130407010512/pspp
John Darrington [Wed, 3 Apr 2013 07:37:17 +0000 (09:37 +0200)]
ascii.c: Use symbol instead of constant literal

11 years agoFixed bug displaying unicode box characters.
John Darrington [Wed, 3 Apr 2013 07:20:13 +0000 (09:20 +0200)]
Fixed bug displaying unicode box characters.

Also added a test for this.  Closes bug #38647

11 years agoRELIABILITY: Fix memory leaks and dereferences of uninitialized pointers.
Ben Pfaff [Thu, 4 Apr 2013 16:26:03 +0000 (11:26 -0500)]
RELIABILITY: Fix memory leaks and dereferences of uninitialized pointers.

The 'total' struct and 'm' array in struct reliability were allocated once
per case group, but freed exactly once.  If there were no case groups,
this caused a null dereference.  If there was more than one case group,
this caused a memory leak.  This commit fixes both problems.

This commit also fixes a related crash on bad syntax due to dereferencing
a null pointer in reliability_destroy().

Bug #38660.
Reported by William Rogers.

11 years agoFix compiler warning in gnumeric-reader.c 20130401030511/pspp 20130402030504/pspp 20130403030507/pspp
John Darrington [Mon, 1 Apr 2013 06:06:32 +0000 (08:06 +0200)]
Fix compiler warning in gnumeric-reader.c

11 years agoWork-around bug in GCC 4.4.5
John Darrington [Mon, 1 Apr 2013 05:34:28 +0000 (07:34 +0200)]
Work-around bug in GCC 4.4.5

Gcc 4.4.5 seems to be buggy.  For some reason it miscompiles the code in
casereader_count_cases__ when compiled with -O2 by not allocating enough
stack.  This commit works around that problem by putting a dummy variable
on the stack.

Reviewed-by Ben Pfaff.

11 years agoods-reader: Fix GCC warning.
Ben Pfaff [Sun, 31 Mar 2013 18:13:57 +0000 (11:13 -0700)]
ods-reader: Fix GCC warning.

ods-reader.c: In function 'ods_file_casereader_read':
ods-reader.c:941:3: error: ISO C90 forbids mixed declarations and code

11 years agoONEWAY /POSTHOC: Annotate output with dependent variable
John Darrington [Sun, 31 Mar 2013 17:27:34 +0000 (19:27 +0200)]
ONEWAY /POSTHOC: Annotate output with dependent variable

The Multiple Comparisons table did not specify the variable to which it refered.  This could be confusing
if more than one variable was specified.
Fixes bug #38635

11 years agoUpdated lt.po from translationproject.org
John Darrington [Sun, 31 Mar 2013 16:51:48 +0000 (18:51 +0200)]
Updated lt.po from translationproject.org

11 years agoFixed some memory allocation issues in the Gnumeric import code
John Darrington [Sun, 31 Mar 2013 16:36:21 +0000 (18:36 +0200)]
Fixed some memory allocation issues in the Gnumeric import code

11 years agoFix memory allocation issues in ods-reader 20130331030503/pspp
John Darrington [Sat, 30 Mar 2013 11:16:14 +0000 (12:16 +0100)]
Fix memory allocation issues in ods-reader

11 years agoImported new lt.po file from translation-project. 20130330030503/pspp
John Darrington [Sat, 30 Mar 2013 07:40:56 +0000 (08:40 +0100)]
Imported new lt.po file from translation-project.

11 years agoFix order of text-import subdialogs.
John Darrington [Fri, 29 Mar 2013 11:13:43 +0000 (12:13 +0100)]
Fix order of text-import subdialogs.

Commit 29c1450251805417aacb9cecc84b03c81137c137 inadvertently reversed the
order of display of the the first-line and seperator subdialogs.  Amoung
other problems, this meant that controls of the former were no longer
respected.  This change restores the original order.

11 years agoMATCH FILES: Fix bugs along error path. 20130327030508/pspp 20130328030507/pspp 20130329030505/pspp
Ben Pfaff [Wed, 27 Mar 2013 05:35:59 +0000 (22:35 -0700)]
MATCH FILES: Fix bugs along error path.

Also add test to prevent later regression.

Reported by Ronald Crichton <Ronald.Crichton@cit.edu.au>.

11 years agogui: Fix GCC warning in page-file source file.
Ben Pfaff [Wed, 27 Mar 2013 04:35:17 +0000 (21:35 -0700)]
gui: Fix GCC warning in page-file source file.

src/ui/gui/page-file.c: In function 'init_file':
src/ui/gui/page-file.c:84:35: warning: variable 'opts' set but not
    used

11 years agoUpdated NEWS to match the version number
John Darrington [Tue, 26 Mar 2013 18:29:51 +0000 (19:29 +0100)]
Updated NEWS to match the version number

11 years agoReorganised the text-data import assistant into separate files for each page 20130324030505/pspp 20130325030503/pspp 20130326030506/pspp
John Darrington [Wed, 20 Mar 2013 17:28:44 +0000 (18:28 +0100)]
Reorganised the text-data import assistant into separate files for each page

This will hopefully make it easier to add new functionality.
Reviewed-by: Ben Pfaff
11 years agoconfigure: Increase version number to 0.7.10.
Ben Pfaff [Fri, 22 Mar 2013 15:38:05 +0000 (08:38 -0700)]
configure: Increase version number to 0.7.10.

Suggested by John Darrington.

11 years agoFILE HANDLE: Use system native line ends by default. 20130322030508/pspp
Ben Pfaff [Fri, 22 Mar 2013 04:42:23 +0000 (21:42 -0700)]
FILE HANDLE: Use system native line ends by default.

Requested by Ronald Crichton.

11 years agoFILE HANDLE: Add new ENDS subcommand to control new-lines in output.
Ben Pfaff [Fri, 22 Mar 2013 04:42:03 +0000 (21:42 -0700)]
FILE HANDLE: Add new ENDS subcommand to control new-lines in output.

Requested by Ronald Crichton.

11 years agoSET: Fix format specifier in show_workspace(). 20130318075540/pspp 20130319030509/pspp 20130320030504/pspp 20130321030507/pspp
Ben Pfaff [Mon, 18 Mar 2013 06:25:48 +0000 (23:25 -0700)]
SET: Fix format specifier in show_workspace().

GCC reported that %ld is not the correct format specifier for a size_t.

11 years agoFix confusion over workspace units.
John Darrington [Sun, 17 Mar 2013 17:15:04 +0000 (18:15 +0100)]
Fix confusion over workspace units.

11 years agoAdded the SHOW WORKSPACE command which was absent.
John Darrington [Sun, 17 Mar 2013 13:03:41 +0000 (14:03 +0100)]
Added the SHOW WORKSPACE command which was absent.

Reported-by: Stefan Tzeggai
11 years agoDocumentation: Mention the units of the WORKSPACE setting 20130317030503/pspp
John Darrington [Sat, 16 Mar 2013 20:02:13 +0000 (21:02 +0100)]
Documentation:  Mention the units of the WORKSPACE setting

11 years agoRANK: Fix crash ranking multiple variables without any rank specs. 20130312030503/pspp 20130313030511/pspp 20130314030502/pspp 20130315030502/pspp 20130316030504/pspp
Ben Pfaff [Tue, 12 Mar 2013 05:08:34 +0000 (22:08 -0700)]
RANK: Fix crash ranking multiple variables without any rank specs.

Incidentally fixes a small memory leak in the same situation.

Bug #38482.
Reported by John Darrington.

11 years agoFix warnings introduced by minor type errors in recently added code.
Ben Pfaff [Tue, 12 Mar 2013 04:54:20 +0000 (21:54 -0700)]
Fix warnings introduced by minor type errors in recently added code.

11 years agoAdded a (non-shipped) gui test-program to test spreadsheet readers. 20130310030504/pspp 20130311030504/pspp
John Darrington [Sat, 9 Mar 2013 15:05:37 +0000 (16:05 +0100)]
Added a (non-shipped) gui test-program to test spreadsheet readers.

This program is usefull for testing the behaviour of the ods_reader and the gnumeric_reader.

11 years agoRef count the gnumeric reader
John Darrington [Fri, 8 Mar 2013 15:10:14 +0000 (16:10 +0100)]
Ref count the gnumeric reader

11 years agomain.c: Replaced macro with a static const
John Darrington [Sat, 9 Mar 2013 12:13:11 +0000 (13:13 +0100)]
main.c: Replaced macro with a static const

This is the GNU recommended way, and ensures that not-compiled code does not become out
of date.

11 years agoNew module: psppire-spreadsheet-model.c 20130309030511/pspp
John Darrington [Fri, 8 Mar 2013 13:03:12 +0000 (14:03 +0100)]
New module: psppire-spreadsheet-model.c

 Provides an implementation of a GtkTreeModel which can be used to
display the meta data of Gnumeric or Opendocument spreadsheet files.
Potentially, other spreadsheet files could be added too.
Used for upcomming gui features.

11 years agoFix remaining leaks in Gnumeric reader
John Darrington [Fri, 8 Mar 2013 12:47:31 +0000 (13:47 +0100)]
Fix remaining leaks in Gnumeric reader

11 years agoFixed some more errors in the spreadsheet readers
John Darrington [Fri, 8 Mar 2013 08:59:07 +0000 (09:59 +0100)]
Fixed some more errors in the spreadsheet readers

11 years agozip-reader.c: Fix memory leak 20130308030505/pspp
John Darrington [Thu, 7 Mar 2013 20:45:43 +0000 (21:45 +0100)]
zip-reader.c: Fix memory leak

11 years agozip-test.c: Remove erroneous call to zip_member_unref
John Darrington [Thu, 7 Mar 2013 10:22:38 +0000 (11:22 +0100)]
zip-test.c: Remove erroneous call to zip_member_unref

11 years agozip-reader.c: Replace [cm]alloc by their x*alloc counterparts
John Darrington [Thu, 7 Mar 2013 10:21:40 +0000 (11:21 +0100)]
zip-reader.c: Replace [cm]alloc by their x*alloc counterparts

11 years agoFixed crash reading ODS spreadsheets and added a test case 20130305030502/pspp 20130306030504/pspp 20130307030505/pspp
John Darrington [Tue, 5 Mar 2013 08:15:35 +0000 (09:15 +0100)]
Fixed crash reading ODS spreadsheets and added a test case

11 years agoAdded a feature to read the meta data from spreadsheet files.
John Darrington [Mon, 4 Mar 2013 19:09:41 +0000 (20:09 +0100)]
Added a feature to read the meta data from spreadsheet files.

This is in preparation for upcoming features.

11 years agoZip Reader: Take members from the index if they exist. 20130218030502/pspp 20130219030502/pspp 20130220030503/pspp 20130221030502/pspp 20130222030502/pspp 20130223030503/pspp 20130224030502/pspp 20130225030503/pspp 20130226030506/pspp 20130227030504/pspp 20130228030505/pspp 20130301030502/pspp 20130302030503/pspp 20130303030506/pspp 20130304030502/pspp
John Darrington [Mon, 18 Feb 2013 08:35:53 +0000 (09:35 +0100)]
Zip Reader: Take members from the index if they exist.

This allows readers to be iterated more than once.

11 years agoFixed a bug reading gnumeric files. 20130217030503/pspp
John Darrington [Sat, 16 Feb 2013 13:44:31 +0000 (14:44 +0100)]
Fixed a bug reading gnumeric files.

Importing  gnumeric spreadsheets would assert-fail if there were empty columns at the start of the sheet.

11 years agoExamine vs. Boxplots: Avoid labels overlapping one another 20130214030508/pspp 20130215030508/pspp 20130216030504/pspp
John Darrington [Wed, 13 Feb 2013 12:03:00 +0000 (13:03 +0100)]
Examine vs. Boxplots: Avoid labels overlapping one another

One factored boxplots remove the name of the factor variables, since
these can be inferred from the chart title.  Also trim off any
leading whitespace from the values.  This reduces the chances of the
labels clashing with one another when many boxplots appear on the
same chart.

Closes bug #38132

11 years agoOutput Viewer Export: Automatically append filename suffix 20130213030508/pspp
John Darrington [Tue, 12 Feb 2013 14:07:11 +0000 (15:07 +0100)]
Output Viewer Export: Automatically append filename suffix

When exporting the output viewer using the file chooser, automatically append
a . and a three letter suffix indicating the format of the export.
Closes bug #38133

11 years agoREGRESSION: Added mention of the dependent variable to table titles. 20130210030503/pspp 20130211030502/pspp 20130212030504/pspp
John Darrington [Sat, 9 Feb 2013 16:19:58 +0000 (17:19 +0100)]
REGRESSION: Added mention of the dependent variable to table titles.

Closes #34732

11 years agoFixed compiler warning placement-parser.c 20130206030505/pspp 20130207030503/pspp 20130208030503/pspp 20130209030504/pspp
John Darrington [Tue, 5 Feb 2013 17:39:46 +0000 (18:39 +0100)]
Fixed compiler warning placement-parser.c

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 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.