? _plain
cvs diff: Diffing .
cvs diff: Diffing config
cvs diff: Diffing config/psfonts
cvs diff: Diffing doc
cvs diff: Diffing examples
cvs diff: Diffing lib
cvs diff: Diffing lib/gsl-extras
cvs diff: Diffing lib/gtksheet
cvs diff: Diffing lib/linreg
cvs diff: Diffing po
cvs diff: Diffing src
cvs diff: Diffing src/data
Index: src/data/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/ChangeLog,v
retrieving revision 1.58
diff -u -p -r1.58 ChangeLog
--- src/data/ChangeLog	7 Jul 2006 02:10:08 -0000	1.58
+++ src/data/ChangeLog	13 Jul 2006 04:05:39 -0000
@@ -1,3 +1,17 @@
+Wed Jul 12 21:02:26 2006  Ben Pfaff  <blp@gnu.org>
+
+	* procedure.c (internal_procedure): Create sink_case with only as
+	many values as the compacted dictionary.
+
+Wed Jul 12 21:01:00 2006  Ben Pfaff  <blp@gnu.org>
+
+	Remove "debugging" code that caused plenty of false positives and
+	no true positives.
+	
+	* case.h (struct ccase): [DEBUGGING] Remove `this' member.
+
+	* case.c: Remove all references to `this' member.
+
 Thu Jul  6 19:09:53 2006  Ben Pfaff  <blp@gnu.org>
 
 	Fix link error noted by Jason Stover.
