push
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#ifndef STRANGE_LIST_H
|
||||
#define STRANGE_LIST_H
|
||||
#include <stdio.h>
|
||||
enum data_type{
|
||||
|
||||
FLOAT_TYPE,
|
||||
INT_TYPE,
|
||||
STRING_TYPE,
|
||||
};
|
||||
|
||||
union value {
|
||||
float f;
|
||||
int i;
|
||||
char *s;
|
||||
};
|
||||
|
||||
struct data{
|
||||
|
||||
enum data_type type;
|
||||
union value value;
|
||||
};
|
||||
|
||||
void print_strange_list(const struct data *list, unsigned int size);
|
||||
int remove_at_strange_list(struct data **list, unsigned int *size, int index);
|
||||
int list_strange_list(const char *filename, const struct data *list, unsigned int size);
|
||||
int append_strange_list(struct data **list, unsigned int *size, struct data element);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user