pspp
11 years agooutput: Make default output file name depend on the format.
Ben Pfaff [Sat, 24 Nov 2012 20:03:42 +0000 (12:03 -0800)]
output: Make default output file name depend on the format.

Before this commit, "-O html" caused HTML output to be written to a file
named "-", which is confusing.  After this commit, it is written to a file
named "pspp.html".  Similarly for other output drivers, except that text
and CSV output are still written to stdout by default.

Bug #35030.
Reported by John Darrington.

11 years agoCROSSTABS: Use FORMAT setting to control output format.
Ben Pfaff [Sat, 24 Nov 2012 19:11:17 +0000 (11:11 -0800)]
CROSSTABS: Use FORMAT setting to control output format.

Reported by Daniel Harper.

11 years agoFrequencies dialog: Convert to new system
John Darrington [Sat, 24 Nov 2012 15:29:39 +0000 (16:29 +0100)]
Frequencies dialog: Convert to new system

11 years agoFixed bug in NPAR BINOMIAL 20121124030501/pspp
John Darrington [Sat, 24 Nov 2012 08:06:54 +0000 (09:06 +0100)]
Fixed bug in NPAR BINOMIAL

This bug would crash when an incorrect syntax was encountered.

11 years agoBinomial test dialog: Convert to new style of action objects.
John Darrington [Sat, 24 Nov 2012 07:46:15 +0000 (08:46 +0100)]
Binomial test dialog:  Convert to new style of action objects.

11 years agoFix compiler warning
John Darrington [Fri, 23 Nov 2012 18:59:42 +0000 (19:59 +0100)]
Fix compiler warning

11 years agoRefactoring: common function set_sensitivity from toggle
John Darrington [Fri, 23 Nov 2012 18:49:03 +0000 (19:49 +0100)]
Refactoring: common function set_sensitivity from toggle

Many dialog boxes have a signal handler to set the sensitivity
of a widget, according to the state of a toggle button.  Until
now, they had all written their own.

11 years agoLogistic Regression: Ignore cases with missing dependent variables. 20121123030503/pspp
John Darrington [Fri, 23 Nov 2012 08:01:36 +0000 (09:01 +0100)]
Logistic Regression: Ignore cases with missing dependent variables.

Prior to this change, cases with missing values in the predictor
variables were ignored, but cases with missing values only in the
dependent variable would provoke an error.  Subsequent to this change
such cases are also ignored.  This seems to be the behaviour of other
software, despite what their documentation may suggest.

11 years agoLogistic Regression: Added options dialog box
John Darrington [Thu, 22 Nov 2012 19:15:44 +0000 (20:15 +0100)]
Logistic Regression: Added options dialog box

11 years agoLogistic Regression: Added a test to check the confidence interval display
John Darrington [Thu, 22 Nov 2012 15:25:06 +0000 (16:25 +0100)]
Logistic Regression: Added a test to check the confidence interval display

11 years agoLogistic Regression: Fix bug where some confidence intervals were not reported.
John Darrington [Thu, 22 Nov 2012 14:39:48 +0000 (15:39 +0100)]
Logistic Regression: Fix bug where some confidence intervals were not reported.

11 years agoLogistic Regression: Calculate the logs of the likelihood instead of the raw value. 20121122030503/pspp
John Darrington [Wed, 21 Nov 2012 21:13:27 +0000 (22:13 +0100)]
Logistic Regression: Calculate the logs of the likelihood instead of the raw value.

The likelihood values can become extremely large which can result in
lost precision in a double.  This change therefore calculates the
logarithms of the likelihoods instead of their actual value.

11 years agoLogistic Regression Dialog: Added missing shortcut target.
John Darrington [Wed, 21 Nov 2012 18:13:20 +0000 (19:13 +0100)]
Logistic Regression Dialog: Added missing shortcut target.

11 years agoChanged the labels of the Regression menu to keep them shorter.
John Darrington [Wed, 21 Nov 2012 18:10:06 +0000 (19:10 +0100)]
Changed the labels of the Regression menu to keep them shorter.

