Hello Richard ! !!!!Sorry again for the mess with format and missing parameter on the maybe more friendly function "ptrmapPutOvflPtr" !!!!!
I decided to really look at the code now (before I looked at the diffs and saw so many magic numbers "4"). I know that what I'm saying here not always I follow for n reasons but thanks for giving me a chance to take a moment and reflect on this that do not seem a problem when writing but man when we come back after 1 or more days it's not easy to grasp what it mean. For example this function: static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){ ? CellInfo info; ? if( *pRC ) return; ? assert( pCell!=0 ); ? pPage->xParseCell(pPage, pCell, &info); ? if( info.nLocal<info.nPayload ){ ??? Pgno ovfl = get4byte(&pCell[OvflOffset(&info)]); ??? ptrmapPut(pPage->pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, pRC); ? } } I would like to see a less verbose version that hide through "inline function/macro" parameters that can be derived making the code easier to read and understand with less mental effort (or with mental effort directed to the forest instead of the trees where appropriate). static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){ ? CellInfo info; ? if( *pRC ) return; ? assert( pCell!=0 ); ? pPage->xParseCell(pPage, pCell, &info); ? if( info.nLocal<info.nPayload ){ ??? Pgno ovfl = getPgnoOverflow(pCell, info); ??? ptrmapPut(pPage, ovfl, pRC); ? } } Cheers !