pspp-builds.git
14 years agoSeparate table functions that format their arguments from those that don't.
Ben Pfaff [Tue, 11 Aug 2009 04:53:18 +0000 (21:53 -0700)]
Separate table functions that format their arguments from those that don't.

The tab_text, tab_joint_text, and tab_output_text functions, until now,
had an option bit TAT_PRINTF that specified whether they passed their text
argument through sprintf.  This interface was bad because it made it
impossible for GCC to tell whether it needed to verify a printf format
string or not.

This commit solves the problem by breaking each of these functions into one
that does format its argument and one that doesn't.

This is cross-ported from a similar commit on the master branch.

14 years agoAdd CONST_CAST macro, for casting away "const" more safely.
Ben Pfaff [Fri, 7 Aug 2009 04:45:38 +0000 (21:45 -0700)]
Add CONST_CAST macro, for casting away "const" more safely.

14 years agoAdd CHECK_POINTER_HAS_TYPE macro, and use it to make *_data macros safer.
Ben Pfaff [Sun, 9 Aug 2009 03:32:23 +0000 (20:32 -0700)]
Add CHECK_POINTER_HAS_TYPE macro, and use it to make *_data macros safer.

14 years agoEliminate unnecessary casts.
Ben Pfaff [Sun, 9 Aug 2009 03:34:44 +0000 (20:34 -0700)]
Eliminate unnecessary casts.

14 years agoAdd UP_CAST macro, for safer casting from contained data to its container.
Ben Pfaff [Sun, 9 Aug 2009 03:34:28 +0000 (20:34 -0700)]
Add UP_CAST macro, for safer casting from contained data to its container.

14 years agoEliminate casts that can be replaced by uses of the & operator.
Ben Pfaff [Thu, 6 Aug 2009 04:27:25 +0000 (21:27 -0700)]
Eliminate casts that can be replaced by uses of the & operator.

This increases type safety and so it's hard to see any downside.

14 years agooutput: Always use helper functions to access struct tab_table members.
Ben Pfaff [Thu, 6 Aug 2009 04:34:42 +0000 (21:34 -0700)]
output: Always use helper functions to access struct tab_table members.

The implementation of "struct tab_table" will be changing, so by always
using the helper functions we can reduce the amount of code that has to
change later to support those changes.

14 years agooutput: Remove write-only "col_group' member from struct tab_table.
Ben Pfaff [Wed, 5 Aug 2009 03:46:33 +0000 (20:46 -0700)]
output: Remove write-only "col_group' member from struct tab_table.

It probably makes sense to revive support for this feature at some point,
but that time has not yet arrived.  Instead, since it's currently not used
and not implemented, just remove it.

14 years agooutput: Get rid of write-only "hit" member in struct tab_joined_cell.
Ben Pfaff [Wed, 5 Aug 2009 03:01:44 +0000 (20:01 -0700)]
output: Get rid of write-only "hit" member in struct tab_joined_cell.

This member used to be used, but that use was eliminated in commit
1cc38c81df "Get rid of most global variables in outputting tables."

14 years agooutput: Fix warnings about unused function arguments in ODT driver.
Ben Pfaff [Wed, 5 Aug 2009 02:53:34 +0000 (19:53 -0700)]
output: Fix warnings about unused function arguments in ODT driver.

14 years agoConsolidate translatable strings into a common form.
John Darrington [Sat, 1 Aug 2009 17:38:22 +0000 (19:38 +0200)]
Consolidate translatable strings into a common form.

Be kind to the translators and reduce the number of
distinct strings they have to translate.

14 years agoAdded options to the ODF driver.
John Darrington [Sat, 1 Aug 2009 17:27:12 +0000 (19:27 +0200)]
Added options to the ODF driver.

Added some options to the OpenDocument driver.
Currently only two: "output-file" and "debug".

14 years agoFixed bug rendering joined columns
John Darrington [Sat, 1 Aug 2009 13:50:23 +0000 (15:50 +0200)]
Fixed bug rendering joined columns

