chiark / gitweb /
Rename files to remove the pointless `tree' part. master
authorMark Wooding <mdw@distorted.org.uk>
Fri, 6 Sep 2024 21:10:18 +0000 (22:10 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 6 Sep 2024 21:10:18 +0000 (22:10 +0100)
Makefile
avl.c [moved from avltree.c with 99% similarity]
avl.h [moved from avltree.h with 99% similarity]
bst.c [moved from bstree.c with 99% similarity]
bst.h [moved from bstree.h with 99% similarity]
rb.c [moved from rbtree.c with 99% similarity]
rb.h [moved from rbtree.h with 99% similarity]
treetest.c

index e450ec3a9c1ab83605d5a03d512a71eb5ab0f60b..dd4380435a5481bd9b1dbc1667bca4d7ba33cf61 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ LIBSRCS                        =
 LIBOBJS                         = $(call objify, $(LIBSRCS))
 DEPOBJS                        += $(LIBOBJS)
 
-LIBSRCS                        += bstree.c
+LIBSRCS                        += bst.c
 
 TREES                   =
 LIBSRCS                        += $(foreach t,$(TREES), $($t_LIBSRCS))
@@ -58,12 +58,12 @@ LIBSRCS                     += $(foreach t,$(TREES), $($t_LIBSRCS))
 COMMON_TESTS            = test-simple
 
 TREES                  += avl
-avl_LIBSRCS             = avltree.c
+avl_LIBSRCS             = avl.c
 avl_DEFINES             = -DTREE=AVL
 avl_TESTS               = avltest avlregress
 
 TREES                  += rb
-rb_LIBSRCS              = rbtree.c
+rb_LIBSRCS              = rb.c
 rb_DEFINES              = -DTREE=RB
 rb_TESTS                = rbtest rbregress
 
diff --git a/avltree.c b/avl.c
similarity index 99%
rename from avltree.c
rename to avl.c
index 44bb5190532ab316aa01b05be6c089961887aacb..5f6615be251012e8857bde19cca61fb52b2e8c3a 100644 (file)
--- a/avltree.c
+++ b/avl.c
@@ -2,7 +2,7 @@
 #include <stdio.h>
 
 #include "internal.h"
-#include "avltree.h"
+#include "avl.h"
 
 /* Combinatorial logic for balance-annotation adjustments. */
 #define REBAL_EEL(bal) ((bal) >> 1)
diff --git a/avltree.h b/avl.h
similarity index 99%
rename from avltree.h
rename to avl.h
index cdbb0d5ddb7487c4cd0082f27d7376db3ca0898b..c333c320203ba92b2489b835ef2519ed6937474a 100644 (file)
--- a/avltree.h
+++ b/avl.h
@@ -1,9 +1,9 @@
-#ifndef XYLA_AVLTREE_H
-#define XYLA_AVLTREE_H
+#ifndef AVL_H
+#define AVL_H
 
 #include <limits.h>
 
-#include "bstree.h"
+#include "bst.h"
 
 struct avlnode {
   struct bstnode _bst;
diff --git a/bstree.c b/bst.c
similarity index 99%
rename from bstree.c
rename to bst.c
index 603f0464ce70e3bd15e79957ed72bd658a283697..19aaa79fbab207009ccf0d6ee7ae0844fda1b8ec 100644 (file)
--- a/bstree.c
+++ b/bst.c
@@ -1,6 +1,6 @@
 #include <assert.h>
 
-#include "bstree.h"
+#include "bst.h"
 
 /* --- @bstree_chkorder@ --- *
  *
diff --git a/bstree.h b/bst.h
similarity index 99%
rename from bstree.h
rename to bst.h
index 6a2c74cd7d47844e0cdd6dd9ab7af861201140b9..5fd9c3c71129170fcfb7a7dc3442bd1c6e45f0ce 100644 (file)
--- a/bstree.h
+++ b/bst.h
@@ -1,5 +1,5 @@
-#ifndef XYLA_BSTREE_H
-#define XYLA_BSTREE_H
+#ifndef BST_H
+#define BST_H
 
 #include <stdio.h>
 
diff --git a/rbtree.c b/rb.c
similarity index 99%
rename from rbtree.c
rename to rb.c
index e4dbeba61197b06bbfec54fa12cdc7813dfd2696..9e1d894940ed44f15fddc646fc882d994631e080 100644 (file)
--- a/rbtree.c
+++ b/rb.c
@@ -2,7 +2,7 @@
 #include <stdio.h>
 
 #include "internal.h"
-#include "rbtree.h"
+#include "rb.h"
 
 /* --- @check_recurse@ --- *
  *
diff --git a/rbtree.h b/rb.h
similarity index 99%
rename from rbtree.h
rename to rb.h
index 2ce06aa3c50e4e0cdf37b39c7a2446abbc84b043..5c10f09d9aa6162e6f3fa6336d71e9a90acd9a48 100644 (file)
--- a/rbtree.h
+++ b/rb.h
@@ -1,9 +1,9 @@
-#ifndef XYLA_RBTREE_H
-#define XYLA_RBTREE_H
+#ifndef RB_H
+#define RB_H
 
 #include <limits.h>
 
-#include "bstree.h"
+#include "bst.h"
 
 struct rbnode {
   struct bstnode _bst;
index 55ea8357d865a43bc95d3dcb94619c963a5342af..2e129eed493279d784f976947a4f3d2efe6139cd 100644 (file)
@@ -12,7 +12,7 @@
 #define TREAP 4
 
 #if TREE == AVL
-#  include "avltree.h"
+#  include "avl.h"
 #  define NODE avlnode
 #  define PATH avlpath
 #  define ITER avliter
@@ -34,7 +34,7 @@
 #  define TREE_UNISECT avltree_unisect
 #  define TREE_DIFFSECT avltree_diffsect
 #elif TREE == RB
-#  include "rbtree.h"
+#  include "rb.h"
 #  define NODE rbnode
 #  define PATH rbpath
 #  define ITER rbiter
@@ -56,7 +56,7 @@
 #  define TREE_UNISECT rbtree_unisect
 #  define TREE_DIFFSECT rbtree_diffsect
 #elif TREE == SPLAY
-#  include "splaytree.h"
+#  include "splay.h"
 #elif TREE == TREAP
 #  include "treap.h"
 #else