Namespace madness to get it to compile with gcc 3.0. Ah, 2.95 works too ;)

This commit is contained in:
Jacobo Tarrío
2001-07-16 20:35:42 +00:00
parent 2f1bb70e33
commit 8c47abb153
111 changed files with 437 additions and 431 deletions

View File

@@ -74,7 +74,7 @@ gposixdir::~gposixdir()
void gposixdir::cd(const char *name, bool relative)
{
string ndirname;
std::string ndirname;
if(!*name)
name = ".";
if(relative) {
@@ -115,7 +115,7 @@ const gdirentry *gposixdir::nextentry(const char *mask, bool nameonly)
}
ret.name = entries[last_entry];
ret.dirname = dirname.c_str();
string pn = ret.dirname;
std::string pn = ret.dirname;
pn += "/";
pn += ret.name;
size_t skipfrom;

View File

@@ -39,7 +39,7 @@
class gdirentry {
public:
string name;
std::string name;
struct stat stat_info;
const char *dirname;
gdirentry();
@@ -54,7 +54,7 @@ public:
class gposixdir {
private:
string dirname;
std::string dirname;
gdirentry ret;
gstrarray entries;
unsigned long last_entry;

View File

@@ -66,8 +66,8 @@ public:
protected:
vector<ops> ostk;
vector<int> vstk;
std::vector<ops> ostk;
std::vector<int> vstk;
ops pop_operator();
int pop_value();
@@ -81,14 +81,14 @@ public:
void push_operator(ops o);
int evaluate_op(ops o, int y, int x);
int evaluate_ops(ops* o, int* y, int* x);
int evaluate_ops(std::vector<ops>::iterator o, std::vector<int>::iterator y, std::vector<int>::iterator x);
};
// ------------------------------------------------------------------
inline int geval::evaluate_ops(ops* o, int* y, int* x) {
inline int geval::evaluate_ops(std::vector<ops>::iterator o, std::vector<int>::iterator y, std::vector<int>::iterator x) {
return evaluate_op(*o, *y, *x);
}

View File

@@ -26,6 +26,7 @@
#include <gdefs.h>
#include <geval.h>
#include <iterator>
// ------------------------------------------------------------------
@@ -50,8 +51,8 @@ int gevalhum::evaluate() {
while(ostk.size()) {
int* vptr = vstk.begin();
ops* optr = ostk.begin();
std::vector<int>::iterator vptr = vstk.begin();
std::vector<ops>::iterator optr = ostk.begin();
while(optr < ostk.end()) {

View File

@@ -254,7 +254,7 @@ int gfile::getftime(dword* __ftime) {
// ------------------------------------------------------------------
FILE* gfile::fopen(const string& __path, const char* __mode, int __shflag) {
FILE* gfile::fopen(const std::string& __path, const char* __mode, int __shflag) {
return fopen(__path.c_str(), __mode, __shflag);
}

View File

@@ -119,7 +119,7 @@ public:
// ANSI-style streaming buffered I/O
FILE* fopen (const char* __path, const char* __mode, int __shflag=SH_DENYNO);
FILE* fopen (const string& __path, const char* __mode, int __shflag=SH_DENYNO);
FILE* fopen (const std::string& __path, const char* __mode, int __shflag=SH_DENYNO);
FILE* fdopen (char* __mode);
int fclose ();

View File

@@ -129,38 +129,38 @@ struct Stamp {
#endif
FILE* fsopen(const char* path, const char* type, int shflag);
inline FILE* fsopen(const string& path, const char* type, int shflag) { return fsopen(path.c_str(), type, shflag); }
inline FILE* fsopen(const std::string& path, const char* type, int shflag) { return fsopen(path.c_str(), type, shflag); }
int is_dir(const char* path);
inline int is_dir(const string& path) { return is_dir(path.c_str()); }
inline int is_dir(const std::string& path) { return is_dir(path.c_str()); }
inline bool fexist(const char* filename) { return *filename ? ((access(filename, 0) == 0) and not is_dir(filename)) : false; }
inline bool fexist(const string& filename) { return fexist(filename.c_str()); }
inline bool fexist(const std::string& filename) { return fexist(filename.c_str()); }
dword gfixstattime(time_t st_time);
dword GetFiletime(const char* file);
inline dword GetFiletime(const string& file) { return GetFiletime(file.c_str()); }
inline dword GetFiletime(const std::string& file) { return GetFiletime(file.c_str()); }
inline long FiletimeCmp(const char* file1, const char* file2) { return long(GetFiletime(file1) - GetFiletime(file2)); }
inline long FiletimeCmp(const string& file1, const string& file2) { return FiletimeCmp(file1.c_str(), file2.c_str()); }
inline long FiletimeCmp(const std::string& file1, const std::string& file2) { return FiletimeCmp(file1.c_str(), file2.c_str()); }
long fsize(FILE* fp);
long GetFilesize(const char* file);
const char* AddPath(const char* path, const char* file);
inline const char* AddPath(const string& path, const char* file) { return AddPath(path.c_str(), file); }
inline const char* AddPath(const string& path, const string& file) { return AddPath(path.c_str(), file.c_str()); }
inline const char* AddPath(const std::string& path, const char* file) { return AddPath(path.c_str(), file); }
inline const char* AddPath(const std::string& path, const std::string& file) { return AddPath(path.c_str(), file.c_str()); }
void MakePathname(char* pathname, const char* path, const char* name);
void MakePathname(string& pathname, const string& path, const string& name);
void MakePathname(std::string& pathname, const std::string& path, const std::string& name);
char* AddBackslash(char* p);
string& AddBackslash(string& p);
std::string& AddBackslash(std::string& p);
char* StripBackslash(char* p);
char* PathCopy(char* dst, const char* src);
void PathCopy(string& dst, const char* src);
void PathCopy(std::string& dst, const char* src);
void TouchFile(const char* __filename);
@@ -170,7 +170,7 @@ void WipeFile(const char* file, int options);
const char* CleanFilename(const char* __file);
int strschg_environ(char* s);
int strschg_environ(string& s);
int strschg_environ(std::string& s);
char* MapPath(char* map, bool reverse = false);
inline char* ReMapPath(char* map) { return MapPath(map, true); };
@@ -243,7 +243,7 @@ inline int chsize(int handle, long size) { return ftruncate(handle, size); }
// ------------------------------------------------------------------
bool maketruepath(string &dirname);
bool maketruepath(std::string &dirname);
// ------------------------------------------------------------------

View File

@@ -385,7 +385,7 @@ int strschg_environ(char* s) {
if(*s == NUL)
return 0;
string __s = s;
std::string __s = s;
int rv = strschg_environ(__s);
if(rv)
strxcpy(s, __s.c_str(), sizeof(Path));

View File

@@ -36,7 +36,7 @@
// ------------------------------------------------------------------
string& AddBackslash(string& p) {
std::string& AddBackslash(std::string& p) {
for(size_t posn = 0; (posn=p.find(GOLD_WRONG_SLASH_CHR, posn)) != p.npos; posn++)
p[posn] = GOLD_SLASH_CHR;
@@ -50,7 +50,7 @@ string& AddBackslash(string& p) {
// ------------------------------------------------------------------
// Add path to filename, if no path is set
void MakePathname(string& pathname, const string& path, const string& name) {
void MakePathname(std::string& pathname, const std::string& path, const std::string& name) {
Path pn;
MakePathname(pn, path.c_str(), name.c_str());
@@ -60,7 +60,7 @@ void MakePathname(string& pathname, const string& path, const string& name) {
// ------------------------------------------------------------------
void PathCopy(string& dst, const char* src) {
void PathCopy(std::string& dst, const char* src) {
dst = src;
strschg_environ(dst);
@@ -70,9 +70,9 @@ void PathCopy(string& dst, const char* src) {
// ------------------------------------------------------------------
int strschg_environ(string& s) {
int strschg_environ(std::string& s) {
string fnd;
std::string fnd;
int replaced = 0;
size_t posn, posn1;
@@ -86,7 +86,7 @@ int strschg_environ(string& s) {
#ifndef __HAVE_DRIVES__
if(not s.empty() and (s[0] == '~')) {
string name;
std::string name;
const char *p = s.c_str()+1;
if((s.length() != 1) and not isslash(*p)) {
while(*p and not isslash(*p))
@@ -95,7 +95,7 @@ int strschg_environ(string& s) {
name = getlogin();
struct passwd *pe = getpwnam(name.c_str());
if(pe != NULL) {
string dirname = pe->pw_dir;
std::string dirname = pe->pw_dir;
dirname += "/";
if(isslash(*p))
++p;
@@ -112,10 +112,10 @@ int strschg_environ(string& s) {
// ------------------------------------------------------------------
bool maketruepath(string &dirname) {
bool maketruepath(std::string &dirname) {
bool ok = true;
string ndirname;
std::string ndirname;
char cwd[GMAXPATH];
getcwd(cwd, GMAXPATH);
#ifdef __HAVE_DRIVES__

View File

@@ -91,7 +91,7 @@ char* ftn_addr::reset(const char* str, char* dom, int domsizelimit) {
// ------------------------------------------------------------------
void ftn_addr::reset(const string& str) {
void ftn_addr::reset(const std::string& str) {
reset(str.c_str());
}
@@ -99,7 +99,7 @@ void ftn_addr::reset(const string& str) {
// ------------------------------------------------------------------
void ftn_addr::reset(const string& str, string& dom, int domsizelimit) {
void ftn_addr::reset(const std::string& str, std::string& dom, int domsizelimit) {
ftn_domain doms;
reset(str.c_str(), doms, domsizelimit);
@@ -129,7 +129,7 @@ static bool ftn_getaddrpart(word& part, const char* s) {
// ------------------------------------------------------------------
const char* ftn_addr::set(const string& str) {
const char* ftn_addr::set(const std::string& str) {
return set(str.c_str());
}
@@ -137,7 +137,7 @@ const char* ftn_addr::set(const string& str) {
// ------------------------------------------------------------------
const char* ftn_addr::set(const string& str, string& dom, int domsizelimit) {
const char* ftn_addr::set(const std::string& str, std::string& dom, int domsizelimit) {
ftn_domain doms;
set(str.c_str(), doms, domsizelimit);
@@ -292,7 +292,7 @@ int ftn_addr::compare(const ftn_addr& other) const {
// ------------------------------------------------------------------
string& ftn_addr::make_string(string& str) const {
std::string& ftn_addr::make_string(std::string& str) const {
char buf[200];
make_string(buf);
@@ -303,7 +303,7 @@ string& ftn_addr::make_string(string& str) const {
// ------------------------------------------------------------------
string& ftn_addr::make_string(string& str, const string& dom, int domfmt) const {
std::string& ftn_addr::make_string(std::string& str, const std::string& dom, int domfmt) const {
char buf[200];
make_string(buf, dom.c_str(), domfmt);

View File

@@ -80,7 +80,7 @@ public:
ftn_addr() : zone(0), net(0), node(0), point(0) {}
ftn_addr(uint a);
ftn_addr(const char* s);
ftn_addr(const string& s);
ftn_addr(const std::string& s);
ftn_addr(const ftn_addr& a);
ftn_addr(uint zn, uint nt, uint nd, uint pt);
@@ -94,21 +94,21 @@ public:
void set(const ftn_addr& a);
void set(const void* a);
char* set(const char* str, char* dom=NULL, int domsizelimit=ftn::domain_limit);
const char* set(const string& str);
const char* set(const string& str, string& dom, int domsizelimit=ftn::domain_limit);
const char* set(const std::string& str);
const char* set(const std::string& str, std::string& dom, int domsizelimit=ftn::domain_limit);
void reset();
void reset_fast();
void reset(const string& str);
void reset(const std::string& str);
char* reset(const char* str, char* dom=NULL, int domsizelimit=ftn::domain_limit);
void reset(const string& str, string& dom, int domsizelimit=ftn::domain_limit);
void reset(const std::string& str, std::string& dom, int domsizelimit=ftn::domain_limit);
bool match(const ftn_addr& mask) const;
bool equals(const ftn_addr& other) const;
int compare(const ftn_addr& other) const;
string& make_string(string& str) const;
string& make_string(string& str, const string& dom, int domfmt=ftn::domain_last) const;
std::string& make_string(std::string& str) const;
std::string& make_string(std::string& str, const std::string& dom, int domfmt=ftn::domain_last) const;
char* make_string(char* str, const char* dom=NULL, int domfmt=ftn::domain_last) const;
bool operator==(const ftn_addr& b) const;
@@ -116,7 +116,7 @@ public:
ftn_addr& operator=(int n);
ftn_addr& operator=(const char* s);
ftn_addr& operator=(const string& s);
ftn_addr& operator=(const std::string& s);
ftn_addr& operator=(const ftn_addr& a);
};
@@ -171,7 +171,7 @@ inline ftn_addr::ftn_addr(const char* s) : zone(0), net(0), node(0), point(0) {
// ------------------------------------------------------------------
inline ftn_addr::ftn_addr(const string& s) : zone(0), net(0), node(0), point(0) {
inline ftn_addr::ftn_addr(const std::string& s) : zone(0), net(0), node(0), point(0) {
reset(s);
}
@@ -219,7 +219,7 @@ inline bool ftn_addr::operator!=(const ftn_addr& b) const { return !equals(b); }
inline ftn_addr& ftn_addr::operator=(int n) { set_all(n); return *this; }
inline ftn_addr& ftn_addr::operator=(const char* s) { reset(s); return *this; }
inline ftn_addr& ftn_addr::operator=(const string& s) { reset(s); return *this; }
inline ftn_addr& ftn_addr::operator=(const std::string& s) { reset(s); return *this; }
inline ftn_addr& ftn_addr::operator=(const ftn_addr& a) { set_fast(a); return *this; }

View File

@@ -87,7 +87,7 @@ void ftn_attr::add(const ftn_attr& b) {
// ------------------------------------------------------------------
// Create string representation of an attribute set
string& ftn_attr::make_string(string& s) const {
std::string& ftn_attr::make_string(std::string& s) const {
s = "";
@@ -138,7 +138,7 @@ string& ftn_attr::make_string(string& s) const {
// ------------------------------------------------------------------
void ftn_attr::get(const string& __s) {
void ftn_attr::get(const std::string& __s) {
const char *s = __s.c_str();
if(striinc("PVT", s)) pvt1();

View File

@@ -124,19 +124,19 @@ public:
ftn_attr() { reset(); }
ftn_attr(const char* s) { get(s); }
ftn_attr(const string& s) { get(s); }
ftn_attr(const std::string& s) { get(s); }
ftn_attr(const ftn_attr& o) { operator=(o); }
void reset() { attr1 = attr2 = 0; }
void add(const ftn_attr& b);
void get(const string& s);
string& make_string(string& s) const;
void get(const std::string& s);
std::string& make_string(std::string& s) const;
bool equals(const ftn_attr& b) const;
ftn_attr& operator=(const char* s) { get(s); return *this; }
ftn_attr& operator=(const string& s) { get(s); return *this; }
ftn_attr& operator=(const std::string& s) { get(s); return *this; }
ftn_attr& operator=(const ftn_attr& o) { attr1=o.attr1; attr2=o.attr2; return *this; }
bool operator==(const ftn_attr& b) const { return equals(b); }
@@ -485,7 +485,7 @@ typedef ftn_attr Attr;
inline void AttrAdd(Attr* a, Attr* b) { a->add(*b); }
inline void GetAttribstr(Attr* attr, const char* attrs) { attr->get(attrs); }
inline char* MakeAttrStr(char* str, size_t maxlen, const Attr* attr) { string tmp; attr->make_string(tmp); strxcpy(str, tmp.c_str(), maxlen); return str; }
inline char* MakeAttrStr(char* str, size_t maxlen, const Attr* attr) { std::string tmp; attr->make_string(tmp); strxcpy(str, tmp.c_str(), maxlen); return str; }
// ------------------------------------------------------------------

View File

@@ -74,7 +74,7 @@ void gsearch::set_pattern(const char* a) {
// ------------------------------------------------------------------
bool gsearch::search(const string& str) {
bool gsearch::search(const std::string& str) {
int discard_result;
return search(str, discard_result);
@@ -83,7 +83,7 @@ bool gsearch::search(const string& str) {
// ------------------------------------------------------------------
bool gsearch::search(const string& str, int& result) {
bool gsearch::search(const std::string& str, int& result) {
return search(str.c_str(), result);
}

View File

@@ -62,8 +62,8 @@ protected:
public:
// Configuration
string id;
string pattern;
std::string id;
std::string pattern;
patterntype type;
bool case_sensitive;
bool reverse;
@@ -90,9 +90,9 @@ public:
// Search a string for the pattern.
// Return true for success, false for failure.
bool search(const char* string);
bool search(const string& str);
bool search(const std::string& str);
bool search(const char* str, int& result);
bool search(const string& str, int& result);
bool search(const std::string& str, int& result);
gsearch& operator=(const gsearch& a);

View File

@@ -120,7 +120,7 @@ public:
areas_all
};
vector<search_item> items;
std::vector<search_item> items;
search_direction direction;
search_messages messages;

View File

@@ -37,7 +37,6 @@
#include <cstring>
#include <gdefs.h>
// ------------------------------------------------------------------
#if defined(__EMX__)
@@ -70,7 +69,7 @@ char* strshr(char* str, int count);
char* strsrep(char* str, const char* search, const char* replace);
char* strltrim(char* str);
char* strtrim(char* str);
string& strtrim(string& p);
std::string& strtrim(std::string& p);
char* struplow(char* str);
char* longdotstr(long num); // Convert a long to a dotted string: xxx.xxx.xxx.xxx

View File

@@ -39,7 +39,7 @@
// ------------------------------------------------------------------
typedef vector<string> gstrarray;
typedef std::vector<std::string> gstrarray;
// ------------------------------------------------------------------

View File

@@ -451,10 +451,10 @@ char* strtrim(char* p) {
}
string& strtrim(string& p) {
std::string& strtrim(std::string& p) {
if(not p.empty()) {
string::iterator trail = p.end();
std::string::iterator trail = p.end();
while(trail != p.begin() and *(--trail) < '!') {}
if(*trail > ' ') trail++;
p.erase(trail, p.end());

View File

@@ -35,6 +35,7 @@
#include <cstddef>
#include <gdefs.h>
#ifdef __UNIX__
#include <unistd.h>
#include <sys/times.h>
#endif
#ifdef __OS2__
@@ -129,7 +130,7 @@ inline void usleep(long duration) { Sleep(duration); }
#endif
#ifdef __UNIX__
inline Clock gclock() { struct tms z; return Clock(times(&z)*10/CLK_TCK); }
inline Clock gclock() { struct tms z; return Clock(times(&z)*10/sysconf(_SC_CLK_TCK)); }
#else
inline Clock gclock() { return Clock(clock()*10/CLK_TCK); }
#endif

View File

@@ -50,7 +50,7 @@ Grp::Grp() {
Grp::~Grp() {
multimap<int, grp_stock>::iterator i;
std::multimap<int, grp_stock>::iterator i;
for(currgrp = container.begin(); currgrp != container.end(); currgrp++)
for(i = currgrp->second.begin(); i != currgrp->second.end(); i++) {
if(i->second.type == TYPE_OBJECT)
@@ -66,10 +66,10 @@ Grp::~Grp() {
void Grp::AddGrp(const char* id) {
string sid(id);
multimap<int, grp_stock> m;
m.insert(pair<int, grp_stock>(GRP_MEMBER, sid));
container.push_back(pair<string, multimap<int, grp_stock> >(sid, m));
std::string sid(id);
std::multimap<int, grp_stock> m;
m.insert(std::pair<int, grp_stock>(GRP_MEMBER, sid));
container.push_back(std::pair<std::string, std::multimap<int, grp_stock> >(sid, m));
currgrp = container.end()-1;
currgrpno = container.size()-1;
}
@@ -80,7 +80,7 @@ void Grp::AddGrp(const char* id) {
void Grp::AddMbr(const char* id) {
currgrp->second.insert(pair<int, grp_stock>(GRP_MEMBER, string(id)));
currgrp->second.insert(std::pair<int, grp_stock>(GRP_MEMBER, std::string(id)));
}
@@ -88,7 +88,7 @@ void Grp::AddMbr(const char* id) {
const char* Grp::SetGrp(const char* id) {
multimap<int, grp_stock>::iterator i;
std::multimap<int, grp_stock>::iterator i;
for(currgrp = container.begin(), currgrpno = 0; currgrp != container.end(); currgrp++, currgrpno++)
for(i = currgrp->second.find(GRP_MEMBER); (i != currgrp->second.end()) and (i->first == GRP_MEMBER); i++)
if(strwild(id, i->second.data.string_item->c_str()))
@@ -102,7 +102,7 @@ const char* Grp::SetGrp(const char* id) {
void Grp::AddItm(int __type, bool __data) {
currgrp->second.insert(pair<int, grp_stock>(__type, __data));
currgrp->second.insert(std::pair<int, grp_stock>(__type, __data));
}
@@ -110,7 +110,7 @@ void Grp::AddItm(int __type, bool __data) {
void Grp::AddItm(int __type, char __data) {
currgrp->second.insert(pair<int, grp_stock>(__type, __data));
currgrp->second.insert(std::pair<int, grp_stock>(__type, __data));
}
@@ -118,15 +118,15 @@ void Grp::AddItm(int __type, char __data) {
void Grp::AddItm(int __type, int __data) {
currgrp->second.insert(pair<int, grp_stock>(__type, __data));
currgrp->second.insert(std::pair<int, grp_stock>(__type, __data));
}
// ------------------------------------------------------------------
void Grp::AddItm(int __type, const string& __data) {
void Grp::AddItm(int __type, const std::string& __data) {
currgrp->second.insert(pair<int, grp_stock>(__type, __data));
currgrp->second.insert(std::pair<int, grp_stock>(__type, __data));
}
@@ -137,7 +137,7 @@ void Grp::AddItm(int __type, void* __data, int __size) {
void *data = throw_malloc(__size+sizeof(int));
*((int *)data) = __size;
memcpy((char *)data+sizeof(int), __data, __size);
currgrp->second.insert(pair<int, grp_stock>(__type, data));
currgrp->second.insert(std::pair<int, grp_stock>(__type, data));
}
@@ -155,7 +155,7 @@ int Grp::GetItm(int __type, bool& __data, int __no) {
if(rv) {
if((__no >= rv) or (__no == -1))
__no = rand() % rv;
multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
std::multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
while(__no--) i++;
__data = i->second.data.bool_item;
}
@@ -179,7 +179,7 @@ int Grp::GetItm(int __type, char& __data, int __no) {
if(rv) {
if((__no >= rv) or (__no == -1))
__no = rand() % rv;
multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
std::multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
while(__no--) i++;
__data = i->second.data.char_item;
}
@@ -203,7 +203,7 @@ int Grp::GetItm(int __type, int& __data, int __no) {
if(rv) {
if((__no >= rv) or (__no == -1))
__no = rand() % rv;
multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
std::multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
while(__no--) i++;
__data = i->second.data.int_item;
}
@@ -215,7 +215,7 @@ int Grp::GetItm(int __type, int& __data, int __no) {
// ------------------------------------------------------------------
int Grp::GetItm(int __type, string& __data, int __no) {
int Grp::GetItm(int __type, std::string& __data, int __no) {
// Return error if a current group is not set
if(currgrpno == -1)
@@ -227,7 +227,7 @@ int Grp::GetItm(int __type, string& __data, int __no) {
if(rv) {
if((__no >= rv) or (__no == -1))
__no = rand() % rv;
multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
std::multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
while(__no--) i++;
__data = *(i->second.data.string_item);
}
@@ -251,7 +251,7 @@ int Grp::GetItm(int __type, void* __data, int __size, int __no) {
if(rv) {
if((__no >= rv) or (__no == -1))
__no = rand() % rv;
multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
std::multimap<int, grp_stock>::iterator i = currgrp->second.find(__type);
while(__no--) i++;
void *data = i->second.data.object_item;
int local_size = *((int *)data);

View File

@@ -132,19 +132,19 @@ private:
bool bool_item;
char char_item;
int int_item;
string *string_item;
std::string *string_item;
void *object_item;
} data;
grp_stock(bool item) { type = TYPE_BOOL; data.bool_item = item; }
grp_stock(char item) { type = TYPE_CHAR; data.char_item = item; }
grp_stock(int item) { type = TYPE_INT; data.int_item = item; }
grp_stock(const string& item) { type = TYPE_STRING; data.string_item = new string(item); throw_new(data.string_item); }
grp_stock(const std::string& item) { type = TYPE_STRING; data.string_item = new std::string(item); throw_new(data.string_item); }
grp_stock(void *item) { type = TYPE_OBJECT; data.object_item = item; }
};
vector< pair<string, multimap<int, grp_stock> > > container;
vector< pair<string, multimap<int, grp_stock> > >::iterator currgrp;
std::vector< std::pair<std::string, std::multimap<int, grp_stock> > > container;
std::vector< std::pair<std::string, std::multimap<int, grp_stock> > >::iterator currgrp;
public:
@@ -160,13 +160,13 @@ public:
void AddItm(int __type, bool __data);
void AddItm(int __type, char __data);
void AddItm(int __type, int __data);
void AddItm(int __type, const string& __data);
void AddItm(int __type, const std::string& __data);
void AddItm(int __type, void* __data, int __size);
int GetItm(int __type, bool& __data, int __no=-1);
int GetItm(int __type, char& __data, int __no=-1);
int GetItm(int __type, int& __data, int __no=-1);
int GetItm(int __type, string& __data, int __no=-1);
int GetItm(int __type, std::string& __data, int __no=-1);
int GetItm(int __type, void* __data, int __size, int __no=-1);
};

View File

@@ -369,7 +369,7 @@ int wmove (int nsrow, int nscol);
int wopen (int srow, int scol, int erow, int ecol, int btype, int battr, int wattr, int sbattr=-1, int loattr=-1);
inline int wopen_ (int srow, int scol, int vlen, int hlen, int btype, int battr, int wattr, int sbattr=-1, int loattr=-1) { return wopen(srow, scol, srow+vlen-1, scol+hlen-1, btype, battr, wattr, sbattr, loattr); }
int wperror (const char* message);
bool wpickfile (int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, string &filespec, VfvCP open, bool casesens=false);
bool wpickfile (int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, VfvCP open, bool casesens=false);
int wpickstr (int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, char* strarr[], int initelem, VfvCP open);
int wprintc (int wrow, int wcol, int attr, vchar ch);
int wprintf (const char* format, ...) __attribute__ ((format (printf, 1, 2)));

View File

@@ -198,7 +198,7 @@ public:
void printc(int row, int col, int color, vchar ch);
void prints(int row, int col, int color, const char* text);
void printvs(int row, int col, int color, const vchar* text);
void prints(int row, int col, int color, const string& text);
void prints(int row, int col, int color, const std::string& text);
void printns(int row, int col, int color, const char* text, int len, vchar fill=' ', int fill_color=-1);
int printf(const char* format, ...) __attribute__ ((format (printf, 2, 3)));
@@ -562,7 +562,7 @@ inline void gwindow::printvs(int row, int col, int color, const vchar* text) {
// ------------------------------------------------------------------
inline void gwindow::prints(int row, int col, int color, const string& text) {
inline void gwindow::prints(int row, int col, int color, const std::string& text) {
prints(row, col, color, text.c_str());
}

View File

@@ -118,7 +118,7 @@ static void pre_exit(char** p, int numelems) {
// ------------------------------------------------------------------
bool wpickfile(int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, string &filespec, VfvCP open, bool casesens) {
bool wpickfile(int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, VfvCP open, bool casesens) {
Path cwd, dir, namext, tcwd, path, spec;

View File

@@ -59,7 +59,7 @@ public:
int buf_pos;
int buf_len;
string& destination;
std::string& destination;
int id;
int row;
@@ -71,7 +71,7 @@ public:
field* prev;
field* next;
field(gwinput* iform, int idnum, int wrow, int wcol, int field_width, string& dest, int dest_size, int cvt, int mode);
field(gwinput* iform, int idnum, int wrow, int wcol, int field_width, std::string& dest, int dest_size, int cvt, int mode);
~field();
bool visible();
@@ -148,7 +148,7 @@ public:
void setup(int i_attr, int a_attr, int e_attr, vchar fill, bool fill_acs);
void add_field(int idnum, int wrow, int wcol, int field_width, string& dest, int dest_size, int cvt=gwinput::cvt_none, int mode=gwinput::entry_conditional);
void add_field(int idnum, int wrow, int wcol, int field_width, std::string& dest, int dest_size, int cvt=gwinput::cvt_none, int mode=gwinput::entry_conditional);
bool first(int id=0);
bool next();

View File

@@ -101,7 +101,7 @@ void gwinput::after() {
// ------------------------------------------------------------------
void gwinput::add_field(int idnum, int wrow, int wcol, int field_width, string& dest, int dest_size, int cvt, int mode) {
void gwinput::add_field(int idnum, int wrow, int wcol, int field_width, std::string& dest, int dest_size, int cvt, int mode) {
field* fld = new field(this, idnum, wrow, wcol, field_width, dest, dest_size, cvt, mode);
throw_new(fld);
@@ -618,7 +618,7 @@ bool gwinput::handle_key(gkey key) {
// ------------------------------------------------------------------
gwinput::field::field(gwinput* iform, int idnum, int wrow, int wcol, int field_width, string& dest, int dest_size, int cvt, int mode)
gwinput::field::field(gwinput* iform, int idnum, int wrow, int wcol, int field_width, std::string& dest, int dest_size, int cvt, int mode)
: destination(dest)

View File

@@ -254,7 +254,7 @@ void gareafile::GetAreasBBS(char* name, char* origin, char* options) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << areafile << endl;
std::cout << "* Reading " << areafile << std::endl;
bool firstline = true;

View File

@@ -110,7 +110,7 @@ public:
byte pmscanexcl : 1; // TRUE if listed with AREAPMSCANEXCL
byte pmscanincl : 1; // TRUE if listed with AREAPMSCANINCL
int setorigin(string& origin);
int setorigin(std::string& origin);
bool isfts1() const { return !!(msgbase & GMB_FTS1); }
bool isopus() const { return !!(msgbase & GMB_OPUS); }
@@ -146,10 +146,10 @@ public:
static int autoid;
Echo echoid; // Echo tag
Desc desc; // Area description
Path path; // Path to message area
string origin; // Origin
Echo echoid; // Echo tag
Desc desc; // Area description
Path path; // Path to message area
std::string origin; // Origin
AreaCfg() { reset(); }
~AreaCfg() { }
@@ -265,7 +265,7 @@ protected:
void ReadFMail116(FILE* fp, char* path, char* file, char* options);
#endif
#ifndef GCFG_NOFIDOCONF
bool ReadHPTLine(FILE* f, string* s, bool add=false, int state=0);
bool ReadHPTLine(FILE* f, std::string* s, bool add=false, int state=0);
void ReadHPTFile(char* path, char* file, char* options, char* origin, int group);
#endif
#ifndef GCFG_NOIMAIL

View File

@@ -96,7 +96,7 @@ void gareafile::ReadCrashmail(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
char buf[4000];
char key[30];

View File

@@ -51,14 +51,14 @@ void gareafile::ReadDB130(char* tag, char* dbpath) {
setvbuf(fp1, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file1 << endl;
std::cout << "* Reading " << file1 << std::endl;
fp2 = fsopen(file2, "rb", sharemode);
if(fp2) {
setvbuf(fp2, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file2 << endl;
std::cout << "* Reading " << file2 << std::endl;
while(fread(&AA1, sizeof(DB130_AA1), 1, fp1) == 1) {
@@ -122,7 +122,7 @@ void gareafile::ReadDB1046(char* file, char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(ADF, sizeof(DB1046_ADF), 1, fp) == 1) {
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
@@ -185,7 +185,7 @@ void gareafile::ReadDB1047A22(char* file, int reclen, char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(ADF, reclen, 1, fp) == 1) {
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
@@ -249,7 +249,7 @@ void gareafile::ReadDB2011(char* file, int reclen, char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(ADF, reclen, 1, fp) == 1) {
if(ADF->allocated and strchr("QFqf", ADF->msgbase)) {
@@ -337,7 +337,7 @@ void gareafile::ReadDBridge(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
// Read netmail storage method etc
for(line=1; line <= 2; line++)

View File

@@ -67,7 +67,7 @@ void gareafile::ReadDutchie(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fgets(buf, 255, fp)) {

View File

@@ -51,7 +51,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(constant, sizeof(CONSTANTRECORD), 1, fp);
fclose(fp);
@@ -192,7 +192,7 @@ void gareafile::ReadEzycom102(FILE* fp, char* path, char* file, char* options) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
int record = 1;

View File

@@ -52,7 +52,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(constant, sizeof(CONSTANTRECORD), 1, fp);
fclose(fp);
@@ -193,7 +193,7 @@ void gareafile::ReadEzycom110(FILE* fp, char* path, char* file, char* options) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
int record = 1;
@@ -311,7 +311,7 @@ void gareafile::ReadEzycom(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
char _verstr[9];
fread(_verstr, 9, 1, fp);
@@ -320,7 +320,7 @@ void gareafile::ReadEzycom(char* tag) {
strp2c(_verstr);
if(strnicmp(_verstr, "1.02", 4) < 0) {
cout << "* Error: Ezycom v" << _verstr << " is not supported - Skipping." << endl;
std::cout << "* Error: Ezycom v" << _verstr << " is not supported - Skipping." << std::endl;
return;
}
else if(strnicmp(_verstr, "1.10", 4) >= 0)

View File

@@ -82,7 +82,7 @@ void gareafile::ReadFrontDoor(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(buf, 5, 1, fp);
if(streql(buf, "JoHo")) { // Check to see that it is v1.99b or higher
@@ -121,7 +121,7 @@ void gareafile::ReadFrontDoor(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(folder, sizeof(FD_Folder), 1, fp) == 1) {
behave = folder->behave;

View File

@@ -194,7 +194,7 @@ void gareafile::ReadFastecho(char* tag) {
if(fh != -1) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
read(fh, &revision, sizeof(revision));
lseek(fh, 0L, SEEK_SET); // rewind
@@ -206,7 +206,7 @@ void gareafile::ReadFastecho(char* tag) {
else if(revision == 6)
ReadFastecho142(fh);
else
cout << "* Error: FastEcho system file revision level " << revision << " is not supported - Skipping." << endl;
std::cout << "* Error: FastEcho system file revision level " << revision << " is not supported - Skipping." << std::endl;
close(fh);
}

View File

@@ -89,7 +89,7 @@ void gareafile::ReadFidoPCB(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
int areas = 0;
fparea* area = NULL;

View File

@@ -298,7 +298,7 @@ void gareafile::ReadFMail(char* tag) {
else if((ar_rev >= 0x0110) and (ar_rev < 0x0200))
ReadFMail116(fp, path, file, options);
else
cout << "* Error: Unknown FMail config revision " << setfill('0') << setw(4) << hex << ar_rev << "h - Skipping." << endl;
std::cout << "* Error: Unknown FMail config revision " << std::setfill('0') << std::setw(4) << std::hex << ar_rev << "h - Skipping." << std::endl;
}
}
}

View File

@@ -87,7 +87,7 @@ void gareafile::ReadGEcho(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(&sysrev, sizeof(word), 1, fp);
rewind(fp);
@@ -110,10 +110,10 @@ void gareafile::ReadGEcho(char* tag) {
if(ge_version >= 102) {
_fidomsgtype = (gesetup->extraoptions & OPUSDATES) ? GMB_OPUS : GMB_FTS1;
if((_fidomsgtype == GMB_FTS1) and (fidomsgtype == GMB_OPUS)) {
cout <<
"* Warning - FTS-1 format is used for *.MSG. For better compatibility set this" << endl <<
"* in GSETUP: Miscellanous->GEcho Options->MSG compatibilty = Opus (not Fido)." << endl <<
"* To disable this warning, set FIDOMSGTYPE FTS1 in your GoldED setup." << endl;
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;
}
}
@@ -335,7 +335,7 @@ void gareafile::ReadGEcho(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(&ahdr, sizeof(AREAFILE_HDR), 1, fp);
uint arearecsize = (ahdr.maxconnections * sizeof(CONNECTION)) + ahdr.recsize;
@@ -436,7 +436,7 @@ void gareafile::ReadGEcho(char* tag) {
}
}
else
cout << "* Error: GEcho system file revision level " << sysrev << " is not supported - Skipping." << endl;
std::cout << "* Error: GEcho system file revision level " << sysrev << " is not supported - Skipping." << std::endl;
}
throw_free(gesetup);
}

View File

@@ -39,9 +39,9 @@ static bool comment_char = '#';
// ------------------------------------------------------------------
bool gareafile::ReadHPTLine(FILE* f, string* s, bool add, int state) {
bool gareafile::ReadHPTLine(FILE* f, std::string* s, bool add, int state) {
string str;
std::string str;
char buf[81];
if(fgets(buf, 81, f) == NULL)
@@ -57,7 +57,7 @@ bool gareafile::ReadHPTLine(FILE* f, string* s, bool add, int state) {
}
}
string::iterator ptr = str.begin();
std::string::iterator ptr = str.begin();
// state 0: normal state
// 1: between ""
@@ -99,7 +99,7 @@ bool gareafile::ReadHPTLine(FILE* f, string* s, bool add, int state) {
case ' ':
case '\t':
{
string::iterator i = ptr;
std::string::iterator i = ptr;
while((i != str.end()) and isspace(*i))
++i;
if(*i != '#')
@@ -262,11 +262,11 @@ void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin,
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
aa.reset();
string s;
std::string s;
while(ReadHPTLine(fp, &s)) {
if(not s.empty()) {
@@ -286,7 +286,7 @@ void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin,
int ver_maj, ver_min;
sscanf(val, "%d.%d", &ver_maj, &ver_min);
if((ver_maj != 0) and (ver_min != 15)) {
cout << "* Error: Unknown fidoconfig version " << ver_maj << '.' << ver_min << " - Skipping." << endl;
std::cout << "* Error: Unknown fidoconfig version " << ver_maj << '.' << ver_min << " - Skipping." << std::endl;
throw_xfree(alptr);
goto skip_config;
}

View File

@@ -47,7 +47,7 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(CF, sizeof(im_config_type), 1, fp);
fclose(fp);
@@ -75,7 +75,7 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(&AR, sizeof(areas_record_type), 1, fp) == 1) {
@@ -105,7 +105,7 @@ void gareafile::ReadIMail160(char* options, char* file, char* impath) {
if((AR.brd >= 1) and (AR.brd <= 200))
aa.board = AR.brd;
else {
cout << "* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << endl;
std::cout << "* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << std::endl;
continue;
}
break;

View File

@@ -57,7 +57,7 @@ void gareafile::ReadIMail170(char* options, char* file, char* impath) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(CF, sizeof(im_config_type), 1, fp);
fclose(fp);
@@ -85,7 +85,7 @@ void gareafile::ReadIMail170(char* options, char* file, char* impath) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(&AR, sizeof(areas_record_type), 1, fp) == 1) {
@@ -115,7 +115,7 @@ void gareafile::ReadIMail170(char* options, char* file, char* impath) {
if((AR.brd >= 1) and (AR.brd <= 200))
aa.board = AR.brd;
else {
cout << "* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << endl;
std::cout << "* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << std::endl;
continue;
}
break;

View File

@@ -57,7 +57,7 @@ void gareafile::ReadIMail185(char* options, char* file, char* impath) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(CF, sizeof(im_config_type), 1, fp);
fclose(fp);
@@ -85,7 +85,7 @@ void gareafile::ReadIMail185(char* options, char* file, char* impath) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(&AR, sizeof(mail_area_type), 1, fp) == 1) {
@@ -115,7 +115,7 @@ void gareafile::ReadIMail185(char* options, char* file, char* impath) {
if((AR.brd >= 1) and (AR.brd <= 200))
aa.board = AR.brd;
else {
cout << "* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << endl;
std::cout << "* Warning: Invalid board " << AR.brd << " (" << AR.aname << ") in IMAIL.AR - Skipping." << std::endl;
continue;
}
break;
@@ -218,7 +218,7 @@ void gareafile::ReadIMail(char* tag) {
#endif
}
}
cout << "* Error: IMAIL " << imver[0] << '.' << setfill('0') << setw(2) << imver[1] << " (structure revision " << imstructver[0] << '.' << setfill('0') << setw(2) << imstructver[1] << ") is not supported - Skipping." << endl;
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;
}
}

View File

@@ -68,7 +68,7 @@ void gareafile::ReadInterMail(char* tag) {
_ctl* ctl = (_ctl*)throw_calloc(1, sizeof(_ctl));
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
fp.fread(ctl, sizeof(_ctl));
@@ -135,7 +135,7 @@ void gareafile::ReadInterMail(char* tag) {
if(fp.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
FOLDER* _folder = (FOLDER*)throw_calloc(1, sizeof(FOLDER));
@@ -179,7 +179,7 @@ void gareafile::ReadInterMail(char* tag) {
if(fp.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
OLDFOLDER* _folder = (OLDFOLDER*)throw_calloc(1, sizeof(OLDFOLDER));
@@ -213,7 +213,7 @@ void gareafile::ReadInterMail(char* tag) {
}
}
else {
cout << "* Error: InterMail revision " << setfill('0') << setw(4) << hex << ctl->sysrev << "h is not supported - Skipping." << endl;
std::cout << "* Error: InterMail revision " << std::setfill('0') << std::setw(4) << std::hex << ctl->sysrev << "h is not supported - Skipping." << std::endl;
}
throw_free(ctl);
}

View File

@@ -68,7 +68,7 @@ void gareafile::ReadLoraBBS(char* tag) {
if(fp.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
_configuration* cfg = (_configuration*)throw_calloc(1, sizeof(_configuration));
fp.fread(cfg, sizeof(_configuration));
@@ -135,7 +135,7 @@ void gareafile::ReadLoraBBS(char* tag) {
fp.setvbuf(NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
_sysmsg* sysmsg = (_sysmsg*)throw_calloc(1, sizeof(_sysmsg));

View File

@@ -49,7 +49,7 @@ void gareafile::ReadMaximus3(char* mxpath, char* areafile, char* options) {
if(fp) {
if(not quiet)
cout << "* Reading " << areafile << endl;
std::cout << "* Reading " << areafile << std::endl;
m_pointers* prmp = (m_pointers*)throw_calloc(1, sizeof(m_pointers));
m_pointers& prm = *prmp;
@@ -71,7 +71,7 @@ void gareafile::ReadMaximus3(char* mxpath, char* areafile, char* options) {
setvbuf(fp, NULL, _IOFBF, 32000);
if(not quiet)
cout << "* Reading " << areafile << endl;
std::cout << "* Reading " << areafile << std::endl;
long areasize = fsize(fp)-4;

View File

@@ -60,7 +60,7 @@ void gareafile::ReadME2(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fgets(buf, 255, fp)) {

View File

@@ -79,7 +79,7 @@ void gareafile::ReadOpus(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(&msgsys, sizeof(_msgsys), 1, fp) == 1) {
@@ -135,7 +135,7 @@ void gareafile::ReadOpus(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(&sysdat, sizeof(_systemdat), 1, fp);
if(*sysdat.msgpath and *sysdat.msgtitle) {

View File

@@ -86,7 +86,7 @@ void gareafile::ReadPCBoard(char* tag) {
if(fp.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
int _line = 0;
@@ -117,7 +117,7 @@ void gareafile::ReadPCBoard(char* tag) {
if(fp.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
// Get configuration file version
fp.fread(&fido_version, 2);
@@ -163,7 +163,7 @@ void gareafile::ReadPCBoard(char* tag) {
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
word cfgver = 0;
fp.fread(&cfgver, 2);
if(cfgver == 3) {
@@ -179,7 +179,7 @@ void gareafile::ReadPCBoard(char* tag) {
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
word cfgver = 0;
fp.fread(&cfgver, 2);
if(cfgver == 3) {
@@ -201,7 +201,7 @@ void gareafile::ReadPCBoard(char* tag) {
fp.fopen(_file, "rb");
if(fp.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
word cfgver = 0;
fp.fread(&cfgver, 2);
if(cfgver == 3) {
@@ -249,7 +249,7 @@ void gareafile::ReadPCBoard(char* tag) {
if(fp.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
gfile fp2;
_file = AddPath(_cnamespath, ".add");
@@ -257,7 +257,7 @@ void gareafile::ReadPCBoard(char* tag) {
if(fp2.isopen()) {
if(not quiet)
cout << "* Reading " << _file << endl;
std::cout << "* Reading " << _file << std::endl;
word _recsize = 0;
fp.fread(&_recsize, 2);

View File

@@ -65,7 +65,7 @@ void gareafile::ReadProBoard(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(cfg, sizeof(Config), 1, fp);
@@ -81,7 +81,7 @@ void gareafile::ReadProBoard(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(aka, akasz, 1, fp);
fclose(fp);
@@ -95,7 +95,7 @@ void gareafile::ReadProBoard(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(area, sizeof(MsgAreas), 1, fp) == 1) {
aa.reset();

View File

@@ -43,7 +43,7 @@ void gareafile::ReadQEchoFile(char* file, char* options, char* origin) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fgets(buf, sizeof(buf), fp)) {

View File

@@ -64,7 +64,7 @@ void gareafile::ReadQFront(char* tag) {
fp = fsopen(file, "rb", sharemode);
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(origin, sizeof(OriginLineRecord), 1, fp);
for(int n=0; n<MaxOrigins; n++)
STRNP2C(origin->OriginLine[n]);
@@ -79,7 +79,7 @@ void gareafile::ReadQFront(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
while(fread(area, sizeof(EchoMailConferenceRecord), 1, fp) == 1) {
if(not area->Deleted) {

View File

@@ -53,7 +53,7 @@ void gareafile::ReadQ260(char* qbpath, char* origin, char* options) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(cfg, sizeof(Q260CfgRecT), 1, fp);
@@ -141,7 +141,7 @@ void gareafile::ReadQ276(char* qbpath, char* origin, char* options) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(cfg, sizeof(Q276CfgRecT), 1, fp);
@@ -157,7 +157,7 @@ void gareafile::ReadQ276(char* qbpath, char* origin, char* options) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
int _recs = (int)(filelength(fileno(fp)) / sizeof(Q276BrdRecT));
int _fmt = (_recs > 200) ? GMB_GOLDBASE : GMB_HUDSON;

View File

@@ -75,7 +75,7 @@ void gareafile::ReadRemoteAccess(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(config, sizeof(CONFIGrecord), 1, fp);
fclose(fp);
@@ -98,7 +98,7 @@ void gareafile::ReadRemoteAccess(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
if(config->VersionID >= 0x200) {
MESSAGErecord* area = new MESSAGErecord; throw_new(area);

View File

@@ -76,7 +76,7 @@ void gareafile::ReadRaEcho(char* tag) {
}
if(raever == 0) {
if(not quiet)
cout << "* Could not determine version of RA-ECHO - skipping." << endl;
std::cout << "* Could not determine version of RA-ECHO - skipping." << std::endl;
return;
}
@@ -86,7 +86,7 @@ void gareafile::ReadRaEcho(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
areano = 1;
while(fread(&area, raever, 1, fp) == 1) {

View File

@@ -54,7 +54,7 @@ void gareafile::ReadSquishFile(char* path, char* file, char* options, char* orig
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
aa.reset();

View File

@@ -76,7 +76,7 @@ void gareafile::ReadSuperBBS(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(config, sizeof(ConfigRecordT), 1, fp);
STRNP2C(config->OriginLine);
@@ -87,7 +87,7 @@ void gareafile::ReadSuperBBS(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(sconfig, sizeof(ExtraConfigT), 1, fp);
fclose(fp);
@@ -103,7 +103,7 @@ void gareafile::ReadSuperBBS(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
for(int n=0; n<200; n++) {
@@ -171,8 +171,8 @@ void gareafile::ReadSuperBBS(char* tag) {
}
}
else {
cout << "* Error: Unsupported version of SuperBBS: " <<
(word)(sconfig->VersionNumber >> 8) << '.' << (word)(sconfig->VersionNumber & 0xFF) << endl;
std::cout << "* Error: Unsupported version of SuperBBS: " <<
(word)(sconfig->VersionNumber >> 8) << '.' << (word)(sconfig->VersionNumber & 0xFF) << std::endl;
}
}
}

View File

@@ -74,7 +74,7 @@ void gareafile::ReadTimedFile(char* path, char* file, char* options, char* origi
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
aa.reset();

View File

@@ -51,7 +51,7 @@ void gareafile::ReadTmailFile(char* file, char* options, char* origin) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
aa.reset();

View File

@@ -81,7 +81,7 @@ void gareafile::ReadTosScan(char* tag) {
if(fp) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(buf, 5, 1, fp);
if(streql(buf, "JoHo")) { // Check to see that it is v1.99b or higher
@@ -115,7 +115,7 @@ void gareafile::ReadTosScan(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fseek(fp, 4L, SEEK_SET); // Skip CRC32

View File

@@ -72,7 +72,7 @@ void gareafile::ReadWMail(char* tag) {
if(fh != -1) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
read(fh, wmprm, sizeof(TWmailPrm));
@@ -127,7 +127,7 @@ void gareafile::ReadWMail(char* tag) {
if(fh != -1) {
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
// All the echomail areas
while(read(fh, arprm, sizeof(TAreasPrm)) == sizeof(TAreasPrm)) {

View File

@@ -108,7 +108,7 @@ void gareafile::ReadWtrGteFile(char* options, FILE* fp) {
char header[26];
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(header, 26, 1, fp2);
strp2c(header);
@@ -145,7 +145,7 @@ void gareafile::ReadWtrGteFile(char* options, FILE* fp) {
throw_delete(ar);
}
else
cout << "* Error: WaterGate Areabase \"" << header << "\" is not supported - Skipping." << endl;
std::cout << "* Error: WaterGate Areabase \"" << header << "\" is not supported - Skipping." << std::endl;
fclose(fp2);
}
@@ -187,13 +187,13 @@ void gareafile::ReadWtrGte(char* tag) {
if(fp) {
char header[26];
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
fread(header, 26, 1, fp); strp2c(header);
if(streql(header, ConfigHeader))
ReadWtrGteFile(options, fp);
else
cout << "* Error: WaterGate \"" << header << "\" is not supported - Skipping." << endl;
std::cout << "* Error: WaterGate \"" << header << "\" is not supported - Skipping." << std::endl;
fclose(fp);
}

View File

@@ -59,7 +59,7 @@ void gareafile::ReadAdeptXbbsFile(char* path, char* file, char* options) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
aa.reset();

View File

@@ -81,7 +81,7 @@ void gareafile::ReadxMailFile(char* file, char* options) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
aa.reset();
@@ -166,7 +166,7 @@ void gareafile::ReadXMail(char* tag) {
setvbuf(fp, NULL, _IOFBF, 8192);
if(not quiet)
cout << "* Reading " << file << endl;
std::cout << "* Reading " << file << std::endl;
areano = 1;
while(fread(&area, sizeof(EchoAreaRec), 1, fp) == 1) {

View File

@@ -143,7 +143,7 @@ public:
int color; // Line color
uint type; // GLINE_*
uint kludge; // GKLUD_*
string txt; // The line text
std::string txt; // The line text
Line* prev; // Pointer to previous line
Line* next; // Pointer to next line

View File

@@ -106,7 +106,7 @@ public:
void set_aka(ftn_addr& a) { cfg.aka = a; }
void set_originno(int o) { cfg.originno = o; }
void set_attr(Attr& a) { cfg.attr = a; }
void set_origin(char* o) { string tmp = o; cfg.setorigin(tmp); }
void set_origin(char* o) { std::string tmp = o; cfg.setorigin(tmp); }
void set_scan(bool s) { cfg.scan = (byte)s; }
void set_scanexcl(bool s) { cfg.scanexcl = (byte)s; }

View File

@@ -195,7 +195,7 @@ void SquishArea::raw_scan(int __keep_index, int __scanpm) {
// Scan for personal mail
if(__scanpm) {
int umax = (WidePersonalmail & PM_ALLNAMES) ? WideUsernames : 1;
vector<dword> uhash;
std::vector<dword> uhash;
for(int uh=0; uh<umax; uh++)
uhash.push_back(strHash32(WideUsername[uh]));
PMrk->Reset();