14 years agoAdd a styles.xml file
John Darrington [Sat, 1 Aug 2009 10:23:26 +0000 (12:23 +0200)]
Add a styles.xml file

Add a basic style XML and have the table headings
rendered in a different style to the table contents.

14 years agoPrevent existing output file from interfereing with zip
John Darrington [Sat, 1 Aug 2009 09:10:03 +0000 (11:10 +0200)]
Prevent existing output file from interfereing with zip

14 years agoRevert inadvertently commited change to required pango version
John Darrington [Sat, 1 Aug 2009 06:31:10 +0000 (08:31 +0200)]
Revert inadvertently commited change to required pango version

14 years agoEnable joined cells to be rendered properly
John Darrington [Sat, 1 Aug 2009 06:29:31 +0000 (08:29 +0200)]
Enable joined cells to be rendered properly

14 years agoAdded a meta.xml file.
John Darrington [Fri, 31 Jul 2009 17:57:03 +0000 (19:57 +0200)]
Added a meta.xml file.

Add the meta.xml file, to contain (at present) the author's
name, version of pspp and time that the document was created.

14 years agoAdd comments and cleanup
John Darrington [Fri, 31 Jul 2009 08:58:02 +0000 (10:58 +0200)]
Add comments and cleanup

14 years agoAdd the file I forgot to include
John Darrington [Fri, 31 Jul 2009 07:10:59 +0000 (09:10 +0200)]
Add the file I forgot to include

14 years agoInitial attempt at an ODF driver
John Darrington [Fri, 31 Jul 2009 05:18:06 +0000 (07:18 +0200)]
Initial attempt at an ODF driver

14 years agooutput: Draw titles on charts in a larger font than other labels.
Ben Pfaff [Thu, 30 Jul 2009 04:33:19 +0000 (21:33 -0700)]
output: Draw titles on charts in a larger font than other labels.

14 years agooutput: Fix vertical alignment of text to a baseline in chart output.
Ben Pfaff [Thu, 30 Jul 2009 04:26:55 +0000 (21:26 -0700)]
output: Fix vertical alignment of text to a baseline in chart output.

This makes labels on pie charts look better, for example.

14 years agooutput: Use Cairo and Pango to draw charts, instead of libplot. v0.7.3
Ben Pfaff [Thu, 30 Jul 2009 04:19:41 +0000 (21:19 -0700)]
output: Use Cairo and Pango to draw charts, instead of libplot.

This paves the way for adding support for charts to the PSPPIRE GUI, since
Cairo can render to a window in GTK+ whereas libplot cannot.

I am aware of the following regressions versus the state before this
commit:

1. Alignment of text in charts on the baseline is not properly implemented.
   This makes the labels in pie charts look funny.

2. Chart titles are drawn in the same font size as other chart text.

3. Building without Cairo and Pango is broken.

4. The postscript output driver (as opposed to the cairo output driver in
   PostScript output mode) no longer supports charts.

I plan to fix #1, #2, and #3.  #4 is fixable too, but I don't know whether
it is worth it; I might prefer to delete the postscript output driver
altogether.

14 years agooutput: Make chart geometry the responsibility of the output driver.
Ben Pfaff [Wed, 29 Jul 2009 03:20:51 +0000 (20:20 -0700)]
output: Make chart geometry the responsibility of the output driver.

Currently, with libplot, all charts have the same geometry, because
libplot allows us to reasonably set the dimensions of the drawing area
to the same 1000x1000 size.  But cairo will produce strangely scaled
results if we attempt to do the same thing there (distorted font sizes,
etc.).  So make the output drivers responsible for setting up the chart
geometry, so that the output drivers can tell the chart drawing routines
the size of the drawing area.

14 years agocharts: Use numeric colors instead of color names.
Ben Pfaff [Tue, 28 Jul 2009 13:41:06 +0000 (06:41 -0700)]
charts: Use numeric colors instead of color names.

Cairo doesn't support color names, so this will ease the transition.

