tb Implement a string stack

This commit is contained in:
2025-10-01 21:26:22 +02:00
parent 62cf07afc7
commit 73effcd52a
4 changed files with 101 additions and 13 deletions

View File

@ -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_