summaryrefslogtreecommitdiff
path: root/demo/util.c
diff options
context:
space:
mode:
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;
+}