Fix whitespace

This commit is contained in:
rakslice 2020-09-24 19:44:33 -07:00
parent 561f1dfcde
commit ca9191fcb1

View File

@ -104,30 +104,30 @@ void Enqueue(uint32 elem, uint32 list)
} }
static void InsertQueueEntry(uint32 elem, uint32 at, uint32 list) { static void InsertQueueEntry(uint32 elem, uint32 at, uint32 list) {
uint32 next = ReadMacInt32(at); uint32 next = ReadMacInt32(at);
WriteMacInt32(at, elem); WriteMacInt32(at, elem);
WriteMacInt32(elem + qLink, next); WriteMacInt32(elem + qLink, next);
if (next == 0) { if (next == 0) {
// inserted at end // inserted at end
WriteMacInt32(list + qTail, elem); WriteMacInt32(list + qTail, elem);
} }
} }
static void RemoveQueueEntry(uint32 at, uint32 list) { static void RemoveQueueEntry(uint32 at, uint32 list) {
uint32 e = ReadMacInt32(at); uint32 e = ReadMacInt32(at);
uint32 next = ReadMacInt32(e + qLink); uint32 next = ReadMacInt32(e + qLink);
if (next == 0) { if (next == 0) {
// removing from end // removing from end
if (at == list + qHead) { if (at == list + qHead) {
WriteMacInt32(list + qTail, 0); WriteMacInt32(list + qTail, 0);
} else { } else {
WriteMacInt32(list + qTail, at - qLink); WriteMacInt32(list + qTail, at - qLink);
} }
} }
WriteMacInt32(at, next); WriteMacInt32(at, next);
WriteMacInt32(e + qLink, 0); WriteMacInt32(e + qLink, 0);
} }
/* /*
@ -158,31 +158,31 @@ int FindFreeDriveNumber(int num)
*/ */
void MoveDrivesFromDriverToFront(uint32 driverRefNum) { void MoveDrivesFromDriverToFront(uint32 driverRefNum) {
const uint32 DrvQHdr = 0x308; // drive queue address const uint32 DrvQHdr = 0x308; // drive queue address
uint32 nextInsertPos = DrvQHdr + qHead; uint32 nextInsertPos = DrvQHdr + qHead;
uint32 ptrToElem = DrvQHdr + qHead; uint32 ptrToElem = DrvQHdr + qHead;
uint32 e = ReadMacInt32(ptrToElem); uint32 e = ReadMacInt32(ptrToElem);
while (e) { while (e) {
uint32 next = ReadMacInt32(e + qLink); uint32 next = ReadMacInt32(e + qLink);
uint32 d = e - dsQLink; uint32 d = e - dsQLink;
uint32 curRefNum = ReadMacInt16(d + dsQRefNum); uint32 curRefNum = ReadMacInt16(d + dsQRefNum);
if ((curRefNum & 0xffff) == (driverRefNum & 0xffff)) { if ((curRefNum & 0xffff) == (driverRefNum & 0xffff)) {
RemoveQueueEntry(ptrToElem, DrvQHdr); RemoveQueueEntry(ptrToElem, DrvQHdr);
InsertQueueEntry(e, nextInsertPos, DrvQHdr); InsertQueueEntry(e, nextInsertPos, DrvQHdr);
nextInsertPos = e + qLink; nextInsertPos = e + qLink;
// after the removal, ptrToElem already points to next // after the removal, ptrToElem already points to next
} else { } else {
ptrToElem = e + qLink; ptrToElem = e + qLink;
} }
e = next; e = next;
} }
} }
/* /*