X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftab.c;h=201f0d8221c45f29c3c96391577299561a0dc242;hb=067d02c2b8c591efc368cf5127c497313d7a373f;hp=8afb8f0be0e3793d85675de5dc6fd5d87867e6b2;hpb=06f9ee45954e5e71fa7f6262dbf37defa1dbf996;p=pspp diff --git a/src/tab.c b/src/tab.c index 8afb8f0be0..201f0d8221 100644 --- a/src/tab.c +++ b/src/tab.c @@ -210,6 +210,12 @@ void tab_headers (struct tab_table *table, int l, int r, int t, int b) { assert (table != NULL); + assert (l < table->nc); + assert (r < table->nc); + assert (t < table->nr); + assert (b < table->nr); + + table->l = l; table->r = r; table->t = t; @@ -862,11 +868,12 @@ tab_flags (struct tab_table *t, unsigned flags) void tab_submit (struct tab_table *t) { - struct som_table s; + struct som_entity s; assert (t != NULL); s.class = &tab_table_class; s.ext = t; + s.type = SOM_TABLE; som_submit (&s); tab_destroy (t); } @@ -921,9 +928,11 @@ int tab_hit; /* Set the current table to TABLE. */ static void -tabi_table (struct som_table *table) +tabi_table (struct som_entity *table) { assert (table != NULL); + assert (table->type == SOM_TABLE); + t = table->ext; tab_offset (t, 0, 0);