Changed ulong type to uint32_t

This commit is contained in:
Ianos Gnatiuc 2005-10-20 21:41:32 +00:00
parent 44c26c3b0a
commit c5734978fa
42 changed files with 298 additions and 302 deletions

View File

@ -386,14 +386,14 @@ void CfgSeqOutRun_Error() {
void CfgSeqOutRun() {
char *p;
ulong s = 0;
uint32_t s = 0;
if(not isdigit((int)(*val))) {
CfgSeqOutRun_Error();
return;
}
s = (ulong)atol(val);
s = (uint32_t)atol(val);
p = val;
while(isdigit((int)(*p)))
p++;

View File

@ -550,7 +550,7 @@ enum {
// The Message Browser
struct MLst {
ulong msgno;
uint32_t msgno;
byte high;
char num[8];
char marks[3];

View File

@ -315,7 +315,7 @@ public:
Semaphore semaphore;
Path seqdir;
int seqmsgid;
ulong seqoutrun;
uint32_t seqoutrun;
int sharemode; // share;
bool showdeleted;
Path soundpath;

View File

@ -86,7 +86,7 @@ class gfileselect : public gwinpick {
void print_line(uint idx, uint pos, bool isbar);
void scroll(int where);
bool handle_key();
const char *gensize(ulong size);
const char *gensize(uint32_t size);
public:
@ -145,7 +145,7 @@ void gfileselect::do_delayed() {
#define KFIX(A) (int) (((A) * 1000.0 / 1024.0) / 10)
const char *gfileselect::gensize(ulong size) {
const char *gfileselect::gensize(uint32_t size) {
static char ret[16];

View File

@ -95,7 +95,7 @@ bool FindString(GMsg* msg, const char* prompt, int what) {
GFTRK("FindString");
static ulong lastfound = 0;
static uint32_t lastfound = 0;
bool result = false;
bool breakloop = true;
@ -107,7 +107,7 @@ bool FindString(GMsg* msg, const char* prompt, int what) {
lastfound = AA->Msgn.CvtReln(AA->lastread());
w_progress(MODE_NEW, C_INFOW, AA->lastread(), AA->Msgn.Count(), LNG->AdvancedSearch);
ulong tmpmsgno;
uint32_t tmpmsgno;
int margin = CFG->dispmargin-(int)CFG->switches.get(disppagebar);

View File

@ -118,8 +118,8 @@ void DispHeader(GMsg* msg, bool prn, FILE* fp, int width) {
// Generate message number and reply links string
char* ptr = buf1;
int list_max = msg->link.list_max();
ulong* replies = (ulong*)throw_calloc(list_max+1, sizeof(ulong));
ulong replyto, replynext;
uint32_t* replies = (uint32_t*)throw_calloc(list_max+1, sizeof(uint32_t));
uint32_t replyto, replynext;
if(CFG->switches.get(disprealmsgno)) {
ptr += sprintf(ptr, " %-5.5s: #%lu [%u]", LNG->Msg, msg->msgno, AA->Msgn.Count()+(msg->attr.nwm() ? 1 : 0));
replyto = msg->link.to();

View File

@ -48,7 +48,7 @@ void ResetMsg(GMsg* msg) {
// ------------------------------------------------------------------
int Area::LoadHdr(GMsg* msg, ulong msgno, bool enable_recode) {
int Area::LoadHdr(GMsg* msg, uint32_t msgno, bool enable_recode) {
ResetMsg(msg);
msg->msgno = msgno;
@ -87,7 +87,7 @@ int Area::LoadHdr(GMsg* msg, ulong msgno, bool enable_recode) {
// ------------------------------------------------------------------
int Area::LoadMsg(GMsg* msg, ulong msgno, int margin, int mode) {
int Area::LoadMsg(GMsg* msg, uint32_t msgno, int margin, int mode) {
ResetMsg(msg);
msg->msgno = msgno;

View File

@ -418,7 +418,7 @@ bool GMsgList::handle_key() {
case KK_ListMark:
{
ulong temp = AA->Mark.Find(mlst[index]->msgno);
uint32_t temp = AA->Mark.Find(mlst[index]->msgno);
if(not temp) {
AA->Mark.Add(mlst[index]->msgno);
update_marks(mlst[index]);
@ -432,7 +432,7 @@ bool GMsgList::handle_key() {
case KK_ListUnmark:
{
ulong temp = AA->Mark.Find(mlst[index]->msgno);
uint32_t temp = AA->Mark.Find(mlst[index]->msgno);
if(temp) {
AA->Mark.DelReln(temp);
update_marks(mlst[index]);
@ -446,7 +446,7 @@ bool GMsgList::handle_key() {
case KK_ListToggleMark:
{
ulong temp = AA->Mark.Find(mlst[index]->msgno);
uint32_t temp = AA->Mark.Find(mlst[index]->msgno);
if(temp) {
AA->Mark.DelReln(temp);
}
@ -667,12 +667,12 @@ void MessageBrowse() {
class ThreadEntry {
public:
ulong msgno;
ulong replyto;
ulong reply1st;
ulong replynext;
ulong replytoindex;
ulong level;
uint32_t msgno;
uint32_t replyto;
uint32_t reply1st;
uint32_t replynext;
uint32_t replytoindex;
uint32_t level;
};
#define MAX_LEVEL 20
@ -687,8 +687,8 @@ private:
ThreadEntry t;
void BuildThreadIndex(dword msgno);
void recursive_build(ulong msgn, ulong rn, ulong level);
void GenTree(char* buf2, int idx, ulong maxlev);
void recursive_build(uint32_t msgn, uint32_t rn, uint32_t level);
void GenTree(char* buf2, int idx, uint32_t maxlev);
void update_title();
bool NextThread(bool next);
@ -790,7 +790,7 @@ void GThreadlist::close() {
// ------------------------------------------------------------------
void GThreadlist::GenTree(char* buf, int idx, ulong maxlev) {
void GThreadlist::GenTree(char* buf, int idx, uint32_t maxlev) {
#ifdef KOI8
static char graph[4]="†„<EFBFBD>";
@ -841,7 +841,7 @@ void GThreadlist::GenTree(char* buf, int idx, ulong maxlev) {
void GThreadlist::print_line(uint idx, uint pos, bool isbar) {
char buf[256];
ulong maxlev = (100*window.width()+h_offset+1)/2;
uint32_t maxlev = (100*window.width()+h_offset+1)/2;
#if defined(__USE_ALLOCA__)
char *buf2 = (char*)alloca(maxlev*2+2);
#else
@ -950,9 +950,9 @@ void GThreadlist::print_line(uint idx, uint pos, bool isbar) {
// ------------------------------------------------------------------
void GThreadlist::recursive_build(ulong msgn, ulong rn, ulong level) {
void GThreadlist::recursive_build(uint32_t msgn, uint32_t rn, uint32_t level) {
ulong oldmsgno = msg.msgno;
uint32_t oldmsgno = msg.msgno;
if(AA->Msgn.ToReln(msgn) and AA->LoadHdr(&msg, msgn)) {
@ -1007,8 +1007,8 @@ void GThreadlist::BuildThreadIndex(dword msgn) {
AA->LoadHdr(&msg, msgn);
ulong msgno = msg.link.to();
ulong prevmsgno = msgn;
uint32_t msgno = msg.link.to();
uint32_t prevmsgno = msgn;
// Search backwards
while(AA->Msgn.ToReln(msgno)) {
@ -1136,7 +1136,7 @@ bool GThreadlist::handle_key() {
case KK_ListToggleMark:
{
ulong temp = AA->Mark.Find(list[index].msgno);
uint32_t temp = AA->Mark.Find(list[index].msgno);
if(temp) {
AA->Mark.DelReln(temp);
}

View File

@ -41,7 +41,7 @@ int NextMarkedmsg(int direction, GMsg* msg) {
if(tag.Count()) {
uint n;
ulong msgno = 0;
uint32_t msgno = 0;
if(direction == DIR_NEXT) {
if(msg->msgno != tag[tag.Count()-1]) {
for(n=0; n<tag.Count(); n++) {
@ -124,7 +124,7 @@ void MarkMsgs_Toggle() {
void MarkMsgs_All() {
AA->Mark.Resize(AA->Msgn.Count());
memcpy(AA->Mark.tag, AA->Msgn.tag, AA->Msgn.Count()*sizeof(ulong));
memcpy(AA->Mark.tag, AA->Msgn.tag, AA->Msgn.Count()*sizeof(uint32_t));
}
@ -134,7 +134,7 @@ void MarkMsgs_New() {
uint oldmarks = AA->Mark.Count();
AA->Mark.Resize(AA->Mark.Count()+(AA->Msgn.Count() - AA->lastread()));
memcpy(AA->Mark.tag+oldmarks, AA->Msgn.tag+AA->lastread(), (AA->Msgn.Count()-AA->lastread())*sizeof(ulong));
memcpy(AA->Mark.tag+oldmarks, AA->Msgn.tag+AA->lastread(), (AA->Msgn.Count()-AA->lastread())*sizeof(uint32_t));
AA->Mark.Sort();
AA->Mark.ElimDups();
}
@ -146,7 +146,7 @@ void MarkMsgs_Old() {
uint oldmarks = AA->Mark.Count();
AA->Mark.Resize(AA->Mark.Count() + (AA->lastread() - 1));
memcpy(AA->Mark.tag+oldmarks, AA->Msgn.tag, (AA->lastread()-1)*sizeof(ulong));
memcpy(AA->Mark.tag+oldmarks, AA->Msgn.tag, (AA->lastread()-1)*sizeof(uint32_t));
AA->Mark.Sort();
AA->Mark.ElimDups();
}
@ -218,7 +218,7 @@ void MarkMsgs_Txt(int item, char* markstring) {
// ------------------------------------------------------------------
static void recursive_mark(GMsg* msg, ulong msgno) {
static void recursive_mark(GMsg* msg, uint32_t msgno) {
int i;
gmsg_links templink;
@ -259,7 +259,7 @@ void MarkMsgs_Thread(GMsg* msg) {
AA->Mark.Add(msg->msgno);
ulong msgno = msg->link.to();
uint32_t msgno = msg->link.to();
while(AA->Msgn.ToReln(msgno)) { // Search backwards
AA->Mark.Add(msgno);

View File

@ -28,20 +28,20 @@
#include <genmsgid.h>
// ------------------------------------------------------------------
static ulong msgcount = 0;
static uint32_t msgcount = 0;
// ------------------------------------------------------------------
ulong getClassicMsgId() {
uint32_t getClassicMsgId() {
return gtime(NULL)+(msgcount++);
}
// ------------------------------------------------------------------
ulong getMsgId() {
uint32_t getMsgId() {
ulong id;
uint32_t id;
char *err;
if((CFG->seqmsgid == YES) or ((CFG->seqmsgid == MAYBE) and (*CFG->seqdir != NUL))) {

View File

@ -54,7 +54,7 @@ std::string &strtrimline(std::string &p) {
// ------------------------------------------------------------------
const char* get_subject_re_info(const char* s, ulong& n) {
const char* get_subject_re_info(const char* s, uint32_t& n) {
if(toupper(*s) == 'R' and tolower(s[1]) == 'e') {
@ -67,7 +67,7 @@ const char* get_subject_re_info(const char* s, ulong& n) {
while(isdigit(*d))
d++;
if(*d == ':') {
n = (ulong)atol(s + 3);
n = (uint32_t)atol(s + 3);
return d + 1;
}
}
@ -332,7 +332,7 @@ static void MakeMsg3(int& mode, GMsg* msg) {
}
AA->Close();
A->Open();
ulong oldmsgno = msg->msgno;
uint32_t oldmsgno = msg->msgno;
A->NewMsgno(msg);
A->SaveMsg(GMSG_NEW|GMSG_NOLSTUPD, msg);
A->Close();
@ -670,7 +670,7 @@ static void MakeMsg2(int& mode, int& status, int& forwstat, int& topline, GMsg*
// ------------------------------------------------------------------
static void GetLastLink(GMsg* msg, ulong& msgno) {
static void GetLastLink(GMsg* msg, uint32_t& msgno) {
GMsg* uplink = (GMsg*)throw_calloc(1, sizeof(GMsg));
@ -705,7 +705,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
GMsg* msg = (GMsg*)throw_calloc(1, sizeof(GMsg));
GMsg* reply = (GMsg*)throw_calloc(1, sizeof(GMsg));
GMsg* cmpmsg = (GMsg*)throw_calloc(1, sizeof(GMsg));
ulong reply_msgno = 0;
uint32_t reply_msgno = 0;
// Keep copy of original aka for later restoration
Addr origaka = AL.AreaIdToPtr(OrigArea)->aka();
@ -929,7 +929,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
if(AA->Replyre() or AA->isinternet()) {
ulong number;
uint32_t number;
const char* r = get_subject_re_info(msg->re, number);
if(r) {
if(AA->Replyre() == REPLYRE_NUMERIC and not AA->isinternet()) {
@ -945,7 +945,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
}
else {
char* r;
ulong number;
uint32_t number;
char* ptr = msg->re;
do {
r = (char*)get_subject_re_info(ptr, number);
@ -1140,7 +1140,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
if(CurrArea == OrigArea and (mode == MODE_QUOTE or mode == MODE_REPLYCOMMENT or mode == MODE_REPLY)) {
if(AA->Msgn.ToReln(reply_msgno)) {
if(AA->LoadHdr(reply, reply_msgno, false)) {
ulong replynext;
uint32_t replynext;
bool ok2save = false;
if(streql(AA->basetype(), "SQUISH")) {
if(reply->link.first()) {

View File

@ -281,7 +281,7 @@ int ExportQWK();
char* GetCurrQuotebuf(char* quotebuf);
int MsgIsTwit(GMsg* msg, bool& istwitto, bool& istwitsubj);
ulong MsgHasReplies(GMsg* msg);
uint32_t MsgHasReplies(GMsg* msg);
gkey ViewMessage(int istwit=NOT_TWIT);
int LoadMessage(GMsg* msg, int margin);
#ifdef OLD_STYLE_HEADER
@ -430,8 +430,8 @@ void edit_addressbook(GMsg* msg);
// ------------------------------------------------------------------
// GEMSGID prototypes
ulong getMsgId();
ulong getClassicMsgId();
uint32_t getMsgId();
uint32_t getClassicMsgId();
// ------------------------------------------------------------------

View File

@ -1045,7 +1045,7 @@ void Reader() {
// ------------------------------------------------------------------
// Determine if the message has replies
ulong MsgHasReplies(GMsg* msg) {
uint32_t MsgHasReplies(GMsg* msg) {
if(msg->link.first())
return msg->link.first();
@ -1277,7 +1277,7 @@ void ToggleMarkRead() {
void GotoBookMark() {
if(AA->bookmark) {
ulong temp = reader_msg->msgno;
uint32_t temp = reader_msg->msgno;
AA->set_lastread(AA->Msgn.ToReln(AA->bookmark));
AA->bookmark = temp;
}
@ -1397,7 +1397,7 @@ void GotoReplies() {
ReplySel* rlist = (ReplySel*)throw_calloc(list_max+3, sizeof(ReplySel));
for(int n=0; n<list_max+2; n++) {
ulong msgn = n ? ((n!=list_max+1) ? msg->link.list(n-1) : msg->link.next()) : msg->link.first();
uint32_t msgn = n ? ((n!=list_max+1) ? msg->link.list(n-1) : msg->link.next()) : msg->link.first();
uint reln = AA->Msgn.ToReln(msgn);
if(reln) {
if(CFG->replylinklist == REPLYLINKLIST_FULL)
@ -1408,7 +1408,7 @@ void GotoReplies() {
if((cursorbar == -1) and (0 == rmsg->timesread) and (CFG->switches.get(highlightunread)))
cursorbar = replies;
rlist[replies].msgno[0] = (n==list_max+1) ? '*' : '+';
ulong msgno = CFG->switches.get(disprealmsgno) ? msgn : reln;
uint32_t msgno = CFG->switches.get(disprealmsgno) ? msgn : reln;
sprintf(rlist[replies].msgno+1, "%lu", msgno);
maxmsgno = MaxV(maxmsgno, (uint)strlen(rlist[replies].msgno+1));
strcpy(rlist[replies].name, rmsg->by);

View File

@ -290,8 +290,8 @@ void GotoMsgno() {
char buf[150];
char* ptr = buf;
int list_max = reader_msg->link.list_max();
ulong* replies = (ulong*)throw_calloc(list_max+1, sizeof(ulong));
ulong replyto, replynext;
uint32_t* replies = (uint32_t*)throw_calloc(list_max+1, sizeof(uint32_t));
uint32_t replyto, replynext;
if(CFG->switches.get(disprealmsgno)) {
ptr += sprintf(ptr, " %-5.5s: %s %u", LNG->MsgReal, LNG->of, AA->Msgn.Count());
replyto = reader_msg->link.to();

View File

@ -59,9 +59,9 @@ struct gusrbaseentry {
char voicephone[40];
char faxphone[40];
ulong firstdate;
ulong lastdate;
ulong times;
uint32_t firstdate;
uint32_t lastdate;
uint32_t times;
char homepage[128];
byte group;

View File

@ -151,8 +151,8 @@ void GMsgHeaderView::Paint() {
// Generate message number and reply links string
char* ptr = buf;
int list_max = msg->link.list_max();
ulong* replies = (ulong*)throw_calloc(list_max+1, sizeof(ulong));
ulong replyto, replynext;
uint32_t* replies = (uint32_t*)throw_calloc(list_max+1, sizeof(uint32_t));
uint32_t replyto, replynext;
if(CFG->switches.get(disprealmsgno)) {
ptr += sprintf(ptr, " %-5.5s: #%u [%u]", LNG->Msg, msg->msgno, area->Msgn.Count()+(msg->attr.nwm() ? 1 : 0));
replyto = msg->link.to();

View File

@ -375,12 +375,12 @@ public:
GTag PMrk; // Personal mail marks
GTag Expo; // Messages to be exported
ulong bookmark; // Current bookmark message number
uint32_t bookmark; // Current bookmark message number
uint unread; // Number of unread messages at last scan
uint lastread() const; // Number of last message read
ulong lastreadentry() const; // Lastread message number at entry to area
uint lastread() const; // Number of last message read
uint32_t lastreadentry() const; // Lastread message number at entry to area
void set_lastread(uint lr);
@ -508,8 +508,8 @@ public:
void ScanArea();
void ScanAreaPM();
int LoadHdr(GMsg* msg, ulong msgno, bool enable_recode = true);
int LoadMsg(GMsg* msg, ulong msgno, int margin, int mode=0);
int LoadHdr(GMsg* msg, uint32_t msgno, bool enable_recode = true);
int LoadMsg(GMsg* msg, uint32_t msgno, int margin, int mode=0);
void SaveHdr(int mode, GMsg* msg);
void SaveMsg(int mode, GMsg* msg);
@ -634,8 +634,8 @@ inline int Area::isinternet() const { return area->isinternet(); }
inline int Area::isqwk() const { return area->isqwk(); }
inline int Area::issoup() const { return area->issoup(); }
inline uint Area::lastread() const { return area->lastread; }
inline ulong Area::lastreadentry() const { return area->lastreadentry; }
inline uint Area::lastread() const { return area->lastread; }
inline uint32_t Area::lastreadentry() const { return area->lastreadentry; }
inline void Area::set_lastread(uint lr) { area->lastread = lr; }
inline void Area::SetBookmark(uint __relno) { bookmark = Msgn.CvtReln(__relno); /*Book.Add(bookmark);*/ }

View File

@ -138,7 +138,6 @@ typedef int16_t sshort;
typedef uint16_t ushort;
typedef uint32_t dword;
typedef uint32_t ulong;
#endif //#ifdef _MSC_VER
typedef uint8_t bit;

View File

@ -73,9 +73,9 @@ struct _FDCtl {
// ------------------------------------------------------------------
// Masks for the nlofs member
const ulong IN_FDNODE = 0x01000000UL; // Data in FDNODE.FD
const ulong IN_FDNET = 0x10000000UL; // Data in FDNET.PVT
const ulong IN_FDPOINT = 0x20000000UL; // Data in FDPOINT.PVT
const uint32_t IN_FDNODE = 0x01000000UL; // Data in FDNODE.FD
const uint32_t IN_FDNET = 0x10000000UL; // Data in FDNET.PVT
const uint32_t IN_FDPOINT = 0x20000000UL; // Data in FDPOINT.PVT
// ------------------------------------------------------------------

View File

@ -104,17 +104,17 @@ struct ThrowIndex {
// ------------------------------------------------------------------
// Internal vars
int throw_inited = 0;
int throw_count;
ulong throw_allocations = 0;
Throw throw_alloclist;
int throw_max_count = 0;
Throw** throw_index = NULL;
int throw_index_size = 0;
int throw_index_free = 0;
int throw_last_free = -1;
ulong throw_index_cache_hits = 0;
int throw_overhead = sizeof(Throw) - 1;
int throw_inited = 0;
int throw_count;
uint32_t throw_allocations = 0;
Throw throw_alloclist;
int throw_max_count = 0;
Throw** throw_index = NULL;
int throw_index_size = 0;
int throw_index_free = 0;
int throw_last_free = -1;
uint32_t throw_index_cache_hits = 0;
int throw_overhead = sizeof(Throw) - 1;
#define throw_index_init_size 1000
#define throw_index_increment 100
@ -193,7 +193,7 @@ Throw* throw_find_overrun(Throw* pointer) {
long last_diff = LONG_MAX;
Throw** i = throw_index;
for(int n=0; n<throw_index_size; n++,i++) {
long diff = (ulong)*i - (ulong)pointer;
long diff = (uint32_t)*i - (uint32_t)pointer;
if((diff > 0) and (diff < last_diff)) {
last_candidate = *i;
last_diff = diff;
@ -211,7 +211,7 @@ Throw* throw_find_underrun(Throw* pointer) {
long last_diff = LONG_MAX;
Throw** i = throw_index;
for(int n=0; n<throw_index_size; n++,i++) {
long diff = (ulong)pointer - (ulong)*i;
long diff = (uint32_t)pointer - (uint32_t)*i;
if((diff > 0) and (diff < last_diff)) {
last_candidate = *i;
last_diff = diff;

View File

@ -112,41 +112,41 @@ public:
inline uint flags() { return r.w.flags; }
#endif
inline void al(ulong b) { r.h.al = (byte)b; }
inline void ah(ulong b) { r.h.ah = (byte)b; }
inline void bl(ulong b) { r.h.bl = (byte)b; }
inline void bh(ulong b) { r.h.bh = (byte)b; }
inline void cl(ulong b) { r.h.cl = (byte)b; }
inline void ch(ulong b) { r.h.ch = (byte)b; }
inline void dl(ulong b) { r.h.dl = (byte)b; }
inline void dh(ulong b) { r.h.dh = (byte)b; }
inline void al(uint32_t b) { r.h.al = (byte)b; }
inline void ah(uint32_t b) { r.h.ah = (byte)b; }
inline void bl(uint32_t b) { r.h.bl = (byte)b; }
inline void bh(uint32_t b) { r.h.bh = (byte)b; }
inline void cl(uint32_t b) { r.h.cl = (byte)b; }
inline void ch(uint32_t b) { r.h.ch = (byte)b; }
inline void dl(uint32_t b) { r.h.dl = (byte)b; }
inline void dh(uint32_t b) { r.h.dh = (byte)b; }
#ifdef __DJGPP__
inline void ax(ulong w) { r.x.ax = (word)w; }
inline void bx(ulong w) { r.x.bx = (word)w; }
inline void cx(ulong w) { r.x.cx = (word)w; }
inline void dx(ulong w) { r.x.dx = (word)w; }
inline void bp(ulong w) { r.x.bp = (word)w; }
inline void si(ulong w) { r.x.si = (word)w; }
inline void di(ulong w) { r.x.di = (word)w; }
inline void ds(ulong w) { r.x.ds = (word)w; }
inline void es(ulong w) { r.x.es = (word)w; }
inline void flags(ulong w) { r.x.flags = (word)w; }
inline void ax(uint32_t w) { r.x.ax = (word)w; }
inline void bx(uint32_t w) { r.x.bx = (word)w; }
inline void cx(uint32_t w) { r.x.cx = (word)w; }
inline void dx(uint32_t w) { r.x.dx = (word)w; }
inline void bp(uint32_t w) { r.x.bp = (word)w; }
inline void si(uint32_t w) { r.x.si = (word)w; }
inline void di(uint32_t w) { r.x.di = (word)w; }
inline void ds(uint32_t w) { r.x.ds = (word)w; }
inline void es(uint32_t w) { r.x.es = (word)w; }
inline void flags(uint32_t w) { r.x.flags = (word)w; }
#else
inline void ax(ulong w) { r.w.ax = (word)w; }
inline void bx(ulong w) { r.w.bx = (word)w; }
inline void cx(ulong w) { r.w.cx = (word)w; }
inline void dx(ulong w) { r.w.dx = (word)w; }
inline void bp(ulong w) { r.w.bp = (word)w; }
inline void si(ulong w) { r.w.si = (word)w; }
inline void di(ulong w) { r.w.di = (word)w; }
inline void ax(uint32_t w) { r.w.ax = (word)w; }
inline void bx(uint32_t w) { r.w.bx = (word)w; }
inline void cx(uint32_t w) { r.w.cx = (word)w; }
inline void dx(uint32_t w) { r.w.dx = (word)w; }
inline void bp(uint32_t w) { r.w.bp = (word)w; }
inline void si(uint32_t w) { r.w.si = (word)w; }
inline void di(uint32_t w) { r.w.di = (word)w; }
#if defined(__BORLANDC__)
inline void ds(ulong w) { sr.w.ds = (word)w; }
inline void es(ulong w) { sr.w.es = (word)w; }
inline void ds(uint32_t w) { sr.w.ds = (word)w; }
inline void es(uint32_t w) { sr.w.es = (word)w; }
#else
inline void ds(ulong w) { r.w.ds = (word)w; }
inline void es(ulong w) { r.w.es = (word)w; }
inline void ds(uint32_t w) { r.w.ds = (word)w; }
inline void es(uint32_t w) { r.w.es = (word)w; }
#endif
inline void flags(ulong w) { r.w.flags = (word)w; }
inline void flags(uint32_t w) { r.w.flags = (word)w; }
#endif
void genint(int intno);

View File

@ -39,88 +39,88 @@
// ------------------------------------------------------------------
// Internal GoldED message attributes
const ulong GATTR_PVT = 0x00000001UL; // private
const ulong GATTR_CRA = 0x00000002UL; // crash
const ulong GATTR_RCV = 0x00000004UL; // received
const ulong GATTR_SNT = 0x00000008UL; // sent
const uint32_t GATTR_PVT = 0x00000001UL; // private
const uint32_t GATTR_CRA = 0x00000002UL; // crash
const uint32_t GATTR_RCV = 0x00000004UL; // received
const uint32_t GATTR_SNT = 0x00000008UL; // sent
const ulong GATTR_ATT = 0x00000010UL; // file attach
const ulong GATTR_TRS = 0x00000020UL; // transit
const ulong GATTR_ORP = 0x00000040UL; // orphaned
const ulong GATTR_K_S = 0x00000080UL; // kill msg when sent
const uint32_t GATTR_ATT = 0x00000010UL; // file attach
const uint32_t GATTR_TRS = 0x00000020UL; // transit
const uint32_t GATTR_ORP = 0x00000040UL; // orphaned
const uint32_t GATTR_K_S = 0x00000080UL; // kill msg when sent
const ulong GATTR_LOC = 0x00000100UL; // local
const ulong GATTR_HLD = 0x00000200UL; // hold
const ulong GATTR_RSV = 0x00000400UL; // FTS-1 reserved
const ulong GATTR_FRQ = 0x00000800UL; // file request
const uint32_t GATTR_LOC = 0x00000100UL; // local
const uint32_t GATTR_HLD = 0x00000200UL; // hold
const uint32_t GATTR_RSV = 0x00000400UL; // FTS-1 reserved
const uint32_t GATTR_FRQ = 0x00000800UL; // file request
const ulong GATTR_RRQ = 0x00001000UL; // return receipt request
const ulong GATTR_RRC = 0x00002000UL; // return receipt
const ulong GATTR_ARQ = 0x00004000UL; // audit request
const ulong GATTR_URQ = 0x00008000UL; // file update request
const uint32_t GATTR_RRQ = 0x00001000UL; // return receipt request
const uint32_t GATTR_RRC = 0x00002000UL; // return receipt
const uint32_t GATTR_ARQ = 0x00004000UL; // audit request
const uint32_t GATTR_URQ = 0x00008000UL; // file update request
const ulong GATTR_GRP = 0x00010000UL; // group msg (hudson)
const ulong GATTR_IMM = 0x00020000UL; // immediate
const ulong GATTR_DIR = 0x00040000UL; // direct
const ulong GATTR_TFS = 0x00080000UL; // truncate file when sent
const uint32_t GATTR_GRP = 0x00010000UL; // group msg (hudson)
const uint32_t GATTR_IMM = 0x00020000UL; // immediate
const uint32_t GATTR_DIR = 0x00040000UL; // direct
const uint32_t GATTR_TFS = 0x00080000UL; // truncate file when sent
const ulong GATTR_KFS = 0x00100000UL; // kill file when sent
const ulong GATTR_LOK = 0x00200000UL; // locked
const ulong GATTR_A_S = 0x00400000UL; // archive msg when sent
const ulong GATTR_ZON = 0x00800000UL; // send through zone gate
const uint32_t GATTR_KFS = 0x00100000UL; // kill file when sent
const uint32_t GATTR_LOK = 0x00200000UL; // locked
const uint32_t GATTR_A_S = 0x00400000UL; // archive msg when sent
const uint32_t GATTR_ZON = 0x00800000UL; // send through zone gate
const ulong GATTR_HUB = 0x01000000UL; // host- or hub route
const ulong GATTR_XMA = 0x02000000UL; // xmail: alternate form of compressed mail attached
const ulong GATTR_CFM = 0x04000000UL; // confirmation receipt requested
const ulong GATTR_HIR = 0x08000000UL; // fax: hi-resolution image
const uint32_t GATTR_HUB = 0x01000000UL; // host- or hub route
const uint32_t GATTR_XMA = 0x02000000UL; // xmail: alternate form of compressed mail attached
const uint32_t GATTR_CFM = 0x04000000UL; // confirmation receipt requested
const uint32_t GATTR_HIR = 0x08000000UL; // fax: hi-resolution image
const ulong GATTR_COV = 0x10000000UL; // fax: cover sheet
const ulong GATTR_SIG = 0x20000000UL; // fax: signature
const ulong GATTR_LET = 0x40000000UL; // fax: letterhead
const ulong GATTR_UNS = 0x80000000UL; // unsent - not scanned (internal)
const uint32_t GATTR_COV = 0x10000000UL; // fax: cover sheet
const uint32_t GATTR_SIG = 0x20000000UL; // fax: signature
const uint32_t GATTR_LET = 0x40000000UL; // fax: letterhead
const uint32_t GATTR_UNS = 0x80000000UL; // unsent - not scanned (internal)
const ulong GATTR_DEL = 0x00000001UL; // deleted
const ulong GATTR_NWM = 0x00000002UL; // new message (internal)
const ulong GATTR_ROT = 0x00000004UL; // rot-13 encoded (internal)
const ulong GATTR_HEX = 0x00000008UL; // hexdump (internal)
const uint32_t GATTR_DEL = 0x00000001UL; // deleted
const uint32_t GATTR_NWM = 0x00000002UL; // new message (internal)
const uint32_t GATTR_ROT = 0x00000004UL; // rot-13 encoded (internal)
const uint32_t GATTR_HEX = 0x00000008UL; // hexdump (internal)
const ulong GATTR_UPD = 0x00000010UL; // update *.msg time stamp (internal)
const ulong GATTR_TOU = 0x00000020UL; // to-you (internal)
const ulong GATTR_FMU = 0x00000040UL; // from-you (internal)
const ulong GATTR_SCN = 0x00000080UL; // scanned (squish)
const uint32_t GATTR_UPD = 0x00000010UL; // update *.msg time stamp (internal)
const uint32_t GATTR_TOU = 0x00000020UL; // to-you (internal)
const uint32_t GATTR_FMU = 0x00000040UL; // from-you (internal)
const uint32_t GATTR_SCN = 0x00000080UL; // scanned (squish)
const ulong GATTR_POS = 0x00000100UL; // set line position (internal)
const ulong GATTR_R_O = 0x00000200UL; // area read-only
const ulong GATTR_NOK = 0x00000400UL; // (not used)
const ulong GATTR_FAX = 0x00000800UL; // file attached is a fax image
const uint32_t GATTR_POS = 0x00000100UL; // set line position (internal)
const uint32_t GATTR_R_O = 0x00000200UL; // area read-only
const uint32_t GATTR_NOK = 0x00000400UL; // (not used)
const uint32_t GATTR_FAX = 0x00000800UL; // file attached is a fax image
const ulong GATTR_PRN = 0x00001000UL; // message is printed (squish)
const ulong GATTR_ANO = 0x00002000UL; // anonymous
const ulong GATTR_UME = 0x00004000UL; // unmoved echo message (adeptxbbs)
const ulong GATTR_UMN = 0x00008000UL; // unmoved net message (adeptxbbs)
const uint32_t GATTR_PRN = 0x00001000UL; // message is printed (squish)
const uint32_t GATTR_ANO = 0x00002000UL; // anonymous
const uint32_t GATTR_UME = 0x00004000UL; // unmoved echo message (adeptxbbs)
const uint32_t GATTR_UMN = 0x00008000UL; // unmoved net message (adeptxbbs)
const ulong GATTR_FSC = 0x00010000UL; // fidonet scanned (adeptxbbs)
const ulong GATTR_GSC = 0x00020000UL; // groupmail scanned (adeptxbbs)
const ulong GATTR_RSC = 0x00040000UL; // rfc822 scanned (adeptxbbs)
const ulong GATTR_TRT = 0x00080000UL; // treated: soft cr's & lf's removed (adeptxbbs)
const uint32_t GATTR_FSC = 0x00010000UL; // fidonet scanned (adeptxbbs)
const uint32_t GATTR_GSC = 0x00020000UL; // groupmail scanned (adeptxbbs)
const uint32_t GATTR_RSC = 0x00040000UL; // rfc822 scanned (adeptxbbs)
const uint32_t GATTR_TRT = 0x00080000UL; // treated: soft cr's & lf's removed (adeptxbbs)
const ulong GATTR_LZS = 0x00100000UL; // msg is lzss compressed (adeptxbbs)
const ulong GATTR_ARC = 0x00200000UL; // message is stored (adeptxbbs)
const ulong GATTR_TAG = 0x00400000UL; // tagged: used by offline readers (adeptxbbs & wildcat)
const ulong GATTR_RAB = 0x00800000UL; // receivable (wildcat)
const uint32_t GATTR_LZS = 0x00100000UL; // msg is lzss compressed (adeptxbbs)
const uint32_t GATTR_ARC = 0x00200000UL; // message is stored (adeptxbbs)
const uint32_t GATTR_TAG = 0x00400000UL; // tagged: used by offline readers (adeptxbbs & wildcat)
const uint32_t GATTR_RAB = 0x00800000UL; // receivable (wildcat)
const ulong GATTR_CAR = 0x01000000UL; // carboned (wildcat)
const ulong GATTR_FWD = 0x02000000UL; // forwarded (wildcat)
const ulong GATTR_EFL = 0x04000000UL; // echoflag (wildcat)
const ulong GATTR_HRP = 0x08000000UL; // has replies (wildcat)
const uint32_t GATTR_CAR = 0x01000000UL; // carboned (wildcat)
const uint32_t GATTR_FWD = 0x02000000UL; // forwarded (wildcat)
const uint32_t GATTR_EFL = 0x04000000UL; // echoflag (wildcat)
const uint32_t GATTR_HRP = 0x08000000UL; // has replies (wildcat)
const ulong GATTR_PKD = 0x10000000UL; // Archived
const uint32_t GATTR_PKD = 0x10000000UL; // Archived
class ftn_attr {
protected:
ulong attr1, attr2;
uint32_t attr1, attr2;
public:
@ -225,82 +225,82 @@ public:
// ----------------------------------------------------------------
void pvt(ulong x) { if(x) attr1 |= GATTR_PVT; else attr1 &= ~GATTR_PVT; }
void cra(ulong x) { if(x) attr1 |= GATTR_CRA; else attr1 &= ~GATTR_CRA; }
void rcv(ulong x) { if(x) attr1 |= GATTR_RCV; else attr1 &= ~GATTR_RCV; }
void snt(ulong x) { if(x) attr1 |= GATTR_SNT; else attr1 &= ~GATTR_SNT; }
void pvt(uint32_t x) { if(x) attr1 |= GATTR_PVT; else attr1 &= ~GATTR_PVT; }
void cra(uint32_t x) { if(x) attr1 |= GATTR_CRA; else attr1 &= ~GATTR_CRA; }
void rcv(uint32_t x) { if(x) attr1 |= GATTR_RCV; else attr1 &= ~GATTR_RCV; }
void snt(uint32_t x) { if(x) attr1 |= GATTR_SNT; else attr1 &= ~GATTR_SNT; }
void att(ulong x) { if(x) attr1 |= GATTR_ATT; else attr1 &= ~GATTR_ATT; }
void trs(ulong x) { if(x) attr1 |= GATTR_TRS; else attr1 &= ~GATTR_TRS; }
void orp(ulong x) { if(x) attr1 |= GATTR_ORP; else attr1 &= ~GATTR_ORP; }
void k_s(ulong x) { if(x) attr1 |= GATTR_K_S; else attr1 &= ~GATTR_K_S; }
void att(uint32_t x) { if(x) attr1 |= GATTR_ATT; else attr1 &= ~GATTR_ATT; }
void trs(uint32_t x) { if(x) attr1 |= GATTR_TRS; else attr1 &= ~GATTR_TRS; }
void orp(uint32_t x) { if(x) attr1 |= GATTR_ORP; else attr1 &= ~GATTR_ORP; }
void k_s(uint32_t x) { if(x) attr1 |= GATTR_K_S; else attr1 &= ~GATTR_K_S; }
void loc(ulong x) { if(x) attr1 |= GATTR_LOC; else attr1 &= ~GATTR_LOC; }
void hld(ulong x) { if(x) attr1 |= GATTR_HLD; else attr1 &= ~GATTR_HLD; }
void rsv(ulong x) { if(x) attr1 |= GATTR_RSV; else attr1 &= ~GATTR_RSV; }
void frq(ulong x) { if(x) attr1 |= GATTR_FRQ; else attr1 &= ~GATTR_FRQ; }
void loc(uint32_t x) { if(x) attr1 |= GATTR_LOC; else attr1 &= ~GATTR_LOC; }
void hld(uint32_t x) { if(x) attr1 |= GATTR_HLD; else attr1 &= ~GATTR_HLD; }
void rsv(uint32_t x) { if(x) attr1 |= GATTR_RSV; else attr1 &= ~GATTR_RSV; }
void frq(uint32_t x) { if(x) attr1 |= GATTR_FRQ; else attr1 &= ~GATTR_FRQ; }
void rrq(ulong x) { if(x) attr1 |= GATTR_RRQ; else attr1 &= ~GATTR_RRQ; }
void rrc(ulong x) { if(x) attr1 |= GATTR_RRC; else attr1 &= ~GATTR_RRC; }
void arq(ulong x) { if(x) attr1 |= GATTR_ARQ; else attr1 &= ~GATTR_ARQ; }
void urq(ulong x) { if(x) attr1 |= GATTR_URQ; else attr1 &= ~GATTR_URQ; }
void rrq(uint32_t x) { if(x) attr1 |= GATTR_RRQ; else attr1 &= ~GATTR_RRQ; }
void rrc(uint32_t x) { if(x) attr1 |= GATTR_RRC; else attr1 &= ~GATTR_RRC; }
void arq(uint32_t x) { if(x) attr1 |= GATTR_ARQ; else attr1 &= ~GATTR_ARQ; }
void urq(uint32_t x) { if(x) attr1 |= GATTR_URQ; else attr1 &= ~GATTR_URQ; }
void grp(ulong x) { if(x) attr1 |= GATTR_GRP; else attr1 &= ~GATTR_GRP; }
void imm(ulong x) { if(x) attr1 |= GATTR_IMM; else attr1 &= ~GATTR_IMM; }
void dir(ulong x) { if(x) attr1 |= GATTR_DIR; else attr1 &= ~GATTR_DIR; }
void tfs(ulong x) { if(x) attr1 |= GATTR_TFS; else attr1 &= ~GATTR_TFS; }
void grp(uint32_t x) { if(x) attr1 |= GATTR_GRP; else attr1 &= ~GATTR_GRP; }
void imm(uint32_t x) { if(x) attr1 |= GATTR_IMM; else attr1 &= ~GATTR_IMM; }
void dir(uint32_t x) { if(x) attr1 |= GATTR_DIR; else attr1 &= ~GATTR_DIR; }
void tfs(uint32_t x) { if(x) attr1 |= GATTR_TFS; else attr1 &= ~GATTR_TFS; }
void kfs(ulong x) { if(x) attr1 |= GATTR_KFS; else attr1 &= ~GATTR_KFS; }
void lok(ulong x) { if(x) attr1 |= GATTR_LOK; else attr1 &= ~GATTR_LOK; }
void a_s(ulong x) { if(x) attr1 |= GATTR_A_S; else attr1 &= ~GATTR_A_S; }
void zon(ulong x) { if(x) attr1 |= GATTR_ZON; else attr1 &= ~GATTR_ZON; }
void kfs(uint32_t x) { if(x) attr1 |= GATTR_KFS; else attr1 &= ~GATTR_KFS; }
void lok(uint32_t x) { if(x) attr1 |= GATTR_LOK; else attr1 &= ~GATTR_LOK; }
void a_s(uint32_t x) { if(x) attr1 |= GATTR_A_S; else attr1 &= ~GATTR_A_S; }
void zon(uint32_t x) { if(x) attr1 |= GATTR_ZON; else attr1 &= ~GATTR_ZON; }
void hub(ulong x) { if(x) attr1 |= GATTR_HUB; else attr1 &= ~GATTR_HUB; }
void xma(ulong x) { if(x) attr1 |= GATTR_XMA; else attr1 &= ~GATTR_XMA; }
void cfm(ulong x) { if(x) attr1 |= GATTR_CFM; else attr1 &= ~GATTR_CFM; }
void hir(ulong x) { if(x) attr1 |= GATTR_HIR; else attr1 &= ~GATTR_HIR; }
void hub(uint32_t x) { if(x) attr1 |= GATTR_HUB; else attr1 &= ~GATTR_HUB; }
void xma(uint32_t x) { if(x) attr1 |= GATTR_XMA; else attr1 &= ~GATTR_XMA; }
void cfm(uint32_t x) { if(x) attr1 |= GATTR_CFM; else attr1 &= ~GATTR_CFM; }
void hir(uint32_t x) { if(x) attr1 |= GATTR_HIR; else attr1 &= ~GATTR_HIR; }
void cov(ulong x) { if(x) attr1 |= GATTR_COV; else attr1 &= ~GATTR_COV; }
void sig(ulong x) { if(x) attr1 |= GATTR_SIG; else attr1 &= ~GATTR_SIG; }
void let(ulong x) { if(x) attr1 |= GATTR_LET; else attr1 &= ~GATTR_LET; }
void uns(ulong x) { if(x) attr1 |= GATTR_UNS; else attr1 &= ~GATTR_UNS; }
void cov(uint32_t x) { if(x) attr1 |= GATTR_COV; else attr1 &= ~GATTR_COV; }
void sig(uint32_t x) { if(x) attr1 |= GATTR_SIG; else attr1 &= ~GATTR_SIG; }
void let(uint32_t x) { if(x) attr1 |= GATTR_LET; else attr1 &= ~GATTR_LET; }
void uns(uint32_t x) { if(x) attr1 |= GATTR_UNS; else attr1 &= ~GATTR_UNS; }
void del(ulong x) { if(x) attr2 |= GATTR_DEL; else attr2 &= ~GATTR_DEL; }
void nwm(ulong x) { if(x) attr2 |= GATTR_NWM; else attr2 &= ~GATTR_NWM; }
void rot(ulong x) { if(x) attr2 |= GATTR_ROT; else attr2 &= ~GATTR_ROT; }
void hex(ulong x) { if(x) attr2 |= GATTR_HEX; else attr2 &= ~GATTR_HEX; }
void del(uint32_t x) { if(x) attr2 |= GATTR_DEL; else attr2 &= ~GATTR_DEL; }
void nwm(uint32_t x) { if(x) attr2 |= GATTR_NWM; else attr2 &= ~GATTR_NWM; }
void rot(uint32_t x) { if(x) attr2 |= GATTR_ROT; else attr2 &= ~GATTR_ROT; }
void hex(uint32_t x) { if(x) attr2 |= GATTR_HEX; else attr2 &= ~GATTR_HEX; }
void upd(ulong x) { if(x) attr2 |= GATTR_UPD; else attr2 &= ~GATTR_UPD; }
void tou(ulong x) { if(x) attr2 |= GATTR_TOU; else attr2 &= ~GATTR_TOU; }
void fmu(ulong x) { if(x) attr2 |= GATTR_FMU; else attr2 &= ~GATTR_FMU; }
void scn(ulong x) { if(x) attr2 |= GATTR_SCN; else attr2 &= ~GATTR_SCN; }
void upd(uint32_t x) { if(x) attr2 |= GATTR_UPD; else attr2 &= ~GATTR_UPD; }
void tou(uint32_t x) { if(x) attr2 |= GATTR_TOU; else attr2 &= ~GATTR_TOU; }
void fmu(uint32_t x) { if(x) attr2 |= GATTR_FMU; else attr2 &= ~GATTR_FMU; }
void scn(uint32_t x) { if(x) attr2 |= GATTR_SCN; else attr2 &= ~GATTR_SCN; }
void pos(ulong x) { if(x) attr2 |= GATTR_POS; else attr2 &= ~GATTR_POS; }
void r_o(ulong x) { if(x) attr2 |= GATTR_R_O; else attr2 &= ~GATTR_R_O; }
void nok(ulong x) { if(x) attr2 |= GATTR_NOK; else attr2 &= ~GATTR_NOK; }
void fax(ulong x) { if(x) attr2 |= GATTR_FAX; else attr2 &= ~GATTR_FAX; }
void pos(uint32_t x) { if(x) attr2 |= GATTR_POS; else attr2 &= ~GATTR_POS; }
void r_o(uint32_t x) { if(x) attr2 |= GATTR_R_O; else attr2 &= ~GATTR_R_O; }
void nok(uint32_t x) { if(x) attr2 |= GATTR_NOK; else attr2 &= ~GATTR_NOK; }
void fax(uint32_t x) { if(x) attr2 |= GATTR_FAX; else attr2 &= ~GATTR_FAX; }
void prn(ulong x) { if(x) attr2 |= GATTR_PRN; else attr2 &= ~GATTR_PRN; }
void ano(ulong x) { if(x) attr2 |= GATTR_ANO; else attr2 &= ~GATTR_ANO; }
void ume(ulong x) { if(x) attr2 |= GATTR_UME; else attr2 &= ~GATTR_UME; }
void umn(ulong x) { if(x) attr2 |= GATTR_UMN; else attr2 &= ~GATTR_UMN; }
void prn(uint32_t x) { if(x) attr2 |= GATTR_PRN; else attr2 &= ~GATTR_PRN; }
void ano(uint32_t x) { if(x) attr2 |= GATTR_ANO; else attr2 &= ~GATTR_ANO; }
void ume(uint32_t x) { if(x) attr2 |= GATTR_UME; else attr2 &= ~GATTR_UME; }
void umn(uint32_t x) { if(x) attr2 |= GATTR_UMN; else attr2 &= ~GATTR_UMN; }
void fsc(ulong x) { if(x) attr2 |= GATTR_FSC; else attr2 &= ~GATTR_FSC; }
void gsc(ulong x) { if(x) attr2 |= GATTR_GSC; else attr2 &= ~GATTR_GSC; }
void rsc(ulong x) { if(x) attr2 |= GATTR_RSC; else attr2 &= ~GATTR_RSC; }
void trt(ulong x) { if(x) attr2 |= GATTR_TRT; else attr2 &= ~GATTR_TRT; }
void fsc(uint32_t x) { if(x) attr2 |= GATTR_FSC; else attr2 &= ~GATTR_FSC; }
void gsc(uint32_t x) { if(x) attr2 |= GATTR_GSC; else attr2 &= ~GATTR_GSC; }
void rsc(uint32_t x) { if(x) attr2 |= GATTR_RSC; else attr2 &= ~GATTR_RSC; }
void trt(uint32_t x) { if(x) attr2 |= GATTR_TRT; else attr2 &= ~GATTR_TRT; }
void lzs(ulong x) { if(x) attr2 |= GATTR_LZS; else attr2 &= ~GATTR_LZS; }
void arc(ulong x) { if(x) attr2 |= GATTR_ARC; else attr2 &= ~GATTR_ARC; }
void tag(ulong x) { if(x) attr2 |= GATTR_TAG; else attr2 &= ~GATTR_TAG; }
void rab(ulong x) { if(x) attr2 |= GATTR_RAB; else attr2 &= ~GATTR_RAB; }
void lzs(uint32_t x) { if(x) attr2 |= GATTR_LZS; else attr2 &= ~GATTR_LZS; }
void arc(uint32_t x) { if(x) attr2 |= GATTR_ARC; else attr2 &= ~GATTR_ARC; }
void tag(uint32_t x) { if(x) attr2 |= GATTR_TAG; else attr2 &= ~GATTR_TAG; }
void rab(uint32_t x) { if(x) attr2 |= GATTR_RAB; else attr2 &= ~GATTR_RAB; }
void car(ulong x) { if(x) attr2 |= GATTR_CAR; else attr2 &= ~GATTR_CAR; }
void fwd(ulong x) { if(x) attr2 |= GATTR_FWD; else attr2 &= ~GATTR_FWD; }
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 car(uint32_t x) { if(x) attr2 |= GATTR_CAR; else attr2 &= ~GATTR_CAR; }
void fwd(uint32_t x) { if(x) attr2 |= GATTR_FWD; else attr2 &= ~GATTR_FWD; }
void efl(uint32_t x) { if(x) attr2 |= GATTR_EFL; else attr2 &= ~GATTR_EFL; }
void hrp(uint32_t x) { if(x) attr2 |= GATTR_HRP; else attr2 &= ~GATTR_HRP; }
void pkd(ulong x) { if(x) attr2 |= GATTR_PKD; else attr2 &= ~GATTR_PKD; }
void pkd(uint32_t x) { if(x) attr2 |= GATTR_PKD; else attr2 &= ~GATTR_PKD; }
// -------------------------------------------------------------

View File

@ -332,7 +332,7 @@ int str2mon(const char* ptr) {
time32_t FTimeToTime(FTime* __ftime, struct tm* __tm) {
struct tm _tm;
ulong _time = 0;
uint32_t _time = 0;
if(__tm == NULL)
__tm = &_tm;
@ -356,7 +356,7 @@ time32_t FTimeToTime(FTime* __ftime, struct tm* __tm) {
time32_t b = gmktime(tp);
_time = a + a - b;
if(_time == (ulong)0xFFFFFFFFL)
if(_time == (uint32_t)0xFFFFFFFFL)
_time = 0;
}
}
@ -447,7 +447,7 @@ time32_t FidoTimeToUnix(char* ptr) {
time32_t b = gmktime(tp);
return a + a - b;
}
return (ulong)-1;
return (uint32_t)-1;
}

View File

@ -72,7 +72,7 @@ void GUser::inctimesposted(int) {
// ------------------------------------------------------------------
ulong GUser::lastread() {
uint32_t GUser::lastread() {
// No action
return 0;
@ -81,7 +81,7 @@ ulong GUser::lastread() {
// ------------------------------------------------------------------
void GUser::lastread(ulong) {
void GUser::lastread(uint32_t) {
// No action
}

View File

@ -70,11 +70,11 @@ public:
// ----------------------------------------------------------------
// Virtual functions
virtual void founduser();
virtual void inctimesposted(int __times);
virtual ulong lastread();
virtual void lastread(ulong __lastread);
virtual void recinit(const char* __name);
virtual void founduser();
virtual void inctimesposted(int __times);
virtual uint32_t lastread();
virtual void lastread(uint32_t __lastread);
virtual void recinit(const char* __name);
// ----------------------------------------------------------------

View File

@ -85,7 +85,7 @@ int GoldbaseUser::read() {
// ------------------------------------------------------------------
ulong GoldbaseUser::lastread() {
uint32_t GoldbaseUser::lastread() {
seekread();
return record->highmsgread;
@ -94,7 +94,7 @@ ulong GoldbaseUser::lastread() {
// ------------------------------------------------------------------
void GoldbaseUser::lastread(ulong __lastread) {
void GoldbaseUser::lastread(uint32_t __lastread) {
seekread();
record->highmsgread = (long)__lastread;

View File

@ -100,10 +100,10 @@ public:
int isvalid();
int read();
void inctimesposted(int __times);
ulong lastread();
void lastread(ulong __lastread);
void recinit(const char* __name);
void inctimesposted(int __times);
uint32_t lastread();
void lastread(uint32_t __lastread);
void recinit(const char* __name);
};

View File

@ -85,7 +85,7 @@ int HudsonUser::read() {
// ------------------------------------------------------------------
ulong HudsonUser::lastread() {
uint32_t HudsonUser::lastread() {
seekread();
return record->highmsgread;
@ -94,7 +94,7 @@ ulong HudsonUser::lastread() {
// ------------------------------------------------------------------
void HudsonUser::lastread(ulong __lastread) {
void HudsonUser::lastread(uint32_t __lastread) {
seekread();
record->highmsgread = (word)__lastread;

View File

@ -101,10 +101,10 @@ public:
int isvalid();
int read();
void inctimesposted(int __times);
ulong lastread();
void lastread(ulong __lastread);
void recinit(const char* __name);
void inctimesposted(int __times);
uint32_t lastread();
void lastread(uint32_t __lastread);
void recinit(const char* __name);
};

View File

@ -95,7 +95,7 @@ int RA2User::read() {
// ------------------------------------------------------------------
ulong RA2User::lastread() {
uint32_t RA2User::lastread() {
seekread();
return record->lastread;
@ -104,7 +104,7 @@ ulong RA2User::lastread() {
// ------------------------------------------------------------------
void RA2User::lastread(ulong __lastread) {
void RA2User::lastread(uint32_t __lastread) {
seekread();
record->lastread = (long)__lastread;

View File

@ -142,10 +142,10 @@ public:
int isvalid();
int read();
void inctimesposted(int __times);
ulong lastread();
void lastread(ulong __lastread);
void recinit(const char* __name);
void inctimesposted(int __times);
uint32_t lastread();
void lastread(uint32_t __lastread);
void recinit(const char* __name);
void add(const char* __name);
};

View File

@ -193,7 +193,7 @@ char* base64_engine::decode(char* outputbuffer, const char* inputbuffer) {
const char* i = inputbuffer;
int shift = 0;
ulong accum = 0;
uint32_t accum = 0;
while(*i) {
char c = *i;
uint value = (uint)-1;

View File

@ -74,12 +74,12 @@ int GetYesno(const char* value) {
// ------------------------------------------------------------------
// Calculates a percentage
int Pct(ulong x, ulong y) {
int Pct(uint32_t x, uint32_t y) {
if(x) {
ulong p = (((x-y)*100)/x);
ulong r = (((x-y)*100)%x);
uint32_t p = (((x-y)*100)/x);
uint32_t r = (((x-y)*100)%x);
if(((r*10)/x)>4)
p++;
@ -104,9 +104,9 @@ int tabstop(int column, int tabwidth) {
// ------------------------------------------------------------------
// Convert hex string to integer
ulong atoulx(const char* s) {
uint32_t atoulx(const char* s) {
ulong retval = 0;
uint32_t retval = 0;
s = strskip_wht(s);
@ -122,7 +122,7 @@ ulong atoulx(const char* s) {
// ------------------------------------------------------------------
char* ltob(char* dst, ulong value, int fill) {
char* ltob(char* dst, uint32_t value, int fill) {
char* p = dst;

View File

@ -39,16 +39,16 @@
// ------------------------------------------------------------------
// Prototypes
ulong atoulx(const char* s);
uint32_t atoulx(const char* s);
inline word atow(const char* p) { return (word)atoi(p); }
inline int xtoi(char c) { return isdigit(c) ? (c - '0') : (toupper(c) - ('A' - 10)); }
inline int atox(const char* s) { return (int)atoulx(s); }
char* ltob(char* dst, ulong value, int fill=32);
char* ltob(char* dst, uint32_t value, int fill=32);
int GetYesno(const char* value);
int Pct(ulong x, ulong y);
int Pct(uint32_t x, uint32_t y);
int tabstop(int col, int tabwidth);
char* ggetosstring();

View File

@ -56,9 +56,6 @@ The combined boards are stored in 25 bytes (200 bits). One bit per message
area.
*/
//typedef unsigned short uint;
//typedef unsigned long ulong;
//typedef unsigned char byte;
typedef unsigned long accessflags;
typedef unsigned char combinedboards[125];
typedef unsigned char pb_bool;
@ -104,9 +101,9 @@ struct UsersPbBBS
uint expLevel;
accessflags expFlagsOn;
accessflags expFlagsOff;
ulong uFlags;
uint32_t uFlags;
combinedboards mailCheckBoards;
ulong totalTimeUsed;
uint32_t totalTimeUsed;
uint qwkMaxMsgsPerArea;
uint qwkMaxMsgs;
byte qwkArchiver;
@ -452,8 +449,8 @@ struct MODEM_PRO
struct BinLog
{
Date date;
pb_Time timeIn;
pb_Time timeOut;
pb_Time timeIn;
pb_Time timeOut;
char name[36];
char city[26];
char country[26];
@ -463,7 +460,7 @@ struct BinLog
long kbUp;
uint yells;
uint level;
ulong uflags;
uint32_t uflags;
char extra[81];
};

View File

@ -105,13 +105,13 @@ typedef struct { // Message sub board info
read_ar[LEN_ARSTR+1], // Read requirements
post_ar[LEN_ARSTR+1], // Post requirements
op_ar[LEN_ARSTR+1]; // Operator requirements
ulong misc; // Miscellaneous flags
uint32_t misc; // Miscellaneous flags
char tagline[81], // Optional QWK net tag line
origline[51], // Optional EchoMail origin line
echomail_sem[LEN_DIR+1], // EchoMail semaphore for this sub
echopath[LEN_DIR+1]; // EchoMail path
ftn_addr faddr; // FidoNet address
ulong maxmsgs, // Max number of messages allowed
uint32_t maxmsgs, // Max number of messages allowed
maxcrcs; // Max number of CRCs to keep
ushort maxage, // Max age of messages (in days)
ptridx; // Index into pointer file

View File

@ -56,7 +56,7 @@ void gareafile::ReadFastecho11x(int fh) {
aka[c].main = cfg->oldakas[c].main;
// Process extended headers
ulong offset = 0;
uint32_t offset = 0;
while(offset < cfg->offset) {
ExtensionHeader ehdr;
read(fh, &ehdr, sizeof(ExtensionHeader));

View File

@ -56,7 +56,7 @@ void gareafile::ReadFastecho141(int fh) {
aka[c].main = cfg->oldakas[c].main;
// Process extended headers
ulong offset = 0;
uint32_t offset = 0;
while(offset < cfg->offset) {
ExtensionHeader ehdr;
read(fh, &ehdr, sizeof(ExtensionHeader));

View File

@ -54,7 +54,7 @@ void gareafile::ReadFastecho142(int fh) {
OriginLines* origin = (OriginLines*)throw_calloc(cfg->OriginCnt, sizeof(OriginLines));
// Process extended headers
ulong offset = 0;
uint32_t offset = 0;
while(offset < cfg->offset) {
ExtensionHeader ehdr;
read(fh, &ehdr, sizeof(ExtensionHeader));

View File

@ -48,7 +48,7 @@ void gareafile::ReadAdeptXbbsFile(char* path, char* file, char* options) {
const word CRC_USENET = 0xD087;
AreaCfg aa;
ulong flags;
uint32_t flags;
char buf[512];
char name[256];
char usenet[256];

View File

@ -5,9 +5,9 @@
extern "C" {
#endif
ulong GenMsgId(char *seqdir, ulong max_outrun);
ulong GenMsgIdEx(char *seqdir, ulong max_outrun, ulong (*altGenMsgId)(void), char **errstr);
ulong oldGenMsgId(void);
uint32_t GenMsgId(char *seqdir, uint32_t max_outrun);
uint32_t GenMsgIdEx(char *seqdir, uint32_t max_outrun, uint32_t (*altGenMsgId)(void), char **errstr);
uint32_t oldGenMsgId(void);
#ifdef __cplusplus
}

View File

@ -259,7 +259,7 @@ static char* fast_parse_addr(char* str, Addr* addr) {
point = strchr(str, '.');
domain = strchr(str, '@');
if(domain and point)
if((ulong)point > (ulong)domain)
if((uint32_t)point > (uint32_t)domain)
point = NULL;
if(space)
@ -304,7 +304,7 @@ static char* parse_address(char* str, Addr* addr, Addr* mainaka) {
char* point = strchr(str, '.');
domain = strchr(str, '@');
if(domain and point)
if((ulong)point > (ulong)domain)
if((uint32_t)point > (uint32_t)domain)
point = NULL;
if(net) {
@ -733,7 +733,7 @@ static void read_nodelists() {
if(ISTWIRLY(no)) {
int len = 16-strlen(name);
std::cout << "\r* \\--" << name << std::setw((len > 0) ? len : 1) << " " << "Zone " << nlst.addr.zone << " \tNet " << nlst.addr.net << " \tNodes " << (ulong)no << " " << std::flush;
std::cout << "\r* \\--" << name << std::setw((len > 0) ? len : 1) << " " << "Zone " << nlst.addr.zone << " \tNet " << nlst.addr.net << " \tNodes " << (uint32_t)no << " " << std::flush;
}
bool include = true;
@ -780,7 +780,7 @@ static void read_nodelists() {
if(not quiet) {
int len = 16-strlen(name);
std::cout << "\r* " << ((fno == nodelist.end()-1) ? '\\' : '|') << "--" << name << std::setw((len > 0) ? len : 1) << " " << "Nodes read: " << (ulong)no << "\tTotal read: " << (ulong)nodes << ((nodes >= maxnodes) ? " (Limit reached)" : " ") << std::endl;
std::cout << "\r* " << ((fno == nodelist.end()-1) ? '\\' : '|') << "--" << name << std::setw((len > 0) ? len : 1) << " " << "Nodes read: " << (uint32_t)no << "\tTotal read: " << (uint32_t)nodes << ((nodes >= maxnodes) ? " (Limit reached)" : " ") << std::endl;
}
fclose(lfp);
@ -864,7 +864,7 @@ static void read_nodelists() {
if(ISTWIRLY(nodes)) {
int len = 16-strlen(name);
std::cout << "\r* \\--" << name << std::setw((len > 0) ? len : 1) << " " << "Nodes: " << (ulong)nodes << " " << std::flush;
std::cout << "\r* \\--" << name << std::setw((len > 0) ? len : 1) << " " << "Nodes: " << (uint32_t)nodes << " " << std::flush;
}
// Indicate userlist
@ -886,7 +886,7 @@ static void read_nodelists() {
if(not quiet) {
int len = 16-strlen(name);
std::cout << "\r* " << ((fno == userlist.end()-1) ? '\\' : '|') << "--" << name << std::setw((len > 0) ? len : 1) << " " << "Nodes read: " << (ulong)no << "\tTotal read: " << (ulong)nodes << ((nodes >= maxnodes) ? " (Limit reached)" : " ") << std::endl;
std::cout << "\r* " << ((fno == userlist.end()-1) ? '\\' : '|') << "--" << name << std::setw((len > 0) ? len : 1) << " " << "Nodes read: " << (uint32_t)no << "\tTotal read: " << (uint32_t)nodes << ((nodes >= maxnodes) ? " (Limit reached)" : " ") << std::endl;
}
fclose(lfp);
@ -1021,9 +1021,9 @@ static void read_nodelists() {
if(not quiet) {
if(dups) {
std::cout << std::endl << "* Total duplicate nodes: " << (ulong)dups << '.' << std::endl;
std::cout << std::endl << "* Total duplicate nodes: " << (uint32_t)dups << '.' << std::endl;
}
std::cout << std::endl << "* Nodelist compile completed. Compile time: " << (ulong)(runtime/60) << " min, " << (ulong)(runtime%60) << " sec." << std::endl;
std::cout << std::endl << "* Nodelist compile completed. Compile time: " << (uint32_t)(runtime/60) << " min, " << (uint32_t)(runtime%60) << " sec." << std::endl;
}
#ifdef GOLDNODE_STATS
}