See notework.txt

This commit is contained in:
Alexander S. Aganichev 2002-04-21 12:01:13 +00:00
parent fccc4c09e3
commit 1c39b5e099
12 changed files with 1665 additions and 145 deletions

View File

@ -12,6 +12,17 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
! Some actions will not reload message if it is not required.
+ Added possibility to specify AKA in AREASEP:
AREASEP <echoid> <"desc"> <group> <type> <aka>
! AREALISTSORT changed again. Added 'p' for personal mail presence,
'u' for unread mail presence, and 'S' for overriding default sorting
for criterias which are not applicable for AREASEP (F.e. try
"PYTGSUE", "TSPYGUE", etc.).
- Fixed "EditChangeDate Always" operation. - Fixed "EditChangeDate Always" operation.
! AREALISTSORT letters a bit changed in the way they processed: ! AREALISTSORT letters a bit changed in the way they processed:

View File

@ -642,6 +642,13 @@ void AreaList::GetAreaSep(char* val) {
if(not GetAreaFirstPart(aa, key, val)) if(not GetAreaFirstPart(aa, key, val))
return; return;
// Get aka
getkeyval(&key, &val);
if(not CFG->aka.empty()) // Seed aka with main address
aa.aka = CFG->aka[0].addr;
aa.aka.set(key);
AddNewArea(&aa); AddNewArea(&aa);
} }

View File

