mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 13:31:21 +03:00
25 lines
417 B
C
25 lines
417 B
C
#ifndef __LIST__
|
|
#define __LIST__
|
|
|
|
#define L List_T
|
|
typedef struct L *L;
|
|
|
|
struct L
|
|
{
|
|
void *val;
|
|
L next;
|
|
};
|
|
|
|
extern L List_init(void);
|
|
extern L List_push(L list, void *val);
|
|
extern int List_length(L list);
|
|
extern void **List_toArray(L list);
|
|
extern L List_append(L list, L tail);
|
|
extern L List_list(L list, void *val, ...);
|
|
/* TODO */
|
|
extern L List_copy(L list);
|
|
extern int List_pop(L *list);
|
|
|
|
#undef L
|
|
#endif
|