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

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

Bug #31072.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Bug #35825.

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

This will acquire a new user in an upcoming commit.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Should LC_NUMERIC ever get set, this will become important.

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

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

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

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

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

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

Bug #35665.
Requested by Harry Thijssen.

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

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

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

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

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

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

Bug #16351.

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

These corner cases weren't covered by previous tests.

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

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

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

Bug #37444.
Reported by Mindaugas.

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

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

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

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

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

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

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

11 years agoDATA LIST: Accept freefield format types without widths use minimum width.
Ben Pfaff [Sun, 25 Nov 2012 01:50:05 +0000 (17:50 -0800)]
DATA LIST: Accept freefield format types without widths use minimum width.

A user reported that SPSS accepts syntax such as "DATA LIST FREE/
d (DATETIME)." using a default width for the field with no specified width.
This commit makes PSPP accept this syntax too, although it does not get
the width exactly right (please let me know if you figure out how to do
that).

Bug #30690.
Reported by Andreas Lappe.

11 years agoformat-parser: Improve error message when format specifier lacks width.
Ben Pfaff [Sun, 25 Nov 2012 01:26:38 +0000 (17:26 -0800)]
format-parser: Improve error message when format specifier lacks width.

Until now, parse_format_specifier() was willing to parse, e.g. "datetime"
as a format specifier.  It would then be rejected later by e.g.
fmt_check_input() with a message like "Input format DATETIME0.0 specifies
width 0, but DATETIME requires a width between 17 and 40," which makes no
sense to the user.  This commit improves the error message.

11 years agodata-parser: Use data-file error types for data-file errors.
Ben Pfaff [Sat, 24 Nov 2012 23:51:33 +0000 (15:51 -0800)]
data-parser: Use data-file error types for data-file errors.

The SW error type that these calls to msg() used before this command
include the name of the executing command in the error message.  This can
be confusing because the executing command may not have any connection to
the command that said to read the data file.  This commit changes these
error types to DW, which is intended for errors in a data file (and omits
the command name).

Bug #26517.

11 years agoINPUT PROGRAM: Don't break out of INPUT PROGRAM on interactive error.
Ben Pfaff [Sat, 24 Nov 2012 22:14:16 +0000 (14:14 -0800)]
INPUT PROGRAM: Don't break out of INPUT PROGRAM on interactive error.

Until now, any erroneous command typed within an input program at an
interactive command prompt implicitly "broke out" of the input program,
causing confusing behavior.  This commit fixes the problem: commands
following an erroneous command within INPUT PROGRAM continue to be part of
the input program.

Bug #33419.
Reported by John Darrington.

11 years agoDATA LIST FREE: Warn when a quoted string is not followed by a delimiter.
Ben Pfaff [Sat, 24 Nov 2012 21:47:06 +0000 (13:47 -0800)]
DATA LIST FREE: Warn when a quoted string is not followed by a delimiter.

A field parsed by DATA LIST FREE (or LIST) is either quoted or unquoted.
When it is quoted, this means that the entire field has to be quoted, that
is, it is not possible to quote some initial part of the field, then leave
some part of it unquoted (then possibly quote an additional part, etc.).
That means that the quoted portion should be followed by a delimiter,
such as white space, a comma, or end of line, but PSPP didn't warn when
it was not.  This commit makes PSPP warn in this situation, which makes
errors in the input easier to find.

Bug #26522.
Reported by Pascal Barbedor <pbarbedor@gmail.com>.

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