Ben Pfaff [Thu, 7 Jun 2007 06:41:58 +0000 (06:41 +0000)]
Actually implement the new procedure code and adapt all of its clients
to match. Also adapt all of the other case sources and sinks in the
tree and their clients to use the casereader/casewriter
infrastructure.
Ben Pfaff [Thu, 7 Jun 2007 05:59:27 +0000 (05:59 +0000)]
Add datasheet.
After this commit everything compiles, but linking fails because
casereader_clone and some other casereader symbols are duplicates.
The next commit will remove casefile.c from the build and fix the
problem.
Ben Pfaff [Thu, 7 Jun 2007 05:53:54 +0000 (05:53 +0000)]
Until now, the procedure code has provided a case to the case_source,
which has filled in the data values that come from the active file.
"Left" data values that don't come from the active file naturally stay
the same from case to case, because the procedure code keeps using
that same case.
One of the compromises that comes with the new procedure code is that
the active file allocates and provides its own case, which the
procedure code then has to resize to provide room for any other
variables that should go in the case and then fill in the values of
"left" variables. Then, when we're done with that case, we have to
save the values of "left" variables to copy into the next case read
from the active file.
Ben Pfaff [Thu, 7 Jun 2007 05:42:00 +0000 (05:42 +0000)]
Add casegrouper, to allow cases read from a given casereader to be
broken into groups, each of which has its own casereader. Generally
cases are grouped based on having equal values for some set of
variables.
Ben Pfaff [Thu, 7 Jun 2007 05:36:24 +0000 (05:36 +0000)]
Add casereaders and casewriters, the basis of the new data processing
implementation. A casereader is a uniform interface to reading cases
from a data source; a casewriter is a uniform interface to writing
cases to a data sink.
Ben Pfaff [Thu, 7 Jun 2007 05:31:01 +0000 (05:31 +0000)]
"casewindow" data structure that extends the deque (from libpspp) of
cases with the ability to dump cases to disk if we get too many of
them in memory.
Ben Pfaff [Thu, 7 Jun 2007 05:15:58 +0000 (05:15 +0000)]
In a couple of places we calculate the maximum number of cases to keep
in memory based on the user-defined workspace. Enable centralizing
the calculation through a new function.
Ben Pfaff [Mon, 4 Jun 2007 01:29:08 +0000 (01:29 +0000)]
* tower.c: Cache repeated lookups of a single tower element. This
turns such lookups into O(1) operations without harming the big-O
of other operations.
* tower.h (struct tower): Add members for caching.
Ben Pfaff [Sun, 6 May 2007 22:05:21 +0000 (22:05 +0000)]
Abstract the documents within a dictionary a little better. Thanks to
John Darrington for suggestion, initial version, and review. Patch
#5917.
* command/file-label.sh: Update to match new DOCUMENT behavior.
* title.c (add_document_line): Removed.
(add_document_trailer): New function.
(cmd_document): Rewrite to yield SPSS-like output and to use the
updated document API.
(cmd_add_documents): Ditto.
* lexer.c (lex_entire_line): Add const to parameter.
(lex_entire_line_ds): Ditto.
(lex_rest_of_line): Drop end_dot parameter. Update all callers to
use lex_end_dot instead.
(lex_end_dot): New function.
* dictionary.c (struct dictionary): Change `documents' member from
char * to struct string.
(dict_clear): Destroy struct string.
(dict_get_documents): Convert struct string to char *.
(dict_set_documents): Set struct string. Pad to 80-character
multiple.
(dict_clear_documents): New function.
(dict_add_document_line): New function.
(dict_get_document_line_cnt): New function.
(dict_get_document_line): New function.
* dictionary.h (macro DOC_LINE_LENGTH): New macro.
* sys-file-reader.c (read_documents): Use new document functions.
Ben Pfaff [Mon, 23 Apr 2007 01:35:34 +0000 (01:35 +0000)]
Patch #5884.
(ll_for_each_reverse): New macro.
(ll_for_each_reverse_continue): New macro.
(ll_for_each_reverse_safe): New macro.
(ll_for_each_safe_reverse_continue): New macro.
(ll_for_each_reverse_preremove): New macro.
(ll_for_each_reverse_postremove): New macro.
(ll_remove__): Removed (dead code).
(ll_tail__): New macro.
(ll_prev__): New macro.
Ben Pfaff [Mon, 23 Apr 2007 01:32:29 +0000 (01:32 +0000)]
Patch #5885.
(dict_set_split_vars): dict_destroy expects that
dict_clear will free most data related to the dictionary.
dict_clear does a decent job, except that dict_set_split_vars on
some systems won't actually free the dict's "split" member.
Instead, it'll allocate a 1-byte region. Fix this.
Ben Pfaff [Mon, 16 Apr 2007 03:06:50 +0000 (03:06 +0000)]
* compute-dialog.c (function_list_populate): Use new accessor
functions exported by language/expressions/public.h.
* parse.c (expr_get_function): New function.
(expr_get_function_cnt): New function.
(expr_operation_get_name): New function.
(expr_operation_get_prototype): New function.
(expr_operation_get_arg_cnt): New function.
Ben Pfaff [Mon, 16 Apr 2007 00:14:08 +0000 (00:14 +0000)]
* recode.c (enlarge_dst_widths): Source isn't null-terminated, so
don't pretend it is.
(var_is_num_missing): MISSING should include system-missing values
too.
Ben Pfaff [Mon, 19 Mar 2007 20:51:01 +0000 (20:51 +0000)]
* Makefile.am (AUTOMAKE_OPTIONS): Require Automake 1.10 (or
later), which works better with systems that have a non-empty
$(EXEEXT).
(SUBDIRS): Drop intl.
(DISTCLEANFILES): Drop intl/plural.c.
* Throughout Makefile.am and the automake.mk files: Change
mkinstalldirs to $(MKDIR_P), to support the corresponding Automake
change.
* Smake (GNULIB_MODULES): Use gettext-h instead of gettext module.
(all): Don't create intl directory.
(gettextize): Don't use --intl flag.
* configure.ac: Require Autoconf 2.60 or later. Use external
gettext. Drop intl/Makefile from config files.