Scope of recent changes.

This commit is contained in:
Alexander S. Aganichev 2003-12-10 08:35:16 +00:00
parent 9548bafcac
commit 5ed34a60fb
88 changed files with 649 additions and 748 deletions

View File

@ -45,7 +45,7 @@ EXEEXT=.exe
OBJEXT=.o
LIBEXT=.a
else
ifeq ($(TERM),MSYS)
ifeq ($(TERM),msys)
CAT=cat
CC=gcc
CXX=g++
@ -53,7 +53,6 @@ AR=ar
RANLIB=ranlib
WINDRES=windres
PLATFORM=cyg
SHELL=bash
EXEEXT=.exe
OBJEXT=.o
LIBEXT=.a

View File

@ -12,6 +12,19 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
- Fixed CRC16 routine for Synchronet fields updating.
- Fixed X-Comment-To/X-To creation.
! Some code was significantly reworked. May cause a lot of problems,
but should be more flexible. If there are new problems with reading
areafiles, adding extra kludges on copying messages, etc. appear
please report.
- Fixed Crashmail II/CrashEcho config parser: when echo without
description was followed after passthru echo with description the
last one used.
+ Added -pass switch support to Fidoconfig parser.
- Fixed bug in HPT config parser: areas which was not explicitly

View File

@ -14,7 +14,7 @@ ifeq ($(TERM),cygwin)
STDLIBS=-luser32 -lwinmm
GLIBS+=glibc
else
ifeq ($(TERM),MSYS)
ifeq ($(TERM),msys)
STDLIBS=-luser32 -lwinmm
GLIBS+=glibc
endif

View File

