Commit Graph

62 Commits

Author SHA1 Message Date
9ac6ee03e4 Add easycsv_string testing
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 18:23:30 +02:00
9cdf20e7a7 Create libeasycsv_string library
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 18:22:42 +02:00
924e47bacc Move purely string-manipulation function to a separate file
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 17:49:57 +02:00
b0e3062d59 Add easycsv_get_row and easycsv_set_charp_to_value
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 16:46:19 +02:00
959ffce49f easycsv_insert_value documentation fixed
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 15:37:27 +02:00
27fdceb684 Add write mode tests
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 15:24:08 +02:00
d6f0b0260e Fixed easycsv_init for write mode
* easycsv fp member is now char buffer array
* csv_exist now has correct bool value
* easycsv_init now returns NULL if malloc fails or csv file is empty in read mode
* easycsv_free now properly destroys csv

Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 15:11:57 +02:00
4b3c7bbb97 Add EASYCSV_MEMALLOC error flag
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 15:10:31 +02:00
99995d7b0f Add more tests
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 14:14:22 +02:00
638af0080d In easycsv_print_columns/rows, update docs
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 13:51:39 +02:00
006cd346e9 In easycsv_print_columns/rows, check NULL pointer
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 13:50:54 +02:00
679160e208 Fix easycsv_find_num_value
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 13:43:25 +02:00
042667e538 Add more tests for easycsv_read_value
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 13:36:24 +02:00
0793a5a1c6 In easycsv_read_value, check if row and col are valid
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-17 13:36:09 +02:00
46ed839860 Add testing for easycsv_find_num_value
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 23:00:05 +02:00
7ce936b8d1 Add easycsv_find_num_value (errorenous), fixed easycsv_read_value
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 22:59:42 +02:00
cba239de98 Remove unnessary rewind
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 21:49:47 +02:00
c19760c62f Fixed easycsv_find_num_value documentation
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 21:34:25 +02:00
1a0e8e5bcb Add easycsv_find_value
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 21:31:51 +02:00
4647b72551 Add error message for easycsv_find_value fail
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 21:31:31 +02:00
61618b72bc Fix easycsv_find_value documentation
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 21:30:53 +02:00
3178e0eccf Corrected cell names
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 20:59:28 +02:00
39059b3e49 Remove unneeded variables and initialisations in easycsv_read_value
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 20:57:46 +02:00
3304163ab0 Fix easycsv_read_value with more tests
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 20:57:03 +02:00
2fa4ca384c Fix easycsv_read_value
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 20:25:30 +02:00
bb1e4aef4f Specify that easycsv_read_value returns heap-allocated string pointer
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 20:24:23 +02:00
769322ec6b Modify 1.csv to be more logical
Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 20:23:33 +02:00
d4b53ede9b All private members are now public members.
* Construction, destruction, print row, print columns all work in READ mode

Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
2021-07-16 18:46:36 +02:00
1156c9debf Complete documentation of public header 2021-07-11 17:31:01 +02:00
5f50b57b36 Reorganise easycsv_access_suite 2021-07-11 17:16:10 +02:00
449a1bb36c Partially add documentation and remove const when not needed 2021-07-11 17:05:18 +02:00
fd78125832 Removed _easycsv declaration in public header 2021-07-11 16:50:23 +02:00
fc57b7639b Separated private and public methods 2021-07-11 16:44:11 +02:00
83662a410e Move easycsv.h to include/ directory 2021-07-11 12:03:27 +02:00
47095a868e Move print test suite to read test suite 2021-06-29 23:42:33 +02:00
9d1dcc5714 Shuffle tests suite func definitions 2021-06-29 23:39:38 +02:00
0354afb2b7 Fix _priv->fp malloc & strcpy 2021-06-29 23:37:41 +02:00
a8480a2fcf Comment bugged _priv->fp malloc and fix malloc of easycsv *csv in easycsv_init 2021-06-29 23:33:34 +02:00
b2f9953f31 Set all members to NULL or 0 manually and implement fopen under EASYCSV_W 2021-06-29 22:56:55 +02:00
4c65f21664 Skip constructor write mode 2021-06-29 22:19:30 +02:00
5a2b67b933 Improve constructor test suite 2021-06-29 21:41:22 +02:00
d4e8cc96b2 Replace configure script with bootstrap 2021-06-29 20:39:40 +02:00
6199dc4a12 Fix malloc size 2021-06-28 12:11:14 +02:00
f97f364681 Update requirements for pkg-config and make check mandatory 2021-06-27 22:06:21 +02:00
45a80ef9b5 Use pkg-config instead of automake m4 macros for check 2021-06-27 22:04:43 +02:00
0cc45de949 Update LICENSE 2021-06-27 21:52:06 +02:00
dd1bcaa4dd Specified shared nature of library 2021-06-27 21:50:24 +02:00
6bb86dbb16 Add testing suites 2021-06-27 21:50:05 +02:00
0117c62230 Fix typo '_easycsv_checkcsvandstring_two' 2021-06-27 21:19:44 +02:00
4b8ad08ce6 Implementation of automake 2021-06-27 18:56:38 +02:00