diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2024-09-30 00:04:56 +0300 |
---|---|---|
committer | Philippe Mavridis <philippe.mavridis@yandex.com> | 2025-05-15 21:00:25 +0300 |
commit | 04e86613f67d171cc965fce64a4310c0d25c98e1 (patch) | |
tree | 08a85d43bc40568f94259601339ccd7e1de11773 /kexi/3rdparty | |
parent | cf85b9c285a2b9baa87c9d0cb9d683b48e82a475 (diff) | |
download | koffice-feat/cmake-port.tar.gz koffice-feat/cmake-port.zip |
WIP: CMake portfeat/cmake-port
Signed-off-by: Philippe Mavridis <philippe.mavridis@yandex.com>
Diffstat (limited to 'kexi/3rdparty')
-rw-r--r-- | kexi/3rdparty/kexisql/src/btree.c | 28 | ||||
-rw-r--r-- | kexi/3rdparty/kexisql3/src/btree.c | 38 |
2 files changed, 33 insertions, 33 deletions
diff --git a/kexi/3rdparty/kexisql/src/btree.c b/kexi/3rdparty/kexisql/src/btree.c index 02e01249f..862f2742a 100644 --- a/kexi/3rdparty/kexisql/src/btree.c +++ b/kexi/3rdparty/kexisql/src/btree.c @@ -3169,7 +3169,7 @@ struct IntegrityCk { /* ** Append a message to the error message string. */ -static void checkAppendMsg(IntegrityCk *pCheck, char *zMsg1, char *zMsg2){ +static void chectdeAppendMsg(IntegrityCk *pCheck, char *zMsg1, char *zMsg2){ if( pCheck->zErrMsg ){ char *zOld = pCheck->zErrMsg; pCheck->zErrMsg = 0; @@ -3193,13 +3193,13 @@ static int checkRef(IntegrityCk *pCheck, int iPage, char *zContext){ if( iPage>pCheck->nPage || iPage<0 ){ char zBuf[100]; sprintf(zBuf, "invalid page number %d", iPage); - checkAppendMsg(pCheck, zContext, zBuf); + chectdeAppendMsg(pCheck, zContext, zBuf); return 1; } if( pCheck->anRef[iPage]==1 ){ char zBuf[100]; sprintf(zBuf, "2nd reference to page %d", iPage); - checkAppendMsg(pCheck, zContext, zBuf); + chectdeAppendMsg(pCheck, zContext, zBuf); return 1; } return (pCheck->anRef[iPage]++)>1; @@ -3222,13 +3222,13 @@ static void checkList( OverflowPage *pOvfl; if( iPage<1 ){ sprintf(zMsg, "%d pages missing from overflow list", N+1); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); break; } if( checkRef(pCheck, iPage, zContext) ) break; if( sqlitepager_get(pCheck->pPager, (Pgno)iPage, (void**)&pOvfl) ){ sprintf(zMsg, "failed to get page %d", iPage); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); break; } if( isFreeList ){ @@ -3307,12 +3307,12 @@ static int checkTreePage( sprintf(zContext, "On tree page %d: ", iPage); if( (rc = sqlitepager_get(pCheck->pPager, (Pgno)iPage, (void**)&pPage))!=0 ){ sprintf(zMsg, "unable to get the page. error code=%d", rc); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); return 0; } if( (rc = initPage(pBt, pPage, (Pgno)iPage, pParent))!=0 ){ sprintf(zMsg, "initPage() returns error code %d", rc); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); sqlitepager_unref(pPage); return 0; } @@ -3349,7 +3349,7 @@ static int checkTreePage( zKey2 = sqliteMallocRaw( nKey2+1 ); getPayload(&cur, 0, nKey2, zKey2); if( zKey1 && keyCompare(zKey1, nKey1, zKey2, nKey2)>=0 ){ - checkAppendMsg(pCheck, zContext, "Key is out of order"); + chectdeAppendMsg(pCheck, zContext, "Key is out of order"); } /* Check sanity of left child page. @@ -3357,7 +3357,7 @@ static int checkTreePage( pgno = SWAB32(pBt, pCell->h.leftChild); d2 = checkTreePage(pCheck, pgno, pPage, zContext, zKey1,nKey1,zKey2,nKey2); if( i>0 && d2!=depth ){ - checkAppendMsg(pCheck, zContext, "Child page depth differs"); + chectdeAppendMsg(pCheck, zContext, "Child page depth differs"); } depth = d2; sqliteFree(zKey1); @@ -3388,11 +3388,11 @@ static int checkTreePage( for(i=0; i<SQLITE_USABLE_SIZE; i++){ if( hit[i]==0 ){ sprintf(zMsg, "Unused space at byte %d of page %d", i, iPage); - checkAppendMsg(pCheck, zMsg, 0); + chectdeAppendMsg(pCheck, zMsg, 0); break; }else if( hit[i]>1 ){ sprintf(zMsg, "Multiple uses for byte %d of page %d", i, iPage); - checkAppendMsg(pCheck, zMsg, 0); + chectdeAppendMsg(pCheck, zMsg, 0); break; } } @@ -3403,7 +3403,7 @@ static int checkTreePage( if( pParent && pParent->nCell>2 && pPage->nFree>3*SQLITE_USABLE_SIZE/4 ){ sprintf(zMsg, "free space (%d) greater than max (%d)", pPage->nFree, SQLITE_USABLE_SIZE/3); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); } #endif @@ -3460,7 +3460,7 @@ char *fileBtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ if( sCheck.anRef[i]==0 ){ char zBuf[100]; sprintf(zBuf, "Page %d is never used", i); - checkAppendMsg(&sCheck, zBuf, 0); + chectdeAppendMsg(&sCheck, zBuf, 0); } } @@ -3473,7 +3473,7 @@ char *fileBtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ "Outstanding page count goes from %d to %d during this analysis", nRef, *sqlitepager_stats(pBt->pPager) ); - checkAppendMsg(&sCheck, zBuf, 0); + chectdeAppendMsg(&sCheck, zBuf, 0); } /* Clean up and report errors. diff --git a/kexi/3rdparty/kexisql3/src/btree.c b/kexi/3rdparty/kexisql3/src/btree.c index 472d63a60..5b82e4287 100644 --- a/kexi/3rdparty/kexisql3/src/btree.c +++ b/kexi/3rdparty/kexisql3/src/btree.c @@ -5297,7 +5297,7 @@ struct IntegrityCk { /* ** Append a message to the error message string. */ -static void checkAppendMsg( +static void chectdeAppendMsg( IntegrityCk *pCheck, char *zMsg1, const char *zFormat, @@ -5333,11 +5333,11 @@ static void checkAppendMsg( static int checkRef(IntegrityCk *pCheck, int iPage, char *zContext){ if( iPage==0 ) return 1; if( iPage>pCheck->nPage || iPage<0 ){ - checkAppendMsg(pCheck, zContext, "invalid page number %d", iPage); + chectdeAppendMsg(pCheck, zContext, "invalid page number %d", iPage); return 1; } if( pCheck->anRef[iPage]==1 ){ - checkAppendMsg(pCheck, zContext, "2nd reference to page %d", iPage); + chectdeAppendMsg(pCheck, zContext, "2nd reference to page %d", iPage); return 1; } return (pCheck->anRef[iPage]++)>1; @@ -5362,12 +5362,12 @@ static void checkPtrmap( rc = ptrmapGet(pCheck->pBt, iChild, &ePtrmapType, &iPtrmapParent); if( rc!=SQLITE_OK ){ - checkAppendMsg(pCheck, zContext, "Failed to read ptrmap key=%d", iChild); + chectdeAppendMsg(pCheck, zContext, "Failed to read ptrmap key=%d", iChild); return; } if( ePtrmapType!=eType || iPtrmapParent!=iParent ){ - checkAppendMsg(pCheck, zContext, + chectdeAppendMsg(pCheck, zContext, "Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)", iChild, eType, iParent, ePtrmapType, iPtrmapParent); } @@ -5391,14 +5391,14 @@ static void checkList( while( N-- > 0 ){ unsigned char *pOvfl; if( iPage<1 ){ - checkAppendMsg(pCheck, zContext, + chectdeAppendMsg(pCheck, zContext, "%d of %d pages missing from overflow list starting at %d", N+1, expected, iFirst); break; } if( checkRef(pCheck, iPage, zContext) ) break; if( sqlite3pager_get(pCheck->pPager, (Pgno)iPage, (void**)&pOvfl) ){ - checkAppendMsg(pCheck, zContext, "failed to get page %d", iPage); + chectdeAppendMsg(pCheck, zContext, "failed to get page %d", iPage); break; } if( isFreeList ){ @@ -5409,7 +5409,7 @@ static void checkList( } #endif if( n>pCheck->pBt->usableSize/4-8 ){ - checkAppendMsg(pCheck, zContext, + chectdeAppendMsg(pCheck, zContext, "freelist leaf count too big on page %d", iPage); N--; }else{ @@ -5492,12 +5492,12 @@ static int checkTreePage( if( iPage==0 ) return 0; if( checkRef(pCheck, iPage, zParentContext) ) return 0; if( (rc = getPage(pBt, (Pgno)iPage, &pPage))!=0 ){ - checkAppendMsg(pCheck, zContext, + chectdeAppendMsg(pCheck, zContext, "unable to get the page. error code=%d", rc); return 0; } if( (rc = initPage(pPage, pParent))!=0 ){ - checkAppendMsg(pCheck, zContext, "initPage() returns error code %d", rc); + chectdeAppendMsg(pCheck, zContext, "initPage() returns error code %d", rc); releasePage(pPage); return 0; } @@ -5540,7 +5540,7 @@ static int checkTreePage( #endif d2 = checkTreePage(pCheck,pgno,pPage,zContext,0,0,0,0); if( i>0 && d2!=depth ){ - checkAppendMsg(pCheck, zContext, "Child page depth differs"); + chectdeAppendMsg(pCheck, zContext, "Child page depth differs"); } depth = d2; } @@ -5570,7 +5570,7 @@ static int checkTreePage( int size = cellSizePtr(pPage, &data[pc]); int j; if( (pc+size-1)>=usableSize || pc<0 ){ - checkAppendMsg(pCheck, 0, + chectdeAppendMsg(pCheck, 0, "Corruption detected in cell %d on page %d",i,iPage,0); }else{ for(j=pc+size-1; j>=pc; j--) hit[j]++; @@ -5581,7 +5581,7 @@ static int checkTreePage( int size = get2byte(&data[i+2]); int j; if( (i+size-1)>=usableSize || i<0 ){ - checkAppendMsg(pCheck, 0, + chectdeAppendMsg(pCheck, 0, "Corruption detected in cell %d on page %d",i,iPage,0); }else{ for(j=i+size-1; j>=i; j--) hit[j]++; @@ -5592,13 +5592,13 @@ static int checkTreePage( if( hit[i]==0 ){ cnt++; }else if( hit[i]>1 ){ - checkAppendMsg(pCheck, 0, + chectdeAppendMsg(pCheck, 0, "Multiple uses for byte %d of page %d", i, iPage); break; } } if( cnt!=data[hdr+7] ){ - checkAppendMsg(pCheck, 0, + chectdeAppendMsg(pCheck, 0, "Fragmented space is %d byte reported as %d on page %d", cnt, data[hdr+7], iPage); } @@ -5672,7 +5672,7 @@ char *sqlite3BtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ for(i=1; i<=sCheck.nPage; i++){ #ifdef SQLITE_OMIT_AUTOVACUUM if( sCheck.anRef[i]==0 ){ - checkAppendMsg(&sCheck, 0, "Page %d is never used", i); + chectdeAppendMsg(&sCheck, 0, "Page %d is never used", i); } #else /* If the database supports auto-vacuum, make sure no tables contain @@ -5680,11 +5680,11 @@ char *sqlite3BtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ */ if( sCheck.anRef[i]==0 && (PTRMAP_PAGENO(pBt->usableSize, i)!=i || !pBt->autoVacuum) ){ - checkAppendMsg(&sCheck, 0, "Page %d is never used", i); + chectdeAppendMsg(&sCheck, 0, "Page %d is never used", i); } if( sCheck.anRef[i]!=0 && (PTRMAP_PAGENO(pBt->usableSize, i)==i && pBt->autoVacuum) ){ - checkAppendMsg(&sCheck, 0, "Pointer map page %d is referenced", i); + chectdeAppendMsg(&sCheck, 0, "Pointer map page %d is referenced", i); } #endif } @@ -5693,7 +5693,7 @@ char *sqlite3BtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ */ unlockBtreeIfUnused(pBt); if( nRef != *sqlite3pager_stats(pBt->pPager) ){ - checkAppendMsg(&sCheck, 0, + chectdeAppendMsg(&sCheck, 0, "Outstanding page count goes from %d to %d during this analysis", nRef, *sqlite3pager_stats(pBt->pPager) ); |