- new_level = push_level (uiout, lstid);
- if (uiout->table_flag && (new_level == 1))
- uiout->headercurr = uiout->headerfirst;
- uo_list_begin (uiout, new_level, lstid);
+
+ /* Be careful to verify the ``field'' before the new tuple/list is
+ pushed onto the stack. That way the containing list/table/row is
+ verified and not the newly created tuple/list. This verification
+ is needed (at least) for the case where a table row entry
+ contains either a tuple/list. For that case bookkeeping such as
+ updating the column count or advancing to the next heading still
+ needs to be performed. */
+ {
+ int fldno;
+ int width;
+ int align;
+ verify_field (uiout, &fldno, &width, &align);
+ }
+
+ new_level = push_level (uiout, type, id);
+
+ /* If the push puts us at the same level as a table row entry, we've
+ got a new table row. Put the header pointer back to the start. */
+ if (uiout->table.body_flag
+ && uiout->table.entry_level == new_level)
+ uiout->table.header_next = uiout->table.header_first;
+
+ uo_begin (uiout, type, new_level, id);