John Darrington [Sun, 11 Dec 2011 13:09:33 +0000 (14:09 +0100)]
Cairo output driver: Added options to set the foreground and background
colours.
John Darrington [Sun, 11 Dec 2011 11:39:42 +0000 (12:39 +0100)]
Remove xr_draw_chart from cairo.h and make static
The function xr_draw_chart is used only in cairo.c, so it seems there
is little point in having it public.
John Darrington [Sat, 10 Dec 2011 13:25:46 +0000 (14:25 +0100)]
Added basic framework for the MEANS command.
Not much here yet. Just the parser and framework
for the output.
John Darrington [Fri, 9 Dec 2011 10:24:56 +0000 (11:24 +0100)]
Added a function to clone an interaction.
John Darrington [Wed, 7 Dec 2011 18:38:30 +0000 (19:38 +0100)]
Value Labels Dialog: Fix packing properties
Ben Pfaff [Sun, 4 Dec 2011 18:44:07 +0000 (10:44 -0800)]
gui: Fix behavior of print preview in psppire-output-window.
Print preview only showed one page because the GtkPrintOperation emits
"paginate" again even after it returns TRUE once and our "paginate"
implementation was not prepared for that.
Also fixes a memory leak in paginate(): the driver used for pagination was
not being freed.
Reported-by: John Darrington <john@darrington.wattle.id.au>
John Darrington [Sat, 3 Dec 2011 12:06:32 +0000 (13:06 +0100)]
ONEWAY: Fixed crash when the dependent variable contained only missing values.
When forming a struct categoricals, there is no way in advance to know if the
given categorical variables will actually contain any values. If one or more
of them contains no non-missing values, then it's not meaningfull to talk
about categories.
Such cases were causing oneway to crash. Thanks to Dave Purdy
<David_Purdy@btinternet.com> for reporting this problem.
John Darrington [Sat, 3 Dec 2011 09:59:07 +0000 (10:59 +0100)]
Remove unused global variables
Ben Pfaff [Fri, 2 Dec 2011 06:06:48 +0000 (22:06 -0800)]
gui: Fix printing of tables split across pages in psppire-output-window.
xr_driver_output_item() expects the caller to call xr_driver_next_page()
as long as xr_driver_need_new_page() returns true, but the printing code
didn't do that, so tables split across pages in printouts caused an
assertion failure at the next call to xr_driver_output_item().
Reported-by: John Darrington <john@darrington.wattle.id.au>
Ben Pfaff [Fri, 2 Dec 2011 05:25:18 +0000 (21:25 -0800)]
Avoid declaring variables in the middle of a block, to avoid requiring C99.
John Darrington [Mon, 28 Nov 2011 20:27:41 +0000 (21:27 +0100)]
categoricals.c: Rename function to more accurately reflect its purpose
John Darrington [Mon, 28 Nov 2011 20:23:24 +0000 (21:23 +0100)]
Remove unused function
John Darrington [Sat, 26 Nov 2011 13:42:27 +0000 (14:42 +0100)]
GLM: Mimic spss output with /INTERCEPT=EXCLUDE
John Darrington [Sat, 26 Nov 2011 11:51:53 +0000 (12:51 +0100)]
Fix memory leak
John Darrington [Fri, 25 Nov 2011 10:07:42 +0000 (11:07 +0100)]
GLM: Added implementation for the Type 3 sums of squares.
This seems to match expectations, except for the Intercept term.
John Darrington [Fri, 25 Nov 2011 09:52:50 +0000 (10:52 +0100)]
GLM: Added test for type II sums of squares
John Darrington [Fri, 25 Nov 2011 09:35:15 +0000 (10:35 +0100)]
Whitespace changes only
John Darrington [Fri, 25 Nov 2011 09:01:42 +0000 (10:01 +0100)]
categoricals.c: Effects coding.
Implemented Effects (also called Contrast) coding instead of Dummy Coding
and corrected logic error.
John Darrington [Thu, 24 Nov 2011 20:48:29 +0000 (21:48 +0100)]
GLM test: Remove redundant transformations and reorder.
This change does not affect the test or its result, but makes it
easier to understand.
John Darrington [Wed, 23 Nov 2011 13:47:35 +0000 (14:47 +0100)]
GLM: Implemented the Type I sums of squares and added a test for that.
John Darrington [Wed, 23 Nov 2011 13:23:17 +0000 (14:23 +0100)]
GLM: Update logic for choosing types of sums of squares
John Darrington [Wed, 23 Nov 2011 12:59:36 +0000 (13:59 +0100)]
glm.c: Allow parser to accept METHOD=SSTYPE(n) subcommand
John Darrington [Wed, 23 Nov 2011 12:41:28 +0000 (13:41 +0100)]
glm.c:get_ssq Remove unnecessary assignment
John Darrington [Sun, 20 Nov 2011 12:25:50 +0000 (13:25 +0100)]
categoricals.c Fix the calculation of the per encoding sums
John Darrington [Sat, 19 Nov 2011 19:01:04 +0000 (20:01 +0100)]
Rename df --> df_prod and comment accordingly
John Darrington [Sat, 19 Nov 2011 18:33:03 +0000 (19:33 +0100)]
categoricals.c: Reimpliment the get_binary_by subscript function
Instead of making ad hoc encodings for interactions, use the product
of the encodings of the individual variables. This should not affect
the outcome of any current test cases, but makes the data flow easier
to follow and to debug.
John Darrington [Tue, 15 Nov 2011 14:47:10 +0000 (15:47 +0100)]
sweep.c: Use gsl_matrix_memcpy instead of element by element copying.
Although only the upper triangle needs to be copied, there is no
disadvantage copying the entire matrix (the lower triangle is never read)
and the expense of using two loops is likely to outweigh the saving achieved
by avoiding the other triangle.
John Darrington [Tue, 15 Nov 2011 14:20:59 +0000 (15:20 +0100)]
sweep.c: Move repeated call out of if ... else
This line is identical for all cases, so it only needs to appear once.
John Darrington [Tue, 15 Nov 2011 14:14:30 +0000 (15:14 +0100)]
sweep.c: Reduce scope of local variables and avoid reusing them.
This makes the code easier to follow, and helps the compiler with
optimisation.
John Darrington [Tue, 15 Nov 2011 13:57:34 +0000 (14:57 +0100)]
sweep.c: Reverse sense of consistency tests.
This avoids numerous levels of indentation.
John Darrington [Tue, 15 Nov 2011 13:51:49 +0000 (14:51 +0100)]
sweep.c: swap rows/columns instead of using indirection for last_col
This makes the code shorter, and I believe should make it faster too.
John Darrington [Mon, 14 Nov 2011 17:19:37 +0000 (18:19 +0100)]
GLM: Add debugging option /SHOWCODES
John Darrington [Sun, 13 Nov 2011 19:26:29 +0000 (20:26 +0100)]
Remove useless code
John Darrington [Thu, 10 Nov 2011 20:13:32 +0000 (21:13 +0100)]
File Open: Don't try to analyse the file if it's a directory.
The File Open dialog box looks at the contents of the selected file
in order to decide whether to set the sensitivity of the encoding
selector. But if the file was a directory this caused error messages
on windoze. Closes bug #34773
Ben Pfaff [Thu, 10 Nov 2011 05:27:41 +0000 (21:27 -0800)]
GET: Fix confusion over the type of the 'type' parameter.
The 'type' parameter was being used to pass in an "enum reader_command" but
it was then later assigned a value of "enum pfm_type". This renames 'type'
to 'command' for clarity and just deletes the assignment of the "enum
pfm_type" value entirely because the value was not used.
Found by Clang.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Thu, 10 Nov 2011 05:23:46 +0000 (21:23 -0800)]
DO REPEAT: Properly convert lex_syntax_mode to segmenter_mode.
Clang reported that "enum lex_syntax_mode" was being implicitly converted
to "enum segmenter_mode". Luckily, equal values in each enum have the
same meaning, but it seems better to convert by hand, so this patch
implements that.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Thu, 10 Nov 2011 05:16:19 +0000 (21:16 -0800)]
hmap: Mark definition of hmap_node_hash() "static inline".
This suppresses a Clang warning. The prototype earlier in the file
was already marked "static inline", so I don't think that this is a
functional change.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Thu, 10 Nov 2011 05:02:06 +0000 (21:02 -0800)]
str: Mark definition of ss_empty() "static inline".
This suppresses a Clang warning. The prototype earlier in the file
was already marked "static inline", so I don't think that this is a
functional change.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Wed, 9 Nov 2011 05:07:38 +0000 (21:07 -0800)]
ONEWAY: Fix printf format specifier.
Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
Ben Pfaff [Sun, 6 Nov 2011 21:22:16 +0000 (13:22 -0800)]
configure: Add option --enable-Werror to add -Werror to CFLAGS.
-Werror is useful for development, but it screws up configure because it's
impossible to guess what new warnings compilers will add in the future.
This commit adds a new configure option to add CFLAGS after the configure
checks are done.
The use of AC_CONFIG_COMMANDS_PRE is based on Eric Blake's suggestion on
the autoconf mailing list: "AC_CONFIG_COMMANDS_PRE probably fits the bill
as the ideal macro to use for guaranteeing that you inject your shell code
at the last possible moment."
The Autoconf code added in this commit, as well as this commit message,
come from Open vSwitch.
Ben Pfaff [Sun, 6 Nov 2011 20:55:27 +0000 (12:55 -0800)]
crosstabs-dialog: Remove unused vars from on_format_clicked().
Ben Pfaff [Sat, 5 Nov 2011 19:59:46 +0000 (12:59 -0700)]
q2c: Remove gettext.h #include from generated code.
The generated code no longer uses any of the gettext symbols.
Ben Pfaff [Sat, 5 Nov 2011 19:46:21 +0000 (12:46 -0700)]
q2c: Remove final untranslated strings from q2c.c.
The "restrictions" that could be specified in q2c put strings
in the output that needed to be translated but could not. This
commit drops the feature and removes all of its prior users.
Some of the users required new validation code to be added, but
many of them in the SET command did not because the value was
not actually used anywhere.
Ben Pfaff [Sat, 5 Nov 2011 19:52:06 +0000 (12:52 -0700)]
q2c: Use new subc_list_error() to report too many subcommands.
This removes one string from q2c.c that needs translation but
cannot currently be translated.
Ben Pfaff [Sun, 6 Nov 2011 03:02:54 +0000 (20:02 -0700)]
lexer: New function lex_force_string_or_id().
This new function removes a string from q2c.c that requires
translation but currently cannot be translated.
Ben Pfaff [Sat, 5 Nov 2011 23:34:56 +0000 (16:34 -0700)]
lexer: New functions lex_spec_missing(), lex_spec_only_once().
These functions don't have many users yet but they make logical
sense to me.
Ben Pfaff [Sat, 5 Nov 2011 23:23:05 +0000 (16:23 -0700)]
lexer: Use error helper functions in more situations.
The error helpers print error messages that are just as helpful
as handwritten error messages in most cases, especially now
that the error messages include column numbers. They also
have advantages for i18n.
One important purpose of this commit is to remove several
strings from q2c.c that require translation but currently are
not translatable.
Ben Pfaff [Sat, 5 Nov 2011 20:07:44 +0000 (13:07 -0700)]
lexer: Drop lexer parameter from lex_sbc_missing().
There's no point in passing in the lexer and using lex_error(),
because the extra information that lex_error() outputs does
not help the user find the error.
Ben Pfaff [Sat, 5 Nov 2011 18:23:23 +0000 (11:23 -0700)]
lexer: New function lex_error_expecting().
This centralizes some fairly common strings into lexer.c.
Ben Pfaff [Sat, 5 Nov 2011 23:11:59 +0000 (16:11 -0700)]
LOOP: Correctly implement MXLOOPS and add a test.
Previously the MXLOOPS value was implemented incorrectly: the
loop would actually iterate MXLOOPS+1 times. This commit fixes
the problem.
Ben Pfaff [Sat, 5 Nov 2011 23:10:54 +0000 (16:10 -0700)]
settings: Implement MXLOOPS subcommand.
It had been overlooked.
The following commit adds a test.
Ben Pfaff [Sat, 5 Nov 2011 23:09:18 +0000 (16:09 -0700)]
settings: Update default MXLOOPS and document.
MXLOOPS should be 40 by default, for compatibility.
Ben Pfaff [Sat, 5 Nov 2011 19:44:27 +0000 (12:44 -0700)]
SET: Warn for more obsolete subcommands.
Ben Pfaff [Sun, 6 Nov 2011 03:22:40 +0000 (20:22 -0700)]
doc: Remove reference to unimplemented SET PAGER command.
Bug #33632.
Reported by John Darrington.
Ben Pfaff [Sat, 5 Nov 2011 04:45:49 +0000 (21:45 -0700)]
lexer: Rename 'close' to 'destroy' in struct lex_reader_class.
This seems like a cleaner solution to the problem of Gnulib
sometimes defining 'close' as a macro than to add an extra
include file and a big comment.
Ben Pfaff [Wed, 2 Nov 2011 05:04:02 +0000 (22:04 -0700)]
gui: Fix spelling error in macro name.
Ben Pfaff [Wed, 2 Nov 2011 05:02:56 +0000 (22:02 -0700)]
gui: Make .csv available for output export with File|Export.
The hard-coded 6 here was wrong: there are 7 file formats.
It's better to use the n_FT constant.
Ben Pfaff [Wed, 2 Nov 2011 04:54:46 +0000 (21:54 -0700)]
gui: Fix configuring Unicode box characters.
Commit
14b3603043 "ascii: Add support for multibyte characters"
changed how the box characters are configured but failed to
update psppire-output-window.c, so attempting to paste a table
into an application that accepts UTF-8 text would output many
warnings like "unknown option `box[0201]'" and not actually use
Unicode box characters.
This fixes the problem.
John Darrington [Sun, 23 Oct 2011 17:44:42 +0000 (19:44 +0200)]
New object: psppire-lex-reader
This object reads lexer input direct from a GtkBuffer instead of converting to a string first.
John Darrington [Sun, 23 Oct 2011 12:42:51 +0000 (14:42 +0200)]
Remove duplicate #include lines
John Darrington [Mon, 24 Oct 2011 18:06:04 +0000 (20:06 +0200)]
Remove labelling options from Crosstabs GUI
The previous change removed the label options from the crosstabs commmand,
but didn't update the gui accordingly. This change fixes that.
John Darrington [Wed, 19 Oct 2011 17:55:00 +0000 (19:55 +0200)]
Use variable labels in crosstabs.
Use a variable's label instead of its name (if it has one) in the crosstabs
output. Removed the FORMAT=LABEL subcommand which is no longer supported
by spss. Updated documentation to reflect the code.
John Darrington [Wed, 12 Oct 2011 09:44:01 +0000 (11:44 +0200)]
Remove redundant error message.
This error message is not required, because lex_force_string already emits such message.
John Darrington [Wed, 12 Oct 2011 09:41:10 +0000 (11:41 +0200)]
Consolidate some very similar user visible strings
John Darrington [Wed, 12 Oct 2011 07:02:15 +0000 (09:02 +0200)]
Added some missing gettext macros
John Darrington [Sun, 9 Oct 2011 14:42:56 +0000 (16:42 +0200)]
Fix potential problems with non-literal printf arguments.
In a few places we were passing a constructed string to a printf-like
function as its format argument. This could have been problematic if
the constructed string had contained a % (for example due to that
character occuring in a variable label). This change avoids those
situations.
John Darrington [Fri, 7 Oct 2011 12:15:35 +0000 (14:15 +0200)]
Fix incorrectly ordered arguments to xcalloc
The gnulib xcalloc call has the following signature:
void *calloc(size_t N, size_t S);
where N is the number of objects and S is the size of each object.
In many places, we had these arguments transposed. In many implementations
this doesn't matter since the two arguments are simply multiplied together.
However, on some systems this can cause problems (ie crash), if S is zero.
This change fixes all calls where the size was being passes as the first
argument instead of the second.
John Darrington [Fri, 7 Oct 2011 11:28:19 +0000 (13:28 +0200)]
Fixed a crash in the oneway command
John Darrington [Thu, 6 Oct 2011 07:28:45 +0000 (09:28 +0200)]
Add a warning to GLM until we've sorted out its problems
John Darrington [Thu, 6 Oct 2011 07:15:00 +0000 (09:15 +0200)]
Remove visibility from the univariate analysis menu until it works better
John Darrington [Wed, 5 Oct 2011 13:52:18 +0000 (15:52 +0200)]
Added a base parameter to the interaction_case_hash function
John Darrington [Wed, 5 Oct 2011 06:10:55 +0000 (08:10 +0200)]
Fix crash on parseing invalid GLM syntax
John Darrington [Thu, 29 Sep 2011 11:22:00 +0000 (13:22 +0200)]
Implemented the SET=TNUMBERS subcommand
John Darrington [Thu, 29 Sep 2011 08:37:02 +0000 (10:37 +0200)]
Optimisation for the type3 sum of squares procedure
John Darrington [Thu, 29 Sep 2011 08:35:26 +0000 (10:35 +0200)]
Corrected example files. Closes bug #34343
John Darrington [Wed, 28 Sep 2011 17:55:45 +0000 (19:55 +0200)]
Fixed a crash in REGRESSION when there were no non-missing values.
John Darrington [Fri, 23 Sep 2011 13:56:45 +0000 (15:56 +0200)]
Move interaction subset predicates out of glm.c into interaction.c
Renamed function: is_subset --> interaction_is_proper_subset
drop_from_submodel --> interaction_is_subset
and moved them into interaction.c This seems to me to be easier
to understand, and more efficient.
John Darrington [Fri, 23 Sep 2011 12:58:01 +0000 (14:58 +0200)]
GLM: Add a test for a full factorial anova example
John Darrington [Fri, 23 Sep 2011 12:29:40 +0000 (14:29 +0200)]
Smake give correct dependencies where they are well defined
John Darrington [Sun, 25 Sep 2011 11:22:56 +0000 (13:22 +0200)]
Added dialog box for univariate anova.
Added a dialog box to conduct a univariate anova using the GLM
command. Currently only entry of the dependent variable and the
factors are possible. Choosing the interactions must be done
through syntax, if the default is not what the user wants.
John Darrington [Tue, 20 Sep 2011 19:02:01 +0000 (21:02 +0200)]
Fix warnings and remove conditional compilation which is no longer necessary
Jason H Stover [Sun, 18 Sep 2011 21:10:17 +0000 (17:10 -0400)]
Fixed type 3 sums of squares for models containing interactions
John Darrington [Sat, 10 Sep 2011 07:25:28 +0000 (09:25 +0200)]
Added a summary introduction to INSTALL, to try to make it less frightening to inexperienced users
John Darrington [Tue, 6 Sep 2011 19:48:48 +0000 (21:48 +0200)]
Moved call to gl_NEXT_HEADER outside the conditional.
Fixes bug #33585
John Darrington [Sat, 3 Sep 2011 12:14:50 +0000 (14:14 +0200)]
File Open dialog: disable encoding selector when not applicable
John Darrington [Sat, 3 Sep 2011 11:29:47 +0000 (13:29 +0200)]
Filter file choosers by mimetype instead of file name
John Darrington [Sat, 3 Sep 2011 04:54:16 +0000 (06:54 +0200)]
Avoid compiler warnings about uninitialised variables.
Some compilers produced warnings about possible use of
uninitialised variables (although such use was in fact not possible)
These warnings were harmless (perhaps even erroneous) but
it's no problem to avoid them.
John Darrington [Fri, 2 Sep 2011 18:59:54 +0000 (20:59 +0200)]
Fix make makedistcheck and re-organize icon paths.
This change does several things:
* renamed psppicon.png to pspp.png - The word "icon" is redundant
(it's also a misuse of English).
* Changed the install target of the existing 16x16 pictograms out of the apps
directory. Instead, they now go in a directory of their own called "pspp".
This is more in line with what other applications seem to do. It also makes
it a lot easier to deal uninstall them, since we can be reasonably sure that
everything in the "pspp" directory was put there by us.
* Ensures that make distcheck passes.
John Darrington [Sun, 28 Aug 2011 12:01:51 +0000 (14:01 +0200)]
GLM: Disable the interactions option until it actually gives the right results
John Darrington [Sun, 28 Aug 2011 10:39:51 +0000 (12:39 +0200)]
Added an implementation of the median test
Ben Pfaff [Fri, 26 Aug 2011 03:28:26 +0000 (20:28 -0700)]
Fix build error if "close" macro is not always visible.
Harry Thijssen <pspp@sjpaes.nl> reported the following errors
with recent Gnulib on Win32:
src/language/lexer/lexer.c: In function 'lex_source_destroy':
src/language/lexer/lexer.c:1455: error: 'const struct
lex_reader_class' has no member named 'rpl_close'
src/language/lexer/lexer.c:1456: error: 'const struct
lex_reader_class' has no member named 'rpl_close'
The problem was that the Gnulib substitute for <unistd.h>
defines close to rpl_close, but this macro definition wasn't
visible when lexer.c included lexer.h and became visible later.
This commit fixes the problem by making sure that the macro
definition is always visible in lexer.h.
A better solution would probably be to rename the 'close'
member to something other than a standard POSIX function name.
The change to control-stack.h is just precautionary; Harry
didn't report the same problem there.
Ben Pfaff [Thu, 25 Aug 2011 03:51:47 +0000 (20:51 -0700)]
range-set: Fix typo in comment.
John Darrington [Wed, 24 Aug 2011 07:29:49 +0000 (09:29 +0200)]
Improve paste to Openoffice.org &c
Added "css" and "borders" options to the html driver, and
set these options to false when generating clipboard data.
This produces better looking results when cut & pasting to
OOo
John Darrington [Tue, 23 Aug 2011 19:29:52 +0000 (21:29 +0200)]
Update the recommended gnulib commit, since it contains an important w32 fix
John Darrington [Tue, 23 Aug 2011 19:26:20 +0000 (21:26 +0200)]
Fix warnings
Ben Pfaff [Tue, 23 Aug 2011 16:07:56 +0000 (09:07 -0700)]
po: Add French translation from translationproject.org
Ben Pfaff [Sun, 21 Aug 2011 23:57:13 +0000 (16:57 -0700)]
gui: Add missing $(DESTDIR) to install rule.
Also, delete white space from otherwise blank line.
Ben Pfaff [Sat, 20 Aug 2011 21:47:25 +0000 (14:47 -0700)]
glade: Fix building libglade_psppire.
Otherwise GCC can't find the gtksourceview header files.
Matìj Cepl [Sat, 20 Aug 2011 10:49:02 +0000 (12:49 +0200)]
gui: Streamline pspp.desktop
Remove the extension for Icon (unnecessary, in case in
future we want to provide for example SVG icon) and removed
unnecessary keys. Do we know for fact that we will never ever
support Notifications? And I guess if we provide the .desktop and
executable as part of the same tarball/package there is not much
chance we would have binary missing. I have also added a Czech
translation of keys.
Signed-off-by: Matìj Cepl <mcepl@redhat.com>
John Darrington [Sat, 20 Aug 2011 05:52:41 +0000 (07:52 +0200)]
Merge remote branch 'origin/sourceview'