diff options
Diffstat (limited to 'rgo/src/strcmp.c')
-rw-r--r-- | rgo/src/strcmp.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/rgo/src/strcmp.c b/rgo/src/strcmp.c deleted file mode 100644 index aea821b..0000000 --- a/rgo/src/strcmp.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright 2022 Gabriel Jensen. - This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. -*/ - -#include <rgo-priv.h> - -#include <stdint.h> - -int_least8_t rgo_strcmp(char const * const _lstr,char const * const _rstr) { - unsigned char const * lpos = (unsigned char const *)_lstr; - unsigned char const * rpos = (unsigned char const *)_rstr; - for (;;++lpos,++rpos) { - unsigned char const lchr = *lpos; - unsigned char const rchr = *rpos; - sus_likely (lchr != rchr) {return lchr < rchr ? (int_least8_t)INT8_MIN : (int_least8_t)INT8_MAX;} - sus_unlikely (lchr == (unsigned char)0x0) {return rgo_typlit_s8(0x0);} - } - sus_unreach(); -} |