mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
This commit is contained in:
commit
ef32768d3a
@ -55,8 +55,8 @@ struct dom_stack {
|
|||||||
void *data;
|
void *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define dom_stack_has_parents(nav) \
|
#define dom_stack_has_parents(stack) \
|
||||||
((nav)->states && (nav)->depth > 0)
|
((stack)->states && (stack)->depth > 0)
|
||||||
|
|
||||||
static inline struct dom_stack_state *
|
static inline struct dom_stack_state *
|
||||||
get_dom_stack_state(struct dom_stack *stack, int top_offset)
|
get_dom_stack_state(struct dom_stack *stack, int top_offset)
|
||||||
@ -66,21 +66,21 @@ get_dom_stack_state(struct dom_stack *stack, int top_offset)
|
|||||||
return &stack->states[stack->depth - 1 - top_offset];
|
return &stack->states[stack->depth - 1 - top_offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
#define get_dom_stack_parent(nav) get_dom_stack_state(nav, 1)
|
#define get_dom_stack_parent(stack) get_dom_stack_state(stack, 1)
|
||||||
#define get_dom_stack_top(nav) get_dom_stack_state(nav, 0)
|
#define get_dom_stack_top(stack) get_dom_stack_state(stack, 0)
|
||||||
|
|
||||||
#define get_dom_stack_state_data(stack, state) \
|
#define get_dom_stack_state_data(stack, state) \
|
||||||
((void *) &(stack)->state_objects[(state)->depth * (stack)->object_size])
|
((void *) &(stack)->state_objects[(state)->depth * (stack)->object_size])
|
||||||
|
|
||||||
/* The state iterators do not include the bottom state */
|
/* The state iterators do not include the bottom state */
|
||||||
|
|
||||||
#define foreach_dom_state(nav, item, pos) \
|
#define foreach_dom_state(stack, item, pos) \
|
||||||
for ((pos) = 1; (pos) < (nav)->depth; (pos)++) \
|
for ((pos) = 1; (pos) < (stack)->depth; (pos)++) \
|
||||||
if (((item) = &(nav)->states[(pos)]))
|
if (((item) = &(stack)->states[(pos)]))
|
||||||
|
|
||||||
#define foreachback_dom_state(nav, item, pos) \
|
#define foreachback_dom_state(stack, item, pos) \
|
||||||
for ((pos) = (nav)->depth - 1; (pos) > 0; (pos)--) \
|
for ((pos) = (stack)->depth - 1; (pos) > 0; (pos)--) \
|
||||||
if (((item) = &(nav)->states[(pos)]))
|
if (((item) = &(stack)->states[(pos)]))
|
||||||
|
|
||||||
/* Dive through the stack states in search for the specified match. */
|
/* Dive through the stack states in search for the specified match. */
|
||||||
static inline struct dom_stack_state *
|
static inline struct dom_stack_state *
|
||||||
|
Loading…
Reference in New Issue
Block a user