-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.h
40 lines (32 loc) · 887 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* Sat May 28 12:29:47 EEST 2011
Ver 0.1
Panagiotis Vavilis
#include <stdio.h>
#include <stdarg.h>
/* Real type definition */
typedef double REAL;
/* Counter type */
typedef unsigned long count_t;
static void error_print (int , char *, va_list );
static void errf (char *, ...);
static void perrf (char *, ...);
static int isword (unsigned char );
int getword (FILE *);
int counter (char *);
/* specie data type */
typedef struct species {
char *name;
int size;
} species_t;
/* station data type */
typedef struct station {
char *name;
species_t *spcs;
} station_t;
/* functions headers */
int NumOfIndividuals ( station_t , int );
int SpeciesRichness ( station_t , int );
REAL ShannonIndex ( station_t , int );
REAL SpeciesEvenness ( station_t , int );
station_t *readCSV( char *, int *, int * );