shithub: libtags

Download patch

ref: 3e370bf9540c944ddf58e28ad92583b40936c6c1
parent: 173b32f09bc04f114dc22bdfd0315402667c5fa7
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Fri Apr 30 07:22:49 EDT 2021

make it build on non-9 systems again

binary files a/437.c b/437.c differ
--- a/tagspriv.h
+++ b/tagspriv.h
@@ -7,6 +7,8 @@
 #define snprint snprintf
 #define cistrcmp strcasecmp
 #define nil NULL
+#define UTFmax 4
+#define nelem(x) (int)(sizeof(x)/sizeof((x)[0]))
 typedef unsigned char uchar;
 typedef unsigned long long uvlong;
 #else
@@ -54,4 +56,4 @@
 
 void tagscallcb(Tagctx *ctx, int type, const char *k, char *s, int offset, int size, Tagread f);
 
-#define txtcb(ctx, type, k, s) tagscallcb(ctx, type, k, (const char*)s, 0, 0, nil)
+#define txtcb(ctx, type, k, s) tagscallcb(ctx, type, k, (char*)s, 0, 0, nil)
--- a/wav.c
+++ b/wav.c
@@ -1,6 +1,6 @@
 #include "tagspriv.h"
 
-#define le16u(d) (u16int)((d)[0] | (d)[1]<<8)
+#define le16u(d) ((d)[0] | (d)[1]<<8)
 
 static struct {
 	char *s;
@@ -17,10 +17,10 @@
 int
 tagwav(Tagctx *ctx)
 {
-	uchar *d;
 	int i, n, info;
-	u32int csz;
 	uvlong sz;
+	uchar *d;
+	uint csz;
 
 	d = (uchar*)ctx->buf;