va_end(args);
}
-void table_end_row(struct table *tbl)
+void table_clean_row(struct table *tbl)
{
- ASSERT(tbl->formatter->row_output);
- tbl->formatter->row_output(tbl);
memset(tbl->col_str_ptrs, 0, sizeof(char *) * tbl->column_count);
mp_restore(tbl->pool, &tbl->pool_state);
tbl->last_printed_col = -1;
tbl->row_printing_started = 0;
}
-void table_clean_row(struct table *tbl)
+void table_end_row(struct table *tbl)
{
- memset(tbl->col_str_ptrs, 0, sizeof(char *) * tbl->column_count);
- mp_restore(tbl->pool, &tbl->pool_state);
- tbl->last_printed_col = -1;
- tbl->row_printing_started = 0;
+ ASSERT(tbl->formatter->row_output);
+ if(tbl->row_printing_started == 0) return;
+ tbl->formatter->row_output(tbl);
+ table_clean_row(tbl);
}
/* Construction of a cell using a fastbuf */