}
/*
- * Find the first occurence of a key in the tree <root>. If none can be
+ * Find the first occurrence of a key in the tree <root>. If none can be
* found, return NULL.
*/
static forceinline struct eb32_node *__eb32_lookup(struct eb_root *root, u32 x)
}
/*
- * Find the first occurence of a signed key in the tree <root>. If none can
+ * Find the first occurrence of a signed key in the tree <root>. If none can
* be found, return NULL.
*/
static forceinline struct eb32_node *__eb32i_lookup(struct eb_root *root, s32 x)
}
/*
- * Find the first occurence of a key in the tree <root>. If none can be
+ * Find the first occurrence of a key in the tree <root>. If none can be
* found, return NULL.
*/
static forceinline struct eb64_node *__eb64_lookup(struct eb_root *root, u64 x)
}
/*
- * Find the first occurence of a signed key in the tree <root>. If none can
+ * Find the first occurrence of a signed key in the tree <root>. If none can
* be found, return NULL.
*/
static forceinline struct eb64_node *__eb64i_lookup(struct eb_root *root, s64 x)
#include "ebpttree.h"
#include "ebimtree.h"
-/* Find the first occurence of a key of <len> bytes in the tree <root>.
+/* Find the first occurrence of a key of <len> bytes in the tree <root>.
* If none can be found, return NULL.
*/
REGPRM3 struct ebpt_node *
REGPRM3 struct ebpt_node *ebim_lookup(struct eb_root *root, const void *x, unsigned int len);
REGPRM3 struct ebpt_node *ebim_insert(struct eb_root *root, struct ebpt_node *new, unsigned int len);
-/* Find the first occurence of a key of a least <len> bytes matching <x> in the
+/* Find the first occurrence of a key of a least <len> bytes matching <x> in the
* tree <root>. The caller is responsible for ensuring that <len> will not exceed
* the common parts between the tree's keys and <x>. In case of multiple matches,
* the leftmost node is returned. This means that this function can be used to
*/
node_bit = ~node_bit + (pos << 3) + 8; // = (pos<<3) + (7 - node_bit)
if (node_bit < 0) {
- /* This surprizing construction gives better performance
+ /* This surprising construction gives better performance
* because gcc does not try to reorder the loop. Tested to
* be fine with 2.95 to 4.2.
*/
#include "ebistree.h"
-/* Find the first occurence of a zero-terminated string <x> in the tree <root>.
+/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
* It's the caller's reponsibility to use this function only on trees which
* only contain zero-terminated strings. If none can be found, return NULL.
*/
REGPRM2 struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x);
REGPRM2 struct ebpt_node *ebis_insert(struct eb_root *root, struct ebpt_node *new);
-/* Find the first occurence of a length <len> string <x> in the tree <root>.
+/* Find the first occurrence of a length <len> string <x> in the tree <root>.
* It's the caller's reponsibility to use this function only on trees which
* only contain zero-terminated strings, and that no null character is present
* in string <x> in the first <len> chars. If none can be found, return NULL.
return node;
}
-/* Find the first occurence of a zero-terminated string <x> in the tree <root>.
+/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
* It's the caller's reponsibility to use this function only on trees which
* only contain zero-terminated strings. If none can be found, return NULL.
*/
#include "ebmbtree.h"
-/* Find the first occurence of a key of <len> bytes in the tree <root>.
+/* Find the first occurrence of a key of <len> bytes in the tree <root>.
* If none can be found, return NULL.
*/
REGPRM3 struct ebmb_node *
return __ebmb_insert(root, new, len);
}
-/* Find the first occurence of the longest prefix matching a key <x> in the
+/* Find the first occurrence of the longest prefix matching a key <x> in the
* tree <root>. It's the caller's responsibility to ensure that key <x> is at
* least as long as the keys in the tree. If none can be found, return NULL.
*/
return __ebmb_lookup_longest(root, x);
}
-/* Find the first occurence of a prefix matching a key <x> of <pfx> BITS in the
+/* Find the first occurrence of a prefix matching a key <x> of <pfx> BITS in the
* tree <root>. If none can be found, return NULL.
*/
REGPRM3 struct ebmb_node *
__eb_delete(&ebmb->node);
}
-/* Find the first occurence of a key of a least <len> bytes matching <x> in the
+/* Find the first occurrence of a key of a least <len> bytes matching <x> in the
* tree <root>. The caller is responsible for ensuring that <len> will not exceed
* the common parts between the tree's keys and <x>. In case of multiple matches,
* the leftmost node is returned. This means that this function can be used to
*/
node_bit = ~node_bit + (pos << 3) + 8; // = (pos<<3) + (7 - node_bit)
if (node_bit < 0) {
- /* This surprizing construction gives better performance
+ /* This surprising construction gives better performance
* because gcc does not try to reorder the loop. Tested to
* be fine with 2.95 to 4.2.
*/
}
-/* Find the first occurence of the longest prefix matching a key <x> in the
+/* Find the first occurrence of the longest prefix matching a key <x> in the
* tree <root>. It's the caller's responsibility to ensure that key <x> is at
* least as long as the keys in the tree. Note that this can be ensured by
* having a byte at the end of <x> which cannot be part of any prefix, typically
}
-/* Find the first occurence of a prefix matching a key <x> of <pfx> BITS in the
+/* Find the first occurrence of a prefix matching a key <x> of <pfx> BITS in the
* tree <root>. It's the caller's responsibility to ensure that key <x> is at
* least as long as the keys in the tree. Note that this can be ensured by
* having a byte at the end of <x> which cannot be part of any prefix, typically
#include "ebsttree.h"
-/* Find the first occurence of a zero-terminated string <x> in the tree <root>.
+/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
* It's the caller's reponsibility to use this function only on trees which
* only contain zero-terminated strings. If none can be found, return NULL.
*/
REGPRM2 struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x);
REGPRM2 struct ebmb_node *ebst_insert(struct eb_root *root, struct ebmb_node *new);
-/* Find the first occurence of a length <len> string <x> in the tree <root>.
+/* Find the first occurrence of a length <len> string <x> in the tree <root>.
* It's the caller's reponsibility to use this function only on trees which
* only contain zero-terminated strings, and that no null character is present
* in string <x> in the first <len> chars. If none can be found, return NULL.
return node;
}
-/* Find the first occurence of a zero-terminated string <x> in the tree <root>.
+/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
* It's the caller's reponsibility to use this function only on trees which
* only contain zero-terminated strings. If none can be found, return NULL.
*/