@ -94,11 +94,13 @@ extern "C" int AreaListCmp(const Area** __a, const Area** __b) {
const Area* B = b; const Area* B = b;
int cmp = 0; int cmp = 0;
bool sepfirst = false;
bool rev = false; bool rev = false;
char* ptr = AL.sortspec; char* ptr = AL.sortspec;
while(*ptr) { while(*ptr) {
switch(toupper(*ptr)) { switch(*ptr) {
case '-': case '-':
rev = true; rev = true;
A = b; B = a; A = b; B = a;
@ -108,26 +110,37 @@ extern "C" int AreaListCmp(const Area** __a, const Area** __b) {
A = a; B = b; A = a; B = b;
break; break;
case 'A': case 'A':
if(a->isseparator() or b->isseparator()) case 'a':
break;
if((cmp = A->aka().compare(B->aka())) != 0) if((cmp = A->aka().compare(B->aka())) != 0)
return cmp; return cmp;
break; break;
case 'B': case 'B':
if(a->isseparator() or b->isseparator()) case 'b':
if(A->isseparator() and B->isseparator())
break; break;
if((cmp = compare_two(A->board(), B->board())) != 0) else if(A->isseparator()) {
if(B->board())
return sepfirst?-1:1;
}
else if(B->isseparator()) {
if(A->board())
return sepfirst?1:-1;
}
else if((cmp = compare_two(A->board(), B->board())) != 0)
return cmp; return cmp;
break; break;
case 'D': case 'D':
case 'd':
if((cmp = stricmp(A->desc(), B->desc())) != 0) if((cmp = stricmp(A->desc(), B->desc())) != 0)
return cmp; return cmp;
break; break;
case 'E': case 'E':
case 'e':
if((cmp = stricmp(A->echoid(), B->echoid())) != 0) if((cmp = stricmp(A->echoid(), B->echoid())) != 0)
return cmp; return cmp;
break; break;
case 'F': case 'F':
case 'f':
if(*area_maybe) { if(*area_maybe) {
register bool amay = striinc(area_maybe, A->echoid()) ? true : false; register bool amay = striinc(area_maybe, A->echoid()) ? true : false;
register bool bmay = striinc(area_maybe, B->echoid()) ? true : false; register bool bmay = striinc(area_maybe, B->echoid()) ? true : false;
@ -137,18 +150,36 @@ extern "C" int AreaListCmp(const Area** __a, const Area** __b) {
} }
break; break;
case 'G': case 'G':
case 'g':
if((cmp = compare_groups(A->groupid(), B->groupid())) != 0) if((cmp = compare_groups(A->groupid(), B->groupid())) != 0)
return cmp; return cmp;
break; break;
case 'M': case 'M':
if(a->isseparator() or b->isseparator()) case 'm':
if(A->isseparator() and B->isseparator())
break; break;
if((cmp = compare_two(A->ismarked(), B->ismarked())) != 0) else if(A->isseparator()) {
if(B->ismarked())
return sepfirst?-1:1;
}
else if(B->isseparator()) {
if(A->ismarked())
return sepfirst?1:-1;
}
else if((cmp = compare_two(A->ismarked(), B->ismarked())) != 0)
return cmp; return cmp;
break; break;
case 'P': case 'P':
if(a->isseparator() or b->isseparator()) if(A->isseparator() and B->isseparator())
break; break;
else if(A->isseparator()) {
if(B->PMrk.Count())
return sepfirst?-1:1;
}
else if(B->isseparator()) {
if(A->PMrk.Count())
return sepfirst?1:-1;
}
else { else {
register int aunread = A->PMrk.Count(); register int aunread = A->PMrk.Count();
register int bunread = B->PMrk.Count(); register int bunread = B->PMrk.Count();
@ -159,17 +190,41 @@ extern "C" int AreaListCmp(const Area** __a, const Area** __b) {
return cmp; return cmp;
} }
break; break;
case 'p':
if(A->isseparator() and B->isseparator())
break;
else if(A->isseparator()) {
if(B->PMrk.Count())
return sepfirst?-1:1;
}
else if(B->isseparator()) {
if(A->PMrk.Count())
return sepfirst?1:-1;
}
else if((cmp = compare_two(B->PMrk.Count()?1:0, A->PMrk.Count()?1:0)) != 0)
return cmp;
break;
case 'O': case 'O':
case 'o':
if((cmp = compare_two(A->areaid(), B->areaid())) != 0) if((cmp = compare_two(A->areaid(), B->areaid())) != 0)
return cmp; return cmp;
break; break;
case 'T': case 'T':
case 't':
if((cmp = compare_two(CFG->areatypeorder[A->type()&0xFF], CFG->areatypeorder[B->type()&0xFF])) != 0) if((cmp = compare_two(CFG->areatypeorder[A->type()&0xFF], CFG->areatypeorder[B->type()&0xFF])) != 0)
return cmp; return cmp;
break; break;
case 'U': case 'U':
if(a->isseparator() or b->isseparator()) if(A->isseparator() and B->isseparator())
break; break;
else if(A->isseparator()) {
if(B->unread)
return sepfirst?-1:1;
}
else if(B->isseparator()) {
if(A->unread)
return sepfirst?1:-1;
}
else { else {
register int aunread = A->unread; register int aunread = A->unread;
register int bunread = B->unread; register int bunread = B->unread;
@ -180,36 +235,73 @@ extern "C" int AreaListCmp(const Area** __a, const Area** __b) {
return cmp; return cmp;
} }
break; break;
case 'X': case 'u':
if(a->isseparator() or b->isseparator()) if(A->isseparator() and B->isseparator())
break; break;
if((cmp = compare_two(A->msgbase(), B->msgbase())) != 0) else if(A->isseparator()) {
if(B->unread)
return sepfirst?-1:1;
}
else if(B->isseparator()) {
if(A->unread)
return sepfirst?1:-1;
}
else if((cmp = compare_two(B->unread?1:0, A->unread?1:0)) != 0)
return cmp;
break;
case 'X':
case 'x':
if(A->isseparator() and B->isseparator())
break;
else if(A->isseparator()) {
if(B->msgbase())
return sepfirst?-1:1;
}
else if(B->isseparator()) {
if(A->msgbase())
return sepfirst?1:-1;
}
else if((cmp = compare_two(A->msgbase(), B->msgbase())) != 0)
return cmp; return cmp;
break; break;
case 'Y': case 'Y':
if(a->isseparator() or b->isseparator()) case 'y':
if(A->isseparator() and B->isseparator())
break; break;
else { else if(A->isseparator()) {
register bool anew = A->isvalidchg and A->isunreadchg; if(B->isnewmail())
register bool bnew = B->isvalidchg and B->isunreadchg; return sepfirst?-1:1;
// New mail _first_
if((cmp = compare_two(bnew, anew)) != 0)
return cmp;
} }
else if(B->isseparator()) {
if(A->isnewmail())
return sepfirst?1:-1;
}
else if((cmp = compare_two(B->isnewmail(), A->isnewmail())) != 0)
return cmp;
break; break;
case 'Z': case 'Z':
if(a->isseparator() or b->isseparator()) case 'z':
if(A->isseparator() and B->isseparator())
break; break;
else if(A->isseparator())
return sepfirst?-1:1;
else if(B->isseparator())
return sepfirst?1:-1;
else if((cmp = stricmp(A->path(), B->path())) != 0) else if((cmp = stricmp(A->path(), B->path())) != 0)
return cmp; return cmp;
break; break;
case 'S':
case 's':
sepfirst = not rev;
break;
} }
ptr++; ptr++;
} }
if(cmp == 0) if(cmp == 0) {
return compare_two(b->isseparator(), a->isseparator()); cmp = compare_two(b->isseparator(), a->isseparator());
return sepfirst?-cmp:cmp;
}
return cmp; return cmp;
} }

View File

@ -432,8 +432,13 @@ void DoKludges(int mode, GMsg* msg, int kludges) {
quot[0] = NUL; quot[0] = NUL;
sprintf(buf, "%s%sTo: %s%s%s <%s>", rfc, AA->isnewsgroup() ? "X-" : "", quot, buf2, quot, _toaddr); sprintf(buf, "%s%sTo: %s%s%s <%s>", rfc, AA->isnewsgroup() ? "X-" : "", quot, buf2, quot, _toaddr);
} }
else else if(stricmp(_toname, AA->Whoto())) {
sprintf(buf, "%s%sTo: %s", rfc, AA->isnewsgroup() ? "X-" : "", ptr); mime_header_encode(buf2, _toname, msg);
char quot[2] = "\"";
if((buf2[0] == '\"') or (strpbrk(buf2, " \t") == NULL))
quot[0] = NUL;
sprintf(buf, "%s%sTo: %s%s%s <%s>", rfc, AA->isnewsgroup() ? "X-Comment-" : "", quot, buf2, quot, _toaddr);
}
line = AddKludge(line, buf); line = AddKludge(line, buf);
line->kludge = GKLUD_RFC; line->kludge = GKLUD_RFC;
} }

