Moving files, first attempt at gcrypt compatibility, more interface
abstraction
This commit is contained in:
parent
b0a676988a
commit
04d33be4bd
69 changed files with 10498 additions and 536 deletions
18
src/pokey/array.h
Normal file
18
src/pokey/array.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef __ARRAY_H__
|
||||
#define __ARRAY_H__
|
||||
|
||||
typedef struct array_t {
|
||||
void **data;
|
||||
int allocated;
|
||||
int elements;
|
||||
} array_t;
|
||||
|
||||
#define array_get_ptr(array) ((array)->data)
|
||||
#define array_get_nelts(array) ((array)->elements)
|
||||
#define array_get_element(array, index) ((array)->data[(index)])
|
||||
|
||||
void *array_add(array_t *array, void *element);
|
||||
array_t *array_create(void);
|
||||
void array_free(array_t *array);
|
||||
|
||||
#endif /* __ARRAY_H__ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue