> I guess that we need something like cl->compare_data. > > >> + cl = scols_table_get_key_column(tb); > > Do we really need table->cl_key? Maybe it would be better to add > > scols_sort_table(tb, cl) > Ok. I will submit v3 for this and related patches. On 05/12/2014 06:43 PM, Karel Zak wrote: > On Sun, May 11, 2014 at 02:20:37PM +0600, Shakur Shams Mullick wrote: >> +int comparison_func(struct list_head *a, struct list_head *b, void *data) >> +{ >> + struct libscols_column *cl; >> + struct libscols_line *ra, *rb; >> + struct libscols_cell *ca, *cb; >> + >> + cl = (struct libscols_column *)(data); >> + >> + ra = list_entry(a, struct libscols_line, ln_lines); >> + rb = list_entry(b, struct libscols_line, ln_lines); >> + >> + ca = scols_line_get_cell(ra, cl->seqnum); >> + cb = scols_line_get_cell(rb, cl->seqnum); >> + >> + return cl->compar(ca, cb, NULL); > ^^^^^ > > I guess that we need something like cl->compare_data. > > >> + cl = scols_table_get_key_column(tb); > > Do we really need table->cl_key? Maybe it would be better to add > > scols_sort_table(tb, cl) > > and keep control of the sort column in the applications. It will > also allow to sort table by more columns. > > Karel > > -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html