Lines Matching refs:zBuf
11462 char *z, zBuf[30]; in parseModifier() local
11463 z = zBuf; in parseModifier()
11464 for(n=0; n<ArraySize(zBuf)-1 && zMod[n]; n++){ in parseModifier()
11724 char zBuf[100]; in datetimeFunc() local
11726 sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d %02d:%02d:%02d", in datetimeFunc()
11728 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT); in datetimeFunc()
11744 char zBuf[100]; in timeFunc() local
11746 sqlite3_snprintf(sizeof(zBuf), zBuf, "%02d:%02d:%02d", x.h, x.m, (int)x.s); in timeFunc()
11747 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT); in timeFunc()
11763 char zBuf[100]; in dateFunc() local
11765 sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d", x.Y, x.M, x.D); in dateFunc()
11766 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT); in dateFunc()
11800 char zBuf[100]; in strftimeFunc() local
11836 testcase( n==sizeof(zBuf)-1 ); in strftimeFunc()
11837 testcase( n==sizeof(zBuf) ); in strftimeFunc()
11840 if( n<sizeof(zBuf) ){ in strftimeFunc()
11841 z = zBuf; in strftimeFunc()
11917 z==zBuf ? SQLITE_TRANSIENT : SQLITE_DYNAMIC); in strftimeFunc()
11984 char zBuf[20]; in currentTimeFunc() local
12003 strftime(zBuf, 20, zFormat, &sNow); in currentTimeFunc()
12010 strftime(zBuf, 20, zFormat, pTm); in currentTimeFunc()
12015 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT); in currentTimeFunc()
17250 SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){ in sqlite3_snprintf() argument
17256 return zBuf; in sqlite3_snprintf()
17258 sqlite3StrAccumInit(&acc, zBuf, n, 0); in sqlite3_snprintf()
17312 char zBuf[500]; in sqlite3DebugPrintf() local
17313 sqlite3StrAccumInit(&acc, zBuf, sizeof(zBuf), 0); in sqlite3DebugPrintf()
17319 fprintf(stdout,"%s", zBuf); in sqlite3DebugPrintf()
17442 unsigned char *zBuf = pBuf; in sqlite3_randomness() local
17448 *(zBuf++) = randomByte(); in sqlite3_randomness()
17925 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf);
18120 char zBuf[100]; in sqlite3VdbeMemTranslate() local
18121 sqlite3VdbeMemPrettyPrint(pMem, zBuf); in sqlite3VdbeMemTranslate()
18122 fprintf(stderr, "INPUT: %s\n", zBuf); in sqlite3VdbeMemTranslate()
18231 char zBuf[100]; in sqlite3VdbeMemTranslate() local
18232 sqlite3VdbeMemPrettyPrint(pMem, zBuf); in sqlite3VdbeMemTranslate()
18233 fprintf(stderr, "OUTPUT: %s\n", zBuf); in sqlite3VdbeMemTranslate()
18413 unsigned char zBuf[20]; in sqlite3UtfSelfTest() local
18419 z = zBuf; in sqlite3UtfSelfTest()
18421 n = (int)(z-zBuf); in sqlite3UtfSelfTest()
18424 z = zBuf; in sqlite3UtfSelfTest()
18430 assert( (z-zBuf)==n ); in sqlite3UtfSelfTest()
18434 z = zBuf; in sqlite3UtfSelfTest()
18436 n = (int)(z-zBuf); in sqlite3UtfSelfTest()
18439 z = zBuf; in sqlite3UtfSelfTest()
18442 assert( (z-zBuf)==n ); in sqlite3UtfSelfTest()
18446 z = zBuf; in sqlite3UtfSelfTest()
18448 n = (int)(z-zBuf); in sqlite3UtfSelfTest()
18451 z = zBuf; in sqlite3UtfSelfTest()
18454 assert( (z-zBuf)==n ); in sqlite3UtfSelfTest()
20836 static int getTempname(int nBuf, char *zBuf ){
20868 sqlite3_snprintf( nBuf-30, zBuf,
20872 sqlite3_snprintf( nBuf-30, zBuf,
20875 j = sqlite3Strlen30( zBuf );
20876 sqlite3_randomness( 20, &zBuf[j] );
20878 zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
20880 zBuf[j] = 0;
20881 OSTRACE2( "TEMP FILENAME: %s\n", zBuf );
21132 static int os2Randomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf ){
21136 memset(zBuf, 0, nBuf);
21142 memcpy(&zBuf[n], &x, sizeof(x));
21149 memcpy(&zBuf[n], &ppib->pib_ulpid, sizeofULong);
21156 memcpy(&zBuf[n], &ptib->tib_ptib2->tib2_ultid, sizeofULong);
21166 memcpy(&zBuf[n], &ulSysInfo[QSV_MS_COUNT - 1], sizeofULong);
21170 memcpy(&zBuf[n], &ulSysInfo[QSV_TIMER_INTERVAL - 1], sizeofULong);
21174 memcpy(&zBuf[n], &ulSysInfo[QSV_TIME_LOW - 1], sizeofULong);
21178 memcpy(&zBuf[n], &ulSysInfo[QSV_TIME_HIGH - 1], sizeofULong);
21182 memcpy(&zBuf[n], &ulSysInfo[QSV_TOTAVAILMEM - 1], sizeofULong);
21252 static int os2GetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
25215 static int getTempname(int nBuf, char *zBuf){
25260 sqlite3_snprintf(nBuf-17, zBuf, "%s/"SQLITE_TEMP_FILE_PREFIX, zDir);
25261 j = (int)strlen(zBuf);
25262 sqlite3_randomness(15, &zBuf[j]);
25264 zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
25266 zBuf[j] = 0;
25267 }while( access(zBuf,0)==0 );
25740 static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){
25756 memset(zBuf, 0, nBuf);
25764 memcpy(zBuf, &t, sizeof(t));
25766 memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid));
25770 nBuf = read(fd, zBuf, nBuf);
28509 static int getTempname(int nBuf, char *zBuf){
28549 sqlite3_snprintf(nBuf-30, zBuf,
28551 j = sqlite3Strlen30(zBuf);
28552 sqlite3_randomness(20, &zBuf[j]);
28554 zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
28556 zBuf[j] = 0;
28557 OSTRACE2("TEMP FILENAME: %s\n", zBuf);
28566 static int getLastErrorMsg(int nBuf, char *zBuf){
28613 sqlite3_snprintf(nBuf, zBuf, "OsError 0x%x (%u)", error, error);
28616 sqlite3_snprintf(nBuf, zBuf, "%s", zOut);
29070 static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
29075 memset(zBuf, 0, nBuf);
29080 memcpy(&zBuf[n], &x, sizeof(x));
29085 memcpy(&zBuf[n], &pid, sizeof(pid));
29090 memcpy(&zBuf[n], &cnt, sizeof(cnt));
29096 memcpy(&zBuf[n], &i, sizeof(i));
29203 static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
29205 return getLastErrorMsg(nBuf, zBuf);
35920 const void *zBuf = pPgHdr->pData;
35922 rc = sqlite3OsWrite(pPager->fd, zBuf, pPager->pageSize, 0);
52266 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
52267 char *zCsr = zBuf;
52311 zBuf[0] = ' ';
52313 zBuf[1] = 'z';
52316 zBuf[1] = 't';
52319 zBuf[1] = 'e';
52322 zBuf[1] = 's';
52325 sqlite3_snprintf(100, &zBuf[k], "%d", pMem->n);
52326 k += sqlite3Strlen30(&zBuf[k]);
52327 zBuf[k++] = '[';
52331 zBuf[k++] = c;
52333 zBuf[k++] = '.';
52336 zBuf[k++] = ']';
52337 sqlite3_snprintf(100,&zBuf[k], encnames[pMem->enc]);
52338 k += sqlite3Strlen30(&zBuf[k]);
52339 zBuf[k++] = 0;
52362 char zBuf[200];
52363 sqlite3VdbeMemPrettyPrint(p, zBuf);
52365 fprintf(out, "%s", zBuf);
58719 char *zBuf; /* Space to buffer journal writes */
58741 rc = sqlite3OsWrite(p->pReal, p->zBuf, p->iSize, 0);
58756 sqlite3_free(p->zBuf);
58765 void *zBuf, /* Put the results here */
58772 rc = sqlite3OsRead(p->pReal, zBuf, iAmt, iOfst);
58776 memcpy(zBuf, &p->zBuf[iOfst], iAmt);
58786 const void *zBuf, /* Take data to be written from here */
58797 rc = sqlite3OsWrite(p->pReal, zBuf, iAmt, iOfst);
58799 memcpy(&p->zBuf[iOfst], zBuf, iAmt);
58882 p->zBuf = sqlite3MallocZero(nBuf);
58883 if( !p->zBuf ){
58991 void *zBuf, /* Put the results here */
58996 u8 *zOut = zBuf;
59036 const void *zBuf, /* Take data to be written from here */
59042 u8 *zWrite = (u8 *)zBuf;
71539 char *zBuf;
71549 zBuf = sqlite3_mprintf("%.*f",n,r);
71550 if( zBuf==0 ){
71553 sqlite3AtoF(zBuf, &r);
71554 sqlite3_free(zBuf);
101988 static void exprToString(Fts3Expr *pExpr, char *zBuf){
101993 zBuf += sprintf(zBuf, "PHRASE %d %d", pPhrase->iColumn, pPhrase->isNot);
101995 zBuf += sprintf(zBuf," %.*s",pPhrase->aToken[i].n,pPhrase->aToken[i].z);
101996 zBuf += sprintf(zBuf,"%s", (pPhrase->aToken[i].isPrefix?"+":""));
102002 zBuf += sprintf(zBuf, "NEAR/%d ", pExpr->nNear);
102005 zBuf += sprintf(zBuf, "NOT ");
102008 zBuf += sprintf(zBuf, "AND ");
102011 zBuf += sprintf(zBuf, "OR ");
102015 zBuf += sprintf(zBuf, "{");
102016 exprToString(pExpr->pLeft, zBuf);
102017 zBuf += strlen(zBuf);
102018 zBuf += sprintf(zBuf, "} ");
102020 zBuf += sprintf(zBuf, "{");
102021 exprToString(pExpr->pRight, zBuf);
102022 zBuf += strlen(zBuf);
102023 zBuf += sprintf(zBuf, "}");
102100 char zBuf[4096];
102101 exprToString(pExpr, zBuf);
102102 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
106702 char zBuf[200];
106713 zBuf[0] = ' ';
106714 sqlite3_snprintf(sizeof(zBuf)-1, &zBuf[cnt>0], "%d %d %d %d",
106716 fts3SnippetAppend(&sb, zBuf, -1);
110613 char zBuf[128];
110614 sqlite3_snprintf(128, zBuf, "ICU error: %s(): %s", zName, u_errorName(e));
110615 zBuf[127] = '\0';
110616 sqlite3_result_error(pCtx, zBuf, -1);