diff --git a/src/qtgui/preview_w.cpp b/src/qtgui/preview_w.cpp index cbef198d..4257168a 100644 --- a/src/qtgui/preview_w.cpp +++ b/src/qtgui/preview_w.cpp @@ -612,7 +612,7 @@ void Preview::setCurTabProps(const Rcl::Doc &doc, int docnum) datebuf[0] = 0; if (!doc.fmtime.empty() || !doc.dmtime.empty()) { time_t mtime = doc.dmtime.empty() ? - atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str()); + atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str()); struct tm *tm = localtime(&mtime); strftime(datebuf, 99, "%Y-%m-%d %H:%M:%S", tm); } diff --git a/src/qtgui/restable.cpp b/src/qtgui/restable.cpp index eccff002..9c68a408 100644 --- a/src/qtgui/restable.cpp +++ b/src/qtgui/restable.cpp @@ -184,7 +184,7 @@ static string dategetter(const string&, const Rcl::Doc& doc) datebuf[0] = 0; if (!doc.dmtime.empty() || !doc.fmtime.empty()) { time_t mtime = doc.dmtime.empty() ? - atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str()); + atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str()); struct tm *tm = localtime(&mtime); strftime(datebuf, 99, "%Y-%m-%d", tm); } @@ -197,7 +197,7 @@ static string datetimegetter(const string&, const Rcl::Doc& doc) datebuf[0] = 0; if (!doc.dmtime.empty() || !doc.fmtime.empty()) { time_t mtime = doc.dmtime.empty() ? - atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str()); + atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str()); struct tm *tm = localtime(&mtime); strftime(datebuf, 99, "%Y-%m-%d %H:%M:%S %z", tm); } diff --git a/src/query/docseqhist.cpp b/src/query/docseqhist.cpp index f8d453e4..2837325a 100644 --- a/src/query/docseqhist.cpp +++ b/src/query/docseqhist.cpp @@ -56,18 +56,18 @@ bool RclDHistoryEntry::decode(const string &value) switch (vall.size()) { case 2: // Old fn+ipath, null ipath case - unixtime = atol((*it++).c_str()); + unixtime = atoll((*it++).c_str()); base64_decode(*it++, fn); break; case 3: if (!it->compare("U")) { // New udi-based entry it++; - unixtime = atol((*it++).c_str()); + unixtime = atoll((*it++).c_str()); base64_decode(*it++, udi); } else { // Old fn + ipath. We happen to know how to build an udi - unixtime = atol((*it++).c_str()); + unixtime = atoll((*it++).c_str()); base64_decode(*it++, fn); base64_decode(*it, ipath); } diff --git a/src/query/reslistpager.cpp b/src/query/reslistpager.cpp index 71e134df..3bccfb35 100644 --- a/src/query/reslistpager.cpp +++ b/src/query/reslistpager.cpp @@ -187,7 +187,7 @@ void ResListPager::displayDoc(RclConfig *config, int i, Rcl::Doc& doc, datebuf[0] = 0; if (!doc.dmtime.empty() || !doc.fmtime.empty()) { time_t mtime = doc.dmtime.empty() ? - atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str()); + atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str()); struct tm *tm = localtime(&mtime); strftime(datebuf, 99, dateFormat().c_str(), tm); } @@ -195,9 +195,9 @@ void ResListPager::displayDoc(RclConfig *config, int i, Rcl::Doc& doc, // Size information. We print both doc and file if they differ a lot off_t fsize = -1, dsize = -1; if (!doc.dbytes.empty()) - dsize = atol(doc.dbytes.c_str()); + dsize = atoll(doc.dbytes.c_str()); if (!doc.fbytes.empty()) - fsize = atol(doc.fbytes.c_str()); + fsize = atoll(doc.fbytes.c_str()); string sizebuf; if (dsize > 0) { sizebuf = displayableBytes(dsize); diff --git a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp index b97d3ce7..37013a58 100644 --- a/src/rcldb/rcldb.cpp +++ b/src/rcldb/rcldb.cpp @@ -1008,7 +1008,7 @@ bool Db::addOrUpdate(const string &udi, const string &parent_udi, Doc &doc) newdocument.add_term(make_parentterm(parent_udi)); } // Dates etc. - time_t mtime = atol(doc.dmtime.empty() ? doc.fmtime.c_str() : + time_t mtime = atoll(doc.dmtime.empty() ? doc.fmtime.c_str() : doc.dmtime.c_str()); struct tm *tm = localtime(&mtime); char buf[9]; diff --git a/src/utils/circache.cpp b/src/utils/circache.cpp index fa5534c5..ba89e616 100644 --- a/src/utils/circache.cpp +++ b/src/utils/circache.cpp @@ -367,22 +367,22 @@ public: m_reason << "readfirstblock: conf get maxsize failed"; return false; } - m_maxsize = atol(value.c_str()); + m_maxsize = atoll(value.c_str()); if (!conf.get("oheadoffs", value, cstr_null)) { m_reason << "readfirstblock: conf get oheadoffs failed"; return false; } - m_oheadoffs = atol(value.c_str()); + m_oheadoffs = atoll(value.c_str()); if (!conf.get("nheadoffs", value, cstr_null)) { m_reason << "readfirstblock: conf get nheadoffs failed"; return false; } - m_nheadoffs = atol(value.c_str()); + m_nheadoffs = atoll(value.c_str()); if (!conf.get("npadsize", value, cstr_null)) { m_reason << "readfirstblock: conf get npadsize failed"; return false; } - m_npadsize = atol(value.c_str()); + m_npadsize = atoll(value.c_str()); if (!conf.get("unient", value, cstr_null)) { m_uniquentries = false; } else { diff --git a/src/utils/readfile.cpp b/src/utils/readfile.cpp index 27977b4b..dca729c5 100644 --- a/src/utils/readfile.cpp +++ b/src/utils/readfile.cpp @@ -234,10 +234,10 @@ int main(int argc, const char **argv) while (**argv) switch (*(*argv)++) { case 'c': op_flags |= OPT_c; if (argc < 2) Usage(); - cnt = atol(*(++argv)); argc--; + cnt = atoll(*(++argv)); argc--; goto b1; case 'o': op_flags |= OPT_o; if (argc < 2) Usage(); - offs = strtoul(*(++argv), 0, 0); argc--; + offs = strtoull(*(++argv), 0, 0); argc--; goto b1; default: Usage(); break; }