diff options
Diffstat (limited to 'src/itree.h')
| -rw-r--r-- | src/itree.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/itree.h b/src/itree.h index f54dbd7f07e..23e1105a05d 100644 --- a/src/itree.h +++ b/src/itree.h | |||
| @@ -41,7 +41,7 @@ INLINE_HEADER_BEGIN | |||
| 41 | struct itree_node | 41 | struct itree_node |
| 42 | { | 42 | { |
| 43 | /* The normal parent, left and right links found in binary trees. | 43 | /* The normal parent, left and right links found in binary trees. |
| 44 | See also `red`, below, which completes the Red-Black tree | 44 | See also 'red', below, which completes the Red-Black tree |
| 45 | representation. */ | 45 | representation. */ |
| 46 | struct itree_node *parent; | 46 | struct itree_node *parent; |
| 47 | struct itree_node *left; | 47 | struct itree_node *left; |
| @@ -147,13 +147,13 @@ struct itree_iterator | |||
| 147 | struct itree_node *node; | 147 | struct itree_node *node; |
| 148 | ptrdiff_t begin; | 148 | ptrdiff_t begin; |
| 149 | ptrdiff_t end; | 149 | ptrdiff_t end; |
| 150 | uintmax_t otick; /* A copy of the tree's `otick`. */ | 150 | uintmax_t otick; /* A copy of the tree's 'otick'. */ |
| 151 | enum itree_order order; | 151 | enum itree_order order; |
| 152 | }; | 152 | }; |
| 153 | 153 | ||
| 154 | /* Iterate over the intervals between BEG and END in the tree T. | 154 | /* Iterate over the intervals between BEG and END in the tree T. |
| 155 | N will hold successive nodes. ORDER can be one of : `ASCENDING`, | 155 | N will hold successive nodes. ORDER can be one of : 'ASCENDING', |
| 156 | `DESCENDING`, `POST_ORDER`, or `PRE_ORDER`. | 156 | 'DESCENDING', 'POST_ORDER', or 'PRE_ORDER'. |
| 157 | It should be used as: | 157 | It should be used as: |
| 158 | 158 | ||
| 159 | ITREE_FOREACH (n, t, beg, end, order) | 159 | ITREE_FOREACH (n, t, beg, end, order) |
| @@ -167,12 +167,12 @@ struct itree_iterator | |||
| 167 | - Don't modify the tree during the iteration. | 167 | - Don't modify the tree during the iteration. |
| 168 | */ | 168 | */ |
| 169 | #define ITREE_FOREACH(n, t, beg, end, order) \ | 169 | #define ITREE_FOREACH(n, t, beg, end, order) \ |
| 170 | /* FIXME: We'd want to declare `n` right here, but I can't figure out | 170 | /* FIXME: We'd want to declare 'n' right here, but I can't figure out |
| 171 | how to make that work here: the `for` syntax only allows a single | 171 | how to make that work here: the 'for' syntax only allows a single |
| 172 | clause for the var declarations where we need 2 different types. | 172 | clause for the var declarations where we need 2 different types. |
| 173 | We could use the `struct {foo x; bar y; } p;` trick to declare two | 173 | We could use the 'struct {foo x; bar y; } p;' trick to declare two |
| 174 | vars `p.x` and `p.y` of unrelated types, but then none of the names | 174 | vars 'p.x' and 'p.y' of unrelated types, but then none of the names |
| 175 | of the vars matches the `n` we receive :-(. */ \ | 175 | of the vars matches the 'n' we receive :-(. */ \ |
| 176 | if (!t) \ | 176 | if (!t) \ |
| 177 | { } \ | 177 | { } \ |
| 178 | else \ | 178 | else \ |