This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-goldedplus/golded3/gccfgg.cpp

903 lines
26 KiB
C++
Raw Normal View History

2000-02-25 11:04:07 +00:00
// ------------------------------------------------------------------
// GoldED+
// Copyright (C) 1990-1999 Odinn Sorensen
// Copyright (C) 1999-2000 Alexander S. Aganichev
// ------------------------------------------------------------------
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston,
// MA 02111-1307 USA
// ------------------------------------------------------------------
// $Id$
// ------------------------------------------------------------------
// Main GOLDED.CFG compiler.
// ------------------------------------------------------------------
#include <golded.h>
#include <gmoprot.h>
2001-07-03 04:27:54 +00:00
#include <gcharset.h>
2000-02-25 11:04:07 +00:00
// ------------------------------------------------------------------
extern char v7nodeflags[16][9];
extern char v7modemtype[8][9];
2002-10-26 16:28:01 +00:00
// ------------------------------------------------------------------
int getgroup(const char *key)
{
if(*key == '#')
return atoi(key+1)+0x8000u;
else
return (isupper(*key) ? *key : 0);
}
2000-02-25 11:04:07 +00:00
// ------------------------------------------------------------------
// Read GOLDED.CFG
bool ReadGoldedCfg(int& force) {
gfile fp;
CfgInit2();
Path golded_cfg;
strcpy(golded_cfg, AddPath(CFG->goldpath, CFG->goldcfg));
if(ReadCfg(golded_cfg)) {
// Unallocate echolist
AFILE->echolist.FreeAll();
// Set default paths
if(*CFG->temppath == NUL) strcpy(CFG->temppath, CFG->goldpath);
if(*CFG->areapath == NUL) strcpy(CFG->areapath, CFG->goldpath);
if(*CFG->inboundpath == NUL) strcpy(CFG->inboundpath, CFG->goldpath);
if(*CFG->soundpath == NUL) strcpy(CFG->soundpath, CFG->goldpath);
if(*CFG->cookiepath == NUL) strcpy(CFG->cookiepath, CFG->goldpath);
if(*CFG->templatepath == NUL) strcpy(CFG->templatepath, CFG->goldpath);
if(*CFG->squishuserpath == NUL) {
char* ptr = getenv("MAXIMUS");
if(ptr != NULL) {
CfgSquishuserpath(ptr);
2000-02-25 11:04:07 +00:00
}
else {
ptr = getenv("SQUISH");
if(ptr != NULL)
CfgSquishuserpath(ptr);
2000-02-25 11:04:07 +00:00
else
CfgSquishuserpath(CFG->areapath);
2000-02-25 11:04:07 +00:00
}
}
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);
2000-02-25 11:04:07 +00:00
MakePathname(CFG->goldcfg, CFG->goldpath, CFG->goldcfg);
MakePathname(CFG->helpcfg.fn, CFG->goldpath, CFG->helpcfg.fn);
MakePathname(CFG->helpged, CFG->goldpath, CFG->helpged);
MakePathname(CFG->keyscfg, CFG->goldpath, CFG->keyscfg);
MakePathname(CFG->langcfg, CFG->goldpath, CFG->langcfg);
MakePathname(CFG->xlatged, CFG->goldpath, CFG->xlatged);
MakePathname(CFG->confirmfile, CFG->goldpath, CFG->confirmfile);
MakePathname(CFG->logfile, CFG->goldpath, CFG->logfile);
MakePathname(CFG->userlistfile, CFG->nodepath, CFG->userlistfile);
MakePathname(CFG->outputfile, CFG->goldpath, CFG->outputfile);
MakePathname(CFG->inputfile, CFG->goldpath, CFG->inputfile);
2003-04-03 14:28:59 +00:00
if(*CFG->seqdir)
MakePathname(CFG->seqdir, CFG->goldpath, CFG->seqdir);
2000-02-25 11:04:07 +00:00
if(*CFG->souptosslog)
MakePathname(CFG->souptosslog, CFG->goldpath, CFG->souptosslog);
std::vector<Tpl>::iterator t;
2000-02-25 11:04:07 +00:00
for(t = CFG->tpl.begin(); t != CFG->tpl.end(); t++)
MakePathname(t->file, CFG->templatepath, t->file);
MakePathname(CFG->semaphore.importlist, CFG->areapath, CFG->semaphore.importlist);
MakePathname(CFG->semaphore.exportlist, CFG->areapath, CFG->semaphore.exportlist);
MakePathname(CFG->semaphore.echoscan, CFG->areapath, CFG->semaphore.echoscan);
MakePathname(CFG->semaphore.netscan, CFG->areapath, CFG->semaphore.netscan);
MakePathname(CFG->semaphore.scanall, CFG->goldpath, CFG->semaphore.scanall);
MakePathname(CFG->semaphore.scanthis, CFG->goldpath, CFG->semaphore.scanthis);
MakePathname(CFG->semaphore.scannetmail,CFG->goldpath, CFG->semaphore.scannetmail);
MakePathname(CFG->semaphore.pmscanall, CFG->goldpath, CFG->semaphore.pmscanall);
MakePathname(CFG->semaphore.pmscanthis, CFG->goldpath, CFG->semaphore.pmscanthis);
MakePathname(CFG->semaphore.pmscannetmail, CFG->goldpath, CFG->semaphore.pmscannetmail);
MakePathname(CFG->semaphore.qwkimport, CFG->goldpath, CFG->semaphore.qwkimport);
MakePathname(CFG->semaphore.qwkexport, CFG->goldpath, CFG->semaphore.qwkexport);
MakePathname(CFG->semaphore.soupimport, CFG->goldpath, CFG->semaphore.soupimport);
MakePathname(CFG->semaphore.soupexport, CFG->goldpath, CFG->semaphore.soupexport);
MakePathname(CFG->semaphore.exitnow, CFG->goldpath, CFG->semaphore.exitnow);
if(strieql(CFG->semaphore.exportlist, AddPath(CFG->jampath, "echomail.jam"))) {
std::cout << "* Warning: SEMAPHORE EXPORTLIST must not be the same as ECHOMAIL.JAM!" << std::endl;
2000-02-25 11:04:07 +00:00
SayBibi();
cfgerrors++;
}
}
// Set default xlatimport
if(*CFG->xlatimport == NUL)
strcpy(CFG->xlatimport, CFG->xlatlocalset);
ReadXlatTables();
// Free all mapfile name allocations
std::vector<Map>::iterator xlt;
2000-02-25 11:04:07 +00:00
for(xlt = CFG->xlatescset.begin(); xlt != CFG->xlatescset.end(); xlt++)
throw_release(xlt->mapfile);
for(xlt = CFG->xlatcharset.begin(); xlt != CFG->xlatcharset.end(); xlt++)
throw_release(xlt->mapfile);
return true;
}
// ------------------------------------------------------------------
// Write GOLDED.GED
void WriteGoldGed() {
// Mark areas according to scan/pmscan in/excludes
for(AL.item = AL.idx.begin(); AL.item != AL.idx.end(); AL.item++) {
gstrarray::iterator i;
// Check scan in/excludes
for(i = CFG->areascan.begin(); i != CFG->areascan.end(); i++) {
2002-10-26 16:28:01 +00:00
const char *current = i->c_str();
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
2000-02-25 11:04:07 +00:00
(*AL.item)->set_scan(true);
break;
}
}
for(i = CFG->areascanexcl.begin(); i != CFG->areascanexcl.end(); i++) {
2002-10-26 16:28:01 +00:00
const char *current = i->c_str();
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
2000-02-25 11:04:07 +00:00
(*AL.item)->set_scanexcl(true);
break;
}
}
for(i = CFG->areascanincl.begin(); i != CFG->areascanincl.end(); i++) {
2002-10-26 16:28:01 +00:00
const char *current = i->c_str();
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
2000-02-25 11:04:07 +00:00
(*AL.item)->set_scanincl(true);
break;
}
}
// Check pmscan in/excludes
for(i = CFG->areapmscan.begin(); i != CFG->areapmscan.end(); i++) {
2002-10-26 16:28:01 +00:00
const char *current = i->c_str();
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
2000-02-25 11:04:07 +00:00
(*AL.item)->set_pmscan(true);
break;
}
}
for(i = CFG->areapmscanexcl.begin(); i != CFG->areapmscanexcl.end(); i++) {
2002-10-26 16:28:01 +00:00
const char *current = i->c_str();
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
2000-02-25 11:04:07 +00:00
(*AL.item)->set_pmscanexcl(true);
break;
}
}
for(i = CFG->areapmscanincl.begin(); i != CFG->areapmscanincl.end(); i++) {
2002-10-26 16:28:01 +00:00
const char *current = i->c_str();
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
2000-02-25 11:04:07 +00:00
(*AL.item)->set_pmscanincl(true);
break;
}
}
}
// Release lists memory
CFG->areaexcl.clear();
CFG->areaincl.clear();
CFG->areaisemail.clear();
CFG->areaisnews.clear();
CFG->areascan.clear();
CFG->areascanexcl.clear();
CFG->areascanincl.clear();
CFG->arearename.clear();
CFG->areapmscan.clear();
CFG->areapmscanexcl.clear();
CFG->areapmscanincl.clear();
}
// ------------------------------------------------------------------
static int EnterString(char* prompt, char* string, uint length) {
std::cout << prompt << std::endl << "> " << std::flush;
2000-02-25 11:04:07 +00:00
*string = NUL;
char* ptr = string;
uint pos = 0;
gkey k;
while(1) {
k = kbxget();
if(k == Key_BS) {
if(pos) {
std::cout << "\b \b" << std::flush;
2000-02-25 11:04:07 +00:00
pos--;
*(--ptr) = NUL;
}
}
else if(k == Key_Esc) {
std::cout << std::endl;
2000-02-25 11:04:07 +00:00
*string = NUL;
return -1;
}
else if(k == Key_Ent) {
std::cout << std::endl;
2000-02-25 11:04:07 +00:00
*ptr = NUL;
break;
}
else {
if(pos < length) {
char c = (char)k;
if(c) {
std::cout << c << std::flush;
2000-02-25 11:04:07 +00:00
*ptr++ = c;
pos++;
}
}
}
}
if(*string == NUL)
return 1;
return 0;
}
// ------------------------------------------------------------------
struct AF_entry {
char* env;
char* configname;
char* name;
};
struct AF_entry idetect[] = {
{ "DUTCHIE", "dutchie.are", "Dutchie" },
{ "EZY", "constant.ezy", "Ezycom" },
{ "FASTECHO", "fastecho.cfg", "Fastecho" },
{ "FIDOPCB", "fidopcb.cfg", "FidoPCB" },
{ "FMAIL", "fmail.cfg", "FMail" },
{ "IMAIL", "imail.cf", "IMAIL" },
{ "PCBOARD", "pcboard.dat", "PCBoard" },
{ "POPCMDLINE", "portal.are", "Portal" },
{ "RA", "config.pro", "ProBoard" },
{ "QFRONT", "qechos.dat", "QFront" },
{ "RAECHO", "areas.rae", "RA-ECHO" },
{ "RA", "config.ra", "RemoteAccess" },
{ "TIMED", "timed.cfg", "timEd" },
{ "TM", "tm.cfg", "Termail" },
{ "WMAIL", "wmail.prm", "WMail" },
{ "XM", "xmail.cfg", "XMail" },
{ "FD", "areafile.fd", "TosScan" },
{ "GE", "setup.ge", "GEcho" },
{ "FD", "setup.fd", "FrontDoor" },
{ "FD", "fd.sys", "FrontDoor" },
{ "OPUS", "sysmsg.dat", "Opus" },
{ "LORA", "sysmsg.dat", "LoraBBS" },
{ "LORABBS", "sysmsg.dat", "LoraBBS" },
{ "FIDOCONFIG", "", "Fidoconfig" },
{ "DB", "dbridge.prm", "D\'Bridge" },
{ "DBRIDGE", "dbridge.prm", "D\'Bridge" },
{ "SUPERBBS", "sconfig.bbs", "SuperBBS" },
{ "SBBS", "sconfig.bbs", "SuperBBS" },
{ "QUICKBBS", "quickcfg.dat", "QuickBBS" },
{ "QBBS", "quickcfg.dat", "QuickBBS" },
{ "QUICKBBS", "config.bbs", "QuickBBS" },
{ "QBBS", "config.bbs", "QuickBBS" },
{ "SQUISH", "squish.cfg", "Squish" }
};
void InstallDetect(char* path) {
// Create GOLDED.BAK file if there is an existing GOLDED.CFG
if(fexist(CFG->goldcfg)) {
Path cmdlinecfgbak;
replaceextension(cmdlinecfgbak, CFG->goldcfg, ".bak");
if(fexist(cmdlinecfgbak))
remove(cmdlinecfgbak);
rename(CFG->goldcfg, cmdlinecfgbak);
2003-04-03 14:28:59 +00:00
std::cout << "Warning: Existing config backed up to " << cmdlinecfgbak << "!!!" << std::endl;
2000-02-25 11:04:07 +00:00
}
std::cout << "Please wait while GoldED+ is detecting your software." << std::endl;
2000-02-25 11:04:07 +00:00
FILE* fp = fopen(CFG->goldcfg, "wt");
if(fp) {
if(*path) {
MapPath(PathCopy(CFG->areapath, path));
2000-02-25 11:04:07 +00:00
fprintf(fp, "AREAPATH %s\n", path);
}
Path pth;
char* ptr;
bool gotareasbbs = false;
bool gotsquish = false;
bool detected = false;
// simple detection
for(uint i = 0; i < sizeof(idetect)/sizeof(struct AF_entry); i++) {
strcpy(pth, CFG->areapath);
ptr = getenv(idetect[i].env);
if(ptr) {
PathCopy(pth, ptr);
// skip additional information
ptr = strchr(pth, ' ');
if(ptr)
*ptr = NUL;
}
if(fexist(AddPath(pth, idetect[i].configname))) {
fprintf(fp, "AREAFILE %s %s\n", idetect[i].name, pth);
std::cout << "Found " << idetect[i].name << (ptr ? "." : " (unreliable).") << std::endl;
2000-02-25 11:04:07 +00:00
if(streql(idetect[i].name, "Squish"))
gotsquish = true;
detected = true;
}
}
// Detect InterMail
strcpy(pth, CFG->areapath);
ptr = getenv("IM");
if(ptr)
PathCopy(pth, ptr);
if(fexist(AddPath(pth, "im.exe")) or fexist(AddPath(pth, "intrecho.exe"))) {
fprintf(fp, "AREAFILE InterMail %s\n", pth);
std::cout << "Found InterMail and/or InterEcho." << std::endl;
2000-02-25 11:04:07 +00:00
detected = true;
}
// Detect Maximus
strcpy(pth, CFG->areapath);
ptr = getenv("MAXIMUS");
if(ptr) {
if(is_dir(ptr))
PathCopy(pth, ptr);
else
extractdirname(pth, pth);
}
if(fexist(AddPath(pth, "max.prm"))) {
fprintf(fp, "AREAFILE Maximus %s\n", pth);
std::cout << "Found Maximus." << std::endl;
2000-02-25 11:04:07 +00:00
detected = true;
}
if(not gotsquish and fexist(AddPath(pth, "squish.cfg"))) {
fprintf(fp, "AREAFILE Squish %s\n", pth);
std::cout << "Found Squish." << std::endl;
2000-02-25 11:04:07 +00:00
detected = true;
}
// Detect ME2
strcpy(pth, CFG->areapath);
if(fexist(AddPath(pth, "areadesc.me2"))) {
fprintf(fp, "AREAFILE ME2 %sareadesc.me2 %sareas.bbs\n", pth, pth);
std::cout << "Found ME2." << std::endl;
2000-02-25 11:04:07 +00:00
gotareasbbs = true;
detected = true;
}
// Detect AREAS.BBS
if(not gotareasbbs) {
strcpy(pth, CFG->areapath);
if(fexist(AddPath(pth, "areas.bbs"))) {
fprintf(fp, "AREAFILE AreasBBS %sareas.bbs\n", pth);
std::cout << "Found AREAS.BBS." << std::endl;
2000-02-25 11:04:07 +00:00
detected = true;
}
}
if(not detected)
std::cout << "Sorry, could not find any supported software. Try another path." << std::endl;
2000-02-25 11:04:07 +00:00
fclose(fp);
}
}
// ------------------------------------------------------------------
int InstallFinish() {
FILE* fp = fopen(CFG->goldcfg, "at");
if(fp) {
char buf[77];
// Check what we have
if(CFG->username.empty()) {
if(EnterString("Please enter your name:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "USERNAME %s\n", buf);
CfgUsername(buf);
}
if(CFG->aka.empty()) {
if(EnterString("Please enter your FidoNet address:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "ADDRESS %s\n", buf);
CfgAddress(buf);
}
2003-12-10 08:35:16 +00:00
if(AL.basetypes.empty()) {
2000-02-25 11:04:07 +00:00
if(EnterString("Please enter the path to your *.msg netmail area:", buf, sizeof(buf)))
return -1;
AreaCfg aa;
aa.reset();
aa.setdesc("Netmail");
aa.setechoid("NETMAIL");
2003-12-10 08:35:16 +00:00
aa.basetype = "OPUS";
aa.type = GMB_NET;
2000-02-25 11:04:07 +00:00
aa.setpath(buf);
aa.attr = CFG->attribsnet;
AL.AddNewArea(&aa);
2003-12-10 08:35:16 +00:00
fprintf(fp, "AREADEF %s \"%s\" 0 Net %s %s\n", aa.desc, aa.echoid, aa.basetype, buf);
2000-02-25 11:04:07 +00:00
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);
char buf2[200]="AreasBBS ";
strcat(buf2, buf);
AL.GetAreafile(buf2);
}
#ifndef GMB_NOHUDS
2003-12-10 08:35:16 +00:00
if(find(AL.basetypes, "HUDSON") and (*CFG->hudsonpath == NUL)) {
2000-02-25 11:04:07 +00:00
if(EnterString("Please enter the path to your Hudson msgbase files:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "HUDSONPATH %s\n", buf);
PathCopy(CFG->hudsonpath, buf);
}
#endif
#ifndef GMB_NOGOLD
2003-12-10 08:35:16 +00:00
if(find(AL.basetypes, "GOLDBASE") and (*CFG->goldbasepath == NUL)) {
2000-02-25 11:04:07 +00:00
if(EnterString("Please enter the path to your Goldbase msgbase files:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "GOLDBASEPATH %s\n", buf);
PathCopy(CFG->goldbasepath, buf);
}
#endif
#ifndef GMB_NOJAM
2003-12-10 08:35:16 +00:00
if(find(AL.basetypes, "JAM") and (*CFG->jampath == NUL)) {
2000-02-25 11:04:07 +00:00
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);
PathCopy(CFG->jampath, buf);
}
#endif
#ifndef GMB_NOPCB
2003-12-10 08:35:16 +00:00
if(find(AL.basetypes, "PCBOARD") and (*CFG->pcboardpath == NUL)) {
2000-02-25 11:04:07 +00:00
if(EnterString("Please enter the path to PCBoard:", buf, sizeof(buf)))
goto install_terminated;
fprintf(fp, "PCBOARDPATH %s\n", buf);
PathCopy(CFG->pcboardpath, buf);
}
#endif
fclose(fp);
return 0;
}
install_terminated:
fclose(fp);
return -1;
}
// ------------------------------------------------------------------
GoldedCfgEdit::GoldedCfgEdit() {
memset(&cfg, 0, sizeof(cfg));
// Set Boolean values
AutoAttach(true);
AutoSave(30);
ChangeDate(true);
CharPara(' ');
CharSpace(' ');
FieldClear(true);
HardLines(true);
HdrNamePos(8);
HdrNameLen(36);
HdrNodePos(44);
HdrNodeLen(36);
HeaderAttrs(true);
HeaderFirst(EDITHEADERFIRST_YES);
Internal(true);
Menu(true);
QuoteMargin(75);
SaveMenu(true);
UnDelete(50);
str.push_back(""); cfg.external = str.size()-1;
str.push_back("golded.msg"); cfg.file = str.size()-1;
str.push_back("<<"); cfg.hardline = str.size()-1;
str.push_back(""); cfg.spellchecker = str.size()-1;
}
// ------------------------------------------------------------------
CfgGed::CfgGed() {
// pathes
strcpy(goldcfg, "golded.cfg");
strcpy(helpcfg.fn, "goldhelp.cfg"); helpcfg.ft = 0;
replaceextension(helpged, helpcfg.fn, __gver_cfgext__);
strcpy(keyscfg, "goldkeys.cfg");
strcpy(langcfg, "goldlang.cfg");
strcpy(goldlast, "goldlast.lst");
strcpy(golduser, "golduser.lst");
strcpy(confirmfile, "golded.cfm");
strxmerge(xlatged, sizeof(xlatged), "goldxlat", __gver_cfgext__, NULL);
strcpy(fidolastread, "lastread");
strcpy(logfile, "golded.log");
strcpy(namesfile, "names.fd");
strcpy(userlistfile, "golded.lst");
*adeptxbbspath = 0;
*areapath = 0;
*attachpath = 0;
*cookiepath = 0;
*ezycom.msgbasepath = 0;
*ezycom.userbasepath = 0;
*fidouserlist = 0;
*goldbasepath = 0;
*goldbasesyspath = 0;
*goldpath = 0;
*hudsonpath = 0;
*hudsonsyspath = 0;
*inboundpath = 0;
*inputfile = 0;
*jampath = 0;
*loadlanguage = 0;
*nodepath = 0;
*nodepathfd = 0;
*nodepathv7 = 0;
*outboundpath = 0;
*outputfile = 0;
*pathreportfile = 0;
*pcboardpath = 0;
*quotebuffile = 0;
2003-04-03 14:28:59 +00:00
*seqdir = 0;
2000-02-25 11:04:07 +00:00
*soundpath = 0;
*soupexportpath = 0;
*soupimportpath = 0;
*soupnewsrcfile = 0;
*soupreplylinker = 0;
*souptosslog = 0;
*squishuserpath = 0;
*templatepath = 0;
*temppath = 0;
*uudecodepath = 0;
*xlatpath = 0;
// vectors
// cmdkey.clear();
// macro.clear();
// addressmacro.clear();
// aka.clear();
// akamatch.clear();
// areaexcl.clear();
// areaincl.clear();
// areaisemail.clear();
// areaisnews.clear();
// areapmscan.clear();
// areapmscanexcl.clear();
// areapmscanincl.clear();
// arearename.clear();
// areascan.clear();
// areascanexcl.clear();
// areascanincl.clear();
// event.clear();
// externutil.clear();
// filealias.clear();
// frqext.clear();
// frqnodemap.clear();
// kludge.clear();
// mailinglist.clear();
// mappath.clear();
// origin.clear();
// robotname.clear();
// tagline.clear();
// tpl.clear();
// twitname.clear();
// twitsubj.clear();
2001-12-17 15:44:55 +00:00
// unpacker.clear();
2000-02-25 11:04:07 +00:00
// username.clear();
2001-03-04 20:30:45 +00:00
// wtpl.clear();
2000-02-25 11:04:07 +00:00
// xlatcharset.clear();
// xlatescset.clear();
// echotags
*areacfmreplyto = 0;
*areacopyto = 0;
*areafreqto = 0;
*areareplyto = 0;
*areastart = 0;
*areayouwroteto = 0;
*soupbadmsgs = 0;
*soupemail = 0;
*soupreplyto = 0;
// strings
strcpy(arealistformat, "AM D CPUN E G ");
2001-07-03 04:27:54 +00:00
*arealistgrouporder = 0;
2000-02-25 11:04:07 +00:00
strcpy(arealistsort, "FYTUE");
strcpy(areascansort, "XZBE");
strcpy(importbegin, "=== Cut ===");
*importend = 0;
*internetaddress = 0;
*internetdomain = 0;
*keybstack = 0;
*nickname = 0;
*netname = 0;
2000-02-25 11:04:07 +00:00
*organization = 0;
#ifdef __UNIX__
strcpy(printdevice, "/usr/bin/lpr > /dev/null 2>&1");
#else
strcpy(printdevice, "PRN");
#endif
*printinit = 0;
*printreset = 0;
*quotechars = 0;
strcpy(quotestring, " FL> ");
2000-12-22 00:14:04 +00:00
strcpy(quotestops, "<\"\'-");
2000-02-25 11:04:07 +00:00
*searchfor = 0;
strcpy(stylecodepunct, " !?\"$%&()+,.:;<=>@[\\]^`{|}~\n\r\t");
*stylecodestops = 0;
sprintf(tasktitle, "%s%s%s%s", __gver_prename__, __gver_name__,
__gver_postname__, __gver_platform__);
strcpy(tearline, "@longpid @version");
strcpy(whoto, "All");
2001-07-03 04:27:54 +00:00
strcpy(xlatlocalset, get_charset());
strcpy(xlatimport, get_dos_charset(xlatlocalset));
strcpy(xlatexport, xlatimport);
2000-02-25 11:04:07 +00:00
// variables & switches
adeptxbbsuserno = 0;
addressbookadd = YES;
addresslookupfirst = false;
akamatchfromto = NO;
2001-11-21 14:21:30 +00:00
areaautoid = AUTOID_LONG;
2000-02-25 11:04:07 +00:00
areacopydirect = false;
areacopyaddid = false;
areaforwarddirect = false;
areafilegroups = YES;
areafreqdirect = false;
arealistechomax = 0;
arealisttype = AL_TOTNEW;
areareadonly = READONLY_SOFT;
areareplydirect = false;
beepfactor = 1000;
beepyourmail = true;
carboncopylist = CC_NAMES;
cfgeditquotemargin = 75;
confirmresponse = ASK;
crosspost = ASK;
crosspostlist = CC_NAMES;
ctrlinfoecho = CI_TAGL|CI_TEAR|CI_ORIG;
ctrlinfoemail = 0;
ctrlinfolocal = CI_TAGL;
ctrlinfonet = CI_TAGL|CI_TEAR;
ctrlinfonews = 0;
dispareano = true;
dispattachsize = ATTACH_KBYTES;
disphdrlocation = false;
2000-02-25 11:04:07 +00:00
displistcursor = NO;
2001-08-07 10:51:00 +00:00
dispmargin = 0;
2000-02-25 11:04:07 +00:00
dispmsgsize = DISPMSGSIZE_BYTES;
2001-01-28 15:13:00 +00:00
disptabsize = 8;
2000-02-25 11:04:07 +00:00
encodeemailheaders = true;
2001-02-21 21:26:28 +00:00
externoptions = EXTUTIL_CLS | EXTUTIL_CURSOR | EXTUTIL_RELOAD | EXTUTIL_PAUSEONERROR | EXTUTIL_KEEPCTRL;
2000-02-25 11:04:07 +00:00
ezycomuserno = 0;
2003-12-10 08:35:16 +00:00
fidomsgtype = "OPUS";
2000-02-25 11:04:07 +00:00
fidouserno = 0;
forcetemplate = false;
frqoptions = FREQ_FROMTOP;
peekurloptions = PEEK_FROMTOP;
2000-02-25 11:04:07 +00:00
gedhandshake = true;
goldbaseuserno = 0;
2001-03-17 21:17:57 +00:00
hidestylies = false;
highlighturls = true;
2000-02-25 11:04:07 +00:00
hudsonsizewarn = 16000000L;
hudsonuserno = 0;
ignorecharset = false;
intensecolors = false;
internetmsgid = false;
2001-11-17 21:28:10 +00:00
internetrfcbody = 0;
internetviagate = false;
2000-02-25 11:04:07 +00:00
keybmode = KEYB_POLL;
logformat = 0;
menumarked = MODE_DONT;
msglistdate = MSGLISTDATE_WRITTEN;
msglistfast = true;
msglistfirst = false;
msglistheader = false;
msglistwidesubj = false;
originno = 0;
pcboarduserno = 0;
personalmail = 0;
printlength = 60;
printmargin = 80;
quotebufmode = QBUF_ASK;
quotectrl = CI_TEAR|CI_ORIG;
quotemargin = 70;
2001-03-17 21:17:57 +00:00
quotewraphard = false;
2000-02-25 11:04:07 +00:00
ra2usersbbs = 0;
replylink = REPLYLINK_DIRECT;
replylinkfloat = true;
2000-02-25 11:04:07 +00:00
replylinklist = 0;
replylinkshowalways = true;
2000-02-25 11:04:07 +00:00
screenblanker = 180;
screenblankertype = BLANK_SLIDEWIN;
screenmaxcol = 0;
screenmaxrow = 0;
screensize = 0;
2003-04-03 14:28:59 +00:00
seqmsgid = MAYBE;
seqoutrun = 0;
2000-02-25 11:04:07 +00:00
sharemode = cmdlinesharemode;
showdeleted = false;
soupexportmargin = 76;
squishscan = 2; // SQS_QUICK
squishuserno = 0;
statuslinehelp = 0;
2003-06-09 05:47:39 +00:00
striphtml = false;
2000-02-25 11:04:07 +00:00
taglineno = 0;
taglinechar = '.';
taglinesupport = true;
titlestatus = true;
tplno = 0;
templatematch = false;
timeout = 0;
twitmode = TWIT_BLANK;
2001-10-07 08:24:26 +00:00
usearea = true;
2000-02-25 11:04:07 +00:00
usecharset = true;
2001-10-07 08:24:26 +00:00
usefwd = NO;
2000-02-25 11:04:07 +00:00
useintl = true;
usepid = true;
usernameno = 0;
usestylies = true;
usetzutc = false;
viewhidden = false;
viewkludge = false;
viewquote = true;
2003-06-09 05:47:39 +00:00
writeheader = 1;
2000-02-25 11:04:07 +00:00
wildcatuserno = 0;
zonegating = ASK;
// classes
attribsattach.loc1();
attribscc.loc1();
attribscfm.loc1();
attribsecho.loc1();
2001-11-22 18:57:37 +00:00
attribsemail.loc1();
2000-02-25 11:04:07 +00:00
attribsfrq.loc1();
attribslocal.loc1();
attribsnet.loc1();
2001-11-22 18:57:37 +00:00
attribsnews.loc1();
2000-02-25 11:04:07 +00:00
switches.set(akamatchnet, true);
switches.set(areaautonext, true);
switches.set(areacatchupread, true);
switches.set(areakeeplast, true);
switches.set(arealistgroupid, true);
switches.set(arealistpagebar, true);
2001-03-17 21:17:57 +00:00
switches.set(askdelorig, false);
2000-02-25 11:04:07 +00:00
switches.set(beepcomment, true);
switches.set(beepnoises, true);
switches.set(dispautonext, true);
switches.set(displocalhigh, true);
switches.set(disppagebar, true);
switches.set(dispstatusline, true);
switches.set(dosprompt, true);
switches.set(filelistpagebar, true);
switches.set(internetreply, true);
switches.set(keybdefaults, true);
switches.set(keybext, true);
switches.set(kludgechrs, true);
switches.set(lookupnet, true);
switches.set(msglistpagebar, true);
switches.set(msglistviewsubj, true);
switches.set(nodelistwarn, true);
switches.set(printformfeed, true);
switches.set(screenshadows, true);
switches.set(statuslineclock, true);
switches.set(timeoutsavemsg, true);
switches.set(useflags, true);
switches.set(usemsgid, true);
switches.set(rcvdisablescfm, true);
// screen configuration
disphdrdateset.len = 20;
disphdrdateset.pos = -20;
disphdrnameset.len = 36;
disphdrnameset.pos = 8;
disphdrnodeset.len = 16;
disphdrnodeset.pos = 44;
// unsorted structures
2003-12-10 08:35:16 +00:00
areatypeorder[GMB_NET] = 1;
areatypeorder[GMB_NET|GMB_EMAIL] = 2;
areatypeorder[GMB_ECHO] = 3;
areatypeorder[GMB_ECHO|GMB_NEWSGROUP] = 4;
areatypeorder[GMB_LOCAL] = 5;
2000-02-25 11:04:07 +00:00
if(gvid->adapter & V_MONO)
memcpy(color, gold_mono1, sizeof(color));
else
memcpy(color, gold_color1, sizeof(color));
*internetgate.name = 0;
internetgateexp = (RFCName << 2) | RFCAddress;
2000-02-25 11:04:07 +00:00
// internetgate.addr.reset();
invalidate.origin.first = " * Origin: ";
invalidate.origin.second = " + Origin: ";
invalidate.seenby.first = "SEEN-BY";
invalidate.seenby.second = "SEEN+BY";
invalidate.tearline.first = "---";
invalidate.tearline.second = "-+-";
invalidate.cc.first = "CC:";
invalidate.cc.second = "!CC:";
invalidate.xc.first = "XC:";
invalidate.xc.second = "!XC:";
invalidate.xp.first = "XP:";
invalidate.xp.second = "!XP:";
play.type = 0;
play.effectno = 0;
*play.file = 0;
for(int n=0; n<16; n++)
screenpalette[n] = -1;
*semaphore.netscan = 0;
*semaphore.echoscan = 0;
*semaphore.exportlist = 0;
*semaphore.importlist = 0;
*semaphore.scanall = 0;
*semaphore.scanthis = 0;
*semaphore.scannetmail = 0;
*semaphore.pmscanall = 0;
*semaphore.pmscanthis = 0;
*semaphore.pmscannetmail = 0;
*semaphore.qwkimport = 0;
*semaphore.qwkexport = 0;
*semaphore.soupimport = 0;
*semaphore.soupexport = 0;
*semaphore.exitnow = 0;
semaphore.idletime = 0;
}
// ------------------------------------------------------------------
CfgGed::~CfgGed() {
}
// ------------------------------------------------------------------