got rid of off_t
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#ifndef _DIJON_FILTER_H
|
||||
#define _DIJON_FILTER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include <map>
|
||||
@@ -140,7 +141,7 @@ namespace Dijon
|
||||
stat() calls The value is stored inside metaData, docsize
|
||||
key
|
||||
*/
|
||||
virtual void set_docsize(off_t size) = 0;
|
||||
virtual void set_docsize(int64_t size) = 0;
|
||||
|
||||
// Going from one nested document to the next.
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include "safefcntl.h"
|
||||
#include <sys/types.h>
|
||||
#include "safesysstat.h"
|
||||
@@ -175,7 +176,7 @@ void FileInterner::init(const string &f, const struct stat *stp, RclConfig *cnf,
|
||||
l_mime = *imime;
|
||||
}
|
||||
|
||||
off_t docsize = stp->st_size;
|
||||
int64_t docsize = stp->st_size;
|
||||
|
||||
if (!l_mime.empty()) {
|
||||
// Has mime: check for a compressed file. If so, create a
|
||||
|
||||
@@ -107,13 +107,13 @@ bool MimeHandlerText::set_document_string_impl(const string& mt,
|
||||
bool MimeHandlerText::skip_to_document(const string& ipath)
|
||||
{
|
||||
char *endptr;
|
||||
long long t = strtoll(ipath.c_str(), &endptr, 10);
|
||||
int64_t t = strtoll(ipath.c_str(), &endptr, 10);
|
||||
if (endptr == ipath.c_str()) {
|
||||
LOGERR("MimeHandlerText::skip_to_document: bad ipath offs [" <<
|
||||
ipath << "]\n");
|
||||
return false;
|
||||
}
|
||||
m_offs = (off_t)t;
|
||||
m_offs = t;
|
||||
readnext();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
*/
|
||||
#ifndef _MH_TEXT_H_INCLUDED_
|
||||
#define _MH_TEXT_H_INCLUDED_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -59,7 +61,7 @@ private:
|
||||
bool m_paging;
|
||||
std::string m_text;
|
||||
std::string m_fn;
|
||||
off_t m_offs; // Offset of next read in file if we're paging
|
||||
int64_t m_offs; // Offset of next read in file if we're paging
|
||||
size_t m_pagesz;
|
||||
std::string m_charsetfromxattr;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
|
||||
#include "Filter.h"
|
||||
@@ -31,7 +31,7 @@ class RclConfig;
|
||||
class RecollFilter : public Dijon::Filter {
|
||||
public:
|
||||
RecollFilter(RclConfig *config, const std::string& id)
|
||||
: m_config(config), m_forPreview(false), m_havedoc(false), m_id(id) {
|
||||
: m_config(config), m_id(id) {
|
||||
}
|
||||
virtual ~RecollFilter() {}
|
||||
|
||||
@@ -82,11 +82,11 @@ public:
|
||||
return set_document_string(mtype, std::string(cp, sz));
|
||||
}
|
||||
|
||||
virtual void set_docsize(off_t size) {
|
||||
virtual void set_docsize(int64_t size) {
|
||||
m_docsize = size;
|
||||
}
|
||||
|
||||
virtual off_t get_docsize() const {
|
||||
virtual int64_t get_docsize() const {
|
||||
return m_docsize;
|
||||
}
|
||||
|
||||
@@ -146,15 +146,15 @@ protected:
|
||||
}
|
||||
|
||||
RclConfig *m_config;
|
||||
bool m_forPreview;
|
||||
bool m_forPreview{false};
|
||||
std::string m_dfltInputCharset;
|
||||
std::string m_reason;
|
||||
bool m_havedoc;
|
||||
bool m_havedoc{false};
|
||||
std::string m_udi; // May be set by creator as a hint
|
||||
// m_id is and md5 of the filter definition line (from mimeconf) and
|
||||
// is used when fetching/returning filters to / from the cache.
|
||||
std::string m_id;
|
||||
off_t m_docsize; // Size of the top document
|
||||
int64_t m_docsize{0}; // Size of the top document
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user