MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / ProDOS_BlockGetDirectoryBlockCount

Function ProDOS_BlockGetDirectoryBlockCount

source/ProDOS_FileSystem.h:217–230  ·  view source on GitHub ↗

------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

215
216 // ------------------------------------------------------------------------
217 inline int ProDOS_BlockGetDirectoryBlockCount ( uint8_t *pDiskBytes, int nOffset )
218 {
219 int nBlocks = 0;
220 int nNextBlock = 0;
221
222 do
223 {
224 nBlocks++;
225 nNextBlock = ProDOS_Get16( pDiskBytes, nOffset + 2 );
226 nOffset = nNextBlock * PRODOS_BLOCK_SIZE;
227 } while( nNextBlock );
228
229 return nBlocks;
230 }
231
232 // ------------------------------------------------------------------------
233 int ProDOS_BlockGetFirstFree ( uint8_t *pDiskBytes, size_t nDiskSize, ProDOS_VolumeHeader_t *pVolume )

Callers 1

Calls 1

ProDOS_Get16Function · 0.85

Tested by

no test coverage detected