CLEANUP: fix typos in comments in ebtree
This is mainly about misspells of the word "occurrence". The misspells are only located in code comments.
This commit is contained in:
parent
4cc8d0d60c
commit
7c16c0e431
@ -129,7 +129,7 @@ static forceinline void __eb32_delete(struct eb32_node *eb32)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 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.
|
* found, return NULL.
|
||||||
*/
|
*/
|
||||||
static forceinline struct eb32_node *__eb32_lookup(struct eb_root *root, u32 x)
|
static forceinline struct eb32_node *__eb32_lookup(struct eb_root *root, u32 x)
|
||||||
@ -180,7 +180,7 @@ 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.
|
* be found, return NULL.
|
||||||
*/
|
*/
|
||||||
static forceinline struct eb32_node *__eb32i_lookup(struct eb_root *root, s32 x)
|
static forceinline struct eb32_node *__eb32i_lookup(struct eb_root *root, s32 x)
|
||||||
|
@ -129,7 +129,7 @@ static forceinline void __eb64_delete(struct eb64_node *eb64)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 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.
|
* found, return NULL.
|
||||||
*/
|
*/
|
||||||
static forceinline struct eb64_node *__eb64_lookup(struct eb_root *root, u64 x)
|
static forceinline struct eb64_node *__eb64_lookup(struct eb_root *root, u64 x)
|
||||||
@ -178,7 +178,7 @@ 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.
|
* be found, return NULL.
|
||||||
*/
|
*/
|
||||||
static forceinline struct eb64_node *__eb64i_lookup(struct eb_root *root, s64 x)
|
static forceinline struct eb64_node *__eb64i_lookup(struct eb_root *root, s64 x)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "ebpttree.h"
|
#include "ebpttree.h"
|
||||||
#include "ebimtree.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.
|
* If none can be found, return NULL.
|
||||||
*/
|
*/
|
||||||
REGPRM3 struct ebpt_node *
|
REGPRM3 struct ebpt_node *
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
REGPRM3 struct ebpt_node *ebim_lookup(struct eb_root *root, const void *x, unsigned int len);
|
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);
|
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
|
* 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 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
|
* the leftmost node is returned. This means that this function can be used to
|
||||||
@ -89,7 +89,7 @@ __ebim_lookup(struct eb_root *root, const void *x, unsigned int len)
|
|||||||
*/
|
*/
|
||||||
node_bit = ~node_bit + (pos << 3) + 8; // = (pos<<3) + (7 - node_bit)
|
node_bit = ~node_bit + (pos << 3) + 8; // = (pos<<3) + (7 - node_bit)
|
||||||
if (node_bit < 0) {
|
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
|
* because gcc does not try to reorder the loop. Tested to
|
||||||
* be fine with 2.95 to 4.2.
|
* be fine with 2.95 to 4.2.
|
||||||
*/
|
*/
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "ebistree.h"
|
#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
|
* 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.
|
* only contain zero-terminated strings. If none can be found, return NULL.
|
||||||
*/
|
*/
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
REGPRM2 struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x);
|
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);
|
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
|
* 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
|
* 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.
|
* in string <x> in the first <len> chars. If none can be found, return NULL.
|
||||||
@ -54,7 +54,7 @@ ebis_lookup_len(struct eb_root *root, const char *x, unsigned int len)
|
|||||||
return node;
|
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
|
* 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.
|
* only contain zero-terminated strings. If none can be found, return NULL.
|
||||||
*/
|
*/
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "ebmbtree.h"
|
#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.
|
* If none can be found, return NULL.
|
||||||
*/
|
*/
|
||||||
REGPRM3 struct ebmb_node *
|
REGPRM3 struct ebmb_node *
|
||||||
@ -42,7 +42,7 @@ ebmb_insert(struct eb_root *root, struct ebmb_node *new, unsigned int len)
|
|||||||
return __ebmb_insert(root, new, len);
|
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
|
* 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.
|
* least as long as the keys in the tree. If none can be found, return NULL.
|
||||||
*/
|
*/
|
||||||
@ -52,7 +52,7 @@ ebmb_lookup_longest(struct eb_root *root, const void *x)
|
|||||||
return __ebmb_lookup_longest(root, x);
|
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.
|
* tree <root>. If none can be found, return NULL.
|
||||||
*/
|
*/
|
||||||
REGPRM3 struct ebmb_node *
|
REGPRM3 struct ebmb_node *
|
||||||
|
@ -123,7 +123,7 @@ static forceinline void __ebmb_delete(struct ebmb_node *ebmb)
|
|||||||
__eb_delete(&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
|
* 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 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
|
* the leftmost node is returned. This means that this function can be used to
|
||||||
@ -176,7 +176,7 @@ static forceinline struct ebmb_node *__ebmb_lookup(struct eb_root *root, const v
|
|||||||
*/
|
*/
|
||||||
node_bit = ~node_bit + (pos << 3) + 8; // = (pos<<3) + (7 - node_bit)
|
node_bit = ~node_bit + (pos << 3) + 8; // = (pos<<3) + (7 - node_bit)
|
||||||
if (node_bit < 0) {
|
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
|
* because gcc does not try to reorder the loop. Tested to
|
||||||
* be fine with 2.95 to 4.2.
|
* be fine with 2.95 to 4.2.
|
||||||
*/
|
*/
|
||||||
@ -371,7 +371,7 @@ __ebmb_insert(struct eb_root *root, struct ebmb_node *new, unsigned int 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
|
* 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
|
* 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
|
* having a byte at the end of <x> which cannot be part of any prefix, typically
|
||||||
@ -465,7 +465,7 @@ static forceinline struct ebmb_node *__ebmb_lookup_longest(struct eb_root *root,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 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
|
* 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
|
* 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
|
* having a byte at the end of <x> which cannot be part of any prefix, typically
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "ebsttree.h"
|
#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
|
* 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.
|
* only contain zero-terminated strings. If none can be found, return NULL.
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
REGPRM2 struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x);
|
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);
|
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
|
* 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
|
* 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.
|
* in string <x> in the first <len> chars. If none can be found, return NULL.
|
||||||
@ -48,7 +48,7 @@ ebst_lookup_len(struct eb_root *root, const char *x, unsigned int len)
|
|||||||
return node;
|
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
|
* 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.
|
* only contain zero-terminated strings. If none can be found, return NULL.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user