14 years agooutput: Make building without libplot possible again.
Ben Pfaff [Wed, 22 Jul 2009 04:46:02 +0000 (21:46 -0700)]
output: Make building without libplot possible again.

This fixes the remaining known functional regression versus the situation
before refactoring the charts implementation.

14 years agooutput: Use macro HAVE_CHARTS instead of NO_CHARTS.
Ben Pfaff [Thu, 9 Jul 2009 04:52:06 +0000 (21:52 -0700)]
output: Use macro HAVE_CHARTS instead of NO_CHARTS.

Double negatives make my brain hurt, so don't use them.

14 years agooutput: Remove barchart implementation, which is unused.
Ben Pfaff [Wed, 22 Jul 2009 04:12:53 +0000 (21:12 -0700)]
output: Remove barchart implementation, which is unused.

No procedure has ever output barcharts.  This code can be revived from the
history if we do add support for barcharts later.

14 years agoMove implementation of NP plots out of EXAMINE into the charts engine.
Ben Pfaff [Mon, 20 Jul 2009 00:11:21 +0000 (17:11 -0700)]
Move implementation of NP plots out of EXAMINE into the charts engine.

This seems like a helpful cleanup.  It should also ease making it possible
to again build PSPP without libplot, which was broken a number of commits
ago.

14 years agocharts: Allow passing a null pointer to chart_unref.
Ben Pfaff [Mon, 20 Jul 2009 00:11:46 +0000 (17:11 -0700)]
charts: Allow passing a null pointer to chart_unref.

14 years agooutput: Fix GUI output, which was broken in the chart refactoring.
Ben Pfaff [Wed, 15 Jul 2009 05:16:14 +0000 (22:16 -0700)]
output: Fix GUI output, which was broken in the chart refactoring.

Thanks to John Darrington for pointing out my mistake.

14 years agooutput: Make box-whisker plots work again.
Ben Pfaff [Sat, 4 Jul 2009 05:33:01 +0000 (22:33 -0700)]
output: Make box-whisker plots work again.

14 years agooutput: Refactor implementation of charts.
Ben Pfaff [Thu, 2 Jul 2009 23:59:08 +0000 (16:59 -0700)]
output: Refactor implementation of charts.

This commit addresses a weakness of the charts implementation in PSPP, in
that charts can only be sent to a single output device.  This is because
the chart code calls into a single output driver to obtain a libplot
plotting context and then passes that back into the calling code, which
draws on it and passes it back to the output driver.  This commit refactors
the code so that, instead, a chart is an ADT that is reponsible for knowing
how to draw itself on a plotting device.  Then the function for outputting
a chart applies this function to each output device.

This is more complicated than necessary: we could just loop over the set of
output devices and draw a chart on each one in turn.  But this level of
complication is being introduced now so that later we can keep around
charts in memory as long as necessary for the GUI output engine to export
them on user demand.

This commit introduces a couple of regressions:

* libplot is now required, not optional.

* Box-whisker plots are disabled.

This regressions will be fixed by later commits.

14 years agochart: Fix format string issues in draw_tick callers.
Ben Pfaff [Thu, 2 Jul 2009 03:56:17 +0000 (20:56 -0700)]
chart: Fix format string issues in draw_tick callers.

The 'label' argument to draw_tick is used as a printf-type format string,
so callers must pass "%s" to safely use an arbitrary string as a label.

Also, hist_draw_bar was doing its own snprintf, but this commit changes it
to take advantage of that provided by draw_tick.

14 years agochart: Fix format string issues in chart_write_title callers.
Ben Pfaff [Thu, 2 Jul 2009 03:50:33 +0000 (20:50 -0700)]
chart: Fix format string issues in chart_write_title callers.

The 'title' argument to chart_write_title is used as a printf-type format
string, so callers must pass "%s" to safely use an arbitrary string as a
title.

14 years agopiechart: Change 'angle' variable from static to automatic.
Ben Pfaff [Thu, 2 Jul 2009 02:29:49 +0000 (19:29 -0700)]
piechart: Change 'angle' variable from static to automatic.

