🌈 style:

This commit is contained in:
lzy
2024-05-26 15:39:14 +08:00
parent 6f28a3384a
commit a57bbdb4c1
156 changed files with 765 additions and 770 deletions

View File

@@ -2,28 +2,28 @@
#include "stack.h"
LLIST *stack_create(int initsize)
LLIST* stack_create(int initsize)
{
return llist_create(initsize);
}
int stack_push(STACK *ptr, const void *data)
int stack_push(STACK* ptr, const void* data)
{
return llist_insert(ptr, data, LLIST_FORWARD);
}
static int always_match(const void *p1, const void *p2)
static int always_match(const void* p1, const void* p2)
{
return 0;
}
int stack_pop(STACK *ptr, void *data)
int stack_pop(STACK* ptr, void* data)
{
// !!! 假接口
return llist_fetch(ptr, (void *)0, always_match, data);
return llist_fetch(ptr, (void*)0, always_match, data);
}
void stack_destroy(STACK *ptr)
void stack_destroy(STACK* ptr)
{
llist_destroy(ptr);
}