]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libsmartcols: fixes in doc generation
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>
Fri, 23 Sep 2016 14:05:02 +0000 (16:05 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 27 Sep 2016 09:19:03 +0000 (11:19 +0200)
* Add 2.29 symbols index
* Sync argument names between header and implementation

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
libsmartcols/docs/libsmartcols-docs.xml
libsmartcols/src/cell.c
libsmartcols/src/column.c
libsmartcols/src/libsmartcols.h.in
libsmartcols/src/line.c
libsmartcols/src/table.c

index d118bbb5a9bc698105c9509293a2bc170cec3360..34c47568423267a05f0084fe59213a7e55fe20df 100644 (file)
@@ -14,7 +14,7 @@
     </copyright>
   </bookinfo>
 
-  <part id="gtk">
+  <part id="overview">
     <title>libsmartcols Overview</title>
     <partintro>
     <para>
@@ -57,4 +57,8 @@ available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
     <title>Index of new symbols in 2.28</title>
     <xi:include href="xml/api-index-2.28.xml"><xi:fallback /></xi:include>
   </index>
+  <index role="2.29">
+    <title>Index of new symbols in 2.29</title>
+    <xi:include href="xml/api-index-2.29.xml"><xi:fallback /></xi:include>
+  </index>
 </book>
index b887940c9437caf55e6b7a1794b6b01fbe269992..4450c576b04b5b653d8eef2b58c9edcac2e98267 100644 (file)
@@ -54,21 +54,21 @@ int scols_reset_cell(struct libscols_cell *ce)
 /**
  * scols_cell_set_data:
  * @ce: a pointer to a struct libscols_cell instance
- * @str: data (used for scols_print_table())
+ * @data: data (used for scols_print_table())
  *
  * Stores a copy of the @str in @ce, the old data are deallocated by free().
  *
  * Returns: 0, a negative value in case of an error.
  */
-int scols_cell_set_data(struct libscols_cell *ce, const char *str)
+int scols_cell_set_data(struct libscols_cell *ce, const char *data)
 {
-       return strdup_to_struct_member(ce, data, str);
+       return strdup_to_struct_member(ce, data, data);
 }
 
 /**
  * scols_cell_refer_data:
  * @ce: a pointer to a struct libscols_cell instance
- * @str: data (used for scols_print_table())
+ * @data: data (used for scols_print_table())
  *
  * Adds a reference to @str to @ce. The pointer is deallocated by
  * scols_reset_cell() or scols_unref_line(). This function is mostly designed
@@ -77,12 +77,12 @@ int scols_cell_set_data(struct libscols_cell *ce, const char *str)
  *
  * Returns: 0, a negative value in case of an error.
  */
-int scols_cell_refer_data(struct libscols_cell *ce, char *str)
+int scols_cell_refer_data(struct libscols_cell *ce, char *data)
 {
        if (!ce)
                return -EINVAL;
        free(ce->data);
-       ce->data = str;
+       ce->data = data;
        return 0;
 }
 
@@ -158,20 +158,20 @@ int scols_cmpstr_cells(struct libscols_cell *a,
 /**
  * scols_cell_set_color:
  * @ce: a pointer to a struct libscols_cell instance
- * @co: color name or ESC sequence
+ * @color: color name or ESC sequence
  *
- * Set the color of @ce to @co.
+ * Set the color of @ce to @color.
  *
  * Returns: 0, a negative value in case of an error.
  */
-int scols_cell_set_color(struct libscols_cell *ce, const char *co)
+int scols_cell_set_color(struct libscols_cell *ce, const char *color)
 {
-       if (co && isalpha(*co)) {
-               co = color_sequence_from_colorname(co);
-               if (!co)
+       if (color && isalpha(*color)) {
+               color = color_sequence_from_colorname(color);
+               if (!color)
                        return -EINVAL;
        }
-       return strdup_to_struct_member(ce, color, co);
+       return strdup_to_struct_member(ce, color, color);
 }
 
 /**
index 1e84a6363e70db4bcdc5087ba31c38a38a894cba..2b6c691c7f39e76d860c1df4058551e64c3413aa 100644 (file)
@@ -207,7 +207,7 @@ struct libscols_cell *scols_column_get_header(struct libscols_column *cl)
 /**
  * scols_column_set_color:
  * @cl: a pointer to a struct libscols_column instance
- * @co: color name or ESC sequence
+ * @color: color name or ESC sequence
  *
  * The default color for data cells and column header.
  *
@@ -219,14 +219,14 @@ struct libscols_cell *scols_column_get_header(struct libscols_column *cl)
  *
  * Returns: 0, a negative value in case of an error.
  */
-int scols_column_set_color(struct libscols_column *cl, const char *co)
+int scols_column_set_color(struct libscols_column *cl, const char *color)
 {
-       if (co && isalpha(*co)) {
-               co = color_sequence_from_colorname(co);
-               if (!co)
+       if (color && isalpha(*color)) {
+               color = color_sequence_from_colorname(color);
+               if (!color)
                        return -EINVAL;
        }
-       return strdup_to_struct_member(cl, color, co);
+       return strdup_to_struct_member(cl, color, color);
 }
 
 /**
index d6ae91f608592e567d746e6219d28e61691ea681..de45892f223c58c21e870e880da4fe7c27079e0c 100644 (file)
@@ -123,8 +123,8 @@ extern int scols_symbols_set_cell_padding(struct libscols_symbols *sy, const cha
 extern int scols_reset_cell(struct libscols_cell *ce);
 extern int scols_cell_copy_content(struct libscols_cell *dest,
                                   const struct libscols_cell *src);
-extern int scols_cell_set_data(struct libscols_cell *ce, const char *str);
-extern int scols_cell_refer_data(struct libscols_cell *ce, char *str);
+extern int scols_cell_set_data(struct libscols_cell *ce, const char *data);
+extern int scols_cell_refer_data(struct libscols_cell *ce, char *data);
 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);
index 59ea0d1e0c41d52fea788a15e9f982f555d38e8f..4548820940050857aa2d210c4350a152945b9ee7 100644 (file)
@@ -283,18 +283,18 @@ int scols_line_next_child(struct libscols_line *ln,
 /**
  * scols_line_set_color:
  * @ln: a pointer to a struct libscols_line instance
- * @co: color name or ESC sequence
+ * @color: color name or ESC sequence
  *
  * Returns: 0, a negative value in case of an error.
  */
-int scols_line_set_color(struct libscols_line *ln, const char *co)
+int scols_line_set_color(struct libscols_line *ln, const char *color)
 {
-       if (co && isalnum(*co)) {
-               co = color_sequence_from_colorname(co);
-               if (!co)
+       if (color && isalnum(*color)) {
+               color = color_sequence_from_colorname(color);
+               if (!color)
                        return -EINVAL;
        }
-       return strdup_to_struct_member(ln, color, co);
+       return strdup_to_struct_member(ln, color, color);
 }
 
 /**
index 759b54c27b37b27d2f9a5bb441eff30ebcdee521..93f0b669c6491a5da857ee25ca0672ca2edba43c 100644 (file)
@@ -116,7 +116,7 @@ void scols_unref_table(struct libscols_table *tb)
 /**
  * scols_table_set_name:
  * @tb: a pointer to a struct libscols_table instance
- * @str: a name
+ * @name: a name
  *
  * The table name is used for example for JSON top level object name.
  *
@@ -124,9 +124,9 @@ void scols_unref_table(struct libscols_table *tb)
  *
  * Since: 2.27
  */
-int scols_table_set_name(struct libscols_table *tb, const char *str)
+int scols_table_set_name(struct libscols_table *tb, const char *name)
 {
-       return strdup_to_struct_member(tb, name, str);
+       return strdup_to_struct_member(tb, name, name);
 }
 
 /**