View File

@ -419,6 +419,7 @@ void Reader() {
case KK_ReadSoundkill: case KK_ReadSoundkill:
HandleGEvent(EVTT_STOPVOICE); HandleGEvent(EVTT_STOPVOICE);
reader_keyok = true;
break; break;
case KK_ReadChangeAttrs: case KK_ReadChangeAttrs:
@ -427,22 +428,27 @@ void Reader() {
case KK_ReadChangeAka: case KK_ReadChangeAka:
ChangeAka(); ChangeAka();
reader_keyok = true;
break; break;
case KK_ReadChangeTagline: case KK_ReadChangeTagline:
ChangeTagline(); ChangeTagline();
reader_keyok = true;
break; break;
case KK_ReadChangeOrigin: case KK_ReadChangeOrigin:
ChangeOrigin(); ChangeOrigin();
reader_keyok = true;
break; break;
case KK_ReadChangeUsername: case KK_ReadChangeUsername:
ChangeUsername(); ChangeUsername();
reader_keyok = true;
break; break;
case KK_ReadChangeTemplate: case KK_ReadChangeTemplate:
ChangeTemplate(); ChangeTemplate();
reader_keyok = true;
break; break;
case KK_ReadChangeXlatImport: case KK_ReadChangeXlatImport:
@ -662,10 +668,12 @@ void Reader() {
case KK_ReadMakeUserlist: case KK_ReadMakeUserlist:
MakeUserList(); MakeUserList();
reader_keyok = true;
break; break;
case KK_ReadMakePathreport: case KK_ReadMakePathreport:
MakePathreport(); MakePathreport();
reader_keyok = true;
break; break;
case KK_ReadWriteMsg: case KK_ReadWriteMsg:
@ -712,6 +720,7 @@ void Reader() {
case KK_ReadPeekURLs: case KK_ReadPeekURLs:
ReadPeekURLs(msg); ReadPeekURLs(msg);
reader_keyok = true;
break; break;
case KK_ReadAddressbookAdd: case KK_ReadAddressbookAdd:

View File

@ -579,16 +579,18 @@ int ExternUtil(GMsg *msg, ExtUtil *extutil) {
int hardlines = EDIT->HardLines(); int hardlines = EDIT->HardLines();
EDIT->HardLines(false); EDIT->HardLines(false);
LoadText(msg, editorfile); LoadText(msg, editorfile);
if(extutil->options & EXTUTIL_WIPE)
WipeFile(editorfile, 0);
if(tmpfile[0] != NUL)
WipeFile(tmpfile, 0);
EDIT->HardLines(hardlines); EDIT->HardLines(hardlines);
// Ignore any kludge address found // Ignore any kludge address found
msg->TextToLines(CFG->dispmargin-(int)CFG->switches.get(disppagebar), false); msg->TextToLines(CFG->dispmargin-(int)CFG->switches.get(disppagebar), false);
} }
if(extutil->options & EXTUTIL_WIPE)
WipeFile(editorfile, 0);
if(tmpfile[0] != NUL)
WipeFile(tmpfile, 0);
reader_keyok = true;
return YES; return YES;
} }

View File

@ -405,6 +405,8 @@ public:
bool pmscanincl() { return area->pmscanincl(); } bool pmscanincl() { return area->pmscanincl(); }
bool ismarked() const { return (marks & (1<<AL.mask)) ? true : false; } bool ismarked() const { return (marks & (1<<AL.mask)) ? true : false; }
bool isnewmail() const { return (isvalidchg and isunreadchg) ? true : false; }
const char* echoid() const { return area->echoid(); } const char* echoid() const { return area->echoid(); }
const char* desc() const { return area->desc(); } const char* desc() const { return area->desc(); }
const char* path() const { return area->path(); } const char* path() const { return area->path(); }

View File

@ -248,6 +248,7 @@ void gareafile::ReadCrashmail(char* tag) {
while(ptr) { while(ptr) {
if(*ptr != '-') { if(*ptr != '-') {
strcpy(file, ptr); strcpy(file, ptr);
strschg_environ(file);
} }
ptr = strtok(NULL, " \t"); ptr = strtok(NULL, " \t");
} }

View File

@ -173,6 +173,7 @@ void gareafile::ReadFastecho(char* tag) {
while(ptr) { while(ptr) {
if(*ptr != '-') { if(*ptr != '-') {
strcpy(file, ptr); strcpy(file, ptr);
strschg_environ(file);
break; break;
} }
ptr = strtok(NULL, " \t"); ptr = strtok(NULL, " \t");
@ -180,7 +181,7 @@ void gareafile::ReadFastecho(char* tag) {
if(*file == NUL) { if(*file == NUL) {
ptr = getenv("FASTECHO"); ptr = getenv("FASTECHO");
if(ptr) if(ptr)
AddBackslash(strcpy(file, ptr)); PathCopy(file, ptr);
} }
if(*file == NUL) if(*file == NUL)
strcpy(file, areapath); strcpy(file, areapath);

View File

@ -78,7 +78,7 @@ void gareafile::ReadSpaceAr(const char* file) {
setvbuf(fp, NULL, _IOFBF, 8192); setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet) if(not quiet)
cout << "* Reading " << file << endl; std::cout << "* Reading " << file << std::endl;
char buf[4000]; char buf[4000];
AreaCfg aa; AreaCfg aa;
@ -170,7 +170,7 @@ void gareafile::ReadSpaceNtm(const char* file) {
setvbuf(fp, NULL, _IOFBF, 8192); setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet) if(not quiet)
cout << "* Reading " << file << endl; std::cout << "* Reading " << file << std::endl;
char buf[4000]; char buf[4000];
AreaCfg aa; AreaCfg aa;
@ -235,7 +235,7 @@ void gareafile::ReadSpaceCtl(const char* file) {
setvbuf(fp, NULL, _IOFBF, 8192); setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet) if(not quiet)
cout << "* Reading " << file << endl; std::cout << "* Reading " << file << std::endl;
char buf[4000]; char buf[4000];
AreaCfg aa; AreaCfg aa;

File diff suppressed because it is too large Load Diff

View File

@ -5904,6 +5904,7 @@ The following is a description of the different window parts:
READER TAGLINE Taglines. (Only the one just above tearline). READER TAGLINE Taglines. (Only the one just above tearline).
READER TEARLINE Tearline. READER TEARLINE Tearline.
READER ORIGIN Origin. READER ORIGIN Origin.
READER URL URL (http://, ftp://, E-mail).
The KLUDGE/HIDDEN colors replaces the old KLUDHIDD color. Note that The KLUDGE/HIDDEN colors replaces the old KLUDHIDD color. Note that
KLUDHIDD will set both the KLUDGE and HIDDEN colors, so remember to KLUDHIDD will set both the KLUDGE and HIDDEN colors, so remember to