libtags: modules: ignore empty title
This commit is contained in:
parent
7cff84371d
commit
e5535fad32
4 changed files with 8 additions and 8 deletions
|
@ -8,8 +8,8 @@ tagit(Tagctx *ctx)
|
|||
if(ctx->read(ctx, d, 4+26) != 4+26 || memcmp(d, "IMPM", 4) != 0)
|
||||
return -1;
|
||||
d[4+26] = 0;
|
||||
cp437toutf8(o, sizeof(o), d+4, 26);
|
||||
txtcb(ctx, Ttitle, "", o);
|
||||
if(cp437toutf8(o, sizeof(o), d+4, 26) > 0)
|
||||
txtcb(ctx, Ttitle, "", o);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -41,8 +41,8 @@ tagmod(Tagctx *ctx)
|
|||
return -1;
|
||||
if(ctx->read(ctx, d, 20) != 20)
|
||||
return -1;
|
||||
cp437toutf8(o, sizeof(o), d, 20);
|
||||
txtcb(ctx, Ttitle, "", o);
|
||||
if(cp437toutf8(o, sizeof(o), d, 20) > 0)
|
||||
txtcb(ctx, Ttitle, "", o);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ tags3m(Tagctx *ctx)
|
|||
d[28] = 0;
|
||||
for(s = d+27; s != d-1 && (*s == ' ' || *s == 0); s--);
|
||||
s[1] = 0;
|
||||
cp437toutf8(o, sizeof(o), d, s+1-d);
|
||||
txtcb(ctx, Ttitle, "", o);
|
||||
if(cp437toutf8(o, sizeof(o), d, s+1-d) > 0)
|
||||
txtcb(ctx, Ttitle, "", o);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ tagxm(Tagctx *ctx)
|
|||
return -1;
|
||||
d[17+20] = 0;
|
||||
for(s = d+17; *s == ' '; s++);
|
||||
cp437toutf8(o, sizeof(o), d+17, 20);
|
||||
txtcb(ctx, Ttitle, "", o);
|
||||
if(cp437toutf8(o, sizeof(o), d+17, 20) > 0)
|
||||
txtcb(ctx, Ttitle, "", o);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue