aboutsummaryrefslogtreecommitdiff
path: root/include/dynstr.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright noticeXavier Del Campo Romero2023-03-081-1/+1
|
* 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-081-0/+13
|
* Add dynstr_vappendXavier Del Campo Romero2020-10-061-0/+14
|
* 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-031-3/+5
|
* dynstr_prepend(), fixed typo in commentXavier Del Campo Romero2020-08-031-1/+13
|
* Added convenience macro dynstr_append_or_ret_nonzeroXavier Del Campo Romero2020-07-261-1/+6
|
* Various minor changesXavier Del Campo Romero2020-06-121-14/+7
| | | | | | | | - 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.
* 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-211-3/+32
| | | | | | - 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
|
* Added compile-time error when C99 is not presentXaviDCR922020-03-211-0/+4
|
* New convenience macro dynstr_append_or_ret_zeroXavier Del Campo Romero2020-03-201-2/+7
|
* First commitXavi Del Campo2020-03-191-0/+85