Replace all std::cout with internally defined macro

This commit is contained in:
Ianos Gnatiuc
2006-01-17 17:47:35 +00:00
parent d488a5510b
commit 3350c0806e
52 changed files with 728 additions and 477 deletions

View File

@@ -28,6 +28,10 @@
#include <cstdlib>
#include <gmemdbg.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#include <gedacfg.h>
@@ -329,11 +333,12 @@ void gareafile::GetAreasBBS(char* name, char* origin, char* options) {
MakePathname(areafile, areapath, areafile);
fp = fsopen(areafile, "rt", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << areafile << std::endl;
if (not quiet)
STD_PRINT("* Reading " << areafile << std::endl);
bool firstline = true;

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gcrcall.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOCMAIL
#include <gedacfg.h>
@@ -76,11 +80,12 @@ bool gareafile::jbstrcpy(char *dest, char *src, size_t maxlen, size_t *jbc) {
void gareafile::ReadCrashmailCfg(const char* file) {
FILE* fp = fsopen(file, "rt", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
char buf[4000];
char key[30];

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gmemdbg.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NODB
#include <gedacfg.h>
#include <gs_db.h>
@@ -47,18 +51,20 @@ void gareafile::ReadDB130(char* tag, char* dbpath) {
MakePathname(file2, dbpath, "dbridge.aa2");
fp1 = fsopen(file1, "rb", sharemode);
if(fp1) {
if (fp1)
{
setvbuf(fp1, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file1 << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file1 << std::endl);
fp2 = fsopen(file2, "rb", sharemode);
if(fp2) {
if (fp2)
{
setvbuf(fp2, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file2 << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file2 << std::endl);
while(fread(&AA1, sizeof(DB130_AA1), 1, fp1) == 1) {
@@ -117,12 +123,12 @@ void gareafile::ReadDB1046(char* file, char* tag) {
DB1046_ADF* ADF = (DB1046_ADF*)throw_calloc(1, sizeof(DB1046_ADF));
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(ADF, sizeof(DB1046_ADF), 1, fp) == 1) {
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
@@ -181,11 +187,12 @@ void gareafile::ReadDB1047A22(char* file, int reclen, char* tag) {
if(ADF) {
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(ADF, reclen, 1, fp) == 1) {
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
@@ -245,11 +252,12 @@ void gareafile::ReadDB2011(char* file, int reclen, char* tag) {
if(ADF) {
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(ADF, reclen, 1, fp) == 1) {
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
@@ -334,10 +342,10 @@ void gareafile::ReadDBridge(char* tag) {
MakePathname(file, dbpath, "dbridge.prm");
fp = fsopen(file, "rt", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
// Read netmail storage method etc
for(line=1; line <= 2; line++)

View File

@@ -26,6 +26,10 @@
#include <cstdlib>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NODUTCHIE
#include <gedacfg.h>
@@ -63,11 +67,12 @@ void gareafile::ReadDutchie(char* tag) {
MakePathname(file, dupath, "dutchie.are");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fgets(buf, 255, fp)) {

View File

@@ -26,6 +26,10 @@
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOEZY
#include <gedacfg.h>
#include <gs_ez102.h>
@@ -48,10 +52,10 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
MakePathname(file, path, "constant.ezy");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(constant, sizeof(CONSTANTRECORD), 1, fp);
fclose(fp);
@@ -189,10 +193,10 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
MakePathname(file, path, "messages.ezy");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
int record = 1;

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOEZY
#include <gedacfg.h>
#include <gs_ez110.h>
@@ -49,10 +53,10 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
MakePathname(file, path, "constant.ezy");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(constant, sizeof(CONSTANTRECORD), 1, fp);
fclose(fp);
@@ -190,10 +194,10 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
MakePathname(file, path, "MESSAGES.EZY");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
int record = 1;
@@ -308,10 +312,10 @@ void gareafile::ReadEzycom(char* tag) {
if(not fexist(file))
MakePathname(file, path, "config.ezy");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
char _verstr[9];
fread(_verstr, 9, 1, fp);
@@ -319,8 +323,9 @@ void gareafile::ReadEzycom(char* tag) {
strp2c(_verstr);
if(strnicmp(_verstr, "1.02", 4) < 0) {
std::cout << "* Error: Ezycom v" << _verstr << " is not supported - Skipping." << std::endl;
if (strnicmp(_verstr, "1.02", 4) < 0)
{
STD_PRINT("* Error: Ezycom v" << _verstr << " is not supported - Skipping." << std::endl);
return;
}
else if(strnicmp(_verstr, "1.10", 4) >= 0)

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOFD
#include <gedacfg.h>
#include <gs_fd.h>
@@ -79,10 +83,10 @@ void gareafile::ReadFrontDoor(char* tag) {
MakePathname(file, fdpath, "setup.fd");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(buf, 5, 1, fp);
if(streql(buf, "JoHo")) { // Check to see that it is v1.99b or higher
@@ -117,11 +121,12 @@ void gareafile::ReadFrontDoor(char* tag) {
MakePathname(file, fdpath, "folder.sys");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(folder, sizeof(FD_Folder), 1, fp) == 1) {
behave = folder->behave;

View File

@@ -28,6 +28,10 @@
#include <cstdlib>
#include <gfilutil.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOFE
#include <gedacfg.h>
#include <gs_fech6.h>
@@ -192,10 +196,10 @@ void gareafile::ReadFastecho(char* tag) {
}
fh = sopen(file, O_RDONLY|O_BINARY, sharemode, S_STDRD);
if(fh != -1) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fh != -1)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
read(fh, &revision, sizeof(revision));
lseek(fh, 0L, SEEK_SET); // rewind
@@ -207,7 +211,7 @@ void gareafile::ReadFastecho(char* tag) {
else if(revision == 6)
ReadFastecho142(fh);
else
std::cout << "* Error: FastEcho system file revision level " << revision << " is not supported - Skipping." << std::endl;
STD_PRINT("* Error: FastEcho system file revision level " << revision << " is not supported - Skipping." << std::endl);
close(fh);
}

View File

@@ -28,6 +28,10 @@
#include <gmemdbg.h>
#include <gcrcall.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOFIDOPCB
#include <gedacfg.h>
@@ -85,11 +89,12 @@ void gareafile::ReadFidoPCB(char* tag) {
MakePathname(file, path, "fidopcb.cfg");
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
int areas = 0;
fparea* area = NULL;

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gmemdbg.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOFMAIL
#include <gedacfg.h>
#include <gs_fm116.h>
@@ -298,11 +302,11 @@ void gareafile::ReadFMail(char* tag) {
ReadFMail098(fp, path, file, options);
else if((ar_rev >= 0x0110) and (ar_rev < 0x0200))
ReadFMail116(fp, path, file, options);
else {
else
{
char buff[56+sizeof(uint)*2];
sprintf(buff, "* Error: Unknown FMail config revision %04Xh - Skipping.\n", ar_rev);
std::cout << buff;
// std::cout << "* Error: Unknown FMail config revision " << std::setfill('0') << std::setw(4) << std::hex << ar_rev << "h - Skipping." << std::endl;
STD_PRINT(buff);
}
}
}

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gmemdbg.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOGECHO
#include <gedacfg.h>
@@ -84,10 +88,10 @@ void gareafile::ReadGEcho(char* tag) {
if(gesetup) {
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(&sysrev, sizeof(word), 1, fp);
rewind(fp);
@@ -107,13 +111,14 @@ void gareafile::ReadGEcho(char* tag) {
const char *_fidomsgtype = fidomsgtype;
if(ge_version >= 102) {
if(ge_version >= 102)
{
_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 <<
"* To disable this warning, set FIDOMSGTYPE FTS1 in your GoldED setup." << std::endl;
if((streql(_fidomsgtype, "FTS1")) and (streql(fidomsgtype, "OPUS")))
{
STD_PRINT("* Warning - FTS-1 format is used for *.MSG. For better compatibility set this" << std::endl);
STD_PRINT("* in GSETUP: Miscellanous->GEcho Options->MSG compatibilty = Opus (not Fido)." << std::endl);
STD_PRINT("* To disable this warning, set FIDOMSGTYPE FTS1 in your GoldED setup." << std::endl);
}
}
@@ -331,11 +336,12 @@ void gareafile::ReadGEcho(char* tag) {
MakePathname(file, gepath, "areafile.ge");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(&ahdr, sizeof(AREAFILE_HDR), 1, fp);
uint arearecsize = (ahdr.maxconnections * sizeof(CONNECTION)) + ahdr.recsize;
@@ -436,7 +442,7 @@ void gareafile::ReadGEcho(char* tag) {
}
}
else
std::cout << "* Error: GEcho system file revision level " << sysrev << " is not supported - Skipping." << std::endl;
STD_PRINT("* Error: GEcho system file revision level " << sysrev << " is not supported - Skipping." << std::endl);
}
throw_free(gesetup);
}

View File

@@ -28,6 +28,10 @@
#include <gcrcall.h>
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOFIDOCONF
#include <gedacfg.h>
@@ -174,11 +178,12 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
Path buf2;
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
aa.reset();
aa.type = GMB_NONE;
@@ -201,8 +206,9 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
{
int ver_maj, ver_min;
sscanf(val, "%d.%d", &ver_maj, &ver_min);
if((ver_maj != 0) and (ver_min != 15)) {
std::cout << "* Error: Unknown fidoconfig version " << ver_maj << '.' << ver_min << " - Skipping." << std::endl;
if ((ver_maj != 0) and (ver_min != 15))
{
STD_PRINT("* Error: Unknown fidoconfig version " << ver_maj << '.' << ver_min << " - Skipping." << std::endl);
throw_xfree(alptr);
goto skip_config;
}

View File

@@ -26,6 +26,10 @@
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOIMAIL
#include <gedacfg.h>
#include <gs_im160.h>
@@ -44,10 +48,10 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
CF = new im_config_type; throw_new(CF);
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(CF, sizeof(im_config_type), 1, fp);
fclose(fp);
@@ -71,11 +75,12 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
MakePathname(file, impath, "IMAIL.AR");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(&AR, sizeof(areas_record_type), 1, fp) == 1) {
@@ -102,10 +107,11 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
case MSGTYPE_HUDSON:
aa.basetype = "HUDSON";
if((AR.brd >= 1) and (AR.brd <= 200))
if ((AR.brd >= 1) and (AR.brd <= 200))
aa.board = AR.brd;
else {
std::cout << "* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << std::endl;
else
{
STD_PRINT("* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << std::endl);
continue;
}
break;

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gmemdbg.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOIMAIL
#include <gedacfg.h>
@@ -54,10 +58,10 @@ void gareafile::ReadIMail170(char* options, char* file, char* impath) {
CF = new im_config_type; throw_new(CF);
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(CF, sizeof(im_config_type), 1, fp);
fclose(fp);
@@ -81,11 +85,12 @@ void gareafile::ReadIMail170(char* options, char* file, char* impath) {
MakePathname(file, impath, "IMAIL.AR");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(&AR, sizeof(areas_record_type), 1, fp) == 1) {
@@ -112,10 +117,11 @@ void gareafile::ReadIMail170(char* options, char* file, char* impath) {
case MSGTYPE_HUDSON:
aa.basetype = "HUDSON";
if((AR.brd >= 1) and (AR.brd <= 200))
if ((AR.brd >= 1) and (AR.brd <= 200))
aa.board = AR.brd;
else {
std::cout << "* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << std::endl;
else
{
STD_PRINT("* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << std::endl);
continue;
}
break;

View File

@@ -31,6 +31,10 @@
#include <stdlib.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOIMAIL
#include <gedacfg.h>
@@ -54,10 +58,10 @@ void gareafile::ReadIMail185(char* options, char* file, char* impath) {
CF = new im_config_type; throw_new(CF);
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(CF, sizeof(im_config_type), 1, fp);
fclose(fp);
@@ -81,11 +85,12 @@ void gareafile::ReadIMail185(char* options, char* file, char* impath) {
MakePathname(file, impath, "imail.ar");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(&AR, sizeof(mail_area_type), 1, fp) == 1) {
@@ -112,10 +117,11 @@ void gareafile::ReadIMail185(char* options, char* file, char* impath) {
case MSGTYPE_HUDSON:
aa.basetype = "HUDSON";
if((AR.brd >= 1) and (AR.brd <= 200))
if ((AR.brd >= 1) and (AR.brd <= 200))
aa.board = AR.brd;
else {
std::cout << "* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << std::endl;
else
{
STD_PRINT("* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << std::endl);
continue;
}
break;
@@ -219,11 +225,9 @@ void gareafile::ReadIMail(char* tag) {
}
}
char buff[78];
sprintf( buff, "* Error: IMAIL %u.%02u (structure revision %u.%02u) is not supported - Skipping.\n",
unsigned(imver[0]), unsigned(imver[1]), unsigned(imstructver[0]), unsigned(imstructver[1]) );
std::cout << buff;
// std::cout << "* Error: IMAIL " << imver[0] << '.' << std::setfill('0') << std::setw(2) << imver[1] << " (structure revision " << imstructver[0] << '.' << std::setfill('0') << std::setw(2) << imstructver[1] << ") is not supported - Skipping." << std::endl;
sprintf(buff, "* Error: IMAIL %u.%02u (structure revision %u.%02u) is not supported - Skipping.\n",
unsigned(imver[0]), unsigned(imver[1]), unsigned(imstructver[0]), unsigned(imstructver[1]) );
STD_PRINT(buff);
}
}

View File

@@ -28,6 +28,10 @@
#include <cstdlib>
#include <gmemdbg.h>
#include <gfile.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOINTERMAIL
#include <gedacfg.h>
#include <gs_inter.h>
@@ -64,12 +68,12 @@ void gareafile::ReadInterMail(char* tag) {
gfile fp;
fp.fopen(_file, "rb");
if(fp.isopen()) {
if (fp.isopen())
{
_ctl* ctl = (_ctl*)throw_calloc(1, sizeof(_ctl));
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
fp.fread(ctl, sizeof(_ctl));
@@ -133,10 +137,10 @@ void gareafile::ReadInterMail(char* tag) {
_file = AddPath(ctl->s.systempath, "imfolder.cfg");
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
FOLDER* _folder = (FOLDER*)throw_calloc(1, sizeof(FOLDER));
@@ -177,10 +181,10 @@ void gareafile::ReadInterMail(char* tag) {
_file = AddPath(ctl->s.systempath, "folder.cfg");
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
OLDFOLDER* _folder = (OLDFOLDER*)throw_calloc(1, sizeof(OLDFOLDER));
@@ -216,10 +220,11 @@ void gareafile::ReadInterMail(char* tag) {
}
}
}
else {
else
{
char buff[62+sizeof(ctl->sysrev)*2];
sprintf(buff, "* Error: InterMail revision %04Xh is not supported - Skipping.\n", ctl->sysrev);
std::cout << buff;
STD_PRINT(buff);
}
throw_free(ctl);
}

View File

@@ -28,6 +28,10 @@
#include <gmemdbg.h>
#include <gfile.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOLORA
#include <gedacfg.h>
#include <gs_lo240.h>
@@ -65,10 +69,10 @@ void gareafile::ReadLoraBBS(char* tag) {
gfile fp;
const char* _file = AddPath(_path, "config.dat");
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
_configuration* cfg = (_configuration*)throw_calloc(1, sizeof(_configuration));
fp.fread(cfg, sizeof(_configuration));
@@ -131,11 +135,12 @@ void gareafile::ReadLoraBBS(char* tag) {
_file = AddPath(_path, "sysmsg.dat");
fp.fopen(_file, "rb");
if(fp.isopen()) {
if (fp.isopen())
{
fp.setvbuf(NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
_sysmsg* sysmsg = (_sysmsg*)throw_calloc(1, sizeof(_sysmsg));

View File

@@ -29,6 +29,10 @@
#include <gfilutil.h>
#include <gmemdbg.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOMAXIMUS
#include <gedacfg.h>
#include <gs_max3.h>
@@ -46,10 +50,10 @@ void gareafile::ReadMaximus3(char* mxpath, char* areafile, char* options) {
MakePathname(prmfile, mxpath, "max.prm");
fp = fsopen(prmfile, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << areafile << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << areafile << std::endl);
m_pointers* prmp = (m_pointers*)throw_calloc(1, sizeof(m_pointers));
m_pointers& prm = *prmp;
@@ -68,11 +72,12 @@ void gareafile::ReadMaximus3(char* mxpath, char* areafile, char* options) {
MapPath(areafile);
fp = fsopen(areafile, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 32000);
if(not quiet)
std::cout << "* Reading " << areafile << std::endl;
if (not quiet)
STD_PRINT("* Reading " << areafile << std::endl);
long areasize = fsize(fp)-4;

View File

@@ -25,6 +25,10 @@
// ------------------------------------------------------------------
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOME2
#include <gedacfg.h>
@@ -56,11 +60,12 @@ void gareafile::ReadME2(char* tag) {
MakePathname(file, areapath, file);
fp = fsopen(file, "rt", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fgets(buf, 255, fp)) {

View File

@@ -30,6 +30,10 @@
#include <gfilutil.h>
#include <gdirposx.h>
#include <gwildmat.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOOPUS
#include <gedacfg.h>
#undef _NORMAL
@@ -75,11 +79,12 @@ void gareafile::ReadOpus(char* tag) {
// Found Opus 1.7x config files
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(&msgsys, sizeof(_msgsys), 1, fp) == 1) {
@@ -131,11 +136,12 @@ void gareafile::ReadOpus(char* tag) {
MakePathname(file, oppath, de->name.c_str());
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(&sysdat, sizeof(_systemdat), 1, fp);
if(*sysdat.msgpath and *sysdat.msgtitle) {

View File

@@ -28,6 +28,10 @@
#include <gmemdbg.h>
#include <gfile.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOPCB
#include <gedacfg.h>
#include <gs_pcb.h>
@@ -83,10 +87,10 @@ void gareafile::ReadPCBoard(char* tag) {
gfile fp;
const char* _file = AddPath(_path, "pcboard.dat");
fp.fopen(_file, "rt");
if(fp.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
int _line = 0;
@@ -114,10 +118,10 @@ void gareafile::ReadPCBoard(char* tag) {
if(*_fidopath) {
const char* _file = AddPath(_fidopath, "pcbfido.cfg");
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
// Get configuration file version
fp.fread(&fido_version, 2);
@@ -161,9 +165,11 @@ void gareafile::ReadPCBoard(char* tag) {
_file = AddPath(_fidopath, "areas.dat");
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
word cfgver = 0;
fp.fread(&cfgver, 2);
if(cfgver == 3) {
@@ -177,9 +183,11 @@ void gareafile::ReadPCBoard(char* tag) {
_file = AddPath(_fidopath, "akas.dat");
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
word cfgver = 0;
fp.fread(&cfgver, 2);
if(cfgver == 3) {
@@ -199,9 +207,11 @@ void gareafile::ReadPCBoard(char* tag) {
_file = AddPath(_fidopath, "origins.dat");
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
word cfgver = 0;
fp.fread(&cfgver, 2);
if(cfgver == 3) {
@@ -246,18 +256,18 @@ void gareafile::ReadPCBoard(char* tag) {
_file = AddPath(_cnamespath, ".@@@");
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
gfile fp2;
_file = AddPath(_cnamespath, ".add");
fp2.fopen(_file, "rb");
if(fp2.isopen()) {
if(not quiet)
std::cout << "* Reading " << _file << std::endl;
if (fp2.isopen())
{
if (not quiet)
STD_PRINT("* Reading " << _file << std::endl);
word _recsize = 0;
fp.fread(&_recsize, 2);

View File

@@ -27,6 +27,10 @@
#include <cstring>
#include <cstdlib>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOPROBOARD
#include <gedacfg.h>
#include <gs_pb200.h>
@@ -62,10 +66,10 @@ void gareafile::ReadProBoard(char* tag) {
Config* cfg = (Config*)throw_calloc(1, sizeof(Config));
MakePathname(file, path, "config.pro");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(cfg, sizeof(Config), 1, fp);
@@ -78,10 +82,10 @@ void gareafile::ReadProBoard(char* tag) {
uint akasz = (uint)GetFilesize(file);
ftn_addr* aka = (ftn_addr*)throw_calloc(1, akasz+sizeof(ftn_addr));
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(aka, akasz, 1, fp);
fclose(fp);
@@ -90,12 +94,12 @@ void gareafile::ReadProBoard(char* tag) {
MsgAreas* area = (MsgAreas*)throw_calloc(1, sizeof(MsgAreas));
MakePathname(file, path, "msgareas.pb");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(area, sizeof(MsgAreas), 1, fp) == 1) {
aa.reset();

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gcrcall.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOQECHO
#include <gedacfg.h>
@@ -39,11 +43,12 @@ void gareafile::ReadQEchoFile(char* file, char* options, char* origin) {
char buf[512];
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fgets(buf, sizeof(buf), fp)) {

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gmemdbg.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOQFRONT
#include <gedacfg.h>
#include <gs_qfrnt.h>
@@ -62,9 +66,11 @@ void gareafile::ReadQFront(char* tag) {
OriginLineRecord* origin = (OriginLineRecord*)throw_calloc(1, sizeof(OriginLineRecord));
MakePathname(file, path, "qorigin.dat");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(origin, sizeof(OriginLineRecord), 1, fp);
for(int n=0; n<MaxOrigins; n++)
STRNP2C(origin->OriginLine[n]);
@@ -74,12 +80,12 @@ void gareafile::ReadQFront(char* tag) {
EchoMailConferenceRecord* area = (EchoMailConferenceRecord*)throw_calloc(1, sizeof(EchoMailConferenceRecord));
MakePathname(file, path, "qechos.dat");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
while(fread(area, sizeof(EchoMailConferenceRecord), 1, fp) == 1) {
if(not area->Deleted) {

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOQBBS
#include <gedacfg.h>
#include <gs_qbbs.h>
@@ -50,10 +54,10 @@ void gareafile::ReadQ260(char* qbpath, char* origin, char* options) {
MakePathname(file, qbpath, "config.bbs");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(cfg, sizeof(Q260CfgRecT), 1, fp);
@@ -138,10 +142,10 @@ void gareafile::ReadQ276(char* qbpath, char* origin, char* options) {
MakePathname(file, qbpath, "quickcfg.dat");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(cfg, sizeof(Q276CfgRecT), 1, fp);
@@ -154,10 +158,10 @@ void gareafile::ReadQ276(char* qbpath, char* origin, char* options) {
MakePathname(file, qbpath, "MSGCFG.DAT");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
int _recs = (int)(filelength(fileno(fp)) / sizeof(Q276BrdRecT));
// int _fmt = (_recs > 200) ? GMB_GOLDBASE : GMB_HUDSON;

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gmemdbg.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NORA
#include <gedacfg.h>
#include <gs_ra.h>
@@ -72,10 +76,10 @@ void gareafile::ReadRemoteAccess(char* tag) {
MakePathname(file, rapath, "config.ra");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(config, sizeof(CONFIGrecord), 1, fp);
fclose(fp);
@@ -94,11 +98,12 @@ void gareafile::ReadRemoteAccess(char* tag) {
strnp2cc(rapath, config->SysPath, sizeof(Path));
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
if(config->VersionID >= 0x200) {
MESSAGErecord* area = new MESSAGErecord; throw_new(area);

View File

@@ -26,6 +26,10 @@
#include <cstdlib>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NORAECHO
#include <gedacfg.h>
#include <gs_recho.h>
@@ -74,19 +78,21 @@ void gareafile::ReadRaEcho(char* tag) {
else if((raesize%(long)sizeof(TRaEchoArea101)) == 0)
raever = sizeof(TRaEchoArea101);
}
if(raever == 0) {
if(not quiet)
std::cout << "* Could not determine version of RA-ECHO - skipping." << std::endl;
if (raever == 0)
{
if (not quiet)
STD_PRINT("* Could not determine version of RA-ECHO - skipping." << std::endl);
return;
}
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
areano = 1;
while(fread(&area, raever, 1, fp) == 1) {

View File

@@ -28,6 +28,10 @@
#include <gcrcall.h>
#include <gstrall.h>
#include <gutlmisc.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOSPCT
#include <gedacfg.h>
@@ -74,11 +78,12 @@ void gareafile::ReadSpaceAr(const char* file) {
const word CRC_ENDAREA = 0x3E9F;
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
char buf[4000];
AreaCfg aa;
@@ -169,11 +174,12 @@ void gareafile::ReadSpaceNtm(const char* file) {
const word CRC_ENDNETMAIL = 0xD995;
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
char buf[4000];
AreaCfg aa;
@@ -234,11 +240,12 @@ void gareafile::ReadSpaceCtl(const char* file) {
const word CRC_AREAFILE = 0xB487;
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
char buf[4000];
AreaCfg aa;

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gcrcall.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOSQSH
#include <gedacfg.h>
@@ -50,11 +54,12 @@ void gareafile::ReadSquishFile(char* path, char* file, char* options, char* orig
Path buf2;
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
aa.reset();

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOSBBS
#include <gedacfg.h>
#include <gs_sbbs.h>
@@ -73,10 +77,10 @@ void gareafile::ReadSuperBBS(char* tag) {
MakePathname(file, sbpath, "config.bbs");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(config, sizeof(ConfigRecordT), 1, fp);
STRNP2C(config->OriginLine);
@@ -84,10 +88,10 @@ void gareafile::ReadSuperBBS(char* tag) {
MakePathname(file, sbpath, "sconfig.bbs");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(sconfig, sizeof(ExtraConfigT), 1, fp);
fclose(fp);
@@ -100,10 +104,10 @@ void gareafile::ReadSuperBBS(char* tag) {
MakePathname(file, sbpath, "boards.bbs");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
for(int n=0; n<200; n++) {
@@ -170,10 +174,8 @@ void gareafile::ReadSuperBBS(char* tag) {
fclose(fp);
}
}
else {
std::cout << "* Error: Unsupported version of SuperBBS: " <<
(word)(sconfig->VersionNumber >> 8) << '.' << (word)(sconfig->VersionNumber & 0xFF) << std::endl;
}
else
STD_PRINT("* Error: Unsupported version of SuperBBS: " << (word)(sconfig->VersionNumber >> 8) << '.' << (word)(sconfig->VersionNumber & 0xFF) << std::endl);
}
}

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gcrcall.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOSYNCHRONET
#include <gedacfg.h>
#include <gs_sync.h>
@@ -83,12 +87,12 @@ void gareafile::ReadSynchronet(char* tag) {
}
FILE* in = fsopen(file, "rb", sharemode);
if(in) {
if (in)
{
setvbuf(in, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
// Skip header:
// max_qwkmsgs 4

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gcrcall.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOTIMED
#include <gedacfg.h>
@@ -70,11 +74,12 @@ void gareafile::ReadTimedFile(char* path, char* file, char* options, char* origi
char buf2[256];
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
aa.reset();

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gcrcall.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOTERMAIL
#include <gedacfg.h>
@@ -47,11 +51,12 @@ void gareafile::ReadTmailFile(char* file, char* options, char* origin) {
char buf[512];
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
aa.reset();

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOTOSSCAN
#include <gedacfg.h>
#include <gs_fd.h> // Structures for FrontDoor fd.sys+folder.sys / setup.fd+folder.fd
@@ -78,10 +82,10 @@ void gareafile::ReadTosScan(char* tag) {
MakePathname(file, tspath, "fd.sys");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(buf, 5, 1, fp);
if(streql(buf, "JoHo")) { // Check to see that it is v1.99b or higher
@@ -111,11 +115,12 @@ void gareafile::ReadTosScan(char* tag) {
MakePathname(file, tspath, "areafile.fd");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fseek(fp, 4L, SEEK_SET); // Skip CRC32

View File

@@ -28,6 +28,10 @@
#include <gfilutil.h>
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOWMAIL
#include <gedacfg.h>
#include <gs_wmail.h>
@@ -69,10 +73,10 @@ void gareafile::ReadWMail(char* tag) {
sprintf(file, "%swmail.prm", path);
fh = sopen(file, O_RDONLY|O_BINARY, sharemode, S_STDRD);
if(fh != -1) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fh != -1)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
read(fh, wmprm, sizeof(TWmailPrm));
@@ -124,10 +128,10 @@ void gareafile::ReadWMail(char* tag) {
sprintf(file, "%sareas.prm", path);
fh = sopen(file, O_RDONLY|O_BINARY, sharemode, S_STDRD);
if(fh != -1) {
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (fh != -1)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
// All the echomail areas
while(read(fh, arprm, sizeof(TAreasPrm)) == sizeof(TAreasPrm)) {

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gstrall.h>
#include <gmemdbg.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOWATERGATE
#include <gedacfg.h>
#include <gs_wtr.h>
@@ -104,11 +108,12 @@ void gareafile::ReadWtrGteFile(char* options, FILE* fp) {
MakePathname(file, c.systemdir, "areabase.tdb");
fp2 = fsopen(file, "rb", sharemode);
if(fp2) {
if (fp2)
{
char header[26];
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
fread(header, 26, 1, fp2);
strp2c(header);
@@ -145,7 +150,7 @@ void gareafile::ReadWtrGteFile(char* options, FILE* fp) {
throw_delete(ar);
}
else
std::cout << "* Error: WaterGate Areabase \"" << header << "\" is not supported - Skipping." << std::endl;
STD_PRINT("* Error: WaterGate Areabase \"" << header << "\" is not supported - Skipping." << std::endl);
fclose(fp2);
}
@@ -184,16 +189,18 @@ void gareafile::ReadWtrGte(char* tag) {
MakePathname(file, wtrpath, "wtrcfg.tdb");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
char header[26];
if(not quiet)
std::cout << "* Reading " << file << std::endl;
fread(header, 26, 1, fp); strp2c(header);
if(streql(header, ConfigHeader))
ReadWtrGteFile(options, fp);
else
std::cout << "* Error: WaterGate \"" << header << "\" is not supported - Skipping." << std::endl;
STD_PRINT("* Error: WaterGate \"" << header << "\" is not supported - Skipping." << std::endl);
fclose(fp);
}

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gcrcall.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOXBBS
#include <gedacfg.h>
#include <gs_xbbs.h>
@@ -55,11 +59,12 @@ void gareafile::ReadAdeptXbbsFile(char* path, char* file, char* options) {
Path apath;
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
aa.reset();

View File

@@ -27,6 +27,10 @@
#include <cstdlib>
#include <gcrcall.h>
#include <gstrall.h>
#if defined(__GOLD_GUI__)
#include <gvidall.h>
#include <gvidgui.h>
#endif
#undef GCFG_NOXMAIL
#include <gedacfg.h>
#include <gs_xmail.h>
@@ -77,11 +81,12 @@ void gareafile::ReadxMailFile(char* file, char* options) {
char buf[512];
FILE* fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
aa.reset();
@@ -161,12 +166,12 @@ void gareafile::ReadXMail(char* tag) {
MakePathname(file, xmailpath, "areas.xm");
fp = fsopen(file, "rb", sharemode);
if(fp) {
if (fp)
{
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
std::cout << "* Reading " << file << std::endl;
if (not quiet)
STD_PRINT("* Reading " << file << std::endl);
areano = 1;
while(fread(&area, sizeof(EchoAreaRec), 1, fp) == 1) {