11 years agoAdded rudimentary version of the Logistic Regression Dialog 20121121030502/pspp
John Darrington [Tue, 20 Nov 2012 18:04:00 +0000 (19:04 +0100)]
Added rudimentary version of the Logistic Regression Dialog

11 years agoAnalyze Menu: New submenu for Regression
John Darrington [Tue, 20 Nov 2012 17:05:07 +0000 (18:05 +0100)]
Analyze Menu: New submenu for Regression

Move the Linear Regression menuitem into a new submenu Regression.
This is in preparation for a new menuitem for Logistic Regression

11 years agoFix (again) problems displaying a GtkSourceView widget on Cygwin
John Darrington [Tue, 20 Nov 2012 11:32:34 +0000 (12:32 +0100)]
Fix (again) problems displaying a GtkSourceView widget on Cygwin

Under certain compiler options, the effect of the gtk_*get_type
function call was optimised away.  This change fixes that.  It
seems that both static and volatile are necessary, in order to
avoid the compiler from complaining and/or optimising the call
away.

11 years agoLogistic Regression: Optimise the classification calculations. 20121120030502/pspp
John Darrington [Tue, 20 Nov 2012 09:32:14 +0000 (10:32 +0100)]
Logistic Regression: Optimise the classification calculations.

Instead of calculating the logit of the prediction for each case,
pre-calculate the inverse logit of the threshold before the process
starts.  This should give a small performance gain..

11 years agoFixed Texinfo problems which arise under Texinfo 4.13.90
John Darrington [Mon, 19 Nov 2012 18:45:14 +0000 (19:45 +0100)]
Fixed Texinfo problems which arise under Texinfo 4.13.90

11 years agoLogistic Regression: Added the Classification Table
John Darrington [Mon, 19 Nov 2012 14:35:43 +0000 (15:35 +0100)]
Logistic Regression: Added the Classification Table

Added a table to logistic regression to show how the predicted values
would be classified by the calculated coefficients.

11 years agologistic.c: minor refactoring
John Darrington [Thu, 15 Nov 2012 14:23:37 +0000 (15:23 +0100)]
logistic.c: minor refactoring

11 years agoFix possible memory corruption when creating dialogs with selectors. 20121119030501/pspp
John Darrington [Mon, 19 Nov 2012 10:15:49 +0000 (11:15 +0100)]
Fix possible memory corruption when creating dialogs with selectors.

The PsppireSelector widget's class structure contains a map of selectors
indexed by the source widget with which they are associated.  Until now, that
map was never depopulated.   This could have caused problems if newly created
widgets happened to use the same address as old, destroyed ones.  This change
removes selectors from the map upon destruction.

11 years agoLogistic Regression: Handle missing categoricals 20121115030502/pspp 20121116030503/pspp 20121117030502/pspp 20121118030503/pspp
John Darrington [Wed, 14 Nov 2012 16:05:01 +0000 (17:05 +0100)]
Logistic Regression: Handle missing categoricals

Ensure that missing values on categorical predictors are handled properly.

11 years agoLogistic Regression: Fix crash if categorical variable has no distinct values 20121114030503/pspp
John Darrington [Wed, 14 Nov 2012 10:47:09 +0000 (11:47 +0100)]
Logistic Regression: Fix crash if categorical variable has no distinct values

11 years agoRemove empty _finalize function
John Darrington [Tue, 13 Nov 2012 18:49:07 +0000 (19:49 +0100)]
Remove empty _finalize function

11 years agoFind dialog: Don't crash when searching for a non-existant label.
John Darrington [Tue, 13 Nov 2012 18:42:34 +0000 (19:42 +0100)]
Find dialog: Don't crash when searching for a non-existant label.

11 years agoSmall refactoring and cleanup of psppire-selector.c
John Darrington [Tue, 13 Nov 2012 18:37:07 +0000 (19:37 +0100)]
Small refactoring and cleanup of psppire-selector.c

Made explicit variables from some expressions.  This provides
the opportinutiy to test if they are valid.

11 years agoRemove _base_init and base_finalize functions from psppire-selector
John Darrington [Tue, 13 Nov 2012 18:00:38 +0000 (19:00 +0100)]
Remove _base_init and base_finalize functions from psppire-selector

