pspp-builds.git
16 years ago(libglade_psppire_la_CFLAGS): Enable VPATH build by using
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.

16 years agoAdded the Analyze menu.
John Darrington [Wed, 26 Sep 2007 09:23:11 +0000 (09:23 +0000)]
Added the Analyze menu.

16 years agoAdd missing #include.
Ben Pfaff [Wed, 26 Sep 2007 04:25:57 +0000 (04:25 +0000)]
Add missing #include.

16 years agoPatch #6210: implement ability to resize output device parameters to
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.

16 years agoFix GUI output viewer to use the "auto" feature of the driver width
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.

16 years agoPatch #6210. Reviewed by John Darrington.
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.

16 years ago(popup_message): Refer to files that contain commands as "syntax"
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.

16 years ago(set_fallback_viewport): Make code easier to understand.
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.

16 years agoJohn's original code for patch #6210.
Ben Pfaff [Tue, 25 Sep 2007 04:16:19 +0000 (04:16 +0000)]
John's original code for patch #6210.

16 years agoMake this example work on the newest version of PSPP.
Ben Pfaff [Tue, 25 Sep 2007 04:04:02 +0000 (04:04 +0000)]
Make this example work on the newest version of PSPP.

16 years ago(cmd_data_list): Don't allow END subcommand to be used with DATA LIST
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.

16 years agoBug #21111. Reviewed by John Darrington.
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.

16 years agoBug #21128. Reviewed by John Darrington.
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.

16 years agoCorrected various typos in error messages.
John Darrington [Sat, 22 Sep 2007 08:19:08 +0000 (08:19 +0000)]
Corrected various typos in error messages.

16 years agoChangeLog entries from earlier that I missed.
Ben Pfaff [Sat, 22 Sep 2007 04:21:29 +0000 (04:21 +0000)]
ChangeLog entries from earlier that I missed.

16 years agoFree the cmd after it's finished.
John Darrington [Sat, 22 Sep 2007 01:04:38 +0000 (01:04 +0000)]
Free the cmd after it's finished.

16 years agofix memory leaks; bug 21056
Jason Stover [Fri, 21 Sep 2007 20:48:14 +0000 (20:48 +0000)]
fix memory leaks; bug 21056

16 years agoNew test for bug #21117.
Ben Pfaff [Fri, 21 Sep 2007 14:18:08 +0000 (14:18 +0000)]
New test for bug #21117.

16 years ago* ascii.c (struct ascii_driver_ext): New member reported_error.
Ben Pfaff [Fri, 21 Sep 2007 14:12:57 +0000 (14:12 +0000)]
* ascii.c (struct ascii_driver_ext): New member reported_error.
(ascii_open_driver): Initialize reported_error.
(ascii_open_page): Initialize the rest of the ascii driver data
even if we fail to open the output file.  Fixes bug #21117.

* chart.c (chart_create): Initialize lp member.  Fixes crash if
chart initialization fails.

* html.c (html_open_driver): Don't free chart_file_name in error
case, since html_close_driver will do that.  Fixes crash if file
open fails.

* postscript.c (ps_close_driver): Don't try to write to file if
it's null.  Fixes crash if file open fails.

16 years agoAdded a BACKEND_CHANGED signal on PsppireDict, and handled it accordingly.
John Darrington [Fri, 21 Sep 2007 01:53:58 +0000 (01:53 +0000)]
Added a BACKEND_CHANGED signal on PsppireDict, and handled it accordingly.
Closes bug #20821

16 years agoAdd regression test for bug #21108.
Ben Pfaff [Thu, 20 Sep 2007 04:50:54 +0000 (04:50 +0000)]
Add regression test for bug #21108.

16 years agoFix bug #21108.
Ben Pfaff [Thu, 20 Sep 2007 04:48:13 +0000 (04:48 +0000)]
Fix bug #21108.

* aggregate.c (cmd_aggregate): Destroy casereader consistently,
even if casereader fails.

* examine.q (run_examine): Ditto.

* glm.q (run_glm): Ditto.

* oneway.q (run_oneway): Ditto.

* regression.q (run_regression): Ditto.

* t-test.q (calculate): Ditto.

* descriptives.c (calc_descriptives): Ditto.  Also avoid
gratuitous casereader_clone.

16 years agoRemove callbacks from struct dataset. Closes patch #6075
John Darrington [Wed, 19 Sep 2007 06:21:19 +0000 (06:21 +0000)]
Remove callbacks from struct dataset. Closes patch #6075

