aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* CMakeLists.txt: Fix missing parameter namesHEADmasterXavier Del Campo Romero2023-11-101-1/+1
| | | | | | VERSION must be indicated when passing a version string to project(). Also, LANGUAGES must be also be passed when the language name is not the only argument to project() (apart from the project name itself).
* Makefile: Set -O1v0.1.0-rc4v0.1.0Xavier Del Campo Romero2023-10-251-1/+1
|
* Makefile: Adhere to GNU Make directory variablesXavier Del Campo Romero2023-10-251-15/+17
|
* Makefile: Build dynstr also as a shared libraryXavier Del Campo Romero2023-10-252-7/+23
|
* Makefile: Update copyright yearXavier Del Campo Romero2023-10-251-1/+1
|
* CMakeLists.txt: set project VERSIONv0.1.0-rc3Xavier Del Campo Romero2023-10-251-1/+1
|
* CMakeLists.txt: Stop forcing STATIC libraryv0.1.0-rc2Xavier Del Campo Romero2023-10-161-1/+1
| | | | Distribution packagers might prefer dynstr as a shared object.
* Makefile: Fix wrong installation directoryXavier Del Campo Romero2023-10-161-3/+3
| | | | Libraries are meant to be placed in $PREFIX/lib, and not $PREFIX/bin.
* Install .pc fileXavier Del Campo Romero2023-10-163-1/+25
|
* Support installationv0.1.0-rc1Xavier Del Campo Romero2023-10-022-0/+11
|
* CMakeLists.txt: add cmake_minimum_requiredXavier Del Campo Romero2023-10-021-0/+1
| | | | | This command is mandatory for all CMake projects. 3.0 was chosen since dynstr does not require any newer CMake features.
* CMakeLists.txt: Set project language to CXavier Del Campo Romero2023-08-021-1/+1
| | | | | Otherwise, CMake tests the system C++ compiler by default, which is not a requirement for dynstr.
* Makefile: add clean targetXavier Del Campo Romero2023-08-011-0/+3
|
* Support POSIX make(1) as build systemXavier Del Campo Romero2023-05-282-1/+26
|
* dynstr.c: Fix memory leak if realloc(3) failsXavier Del Campo Romero2023-03-081-15/+17
| | | | | | | | | | According to C99 ยง7.20.3.4: If memory for the new object cannot be allocated, the old object is not deallocated and its value is unchanged. Therefore, a temporary pointer must be used to ensure the original object can still be deallocated should realloc(3) return a null pointer.
* dynstr.c: Make zero-initialization portableXavier Del Campo Romero2023-03-081-1/+1
|
* Update copyright noticeXavier Del Campo Romero2023-03-082-2/+2
|
* Fix lifetime issues with va_listXavier Del Campo Romero2020-10-141-34/+53
| | | | | | | The standard requires both va_start and va_end to be called from the same function. On the other hand, vsnprintf and vsprintf leave the va_list on an undefined state according to the standard, so a copy must be created before a second call to these functions.
* Add missing do/while (0) on convenience macrosXavier Del Campo Romero2020-10-081-2/+4
|
* Move convenience macros down for readabilityXavier Del Campo Romero2020-10-081-69/+69
|
* Add convenience macros for dynstr_prependXavier Del Campo Romero2020-10-081-0/+33
|
* Add dynstr_vprependXavier Del Campo Romero2020-10-082-32/+42
|
* Add dynstr_vappendXavier Del Campo Romero2020-10-062-20/+35
|
* Avoid exceeding 80-column per lineXavier Del Campo Romero2020-09-031-1/+5
|
* Avoid potential undesirable effects caused by macrosXavier Del Campo Romero2020-09-031-4/+8
| | | | | | | | | | | | | | | | | | | | | | | The macros provided by this library would expand to an unguarded conditional that could have potential unwanted consequences. Consider the following example: dynstr_append_or_ret_null(&d, "example"); else { /* This is unexpectedly working. */ } The example above would expand to: if (dynstr_append(__VA_ARGS__) != DYNSTR_OK) return false; else { /* This is unexpectedly working. */ } Which is valid C yet allows possibly unexpected behaviour. The solution is then to enclose these conditions into a `do while (0)` statement.
* Rephrase documentation to avoid confusionXavier Del Campo Romero2020-09-031-5/+11
|
* Call dynstr_init on dynstr_freeXavier Del Campo Romero2020-09-032-4/+6
|
* Updated README.md with dynstr_prepend exampleXavier Del Campo Romero2020-08-041-1/+2
|
* dynstr_prepend(), fixed typo in commentXavier Del Campo Romero2020-08-032-1/+58
|
* Added license notice to CMakeLists.txt, used PROJECT_NAMEXavier Del Campo Romero2020-07-261-4/+16
|
* Added convenience macro dynstr_append_or_ret_nonzeroXavier Del Campo Romero2020-07-261-1/+6
|
* Added CMakeLists.txt for other projects to useXavier Del Campo Romero2020-07-091-0/+4
|
* Various minor changesXavier Del Campo Romero2020-06-122-14/+11
| | | | | | | | - Removed trailing ';' from convenience macros. - Convenience macros did not really need the ## __VA_ARGS__ extension. Simply grouping all parameters into '...', while decreasing readability, solves the portability issue. - Added C99 check to dynstr.c.
* Avoid free() if no string is presentXavier Del Campo Romero2020-03-251-2/+5
|
* Removed esp-idf filesXavier Del Campo Romero2020-03-232-7/+0
|
* Minor changeXavi Del Campo2020-03-211-2/+2
|
* Added comments to dynstr_dup()Xavi Del Campo2020-03-211-0/+7
|
* Various changes and improvementsXaviDCR922020-03-212-17/+69
| | | | | | - Replaced int by specific, more meaningful error codes. - C99 states realloc can be safely called using NULL pointers. - New function dynstr_dup().
* Fixed typoXaviDCR922020-03-211-1/+1
|
* Merge branch 'master' of https://github.com/XaviDCR92/dynstrXaviDCR922020-03-211-22/+25
|\
| * Solved compiler error by adding scope blockXavi Del Campo2020-03-211-22/+25
| |
* | Added compile-time error when C99 is not presentXaviDCR922020-03-211-0/+4
|/
* Build files for esp-idfXavier Del Campo Romero2020-03-202-0/+7
|
* New convenience macro dynstr_append_or_ret_zeroXavier Del Campo Romero2020-03-201-2/+7
|
* Replaced unneeded calloc() by malloc()Xavier Del Campo Romero2020-03-201-2/+2
|
* First commitXavi Del Campo2020-03-195-0/+389