Gtk+ documentation recommends these are avoided in modern code.
They differ only from class_init in the case where the class has subclasses,
which PsppireSelector does not.

11 years agoLogistic Regression: Added categorical variable support 20121112030504/pspp 20121113030502/pspp
John Darrington [Sun, 11 Nov 2012 13:19:05 +0000 (14:19 +0100)]
Logistic Regression: Added categorical variable support

With this commit Logistic Regression now supports the /CATEGORICALS
subcommand, allowing a dependent variable to be regressed against one
or more categorical predictor variables.

11 years agoCategoricals.c: Ensure that categories are processed order of their categorical varia... 20121109030502/pspp 20121110030502/pspp 20121111030502/pspp
John Darrington [Thu, 8 Nov 2012 13:33:51 +0000 (14:33 +0100)]
Categoricals.c: Ensure that categories are processed order of their categorical variable(s).

Some procedures require that categoricals are processed in a particular order.
Mathematically, the order is irrelevant, however for reporting purposes it is
sometimes required.  This change adds a level of indirection, so that the codes
are allocated in ascending order of the categorical variable.

11 years agoCategoricals: Provide separate functions for effects and dummy coding. 20121107030502/pspp 20121108030503/pspp
John Darrington [Tue, 6 Nov 2012 19:50:33 +0000 (20:50 +0100)]
Categoricals: Provide separate functions for effects and dummy coding.

Until now, the function categoricals_get_code_for_case returned the
"effects" coding (ie, a bipolar code).  Some uses require "dummy" coding
(a binary coding).  This change provides seperate functions to return
whatever is desired.

Conflicts:

src/language/stats/logistic.c

11 years agoFixed some compiler warnings, which arose from recent commits. 20121105030504/pspp 20121106030502/pspp
John Darrington [Sun, 4 Nov 2012 16:14:13 +0000 (17:14 +0100)]
Fixed some compiler warnings, which arose from recent commits.

11 years agoAdded mnemonics to rank types dialog 20121104030502/pspp
John Darrington [Sat, 3 Nov 2012 10:19:13 +0000 (11:19 +0100)]
Added mnemonics to rank types dialog

11 years agoAdded markup to GUI elements where necessary 20121103030503/pspp
John Darrington [Fri, 2 Nov 2012 15:33:06 +0000 (16:33 +0100)]
Added markup to GUI elements where necessary

11 years agoFix bug in parse_design_interaction.
John Darrington [Fri, 2 Nov 2012 14:36:00 +0000 (15:36 +0100)]
Fix bug in parse_design_interaction.

Previously this function would crash if it failed to succesfully parse
an interaction. This change fixes that.

11 years agoCategoricals: Accept null pointer as subject.
John Darrington [Fri, 2 Nov 2012 14:31:45 +0000 (15:31 +0100)]
Categoricals: Accept null pointer as subject.

Previously, certain functions would crash, or behave badly if their
argument was NULL.  This change makes them do nothing, or return
default values, as appropriate.  This saves callers having to always
test for NULL.

11 years agocateoricals.c categoricals.h clean up.
John Darrington [Fri, 2 Nov 2012 14:24:12 +0000 (15:24 +0100)]
cateoricals.c categoricals.h clean up.

Removed a prototype whose implementation no longer exists.
Added a few comments.
Whitespace changes.

11 years agoAdded mnemonic to t-test options dialog 20121102030504/pspp
John Darrington [Thu, 1 Nov 2012 21:30:53 +0000 (22:30 +0100)]
Added mnemonic to t-test options dialog

11 years agoAdded Mnemonics to the value chooser widget and to the recode dialog.
John Darrington [Thu, 1 Nov 2012 17:44:17 +0000 (18:44 +0100)]
Added Mnemonics to the value chooser widget and to the recode dialog.

11 years agoAdded markup to the spilt-file dialog 20121101030507/pspp
John Darrington [Thu, 1 Nov 2012 06:14:41 +0000 (07:14 +0100)]
Added markup to the spilt-file dialog

