aboutsummaryrefslogtreecommitdiff
path: root/vendor/librune
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
parenta4dca0f21545f17709e84710421b4a6adac4d11f (diff)
Bump librune
Diffstat (limited to 'vendor/librune')
-rw-r--r--vendor/librune/include/mbstring.h2
-rw-r--r--vendor/librune/lib/mbstring/u8cmp.c11
-rw-r--r--vendor/librune/make.c2
3 files changed, 14 insertions, 1 deletions
diff --git a/vendor/librune/include/mbstring.h b/vendor/librune/include/mbstring.h
index c1336a8..29c7421 100644
--- a/vendor/librune/include/mbstring.h
+++ b/vendor/librune/include/mbstring.h
@@ -32,6 +32,8 @@ size_t u8bspn(const char8_t *, size_t, const rune *, size_t);
size_t u8cspn(const char8_t *, size_t, const rune *, size_t);
size_t u8cbspn(const char8_t *, size_t, const rune *, size_t);
+int u8cmp(struct u8view, struct u8view);
+
#if !_RUNE_NO_MACRO_WRAPPER
# define u8chk(s, n) _RUNE_Q_PTR(u8chk, (s), (s), (n))
# define u8chr(s, ch, n) _RUNE_Q_PTR(u8chr, (s), (s), (ch), (n))
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);
+}
diff --git a/vendor/librune/make.c b/vendor/librune/make.c
index 6f59825..8c3f265 100644
--- a/vendor/librune/make.c
+++ b/vendor/librune/make.c
@@ -31,7 +31,7 @@
cmdclr(&(C)); \
} while (0)
#define CMDPRC(C) _CMDPRC(C, cmdput)
-#define CMDPRC2(C) _CMDPRC(C, cmdput)
+#define CMDPRC2(C) _CMDPRC(C, cmdput2)
#define streq(a, b) (!strcmp(a, b))