John Darrington [Tue, 14 Aug 2007 06:22:38 +0000 (06:22 +0000)]
Avoid assertion failure pasting from a dictionary with foreign encoding.
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.
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.
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.
Ben Pfaff [Mon, 13 Aug 2007 04:31:43 +0000 (04:31 +0000)]
Patch #6117: Implement clipboard for data sheet.
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.
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.
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).
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.
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.
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.
John Darrington [Sun, 12 Aug 2007 23:18:03 +0000 (23:18 +0000)]
Deleted unused function.
Jason Stover [Sun, 12 Aug 2007 02:38:09 +0000 (02:38 +0000)]
Changed PSPP_LINREG_SVD to PSPP_LINREG_QR
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
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.
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.
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.
John Darrington [Tue, 7 Aug 2007 06:21:21 +0000 (06:21 +0000)]
Plugged one more source of GtkCritical errors
John Darrington [Tue, 7 Aug 2007 00:56:59 +0000 (00:56 +0000)]
Fixed the two biggest sources of GtkCritical errors.
John Darrington [Mon, 6 Aug 2007 02:09:01 +0000 (02:09 +0000)]
Changed some properties of the syntax-editor to be less annoying.
Ben Pfaff [Sun, 5 Aug 2007 22:16:27 +0000 (22:16 +0000)]
Typo.
Ben Pfaff [Sun, 5 Aug 2007 22:16:16 +0000 (22:16 +0000)]
Fix bug #16189. Reviewed by Jason Stover.
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.
John Darrington [Thu, 2 Aug 2007 11:51:52 +0000 (11:51 +0000)]
Initialize default syntax type.
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.
John Darrington [Wed, 1 Aug 2007 23:30:37 +0000 (23:30 +0000)]
Use non-deprecated functions.
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.
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.
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.
John Darrington [Mon, 30 Jul 2007 09:43:27 +0000 (09:43 +0000)]
Implemented the CD command.
John Darrington [Mon, 30 Jul 2007 09:28:35 +0000 (09:28 +0000)]
Enabled output generation in the GUI.
John Darrington [Sun, 29 Jul 2007 07:56:52 +0000 (07:56 +0000)]
Implemented the Select Cases Dialog
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.
John Darrington [Sat, 28 Jul 2007 05:24:49 +0000 (05:24 +0000)]
Per latest comments in bug #19069
John Darrington [Sat, 28 Jul 2007 00:40:52 +0000 (00:40 +0000)]
Fix bug #19604. T-Test documentation now matches code; code matches spss behaviour
Ben Pfaff [Fri, 27 Jul 2007 22:59:32 +0000 (22:59 +0000)]
Add tty and listing devices that use VT100 (and xterm) line-drawing
characters, and corresponding support for an initialization string in
the ASCII output device.
Ben Pfaff [Fri, 27 Jul 2007 22:58:02 +0000 (22:58 +0000)]
Make interactive output go to the terminal (bug #17213), by
causing the UI to flush output to the user when it prompts for a
command.
Thanks to John Darrington for review.
Ben Pfaff [Fri, 27 Jul 2007 21:44:18 +0000 (21:44 +0000)]
(run_regression): Move casereader_destroy call so that it always gets
called, not just if there was some valid data. Fixes bug #19581.
Reviewed by Jason Stover.
Ben Pfaff [Fri, 27 Jul 2007 21:38:12 +0000 (21:38 +0000)]
Bug #19069.
* INSTALL: Improve installation instructions.
* README: Move prerequisites to INSTALL.
Reviewed by Jason Stover.
Ben Pfaff [Fri, 27 Jul 2007 21:33:35 +0000 (21:33 +0000)]
Make PKG_CHECK_MODULES tests more user-friendly,
by having them give their errors at the end of the configuration
process instead of stopping it in the middle. Patch #6116.
Reviewed by Jason Stover.
John Darrington [Thu, 26 Jul 2007 12:03:21 +0000 (12:03 +0000)]
Removed the OMS status bar area for which we're unlikely to have any use
in the near future.
John Darrington [Thu, 26 Jul 2007 02:02:22 +0000 (02:02 +0000)]
Patch #6086. Adds "transformation pending" state.
Thanks to Ben for the review.
Ben Pfaff [Thu, 26 Jul 2007 01:52:04 +0000 (01:52 +0000)]
Fix bug #17100.
* command/data-list.sh: Add tests for multi-record DATA LIST with
and without empty trailing record.
* data-list.c (read_from_data_list_fixed): Handle multi-record
DATA LIST correctly.
Ben Pfaff [Wed, 25 Jul 2007 04:32:14 +0000 (04:32 +0000)]
*** empty log message ***
Ben Pfaff [Wed, 25 Jul 2007 04:31:34 +0000 (04:31 +0000)]
Fix bug #6113.
* sys-file-writer.c (write_variable_display_parameters): Use new
var_default_display_width function to choose display width of
segments after the first one in a given variable.
* variable.c (var_create): Use var_default_display_width to pick
new variable's display width.
(var_default_display_width): New function.
Ben Pfaff [Wed, 25 Jul 2007 04:09:44 +0000 (04:09 +0000)]
Fix bug #20427.
* por-file-writer.c (write_variables): Write weight variable.
Reviewed by John Darrington.
Ben Pfaff [Wed, 25 Jul 2007 04:03:58 +0000 (04:03 +0000)]
Fix bugs #20493, #20494.
* flip.c (struct flip_pgm): Remove `case_size' member (now
unused).
(cmd_flip): Pass var_cnt as number of cases instead of case_cnt,
to fix bug #20494. Don't assign to `case_size' member, which was
unused after assignment.
(build_dictionary): When NEWNAMES not used, get the number of
variables right, to fix bug #20493.
* tests/command/flip.sh: Add tests to avoid regression on bugs
#20493, #20494.
John Darrington [Wed, 25 Jul 2007 01:33:02 +0000 (01:33 +0000)]
Made Missing Values and Value Label cells non-editable, if the variable
is a long string variable.
Closes bug #20564
John Darrington [Tue, 24 Jul 2007 13:05:05 +0000 (13:05 +0000)]
Added the ability to paste data from the primary selection.
Removed the "clip" feature.
John Darrington [Tue, 24 Jul 2007 12:45:06 +0000 (12:45 +0000)]
Added an extra call to data_var_select and a comment to explain why.
John Darrington [Tue, 24 Jul 2007 11:50:18 +0000 (11:50 +0000)]
Removed a function which was simply a wrapper around another.
John Darrington [Tue, 24 Jul 2007 06:24:01 +0000 (06:24 +0000)]
Tidied up the way that value-labels button and menu item interact.
Ben Pfaff [Tue, 24 Jul 2007 05:33:43 +0000 (05:33 +0000)]
Numerous improvements to system file reader and writer.
Ben Pfaff [Mon, 23 Jul 2007 05:11:58 +0000 (05:11 +0000)]
Don't try to write very long strings to portable files. The format
does not support it.
(MAX_POR_WIDTH): New macro.
(pfm_open_writer): Limit output width to MAX_POR_WIDTH.
(write_format): Add arg to take width to resize format to.
(write_value): Limit width of value written to MAX_POR_WIDTH.
(write_variables): Limit width of variable and its output formats
to MAX_POR_WIDTH.
Ben Pfaff [Mon, 23 Jul 2007 05:07:23 +0000 (05:07 +0000)]
(read_variable_to_value_map): Use max_warnings
local variable instead of literal 5.
Ben Pfaff [Mon, 23 Jul 2007 05:05:45 +0000 (05:05 +0000)]
Fix problems with uniqueness of short names in system files with very
long string variables. Now a variable may have multiple short names.
* automake.mk (src_data_libdata_a_SOURCES): Add new files
short-names.c, short-names.h.
* dictionary.c (dict_clone): Clone all the short names.
(compare_strings): Move into short-names.c.
(hash_strings): Ditto.
(set_var_short_name_suffix): Ditto.
(dict_assign_short_names): Ditto, rename short_names_assign,
change to assign all short names.
* por-file-writer.c (write_variables): Use short_names_assign
instead of dict_assign_short_names.
* short-names.c: New file.
* short-names.h: New file.
* sys-file-private.c (sfm_width_to_segments): New function.
* sys-file-reader.c (read_long_var_name_map): Save and restore all
the short names, not just the first one.
* sys-file-writer.c (cont_var_name): Removed.
(sfm_open_writer): Use short_names_assign instead of
dict_assign_short_names. Use unique short names assigned by
short_names_assign instead of those generated by cont_var_name.
* variable.c (struct variable): Remove `short_name' member,
replace by `short_names' and `short_name_cnt'.
(var_create) Initialize new members.
(var_get_short_name_cnt): New function.
(var_get_short_name): Now takes an index argument. Changed most
callers to pass 0.
(var_set_short_name): Ditto.
(var_clear_short_name): Renamed var_clear_short_names, changed to
clear all short names.
Ben Pfaff [Mon, 23 Jul 2007 04:48:10 +0000 (04:48 +0000)]
Include xstrndup.h also.
Ben Pfaff [Mon, 23 Jul 2007 04:46:30 +0000 (04:46 +0000)]
(float_get_double): New function.
Ben Pfaff [Mon, 23 Jul 2007 04:44:11 +0000 (04:44 +0000)]
* variable.c (var_set_width): Use new var_set_width function.
* missing-values.c (mv_n_values): Drop assertion, which was not
needed.
* format.c (fmt_default_for_width): New function.
(fmt_resize): New function.
Ben Pfaff [Mon, 23 Jul 2007 04:40:21 +0000 (04:40 +0000)]
Test both compressed and uncompressed system files with very long
strings.
John Darrington [Thu, 19 Jul 2007 00:36:00 +0000 (00:36 +0000)]
Delete unused dialogs
John Darrington [Wed, 18 Jul 2007 05:32:21 +0000 (05:32 +0000)]
Added popup menus to column and row title areas in datasheet.
Ben Pfaff [Wed, 18 Jul 2007 04:28:11 +0000 (04:28 +0000)]
Ignore directories that have been removed from CVS. These used to not
show up in Emacs' pcl-cvs mode, but for some reason they now pollute
the display.
John Darrington [Wed, 18 Jul 2007 04:27:29 +0000 (04:27 +0000)]
Enabled deleting of variables from the datasheet
Ben Pfaff [Wed, 18 Jul 2007 03:20:25 +0000 (03:20 +0000)]
Use strict and all warnings.
Ben Pfaff [Wed, 18 Jul 2007 03:18:31 +0000 (03:18 +0000)]
Use strict and all warnings. Fix warnings that this triggers.
Ben Pfaff [Wed, 18 Jul 2007 03:17:03 +0000 (03:17 +0000)]
Use strict and all warnings. Simplify parsing. Add "@c End:" line to
output to suppress Emacs warning. From bug #19335. Reviewed by John
Darrington.
Ben Pfaff [Wed, 18 Jul 2007 02:45:57 +0000 (02:45 +0000)]
Make file names in change log consistently relative to tests
directory.
Ben Pfaff [Wed, 18 Jul 2007 02:44:29 +0000 (02:44 +0000)]
Drop the tests that depend on parsing "-0" from a syntax file. Also
make float-format.sh error messages easier to read, by changing the
sed command so that error line numbers are easier to match to the test
input.
Ben Pfaff [Wed, 18 Jul 2007 02:20:45 +0000 (02:20 +0000)]
Improve the description of the SPSS system file format. Patch #6103.
Thanks to John Darrington for review.
John Darrington [Wed, 18 Jul 2007 00:50:58 +0000 (00:50 +0000)]
Added the ability to resize string variables from the GUI. Thanks to
Ben for his comments.
John Darrington [Mon, 16 Jul 2007 11:18:09 +0000 (11:18 +0000)]
Removed legacy code.
John Darrington [Mon, 16 Jul 2007 05:07:02 +0000 (05:07 +0000)]
File Open dialog now remembers directory of last opened file.
John Darrington [Sun, 15 Jul 2007 09:59:52 +0000 (09:59 +0000)]
Only generate NUMERIC or STRING command if the type-and-label dialog was
used.
John Darrington [Sun, 15 Jul 2007 09:22:46 +0000 (09:22 +0000)]
Remove "show-expanders" field (prevents warnings under gtk+-2.8)
John Darrington [Sat, 14 Jul 2007 06:25:23 +0000 (06:25 +0000)]
Only taint casereader if case size is unknown.
John Darrington [Sat, 14 Jul 2007 05:47:46 +0000 (05:47 +0000)]
Respect the case_cnt field from sys file header. Closes patch #6092
John Darrington [Fri, 13 Jul 2007 06:39:05 +0000 (06:39 +0000)]
Finally got the datasheet responding fast enough.
John Darrington [Fri, 13 Jul 2007 02:50:00 +0000 (02:50 +0000)]
Removed some deprecated gtk_ calls.
John Darrington [Fri, 13 Jul 2007 01:18:48 +0000 (01:18 +0000)]
Deleted lib/gtksheet/gtkiconlist.[ch] which isn't used (was it ever?)
John Darrington [Fri, 13 Jul 2007 00:57:02 +0000 (00:57 +0000)]
Updated INSTALL to be more specific to pspp.
John Darrington [Fri, 13 Jul 2007 00:46:41 +0000 (00:46 +0000)]
Added prototype to avoid compile time warning.
John Darrington [Thu, 12 Jul 2007 12:22:35 +0000 (12:22 +0000)]
Made the datasheet redraw itself when new data is loaded.
John Darrington [Thu, 12 Jul 2007 06:33:51 +0000 (06:33 +0000)]
Use non-deprecated function g_idle_add
Ben Pfaff [Thu, 12 Jul 2007 05:06:22 +0000 (05:06 +0000)]
Remove unused file. Fixes bug #18140.
Ben Pfaff [Thu, 12 Jul 2007 04:30:11 +0000 (04:30 +0000)]
(map_case): Create destination case instead of leaving it
undefined. Fixes bug #20285.
Reviewed by John Darrington.
John Darrington [Wed, 11 Jul 2007 03:59:57 +0000 (03:59 +0000)]
Made type-and-label subdialog behave rationally when the target variable
already exists.
Ben Pfaff [Tue, 10 Jul 2007 13:17:59 +0000 (13:17 +0000)]
Improve N OF CASES documentation.
John Darrington [Tue, 10 Jul 2007 07:40:02 +0000 (07:40 +0000)]
Enabled deletion of cases from the datasheet.
John Darrington [Tue, 10 Jul 2007 06:38:09 +0000 (06:38 +0000)]
Removed restructure menuitem, since it's unlikely to be implemented in
the near future.
Jason Stover [Tue, 10 Jul 2007 04:01:00 +0000 (04:01 +0000)]
initial version of glm
Jason Stover [Tue, 10 Jul 2007 03:17:49 +0000 (03:17 +0000)]
fixed export bug
John Darrington [Mon, 9 Jul 2007 11:31:17 +0000 (11:31 +0000)]
Prevent crash when attempting to insert cases when dictionary is empty.
John Darrington [Mon, 9 Jul 2007 05:21:12 +0000 (05:21 +0000)]
Implemented the "Insert Case" button and menuitem.
John Darrington [Sun, 8 Jul 2007 11:13:54 +0000 (11:13 +0000)]
Removed visibility from recent file menuitems, if recent managers aren't
available.
John Darrington [Sun, 8 Jul 2007 10:49:29 +0000 (10:49 +0000)]
Used type casenumber in GUI code where appropriate. Also, generally
stricter type allocations.
John Darrington [Sun, 8 Jul 2007 06:13:06 +0000 (06:13 +0000)]
Set type hints for older gtk versions
John Darrington [Sun, 8 Jul 2007 02:39:10 +0000 (02:39 +0000)]
Implemented the goto-case dialog
John Darrington [Sat, 7 Jul 2007 12:42:02 +0000 (12:42 +0000)]
Added appropriate window_type_hint to the splash window.
John Darrington [Sat, 7 Jul 2007 09:23:52 +0000 (09:23 +0000)]
Implemented "type & label" subdialog on compute.