X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fbt.h;h=058a64dbab2b8baa7e45b5cab383fbd4fba1538f;hb=f5c108becd49d78f4898cab11352291f5689d24e;hp=2a014aaf96f7eabbaefae9d9edc3a33b1a98f506;hpb=7eee0554f378481faf447e2d2e940f389d6b05ec;p=pspp-builds.git diff --git a/src/libpspp/bt.h b/src/libpspp/bt.h index 2a014aaf..058a64db 100644 --- a/src/libpspp/bt.h +++ b/src/libpspp/bt.h @@ -34,7 +34,7 @@ ((STRUCT *) ((char *) (NODE) - offsetof (STRUCT, MEMBER))) /* Node in a balanced binary tree. */ -struct bt_node +struct bt_node { struct bt_node *up; /* Parent (NULL for root). */ struct bt_node *down[2]; /* Left child, right child. */ @@ -47,7 +47,7 @@ typedef int bt_compare_func (const struct bt_node *a, const void *aux); /* A balanced binary tree. */ -struct bt +struct bt { struct bt_node *root; /* Tree's root, NULL if empty. */ bt_compare_func *compare; /* To compare nodes. */ @@ -75,7 +75,7 @@ struct bt_node *bt_changed (struct bt *, struct bt_node *); void bt_moved (struct bt *, struct bt_node *); /* Returns the number of nodes currently in BT. */ -static inline size_t bt_count (const struct bt *bt) +static inline size_t bt_count (const struct bt *bt) { return bt->size; }