From: markus schnalke Date: Wed, 4 Jan 2012 17:57:18 +0000 (+0100) Subject: s/ALLOW_NEW/ALLOW_BEYOND/ X-Git-Tag: mmh-thesis-end~427 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=0f56dec07e0eda5042276a5e65cb51ea95c23ff9;p=mmh s/ALLOW_NEW/ALLOW_BEYOND/ --- diff --git a/h/mh.h b/h/mh.h index b8896d1..1f8a23c 100644 --- a/h/mh.h +++ b/h/mh.h @@ -70,12 +70,12 @@ extern struct swit anoyes[]; /* standard yes/no switches */ /* ** general folder attributes */ -#define READONLY (1<<0) /* No write access to folder */ -#define SEQMOD (1<<1) /* folder's sequences modifed */ -#define ALLOW_NEW (1<<2) /* allow the "new" sequence */ -#define OTHERS (1<<3) /* folder has other files */ +#define READONLY (1<<0) /* No write access to folder */ +#define SEQMOD (1<<1) /* folder's sequences modifed */ +#define ALLOW_BEYOND (1<<2) /* allow the beyond sequence */ +#define OTHERS (1<<3) /* folder has other files */ -#define FBITS "\020\01READONLY\02SEQMOD\03ALLOW_NEW\04OTHERS" +#define FBITS "\020\01READONLY\02SEQMOD\03ALLOW_BEYOND\04OTHERS" /* ** type for holding the sequence set of a message diff --git a/sbr/m_convert.c b/sbr/m_convert.c index 6e6acd7..2837e0f 100644 --- a/sbr/m_convert.c +++ b/sbr/m_convert.c @@ -21,7 +21,7 @@ #define FIRST 1 #define LAST 2 -#define getnew(mp) ((mp)->hghmsg + 1) +#define getbeyond(mp) ((mp)->hghmsg + 1) static int convdir; /* convert direction */ static char *delimp; /* delimiter pointer */ @@ -57,10 +57,10 @@ m_convert(struct msgs *mp, char *name) /* ** Check for special beyond sequence, which - ** is valid only if ALLOW_NEW is set. + ** is valid only if ALLOW_BEYOND is set. */ - if ((mp->msgflags & ALLOW_NEW) && !strcmp(cp, seq_beyond)) { - if ((err = first = getnew(mp)) <= 0) + if ((mp->msgflags & ALLOW_BEYOND) && !strcmp(cp, seq_beyond)) { + if ((err = first = getbeyond(mp)) <= 0) goto badmsg; else goto single; @@ -175,11 +175,11 @@ single: /* ** Single Message ** - ** If ALLOW_NEW is set, then allow selecting of an - ** empty slot. If ALLOW_NEW is not set, then we + ** If ALLOW_BEYOND is set, then allow selecting of an + ** empty slot. If ALLOW_BEYOND is not set, then we ** check if message is in-range and exists. */ - if (mp->msgflags & ALLOW_NEW) { + if (mp->msgflags & ALLOW_BEYOND) { set_select_empty(mp, first); } else if (first > mp->hghmsg || first < mp->lowmsg || !does_exist(mp, first)) { @@ -195,12 +195,12 @@ single: /* ** Cycle through the range and select the messages - ** that exist. If ALLOW_NEW is set, then we also check + ** that exist. If ALLOW_BEYOND is set, then we also check ** if we are selecting an empty slot. */ for (; first <= last; first++) { if (does_exist(mp, first) || - ((mp->msgflags & ALLOW_NEW) && is_select_empty(mp, first))) { + ((mp->msgflags & ALLOW_BEYOND) && is_select_empty(mp, first))) { if (!is_selected(mp, first)) { set_selected(mp, first); mp->numsel++; @@ -250,7 +250,7 @@ m_conv(struct msgs *mp, char *str, int call) return i; else if (*delimp || call == LAST) return mp->hghmsg + 1; - else if (mp->msgflags & ALLOW_NEW) + else if (mp->msgflags & ALLOW_BEYOND) return BADRNG; else return BADNUM; @@ -269,12 +269,12 @@ m_conv(struct msgs *mp, char *str, int call) delimp = cp; if (!strcmp(buf, seq_first)) - return (mp->hghmsg || !(mp->msgflags & ALLOW_NEW) + return (mp->hghmsg || !(mp->msgflags & ALLOW_BEYOND) ? mp->lowmsg : BADMSG); if (!strcmp(buf, seq_last)) { convdir = -1; - return (mp->hghmsg || !(mp->msgflags & ALLOW_NEW) ? mp->hghmsg : BADMSG); + return (mp->hghmsg || !(mp->msgflags & ALLOW_BEYOND) ? mp->hghmsg : BADMSG); } if (!strcmp(buf, seq_cur)) diff --git a/sbr/m_draft.c b/sbr/m_draft.c index 8492dd9..427d2db 100644 --- a/sbr/m_draft.c +++ b/sbr/m_draft.c @@ -42,7 +42,7 @@ m_draft(char *which) adios(NULL, "unable to allocate folder storage"); } - mp->msgflags |= ALLOW_NEW; /* allow the "new" sequence */ + mp->msgflags |= ALLOW_BEYOND; /* allow the beyond sequence */ /* ** The draft message name to return is defined by `which'. diff --git a/uip/mhpath.c b/uip/mhpath.c index e1cf0ff..69ecaf2 100644 --- a/uip/mhpath.c +++ b/uip/mhpath.c @@ -99,7 +99,7 @@ main(int argc, char **argv) adios(NULL, "unable to allocate folder storage"); } - mp->msgflags |= ALLOW_NEW; /* allow the "new" sequence */ + mp->msgflags |= ALLOW_BEYOND; /* allow the beyond sequence */ /* parse all the message ranges/sequences and set SELECTED */ for (i = 0; i < msgs.size; i++)