mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 2ed0a0ea6032ce8d47bf1ab71c1641a731fcf858
parent 0200d437d6f018338cc5a0b5ef1d21c20ffbc33a
Author: Duncaen <mail@duncano.de>
Date:   Thu, 30 Mar 2017 18:32:52 +0200

mpick: fix flags

fixes #21

Diffstat:
mpick.c | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/mpick.c b/mpick.c @@ -128,7 +128,7 @@ struct mailinfo { int replies; int matched; int prune; - long flags; + int flags; off_t total; char subject[100]; }; @@ -199,6 +199,7 @@ mkexpr(enum op op) if (!e) parse_error("out of memory"); e->op = op; + e->extra = 0; return e; } @@ -850,7 +851,9 @@ eval(struct expr *e, struct mailinfo *m) exit(2); } - if (e->extra) { + n = e->b.num; + + if (e->extra) switch (e->b.var) { case VAR_CUR: if (!cur_idx) @@ -858,11 +861,7 @@ eval(struct expr *e, struct mailinfo *m) else n = cur_idx; break; - default: n = 0; } - } else { - n = e->b.num; - } switch (e->a.prop) { case PROP_ATIME: if (m->sb) v = m->sb->st_atime; break;