1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Rename dom_node_cmp() to dom_node_casecmp() and make it public

This commit is contained in:
Jonas Fonseca 2005-12-22 23:37:59 +01:00 committed by Jonas Fonseca
parent b13a21bbc2
commit 1f47fabf5e
2 changed files with 6 additions and 3 deletions

View File

@ -134,8 +134,8 @@ struct dom_node_search {
#define INIT_DOM_NODE_SEARCH(key, list) \ #define INIT_DOM_NODE_SEARCH(key, list) \
{ (key), -1, 0, (list)->size, } { (key), -1, 0, (list)->size, }
static inline int int
dom_node_cmp(struct dom_node *node1, struct dom_node *node2) dom_node_casecmp(struct dom_node *node1, struct dom_node *node2)
{ {
if (node1->type == node2->type) { if (node1->type == node2->type) {
switch (node1->type) { switch (node1->type) {
@ -176,7 +176,7 @@ dom_node_list_bsearch(struct dom_node_search *search, struct dom_node_list *list
do { do {
int pos = get_bsearch_position(list, search->from, search->to); int pos = get_bsearch_position(list, search->from, search->to);
struct dom_node *node = list->entries[pos]; struct dom_node *node = list->entries[pos];
int difference = dom_node_cmp(search->key, node); int difference = dom_node_casecmp(search->key, node);
search->pos = pos; search->pos = pos;

View File

@ -286,6 +286,9 @@ add_dom_proc_instruction(struct dom_node *parent, unsigned char *string, int len
/* Removes the node and all its children and free()s itself */ /* Removes the node and all its children and free()s itself */
void done_dom_node(struct dom_node *node); void done_dom_node(struct dom_node *node);
/* Compare two nodes returning non-zero if they differ. */
int dom_node_casecmp(struct dom_node *node1, struct dom_node *node2);
/* Returns the name of the node in an allocated string. */ /* Returns the name of the node in an allocated string. */
struct dom_string *get_dom_node_name(struct dom_node *node); struct dom_string *get_dom_node_name(struct dom_node *node);