X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Ftable.c;h=a7dc4817f0f946a46fc73ce0f2713490810bbc5b;hb=5beffdda43634370653661d5a0f5e3c75aa28747;hp=430742d743f3c045c3f6c3c8f7f397db816826c5;hpb=97d4f38945476834fd7fce612b663f19f2b291f8;p=pspp-builds.git diff --git a/src/output/table.c b/src/output/table.c index 430742d7..a7dc4817 100644 --- a/src/output/table.c +++ b/src/output/table.c @@ -87,6 +87,7 @@ void tab_destroy (struct tab_table *t) { assert (t != NULL); + free (t->title); pool_destroy (t->container); } @@ -435,10 +436,10 @@ tab_natural_width (struct tab_table *t, struct outp_driver *d, int c) 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 +803,12 @@ tab_offset (struct tab_table *t, int col, int row) 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 ();