John Darrington [Fri, 21 Dec 2007 09:12:45 +0000 (09:12 +0000)]
Closing bug #21760
John Darrington [Thu, 13 Dec 2007 23:27:02 +0000 (23:27 +0000)]
gtk_window_set_transient_for: Wrong argument order.
John Darrington [Thu, 13 Dec 2007 23:20:28 +0000 (23:20 +0000)]
Remove unused variables.
John Darrington [Thu, 13 Dec 2007 10:35:51 +0000 (10:35 +0000)]
Oops. Arguments reversed.
John Darrington [Thu, 13 Dec 2007 07:58:20 +0000 (07:58 +0000)]
Miscellaneous T Test improvements. See bug #21760
John Darrington [Wed, 12 Dec 2007 00:26:26 +0000 (00:26 +0000)]
Whitespace changes only.
John Darrington [Tue, 11 Dec 2007 11:46:04 +0000 (11:46 +0000)]
Added the proper quotation marks in the syntax generator when the groups
variable is a string variable.
John Darrington [Mon, 10 Dec 2007 10:21:05 +0000 (10:21 +0000)]
Added the One Sample T Test dialog
John Darrington [Sat, 8 Dec 2007 06:32:02 +0000 (06:32 +0000)]
Oops
Ben Pfaff [Sat, 8 Dec 2007 06:17:00 +0000 (06:17 +0000)]
Patch #6302.
(data_parser_make_active_file): Fix case count
argument to casereader_create_sequential, which fixes data reading
in the GUI.
Provided by John Darrington.
John Darrington [Sat, 8 Dec 2007 06:10:03 +0000 (06:10 +0000)]
Create a "pspp-stock-select" stock icon, and use it in selector actions.
It probably won't ever get displayed, but avoids GtkCritical errors in
older gtk libraries.
Ben Pfaff [Sat, 8 Dec 2007 06:09:03 +0000 (06:09 +0000)]
Patch #6302.
* casegrouper.c (casegrouper_get_next_group): Cause a casegrouper
made from an empty casereader produce a casegrouper with no
groups, instead of one with one group that has no cases.
* casereader.c (casereader_is_empty): New function.
Ben Pfaff [Sat, 8 Dec 2007 06:05:35 +0000 (06:05 +0000)]
Patch #6302.
* crosstabs.q (precalc): Initialize data structures even if the
first case cannot be read.
* frequencies.q (precalc): Ditto.
Ben Pfaff [Fri, 7 Dec 2007 05:22:06 +0000 (05:22 +0000)]
Handle variable display parameters record with only 2 data items per
variable. Reported by Guido Gay <gay@irer.it>.
John Darrington [Fri, 7 Dec 2007 04:11:24 +0000 (04:11 +0000)]
Made the options subdialog transient on the parent.
Ben Pfaff [Wed, 5 Dec 2007 06:41:27 +0000 (06:41 +0000)]
Mention GET DATA support for text data files.
Ben Pfaff [Wed, 5 Dec 2007 06:40:12 +0000 (06:40 +0000)]
Implement GET DATA/TYPE=TXT.
* automake.mk: Add new tests.
* command/get-data-txt.sh: New test.
* command/get-data-txt-examples.sh: New test.
* command/get-data-txt-importcases.sh: New test.
* data-parser.c: New file.
* data-parser.h: New file.
* data-list.c (struct dls_var_spec): Removed.
(ll_to_dls_var_spec): Removed.
(enum dls_type): Removed.
(struct data_list_pgm): Rename struct data_list_trns. Remove
pool, specs, type, record_cnt, delims, skip_records, value_cnt
members. Add new `parser' member.
(cmd_data_list): Use data-parser infrastructure.
(parse_fixed): Ditto.
(parse_free): Ditto.
(dump_fixed_table): Removed.
(dump_free_table): Removed.
(cut_field): Removed.
(read_from_data_list): Removed.
(read_from_data_list_fixed): Removed.
(read_from_data_list_free): Removed.
(read_from_data_list_list): Removed.
(data_list_trns_free): Rename arguments for clarity.
(data_list_trns_proc): Ditto.
(data_list_casereader_read): Removed.
(data_list_casereader_destroy): Removed.
(data_list_casereader_class): Removed.
* get-data.c (cmd_get_data): Support TXT type.
(set_type): New function.
(parse_get_txt): New function.
Ben Pfaff [Wed, 5 Dec 2007 06:24:46 +0000 (06:24 +0000)]
Allow parsing 0-based column ranges.
(parse_column): New function.
(parse_column_range): Add `base' argument. Update all callers.
Ben Pfaff [Wed, 5 Dec 2007 06:22:45 +0000 (06:22 +0000)]
Make GET DATA a separate command, instead of something invoked
indirectly from GET.
* automake.mk: Remove get-data.h from sources.
* get-data.h: Removed.
* get-data.c (parse_get_data_command): Rename cmd_get_data.
* get.c (parse_read_command): No longer any need to check for DATA
keyword.
* command.def: Add GET DATA command.
Ben Pfaff [Wed, 5 Dec 2007 06:15:38 +0000 (06:15 +0000)]
* lexer.c (lex_match_id_n): New function.
(lex_match_id): Reimplement in terms of lex_match_id_n.
* identifier.c (lex_id_match_n): New function.
(lex_id_match): Reimplement in terms of lex_id_match_n.
Ben Pfaff [Wed, 5 Dec 2007 06:04:59 +0000 (06:04 +0000)]
* src/language/data-io/data-reader.c (struct dfm_reader): New
`file_size' member to support dfm_get_percent_read.
(dfm_open_reader): Initialize file_size.
(dfm_get_percent_read): New function.
* Smake (GNULIB_MODULES): Add ftello module.
Jason Stover [Tue, 4 Dec 2007 04:22:24 +0000 (04:22 +0000)]
Removed 'Written by' line
John Darrington [Sat, 1 Dec 2007 04:42:19 +0000 (04:42 +0000)]
Implemented the FREQUENCIES dialog.
John Darrington [Fri, 30 Nov 2007 04:19:08 +0000 (04:19 +0000)]
Made libglade_psppire.so link against gl/libgl.a
Ben Pfaff [Sun, 25 Nov 2007 19:11:39 +0000 (19:11 +0000)]
* bugs/compression.sh: Don't fail on big-endian system. Partial
fix for bug #21590.
* bugs/sysfile-info.sh: Disregard "Integer Format" and "Real
Format" lines in SYSFILE INFO output, to permit big-endian systems
to pass also. Partial fix for bug #21590.
* float-format.c (assemble_number): Only store 32 bits for Z short
format. Partial fix for bug #21590.
Ben Pfaff [Sun, 25 Nov 2007 06:17:16 +0000 (06:17 +0000)]
(src_data_libdata_a_SOURCES): Add val-type.h, to fix make distcheck.
Ben Pfaff [Sat, 24 Nov 2007 22:14:43 +0000 (22:14 +0000)]
(short_names_assign): Fix dumb typo, in which `i' was written where
`j' was meant.
John Darrington [Fri, 23 Nov 2007 10:34:53 +0000 (10:34 +0000)]
Implemented the recode dialogs.
John Darrington [Fri, 23 Nov 2007 05:39:53 +0000 (05:39 +0000)]
Appended "EXECUTE." to the end of syntax generated by the compute dialog.
John Darrington [Wed, 21 Nov 2007 11:57:15 +0000 (11:57 +0000)]
Added new icons to the install target.
John Darrington [Wed, 21 Nov 2007 08:25:54 +0000 (08:25 +0000)]
Added glade-3 iconettes for the acr widget.
Ben Pfaff [Mon, 19 Nov 2007 01:06:05 +0000 (01:06 +0000)]
Correctly calculate n_missing_values field when writing variables that
include a range of missing values.
Ben Pfaff [Sun, 18 Nov 2007 04:10:34 +0000 (04:10 +0000)]
Mention that pkg-config versions 0.18 and 0.19 are buggy.
Mention that pkg-config is required to read Gnumeric files.
Ben Pfaff [Thu, 15 Nov 2007 15:00:34 +0000 (15:00 +0000)]
Add definition of CHARSETALIASDIR to TESTS_ENVIRONMENT, to allow
locale_charset to find charset.alias before running "make install".
Ben Pfaff [Mon, 12 Nov 2007 00:54:50 +0000 (00:54 +0000)]
(display_variables): Fix DISPLAY LABELS. Thanks to Guido Gay
<gay@irer.it> for reporting this bug.
Ben Pfaff [Sun, 11 Nov 2007 05:51:38 +0000 (05:51 +0000)]
Patch #6262. New developers guide and resulting fixes and cleanups.
* automake.mk (src_data_libdata_a_SOURCES): Add new files.
* dict-class.c: New file.
(dict_class_from_id): Move here.
(dict_class_to_name): Move here.
* dict-class.h: New file.
(enum dict_class): Move here. Change from consecutive integers to
consecutive bits, to make testing for any of multiple values
easier. Add new DC_ALL constant.
* dictionary.c (struct dictionary): Change `case_limit' from
size_t to casenumber.
(dict_get_vars): Make final argument an enum dict_class.
(dict_get_vars_mutable): Ditto.
(dict_get_case_limit): Change return value to casenumber.
(dict_set_case_limit): Change final argument to a casenumber.
(dict_unset_split_var): Add assertion. Rephrase slightly.
(dict_set_label): Use xstrndup to simplify.
* format.c (fmt_step_width): AHEX format also needs 2-byte
stepping.
(fmt_set_style): Simplify assertions.
* missing-values.c (mv_add_num_range): Rename mv_add_range.
Simplify implementation.
(mv_has_value): Simplify implementation.
(mv_pop_value): Remove the first value, not the last, to avoid
having GET followed by SAVE reverse the order of missing values.
(mv_peek_value): Rename mv_get_value. Simplify assertion.
(mv_has_range): Simplify implementation.
(mv_peek_range): Rename mv_get_range.
(can_resize_string): Removed.
(mv_is_resizable): Use value_is_resizable.
(mv_resize): Use value_resize.
* short-names.h (SHORT_NAME_LEN): Move here.
* val-type.h: New file, for definitions related to type and width
of abstract values. Before, these definitions were mixed among
those related to "union value" and those related to variables.
(macro SYSMIS): Move here.
(macro LOWEST): Move here.
(macro HIGHEST): Move here.
(macro MAX_STRING); Move here.
(enum val_type): New enum with values VAL_NUMERIC and VAL_STRING.
Replaces enum var_type that had values VAR_NUMERIC and VAR_STRING.
All references updated.
(val_type_is_valid): New function. Replaces var_type_is_valid.
All references updated.
(val_type_from_width): New function. Replaces
var_type_from_width. All references updated.
* value-labels.c (val_labs_copy): Renamed val_labs_clone. All
references updated.
(val_labs_can_set_width): Use value_is_resizable.
(val_labs_add): Simply return false if the value labels set is too
wide, instead of having undefined behavior.
(val_labs_replace): Ditto.
(val_labs_replace): Ditto.
(val_labs_first): Set iterator to null if iteration is complete.
(val_labs_first_sorted): Ditto.
(val_labs_done): Become a no-op if the iterator is null.
* value.c (value_is_resizable): New function.
(value_resize): New function.
* variable.c (var_get_dict_class): New function.
* variable.h (macro LONG_NAME_LEN): Rename VAR_NAME_LEN. Update
all references.
* not-implemented.texi: Fix @include command so that it works
consistently, by using a file name relative to Makefile.am's
srcdir instead of relative to doc.
Ben Pfaff [Sat, 10 Nov 2007 21:28:04 +0000 (21:28 +0000)]
Pass -b option to diff to avoid spurious failure of
tests/bugs/compression.sh on od.
Ben Pfaff [Sat, 10 Nov 2007 17:43:26 +0000 (17:43 +0000)]
Fix typo.
Thanks to Erik Sigra for reporting this bug.
Ben Pfaff [Fri, 9 Nov 2007 03:06:28 +0000 (03:06 +0000)]
* automake.mk: Add new file.
* formats/360.sh: New test.
* str.c (ds_read_stream): Change return value semantics to be more
useful. Update all users.
* data-reader.c (struct dfm_reader): New member `block_left'.
(dfm_open_reader): Initialize block_left. For FH_MODE_TEXT, open
the file in text mode.
(read_error): New function.
(partial_record): New function.
(try_to_read_fully): New function.
(enum descriptor_type): New enum.
(read_descriptor_word): New function.
(corrupt_size): New function.
(read_size): New function.
(read_file_record): Implement new modes.
(read_record): Now take care of tracking line numbers here.
(dfm_reader_get_legacy_encoding): New function.
* data-writer.c (dfm_put_record): Implement new modes.
(dfm_writer_get_legacy_encoding): New function.
* file-handle.q: Parse new formats.
(cmd_file_handle): Set up new formats.
* print.c (struct print_trns): New member `encoding'.
(internal_cmd_print): Set encoding.
(print_trns_proc): Recode output data if necessary.
(flush_records): Recode leader byte.
* data-in.c: Make formatted data parsing locale-independent.
(parse_number): Use c_strtod instead of strtod, to avoid
locale-specific behavior.
(parse_Z): Ditto.
John Darrington [Thu, 8 Nov 2007 21:27:18 +0000 (21:27 +0000)]
Need to include locale.h, now that it's been removed from config.h
John Darrington [Thu, 8 Nov 2007 21:25:39 +0000 (21:25 +0000)]
Fixed memory leaks.
John Darrington [Thu, 8 Nov 2007 00:24:16 +0000 (00:24 +0000)]
Remove po/pspp.pot
Ben Pfaff [Wed, 7 Nov 2007 14:43:50 +0000 (14:43 +0000)]
* bugs/overwrite-input-file.sh: Don't use non-portable "diff -B".
* bugs/overwrite-special-file.sh: Ditto.
Ben Pfaff [Tue, 6 Nov 2007 06:25:33 +0000 (06:25 +0000)]
Need to include <sys/stat.h>. Bug #21516.
Ben Pfaff [Tue, 6 Nov 2007 06:23:25 +0000 (06:23 +0000)]
Patch #6258.
* command.c (report_state_mismatch): Replace code to construct an
error message from bits and pieces by a switch statement that
hard-codes each possible error. Makes i18n easier.
Suggested by Chusslove Illich <caslav.ilic@gmx.net>.
* file-handle-def.c (fh_lock): Add comment that TYPE should be
marked with N_() in the caller. Added these markings to each
caller too. Should make i18n easier.
Suggested by Chusslove Illich <caslav.ilic@gmx.net>.
Ben Pfaff [Tue, 6 Nov 2007 05:49:04 +0000 (05:49 +0000)]
No need for check for off_t or for the size of float or long double
any longer, as we don't use the results anymore. Also, no need to put
#include <locale.h> into config.h any longer, as this was only needed
for --with-included-gettext, which we have not supported for some
time.
John Darrington [Tue, 6 Nov 2007 01:35:26 +0000 (01:35 +0000)]
Added call to PKG_PROG_PKG_CONFIG.
Created a GNM_SUPPORT conditional.
Hopefully fixes bugs #21516 and #21518
Ben Pfaff [Sun, 4 Nov 2007 22:51:59 +0000 (22:51 +0000)]
Merge news items from 0.4.0 to 0.4.3. Also, untabify.
Ben Pfaff [Sun, 4 Nov 2007 16:03:00 +0000 (16:03 +0000)]
Suggestions for NEWS from John Darrington.
Ben Pfaff [Sun, 4 Nov 2007 06:08:03 +0000 (06:08 +0000)]
Update NEWS for the upcoming release.
Ben Pfaff [Sun, 4 Nov 2007 06:07:29 +0000 (06:07 +0000)]
Add zlib, libxml2 to optional library dependencies.
Ben Pfaff [Sun, 4 Nov 2007 06:07:00 +0000 (06:07 +0000)]
Fix typos.
Ben Pfaff [Sat, 3 Nov 2007 22:00:03 +0000 (22:00 +0000)]
Allow output files to overwrite input files (bug #21280). Thanks to
John Darrington for review.
John Darrington [Sat, 3 Nov 2007 08:50:22 +0000 (08:50 +0000)]
Fix buglet reading spreadsheets with only one row.
John Darrington [Sat, 3 Nov 2007 07:01:32 +0000 (07:01 +0000)]
Remove erroneous #include
John Darrington [Sat, 3 Nov 2007 03:43:10 +0000 (03:43 +0000)]
Added support for reading Gnumeric spreadsheet files.
Thanks to Ben for revieing this code.
Ben Pfaff [Sat, 3 Nov 2007 02:32:37 +0000 (02:32 +0000)]
Use isfinite, round modules from gnulib.
Ben Pfaff [Sun, 28 Oct 2007 18:39:28 +0000 (18:39 +0000)]
Fix typos.
John Darrington [Sat, 27 Oct 2007 07:12:40 +0000 (07:12 +0000)]
Fixed bugs #21397 and 21330
John Darrington [Thu, 25 Oct 2007 11:24:29 +0000 (11:24 +0000)]
Enabled the autoscroll feature on the datasheet.
John Darrington [Fri, 19 Oct 2007 05:51:12 +0000 (05:51 +0000)]
Implemented a dialog box for the ONEWAY command.
Ben Pfaff [Mon, 15 Oct 2007 04:31:35 +0000 (04:31 +0000)]
Delete test that is obsolete and has not been run automatically in ages.
John Darrington [Sat, 13 Oct 2007 07:22:55 +0000 (07:22 +0000)]
Implemented the Rank Cases dialog
Ben Pfaff [Sat, 13 Oct 2007 04:57:48 +0000 (04:57 +0000)]
Use trunc module from gnulib instead of our home-grown solution.
Patch #6224.
* helpers.c: Don't need our own trunc function implementation
anymore, since we now use the one from gnulib.
* Smake: Add trunc to module list.
* configure.ac: Don't need to check for trunc function any longer.
Ben Pfaff [Sat, 13 Oct 2007 04:40:06 +0000 (04:40 +0000)]
Use fseeko module from gnulib instead of our home-grown solution.
Patch #6228.
* flip.c (flip_file): No need to conditionally substitute for
"fseeko" and "off_t" manually anymore, as gnulib takes care of it
for us.
* acinclude.m4: Delete PSPP_OFF_T macro.
* configure.ac: Don't call AC_FUNC_FSEEKO or PSPP_OFF_T.
Ben Pfaff [Sat, 13 Oct 2007 04:35:25 +0000 (04:35 +0000)]
posix-xprintf-functions.patch from patch #6230.
Add fprintf-posix, printf-posix, printf-safe,
snprintf-posix, sprintf-posix, vasprintf-posxi, vfprintf-posix,
vprintf-posix, vsnprintf-posix, and vsprintf-posix modules, which
allow us to use C99 format specifiers (e.g. 'z') in *printf.
Also, changed many formerly casted arguments in *printf calls to
use one of these format specifiers and drop the cast.
Ben Pfaff [Fri, 12 Oct 2007 05:07:17 +0000 (05:07 +0000)]
stdint.h-instead-of-size_max.h.patch from patch #6230.
Include <stdint.h> instead of "size_max.h" to get a definition for
SIZE_MAX.
Ben Pfaff [Fri, 12 Oct 2007 05:05:31 +0000 (05:05 +0000)]
config.h-fixes.patch from patch #6230.
Do #include <config.h> from every .c file.
Do not #include <config.h> from any .h file.
Ben Pfaff [Fri, 12 Oct 2007 04:59:26 +0000 (04:59 +0000)]
xalloc.h-instead-of-alloc.h.patch from patch #6230.
Removes src/libpspp/alloc.[ch] and changes users to include "xalloc.h"
from gnulib instead.
Ben Pfaff [Fri, 12 Oct 2007 04:54:46 +0000 (04:54 +0000)]
malloca-instead-of-local_alloc.patch from patch #6230.
* alloc.h (local_alloc): Removed. Changed all users to use
xmalloca instead.
(local_free): Removed. Changed all users to use freea instead.
* Smake: Drop alloca, alloca-opt modules as we don't use them
anymore.
Ben Pfaff [Fri, 12 Oct 2007 04:49:25 +0000 (04:49 +0000)]
magic-elimination.patch from patch #6230.
* float-format.c (float_get_lowest): New function.
* magic.c: Removed.
* magic.h: Removed. Changed all references to NOT_INT,
NOT_DOUBLE, and NOT_LONG to use other constants. Changed
references to second_lowest_value to call float_get_lowest.
Ben Pfaff [Fri, 12 Oct 2007 04:47:08 +0000 (04:47 +0000)]
Declarations must all precede statements in C90.
John Darrington [Thu, 11 Oct 2007 12:31:39 +0000 (12:31 +0000)]
Added some missing calls to gtk_window_set_transient_for
Ben Pfaff [Thu, 11 Oct 2007 04:59:33 +0000 (04:59 +0000)]
cleanup-misc.patch from patch #6230.
* acinclude.m4: Improve formatting.
* configure.ac: Ditto. Don't check for headers whose presence is
never tested. Don't use AC_C_CONST (we can assume that "const" is
implemented these days). Don't pass default sizes to
AC_CHECK_SIZEOF, since modern Autoconf doesn't need them. Don't
define FPREP_IEEE754, since it was not tested for. Don't use
AC_FUNC_VPRINTF, since we never tested for it.
* float-format.h (enum float_format): Don't check for
FPREP_IEEE754 macro any longer.
* magic.h: Ditto.
* src/ui/debugger.c: Use debugger if HAVE_FORK is defined, not
HAVE_SYS_TYPES_H. The latter is almost universal, but the former
is only available where it can be implemented.
John Darrington [Wed, 10 Oct 2007 10:22:28 +0000 (10:22 +0000)]
Added the Independent Samples T Test dialog
Ben Pfaff [Tue, 9 Oct 2007 03:50:20 +0000 (03:50 +0000)]
Fix bug #21280. Thanks to John Darrington for review.
* automake.mk: Add new file.
* bugs/overwrite-input-file.sh: New test.
* file-name.c (create_stream): New function.
* por-file-writer.c (pfm_open_writer): Use fh_open to open the
file handle before creating the file, to ensure that we don't
truncate a file that we're reading. Make code easier to read by
using create_stream.
Ben Pfaff [Sun, 7 Oct 2007 03:53:06 +0000 (03:53 +0000)]
Oops--forgot ChangeLog for DESCRIPTIVES earlier.
John Darrington [Sun, 7 Oct 2007 00:25:03 +0000 (00:25 +0000)]
Added feature to make OK and PASTE buttons insensitive until the dialog box
contains valid data.
John Darrington [Sat, 6 Oct 2007 06:58:13 +0000 (06:58 +0000)]
Update libglade version dependency
Ben Pfaff [Sat, 6 Oct 2007 04:24:34 +0000 (04:24 +0000)]
Add DESCRIPTIVES dialog.
John Darrington [Thu, 4 Oct 2007 02:41:53 +0000 (02:41 +0000)]
Created a new stock item for Reset buttons.
Added some #include <config.h> lines where they were missing.
Read GPL text from src/libpspp/copyleft.c instead of from psppire.glade
Ben Pfaff [Tue, 2 Oct 2007 04:13:07 +0000 (04:13 +0000)]
Fix bug #21192. Thanks to John Darrington for review.
* casereader.c (casereader_read): Decrement case_cnt before
calling the casereader's "read" member function, so that we
interact properly with lazy_casereader.
* datasheet.c: Add regression test for above bug fix.
(clone_datasheet): New function.
(lazy_callback): New function.
(check_datasheet_casereader): New function.
(check_datasheet): Check datasheet contents are reported correctly
through an ordinary casereader and a lazy casereader.
(clone_model): Use clone_datasheet.
Ben Pfaff [Mon, 1 Oct 2007 04:35:06 +0000 (04:35 +0000)]
Fix comment.
Ben Pfaff [Sun, 30 Sep 2007 18:11:07 +0000 (18:11 +0000)]
Improve installation instructions.
Ben Pfaff [Sun, 30 Sep 2007 18:09:04 +0000 (18:09 +0000)]
Print a message indicating success at the end of the configure run.
John Darrington [Fri, 28 Sep 2007 04:25:14 +0000 (04:25 +0000)]
Don't abort on GSL exceptions
Ben Pfaff [Thu, 27 Sep 2007 03:20:53 +0000 (03:20 +0000)]
(libglade_psppire_la_CFLAGS): Enable VPATH build by using
$(top_srcdir) in -I directive.
John Darrington [Wed, 26 Sep 2007 09:23:11 +0000 (09:23 +0000)]
Added the Analyze menu.
Ben Pfaff [Wed, 26 Sep 2007 04:25:57 +0000 (04:25 +0000)]
Add missing #include.
Ben Pfaff [Wed, 26 Sep 2007 04:24:07 +0000 (04:24 +0000)]
Patch #6210: implement ability to resize output device parameters to
fit terminal window size as it changes. Reviewed by John Darrington.
* automake.mk (src_ui_terminal_libui_a_SOURCES): Add new files.
* terminal.c: New file.
* terminal.h: New file.
* main.c (main): No need to set up SIGWINCH handler any longer.
But we do need to call terminal_init.
(set_fallback_viewport): Move to terminal.c.
[HAVE_LIBNCURSES] (get_termcap_viewport): Ditto.
[!HAVE_LIBNCURSES] (get_termcap_viewport): Ditto.
* read-line.c (readln_read): After the first line of a command,
call terminal_check_size to allow it to re-detect the terminal
size.
* ascii.c: Implement ability to resize output device parameters to
fit terminal window size as it changes.
(struct ascii_driver_ext): New members `auto_width',
`auto_length'.
(ascii_open_driver): Initialize new members, call
update_page_size.
(update_page_size): New function to update device size.
(handle_option): Support new "auto" setting for length, width.
(ascii_open_page): Call update_page_size.
* devices (tty-ascii): Set length and width to "auto", so that
they reflect the current size of the terminal window as it
changes.
John Darrington [Tue, 25 Sep 2007 23:59:40 +0000 (23:59 +0000)]
Fix GUI output viewer to use the "auto" feature of the driver width
and length. Closes patch #6210.
Ben Pfaff [Tue, 25 Sep 2007 04:26:25 +0000 (04:26 +0000)]
Patch #6210. Reviewed by John Darrington.
* command-line.c (parse_command_line): Don't call force_long_view,
as that function is no longer necessary.
* msg-ui.c (handle_msg): Only wrap message output to the message
file to the width of the terminal if the message file is a tty.
* settings.c: Drop "long view", which is not needed any longer.
(static var long_view): Removed.
(force_long_view): Removed.
(get_viewwidth): Removed.
(init_viewport): Removed long_view reference.
Ben Pfaff [Tue, 25 Sep 2007 04:21:02 +0000 (04:21 +0000)]
(popup_message): Refer to files that contain commands as "syntax"
files, not "script" files, for better user familiarity.
Ben Pfaff [Tue, 25 Sep 2007 04:19:11 +0000 (04:19 +0000)]
(set_fallback_viewport): Make code easier to understand.
(get_termcap_viewport): Ditto.
Reviewed by John Darrington.
Ben Pfaff [Tue, 25 Sep 2007 04:16:19 +0000 (04:16 +0000)]
John's original code for patch #6210.
Ben Pfaff [Tue, 25 Sep 2007 04:04:02 +0000 (04:04 +0000)]
Make this example work on the newest version of PSPP.
Ben Pfaff [Sun, 23 Sep 2007 16:49:37 +0000 (16:49 +0000)]
(cmd_data_list): Don't allow END subcommand to be used with DATA LIST
FREE or LIST.
Ben Pfaff [Sun, 23 Sep 2007 16:47:27 +0000 (16:47 +0000)]
Bug #21111. Reviewed by John Darrington.
* command/input-program.sh: New test.
* command/do-if.sh: New tests.
* data-list.c (data_list_trns_proc): Properly set retval when END
subcommand is in use.
* do-if.c: Fix ELSE and ELSE IF clauses.
(add_clause): Drop TARGET_INDEX argument and figure out the target
of the jump on our own. The caller couldn't compensate for the
inserted BREAK transformation. Updated all callers.
Ben Pfaff [Sun, 23 Sep 2007 05:59:01 +0000 (05:59 +0000)]
Bug #21128. Reviewed by John Darrington.
* output/paper-size.sh: New test.
* main.c (i18_init): Set up LC_PAPER locale, if available. Don't
bother with LC_MONETARY locale, since we don't use it anywhere.
* output.c (TWO_CHARS macro): Removed.
(outp_evaluate_dimension): Changed interface, rewritten. Updated
all callers.
(internal_get_paper_size): Removed.
(parse_unit): New function.
(parse_paper_size): New function.
(outp_get_paper_size): Tweaked interface, rewritten.
(get_standard_paper_size): New function.
(read_paper_conf): New function.
(get_default_paper_size): New function.
* postscript.c (ps_open_driver): Use system default paper size as
default paper, instead of hard-coding US letter.
(handle_option): Allow outp_evaluate_dimension to supply error
message instead of generating it here.
* automake.mk: Add new file.
* paper-size.c: New file.
* command.def: Add DEBUG PAPER SIZE command.
* papersize: Removed.
* automake.mk (dist_pkgsysconf_DATA): Remove papersize.
* acinclude.m4 (PSPP_LC_PAPER): New macro.
* configure.ac: Use PSPP_LC_PAPER.
John Darrington [Sat, 22 Sep 2007 08:19:08 +0000 (08:19 +0000)]
Corrected various typos in error messages.