shithub: libtags

ref: bde3359eb05ab492444a9ce87c05d855524c33b8
dir: /xm.c/

View raw version
#include "tagspriv.h"

int
tagxm(Tagctx *ctx)
{
	char d[17+20+1], o[20*UTFmax+1], *s;

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

	return 0;
}