Index: src/data/case.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/case.c,v
retrieving revision 1.4
diff -u -p -r1.4 case.c
--- src/data/case.c	7 May 2006 05:44:18 -0000	1.4
+++ src/data/case.c	13 Jul 2006 04:05:39 -0000
@@ -45,9 +45,6 @@ case_unshare (struct ccase *c) 
 {
   struct case_data *cd;
   
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
   assert (c->case_data->ref_cnt > 1);
 
   cd = c->case_data;
@@ -72,7 +69,6 @@ void
 case_nullify (struct ccase *c) 
 {
   c->case_data = NULL;
-  c->this = c;
 }
 #endif /* DEBUGGING */
 
@@ -100,17 +96,10 @@ case_create (struct ccase *c, size_t val
 void
 case_clone (struct ccase *clone, const struct ccase *orig)
 {
-  assert (orig != NULL);
-  assert (orig->this == orig);
-  assert (orig->case_data != NULL);
   assert (orig->case_data->ref_cnt > 0);
-  assert (clone != NULL);
 
   if (clone != orig) 
-    {
-      *clone = *orig;
-      clone->this = clone;
-    }
+    *clone = *orig;
   orig->case_data->ref_cnt++;
 }
 #endif /* DEBUGGING */
@@ -121,16 +110,11 @@ case_clone (struct ccase *clone, const s
 void
 case_move (struct ccase *dst, struct ccase *src) 
 {
-  assert (src != NULL);
-  assert (src->this == src);
-  assert (src->case_data != NULL);
   assert (src->case_data->ref_cnt > 0);
-  assert (dst != NULL);
   
   if (dst != src) 
     {
       *dst = *src;
-      dst->this = dst;
       case_nullify (src); 
     }
 }
@@ -144,7 +128,6 @@ case_destroy (struct ccase *c) 
   struct case_data *cd;
   
   assert (c != NULL);
-  assert (c->this == c);
 
   cd = c->case_data;
   if (cd != NULL && --cd->ref_cnt == 0) 
@@ -183,9 +166,6 @@ case_swap (struct ccase *a, struct ccase
 int
 case_try_create (struct ccase *c, size_t value_cnt) 
 {
-#ifdef DEBUGGING
-  c->this = c;
-#endif
   c->case_data = malloc (case_size (value_cnt));
   if (c->case_data != NULL) 
     {
@@ -215,17 +195,11 @@ case_copy (struct ccase *dst, size_t dst
            const struct ccase *src, size_t src_idx,
            size_t value_cnt)
 {
-  assert (dst != NULL);
-  assert (dst->this == dst);
-  assert (dst->case_data != NULL);
   assert (dst->case_data->ref_cnt > 0);
   assert (dst_idx + value_cnt <= dst->case_data->value_cnt);
 
-  assert (src != NULL);
-  assert (src->this == src);
-  assert (src->case_data != NULL);
   assert (src->case_data->ref_cnt > 0);
-  assert (src_idx + value_cnt <= dst->case_data->value_cnt);
+  assert (src_idx + value_cnt <= src->case_data->value_cnt);
 
   if (dst->case_data != src->case_data || dst_idx != src_idx) 
     {
@@ -246,9 +220,6 @@ void
 case_to_values (const struct ccase *c, union value *output,
                 size_t output_size UNUSED) 
 {
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
   assert (c->case_data->ref_cnt > 0);
   assert (output_size == c->case_data->value_cnt);
   assert (output != NULL || output_size == 0);
@@ -267,7 +238,6 @@ case_from_values (struct ccase *c, const
                   size_t input_size UNUSED) 
 {
   assert (c != NULL);
-  assert (c->this == c);
   assert (c->case_data != NULL);
   assert (c->case_data->ref_cnt > 0);
   assert (input_size == c->case_data->value_cnt);
@@ -288,7 +258,6 @@ const union value *
 case_data (const struct ccase *c, size_t idx) 
 {
   assert (c != NULL);
-  assert (c->this == c);
   assert (c->case_data != NULL);
   assert (c->case_data->ref_cnt > 0);
   assert (idx < c->case_data->value_cnt);
@@ -304,7 +273,6 @@ double
 case_num (const struct ccase *c, size_t idx) 
 {
   assert (c != NULL);
-  assert (c->this == c);
   assert (c->case_data != NULL);
   assert (c->case_data->ref_cnt > 0);
   assert (idx < c->case_data->value_cnt);
@@ -322,7 +290,6 @@ const char *
 case_str (const struct ccase *c, size_t idx) 
 {
   assert (c != NULL);
-  assert (c->this == c);
   assert (c->case_data != NULL);
   assert (c->case_data->ref_cnt > 0);
   assert (idx < c->case_data->value_cnt);
@@ -339,7 +306,6 @@ union value *
 case_data_rw (struct ccase *c, size_t idx) 
 {
   assert (c != NULL);
-  assert (c->this == c);
   assert (c->case_data != NULL);
   assert (c->case_data->ref_cnt > 0);
   assert (idx < c->case_data->value_cnt);
@@ -405,7 +371,6 @@ const union value *
 case_data_all (const struct ccase *c) 
 {
   assert (c != NULL);
-  assert (c->this == c);
   assert (c->case_data != NULL);
   assert (c->case_data->ref_cnt > 0);
 
@@ -421,7 +386,6 @@ union value *
 case_data_all_rw (struct ccase *c) 
 {
   assert (c != NULL);
-  assert (c->this == c);
   assert (c->case_data != NULL);
   assert (c->case_data->ref_cnt > 0);
 
Index: src/data/case.h
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/case.h,v
retrieving revision 1.4
diff -u -p -r1.4 case.h
--- src/data/case.h	7 May 2006 05:44:18 -0000	1.4
+++ src/data/case.h	13 Jul 2006 04:05:39 -0000
@@ -30,9 +30,6 @@
 struct ccase 
   {
     struct case_data *case_data;        /* Actual data. */
-#if DEBUGGING
-    struct ccase *this;                 /* Detects unauthorized move/copy. */
-#endif
   };
 
 /* Invisible to user code. */
Index: src/data/procedure.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/procedure.c,v
retrieving revision 1.9
diff -u -p -r1.9 procedure.c
--- src/data/procedure.c	7 May 2006 05:46:26 -0000	1.9
+++ src/data/procedure.c	13 Jul 2006 04:05:40 -0000
@@ -219,7 +219,8 @@ internal_procedure (bool (*case_func) (c
   wc_data.case_func = case_func;
   wc_data.aux = aux;
   create_trns_case (&wc_data.trns_case, default_dict);
-  case_create (&wc_data.sink_case, dict_get_next_value_idx (default_dict));
+  case_create (&wc_data.sink_case,
+               dict_get_compacted_value_cnt (default_dict));
   wc_data.cases_written = 0;
 
   ok = proc_source->class->read (proc_source,
cvs diff: Diffing src/language
cvs diff: Diffing src/language/control
cvs diff: Diffing src/language/data-io
cvs diff: Diffing src/language/dictionary
cvs diff: Diffing src/language/expressions
Index: src/language/expressions/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/expressions/ChangeLog,v
retrieving revision 1.5
diff -u -p -r1.5 ChangeLog
--- src/language/expressions/ChangeLog	9 Jun 2006 22:51:24 -0000	1.5
+++ src/language/expressions/ChangeLog	13 Jul 2006 04:05:41 -0000
@@ -1,3 +1,8 @@
+Wed Jul 12 21:03:17 2006  Ben Pfaff  <blp@gnu.org>
+
+	* evaluate.c (cmd_debug_evaluate): Don't try to resize a null
+	case.
+
 Fri Jun  9 13:59:15 2006  Ben Pfaff  <blp@gnu.org>
 
 	Reform string library.
Index: src/language/expressions/evaluate.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/expressions/evaluate.c,v
retrieving revision 1.6
diff -u -p -r1.6 evaluate.c
--- src/language/expressions/evaluate.c	8 Jul 2006 03:05:51 -0000	1.6
+++ src/language/expressions/evaluate.c	13 Jul 2006 04:05:41 -0000
@@ -163,9 +163,10 @@ cmd_debug_evaluate (void)
           if (c == NULL) 
             {
               c = xmalloc (sizeof *c);
-              case_nullify (c);
+              case_create (c, dict_get_next_value_idx (d));
             }
-          case_resize (c, old_value_cnt, dict_get_next_value_idx (d));
+          else
+            case_resize (c, old_value_cnt, dict_get_next_value_idx (d));
 
           if (lex_is_number ())
             case_data_rw (c, v->fv)->f = tokval;
cvs diff: Diffing src/language/lexer
cvs diff: Diffing src/language/stats
cvs diff: Diffing src/language/tests
cvs diff: Diffing src/language/utilities
cvs diff: Diffing src/language/xforms
cvs diff: Diffing src/libpspp
cvs diff: Diffing src/math
cvs diff: Diffing src/math/linreg
cvs diff: Diffing src/math/time-series
cvs diff: Diffing src/math/ts
cvs diff: Diffing src/output
Index: src/output/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/ChangeLog,v
retrieving revision 1.14
diff -u -p -r1.14 ChangeLog
--- src/output/ChangeLog	13 Jul 2006 03:58:44 -0000	1.14
+++ src/output/ChangeLog	13 Jul 2006 04:05:41 -0000
@@ -1,3 +1,13 @@
+Wed Jul 12 21:03:37 2006  Ben Pfaff  <blp@gnu.org>
+
+	* table.c (tab_natural_width): Get rid of warning on empty column,
+	which tended to just trigger false positives because we handle
+	joined cells so badly.  We need a real fix, and the warning is not
+	helpful.
+
+	* table.c (tab_offset): [DEBUGGING] Let row, col arguments be as
+	big as row or column count.
+	
 Wed Jul 12 20:58:19 2006  Ben Pfaff  <blp@gnu.org>
 
 	* output.c (outp_drivers): [DEBUGGING] Delete unused declaration.
Index: src/output/table.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/table.c,v
retrieving revision 1.10
diff -u -p -r1.10 table.c
--- src/output/table.c	8 Jul 2006 03:05:52 -0000	1.10
+++ src/output/table.c	13 Jul 2006 04:05:42 -0000
@@ -435,10 +435,10 @@ tab_natural_width (struct tab_table *t, 
 
   if (width == 0)
     {
-      width = d->prop_em_width * 8;
-#if DEBUGGING
-      printf ("warning: table column %d contains no data.\n", c);
-#endif
+      /* FIXME: This is an ugly kluge to compensate for the fact
+         that we don't let joined cells contribute to column
+         widths. */
+      width = d->prop_em_width * 8; 
     }
   
   {
@@ -802,12 +802,12 @@ tab_offset (struct tab_table *t, int col
 
   assert (t != NULL);
 #if DEBUGGING
-  if (row < -1 || row >= t->nr)
+  if (row < -1 || row > t->nr)
     {
       printf ("tab_offset(): row=%d in %d-row table\n", row, t->nr);
       NOT_REACHED ();
     }
-  if (col < -1 || col >= t->nc)
+  if (col < -1 || col > t->nc)
     {
       printf ("tab_offset(): col=%d in %d-column table\n", col, t->nc);
       NOT_REACHED ();
cvs diff: Diffing src/output/charts
cvs diff: Diffing src/ui
cvs diff: Diffing src/ui/gui
cvs diff: Diffing src/ui/terminal
cvs diff: Diffing tests
cvs diff: Diffing tests/bugs
cvs diff: Diffing tests/command
cvs diff: Diffing tests/expressions
cvs diff: Diffing tests/expressions/randist
cvs diff: Diffing tests/libpspp
cvs diff: Diffing tests/stats
cvs diff: Diffing tests/xforms
