aboutsummaryrefslogtreecommitdiff
path: root/vendor/librune/lib
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-02-13 16:49:54 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-02-13 16:49:54 +0100
commit151ff08f430069025818c1cc9bae37355f09a4a6 (patch)
treed8666bfa7e463569cbc2173f08c999e535754525 /vendor/librune/lib
parenta4dca0f21545f17709e84710421b4a6adac4d11f (diff)
Bump librune
Diffstat (limited to 'vendor/librune/lib')
-rw-r--r--vendor/librune/lib/mbstring/u8cmp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/librune/lib/mbstring/u8cmp.c b/vendor/librune/lib/mbstring/u8cmp.c
new file mode 100644
index 0000000..732896c
--- /dev/null
+++ b/vendor/librune/lib/mbstring/u8cmp.c
@@ -0,0 +1,11 @@
+#include <string.h>
+
+#include "mbstring.h"
+
+int
+u8cmp(struct u8view x, struct u8view y)
+{
+ if (x.len != y.len)
+ return x.len > y.len ? +1 : -1;
+ return memcmp(x.p, y.p, x.len);
+}