From 909439d45f864d9a7f8d0cc7807ec6169155985e Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Thu, 27 Oct 2005 20:10:32 +0000 Subject: [PATCH] Fix types incompatibility --- golded3/gepost.cpp | 2 +- golded3/geread.cpp | 2 +- golded3/geread2.cpp | 14 +++++++------- golded3/geusrbse.cpp | 2 +- golded3/geview.cpp | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/golded3/gepost.cpp b/golded3/gepost.cpp index 2aa83cb..82462ec 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", ((number+1) > number) ? (number+1) : number, r); + sprintf(subj, "Re^%lu:%s", long(((number+1) > number) ? (number+1) : number), r); strcpy(msg->re, subj); } } diff --git a/golded3/geread.cpp b/golded3/geread.cpp index fcf1283..e90465f 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", msgno); + sprintf(rlist[replies].msgno+1, "%lu", long(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 4b6c6a6..32883db 100644 --- a/golded3/geread2.cpp +++ b/golded3/geread2.cpp @@ -68,7 +68,7 @@ void ChangeAttributes() { // ------------------------------------------------------------------ void DecMargin() { - + if(CFG->dispmargin > (MAXCOL/3)) CFG->dispmargin--; else { @@ -309,12 +309,12 @@ void GotoMsgno() { replies[replyn] = AA->Msgn.ToReln(reader_msg->link.list(replyn-1)); } if(replyto) - ptr += sprintf(ptr, " -%lu", replyto); + ptr += sprintf(ptr, " -%lu", long(replyto)); for(int replyn=0,plus=0; replynwindow.activate_quick(); @@ -333,7 +333,7 @@ void GotoMsgno() { std::string fbuf = buf; gwinput2 iform(iwindow); - iform.setup(C_HEADW, C_HEADW, C_HEADI, _box_table(W_BHEAD, 13), true); + iform.setup(C_HEADW, C_HEADW, C_HEADI, _box_table(W_BHEAD, 13), true); iform.add_field(0, wrow, 8, 5, fbuf, 20, gwinput::cvt_none, gwinput::entry_new); vcurshow(); iform.run(H_InputMsgno); @@ -451,7 +451,7 @@ void ExitAsk() { // ------------------------------------------------------------------ void NewArea(bool jumpnext) { - + AA->attr().hex0(); if(AA->isopen()) AA->Close(); @@ -775,7 +775,7 @@ void ReadPeekURLs(GMsg* msg) { if(CFG->urlhandler.options & EXTUTIL_PAUSE) pauseval = 1; - ShellToDos(cmdline, "", + ShellToDos(cmdline, "", CFG->urlhandler.options & EXTUTIL_CLS ? LGREY|_BLACK : 0, CFG->urlhandler.options & EXTUTIL_CURSOR, pauseval diff --git a/golded3/geusrbse.cpp b/golded3/geusrbse.cpp index fc87ea0..60fb366 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", entry.times); + sprintf(dbuf, "%8ld", long(entry.times)); window.prints(13, width-11, wattr, dbuf); addressbook_form form(window); diff --git a/golded3/geview.cpp b/golded3/geview.cpp index f5140c1..0dc9d55 100644 --- a/golded3/geview.cpp +++ b/golded3/geview.cpp @@ -171,12 +171,12 @@ void GMsgHeaderView::Paint() { replies[replyn] = area->Msgn.ToReln(msg->link.list(replyn-1)); } if(replyto) - ptr += sprintf(ptr, " -%lu", replyto); + ptr += sprintf(ptr, " -%lu", long(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++?"":"+"), replies[replyn]); + ptr += sprintf(ptr, " %s%lu", plus++?"":"+", long(replies[replyn])); if(replynext and (not attrsgenerated or ((ptr-buf)disphdrnodeset.pos))) - sprintf(ptr, " *%lu", replynext); + sprintf(ptr, " *%lu", long(replynext)); throw_free(replies); strsetsz(buf, attrsgenerated ? CFG->disphdrnodeset.pos : width);