tb Implement a string stack
This commit is contained in:
@ -68,4 +68,16 @@
|
||||
var != NULL && (idx) < (max); \
|
||||
var = tmp, tmp = (var ? var->next : NULL), (idx)++)
|
||||
|
||||
#define LL_BACK(head, out) \
|
||||
do { \
|
||||
(out) = NULL; \
|
||||
if ((head) != NULL) { \
|
||||
typeof((head)) __tmp = (head); \
|
||||
while (__tmp->next != NULL) { \
|
||||
__tmp = __tmp->next; \
|
||||
} \
|
||||
(out) = __tmp; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#endif // ULIB_LINKLIST_H_
|
||||
|
Reference in New Issue
Block a user