TimerPool fixoutManipulator
git-svn-id: svn://db.shs.com.ru/pip@74 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user