Coda Distributed File System
Macros
bstree.cc File Reference
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include "bstree.h"
Include dependency graph for bstree.cc:

Macros

#define ZERONODE(n)
 
#define FIRST(r, n)
 
#define LAST(r, n)
 
#define SPLICE(n1, n2)
 

Macro Definition Documentation

◆ FIRST

#define FIRST (   r,
 
)
Value:
{ \
(n) = (r); \
while ((n)->leftchild != 0) \
(n) = (n)->leftchild; \
}
@ r
Definition: rvm_private.h:414

◆ LAST

#define LAST (   r,
 
)
Value:
{ \
(n) = (r); \
while ((n)->rightchild != 0) \
(n) = (n)->rightchild; \
}

◆ SPLICE

#define SPLICE (   n1,
  n2 
)
Value:
{ \
if ((n1)->parent == 0) \
root = (n2); \
else { \
if (((n1)->parent)->leftchild == (n1)) \
((n1)->parent)->leftchild = (n2); \
else \
((n1)->parent)->rightchild = (n2); \
} \
if ((n2) != 0) \
(n2)->parent = (n1)->parent; \
}
if(dirp==NULL)
Definition: dir.cc:42
PROCESS parent
Definition: smon2.c:80

◆ ZERONODE

#define ZERONODE (   n)
Value:
{ \
(n)->mytree = 0; \
(n)->parent = 0; \
(n)->leftchild = 0; \
(n)->rightchild = 0; \
}