diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-05 19:32:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-05 19:32:12 +0000 |
commit | 5516347535ddf0c27cd207135ebf9ce975f30673 (patch) | |
tree | 4b89b4e60378e5864eaa0c27c1febe8246ee2805 /support/tools/Burg/queue.c | |
parent | 091bbbada30ef4c17e5f66b740adda0acf7cc31a (diff) |
Move support/lib into lib/Support
Move support/tools into utils
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8878 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'support/tools/Burg/queue.c')
-rw-r--r-- | support/tools/Burg/queue.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/support/tools/Burg/queue.c b/support/tools/Burg/queue.c deleted file mode 100644 index 76e5ea9b57..0000000000 --- a/support/tools/Burg/queue.c +++ /dev/null @@ -1,64 +0,0 @@ -char rcsid_queue[] = "$Id$"; - -#include "b.h" -#include <stdio.h> - -Queue globalQ; - -Queue -newQ() -{ - Queue q; - - q = (Queue) zalloc(sizeof(struct queue)); - assert(q); - q->head = 0; - q->tail = 0; - - return q; -} - -void -addQ(q, ts) Queue q; Item_Set ts; -{ - List qe; - - assert(q); - assert(ts); - - qe = newList(ts, 0); - if (q->head) { - assert(q->tail); - q->tail->next = qe; - q->tail = qe; - } else { - q->head = q->tail = qe; - } -} - -Item_Set -popQ(q) Queue q; -{ - List qe; - Item_Set ts; - - assert(q); - - if (q->head) { - qe = q->head; - q->head = q->head->next; - ts = (Item_Set) qe->x; - zfree(qe); - return ts; - } else { - return 0; - } -} - -void -dumpQ(q) Queue q; -{ - printf("Begin Queue\n"); - foreachList((ListFn)dumpItem_Set, q->head); - printf("End Queue\n"); -} |