mirror of
https://github.com/Dushistov/sdcv.git
synced 2026-01-14 22:09:47 +00:00
Use off_t for stuff mainly assigned to a stat.st_size value
Allows simplifying the mmap sanity checks in mapfile, and actually ensuring they won't break when -D_FILE_OFFSET_BITS=64
This commit is contained in:
committed by
Evgeniy Dushistov
parent
b698445ead
commit
488ec68854
@@ -77,8 +77,8 @@ struct DictInfo {
|
||||
std::string website;
|
||||
std::string date;
|
||||
std::string description;
|
||||
guint32 index_file_size;
|
||||
guint32 syn_file_size;
|
||||
off_t index_file_size;
|
||||
off_t syn_file_size;
|
||||
std::string sametypesequence;
|
||||
|
||||
bool load_from_ifo_file(const std::string &ifofilename, bool istreedict);
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
guint32 wordentry_size;
|
||||
|
||||
virtual ~IIndexFile() {}
|
||||
virtual bool load(const std::string &url, gulong wc, gulong fsize, bool verbose) = 0;
|
||||
virtual bool load(const std::string &url, gulong wc, off_t fsize, bool verbose) = 0;
|
||||
virtual const gchar *get_key(glong idx) = 0;
|
||||
virtual void get_data(glong idx) = 0;
|
||||
virtual const gchar *get_key_and_data(glong idx) = 0;
|
||||
@@ -160,7 +160,7 @@ private:
|
||||
std::unique_ptr<IIndexFile> idx_file;
|
||||
std::unique_ptr<SynFile> syn_file;
|
||||
|
||||
bool load_ifofile(const std::string &ifofilename, gulong &idxfilesize);
|
||||
bool load_ifofile(const std::string &ifofilename, off_t &idxfilesize);
|
||||
};
|
||||
|
||||
class Libs
|
||||
|
||||
Reference in New Issue
Block a user