From 3de42a19661a3d6d24de46ca2920b06e1dc88fe0 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Tue, 3 Oct 2023 23:16:08 -0600 Subject: demo: initial commit --- demo/util.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 demo/util.c (limited to 'demo/util.c') diff --git a/demo/util.c b/demo/util.c new file mode 100644 index 0000000..457a32c --- /dev/null +++ b/demo/util.c @@ -0,0 +1,7 @@ +int strcmp(const char *s1, const char *s2) +{ + while (*s1 && *s1 == *s2) + s1++, s2++; + + return (int)*(const unsigned char *)s1 - (int)*(const unsigned char *)s2; +} -- cgit v1.2.3