Ben Pfaff [Fri, 11 Feb 2005 08:22:05 +0000 (08:22 +0000)]
Fri Feb 11 00:08:36 2005 Ben Pfaff <blp@gnu.org>
Fix Bug #11916, which was confusing a variable's `index' member
with the variable's position in a var_set. Although these are
usually the same, they are not for array `var_set's.
Took advantage of this bug as an opportunity to clean up and
rewrite parse_var_set_vars().
* vars-prs.c: (parse_vs_variable_idx) New function.
(parse_vs_variable) Reimplement in terms of
parse_vs_variable_idx().
(parse_var_idx_class) New function.
(add_variable) New function.
(add_variables) New function.
(parse_var_set_vars) Rewritten.
(struct var_set) Change `lookup_var' member that returns a
variable into `lookup_var_idx' member that returns an int.
Updated the var set implementations in obvious corresponding ways.
Used compare_var_ptr_names(), hash_var_ptr_name() just added.
Fri Feb 11 00:06:03 2005 Ben Pfaff <blp@gnu.org>
Use our global variable compare & hash functions and give them
better names. Add similar functions for dealing with double
pointers to variables.
* vars-atr.c: (compare_variables) Renamed compare_var_names().
(hash_variable) Renamed hash_var_name().
(compare_var_ptr_names) New function.
(hash_var_ptr_name) New function.
* t-test.q: (cmd_t_test) Use global compare_var_names(),
hash_var_name().
(compare_var_name) Removed.
(hash_var_name) Removed.
Fri Feb 11 00:04:39 2005 Ben Pfaff <blp@gnu.org>
Fix dictionary bug.
* dictionary.c: (compare_variable_dblptrs) Rename
compare_var_ptrs() and fix it to properly dereference the double
pointers.
John Darrington [Mon, 10 Jan 2005 06:50:45 +0000 (06:50 +0000)]
Added a signal handler to delete temp casefiles on SIGINT and SIGQUIT.
Inhibited the PERMISSIONS command when SAFER is on.
command.def: Added a lot more unimplemented commands.
Moved --version information to copyleft.c
Ben Pfaff [Sun, 9 Jan 2005 07:59:48 +0000 (07:59 +0000)]
Sat Jan 8 23:58:34 2005 Ben Pfaff <blp@gnu.org>
* sort.c: (compare_initial_runs) Needed additional level of
dereferencing.
(merge_once) Fix plenty of stupid mistakes.
Sat Jan 8 23:55:27 2005 Ben Pfaff <blp@gnu.org>
* casefile.c: (casefile_sleep) Need to flush_buffer() after
calling casefile_to_disk() or we will lose the last block in the
file if the casefile started out as disk-based.
(casefile_get_reader) Initialize reader->destructive to 0.
(cmd_debug_casefile) Add new test pattern.
(test_casefile) Define new test pattern to make sure
casefile_sleep() works properly.
John Darrington [Thu, 6 Jan 2005 12:55:44 +0000 (12:55 +0000)]
Added a signal handler for SIGFPE
(Re)Fixed an assertion in sort.c
Added a test for sorting with ENORMOUS input files.
Added a test to ensure that fatal errors are reported properly.
Tidied up a few other tests.
Ben Pfaff [Mon, 15 Nov 2004 09:51:22 +0000 (09:51 +0000)]
Instead of making system or portable file readers responsible for
dropping and reordering variables, make them read full cases and
let the caller take care of any changes.
Instead of providing a system or portable file writer with a raw
case in the format needed for output, provide it with a regular
case. The writer takes care of any needed translation.
Instead of treating `struct file_handle' as a class to subclass
into data files, system files, and portable files, instead use it
as a helper that coordinates access. Now it is opaque, too.
Break dictionary functions into separate header file.
Get rid of procedure-specific union in struct variable, using
instead a void * pointer and a destructor function.
Ben Pfaff [Tue, 1 Jun 2004 04:57:11 +0000 (04:57 +0000)]
Fix memory leaks.
Generalize casefiles to the extent that we can use them for sorting
and other kinds of data transformations. Change cases to be
copy-on-write to improve memory efficiency in common cases. Every
access to a member of a `struct ccase' was changed to be a call to a
case_*() function, especially case_data(), case_num(), case_str(), or
case_data_rw(). Many instances of a local variable named "case_num"
were changed to "case_idx" as a consequence. Many `struct ccase *'
were changed to actual `struct ccase' because of copying semantics of
cases. In several places there was a choice between updating debug
code to work with the new ADTs or just deleting it because it was
useless; I chose to delete it.
Ben Pfaff [Mon, 31 May 2004 05:50:10 +0000 (05:50 +0000)]
Fully implement arbitrary delimiters on DATA LIST, extending the half
implementation that was already there.
Update our string ADTs, struct string and struct len_string. Get rid
of pool support, which was largely unused. Rename lots of functions
to have more obvious or consistent names.
pjk [Thu, 13 May 2004 18:31:13 +0000 (18:31 +0000)]
Adjusted code for DATA LIST (free/list) to be more consistent with SPSS in
the instance where delimiters are explicitly set. In particular, if a delim.
is explicitly set, we treat quotes / apostrophes as normal chars:
From SPSS Syntax Base manual:
For data with explicitly specified value delimiters (for example, DATA LIST FREE (","):
· Multiple delimiters without any intervening space can be used to specify missing data.
· The specified delimiters cannot occur within a data value, even if you enclose the value
in quotation marks or apostrophes.
configure.ac: check for presence / add libgnugetopt to support
getopt_long on FreeBSD
algorithm.c, alloc.h: Wrap includes of alloca.h with #ifdef
HAVE_ALLOCA_H. Some platforms (FreeBSD for example) have alloca in
stdlib.h... Autoconf detects this in AC_FUNC_ALLOCA
- Fixed bug in pool (free_all_gizmos) where gizmos pointer wasn't being
NULLed after we freed all of the gizmos
- Fixed bug in vfm (cancel_transformations) where we didn't NULL t_trns after
freeing it
- Updated routines around variable labels to allow 255 char. variable labels
(this is supported by SPSS 11.0 at least...) This doesn't appear to break
backward compat. Let me know if it does.
Ben Pfaff [Tue, 27 Apr 2004 05:54:31 +0000 (05:54 +0000)]
We're abusing the current ASCII driver by telling it to allocate a
9999-line, 9999-character page in the tests. This causes some systems
to curl up and die because it allocates 20 MB of contiguous RAM. This
change alleviates at least part of the problem. It is mostly a
stop-gap until the new output system is ready.
Fix bug where a copy dest spec would cause a failed assertion in strdup
Fix bug where a copy dest spec would cause the wrong member of the union
to be copied