From 78acb23c47490b0a918e219095251a8d89cb21df Mon Sep 17 00:00:00 2001 From: seleznevae Date: Tue, 8 May 2018 21:12:20 +0300 Subject: [PATCH] [F] Fixed the example --- README.md | 6 ++++-- example/main.c | 3 ++- lib/fort.c | 3 ++- src/row.c | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d6d7abf..f18691e 100644 --- a/README.md +++ b/README.md @@ -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: +---+---------+-------------+ ``` - + ## Installation diff --git a/example/main.c b/example/main.c index e627eb0..16811ba 100644 --- a/example/main.c +++ b/example/main.c @@ -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"); diff --git a/lib/fort.c b/lib/fort.c index 4db611e..2bdf446 100644 --- a/lib/fort.c +++ b/lib/fort.c @@ -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) { diff --git a/src/row.c b/src/row.c index cd4b6e2..4618ee8 100644 --- a/src/row.c +++ b/src/row.c @@ -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) {