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_print.c
static void print_empty_cell(struct libscols_table* tb,
                             struct libscols_column* cl,
                             struct libscols_line* ln, /* optional */
                             size_t bufsz)
{
    size_t len_pad = 0; /* in screen cells as opposed to bytes */

    /* generate tree ASCII-art rather than padding */
    if (ln && scols_column_is_tree(cl))
    {
        if (!ln->parent)
        {
            /* only print symbols->vert if followed by child */
            if (!list_empty(&ln->ln_branch))
            {
                fputs(vertical_symbol(tb), tb->out);
                len_pad = mbs_safe_width(vertical_symbol(tb));
            }
        }
        else
        {
            /* use the same draw function as though we were intending to draw an
             * L-shape */
            struct libscols_buffer* art = new_buffer(bufsz);
            char* data;

            if (art)
            {
                /* whatever the rc, len_pad will be sensible */
                line_ascii_art_to_buffer(tb, ln, art);
                if (!list_empty(&ln->ln_branch) && has_pending_data(tb))
                    buffer_append_data(art, vertical_symbol(tb));
                data = buffer_get_safe_data(tb, art, &len_pad, NULL);
                if (data && len_pad)
                    fputs(data, tb->out);
                free_buffer(art);
            }
        }
    }

    if (is_last_column(cl))
        return;

    /* fill rest of cell with space */
    for (; len_pad < cl->width; ++len_pad)
        fputs(cellpadding_symbol(tb), tb->out);

    fputs(colsep(tb), tb->out);
}
/* print padding or ASCII-art instead of data of @cl */
print padding or ASCII-art instead of data of @cl
print padding or ASCII - art instead of data of @cl
static void print_empty_cell(struct libscols_table* tb,
                             struct libscols_column* cl,
                             struct libscols_line* ln, 
                             size_t bufsz)
{
    size_t len_pad = 0; 
    if (ln && scols_column_is_tree(cl))
    {
        if (!ln->parent)
        {
            if (!list_empty(&ln->ln_branch))
            {
                fputs(vertical_symbol(tb), tb->out);
                len_pad = mbs_safe_width(vertical_symbol(tb));
            }
        }
        else
        {
            struct libscols_buffer* art = new_buffer(bufsz);
            char* data;
            if (art)
            {
                line_ascii_art_to_buffer(tb, ln, art);
                if (!list_empty(&ln->ln_branch) && has_pending_data(tb))
                    buffer_append_data(art, vertical_symbol(tb));
                data = buffer_get_safe_data(tb, art, &len_pad, NULL);
                if (data && len_pad)
                    fputs(data, tb->out);
                free_buffer(art);
            }
        }
    }
    if (is_last_column(cl))
        return;
    for (; len_pad < cl->width; ++len_pad)
        fputs(cellpadding_symbol(tb), tb->out);
    fputs(colsep(tb), tb->out);
}
static void print_empty_cell ( struct libscols_table * tb , struct libscols_column * cl , struct libscols_line * ln , size_t bufsz ) { size_t len_pad = 0 ; if ( ln && scols_column_is_tree ( cl ) ) { if ( ! ln -> parent ) { if ( ! list_empty ( & ln -> ln_branch ) ) { fputs ( vertical_symbol ( tb ) , tb -> out ) ; len_pad = mbs_safe_width ( vertical_symbol ( tb ) ) ; } } else { struct libscols_buffer * art = new_buffer ( bufsz ) ; char * data ; if ( art ) { line_ascii_art_to_buffer ( tb , ln , art ) ; if ( ! list_empty ( & ln -> ln_branch ) && has_pending_data ( tb ) ) buffer_append_data ( art , vertical_symbol ( tb ) ) ; data = buffer_get_safe_data ( tb , art , & len_pad , NULL ) ; if ( data && len_pad ) fputs ( data , tb -> out ) ; free_buffer ( art ) ; } } } if ( is_last_column ( cl ) ) return ; for ( ; len_pad < cl -> width ; ++ len_pad ) fputs ( cellpadding_symbol ( tb ) , tb -> out ) ; fputs ( colsep ( tb ) , tb -> out ) ; }
print padding or ASCII-art instead of data of @cl
print padding or ASCII - art instead of data of @cl
/* optional */ /* in screen cells as opposed to bytes */ /* generate tree ASCII-art rather than padding */ /* only print symbols->vert if followed by child */ /* use the same draw function as though we were intending to draw an
             * L-shape */ /* whatever the rc, len_pad will be sensible */ /* fill rest of cell with space */