1
0
Fork 0

[A] Added math example

This commit is contained in:
seleznevae 2019-09-21 11:05:16 +03:00
parent f221f3f297
commit 3d23344450
6 changed files with 17 additions and 23 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.0)
project(libfort VERSION 0.2.2)
project(libfort VERSION 0.2.3)
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
"\\1.\\2" libfort_SOVERSION

View File

@ -1,3 +1,9 @@
## v0.2.3
### Internal
- Refactoring of examples.
## v0.2.2
### Bug fixes

View File

@ -9,6 +9,11 @@ add_executable(${PROJECT_NAME}_print_styles
target_link_libraries(${PROJECT_NAME}_print_styles
fort)
add_executable(${PROJECT_NAME}_math_table
math_table.c)
target_link_libraries(${PROJECT_NAME}_math_table
fort)
add_executable(${PROJECT_NAME}_ex_cpp
main.cpp)
target_link_libraries(${PROJECT_NAME}_ex_cpp
@ -17,6 +22,7 @@ target_link_libraries(${PROJECT_NAME}_ex_cpp
set(${PROJECT_NAME}_examples
${PROJECT_NAME}_ex
${PROJECT_NAME}_print_styles
${PROJECT_NAME}_math_table
${PROJECT_NAME}_ex_cpp
PARENT_SCOPE)

View File

@ -36,23 +36,6 @@ void base_example(void)
ft_destroy_table(table);
}
void math_example(void)
{
#ifdef FT_HAVE_UTF8
ft_table_t *table = ft_create_table();
ft_set_border_style(table, FT_DOUBLE2_STYLE);
ft_set_cell_prop(table, 0, FT_ANY_COLUMN, FT_CPROP_ROW_TYPE, FT_ROW_HEADER);
ft_u8write_ln(table, "N", "Figure", "Volume, cm³", "Accuracy");
ft_u8write_ln(table, "1", "", "3.145", "±0.3");
ft_u8write_ln(table, "2", "", "4.95", "±0.25");
printf("%s\n", (const char *)ft_to_u8string(table));
ft_destroy_table(table);
#endif /* FT_HAVE_UTF8 */
}
void complex_layout_example(void)
{
@ -284,7 +267,6 @@ int main(void)
different_cell_properties_example();
fill_table_with_data_example();
complex_layout_example();
math_example();
custom_border_style_example();
colorfull_table();

View File

@ -46,8 +46,8 @@ SOFTWARE.
#define LIBFORT_MAJOR_VERSION 0
#define LIBFORT_MINOR_VERSION 2
#define LIBFORT_REVISION 2
#define LIBFORT_VERSION_STR "0.2.2"
#define LIBFORT_REVISION 3
#define LIBFORT_VERSION_STR "0.2.3"
/*****************************************************************************

View File

@ -46,8 +46,8 @@ SOFTWARE.
#define LIBFORT_MAJOR_VERSION 0
#define LIBFORT_MINOR_VERSION 2
#define LIBFORT_REVISION 2
#define LIBFORT_VERSION_STR "0.2.2"
#define LIBFORT_REVISION 3
#define LIBFORT_VERSION_STR "0.2.3"
/*****************************************************************************