14 years agopiechart: Fix spelling of "magnitude".
Ben Pfaff [Wed, 1 Jul 2009 23:42:44 +0000 (16:42 -0700)]
piechart: Fix spelling of "magnitude".

14 years agopiechart: Use definition of M_PI from GSL.
Ben Pfaff [Wed, 1 Jul 2009 23:39:52 +0000 (16:39 -0700)]
piechart: Use definition of M_PI from GSL.

The GSL header <gsl/gsl_math.h> makes sure that the standard BSD
mathematical constants are defined, so we don't have to do it ourselves.

14 years agooutput: Get rid of 'prc' member of struct outp_driver.
Ben Pfaff [Wed, 1 Jul 2009 22:55:35 +0000 (15:55 -0700)]
output: Get rid of 'prc' member of struct outp_driver.

Not only is having a per-procedure member in struct outp_driver a layering
violation, it wasn't very useful, so this commit gets rid of it.

14 years agoLIST: Don't use outp_driver 'prc' member any longer.
Ben Pfaff [Wed, 1 Jul 2009 22:54:50 +0000 (15:54 -0700)]
LIST: Don't use outp_driver 'prc' member any longer.

The LIST procedure is the only one that uses the 'prc' member of struct
outp_driver.  This commit gets rid of that use, so that 'prc' can be
removed, as part of a larger output subsystem cleanup.

14 years agooutput: Get rid of histogram_plot_n function.
Ben Pfaff [Wed, 1 Jul 2009 22:53:55 +0000 (15:53 -0700)]
output: Get rid of histogram_plot_n function.

For some reason we have two functions to plot histograms, one of which is
marked "deprecated" and the other of which is a trivial wrapper.  It's
easy, however, to get rid of one of them and make the caller in charge of
doing what the wrapper does, especially since the wrapper had only a single
caller.  That is what this commit does.

14 years agooutput: Fix segfault for writing output outside a command invocation.
Ben Pfaff [Wed, 1 Jul 2009 22:53:44 +0000 (15:53 -0700)]
output: Fix segfault for writing output outside a command invocation.

Running "make check" made this problem obvious, but it hadn't shown up in
my in-GUI testing.

14 years agooutput: Avoid functions added in GTK 2.14 in GUI output code.
Ben Pfaff [Mon, 29 Jun 2009 04:26:59 +0000 (21:26 -0700)]
output: Avoid functions added in GTK 2.14 in GUI output code.

14 years agooutput: Reduce Cairo minimum version to 1.5.
Ben Pfaff [Mon, 29 Jun 2009 03:22:42 +0000 (20:22 -0700)]
output: Reduce Cairo minimum version to 1.5.

Suggested by John Darrington.

14 years agooutput: Make double-clicking in GUI output overview pane scroll to table.
Ben Pfaff [Sat, 27 Jun 2009 05:22:54 +0000 (22:22 -0700)]
output: Make double-clicking in GUI output overview pane scroll to table.

14 years agooutput: Give the overview pane in the GUI output a reasonable initial width.
Ben Pfaff [Sat, 27 Jun 2009 04:58:00 +0000 (21:58 -0700)]
output: Give the overview pane in the GUI output a reasonable initial width.

14 years agooutput: Improve title display in overview pane of GUI output.
Ben Pfaff [Sat, 27 Jun 2009 04:37:36 +0000 (21:37 -0700)]
output: Improve title display in overview pane of GUI output.

14 years agooutput: Add overview pane to GUI output window.
Ben Pfaff [Wed, 24 Jun 2009 06:10:00 +0000 (23:10 -0700)]
output: Add overview pane to GUI output window.

14 years agooutput: Include command names in titles in GUI output.
Ben Pfaff [Tue, 23 Jun 2009 06:01:03 +0000 (23:01 -0700)]
output: Include command names in titles in GUI output.

The command name displayed by the output engine was the current command
name.  The GUI output was never displayed during the actual execution of a
command, so GUI titles never included a command name.

