Fixed sprintf parameters
This commit is contained in:
parent
da408e1a01
commit
502e130b8f
@ -329,7 +329,7 @@ void DoKludges(int mode, GMsg* msg, int kludges) {
|
|||||||
strcpy(buf, msg->iorig);
|
strcpy(buf, msg->iorig);
|
||||||
strchg(buf, '@', '.');
|
strchg(buf, '@', '.');
|
||||||
}
|
}
|
||||||
sprintf(buf2, "<GED%08lX@%s>", long(getMsgId()), buf);
|
sprintf(buf2, "<GED%08X@%s>", getMsgId(), buf);
|
||||||
throw_release(msg->messageid);
|
throw_release(msg->messageid);
|
||||||
msg->messageid = throw_strdup(buf2);
|
msg->messageid = throw_strdup(buf2);
|
||||||
CvtMessageIDtoMSGID(buf2, buf, AA->echoid(), "MSGID");
|
CvtMessageIDtoMSGID(buf2, buf, AA->echoid(), "MSGID");
|
||||||
@ -337,7 +337,7 @@ void DoKludges(int mode, GMsg* msg, int kludges) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
msg->orig.make_string(buf2, msg->odom);
|
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")) {
|
if(CFG->switches.get(usemsgid) and strcmp(AA->basetype(), "PCBOARD")) {
|
||||||
sprintf(buf, "\001MSGID: %s", msg->msgids);
|
sprintf(buf, "\001MSGID: %s", msg->msgids);
|
||||||
|
@ -1226,12 +1226,12 @@ void LookupNode(GMsg* msg, const char* name, int what) {
|
|||||||
void CheckNodelists() {
|
void CheckNodelists() {
|
||||||
|
|
||||||
// Copy of previous timestamp
|
// Copy of previous timestamp
|
||||||
static long oldft = 0;
|
static time32_t oldft = 0;
|
||||||
|
|
||||||
// Get timestamp of the .GXL file
|
// Get timestamp of the .GXL file
|
||||||
Path file;
|
Path file;
|
||||||
strcpy(file, AddPath(CFG->nodepath, "goldnode.gxl"));
|
strcpy(file, AddPath(CFG->nodepath, "goldnode.gxl"));
|
||||||
long ft = GetFiletime(file);
|
time32_t ft = GetFiletime(file);
|
||||||
|
|
||||||
// Check nodelists if timestamp changed
|
// Check nodelists if timestamp changed
|
||||||
if(ft != oldft) {
|
if(ft != oldft) {
|
||||||
@ -1274,7 +1274,8 @@ void CheckNodelists() {
|
|||||||
waitkeyt(10000);
|
waitkeyt(10000);
|
||||||
w_info(NULL);
|
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);
|
w_infof(" %s %s ", LNG->NodelistOutdated, NODE->nodelist[n].fn);
|
||||||
HandleGEvent(EVTT_ATTENTION);
|
HandleGEvent(EVTT_ATTENTION);
|
||||||
waitkeyt(10000);
|
waitkeyt(10000);
|
||||||
|
@ -934,7 +934,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
|||||||
if(r) {
|
if(r) {
|
||||||
if(AA->Replyre() == REPLYRE_NUMERIC and not AA->isinternet()) {
|
if(AA->Replyre() == REPLYRE_NUMERIC and not AA->isinternet()) {
|
||||||
ISub subj;
|
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);
|
strcpy(msg->re, subj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ void GotoReplies() {
|
|||||||
cursorbar = replies;
|
cursorbar = replies;
|
||||||
rlist[replies].msgno[0] = (n==list_max+1) ? '*' : '+';
|
rlist[replies].msgno[0] = (n==list_max+1) ? '*' : '+';
|
||||||
uint32_t msgno = CFG->switches.get(disprealmsgno) ? msgn : reln;
|
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));
|
maxmsgno = MaxV(maxmsgno, (uint)strlen(rlist[replies].msgno+1));
|
||||||
strcpy(rlist[replies].name, rmsg->by);
|
strcpy(rlist[replies].name, rmsg->by);
|
||||||
maxname = MaxV(maxname, (uint)strlen(rlist[replies].name));
|
maxname = MaxV(maxname, (uint)strlen(rlist[replies].name));
|
||||||
|
@ -309,12 +309,12 @@ void GotoMsgno() {
|
|||||||
replies[replyn] = AA->Msgn.ToReln(reader_msg->link.list(replyn-1));
|
replies[replyn] = AA->Msgn.ToReln(reader_msg->link.list(replyn-1));
|
||||||
}
|
}
|
||||||
if(replyto)
|
if(replyto)
|
||||||
ptr += sprintf(ptr, " -%lu", long(replyto));
|
ptr += sprintf(ptr, " -%u", replyto);
|
||||||
for(int replyn=0,plus=0; replyn<list_max+1; replyn++)
|
for(int replyn=0,plus=0; replyn<list_max+1; replyn++)
|
||||||
if(replies[replyn])
|
if(replies[replyn])
|
||||||
ptr += sprintf(ptr, " %s%lu", (plus++?"":"+"), long(replies[replyn]));
|
ptr += sprintf(ptr, " %s%u", (plus++?"":"+"), replies[replyn]);
|
||||||
if(replynext)
|
if(replynext)
|
||||||
sprintf(ptr, " *%lu", long(replynext));
|
sprintf(ptr, " *%u", replynext);
|
||||||
|
|
||||||
if(inhdr) {
|
if(inhdr) {
|
||||||
HeaderView->window.activate_quick();
|
HeaderView->window.activate_quick();
|
||||||
|
@ -349,7 +349,7 @@ bool guserbase::edit_entry(uint idx) {
|
|||||||
if(dt)
|
if(dt)
|
||||||
window.prints(13, 38, wattr, strftimei(dbuf, 16, "%d %b %y", ggmtime(&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);
|
window.prints(13, width-11, wattr, dbuf);
|
||||||
|
|
||||||
addressbook_form form(window);
|
addressbook_form form(window);
|
||||||
|
@ -172,12 +172,12 @@ void GMsgHeaderView::Paint() {
|
|||||||
replies[replyn] = area->Msgn.ToReln(msg->link.list(replyn-1));
|
replies[replyn] = area->Msgn.ToReln(msg->link.list(replyn-1));
|
||||||
}
|
}
|
||||||
if(replyto)
|
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++)
|
for(int replyn=0,plus=0; (replyn<(list_max+1)) and (not attrsgenerated or ((ptr-buf)<CFG->disphdrnodeset.pos)); replyn++)
|
||||||
if(replies[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)))
|
if(replynext and (not attrsgenerated or ((ptr-buf)<CFG->disphdrnodeset.pos)))
|
||||||
sprintf(ptr, " *%lu", long(replynext));
|
sprintf(ptr, " *%u", replynext);
|
||||||
throw_free(replies);
|
throw_free(replies);
|
||||||
|
|
||||||
strsetsz(buf, attrsgenerated ? CFG->disphdrnodeset.pos : width);
|
strsetsz(buf, attrsgenerated ? CFG->disphdrnodeset.pos : width);
|
||||||
|
@ -702,10 +702,10 @@ char* ggetosstring(void) {
|
|||||||
strcpy(_tmp, info.szCSDVersion);
|
strcpy(_tmp, info.szCSDVersion);
|
||||||
strchg(_tmp, ' ', '_');
|
strchg(_tmp, ' ', '_');
|
||||||
strisrep(_tmp, "Service_Pack_", "SP");
|
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
|
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
|
else
|
||||||
strcpy(osstring, "Win32-unknown");
|
strcpy(osstring, "Win32-unknown");
|
||||||
|
Reference in New Issue
Block a user