Lines Matching refs:nBuf
29896 int nBuf, /* Size of buffer pBuf in bytes */
29901 assert( nBuf==(nBuf&0x1ffff) );
29903 nBuf &= 0x1ffff;
29907 do{ rc = (int)osPwrite(fd, pBuf, nBuf, iOff); }while( rc<0 && errno==EINTR );
29909 do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
29919 rc = osWrite(fd, pBuf, nBuf);
30427 static int unixGetTempname(int nBuf, char *zBuf);
32109 static int unixGetTempname(int nBuf, char *zBuf){
32129 if( (strlen(zDir) + strlen(SQLITE_TEMP_FILE_PREFIX) + 18) >= (size_t)nBuf ){
32134 sqlite3_snprintf(nBuf-18, zBuf, "%s/"SQLITE_TEMP_FILE_PREFIX, zDir);
32713 static void unixDlError(sqlite3_vfs *NotUsed, int nBuf, char *zBufOut){
32719 sqlite3_snprintf(nBuf, zBufOut, "%s", zErr);
32760 static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){
32762 assert((size_t)nBuf>=(sizeof(time_t)+sizeof(int)));
32776 memset(zBuf, 0, nBuf);
32787 assert( sizeof(t)+sizeof(randomnessPid)<=(size_t)nBuf );
32788 nBuf = sizeof(t) + sizeof(randomnessPid);
32790 do{ got = osRead(fd, zBuf, nBuf); }while( got<0 && errno==EINTR );
32795 return nBuf;
35681 SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){
35683 int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */
36196 static int winGetLastErrorMsg(DWORD lastErrno, int nBuf, char *zBuf){
36261 sqlite3_snprintf(nBuf, zBuf, "OsError 0x%lx (%lu)", lastErrno, lastErrno);
36264 sqlite3_snprintf(nBuf, zBuf, "%s", zOut);
38729 static int winMakeEndInDirSep(int nBuf, char *zBuf){
38735 }else if( nLen+1<nBuf ){
38756 int nMax, nBuf, nDir, nLen;
38768 nMax = pVfs->mxPathname; nBuf = nMax + 2;
38769 zBuf = sqlite3MallocZero( nBuf );
38954 if( (nLen + nPre + 17) > nBuf ){
38960 sqlite3_snprintf(nBuf-16-nLen, zBuf+nLen, SQLITE_TEMP_FILE_PREFIX);
39756 static void winDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
39758 winGetLastErrorMsg(osGetLastError(), nBuf, zBufOut);
39784 static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
39788 n = nBuf;
39789 memset(zBuf, 0, nBuf);
39791 if( sizeof(SYSTEMTIME)<=nBuf-n ){
39797 if( sizeof(DWORD)<=nBuf-n ){
39803 if( sizeof(ULONGLONG)<=nBuf-n ){
39809 if( sizeof(DWORD)<=nBuf-n ){
39815 if( sizeof(LARGE_INTEGER)<=nBuf-n ){
39822 if( sizeof(UUID)<=nBuf-n ){
39829 if( sizeof(UUID)<=nBuf-n ){
39953 static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
39955 return winGetLastErrorMsg(osGetLastError(), nBuf, zBuf);
43014 int nBuf, /* Size of buffer nBuf */
52212 int nBuf,
52233 pWal, SQLITE_CHECKPOINT_PASSIVE, 0, 0, sync_flags, nBuf, zBuf, 0, 0
53306 int nBuf, /* Size of temporary buffer */
53372 if( pWal->hdr.mxFrame && walPagesize(pWal)!=nBuf ){
81539 int nBuf, /* Buffer size */
81543 p->aBuffer = (u8*)sqlite3Malloc(nBuf);
81547 p->iBufEnd = p->iBufStart = (iStart % nBuf);
81549 p->nBuffer = nBuf;
82861 int nBuf; /* Size of zBuf[] in bytes */
82883 assert(p->iSize<=p->nBuf);
82943 if( !p->pReal && (iOfst+iAmt)>p->nBuf ){
83032 int nBuf /* Bytes buffered before opening the file */
83036 if( nBuf>0 ){
83037 p->zBuf = sqlite3MallocZero(nBuf);
83045 p->nBuf = nBuf;
149232 int nBuf /* size of the BLOB */
149235 UNUSED_PARAMETER(nBuf);
149239 assert(j<=nBuf);
176819 const int nBuf = 32;
176821 aBuf = (Fts5Buffer*)fts5IdxMalloc(p, sizeof(Fts5Buffer)*nBuf);
176845 assert( i<nBuf );
176862 for(i=0; i<nBuf; i++){
182423 int nBuf = *pnBuf;
182429 if( nBuf<p->nSuffix ) continue;
182430 if( 0==memcmp(&aBuf[nBuf - p->nSuffix], p->zSuffix, p->nSuffix) ) break;
182434 int nStem = nBuf - p->nSuffix;
182536 int nBuf = *pnBuf;
182537 switch( aBuf[nBuf-2] ){
182540 if( nBuf>2 && 0==memcmp("al", &aBuf[nBuf-2], 2) ){
182541 if( fts5Porter_MGt1(aBuf, nBuf-2) ){
182542 *pnBuf = nBuf - 2;
182548 if( nBuf>4 && 0==memcmp("ance", &aBuf[nBuf-4], 4) ){
182549 if( fts5Porter_MGt1(aBuf, nBuf-4) ){
182550 *pnBuf = nBuf - 4;
182552 }else if( nBuf>4 && 0==memcmp("ence", &aBuf[nBuf-4], 4) ){
182553 if( fts5Porter_MGt1(aBuf, nBuf-4) ){
182554 *pnBuf = nBuf - 4;
182560 if( nBuf>2 && 0==memcmp("er", &aBuf[nBuf-2], 2) ){
182561 if( fts5Porter_MGt1(aBuf, nBuf-2) ){
182562 *pnBuf = nBuf - 2;
182568 if( nBuf>2 && 0==memcmp("ic", &aBuf[nBuf-2], 2) ){
182569 if( fts5Porter_MGt1(aBuf, nBuf-2) ){
182570 *pnBuf = nBuf - 2;
182576 if( nBuf>4 && 0==memcmp("able", &aBuf[nBuf-4], 4) ){
182577 if( fts5Porter_MGt1(aBuf, nBuf-4) ){
182578 *pnBuf = nBuf - 4;
182580 }else if( nBuf>4 && 0==memcmp("ible", &aBuf[nBuf-4], 4) ){
182581 if( fts5Porter_MGt1(aBuf, nBuf-4) ){
182582 *pnBuf = nBuf - 4;
182588 if( nBuf>3 && 0==memcmp("ant", &aBuf[nBuf-3], 3) ){
182589 if( fts5Porter_MGt1(aBuf, nBuf-3) ){
182590 *pnBuf = nBuf - 3;
182592 }else if( nBuf>5 && 0==memcmp("ement", &aBuf[nBuf-5], 5) ){
182593 if( fts5Porter_MGt1(aBuf, nBuf-5) ){
182594 *pnBuf = nBuf - 5;
182596 }else if( nBuf>4 && 0==memcmp("ment", &aBuf[nBuf-4], 4) ){
182597 if( fts5Porter_MGt1(aBuf, nBuf-4) ){
182598 *pnBuf = nBuf - 4;
182600 }else if( nBuf>3 && 0==memcmp("ent", &aBuf[nBuf-3], 3) ){
182601 if( fts5Porter_MGt1(aBuf, nBuf-3) ){
182602 *pnBuf = nBuf - 3;
182608 if( nBuf>3 && 0==memcmp("ion", &aBuf[nBuf-3], 3) ){
182609 if( fts5Porter_MGt1_and_S_or_T(aBuf, nBuf-3) ){
182610 *pnBuf = nBuf - 3;
182612 }else if( nBuf>2 && 0==memcmp("ou", &aBuf[nBuf-2], 2) ){
182613 if( fts5Porter_MGt1(aBuf, nBuf-2) ){
182614 *pnBuf = nBuf - 2;
182620 if( nBuf>3 && 0==memcmp("ism", &aBuf[nBuf-3], 3) ){
182621 if( fts5Porter_MGt1(aBuf, nBuf-3) ){
182622 *pnBuf = nBuf - 3;
182628 if( nBuf>3 && 0==memcmp("ate", &aBuf[nBuf-3], 3) ){
182629 if( fts5Porter_MGt1(aBuf, nBuf-3) ){
182630 *pnBuf = nBuf - 3;
182632 }else if( nBuf>3 && 0==memcmp("iti", &aBuf[nBuf-3], 3) ){
182633 if( fts5Porter_MGt1(aBuf, nBuf-3) ){
182634 *pnBuf = nBuf - 3;
182640 if( nBuf>3 && 0==memcmp("ous", &aBuf[nBuf-3], 3) ){
182641 if( fts5Porter_MGt1(aBuf, nBuf-3) ){
182642 *pnBuf = nBuf - 3;
182648 if( nBuf>3 && 0==memcmp("ive", &aBuf[nBuf-3], 3) ){
182649 if( fts5Porter_MGt1(aBuf, nBuf-3) ){
182650 *pnBuf = nBuf - 3;
182656 if( nBuf>3 && 0==memcmp("ize", &aBuf[nBuf-3], 3) ){
182657 if( fts5Porter_MGt1(aBuf, nBuf-3) ){
182658 *pnBuf = nBuf - 3;
182670 int nBuf = *pnBuf;
182671 switch( aBuf[nBuf-2] ){
182674 if( nBuf>2 && 0==memcmp("at", &aBuf[nBuf-2], 2) ){
182675 memcpy(&aBuf[nBuf-2], "ate", 3);
182676 *pnBuf = nBuf - 2 + 3;
182682 if( nBuf>2 && 0==memcmp("bl", &aBuf[nBuf-2], 2) ){
182683 memcpy(&aBuf[nBuf-2], "ble", 3);
182684 *pnBuf = nBuf - 2 + 3;
182690 if( nBuf>2 && 0==memcmp("iz", &aBuf[nBuf-2], 2) ){
182691 memcpy(&aBuf[nBuf-2], "ize", 3);
182692 *pnBuf = nBuf - 2 + 3;
182704 int nBuf = *pnBuf;
182705 switch( aBuf[nBuf-2] ){
182708 if( nBuf>7 && 0==memcmp("ational", &aBuf[nBuf-7], 7) ){
182709 if( fts5Porter_MGt0(aBuf, nBuf-7) ){
182710 memcpy(&aBuf[nBuf-7], "ate", 3);
182711 *pnBuf = nBuf - 7 + 3;
182713 }else if( nBuf>6 && 0==memcmp("tional", &aBuf[nBuf-6], 6) ){
182714 if( fts5Porter_MGt0(aBuf, nBuf-6) ){
182715 memcpy(&aBuf[nBuf-6], "tion", 4);
182716 *pnBuf = nBuf - 6 + 4;
182722 if( nBuf>4 && 0==memcmp("enci", &aBuf[nBuf-4], 4) ){
182723 if( fts5Porter_MGt0(aBuf, nBuf-4) ){
182724 memcpy(&aBuf[nBuf-4], "ence", 4);
182725 *pnBuf = nBuf - 4 + 4;
182727 }else if( nBuf>4 && 0==memcmp("anci", &aBuf[nBuf-4], 4) ){
182728 if( fts5Porter_MGt0(aBuf, nBuf-4) ){
182729 memcpy(&aBuf[nBuf-4], "ance", 4);
182730 *pnBuf = nBuf - 4 + 4;
182736 if( nBuf>4 && 0==memcmp("izer", &aBuf[nBuf-4], 4) ){
182737 if( fts5Porter_MGt0(aBuf, nBuf-4) ){
182738 memcpy(&aBuf[nBuf-4], "ize", 3);
182739 *pnBuf = nBuf - 4 + 3;
182745 if( nBuf>4 && 0==memcmp("logi", &aBuf[nBuf-4], 4) ){
182746 if( fts5Porter_MGt0(aBuf, nBuf-4) ){
182747 memcpy(&aBuf[nBuf-4], "log", 3);
182748 *pnBuf = nBuf - 4 + 3;
182754 if( nBuf>3 && 0==memcmp("bli", &aBuf[nBuf-3], 3) ){
182755 if( fts5Porter_MGt0(aBuf, nBuf-3) ){
182756 memcpy(&aBuf[nBuf-3], "ble", 3);
182757 *pnBuf = nBuf - 3 + 3;
182759 }else if( nBuf>4 && 0==memcmp("alli", &aBuf[nBuf-4], 4) ){
182760 if( fts5Porter_MGt0(aBuf, nBuf-4) ){
182761 memcpy(&aBuf[nBuf-4], "al", 2);
182762 *pnBuf = nBuf - 4 + 2;
182764 }else if( nBuf>5 && 0==memcmp("entli", &aBuf[nBuf-5], 5) ){
182765 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182766 memcpy(&aBuf[nBuf-5], "ent", 3);
182767 *pnBuf = nBuf - 5 + 3;
182769 }else if( nBuf>3 && 0==memcmp("eli", &aBuf[nBuf-3], 3) ){
182770 if( fts5Porter_MGt0(aBuf, nBuf-3) ){
182771 memcpy(&aBuf[nBuf-3], "e", 1);
182772 *pnBuf = nBuf - 3 + 1;
182774 }else if( nBuf>5 && 0==memcmp("ousli", &aBuf[nBuf-5], 5) ){
182775 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182776 memcpy(&aBuf[nBuf-5], "ous", 3);
182777 *pnBuf = nBuf - 5 + 3;
182783 if( nBuf>7 && 0==memcmp("ization", &aBuf[nBuf-7], 7) ){
182784 if( fts5Porter_MGt0(aBuf, nBuf-7) ){
182785 memcpy(&aBuf[nBuf-7], "ize", 3);
182786 *pnBuf = nBuf - 7 + 3;
182788 }else if( nBuf>5 && 0==memcmp("ation", &aBuf[nBuf-5], 5) ){
182789 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182790 memcpy(&aBuf[nBuf-5], "ate", 3);
182791 *pnBuf = nBuf - 5 + 3;
182793 }else if( nBuf>4 && 0==memcmp("ator", &aBuf[nBuf-4], 4) ){
182794 if( fts5Porter_MGt0(aBuf, nBuf-4) ){
182795 memcpy(&aBuf[nBuf-4], "ate", 3);
182796 *pnBuf = nBuf - 4 + 3;
182802 if( nBuf>5 && 0==memcmp("alism", &aBuf[nBuf-5], 5) ){
182803 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182804 memcpy(&aBuf[nBuf-5], "al", 2);
182805 *pnBuf = nBuf - 5 + 2;
182807 }else if( nBuf>7 && 0==memcmp("iveness", &aBuf[nBuf-7], 7) ){
182808 if( fts5Porter_MGt0(aBuf, nBuf-7) ){
182809 memcpy(&aBuf[nBuf-7], "ive", 3);
182810 *pnBuf = nBuf - 7 + 3;
182812 }else if( nBuf>7 && 0==memcmp("fulness", &aBuf[nBuf-7], 7) ){
182813 if( fts5Porter_MGt0(aBuf, nBuf-7) ){
182814 memcpy(&aBuf[nBuf-7], "ful", 3);
182815 *pnBuf = nBuf - 7 + 3;
182817 }else if( nBuf>7 && 0==memcmp("ousness", &aBuf[nBuf-7], 7) ){
182818 if( fts5Porter_MGt0(aBuf, nBuf-7) ){
182819 memcpy(&aBuf[nBuf-7], "ous", 3);
182820 *pnBuf = nBuf - 7 + 3;
182826 if( nBuf>5 && 0==memcmp("aliti", &aBuf[nBuf-5], 5) ){
182827 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182828 memcpy(&aBuf[nBuf-5], "al", 2);
182829 *pnBuf = nBuf - 5 + 2;
182831 }else if( nBuf>5 && 0==memcmp("iviti", &aBuf[nBuf-5], 5) ){
182832 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182833 memcpy(&aBuf[nBuf-5], "ive", 3);
182834 *pnBuf = nBuf - 5 + 3;
182836 }else if( nBuf>6 && 0==memcmp("biliti", &aBuf[nBuf-6], 6) ){
182837 if( fts5Porter_MGt0(aBuf, nBuf-6) ){
182838 memcpy(&aBuf[nBuf-6], "ble", 3);
182839 *pnBuf = nBuf - 6 + 3;
182851 int nBuf = *pnBuf;
182852 switch( aBuf[nBuf-2] ){
182855 if( nBuf>4 && 0==memcmp("ical", &aBuf[nBuf-4], 4) ){
182856 if( fts5Porter_MGt0(aBuf, nBuf-4) ){
182857 memcpy(&aBuf[nBuf-4], "ic", 2);
182858 *pnBuf = nBuf - 4 + 2;
182864 if( nBuf>4 && 0==memcmp("ness", &aBuf[nBuf-4], 4) ){
182865 if( fts5Porter_MGt0(aBuf, nBuf-4) ){
182866 *pnBuf = nBuf - 4;
182872 if( nBuf>5 && 0==memcmp("icate", &aBuf[nBuf-5], 5) ){
182873 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182874 memcpy(&aBuf[nBuf-5], "ic", 2);
182875 *pnBuf = nBuf - 5 + 2;
182877 }else if( nBuf>5 && 0==memcmp("iciti", &aBuf[nBuf-5], 5) ){
182878 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182879 memcpy(&aBuf[nBuf-5], "ic", 2);
182880 *pnBuf = nBuf - 5 + 2;
182886 if( nBuf>3 && 0==memcmp("ful", &aBuf[nBuf-3], 3) ){
182887 if( fts5Porter_MGt0(aBuf, nBuf-3) ){
182888 *pnBuf = nBuf - 3;
182894 if( nBuf>5 && 0==memcmp("ative", &aBuf[nBuf-5], 5) ){
182895 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182896 *pnBuf = nBuf - 5;
182902 if( nBuf>5 && 0==memcmp("alize", &aBuf[nBuf-5], 5) ){
182903 if( fts5Porter_MGt0(aBuf, nBuf-5) ){
182904 memcpy(&aBuf[nBuf-5], "al", 2);
182905 *pnBuf = nBuf - 5 + 2;
182917 int nBuf = *pnBuf;
182918 switch( aBuf[nBuf-2] ){
182921 if( nBuf>3 && 0==memcmp("eed", &aBuf[nBuf-3], 3) ){
182922 if( fts5Porter_MGt0(aBuf, nBuf-3) ){
182923 memcpy(&aBuf[nBuf-3], "ee", 2);
182924 *pnBuf = nBuf - 3 + 2;
182926 }else if( nBuf>2 && 0==memcmp("ed", &aBuf[nBuf-2], 2) ){
182927 if( fts5Porter_Vowel(aBuf, nBuf-2) ){
182928 *pnBuf = nBuf - 2;
182935 if( nBuf>3 && 0==memcmp("ing", &aBuf[nBuf-3], 3) ){
182936 if( fts5Porter_Vowel(aBuf, nBuf-3) ){
182937 *pnBuf = nBuf - 3;
182953 int nBuf = *pnBuf;
182954 if( aBuf[nBuf-1]=='s' ){
182955 if( aBuf[nBuf-2]=='e' ){
182956 if( (nBuf>4 && aBuf[nBuf-4]=='s' && aBuf[nBuf-3]=='s')
182957 || (nBuf>3 && aBuf[nBuf-3]=='i' )
182959 *pnBuf = nBuf-2;
182961 *pnBuf = nBuf-1;
182964 else if( aBuf[nBuf-2]!='s' ){
182965 *pnBuf = nBuf-1;
182981 int nBuf;
182985 nBuf = nToken;
182986 memcpy(aBuf, pToken, nBuf);
182989 fts5PorterStep1A(aBuf, &nBuf);
182990 if( fts5PorterStep1B(aBuf, &nBuf) ){
182991 if( fts5PorterStep1B2(aBuf, &nBuf)==0 ){
182992 char c = aBuf[nBuf-1];
182994 && c!='l' && c!='s' && c!='z' && c==aBuf[nBuf-2]
182996 nBuf--;
182997 }else if( fts5Porter_MEq1(aBuf, nBuf) && fts5Porter_Ostar(aBuf, nBuf) ){
182998 aBuf[nBuf++] = 'e';
183004 if( aBuf[nBuf-1]=='y' && fts5Porter_Vowel(aBuf, nBuf-1) ){
183005 aBuf[nBuf-1] = 'i';
183009 fts5PorterStep2(aBuf, &nBuf);
183010 fts5PorterStep3(aBuf, &nBuf);
183011 fts5PorterStep4(aBuf, &nBuf);
183014 assert( nBuf>0 );
183015 if( aBuf[nBuf-1]=='e' ){
183016 if( fts5Porter_MGt1(aBuf, nBuf-1)
183017 || (fts5Porter_MEq1(aBuf, nBuf-1) && !fts5Porter_Ostar(aBuf, nBuf-1))
183019 nBuf--;
183024 if( nBuf>1 && aBuf[nBuf-1]=='l'
183025 && aBuf[nBuf-2]=='l' && fts5Porter_MGt1(aBuf, nBuf-1)
183027 nBuf--;
183030 return p->xToken(p->pCtx, tflags, aBuf, nBuf, iStart, iEnd);