Added SKIP_FIRST() macro for list iteration

This commit is contained in:
= 2020-05-20 02:26:56 +01:00
parent 7ad541eb02
commit 3dee4eb8dc
1 changed files with 4 additions and 2 deletions

View File

@ -11,13 +11,15 @@
_element = _element->forward)
#define POINTER _element
#define FOR_POINTERS_IN_LISTS(_list1, _list2) \
for(Object *_element = _list1->list, *_element2 = _list2->list; \
#define FOR_POINTERS_IN_LISTS(_list, _list2) \
for(Object *_element = _list->list, *_element2 = _list2->list; \
_element != NULL && _element2 != NULL; \
_element = _element->forward, _element2 = _element2->forward)
#define P1 POINTER
#define P2 _element2
#define SKIP_FIRST() if(_element == _list->list) {continue;}
enum errorCode {
MISMATCHED_PARENS,
BAD_LIST_OF_SYMBOL_STRINGS,