Fixed sprintf parameters

This commit is contained in:
Ianos Gnatiuc 2005-11-02 00:45:47 +00:00
parent da408e1a01
commit 502e130b8f
8 changed files with 17 additions and 16 deletions

View File

@ -329,7 +329,7 @@ void DoKludges(int mode, GMsg* msg, int kludges) {
strcpy(buf, msg->iorig);
strchg(buf, '@', '.');
}
sprintf(buf2, "<GED%08lX@%s>", long(getMsgId()), buf);
sprintf(buf2, "<GED%08X@%s>", 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);

View File

@ -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);

View File

@ -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);
}
}

View File

@ -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));

View File

@ -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; replyn<list_max+1; replyn++)
if(replies[replyn])
ptr += sprintf(ptr, " %s%lu", (plus++?"":"+"), long(replies[replyn]));
ptr += sprintf(ptr, " %s%u", (plus++?"":"+"), replies[replyn]);
if(replynext)
sprintf(ptr, " *%lu", long(replynext));
sprintf(ptr, " *%u", replynext);
if(inhdr) {
HeaderView->window.activate_quick();

View File

@ -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);

View File

@ -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)<CFG->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)<CFG->disphdrnodeset.pos)))
sprintf(ptr, " *%lu", long(replynext));
sprintf(ptr, " *%u", replynext);
throw_free(replies);
strsetsz(buf, attrsgenerated ? CFG->disphdrnodeset.pos : width);

View File

@ -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");