Skip to content

Commit

Permalink
[C] Fixed examples for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
seleznevae committed Sep 28, 2019
1 parent 77a4a1f commit 4e70d08
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions examples/5-beautiful_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

void colorfull_table_wchar(void)
{
#if defined(FT_HAVE_WCHAR)
#if defined(FT_HAVE_WCHAR) && !defined(FT_MICROSOFT_COMPILER)
setlocale(LC_CTYPE, "");

ft_table_t *table = ft_create_table();
Expand Down Expand Up @@ -58,12 +58,7 @@ void colorfull_table_wchar(void)
ft_set_tbl_prop(table, FT_TPROP_LEFT_MARGIN, 10);

const wchar_t *table_wstr = ft_to_wstring(table);
if (table_wstr) {
fwprintf(stderr, L"Table:\n%ls\n\n ", table_wstr);
} else {
fwprintf(stderr, L"Table conversion failed !!!\n ");
}

fwprintf(stderr, L"Table:\n%ls\n\n ", table_wstr);
ft_destroy_table(table);
#endif
}
Expand Down Expand Up @@ -118,12 +113,7 @@ void colorfull_table_utf8(void)
ft_set_tbl_prop(table, FT_TPROP_LEFT_MARGIN, 10);

const char *table_str = ft_to_u8string(table);
if (table_str) {
printf("Table:\n%s\n\n ", table_str);
} else {
printf("Table conversion failed !!!\n ");
}

printf("Table:\n%s\n\n ", table_str);
ft_destroy_table(table);
#endif
}
Expand Down

0 comments on commit 4e70d08

Please sign in to comment.