X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=931c98b567022f6858a31467c0b6dc6a3cf836bc;hp=9924fc2245acc5d8d685d66c99f1cbc88b48f141;hb=50adaa99ec40c06e557a13394b6f7e62bcc5b9fa;hpb=44f1b100a3ebf23ffabb78d24e146b34b9b29108 diff --git a/muttlib.c b/muttlib.c index 9924fc2..931c98b 100644 --- a/muttlib.c +++ b/muttlib.c @@ -49,6 +49,8 @@ #include #include +#define SW (option(OPTMBOXPANE)?SidebarWidth:0) + BODY *mutt_new_body (void) { BODY *p = (BODY *) mem_calloc (1, sizeof (BODY)); @@ -1013,9 +1015,7 @@ void mutt_FormatString (char *dest, /* output buffer */ if (DrawFullLine || option (OPTSTATUSONTOP)) count = (COLS < destlen ? COLS : destlen); else - count = - ((COLS - SidebarWidth) < - destlen ? (COLS - SidebarWidth) : destlen); + count = ((COLS - SW) < destlen ? (COLS - SW) : destlen); if (count > col) { count -= col; /* how many columns left on this line */ mutt_FormatString (buf, sizeof (buf), src, callback, data, flags); @@ -1354,7 +1354,7 @@ int mutt_match_spam_list (const char *s, SPAM_LIST * l, char *text, int x) for (p = l->template; *p;) { if (*p == '%') { n = atoi (++p); /* find pmatch index */ - while (isdigit (*p)) + while (isdigit ((unsigned char) *p)) ++p; /* skip subst token */ for (i = pmatch[n].rm_so; (i < pmatch[n].rm_eo) && (tlen < x); i++) text[tlen++] = s[i];