diff --git a/golded3/gectrl.cpp b/golded3/gectrl.cpp index b50a47a..0b89d79 100644 --- a/golded3/gectrl.cpp +++ b/golded3/gectrl.cpp @@ -329,7 +329,7 @@ void DoKludges(int mode, GMsg* msg, int kludges) { strcpy(buf, msg->iorig); strchg(buf, '@', '.'); } - sprintf(buf2, "", long(getMsgId()), buf); + sprintf(buf2, "", getMsgId(), buf); throw_release(msg->messageid); msg->messageid = throw_strdup(buf2); CvtMessageIDtoMSGID(buf2, buf, AA->echoid(), "MSGID"); @@ -337,7 +337,7 @@ void DoKludges(int mode, GMsg* msg, int kludges) { } else { msg->orig.make_string(buf2, msg->odom); - sprintf(msg->msgids, "%s %08lx", buf2, long(getMsgId())); + sprintf(msg->msgids, "%s %08x", buf2, getMsgId()); } if(CFG->switches.get(usemsgid) and strcmp(AA->basetype(), "PCBOARD")) { sprintf(buf, "\001MSGID: %s", msg->msgids); diff --git a/golded3/genode.cpp b/golded3/genode.cpp index 1165f49..63ed304 100644 --- a/golded3/genode.cpp +++ b/golded3/genode.cpp @@ -1226,12 +1226,12 @@ void LookupNode(GMsg* msg, const char* name, int what) { void CheckNodelists() { // Copy of previous timestamp - static long oldft = 0; + static time32_t oldft = 0; // Get timestamp of the .GXL file Path file; strcpy(file, AddPath(CFG->nodepath, "goldnode.gxl")); - long ft = GetFiletime(file); + time32_t ft = GetFiletime(file); // Check nodelists if timestamp changed if(ft != oldft) { @@ -1274,7 +1274,8 @@ void CheckNodelists() { waitkeyt(10000); w_info(NULL); } - else if(abs(long(GetFiletime(NODE->nodelist[n].fn)-NODE->nodelist[n].ft))>1) { + else if (GetFiletime(NODE->nodelist[n].fn) != NODE->nodelist[n].ft) + { w_infof(" %s %s ", LNG->NodelistOutdated, NODE->nodelist[n].fn); HandleGEvent(EVTT_ATTENTION); waitkeyt(10000); diff --git a/golded3/gepost.cpp b/golded3/gepost.cpp index f11ed1a..07e675d 100644 --- a/golded3/gepost.cpp +++ b/golded3/gepost.cpp @@ -934,7 +934,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) { if(r) { if(AA->Replyre() == REPLYRE_NUMERIC and not AA->isinternet()) { ISub subj; - sprintf(subj, "Re^%lu:%s", long(((number+1) > number) ? (number+1) : number), r); + sprintf(subj, "Re^%u:%s", (((number+1) > number) ? (number+1) : number), r); strcpy(msg->re, subj); } } diff --git a/golded3/geread.cpp b/golded3/geread.cpp index e90465f..962826e 100644 --- a/golded3/geread.cpp +++ b/golded3/geread.cpp @@ -1409,7 +1409,7 @@ void GotoReplies() { cursorbar = replies; rlist[replies].msgno[0] = (n==list_max+1) ? '*' : '+'; uint32_t msgno = CFG->switches.get(disprealmsgno) ? msgn : reln; - sprintf(rlist[replies].msgno+1, "%lu", long(msgno)); + sprintf(rlist[replies].msgno+1, "%u", msgno); maxmsgno = MaxV(maxmsgno, (uint)strlen(rlist[replies].msgno+1)); strcpy(rlist[replies].name, rmsg->by); maxname = MaxV(maxname, (uint)strlen(rlist[replies].name)); diff --git a/golded3/geread2.cpp b/golded3/geread2.cpp index 32883db..9ce484b 100644 --- a/golded3/geread2.cpp +++ b/golded3/geread2.cpp @@ -309,12 +309,12 @@ void GotoMsgno() { replies[replyn] = AA->Msgn.ToReln(reader_msg->link.list(replyn-1)); } if(replyto) - ptr += sprintf(ptr, " -%lu", long(replyto)); + ptr += sprintf(ptr, " -%u", replyto); for(int replyn=0,plus=0; replynwindow.activate_quick(); diff --git a/golded3/geusrbse.cpp b/golded3/geusrbse.cpp index 60fb366..4ba1405 100644 --- a/golded3/geusrbse.cpp +++ b/golded3/geusrbse.cpp @@ -349,7 +349,7 @@ bool guserbase::edit_entry(uint idx) { if(dt) window.prints(13, 38, wattr, strftimei(dbuf, 16, "%d %b %y", ggmtime(&dt))); - sprintf(dbuf, "%8ld", long(entry.times)); + sprintf(dbuf, "%8u", entry.times); window.prints(13, width-11, wattr, dbuf); addressbook_form form(window); diff --git a/golded3/geview.cpp b/golded3/geview.cpp index b77c90e..188d133 100644 --- a/golded3/geview.cpp +++ b/golded3/geview.cpp @@ -172,12 +172,12 @@ void GMsgHeaderView::Paint() { replies[replyn] = area->Msgn.ToReln(msg->link.list(replyn-1)); } if(replyto) - ptr += sprintf(ptr, " -%lu", long(replyto)); + ptr += sprintf(ptr, " -%u", replyto); for(int replyn=0,plus=0; (replyn<(list_max+1)) and (not attrsgenerated or ((ptr-buf)disphdrnodeset.pos)); replyn++) if(replies[replyn]) - ptr += sprintf(ptr, " %s%lu", plus++?"":"+", long(replies[replyn])); + ptr += sprintf(ptr, " %s%u", plus++?"":"+", replies[replyn]); if(replynext and (not attrsgenerated or ((ptr-buf)disphdrnodeset.pos))) - sprintf(ptr, " *%lu", long(replynext)); + sprintf(ptr, " *%u", replynext); throw_free(replies); strsetsz(buf, attrsgenerated ? CFG->disphdrnodeset.pos : width); diff --git a/goldlib/gall/gutlvers.cpp b/goldlib/gall/gutlvers.cpp index 0adc553..171c013 100644 --- a/goldlib/gall/gutlvers.cpp +++ b/goldlib/gall/gutlvers.cpp @@ -702,10 +702,10 @@ char* ggetosstring(void) { strcpy(_tmp, info.szCSDVersion); strchg(_tmp, ' ', '_'); strisrep(_tmp, "Service_Pack_", "SP"); - sprintf(osstring, "%s %ld.%ld.%ld-%s %s", ostype, info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, _tmp, processor); + sprintf(osstring, "%s %u.%u.%u-%s %s", ostype, info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, _tmp, processor); } else - sprintf(osstring, "%s %ld.%ld.%ld %s", ostype,info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, processor); + sprintf(osstring, "%s %u.%u.%u %s", ostype,info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, processor); } else strcpy(osstring, "Win32-unknown");