aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-03-30 18:32:52 +0200
committerDuncaen <mail@duncano.de>2017-03-30 20:29:01 +0200
commit2ed0a0ea6032ce8d47bf1ab71c1641a731fcf858 (patch)
tree59812950cb02fcaa2e87745ebd2075cf839851fd
parent0200d437d6f018338cc5a0b5ef1d21c20ffbc33a (diff)
downloadmblaze-2ed0a0ea6032ce8d47bf1ab71c1641a731fcf858.tar.gz
mpick: fix flags
fixes #21
-rw-r--r--mpick.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mpick.c b/mpick.c
index 39bfc6b..9277df7 100644
--- 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;