Lines Matching refs:pFile

3582 static int apndClose(sqlite3_file *pFile){  in apndClose()  argument
3583 pFile = ORIGFILE(pFile); in apndClose()
3584 return pFile->pMethods->xClose(pFile); in apndClose()
3591 sqlite3_file *pFile, in apndRead() argument
3596 ApndFile *p = (ApndFile *)pFile; in apndRead()
3597 pFile = ORIGFILE(pFile); in apndRead()
3598 return pFile->pMethods->xRead(pFile, zBuf, iAmt, iOfst+p->iPgOne); in apndRead()
3604 static int apndWriteMark(ApndFile *p, sqlite3_file *pFile){ in apndWriteMark() argument
3611 return pFile->pMethods->xWrite(pFile, a, APND_MARK_SIZE, p->iMark); in apndWriteMark()
3618 sqlite3_file *pFile, in apndWrite() argument
3624 ApndFile *p = (ApndFile *)pFile; in apndWrite()
3625 pFile = ORIGFILE(pFile); in apndWrite()
3627 rc = pFile->pMethods->xWrite(pFile, zBuf, iAmt, iOfst+p->iPgOne); in apndWrite()
3630 rc = pFile->pMethods->xFileSize(pFile, &sz); in apndWrite()
3635 rc = apndWriteMark(p, pFile); in apndWrite()
3645 static int apndTruncate(sqlite3_file *pFile, sqlite_int64 size){ in apndTruncate() argument
3647 ApndFile *p = (ApndFile *)pFile; in apndTruncate()
3648 pFile = ORIGFILE(pFile); in apndTruncate()
3649 rc = pFile->pMethods->xTruncate(pFile, size+p->iPgOne+APND_MARK_SIZE); in apndTruncate()
3652 rc = apndWriteMark(p, pFile); in apndTruncate()
3660 static int apndSync(sqlite3_file *pFile, int flags){ in apndSync() argument
3661 pFile = ORIGFILE(pFile); in apndSync()
3662 return pFile->pMethods->xSync(pFile, flags); in apndSync()
3668 static int apndFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){ in apndFileSize() argument
3669 ApndFile *p = (ApndFile *)pFile; in apndFileSize()
3671 pFile = ORIGFILE(p); in apndFileSize()
3672 rc = pFile->pMethods->xFileSize(pFile, pSize); in apndFileSize()
3682 static int apndLock(sqlite3_file *pFile, int eLock){ in apndLock() argument
3683 pFile = ORIGFILE(pFile); in apndLock()
3684 return pFile->pMethods->xLock(pFile, eLock); in apndLock()
3690 static int apndUnlock(sqlite3_file *pFile, int eLock){ in apndUnlock() argument
3691 pFile = ORIGFILE(pFile); in apndUnlock()
3692 return pFile->pMethods->xUnlock(pFile, eLock); in apndUnlock()
3698 static int apndCheckReservedLock(sqlite3_file *pFile, int *pResOut){ in apndCheckReservedLock() argument
3699 pFile = ORIGFILE(pFile); in apndCheckReservedLock()
3700 return pFile->pMethods->xCheckReservedLock(pFile, pResOut); in apndCheckReservedLock()
3706 static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){ in apndFileControl() argument
3707 ApndFile *p = (ApndFile *)pFile; in apndFileControl()
3709 pFile = ORIGFILE(pFile); in apndFileControl()
3710 rc = pFile->pMethods->xFileControl(pFile, op, pArg); in apndFileControl()
3720 static int apndSectorSize(sqlite3_file *pFile){ in apndSectorSize() argument
3721 pFile = ORIGFILE(pFile); in apndSectorSize()
3722 return pFile->pMethods->xSectorSize(pFile); in apndSectorSize()
3728 static int apndDeviceCharacteristics(sqlite3_file *pFile){ in apndDeviceCharacteristics() argument
3729 pFile = ORIGFILE(pFile); in apndDeviceCharacteristics()
3730 return pFile->pMethods->xDeviceCharacteristics(pFile); in apndDeviceCharacteristics()
3735 sqlite3_file *pFile, in apndShmMap() argument
3741 pFile = ORIGFILE(pFile); in apndShmMap()
3742 return pFile->pMethods->xShmMap(pFile,iPg,pgsz,bExtend,pp); in apndShmMap()
3746 static int apndShmLock(sqlite3_file *pFile, int offset, int n, int flags){ in apndShmLock() argument
3747 pFile = ORIGFILE(pFile); in apndShmLock()
3748 return pFile->pMethods->xShmLock(pFile,offset,n,flags); in apndShmLock()
3752 static void apndShmBarrier(sqlite3_file *pFile){ in apndShmBarrier() argument
3753 pFile = ORIGFILE(pFile); in apndShmBarrier()
3754 pFile->pMethods->xShmBarrier(pFile); in apndShmBarrier()
3758 static int apndShmUnmap(sqlite3_file *pFile, int deleteFlag){ in apndShmUnmap() argument
3759 pFile = ORIGFILE(pFile); in apndShmUnmap()
3760 return pFile->pMethods->xShmUnmap(pFile,deleteFlag); in apndShmUnmap()
3765 sqlite3_file *pFile, in apndFetch() argument
3770 ApndFile *p = (ApndFile *)pFile; in apndFetch()
3771 pFile = ORIGFILE(pFile); in apndFetch()
3772 return pFile->pMethods->xFetch(pFile, iOfst+p->iPgOne, iAmt, pp); in apndFetch()
3776 static int apndUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *pPage){ in apndUnfetch() argument
3777 ApndFile *p = (ApndFile *)pFile; in apndUnfetch()
3778 pFile = ORIGFILE(pFile); in apndUnfetch()
3779 return pFile->pMethods->xUnfetch(pFile, iOfst+p->iPgOne, pPage); in apndUnfetch()
3785 static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){ in apndIsOrdinaryDatabaseFile() argument
3790 rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), 0); in apndIsOrdinaryDatabaseFile()
3800 static sqlite3_int64 apndReadMark(sqlite3_int64 sz, sqlite3_file *pFile){ in apndReadMark() argument
3806 rc = pFile->pMethods->xRead(pFile, a, APND_MARK_SIZE, sz-APND_MARK_SIZE); in apndReadMark()
3822 sqlite3_file *pFile, in apndOpen() argument
3833 return pSubVfs->xOpen(pSubVfs, zName, pFile, flags, pOutFlags); in apndOpen()
3835 p = (ApndFile*)pFile; in apndOpen()
3837 pSubFile = ORIGFILE(pFile); in apndOpen()
3847 memmove(pFile, pSubFile, pSubVfs->szOsFile); in apndOpen()
3851 p->iPgOne = apndReadMark(sz, pFile); in apndOpen()
3861 if( rc ) pFile->pMethods = 0; in apndOpen()
4206 FILE *pFile; /* Zip file */ member
4336 if( pCsr->pFile ){ in zipfileResetCursor()
4337 fclose(pCsr->pFile); in zipfileResetCursor()
4338 pCsr->pFile = 0; in zipfileResetCursor()
4375 FILE *pFile, /* Read from this file */ in zipfileReadData() argument
4382 fseek(pFile, (long)iOff, SEEK_SET); in zipfileReadData()
4383 n = fread(aRead, 1, nRead, pFile); in zipfileReadData()
4492 pCsr->pFile, aRead, ZIPFILE_CDS_FIXED_SZ, pCsr->iNextOff, pzErr in zipfileCsrReadCDS()
4509 rc = zipfileReadData(pCsr->pFile, aRead, nRead, pCsr->iNextOff, pzErr); in zipfileCsrReadCDS()
4558 if( pCsr->pFile ) return pCsr->pFile; in zipfileGetFd()
4597 FILE *pFile = zipfileGetFd(pCsr); in zipfileCsrReadLFH() local
4600 int rc = zipfileReadLFH(pFile, pCsr->cds.iOffset, aRead, &pCsr->lfh, pzErr); in zipfileCsrReadLFH()
4621 assert( pCsr->pFile==0 ); in zipfileNext()
4806 FILE *pFile = zipfileGetFd(pCsr); in zipfileColumn() local
4807 rc = zipfileReadData(pFile, aBuf, sz, pCsr->iDataOff, in zipfileColumn()
4863 FILE *pFile, /* Read from this file */ in zipfileReadEOCD() argument
4872 fseek(pFile, 0, SEEK_END); in zipfileReadEOCD()
4873 szFile = (i64)ftell(pFile); in zipfileReadEOCD()
4881 rc = zipfileReadData(pFile, aRead, nRead, iOff, &pTab->base.zErrMsg); in zipfileReadEOCD()
4947 pCsr->pFile = fopen(zFile, "rb"); in zipfileFilter()
4948 if( pCsr->pFile==0 ){ in zipfileFilter()
4952 rc = zipfileReadEOCD(pTab, pCsr->pFile, &pCsr->eocd); in zipfileFilter()