Start tracking changes

This commit is contained in:
Axel Wagner
2010-07-22 01:15:18 +02:00
commit 02df973564
16 changed files with 1607 additions and 0 deletions

22
i3bar/include/util.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef UTIL_H_
#define UTIL_H_
/* Securely free p */
#define FREE(p) do { \
if (p != NULL) { \
free(p); \
p = NULL; \
} \
} while (0)
/* Securely fee single-linked list */
#define FREE_LIST(l, type) do { \
type* FREE_LIST_TMP; \
while (l != NULL) { \
FREE_LIST_TMP = l; \
free(l); \
l = l->next; \
} \
} while (0)
#endif