Move InsertAscendingListFIFO, InsertDescendingListFIFO,
InsertAscendingList and InsertDescendingList out of the __USE_W32API
guarded region.
Modified: trunk/reactos/include/ntos/rtl.h
_____
Modified: trunk/reactos/include/ntos/rtl.h
--- trunk/reactos/include/ntos/rtl.h 2005-06-18 15:55:23 UTC (rev
16046)
+++ trunk/reactos/include/ntos/rtl.h 2005-06-18 15:58:39 UTC (rev
16047)
@@ -282,89 +282,7 @@
return Entry;
}
-
/*
- * FIFO versions are slower but ensures that entries with equal
SortField value
- * are placed in FIFO order (assuming that entries are removed from
Head).
- */
-
-#define InsertAscendingListFIFO(ListHead, Type, ListEntryField,
NewEntry, SortField)\
-{\
- PLIST_ENTRY current;\
-\
- current = (ListHead)->Flink;\
- while (current != (ListHead))\
- {\
- if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
- (NewEntry)->SortField)\
- {\
- break;\
- }\
- current = current->Flink;\
- }\
-\
- InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-
-#define InsertDescendingListFIFO(ListHead, Type, ListEntryField,
NewEntry, SortField)\
-{\
- PLIST_ENTRY current;\
-\
- current = (ListHead)->Flink;\
- while (current != (ListHead))\
- {\
- if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
- (NewEntry)->SortField)\
- {\
- break;\
- }\
- current = current->Flink;\
- }\
-\
- InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-
-#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry,
SortField)\
-{\
- PLIST_ENTRY current;\
-\
- current = (ListHead)->Flink;\
- while (current != (ListHead))\
- {\
- if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
- (NewEntry)->SortField)\
- {\
- break;\
- }\
- current = current->Flink;\
- }\
-\
- InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-
-#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry,
SortField)\
-{\
- PLIST_ENTRY current;\
-\
- current = (ListHead)->Flink;\
- while (current != (ListHead))\
- {\
- if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
- (NewEntry)->SortField)\
- {\
- break;\
- }\
- current = current->Flink;\
- }\
-\
- InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-
-/*
* BOOLEAN
* IsXstEntry (
* PLIST_ENTRY ListHead,
@@ -462,7 +380,86 @@
#endif /* __USE_W32API */
+/*
+ * FIFO versions are slower but ensures that entries with equal
SortField value
+ * are placed in FIFO order (assuming that entries are removed from
Head).
+ */
+#define InsertAscendingListFIFO(ListHead, Type, ListEntryField,
NewEntry, SortField)\
+{\
+ PLIST_ENTRY current;\
+\
+ current = (ListHead)->Flink;\
+ while (current != (ListHead))\
+ {\
+ if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
+ (NewEntry)->SortField)\
+ {\
+ break;\
+ }\
+ current = current->Flink;\
+ }\
+\
+ InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+
+#define InsertDescendingListFIFO(ListHead, Type, ListEntryField,
NewEntry, SortField)\
+{\
+ PLIST_ENTRY current;\
+\
+ current = (ListHead)->Flink;\
+ while (current != (ListHead))\
+ {\
+ if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
+ (NewEntry)->SortField)\
+ {\
+ break;\
+ }\
+ current = current->Flink;\
+ }\
+\
+ InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+
+#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry,
SortField)\
+{\
+ PLIST_ENTRY current;\
+\
+ current = (ListHead)->Flink;\
+ while (current != (ListHead))\
+ {\
+ if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
+ (NewEntry)->SortField)\
+ {\
+ break;\
+ }\
+ current = current->Flink;\
+ }\
+\
+ InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+
+#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry,
SortField)\
+{\
+ PLIST_ENTRY current;\
+\
+ current = (ListHead)->Flink;\
+ while (current != (ListHead))\
+ {\
+ if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
+ (NewEntry)->SortField)\
+ {\
+ break;\
+ }\
+ current = current->Flink;\
+ }\
+\
+ InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
/*
* PURPOSE: Used with RtlCheckRegistryKey, RtlCreateRegistryKey,
* RtlDeleteRegistryKey