From 449a1bb36c771f409bc69f1dbba4c61766f3e8ce Mon Sep 17 00:00:00 2001 From: Pradana AUMARS Date: Sun, 11 Jul 2021 17:05:18 +0200 Subject: [PATCH] Partially add documentation and remove const when not needed --- include/easycsv.h | 67 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 15 deletions(-) diff --git a/include/easycsv.h b/include/easycsv.h index 5c95edd..0999975 100644 --- a/include/easycsv.h +++ b/include/easycsv.h @@ -118,7 +118,7 @@ easycsv_printcolumns(const easycsv*); int easycsv_sortrow(easycsv*, const char*, - const EASYCSV_SORT); + EASYCSV_SORT); /** * Sort column @@ -130,44 +130,81 @@ easycsv_sortrow(easycsv*, int easycsv_sortcolumn(easycsv*, const char*, - const EASYCSV_SORT); + EASYCSV_SORT); /*** Modifications, insert ***/ +/** + * Insert row into CSV file + * @param[in] pointer to easycsv structure + * @param[in] cell value + * @param[in] row number + * @return easycsv error code + */ int easycsv_insertrow(easycsv*, const char*, - const int); + int); -/* Insert string in a specific cell */ +/** + * Insert string in a specific cell + * @param[in] pointer to easycsv structure + * @param[in] cell value + * @param[in] row number + * @param[in] column number + * @return easycsv error code + */ int easycsv_insertvalue(easycsv*, const char*, - const unsigned int, - const unsigned int); + unsigned int, + unsigned int); -/* Insert string in a specific cell with specific mode */ +/** + * Insert string in a specific cell with specific mode + * @param[in] pointer to easycsv structure + * @param[in] cell value + * @param[in] row number + * @param[in] column number + * @param[in] easycsv value mode + * @return easycsv error code + */ int easycsv_insertvaluemode(easycsv*, const char*, - const unsigned int, - const unsigned int, - const EASYCSV_VALMODE); + unsigned int, + unsigned int, + EASYCSV_VALMODE); -/* Insert string in a specific cell with named column in row 1 */ +/** + * Insert string in a specific cell with named column in a given row + * @param[in] pointer to easycsv structure + * @param[in] cell value + * @param[in] row number + * @param[in] column value + * @return easycsv error code + */ int easycsv_insertcolumnvalue(easycsv*, const char*, - const unsigned int, + unsigned int, const char*); -/* Insert string in a specific cell with named column in row 1 with specific mode */ +/** + * Insert string in a specific cell with named column in a given row with specific mode + * @param[in] pointer to easycsv structure + * @param[in] cell value + * @param[in] row number + * @param[in] column value + * @param[in] easycsv value mode + * @return easycsv error code + */ int easycsv_insertcolumnvaluemode(easycsv*, const char*, - const unsigned int, + unsigned int, const char*, - const EASYCSV_VALMODE); + EASYCSV_VALMODE); /* Modifications, push */