libsmartcols: fixes in doc generation
* Add 2.29 symbols index * Sync argument names between header and implementation Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
parent
949ea05f1a
commit
618a1d6dbe
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue