From 4313ba1d176383101791bcfad9660dd16ea30a84 Mon Sep 17 00:00:00 2001 From: Robert Kessl Date: Mon, 4 Aug 2014 13:47:05 +0200 Subject: [PATCH] tableprinter: table_set_col_opt now uses xtype_parse_fmt instead of hook parse_fmt --- ucw/table.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ucw/table.c b/ucw/table.c index 25a01d8d..1324839a 100644 --- a/ucw/table.c +++ b/ucw/table.c @@ -215,10 +215,10 @@ const char *table_set_col_opt(struct table *tbl, uint col_inst_idx, const char * return col_def->set_col_opt(tbl, col_inst_idx, col_opt); } - if(col_def && col_def->type_def && col_def->type_def->parse_fmt) { - uint fmt = 0; - const char *tmp_err = col_def->type_def->parse_fmt(col_opt, &fmt, tbl->pool); - if(tmp_err) return tmp_err; + if(col_def && col_def->type_def) { + u32 fmt = 0; + const char *tmp_err = xtype_parse_fmt(col_def->type_def, col_opt, &fmt, tbl->pool); + if(tmp_err) return mp_printf(tbl->pool, "Invalid column format; xtypes error: '%s'.", tmp_err); tbl->column_order[col_inst_idx].fmt = fmt; return NULL; } -- 2.39.2