All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/8] libsmartcols/src/libsmartcols.h.in: add library functions
@ 2014-05-11  8:20 Shakur Shams Mullick
  2014-05-11  8:20 ` [PATCH v2 2/8] libsmartcols/src/libsmartcols.sym: add symbols Shakur Shams Mullick
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Shakur Shams Mullick @ 2014-05-11  8:20 UTC (permalink / raw)
  To: util-linux; +Cc: Shakur Shams Mullick

---
 libsmartcols/src/libsmartcols.h.in | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/libsmartcols/src/libsmartcols.h.in b/libsmartcols/src/libsmartcols.h.in
index 9468226..c2adc34 100644
--- a/libsmartcols/src/libsmartcols.h.in
+++ b/libsmartcols/src/libsmartcols.h.in
@@ -83,6 +83,7 @@ enum {
 	SCOLS_FL_RIGHT	     = (1 << 2),   /* align to the right */
 	SCOLS_FL_STRICTWIDTH = (1 << 3),   /* don't reduce width if column is empty */
 	SCOLS_FL_NOEXTREMES  = (1 << 4),   /* ignore extreme fields when count column width*/
+
 };
 
 extern struct libscols_iter *scols_new_iter(int direction);
@@ -115,6 +116,8 @@ extern int scols_cell_refer_data(struct libscols_cell *ce, char *str);
 extern const char *scols_cell_get_data(const struct libscols_cell *ce);
 extern int scols_cell_set_color(struct libscols_cell *ce, const char *color);
 extern const char *scols_cell_get_color(const struct libscols_cell *ce);
+extern int scols_cmpstr_cells(struct libscols_cell *a, struct libscols_cell *b, void *data);
+extern int scols_cmpnum_cells(struct libscols_cell *a, struct libscols_cell *b, void *data);
 
 /* column.c */
 extern int scols_column_is_tree(struct libscols_column *cl);
@@ -134,7 +137,10 @@ extern double scols_column_get_whint(struct libscols_column *cl);
 extern struct libscols_cell *scols_column_get_header(struct libscols_column *cl);
 extern int scols_column_set_color(struct libscols_column *cl, const char *color);
 extern const char *scols_column_get_color(struct libscols_column *cl);
+extern int scols_column_set_sortcmp(struct libscols_column *cl, 
+	int (*compar)(struct libscols_cell *a, struct libscols_cell *b, void *), void *data);
 
+ 
 /* line.c */
 extern struct libscols_line *scols_new_line(void);
 extern void scols_ref_line(struct libscols_line *ln);
@@ -157,7 +163,7 @@ extern int scols_line_set_data(struct libscols_line *ln, size_t n, const char *d
 extern int scols_line_refer_data(struct libscols_line *ln, size_t n, char *data);
 extern struct libscols_line *scols_copy_line(struct libscols_line *ln);
 
-/* table */
+/* table.c */
 extern int scols_table_colors_wanted(struct libscols_table *tb);
 extern int scols_table_is_raw(struct libscols_table *tb);
 extern int scols_table_is_ascii(struct libscols_table *tb);
@@ -202,6 +208,8 @@ extern int scols_table_set_symbols(struct libscols_table *tb, struct libscols_sy
 extern int scols_table_set_stream(struct libscols_table *tb, FILE *stream);
 extern FILE *scols_table_get_stream(struct libscols_table *tb);
 extern int scols_table_reduce_termwidth(struct libscols_table *tb, size_t reduce);
+extern int scols_table_set_key_column(struct libscols_table *tb, struct libscols_column *cl);
+struct libscols_column *scols_table_get_key_column(struct libscols_table *tb);
 
 /* table_print.c */
 extern int scols_print_table(struct libscols_table *tb);
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-05-12 17:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-11  8:20 [PATCH v2 1/8] libsmartcols/src/libsmartcols.h.in: add library functions Shakur Shams Mullick
2014-05-11  8:20 ` [PATCH v2 2/8] libsmartcols/src/libsmartcols.sym: add symbols Shakur Shams Mullick
2014-05-11  8:20 ` [PATCH v2 3/8] libsmartcols/src/smartcolsP.h: add new field to struct libscols_table Shakur Shams Mullick
2014-05-11  8:20 ` [PATCH 4/8] libsmartcols/src/cell.c: add two functions to compare number and string cells Shakur Shams Mullick
2014-05-12 12:37   ` Karel Zak
2014-05-11  8:20 ` [PATCH 5/8] libsmartcols/src/column.c: add function to set comparison function scols_column_set_sortcmp() sets the cell comparison function to use Shakur Shams Mullick
2014-05-11  8:20 ` [PATCH v2 6/8] libsmartcols/src/table.c: set and get key column to use for sorting scols_table_set_key_column() sets the column to use scols_table_get_key_column() returns the column being used Shakur Shams Mullick
2014-05-11  8:20 ` [PATCH v2 7/8] libsmartcols/src/table_print.c: sort the list before printing Shakur Shams Mullick
2014-05-12 12:43   ` Karel Zak
2014-05-12 17:22     ` shams
2014-05-11  8:20 ` [PATCH v2 8/8] misc-utils/lsblk.c: adds sorting support for lsblk Shakur Shams Mullick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.