--- /dev/null
+/* $Id$
+ * Implementation of RTL_SPLAY_LINKS functions of libcaptive
+ * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; exactly version 2 of June 1991 is required
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#include "config.h"
+
+#include "reactos/ddk/rtltypes.h" /* self */
+#include <glib/gmessages.h>
+
+
+PRTL_SPLAY_LINKS RtlDelete(PRTL_SPLAY_LINKS Links)
+{
+RTL_SPLAY_LINKS *root,**selfp;
+
+ g_return_val_if_fail(Links!=NULL,NULL);
+
+ for (root=Links;root->Parent!=root;) {
+ g_assert(root->Parent!=NULL);
+ root=root->Parent;
+ }
+ if (root==Links)
+ selfp=&root;
+ else if (Links->Parent->LeftChild==Links)
+ selfp=&Links->Parent->LeftChild;
+ else if (Links->Parent->RightChild==Links)
+ selfp=&Links->Parent->RightChild;
+ else g_assert_not_reached(); /* should not happen if the structures are valid */
+
+ if (!Links->LeftChild)
+ *selfp=Links->RightChild;
+ else if (!Links->RightChild)
+ *selfp=Links->LeftChild;
+ else g_assert_not_reached(); /* FIXME: NOT IMPLEMENTED YET */
+
+ /* FIXME: rebalance: NOT IMPLEMENTED YET */
+
+ return root;
+}