From: Shakur Shams Mullick <shakursmullick@gmail.com>
To: util-linux@vger.kernel.org
Cc: Shakur Shams Mullick <shakursmullick@gmail.com>
Subject: [PATCH v2 3/8] libsmartcols/src/smartcolsP.h: add new field to struct libscols_table
Date: Sun, 11 May 2014 14:20:33 +0600 [thread overview]
Message-ID: <1399796438-5495-3-git-send-email-shakursmullick@gmail.com> (raw)
In-Reply-To: <1399796438-5495-1-git-send-email-shakursmullick@gmail.com>
---
libsmartcols/src/smartcolsP.h | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/libsmartcols/src/smartcolsP.h b/libsmartcols/src/smartcolsP.h
index ebdc929..c686c2b 100644
--- a/libsmartcols/src/smartcolsP.h
+++ b/libsmartcols/src/smartcolsP.h
@@ -44,7 +44,7 @@ UL_DEBUG_DECLARE_MASK(libsmartcols);
struct libscols_iter {
struct list_head *p; /* current position */
struct list_head *head; /* start position */
- int direction; /* SCOLS_ITER_{FOR,BACK}WARD */
+ int direction; /* SCOLS_ITER_{FOR,BACK}WARD */
};
/*
@@ -82,6 +82,8 @@ struct libscols_column {
int flags;
int is_extreme;
char *color; /* default column color */
+
+ int (*compar)(struct libscols_cell *, struct libscols_cell *, void *); /* comparison function to use*/
struct libscols_cell header;
struct list_head cl_columns;
@@ -108,7 +110,7 @@ struct libscols_line {
};
enum {
- SCOLS_FMT_HUMAN = 0, /* default, human readable */
+ SCOLS_FMT_HUMAN = 0, /* default, human readable */
SCOLS_FMT_RAW, /* space separated */
SCOLS_FMT_EXPORT /* COLNAME="data" ... */
};
@@ -131,15 +133,16 @@ struct libscols_table {
struct list_head tb_columns;
struct list_head tb_lines;
struct libscols_symbols *symbols;
+ struct libscols_column *key_cl; /* key column */
int format; /* SCOLS_FMT_* */
-
+
/* flags */
unsigned int ascii :1, /* don't use unicode */
- colors_wanted :1, /* enable colors */
- is_term :1, /* isatty() */
- maxout :1, /* maximalize output */
- no_headings :1; /* don't print header */
+ colors_wanted :1, /* enable colors */
+ is_term :1, /* isatty() */
+ maxout :1, /* maximalize output */
+ no_headings :1; /* don't print header */
};
#define IS_ITER_FORWARD(_i) ((_i)->direction == SCOLS_ITER_FORWARD)
--
1.8.3.2
next prev parent reply other threads:[~2014-05-11 8:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Shakur Shams Mullick [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399796438-5495-3-git-send-email-shakursmullick@gmail.com \
--to=shakursmullick@gmail.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox