pspp
13 years agodata-in: Get rid of first_column, last_column arguments. 20100925040502/pspp
Ben Pfaff [Fri, 24 Sep 2010 04:03:36 +0000 (21:03 -0700)]
data-in: Get rid of first_column, last_column arguments.

Most callers can't provide this arguments, and so in the interest of
making the data_in() interface simpler, it seems better to put the
callers in charge of dealing with error messages, since they better
know their own context.

13 years agodata-in: Make data_in() parameters more uniform.
Ben Pfaff [Mon, 20 Sep 2010 04:36:58 +0000 (21:36 -0700)]
data-in: Make data_in() parameters more uniform.

data_in() essentially takes an input encoding and an output encoding but
the parameters were in inconsistent order, inconsistently named, and had
inconsistent types.  This commit changes all that to, I hope, be easier to
understand.

13 years agodata-in: Rewrite logic for recoding input, and get rid of src_enc member.
Ben Pfaff [Fri, 24 Sep 2010 03:56:50 +0000 (20:56 -0700)]
data-in: Rewrite logic for recoding input, and get rid of src_enc member.

The logic used here seemed actually wrong for non-binary numeric formats
and AHEX format: we want these translated into the native encoding so that
we can interpret digits and letters properly without additional work.
The only case where we care about the output encoding is A format.

13 years agodata-in: Eliminate "implied_decimals" parameter from data_in().
Ben Pfaff [Mon, 20 Sep 2010 03:55:06 +0000 (20:55 -0700)]
data-in: Eliminate "implied_decimals" parameter from data_in().

This parameter is usually 0, so break out the associated functionality into
a new function that callers can use if they really need it.

13 years agocalendar: Use sensible error reporting in calendar_gregorian_to_offset().
Ben Pfaff [Sat, 18 Sep 2010 00:10:44 +0000 (17:10 -0700)]
calendar: Use sensible error reporting in calendar_gregorian_to_offset().

13 years agomessage: Add column range to struct msg_locator.
Ben Pfaff [Sun, 19 Sep 2010 18:07:09 +0000 (11:07 -0700)]
message: Add column range to struct msg_locator.

data_in() can specify a range of columns for the messages that it outputs,
but until now these were not output in the format specified by the GNU
Coding Standards.  This commit fixes that.

13 years agomessage: Consistently initialize locator; use 0 for "no line number".
Ben Pfaff [Sun, 19 Sep 2010 18:04:41 +0000 (11:04 -0700)]
message: Consistently initialize locator; use 0 for "no line number".

A few of the callers of msg_emit() did not initialize the "where" member
of the struct msg, because they expect that msg_emit() will do it for them.
This is currently correct, but I intend to soon introduce the ability for
msg_emit()'s caller to specify a location.  With that change, it will be
important for the caller to initialize this member, so this commit makes
sure of that.

At the same time, some callers were using -1 as the default value that
means "no line number" and others were using 0.  This commit standardizes
on the latter.

13 years agocommand: Add specific DATASET unimplemented commands.
Ben Pfaff [Mon, 19 Jul 2010 04:12:10 +0000 (21:12 -0700)]
command: Add specific DATASET unimplemented commands.

13 years agocommand: Remove superfluous trailing spaces from command names.
Ben Pfaff [Sun, 18 Jul 2010 21:57:02 +0000 (14:57 -0700)]
command: Remove superfluous trailing spaces from command names.

These spaces made user messages look a little funny but they were otherwise
harmless.

13 years agocommand: Remove INSERT from list of unimplemented commands.
Ben Pfaff [Sun, 18 Jul 2010 21:55:55 +0000 (14:55 -0700)]
command: Remove INSERT from list of unimplemented commands.

This command is implemented, so this was a duplicate entry.

13 years agolexer: Use lex_is_string() more consistently.
Ben Pfaff [Sun, 12 Sep 2010 21:05:36 +0000 (14:05 -0700)]
lexer: Use lex_is_string() more consistently.

The lexer has this function, so we might as well use it consistently.

13 years agolexer: Remove DUMP_TOKENS debugging feature.
Ben Pfaff [Mon, 12 Jul 2010 05:04:17 +0000 (22:04 -0700)]
lexer: Remove DUMP_TOKENS debugging feature.