This commit puts the command name into the struct passed into the output
engine, so that it gets saved and displayed.

14 years agocrosstabs: Fix free of bad pointer and use-after-free error in cleanup.
Ben Pfaff [Mon, 22 Jun 2009 04:11:25 +0000 (21:11 -0700)]
crosstabs: Fix free of bad pointer and use-after-free error in cleanup.

In free_proc, 'pt' points within an array that is dynamically
allocated, not to a data structure that is dynamically allocated, so
we must not try to free it on each iteration.  Instead, free the
dynamic array itself (proc->pivots) only once.

14 years agooutput: Use "base" color for background in GUI output window.
Ben Pfaff [Sun, 21 Jun 2009 04:30:57 +0000 (21:30 -0700)]
output: Use "base" color for background in GUI output window.

The "base" color in GtkStyle is used as the background color for GTK+
widgets that display editable text, e.g. GtkEntry.  That's what we're
aiming for, eventually, with the PSPP GUI output, and the default
white "base" color looks better than the default gray background
color, so use it.

14 years agooutput: Use gtk_widget_show_all instead of gtk_widget_show_now.
Ben Pfaff [Sun, 21 Jun 2009 03:42:09 +0000 (20:42 -0700)]
output: Use gtk_widget_show_all instead of gtk_widget_show_now.

The gtk_widget_show_now function is not supposed to used lightly,
according to GTK+ documentation.  We don't really need it here, so
avoid it.

14 years agooutput: Make GUI output window scrollable.
Ben Pfaff [Sun, 21 Jun 2009 03:29:08 +0000 (20:29 -0700)]
output: Make GUI output window scrollable.

14 years agooutput: Implement very rudimentary graphical GUI output for PSPPIRE.
Ben Pfaff [Wed, 17 Jun 2009 05:38:52 +0000 (22:38 -0700)]
output: Implement very rudimentary graphical GUI output for PSPPIRE.

It's quick and dirty and lacks many important features (such as
scrolling, and not leaking memory), but it does look a lot better than
a text editor window.

14 years agooutput: Make tables reference-counted.
Ben Pfaff [Sat, 20 Jun 2009 05:52:40 +0000 (22:52 -0700)]
output: Make tables reference-counted.

Adding a reference count to tab_table allows output drivers to retain
a copy of a table even after the main output engine is done.  This
will be useful for the GUI output driver.

14 years agooutput: Improve warnings about negative table dimensions.
Ben Pfaff [Sat, 20 Jun 2009 05:51:31 +0000 (22:51 -0700)]
output: Improve warnings about negative table dimensions.

14 years agooutput: Make outp_parse_options slightly more general-purpose.
Ben Pfaff [Sat, 20 Jun 2009 05:57:16 +0000 (22:57 -0700)]
output: Make outp_parse_options slightly more general-purpose.

This function can be a little more flexible in the interface it offers
its callers by letting them provide general auxiliary data instead of
having to provide a struct outp_driver *.

14 years agoMake the UTF-8 graphic devices avoid overstriking by default.
Ben Pfaff [Sat, 20 Jun 2009 02:44:14 +0000 (19:44 -0700)]
Make the UTF-8 graphic devices avoid overstriking by default.

The UTF-8 graphic devices introduced in the previous commit use
backspaces and overstriking to indicate bold, but most users probably
won't appreciate that, since it makes it harder to work with the
output files in many text editors.  Thus, disable this behavior.

Thanks to John Darrington for pointing out the issue.

14 years agoAdd Unicode (UTF-8) line-drawing support to device configuration.
Ben Pfaff [Thu, 18 Jun 2009 05:31:03 +0000 (22:31 -0700)]
Add Unicode (UTF-8) line-drawing support to device configuration.

Thanks to jwshipley@jwshipley.karoo.co.uk for the suggestion.

14 years agooutput: Make allocating and freeing drivers independent of configuration.
Ben Pfaff [Wed, 17 Jun 2009 05:34:16 +0000 (22:34 -0700)]
output: Make allocating and freeing drivers independent of configuration.

