summaryrefslogtreecommitdiff
path: root/lib/strncmp.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-08 10:39:48 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-08 10:39:48 -0400
commit8a19547957a86bed3f58c9abc1ac218d04698faf (patch)
treeed7ccc6f3a8902915dfe6c9bf763fc45d752b3c4 /lib/strncmp.c
parentfmt (diff)
downloadcomus-8a19547957a86bed3f58c9abc1ac218d04698faf.tar.gz
comus-8a19547957a86bed3f58c9abc1ac218d04698faf.tar.bz2
comus-8a19547957a86bed3f58c9abc1ac218d04698faf.zip
break apart c libaray
Diffstat (limited to 'lib/strncmp.c')
-rw-r--r--lib/strncmp.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/strncmp.c b/lib/strncmp.c
deleted file mode 100644
index e890517..0000000
--- a/lib/strncmp.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <string.h>
-
-int strncmp(const char *restrict lhs, const char *restrict rhs, size_t n)
-{
- const unsigned char *l = (void *)lhs, *r = (void *)rhs;
- if (!n--)
- return 0;
- for (; *l && *r && n && *l == *r; l++, r++, n--)
- ;
- return *l - *r;
-}