开始设计

This commit is contained in:
2026-08-10 01:21:15 +08:00
commit e45398991f
228 changed files with 20827 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#ifndef INCLUDED_C_ARRAYSTACK_H
#define INCLUDED_C_ARRAYSTACK_H
#ifndef INCLUDED_C_BASE_H
#include <c_Base.h>
#endif /*INCLUDED_C_BASE_H*/
/* ------------------------------------------------------------------------------------------------------------------ */
/* */
typedef struct {
void* array;
int obj_size;
c_size_t capacity;
c_size_t size;
} c_ArrayStack_t;
c_err_t c_ArrayStack_Init(c_ArrayStack_t* self, int obj_size, c_size_t capacity);
void c_ArrayStack_Destroy(c_ArrayStack_t* self);
c_err_t c_ArrayStack_Push(c_ArrayStack_t* self, void* obj);
c_err_t c_ArrayStack_Pop(c_ArrayStack_t* self, void* obj);
void* c_ArrayStack_Peek(c_ArrayStack_t* self);
c_err_t c_ArrayStack_Remove(c_ArrayStack_t* self, c_size_t index);
#endif /*INCLUDED_C_ARRAYSTACK_H*/