Lines Matching refs:pFile
82520 -static int apndClose(sqlite3_file *pFile){
82521 - pFile = ORIGFILE(pFile);
82522 - return pFile->pMethods->xClose(pFile);
82539 - sqlite3_file *pFile,
82544 - ApndFile *paf = (ApndFile *)pFile;
82545 - pFile = ORIGFILE(pFile);
82546 - return pFile->pMethods->xRead(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
82579 - sqlite3_file *pFile,
82590 - assert(pFile == ORIGFILE(paf));
82604 - if( SQLITE_OK==(rc = pFile->pMethods->xWrite
82605 - (pFile, a, APND_MARK_SIZE, iWriteEnd)) ){
82619 - sqlite3_file *pFile,
82624 - ApndFile *paf = (ApndFile *)pFile;
82627 - pFile = ORIGFILE(pFile);
82630 - int rc = apndWriteMark(paf, pFile, iWriteEnd);
82643 - return pFile->pMethods->xWrite(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
82684 -static int apndTruncate(sqlite3_file *pFile, sqlite_int64 size){
82685 - ApndFile *paf = (ApndFile *)pFile;
82686 - pFile = ORIGFILE(pFile);
82688 - if( SQLITE_OK!=apndWriteMark(paf, pFile, size) ) return SQLITE_IOERR;
82690 - return pFile->pMethods->xTruncate(pFile, paf->iMark+APND_MARK_SIZE);
82707 -static int apndSync(sqlite3_file *pFile, int flags){
82708 - pFile = ORIGFILE(pFile);
82709 - return pFile->pMethods->xSync(pFile, flags);
82720 -static int apndFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){
82721 - ApndFile *paf = (ApndFile *)pFile;
82794 -static int apndLock(sqlite3_file *pFile, int eLock){
82795 - pFile = ORIGFILE(pFile);
82796 - return pFile->pMethods->xLock(pFile, eLock);
82828 -static int apndUnlock(sqlite3_file *pFile, int eLock){
82829 - pFile = ORIGFILE(pFile);
82830 - return pFile->pMethods->xUnlock(pFile, eLock);
82837 -static int apndCheckReservedLock(sqlite3_file *pFile, int *pResOut){
82838 - pFile = ORIGFILE(pFile);
82839 - return pFile->pMethods->xCheckReservedLock(pFile, pResOut);
82846 -static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
82847 - ApndFile *paf = (ApndFile *)pFile;
82849 - pFile = ORIGFILE(pFile);
82851 - rc = pFile->pMethods->xFileControl(pFile, op, pArg);
82934 -static int apndSectorSize(sqlite3_file *pFile){
82935 - pFile = ORIGFILE(pFile);
82936 - return pFile->pMethods->xSectorSize(pFile);
82949 -static int apndDeviceCharacteristics(sqlite3_file *pFile){
82950 - pFile = ORIGFILE(pFile);
82951 - return pFile->pMethods->xDeviceCharacteristics(pFile);
82959 - sqlite3_file *pFile,
82965 - pFile = ORIGFILE(pFile);
82966 - return pFile->pMethods->xShmMap(pFile,iPg,pgsz,bExtend,pp);
82972 -static int apndShmLock(sqlite3_file *pFile, int offset, int n, int flags){
82973 - pFile = ORIGFILE(pFile);
82974 - return pFile->pMethods->xShmLock(pFile,offset,n,flags);
82998 -static void apndShmBarrier(sqlite3_file *pFile){
82999 - pFile = ORIGFILE(pFile);
83000 - pFile->pMethods->xShmBarrier(pFile);
83006 -static int apndShmUnmap(sqlite3_file *pFile, int deleteFlag){
83007 - pFile = ORIGFILE(pFile);
83008 - return pFile->pMethods->xShmUnmap(pFile,deleteFlag);
83053 - sqlite3_file *pFile,
83058 - ApndFile *p = (ApndFile *)pFile;
83089 - pFile = ORIGFILE(pFile);
83090 - return pFile->pMethods->xFetch(pFile, iOfst+p->iPgOne, iAmt, pp);
83100 -static int apndUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *pPage){
83101 - ApndFile *p = (ApndFile *)pFile;
83102 - pFile = ORIGFILE(pFile);
83103 - return pFile->pMethods->xUnfetch(pFile, iOfst+p->iPgOne, pPage);
83119 -static sqlite3_int64 apndReadMark(sqlite3_int64 sz, sqlite3_file *pFile){
83130 - rc = pFile->pMethods->xRead(pFile, a, APND_MARK_SIZE, sz-APND_MARK_SIZE);
83153 -static int apndIsAppendvfsDatabase(sqlite3_int64 sz, sqlite3_file *pFile){
83156 - sqlite3_int64 iMark = apndReadMark(sz, pFile);
83162 - rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), iMark);
83590 -static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){
83592 - if( apndIsAppendvfsDatabase(sz, pFile) /* rule 2 */
83594 - || SQLITE_OK!=pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), 0)
83618 - sqlite3_file *pFile,
83622 - ApndFile *pApndFile = (ApndFile*)pFile;
83623 - sqlite3_file *pBaseFile = ORIGFILE(pFile);
83632 - return pBaseVfs->xOpen(pBaseVfs, zName, pFile, flags, pOutFlags);
83635 - pFile->pMethods = &apnd_io_methods;
83654 - pFile->pMethods = 0;
83673 - pApndFile->iPgOne = apndReadMark(sz, pFile);
83688 - pFile->pMethods = 0;
87065 +static int apndClose(sqlite3_file *pFile){
87066 + pFile = ORIGFILE(pFile);
87067 + return pFile->pMethods->xClose(pFile);
87077 + sqlite3_file *pFile,
87082 + ApndFile *paf = (ApndFile *)pFile;
87083 + pFile = ORIGFILE(pFile);
87084 + return pFile->pMethods->xRead(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
87228 + sqlite3_file *pFile,
87235 + assert(pFile == ORIGFILE(paf));
87244 + if( SQLITE_OK==(rc = pFile->pMethods->xWrite
87245 + (pFile, a, APND_MARK_SIZE, iWriteEnd)) ){
87269 + sqlite3_file *pFile,
87274 + ApndFile *paf = (ApndFile *)pFile;
87277 + pFile = ORIGFILE(pFile);
87280 + int rc = apndWriteMark(paf, pFile, iWriteEnd);
87283 + return pFile->pMethods->xWrite(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
87302 +static int apndTruncate(sqlite3_file *pFile, sqlite_int64 size){
87303 + ApndFile *paf = (ApndFile *)pFile;
87304 + pFile = ORIGFILE(pFile);
87306 + if( SQLITE_OK!=apndWriteMark(paf, pFile, size) ) return SQLITE_IOERR;
87308 + return pFile->pMethods->xTruncate(pFile, paf->iMark+APND_MARK_SIZE);
87317 +static int apndSync(sqlite3_file *pFile, int flags){
87318 + pFile = ORIGFILE(pFile);
87319 + return pFile->pMethods->xSync(pFile, flags);
87333 +static int apndFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){
87334 + ApndFile *paf = (ApndFile *)pFile;
87357 +static int apndLock(sqlite3_file *pFile, int eLock){
87358 + pFile = ORIGFILE(pFile);
87359 + return pFile->pMethods->xLock(pFile, eLock);
87402 +static int apndUnlock(sqlite3_file *pFile, int eLock){
87403 + pFile = ORIGFILE(pFile);
87404 + return pFile->pMethods->xUnlock(pFile, eLock);
87416 +static int apndCheckReservedLock(sqlite3_file *pFile, int *pResOut){
87417 + pFile = ORIGFILE(pFile);
87418 + return pFile->pMethods->xCheckReservedLock(pFile, pResOut);
87441 +static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
87442 + ApndFile *paf = (ApndFile *)pFile;
87444 + pFile = ORIGFILE(pFile);
87446 + rc = pFile->pMethods->xFileControl(pFile, op, pArg);
87591 +static int apndSectorSize(sqlite3_file *pFile){
87592 + pFile = ORIGFILE(pFile);
87593 + return pFile->pMethods->xSectorSize(pFile);
87599 +static int apndDeviceCharacteristics(sqlite3_file *pFile){
87600 + pFile = ORIGFILE(pFile);
87601 + return pFile->pMethods->xDeviceCharacteristics(pFile);
87606 + sqlite3_file *pFile,
87612 + pFile = ORIGFILE(pFile);
87613 + return pFile->pMethods->xShmMap(pFile,iPg,pgsz,bExtend,pp);
87617 +static int apndShmLock(sqlite3_file *pFile, int offset, int n, int flags){
87618 + pFile = ORIGFILE(pFile);
87619 + return pFile->pMethods->xShmLock(pFile,offset,n,flags);
87623 +static void apndShmBarrier(sqlite3_file *pFile){
87624 + pFile = ORIGFILE(pFile);
87625 + pFile->pMethods->xShmBarrier(pFile);
87629 +static int apndShmUnmap(sqlite3_file *pFile, int deleteFlag){
87630 + pFile = ORIGFILE(pFile);
87631 + return pFile->pMethods->xShmUnmap(pFile,deleteFlag);
87636 + sqlite3_file *pFile,
87641 + ApndFile *p = (ApndFile *)pFile;
87645 + pFile = ORIGFILE(pFile);
87646 + return pFile->pMethods->xFetch(pFile, iOfst+p->iPgOne, iAmt, pp);
87650 +static int apndUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *pPage){
87651 + ApndFile *p = (ApndFile *)pFile;
87652 + pFile = ORIGFILE(pFile);
87653 + return pFile->pMethods->xUnfetch(pFile, iOfst+p->iPgOne, pPage);
87665 +static sqlite3_int64 apndReadMark(sqlite3_int64 sz, sqlite3_file *pFile){
87672 + rc = pFile->pMethods->xRead(pFile, a, APND_MARK_SIZE, sz-APND_MARK_SIZE);
87690 +static int apndIsAppendvfsDatabase(sqlite3_int64 sz, sqlite3_file *pFile){
87693 + sqlite3_int64 iMark = apndReadMark(sz, pFile);
87699 + rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), iMark);
87724 +static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){
87726 + if( apndIsAppendvfsDatabase(sz, pFile) /* rule 2 */
87728 + || SQLITE_OK!=pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), 0)
87751 + sqlite3_file *pFile,
87755 + ApndFile *pApndFile = (ApndFile*)pFile;
87756 + sqlite3_file *pBaseFile = ORIGFILE(pFile);
87765 + return pBaseVfs->xOpen(pBaseVfs, zName, pFile, flags, pOutFlags);
87768 + pFile->pMethods = &apnd_io_methods;
87788 + pFile->pMethods = 0;
87809 + pApndFile->iPgOne = apndReadMark(sz, pFile);
87824 + pFile->pMethods = 0;
120155 -static int apndClose(sqlite3_file *pFile){
120156 - pFile = ORIGFILE(pFile);
120157 - return pFile->pMethods->xClose(pFile);
120174 - sqlite3_file *pFile,
120179 - ApndFile *paf = (ApndFile *)pFile;
120180 - pFile = ORIGFILE(pFile);
120181 - return pFile->pMethods->xRead(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
120214 - sqlite3_file *pFile,
120225 - assert(pFile == ORIGFILE(paf));
120239 - if( SQLITE_OK==(rc = pFile->pMethods->xWrite
120240 - (pFile, a, APND_MARK_SIZE, iWriteEnd)) ){
120254 - sqlite3_file *pFile,
120259 - ApndFile *paf = (ApndFile *)pFile;
120262 - pFile = ORIGFILE(pFile);
120265 - int rc = apndWriteMark(paf, pFile, iWriteEnd);
120278 - return pFile->pMethods->xWrite(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
120319 -static int apndTruncate(sqlite3_file *pFile, sqlite_int64 size){
120320 - ApndFile *paf = (ApndFile *)pFile;
120321 - pFile = ORIGFILE(pFile);
120323 - if( SQLITE_OK!=apndWriteMark(paf, pFile, size) ) return SQLITE_IOERR;
120325 - return pFile->pMethods->xTruncate(pFile, paf->iMark+APND_MARK_SIZE);
120342 -static int apndSync(sqlite3_file *pFile, int flags){
120343 - pFile = ORIGFILE(pFile);
120344 - return pFile->pMethods->xSync(pFile, flags);
120355 -static int apndFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){
120356 - ApndFile *paf = (ApndFile *)pFile;
120429 -static int apndLock(sqlite3_file *pFile, int eLock){
120430 - pFile = ORIGFILE(pFile);
120431 - return pFile->pMethods->xLock(pFile, eLock);
120463 -static int apndUnlock(sqlite3_file *pFile, int eLock){
120464 - pFile = ORIGFILE(pFile);
120465 - return pFile->pMethods->xUnlock(pFile, eLock);
120472 -static int apndCheckReservedLock(sqlite3_file *pFile, int *pResOut){
120473 - pFile = ORIGFILE(pFile);
120474 - return pFile->pMethods->xCheckReservedLock(pFile, pResOut);
120481 -static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
120482 - ApndFile *paf = (ApndFile *)pFile;
120484 - pFile = ORIGFILE(pFile);
120486 - rc = pFile->pMethods->xFileControl(pFile, op, pArg);
120569 -static int apndSectorSize(sqlite3_file *pFile){
120570 - pFile = ORIGFILE(pFile);
120571 - return pFile->pMethods->xSectorSize(pFile);
120584 -static int apndDeviceCharacteristics(sqlite3_file *pFile){
120585 - pFile = ORIGFILE(pFile);
120586 - return pFile->pMethods->xDeviceCharacteristics(pFile);
120594 - sqlite3_file *pFile,
120600 - pFile = ORIGFILE(pFile);
120601 - return pFile->pMethods->xShmMap(pFile,iPg,pgsz,bExtend,pp);
120607 -static int apndShmLock(sqlite3_file *pFile, int offset, int n, int flags){
120608 - pFile = ORIGFILE(pFile);
120609 - return pFile->pMethods->xShmLock(pFile,offset,n,flags);
120633 -static void apndShmBarrier(sqlite3_file *pFile){
120634 - pFile = ORIGFILE(pFile);
120635 - pFile->pMethods->xShmBarrier(pFile);
120641 -static int apndShmUnmap(sqlite3_file *pFile, int deleteFlag){
120642 - pFile = ORIGFILE(pFile);
120643 - return pFile->pMethods->xShmUnmap(pFile,deleteFlag);
120688 - sqlite3_file *pFile,
120693 - ApndFile *p = (ApndFile *)pFile;
120724 - pFile = ORIGFILE(pFile);
120725 - return pFile->pMethods->xFetch(pFile, iOfst+p->iPgOne, iAmt, pp);
120735 -static int apndUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *pPage){
120736 - ApndFile *p = (ApndFile *)pFile;
120737 - pFile = ORIGFILE(pFile);
120738 - return pFile->pMethods->xUnfetch(pFile, iOfst+p->iPgOne, pPage);
120754 -static sqlite3_int64 apndReadMark(sqlite3_int64 sz, sqlite3_file *pFile){
120765 - rc = pFile->pMethods->xRead(pFile, a, APND_MARK_SIZE, sz-APND_MARK_SIZE);
120788 -static int apndIsAppendvfsDatabase(sqlite3_int64 sz, sqlite3_file *pFile){
120791 - sqlite3_int64 iMark = apndReadMark(sz, pFile);
120797 - rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), iMark);
121225 -static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){
121227 - if( apndIsAppendvfsDatabase(sz, pFile) /* rule 2 */
121229 - || SQLITE_OK!=pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), 0)
121253 - sqlite3_file *pFile,
121257 - ApndFile *pApndFile = (ApndFile*)pFile;
121258 - sqlite3_file *pBaseFile = ORIGFILE(pFile);
121267 - return pBaseVfs->xOpen(pBaseVfs, zName, pFile, flags, pOutFlags);
121270 - pFile->pMethods = &apnd_io_methods;
121289 - pFile->pMethods = 0;
121308 - pApndFile->iPgOne = apndReadMark(sz, pFile);
121323 - pFile->pMethods = 0;
124700 +static int apndClose(sqlite3_file *pFile){
124701 + pFile = ORIGFILE(pFile);
124702 + return pFile->pMethods->xClose(pFile);
124712 + sqlite3_file *pFile,
124717 + ApndFile *paf = (ApndFile *)pFile;
124718 + pFile = ORIGFILE(pFile);
124719 + return pFile->pMethods->xRead(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
124863 + sqlite3_file *pFile,
124870 + assert(pFile == ORIGFILE(paf));
124879 + if( SQLITE_OK==(rc = pFile->pMethods->xWrite
124880 + (pFile, a, APND_MARK_SIZE, iWriteEnd)) ){
124904 + sqlite3_file *pFile,
124909 + ApndFile *paf = (ApndFile *)pFile;
124912 + pFile = ORIGFILE(pFile);
124915 + int rc = apndWriteMark(paf, pFile, iWriteEnd);
124918 + return pFile->pMethods->xWrite(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
124937 +static int apndTruncate(sqlite3_file *pFile, sqlite_int64 size){
124938 + ApndFile *paf = (ApndFile *)pFile;
124939 + pFile = ORIGFILE(pFile);
124941 + if( SQLITE_OK!=apndWriteMark(paf, pFile, size) ) return SQLITE_IOERR;
124943 + return pFile->pMethods->xTruncate(pFile, paf->iMark+APND_MARK_SIZE);
124952 +static int apndSync(sqlite3_file *pFile, int flags){
124953 + pFile = ORIGFILE(pFile);
124954 + return pFile->pMethods->xSync(pFile, flags);
124968 +static int apndFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){
124969 + ApndFile *paf = (ApndFile *)pFile;
124992 +static int apndLock(sqlite3_file *pFile, int eLock){
124993 + pFile = ORIGFILE(pFile);
124994 + return pFile->pMethods->xLock(pFile, eLock);
125037 +static int apndUnlock(sqlite3_file *pFile, int eLock){
125038 + pFile = ORIGFILE(pFile);
125039 + return pFile->pMethods->xUnlock(pFile, eLock);
125051 +static int apndCheckReservedLock(sqlite3_file *pFile, int *pResOut){
125052 + pFile = ORIGFILE(pFile);
125053 + return pFile->pMethods->xCheckReservedLock(pFile, pResOut);
125076 +static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
125077 + ApndFile *paf = (ApndFile *)pFile;
125079 + pFile = ORIGFILE(pFile);
125081 + rc = pFile->pMethods->xFileControl(pFile, op, pArg);
125226 +static int apndSectorSize(sqlite3_file *pFile){
125227 + pFile = ORIGFILE(pFile);
125228 + return pFile->pMethods->xSectorSize(pFile);
125234 +static int apndDeviceCharacteristics(sqlite3_file *pFile){
125235 + pFile = ORIGFILE(pFile);
125236 + return pFile->pMethods->xDeviceCharacteristics(pFile);
125241 + sqlite3_file *pFile,
125247 + pFile = ORIGFILE(pFile);
125248 + return pFile->pMethods->xShmMap(pFile,iPg,pgsz,bExtend,pp);
125252 +static int apndShmLock(sqlite3_file *pFile, int offset, int n, int flags){
125253 + pFile = ORIGFILE(pFile);
125254 + return pFile->pMethods->xShmLock(pFile,offset,n,flags);
125258 +static void apndShmBarrier(sqlite3_file *pFile){
125259 + pFile = ORIGFILE(pFile);
125260 + pFile->pMethods->xShmBarrier(pFile);
125264 +static int apndShmUnmap(sqlite3_file *pFile, int deleteFlag){
125265 + pFile = ORIGFILE(pFile);
125266 + return pFile->pMethods->xShmUnmap(pFile,deleteFlag);
125271 + sqlite3_file *pFile,
125276 + ApndFile *p = (ApndFile *)pFile;
125280 + pFile = ORIGFILE(pFile);
125281 + return pFile->pMethods->xFetch(pFile, iOfst+p->iPgOne, iAmt, pp);
125285 +static int apndUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *pPage){
125286 + ApndFile *p = (ApndFile *)pFile;
125287 + pFile = ORIGFILE(pFile);
125288 + return pFile->pMethods->xUnfetch(pFile, iOfst+p->iPgOne, pPage);
125300 +static sqlite3_int64 apndReadMark(sqlite3_int64 sz, sqlite3_file *pFile){
125307 + rc = pFile->pMethods->xRead(pFile, a, APND_MARK_SIZE, sz-APND_MARK_SIZE);
125325 +static int apndIsAppendvfsDatabase(sqlite3_int64 sz, sqlite3_file *pFile){
125328 + sqlite3_int64 iMark = apndReadMark(sz, pFile);
125334 + rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), iMark);
125359 +static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){
125361 + if( apndIsAppendvfsDatabase(sz, pFile) /* rule 2 */
125363 + || SQLITE_OK!=pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), 0)
125386 + sqlite3_file *pFile,
125390 + ApndFile *pApndFile = (ApndFile*)pFile;
125391 + sqlite3_file *pBaseFile = ORIGFILE(pFile);
125400 + return pBaseVfs->xOpen(pBaseVfs, zName, pFile, flags, pOutFlags);
125403 + pFile->pMethods = &apnd_io_methods;
125423 + pFile->pMethods = 0;
125444 + pApndFile->iPgOne = apndReadMark(sz, pFile);
125459 + pFile->pMethods = 0;