This feature is not very useful anymore.  I have not used it in years.

13 years agolexer: Improve translatability of lex_error().
Ben Pfaff [Sat, 11 Sep 2010 20:54:25 +0000 (13:54 -0700)]
lexer: Improve translatability of lex_error().

In general I believe that it is easier to translate full sentences or
clauses.  It seems likely that "Syntax error %s at %s." where the first
%s is an arbitrary English phrase would be impossible to translate
grammatically into some languages, so this changes the general form to
"Syntax error at %s: %s." which seems more likely to be translatable while
not changing the English meaning.

13 years agoMake translation easier.
Ben Pfaff [Fri, 17 Sep 2010 03:59:13 +0000 (20:59 -0700)]
Make translation easier.

Many of the invocations of lex_error() were easy to rephrase to be more
easily translated, or to rewrite as calls to other functions.

13 years agoHOST: Use more modern syntax.
Ben Pfaff [Tue, 6 Jul 2010 23:17:19 +0000 (16:17 -0700)]
HOST: Use more modern syntax.

An old SPSS paper manual I have describes the syntax that PSPP
implemented for HOST up until this commit, but newer versions
describe the syntax that this commit adopts.

13 years agoAGGREGATE: Simplify code.
Ben Pfaff [Sun, 12 Sep 2010 21:06:55 +0000 (14:06 -0700)]
AGGREGATE: Simplify code.

ds_chomp() returns whether it trimmed off a character, and we might as well
use that instead of doing a redundant check.

13 years agoPERMISSIONS: Add missing check for string token.
Ben Pfaff [Sun, 12 Sep 2010 21:05:59 +0000 (14:05 -0700)]
PERMISSIONS: Add missing check for string token.

13 years agosyntax-string-source: Fix format string problems.
Ben Pfaff [Fri, 17 Sep 2010 23:50:44 +0000 (16:50 -0700)]
syntax-string-source: Fix format string problems.

create_syntax_string_source() treated its argument as a printf-style format
string but wasn't annotated properly.  Most of the callers did not pass
string literals and were not escaped, so change it not to format its string
and add a new function create_syntax_format_source() with the previous
behavior.

13 years agoi18n: New function recode_substring_pool().
Ben Pfaff [Fri, 24 Sep 2010 03:45:28 +0000 (20:45 -0700)]
i18n: New function recode_substring_pool().

Occasionally it is necessary to recode a string that might contain a null
byte.  This function is useful in such a case.

13 years agoi18n: Use UTF8 macro instead of "UTF8" literal string.
Ben Pfaff [Fri, 24 Sep 2010 03:40:03 +0000 (20:40 -0700)]
i18n: Use UTF8 macro instead of "UTF8" literal string.

I think that this was just a typo.

13 years agostr: Make ss_alloc_substring() allocate null-terminated strings.
Ben Pfaff [Sat, 11 Sep 2010 04:07:00 +0000 (21:07 -0700)]
str: Make ss_alloc_substring() allocate null-terminated strings.

This has little cost and it is occasionally valuable.

13 years agocast: New macro NULL_SENTINEL. 20100924040502/pspp
Ben Pfaff [Fri, 24 Sep 2010 03:18:01 +0000 (20:18 -0700)]
cast: New macro NULL_SENTINEL.

13 years agoRECODE: Suppress warning about conversion using CHAR_CAST_BUG.
Ben Pfaff [Mon, 20 Sep 2010 03:55:46 +0000 (20:55 -0700)]
RECODE: Suppress warning about conversion using CHAR_CAST_BUG.

13 years agotests: Remove unnecessary mention of header files from automake.mk.
Ben Pfaff [Wed, 22 Sep 2010 05:00:53 +0000 (22:00 -0700)]
tests: Remove unnecessary mention of header files from automake.mk.

These header files don't need to be listed.  They just clutter up the
makefile.

13 years agoi18n: Add simple tests.
Ben Pfaff [Wed, 22 Sep 2010 05:00:13 +0000 (22:00 -0700)]
i18n: Add simple tests.

13 years agoi18n: Handle EINVAL more gracefully. 20100922040502/pspp 20100923040501/pspp
Ben Pfaff [Tue, 21 Sep 2010 05:42:17 +0000 (22:42 -0700)]
i18n: Handle EINVAL more gracefully.

