public static ListEntry* RemoveHeadList( ListEntry* ListHead ) { ListEntry* flink; ListEntry* entry; entry = ListHead->Flink; flink = entry->Flink; ListHead->Flink = flink; flink->Blink = ListHead; return entry; }
public static bool RemoveEntryList( ListEntry* Entry ) { ListEntry* blink; ListEntry* flink; flink = Entry->Flink; blink = Entry->Blink; blink->Flink = flink; flink->Blink = blink; return flink == blink; }
public static ListEntry* RemoveTailList( ListEntry* ListHead ) { ListEntry* blink; ListEntry* entry; entry = ListHead->Blink; blink = entry->Blink; ListHead->Blink = blink; blink->Flink = ListHead; return entry; }
public static bool IsListEmpty( ListEntry* ListHead ) { return ListHead->Flink == ListHead->Blink; }
public static void InitializeListHead( ListEntry* ListHead ) { ListHead->Flink = ListHead->Blink = ListHead; }
public static void InsertHeadList( ListEntry* ListHead, ListEntry* Entry ) { ListEntry* flink; flink = ListHead->Flink; Entry->Flink = flink; Entry->Blink = ListHead; flink->Blink = Entry; ListHead->Flink = Entry; }
public static void InsertTailList( ListEntry* ListHead, ListEntry* Entry ) { ListEntry* blink; blink = ListHead->Blink; Entry->Flink = ListHead; Entry->Blink = blink; blink->Flink = Entry; ListHead->Blink = Entry; }