projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Activated default sequence negation (exclamation mark).
[mmh]
/
sbr
/
seq_setunseen.c
diff --git
a/sbr/seq_setunseen.c
b/sbr/seq_setunseen.c
index
b18de5d
..
2bb09b9
100644
(file)
--- a/
sbr/seq_setunseen.c
+++ b/
sbr/seq_setunseen.c
@@
-20,7
+20,7
@@
void
seq_setunseen(struct msgs *mp, int seen)
{
void
seq_setunseen(struct msgs *mp, int seen)
{
- int msgnum;
+ int n;
char **ap, *cp, *dp;
/*
char **ap, *cp, *dp;
/*
@@
-29,11
+29,13
@@
seq_setunseen(struct msgs *mp, int seen)
*/
if ((cp = context_find(usequence))) {
dp = getcpy(cp);
*/
if ((cp = context_find(usequence))) {
dp = getcpy(cp);
- if (!(ap = brkstring(dp, " ", "\n")) || !*ap) {
- free(dp);
- return;
- }
} else {
} else {
+ /* not set in profile, thus use the default */
+ dp = getcpy(seq_unseen);
+ }
+ if (!(ap = brkstring(dp, " ", "\n")) || !*ap) {
+ /* contains no sequence name, i.e. we're finished */
+ free(dp);
return;
}
return;
}
@@
-44,14
+46,19
@@
seq_setunseen(struct msgs *mp, int seen)
for (; *ap; ap++) {
if (seen) {
/* make sure sequence exists first */
for (; *ap; ap++) {
if (seen) {
/* make sure sequence exists first */
- if (seq_getnum(mp, *ap) != -1)
- for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++)
- if (is_unseen(mp, msgnum))
- seq_delmsg(mp, *ap, msgnum);
+ if (seq_getnum(mp, *ap) != -1) {
+ for (n = mp->lowsel; n <= mp->hghsel; n++) {
+ if (is_unseen(mp, n)) {
+ seq_delmsg(mp, *ap, n);
+ }
+ }
+ }
} else {
} else {
- for (msgnum = mp->lowmsg; msgnum <= mp->hghmsg; msgnum++)
- if (is_unseen(mp, msgnum))
- seq_addmsg(mp, *ap, msgnum, -1, 0);
+ for (n = mp->lowmsg; n <= mp->hghmsg; n++) {
+ if (is_unseen(mp, n)) {
+ seq_addmsg(mp, *ap, n, -1, 0);
+ }
+ }
}
}
}
}