summaryrefslogblamecommitdiffstats
path: root/include/common.h
blob: 9332e6e58f260f96772cad82cca7ad770bd2459c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                              
                                                     

      
#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);
int cmp_items_random(const void * a, const void * b);

#endif