summaryrefslogtreecommitdiffstats
path: root/src/fundamental/string-util-fundamental.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: add global ascii_isdigit() + ascii_isalpha()Lennart Poettering2022-07-051-0/+10
| | | | | | | | We now have a local implementation in string-util-fundamental.c, but it's useful at a lot of other places, hence let's give it a more expressive name and share it across the tree. Follow-up for: 8d9156660d6958c8d63b1d44692968f1b5d33920
* fundamental: Remove types-fundamental.hJan Janssen2022-06-271-7/+9
| | | | | | | | | | | | | This removes the fundamental typedefs in favor of just using standard C types. These are all used internally anyway and also do not do anything special to warrant any redefinition to EFI types. Even for BOOLEAN we can safely use stdbool. The defition from the EFI specification is fully compatible, including making any other values than 0/1 as undefined. The exception is sd_char as those need to be char16_t. The typedef is moved to string-util-fundamental.h instead.
* boot: Use memcmp/memcpy/memsetJan Janssen2022-05-311-1/+0
|
* boot: Use strcmp8/16Jan Janssen2022-05-311-6/+5
| | | | | | This also replaces streq and similar functions for consistency. Note that streq16 is null pointer safe, so streq_ptr can be safely replaced too.
* boot: Use strlen8/16Jan Janssen2022-05-311-10/+11
| | | | | | | The casts in this and the next few commits are curently necessary because CHAR8 is defined as uint8_t in gnu-efi, while char is signed. Once we switch from gnu-efi typedefs to stdint types, the casts will be dropped.
* basic: add helper function to print </==/>Zbigniew Jędrzejewski-Szmek2022-05-251-0/+4
|
* fundamental: Move some helpers into string-util-fundamentalJan Janssen2022-05-211-0/+17
|
* fundamental: define size_t and memcpy for sd-bootLuca Boccassi2021-10-081-2/+2
|
* sd-boot: Add memmem_safe and memory_startswithJan Janssen2021-08-161-0/+17
|
* string-util: introduce strverscmp_improved()Yu Watanabe2021-02-091-0/+2
| | | | | | | | Unfortunately, strverscmp() from libc or str_verscmp() do not correctly handle pre-release version, e.g. 247 vs 247~rc1. This implement a new comparison function, which is based on the RPM's rpmvercmp().
* fundamental: move several macros and functions into src/fundamental/Yu Watanabe2021-02-091-0/+65
sd-boot has a copy of a subset of codes from libbasic. This makes sd-boot share the code with libbasic, and dedup the code. Note, startswith_no_case() is dropped from sd-boot, as - it is not used, - the previous implementation is not correct, - gnu-efi does not have StrniCmp() or so.