Пример #1
0
        public static ListEntry* RemoveHeadList(
            ListEntry* ListHead
            )
        {
            ListEntry* flink;
            ListEntry* entry;

            entry = ListHead->Flink;
            flink = entry->Flink;
            ListHead->Flink = flink;
            flink->Blink = ListHead;

            return entry;
        }
Пример #2
0
        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;
        }
Пример #3
0
        public static ListEntry* RemoveTailList(
            ListEntry* ListHead
            )
        {
            ListEntry* blink;
            ListEntry* entry;

            entry = ListHead->Blink;
            blink = entry->Blink;
            ListHead->Blink = blink;
            blink->Flink = ListHead;

            return entry;
        }
Пример #4
0
 public static bool IsListEmpty(
     ListEntry* ListHead
     )
 {
     return ListHead->Flink == ListHead->Blink;
 }
Пример #5
0
 public static void InitializeListHead(
     ListEntry* ListHead
     )
 {
     ListHead->Flink = ListHead->Blink = ListHead;
 }
Пример #6
0
        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;
        }
Пример #7
0
        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;
        }