]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libsmartcols: be consistent, use 'sy' for symbols
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>
Sat, 17 Sep 2016 16:55:52 +0000 (18:55 +0200)
committerIgor Gnatenko <i.gnatenko.brain@gmail.com>
Mon, 19 Sep 2016 12:13:51 +0000 (14:13 +0200)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
libsmartcols/src/libsmartcols.h.in
libsmartcols/src/symbols.c

index c5ff1738475fcb80664f868af840ed034afe4206..55eef4ef6081688282e55fd8a79d96aa4ac7fd27 100644 (file)
@@ -113,12 +113,12 @@ extern int scols_get_library_version(const char **ver_string);
 extern struct libscols_symbols *scols_new_symbols(void);
 extern void scols_ref_symbols(struct libscols_symbols *sy);
 extern void scols_unref_symbols(struct libscols_symbols *sy);
-extern struct libscols_symbols *scols_copy_symbols(const struct libscols_symbols *sb);
-extern int scols_symbols_set_branch(struct libscols_symbols *sb, const char *str);
-extern int scols_symbols_set_vertical(struct libscols_symbols *sb, const char *str);
-extern int scols_symbols_set_right(struct libscols_symbols *sb, const char *str);
-extern int scols_symbols_set_title_padding(struct libscols_symbols *sb, const char *str);
-extern int scols_symbols_set_cell_padding(struct libscols_symbols *sb, const char *str);
+extern struct libscols_symbols *scols_copy_symbols(const struct libscols_symbols *sy);
+extern int scols_symbols_set_branch(struct libscols_symbols *sy, const char *str);
+extern int scols_symbols_set_vertical(struct libscols_symbols *sy, const char *str);
+extern int scols_symbols_set_right(struct libscols_symbols *sy, const char *str);
+extern int scols_symbols_set_title_padding(struct libscols_symbols *sy, const char *str);
+extern int scols_symbols_set_cell_padding(struct libscols_symbols *sy, const char *str);
 
 /* cell.c */
 extern int scols_reset_cell(struct libscols_cell *ce);
index aceb998dfecb14feeeb26fb67400eaaec56e79de..e1426a7e005669f789ac8f3e92735207e8b9df0f 100644 (file)
@@ -70,43 +70,43 @@ void scols_unref_symbols(struct libscols_symbols *sy)
 
 /**
  * scols_symbols_set_branch:
- * @sb: a pointer to a struct libscols_symbols instance
+ * @sy: a pointer to a struct libscols_symbols instance
  * @str: a string which will represent the branch part of a tree output
  *
  * Returns: 0, a negative value in case of an error.
  */
-int scols_symbols_set_branch(struct libscols_symbols *sb, const char *str)
+int scols_symbols_set_branch(struct libscols_symbols *sy, const char *str)
 {
-       return strdup_to_struct_member(sb, branch, str);
+       return strdup_to_struct_member(sy, branch, str);
 }
 
 /**
  * scols_symbols_set_vertical:
- * @sb: a pointer to a struct libscols_symbols instance
+ * @sy: a pointer to a struct libscols_symbols instance
  * @str: a string which will represent the vertical part of a tree output
  *
  * Returns: 0, a negative value in case of an error.
  */
-int scols_symbols_set_vertical(struct libscols_symbols *sb, const char *str)
+int scols_symbols_set_vertical(struct libscols_symbols *sy, const char *str)
 {
-       return strdup_to_struct_member(sb, vert, str);
+       return strdup_to_struct_member(sy, vert, str);
 }
 
 /**
  * scols_symbols_set_right:
- * @sb: a pointer to a struct libscols_symbols instance
+ * @sy: a pointer to a struct libscols_symbols instance
  * @str: a string which will represent the right part of a tree output
  *
  * Returns: 0, a negative value in case of an error.
  */
-int scols_symbols_set_right(struct libscols_symbols *sb, const char *str)
+int scols_symbols_set_right(struct libscols_symbols *sy, const char *str)
 {
-       return strdup_to_struct_member(sb, right, str);
+       return strdup_to_struct_member(sy, right, str);
 }
 
 /**
  * scols_symbols_set_title_padding:
- * @sb: a pointer to a struct libscols_symbols instance
+ * @sy: a pointer to a struct libscols_symbols instance
  * @str: a string which will represent the symbols which fill title output
  *
  * The current implementation uses only the first byte from the padding string.
@@ -116,14 +116,14 @@ int scols_symbols_set_right(struct libscols_symbols *sb, const char *str)
  *
  * Since: 2.28
  */
-int scols_symbols_set_title_padding(struct libscols_symbols *sb, const char *str)
+int scols_symbols_set_title_padding(struct libscols_symbols *sy, const char *str)
 {
-       return strdup_to_struct_member(sb, title_padding, str);
+       return strdup_to_struct_member(sy, title_padding, str);
 }
 
 /**
  * scols_symbols_set_cell_padding:
- * @sb: a pointer to a struct libscols_symbols instance
+ * @sy: a pointer to a struct libscols_symbols instance
  * @str: a string which will represent the symbols which fill cells
  *
  * The padding char has to take up just one cell on the terminal.
@@ -132,39 +132,39 @@ int scols_symbols_set_title_padding(struct libscols_symbols *sb, const char *str
  *
  * Since: 2.29
  */
-int scols_symbols_set_cell_padding(struct libscols_symbols *sb, const char *str)
+int scols_symbols_set_cell_padding(struct libscols_symbols *sy, const char *str)
 {
-       return strdup_to_struct_member(sb, cell_padding, str);
+       return strdup_to_struct_member(sy, cell_padding, str);
 }
 
 /**
  * scols_copy_symbols:
- * @sb: a pointer to a struct libscols_symbols instance
+ * @sy: a pointer to a struct libscols_symbols instance
  *
- * Returns: a newly allocated copy of the @sb symbol group or NULL in case of an error.
+ * Returns: a newly allocated copy of the @sy symbol group or NULL in case of an error.
  */
-struct libscols_symbols *scols_copy_symbols(const struct libscols_symbols *sb)
+struct libscols_symbols *scols_copy_symbols(const struct libscols_symbols *sy)
 {
        struct libscols_symbols *ret;
        int rc;
 
-       assert(sb);
-       if (!sb)
+       assert(sy);
+       if (!sy)
                return NULL;
 
        ret = scols_new_symbols();
        if (!ret)
                return NULL;
 
-       rc = scols_symbols_set_branch(ret, sb->branch);
+       rc = scols_symbols_set_branch(ret, sy->branch);
        if (!rc)
-               rc = scols_symbols_set_vertical(ret, sb->vert);
+               rc = scols_symbols_set_vertical(ret, sy->vert);
        if (!rc)
-               rc = scols_symbols_set_right(ret, sb->right);
+               rc = scols_symbols_set_right(ret, sy->right);
        if (!rc)
-               rc = scols_symbols_set_title_padding(ret, sb->title_padding);
+               rc = scols_symbols_set_title_padding(ret, sy->title_padding);
        if (!rc)
-               rc = scols_symbols_set_cell_padding(ret, sb->cell_padding);
+               rc = scols_symbols_set_cell_padding(ret, sy->cell_padding);
        if (!rc)
                return ret;