11 years agoCompute Dialog: Add mnemonics and focus widgets on activation. 20121031030502/pspp
John Darrington [Tue, 30 Oct 2012 18:22:47 +0000 (19:22 +0100)]
Compute Dialog: Add mnemonics and focus widgets on activation.

11 years agologistic.c: Fix read from uninitialised memory. 20121030030503/pspp
John Darrington [Tue, 30 Oct 2012 05:54:09 +0000 (06:54 +0100)]
logistic.c: Fix read from uninitialised memory.

Found-by valgrind.

11 years agoMove function parse_design_interaction into variable-parser.c
John Darrington [Sun, 28 Oct 2012 09:16:01 +0000 (10:16 +0100)]
Move function parse_design_interaction into variable-parser.c

This function is (or will be) used by several procedures, so
make it public.

11 years agoglm.c: (lex_match_variable and parse_design_interaction) remove dependence on struct glm
John Darrington [Sun, 28 Oct 2012 08:36:35 +0000 (09:36 +0100)]
glm.c: (lex_match_variable and parse_design_interaction) remove dependence on struct glm

Made these functions independent of struct glm, so that they can potentially be reused
for other procedures.

11 years agoAnova Dialog: Fix widget associations 20121027030509/pspp 20121028030503/pspp 20121029030502/pspp
John Darrington [Sat, 27 Oct 2012 08:42:28 +0000 (10:42 +0200)]
Anova Dialog: Fix widget associations

11 years agologistic.c : Avoid compiler warnings
John Darrington [Sat, 27 Oct 2012 05:34:20 +0000 (07:34 +0200)]
logistic.c  : Avoid compiler warnings

11 years agoGUI: Added Mnemonic keys to Examine dialog
John Darrington [Sat, 27 Oct 2012 05:21:05 +0000 (07:21 +0200)]
GUI: Added Mnemonic keys to Examine dialog

11 years agoFirst attempt at a LOGISTIC REGRESSION command 20121025030511/pspp 20121026030503/pspp
John Darrington [Tue, 16 Oct 2012 18:41:44 +0000 (20:41 +0200)]
First attempt at a LOGISTIC REGRESSION command

11 years agoUpdated my entry in AUTHORS 20121018030506/pspp 20121019030515/pspp 20121020030503/pspp 20121021030504/pspp 20121022030502/pspp 20121023030502/pspp 20121024030503/pspp
John Darrington [Thu, 18 Oct 2012 09:28:44 +0000 (11:28 +0200)]
Updated my entry in AUTHORS

11 years agodoc/introduction.texi: Update documentations introductory section 20121014030516/pspp 20121015030503/pspp 20121016030503/pspp 20121017030503/pspp
John Darrington [Sat, 13 Oct 2012 15:41:59 +0000 (17:41 +0200)]
doc/introduction.texi: Update documentations introductory section

11 years agodoc/automake.mk: Added a convenience rule for building all the documentation formats
John Darrington [Sat, 13 Oct 2012 14:46:22 +0000 (16:46 +0200)]
doc/automake.mk: Added a convenience rule for building all the documentation formats

11 years agodoc/automake.mk: Replace lines inadvertently removed by previous commit
John Darrington [Sat, 13 Oct 2012 13:22:38 +0000 (15:22 +0200)]
doc/automake.mk: Replace lines inadvertently removed by previous commit

11 years agodoc/automake.mk: Added further mutations to docbook xml to workaround makeinfo bugs
John Darrington [Sat, 13 Oct 2012 10:59:18 +0000 (12:59 +0200)]
doc/automake.mk: Added further mutations to docbook xml to workaround makeinfo bugs

11 years agodoc/automake.mk: New mutations to generated docbook xml to workaround makeinfo bugs
John Darrington [Sat, 13 Oct 2012 10:44:05 +0000 (12:44 +0200)]
doc/automake.mk: New mutations to generated docbook xml to workaround makeinfo bugs

11 years agoAvoid deprecated function: gtk_button_released 20121009030508/pspp 20121011030511/pspp 20121012030514/pspp 20121013030514/pspp
John Darrington [Mon, 8 Oct 2012 17:16:02 +0000 (19:16 +0200)]
Avoid deprecated function: gtk_button_released