16 years agoFix bug #20910.
Ben Pfaff [Wed, 19 Sep 2007 04:28:59 +0000 (04:28 +0000)]
Fix bug #20910.

* helper.c (create_casereader_from_data_store): New function.
(execute_syntax): Only replace the active file data by a new
casereader if syntax caused the active file to be read, to avoid
exponential slowdown as an increasing number of snippets that do
not read from the active file are consecutively executed.  Bug
#20910.  Reviewed by and heavily influenced by John Darrington.

* psppire-data-store.c (psppire_data_store_get_value_count): New
function.

* psppire-dict.c (psppire_dict_get_value_cnt): New function.

* procedure.c (proc_extract_active_file_data): New function.

* lazy-casereader.h: New file.

* lazy-casereader.c: New file.

* casereader.c (casereader_dynamic_cast): New function.

16 years ago(histogram_plot): Remove incorrect assertion. Fixes bug #21101.
Ben Pfaff [Wed, 19 Sep 2007 01:58:15 +0000 (01:58 +0000)]
(histogram_plot): Remove incorrect assertion.  Fixes bug #21101.
Reviewed by John Darrington.

16 years ago* set.q (show_warranty): Use fputs to print lack-of-warranty
Ben Pfaff [Mon, 17 Sep 2007 04:00:53 +0000 (04:00 +0000)]
* set.q (show_warranty): Use fputs to print lack-of-warranty
statement, instead of msg.  This is because msg now outputs the
message to output devices, and the output subsystem is not
prepared to deal with table cells that exceed one page in length.
Thanks to John Darrington for bug report and review.  Bug #21093.
(show_copying) Ditto.

* copyleft.c: Add trailing new-lines to lack-of-warranty
statement.

16 years agoRemoved documentation for CLEAR TRANSFORMATIONS since it's currently not
John Darrington [Sun, 16 Sep 2007 02:41:14 +0000 (02:41 +0000)]
Removed documentation for CLEAR TRANSFORMATIONS since it's currently not
implemented.

16 years agoCanonicalized on American orthography in source files.
John Darrington [Sat, 15 Sep 2007 02:48:02 +0000 (02:48 +0000)]
Canonicalized on American orthography in source files.
Added a en_GB localization.

16 years agoInitialize variables to avoid compiler warnings.
John Darrington [Sat, 15 Sep 2007 00:52:59 +0000 (00:52 +0000)]
Initialize variables to avoid compiler warnings.

16 years agoFixed all the misspellings of my name and email address
John Darrington [Fri, 14 Sep 2007 23:39:30 +0000 (23:39 +0000)]
Fixed all the misspellings of my name and email address

16 years ago(dict_clone): Copy case indexes from cloned dictionary. Fixes bug
Ben Pfaff [Fri, 14 Sep 2007 13:45:02 +0000 (13:45 +0000)]
(dict_clone): Copy case indexes from cloned dictionary.  Fixes bug
#21061.  Reviewed by John Darrington.

16 years agofix memory leak
Jason Stover [Fri, 14 Sep 2007 01:42:25 +0000 (01:42 +0000)]
fix memory leak

16 years agoDeclare models in difinition of cmd_regression; free moment structure
Jason Stover [Fri, 14 Sep 2007 01:39:35 +0000 (01:39 +0000)]
Declare models in difinition of cmd_regression; free moment structure

16 years agoImplemented the find dialog.
John Darrington [Thu, 13 Sep 2007 12:37:08 +0000 (12:37 +0000)]
Implemented the find dialog.

16 years agoFixed up some gladeui related things to correspond to glade-3.2.2. Thanks to Jason...
John Darrington [Thu, 13 Sep 2007 11:06:40 +0000 (11:06 +0000)]
Fixed up some gladeui related things to correspond to glade-3.2.2. Thanks to Jason for pointing these out.

16 years agoAdded #include "localcharset.h" to correspond to recent gnulib changes.
John Darrington [Thu, 13 Sep 2007 10:06:00 +0000 (10:06 +0000)]
Added #include "localcharset.h" to correspond to recent gnulib changes.

16 years ago(postcalc): Free sorted_tab and the structures that it points to, to
Ben Pfaff [Thu, 13 Sep 2007 04:23:15 +0000 (04:23 +0000)]
(postcalc): Free sorted_tab and the structures that it points to, to
plug a memory leak.  Fixes bug #20910.  Thanks to John Darrington for
reporting this bug and for review.

