Added archived echoes support

This commit is contained in:
Alexander S. Aganichev
2001-12-17 15:44:55 +00:00
parent f8a2159f0a
commit 4d4f620053
23 changed files with 265 additions and 17 deletions

View File

@@ -115,14 +115,15 @@ const gdirentry *gposixdir::nextentry(const char *mask, bool nameonly)
}
ret.name = entries[last_entry];
ret.dirname = dirname.c_str();
std::string pn = ret.dirname;
pn += "/";
pn += ret.name;
size_t skipfrom;
while((skipfrom=pn.find("//")) != pn.npos)
pn.erase(skipfrom, 1);
if(!nameonly)
if(!nameonly) {
std::string pn = ret.dirname;
pn += "/";
pn += ret.name;
size_t skipfrom;
while((skipfrom=pn.find("//")) != pn.npos)
pn.erase(skipfrom, 1);
stat(pn.c_str(), &ret.stat_info);
}
++last_entry;
return &ret;
}

View File

@@ -81,6 +81,8 @@ void ftn_attr::add(const ftn_attr& b) {
if(b.nok()) nok1();
if(b.fax()) fax1();
if(b.prn()) prn1();
if(b.pkd()) pkd1();
}
@@ -188,6 +190,7 @@ void ftn_attr::get(const std::string& __s) {
if(striinc("NOK", s)) nok1();
if(striinc("FAX", s)) fax1();
if(striinc("PRN", s)) prn1();
if(striinc("PKD", s)) pkd1();
}

View File

@@ -114,6 +114,8 @@ const ulong GATTR_FWD = 0x02000000UL; // forwarded (wildcat)
const ulong GATTR_EFL = 0x04000000UL; // echoflag (wildcat)
const ulong GATTR_HRP = 0x08000000UL; // has replies (wildcat)
const ulong GATTR_PKD = 0x10000000UL; // Archived
class ftn_attr {
protected:
@@ -219,6 +221,8 @@ public:
int efl() const { return (attr2 & GATTR_EFL) != 0; }
int hrp() const { return (attr2 & GATTR_HRP) != 0; }
int pkd() const { return (attr2 & GATTR_PKD) != 0; }
// ----------------------------------------------------------------
void pvt(ulong x) { if(x) attr1 |= GATTR_PVT; else attr1 &= ~GATTR_PVT; }
@@ -296,6 +300,8 @@ public:
void efl(ulong x) { if(x) attr2 |= GATTR_EFL; else attr2 &= ~GATTR_EFL; }
void hrp(ulong x) { if(x) attr2 |= GATTR_HRP; else attr2 &= ~GATTR_HRP; }
void pkd(ulong x) { if(x) attr2 |= GATTR_PKD; else attr2 &= ~GATTR_PKD; }
// -------------------------------------------------------------
void pvt0() { attr1 &= ~GATTR_PVT; }
@@ -414,6 +420,8 @@ public:
void prn1() { attr2 |= GATTR_PRN; }
void pkd1() { attr2 |= GATTR_PKD; }
// ----------------------------------------------------------------
void pvtX() { attr1 ^= GATTR_PVT; }