11 years agoconfigure.ac: Increase pango minimum version from 1.20 to 1.22 20121005030505/pspp 20121006030503/pspp 20121007030505/pspp 20121008030504/pspp
Ben Pfaff [Fri, 5 Oct 2012 04:22:42 +0000 (21:22 -0700)]
configure.ac: Increase pango minimum version from 1.20 to 1.22

Commit bd4d6e7453 (cairo: Avoid deprecated
pango_cairo_font_map_create_context().) added a dependency on pango
version 1.22 or later, but configure.ac only checked for version 1.20
or later.  This commit fixes the discrepancy.

INSTALL already documented that Pango 1.22 or later was needed.

Reported by John Darrington.

11 years agotests: Better isolate search text in test of error reporting. 20121001030503/pspp 20121002030515/pspp 20121003030503/pspp 20121004030504/pspp
Ben Pfaff [Sun, 30 Sep 2012 19:29:33 +0000 (12:29 -0700)]
tests: Better isolate search text in test of error reporting.

Some GNU/Linux distributions print additional text on a segfault,
e.g. "Cannot exec debugger: No such file or directory", which this
test was seeing in output and interpreting as a failed test.  This
commit fixes the problem by ignoring text up to the ***** line that
marks the start of the expected output.

Bug #37444.
Reported by Mindaugus.

11 years agoSuppress GCC 4.7 warnings by changes to code that make it less clear.
Ben Pfaff [Wed, 26 Sep 2012 04:18:32 +0000 (21:18 -0700)]
Suppress GCC 4.7 warnings by changes to code that make it less clear.

I'm not entirely happy with these changes, because they make the code
slightly less obvious.  However, it's still not really bad code, and
it's convenient to have a warning-free build.

11 years agoSuppress GCC 4.7 warnings due to unimplemented features.
Ben Pfaff [Wed, 26 Sep 2012 04:20:09 +0000 (21:20 -0700)]
Suppress GCC 4.7 warnings due to unimplemented features.

GCC 4.7 complains that the variables removed by this commit are
assigned values that are not used.  Fair enough, so this commit
removes them.

11 years agognumeric-reader: Add cast to suppress warning.
Ben Pfaff [Wed, 26 Sep 2012 00:09:47 +0000 (17:09 -0700)]
gnumeric-reader: Add cast to suppress warning.

This suppresses a GCC warning for a mismatch between
xmlInputCloseCallback, which takes a "void *" parameter, and
gzclose(), which takes a "gzFile" (which is "struct gzFile_s *").

This came up with an upgrade from "squeeze" to "wheezy".  I assume
that a gzclose prototype became visible or that gzFile changed away
from "void *".

An alternative would be to write a trampoline to just transform one
pointer type to the other, but the xmlReaderForIO() invocation
already has one function cast so a second cast doesn't make it much
worse.

11 years agosplit-file-dialog: Add use of unused variable in split_file_dialog().
Ben Pfaff [Wed, 26 Sep 2012 00:03:10 +0000 (17:03 -0700)]
split-file-dialog: Add use of unused variable in split_file_dialog().

'selector' was assigned but never used, but here's a use.

Reported by GCC 4.7.

11 years agoSuppress warnings for suspicious use of "enum" constants.
Ben Pfaff [Wed, 26 Sep 2012 00:02:21 +0000 (17:02 -0700)]
Suppress warnings for suspicious use of "enum" constants.

In each case, the code is using values of enums in valid ways that
GCC 4.7 does not expect, so use a cast to suppress the warnings.

11 years agogui: Check return value of gtk_tree_model_get_iter().
Ben Pfaff [Wed, 26 Sep 2012 00:00:34 +0000 (17:00 -0700)]
gui: Check return value of gtk_tree_model_get_iter().

In these two cases the return value was assigned to a variable but
never used.  This commit adds a check for the return value.

11 years agocairo: Avoid deprecated pango_cairo_font_map_create_context().
Ben Pfaff [Tue, 25 Sep 2012 22:54:43 +0000 (15:54 -0700)]
cairo: Avoid deprecated pango_cairo_font_map_create_context().

