History

dumb s3m tags parser

Sigrid Solveig Haflínudóttir committed 5 years ago

Commit f4bd0181 parent 5f031525 files · +23 −2Browse files

Unified · Split

5 files
  1. README.md +1 −0
  2. mkfile +1 −0
  3. s3m.c +16 −0
  4. tags.c +4 −2
  5. tags.h +1 −0
README.md+1−0
@@ -15,6 +15,7 @@ Comparison to id3lib and taglib: · 14 unmodified lines
15| WAV | yes | no | yes |15| WAV | yes | no | yes |
16| IT | yes | no | ??? |16| IT | yes | no | ??? |
17| XM | yes | no | ??? |17| XM | yes | no | ??? |
18| S3M | yes | no | ??? |
18| replay gain | yes | no | ??? |19| replay gain | yes | no | ??? |
19| size | tiny | bloated | more bloated |20| size | tiny | bloated | more bloated |
20| license | MIT | LGPL | LGPL/MPL |21| license | MIT | LGPL | LGPL/MPL |
mkfile+1−0
@@ -10,6 +10,7 @@ OFILES=\ · 9 unmodified lines
10 it.$O\10 it.$O\
11 m4a.$O\11 m4a.$O\
12 opus.$O\12 opus.$O\
13 s3m.$O\
13 tags.$O\14 tags.$O\
14 utf16.$O\15 utf16.$O\
15 vorbis.$O\16 vorbis.$O\
s3m.c+16−0
@@ -0,0 +1,16 @@
1#include "tagspriv.h"
2
3int
4tags3m(Tagctx *ctx)
5{
6 char d[28+1+1], *s;
7
8 if(ctx->read(ctx, d, 28+1+1) != 28+1+1 || (d[28] != 0x1a && d[28] != 0) || d[29] != 0x10)
9 return -1;
10 d[28] = 0;
11 for(s = d+27; s != d-1 && (*s == ' ' || *s == 0); s--);
12 s[1] = 0;
13 txtcb(ctx, Ttitle, "", d);
14
15 return 0;
16}
tags.c+4−2
@@ -8,13 +8,14 @@ struct Getter · 7 unmodified lines
8 int format;8 int format;
9};9};
10 10
11extern int tagvorbis(Tagctx *ctx);
12extern int tagflac(Tagctx *ctx);11extern int tagflac(Tagctx *ctx);
13extern int tagid3v2(Tagctx *ctx);
14extern int tagid3v1(Tagctx *ctx);12extern int tagid3v1(Tagctx *ctx);
13extern int tagid3v2(Tagctx *ctx);
15extern int tagit(Tagctx *ctx);14extern int tagit(Tagctx *ctx);
16extern int tagm4a(Tagctx *ctx);15extern int tagm4a(Tagctx *ctx);
17extern int tagopus(Tagctx *ctx);16extern int tagopus(Tagctx *ctx);
17extern int tags3m(Tagctx *ctx);
18extern int tagvorbis(Tagctx *ctx);
18extern int tagwav(Tagctx *ctx);19extern int tagwav(Tagctx *ctx);
19extern int tagxm(Tagctx *ctx);20extern int tagxm(Tagctx *ctx);
20 21
@@ -29,6 +30,7 @@ static const Getter g[] = · 8 unmodified lines
29 {tagwav, Fwav},30 {tagwav, Fwav},
30 {tagit, Fit},31 {tagit, Fit},
31 {tagxm, Fxm},32 {tagxm, Fxm},
33 {tags3m, Fs3m},
32};34};
33 35
34void36void
tags.h+1−0
@@ -34,6 +34,7 @@ enum · 33 unmodified lines
34 Fwav,34 Fwav,
35 Fit,35 Fit,
36 Fxm,36 Fxm,
37 Fs3m,
37 38
38 Fmax,39 Fmax,
39};40};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t