~ft/libtags

ce2aea9ae182d2c41a11b77e3d23afa11bb2f25b — Sigrid Solveig Haflínudóttir 3 years ago 9d8c787
xm: case-insensitive strcmp, some files are apparently different (thanks kemal)
2 files changed, 2 insertions(+), 1 deletions(-)

M tagspriv.h
M xm.c
M tagspriv.h => tagspriv.h +1 -0
@@ 6,6 6,7 @@
#include <strings.h>
#define snprint snprintf
#define cistrcmp strcasecmp
#define cistrncmp strncasecmp
#define nil NULL
#define UTFmax 4
#define nelem(x) (int)(sizeof(x)/sizeof((x)[0]))

M xm.c => xm.c +1 -1
@@ 5,7 5,7 @@ tagxm(Tagctx *ctx)
{
	char d[17+20+1], o[20*UTFmax+1];

	if(ctx->read(ctx, d, 17+20) != 17+20 || memcmp(d, "Extended Module: ", 17) != 0)
	if(ctx->read(ctx, d, 17+20) != 17+20 || cistrncmp(d, "Extended Module: ", 17) != 0)
		return -1;
	d[17+20] = 0;
	if(cp437toutf8(o, sizeof(o), d+17, 20) > 0)