Lines Matching defs:pFile

8848 static int apndClose(sqlite3_file *pFile){
8849 pFile = ORIGFILE(pFile);
8850 return pFile->pMethods->xClose(pFile);
8857 sqlite3_file *pFile,
8862 ApndFile *paf = (ApndFile *)pFile;
8863 pFile = ORIGFILE(pFile);
8864 return pFile->pMethods->xRead(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
8874 sqlite3_file *pFile,
8881 assert(pFile == ORIGFILE(paf));
8888 if( SQLITE_OK==(rc = pFile->pMethods->xWrite
8889 (pFile, a, APND_MARK_SIZE, iWriteEnd)) ){
8899 sqlite3_file *pFile,
8904 ApndFile *paf = (ApndFile *)pFile;
8907 pFile = ORIGFILE(pFile);
8910 int rc = apndWriteMark(paf, pFile, iWriteEnd);
8913 return pFile->pMethods->xWrite(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
8919 static int apndTruncate(sqlite3_file *pFile, sqlite_int64 size){
8920 ApndFile *paf = (ApndFile *)pFile;
8921 pFile = ORIGFILE(pFile);
8923 if( SQLITE_OK!=apndWriteMark(paf, pFile, size) ) return SQLITE_IOERR;
8925 return pFile->pMethods->xTruncate(pFile, paf->iMark+APND_MARK_SIZE);
8931 static int apndSync(sqlite3_file *pFile, int flags){
8932 pFile = ORIGFILE(pFile);
8933 return pFile->pMethods->xSync(pFile, flags);
8940 static int apndFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){
8941 ApndFile *paf = (ApndFile *)pFile;
8949 static int apndLock(sqlite3_file *pFile, int eLock){
8950 pFile = ORIGFILE(pFile);
8951 return pFile->pMethods->xLock(pFile, eLock);
8957 static int apndUnlock(sqlite3_file *pFile, int eLock){
8958 pFile = ORIGFILE(pFile);
8959 return pFile->pMethods->xUnlock(pFile, eLock);
8965 static int apndCheckReservedLock(sqlite3_file *pFile, int *pResOut){
8966 pFile = ORIGFILE(pFile);
8967 return pFile->pMethods->xCheckReservedLock(pFile, pResOut);
8973 static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
8974 ApndFile *paf = (ApndFile *)pFile;
8976 pFile = ORIGFILE(pFile);
8978 rc = pFile->pMethods->xFileControl(pFile, op, pArg);
8988 static int apndSectorSize(sqlite3_file *pFile){
8989 pFile = ORIGFILE(pFile);
8990 return pFile->pMethods->xSectorSize(pFile);
8996 static int apndDeviceCharacteristics(sqlite3_file *pFile){
8997 pFile = ORIGFILE(pFile);
8998 return pFile->pMethods->xDeviceCharacteristics(pFile);
9003 sqlite3_file *pFile,
9009 pFile = ORIGFILE(pFile);
9010 return pFile->pMethods->xShmMap(pFile,iPg,pgsz,bExtend,pp);
9014 static int apndShmLock(sqlite3_file *pFile, int offset, int n, int flags){
9015 pFile = ORIGFILE(pFile);
9016 return pFile->pMethods->xShmLock(pFile,offset,n,flags);
9020 static void apndShmBarrier(sqlite3_file *pFile){
9021 pFile = ORIGFILE(pFile);
9022 pFile->pMethods->xShmBarrier(pFile);
9026 static int apndShmUnmap(sqlite3_file *pFile, int deleteFlag){
9027 pFile = ORIGFILE(pFile);
9028 return pFile->pMethods->xShmUnmap(pFile,deleteFlag);
9033 sqlite3_file *pFile,
9038 ApndFile *p = (ApndFile *)pFile;
9042 pFile = ORIGFILE(pFile);
9043 return pFile->pMethods->xFetch(pFile, iOfst+p->iPgOne, iAmt, pp);
9047 static int apndUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *pPage){
9048 ApndFile *p = (ApndFile *)pFile;
9049 pFile = ORIGFILE(pFile);
9050 return pFile->pMethods->xUnfetch(pFile, iOfst+p->iPgOne, pPage);
9062 static sqlite3_int64 apndReadMark(sqlite3_int64 sz, sqlite3_file *pFile){
9069 rc = pFile->pMethods->xRead(pFile, a, APND_MARK_SIZE, sz-APND_MARK_SIZE);
9087 static int apndIsAppendvfsDatabase(sqlite3_int64 sz, sqlite3_file *pFile){
9090 sqlite3_int64 iMark = apndReadMark(sz, pFile);
9096 rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), iMark);
9112 static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){
9114 if( apndIsAppendvfsDatabase(sz, pFile) /* rule 2 */
9116 || SQLITE_OK!=pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), 0)
9131 sqlite3_file *pFile,
9135 ApndFile *pApndFile = (ApndFile*)pFile;
9136 sqlite3_file *pBaseFile = ORIGFILE(pFile);
9145 return pBaseVfs->xOpen(pBaseVfs, zName, pFile, flags, pOutFlags);
9148 pFile->pMethods = &apnd_io_methods;
9159 pFile->pMethods = 0;
9169 pApndFile->iPgOne = apndReadMark(sz, pFile);
9177 pFile->pMethods = 0;
9574 FILE *pFile; /* Zip file */
9762 if( pCsr->pFile ){
9763 fclose(pCsr->pFile);
9764 pCsr->pFile = 0;
9812 ** Read nRead bytes of data from offset iOff of file pFile into buffer
9822 FILE *pFile, /* Read from this file */
9829 fseek(pFile, (long)iOff, SEEK_SET);
9830 n = fread(aRead, 1, nRead, pFile);
10092 ** then pFile is a file-handle open on a zip file. In either case, this
10104 FILE *pFile, /* If aBlob==0, read from this file */
10115 rc = zipfileReadData(pFile, aRead, ZIPFILE_CDS_FIXED_SZ, iOff, pzErr);
10143 pFile, aRead, nExtra+nFile, iOff+ZIPFILE_CDS_FIXED_SZ, pzErr
10165 if( pFile ){
10166 rc = zipfileReadData(pFile, aRead, szFix, pNew->cds.iOffset, pzErr);
10203 if( pCsr->pFile ){
10212 rc = zipfileGetEntry(pTab, 0, 0, pCsr->pFile, pCsr->iNextOff, &p);
10377 FILE *pFile = pCsr->pFile;
10378 if( pFile==0 ){
10379 pFile = ((ZipfileTab*)(pCsr->base.pVtab))->pWriteFd;
10381 rc = zipfileReadData(pFile, aBuf, sz, pCsr->pCurrent->iDataOff,
10431 ** containing an entire zip archive image. Or, if aBlob is NULL, then pFile
10443 FILE *pFile, /* Read from this file if aBlob==0 */
10454 fseek(pFile, 0, SEEK_END);
10455 szFile = (i64)ftell(pFile);
10461 rc = zipfileReadData(pFile, aRead, nRead, iOff, &pTab->base.zErrMsg);
10590 pCsr->pFile = zFile ? fopen(zFile, "rb") : 0;
10591 if( pCsr->pFile==0 ){
10595 rc = zipfileReadEOCD(pTab, 0, 0, pCsr->pFile, &pCsr->eocd);
29593 sqlite3_file * pFile = 0;
29598 SQLITE_FCNTL_FILE_POINTER, &pFile)
29601 rc = pFile->pMethods->xFileSize(pFile, &nSize);
29613 rc = pFile->pMethods->xRead(pFile, buf, nBuf, nPos);