]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libsmartcols: add scols_table_is_nowrap()
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>
Fri, 23 Sep 2016 12:20:41 +0000 (14:20 +0200)
committerIgor Gnatenko <i.gnatenko.brain@gmail.com>
Fri, 23 Sep 2016 12:20:41 +0000 (14:20 +0200)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
libsmartcols/src/libsmartcols.h.in
libsmartcols/src/libsmartcols.sym
libsmartcols/src/table.c

index b36bcb105ad64ed5a4c5de6451cb82f715d9cd2c..6df8788047fd9ba024e5dd152f5a52782f316d94 100644 (file)
@@ -204,6 +204,7 @@ extern int scols_table_is_noheadings(const struct libscols_table *tb);
 extern int scols_table_is_empty(const struct libscols_table *tb);
 extern int scols_table_is_export(const struct libscols_table *tb);
 extern int scols_table_is_maxout(const struct libscols_table *tb);
+extern int scols_table_is_nowrap(const struct libscols_table *tb);
 extern int scols_table_is_tree(const struct libscols_table *tb);
 
 extern int scols_table_enable_colors(struct libscols_table *tb, int enable);
index e7b8f14f38479af51e86129029868578a01dd468..75ae718a03c4821484268f41c63669197bd62118 100644 (file)
@@ -146,4 +146,5 @@ global:
        scols_table_set_termforce;
        scols_table_set_termwidth;
        scols_table_get_name;
+       scols_table_is_nowrap;
 } SMARTCOLS_2.28;
index 76b6f0b9db647885225c62147c1d3dc4b012a6d1..09673051650a428394e37d9a1b53b38efce8f9ac 100644 (file)
@@ -921,6 +921,19 @@ int scols_table_enable_nowrap(struct libscols_table *tb, int enable)
        return 0;
 }
 
+/**
+ * scols_table_is_nowrap:
+ * @tb: a pointer to a struct libscols_table instance
+ *
+ * Returns: 1 if nowrap is enabled.
+ *
+ * Since: 2.29
+ */
+int scols_table_is_nowrap(const struct libscols_table *tb)
+{
+       return tb->no_wrap;
+}
+
 /**
  * scols_table_colors_wanted:
  * @tb: table
@@ -936,7 +949,7 @@ int scols_table_colors_wanted(const struct libscols_table *tb)
  * scols_table_is_empty:
  * @tb: table
  *
- * Returns: 1  if the table is empty.
+ * Returns: 1 if the table is empty.
  */
 int scols_table_is_empty(const struct libscols_table *tb)
 {