16 years agoFreed the stuff generated by the parser.
John Darrington [Thu, 13 Sep 2007 00:18:11 +0000 (00:18 +0000)]
Freed the stuff generated by the parser.

16 years ago* casereader-translator.c (struct casereader_translator): Change
Ben Pfaff [Wed, 12 Sep 2007 13:43:49 +0000 (13:43 +0000)]
* casereader-translator.c (struct casereader_translator): Change
input case parameter of translate member function from const
struct ccase * to struct ccase *.
(casereader_create_translator): Ditto, for translate parameter.

* casewriter-translator.c (struct casewriter_translator): Ditto.
(casewriter_create_translator): Ditto.

* get.c (get_translate_case): Change input case parameter from
const struct ccase * to struct ccase *, to match change in
casereader and casewriter translators.  Destroy input case, to fix
memory leak.

16 years ago(psppire_variable_sheet_create): Use xstrdup to save string returned
Ben Pfaff [Tue, 11 Sep 2007 03:12:34 +0000 (03:12 +0000)]
(psppire_variable_sheet_create): Use xstrdup to save string returned
by bind_textdomain_codeset.  Otherwise it can get freed by a
subsequent call.  Patch #6193.  Reviewed by John Darrington.

16 years agoRemoved #include "getline.h" because gnulib no longer provides it.
John Darrington [Sat, 8 Sep 2007 01:00:39 +0000 (01:00 +0000)]
Removed #include "getline.h" because gnulib no longer provides it.

16 years agoFixed buglet managing entries in the recent files lists.
John Darrington [Thu, 6 Sep 2007 07:43:02 +0000 (07:43 +0000)]
Fixed buglet managing entries in the recent files lists.

16 years agoImplemented the INSERT command.
John Darrington [Wed, 5 Sep 2007 06:23:01 +0000 (06:23 +0000)]
Implemented the INSERT command.

16 years agoUpdate scripts that invoke Perl to invoke it as simply "perl" if
Ben Pfaff [Wed, 5 Sep 2007 04:56:15 +0000 (04:56 +0000)]
Update scripts that invoke Perl to invoke it as simply "perl" if
not run from the PSPP Makefiles.  Patch #6169.  Thanks to John
Darrington for suggestion and review.
* bugs/big-input-2.sh: Make $PERL default to perl.
* command/sort.sh: Ditto.
* formats/bcd-in.sh: Ditto.
* formats/date-in.sh: Ditto.
* formats/ib-in.sh: Ditto.
* formats/legacy-in.sh: Ditto.
* formats/num-in.sh: Ditto.
* formats/num-out.sh: Ditto.
* formats/time-in.sh: Ditto.

16 years ago(cmd_crosstabs): Free xtab and the structures that it points to, to
Ben Pfaff [Wed, 5 Sep 2007 04:49:41 +0000 (04:49 +0000)]
(cmd_crosstabs): Free xtab and the structures that it points to, to
plug a memory leak.  Fixes bug #18315.

16 years agoRearrange menus to be more like later version of other software.
John Darrington [Sun, 2 Sep 2007 02:10:28 +0000 (02:10 +0000)]
Rearrange menus to be more like later version of other software.
Delete some unimplemented menuitems.