EINVAL indicates an invalid multibyte sequence at the end of buffer.  It
seems to me that there is no point in swallowing up a single byte and going
on at that point; instead, one might as well just declare the conversion
done after adding the fallback character.  This is what this commit does.

13 years agoi18n: Refactor for simplicity.
Ben Pfaff [Tue, 21 Sep 2010 05:40:43 +0000 (22:40 -0700)]
i18n: Refactor for simplicity.

It seems to me that recode_string_pool() is better implemented as a retry
loop around a simpler core.  This commit implements that.

13 years agoi18n: Properly restart conversion when output buffer overflows.
Ben Pfaff [Tue, 21 Sep 2010 05:15:38 +0000 (22:15 -0700)]
i18n: Properly restart conversion when output buffer overflows.

The E2BIG case tries to restart the whole conversion, by reinitializing
all variables to their initial states.  However the value of 'text' might
already have been advanced somewhat if there was a previous loop for e.g.
an invalid character.  This commit fixes the problem by keeping the
original 'text' around and using a moving input pointer instead.

13 years agoi18n: Ensure that every recoding starts from the initial shift state.
Ben Pfaff [Tue, 21 Sep 2010 05:05:08 +0000 (22:05 -0700)]
i18n: Ensure that every recoding starts from the initial shift state.

13 years agoi18n: Avoid memory leak when create_iconv() fails.
Ben Pfaff [Tue, 21 Sep 2010 04:50:21 +0000 (21:50 -0700)]
i18n: Avoid memory leak when create_iconv() fails.

13 years agoi18n: Lightly reformat comments to better resemble other files.
Ben Pfaff [Tue, 21 Sep 2010 04:41:02 +0000 (21:41 -0700)]
i18n: Lightly reformat comments to better resemble other files.

13 years agoFix bug #31052: Crash on histograms with only one datum 20100920040505/pspp 20100921040508/pspp
John Darrington [Sun, 19 Sep 2010 16:30:39 +0000 (18:30 +0200)]
Fix bug #31052: Crash on histograms with only one datum

13 years agoConst casts.
John Darrington [Sun, 19 Sep 2010 14:36:57 +0000 (16:36 +0200)]
Const casts.

Removed some unnecessary casts.  Changed some others to use the
macros from src/libpspp/cast.h instead of literal casts.

13 years agoFix outstanding quote style issues
John Darrington [Sat, 18 Sep 2010 14:54:31 +0000 (16:54 +0200)]
Fix outstanding quote style issues

13 years agoRemove gettext markup from diagnostic string.
John Darrington [Sat, 18 Sep 2010 14:26:15 +0000 (16:26 +0200)]
Remove gettext markup from diagnostic string.

Markin a debug string for translattion just puts unnecessary
load on the translators.

13 years agoFLIP: Don't change new variables to upper case.
John Darrington [Thu, 16 Sep 2010 16:11:17 +0000 (18:11 +0200)]
FLIP: Don't change new variables to upper case.

This was a legacy from the days when variables could only
be upper case.

13 years agolinreg: Delete unused static function. 20100919040502/pspp
Ben Pfaff [Sat, 18 Sep 2010 04:25:19 +0000 (21:25 -0700)]
linreg: Delete unused static function.

This function drew attention to itself through a warning about a missing
return type, but it isn't used so just delete it instead of adding a
return type

13 years agoONEWAY: Fix declaration-after-statement warning.
Ben Pfaff [Sat, 18 Sep 2010 04:17:43 +0000 (21:17 -0700)]
ONEWAY: Fix declaration-after-statement warning.

C90 requires declarations to precede statements within a block.

13 years agoSuppress warnings about conversions between char * and unsigned char *.
Ben Pfaff [Sat, 18 Sep 2010 04:03:57 +0000 (21:03 -0700)]
Suppress warnings about conversions between char * and unsigned char *.

For some time PSPP has used "unsigned char *" for string data and "char *"
for most other strings.  Transforming between these properly generally
involves recoding, and there are some places where this is possibly
missing.  The usual way to "fix" these warnings would be to insert casts,
but this would not fix the problem, just suppress the warnings, and it is
difficult to "grep" for casts so they would be hard to find for fixing
later.

