Different fixes.
This commit is contained in:
@@ -1090,13 +1090,12 @@ char* MapPath(char* map, bool reverse) {
|
||||
strchg(cmap, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR);
|
||||
|
||||
vector< pair<string, string> >::iterator i;
|
||||
for(i = CFG->mappath.begin(); i < CFG->mappath.end(); i++) {
|
||||
for(i = CFG->mappath.begin(); i != CFG->mappath.end(); i++) {
|
||||
const char* p = reverse ? i->second.c_str() : i->first.c_str();
|
||||
const char* q = reverse ? i->first.c_str() : i->second.c_str();
|
||||
if(strnieql(cmap, p, strlen(p))) {
|
||||
strxcpy(buf, map, sizeof(Path));
|
||||
strxmerge(map, sizeof(Path), map, q, buf+strlen(p), NULL);
|
||||
|
||||
strxmerge(map, sizeof(Path), q, buf+strlen(p), NULL);
|
||||
char sl1, sl2;
|
||||
char* ptr;
|
||||
|
||||
@@ -1105,7 +1104,7 @@ char* MapPath(char* map, bool reverse) {
|
||||
ptr = strpbrk(q, "/\\");
|
||||
sl2 = ptr ? *ptr : NUL;
|
||||
|
||||
if(sl1 and sl2)
|
||||
if(sl1 and sl2 and (sl1 != sl2))
|
||||
strchg(map, sl1, sl2);
|
||||
|
||||
break;
|
||||
|
@@ -162,13 +162,19 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) {
|
||||
if((*ptr < ' ') or (*ptr > '\x7F') or (inmime and strchr(" =?", *ptr))) {
|
||||
if(not inmime) {
|
||||
if(msg->charset) {
|
||||
strcpy(bp, "=?");
|
||||
bp += 2;
|
||||
strcpy(bp, strlword(msg->charset));
|
||||
strlwr(bp);
|
||||
bp += strlen(bp);
|
||||
strcpy(bp, "?Q?");
|
||||
bp += 3;
|
||||
bp = stpcpy(bp, "=?");
|
||||
if(strneql(msg->charset, "latin-", 6)) {
|
||||
static const char *isono[] = { "15", "1", "2", "3", "4", "9", "10", "13", "14", "15" };
|
||||
int chsno = atoi(msg->charset+6);
|
||||
chsno = chsno > sizeof(isono)/sizeof(const char *) ? 0 : chsno;
|
||||
bp = strxmerge(bp, 12, "iso-8859-", isono[chsno]);
|
||||
}
|
||||
else {
|
||||
char *pbp = bp;
|
||||
bp = stpcpy(bp, strlword(msg->charset));
|
||||
strlwr(pbp);
|
||||
}
|
||||
bp = stpcpy(bp, "?Q?");
|
||||
}
|
||||
else {
|
||||
strcpy(bp, "=?iso-8859-1?Q?");
|
||||
@@ -176,7 +182,7 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) {
|
||||
}
|
||||
inmime = true;
|
||||
}
|
||||
sprintf(bp, "=%Xc", *ptr);
|
||||
sprintf(bp, "=%02X", (*ptr)&0xff);
|
||||
bp += 3;
|
||||
}
|
||||
else
|
||||
|
@@ -49,14 +49,14 @@ public:
|
||||
GMsg* msg;
|
||||
bool lookup;
|
||||
|
||||
bool handle_other_keys(uint& key);
|
||||
bool handle_other_keys(gkey& key);
|
||||
bool validate();
|
||||
};
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
bool GMsgHeaderEdit::handle_other_keys(uint& key) {
|
||||
bool GMsgHeaderEdit::handle_other_keys(gkey& key) {
|
||||
|
||||
switch(key) {
|
||||
case Key_F10:
|
||||
|
@@ -205,7 +205,7 @@ void NodelistBrowser::AfterCursor() {
|
||||
Path nlname;
|
||||
*nlname = NUL;
|
||||
if(NLP->index_name() and NLP->nodelist_name())
|
||||
sprintf(nlname, " %s / %s ", NLP->index_name(), NLP->nodelist_name());
|
||||
sprintf(nlname, " %s / %s ", NLP->index_name(), CleanFilename(NLP->nodelist_name()));
|
||||
else if(NLP->index_name())
|
||||
sprintf(nlname, " %s ", NLP->index_name());
|
||||
if(*nlname)
|
||||
@@ -993,13 +993,13 @@ void Lookup(GMsg* msg, Addr* addr, char* name, int topline, char* status) {
|
||||
}
|
||||
|
||||
if(topline >= 0) {
|
||||
dolookup = NO;
|
||||
dolookup = false;
|
||||
if(AA->isnet() and CFG->switches.get(lookupnet))
|
||||
dolookup = YES;
|
||||
dolookup = true;
|
||||
else if(AA->isecho() and CFG->switches.get(lookupecho))
|
||||
dolookup = YES;
|
||||
dolookup = true;
|
||||
else if(AA->islocal() and CFG->switches.get(lookuplocal))
|
||||
dolookup = YES;
|
||||
dolookup = true;
|
||||
}
|
||||
|
||||
if(dolookup) {
|
||||
|
Reference in New Issue
Block a user