Until now, the output subsystem has taken responsibility for
allocating, freeing, registering, and unregistering output drivers.
This is usually what we want it to do, but PSPPIRE will soon want to
register an output driver of its own, independent of the main driver
configuration mechanism.  This commit refactors the output driver
subsystem slightly to make this possible.

14 years agocairo: Use default Cairo scale factor.
Ben Pfaff [Tue, 16 Jun 2009 05:53:39 +0000 (22:53 -0700)]
cairo: Use default Cairo scale factor.

By not using cairo_scale() at all, the rest of the code, especially
the Pango-related code, seems to make more sense.

14 years agooutput: Make global variables less global.
Ben Pfaff [Tue, 16 Jun 2009 04:40:06 +0000 (21:40 -0700)]
output: Make global variables less global.

table_num and subtable_num were previously global variables that were
referred to from multiple files.  Now that we want to make tables
renderable from arbitrary contexts, though, we need to save the table
number with the table, so this change implements that.

14 years agosparse-xarray: Add missing #include <limits.h>.
Ben Pfaff [Mon, 15 Jun 2009 20:52:17 +0000 (13:52 -0700)]
sparse-xarray: Add missing #include <limits.h>.

Thanks to michel <michel@cecaps.ufmg.br> for reporting the problem.

14 years agooutput: Make table dimension functions work in arbitrary contexts.
Ben Pfaff [Mon, 15 Jun 2009 04:50:46 +0000 (21:50 -0700)]
output: Make table dimension functions work in arbitrary contexts.

Until now the function passed to tab_dim has only been called at the
time that the table is passed to tab_submit.  But in upcoming commits
the table will be kept around and rendered possibly much later (by the
GUI), so the function to tab_dim has to be sure to only use data that
will exist at that time.  Thus, this commit makes it possible to free
the auxiliary data passed to that function, so that in the few cases
where it needs to keep around extra data, it can do so without leaking
memory.  At the same time, convert the few functions that do need this
feature to use it.

14 years agooutput: Use "struct string" in tabi_title in place of fixed-size buffer.
Ben Pfaff [Sat, 13 Jun 2009 05:12:13 +0000 (22:12 -0700)]
output: Use "struct string" in tabi_title in place of fixed-size buffer.

This ensures that extra-long titles provided by the user do not overflow
the stack.

14 years agoGet rid of most global variables in outputting tables.
Ben Pfaff [Thu, 11 Jun 2009 05:49:47 +0000 (22:49 -0700)]
Get rid of most global variables in outputting tables.

14 years agocairo: Fix values of prop_em_width, fixed_width.
Ben Pfaff [Fri, 12 Jun 2009 04:54:15 +0000 (21:54 -0700)]
cairo: Fix values of prop_em_width, fixed_width.

For some reason prop_em_width and fixed_width were getting very small
values, e.g. 5 and 7, when they were being pulled from the font metrics.
These values should be more like 1024 times larger and  I can't figure
why they aren't.  But this works around the problem for now.

14 years agooutput: Get rid of unused SOM_ROW, SOM_COLUMN enums.
Ben Pfaff [Wed, 10 Jun 2009 03:00:15 +0000 (20:00 -0700)]
output: Get rid of unused SOM_ROW, SOM_COLUMN enums.

14 years agooutput: Get rid of unused members of struct som_table_class.
Ben Pfaff [Wed, 10 Jun 2009 02:48:50 +0000 (19:48 -0700)]
output: Get rid of unused members of struct som_table_class.

I planned to use these at one point, but no longer do.

14 years agooutput: Remove static variables from manager code.
Ben Pfaff [Tue, 9 Jun 2009 05:27:15 +0000 (22:27 -0700)]
output: Remove static variables from manager code.

14 years agotable: Replace macros by inline functions, to improve type safety.
Ben Pfaff [Tue, 9 Jun 2009 05:19:33 +0000 (22:19 -0700)]
table: Replace macros by inline functions, to improve type safety.

