summaryrefslogtreecommitdiff
path: root/libgcompat/string.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-08string: check NULL before using variables everywhereA. Wilcox1-3/+6
2019-05-08string: check NULL before using src here, tooA. Wilcox1-1/+2
2019-05-08Don't use variables until ensuring they're non-NULLA. Wilcox1-1/+2
2019-05-08string: reduce scope of variables in strfryA. Wilcox1-5/+4
2019-05-02string: Add __strdupA. Wilcox1-0/+10
2018-09-11libgcompat: Fix formatting inconsistencies (clang-format)Samuel Holland1-5/+4
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-06-21string: add memfrob and strfryJason A. Donenfeld1-0/+34
2018-06-13string: add __strcspn_c2A. Wilcox1-0/+17
2018-01-15string: Clean up, fix bugs, implement LSB plus moreSamuel Holland1-38/+199
* Add all checked string functions from LSB, plus those found in use in other applications. Document those functions from LSB as such. * Use a consistent structure and paramater names for all functions. * Fix multiple off-by-one errors. * Use a less hacky and more optimized rawmemchr. * Sort functions by name. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-15stdlib: Implement most LSB functions plus moreSamuel Holland1-13/+0
* Fix prototype of __realpath_chk. * Add all strto* functions from LSB, plus the ones thata were previously incorrectly in string.c The main missing LSB functions are the reentrant random functions, which should not be used anyway. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14libgcompat: Add and use a macro for defining symbol aliasesSamuel Holland1-4/+4
* Prefer providing the underscore-prefixed symbol as the strong definition. * Do not use a weak alias if the alias is also underscore-prefixed. * Make libgcompat objects depend on the new header. [NOTE: I originally took the weak_alias macro from musl's libc.h, but it's trivial and the same pattern already in use. If desired, I can add the musl copyright notice.] Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-14global: Format the code consistentlySamuel Holland1-11/+14
* Apply clang-format. * Change all comments to the same style. * Add braces as dictated by the coding style guidelines. Signed-off-by: Samuel Holland <samuel@sholland.org>
2017-10-15string: add strto[u?]ll_l 'locale-aware' methodsA. Wilcox1-0/+12
2017-06-14move all compatibility library stuff into libgcompat/William Pitcock1-0/+84