Pango 1.30 that is in Debian "wheezy" has marked this function as
deprecated.  The replacement pango_font_map_create_context() was
introduced in Pango 1.22, which was also in Debian "squeeze" (which
had Pango 1.28), so it seems safe to switch without worrying about
a Pango version check.

11 years agoRemove unused "finalize" functions.
Ben Pfaff [Tue, 25 Sep 2012 22:47:04 +0000 (15:47 -0700)]
Remove unused "finalize" functions.

A finalize function that just calls into the parent class finalize
function is a no-op that need not exist.

11 years agoRemove variables assigned to but never used.
Ben Pfaff [Tue, 25 Sep 2012 22:36:50 +0000 (15:36 -0700)]
Remove variables assigned to but never used.

Each of the variables removed here was assigned a value that was
never used, the assignment didn't have any useful side effects, and
I don't see anything that the variable should have been used for.

Found by GCC 4.7.

11 years agoEXAMINE: Avoid useless call to casereader_count_cases().
Ben Pfaff [Tue, 25 Sep 2012 22:51:07 +0000 (15:51 -0700)]
EXAMINE: Avoid useless call to casereader_count_cases().

The return value is never used, and this call could have significant
expense (it could cause the data to be read an extra time), so do not
do it.

Reported by GCC 4.7.

11 years agoCROSSTABS: Fix bug in check for REPORT in general mode.
Ben Pfaff [Tue, 25 Sep 2012 23:59:04 +0000 (16:59 -0700)]
CROSSTABS: Fix bug in check for REPORT in general mode.

Found by GCC 4.7.

11 years agoexpressions: Fix coercion of numbers to booleans at top level.
Ben Pfaff [Tue, 25 Sep 2012 22:14:50 +0000 (15:14 -0700)]
expressions: Fix coercion of numbers to booleans at top level.

The check for the expected type in type_check() used the wrong
constant (a node type instead of an expression type) and so the
"if" test was never true.  Also, OP_NUM_TO_BOOLEAN is binary, not
unary, so fixing just the test caused an assertion failure.

This commit fixes both problems and adds a test.

Found by GCC 4.7 report of a type mismatch.

11 years agogtk.h wrapper: Added *_set_realized and set_mapped 20120921030501/pspp 20120922030504/pspp 20120923030504/pspp 20120924030504/pspp 20120927030501/pspp 20120928030503/pspp 20120929030503/pspp 20120930030503/pspp
John Darrington [Thu, 20 Sep 2012 11:14:55 +0000 (13:14 +0200)]
gtk.h wrapper: Added *_set_realized and set_mapped

We are using these functions, but they are not defined for older gtk versions.

11 years agosrc/data/data-out.c: Added assertion to catch negative values
John Darrington [Thu, 20 Sep 2012 09:22:12 +0000 (11:22 +0200)]
src/data/data-out.c: Added assertion to catch negative values

If the contents of string does not contain a '.', then integer_digits
will end up negative, thus causing a crash later.  This change adds
an assertion to catch this condition and thus make the diagnosis easier
should it ever occur.

11 years agoAdded keybindings to move to the extremities of the sheet. 20120913030507/pspp 20120914030504/pspp 20120915030505/pspp
John Darrington [Wed, 12 Sep 2012 18:38:23 +0000 (20:38 +0200)]
Added keybindings to move to the extremities of the sheet.

Altered the Home key to move far left instead of up.
Added Ctrl Left/Right/Up/Down to move to the far edges of the
sheet.

This behaviour is consistent with other software.

11 years agoPerl Module: Avoid forcing scalar value into a pointer. 20120912030512/pspp
John Darrington [Wed, 12 Sep 2012 07:26:21 +0000 (09:26 +0200)]
Perl Module: Avoid forcing scalar value into a pointer.

The code fragment:  struct dictionary *dict = (void *) SvIV (dict_sv);
is dangerous.  This fix uses the properl Perl XS mechanism to get
the pointer and the scalar associated with the dictionary.

