</copyright>
</bookinfo>
- <part id="gtk">
+ <part id="overview">
<title>libsmartcols Overview</title>
<partintro>
<para>
<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>
/**
* 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
*
* 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;
}
/**
* 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);
}
/**
/**
* 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.
*
*
* 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);
}
/**
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);
/**
* 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);
}
/**
/**
* 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.
*
*
* 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);
}
/**