X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/f59c437a25af1e4c028d268cca3819476ef4f725..300f275f23b65c09f69a437c635c48ddd126f21a:/src/system.h diff --git a/src/system.h b/src/system.h index bfd24463..b8a73edb 100644 --- a/src/system.h +++ b/src/system.h @@ -279,6 +279,21 @@ do { \ #endif +/* As memcpy, but for shorts. */ +#define shortcpy(Dest, Src, Num) \ + memcpy (Dest, Src, Num * sizeof (short)) + +/* Free a linked list. */ +#define LIST_FREE(Type, List) \ +do { \ + Type *_node, *_next; \ + for (_node = List; _node; _node = _next) \ + { \ + _next = _node->next; \ + XFREE (_node); \ + } \ +} while (0) + /*---------------------------------. | Debugging the memory allocator. | `---------------------------------*/