mirror of
https://github.com/reactos/reactos.git
synced 2024-11-19 13:33:42 +00:00
6f19c83b96
svn path=/branches/setup_improvements/; revision=75695
26 lines
685 B
C
26 lines
685 B
C
/*
|
|
* PROJECT: ReactOS Setup Library
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
* PURPOSE: Linked list support macros
|
|
* COPYRIGHT: Copyright 2005-2018 ReactOS Team
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#define InsertAscendingList(ListHead, NewEntry, Type, ListEntryField, SortField) \
|
|
do { \
|
|
PLIST_ENTRY current = (ListHead)->Flink; \
|
|
while (current != (ListHead)) \
|
|
{ \
|
|
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >= \
|
|
(NewEntry)->SortField) \
|
|
{ \
|
|
break; \
|
|
} \
|
|
current = current->Flink; \
|
|
} \
|
|
\
|
|
InsertTailList(current, &((NewEntry)->ListEntryField)); \
|
|
} while (0)
|
|
|
|
/* EOF */
|