From: Robert Kessl Date: Mon, 4 Aug 2014 11:47:05 +0000 (+0200) Subject: tableprinter: table_set_col_opt now uses xtype_parse_fmt instead of hook parse_fmt X-Git-Tag: v6.1~3^2~10 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=4313ba1d176383101791bcfad9660dd16ea30a84;p=libucw.git tableprinter: table_set_col_opt now uses xtype_parse_fmt instead of hook parse_fmt --- 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; }