16 years agoUpdate po/*
John Darrington [Thu, 30 Aug 2007 23:36:11 +0000 (23:36 +0000)]
Update po/*

16 years agoYet more memory leaks.
John Darrington [Tue, 28 Aug 2007 01:00:04 +0000 (01:00 +0000)]
Yet more memory leaks.

16 years agoChanged test file name from 'foo.sps' to $TESTFILE (which is based
John Darrington [Mon, 27 Aug 2007 07:19:18 +0000 (07:19 +0000)]
Changed test file name from 'foo.sps' to $TESTFILE (which is based
on the script name).

16 years agoPlugged some more memory leaks.
John Darrington [Mon, 27 Aug 2007 07:02:35 +0000 (07:02 +0000)]
Plugged some more memory leaks.

16 years agoPlugged some memory leaks.
John Darrington [Mon, 27 Aug 2007 05:05:54 +0000 (05:05 +0000)]
Plugged some memory leaks.

16 years agoFix white space.
Ben Pfaff [Mon, 27 Aug 2007 04:06:22 +0000 (04:06 +0000)]
Fix white space.

16 years agoForce display width to 8, if sys file says zero. Closes bug #20844
John Darrington [Mon, 27 Aug 2007 00:06:23 +0000 (00:06 +0000)]
Force display width to 8, if sys file says zero. Closes bug #20844

16 years ago(main): When testing mode is enabled, use a built-in output driver
Ben Pfaff [Sun, 26 Aug 2007 18:35:45 +0000 (18:35 +0000)]
(main): When testing mode is enabled, use a built-in output driver
configuration instead of reading it from the configuration file.

Updated most invocations of PSPP in the tests to use --testing-mode
and to avoid specifying an output format with -o (because
--testing-mode implies -o raw-ascii).

16 years agoSend error message to non-screen output devices also, if routing to
Ben Pfaff [Sun, 26 Aug 2007 18:26:29 +0000 (18:26 +0000)]
Send error message to non-screen output devices also, if routing to
listing files is enabled.  Bug #17238.  Thanks to John Darrington for
review.

* command/aggregate.sh: Update output to include error messages,
which are now sent to output files also.

* devices: Change raw-ascii from screen to listing device (because
that's how it's used).

16 years agoEnable journal in GUI.
John Darrington [Sat, 25 Aug 2007 10:04:03 +0000 (10:04 +0000)]
Enable journal in GUI.

16 years agoImplement journaling. Bug #17240.
Ben Pfaff [Fri, 24 Aug 2007 05:00:50 +0000 (05:00 +0000)]
Implement journaling.  Bug #17240.

* msg-ui.c (handle_msg): Send message to write_journal function
as well as msg_file.
(dump_message): Change interface so that it takes a function
pointer instead of a FILE.
(write_stream): New function.
(write_journal): New function.

* read-line.c (welcome): Call journal_enable, so that the journal
is enabled by default.

* automake.mk (output_sources): Add journal.c, journal.h.

* journal.c: New file.

* journal.h: New file.

16 years agoCatch errors creating icon pixbufs and report them with g_warning.
John Darrington [Thu, 23 Aug 2007 05:15:15 +0000 (05:15 +0000)]
Catch errors creating icon pixbufs and report them with g_warning.

16 years agoRemove notebook popup menu, which doesn't seem to display properly.
John Darrington [Wed, 22 Aug 2007 04:00:33 +0000 (04:00 +0000)]
Remove notebook popup menu, which doesn't seem to display properly.
Closes bug #20822

16 years agoAdded the ability to paste from the clipboard to the data sheet.
John Darrington [Sat, 18 Aug 2007 02:52:35 +0000 (02:52 +0000)]
Added the ability to paste from the clipboard to the data sheet.

16 years agobroke long line in error message
Jason Stover [Fri, 17 Aug 2007 14:10:05 +0000 (14:10 +0000)]
broke long line in error message

16 years agofixed typo
Jason Stover [Thu, 16 Aug 2007 15:23:55 +0000 (15:23 +0000)]
fixed typo

16 years agoDelete files that should never have been checked in.
Ben Pfaff [Thu, 16 Aug 2007 14:42:15 +0000 (14:42 +0000)]
Delete files that should never have been checked in.

16 years agoAdded a basic output viewer.
John Darrington [Thu, 16 Aug 2007 06:30:22 +0000 (06:30 +0000)]
Added a basic output viewer.

16 years agofix bug 19819
Jason Stover [Wed, 15 Aug 2007 19:24:16 +0000 (19:24 +0000)]
fix bug 19819

16 years agoMake distcheck work for configure --without-libplot
John Darrington [Wed, 15 Aug 2007 01:47:17 +0000 (01:47 +0000)]
Make distcheck work for configure --without-libplot

16 years agoAvoid assertion failure pasting from a dictionary with foreign encoding.
John Darrington [Tue, 14 Aug 2007 06:22:38 +0000 (06:22 +0000)]
Avoid assertion failure pasting from a dictionary with foreign encoding.

16 years agoFixed bug pasting from the clipboard, where the wrong columns limit was
John Darrington [Mon, 13 Aug 2007 06:34:25 +0000 (06:34 +0000)]
Fixed bug pasting from the clipboard, where the wrong columns limit was
being used.

16 years ago* command/no_case_size.sh: Update to match update DISPLAY and
Ben Pfaff [Mon, 13 Aug 2007 04:50:29 +0000 (04:50 +0000)]
* command/no_case_size.sh: Update to match update DISPLAY and
SYSFILE INFO command output.

* command/rank.sh: Ditto.

* command/sysfile-info.sh: Ditto.

* command/very-long-strings.sh: Ditto.

16 years agoOutput variable measurement level, alignment, and display width as
Ben Pfaff [Mon, 13 Aug 2007 04:36:47 +0000 (04:36 +0000)]
Output variable measurement level, alignment, and display width as
part of DISPLAY DICTIONARY and SYSFILE INFO output.  Bug #13019.
Reviewed by John Darrington.
* sys-file-info.c (cmd_sysfile_info): Allow space for new rows of
info in output.
(display_variables): Ditto.
(describe_variable): Output variable measurement level, alignment,
and display width as part of DISPLAY DICTIONARY and SYSFILE INFO
output.

16 years agoPatch #6117: Implement clipboard for data sheet.
Ben Pfaff [Mon, 13 Aug 2007 04:31:43 +0000 (04:31 +0000)]
Patch #6117: Implement clipboard for data sheet.

16 years ago* get.c (parse_read_command): Compact the values in the target
Ben Pfaff [Mon, 13 Aug 2007 04:23:28 +0000 (04:23 +0000)]
* get.c (parse_read_command): Compact the values in the target
dictionary, to save space.

* dictionary.c (struct copy_map): Removed.
(struct dict_compactor): Removed.
(dict_make_compactor): Removed.
(dict_compactor_compact): Removed.
(dict_compactor_destroy): Removed.

* procedure.c (struct data_set): Change `compactor' member to be a
struct case_map *.
(proc_open): Use case_map_to_compact_dict instead of
dict_make_compactor.
(proc_casereader_read): Use case_map_execute instead of
dict_compactor_compact.
(proc_commit): Use case_map_destroy instead of
dict_compactor_destroy.

* scratch-writer.c (struct scratch_writer): Change `compactor'
member to be a struct case_map *.
(scratch_writer_open): Use case_map_to_compact_dict instead of
dict_make_compactor.
(scratch_writer_casewriter_write): Use case_map_execute instead of
dict_compactor_compact.

16 years ago* get.c (struct case_map): Move into new file src/data/case-map.c.
Ben Pfaff [Mon, 13 Aug 2007 04:13:48 +0000 (04:13 +0000)]
* get.c (struct case_map): Move into new file src/data/case-map.c.
(start_case_map): Ditto, and rename case_map_prepare_dict.
(finish_case_map): Ditto, and rename case_map_from_dict.
(map_case): Ditto, and rename case_map_execute.
(destroy_case_map): Ditto, and rename case_map_destroy.
(case_map_get_value_cnt): Ditto.

* automake.mk: Add case-map.c, case-map.h.

* case-map.c: New file.

* case-map.h: New file.

16 years ago* psppire-dict.c (psppire_dict_dump): Don't use
Ben Pfaff [Mon, 13 Aug 2007 03:44:45 +0000 (03:44 +0000)]
* psppire-dict.c (psppire_dict_dump): Don't use
dict_get_compacted_dict_index_to_case_index, as that function has
been deleted.

* flip.c: Drop use of dict_get_compacted_dict_index_to_case_index
and just use the ordinary case indexes.  There seemed to be no
reason for the former method.

* get.c (case_map_get_value_cnt): New function.

* dictionary.c (dict_compact_values): Don't delete scratch
variables as well as compacting case indexes.  Update all callers.
(dict_get_compacted_value_cnt): Rename dict_count_values and
change interface.  Update all callers.
(dict_get_compacted_value_cnt): Remove.
(dict_compacting_would_shrink): Remove.
(dict_compacting_would_change): Remove.
(dict_make_compactor): Add new parameter.  Update all callers.

* procedure.c (proc_casereader_read): Use casewriter_get_value_cnt
instead of dict_count_values, changing an O(N) operation into
O(1).

16 years ago(casereader_read): Don't require cases read by a casereader to be
Ben Pfaff [Mon, 13 Aug 2007 00:43:48 +0000 (00:43 +0000)]
(casereader_read): Don't require cases read by a casereader to be
exactly the expected size: as long as they're big enough, it's OK.

16 years agoMake casewriters keep track of the number of `union value's in each
Ben Pfaff [Mon, 13 Aug 2007 00:41:34 +0000 (00:41 +0000)]
Make casewriters keep track of the number of `union value's in each
case.  This is useful for two reasons: casewriter_write can then check
that the case being written is large enough, and later recipients of
the casewriter can determine the size of the case.

* get.c (case_map_get_value_cnt): New function.

* casewriter-translator.c (casewriter_create_translator): Add
value_cnt parameter.

* casewriter.c (struct casewriter): Add value_cnt member.
(casewriter_write): Check that the case passed in is big enough.
(casewriter_get_value_cnt): New function.
(casewriter_create): Add value_cnt parameter.

16 years agoAdd support for charts to ASCII driver. Bug #16364.
Ben Pfaff [Mon, 13 Aug 2007 00:26:31 +0000 (00:26 +0000)]
Add support for charts to ASCII driver.  Bug #16364.
Thanks to John Darrington for review.

* ascii.c (struct ascii_driver_ext): Add chart_type,
chart_file_name, chart_cnt members.
(ascii_open_driver): Initialize new members.
(static array option_tab): Add new options, reorganize slightly.
(handle_option): Handle new options.
(ascii_submit): New function.
(ascii_chart_initialise): Implement.
(ascii_chart_finalise): Implement.

* chart.c (chart_init_separate): New function.
(chart_finalise_separate): New function.

* dummy-chart.c (chart_init_separate): New function.
(chart_finalise_separate): New function.

* html.c (html_open_driver): Don't free chart_file_name.
(html_close_driver): Do free chart_file_name.
(handle_option): Only give an error for chart-files options that
don't contain "#".
(html_initialise_chart): Use new chart_init_separate.
(html_finalise_chart): Use new chart_finalise_separate.

16 years agoDeleted unused function.
John Darrington [Sun, 12 Aug 2007 23:18:03 +0000 (23:18 +0000)]
Deleted unused function.

16 years agoChanged PSPP_LINREG_SVD to PSPP_LINREG_QR
Jason Stover [Sun, 12 Aug 2007 02:38:09 +0000 (02:38 +0000)]
Changed PSPP_LINREG_SVD to PSPP_LINREG_QR

16 years agoAdded scope and explanation of use of conditional inverse; added appropriate enum...
Jason Stover [Sun, 12 Aug 2007 02:36:50 +0000 (02:36 +0000)]
Added scope and explanation of use of conditional inverse; added appropriate enum constant

16 years agoFix bug #18982. Thanks to John Darrington for investigation,
Ben Pfaff [Fri, 10 Aug 2007 04:49:58 +0000 (04:49 +0000)]
Fix bug #18982.  Thanks to John Darrington for investigation,
review, and verification of fix.

* formats/date-in.sh: Use a portable pseudo-random number
generator.

* formats/time-in.sh: Ditto.

16 years agoFix first part of bug #18982. Thanks to John Darrington for finding
Ben Pfaff [Fri, 10 Aug 2007 03:17:55 +0000 (03:17 +0000)]
Fix first part of bug #18982.  Thanks to John Darrington for finding
the problem and verifying the fix.

16 years agoFix bug reported by Jason Stover.
Ben Pfaff [Fri, 10 Aug 2007 00:16:18 +0000 (00:16 +0000)]
Fix bug reported by Jason Stover.
* settings.c: Move get_termcap_viewport and in particular the
#include for <curses.h> to the end of the file.  curses.h
redefines bool on some systems (e.g. OpenBSD), which causes
disagreement between uses of bool before its inclusion and
afterward.
Tested by Jason Stover.

16 years agoPlugged one more source of GtkCritical errors
John Darrington [Tue, 7 Aug 2007 06:21:21 +0000 (06:21 +0000)]
Plugged one more source of GtkCritical errors

16 years agoFixed the two biggest sources of GtkCritical errors.
John Darrington [Tue, 7 Aug 2007 00:56:59 +0000 (00:56 +0000)]
Fixed the two biggest sources of GtkCritical errors.

16 years agoChanged some properties of the syntax-editor to be less annoying.
John Darrington [Mon, 6 Aug 2007 02:09:01 +0000 (02:09 +0000)]
Changed some properties of the syntax-editor to be less annoying.

16 years agoTypo.
Ben Pfaff [Sun, 5 Aug 2007 22:16:27 +0000 (22:16 +0000)]
Typo.

16 years agoFix bug #16189. Reviewed by Jason Stover.
Ben Pfaff [Sun, 5 Aug 2007 22:16:16 +0000 (22:16 +0000)]
Fix bug #16189.  Reviewed by Jason Stover.

16 years ago(rank_cmd): Instead of sorting by SPLIT FILE vars, group by them.
Ben Pfaff [Sun, 5 Aug 2007 17:20:22 +0000 (17:20 +0000)]
(rank_cmd): Instead of sorting by SPLIT FILE vars, group by them.
Fixes bug #17239.  Reviewed by John Darrington.

16 years agoInitialize default syntax type.
John Darrington [Thu, 2 Aug 2007 11:51:52 +0000 (11:51 +0000)]
Initialize default syntax type.

16 years agoClean up handling of median, by treating it almost like any other
Ben Pfaff [Thu, 2 Aug 2007 03:07:17 +0000 (03:07 +0000)]
Clean up handling of median, by treating it almost like any other
percentile.  Fixes bug #17424.  Thanks to John Darrington for
review.
* frequencies.q (internal_cmd_frequencies): Fix handling of bit
masks for `stats' variable.  If median is selected, turn it off
and add a 50th percentile.
(add_percentile): Simplify code a little.
(calc_stats): Drop special casing of median.
(dump_statistics): Ditto, except that we label the 50th percentile
as "50 (Median)" to make it clear that it's also the median.

16 years agoUse non-deprecated functions.
John Darrington [Wed, 1 Aug 2007 23:30:37 +0000 (23:30 +0000)]
Use non-deprecated functions.

16 years agoRemove integer mode from FREQUENCIES and incidentally fix bug
Ben Pfaff [Wed, 1 Aug 2007 03:33:15 +0000 (03:33 +0000)]
Remove integer mode from FREQUENCIES and incidentally fix bug
#17421.  Reviewed by John Darrington.
* frequencies.q (int_pool): Rename data_pool.
(gen_pool): Rename syntax_pool.
(enum FRQM_*): Removed.
(struct freq_tab): Removed `mode', `vector', `min', `max',
`out_of_range', `sysmis' members.
(calc): Delete support for integer mode.
(precalc): Ditto.
(postprocess_freq_tab): Ditto.
(cleanup_freq_tab): Ditto.
(frq_custom_variables): Ditto.

16 years agoUsed the correct variable in error message. Thanks to Ben for reporting
John Darrington [Mon, 30 Jul 2007 23:57:07 +0000 (23:57 +0000)]
Used the correct variable in error message.  Thanks to Ben for reporting
this problem.

16 years agoProvisional fix for bug #18692 and bug #20161. Reviewed by John
Ben Pfaff [Mon, 30 Jul 2007 17:07:50 +0000 (17:07 +0000)]
Provisional fix for bug #18692 and bug #20161.  Reviewed by John
Darrington.

16 years agoImplemented the CD command.
John Darrington [Mon, 30 Jul 2007 09:43:27 +0000 (09:43 +0000)]
Implemented the CD command.

16 years agoEnabled output generation in the GUI.
John Darrington [Mon, 30 Jul 2007 09:28:35 +0000 (09:28 +0000)]
Enabled output generation in the GUI.

16 years agoImplemented the Select Cases Dialog
John Darrington [Sun, 29 Jul 2007 07:56:52 +0000 (07:56 +0000)]
Implemented the Select Cases Dialog

16 years agoMake PSPP able to read all the portable files I could find on the
Ben Pfaff [Sun, 29 Jul 2007 05:40:51 +0000 (05:40 +0000)]
Make PSPP able to read all the portable files I could find on the
web.
* por-file-reader.c (struct pfm_reader): New member `line_length'.
(error): Print file offset in hexadecimal.
(warning): New function.
(advance): Treat lines less than 80 bytes long as padded to 80
bytes with spaces.
(pfm_open_reader): Call read_documents if we find an "E" record.
(convert_format): Convert invalid formats to the default format
instead of aborting reading the file.
(read_variables): Rename duplicate variable names instead of
aborting reading the file.
(read_value_label): Allow string variables of different widths to
be assigned value labels in the same record.  Replace duplicate
value labels instead of aborting.
(read_documents): New function.

* por-file-writer.c (pfm_open_writer): Call write_documents if the
dictionary has documents.
(write_documents): New function.

16 years agoPer latest comments in bug #19069
John Darrington [Sat, 28 Jul 2007 05:24:49 +0000 (05:24 +0000)]
Per latest comments in bug #19069