Ben Pfaff [Tue, 11 Aug 2009 13:58:59 +0000 (06:58 -0700)]
EXAMINE: Fix null pointer dereference introduced in commit
b46b794dfb9.
This code initializes metric->box_whisker, so it must only take its address
afterward.
Ben Pfaff [Tue, 11 Aug 2009 21:18:26 +0000 (14:18 -0700)]
Merge master into output branch.
Ben Pfaff [Tue, 11 Aug 2009 05:38:21 +0000 (22:38 -0700)]
Delete tab_raw function and tab_alloc macro.
This function and macro were only used within crosstabs.q. They violate
encapsulation (though not too badly) and since it is not difficult to
remove them, this commit does so.
Ben Pfaff [Tue, 11 Aug 2009 05:01:16 +0000 (22:01 -0700)]
Delete tab_create()'s unused third parameter.
This parameter was used a long time ago, but it is no longer needed, so
remove it.
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.
Ben Pfaff [Fri, 7 Aug 2009 04:45:38 +0000 (21:45 -0700)]
Add CONST_CAST macro, for casting away "const" more safely.
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.
Ben Pfaff [Sun, 9 Aug 2009 03:34:44 +0000 (20:34 -0700)]
Eliminate unnecessary casts.
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.
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.
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.
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.
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."
Ben Pfaff [Wed, 5 Aug 2009 02:53:34 +0000 (19:53 -0700)]
output: Fix warnings about unused function arguments in ODT driver.
Jason Stover [Mon, 3 Aug 2009 15:26:56 +0000 (11:26 -0400)]
Cruft removal
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.
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".
John Darrington [Sat, 1 Aug 2009 13:50:23 +0000 (15:50 +0200)]
Fixed bug rendering joined columns
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.
John Darrington [Sat, 1 Aug 2009 09:10:03 +0000 (11:10 +0200)]
Prevent existing output file from interfereing with zip
John Darrington [Sat, 1 Aug 2009 06:31:10 +0000 (08:31 +0200)]
Revert inadvertently commited change to required pango version
John Darrington [Sat, 1 Aug 2009 06:29:31 +0000 (08:29 +0200)]
Enable joined cells to be rendered properly
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.
John Darrington [Fri, 31 Jul 2009 08:58:02 +0000 (10:58 +0200)]
Add comments and cleanup
John Darrington [Fri, 31 Jul 2009 07:10:59 +0000 (09:10 +0200)]
Add the file I forgot to include
John Darrington [Fri, 31 Jul 2009 05:18:06 +0000 (07:18 +0200)]
Initial attempt at an ODF driver
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.
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.
John Darrington [Thu, 30 Jul 2009 04:21:38 +0000 (06:21 +0200)]
Use u8_cpy instead of memcpy.
Use u8_cpy instead of memcpy since the
former provides better type checking.
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.
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.
Jason Stover [Wed, 29 Jul 2009 01:32:31 +0000 (21:32 -0400)]
Merged changes from branch interaction-review
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.
John Darrington [Tue, 28 Jul 2009 11:02:06 +0000 (13:02 +0200)]
Remove commented code
John Darrington [Tue, 28 Jul 2009 10:59:42 +0000 (12:59 +0200)]
remove unused return value
John Darrington [Tue, 28 Jul 2009 10:55:23 +0000 (12:55 +0200)]
Allow ranges with left to right and bottom to top sense to be selected.
John Darrington [Tue, 28 Jul 2009 05:05:42 +0000 (07:05 +0200)]
Replace safe_strcmp with g_strcmp0.
John Darrington [Tue, 28 Jul 2009 04:46:24 +0000 (06:46 +0200)]
Fix clipboard export of non-ascii strings.
Fixed problem pasting sheet data from psppire to
openoffice.org and gnumeric which contained non-ascii
characters. Tested with openoffice.org 2.4 and
gnumeric 1.8.3
John Darrington [Mon, 27 Jul 2009 17:41:25 +0000 (19:41 +0200)]
Fix bug in casemapping long strings.
Thanks to Ben Pfaff for pointing out the error.
John Darrington [Mon, 27 Jul 2009 11:56:03 +0000 (13:56 +0200)]
Remove the RESIZE feature of the sheet.
This feature is currently unused, and probably
broken.
John Darrington [Mon, 27 Jul 2009 11:38:13 +0000 (13:38 +0200)]
Re-enable signal emmission on row/column selection
John Darrington [Mon, 27 Jul 2009 10:58:06 +0000 (12:58 +0200)]
Removed unused function
John Darrington [Mon, 27 Jul 2009 10:56:13 +0000 (12:56 +0200)]
Removed unnecessary variable and consequently unreachable code.
John Darrington [Mon, 27 Jul 2009 10:51:36 +0000 (12:51 +0200)]
Avoid the need for an extra click when de-selecting a region
John Darrington [Mon, 27 Jul 2009 10:44:26 +0000 (12:44 +0200)]
Re-enable selection of complete rows/columns
John Darrington [Mon, 27 Jul 2009 09:51:03 +0000 (11:51 +0200)]
Remove unused function psppire_sheet_cell_get_state
John Darrington [Mon, 27 Jul 2009 09:46:43 +0000 (11:46 +0200)]
Prevent var sheet from traversing to an invalid cell
John Darrington [Mon, 27 Jul 2009 09:29:43 +0000 (11:29 +0200)]
Redraw affected areas after de-selecting a region
John Darrington [Mon, 27 Jul 2009 09:22:00 +0000 (11:22 +0200)]
Redraw selection when reducing its area.
This change ensures that the area of the selection
is properly indicated when it's in the process of
being decreasing its area as well as increasing it.
John Darrington [Mon, 27 Jul 2009 09:12:18 +0000 (11:12 +0200)]
Replaced GTK_STATE_NORMAL with PSPPIRE_SHEET_NORMAL where appropriate
John Darrington [Mon, 27 Jul 2009 09:06:51 +0000 (11:06 +0200)]
Removed unnecessary variables
John Darrington [Mon, 27 Jul 2009 08:53:38 +0000 (10:53 +0200)]
Made selection a bit more reliable
John Darrington [Mon, 27 Jul 2009 07:55:38 +0000 (09:55 +0200)]
Remove unnecessary variable
John Darrington [Mon, 27 Jul 2009 07:48:43 +0000 (09:48 +0200)]
Partial fix of selection in the sheet.
This change re-enables the display of sheet
selections. Unfortunately, the selected cells
aren't properly de-selected (yet).
John Darrington [Sun, 26 Jul 2009 08:02:06 +0000 (10:02 +0200)]
Whitespace changes for the benefit of xgettext.
It would seem that xgettext wants the TRANSLATORS
comments to be on the line immediately preceeding the
translatable string.
John Darrington [Sat, 25 Jul 2009 14:27:30 +0000 (16:27 +0200)]
Disable extend_selection call.
Temporarily disable the call to psppire_sheet_extend_selection
since it interferes with the active cell border and selection
is currently not working anyway.
John Darrington [Sat, 25 Jul 2009 08:53:05 +0000 (10:53 +0200)]
Add "dictionary" property to PsppireVarStore and use it.
Instead of abusing the encapsulation of PsppireVarStore,
by accessing the internal dictionary member directly, add
a "dictionary" property. This should also take care of the
reference counting of the dict, which wasn't working properly.
John Darrington [Fri, 24 Jul 2009 17:23:43 +0000 (19:23 +0200)]
Change signature of text_to_value.
Now, text_to_value initialises the value, and expects
the caller to destroy it.
This fixes some gui bugs where strange things happened with long string
value labels and missing values.
John Darrington [Fri, 24 Jul 2009 16:47:33 +0000 (18:47 +0200)]
remove return values from callbacks which don't need them
John Darrington [Thu, 23 Jul 2009 12:10:58 +0000 (14:10 +0200)]
Fix warnings in flip command.
Use data_in / data_out to convert between names and values,
instead of doing it ourselves.
John Darrington [Thu, 23 Jul 2009 11:46:21 +0000 (13:46 +0200)]
Remove reference to roc.h which doesn't exist.
John Darrington [Thu, 23 Jul 2009 06:15:20 +0000 (08:15 +0200)]
Merge commit 'origin/stable'
Conflicts:
src/language/stats/t-test.q
John Darrington [Thu, 23 Jul 2009 05:23:26 +0000 (07:23 +0200)]
Fix merge problems
John Darrington [Thu, 23 Jul 2009 05:05:41 +0000 (07:05 +0200)]
Merge commit 'origin/roc'
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.
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.
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.
John Darrington [Tue, 21 Jul 2009 13:43:08 +0000 (15:43 +0200)]
Add perl functions to get the format of a variable
John Darrington [Mon, 20 Jul 2009 04:38:23 +0000 (06:38 +0200)]
Remove double semicolons.
John Darrington [Mon, 20 Jul 2009 04:34:38 +0000 (06:34 +0200)]
Replace caseproto_clone with caseproto_ref
Also unref the proto on destruction of the translator.
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.
Ben Pfaff [Mon, 20 Jul 2009 00:11:46 +0000 (17:11 -0700)]
charts: Allow passing a null pointer to chart_unref.
John Darrington [Sun, 19 Jul 2009 18:20:36 +0000 (20:20 +0200)]
Added more (hopefully usefull) comments
John Darrington [Sun, 19 Jul 2009 17:27:51 +0000 (19:27 +0200)]
Add some comments and macros to make the code more readable
John Darrington [Sun, 19 Jul 2009 12:20:07 +0000 (14:20 +0200)]
Add assertion to check code consitency
John Darrington [Sun, 19 Jul 2009 11:35:35 +0000 (13:35 +0200)]
Fix cleanup of ROC command.
Properly deallocate variables, and use correct
symbols for parser return values. Also, delete
roc.h which is unnecessary. Thanks to Ben Pfaff
for pointing out these problems.
John Darrington [Sun, 19 Jul 2009 11:04:39 +0000 (13:04 +0200)]
Respect the constness of caseproto.
New function caseproto_clone. This means we
can clone a proto, then mutate it as we want.
John Darrington [Sun, 19 Jul 2009 09:41:49 +0000 (11:41 +0200)]
Corrected spelling of "consolidate".
Thanks to Ben Pfaff for pointing out my mistake.
John Darrington [Sun, 19 Jul 2009 09:35:38 +0000 (11:35 +0200)]
Added the '=' to the plot subcommand's documentation.
Thanks to Ben Pfaff for pointing this out.
John Darrington [Sat, 18 Jul 2009 11:38:49 +0000 (13:38 +0200)]
Avoid compiler warning
John Darrington [Sat, 18 Jul 2009 11:20:38 +0000 (13:20 +0200)]
Merge commit 'origin/data-encoding'
Conflicts:
src/language/dictionary/split-file.c
John Darrington [Sat, 18 Jul 2009 10:38:02 +0000 (12:38 +0200)]
Add comment explaining the meaning of encoding to data_out
John Darrington [Sat, 18 Jul 2009 10:34:30 +0000 (12:34 +0200)]
The length of the string is now not always the
same as the format width.
Thanks to Ben Pfaff for pointing this out.
John Darrington [Sat, 18 Jul 2009 10:29:35 +0000 (12:29 +0200)]
Improve code to trim leading spaces from numeric output.
Ben Pfaff pointed out that the code to chomp the results
of formated doubles was no longer correct. This change
fixes that.
John Darrington [Sat, 18 Jul 2009 10:08:04 +0000 (12:08 +0200)]
Use data_out_pool in crosstabs.q
We were erroneously allocating a buffer before
the size of the contents were known. Using
data_out_pool avoids this problem. Thanks to
Ben Pfaff for pointing this out.
John Darrington [Sat, 18 Jul 2009 09:32:46 +0000 (11:32 +0200)]
Before recoding a variable's name, check that it
doesn't clash with an existing one.
Thanks to Ben Pfaff for pointing out this potential
problem.
Jason Stover [Fri, 17 Jul 2009 20:02:02 +0000 (16:02 -0400)]
pspp_linreg(): Use cache->n_coeffs to set the dimensions of sw, instead of
cache->n_indeps, which may give incorrect dimension in the case
of categorical variables. Fixes bug referenced in bug report
26861.
John Darrington [Fri, 17 Jul 2009 15:11:44 +0000 (23:11 +0800)]
Ensure correct behaviour when the state var is missing.
When the state variable is missing, then the entire
case is skipped.
John Darrington [Fri, 17 Jul 2009 15:04:22 +0000 (23:04 +0800)]
Update documentation regarding missing values.
Explicitly mention that cases are excluded on a
listwise basis.
John Darrington [Fri, 17 Jul 2009 14:48:29 +0000 (22:48 +0800)]
Fix ROC behaviour in the presence of missing values.
Make sure that the ROC command's behaviour is correct,
when missing values appear in the result variable.
John Darrington [Fri, 17 Jul 2009 07:30:40 +0000 (15:30 +0800)]
Corrected typos in the perl documentation
Ben Pfaff [Thu, 16 Jul 2009 05:19:33 +0000 (22:19 -0700)]
i18n: Merge translatable strings.
Ben Pfaff [Thu, 16 Jul 2009 05:15:03 +0000 (22:15 -0700)]
"Sig." is an abbreviation, "Exact" is not.
Ben Pfaff [Thu, 16 Jul 2009 05:12:41 +0000 (22:12 -0700)]
i18n: Eliminate some translatable strings.
Ben Pfaff [Thu, 16 Jul 2009 05:12:07 +0000 (22:12 -0700)]
i18n: Reduce translatable strings in SHOW command.
All the output from the SHOW command is of the form "%s is %s." but the
translators were being asked to translate similar strings over and over
again. Reduce their load by getting rid of many translatable strings.
Ben Pfaff [Thu, 16 Jul 2009 05:10:17 +0000 (22:10 -0700)]
i18n: Change some strings to reduce work of translation.
PSPP has a number of strings that happen to be phrased differently for no
particular reason. This commit changes some of those strings to be
exactly the same as other ones, to make the work of translators easier.
Ben Pfaff [Thu, 16 Jul 2009 04:15:39 +0000 (21:15 -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.
Ben Pfaff [Thu, 16 Jul 2009 02:58:01 +0000 (19:58 -0700)]
Consistently capitalize the name "Gnumeric".
Thanks to Harry Thijssen for pointing out the inconsistency.
John Darrington [Wed, 15 Jul 2009 18:25:42 +0000 (02:25 +0800)]
Fixed bug reporting the significance of paired value t-test.
Due to a cut and paste error, the significance of paired
t-tests was wrong when the value of T was positive.
Thanks to Mike Griffiths for reporting this problem.
John Darrington [Wed, 15 Jul 2009 12:19:49 +0000 (20:19 +0800)]
New function prepare_cutpoints
Move the code which creates the cutpoints into its own
function. This makes for easier reading IMO.