From 3c8f9385498611df123d5f07d0e52035b568d415 Mon Sep 17 00:00:00 2001 From: Alexandre Jesus Date: Mon, 22 Aug 2016 16:35:31 +0100 Subject: Initial code --- include/common.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/common.h (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h new file mode 100644 index 0000000..c61ac4d --- /dev/null +++ b/include/common.h @@ -0,0 +1,19 @@ +#ifndef _COMMON_H +#define _COMMON_H + +#include "structs.h" + +#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) +#define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) + +struct data * input(char[]); +void print_data(struct data *); +void print_front(struct front_item *); +void free_data(struct data *); +void free_front(struct front_item *); +struct front_item * new_front_item(double, double, struct front_item *, struct front_item *); +double dist_items(struct item *, struct item *); +int len_front(struct front_item *); +int cmp_items_ratio(const void * a, const void * b); + +#endif -- cgit v1.2.3