14 years agoFix type mismatch between value_hash prototype and definition.
Ben Pfaff [Fri, 12 Jun 2009 03:25:49 +0000 (20:25 -0700)]
Fix type mismatch between value_hash prototype and definition.

Thanks to michel <michel@cecaps.ufmg.br> for pointing out the problem.

14 years agocairo: Fix header box drawing.
Ben Pfaff [Tue, 9 Jun 2009 03:37:46 +0000 (20:37 -0700)]
cairo: Fix header box drawing.

14 years agocairo: Set line width.
Ben Pfaff [Tue, 9 Jun 2009 03:37:28 +0000 (20:37 -0700)]
cairo: Set line width.

The default Cairo line width is much thinner than the default PSPP line
width, and made the boxes look too pale and ephemeral.  This fixes it.

14 years agooutput: Add initial support for PSPP output via Cairo.
Ben Pfaff [Mon, 8 Jun 2009 21:30:40 +0000 (14:30 -0700)]
output: Add initial support for PSPP output via Cairo.

This commit adds some support for PSPP output using Cairo.  For now, that
means that you can produce PDF, PostScript, and SVG output to files if you
have Cairo and Pango available.

The output isn't perfect.  Descenders in text sometimes stick out beyond
table cell boundaries.  Charts aren't supported.  There is no
documentation update.  And I've tested it on a grand total of 1 (one!)
input file.  But I'm pushing out now for anyone who's interested.

14 years agoRemove spurious Makefile from src/output.
Ben Pfaff [Sun, 7 Jun 2009 20:14:23 +0000 (13:14 -0700)]
Remove spurious Makefile from src/output.

14 years agocrosstabs: Fix chi-square display and add regression test.
Ben Pfaff [Sun, 7 Jun 2009 04:04:21 +0000 (21:04 -0700)]
crosstabs: Fix chi-square display and add regression test.

Bug #26739.

14 years agocrosstab: Remove struct that was defined but never used.
Ben Pfaff [Sun, 7 Jun 2009 03:53:10 +0000 (20:53 -0700)]
crosstab: Remove struct that was defined but never used.

14 years agocrosstabs: Remove write-only variable.
Ben Pfaff [Sun, 7 Jun 2009 03:44:49 +0000 (20:44 -0700)]
crosstabs: Remove write-only variable.

14 years agocrosstabs: Fix segfault when chi-square was requested.
Ben Pfaff [Sun, 7 Jun 2009 03:30:14 +0000 (20:30 -0700)]
crosstabs: Fix segfault when chi-square was requested.

Bug #26739.

14 years agodatasheet-test: Add support for testing string backing store columns.
Ben Pfaff [Wed, 3 Jun 2009 05:21:01 +0000 (22:21 -0700)]
datasheet-test: Add support for testing string backing store columns.

14 years agocrosstabs: Trim unsightly spaces from titles in output.
Ben Pfaff [Wed, 3 Jun 2009 04:55:50 +0000 (21:55 -0700)]
crosstabs: Trim unsightly spaces from titles in output.

Unfortunately, none of the tests exercise this code, so it's hard to say
whether it is correct.

14 years agocrosstabs: Fix memory leaks.
Ben Pfaff [Wed, 3 Jun 2009 02:52:18 +0000 (19:52 -0700)]
crosstabs: Fix memory leaks.

14 years agoargv-parser: Add assertion to find likely bugs in client code.
Ben Pfaff [Sat, 30 May 2009 04:51:45 +0000 (21:51 -0700)]
argv-parser: Add assertion to find likely bugs in client code.

14 years agodatasheet: Fix bugs in datasheet_resize_column() found with new test.
Ben Pfaff [Sat, 30 May 2009 04:51:19 +0000 (21:51 -0700)]
datasheet: Fix bugs in datasheet_resize_column() found with new test.

14 years agodatasheet-test: Add test for datasheet_resize_column().
Ben Pfaff [Sat, 30 May 2009 04:46:24 +0000 (21:46 -0700)]
datasheet-test: Add test for datasheet_resize_column().

