summaryrefslogtreecommitdiff
path: root/demo/util.c
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-10-03 23:16:08 -0600
committerAlejandro Soto <alejandro@34project.org>2023-10-03 23:16:08 -0600
commit3de42a19661a3d6d24de46ca2920b06e1dc88fe0 (patch)
treeacdd022a14d43d60dbfec1f4df8c634e0d080ec0 /demo/util.c
parent1094451235282af6a9daba2b2a460577f82d289c (diff)
demo: initial commit
Diffstat (limited to 'demo/util.c')
-rw-r--r--demo/util.c7
1 files changed, 7 insertions, 0 deletions
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;
+}