[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ADD FILES and UPDATE
From: |
John Darrington |
Subject: |
Re: ADD FILES and UPDATE |
Date: |
Mon, 1 Dec 2008 11:24:09 +0900 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
I also wasn't aware that compare_values only checked the first 8
characters. I have a feeling this is a bug.
The only problem with the 3way function is that the caller must
gaurantee that both values have the same with.
I think that we need a more general compare_values_with_widths_3way
function and all existing callers of compare_values_short should use it.
J'
On Sun, Nov 30, 2008 at 03:42:13PM -0800, Ben Pfaff wrote:
There is a new branch, "add-files", in the Git repository that
contains my ADD FILES and UPDATE implementation. Please check it
out and let me know what you think.
Lacking Git, it can be browsed via the web interface on Savannah:
http://git.savannah.gnu.org/gitweb/?p=pspp.git;a=log;h=refs/heads/add-files
Here is the log:
commit f6c356619ac372bd29c1bc7879499f621c49e4b5
Author: Ben Pfaff <address@hidden>
Date: Sun Nov 30 15:26:43 2008 -0800
Rename compare_values, hash_values with "_short" suffix.
The compare_values and hash_values functions do not compare an
entire value. Rather, they compare only the short string prefix
of long string values. I have a feeling that this misnaming was
confusing people (it certainly confused me) so this commit renames
them.
It also adds a new function value_compare_3way() that does what
one what expect such a function to do.
src/data/category.c | 2 +-
src/data/value.c | 19 ++++++++++++++-----
src/data/value.h | 4 ++++
src/language/stats/binomial.c | 4 ++--
src/language/stats/examine.q | 4 ++--
src/language/stats/freq.c | 4 ++--
src/language/stats/oneway.q | 4 ++--
src/language/stats/t-test.q | 4 ++--
src/math/coefficient.c | 4 ++--
src/math/covariance-matrix.c | 16 ++++++++--------
src/math/group.c | 4 ++--
src/ui/gui/find-dialog.c | 2 +-
12 files changed, 42 insertions(+), 29 deletions(-)
commit 93e1bf97fa242e86bbdab6912e99f97c0a621e7c
Author: Ben Pfaff <address@hidden>
Date: Wed Oct 29 06:33:56 2008 -0700
Allow MATCH FILES before an active file has been defined.
Except when it has the active file as an input, MATCH FILES does
not require an active file, and produces an active file, so it
makes sense to allow it anywhere.
Thanks to John Darrington for pointing out the bug.
src/language/command.def | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 099526bed39c951f002088cbe07484f985ae3280
Author: Ben Pfaff <address@hidden>
Date: Sun Oct 12 15:04:09 2008 -0700
Break get.c up into multiple files in a logical fashion.
get.c implemented GET, IMPORT, SAVE, XSAVE, EXPORT, XEXPORT,
and MATCH FILES, which seems like too much for one file.
src/data/case-map.c | 62 ++
src/data/case-map.h | 9 +-
src/language/data-io/automake.mk | 18 +-
src/language/data-io/get.c | 1223
+-----------------------------------
src/language/data-io/match-files.c | 723 +++++++++++++++++++++
src/language/data-io/save.c | 349 ++++++++++
src/language/data-io/trim.c | 196 ++++++
src/language/data-io/trim.h | 29 +
8 files changed, 1396 insertions(+), 1213 deletions(-)
commit b9280c5574a2d67305cef68cc064ca7837138b54
Author: Ben Pfaff <address@hidden>
Date: Sun Nov 30 15:23:20 2008 -0800
Replace case_ordering with subcase.
The case_ordering data structure was useful for comparing cases,
but that is all that it did. In fact, the same data structure
can be used, at least, for extracting data from cases into arrays
of values, stuffing values back into cases, and for more general
comparisons than case_ordering anticipated.
This commit adds those abilities to case_ordering. It also renames
it to "subcase", because it is useful for more than just sorting
cases, which is all that case_ordering was designed for.
This commit also changes the allocation pattern for subcase from
having the implementation allocate all of the memory, to having
the subcase client allocate "struct subcase". This saves a
memory allocation without making life harder for anyone.
- Naming: the "case_ordering" name implied that it was
only useful for ordering (comparing cases).
- Interface: the interface
src/data/automake.mk | 4 +-
src/data/case-ordering.c | 178 --------------------
src/data/case-ordering.h | 57 -------
src/data/casegrouper.c | 66 ++++----
src/data/casegrouper.h | 6 +-
src/data/subcase.c | 318
++++++++++++++++++++++++++++++++++++
src/data/subcase.h | 119 ++++++++++++++
src/language/stats/aggregate.c | 29 ++--
src/language/stats/examine.q | 31 ++---
src/language/stats/rank.q | 49 +++---
src/language/stats/sort-cases.c | 13 +-
src/language/stats/sort-criteria.c | 63 ++++---
src/language/stats/sort-criteria.h | 10 +-
src/language/stats/wilcoxon.c | 12 +-
src/math/merge.c | 14 +-
src/math/merge.h | 4 +-
src/math/sort.c | 50 ++++--
src/math/sort.h | 10 +-
src/ui/gui/psppire-case-file.c | 2 +-
src/ui/gui/psppire-case-file.h | 4 +-
20 files changed, 622 insertions(+), 417 deletions(-)
commit 450ce49586b81f3f8b1920c9b1ed4319d2d6ed6c
Author: Ben Pfaff <address@hidden>
Date: Mon Nov 17 21:36:41 2008 -0800
Implement ADD FILES and UPDATE.
doc/automake.mk | 1 +
doc/combining.texi | 336 +++++++++++++
doc/files.texi | 98 +----
doc/pspp.texinfo | 4 +-
src/data/automake.mk | 2 +
src/data/case-matcher.c | 152 ++++++
src/data/case-matcher.h | 33 ++
src/language/command.def | 4 +-
src/language/data-io/automake.mk | 2 +-
src/language/data-io/combine-files.c | 864
++++++++++++++++++++++++++++++++++
src/language/data-io/match-files.c | 595 ++++++++++++++---------
tests/automake.mk | 2 +
tests/command/add-files.sh | 200 ++++++++
tests/command/match-files.sh | 43 +-
tests/command/update.sh | 172 +++++++
15 files changed, 2155 insertions(+), 353 deletions(-)
--
"Platonically Evil Monkey has been symbolically representing the darkest
fears of humanity since the dawn of literature and religion, and I think
I speak for everyone when I give it a sidelong glance of uneasy
recognition
this evening." --Scrymarch
_______________________________________________
pspp-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/pspp-dev
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature