+RtlSplay()
authorshort <>
Mon, 23 Dec 2002 00:10:43 +0000 (00:10 +0000)
committershort <>
Mon, 23 Dec 2002 00:10:43 +0000 (00:10 +0000)
 - NOP for now
+gtk-doc for RtlDelete()

src/libcaptive/rtl/splaylinks.c

index 38ccf9a..9f3db6d 100644 (file)
 #include <glib/gmessages.h>
 
 
+/**
+ * RtlDelete:
+ * @Links: Node to delete.
+ * %NULL value is forbidden.
+ *
+ * Deletes the given node from its tree.
+ * 
+ * Returns: New root of the given tree. It may be %NULL if the tree becomes empty.
+ */
 PRTL_SPLAY_LINKS RtlDelete(PRTL_SPLAY_LINKS Links)
 {
 RTL_SPLAY_LINKS *root,**selfp;
@@ -51,3 +60,24 @@ RTL_SPLAY_LINKS *root,**selfp;
 
        return root;
 }
+
+
+/**
+ * RtlSplay:
+ * @Links: Root of the tree to rebalance.
+ * %NULL value is forbidden.
+ *
+ * Rebalances the tree for optimal heights and effective operations.
+ * FIXME: Currently a NOP in libcaptive.
+ *
+ * Returns: New root of the rebalanced tree.
+ * It may or it may not be equal to the given @Links.
+ */
+PRTL_SPLAY_LINKS RtlSplay(PRTL_SPLAY_LINKS Links)
+{
+       g_return_val_if_fail(Links!=NULL,NULL);
+
+       /* FIXME: rebalance: NOT IMPLEMENTED YET */
+
+       return Links;
+}