Lines Matching refs:pBuf

14397 SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file *id, void *pBuf, int amt, i64 offset){
14399 return id->pMethods->xRead(id, pBuf, amt, offset);
14401 SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file *id, const void *pBuf, int amt, i64 offset){
14403 return id->pMethods->xWrite(id, pBuf, amt, offset);
15188 static void randomFill(char *pBuf, int nByte){
15190 x = SQLITE_PTR_TO_INT(pBuf);
15196 *(int*)pBuf = r;
15197 pBuf += 4;
15204 *(pBuf++) = r & 0xff;
18589 LookasideSlot *pBuf = (LookasideSlot*)p;
18590 pBuf->pNext = db->lookaside.pFree;
18591 db->lookaside.pFree = pBuf;
18713 LookasideSlot *pBuf;
18720 }else if( (pBuf = db->lookaside.pFree)==0 ){
18723 db->lookaside.pFree = pBuf->pNext;
18729 return (void*)pBuf;
20012 SQLITE_API void sqlite3_randomness(int N, void *pBuf){
20013 unsigned char *zBuf = pBuf;
22570 void *pBuf, /* Write content into this buffer */
22583 if( DosRead( pFile->h, pBuf, amt, &got ) != NO_ERROR ){
22590 memset(&((char*)pBuf)[got], 0, amt-got);
22601 const void *pBuf, /* The bytes to be written */
22618 ( rc = DosWrite( pFile->h, (PVOID)pBuf, amt, &wrote ) ) == NO_ERROR &&
22622 pBuf = &((char*)pBuf)[wrote];
27527 ** bytes into pBuf. Return the number of bytes actually read.
27538 static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
27545 do{ got = osPread(id->h, pBuf, cnt, offset); }while( got<0 && errno==EINTR );
27548 do{ got = osPread64(id->h, pBuf, cnt, offset); }while( got<0 && errno==EINTR);
27561 do{ got = osRead(id->h, pBuf, cnt); }while( got<0 && errno==EINTR );
27578 void *pBuf,
27595 got = seekAndRead(pFile, offset, pBuf, amt);
27604 memset(&((char*)pBuf)[got], 0, amt-got);
27610 ** Seek to the offset in id->offset then read cnt bytes into pBuf.
27616 static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){
27623 do{ got = osPwrite(id->h, pBuf, cnt, offset); }while( got<0 && errno==EINTR );
27625 do{ got = osPwrite64(id->h, pBuf, cnt, offset);}while( got<0 && errno==EINTR);
27638 got = osWrite(id->h, pBuf, cnt);
27657 const void *pBuf,
27690 if( rc!=4 || memcmp(oldCntr, &((char*)pBuf)[24-offset], 4)!=0 ){
27697 while( amt>0 && (wrote = seekAndWrite(pFile, offset, pBuf, amt))>0 ){
27700 pBuf = &((char*)pBuf)[wrote];
32678 void *pBuf, /* Write content into this buffer */
32693 while( !ReadFile(pFile->h, pBuf, amt, &nRead, 0) ){
32701 memset(&((char*)pBuf)[nRead], 0, amt-nRead);
32714 const void *pBuf, /* The bytes to be written */
32731 u8 *aRem = (u8 *)pBuf; /* Data yet to be written */
34998 ** pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage
35001 SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){
35017 u32 *aiValues = pBuf;
36016 ** verb to sqlite3_config(). Parameter pBuf points to an allocation large
36022 SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
36029 pcache1.pStart = pBuf;
36033 p = (PgFreeslot*)pBuf;
36036 pBuf = (void*)&((char*)pBuf)[sz];
36038 pcache1.pEnd = pBuf;
52038 ** from pPayload to the buffer pointed at by pBuf. If eOp is true,
52040 ** of data are copied from the buffer pBuf to pPayload.
52046 void *pBuf, /* Pointer to buffer */
52057 memcpy(pPayload, pBuf, nByte);
52060 memcpy(pBuf, pPayload, nByte);
52069 ** buffer pBuf). If it is non-zero, a write (data copied from
52070 ** buffer pBuf).
52073 ** Data is read to or from the buffer pBuf.
52097 unsigned char *pBuf, /* Write the bytes into this buffer */
52129 rc = copyPayload(&aPayload[offset], pBuf, a, eOp, pPage->pDbPage);
52131 pBuf += a;
52209 rc = copyPayload(&aPayload[offset+4], pBuf, a, eOp, pDbPage);
52213 pBuf += a;
52227 ** "amt" bytes will be transfered into pBuf[]. The transfer
52237 SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
52242 return accessPayload(pCur, offset, amt, (unsigned char*)pBuf, 0);
52247 ** "amt" bytes will be transfered into pBuf[]. The transfer
52254 SQLITE_PRIVATE int sqlite3BtreeData(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
52269 rc = accessPayload(pCur, offset, amt, pBuf, 0);
59673 ** The pBuf parameter is the initial value of a pointer which will
59674 ** receive the new memory. pBuf is normally NULL. If pBuf is not
59676 ** this routine should not allocate any new memory. When pBuf is not
59677 ** NULL simply return pBuf. Only allocate new memory space when pBuf
59691 void *pBuf, /* Where return pointer will be stored */
59698 if( pBuf ) return pBuf;
59701 pBuf = (void*)*ppFrom;
59706 return pBuf;
110608 static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
110628 }else if( pBuf==0 ){
110635 pStart = pBuf;
110652 db->lookaside.bMalloced = pBuf==0 ?1:0;
110677 void *pBuf = va_arg(ap, void*); /* IMP: R-26835-10964 */
110680 rc = setupLookaside(db, pBuf, sz, cnt);