This commit doesn't actually fix the problems, but it does suppress the
warnings while making them easy to find later: just grep for CHAR_CAST_BUG.

13 years agobuild-aux: Add generated files to .gitignore.
Ben Pfaff [Sat, 18 Sep 2010 03:52:56 +0000 (20:52 -0700)]
build-aux: Add generated files to .gitignore.

13 years agoUpdate string comparision in perl module test 20100917040503/pspp 20100918040503/pspp
John Darrington [Thu, 16 Sep 2010 13:21:54 +0000 (15:21 +0200)]
Update string comparision in perl module test

13 years agoUpdate en_GB localisation
John Darrington [Wed, 15 Sep 2010 13:21:18 +0000 (15:21 +0200)]
Update en_GB localisation

13 years agoConsolidate quoting style in printed strings.
John Darrington [Wed, 15 Sep 2010 12:53:41 +0000 (14:53 +0200)]
Consolidate quoting style in printed strings.

The GNU coding standards say to use `xxxx'  for quoted
strings.  Previously we've been using a mixture of that style
and "xxxx".  This change substitutes all instances of the latter
with the former.

13 years agoTranslate the names of aggretation functions. Fixes bug #31035 20100915040502/pspp 20100916040502/pspp
John Darrington [Tue, 14 Sep 2010 14:59:40 +0000 (16:59 +0200)]
Translate the names of aggretation functions.  Fixes bug #31035

13 years agoSyntax Window: Don't connect callbacks until all members are initialised.
John Darrington [Sun, 12 Sep 2010 15:58:05 +0000 (17:58 +0200)]
Syntax Window: Don't connect callbacks until all members are initialised.

13 years agoRename compare_string --> compare_string_3way
John Darrington [Sat, 11 Sep 2010 16:48:07 +0000 (18:48 +0200)]
Rename compare_string --> compare_string_3way

13 years agoPrevent critical when closing output viewer 20100912040502/pspp 20100913040502/pspp 20100914040502/pspp
John Darrington [Sat, 11 Sep 2010 08:26:05 +0000 (10:26 +0200)]
Prevent critical when closing output viewer

13 years agoAutorecode: /GROUP vs. heterogenous strings.
John Darrington [Sat, 11 Sep 2010 06:25:52 +0000 (08:25 +0200)]
Autorecode: /GROUP vs. heterogenous strings.

Fixed a crash which occured when the /GROUP
subcommand was used with string variables of
differing widths.

13 years agoAutorecode: Add the /GROUP subcommand 20100910040502/pspp
John Darrington [Thu, 9 Sep 2010 17:08:50 +0000 (19:08 +0200)]
Autorecode: Add the /GROUP subcommand

13 years agoFixed bug #30969: Crash in split file dialog box 20100907040503/pspp 20100908040502/pspp 20100909040502/pspp
John Darrington [Mon, 6 Sep 2010 13:07:42 +0000 (15:07 +0200)]
Fixed bug #30969: Crash in split file dialog box

13 years agoSeperate the GtkBuilder definition for Split into its own file.
John Darrington [Mon, 6 Sep 2010 12:30:17 +0000 (14:30 +0200)]
Seperate the GtkBuilder definition for Split into its own file.

13 years agoAutorecode: Add value labels indicating the source values. 20100906040502/pspp
John Darrington [Sun, 5 Sep 2010 12:16:58 +0000 (14:16 +0200)]
Autorecode: Add value labels indicating the source values.

Autorecode now creates value labels on the new variable to
indicate from which values the new values originate.
Fixes bug #30943

13 years agoRemove obsolete comments.
John Darrington [Sun, 5 Sep 2010 12:12:38 +0000 (14:12 +0200)]
Remove obsolete comments.

Value labels are no longer limited to short string
variables.  So these comments are no longer relevant.

13 years agoChange charset from html output to utf-8 20100904040502/pspp 20100905040503/pspp
Michel Boaventura [Sat, 4 Sep 2010 00:02:13 +0000 (21:02 -0300)]
Change charset from html output to utf-8

13 years agoImplement the PRESERVE and RESTORE commands. 20100830040502/pspp 20100831040502/pspp 20100901040503/pspp 20100902040507/pspp 20100903040502/pspp
Ben Pfaff [Sun, 29 Aug 2010 22:17:11 +0000 (15:17 -0700)]
Implement the PRESERVE and RESTORE commands.

13 years agosettings: Avoid using a pointer and global data for algorithms.
Ben Pfaff [Sun, 29 Aug 2010 21:55:41 +0000 (14:55 -0700)]
settings: Avoid using a pointer and global data for algorithms.

Until now the difference between the current and global settings for
the algorithms in uses has been maintained as two values plus a pointer
to the setting actually in use.  Using global data like that makes it
harder to save and restore settings, so this commit adopt an alternate
method that avoids using global data or pointers.

13 years agosettings: Make viewwidth, viewlength "int"s instead of pointers.
Ben Pfaff [Sun, 29 Aug 2010 18:37:19 +0000 (11:37 -0700)]
settings: Make viewwidth, viewlength "int"s instead of pointers.

I don't recall exactly why these were pointers any longer, but it doesn't
seem to be necessary any longer.  It is more straightforward if they are
just stored in the same way as the other settings.

13 years agosettings: Reformat the_settings initializer.
Ben Pfaff [Sun, 29 Aug 2010 03:38:18 +0000 (20:38 -0700)]
settings: Reformat the_settings initializer.

I find this formatting easier to read.

13 years agoformat: Introduce a new type, struct fmt_settings.
Ben Pfaff [Sun, 29 Aug 2010 21:53:01 +0000 (14:53 -0700)]
format: Introduce a new type, struct fmt_settings.

Until now the collection of formatting styles have been poorly abstracted,
as an array.  This commit introduces a new type, struct fmt_settings, that
represents all of the formatting styles currently in use.

13 years agoformat: Make fmt_number_style_init(), fmt_number_style_destroy() static.
Ben Pfaff [Sun, 29 Aug 2010 20:48:28 +0000 (13:48 -0700)]
format: Make fmt_number_style_init(), fmt_number_style_destroy() static.

These functions were not used outside format.c anyhow.

13 years agoformat: Remove prototypes of unimplemented functions.
Ben Pfaff [Sun, 29 Aug 2010 19:37:48 +0000 (12:37 -0700)]
format: Remove prototypes of unimplemented functions.

13 years agoformat: Move is_fmt_type() prototype near more-related functions.
Ben Pfaff [Sun, 29 Aug 2010 19:36:24 +0000 (12:36 -0700)]
format: Move is_fmt_type() prototype near more-related functions.

13 years agoformat: Remove declaration of data that is never used.
Ben Pfaff [Sun, 29 Aug 2010 18:54:36 +0000 (11:54 -0700)]
format: Remove declaration of data that is never used.

13 years agoImproved the syntax generated by the select-cases dialog 20100829040503/pspp
John Darrington [Sat, 28 Aug 2010 11:32:48 +0000 (13:32 +0200)]
Improved the syntax generated by the select-cases dialog

Closes bug #29604

13 years agoAllow translation of default filenames in GUI
John Darrington [Sat, 28 Aug 2010 11:24:12 +0000 (13:24 +0200)]
Allow translation of default filenames in GUI

13 years agoAllow translation of default variable name.
John Darrington [Sat, 28 Aug 2010 11:09:49 +0000 (13:09 +0200)]
Allow translation of default variable name.

13 years agoCategoricals: Sort the reverse value map. 20100825040502/pspp 20100826040503/pspp 20100827040503/pspp 20100828040502/pspp
John Darrington [Tue, 24 Aug 2010 14:17:17 +0000 (16:17 +0200)]
Categoricals: Sort the reverse value map.

The /CONTRAST subcommand of the ONEWAY command
requires that the categorical values are sorted
in ascending order.

13 years agoOneway: Fixed most compiler warnings
John Darrington [Mon, 23 Aug 2010 15:26:10 +0000 (17:26 +0200)]
Oneway: Fixed most compiler warnings

13 years agoOneway: Fix problems with MISSING=ANALYSIS
John Darrington [Mon, 23 Aug 2010 15:00:57 +0000 (17:00 +0200)]
Oneway: Fix problems with MISSING=ANALYSIS

13 years agoCategoricals: Use moments instead of keeping cc count ourselves
John Darrington [Mon, 23 Aug 2010 14:45:27 +0000 (16:45 +0200)]
Categoricals: Use moments instead of keeping cc count ourselves

13 years agooneway.c: Use the categoricals struct to calculate number of groups
John Darrington [Sun, 15 Aug 2010 15:50:14 +0000 (17:50 +0200)]
oneway.c: Use the categoricals struct to calculate number of groups

13 years agooneway: use new structures in the show_contrast_tests function
John Darrington [Sun, 15 Aug 2010 15:14:10 +0000 (17:14 +0200)]
oneway: use new structures in the show_contrast_tests function

13 years agooneway: Fix descriptives for multiple variables
John Darrington [Sun, 15 Aug 2010 11:10:37 +0000 (13:10 +0200)]
oneway: Fix descriptives for multiple variables

13 years agoAdd optional callback functions to categoricals.
John Darrington [Sat, 14 Aug 2010 17:49:51 +0000 (19:49 +0200)]
Add optional callback functions to categoricals.

Added callback functions to categoricals to enable
per category calculations to be done at the request
of the caller.  This change also modifies oneway.c (show_descriptives)
to use this new feature.  However at present it doesn't
work properly when multiple dependent variables are
specified.

13 years agoConstness
John Darrington [Sat, 14 Aug 2010 15:09:59 +0000 (17:09 +0200)]
Constness

13 years agoOneway: Remove group_stats from the show_homogeniety function
John Darrington [Sat, 14 Aug 2010 12:03:01 +0000 (14:03 +0200)]
Oneway: Remove group_stats from the show_homogeniety function

13 years agoOneway: Remove group_values struct from show_contrast_coeffs
John Darrington [Sat, 14 Aug 2010 11:46:39 +0000 (13:46 +0200)]
Oneway:  Remove group_values struct from show_contrast_coeffs

13 years agoCovariance matrix interface change.
John Darrington [Sat, 14 Aug 2010 09:16:21 +0000 (11:16 +0200)]
Covariance matrix interface change.

covariance_2pass_create now takes a pointer to a
struct categoricals which must be created by the caller,
instead of creating this object for itself.  This will
(hopefully) make the implementation of interactions and other
features easier.

13 years agoOneway: Remove dict member from struct and add wv member
John Darrington [Sat, 14 Aug 2010 08:06:23 +0000 (10:06 +0200)]
Oneway: Remove dict member from struct and add wv member

13 years agoOneway: Use covariance matrix and sweep operator
John Darrington [Fri, 13 Aug 2010 16:21:16 +0000 (18:21 +0200)]
Oneway: Use covariance matrix and sweep operator

Calculate the anova table using the routines from
src/math/covariance.c and lib/linreg/sweep.c instead
of the add hoc method.  This change doesn't remove
all traces of the old method, since the data is still
needed for some subcommands.  This will be the subject
of future changes.

13 years agoOneway: Additional test case.
John Darrington [Thu, 12 Aug 2010 19:12:30 +0000 (21:12 +0200)]
Oneway: Additional test case.

Add an explicit test for a oneway command run
on several different dependent variables.

13 years agoOneway: Use lex_get_num instead of lex_parse_value.
John Darrington [Thu, 12 Aug 2010 16:13:26 +0000 (18:13 +0200)]
Oneway:  Use lex_get_num instead of lex_parse_value.

Contrast coefficients can only be numeric, so parse_value
is an unnecessary generalisation.

13 years agoConstness
John Darrington [Sun, 8 Aug 2010 11:20:46 +0000 (13:20 +0200)]
Constness

13 years agoConstness
John Darrington [Sun, 8 Aug 2010 08:10:09 +0000 (10:10 +0200)]
Constness

13 years agoONEWAY: seperate the command specification from the variables used in its calculation
John Darrington [Sun, 8 Aug 2010 08:02:32 +0000 (10:02 +0200)]
ONEWAY: seperate the command specification from the variables used in its calculation

13 years agoCategoricals.c Create entries for all groups.
John Darrington [Sun, 8 Aug 2010 07:33:19 +0000 (09:33 +0200)]
Categoricals.c Create entries for all groups.

Although for the purposes of creating a covariance matrix, only
n - 1 entries are needed,  for other purposes (such as descriptive
statistics, contrasts, planned comparisons etc) all n entries are required.
(where n is the number of distinct values).  This change updates
categories.c so that all n categories are generated.  Covariance matrix
routines are free to ignore the ones not of interest.

13 years agoSyntax Window: Dynamically set paste sensitivity
John Darrington [Tue, 24 Aug 2010 12:46:37 +0000 (14:46 +0200)]
Syntax Window: Dynamically set paste sensitivity

Set the sensitivity of the paste action according to
whether there is anything to be pasted in the clipboard.

13 years agoImplemented Edit->Paste in the syntax viewer
John Darrington [Mon, 23 Aug 2010 20:36:32 +0000 (22:36 +0200)]
Implemented Edit->Paste in the syntax viewer

13 years agoformat: Optimize fmt_from_io(). 20100824040503/pspp
Ben Pfaff [Mon, 16 Aug 2010 05:03:19 +0000 (22:03 -0700)]
format: Optimize fmt_from_io().

A "switch" statement should be much faster than a linear search.

13 years agoformat: Fix type code for Z format in system and portable files.
Ben Pfaff [Mon, 16 Aug 2010 05:02:38 +0000 (22:02 -0700)]
format: Fix type code for Z format in system and portable files.

Z format is code 15, not 16 (which is N format).

13 years agoSyntax Window: Edit->* item sensitivity follows selection
John Darrington [Mon, 23 Aug 2010 17:30:10 +0000 (19:30 +0200)]
Syntax Window: Edit->* item sensitivity follows selection

Disable the Edit Cut/Copy/Delete menuitems by default
and enable them only when a selection is active.

13 years agoImplemented Cut, Copy and Delete in the syntax editor
John Darrington [Mon, 23 Aug 2010 16:57:31 +0000 (18:57 +0200)]
Implemented Cut, Copy and Delete in the syntax editor

13 years agoSET MXWARNS = 0 to be interpreted as unlimited. 20100822040502/pspp 20100823040503/pspp
John Darrington [Sun, 22 Aug 2010 10:36:37 +0000 (12:36 +0200)]
SET MXWARNS = 0 to be interpreted as unlimited.

This change introduces a special meaning to the
value of zero for the MXWARNS settings.  When
a zero value is set.  A single warning will be
emitted informing the user that the setting is
in effect.  Thereafter no warning will be emitted.
All warning situations will be ignored.

13 years agoMove MX* processing to libpspp/message.c
John Darrington [Sun, 22 Aug 2010 09:05:16 +0000 (11:05 +0200)]
Move MX* processing to libpspp/message.c

This change moves the guts of src/ui/terminal/msg-ui.c
into libpspp/message.c  The affected code handles the
processing of the MXWARNS and MXERRS settings.  As this
code was under src/ui/terminal these settings were being
ignored in the GUI

13 years agoUpdate tests to reflect string changes.
John Darrington [Sun, 22 Aug 2010 08:46:58 +0000 (10:46 +0200)]
Update tests to reflect string changes.

Commits 608b1765241e7c6f9bd5e86a8f81cf15edeb413b and
c1a56a1dd2afad462cf76d91c40aa064cc7dce04 changed some
output strings, but didn't update the tests to match.
This change makes that update.

13 years agosyntax-editor.ui cleanup 20100821040503/pspp
John Darrington [Sat, 21 Aug 2010 10:53:51 +0000 (12:53 +0200)]
syntax-editor.ui cleanup

13 years agoAllow undo/redo of pasted text as a single item
John Darrington [Sun, 8 Aug 2010 15:46:02 +0000 (17:46 +0200)]
Allow undo/redo of pasted text as a single item

13 years agoText input dialog: Use widget-io
John Darrington [Sat, 21 Aug 2010 09:48:05 +0000 (11:48 +0200)]
Text input dialog: Use widget-io

Use the widget_scanf function instead of manually
juxtaposing widgets.  This makes life a lot easier
for translators.

13 years agoCanonicalise 2-tailed vs. 2-sided
John Darrington [Sat, 21 Aug 2010 08:37:02 +0000 (10:37 +0200)]
Canonicalise 2-tailed vs. 2-sided

13 years agoConsolidate printed strings
John Darrington [Sat, 21 Aug 2010 08:35:32 +0000 (10:35 +0200)]
Consolidate printed strings