Reviewed-By: Ben Pfaff
11 years agoUpdate widgets.c from psppsheet branch 20120826000503/pspp 20120910030509/pspp 20120911030519/pspp
John Darrington [Sat, 25 Aug 2012 16:58:31 +0000 (18:58 +0200)]
Update widgets.c from psppsheet branch

11 years agoFix memory leak in sys-file-reader.c 20120822000503/pspp 20120823000504/pspp 20120824000503/pspp 20120825000503/pspp
John Darrington [Wed, 22 Aug 2012 04:46:18 +0000 (06:46 +0200)]
Fix memory leak in sys-file-reader.c

11 years agoref count the linreg structure so as to avoid double free problems 20120821000505/pspp
John Darrington [Mon, 20 Aug 2012 19:32:11 +0000 (21:32 +0200)]
ref count the linreg structure so as to avoid double free problems

11 years agosys-file-reader: Fix setjmp() technicality. 20120820000504/pspp
Ben Pfaff [Mon, 20 Aug 2012 07:00:33 +0000 (00:00 -0700)]
sys-file-reader: Fix setjmp() technicality.

The C standards say that the compiler is allowed to optimize away
changes to local variables within a function between a call to
setjmp() and a later call to longjmp(), unless the local variables
are volatile-qualified.

The 'info' local variable in sfm_open_reader() fits this
description but wasn't volatile-qualified.  This commit fixes that,
even though my compiler didn't in fact seem to have a problem with
the previous version.

11 years agosys-file-reader: Fix memory leak.
Ben Pfaff [Mon, 20 Aug 2012 06:59:47 +0000 (23:59 -0700)]
sys-file-reader: Fix memory leak.

The C standards say that the compiler is allowed to optimize away
changes to local variables within a function between a call to
setjmp() and a later call to longjmp(), unless the local variables
are volatile-qualified.

The 'dict' local variable in sfm_open_reader() fits this
description but wasn't volatile-qualified.  GCC in fact optimized
out the changes on my system, and this commit fixes that.

11 years agomissing-val-dialog: Convert to a GObject.
Ben Pfaff [Sun, 19 Aug 2012 18:36:16 +0000 (11:36 -0700)]
missing-val-dialog: Convert to a GObject.

11 years agomissing-val-dialog: Avoid destroying uninitialized data.
Ben Pfaff [Sun, 19 Aug 2012 18:41:25 +0000 (11:41 -0700)]
missing-val-dialog: Avoid destroying uninitialized data.

If text_to_value() fails for low_val, then this code would still
destroy high_val, even though high_val hadn't been initialized,
thus accessing indeterminate data.

This also eliminates some redundancy in the code.

11 years agogui: Rename var-sheet-dialogs.ui to missing-val-dialog.ui.
Ben Pfaff [Sat, 18 Aug 2012 22:31:09 +0000 (15:31 -0700)]
gui: Rename var-sheet-dialogs.ui to missing-val-dialog.ui.

The msising value dialog is the only dialog left in this UI file.

11 years agopsppire-dialog: Add "acceptable" predicate.
Ben Pfaff [Sun, 19 Aug 2012 17:30:36 +0000 (10:30 -0700)]
psppire-dialog: Add "acceptable" predicate.

PsppireDialog already has a validity predicate that allows a dialog
to easily disable "OK" and other buttons when the dialog has not
yet been completely filled.  It should usually be obvious to the
user why this is the case.

