diff options
Diffstat (limited to 'collections')
-rw-r--r-- | collections/double_ended_queue.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/collections/double_ended_queue.c b/collections/double_ended_queue.c index fab92c7..29c8873 100644 --- a/collections/double_ended_queue.c +++ b/collections/double_ended_queue.c @@ -178,7 +178,22 @@ deq *root; free(root); } -void deq_print(root) +void deq_print(root, to_string) +deq *root; +char* to_string(void*); +{ + int i, size;; + + size = deq_size(root); + + printf("["); + for (i = 0; i < size; i++) { + printf("%s,", to_string(deq_index(root, i))); + } + printf("\b]\n"); +} + +void deq_debug_print(root) deq *root; { void **tmp; |