优化了命名
This commit is contained in:
26
C11-数据结构/ds/line/squeue/list/queue.c
Normal file
26
C11-数据结构/ds/line/squeue/list/queue.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "queue.h"
|
||||
|
||||
QUEUE *queue_create(int size)
|
||||
{
|
||||
return llist_create(size);
|
||||
}
|
||||
|
||||
int queue_en(QUEUE *ptr, const void *data)
|
||||
{
|
||||
llist_insert(ptr, data, LLIST_BACKWARD);
|
||||
}
|
||||
|
||||
static int always_match(const void *p1, const void *p2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int queue_de(QUEUE *ptr, void *data)
|
||||
{
|
||||
return llist_fetch(ptr, (void *)0, always_match, data);
|
||||
}
|
||||
|
||||
void queue_destroy(QUEUE *ptr)
|
||||
{
|
||||
llist_destroy(ptr);
|
||||
}
|
||||
Reference in New Issue
Block a user