14 years agodatasheet-test: Fix printing of string values in error messages.
Ben Pfaff [Sat, 30 May 2009 04:43:33 +0000 (21:43 -0700)]
datasheet-test: Fix printing of string values in error messages.

14 years agodatasheet-test: Check duplicate states before discarding them.
Ben Pfaff [Sat, 30 May 2009 04:26:13 +0000 (21:26 -0700)]
datasheet-test: Check duplicate states before discarding them.

By failing to check states whose hashes already appeared in the model
checker table, the datasheet test was missing some bugs.  This commit
changes the datasheet test code to check the state before it checks for
the hash.

14 years agodatasheet-test: Make column widths to test configurable on command line.
Ben Pfaff [Thu, 28 May 2009 05:22:48 +0000 (22:22 -0700)]
datasheet-test: Make column widths to test configurable on command line.

14 years agodatasheet-test: Don't test null operations.
Ben Pfaff [Sat, 30 May 2009 04:45:28 +0000 (21:45 -0700)]
datasheet-test: Don't test null operations.

By not testing null operations (such as inserting or deleting 0 rows or
columns) the duration of the test is cut roughly in half, with little if
any reduction in test coverage.

14 years agosparse-xarray-test: Style and comment fixes.
Ben Pfaff [Sat, 30 May 2009 04:50:12 +0000 (21:50 -0700)]
sparse-xarray-test: Style and comment fixes.

14 years agovalue: New function value_swap.
Ben Pfaff [Wed, 27 May 2009 06:04:32 +0000 (23:04 -0700)]
value: New function value_swap.

14 years agoMove datasheet test out of PSPP into a separate binary.
Ben Pfaff [Wed, 27 May 2009 05:02:48 +0000 (22:02 -0700)]
Move datasheet test out of PSPP into a separate binary.

When it's not difficult to do so, it is better to put tests in separate
binaries instead of in the PSPP binaries, so that the binaries are not
burdened with code that is not of real interest to users and to make the
main PSPP binaries build faster.

14 years agoMake MAX_SHORT_STRING an implementation detail of the "value" code.
Ben Pfaff [Tue, 26 May 2009 03:24:07 +0000 (20:24 -0700)]
Make MAX_SHORT_STRING an implementation detail of the "value" code.

MAX_SHORT_STRING used to be important.  It was referenced all over the
source tree.  Now, there is little reason for code outside the "value"
code itself to use it.

14 years agoUse MAX_SHORT_STRING in place of MIN_LONG_STRING.
Ben Pfaff [Tue, 26 May 2009 03:22:01 +0000 (20:22 -0700)]
Use MAX_SHORT_STRING in place of MIN_LONG_STRING.

There is no good reason to have both of these constants, so replace all
uses of MAX_LONG_STRING by MAX_SHORT_STRING.

14 years agoFix portable file reader use of long strings.
Ben Pfaff [Tue, 26 May 2009 03:21:08 +0000 (20:21 -0700)]
Fix portable file reader use of long strings.

This code hadn't been converted to the new "union value" representation,
where a single "union value" always represents a whole data item.  This
commit fixes that.

14 years agoGet rid of uses of MAX_SHORT_STRING in Gnumeric and PostgreSQL readers.
Ben Pfaff [Tue, 26 May 2009 03:20:07 +0000 (20:20 -0700)]
Get rid of uses of MAX_SHORT_STRING in Gnumeric and PostgreSQL readers.

MAX_SHORT_STRING is now intended to be an implementation detail of the
value code.  There is no real reason that the Gnumeric or PostgreSQL
readers need to use it, so make them use their own constants instead.

14 years agoImplement missing values for long string variables.
Ben Pfaff [Tue, 26 May 2009 03:07:19 +0000 (20:07 -0700)]
Implement missing values for long string variables.

14 years agoFix test failure introduced along with parse_value().
Ben Pfaff [Mon, 25 May 2009 19:36:21 +0000 (12:36 -0700)]
Fix test failure introduced along with parse_value().