TimerPool fixoutManipulator

git-svn-id: svn://db.shs.com.ru/pip@74 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2015-04-07 13:40:17 +00:00
parent 0f4e2b5f4c
commit 529b3c615f
3 changed files with 11 additions and 9 deletions

View File

@@ -217,9 +217,9 @@ PIByteArray PIFile::readAll(bool forceRead) {
llong PIFile::size() const {
if (!opened_) return -1;
llong s, cp = pos();
lseek64(fdi, 0, SEEK_END); clearerr(fd);
fseeko64(fd, 0, SEEK_END); clearerr(fd);
s = pos();
lseek64(fdi, cp, SEEK_SET); clearerr(fd);
fseeko64(fd, cp, SEEK_SET); clearerr(fd);
return s;
}
@@ -278,21 +278,21 @@ void PIFile::flush() {
void PIFile::seek(llong position) {
if (!opened_) return;
lseek64(fdi, position, SEEK_SET);
fseeko64(fd, position, SEEK_SET);
clearerr(fd);
}
void PIFile::seekToBegin() {
if (!opened_) return;
lseek64(fdi, 0, SEEK_SET);
fseeko64(fd, 0, SEEK_SET);
clearerr(fd);
}
void PIFile::seekToEnd() {
if (!opened_) return;
lseek64(fdi, 0, SEEK_END);
fseeko64(fd, 0, SEEK_END);
clearerr(fd);
}
@@ -318,7 +318,7 @@ void PIFile::setPath(const PIString & path) {
llong PIFile::pos() const {
if (!opened_) return -1;
return ftell(fd);
return ftello64(fd);
}