- Finished implementing RtlInsertUnicodePrefix: handle greater and less than insertions.
[reactos.git] / reactos / include / ndk / rtlfuncs.h
index 7c2dd68..0a5ddd4 100644 (file)
 #define RtlParent(Links) \
     (PRTL_SPLAY_LINKS)(Links)->Parent
 
-#define RtlInitializeSplayLinks(Links)       \
-    PRTL_SPLAY_LINKS _SplayLinks;            \
-    _SplayLinks = (PRTL_SPLAY_LINKS)(Links); \
-    _SplayLinks->Parent = _SplayLinks;       \
-    _SplayLinks->LeftChild = NULL;           \
+#define RtlInitializeSplayLinks(Links)                  \
+    PRTL_SPLAY_LINKS _SplayLinks;                       \
+    _SplayLinks = (PRTL_SPLAY_LINKS)(Links);            \
+    _SplayLinks->Parent = _SplayLinks;                  \
+    _SplayLinks->LeftChild = NULL;                      \
     _SplayLinks->RightChild = NULL;
 
+#define RtlInsertAsLeftChild(ParentLinks,ChildLinks)    \
+    PRTL_SPLAY_LINKS _SplayParent;                      \
+    PRTL_SPLAY_LINKS _SplayChild;                       \
+    _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks);     \
+    _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks);       \
+    _SplayParent->LeftChild = _SplayChild;              \
+    _SplayChild->Parent = _SplayParent;
+
+#define RtlInsertAsRightChild(ParentLinks,ChildLinks)   \
+    PRTL_SPLAY_LINKS _SplayParent;                      \
+    PRTL_SPLAY_LINKS _SplayChild;                       \
+    _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks);     \
+    _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks);       \
+    _SplayParent->RightChild = _SplayChild;             \
+    _SplayChild->Parent = _SplayParent;
+
 /* PROTOTYPES ****************************************************************/
 
 /*