The upcoming GObjectification of the missing value dialog calls for
a different kind of predicate, one where the reason is not obvious
to the user (typically because he has just made a typo or does not
understand a variable's format).  In this case, the user needs more
feedback, such as a message explaining the problem.

This commit therefore introduces a second kind of predicate, the
"accept" predicate.  This predicate is only checked when the user
clicks on the "OK" button.

11 years agoval-labs-dialog, var-type-dialog: Make these dialogs modal.
Ben Pfaff [Sun, 19 Aug 2012 18:36:42 +0000 (11:36 -0700)]
val-labs-dialog, var-type-dialog: Make these dialogs modal.

I missed this in the initial conversion.

11 years agoval-labs-dialog: Remove unused 'window' member.
Ben Pfaff [Sun, 19 Aug 2012 17:30:53 +0000 (10:30 -0700)]
val-labs-dialog: Remove unused 'window' member.

11 years agopsppire-var-sheet: Remove unneeded #include from header.
Ben Pfaff [Sat, 18 Aug 2012 19:28:37 +0000 (12:28 -0700)]
psppire-var-sheet: Remove unneeded #include from header.

11 years agoval-labs-dialog: Convert to a GObject.
Ben Pfaff [Sat, 18 Aug 2012 19:26:03 +0000 (12:26 -0700)]
val-labs-dialog: Convert to a GObject.

11 years agogui: Factor new text_to_value__() function out of text_to_value().
Ben Pfaff [Sat, 18 Aug 2012 19:17:01 +0000 (12:17 -0700)]
gui: Factor new text_to_value__() function out of text_to_value().

I intend to use this in an upcoming commit.

11 years agovar-type-dialog: Fix memory leak.
Ben Pfaff [Sat, 18 Aug 2012 19:24:21 +0000 (12:24 -0700)]
var-type-dialog: Fix memory leak.

11 years agoFixed memory leak in FACTOR 20120815000501/pspp 20120816000504/pspp 20120817000503/pspp 20120818000505/pspp
John Darrington [Wed, 15 Aug 2012 05:03:56 +0000 (07:03 +0200)]
Fixed memory leak in FACTOR

11 years agoFix leaks in REGRESSION
John Darrington [Tue, 14 Aug 2012 19:49:26 +0000 (21:49 +0200)]
Fix leaks in REGRESSION

11 years agoFixed the remaining leaks in AUTORECODE
John Darrington [Tue, 14 Aug 2012 18:11:09 +0000 (20:11 +0200)]
Fixed the remaining leaks in AUTORECODE

11 years agoFix leaks in MEANS command
John Darrington [Mon, 13 Aug 2012 19:13:56 +0000 (21:13 +0200)]
Fix leaks in MEANS command

11 years agofix some of the leaks in the AUTORECODE command 20120813000504/pspp 20120814000503/pspp
John Darrington [Sun, 12 Aug 2012 17:51:19 +0000 (19:51 +0200)]
fix some of the leaks in the AUTORECODE command

11 years agoFixed remaining leaks in ONEWAY
John Darrington [Sun, 12 Aug 2012 14:29:38 +0000 (16:29 +0200)]
Fixed remaining leaks in ONEWAY

11 years agoFix memory leaks in ONEWAY command
John Darrington [Sun, 12 Aug 2012 11:33:09 +0000 (13:33 +0200)]
Fix memory leaks in ONEWAY command

11 years agovar-type-dialog: Convert to a GObject.
Ben Pfaff [Thu, 9 Aug 2012 06:27:32 +0000 (23:27 -0700)]
var-type-dialog: Convert to a GObject.

The one issue I can't figure out is why this changes the look of
the dialog box so that its height is the total height of all of
the widgets in the "middlebox", rather than the maximum height
actually needed.

11 years agosrc/math/categoricals.c: Remove inappropriate const qualifier 20120811000504/pspp
John Darrington [Sat, 11 Aug 2012 06:15:59 +0000 (08:15 +0200)]
src/math/categoricals.c: Remove inappropriate const qualifier

11 years agovariable: Skip callback if new format is same as old format. 20120809000508/pspp 20120810000503/pspp
Ben Pfaff [Thu, 9 Aug 2012 06:17:36 +0000 (23:17 -0700)]
variable: Skip callback if new format is same as old format.

Seems fairly worthwhile.

11 years agoFixed one of the leaks in MEANS 20120808000503/pspp
John Darrington [Sun, 5 Aug 2012 16:00:36 +0000 (18:00 +0200)]
Fixed one of the leaks in MEANS

11 years agoFix leaks in RELIABILITY command 20120806000503/pspp 20120807000505/pspp
John Darrington [Sun, 5 Aug 2012 14:57:04 +0000 (16:57 +0200)]
Fix leaks in RELIABILITY command