[U] Update ChangeLog and docs
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
cmake_minimum_required(VERSION 3.0)
 | 
					cmake_minimum_required(VERSION 3.0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
project(libfort VERSION 0.4.2)
 | 
					project(libfort VERSION 0.5.0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
 | 
					string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
 | 
				
			||||||
    "\\1.\\2" libfort_SOVERSION
 | 
					    "\\1.\\2" libfort_SOVERSION
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,9 @@
 | 
				
			|||||||
 | 
					## v0.5.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Add function `ft_col_count()` to get number of columns in the table.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## v0.4.2
 | 
					## v0.4.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Internal
 | 
					### Internal
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,6 +44,7 @@ These pages contain the API documentation of **libfort** - simple library to cre
 | 
				
			|||||||
        - @link ft_set_default_printf_field_separator ft_set_default_printf_field_separator @endlink -- Set field separator for ft_printf, ft_printf_ln
 | 
					        - @link ft_set_default_printf_field_separator ft_set_default_printf_field_separator @endlink -- Set field separator for ft_printf, ft_printf_ln
 | 
				
			||||||
        - @link ft_is_empty ft_is_empty @endlink -- check if table is empty
 | 
					        - @link ft_is_empty ft_is_empty @endlink -- check if table is empty
 | 
				
			||||||
        - @link ft_row_count ft_row_count @endlink -- get number of rows in the table
 | 
					        - @link ft_row_count ft_row_count @endlink -- get number of rows in the table
 | 
				
			||||||
 | 
					        - @link ft_col_count ft_col_count @endlink -- get number of columns in the table
 | 
				
			||||||
        - @link ft_strerror ft_strerror @endlink -- get string describing the error code
 | 
					        - @link ft_strerror ft_strerror @endlink -- get string describing the error code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - Data structures and types
 | 
					  - Data structures and types
 | 
				
			||||||
@@ -82,6 +83,7 @@ These pages contain the API documentation of **libfort** - simple library to cre
 | 
				
			|||||||
        - @link fort::table::column column @endlink -- get column
 | 
					        - @link fort::table::column column @endlink -- get column
 | 
				
			||||||
        - @link fort::table::is_empty is_empty @endlink -- check if table is empty
 | 
					        - @link fort::table::is_empty is_empty @endlink -- check if table is empty
 | 
				
			||||||
        - @link fort::table::row_count row_count @endlink -- get number of rows in the table
 | 
					        - @link fort::table::row_count row_count @endlink -- get number of rows in the table
 | 
				
			||||||
 | 
					        - @link fort::table::col_count col_count @endlink -- get number of columns in the table
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - @link fort::property_owner fort::property_owner @endlink -- base class for all objects (table, row, column, cell) for which user can specify properties
 | 
					  - @link fort::property_owner fort::property_owner @endlink -- base class for all objects (table, row, column, cell) for which user can specify properties
 | 
				
			||||||
    - Modify appearance
 | 
					    - Modify appearance
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								lib/fort.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								lib/fort.c
									
									
									
									
									
								
							@@ -2829,6 +2829,19 @@ size_t ft_row_count(const ft_table_t *table)
 | 
				
			|||||||
    return vector_size(table->rows);
 | 
					    return vector_size(table->rows);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					size_t ft_col_count(const ft_table_t *table)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    assert(table && table->rows);
 | 
				
			||||||
 | 
					    size_t cols_n = 0;
 | 
				
			||||||
 | 
					    size_t rows_n = vector_size(table->rows);
 | 
				
			||||||
 | 
					    for (size_t i = 0; i < rows_n; ++i) {
 | 
				
			||||||
 | 
					        f_row_t *row = VECTOR_AT(table->rows, i, f_row_t *);
 | 
				
			||||||
 | 
					        size_t ncols = columns_in_row(row);
 | 
				
			||||||
 | 
					        cols_n = MAX(cols_n, ncols);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    return cols_n;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ft_erase_range(ft_table_t *table,
 | 
					int ft_erase_range(ft_table_t *table,
 | 
				
			||||||
                   size_t top_left_row, size_t top_left_col,
 | 
					                   size_t top_left_row, size_t top_left_col,
 | 
				
			||||||
                   size_t bottom_right_row, size_t bottom_right_col)
 | 
					                   size_t bottom_right_row, size_t bottom_right_col)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										16
									
								
								lib/fort.h
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								lib/fort.h
									
									
									
									
									
								
							@@ -45,9 +45,9 @@ SOFTWARE.
 | 
				
			|||||||
 *****************************************************************************/
 | 
					 *****************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define LIBFORT_MAJOR_VERSION 0
 | 
					#define LIBFORT_MAJOR_VERSION 0
 | 
				
			||||||
#define LIBFORT_MINOR_VERSION 4
 | 
					#define LIBFORT_MINOR_VERSION 5
 | 
				
			||||||
#define LIBFORT_REVISION 2
 | 
					#define LIBFORT_REVISION 0
 | 
				
			||||||
#define LIBFORT_VERSION_STR "0.4.2"
 | 
					#define LIBFORT_VERSION_STR "0.5.0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*****************************************************************************
 | 
					/*****************************************************************************
 | 
				
			||||||
@@ -370,6 +370,16 @@ int ft_is_empty(const ft_table_t *table);
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
size_t ft_row_count(const ft_table_t *table);
 | 
					size_t ft_row_count(const ft_table_t *table);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Get number of columns in the table.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param table
 | 
				
			||||||
 | 
					 *   Pointer to formatted table.
 | 
				
			||||||
 | 
					 * @return
 | 
				
			||||||
 | 
					 *   Number of columns in the table.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					size_t ft_col_count(const ft_table_t *table);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 *  Erase range of cells.
 | 
					 *  Erase range of cells.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								lib/fort.hpp
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								lib/fort.hpp
									
									
									
									
									
								
							@@ -1172,6 +1172,18 @@ public:
 | 
				
			|||||||
        return ft_row_count(table_);
 | 
					        return ft_row_count(table_);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get number of columns in the table.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     *   Number of columns in the table.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    std::size_t
 | 
				
			||||||
 | 
					    col_count() const noexcept
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return ft_col_count(table_);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Get current cell.
 | 
					     * Get current cell.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -45,9 +45,9 @@ SOFTWARE.
 | 
				
			|||||||
 *****************************************************************************/
 | 
					 *****************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define LIBFORT_MAJOR_VERSION 0
 | 
					#define LIBFORT_MAJOR_VERSION 0
 | 
				
			||||||
#define LIBFORT_MINOR_VERSION 4
 | 
					#define LIBFORT_MINOR_VERSION 5
 | 
				
			||||||
#define LIBFORT_REVISION 2
 | 
					#define LIBFORT_REVISION 0
 | 
				
			||||||
#define LIBFORT_VERSION_STR "0.4.2"
 | 
					#define LIBFORT_VERSION_STR "0.5.0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*****************************************************************************
 | 
					/*****************************************************************************
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user