[F] Fixed the example

This commit is contained in:
seleznevae 2018-05-08 21:12:20 +03:00
parent a8868e7bd9
commit 78acb23c47
4 changed files with 10 additions and 5 deletions

View File

@ -19,9 +19,11 @@
```C
#include "fort.h"
#include "stdio.h"
int main(void)
{
ft_table_t *table = ft_create_table();;
ft_table_t *table = ft_create_table();
/* Set "header" type for the first row */
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
ft_write_ln(table, "N", "Planet", "Speed, km/s");
@ -44,7 +46,7 @@ Output:
+---+---------+-------------+
```
<img src="https://github.com/seleznevae/libfort/blob/master/docs/images/basic_table.png" data-canonical-src="https://github.com/seleznevae/libfort/blob/master/docs/images/basic_table.png" width="500" />
## Installation

View File

@ -35,7 +35,8 @@ void print_char_str(const char *str)
void base_example(void)
{
ft_table_t *table = ft_create_table();;
ft_table_t *table = ft_create_table();
/* Set "header" type for the first row */
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
ft_write_ln(table, "N", "Planet", "Speed, km/s");

View File

@ -3896,6 +3896,7 @@ clear:
}
#ifdef FT_HAVE_WCHAR
int wprint_row_separator(wchar_t *buffer, size_t buffer_sz,
const size_t *col_width_arr, size_t cols,
@ -4067,7 +4068,7 @@ clear:
return status;
}
#endif
fort_row_t *create_row_from_string(const char *str)
{

View File

@ -363,6 +363,7 @@ clear:
}
#ifdef FT_HAVE_WCHAR
int wprint_row_separator(wchar_t *buffer, size_t buffer_sz,
const size_t *col_width_arr, size_t cols,
@ -534,7 +535,7 @@ clear:
return status;
}
#endif
fort_row_t *create_row_from_string(const char *str)
{