diff options
author | Bryan Jurish <mukau@users.sourceforge.net> | 2009-01-21 13:39:15 +0000 |
---|---|---|
committer | Bryan Jurish <mukau@users.sourceforge.net> | 2009-01-21 13:39:15 +0000 |
commit | e9a803f42a15025ff8eed59e4ae4d8a8ab3645e0 (patch) | |
tree | 05e707500b73d4c3f564ca841d26470f39756e97 /deque | |
parent | 6b820db93d315c0c55db12128bbc9b4426779ea8 (diff) |
+ added mooPdUtils.h and some MOO_UNUSED macros
svn path=/trunk/externals/moocow/; revision=10582
Diffstat (limited to 'deque')
-rw-r--r-- | deque/src/Makefile.am | 1 | ||||
-rw-r--r-- | deque/src/Makefile.in | 1 | ||||
-rw-r--r-- | deque/src/dsqueue.c | 8 | ||||
l--------- | deque/src/mooPdUtils.h | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/deque/src/Makefile.am b/deque/src/Makefile.am index 6d30870..25d9982 100644 --- a/deque/src/Makefile.am +++ b/deque/src/Makefile.am @@ -44,6 +44,7 @@ pddoc_DATA = deque-help.pd #----------------------------------------------------------------------- deque_SOURCES = \ + mooPdUtils.h \ squeue.c squeue.h \ dsqueue.c dsqueue.h \ deque.c diff --git a/deque/src/Makefile.in b/deque/src/Makefile.in index 3ae1625..d3d93e9 100644 --- a/deque/src/Makefile.in +++ b/deque/src/Makefile.in @@ -202,6 +202,7 @@ pddoc_DATA = deque-help.pd # sources #----------------------------------------------------------------------- deque_SOURCES = \ + mooPdUtils.h \ squeue.c squeue.h \ dsqueue.c dsqueue.h \ deque.c diff --git a/deque/src/dsqueue.c b/deque/src/dsqueue.c index e328af0..b48916c 100644 --- a/deque/src/dsqueue.c +++ b/deque/src/dsqueue.c @@ -16,6 +16,8 @@ #include "dsqueue.h" #include "squeue.h" +#include "mooPdUtils.h" + /*---------------------------------------------------------------------- * Creation / Deletion *----------------------------------------------------------------------*/ @@ -151,7 +153,7 @@ dsqueue_iter_t dsqueue_iter_last(dsqueue_t *dsq) { /// Returns an iterator for the next datum in the queue, or /// NULL if already at end-of-queue. -dsqueue_iter_t dsqueue_iter_next(dsqueue_t *dsq, dsqueue_iter_t dsqi) { +dsqueue_iter_t dsqueue_iter_next(MOO_UNSUED dsqueue_t *dsq, dsqueue_iter_t dsqi) { while (dsqi.block) { dsqi.sqi = squeue_iter_next(dsqi.block->sq, dsqi.sqi); if (dsqi.sqi) break; @@ -162,7 +164,7 @@ dsqueue_iter_t dsqueue_iter_next(dsqueue_t *dsq, dsqueue_iter_t dsqi) { /// Returns an iterator for the previous datum in the queue, /// or NULL if already at beginning-of-queue. -dsqueue_iter_t dsqueue_iter_prev(dsqueue_t *dsq, dsqueue_iter_t dsqi) { +dsqueue_iter_t dsqueue_iter_prev(MOO_UNSUED dsqueue_t *dsq, dsqueue_iter_t dsqi) { while (dsqi.block) { dsqi.sqi = squeue_iter_prev(dsqi.block->sq, dsqi.sqi); if (dsqi.sqi) break; @@ -172,7 +174,7 @@ dsqueue_iter_t dsqueue_iter_prev(dsqueue_t *dsq, dsqueue_iter_t dsqi) { } /// Returns a true value if p is a valid iterator value, false otherwise. -char dsqueue_iter_valid(dsqueue_t *dsq, dsqueue_iter_t dsqi) { +char dsqueue_iter_valid(MOO_UNSUED dsqueue_t *dsq, dsqueue_iter_t dsqi) { return (dsqi.block && dsqi.sqi && squeue_iter_valid(dsqi.block->sq, dsqi.sqi)); } diff --git a/deque/src/mooPdUtils.h b/deque/src/mooPdUtils.h new file mode 120000 index 0000000..0bb3280 --- /dev/null +++ b/deque/src/mooPdUtils.h @@ -0,0 +1 @@ +../../common/mooPdUtils.h
\ No newline at end of file |