@ -105,41 +105,38 @@ void AreaList::Reset() {
// ------------------------------------------------------------------
// Return a new'ed area of the specified format
Area* AreaList::NewArea(int msgbase) {
Area* AreaList::NewArea(const char *basetype) {
gmo_area* ap = NULL;
switch(msgbase) {
case MT_SEPARATOR: ap = new SepArea; break;
case MT_FTS1:
case MT_OPUS: ap = new FidoArea; break;
#ifndef GMB_NOEZY
case MT_EZYCOM: ap = new EzycomArea; break;
#endif
#ifndef GMB_NOGOLD
case MT_GOLDBASE: ap = new GoldArea; break;
#endif
#ifndef GMB_NOHUDS
case MT_HUDSON: ap = new HudsArea; break;
#endif
#ifndef GMB_NOJAM
case MT_JAM: ap = new JamArea; break;
#endif
#ifndef GMB_NOPCB
case MT_PCBOARD: ap = new PcbArea; break;
#endif
#ifndef GMB_NOSQSH
case MT_SQUISH: ap = new SquishArea; break;
#endif
#ifndef GMB_NOWCAT
case MT_WILDCAT: ap = new WCatArea; break;
#endif
#ifndef GMB_NOXBBS
case MT_ADEPTXBBS: ap = new XbbsArea; break;
#endif
#ifndef GMB_NOSMB
case MT_SMB: ap = new SMBArea; break;
#endif
}
if(streql(basetype, "SEPARATOR")) ap = new SepArea;
else if(streql(basetype, "FTS1") or streql(basetype, "OPUS")) ap = new FidoArea;
#ifndef GMB_NOEZY
else if(streql(basetype, "EZYCOM")) ap = new EzycomArea;
#endif
#ifndef GMB_NOGOLD
else if(streql(basetype, "GOLDBASE")) ap = new GoldArea;
#endif
#ifndef GMB_NOHUDS
else if(streql(basetype, "HUDSON")) ap = new HudsArea;
#endif
#ifndef GMB_NOJAM
else if(streql(basetype, "JAM")) ap = new JamArea;
#endif
#ifndef GMB_NOPCB
else if(streql(basetype, "PCBOARD")) ap = new PcbArea;
#endif
#ifndef GMB_NOSQSH
else if(streql(basetype, "SQUISH")) ap = new SquishArea;
#endif
#ifndef GMB_NOWCAT
else if(streql(basetype, "WILDCAT")) ap = new WCatArea;
#endif
#ifndef GMB_NOXBBS
else if(streql(basetype, "ADEPTXBBS")) ap = new XbbsArea;
#endif
#ifndef GMB_NOSMB
else if(streql(basetype, "SMB")) ap = new SMBArea;
#endif
return new Area(ap);
}
@ -265,7 +262,7 @@ void AreaList::WriteAreaDef(const char* file) {
Path path;
char groupid[10], echoid[sizeof(Echo)+2];
int maxechoid=0, maxdesc=0, maxgroupid=0, maxpath=0, maxaddr=0, maxattr=0;
char desc[sizeof(Desc)+2], type[6], msgbase[7], addr[40], attr[150], origin[163];
char desc[sizeof(Desc)+2], type[6], msgbase[9], addr[40], attr[150], origin[163];
fp = fsopen(file, "wt", CFG->sharemode);
if(fp) {
@ -318,37 +315,12 @@ void AreaList::WriteAreaDef(const char* file) {
strcpy(type, "Echo ");
else if((*aa)->islocal())
strcpy(type, "Local");
switch((*aa)->msgbase()) {
case MT_OPUS: strcpy(msgbase, "Opus "); break;
case MT_FTS1: strcpy(msgbase, "Fts1 "); break;
#ifndef GMB_NOHUDS
case MT_HUDSON: strcpy(msgbase, "Hudson"); break;
#endif
#ifndef GMB_NOGOLD
case MT_GOLDBASE: strcpy(msgbase, "Gold "); break;
#endif
#ifndef GMB_NOSQSH
case MT_SQUISH: strcpy(msgbase, "Squish"); break;
#endif
#ifndef GMB_NOEZY
case MT_EZYCOM: strcpy(msgbase, "Ezycom"); break;
#endif
#ifndef GMB_NOJAM
case MT_JAM: strcpy(msgbase, "Jam "); break;
#endif
#ifndef GMB_NOPCB
case MT_PCBOARD: strcpy(msgbase, "Pcb "); break;
#endif
#ifndef GMB_NOWCAT
case MT_WILDCAT: strcpy(msgbase, "WCat "); break;
#endif
#ifndef GMB_NOXBBS
case MT_ADEPTXBBS: strcpy(msgbase, "XBBS "); break;
#endif
#ifndef GMB_NOSMB
case MT_SMB: strcpy(msgbase, "SMB "); break;
#endif
}
#ifndef GMB_NOXBBS
if(streql((*aa)->basetype(), "ADEPTXBBS"))
strcpy(msgbase, "XBBS");
else
#endif
strxcpy(msgbase, (*aa)->basetype(), sizeof(msgbase));
if(strchr((*aa)->echoid(), ' '))
sprintf(echoid, "\"%s\"", (*aa)->echoid());
else
@ -419,11 +391,12 @@ void AreaList::SetAreaDesc(char* echoid, char* desc) {
// ------------------------------------------------------------------
#ifndef GMB_NOPCB
void PcbAdjustArea(uint rec, const char* msgfile) {
for(uint n=0; n<AL.size(); n++) {
Area* a = AL[n];
if(a->ispcboard()) {
if(streql(a->basetype(), "PCBOARD")) {
if((a->board() == rec) and (*a->path() == NUL)) {
a->set_path(msgfile);
break;
@ -435,6 +408,7 @@ void PcbAdjustArea(uint rec, const char* msgfile) {
}
}
}
#endif
// ------------------------------------------------------------------

View File

@ -39,11 +39,11 @@ void FixEchoid(char* echoid, int type) {
if(*echoid == NUL) {
const char* t = CFG->areaautoid == AUTOID_LONG ? "MAIL" : "";
if(type & AT_NET)
if(type & GMB_NET)
sprintf(echoid, "NET%s%03u", t, netnum++);
else if(type & AT_ECHO)
else if(type & GMB_ECHO)
sprintf(echoid, "ECHO%s%03u", t, echonum++);
else if(type & AT_LOCAL)
else if(type & GMB_LOCAL)
sprintf(echoid, "LOCAL%03u", localnum++);
}
}
@ -111,14 +111,14 @@ void CheckEMailOrNews(char* echoid, uint& type) {
for(i = CFG->areaisemail.begin(); i != CFG->areaisemail.end(); i++) {
if(strwild(echoid, i->c_str())) {
type = AT_EMAIL | AT_NET;
type = GMB_EMAIL | GMB_NET;
break;
}
}
for(i = CFG->areaisnews.begin(); i != CFG->areaisnews.end(); i++) {
if(strwild(echoid, i->c_str())) {
type = AT_NEWSGROUP | AT_ECHO;
type = GMB_NEWSGROUP | GMB_ECHO;
break;
}
}
@ -150,7 +150,7 @@ void AreaList::AddNewArea(AreaCfg* aa) {
if(veryverbose) {
std::string temp;
std::cout << " fmt=" << aa->msgbase << ", eid=\"" << aa->echoid <<
std::cout << " fmt=" << aa->basetype << ", eid=\"" << aa->echoid <<
"\", pth=\"" << aa->path << "\", brd=" << aa->board <<
", gid=" << aa->groupid << ", aka=" << aa->aka.make_string(temp);
std::cout << " " << aa->attr.make_string(temp) << std::endl;
@ -165,93 +165,96 @@ void AreaList::AddNewArea(AreaCfg* aa) {
*desc = NUL;
// Make sure the path field is 100% correct for the msgbase
switch(aa->msgbase) {
case MT_FTS1:
case MT_OPUS:
if(*aa->path == NUL)
return;
MapPath(aa->path);
AddBackslash(aa->path);
strschg_environ(aa->path);
break;
#ifndef GMB_NOHUDS
case MT_HUDSON:
if((aa->board < 1) or (aa->board > 200)) // Ignore areas with invalid numbers
return;
sprintf(aa->path, "%u", aa->board);
break;
#endif
#ifndef GMB_NOGOLD
case MT_GOLDBASE:
if((aa->board < 1) or (aa->board > 500)) // Ignore areas with invalid numbers
return;
sprintf(aa->path, "%u", aa->board);
break;
#endif
#ifndef GMB_NOEZY
case MT_EZYCOM:
// Ignore areas with invalid numbers
if((aa->board < 1) or (aa->board > 1536))
return;
sprintf(aa->path, "%u", aa->board);
break;
#endif
#ifndef GMB_NOWCAT
case MT_WILDCAT:
if(*aa->path == NUL)
return;
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
break;
#endif
#ifndef GMB_NOXBBS
case MT_ADEPTXBBS:
if(*aa->path == NUL)
return;
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
break;
#endif
#ifndef GMB_NOSQSH
case MT_SQUISH:
#endif
#ifndef GMB_NOJAM
case MT_JAM:
#endif
#if !defined(GMB_NOJAM) || !defined(GMB_NOSQSH)
if(*aa->path == NUL)
return;
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
break;
#endif
#ifndef GMB_NOPCB
case MT_PCBOARD:
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
break;
#endif
#ifndef GMB_NOSMB
case MT_SMB:
if(*aa->path == NUL)
return;
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
break;
#endif
case MT_SEPARATOR:
break;
default:
if(streql(aa->basetype, "FTS1") or streql(aa->basetype, "OPUS")) {
if(*aa->path == NUL)
return;
MapPath(aa->path);
AddBackslash(aa->path);
strschg_environ(aa->path);
}
#ifndef GMB_NOHUDS
else if(streql(aa->basetype, "HUDSON")) {
if((aa->board < 1) or (aa->board > 200)) // Ignore areas with invalid numbers
return;
sprintf(aa->path, "%u", aa->board);
}
#endif
#ifndef GMB_NOGOLD
else if(streql(aa->basetype, "GOLDBASE")) {
if((aa->board < 1) or (aa->board > 500)) // Ignore areas with invalid numbers
return;
sprintf(aa->path, "%u", aa->board);
}
#endif
#ifndef GMB_NOEZY
else if(streql(aa->basetype, "EZYCOM")) {
// Ignore areas with invalid numbers
if((aa->board < 1) or (aa->board > 1536))
return;
sprintf(aa->path, "%u", aa->board);
}
#endif
#ifndef GMB_NOWCAT
else if(streql(aa->basetype, "WILDCAT")) {
if(*aa->path == NUL)
return;
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
}
#endif
#ifndef GMB_NOXBBS
else if(streql(aa->basetype, "ADEPTXBBS")) {
if(*aa->path == NUL)
return;
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
}
#endif
#ifndef GMB_NOSQSH
else if(streql(aa->basetype, "SQUISH")) {
if(*aa->path == NUL)
return;
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
}
#endif
#ifndef GMB_NOJAM
else if(streql(aa->basetype, "JAM")) {
if(*aa->path == NUL)
return;
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
}
#endif
#ifndef GMB_NOPCB
else if(streql(aa->basetype, "PCBOARD")) {
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
}
#endif
#ifndef GMB_NOSMB
else if(streql(aa->basetype, "SMB")) {
if(*aa->path == NUL)
return;
MapPath(aa->path);
StripBackslash(aa->path);
strschg_environ(aa->path);
}
#endif
else if(streql(aa->basetype, "SEPARATOR")) {
}
else {
return;
}
// Note msgbase type
msgbases |= aa->msgbase;
if(not find(basetypes, aa->basetype))
basetypes.push_back(aa->basetype);
// Things to do for real areas only
if(not aa->isseparator()) {
@ -296,10 +299,11 @@ void AreaList::AddNewArea(AreaCfg* aa) {
break;
}
else if(not (*ap)->isseparator()) {
int eq_path = strieql(aa->path, (*ap)->path());
int eq_board = (aa->board == (*ap)->board());
int eq_msgbase = (aa->msgbase == (*ap)->msgbase());
int eq_isfido = (aa->isfido() and (*ap)->isfido());
bool eq_path = strieql(aa->path, (*ap)->path());
bool eq_board = (aa->board == (*ap)->board());
bool eq_msgbase = streql(aa->basetype, (*ap)->basetype());
bool eq_isfido = ((streql(aa->basetype, "OPUS") or streql(aa->basetype, "FTS1"))
and (streql((*ap)->basetype(), "OPUS") or streql((*ap)->basetype(), "FTS1")));
if(eq_path and eq_board and (eq_msgbase or eq_isfido)) {
// We had it already, so override with the new data
newarea = false;
@ -321,7 +325,7 @@ void AreaList::AddNewArea(AreaCfg* aa) {
// Increase area index size if new area
if(newarea) {
idx.push_back(NewArea(aa->msgbase));
idx.push_back(NewArea(aa->basetype));
throw_new(idx[_currarea]);
ap = idx.end(); --ap;
}
@ -348,7 +352,7 @@ void AreaList::AddNewArea(AreaCfg* aa) {
(*ap)->set_echoid(aa->echoid);
(*ap)->set_path(aa->path);
(*ap)->set_board(aa->board);
(*ap)->set_msgbase(aa->msgbase);
(*ap)->set_basetype(aa->basetype);
}
(*ap)->set_desc(newarea or strblank(desc) ? aa->desc : desc);
(*ap)->set_areaid(aa->areaid);
@ -473,81 +477,81 @@ void AreaList::GetArea(char* def) {
switch(toupper(*base)) { // Store area info
case '-':
aa.msgbase = MT_SEPARATOR;
aa.basetype = "SEPARATOR";
break;
case 'M':
aa.msgbase = MT_SQUISH;
aa.basetype = "SQUISH";
aa.setpath(loc);
break;
case 'Y':
aa.msgbase = MT_SMB;
aa.basetype = "SMB";
aa.setpath(loc);
break;
case 'H':
case 'R':
case 'Q':
aa.msgbase = MT_HUDSON;
aa.basetype = "HUDSON";
aa.board = (uint) atoi(loc);
break;
case 'G':
aa.msgbase = MT_GOLDBASE;
aa.basetype = "GOLDBASE";
aa.board = (uint) atoi(loc);
break;
case 'E':
aa.msgbase = MT_EZYCOM;
aa.basetype = "EZYCOM";
aa.board = (uint) atoi(loc);
break;
case 'J':
aa.msgbase = MT_JAM;
aa.basetype = "JAM";
aa.setpath(loc);
break;
case 'P':
aa.msgbase = MT_PCBOARD;
aa.basetype = "PCBOARD";
aa.setpath(loc);
break;
case 'W':
aa.msgbase = MT_WILDCAT;
aa.basetype = "WILDCAT";
aa.setpath(loc);
break;
case 'X':
aa.msgbase = MT_ADEPTXBBS;
aa.basetype = "ADEPTXBBS";
aa.setpath(loc);
break;
case 'S':
aa.msgbase = MT_FTS1;
aa.basetype = "FTS1";
aa.setpath(loc);
break;
case 'F':
case 'O':
default:
aa.msgbase = MT_OPUS;
aa.basetype = "OPUS";
aa.setpath(loc);
}
aa.type = AT_ECHO;
aa.type = GMB_ECHO;
aa.attr = CFG->attribsecho;
strupr(base);
if(strchr(base, 'N')) {
aa.type = AT_NET;
aa.type = GMB_NET;
aa.attr = CFG->attribsnet;
}
if(strchr(base, 'L')) {
aa.type = AT_LOCAL;
aa.type = GMB_LOCAL;
aa.attr = CFG->attribslocal;
}
if(strchr(base, 'E')) {
aa.type = AT_ECHO;
aa.type = GMB_ECHO;
aa.attr = CFG->attribsecho;
}
if(attr) { // Get attributes and AKAs
@ -607,23 +611,23 @@ bool AreaList::GetAreaFirstPart(AreaCfg& aa, char*& key, char*& val) {
word crc = getkeyvalcrc(&key, &val);
switch(crc) {
case CRC_NET:
aa.type = AT_NET;
aa.type = GMB_NET;
aa.attr = CFG->attribsnet;
break;
case CRC_ECHO:
aa.type = AT_ECHO;
aa.type = GMB_ECHO;
aa.attr = CFG->attribsecho;
break;
case CRC_LOCAL:
aa.type = AT_LOCAL;
aa.type = GMB_LOCAL;
aa.attr = CFG->attribslocal;
break;
case CRC_EMAIL:
aa.type = AT_EMAIL | AT_NET;
aa.type = GMB_EMAIL | GMB_NET;
aa.attr = CFG->attribsemail;
break;
case CRC_NEWS:
aa.type = AT_NEWSGROUP | AT_ECHO;
aa.type = GMB_NEWSGROUP | GMB_ECHO;
aa.attr = CFG->attribsnews;
break;
default:
@ -642,7 +646,7 @@ void AreaList::GetAreaSep(char* val) {
AreaCfg aa;
aa.reset();
aa.msgbase = MT_SEPARATOR;
aa.basetype = "SEPARATOR";
if(not GetAreaFirstPart(aa, key, val))
return;
@ -695,22 +699,22 @@ void AreaList::GetAreaDef(char* val) {
getkeyval(&key, &val); // Get path/board
switch(crc) {
case CRC_SEP:
aa.msgbase = MT_SEPARATOR;
aa.basetype = "SEPARATOR";
break;
case CRC_FIDO:
case CRC_OPUS:
case CRC_SDMSG:
aa.msgbase = MT_OPUS;
aa.basetype = "OPUS";
aa.setpath(key);
break;
case CRC_FTS1:
case CRC_FTSC:
aa.msgbase = MT_FTS1;
aa.basetype = "FTS1";
aa.setpath(key);
break;
case CRC_QBBS:
case CRC_HUDSON:
aa.msgbase = MT_HUDSON;
aa.basetype = "HUDSON";
aa.board = (uint) atoi(key);
if((aa.board < 1) or (aa.board > 200)) {
return;
@ -718,40 +722,40 @@ void AreaList::GetAreaDef(char* val) {
break;
case CRC_GOLD:
case CRC_GOLDBASE:
aa.msgbase = MT_GOLDBASE;
aa.basetype = "GOLDBASE";
aa.board = atoi(key);
if((aa.board < 1) or (aa.board > 500)) {
return;
}
break;
case CRC_SQUISH:
aa.msgbase = MT_SQUISH;
aa.basetype = "SQUISH";
aa.setpath(key);
break;
case CRC_SMB:
aa.msgbase = MT_SMB;
aa.basetype = "SMB";
aa.setpath(key);
break;
case CRC_EZYCOM:
aa.msgbase = MT_EZYCOM;
aa.basetype = "EZYCOM";
aa.board = atoi(key);
break;
case CRC_JAM:
aa.msgbase = MT_JAM;
aa.basetype = "JAM";
aa.setpath(key);
break;
case CRC_PCB:
case CRC_PCBOARD:
aa.msgbase = MT_PCBOARD;
aa.basetype = "PCBOARD";
aa.setpath(key);
break;
case CRC_WCAT:
case CRC_WILDCAT:
aa.msgbase = MT_WILDCAT;
aa.basetype = "WILDCAT";
aa.setpath(key);
break;
case CRC_XBBS:
aa.msgbase = MT_ADEPTXBBS;
aa.basetype = "ADEPTXBBS";
aa.setpath(key);
break;
default:

View File

@ -450,19 +450,19 @@ int InstallFinish() {
fprintf(fp, "ADDRESS %s\n", buf);
CfgAddress(buf);
}
if(AL.msgbases == 0) {
if(AL.basetypes.empty()) {
if(EnterString("Please enter the path to your *.msg netmail area:", buf, sizeof(buf)))
return -1;
fprintf(fp, "AREADEF NETMAIL \"Netmail\" 0 Net Opus %s\n", buf);
AreaCfg aa;
aa.reset();
aa.setdesc("Netmail");
aa.setechoid("NETMAIL");
aa.msgbase = MT_OPUS;
aa.type = AT_NET;
aa.basetype = "OPUS";
aa.type = GMB_NET;
aa.setpath(buf);
aa.attr = CFG->attribsnet;
AL.AddNewArea(&aa);
fprintf(fp, "AREADEF %s \"%s\" 0 Net %s %s\n", aa.desc, aa.echoid, aa.basetype, buf);
if(EnterString("Please enter the path *and* filename of your areas.bbs file:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "AREAFILE AreasBBS %s\n", buf);
@ -471,7 +471,7 @@ int InstallFinish() {
AL.GetAreafile(buf2);
}
#ifndef GMB_NOHUDS
if((AL.msgbases & MT_HUDSON) and (*CFG->hudsonpath == NUL)) {
if(find(AL.basetypes, "HUDSON") and (*CFG->hudsonpath == NUL)) {
if(EnterString("Please enter the path to your Hudson msgbase files:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "HUDSONPATH %s\n", buf);
@ -479,7 +479,7 @@ int InstallFinish() {
}
#endif
#ifndef GMB_NOGOLD
if((AL.msgbases & MT_GOLDBASE) and (*CFG->goldbasepath == NUL)) {
if(find(AL.basetypes, "GOLDBASE") and (*CFG->goldbasepath == NUL)) {
if(EnterString("Please enter the path to your Goldbase msgbase files:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "GOLDBASEPATH %s\n", buf);
@ -487,7 +487,7 @@ int InstallFinish() {
}
#endif
#ifndef GMB_NOJAM
if((AL.msgbases & MT_JAM) and (*CFG->jampath == NUL)) {
if(find(AL.basetypes, "JAM") and (*CFG->jampath == NUL)) {
if(EnterString("Please enter the path where net/echomail.jam can be placed:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "JAMPATH %s\n", buf);
@ -495,7 +495,7 @@ int InstallFinish() {
}
#endif
#ifndef GMB_NOPCB
if((AL.msgbases & MT_PCBOARD) and (*CFG->pcboardpath == NUL)) {
if(find(AL.basetypes, "PCBOARD") and (*CFG->pcboardpath == NUL)) {
if(EnterString("Please enter the path to PCBoard:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "PCBOARDPATH %s\n", buf);
@ -717,7 +717,7 @@ CfgGed::CfgGed() {
encodeemailheaders = true;
externoptions = EXTUTIL_CLS | EXTUTIL_CURSOR | EXTUTIL_RELOAD | EXTUTIL_PAUSEONERROR | EXTUTIL_KEEPCTRL;
ezycomuserno = 0;
fidomsgtype = MT_OPUS;
fidomsgtype = "OPUS";
fidouserno = 0;
forcetemplate = false;
frqoptions = FREQ_FROMTOP;
@ -840,11 +840,11 @@ CfgGed::CfgGed() {
disphdrnodeset.pos = 44;
// unsorted structures
areatypeorder[AT_NET] = 1;
areatypeorder[AT_NET|AT_EMAIL] = 2;
areatypeorder[AT_ECHO] = 3;
areatypeorder[AT_ECHO|AT_NEWSGROUP] = 4;
areatypeorder[AT_LOCAL] = 5;
areatypeorder[GMB_NET] = 1;
areatypeorder[GMB_NET|GMB_EMAIL] = 2;
areatypeorder[GMB_ECHO] = 3;
areatypeorder[GMB_ECHO|GMB_NEWSGROUP] = 4;
areatypeorder[GMB_LOCAL] = 5;
if(gvid->adapter & V_MONO)
memcpy(color, gold_mono1, sizeof(color));
else

View File

@ -845,7 +845,7 @@ int ReadCfg(const char* cfgfile, int ignoreunknown) {
*ptr = NUL;
Area* ap = AL.AreaEchoToPtr(buf2);
if(ap)
ap->set_type(ap->isnet() ? AT_SOUP|AT_EMAIL|AT_NET : AT_SOUP|AT_NEWSGROUP|AT_ECHO);
ap->set_type(ap->isnet() ? GMB_SOUP|GMB_EMAIL|GMB_NET : GMB_SOUP|GMB_NEWSGROUP|GMB_ECHO);
}
}
gfp.fclose();
@ -854,14 +854,14 @@ int ReadCfg(const char* cfgfile, int ignoreunknown) {
if(*CFG->soupemail) {
Area* ap = AL.AreaEchoToPtr(buf);
if(ap)
ap->set_type(AT_SOUP|AT_EMAIL|AT_NET);
ap->set_type(GMB_SOUP|GMB_EMAIL|GMB_NET);
}
std::vector<MailList>::iterator z;
for(z = CFG->mailinglist.begin(); z != CFG->mailinglist.end(); z++) {
Area* ap = AL.AreaEchoToPtr(z->echoid);
if(ap)
ap->set_type(AT_SOUP|AT_EMAIL|AT_NET);
ap->set_type(GMB_SOUP|GMB_EMAIL|GMB_NET);
}
// Mark all QWK areas
@ -871,7 +871,7 @@ int ReadCfg(const char* cfgfile, int ignoreunknown) {
do {
Area* ap = AL.AreaEchoToPtr(buf);
if(ap)
ap->set_type(ap->type() | AT_QWK);
ap->set_type(ap->type() | GMB_QWK);
} while(QWK->NextConf());
}
} while(QWK->NextBBS());

View File

@ -113,11 +113,11 @@ void CfgAreatypeorder() {
if(t.First(val)) {
do {
switch(strCrc16(t.Token())) {
case CRC_NET: CFG->areatypeorder[AT_NET] = order; break;
case CRC_EMAIL: CFG->areatypeorder[AT_NET|AT_EMAIL] = order; break;
case CRC_ECHO: CFG->areatypeorder[AT_ECHO] = order; break;
case CRC_NEWS: CFG->areatypeorder[AT_ECHO|AT_NEWSGROUP] = order; break;
case CRC_LOCAL: CFG->areatypeorder[AT_LOCAL] = order; break;
case CRC_NET: CFG->areatypeorder[GMB_NET] = order; break;
case CRC_EMAIL: CFG->areatypeorder[GMB_NET|GMB_EMAIL] = order; break;
case CRC_ECHO: CFG->areatypeorder[GMB_ECHO] = order; break;
case CRC_NEWS: CFG->areatypeorder[GMB_ECHO|GMB_NEWSGROUP] = order; break;
case CRC_LOCAL: CFG->areatypeorder[GMB_LOCAL] = order; break;
}
order++;
} while(t.Next());

View File

@ -196,9 +196,9 @@ void CfgFidolastread() {
void CfgFidomsgtype() {
if(striinc("FTS", val))
CFG->fidomsgtype = MT_FTS1;
CFG->fidomsgtype = "FTS1";
else
CFG->fidomsgtype = MT_OPUS;
CFG->fidomsgtype = "OPUS";
}
// ------------------------------------------------------------------

View File

@ -34,22 +34,22 @@ AreaList AL;
int AreaTypeOrder[17] = {
0,
1, // AT_NET
2, // AT_EMAIL
3, // AT_NET | AT_EMAIL
4, // AT_ECHO
1, // GMB_NET
2, // GMB_EMAIL
3, // GMB_NET | GMB_EMAIL
4, // GMB_ECHO
5,
6,
7,
8, // AT_NEWSGROUP
8, // GMB_NEWSGROUP
9,
10,
11,
12, // AT_ECHO | AT_NEWSGROUP
12, // GMB_ECHO | GMB_NEWSGROUP
13,
14,
15,
16 // AT_LOCAL
16 // GMB_LOCAL
};
@ -274,14 +274,12 @@ extern "C" int AreaListCmp(const Area** __a, const Area** __b) {
if(A->isseparator() and B->isseparator())
break;
else if(A->isseparator()) {
if(B->msgbase())
return sepfirst?-1:1;
return sepfirst?-1:1;
}
else if(B->isseparator()) {
if(A->msgbase())
return sepfirst?1:-1;
return sepfirst?1:-1;
}
else if((cmp = compare_two(A->msgbase(), B->msgbase())) != 0)
else if((cmp = strcmp(A->basetype(), B->basetype())) != 0)
return cmp;
break;
case 'Y':

View File

@ -213,7 +213,7 @@ public:
Ezycom ezycom;
int ezycomuserno;
Path fidolastread; // lastread;
int fidomsgtype;
const char *fidomsgtype;
Path fidouserlist;
int fidouserno; // lastreaduser;
std::vector<FileAlias> filealias;

View File

@ -118,10 +118,10 @@ void Area::DeleteMsg(GMsg* msg, int direction) {
DelMsg(msg);
// Update scanning files
if(isnet() and isfido())
if(isnet())
TouchNetscan(false);
if(not issmb() and not iswildcat() and not (isjam() and not CFG->switches.get(jamharddelete))) {
if(issoftdelete()) {
// Remove message from internal table
Msgn.Del(msg->msgno);
}
@ -460,9 +460,8 @@ void CmfMsgs(GMsg* msg) {
msg->link.reset();
// Fake Scn-Attribute if copied to squisharea
if(AA->issquish() and not AAorig->issquish())
if(msg->attr.loc() and msg->attr.snt())
msg->attr.scn1();
if(msg->attr.loc() and msg->attr.snt())
msg->attr.scn1();
if(AA->Areacopyaddid() and not AA->isnet()) {
char* ptr = msg->txt + (*msg->txt == CTRL_A);
@ -480,7 +479,7 @@ void CmfMsgs(GMsg* msg) {
bool need_fmpt = true;
bool need_topt = true;
if(not need_netmail_kludges and AAorig->issquish() and not AAdest->issquish() and AAdest->isnet() and AAorig->isnet()) {
if(not need_netmail_kludges and streql(AAorig->basetype(), "SQUISH") and strcmp(AAdest->basetype(), "SQUISH") and AAdest->isnet() and AAorig->isnet()) {
if(msg->orig.point and not strstr(msg->txt, "\001FMPT"))
need_netmail_kludges = true;
else

View File

@ -85,7 +85,7 @@ void MakeFlags(GMsg* msg, Line** line, char* buf) {
// The FrontDoor FLAGS netmail kludge
if(CFG->switches.get(useflags)) {
sprintf(buf, "\001FLAGS ");
if(AA->ishudson()) {
if(streql(AA->basetype(), "HUDSON")) {
if(msg->attr.hld())
strcat(buf, "HLD ");
if(msg->attr.frq())
@ -338,7 +338,7 @@ void DoKludges(int mode, GMsg* msg, int kludges) {
msg->orig.make_string(buf2, msg->odom);
sprintf(msg->msgids, "%s %08lx", buf2, getMsgId());
}
if(CFG->switches.get(usemsgid) and not AA->ispcboard()) {
if(CFG->switches.get(usemsgid) and strcmp(AA->basetype(), "PCBOARD")) {
sprintf(buf, "\001MSGID: %s", msg->msgids);
line = AddKludge(line, buf);
line->kludge = GKLUD_MSGID;
@ -429,14 +429,14 @@ void DoKludges(int mode, GMsg* msg, int kludges) {
char* ptr = *msg->ito ? msg->ito : msg->to;
strxcpy(buf2, ptr, 1024);
ParseInternetAddr(buf2, _toname, _toaddr);
if(_toname[0] != NUL) {
/*--- if(_toname[0] != NUL) {
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-" : "", quot, buf2, quot, _toaddr);
}
else if(stricmp(_toname, AA->Whoto())) {
else ---*/ if(stricmp(_toname, AA->Whoto())) {
mime_header_encode(buf2, _toname, msg);
char quot[2] = "\"";
if((buf2[0] == '\"') or (strpbrk(buf2, " \t") == NULL))

View File

@ -375,13 +375,13 @@ char* GetCurrQuotebuf(char* quotebuf) {
MakePathname(quotebuf, CFG->goldpath, quotebuf);
}
else {
if(AA->isezycom())
if(streql(AA->basetype(), "EZYCOM"))
sprintf(quotebuf, "%sgld%05u.qbf", CFG->ezycom.msgbasepath, AA->board());
else if(AA->isfido())
else if(streql(AA->basetype(), "FTS1") or streql(AA->basetype(), "OPUS"))
sprintf(quotebuf, "%s%s", AA->path(), "golded.qbf");
else if(AA->isgoldbase())
else if(streql(AA->basetype(), "GOLDBASE"))
sprintf(quotebuf, "%sgoldg%03u.qbf", CFG->goldbasepath, AA->board());
else if(AA->ishudson())
else if(streql(AA->basetype(), "HUDSON"))
sprintf(quotebuf, "%sgoldh%03u.qbf", CFG->hudsonpath, AA->board());
else
sprintf(quotebuf, "%s%s", AA->path(), ".qbf");

View File

@ -64,41 +64,41 @@ void Cleanup(void) {
AL.Reset();
#ifndef GMB_NOXBBS
if(AL.msgbases & MT_ADEPTXBBS)
if(find(AL.basetypes, "ADEPTXBBS"))
XbbsExit();
#endif
#ifndef GMB_NOEZY
if(AL.msgbases & MT_EZYCOM)
if(find(AL.basetypes, "EZYCOM"))
EzycomExit();
#endif
if(AL.msgbases & MT_FIDO)
if(find(AL.basetypes, "OPUS") or find(AL.basetypes, "FTS1"))
FidoExit();
#ifndef GMB_NOGOLD
if(AL.msgbases & MT_GOLDBASE)
if(find(AL.basetypes, "GOLDBASE"))
GoldExit();
#endif
#ifndef GMB_NOHUDS
if(AL.msgbases & MT_HUDSON)
if(find(AL.basetypes, "HUDSON"))
HudsExit();
#endif
#ifndef GMB_NOJAM
if(AL.msgbases & MT_JAM)
if(find(AL.basetypes, "JAM"))
JamExit();
#endif
#ifndef GMB_NOPCB
if(AL.msgbases & MT_PCBOARD)
if(find(AL.basetypes, "PCBOARD"))
PcbExit();
#endif
#ifndef GMB_NOSQSH
if(AL.msgbases & MT_SQUISH)
if(find(AL.basetypes, "SQUISH"))
SquishExit();
#endif
#ifndef GMB_NOWCAT
if(AL.msgbases & MT_WILDCAT)
if(find(AL.basetypes, "WILDCAT"))
WCatExit();
#endif
#ifndef GMB_NOSMB
if(AL.msgbases & MT_SMB)
if(find(AL.basetypes, "SMB"))
SMBExit();
#endif

View File

@ -1016,60 +1016,60 @@ void Initialize(int argc, char* argv[]) {
if(CFG->loadlanguage[0])
LoadLanguage(CFG->loadlanguage);
if(AL.msgbases & MT_FIDO) {
if(find(AL.basetypes, "OPUS") or find(AL.basetypes, "FTS1")) {
update_statuslinef("%s Fido", LNG->Checking);
FidoInit(CFG->fidolastread, CFG->switches.get(fidohwmarks), CFG->switches.get(fidonullfix), CFG->fidouserno, CFG->squishuserpath);
}
#ifndef GMB_NOEZY
if(AL.msgbases & MT_EZYCOM) {
if(find(AL.basetypes, "EZYCOM")) {
update_statuslinef("%s Ezycom", LNG->Checking);
EzycomInit(CFG->ezycom.msgbasepath, CFG->ezycom.userbasepath, CFG->ezycomuserno);
}
#endif
#ifndef GMB_NOGOLD
if(AL.msgbases & MT_GOLDBASE) {
if(find(AL.basetypes, "GOLDBASE")) {
update_statuslinef("%s Goldbase", LNG->Checking);
GoldInit(CFG->goldbasepath, CFG->goldbasesyspath, CFG->goldbaseuserno);
}
#endif
#ifndef GMB_NOHUDS
if(AL.msgbases & MT_HUDSON) {
if(find(AL.basetypes, "HUDSON")) {
update_statuslinef("%s Hudson", LNG->Checking);
HudsInit(CFG->hudsonpath, CFG->hudsonsyspath, CFG->hudsonuserno, CFG->hudsonsizewarn, CFG->ra2usersbbs);
}
#endif
#ifndef GMB_NOJAM
if(AL.msgbases & MT_JAM) {
if(find(AL.basetypes, "JAM")) {
update_statuslinef("%s JAM", LNG->Checking);
JamInit(CFG->jampath, CFG->switches.get(jamharddelete), CFG->switches.get(jamsmapihw));
}
#endif
#ifndef GMB_NOPCB
if(AL.msgbases & MT_PCBOARD) {
if(find(AL.basetypes, "PCBOARD")) {
update_statuslinef("%s PCBoard", LNG->Checking);
PcbInit(CFG->pcboardpath, CFG->pcboarduserno);
}
#endif
#ifndef GMB_NOSQSH
if(AL.msgbases & MT_SQUISH) {
if(find(AL.basetypes, "SQUISH")) {
update_statuslinef("%s Squish", LNG->Checking);
SquishInit(CFG->squishuserpath, CFG->squishuserno, CFG->switches.get(squishdirect), true, CFG->squishscan);
}
#endif
#ifndef GMB_NOWCAT
if(AL.msgbases & MT_WILDCAT) {
if(find(AL.basetypes, "WILDCAT")) {
update_statuslinef("%s WildCat!", LNG->Checking);
WCatInit(CFG->wildcatuserno);
}
#endif
#ifndef GMB_NOXBBS
if(AL.msgbases & MT_ADEPTXBBS) {
if(find(AL.basetypes, "ADEPTXBBS")) {
update_statuslinef("%s AdeptXBBS", LNG->Checking);
XbbsInit(CFG->adeptxbbspath, CFG->adeptxbbsuserno);
}
#endif
#ifndef GMB_NOSMB
if(AL.msgbases & MT_SMB) {
if(find(AL.basetypes, "SMB")) {
update_statuslinef("%s Synchronet", LNG->Checking);
SMBInit();
}

View File

@ -1889,7 +1889,7 @@ inline bool put_on_new_line(const char *ptr, const char *prev_ptr) {
void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
uint idx=0;
uint idx=0, idxadjust=0;
uint len;
int level=0;
uint n;
@ -1951,8 +1951,10 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
line = AddLine(line, "");
ptr = msg->txt;
uint _size = strlen(msg->txt);
if(streql(AA->basetype(), "OPUS") or streql(AA->basetype(), "FTS1"))
idxadjust = 190;
for(idx=0; idx < _size; ptr+=16,idx+=16) {
sprintf(buf, "%04X ", idx+(AA->isfido()?190:0));
sprintf(buf, "%04X ", idx+idxadjust);
HexDump16(buf+7, ptr, MinV((int)(_size-idx), 16), HEX_DUMP2);
line = AddLine(line, buf);
}

View File

@ -613,14 +613,10 @@ void GMsgList::Run() {
helpcat = H_MessageBrowser; // Window Help Category
listwrap = CFG->switches.get(displistwrap);
if(AA->Msglistdate() != MSGLISTDATE_NONE) {
if(AA->Msglistdate() != MSGLISTDATE_WRITTEN) {
if(AA->ishudson() or AA->isgoldbase() or AA->ispcboard())
AA->SetMsglistdate(MSGLISTDATE_WRITTEN);
else if((AA->isezycom() or AA->isfido()) and (AA->Msglistdate() == MSGLISTDATE_RECEIVED))
AA->SetMsglistdate(MSGLISTDATE_WRITTEN);
}
}
if((AA->Msglistdate() == MSGLISTDATE_RECEIVED) and not AA->havereceivedstamp())
AA->SetMsglistdate(MSGLISTDATE_WRITTEN);
else if((AA->Msglistdate() == MSGLISTDATE_ARRIVED) and not AA->havearrivedstamp())
AA->SetMsglistdate(MSGLISTDATE_WRITTEN);
mlst_with_date(AA->Msglistdate());

View File

@ -602,9 +602,9 @@ void GMsg::LinesToText() {
strxcpy(re, _buf, sizeof(ISub));
}
int _lfterm = EDIT->CrLfTerm() and not AA->ispcboard();
int _hardterm = AA->Edithardterm() or AA->ispcboard() or AA->iswildcat();
int _isezycom = AA->isezycom();
bool _lfterm = EDIT->CrLfTerm() and strcmp(AA->basetype(), "PCBOARD");
bool _hardterm = AA->Edithardterm() or AA->requirehardterm();
bool _softterm = AA->requiresoftterm();
uint _alloc_size = 1024;
Line* _line = lin;
@ -650,10 +650,10 @@ void GMsg::LinesToText() {
if(*_buf and not _line->ishard()) {
if(_line->next) {
if((*(_bptr-1) != ' ') and (*_line->next->txt.c_str() != ' '))
if(_isezycom or not _hardterm)
if(_softterm or not _hardterm)
*_bptr++ = ' ';
if(not _hardterm) {
if(_isezycom and not CFG->switches.get(dispsoftcr))
if(_softterm and not CFG->switches.get(dispsoftcr))
*_bptr++ = SOFTCR;
_hterm = false;
}

View File

@ -247,9 +247,9 @@ static void MakeMsg3(int& mode, GMsg* msg) {
tp->tm_isdst = -1;
time_t b = mktime(tp);
a += a - b;
if(AA->isjam() or AA->iswildcat())
if(AA->havereceivedstamp())
msg->received = a;
else
if(AA->havearrivedstamp())
msg->arrived = a;
}
@ -958,7 +958,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
throw_release(msg->references);
}
if(CurrArea == OrigArea) {
if((CFG->replylink == REPLYLINK_DIRECT) or AA->isjam())
if((CFG->replylink == REPLYLINK_DIRECT) or streql(AA->basetype(), "JAM"))
reply_msgno = omsg->msgno;
else if(CFG->replylink == REPLYLINK_CHAIN)
GetLastLink(omsg, reply_msgno);
@ -1110,7 +1110,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
if(AA->LoadHdr(reply, reply_msgno, false)) {
ulong replynext;
bool ok2save = false;
if(AA->issquish()) {
if(streql(AA->basetype(), "SQUISH")) {
if(reply->link.first()) {
for(int r=0; r<reply->link.list_max()-1; r++) {
if(reply->link.list(r) == 0) {
@ -1125,7 +1125,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
ok2save = true;
}
}
else if(AA->isjam()) {
else if(streql(AA->basetype(), "JAM")) {
if(reply->link.first()) {
replynext = reply->link.first();
do {

View File

@ -413,6 +413,7 @@ void ZonegateIt(ftn_addr& gate, ftn_addr& orig, ftn_addr& dest);
char* strtmp(const char* str);
int quotecolor(const char* line);
void doinvalidate(char* text, const char* find, const char* replace, bool is_tearline = false);
bool find(const std::vector<const char *> &vec, const char *str);
// ------------------------------------------------------------------

View File

@ -155,16 +155,13 @@ int AreaList::AreaScan(int mode, uint currno, int pmscan, int& pmails, int& pmar
currno = AreaIdToNo(currid);
#ifndef GMB_NOPCB
if(AL.msgbases & MT_PCBOARD) PcbWideOpen();
if(find(AL.basetypes, "PCBOARD")) PcbWideOpen();
#endif
#ifndef GMB_NOGOLD
if(AL.msgbases & MT_GOLDBASE) GoldWideOpen();
if(find(AL.basetypes, "GOLDBASE")) GoldWideOpen();
#endif
#ifndef GMB_NOHUDS
if(AL.msgbases & MT_HUDSON) HudsWideOpen();
#endif
#ifndef GMB_NOXBBS
if(AL.msgbases & MT_ADEPTXBBS) XbbsWideOpen();
if(find(AL.basetypes, "HUDSON")) HudsWideOpen();
#endif
for(uint n=0; n<idx.size(); n++) {
@ -264,17 +261,14 @@ int AreaList::AreaScan(int mode, uint currno, int pmscan, int& pmails, int& pmar
}
}
#ifndef GMB_NOXBBS
if(AL.msgbases & MT_ADEPTXBBS) XbbsWideClose();
#endif
#ifndef GMB_NOHUDS
if(AL.msgbases & MT_HUDSON) HudsWideClose();
if(find(AL.basetypes, "HUDSON")) HudsWideClose();
#endif
#ifndef GMB_NOGOLD
if(AL.msgbases & MT_GOLDBASE) GoldWideClose();
if(find(AL.basetypes, "GOLDBASE")) GoldWideClose();
#endif
#ifndef GMB_NOPCB
if(AL.msgbases & MT_PCBOARD) PcbWideClose();
if(find(AL.basetypes, "PCBOARD")) PcbWideClose();
#endif
return scanned;

View File

@ -602,3 +602,13 @@ char* strtmp(const char* str) {
// ------------------------------------------------------------------
bool find(const std::vector<const char *> &vec, const char *str) {
std::vector<const char *>::const_iterator i;
for(i = vec.begin(); i != vec.end(); i++)
if(streql(*i, str))
return true;
return false;
}

View File

@ -291,7 +291,7 @@ void Area::SaveMsg(int mode, GMsg* msg) {
echopost++;
}
if(isjam() and (isecho() or isnet())) {
if(streql(basetype(), "JAM") and (isecho() or isnet())) {
Path p;
sprintf(file, "%s%smail.jam", CFG->jampath, isecho() ? "echo" : "net");

View File

@ -191,7 +191,7 @@ public:
char sortspec[20];
// Active msgbases (bitmap of MT_* contants)
uint msgbases;
std::vector<const char *> basetypes;
// Additional items to the area scan menu
GAreaListScan ListScan;
@ -214,7 +214,7 @@ public:
void Reset();
// Return pointer to a new'd area of the specified format
Area* NewArea(int msgbase);
Area* NewArea(const char *basetype);
// Sort areas
void Sort(const char* specs=NULL, int first=0, int last=-1);
@ -393,7 +393,7 @@ public:
int areaid() const { return area->areaid(); }
int groupid() const { return area->groupid(); }
uint type() const { return area->type(); }
uint msgbase() const { return area->msgbase(); }
const char *basetype() const { return area->basetype(); }
uint board() const { return area->board(); }
const ftn_addr& aka() const { return area->aka(); }
int originno() const { return area->originno(); }
@ -418,7 +418,7 @@ public:
void set_areaid(int a) { area->set_areaid(a); }
void set_groupid(int g) { area->set_groupid(g); }
void set_type(uint t) { area->set_type(t); }
void set_msgbase(uint m) { area->set_msgbase(m); }
void set_basetype(const char *m) { area->set_basetype(m); }
void set_board(uint b) { area->set_board(b); }
void set_aka(ftn_addr& a) { area->set_aka(a); }
void set_originno(int o) { area->set_originno(o); }
@ -439,20 +439,17 @@ public:
// ----------------------------------------------------------------
// Determine msgbase format
bool isseparator() const;
int isfts1() const;
int isopus() const;
int isezycom() const;
int isfido() const;
int isgoldbase() const;
int ishudson() const;
int isjam() const;
int ispcboard() const;
int issquish() const;
int issmb() const;
int iswildcat() const;
int isadeptxbbs() const;
int isseparator() const;
// ----------------------------------------------------------------
// Determine area features
bool issoftdelete() const;
bool havearrivedstamp() const;
bool havereceivedstamp() const;
bool requirehardterm() const;
bool requiresoftterm() const;
// ----------------------------------------------------------------
@ -607,19 +604,13 @@ public:
// ------------------------------------------------------------------
// Inline implementations
inline int Area::isfts1() const { return area->isfts1(); }
inline int Area::isopus() const { return area->isopus(); }
inline int Area::isezycom() const { return area->isezycom(); }
inline int Area::isfido() const { return area->isfido(); }
inline int Area::isgoldbase() const { return area->isgoldbase(); }
inline int Area::ishudson() const { return area->ishudson(); }
inline int Area::isjam() const { return area->isjam(); }
inline int Area::ispcboard() const { return area->ispcboard(); }
inline int Area::issquish() const { return area->issquish(); }
inline int Area::issmb() const { return area->issmb(); }
inline int Area::iswildcat() const { return area->iswildcat(); }
inline int Area::isadeptxbbs() const { return area->isadeptxbbs(); }
inline int Area::isseparator() const { return area->isseparator(); }
inline bool Area::isseparator() const { return area->isseparator(); }
inline bool Area::issoftdelete() const { return area->issoftdelete(); }
inline bool Area::havearrivedstamp() const { return area->havearrivedstamp(); }
inline bool Area::havereceivedstamp() const { return area->havereceivedstamp(); }
inline bool Area::requirehardterm() const { return area->requirehardterm(); }
inline bool Area::requiresoftterm() const { return area->requiresoftterm(); }
inline int Area::isnet() const { return area->isnet(); }
inline int Area::isecho() const { return area->isecho(); }
@ -656,22 +647,6 @@ inline void Area::ResetHighwaterMark() { area->reset_highwater_mark(); }
inline void Area::UpdateTimesread(GMsg* msg) { area->update_timesread(msg); }
// ------------------------------------------------------------------
class MsgbaseManager {
public:
void Init();
void Exit();
void WideScanBegin();
void WideScanEnd();
};
// ------------------------------------------------------------------
// Arealist picker class

View File

@ -9,7 +9,7 @@ else
ifeq ($(TERM),cygwin)
INCS+=-I$(TOP)/goldlib/glibc
else
ifeq ($(TERM),MSYS)
ifeq ($(TERM),msys)
INCS+=-I$(TOP)/goldlib/glibc
endif
endif

View File

@ -52,6 +52,7 @@ extern dword __crc32_table[];
// prototyped unsigned parameters anyway, so we have no problem here.
inline word updCrc16(byte ch, word crc) { return (word)(__crc16_table[byte(crc >> 8)] ^ (crc << 8) ^ (ch)); }
inline word updCrc16c(byte ch, word crc) { return (word)(__crc16_table[byte(crc >> 8) ^ (ch)] ^ (crc << 8)); }
inline dword updCrc32(byte ch, dword crc) { return (dword)(__crc32_table[byte(crc) ^ byte(ch)] ^ (crc >> 8)); }
@ -68,6 +69,7 @@ const dword CRC32_MASK_CCITT = 0xFFFFFFFFUL;
// Prototypes
word strCrc16(const char* s, bool nocase=true, word mask=CRC16_MASK_NORMAL);
word strCrc16c(const char* s, bool nocase=true, word mask=CRC16_MASK_NORMAL);
dword strCrc32(const char* s, bool nocase=true, dword mask=CRC32_MASK_NORMAL);
dword strHash32(const char* s, bool nocase=true);

View File

@ -49,5 +49,25 @@ word strCrc16(const char* s, bool __case, word mask) {
}
// ------------------------------------------------------------------
// Generate bugfree CRC-16 of a normal nul-terminated string
word strCrc16c(const char* s, bool __case, word mask) {
word crc = mask;
if(__case) {
while(*s)
crc = updCrc16c(toupper(*s++), crc);
}
else {
while(*s)
crc = updCrc16c(*s++, crc);
}
return crc;
}
// ------------------------------------------------------------------

View File

@ -40,7 +40,8 @@ gareafile::gareafile() {
quiet = true;
sharemode = 0;
fidomsgtype = 0;
// fidomsgtype = 0;
fidomsgtype = "";
ra2usersbbs = 0;
squishuserno = 0;
@ -87,7 +88,7 @@ void AreaCfg::reset() {
groupid = 0;
originno = 0;
board = 0;
msgbase = 0;
basetype = "";
aka.reset();
type = GMB_NONE;
scan = 0;
@ -139,7 +140,7 @@ AreaCfg& AreaCfg::operator=(const AreaCfg& AC) {
this->groupid = AC.groupid;
this->originno = AC.originno;
this->board = AC.board;
this->msgbase = AC.msgbase;
this->basetype = AC.basetype;
this->aka = AC.aka;
this->type = AC.type;
this->scan = AC.scan;

View File

@ -71,26 +71,6 @@ const uint GMB_NONE = 0x00ff;
const uint GMB_DEFAULT = 0xf00f;
// ------------------------------------------------------------------
// Msgbase types
const uint GMB_HUDSON = 0x0001;
const uint GMB_GOLDBASE = 0x0002;
const uint GMB_JAM = 0x0004;
const uint GMB_SQUISH = 0x0008;
const uint GMB_OPUS = 0x0010;
const uint GMB_FTS1 = 0x0020;
const uint GMB_FIDO = 0x0030;
const uint GMB_EZYCOM = 0x0040;
const uint GMB_PCBOARD = 0x0080;
const uint GMB_WILDCAT = 0x0100;
const uint GMB_ADEPTXBBS = 0x0200;
const uint GMB_MAILBOX = 0x1000;
const uint GMB_NEWSSPOOL = 0x2000;
const uint GMB_SEPARATOR = 0x8000;
const uint GMB_SMB = 0x10000;
// ------------------------------------------------------------------
class AreaCfgBase {
@ -102,7 +82,7 @@ public:
int originno; // Origin number
uint board; // Board number (Hudson/Goldbase/Ezycom/PCBoard fmts)
uint type; // Type of msgarea (GMB_xxx)
uint msgbase; // Type of msgbase (GMB_xxx)
const char *basetype; // Type of msgbase
ftn_addr aka; // The AKA to use in the area
ftn_attr attr; // Default attributes
byte scan : 1; // TRUE if listed with AREASCAN
@ -114,19 +94,7 @@ public:
int setorigin(std::string& origin);
bool isfts1() const { return !!(msgbase & GMB_FTS1); }
bool isopus() const { return !!(msgbase & GMB_OPUS); }
bool isezycom() const { return !!(msgbase & GMB_EZYCOM); }
bool isfido() const { return !!(msgbase & (GMB_FTS1|GMB_OPUS)); }
bool isgoldbase() const { return !!(msgbase & GMB_GOLDBASE); }
bool ishudson() const { return !!(msgbase & GMB_HUDSON); }
bool isjam() const { return !!(msgbase & GMB_JAM); }
bool ispcboard() const { return !!(msgbase & GMB_PCBOARD); }
bool issquish() const { return !!(msgbase & GMB_SQUISH); }
bool iswildcat() const { return !!(msgbase & GMB_WILDCAT); }
bool isadeptxbbs() const { return !!(msgbase & GMB_ADEPTXBBS); }
bool isseparator() const { return !!(msgbase & GMB_SEPARATOR); }
bool issmb() const { return !!(msgbase & GMB_SMB); }
bool isseparator() const { return streql(basetype, "SEPARATOR"); }
bool isnet() const { return !!(type & GMB_NET); }
bool isecho() const { return !!(type & GMB_ECHO); }
@ -237,7 +205,7 @@ protected:
#endif
#ifndef GCFG_NOWATERGATE
// Watergate parser function
uint gettype(uint msgtype, const byte wtrtype);
const char *gettype(const char *msgtype, const byte wtrtype);
#endif
#ifndef GCFG_NOXMAIL
// XMail parser function
@ -320,7 +288,7 @@ public:
int quiet;
int sharemode;
int fidomsgtype;
const char *fidomsgtype;
int ra2usersbbs;
int squishuserno;
@ -468,37 +436,6 @@ void CfgPcboardpath(const char *path, bool force = false);
void CfgSquishuserpath(const char *path, bool force = false);
void CfgFidolastread(const char *path);
// ------------------------------------------------------------------
// Legacy area types
const uint AT_NET = GMB_NET;
const uint AT_EMAIL = GMB_EMAIL;
const uint AT_ECHO = GMB_ECHO;
const uint AT_NEWSGROUP = GMB_NEWSGROUP;
const uint AT_LOCAL = GMB_LOCAL;
const uint AT_QWK = GMB_QWK;
const uint AT_SOUP = GMB_SOUP;
// ------------------------------------------------------------------
// Legacy msgbase types
const uint MT_HUDSON = GMB_HUDSON;
const uint MT_GOLDBASE = GMB_GOLDBASE;
const uint MT_JAM = GMB_JAM;
const uint MT_SQUISH = GMB_SQUISH;
const uint MT_OPUS = GMB_OPUS;
const uint MT_FTS1 = GMB_FTS1;
const uint MT_FIDO = GMB_FIDO;
const uint MT_EZYCOM = GMB_EZYCOM;
const uint MT_PCBOARD = GMB_PCBOARD;
const uint MT_WILDCAT = GMB_WILDCAT;
const uint MT_ADEPTXBBS = GMB_ADEPTXBBS;
const uint MT_MAILBOX = GMB_MAILBOX;
const uint MT_NEWSSPOOL = GMB_NEWSSPOOL;
const uint MT_SEPARATOR = GMB_SEPARATOR;
const uint MT_SMB = GMB_SMB;
// ------------------------------------------------------------------

View File

@ -60,21 +60,21 @@ void gareafile::ReadAreasBBS(char* tag) {
aa.attr = attribsecho;
aa.board = atoi(path);
if(aa.board and (aa.board < 201))
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
else if((aa.board > 200) and (aa.board < 501))
aa.msgbase = GMB_GOLDBASE;
aa.basetype = "GOLDBASE";
else if(*path == '$') {
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
adjustpath(path+1);
aa.setpath(path+1);
}
else if(*path == '!') {
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
adjustpath(path+1);
aa.setpath(path+1);
}
else {
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
adjustpath(path);
aa.setpath(path);
}

View File

@ -148,7 +148,7 @@ void gareafile::ReadCrashmailCfg(const char* file) {
aa.aka = primary_aka;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
jbstrcpy(path, buf, sizeof(Path), &jbcpos);
aa.setpath(path);
aa.setdesc("CrashEcho Netmail");
@ -162,12 +162,12 @@ void gareafile::ReadCrashmailCfg(const char* file) {
if(aa.type != GMB_NONE) {
if(not unconfirmed)
AddNewArea(aa);
aa.reset();
}
aa.reset();
aa.type = GMB_NONE;
unconfirmed = false;
jbstrcpy(tmp, buf, 100, &jbcpos);
if(strieql(tmp, "DEFAULT") or strnieql(tmp, "DEFAULT_", 8)) {
aa.type = GMB_NONE;
break;
}
switch(crc16) {
@ -191,13 +191,13 @@ void gareafile::ReadCrashmailCfg(const char* file) {
jbstrcpy(tmp, buf, 10, &jbcpos);
switch(strCrc16(tmp)) {
case CRC_MSG:
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
break;
case CRC_JAM:
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
break;
case CRC_SQUISH:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
break;
default:
aa.reset();

View File

@ -68,11 +68,11 @@ void gareafile::ReadDB130(char* tag, char* dbpath) {
aa.reset();
switch(toupper(AA2.msgbase)) {
case 'Q':
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = AA2.board;
break;
case 'F':
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(STRNP2C(AA2.path));
break;
}
@ -129,11 +129,11 @@ void gareafile::ReadDB1046(char* file, char* tag) {
aa.reset();
switch(toupper(ADF->msgbase)) {
case 'Q':
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = ADF->board;
break;
case 'F':
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(STRNP2C(ADF->path));
break;
}
@ -192,11 +192,11 @@ void gareafile::ReadDB1047A22(char* file, int reclen, char* tag) {
aa.reset();
switch(toupper(ADF->msgbase)) {
case 'Q':
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = ADF->board;
break;
case 'F':
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(STRNP2C(ADF->path));
break;
}
@ -258,11 +258,11 @@ void gareafile::ReadDB2011(char* file, int reclen, char* tag) {
case 'Q':
if(ADF->board < 1 or ADF->board > 200)
continue; // Bad area number
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = ADF->board;
break;
case 'F':
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(STRNP2C(ADF->path));
break;
}
@ -384,12 +384,12 @@ void gareafile::ReadDBridge(char* tag) {
aa.type = GMB_NET;
aa.attr = attribsnet;
if(type == 'F') {
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(strbtrim(netpath));
}
else if(type == 'Q') {
strtrim(buf);
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = atoi(buf+50);
}
aa.setdesc("D'Bridge Netmail");
@ -400,7 +400,7 @@ void gareafile::ReadDBridge(char* tag) {
strbtrim(badecho);
if(*badecho) {
aa.reset();
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.setpath(badecho);

View File

@ -75,7 +75,7 @@ void gareafile::ReadDutchie(char* tag) {
if(*ptr != ';' and *ptr != '-' and strnicmp(ptr, "PASSTHRU", 8) and *ptr != '\x1A' and *ptr) {
aa.reset();
aa.msgbase = GMB_FTS1;
aa.basetype = "FTS1";
ptr = strtok(ptr, " \t"); // Get path
aa.setpath(ptr);
ptr = strtok(NULL, " \t"); // Get description

View File

@ -71,7 +71,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
// Fido netmail directory
if(not strblank(config->netmailpath)) {
aa.reset();
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka.zone = constant->netaddress[0].zone;
@ -89,7 +89,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
if(constant->netaddress[n].net) {
if(constant->netmailboard[n]) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka.zone = constant->netaddress[n].zone;
@ -110,7 +110,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
// Ezycom watchdog board
if(constant->watchmess) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_LOCAL;
aa.attr = attribslocal;
aa.aka.zone = constant->netaddress[0].zone;
@ -126,7 +126,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
// Ezycom paging board
if(constant->pagemessboard) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_LOCAL;
aa.attr = attribslocal;
aa.aka.zone = constant->netaddress[0].zone;
@ -142,7 +142,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
// Ezycom bad logon board
if(constant->badpwdmsgboard) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_LOCAL;
aa.attr = attribslocal;
aa.aka.zone = constant->netaddress[0].zone;
@ -158,7 +158,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
// Ezycom bad qwk board
if(constant->qwkmsgboard) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.aka.zone = constant->netaddress[0].zone;
@ -174,7 +174,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
// Ezycom bad echomail board
if(constant->badmsgboard) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.aka.zone = constant->netaddress[0].zone;
@ -216,7 +216,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
STRNP2C(messages->originline);
aa.board = record;
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.groupid = messages->areagroup;
aa.setorigin(*messages->originline ? messages->originline : config->defaultorigin);
@ -235,6 +235,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
default:
aa.type = GMB_ECHO;
aa.attr = attribsecho;
break;
}
switch(messages->msgkinds) {

View File

@ -72,7 +72,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
// Fido netmail directory
if(not strblank(config->netmailpath)) {
aa.reset();
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka.zone = constant->netaddress[0].zone;
@ -90,7 +90,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
if(constant->netaddress[n].net) {
if(constant->netmailboard[n]) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka.zone = constant->netaddress[n].zone;
@ -111,7 +111,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
// Ezycom watchdog board
if(constant->watchmess) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_LOCAL;
aa.attr = attribslocal;
aa.aka.zone = constant->netaddress[0].zone;
@ -127,7 +127,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
// Ezycom paging board
if(constant->pagemessboard) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_LOCAL;
aa.attr = attribslocal;
aa.aka.zone = constant->netaddress[0].zone;
@ -143,7 +143,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
// Ezycom bad logon board
if(constant->badpwdmsgboard) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_LOCAL;
aa.attr = attribslocal;
aa.aka.zone = constant->netaddress[0].zone;
@ -159,7 +159,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
// Ezycom bad qwk board
if(constant->qwkmsgboard) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.aka.zone = constant->netaddress[0].zone;
@ -175,7 +175,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
// Ezycom bad echomail board
if(constant->badmsgboard) {
aa.reset();
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.aka.zone = constant->netaddress[0].zone;
@ -217,7 +217,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
STRNP2C(messages->originline);
aa.board = record;
aa.msgbase = GMB_EZYCOM;
aa.basetype = "EZYCOM";
aa.groupid = messages->areagroup;
aa.setorigin(*messages->originline ? messages->originline : config->defaultorigin);

View File

@ -98,7 +98,7 @@ void gareafile::ReadFrontDoor(char* tag) {
aa.aka = shared->aka[0];
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.attr.r_o(editor->netfolderflags & EDREADONLY);
aa.attr.pvt(editor->msgbits & MSGPRIVATE);
aa.attr.cra(editor->msgbits & MSGCRASH);
@ -132,15 +132,15 @@ void gareafile::ReadFrontDoor(char* tag) {
aa.attr = (behave & FOLDER_ECHOMAIL) ? attribsecho : attribslocal;
aa.attr.r_o(behave & FOLDER_READONLY);
if(behave & FOLDER_HMB) {
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = folder->board;
}
else if(behave & FOLDER_JAM) {
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
aa.setpath(folder->path);
}
else {
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(folder->path);
}
if(behave & FOLDER_PRIVATE)

View File

@ -79,7 +79,7 @@ void gareafile::ReadFastecho11x(int fh) {
aa.aka = CAST(ftn_addr, aka[0].main);
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(cfg->NetMPath);
aa.setdesc("FastEcho Netmail");
aa.setautoid("NETMAIL");
@ -93,19 +93,19 @@ void gareafile::ReadFastecho11x(int fh) {
aa.aka = CAST(ftn_addr, aka[area->flags.aka].main);
switch(area->flags.type) {
case QBBS:
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = area->board;
break;
case FIDO:
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(area->path);
break;
case SQUISH:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
aa.setpath(area->path);
break;
case JAM:
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
aa.setpath(area->path);
break;
case PT_BOARD:

View File

@ -79,7 +79,7 @@ void gareafile::ReadFastecho141(int fh) {
aa.aka = CAST(ftn_addr, aka[0].main);
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(cfg->NetMPath);
aa.setdesc("FastEcho Netmail");
aa.setautoid("NETMAIL");
@ -93,19 +93,19 @@ void gareafile::ReadFastecho141(int fh) {
aa.aka = CAST(ftn_addr, aka[area->flags.aka].main);
switch(area->flags.type) {
case QBBS:
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = area->board;
break;
case FIDO:
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(area->path);
break;
case SQUISH:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
aa.setpath(area->path);
break;
case JAM:
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
aa.setpath(area->path);
break;
case PT_BOARD:

View File

@ -80,7 +80,7 @@ void gareafile::ReadFastecho142(int fh) {
aa.aka = aka[0].main;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(cfg->NetMPath);
aa.setdesc("FastEcho Netmail");
aa.setautoid("NETMAIL");
@ -97,19 +97,19 @@ void gareafile::ReadFastecho142(int fh) {
switch(area->flags.storage) {
case QBBS:
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = area->board;
break;
case FIDO:
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(area->path);
break;
case SQUISH:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
aa.setpath(area->path);
break;
case JAM:
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
aa.setpath(area->path);
break;
default:

View File

@ -167,7 +167,7 @@ void gareafile::ReadFidoPCB(char* tag) {
// *.MSG style netmail
aa.reset();
aa.aka = mainaddr;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(mailpath);
@ -179,7 +179,7 @@ void gareafile::ReadFidoPCB(char* tag) {
if(*netmailpath) {
aa.reset();
aa.aka = mainaddr;
aa.msgbase = GMB_PCBOARD;
aa.basetype = "PCBOARD";
aa.type = GMB_NET;
aa.attr = attribsnet;
strcat(AddBackslash(netmailpath), "MATRIX");
@ -194,7 +194,7 @@ void gareafile::ReadFidoPCB(char* tag) {
if(*lostmailpath) {
aa.reset();
aa.aka = mainaddr;
aa.msgbase = GMB_PCBOARD;
aa.basetype = "PCBOARD";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
strcat(AddBackslash(lostmailpath), "LOST");
@ -210,7 +210,7 @@ void gareafile::ReadFidoPCB(char* tag) {
for(int n=0; n<areas; n++,ap++) {
aa.reset();
aa.aka = mainaddr;
aa.msgbase = GMB_PCBOARD;
aa.basetype = "PCBOARD";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
if(not ap->msgs)

View File

@ -49,7 +49,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->netPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(cfg->netPath);
@ -62,7 +62,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->sentPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(cfg->sentPath);
@ -75,7 +75,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->rcvdPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(cfg->rcvdPath);
@ -88,7 +88,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) {
for(int x=0; x<MAX_AKAS; x++) {
if(cfg->netmailBoard[x] and cfg->netmailBoard[x] < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.board = cfg->netmailBoard[x];
@ -106,7 +106,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) {
if(cfg->recBoard and cfg->recBoard < 201) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = cfg->recBoard;
@ -119,7 +119,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) {
if(cfg->badBoard and cfg->badBoard < 201) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = cfg->badBoard;
@ -132,7 +132,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) {
if(cfg->dupBoard and cfg->dupBoard < 201) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = cfg->dupBoard;
@ -145,7 +145,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->pmailPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.setpath(cfg->pmailPath);
@ -189,7 +189,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) {
break;
}
aa.board = ar->board;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.setdesc(ar->comment);
aa.setechoid(ar->areaNameOld[0] ? ar->areaNameOld : ar->areaName);
aa.setorigin(ar->originLine);

View File

@ -50,7 +50,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->netPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(cfg->netPath);
@ -63,7 +63,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->sentPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(cfg->sentPath);
@ -76,7 +76,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->rcvdPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(cfg->rcvdPath);
@ -89,7 +89,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
for(int x=0; x<MAX_NETAKAS; x++) {
if(cfg->netmailBoard[x] and cfg->netmailBoard[x] < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.board = cfg->netmailBoard[x];
@ -107,7 +107,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
if(cfg->recBoard and cfg->recBoard < 201) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = cfg->recBoard;
@ -120,7 +120,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
if(cfg->badBoard and cfg->badBoard < 201) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = cfg->badBoard;
@ -133,7 +133,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
if(cfg->dupBoard and cfg->dupBoard < 201) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = cfg->dupBoard;
@ -146,7 +146,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->pmailPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.setpath(cfg->pmailPath);
@ -209,11 +209,11 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) {
}
if(ar->board) {
aa.board = ar->board;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
}
else if(*ar->msgBasePath) {
aa.setpath(ar->msgBasePath);
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
}
aa.setdesc(ar->comment);

View File

@ -50,7 +50,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->netPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(cfg->netPath);
@ -63,7 +63,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->sentPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(cfg->sentPath);
@ -76,7 +76,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->rcvdPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(cfg->rcvdPath);
@ -89,7 +89,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
for(int x=0; x<MAX_NETAKAS; x++) {
if(cfg->netmailBoard[x] and cfg->netmailBoard[x] < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.board = cfg->netmailBoard[x];
@ -107,7 +107,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
if(cfg->recBoard and cfg->recBoard < 201) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = cfg->recBoard;
@ -120,7 +120,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
if(cfg->badBoard and cfg->badBoard < 201) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = cfg->badBoard;
@ -133,7 +133,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
if(cfg->dupBoard and cfg->dupBoard < 201) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = cfg->dupBoard;
@ -146,7 +146,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
if(not strblank(cfg->pmailPath)) {
aa.reset();
aa.aka = cfg->akaList[0].nodeNum;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.setpath(cfg->pmailPath);
@ -213,11 +213,11 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) {
}
if(ar->board) {
aa.board = ar->board;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
}
else if(*ar->msgBasePath) {
aa.setpath(ar->msgBasePath);
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
}
aa.setdesc(ar->comment);

View File

@ -105,11 +105,11 @@ void gareafile::ReadGEcho(char* tag) {
CfgHudsonpath(gesetup->hmbpath);
CfgJampath(gesetup->jampath);
int _fidomsgtype = fidomsgtype;
const char *_fidomsgtype = fidomsgtype;
if(ge_version >= 102) {
_fidomsgtype = (gesetup->extraoptions & OPUSDATES) ? GMB_OPUS : GMB_FTS1;
if((_fidomsgtype == GMB_FTS1) and (fidomsgtype == GMB_OPUS)) {
_fidomsgtype = (gesetup->extraoptions & OPUSDATES) ? "OPUS" : "FTS1";
if((streql(_fidomsgtype, "FTS1")) and (streql(fidomsgtype, "OPUS"))) {
std::cout <<
"* Warning - FTS-1 format is used for *.MSG. For better compatibility set this" << std::endl <<
"* in GSETUP: Miscellanous->GEcho Options->MSG compatibilty = Opus (not Fido)." << std::endl <<
@ -127,7 +127,7 @@ void gareafile::ReadGEcho(char* tag) {
// Old netmail board (no longer in use by GEcho, but just in case...)
if(gesetup->oldnetmailboard and gesetup->oldnetmailboard < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = _aka[0];
@ -138,7 +138,7 @@ void gareafile::ReadGEcho(char* tag) {
}
else if(not strblank(gesetup->mailpath)) {
aa.reset();
aa.msgbase = _fidomsgtype;
aa.basetype = _fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = _aka[0];
@ -152,7 +152,7 @@ void gareafile::ReadGEcho(char* tag) {
uint _badboard = (ge_version >= 110) ? gesetup->badarea : gesetup->oldbadboard;
if(_badboard and _badboard < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = _badboard;
@ -163,7 +163,7 @@ void gareafile::ReadGEcho(char* tag) {
}
else if(not strblank(gesetup->badecho_path)) {
aa.reset();
aa.msgbase = _fidomsgtype;
aa.basetype = _fidomsgtype;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.aka = _aka[0];
@ -179,7 +179,7 @@ void gareafile::ReadGEcho(char* tag) {
uint _dupboard = (ge_version >= 110) ? gesetup->reserved5 : gesetup->olddupboard;
if(_dupboard and _dupboard < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = _dupboard;
@ -193,7 +193,7 @@ void gareafile::ReadGEcho(char* tag) {
// Recovery
if(gesetup->recoveryboard and gesetup->recoveryboard < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = gesetup->recoveryboard;
@ -207,7 +207,7 @@ void gareafile::ReadGEcho(char* tag) {
uint _rcvdboard = (ge_version >= 110) ? gesetup->rcvdarea : gesetup->oldrcvdboard;
if(_rcvdboard and _rcvdboard < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = _rcvdboard;
@ -218,7 +218,7 @@ void gareafile::ReadGEcho(char* tag) {
}
else if(not strblank(gesetup->rcvdmailpath)) {
aa.reset();
aa.msgbase = _fidomsgtype;
aa.basetype = _fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = _aka[0];
@ -232,7 +232,7 @@ void gareafile::ReadGEcho(char* tag) {
uint _sentboard = (ge_version >= 110) ? gesetup->sentarea : gesetup->oldsentboard;
if(gesetup->oldsentboard and gesetup->oldsentboard < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.board = _sentboard;
@ -243,7 +243,7 @@ void gareafile::ReadGEcho(char* tag) {
}
else if(not strblank(gesetup->sentmailpath)) {
aa.reset();
aa.msgbase = _fidomsgtype;
aa.basetype = _fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = _aka[0];
@ -259,7 +259,7 @@ void gareafile::ReadGEcho(char* tag) {
uint _persmailboard = (ge_version >= 110) ? gesetup->persmailarea[u] : gesetup->oldpersmailboard[u];
if(_persmailboard and _persmailboard < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.aka = _aka[0];
@ -276,7 +276,7 @@ void gareafile::ReadGEcho(char* tag) {
// Personal mail
if(not strblank(gesetup->persmail_path)) {
aa.reset();
aa.msgbase = _fidomsgtype;
aa.basetype = _fidomsgtype;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.aka = _aka[0];
@ -292,7 +292,7 @@ void gareafile::ReadGEcho(char* tag) {
uint _userboard = (ge_version >= 110) ? gesetup->userarea[u] : gesetup->olduserboard[u];
if(_userboard and _userboard < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = _aka[0];
@ -312,7 +312,7 @@ void gareafile::ReadGEcho(char* tag) {
uint _akaboard = (ge_version >= 110) ? gesetup->akaarea[a] : gesetup->oldakaboard[a];
if(_aka[a].net and _akaboard and _akaboard < 201) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = _aka[a];
@ -355,39 +355,39 @@ void gareafile::ReadGEcho(char* tag) {
switch(area->areaformat) {
case FORMAT_HMB:
if(area->areanumber and area->areanumber < 201) {
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = area->areanumber;
break;
}
continue;
case FORMAT_SDM:
if(not strblank(area->path)) {
aa.msgbase = _fidomsgtype;
aa.basetype = _fidomsgtype;
aa.setpath(area->path);
break;
}
continue;
case FORMAT_JAM:
if(not strblank(area->path)) {
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
aa.setpath(area->path);
break;
}
continue;
case FORMAT_SQUISH:
if(not strblank(area->path)) {
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
aa.setpath(area->path);
break;
}
continue;
case FORMAT_PCB:
aa.msgbase = GMB_PCBOARD;
aa.basetype = "PCBOARD";
aa.board = area->areanumber;
aa.setpath(area->path);
break;
case FORMAT_WC:
aa.msgbase = GMB_WILDCAT;
aa.basetype = "WILDCAT";
aa.board = area->areanumber;
aa.setpath(area->path);
break;
@ -395,11 +395,11 @@ void gareafile::ReadGEcho(char* tag) {
if(ge_version >= 102)
continue;
if(area->areanumber and area->areanumber < 201) {
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = area->areanumber;
}
else if((area->options & SDM) and not strblank(area->path)) {
aa.msgbase = _fidomsgtype;
aa.basetype = _fidomsgtype;
aa.setpath(area->path);
}
}

View File

@ -182,7 +182,7 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
aa.reset();
aa.type = GMB_NONE;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.groupid = group;
std::string s;
@ -244,7 +244,7 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
case CRC_ECHOAREADEFAULTS:
echoareadefaults.reset();
aa.type = GMB_DEFAULT;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.groupid = group;
break;
}
@ -277,11 +277,11 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
while((*key == '-') or strieql(key, "Squish") or strieql(key, "Jam") or strieql(key, "MSG")) {
if(strieql(key, "Squish"))
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
else if(strieql(key, "Jam"))
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
else if(strieql(key, "MSG"))
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
else {
char *opt = key + 1;
@ -341,20 +341,20 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
switch(aa.type) {
case GMB_NET:
aa.attr = attribsnet;
if(aa.msgbase == 0)
aa.msgbase = fidomsgtype;
if(*aa.basetype == '\0')
aa.basetype = fidomsgtype;
AddNewArea(aa);
break;
case GMB_ECHO:
aa.attr = attribsecho;
if(aa.msgbase == 0)
aa.msgbase = fidomsgtype;
if(*aa.basetype == '\0')
aa.basetype = fidomsgtype;
AddNewArea(aa);
break;
case GMB_LOCAL:
aa.attr = attribslocal;
if(aa.msgbase == 0)
aa.msgbase = fidomsgtype;
if(*aa.basetype == '\0')
aa.basetype = fidomsgtype;
AddNewArea(aa);
break;
case GMB_DEFAULT:
@ -417,7 +417,7 @@ void gareafile::ReadHPT(char* tag) {
CfgJAMSMAPIHighwater(true);
echoareadefaults.type = GMB_NONE;
echoareadefaults.msgbase = fidomsgtype;
echoareadefaults.basetype = fidomsgtype;
echoareadefaults.groupid = defaultgroup;
ReadHPTFile(path, file, origin, defaultgroup);

View File

@ -58,7 +58,7 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
// Fido netmail
if(not strblank(CF->netmail)) {
aa.reset();
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = CAST(ftn_addr, CF->aka[0]);
@ -86,22 +86,22 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
switch(AR.msg_base_type & BASEMASK) {
case MSGTYPE_SDM:
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
strcpy(aa.path, AR.msg_path);
break;
case MSGTYPE_SQUISH:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
strcpy(aa.path, AR.msg_path);
break;
case MSGTYPE_JAM:
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
strcpy(aa.path, AR.msg_path);
break;
case MSGTYPE_HUDSON:
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
if((AR.brd >= 1) and (AR.brd <= 200))
aa.board = AR.brd;
else {

View File

@ -68,7 +68,7 @@ void gareafile::ReadIMail170(char* options, char* file, char* impath) {
// Fido netmail
if(not strblank(CF->netmail)) {
aa.reset();
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = CAST(ftn_addr, CF->aka[0]);
@ -96,22 +96,22 @@ void gareafile::ReadIMail170(char* options, char* file, char* impath) {
switch(AR.msg_base_type & BASEMASK) {
case MSGTYPE_SDM:
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
strcpy(aa.path, AR.msg_path);
break;
case MSGTYPE_SQUISH:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
strcpy(aa.path, AR.msg_path);
break;
case MSGTYPE_JAM:
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
strcpy(aa.path, AR.msg_path);
break;
case MSGTYPE_HUDSON:
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
if((AR.brd >= 1) and (AR.brd <= 200))
aa.board = AR.brd;
else {

View File

@ -68,7 +68,7 @@ void gareafile::ReadIMail185(char* options, char* file, char* impath) {
// Fido netmail
if(not strblank(CF->netmail)) {
aa.reset();
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = CAST(ftn_addr, CF->aka[0]);
@ -96,22 +96,22 @@ void gareafile::ReadIMail185(char* options, char* file, char* impath) {
switch(AR.msg_base_type & BASEMASK) {
case MSGTYPE_SDM:
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
strcpy(aa.path, AR.msg_path);
break;
case MSGTYPE_SQUISH:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
strcpy(aa.path, AR.msg_path);
break;
case MSGTYPE_JAM:
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
strcpy(aa.path, AR.msg_path);
break;
case MSGTYPE_HUDSON:
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
if((AR.brd >= 1) and (AR.brd <= 200))
aa.board = AR.brd;
else {

View File

@ -83,7 +83,7 @@ void gareafile::ReadInterMail(char* tag) {
aa.reset();
aa.aka = CAST(ftn_addr, ctl->t.newaka[0]);
aa.type = GMB_NET;
aa.msgbase = GMB_OPUS;
aa.basetype = "OPUS";
aa.attr.pvt(ctl->e.msgbits & MSGPRIVATE);
aa.attr.cra(ctl->e.msgbits & MSGCRASH);
aa.attr.k_s(ctl->e.msgbits & MSGKILL);
@ -97,10 +97,10 @@ void gareafile::ReadInterMail(char* tag) {
aa.aka = CAST(ftn_addr, ctl->t.newaka[ctl->e.dupes.useaka]);
aa.type = GMB_ECHO;
switch(ctl->e.dupes.ftype) {
case F_MSG: aa.msgbase = GMB_OPUS; break;
case F_HUDSON: aa.msgbase = GMB_HUDSON; break;
case F_PCB15: aa.msgbase = GMB_PCBOARD; break;
case F_JAM: aa.msgbase = GMB_JAM; break;
case F_MSG: aa.basetype = "OPUS"; break;
case F_HUDSON: aa.basetype = "HUDSON"; break;
case F_PCB15: aa.basetype = "PCBOARD"; break;
case F_JAM: aa.basetype = "JAM"; break;
}
aa.attr.r_o(ctl->e.dupes.behave & EDREADONLY);
aa.board = ctl->e.dupes.board;
@ -114,10 +114,10 @@ void gareafile::ReadInterMail(char* tag) {
aa.aka = CAST(ftn_addr, ctl->t.newaka[ctl->e.badecho.useaka]);
aa.type = GMB_ECHO;
switch(ctl->e.badecho.ftype) {
case F_MSG: aa.msgbase = GMB_OPUS; break;
case F_HUDSON: aa.msgbase = GMB_HUDSON; break;
case F_PCB15: aa.msgbase = GMB_PCBOARD; break;
case F_JAM: aa.msgbase = GMB_JAM; break;
case F_MSG: aa.basetype = "OPUS"; break;
case F_HUDSON: aa.basetype = "HUDSON"; break;
case F_PCB15: aa.basetype = "PCBOARD"; break;
case F_JAM: aa.basetype = "JAM"; break;
}
aa.attr.r_o(ctl->e.badecho.behave & EDREADONLY);
aa.board = ctl->e.badecho.board;
@ -143,10 +143,10 @@ void gareafile::ReadInterMail(char* tag) {
aa.reset();
switch(_folder->ftype) {
case F_MSG: aa.msgbase = GMB_OPUS; break;
case F_HUDSON: aa.msgbase = GMB_HUDSON; break;
case F_PCB15: aa.msgbase = GMB_PCBOARD; break;
case F_JAM: aa.msgbase = GMB_JAM; break;
case F_MSG: aa.basetype = "OPUS"; break;
case F_HUDSON: aa.basetype = "HUDSON"; break;
case F_PCB15: aa.basetype = "PCBOARD"; break;
case F_JAM: aa.basetype = "JAM"; break;
default: continue;
}
long _behave = _folder->behave;
@ -195,11 +195,14 @@ void gareafile::ReadInterMail(char* tag) {
aa.type = GMB_LOCAL;
else if(_behave & ECHOMAIL)
aa.type = GMB_ECHO;
aa.msgbase = (_behave & BOARDTYPE) ? GMB_HUDSON : GMB_OPUS;
if(aa.msgbase == GMB_HUDSON)
if(_behave & BOARDTYPE) {
aa.basetype = "HUDSON";
aa.board = _folder->board;
else
}
else {
aa.basetype = "OPUS";
aa.setpath(_folder->path);
}
aa.attr.pvt(_behave & PRIVATE);
aa.attr.r_o(_behave & READONLY);
aa.setdesc(_folder->title);

View File

@ -84,7 +84,7 @@ void gareafile::ReadLoraBBS(char* tag) {
// Netmail *.MSG
if(not strblank(cfg->netmail_dir)) {
aa.reset();
aa.msgbase = GMB_OPUS;
aa.basetype = "OPUS";
aa.type = GMB_NET;
aa.aka = CAST(ftn_addr, cfg->alias[0]);
aa.setpath(cfg->netmail_dir);
@ -96,7 +96,7 @@ void gareafile::ReadLoraBBS(char* tag) {
// Bad *.MSG
if(not strblank(cfg->bad_msgs)) {
aa.reset();
aa.msgbase = GMB_OPUS;
aa.basetype = "OPUS";
aa.type = GMB_ECHO;
aa.aka = CAST(ftn_addr, cfg->alias[0]);
aa.setpath(cfg->bad_msgs);
@ -108,7 +108,7 @@ void gareafile::ReadLoraBBS(char* tag) {
// Dupes *.MSG
if(not strblank(cfg->dupes)) {
aa.reset();
aa.msgbase = GMB_OPUS;
aa.basetype = "OPUS";
aa.type = GMB_ECHO;
aa.aka = CAST(ftn_addr, cfg->alias[0]);
aa.setpath(cfg->dupes);
@ -120,7 +120,7 @@ void gareafile::ReadLoraBBS(char* tag) {
// Personal mail *.MSG
if(cfg->save_my_mail and not strblank(cfg->my_mail)) {
aa.reset();
aa.msgbase = GMB_OPUS;
aa.basetype = "OPUS";
aa.type = GMB_ECHO;
aa.aka = CAST(ftn_addr, cfg->alias[0]);
aa.setpath(cfg->my_mail);
@ -147,11 +147,11 @@ void gareafile::ReadLoraBBS(char* tag) {
aa.reset();
if(sysmsg->gold_board) {
aa.msgbase = GMB_GOLDBASE;
aa.basetype = "GOLDBASE";
aa.board = sysmsg->gold_board;
}
else if(sysmsg->quick_board) {
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = sysmsg->quick_board;
}
else if(sysmsg->pip_board) {
@ -159,11 +159,11 @@ void gareafile::ReadLoraBBS(char* tag) {
continue;
}
else if(sysmsg->squish) {
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
aa.setpath(sysmsg->msg_path);
}
else {
aa.msgbase = GMB_OPUS;
aa.basetype = "OPUS";
aa.setpath(sysmsg->msg_path);
}

View File

@ -114,10 +114,10 @@ void gareafile::ReadMaximus3(char* mxpath, char* areafile, char* options) {
aa.reset();
switch(area->type) {
case MSGTYPE_SQUISH:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
break;
case MSGTYPE_SDM:
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
break;
default:
continue;

View File

@ -72,7 +72,7 @@ void gareafile::ReadME2(char* tag) {
aa.reset();
aa.type = GMB_LOCAL;
aa.attr = attribslocal;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
ptr = strskip_wht(ptr+5);
ptr2 = strskip_to(++ptr, '\'');
if(*ptr2) *ptr2++ = NUL;

View File

@ -102,7 +102,7 @@ void gareafile::ReadOpus(char* tag) {
fseek(fp, (long)msgsys.Scan_Len*(long)sizeof(struct _ascan), SEEK_CUR);
fseek(fp, (long)msgsys.Other_Len, SEEK_CUR);
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = ((msgsys.Attrib & SYSMAIL) ? GMB_NET : (msgsys.Attrib & _ECHOMAIL) ? GMB_ECHO : GMB_LOCAL);
aa.attr = ((msgsys.Attrib & SYSMAIL) ? attribsnet : (msgsys.Attrib & _ECHOMAIL) ? attribsecho : attribslocal);
aa.setechoid(*msgsys.Echo_Name ? msgsys.Echo_Name : msgsys.Area_Name);
@ -140,7 +140,7 @@ void gareafile::ReadOpus(char* tag) {
fread(&sysdat, sizeof(_systemdat), 1, fp);
if(*sysdat.msgpath and *sysdat.msgtitle) {
aa.reset();
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(sysdat.msgpath);
aa.setdesc(sysdat.msgtitle);
aa.setechoid(sysdat.EchoName);

View File

@ -224,7 +224,7 @@ void gareafile::ReadPCBoard(char* tag) {
strcpy(netmailpath, dir3->outgoing_msg);
if(*netmailpath) {
aa.reset();
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
if(fido_version == 2)
@ -269,7 +269,7 @@ void gareafile::ReadPCBoard(char* tag) {
fp2.fread(_cnamesadd, sizeof(PcbAddConf));
if(*_cnames->name and *_cnames->msgfile) {
aa.reset();
aa.msgbase = GMB_PCBOARD;
aa.basetype = "PCBOARD";
switch(_cnamesadd->conftype) {
case PCBCONFTYPE_EMAIL:
case PCBCONFTYPE_USENETMOD:

View File

@ -97,7 +97,7 @@ void gareafile::ReadPortal(char* tag) {
if(popcfg->MailScanner.NetMailBoard and popcfg->MailScanner.NetMailBoard < 201) {
aa.reset();
aa.aka = CAST(ftn_addr, popcfg->Adresses[popcfg->MainAdrNum]);
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.board = popcfg->MailScanner.NetMailBoard;
@ -108,7 +108,7 @@ void gareafile::ReadPortal(char* tag) {
else if(not strblank(popcfg->MailScanner.NetMailDir)) {
aa.reset();
aa.aka = CAST(ftn_addr, popcfg->Adresses[popcfg->MainAdrNum]);
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.setpath(popcfg->MailScanner.NetMailDir);
@ -121,7 +121,7 @@ void gareafile::ReadPortal(char* tag) {
if(not strblank(popcfg->MailScanner.BadMsgs)) {
aa.reset();
aa.aka = CAST(ftn_addr, popcfg->Adresses[popcfg->MainAdrNum]);
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.setpath(popcfg->MailScanner.BadMsgs);
@ -134,7 +134,7 @@ void gareafile::ReadPortal(char* tag) {
if(not strblank(popcfg->MailScanner.SaveDupesDir)) {
aa.reset();
aa.aka = CAST(ftn_addr, popcfg->Adresses[popcfg->MainAdrNum]);
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.setpath(popcfg->MailScanner.SaveDupesDir);
@ -159,7 +159,7 @@ void gareafile::ReadPortal(char* tag) {
aa.aka = CAST(ftn_addr, poparea->UsedAka ? popcfg->Adresses[popcfg->MainAdrNum] : popcfg->Adresses[poparea->UsedAka]);
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setdesc(STRNP2C(poparea->Description));
aa.setechoid(STRNP2C(poparea->EchoNames[0]));
aa.setorigin(STRNP2C(poparea->Origin));

View File

@ -122,19 +122,19 @@ void gareafile::ReadProBoard(char* tag) {
aa.attr.pvt1();
switch(area->msgbasetype) {
case MSGBASE_HUDSON:
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = area->areanum;
break;
case MSGBASE_SQUISH:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
aa.setpath(area->path);
break;
case MSGBASE_SDM:
aa.msgbase = GMB_OPUS;
aa.basetype = "OPUS";
aa.setpath(area->path);
break;
case MSGBASE_JAM:
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
aa.setpath(area->path);
break;
}

View File

@ -68,7 +68,7 @@ void gareafile::ReadQEchoFile(char* file, char* options, char* origin) {
if((ptr = strtok(NULL, " \t")) != NULL)
if(not strieql("Passthrough", ptr)) {
aa.setpath(ptr);
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
if((ptr = strtok(NULL, " \t")) != NULL)
if((*ptr == '*') and ((ptr = strtok(NULL, " \t")) != NULL)) {
CfgAddress(ptr);

View File

@ -88,7 +88,7 @@ void gareafile::ReadQFront(char* tag) {
aa.attr = attribsecho;
STRNP2C(area->AreaName);
aa.board = area->ConfNum;
aa.msgbase = GMB_PCBOARD;
aa.basetype = "PCBOARD";
aa.setechoid(area->AreaName);
aa.setorigin(origin->OriginLine[area->OriginLine]);
AddNewArea(aa);

View File

@ -66,7 +66,7 @@ void gareafile::ReadQ260(char* qbpath, char* origin, char* options) {
aa.reset();
aa.board = n + 1;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.setdesc(STRNP2C(brd[n].Name));
aa.setorigin(*cfg->OriginLine ? cfg->OriginLine : origin);
@ -160,7 +160,8 @@ void gareafile::ReadQ276(char* qbpath, char* origin, char* options) {
std::cout << "* Reading " << file << std::endl;
int _recs = (int)(filelength(fileno(fp)) / sizeof(Q276BrdRecT));
int _fmt = (_recs > 200) ? GMB_GOLDBASE : GMB_HUDSON;
// int _fmt = (_recs > 200) ? GMB_GOLDBASE : GMB_HUDSON;
const char *_fmt = (_recs > 200) ? "GOLDBASE" : "HUDSON";
for(int n=0; n<_recs; n++) {
@ -171,7 +172,7 @@ void gareafile::ReadQ276(char* qbpath, char* origin, char* options) {
aa.reset();
aa.board = n + 1;
aa.msgbase = _fmt;
aa.basetype = _fmt;
//aa.groupid = brd->Group;
aa.setorigin(*brd->OriginLine ? STRNP2C(brd->OriginLine) : origin);

View File

@ -142,7 +142,7 @@ void gareafile::ReadRemoteAccess(char* tag) {
if(area->Attribute & 0x80) {
aa.setpath(STRNP2C(area->JAMbase));
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
AddNewArea(aa);
}
else {
@ -150,7 +150,7 @@ void gareafile::ReadRemoteAccess(char* tag) {
aa.board = area->AreaNum;
else
aa.board = n;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
AddNewArea(aa);
}
}
@ -163,7 +163,7 @@ void gareafile::ReadRemoteAccess(char* tag) {
fread(area, sizeof(_messagesra), 1, fp);
if(*area->name) {
aa.reset();
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = n+1;
aa.aka = CAST(ftn_addr, config->Address[area->akaaddress]);
switch(area->type) {

View File

@ -98,14 +98,14 @@ void gareafile::ReadRaEcho(char* tag) {
STRNP2C(area.echoid);
STRNP2C(area.origin);
if(area.isopus and *area.path and stricmp(area.path, "P")) {
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(area.path);
}
else if(areano <= 200) {
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = areano;
}
if(aa.msgbase) {
if(aa.basetype[0] != '\0') {
aa.aka = area.addr;
switch(area.type) {
case RAE_LOCAL:

View File

@ -39,20 +39,20 @@ static Path SpaceTossAreafile;
void gareafile::ParseSpaceArea(const char *type_path, AreaCfg &aa) {
if(strnieql(type_path, "msg", 3))
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
else if(strnieql(type_path, "hud", 3)) {
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = atoi(type_path+3);
return;
}
else if(strnieql(type_path, "jam", 3))
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
else if(strnieql(type_path, "sqh", 3))
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
else if(strnieql(type_path, "smb", 3))
aa.msgbase = GMB_SMB;
aa.basetype = "SMB";
else {
aa.msgbase = 0;
aa.basetype = "";
return;
}
aa.setpath(type_path+3);
@ -145,7 +145,7 @@ void gareafile::ReadSpaceAr(const char* file) {
aa.groupid = toupper(*val);
break;
case CRC_ENDAREA:
if(aa.msgbase)
if(aa.basetype[0] != '\0')
AddNewArea(aa);
aa.reset();
break;
@ -208,7 +208,7 @@ void gareafile::ReadSpaceNtm(const char* file) {
exportarea = GetYesno(val) ? true : false;
break;
case CRC_ENDNETMAIL:
if(exportarea and aa.msgbase)
if(exportarea and (aa.basetype[0] != '\0'))
AddNewArea(aa);
aa.reset();
break;
@ -292,7 +292,7 @@ void gareafile::ReadSpaceCtl(const char* file) {
// Get type/path
ParseSpaceArea(val, aa);
if(aa.msgbase) {
if(aa.basetype[0] != '\0') {
AddNewArea(aa);
}
}

View File

@ -110,13 +110,13 @@ void gareafile::ReadSquishFile(char* path, char* file, char* options, char* orig
// If not pass-through
if(not striinc("-0", val)) {
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.groupid = group;
char* p = val;
while(*p) {
if(strnieql(p, "-$", 2)) {
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
p += 2;
if((tolower(*p) == 'g') and isalpha(p[1])) {
if(isdigit(p[1]))
@ -132,7 +132,7 @@ void gareafile::ReadSquishFile(char* path, char* file, char* options, char* orig
}
}
else if(strnieql(p, "-f", 2)) {
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
p += 2;
}
else if(strnieql(p, "-p", 2)) {

View File

@ -114,7 +114,7 @@ void gareafile::ReadSuperBBS(char* tag) {
aa.reset();
aa.board = n + 1;
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.groupid = boards->Group;
aa.setorigin(*config->OriginLine ? config->OriginLine : origin);

View File

@ -112,7 +112,7 @@ void gareafile::ReadSynchronet(char* tag) {
aa.reset();
aa.type = (sub.misc & SUB_QNET) ? GMB_LOCAL : GMB_ECHO;
aa.attr = attribsecho;
aa.msgbase = GMB_SMB;
aa.basetype = "SMB";
aa.setechoid((sub.misc & SUB_FIDO) ? sub.sname : sub.code);
aa.setdesc(sub.lname);
aa.groupid = 0x8000 + sub.grp;

View File

@ -177,13 +177,13 @@ void gareafile::ReadTimedFile(char* path, char* file, char* options, char* origi
aa.board = atoi(key);
if(striinc("-$", val))
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
else if(striinc("-J", val))
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
else if(striinc("-H", val))
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
else
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
const char* ptr2 = striinc("-p", val);
if(ptr2) {

View File

@ -75,7 +75,7 @@ void gareafile::ReadTmailFile(char* file, char* options, char* origin) {
aa.reset();
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setdesc("Terminate Netmail");
aa.setautoid("NETMAIL");
adjustpath(val);

View File

@ -95,7 +95,7 @@ void gareafile::ReadTosScan(char* tag) {
aa.reset();
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.attr.r_o(editor->netfolderflags & EDREADONLY);
aa.attr.pvt(editor->msgbits & MSGPRIVATE);
aa.attr.cra(editor->msgbits & MSGCRASH);
@ -127,11 +127,11 @@ void gareafile::ReadTosScan(char* tag) {
aa.type = GMB_ECHO;
aa.attr = attribsecho;
if(areafile->board) {
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = areafile->board;
}
else {
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(areafile->path);
}
aa.setdesc(areafile->desc);

View File

@ -81,7 +81,7 @@ void gareafile::ReadWMail(char* tag) {
aa.aka = wmprm->aka[0].addr;
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
STRNP2C(wmprm->dir.mail);
aa.setpath(wmprm->dir.mail);
aa.setdesc("WMail Netmail");
@ -94,7 +94,7 @@ void gareafile::ReadWMail(char* tag) {
aa.aka = wmprm->aka[0].addr;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
STRNP2C(wmprm->dir.badecho);
aa.setpath(wmprm->dir.badecho);
aa.setdesc("WMail Bad Msgs Area");
@ -108,7 +108,7 @@ void gareafile::ReadWMail(char* tag) {
aa.aka = wmprm->aka[0].addr;
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
STRNP2C(wmprm->dir.dupes);
aa.setpath(wmprm->dir.dupes);
aa.setdesc("WMail Dupes Area");
@ -151,9 +151,9 @@ void gareafile::ReadWMail(char* tag) {
aa.setpath(arprm->path);
aa.board = atoi(aa.path);
if(aa.board and aa.board <= 200)
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
else
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
STRNP2C(arprm->titolo);
STRNP2C(arprm->tag);
aa.setdesc(arprm->titolo);

View File

@ -34,15 +34,15 @@
// ------------------------------------------------------------------
uint gareafile::gettype(uint msgtype, const byte wtrtype) {
const char *gareafile::gettype(const char *msgtype, const byte wtrtype) {
switch(wtrtype) {
case 1: return msgtype;
case 2: return GMB_SQUISH;
case 3: return GMB_JAM;
case 4: return GMB_WILDCAT;
case 2: return "SQUISH";
case 3: return "JAM";
case 4: return "WILDCAT";
}
return 0;
return "";
}
@ -65,7 +65,7 @@ void gareafile::ReadWtrGteFile(char* options, FILE* fp) {
if(c.fidonetmailtype) {
aa.reset();
aa.msgbase = gettype(c.opusdateformat ? GMB_OPUS : GMB_FTS1, c.fidonetmailtype);
aa.basetype = gettype(c.opusdateformat ? "OPUS" : "FTS1", c.fidonetmailtype);
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = CAST(ftn_addr, c.nodenrs[0]);
@ -77,7 +77,7 @@ void gareafile::ReadWtrGteFile(char* options, FILE* fp) {
if(c.fidobadareatype) {
aa.reset();
aa.msgbase = gettype(c.opusdateformat ? GMB_OPUS : GMB_FTS1, c.fidobadareatype);
aa.basetype = gettype(c.opusdateformat ? "OPUS" : "FTS1", c.fidobadareatype);
aa.type = GMB_ECHO;
aa.attr = attribsecho;
aa.aka = CAST(ftn_addr, c.nodenrs[0]);
@ -89,7 +89,7 @@ void gareafile::ReadWtrGteFile(char* options, FILE* fp) {
if(c.fidodupeareatype) {
aa.reset();
aa.msgbase = gettype(c.opusdateformat ? GMB_OPUS : GMB_FTS1, c.fidodupeareatype);
aa.basetype = gettype(c.opusdateformat ? "OPUS" : "FTS1", c.fidodupeareatype);
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.aka = CAST(ftn_addr, c.nodenrs[0]);
@ -128,7 +128,7 @@ void gareafile::ReadWtrGteFile(char* options, FILE* fp) {
continue;
}
aa.msgbase = gettype(c.opusdateformat ? GMB_OPUS : GMB_FTS1, ar->fidomsgstyle);
aa.basetype = gettype(c.opusdateformat ? "OPUS" : "FTS1", ar->fidomsgstyle);
if(in_range(ar->originaka, (byte) 1, (byte) 20))
aa.aka = CAST(ftn_addr, c.nodenrs[ar->originaka-1]);
aa.setpath(strp2c(ar->fidomsgpath));

View File

@ -78,8 +78,12 @@ void gareafile::ReadAdeptXbbsFile(char* path, char* file, char* options) {
break;
case CRC_AREAEND:
aa.setechoid(*usenet ? usenet : name);
sprintf(buf, "%s%s", apath, name);
aa.setpath((aa.msgbase & GMB_FIDO) ? apath : buf);
if(streql(aa.basetype, "OPUS") or streql(aa.basetype, "FTS1"))
aa.setpath(apath);
else {
sprintf(buf, "%s%s", apath, name);
aa.setpath(buf);
}
AddNewArea(aa);
aa.reset();
break;
@ -116,13 +120,13 @@ void gareafile::ReadAdeptXbbsFile(char* path, char* file, char* options) {
aa.attr = attribslocal;
}
if(flags & M_SQUISH)
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
else if(flags & M_FIDO)
aa.msgbase = GMB_OPUS;
aa.basetype = "OPUS";
else if(flags & M_JAM)
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
else
aa.msgbase = GMB_ADEPTXBBS;
aa.basetype = "ADEPTXBBS";
break;
case CRC_USENET:
strcpy(usenet, val);

View File

@ -104,7 +104,7 @@ void gareafile::ReadxMailFile(char* file, char* options) {
aa.reset();
aa.type = GMB_NET;
aa.attr = attribsnet;
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setdesc("xMail Netmail");
aa.setautoid("NETMAIL");
aa.setpath(val);
@ -178,19 +178,19 @@ void gareafile::ReadXMail(char* tag) {
switch(area.StoreType) {
case FmtHudson:
aa.msgbase = GMB_HUDSON;
aa.basetype = "HUDSON";
aa.board = areano;
break;
case FmtMsg:
aa.msgbase = fidomsgtype;
aa.basetype = fidomsgtype;
aa.setpath(ClipDosFilename(area.MsgDirectory));
break;
case FmtSquish:
aa.msgbase = GMB_SQUISH;
aa.basetype = "SQUISH";
aa.setpath(ClipDosFilename(area.MsgDirectory));
break;
case FmtJam:
aa.msgbase = GMB_JAM;
aa.basetype = "JAM";
aa.setpath(ClipDosFilename(area.MsgDirectory));
break;
default:

View File

@ -81,7 +81,7 @@ public:
int areaid() const { return cfg.areaid; }
int groupid() const { return cfg.groupid; }
uint type() const { return cfg.type; }
uint msgbase() const { return cfg.msgbase; }
const char *basetype() const { return cfg.basetype; }
uint board() const { return cfg.board; }
const ftn_addr& aka() const { return cfg.aka; }
int originno() const { return cfg.originno; }
@ -103,7 +103,7 @@ public:
void set_areaid(int a) { cfg.areaid = a; }
void set_groupid(int g) { cfg.groupid = g; }
void set_type(uint t) { cfg.type = t; }
void set_msgbase(uint m) { cfg.msgbase = m; }
void set_basetype(const char *m) { cfg.basetype = m; }
void set_board(uint b) { cfg.board = b; }
void set_aka(ftn_addr& a) { cfg.aka = a; }
void set_originno(int o) { cfg.originno = o; }
@ -125,19 +125,17 @@ public:
// ----------------------------------------------------------------
// Determine msgbase format
int isfts1() const;
int isopus() const;
int isezycom() const;
int isfido() const;
int isgoldbase() const;
int ishudson() const;
int isjam() const;
int ispcboard() const;
int issquish() const;
int issmb() const;
int iswildcat() const;
int isadeptxbbs() const;
int isseparator() const;
bool isseparator() const;
// ----------------------------------------------------------------
// Determine area features
virtual bool issoftdelete() const { return false; }
virtual bool havearrivedstamp() const { return true; }
virtual bool havereceivedstamp() const { return true; }
virtual bool requirehardterm() const { return false; }
virtual bool requiresoftterm() const { return false; }
// ----------------------------------------------------------------
@ -198,19 +196,7 @@ protected:
// ------------------------------------------------------------------
// Inline implementations
inline int gmo_area::isfts1() const { return cfg.isfts1(); }
inline int gmo_area::isopus() const { return cfg.isopus(); }
inline int gmo_area::isezycom() const { return cfg.isezycom(); }
inline int gmo_area::isfido() const { return cfg.isfido(); }
inline int gmo_area::isgoldbase() const { return cfg.isgoldbase(); }
inline int gmo_area::ishudson() const { return cfg.ishudson(); }
inline int gmo_area::isjam() const { return cfg.isjam(); }
inline int gmo_area::ispcboard() const { return cfg.ispcboard(); }
inline int gmo_area::issquish() const { return cfg.issquish(); }
inline int gmo_area::issmb() const { return cfg.issmb(); }
inline int gmo_area::iswildcat() const { return cfg.iswildcat(); }
inline int gmo_area::isadeptxbbs() const { return cfg.isadeptxbbs(); }
inline int gmo_area::isseparator() const { return cfg.isseparator(); }
inline bool gmo_area::isseparator() const { return cfg.isseparator(); }
inline int gmo_area::isnet() const { return cfg.isnet(); }
inline int gmo_area::isecho() const { return cfg.isecho(); }

View File

@ -209,6 +209,9 @@ public:
EzycomArea() { wide = NULL; data = NULL; }
virtual ~EzycomArea() {}
virtual bool havereceivedstamp() const { return false; }
virtual bool requiresoftterm() const { return true; }
// ----------------------------------------------------------------
// Messagebase member functions

View File

@ -139,6 +139,8 @@ protected:
FidoWide* wide;
FidoData* data;
inline bool isopus() const { return streql(cfg.basetype, "OPUS"); }
void data_open();
void data_close();
@ -154,6 +156,9 @@ public:
FidoArea() { wide = NULL; data = NULL; }
virtual ~FidoArea() {}
virtual bool havearrivedstamp() const { return isopus() ? true : false; }
virtual bool havereceivedstamp() const { return false; }
// ----------------------------------------------------------------
// Messagebase member functions

View File

@ -65,29 +65,27 @@ int FidoArea::load_message(int __mode, gmsg* __msg, FidoHdr& __hdr) {
strxcpy(__msg->to, __hdr.to, 36);
strxcpy(__msg->re, __hdr.re, 72);
__msg->orig.zone = __msg->oorig.zone = __hdr.ftsc.origzone;
__msg->orig.net = __msg->oorig.net = __hdr.orignet;
__msg->orig.node = __msg->oorig.node = __hdr.orignode;
__msg->orig.point = __msg->oorig.point = __hdr.ftsc.origpoint;
__msg->dest.zone = __msg->odest.zone = __hdr.ftsc.destzone;
__msg->dest.net = __msg->odest.net = __hdr.destnet;
__msg->dest.node = __msg->odest.node = __hdr.destnode;
__msg->dest.point = __msg->odest.point = __hdr.ftsc.destpoint;
if(isopus()) {
__msg->orig.zone = __msg->oorig.zone =
__msg->dest.zone = __msg->odest.zone =
__msg->orig.point = __msg->oorig.point =
__msg->dest.point = __msg->odest.point = 0;
}
// Convert datetime
if(isopus()) {
// Convert datetime
__msg->written = FTimeToTime(&__hdr.opus.written);
__msg->arrived = FTimeToTime(&__hdr.opus.arrived);
}
else {
__msg->orig.zone = __msg->oorig.zone = __hdr.ftsc.origzone;
__msg->orig.net = __msg->oorig.net = __hdr.orignet;
__msg->orig.node = __msg->oorig.node = __hdr.orignode;
__msg->orig.point = __msg->oorig.point = __hdr.ftsc.origpoint;
__msg->dest.zone = __msg->odest.zone = __hdr.ftsc.destzone;
__msg->dest.net = __msg->odest.net = __hdr.destnet;
__msg->dest.node = __msg->odest.node = __hdr.destnode;
__msg->dest.point = __msg->odest.point = __hdr.ftsc.destpoint;
__msg->written = __msg->arrived = 0;
}
__msg->written = __msg->written ? __msg->written : FidoTimeToUnix(__hdr.datetime);

View File

@ -292,6 +292,9 @@ public:
_HudsArea() { wide = NULL; }
virtual ~_HudsArea() {}
virtual bool havearrivedstamp() const { return false; }
virtual bool havereceivedstamp() const { return false; }
// ----------------------------------------------------------------
// Messagebase member functions

View File

@ -214,7 +214,7 @@ struct JamSubField {
struct JamIndex {
dword usercrc; // CRC-32 of destination username
ulong hdroffset; // Offset of header in .JHR file
ulong hdroffset; // Offset of header in .JHR file
};
@ -302,6 +302,8 @@ public:
JamArea() { wide = NULL; data = NULL; just_scanning = false; }
virtual ~JamArea() {}
virtual bool issoftdelete() const { return (wide != NULL) ? not wide->harddelete : true; }
// ----------------------------------------------------------------
// Messagebase member functions

View File

@ -190,6 +190,10 @@ public:
PcbArea() { wide = NULL; data = NULL; just_scanning = false; }
virtual ~PcbArea() {}
virtual bool havearrivedstamp() const { return false; }
virtual bool havereceivedstamp() const { return false; }
virtual bool requirehardterm() const { return true; }
// ----------------------------------------------------------------
// Messagebase member functions

View File

@ -35,9 +35,6 @@
void EzycomInit(const char* msgbasepath, const char* userbasepath, int userno);
void EzycomExit();
void EzycomWideOpen();
void EzycomWideClose();
// ------------------------------------------------------------------
@ -45,9 +42,6 @@ void FidoInit(const char* fidolastread, int fidohwmarks, int fidonullfix, int fi
void FidoExit();
void FidoRenumberProgress(const char* s);
void FidoWideOpen();
void FidoWideClose();
// ------------------------------------------------------------------
@ -75,9 +69,6 @@ void HGWarnRebuild();
void JamInit(const char* jampath, int harddelete, int smapihw);
void JamExit();
void JamWideOpen();
void JamWideClose();
// ------------------------------------------------------------------
@ -106,18 +97,12 @@ void SMBExit();
void WCatInit(int userno);
void WCatExit();
void WCatWideOpen();
void WCatWideClose();
// ------------------------------------------------------------------
void XbbsInit(const char* path, int userno);
void XbbsExit();
void XbbsWideOpen();
void XbbsWideClose();
// ------------------------------------------------------------------

View File

@ -54,6 +54,8 @@ public:
SMBArea() { data = NULL; }
virtual ~SMBArea() {}
virtual bool issoftdelete() const { return true; }
// ----------------------------------------------------------------
// Messagebase member functions

View File

@ -615,17 +615,17 @@ void SMBArea::save_hdr(int mode, gmsg* msg)
smb_hfield(&smsg, SENDER, strlen(msg->by), msg->by);
strcpy(buf, msg->by);
strlwr(buf);
smsg.idx.from = strCrc16(buf);
smsg.idx.from = strCrc16c(buf);
smb_hfield(&smsg, RECIPIENT, strlen(msg->to), msg->to);
strcpy(buf, msg->to);
strlwr(buf);
smsg.idx.to = strCrc16(buf);
smsg.idx.to = strCrc16c(buf);
smb_hfield(&smsg, SUBJECT, strlen(msg->re), msg->re);
strcpy(buf, msg->re);
strlwr(buf);
smsg.idx.subj = strCrc16(buf);
smsg.idx.subj = strCrc16c(buf);
// calculate maximum possible size of sbody/stail
for(l = 0, fbuf = msg->txt; *fbuf != NUL; l++, fbuf++)

View File

@ -195,6 +195,9 @@ public:
WCatArea() { wide = NULL; data = NULL; }
virtual ~WCatArea() {}
virtual bool issoftdelete() const { return true; }
virtual bool requirehardterm() const { return true; }
// ----------------------------------------------------------------
// Messagebase member functions

View File

@ -52,30 +52,6 @@ void XbbsArea::refresh() {
}
// ------------------------------------------------------------------
void XbbsWideOpen() {
GFTRK("XbbsWideOpen");
// Open the personal mail index
GFTRK(NULL);
}
// ------------------------------------------------------------------
void XbbsWideClose() {
GFTRK("XbbsWideClose");
// Close the personal mail index
GFTRK(NULL);
}
// ------------------------------------------------------------------
void XbbsArea::raw_scan(int __keep_index, int __scanpm) {

View File

@ -10,7 +10,7 @@ else
ifeq ($(TERM),cygwin)
STDLIBS=-luser32
else
ifeq ($(TERM),MSYS)
ifeq ($(TERM),msys)
STDLIBS=-luser32
endif
endif

View File

@ -2747,7 +2747,7 @@ AREA:&lt;OriginalEchoID&gt;</eg>
<cell>
<ident/Opus/, <ident/FTS1/, <ident/Hudson/, <ident/Squish/,
<ident/Ezycom/, <ident/JAM/, <ident/Goldbase/, <ident/PCBoard/,
or <ident/SMB/.
<ident/WildCat/, <ident/XBBS/, or <ident/SMB/.
</cell>
</row>
<row>

View File

@ -10,7 +10,7 @@ else
ifeq ($(TERM),cygwin)
STDLIBS=-luser32
else
ifeq ($(TERM),MSYS)
ifeq ($(TERM),msys)
STDLIBS=-luser32
endif
endif