[Xfce4-commits] <xfce4-panel:devel> Add macro to test if a list is empty or contains one item.
Nick Schermer
nick at xfce.org
Tue Aug 11 20:28:43 CEST 2009
Updating branch refs/heads/devel
to 0fa56e9ec27e352f93e8de370ea8b58a243e3c58 (commit)
from ee0098f10c35a971089abb17a0830486bb5f77f9 (commit)
commit 0fa56e9ec27e352f93e8de370ea8b58a243e3c58
Author: Nick Schermer <nick at xfce.org>
Date: Fri Mar 6 23:26:06 2009 +0100
Add macro to test if a list is empty or contains one item.
common/panel-private.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/common/panel-private.h b/common/panel-private.h
index 4df473b..465a223 100644
--- a/common/panel-private.h
+++ b/common/panel-private.h
@@ -39,6 +39,7 @@
/* quick GList and GSList counting without traversing */
#define LIST_HAS_ONE_ENTRY(l) ((l) != NULL && (l)->next == NULL)
+#define LIST_HAS_ONE_OR_NO_ENTRIES(l) ((l) == NULL || (l)->next == NULL)
#define LIST_HAS_TWO_OR_MORE_ENTRIES(l) ((l) != NULL && (l)->next != NULL)
#endif /* !__PANEL_PRIVATE_H__ */
\ No newline at end of file
More information about the Xfce4-commits
mailing list