Latest patch from asa
This commit is contained in:
@@ -78,7 +78,8 @@ bool ReadGoldedCfg(int& force) {
|
||||
if(*CFG->hudsonsyspath == NUL) strcpy(CFG->hudsonsyspath, CFG->hudsonpath);
|
||||
if(*CFG->goldbasepath == NUL) strcpy(CFG->goldbasepath, CFG->hudsonpath);
|
||||
if(*CFG->goldbasesyspath == NUL) strcpy(CFG->goldbasesyspath, CFG->goldbasepath);
|
||||
if(*CFG->jampath == NUL) strcpy(CFG->jampath, CFG->hudsonpath);
|
||||
if(*CFG->jampath == NUL)
|
||||
strcpy(CFG->jampath, CFG->hudsonpath);
|
||||
|
||||
MakePathname(CFG->goldcfg, CFG->goldpath, CFG->goldcfg);
|
||||
MakePathname(CFG->helpcfg.fn, CFG->goldpath, CFG->helpcfg.fn);
|
||||
@@ -118,12 +119,6 @@ bool ReadGoldedCfg(int& force) {
|
||||
MakePathname(CFG->semaphore.soupexport, CFG->goldpath, CFG->semaphore.soupexport);
|
||||
MakePathname(CFG->semaphore.exitnow, CFG->goldpath, CFG->semaphore.exitnow);
|
||||
|
||||
strschg_environ(CFG->jampath);
|
||||
strschg_environ(CFG->semaphore.importlist);
|
||||
strschg_environ(CFG->semaphore.exportlist);
|
||||
strschg_environ(CFG->semaphore.echoscan);
|
||||
strschg_environ(CFG->semaphore.netscan);
|
||||
|
||||
if(strieql(CFG->semaphore.exportlist, AddPath(CFG->jampath, "echomail.jam"))) {
|
||||
cout << "* Warning: SEMAPHORE EXPORTLIST must not be the same as ECHOMAIL.JAM!" << endl;
|
||||
SayBibi();
|
||||
|
@@ -468,7 +468,7 @@ void GPickArealist::AreaCatchUp(uint n) {
|
||||
if(CFG->switches.get(highlightunread) and CFG->switches.get(areacatchupread)) {
|
||||
w_info(LNG->Wait);
|
||||
for(uint i=AA->lastread()+1; i <= AA->Msgn.Count(); i++) {
|
||||
AA->LoadHdr(msg, AA->Msgn.CvtReln(i));
|
||||
AA->LoadHdr(msg, AA->Msgn.CvtReln(i), false);
|
||||
if(msg->timesread++ == 0)
|
||||
AA->UpdateTimesread(msg);
|
||||
}
|
||||
|
@@ -207,6 +207,7 @@ int DoCarboncopy(GMsg* msg, GMsg** carbon) {
|
||||
// Keep list as it was entered
|
||||
break;
|
||||
case CC_HIDDEN:
|
||||
ccline = msg->lin;
|
||||
if(A == AA) {
|
||||
sprintf(buf, "\001CC: %s %s", msg->To(), msg->dest.make_string(temp).c_str());
|
||||
ccline = AddKludge(ccline, buf);
|
||||
|
@@ -77,11 +77,11 @@ void Area::DeleteMsg(GMsg* msg, int direction) {
|
||||
reply1st = msg->link.first();
|
||||
}
|
||||
if(replyto) {
|
||||
if(not LoadHdr(downlink, replyto))
|
||||
if(not LoadHdr(downlink, replyto, false))
|
||||
downlink->link.first_set(0);
|
||||
}
|
||||
if(reply1st) {
|
||||
if(not LoadHdr(uplink, reply1st))
|
||||
if(not LoadHdr(uplink, reply1st, false))
|
||||
uplink->link.to_set(0);
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ void Area::DelMsgs(GMsg* msg) {
|
||||
w_progress(MODE_UPDATE, C_INFOW, x+1, Mark.Count(), LNG->Deleting);
|
||||
ulong msgno = Mark[x];
|
||||
if(Msgn.ToReln(msgno)) {
|
||||
if(LoadHdr(msg, msgno)) {
|
||||
if(LoadHdr(msg, msgno, false)) {
|
||||
bool deletethis = false;
|
||||
if(delask) {
|
||||
if(msg->attr.uns() and not (msg->attr.rcv() or msg->attr.del())) {
|
||||
|
@@ -417,7 +417,8 @@ char* mime_header_decode(char* decoded, const char* encoded, char *charset) {
|
||||
|
||||
char* strxmimecpy(char* dest, const char* source, int level, int size, bool detect) {
|
||||
|
||||
char buf[500], buf2[500], charset[100];
|
||||
ISub buf, buf2;
|
||||
char charset[100];
|
||||
bool need_reload;
|
||||
int table = -1;
|
||||
|
||||
|
@@ -48,7 +48,7 @@ void ResetMsg(GMsg* msg) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
int Area::LoadHdr(GMsg* msg, ulong msgno) {
|
||||
int Area::LoadHdr(GMsg* msg, ulong msgno, bool enable_recode) {
|
||||
|
||||
ResetMsg(msg);
|
||||
msg->msgno = msgno;
|
||||
@@ -56,7 +56,14 @@ int Area::LoadHdr(GMsg* msg, ulong msgno) {
|
||||
|
||||
// Don't translate charsets if we don't know charset
|
||||
// Currently, it only mime-decodes, so it's okay.
|
||||
if(retval) {
|
||||
if(retval and enable_recode) {
|
||||
// Use default translation by default
|
||||
int table = LoadCharset(NULL, NULL, 1);
|
||||
if (table == -1)
|
||||
msg->charsetlevel = LoadCharset(CFG->xlatimport, CFG->xlatlocalset);
|
||||
else
|
||||
msg->charsetlevel = LoadCharset(CFG->xlatcharset[table].imp, CFG->xlatcharset[table].exp);
|
||||
|
||||
// Charset translate header fields
|
||||
strxmimecpy(msg->realby, msg->realby, msg->charsetlevel, sizeof(INam));
|
||||
strxmimecpy(msg->realto, msg->realto, msg->charsetlevel, sizeof(INam));
|
||||
|
@@ -223,7 +223,7 @@ static void recursive_mark(GMsg* msg, ulong msgno) {
|
||||
int i;
|
||||
gmsg_links templink;
|
||||
|
||||
if(AA->Msgn.ToReln(msgno) and AA->LoadHdr(msg, msgno)) {
|
||||
if(AA->Msgn.ToReln(msgno) and AA->LoadHdr(msg, msgno, false)) {
|
||||
|
||||
templink = msg->link;
|
||||
|
||||
@@ -263,7 +263,7 @@ void MarkMsgs_Thread(GMsg* msg) {
|
||||
while(AA->Msgn.ToReln(msgno)) { // Search backwards
|
||||
AA->Mark.Add(msgno);
|
||||
|
||||
if(not AA->LoadHdr(tempmsg, msgno))
|
||||
if(not AA->LoadHdr(tempmsg, msgno, false))
|
||||
tempmsg->link.to_set(0);
|
||||
msgno = tempmsg->link.to();
|
||||
}
|
||||
|
@@ -650,7 +650,7 @@ static void GetLastLink(GMsg* msg, ulong& msgno) {
|
||||
|
||||
if(uplink->link.first()) {
|
||||
while(AA->Msgn.ToReln(uplink->link.first())) {
|
||||
if(not AA->LoadHdr(uplink, uplink->link.first()))
|
||||
if(not AA->LoadHdr(uplink, uplink->link.first(), false))
|
||||
uplink->msgno = 0;
|
||||
}
|
||||
}
|
||||
@@ -1080,7 +1080,7 @@ void MakeMsg(int mode, GMsg* omsg) {
|
||||
// If message is a reply, update the links on the original
|
||||
if(CurrArea == OrigArea and (mode == MODE_QUOTE or mode == MODE_REPLYCOMMENT or mode == MODE_REPLY)) {
|
||||
if(AA->Msgn.ToReln(reply_msgno)) {
|
||||
if(AA->LoadHdr(reply, reply_msgno)) {
|
||||
if(AA->LoadHdr(reply, reply_msgno, false)) {
|
||||
ulong replynext;
|
||||
bool ok2save = false;
|
||||
if(AA->issquish()) {
|
||||
@@ -1103,7 +1103,7 @@ void MakeMsg(int mode, GMsg* omsg) {
|
||||
replynext = reply->link.first();
|
||||
do {
|
||||
reply_msgno = replynext;
|
||||
if(not AA->LoadHdr(reply, reply_msgno))
|
||||
if(not AA->LoadHdr(reply, reply_msgno, false))
|
||||
break;
|
||||
replynext = reply->link.next();
|
||||
} while(reply->link.next());
|
||||
|
@@ -928,7 +928,7 @@ int LoadMessage(GMsg* msg, int margin) {
|
||||
|
||||
if(reader_rcv_noise > 1) {
|
||||
GMsg* tmsg = throw_calloc(1, sizeof(GMsg));
|
||||
AA->LoadHdr(tmsg, msg->msgno);
|
||||
AA->LoadHdr(tmsg, msg->msgno, false);
|
||||
tmsg->attr = msg->attr;
|
||||
tmsg->orig_timesread = msg->orig_timesread;
|
||||
tmsg->received = msg->received;
|
||||
@@ -1269,7 +1269,7 @@ void GotoPrevUnread() {
|
||||
int prev = AA->lastread();
|
||||
while(1 < prev) {
|
||||
prev--;
|
||||
AA->LoadHdr(msg, AA->Msgn.CvtReln(prev));
|
||||
AA->LoadHdr(msg, AA->Msgn.CvtReln(prev), false);
|
||||
if(msg->timesread == 0) {
|
||||
AA->set_lastread(prev);
|
||||
found = true;
|
||||
|
@@ -491,7 +491,7 @@ public:
|
||||
void ScanArea();
|
||||
void ScanAreaPM();
|
||||
|
||||
int LoadHdr(GMsg* msg, ulong msgno);
|
||||
int LoadHdr(GMsg* msg, ulong msgno, bool enable_recode = true);
|
||||
int LoadMsg(GMsg* msg, ulong msgno, int margin, int mode=0);
|
||||
|
||||
void SaveHdr(int mode, GMsg* msg);
|
||||
|
Reference in New Issue
Block a user