Table print

Table print — output functions

Functions

Description

Table output API.

Functions

scols_print_table ()

int
scols_print_table (struct libscols_table *tb);

Prints the table to the output stream.

Parameters

tb

table

 

Returns

0, a negative value in case of an error.


scols_print_table_to_string ()

int
scols_print_table_to_string (struct libscols_table *tb,
                             char **data);

Prints the table to data .

Parameters

tb

table

 

data

pointer to the beginning of a memory area to print to

 

Returns

0, a negative value in case of an error.


scols_table_print_range ()

int
scols_table_print_range (struct libscols_table *tb,
                         struct libscols_line *start,
                         struct libscols_line *end);

scols_table_print_range_to_string ()

int
scols_table_print_range_to_string (struct libscols_table *tb,
                                   struct libscols_line *start,
                                   struct libscols_line *end,
                                   char **data);

The same as scols_table_print_range(), but prints to data instead of stream.

Parameters

tb

table

 

start

first printed line or NULL to print from the beggin of the table

 

end

last printed line or NULL to print all from start.

 

data

pointer to the beginning of a memory area to print to

 

Returns

0, a negative value in case of an error.

Types and Values