openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/util-linux/2.33.2-r0/util-linux-2.33.2/libsmartcols/src/table.c
int scols_table_set_symbols(struct libscols_table* tb,
                            struct libscols_symbols* sy)
{
    if (!tb)
        return -EINVAL;

    /* remove old */
    if (tb->symbols)
    {
        DBG(TAB, ul_debugobj(tb, "remove symbols reference"));
        scols_unref_symbols(tb->symbols);
        tb->symbols = NULL;
    }

    /* set new */
    if (sy)
    { /* ref user defined */
        DBG(TAB, ul_debugobj(tb, "set symbols"));
        tb->symbols = sy;
        scols_ref_symbols(sy);
    }
    return 0;
}
/**
 * scols_table_set_symbols:
 * @tb: table
 * @sy: symbols or NULL
 *
 * Add a reference to @sy from the table. The symbols are used by library to
 * draw tree output. If no symbols are used for the table then library creates
 * default temporary symbols to draw output by
 * scols_table_set_default_symbols().
 *
 * If @sy is NULL then remove reference from the currently used symbols.
 *
 * Returns: 0, a negative value in case of an error.
 */
@tb: table
@sy: symbols or NULL

Add a reference to @sy from the table. The symbols are used by library to
draw tree output. If no symbols are used for the table then library creates
default temporary symbols to draw output by
scols_table_set_default_symbols().

If @sy is NULL then remove reference from the currently used symbols.

0, a negative value in case of an error.
@tb : table @sy : symbols or NULL Add a reference to @sy from the table . The symbols are used by library to draw tree output . If no symbols are used for the table then library creates default temporary symbols to draw output by scols_table_set_default_symbols () . If @sy is NULL then remove reference from the currently used symbols . 0 a negative value in case of an error .
int scols_table_set_symbols(struct libscols_table* tb,
                            struct libscols_symbols* sy)
{
    if (!tb)
        return -EINVAL;
    if (tb->symbols)
    {
        DBG(TAB, ul_debugobj(tb, "remove symbols reference"));
        scols_unref_symbols(tb->symbols);
        tb->symbols = NULL;
    }
    if (sy)
    { 
        DBG(TAB, ul_debugobj(tb, "set symbols"));
        tb->symbols = sy;
        scols_ref_symbols(sy);
    }
    return 0;
}
int scols_table_set_symbols ( struct libscols_table * tb , struct libscols_symbols * sy ) { if ( ! tb ) return - EINVAL ; if ( tb -> symbols ) { DBG ( TAB , ul_debugobj ( tb , " " ) ) ; scols_unref_symbols ( tb -> symbols ) ; tb -> symbols = NULL ; } if ( sy ) { DBG ( TAB , ul_debugobj ( tb , " " ) ) ; tb -> symbols = sy ; scols_ref_symbols ( sy ) ; } return 0 ; }
scols_table_set_symbols:
 @tb: table
 @sy: symbols or NULL
scols_table_set_symbols : @tb : table @sy : symbols or NULL
/* remove old */ /* set new */ /* ref user defined */