MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / writeAllocationTable

Function writeAllocationTable

tools/brother120tool.cc:261–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void writeAllocationTable()
262{
263 Bytes buffer(SECTOR_COUNT * 2);
264 ByteWriter bw(buffer);
265
266 for (int sector = 1; sector < (DATA_START_SECTOR - 2); sector++)
267 bw.write_le16(sector + 1);
268 bw.write_le16(0xffff);
269 bw.write_le16(0xffff);
270 for (int sector = DATA_START_SECTOR; sector != SECTOR_COUNT; sector++)
271 bw.write_be16(allocationTable[sector]);
272
273 file.seekp(0x800, std::ifstream::beg);
274 buffer.writeTo(file);
275}
276
277uint16_t allocateSector()
278{

Callers 1

doCreateFunction · 0.85

Calls 1

writeToMethod · 0.80

Tested by

no test coverage detected