Unified · Split
| @@ -16,6 +16,7 @@ Comparison to id3lib and taglib: · 15 unmodified lines | ||
| 16 | 16 | | IT | yes | no | ??? | |
| 17 | 17 | | XM | yes | no | ??? | |
| 18 | 18 | | S3M | yes | no | ??? | |
| 19 | +| MOD | yes | no | ??? | | |
| 19 | 20 | | replay gain | yes | no | ??? | |
| 20 | 21 | | size | tiny | bloated | more bloated | |
| 21 | 22 | | license | MIT | LGPL | LGPL/MPL | |
| @@ -16,6 +16,7 @@ OFILES=\ · 15 unmodified lines | ||
| 16 | 16 | vorbis.$O\ |
| 17 | 17 | wav.$O\ |
| 18 | 18 | xm.$O\ |
| 19 | + mod.$O\ | |
| 19 | 20 | |
| 20 | 21 | HFILES=\ |
| 21 | 22 | /sys/include/tags.h\ |
| @@ -0,0 +1,46 @@ | ||
| 1 | +#include "tagspriv.h" | |
| 2 | + | |
| 3 | +/* insane. */ | |
| 4 | +static char* variants[] = | |
| 5 | +{ | |
| 6 | + "M.K.", | |
| 7 | + "M!K!", | |
| 8 | + "M&K!", | |
| 9 | + "N.T.", | |
| 10 | + "NSMS", | |
| 11 | + "FLT4", | |
| 12 | + "M\0\0\0", | |
| 13 | + "8\0\0\0", | |
| 14 | + "FEST", | |
| 15 | + "FLT8", | |
| 16 | + "CD81", | |
| 17 | + "OCTA", | |
| 18 | + "OKTA", | |
| 19 | + "16CN", | |
| 20 | + "32CN", | |
| 21 | + nil, | |
| 22 | +}; | |
| 23 | + | |
| 24 | +int | |
| 25 | +tagmod(Tagctx *ctx) | |
| 26 | +{ | |
| 27 | + char d[20+1]; | |
| 28 | + int i; | |
| 29 | + | |
| 30 | + if (ctx->seek(ctx, 1080, 0) != 1080) | |
| 31 | + return -1; | |
| 32 | + if (ctx->read(ctx, d, 4) != 4) | |
| 33 | + return -1; | |
| 34 | + for (i = 0; ; i++) | |
| 35 | + if (variants[i] == nil) | |
| 36 | + return -1; | |
| 37 | + else if (memcmp(d, variants[i], 4) == 0) | |
| 38 | + break; | |
| 39 | + memset(d, 0, sizeof d); | |
| 40 | + if (ctx->seek(ctx, 0, 0) != 0) | |
| 41 | + return -1; | |
| 42 | + if (ctx->read(ctx, d, 20) != 20) | |
| 43 | + return -1; | |
| 44 | + txtcb(ctx, Ttitle, "", d); | |
| 45 | + return 0; | |
| 46 | +} | |
| @@ -18,6 +18,7 @@ extern int tags3m(Tagctx *ctx); · 17 unmodified lines | ||
| 18 | 18 | extern int tagvorbis(Tagctx *ctx); |
| 19 | 19 | extern int tagwav(Tagctx *ctx); |
| 20 | 20 | extern int tagxm(Tagctx *ctx); |
| 21 | +extern int tagmod(Tagctx *ctx); | |
| 21 | 22 | |
| 22 | 23 | static const Getter g[] = |
| 23 | 24 | { |
| @@ -31,6 +32,7 @@ static const Getter g[] = · 7 unmodified lines | ||
| 31 | 32 | {tagit, Fit}, |
| 32 | 33 | {tagxm, Fxm}, |
| 33 | 34 | {tags3m, Fs3m}, |
| 35 | + {tagmod, Fmod}, | |
| 34 | 36 | }; |
| 35 | 37 | |
| 36 | 38 | void |
| @@ -35,6 +35,7 @@ enum · 34 unmodified lines | ||
| 35 | 35 | Fit, |
| 36 | 36 | Fxm, |
| 37 | 37 | Fs3m, |
| 38 | + Fmod, | |
| 38 | 39 | |
| 39 | 40 | Fmax, |
| 40 | 41 | }; |