diff --git a/Config.def b/Config.def index c0fa62f..8de898c 100644 --- a/Config.def +++ b/Config.def @@ -1,7 +1,11 @@ # Uncomment to disable AdeptXBBS support -#CPPFLAGS+=-DGCFG_NOXBBS +ifneq ($(findstring EMX, $(PATH)), EMX) +CPPFLAGS+=-DGCFG_NOXBBS +endif # Uncomment to disable CrashMail support #CPPFLAGS+=-DGCFG_NOCMAIL +# Uncomment to disable CrashEcho support +#CPPFLAGS+=-DGCFG_NOCECHO # Uncomment to disable D'Bridge support #CPPFLAGS+=-DGCFG_NODB # Uncomment to disable Dutchie support @@ -50,6 +54,8 @@ #CPPFLAGS+=-DGCFG_NORAECHO # Uncomment to disable RemoteAccess support #CPPFLAGS+=-DGCFG_NORA +# Uncomment to disable SpaceTosser support +CPPFLAGS+=-DGCFG_NOSPCT # Uncomment to disable Squish support #CPPFLAGS+=-DGCFG_NOSQSH # Uncomment to disable SuperBBS support @@ -66,5 +72,3 @@ #CPPFLAGS+=-DGCFG_NOWMAIL # Uncomment to disable xMail support #CPPFLAGS+=-DGCFG_NOXMAIL -# Uncomment to disable SpaceTosser support -#CPPFLAGS+=-DGCFG_NOSPCT \ No newline at end of file diff --git a/MSGBase.def b/MSGBase.def index 9ff8c0b..032f722 100644 --- a/MSGBase.def +++ b/MSGBase.def @@ -15,4 +15,6 @@ # Uncomment to disable WildCat! messagebase format #CPPFLAGS+=-DGMB_NOWCAT # Uncomment to disable AdeptXBBS messagebase format -#CPPFLAGS+=-DGMB_NOXBBS +ifneq ($(findstring EMX, $(PATH)), EMX) +CPPFLAGS+=-DGMB_NOXBBS +endif diff --git a/docs/notework.txt b/docs/notework.txt index b5d7384..f62c926 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,8 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, April xx 2001 ______________________________________________________________________ ++ Thanks to Alexey Froloff added support for CrashEcho tosser. + - Fixed Y2K bug in WildCat! and PCBoard bases. - Fixed cursor position in XlatImport menu when Auto encoding diff --git a/golded3/gcarea.cpp b/golded3/gcarea.cpp index dd83968..a7d33b0 100644 --- a/golded3/gcarea.cpp +++ b/golded3/gcarea.cpp @@ -387,6 +387,8 @@ void AreaList::GetAreafile(char* value) { AFILE->fidomsgtype = CFG->fidomsgtype; AFILE->ra2usersbbs = CFG->ra2usersbbs; AFILE->squishuserno = CFG->squishuserno; + AFILE->areapath = CFG->areapath; + AFILE->pcboardpath = CFG->pcboardpath; if(not CFG->aka.empty()) AFILE->primary_aka = CFG->aka[0].addr; @@ -399,17 +401,6 @@ void AreaList::GetAreafile(char* value) { AFILE->attribsemail = CFG->attribsemail; AFILE->attribslocal = CFG->attribslocal; - AFILE->areapath = CFG->areapath; - AFILE->adeptxbbspath = CFG->adeptxbbspath; - AFILE->jampath = CFG->jampath; - AFILE->squishuserpath = CFG->squishuserpath; - AFILE->hudsonpath = CFG->hudsonpath; - AFILE->goldbasepath = CFG->goldbasepath; - AFILE->pcboardpath = CFG->pcboardpath; - AFILE->ezycom_msgbasepath = CFG->ezycom.msgbasepath; - AFILE->ezycom_userbasepath = CFG->ezycom.userbasepath; - AFILE->fidolastread = CFG->fidolastread; - AFILE->ReadAreafile(crcval, value); CFG->ra2usersbbs = AFILE->ra2usersbbs; @@ -1083,7 +1074,7 @@ Area::~Area() { char* MapPath(char* map, bool reverse) { - Path buf,cmap; + Path buf, cmap; strxcpy(cmap, map, sizeof(Path)); if(reverse) diff --git a/golded3/gccfgg.cpp b/golded3/gccfgg.cpp index 5c5e989..2f46edb 100644 --- a/golded3/gccfgg.cpp +++ b/golded3/gccfgg.cpp @@ -61,25 +61,25 @@ bool ReadGoldedCfg(int& force) { if(*CFG->squishuserpath == NUL) { char* ptr = getenv("MAXIMUS"); - if(ptr) { - if(is_dir(ptr)) - AddBackslash(strcpy(CFG->squishuserpath, ptr)); + if(ptr != NULL) { + CfgSquishuserpath(ptr); } else { ptr = getenv("SQUISH"); - if(ptr) - AddBackslash(strcpy(CFG->squishuserpath, ptr)); + if(ptr != NULL) + CfgSquishuserpath(ptr); else - strcpy(CFG->squishuserpath, CFG->areapath); + CfgSquishuserpath(CFG->areapath); } } - if(*CFG->hudsonpath == NUL) strcpy(CFG->hudsonpath, CFG->goldpath); - if(*CFG->hudsonsyspath == NUL) strcpy(CFG->hudsonsyspath, CFG->hudsonpath); - if(*CFG->goldbasepath == NUL) strcpy(CFG->goldbasepath, CFG->hudsonpath); - if(*CFG->goldbasesyspath == NUL) strcpy(CFG->goldbasesyspath, CFG->goldbasepath); - if(*CFG->jampath == NUL) - strcpy(CFG->jampath, CFG->hudsonpath); + CfgHudsonpath(CFG->goldpath); + if(*CFG->hudsonsyspath == NUL) + strcpy(CFG->hudsonsyspath, CFG->hudsonpath); + CfgGoldbasepath(CFG->hudsonpath); + if(*CFG->goldbasesyspath == NUL) + strcpy(CFG->goldbasesyspath, CFG->goldbasepath); + CfgJampath(CFG->hudsonpath); MakePathname(CFG->goldcfg, CFG->goldpath, CFG->goldcfg); MakePathname(CFG->helpcfg.fn, CFG->goldpath, CFG->helpcfg.fn); @@ -318,7 +318,7 @@ void InstallDetect(char* path) { if(fp) { if(*path) { - PathCopy(CFG->areapath, path); + MapPath(PathCopy(CFG->areapath, path)); fprintf(fp, "AREAPATH %s\n", path); } diff --git a/golded3/gccfgg1.cpp b/golded3/gccfgg1.cpp index 1ebb7c0..75a916b 100644 --- a/golded3/gccfgg1.cpp +++ b/golded3/gccfgg1.cpp @@ -141,9 +141,15 @@ void CfgAddressmacro() { // ------------------------------------------------------------------ +void CfgAdeptxbbspath(const char *path, bool force) { + + if (force or strblank(CFG->adeptxbbspath)) + MapPath(PathCopy(CFG->adeptxbbspath, path)); +} + void CfgAdeptxbbspath() { - PathCopy(CFG->adeptxbbspath, val); + CfgAdeptxbbspath(val, true); } // ------------------------------------------------------------------ @@ -359,7 +365,7 @@ void CfgArealisttype() { void CfgAreapath() { - PathCopy(CFG->areapath, val); + MapPath(PathCopy(CFG->areapath, val)); } // ------------------------------------------------------------------ diff --git a/golded3/gccfgg4.cpp b/golded3/gccfgg4.cpp index 4454192..86eae38 100644 --- a/golded3/gccfgg4.cpp +++ b/golded3/gccfgg4.cpp @@ -148,16 +148,28 @@ void CfgExternutil() { // ------------------------------------------------------------------ +void CfgEzycommsgbase(const char *path, bool force) { + + if(force or strblank(CFG->ezycom.msgbasepath)) + MapPath(PathCopy(CFG->ezycom.msgbasepath, path)); +} + void CfgEzycommsgbase() { - PathCopy(CFG->ezycom.msgbasepath, val); + CfgEzycommsgbase(val, true); } // ------------------------------------------------------------------ +void CfgEzycomuserbase(const char *path, bool force) { + + if(force or strblank(CFG->ezycom.userbasepath)) + MapPath(PathCopy(CFG->ezycom.userbasepath, path)); +} + void CfgEzycomuserbase() { - PathCopy(CFG->ezycom.userbasepath, val); + CfgEzycomuserbase(val, true); } // ------------------------------------------------------------------ @@ -169,9 +181,14 @@ void CfgEzycomuserno() { // ------------------------------------------------------------------ +void CfgFidolastread(const char *path) { + + MapPath(strxcpy(CFG->fidolastread, val, sizeof(Path))); +} + void CfgFidolastread() { - strcpy(CFG->fidolastread, val); + CfgFidolastread(val); } // ------------------------------------------------------------------ @@ -286,9 +303,15 @@ void CfgGermankeyboard() { // ------------------------------------------------------------------ +void CfgGoldbasepath(const char *path, bool force) { + + if(force or strblank(CFG->goldbasepath)) + MapPath(PathCopy(CFG->goldbasepath, path)); +} + void CfgGoldbasepath() { - PathCopy(CFG->goldbasepath, val); + CfgGoldbasepath(val, true); } // ------------------------------------------------------------------ diff --git a/golded3/gccfgg5.cpp b/golded3/gccfgg5.cpp index 57a3ecc..697a080 100644 --- a/golded3/gccfgg5.cpp +++ b/golded3/gccfgg5.cpp @@ -44,9 +44,15 @@ void CfgHappybirthday() { // ------------------------------------------------------------------ +void CfgHudsonpath(const char *path, bool force) { + + if(force or strblank(CFG->hudsonpath)) + MapPath(PathCopy(CFG->hudsonpath, path)); +} + void CfgHudsonpath() { - PathCopy(CFG->hudsonpath, val); + CfgHudsonpath(val, true); } // ------------------------------------------------------------------ @@ -286,9 +292,15 @@ void CfgInvalidate() { // ------------------------------------------------------------------ +void CfgJampath(const char *path, bool force) { + + if(force or strblank(CFG->jampath)) + MapPath(PathCopy(CFG->jampath, path)); +} + void CfgJampath() { - PathCopy(CFG->jampath, val); + CfgJampath(val, true); } // ------------------------------------------------------------------ diff --git a/golded3/gccfgg6.cpp b/golded3/gccfgg6.cpp index cf8b18f..bce3ac2 100644 --- a/golded3/gccfgg6.cpp +++ b/golded3/gccfgg6.cpp @@ -240,9 +240,15 @@ void CfgPathreportfile() { // ------------------------------------------------------------------ +void CfgPcboardpath(const char *path, bool force) { + + if(force or strblank(CFG->pcboardpath)) + MapPath(PathCopy(CFG->pcboardpath, path)); +} + void CfgPcboardpath() { - - PathCopy(CFG->pcboardpath, val); + + CfgPcboardpath(val, true); } // ------------------------------------------------------------------ diff --git a/golded3/gccfgg8.cpp b/golded3/gccfgg8.cpp index 6c34655..99c54e0 100644 --- a/golded3/gccfgg8.cpp +++ b/golded3/gccfgg8.cpp @@ -42,9 +42,19 @@ void CfgSquishuserno() { // ------------------------------------------------------------------ +void CfgSquishuserpath(const char *path, bool force) { + + if(force or strblank(CFG->squishuserpath)) { + + MapPath(PathCopy(CFG->squishuserpath, path)); + if(not is_dir(CFG->squishuserpath)) + StripBackslash(CFG->squishuserpath); + } +} + void CfgSquishuserpath() { - PathCopy(CFG->squishuserpath, val); + CfgSquishuserpath(val, true); } // ------------------------------------------------------------------ diff --git a/golded3/geedit.cpp b/golded3/geedit.cpp index 0b1630f..f249dcf 100644 --- a/golded3/geedit.cpp +++ b/golded3/geedit.cpp @@ -565,7 +565,7 @@ void IEclass::GoLeft() { if(currline->prev) { GoUp(); GoEOL(); - if((currline->txt[col] == '\n') or not ((col == (maxcol + 1)) and (currline->txt[col-1] == ' '))) + if((col != mincol) and ((currline->txt[col] == '\n') or not ((col == (maxcol + 1)) and (currline->txt[col-1] == ' ')))) col--; } } diff --git a/golded3/geusrbse.cpp b/golded3/geusrbse.cpp index 49a5f35..91ee052 100644 --- a/golded3/geusrbse.cpp +++ b/golded3/geusrbse.cpp @@ -66,10 +66,10 @@ guserbase::guserbase() { entry.fidoaddr.net = 5020; entry.fidoaddr.node = 604; entry.fidoaddr.point = 19; - strcpy(entry.iaddr, "aaganichev@netscape.net"); + strcpy(entry.iaddr, "aaganichev@yandex.ru"); entry.prefer_internet = YES; entry.is_deleted = NO; - strcpy(entry.pseudo, "As\'ka"); + strcpy(entry.pseudo, ""); strcpy(entry.organisation, "GoldED+ Development Team"); strcpy(entry.snail1, "Zelenograd"); strcpy(entry.snail2, "Moscow"); @@ -78,7 +78,7 @@ guserbase::guserbase() { strcpy(entry.voicephone, "+7-(095)-536-2374"); entry.faxphone[0] = NUL; entry.firstdate = entry.lastdate = entry.times = 0; - strcpy(entry.homepage, "http://asa.i-connect.ru"); + strcpy(entry.homepage, "http://aaganichev.narod.ru"); entry.group = 0; strcpy(entry.comment1, "GoldED+ Maintainer"); entry.comment2[0] = NUL; diff --git a/goldlib/gall/gfilutl1.cpp b/goldlib/gall/gfilutl1.cpp index 1b94189..ea858d1 100644 --- a/goldlib/gall/gfilutl1.cpp +++ b/goldlib/gall/gfilutl1.cpp @@ -28,7 +28,11 @@ #include #include #include +#if defined(__MINGW32__) +#include +#else #include +#endif #if defined(__OS2__) #define INCL_BASE @@ -207,28 +211,29 @@ const char* AddPath(const char* path, const char* file) { void MakePathname(char* pathname, const char* path, const char* name) { - char newpath[GMAXPATH]; Path tmpname; - Path tmppath; strcpy(tmpname, name); - strcpy(tmppath, path); if(strblank(tmpname)) { *pathname = NUL; return; } - strbtrim(tmppath); - strchg(tmppath, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR); strchg(tmpname, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR); - if(strpbrk(tmpname, GOLD_SLASH_STR)) - strschg_environ(strxcpy(pathname, tmpname, sizeof(Path))); - else { - strcpy(newpath, tmppath); - if(*newpath) - AddBackslash(newpath); - strxmerge(pathname, sizeof(Path), newpath, tmpname, NULL); + if(strpbrk(tmpname, GOLD_SLASH_STR)) { + strxcpy(pathname, tmpname, sizeof(Path)); } + else { + Path tmppath; + + strcpy(tmppath, path); + strbtrim(tmppath); + strchg(tmppath, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR); + if(*tmppath) + AddBackslash(tmppath); + strxmerge(pathname, sizeof(Path), tmppath, tmpname, NULL); + } + strschg_environ(pathname); } diff --git a/goldlib/gall/gfilutl2.cpp b/goldlib/gall/gfilutl2.cpp index 82739f6..19de13d 100644 --- a/goldlib/gall/gfilutl2.cpp +++ b/goldlib/gall/gfilutl2.cpp @@ -53,7 +53,6 @@ string& AddBackslash(string& p) { void MakePathname(string& pathname, const string& path, const string& name) { Path pn; - strcpy(pn, pathname.c_str()); MakePathname(pn, path.c_str(), name.c_str()); pathname = pn; } diff --git a/goldlib/gcfg/gedacfg.cpp b/goldlib/gcfg/gedacfg.cpp index d5224de..d04e16b 100644 --- a/goldlib/gcfg/gedacfg.cpp +++ b/goldlib/gcfg/gedacfg.cpp @@ -45,15 +45,6 @@ gareafile::gareafile() { squishuserno = 0; areapath = NULL; - adeptxbbspath = NULL; - jampath = NULL; - squishuserpath = NULL; - hudsonpath = NULL; - goldbasepath = NULL; - pcboardpath = NULL; - ezycom_msgbasepath = NULL; - ezycom_userbasepath = NULL; - fidolastread = NULL; } @@ -321,6 +312,7 @@ bool gareafile::ReadAreafile(word crc, char* parameters) { const word CRC_AREAS_BBS = 0xBCEC; const word CRC_AREASBBS = 0xF77C; const word CRC_CRASHMAIL = 0x7551; + const word CRC_CRASHECHO = 0xDDB9; const word CRC_DBRIDGE = 0xD365; const word CRC_DUTCHIE = 0x0B08; const word CRC_D_BRIDGE = 0x48DA; @@ -348,6 +340,7 @@ bool gareafile::ReadAreafile(word crc, char* parameters) { const word CRC_RAECHO = 0x701F; const word CRC_RA_ECHO = 0x4FDF; const word CRC_REMOTEACCESS = 0xECD0; + const word CRC_SPACETOSS = 0xD2A6; const word CRC_SQUISH = 0xFCF6; const word CRC_SUPERBBS = 0x497F; const word CRC_TERMAIL = 0x147A; @@ -364,7 +357,8 @@ bool gareafile::ReadAreafile(word crc, char* parameters) { #endif case CRC_AREAS_BBS: case CRC_AREASBBS: ReadAreasBBS(parameters); break; -#ifndef GCFG_NOCMAIL +#if !defined(GCFG_NOCMAIL) || !defined(GCFG_NOCECHO) + case CRC_CRASHECHO: case CRC_CRASHMAIL: ReadCrashmail(parameters); break; #endif #ifndef GCFG_NODB @@ -446,6 +440,9 @@ bool gareafile::ReadAreafile(word crc, char* parameters) { #ifndef GCFG_NOSBBS case CRC_SUPERBBS: ReadSuperBBS(parameters); break; #endif +#ifndef GCFG_NOSPCT + case CRC_SPACETOSS: ReadSpaceToss(parameters); break; +#endif #ifndef GCFG_NOTERMAIL case CRC_TMAIL: case CRC_TERMAIL: ReadTmail(parameters); break; diff --git a/goldlib/gcfg/gedacfg.h b/goldlib/gcfg/gedacfg.h index 868371a..09b4c3c 100644 --- a/goldlib/gcfg/gedacfg.h +++ b/goldlib/gcfg/gedacfg.h @@ -220,12 +220,12 @@ protected: Path pathprefix; - // Fidoconfig parser functions #ifndef GCFG_NOFIDOCONF + // Fidoconfig parser functions void replace_slashes(char **key); void gettok(char** key, char** val); #endif -#ifndef GCFG_NOCMAIL +#if !defined(GCFG_NOCMAIL) || !defined(GCFG_NOCECHO) // Crashmail II parser function bool jbstrcpy(char *dest, char *src, size_t maxlen, size_t *jbc); #endif @@ -315,6 +315,9 @@ public: int ra2usersbbs; int squishuserno; + const char *areapath; + const char *pcboardpath; + ftn_addr primary_aka; ftn_attr attribsnet; @@ -323,24 +326,13 @@ public: ftn_attr attribsemail; ftn_attr attribslocal; - char* areapath; - char* adeptxbbspath; - char* jampath; - char* squishuserpath; - char* hudsonpath; - char* goldbasepath; - char* pcboardpath; - char* ezycom_msgbasepath; - char* ezycom_userbasepath; - char* fidolastread; - void GetAreasBBS(char* name, char* origin, char* options); void ReadAreasBBS(char* tag); #ifndef GCFG_NOXBBS void ReadAdeptXBBS(char* tag); #endif -#ifndef GCFG_NOCMAIL +#if !defined(GCFG_NOCMAIL) || !defined(GCFG_NOCECHO) void ReadCrashmail(char* tag); #endif #ifndef GCFG_NODB @@ -415,6 +407,9 @@ public: #if !defined(GCFG_NOSQSH) || !defined(GCFG_NOPARTOSS) void ReadSquish(char* tag); #endif +#ifndef GCFG_NOSPCT + void ReadSpaceToss(char *tag); +#endif #ifndef GCFG_NOSBBS void ReadSuperBBS(char* tag); #endif @@ -450,6 +445,15 @@ void CfgUsername(char* value); void ReadEcholist(char* value); void SetAreaDesc(char* echoid, char* desc); +void CfgAdeptxbbspath(const char *path, bool force = false); +void CfgEzycommsgbase(const char *path, bool force = false); +void CfgEzycomuserbase(const char *path, bool force = false); +void CfgGoldbasepath(const char *path, bool force = false); +void CfgHudsonpath(const char *path, bool force = false); +void CfgJampath(const char *path, bool force = false); +void CfgPcboardpath(const char *path, bool force = false); +void CfgSquishuserpath(const char *path, bool force = false); +void CfgFidolastread(const char *path); // ------------------------------------------------------------------ // Legacy area types diff --git a/goldlib/gcfg/gxcrash.cpp b/goldlib/gcfg/gxcrash.cpp index 8176c18..4697116 100644 --- a/goldlib/gcfg/gxcrash.cpp +++ b/goldlib/gcfg/gxcrash.cpp @@ -21,7 +21,7 @@ // ------------------------------------------------------------------ // $Id$ // ------------------------------------------------------------------ -// Read areas from Crashmail II +// Read areas from Crashmail II/CrashEcho // ------------------------------------------------------------------ #include @@ -71,7 +71,7 @@ bool gareafile::jbstrcpy(char *dest, char *src, size_t maxlen, size_t *jbc) { // ------------------------------------------------------------------ -// Read areas from Crashmail (echomail processor) +// Read areas from Crashmail II/CrashEcho (echomail processor) void gareafile::ReadCrashmail(char* tag) { @@ -89,8 +89,7 @@ void gareafile::ReadCrashmail(char* tag) { extractdirname(path, file); - if(*squishuserpath == NUL) - PathCopy(squishuserpath, path); + CfgSquishuserpath(path); FILE* fp = fsopen(file, "rb", sharemode); if(fp) { @@ -117,6 +116,7 @@ void gareafile::ReadCrashmail(char* tag) { const word CRC_DOMAIN = 0xFFCA; const word CRC_GROUP = 0x1C9B; const word CRC_NETMAIL = 0xE42E; + const word CRC_NETMAILDIR = 0x180A; const word CRC_SYSOP = 0x967F; const word CRC_UNCONFIRMED = 0x195E; @@ -144,6 +144,24 @@ void gareafile::ReadCrashmail(char* tag) { case CRC_DOMAIN: jbstrcpy(domain, buf, 50, &jbcpos); break; +#ifndef GCFG_NOCECHO + case CRC_NETMAILDIR: + if(aa.type != 0xff) { + if(not unconfirmed) + AddNewArea(aa); + aa.reset(); + } + aa.aka = primary_aka; + aa.type = GMB_NET; + aa.attr = attribsnet; + aa.msgbase = fidomsgtype; + jbstrcpy(path, buf, sizeof(Path), &jbcpos); + aa.setpath(path); + aa.setdesc("CrashEcho Netmail"); + aa.setautoid("NETMAIL"); + unconfirmed = false; + break; +#endif case CRC_AREA: case CRC_NETMAIL: case CRC_LOCALAREA: @@ -195,8 +213,7 @@ void gareafile::ReadCrashmail(char* tag) { if(aa.type == 0xff) break; jbstrcpy(path, buf, sizeof(Path), &jbcpos); - strxcpy(buf, path, sizeof(Path)); - aa.setpath(MapPath(buf)); + aa.setpath(path); break; case CRC_DESCRIPTION: jbstrcpy(tmp, buf, 100, &jbcpos); diff --git a/goldlib/gcfg/gxdb.cpp b/goldlib/gcfg/gxdb.cpp index 07d6d6c..177506e 100644 --- a/goldlib/gcfg/gxdb.cpp +++ b/goldlib/gcfg/gxdb.cpp @@ -360,8 +360,7 @@ void gareafile::ReadDBridge(char* tag) { for(; line <= 11; line++) fgets(buf, 255, fp); strtrim(buf); - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(buf)); + CfgHudsonpath(buf); // Primary address for(; line <= 15; line++) diff --git a/goldlib/gcfg/gxezy102.cpp b/goldlib/gcfg/gxezy102.cpp index efc0c80..b6d9db4 100644 --- a/goldlib/gcfg/gxezy102.cpp +++ b/goldlib/gcfg/gxezy102.cpp @@ -65,10 +65,8 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) { STRNP2C(constant->sysopname); STRNP2C(constant->sysopalias); - if(*ezycom_msgbasepath == NUL) - AddBackslash(strcpy(ezycom_msgbasepath, MapPath(config->msgpath))); - if(*ezycom_userbasepath == NUL) - AddBackslash(strcpy(ezycom_userbasepath, MapPath(config->userbasepath))); + CfgEzycommsgbase(config->msgpath); + CfgEzycomuserbase(config->userbasepath); // Fido netmail directory if(not strblank(config->netmailpath)) { diff --git a/goldlib/gcfg/gxezy110.cpp b/goldlib/gcfg/gxezy110.cpp index 86a68e3..d630be3 100644 --- a/goldlib/gcfg/gxezy110.cpp +++ b/goldlib/gcfg/gxezy110.cpp @@ -66,10 +66,8 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) { STRNP2C(constant->sysopname); STRNP2C(constant->sysopalias); - if(*ezycom_msgbasepath == NUL) - AddBackslash(strcpy(ezycom_msgbasepath, MapPath(config->msgpath))); - if(*ezycom_userbasepath == NUL) - AddBackslash(strcpy(ezycom_userbasepath, MapPath(config->userbasepath))); + CfgEzycommsgbase(config->msgpath); + CfgEzycomuserbase(config->userbasepath); // Fido netmail directory if(not strblank(config->netmailpath)) { diff --git a/goldlib/gcfg/gxfd.cpp b/goldlib/gcfg/gxfd.cpp index 163ec3b..178a509 100644 --- a/goldlib/gcfg/gxfd.cpp +++ b/goldlib/gcfg/gxfd.cpp @@ -93,8 +93,7 @@ void gareafile::ReadFrontDoor(char* tag) { fread(editor, sizeof(FD_Editor), 1, fp); fread(shared, sizeof(FD_Shared), 1, fp); //CfgUsername(shared->user[0].name); - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(editor->qbase)); + CfgHudsonpath(editor->qbase); aa.reset(); aa.aka = shared->aka[0]; aa.type = GMB_NET; diff --git a/goldlib/gcfg/gxfecho4.cpp b/goldlib/gcfg/gxfecho4.cpp index f493f17..207c10a 100644 --- a/goldlib/gcfg/gxfecho4.cpp +++ b/goldlib/gcfg/gxfecho4.cpp @@ -48,8 +48,7 @@ void gareafile::ReadFastecho11x(int fh) { //CfgUsername(cfg->sysops[u].name); // Get Hudson msgbase path - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(cfg->MsgBase)); + CfgHudsonpath(cfg->MsgBase); // Setup aka list SysAddress* aka = (SysAddress*)throw_calloc(cfg->AkaCnt, sizeof(SysAddress)); diff --git a/goldlib/gcfg/gxfecho5.cpp b/goldlib/gcfg/gxfecho5.cpp index 79aa255..cb747a3 100644 --- a/goldlib/gcfg/gxfecho5.cpp +++ b/goldlib/gcfg/gxfecho5.cpp @@ -48,8 +48,7 @@ void gareafile::ReadFastecho141(int fh) { //CfgUsername(cfg->sysops[u].name); // Get Hudson msgbase path - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(cfg->MsgBase)); + CfgHudsonpath(cfg->MsgBase); // Setup aka list SysAddress* aka = (SysAddress*)throw_calloc(cfg->AkaCnt, sizeof(SysAddress)); diff --git a/goldlib/gcfg/gxfecho6.cpp b/goldlib/gcfg/gxfecho6.cpp index df5a446..0e9fa4e 100644 --- a/goldlib/gcfg/gxfecho6.cpp +++ b/goldlib/gcfg/gxfecho6.cpp @@ -47,8 +47,7 @@ void gareafile::ReadFastecho142(int fh) { read(fh, cfg, sizeof(CONFIG6)); // Get Hudson msgbase path - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(cfg->MsgBase)); + CfgHudsonpath(cfg->MsgBase); // Setup aka and origin lists SysAddress* aka = (SysAddress*)throw_calloc(cfg->AkaCnt, sizeof(SysAddress)); diff --git a/goldlib/gcfg/gxfidpcb.cpp b/goldlib/gcfg/gxfidpcb.cpp index 0693055..3ecc813 100644 --- a/goldlib/gcfg/gxfidpcb.cpp +++ b/goldlib/gcfg/gxfidpcb.cpp @@ -120,7 +120,7 @@ void gareafile::ReadFidoPCB(char* tag) { PathCopy(mailpath, val); break; case CRC_PCBOARD: - PathCopy(pcboardpath, val); + CfgPcboardpath(val); break; case CRC_LOST_MAIL: PathCopy(lostmailpath, val); diff --git a/goldlib/gcfg/gxfm092.cpp b/goldlib/gcfg/gxfm092.cpp index 91c2b34..fbe9cbe 100644 --- a/goldlib/gcfg/gxfm092.cpp +++ b/goldlib/gcfg/gxfm092.cpp @@ -43,8 +43,7 @@ void gareafile::ReadFMail092(FILE* fp, char* path, char* file, char* options) { fclose(fp); // Get Hudson msgbase path - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(cfg->bbsPath)); + CfgHudsonpath(cfg->bbsPath); // Opus-.MSG style netmail if(not strblank(cfg->netPath)) { diff --git a/goldlib/gcfg/gxfm100.cpp b/goldlib/gcfg/gxfm100.cpp index 3d2ceee..f8d76b1 100644 --- a/goldlib/gcfg/gxfm100.cpp +++ b/goldlib/gcfg/gxfm100.cpp @@ -44,8 +44,7 @@ void gareafile::ReadFMail098(FILE* fp, char* path, char* file, char* options) { fclose(fp); // Get Hudson msgbase path - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(cfg->bbsPath)); + CfgHudsonpath(cfg->bbsPath); // .MSG style netmail if(not strblank(cfg->netPath)) { diff --git a/goldlib/gcfg/gxfm116.cpp b/goldlib/gcfg/gxfm116.cpp index 5fe02e8..610062c 100644 --- a/goldlib/gcfg/gxfm116.cpp +++ b/goldlib/gcfg/gxfm116.cpp @@ -44,8 +44,7 @@ void gareafile::ReadFMail116(FILE* fp, char* path, char* file, char* options) { fclose(fp); // Get Hudson msgbase path - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(cfg->bbsPath)); + CfgHudsonpath(cfg->bbsPath); // .MSG style netmail if(not strblank(cfg->netPath)) { diff --git a/goldlib/gcfg/gxgecho.cpp b/goldlib/gcfg/gxgecho.cpp index f261ebc..5a2d6d3 100644 --- a/goldlib/gcfg/gxgecho.cpp +++ b/goldlib/gcfg/gxgecho.cpp @@ -102,11 +102,8 @@ void gareafile::ReadGEcho(char* tag) { //for(n=0; nusername[n]); - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(gesetup->hmbpath)); - - if(*jampath == NUL) - PathCopy(jampath, MapPath(gesetup->jampath)); + CfgHudsonpath(gesetup->hmbpath); + CfgJampath(gesetup->jampath); int _fidomsgtype = fidomsgtype; @@ -329,11 +326,6 @@ void gareafile::ReadGEcho(char* tag) { } } - // Set the JAM message base path - if(*gesetup->jampath) - PathCopy(jampath, gesetup->jampath); - - // -------------------------------------------------------------- MakePathname(file, gepath, "areafile.ge"); diff --git a/goldlib/gcfg/gxhpt.cpp b/goldlib/gcfg/gxhpt.cpp index af555d7..d1c5927 100644 --- a/goldlib/gcfg/gxhpt.cpp +++ b/goldlib/gcfg/gxhpt.cpp @@ -334,18 +334,17 @@ void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin, // Get path gettok(&key, &val); - strxcpy(buf2, key, sizeof(buf2)); // If not pass-through - if(not strieql("Passthrough", buf2)) { + if(not strieql("Passthrough", key)) { - aa.setpath(MapPath(buf2)); + aa.setpath(key); aa.msgbase = fidomsgtype; aa.groupid = group; gettok(&key, &val); - while(*key == '-' || strieql(key, "Squish") || strieql(key, "Jam")) { + while((*key == '-') or strieql(key, "Squish") or strieql(key, "Jam")) { if(strieql(key, "Squish")) aa.msgbase = GMB_SQUISH; @@ -455,8 +454,7 @@ void gareafile::ReadHPT(char* tag) { extractdirname(path, file); - if(*squishuserpath == NUL) - PathCopy(squishuserpath, path); + CfgSquishuserpath(path); ReadHPTFile(path, file, options, origin, defaultgroup); } diff --git a/goldlib/gcfg/gximail4.cpp b/goldlib/gcfg/gximail4.cpp index dac782c..46f80e2 100644 --- a/goldlib/gcfg/gximail4.cpp +++ b/goldlib/gcfg/gximail4.cpp @@ -52,12 +52,9 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) { fread(CF, sizeof(im_config_type), 1, fp); fclose(fp); - if(*jampath == NUL) - PathCopy(jampath, MapPath(CF->echojam)); - - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(CF->quickbbs)); - + CfgJampath(CF->echojam); + CfgHudsonpath(CF->quickbbs); + // Fido netmail if(not strblank(CF->netmail)) { aa.reset(); diff --git a/goldlib/gcfg/gximail5.cpp b/goldlib/gcfg/gximail5.cpp index 0c92b59..5249d43 100644 --- a/goldlib/gcfg/gximail5.cpp +++ b/goldlib/gcfg/gximail5.cpp @@ -62,12 +62,9 @@ void gareafile::ReadIMail170(char* options, char* file, char* impath) { fread(CF, sizeof(im_config_type), 1, fp); fclose(fp); - if(*jampath == NUL) - PathCopy(jampath, MapPath(CF->echojam)); - - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(CF->quickbbs)); - + CfgJampath(CF->echojam); + CfgHudsonpath(CF->quickbbs); + // Fido netmail if(not strblank(CF->netmail)) { aa.reset(); diff --git a/goldlib/gcfg/gximail6.cpp b/goldlib/gcfg/gximail6.cpp index 9e56f22..191d3c8 100644 --- a/goldlib/gcfg/gximail6.cpp +++ b/goldlib/gcfg/gximail6.cpp @@ -62,12 +62,9 @@ void gareafile::ReadIMail185(char* options, char* file, char* impath) { fread(CF, sizeof(im_config_type), 1, fp); fclose(fp); - if(*jampath == NUL) - PathCopy(jampath, MapPath(CF->echojam)); - - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(CF->quickbbs)); - + CfgJampath(CF->echojam); + CfgHudsonpath(CF->quickbbs); + // Fido netmail if(not strblank(CF->netmail)) { aa.reset(); diff --git a/goldlib/gcfg/gxinter.cpp b/goldlib/gcfg/gxinter.cpp index 53cd1df..effbe7e 100644 --- a/goldlib/gcfg/gxinter.cpp +++ b/goldlib/gcfg/gxinter.cpp @@ -75,9 +75,8 @@ void gareafile::ReadInterMail(char* tag) { if(not memcmp(ctl->fingerprint, "JoHo", 5) and (ctl->sysrev == IM_THISREV)) { fp.fclose(); - - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(ctl->e.qbase)); + + CfgHudsonpath(ctl->e.qbase); AreaCfg aa; diff --git a/goldlib/gcfg/gxlora.cpp b/goldlib/gcfg/gxlora.cpp index 08a4e68..d3363b6 100644 --- a/goldlib/gcfg/gxlora.cpp +++ b/goldlib/gcfg/gxlora.cpp @@ -76,10 +76,8 @@ void gareafile::ReadLoraBBS(char* tag) { //CfgUsername(cfg->sysop); - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(cfg->quick_msgpath)); - if(*goldbasepath == NUL) - PathCopy(goldbasepath, MapPath(cfg->quick_msgpath)); + CfgHudsonpath(cfg->quick_msgpath); + CfgGoldbasepath(cfg->quick_msgpath); AreaCfg aa; diff --git a/goldlib/gcfg/gxmax3.cpp b/goldlib/gcfg/gxmax3.cpp index c4e1db7..12452e8 100644 --- a/goldlib/gcfg/gxmax3.cpp +++ b/goldlib/gcfg/gxmax3.cpp @@ -59,10 +59,12 @@ void gareafile::ReadMaximus3(char* mxpath, char* areafile, char* options) { fread(offsets, (uint)heapsz, 1, fp); fclose(fp); - if(*squishuserpath == NUL) - strcat(PathCopy(squishuserpath, PRM(user_file)), ".bbs"); + Path userfile; + strxmerge(userfile, sizeof(Path), PRM(user_file), ".bbs", NULL); + CfgSquishuserpath(userfile); strcpy(stpcpy(areafile, PRM(marea_name)), ".dat"); + MapPath(areafile); fp = fsopen(areafile, "rb", sharemode); if(fp) { @@ -120,14 +122,9 @@ void gareafile::ReadMaximus3(char* mxpath, char* areafile, char* options) { continue; } - if(ZSTR(path)[1] != ':') { - Path areapath; - strcpy(stpcpy(areapath, mxpath), ZSTR(path)); - aa.setpath(areapath); - } - else { - aa.setpath(ZSTR(path)); - } + Path apath; + MakePathname(apath, mxpath, ZSTR(path)); + aa.setpath(apath); aa.aka = CAST(ftn_addr, area->primary); aa.setdesc(*ZSTR(descript) ? ZSTR(descript) : ZSTR(name)); @@ -236,8 +233,7 @@ void gareafile::ReadMaximus(char* tag) { MakePathname(areafile, mxpath, "area.dat"); } - if(*squishuserpath == NUL) - PathCopy(squishuserpath, mxpath); + CfgSquishuserpath(mxpath); if(is_maximus3) ReadMaximus3(mxpath, areafile, options); diff --git a/goldlib/gcfg/gxpcb.cpp b/goldlib/gcfg/gxpcb.cpp index e5d1ff0..d543639 100644 --- a/goldlib/gcfg/gxpcb.cpp +++ b/goldlib/gcfg/gxpcb.cpp @@ -78,8 +78,7 @@ void gareafile::ReadPCBoard(char* tag) { if(*_path == NUL) strcpy(_path, areapath); - if(*pcboardpath == NUL) - strcpy(pcboardpath, _path); + CfgPcboardpath(_path); gfile fp; const char* _file = AddPath(_path, "pcboard.dat"); diff --git a/goldlib/gcfg/gxprobrd.cpp b/goldlib/gcfg/gxprobrd.cpp index 782d879..4e96603 100644 --- a/goldlib/gcfg/gxprobrd.cpp +++ b/goldlib/gcfg/gxprobrd.cpp @@ -69,8 +69,7 @@ void gareafile::ReadProBoard(char* tag) { fread(cfg, sizeof(Config), 1, fp); - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(cfg->msgpath)); + CfgHudsonpath(cfg->msgpath); fclose(fp); } @@ -128,15 +127,15 @@ void gareafile::ReadProBoard(char* tag) { break; case MSGBASE_SQUISH: aa.msgbase = GMB_SQUISH; - aa.setpath(MapPath(area->path)); + aa.setpath(area->path); break; case MSGBASE_SDM: aa.msgbase = GMB_OPUS; - aa.setpath(MapPath(area->path)); + aa.setpath(area->path); break; case MSGBASE_JAM: aa.msgbase = GMB_JAM; - aa.setpath(MapPath(area->path)); + aa.setpath(area->path); break; } aa.aka = aka[area->aka]; diff --git a/goldlib/gcfg/gxqecho.cpp b/goldlib/gcfg/gxqecho.cpp index d545631..56b3894 100644 --- a/goldlib/gcfg/gxqecho.cpp +++ b/goldlib/gcfg/gxqecho.cpp @@ -63,7 +63,7 @@ void gareafile::ReadQEchoFile(char* file, char* options, char* origin) { aa.setechoid(ptr); if((ptr = strtok(NULL, " \t")) != NULL) if(not strieql("Passthrough", ptr)) { - aa.setpath(MapPath(ptr)); + aa.setpath(ptr); aa.msgbase = GMB_JAM; if((ptr = strtok(NULL, " \t")) != NULL) if((*ptr == '*') and ((ptr = strtok(NULL, " \t")) != NULL)) { diff --git a/goldlib/gcfg/gxquick.cpp b/goldlib/gcfg/gxquick.cpp index 3018bd6..8655020 100644 --- a/goldlib/gcfg/gxquick.cpp +++ b/goldlib/gcfg/gxquick.cpp @@ -146,8 +146,7 @@ void gareafile::ReadQ276(char* qbpath, char* origin, char* options) { fread(cfg, sizeof(Q276CfgRecT), 1, fp); STRNP2C(cfg->MsgPath); - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(cfg->MsgPath)); + CfgHudsonpath(cfg->MsgPath); fclose(fp); } diff --git a/goldlib/gcfg/gxra.cpp b/goldlib/gcfg/gxra.cpp index d82147c..6a5fb6a 100644 --- a/goldlib/gcfg/gxra.cpp +++ b/goldlib/gcfg/gxra.cpp @@ -85,8 +85,7 @@ void gareafile::ReadRemoteAccess(char* tag) { ra2usersbbs = 2; STRNP2C(config->MsgBasePath); - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(config->MsgBasePath)); + CfgHudsonpath(config->MsgBasePath); } MakePathname(file, rapath, "messages.ra"); diff --git a/goldlib/gcfg/gxsquish.cpp b/goldlib/gcfg/gxsquish.cpp index 7bf6f2d..f96cf37 100644 --- a/goldlib/gcfg/gxsquish.cpp +++ b/goldlib/gcfg/gxsquish.cpp @@ -107,8 +107,7 @@ void gareafile::ReadSquishFile(char* path, char* file, char* options, char* orig // Get path getkeyval(&key, &val); - strxcpy(buf2, key, sizeof(buf2)); - aa.setpath(MapPath(buf2)); + aa.setpath(key); // If not pass-through if(not striinc("-0", val)) { @@ -211,8 +210,7 @@ void gareafile::ReadSquish(char* tag) { extractdirname(path, file); - if(*squishuserpath == NUL) - PathCopy(squishuserpath, path); + CfgSquishuserpath(path); ReadSquishFile(path, file, options, origin, defaultgroup); } diff --git a/goldlib/gcfg/gxsuper.cpp b/goldlib/gcfg/gxsuper.cpp index b74e7e5..e74381f 100644 --- a/goldlib/gcfg/gxsuper.cpp +++ b/goldlib/gcfg/gxsuper.cpp @@ -93,8 +93,7 @@ void gareafile::ReadSuperBBS(char* tag) { fclose(fp); STRNP2C(sconfig->MsgBasePath); - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(sconfig->MsgBasePath)); + CfgHudsonpath(sconfig->MsgBasePath); // Is it 1.16 or later? if(sconfig->VersionNumber >= 0x0110) { diff --git a/goldlib/gcfg/gxtimed.cpp b/goldlib/gcfg/gxtimed.cpp index 0eb8ca3..4bbd1ee 100644 --- a/goldlib/gcfg/gxtimed.cpp +++ b/goldlib/gcfg/gxtimed.cpp @@ -103,12 +103,10 @@ void gareafile::ReadTimedFile(char* path, char* file, char* options, char* origi ReadTimedFile(path, buf2, options, origin); break; case CRC_HUDSONPATH: - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(val)); + CfgHudsonpath(val); break; case CRC_JAMLOG: - if(*jampath == NUL) - PathCopy(jampath, MapPath(val)); + CfgJampath(val); break; #ifndef GCFG_NOSQSH case CRC_SQUISHCFG: @@ -147,7 +145,7 @@ void gareafile::ReadTimedFile(char* path, char* file, char* options, char* origi break; #endif case CRC_LASTREAD: - strcpy(fidolastread, val); + CfgFidolastread(val); break; case CRC_SQUISHOFFSET: squishuserno = atoi(val); diff --git a/goldlib/gcfg/gxts.cpp b/goldlib/gcfg/gxts.cpp index 4aa973c..c377253 100644 --- a/goldlib/gcfg/gxts.cpp +++ b/goldlib/gcfg/gxts.cpp @@ -91,8 +91,7 @@ void gareafile::ReadTosScan(char* tag) { fseek(fp, sizeof(FD_Mailer), SEEK_CUR); // Seek past some data fread(editor, sizeof(FD_Editor), 1, fp); fread(shared, sizeof(FD_Shared), 1, fp); - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(editor->qbase)); + CfgHudsonpath(editor->qbase); aa.reset(); aa.type = GMB_NET; aa.attr = attribsnet; diff --git a/goldlib/gcfg/gxwtr.cpp b/goldlib/gcfg/gxwtr.cpp index e5e4357..c8e87b8 100644 --- a/goldlib/gcfg/gxwtr.cpp +++ b/goldlib/gcfg/gxwtr.cpp @@ -56,13 +56,13 @@ void gareafile::ReadWtrGteFile(char* options, FILE* fp) { ConfigRecord& c = *_tmp; fread(&c, sizeof(ConfigRecord), 1, fp); - strp2c(c.systemdir); MapPath(c.systemdir); + strp2c(c.systemdir); + CfgJampath(c.systemdir); + MapPath(c.systemdir); + strp2c(c.origins[0]); strp2c(c.origins[1]); - if(*jampath == NUL) - PathCopy(jampath, c.systemdir); - if(c.fidonetmailtype) { aa.reset(); aa.msgbase = gettype(c.opusdateformat ? GMB_OPUS : GMB_FTS1, c.fidonetmailtype); diff --git a/goldlib/gcfg/gxxbbs.cpp b/goldlib/gcfg/gxxbbs.cpp index 3839a7c..45dc77b 100644 --- a/goldlib/gcfg/gxxbbs.cpp +++ b/goldlib/gcfg/gxxbbs.cpp @@ -180,8 +180,7 @@ void gareafile::ReadAdeptXBBS(char* tag) { strcpy(stpcpy(file, path), cfg); - if(strblank(adeptxbbspath)) - strcpy(adeptxbbspath, path); + CfgAdeptxbbspath(path); ReadAdeptXbbsFile(path, file, options); diff --git a/goldlib/gcfg/gxxmail.cpp b/goldlib/gcfg/gxxmail.cpp index 04d5526..1a80fde 100644 --- a/goldlib/gcfg/gxxmail.cpp +++ b/goldlib/gcfg/gxxmail.cpp @@ -114,8 +114,7 @@ void gareafile::ReadxMailFile(char* file, char* options) { CfgOrigin(val); break; case CRC_MESSAGEBASE: - if(*hudsonpath == NUL) - PathCopy(hudsonpath, MapPath(val)); + CfgHudsonpath(val); break; } }