diff options
Diffstat (limited to 'rgo/src/memcmp.c')
-rw-r--r-- | rgo/src/memcmp.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/rgo/src/memcmp.c b/rgo/src/memcmp.c deleted file mode 100644 index bb134f4..0000000 --- a/rgo/src/memcmp.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 <stddef.h> - -int_least8_t rgo_memcmp(void const * const _lstr,size_t const _num,void const * const _rstr) { - unsigned char const * lpos = (unsigned char const *)_lstr; - unsigned char const * rpos = (unsigned char const *)_rstr; - unsigned char const * const afterlbuf = lpos + _num; - for (;lpos != afterlbuf;++lpos,++rpos) { - unsigned char const lbyte = *lpos; - unsigned char const rbyte = *rpos; - sus_likely (lbyte != rbyte) {return lbyte < rbyte ? (int_least8_t)INT8_MIN : (int_least8_t)INT8_MAX;} - } - return rgo_typlit_s8(0x0); -} |