Lines Matching refs:zBuf
13289 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf);
14086 char *z, zBuf[30];
14087 z = zBuf;
14088 for(n=0; n<ArraySize(zBuf)-1 && zMod[n]; n++){
14352 char zBuf[100];
14354 sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d %02d:%02d:%02d",
14356 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
14372 char zBuf[100];
14374 sqlite3_snprintf(sizeof(zBuf), zBuf, "%02d:%02d:%02d", x.h, x.m, (int)x.s);
14375 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
14391 char zBuf[100];
14393 sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d", x.Y, x.M, x.D);
14394 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
14428 char zBuf[100];
14464 testcase( n==sizeof(zBuf)-1 );
14465 testcase( n==sizeof(zBuf) );
14468 if( n<sizeof(zBuf) ){
14469 z = zBuf;
14545 z==zBuf ? SQLITE_TRANSIENT : SQLITE_DYNAMIC);
14614 char zBuf[20];
14631 strftime(zBuf, 20, zFormat, &sNow);
14632 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
20255 SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
20257 if( n<=0 ) return zBuf;
20258 sqlite3StrAccumInit(&acc, zBuf, n, 0);
20263 SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
20267 z = sqlite3_vsnprintf(n, zBuf, zFormat, ap);
20313 char zBuf[500];
20314 sqlite3StrAccumInit(&acc, zBuf, sizeof(zBuf), 0);
20320 fprintf(stdout,"%s", zBuf);
20443 unsigned char *zBuf = pBuf;
20449 *(zBuf++) = randomByte();
20703 char zBuf[100];
20704 sqlite3VdbeMemPrettyPrint(pMem, zBuf);
20705 fprintf(stderr, "INPUT: %s\n", zBuf);
20814 char zBuf[100];
20815 sqlite3VdbeMemPrettyPrint(pMem, zBuf);
20816 fprintf(stderr, "OUTPUT: %s\n", zBuf);
20998 unsigned char zBuf[20];
21004 z = zBuf;
21006 n = (int)(z-zBuf);
21009 z = zBuf;
21015 assert( (z-zBuf)==n );
21019 z = zBuf;
21021 n = (int)(z-zBuf);
21024 z = zBuf;
21027 assert( (z-zBuf)==n );
21031 z = zBuf;
21033 n = (int)(z-zBuf);
21036 z = zBuf;
21039 assert( (z-zBuf)==n );
24253 ** Create a temporary file name in zBuf. zBuf must be big enough to
24256 static int getTempname(int nBuf, char *zBuf ){
24299 sqlite3_snprintf(nBuf-22, zBuf,
24301 j = sqlite3Strlen30(zBuf);
24302 sqlite3_randomness( 20, &zBuf[j] );
24304 zBuf[j] = zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
24306 zBuf[j] = 0;
24308 OSTRACE(( "TEMP FILENAME: %s\n", zBuf ));
24603 ** Write up to nBuf bytes of randomness into zBuf.
24605 static int os2Randomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf ){
24609 memset(zBuf, 0, nBuf);
24626 memcpy(&zBuf[n], &dt, sizeof(dt)-3);
24633 *(PULONG)&zBuf[n] = MAKELONG(ppib->pib_ulpid,
24641 (PULONG)&zBuf[n], sizeof(ULONG));
24735 ** function, SQLite calls this function with zBuf pointing to
24752 ** int xGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
24753 ** assert(zBuf[0]=='\0');
24761 static int os2GetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
24762 assert(zBuf[0]=='\0');
29822 ** Create a temporary file name in zBuf. zBuf must be allocated
29826 static int unixGetTempname(int nBuf, char *zBuf){
29851 sqlite3_snprintf(nBuf-18, zBuf, "%s/"SQLITE_TEMP_FILE_PREFIX, zDir);
29852 j = (int)strlen(zBuf);
29853 sqlite3_randomness(15, &zBuf[j]);
29855 zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
29857 zBuf[j] = 0;
29858 zBuf[j+1] = 0;
29859 }while( osAccess(zBuf,0)==0 );
30467 ** Write nBuf bytes of random data to the supplied buffer zBuf.
30469 static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){
30473 /* We have to initialize zBuf to prevent valgrind from reporting
30476 ** uninitialized space in zBuf - but valgrind errors tend to worry
30481 ** When testing, initializing zBuf[] to zero is all we do. That means
30485 memset(zBuf, 0, nBuf);
30493 memcpy(zBuf, &t, sizeof(t));
30495 memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid));
30499 do{ got = osRead(fd, zBuf, nBuf); }while( got<0 && errno==EINTR );
33171 static int getLastErrorMsg(DWORD lastErrno, int nBuf, char *zBuf){
33225 sqlite3_snprintf(nBuf, zBuf, "OsError 0x%x (%u)", lastErrno, lastErrno);
33228 sqlite3_snprintf(nBuf, zBuf, "%s", zOut);
35035 ** Create a temporary file name in zBuf. zBuf must be big enough to
35038 static int getTempname(int nBuf, char *zBuf){
35094 sqlite3_snprintf(nBuf-18, zBuf,
35096 j = sqlite3Strlen30(zBuf);
35097 sqlite3_randomness(15, &zBuf[j]);
35099 zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
35101 zBuf[j] = 0;
35102 zBuf[j+1] = 0;
35104 OSTRACE(("TEMP FILENAME: %s\n", zBuf));
35611 ** Write up to nBuf bytes of randomness into zBuf.
35613 static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
35618 memset(zBuf, 0, nBuf);
35623 memcpy(&zBuf[n], &x, sizeof(x));
35628 memcpy(&zBuf[n], &pid, sizeof(pid));
35633 memcpy(&zBuf[n], &cnt, sizeof(cnt));
35639 memcpy(&zBuf[n], &i, sizeof(i));
35731 ** function, SQLite calls this function with zBuf pointing to
35748 ** int xGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
35749 ** assert(zBuf[0]=='\0');
35757 static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
35759 return getLastErrorMsg(osGetLastError(), nBuf, zBuf);
38415 u8 *zBuf, /* Temporary buffer to use */
44080 const void *zBuf;
44082 CODEC2(pPager, pPgHdr->pData, 1, 6, rc=SQLITE_NOMEM, zBuf);
44084 rc = sqlite3OsWrite(pPager->fd, zBuf, pPager->pageSize, 0);
46993 u8 *zBuf /* Temporary buffer to use */
47074 rc = sqlite3OsRead(pWal->pWalFd, zBuf, szPage, iOffset);
47078 rc = sqlite3OsWrite(pWal->pDbFd, zBuf, szPage, iOffset);
47155 u8 *zBuf /* Buffer of at least nBuf bytes */
47175 pWal, SQLITE_CHECKPOINT_PASSIVE, 0, 0, sync_flags, nBuf, zBuf, 0, 0
48241 u8 *zBuf, /* Temporary buffer to use */
48292 rc = walCheckpoint(pWal, eMode2, xBusy, pBusyArg, sync_flags, zBuf);
64674 ** into buffer zBuf, length nBuf.
64676 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
64677 char *zCsr = zBuf;
64721 zBuf[0] = ' ';
64723 zBuf[1] = 'z';
64726 zBuf[1] = 't';
64729 zBuf[1] = 'e';
64732 zBuf[1] = 's';
64735 sqlite3_snprintf(100, &zBuf[k], "%d", pMem->n);
64736 k += sqlite3Strlen30(&zBuf[k]);
64737 zBuf[k++] = '[';
64741 zBuf[k++] = c;
64743 zBuf[k++] = '.';
64746 zBuf[k++] = ']';
64747 sqlite3_snprintf(100,&zBuf[k], encnames[pMem->enc]);
64748 k += sqlite3Strlen30(&zBuf[k]);
64749 zBuf[k++] = 0;
64772 char zBuf[200];
64773 sqlite3VdbeMemPrettyPrint(p, zBuf);
64775 fprintf(out, "%s", zBuf);
72564 int nBuf; /* Size of zBuf[] in bytes */
72565 char *zBuf; /* Space to buffer journal writes */
72566 int iSize; /* Amount of zBuf[] currently used */
72587 rc = sqlite3OsWrite(p->pReal, p->zBuf, p->iSize, 0);
72602 sqlite3_free(p->zBuf);
72611 void *zBuf, /* Put the results here */
72618 rc = sqlite3OsRead(p->pReal, zBuf, iAmt, iOfst);
72622 memcpy(zBuf, &p->zBuf[iOfst], iAmt);
72632 const void *zBuf, /* Take data to be written from here */
72643 rc = sqlite3OsWrite(p->pReal, zBuf, iAmt, iOfst);
72645 memcpy(&p->zBuf[iOfst], zBuf, iAmt);
72732 p->zBuf = sqlite3MallocZero(nBuf);
72733 if( !p->zBuf ){
72841 void *zBuf, /* Put the results here */
72846 u8 *zOut = zBuf;
72886 const void *zBuf, /* Take data to be written from here */
72892 u8 *zWrite = (u8 *)zBuf;
86395 char *zBuf;
86414 zBuf = sqlite3_mprintf("%.*f",n,r);
86415 if( zBuf==0 ){
86419 sqlite3AtoF(zBuf, &r, sqlite3Strlen30(zBuf), SQLITE_UTF8);
86420 sqlite3_free(zBuf);
122620 char *zBuf = 0;
122630 zBuf = (char *)&p->pPhrase->aToken[nToken];
122632 memcpy(zBuf, zTemp, nTemp);
122639 p->pPhrase->aToken[jj].z = zBuf;
122640 zBuf += p->pPhrase->aToken[jj].n;
123159 static char *exprToString(Fts3Expr *pExpr, char *zBuf){
123164 zBuf = sqlite3_mprintf(
123165 "%zPHRASE %d 0", zBuf, pPhrase->iColumn);
123166 for(i=0; zBuf && i<pPhrase->nToken; i++){
123167 zBuf = sqlite3_mprintf("%z %.*s%s", zBuf,
123172 return zBuf;
123176 zBuf = sqlite3_mprintf("%zNEAR/%d ", zBuf, pExpr->nNear);
123179 zBuf = sqlite3_mprintf("%zNOT ", zBuf);
123182 zBuf = sqlite3_mprintf("%zAND ", zBuf);
123185 zBuf = sqlite3_mprintf("%zOR ", zBuf);
123189 if( zBuf ) zBuf = sqlite3_mprintf("%z{", zBuf);
123190 if( zBuf ) zBuf = exprToString(pExpr->pLeft, zBuf);
123191 if( zBuf ) zBuf = sqlite3_mprintf("%z} {", zBuf);
123193 if( zBuf ) zBuf = exprToString(pExpr->pRight, zBuf);
123194 if( zBuf ) zBuf = sqlite3_mprintf("%z}", zBuf);
123196 return zBuf;
123227 char *zBuf = 0;
123272 }else if( rc==SQLITE_NOMEM || !(zBuf = exprToString(pExpr, 0)) ){
123275 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
123276 sqlite3_free(zBuf);
127973 char *zBuf, /* Write the BLOB here */
127974 int *pNBuf /* Write number of bytes if zBuf[] used here */
127978 j += sqlite3Fts3PutVarint(&zBuf[j], (sqlite3_int64)a[i]);
127989 const char *zBuf, /* The BLOB containing the varints */
127996 j += sqlite3Fts3GetVarint(&zBuf[j], &x);
133609 char zBuf[128];
133610 sqlite3_snprintf(128, zBuf, "ICU error: %s(): %s", zName, u_errorName(e));
133611 zBuf[127] = '\0';
133612 sqlite3_result_error(pCtx, zBuf, -1);