]> git.donarmstrong.com Git - biopieces.git/blob - code_c/Maasha/src/inc/common.h
83360ff6e6d111a2e9824dc9d4fc55bc6066db3f
[biopieces.git] / code_c / Maasha / src / inc / common.h
1 /* Martin Asser Hansen (mail@maasha.dk) Copyright (C) 2008 - All right reserved */
2
3 /* Including standard libraries */
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <stdarg.h>
7 #include <string.h>
8 #include <unistd.h>
9 #include <ctype.h>
10 #include <math.h>
11 #include <assert.h>
12 #include <errno.h>
13
14 typedef unsigned char uchar;
15 typedef unsigned short ushort;
16 typedef long long llong;
17 typedef char bool;
18
19 #define TRUE 1
20 #define FALSE 0
21
22 /* Macros for determining min or max of two given values. */
23 #define MAX( a, b ) a < b ? b : a
24 #define MIN( a, b ) a > b ? b : a
25
26 /* Macros for abs and int functions. */
27 #define ABS( x ) ( ( x ) < 0 ) ? -( x ) : ( x )
28 #define INT( x ) ( int ) x
29
30 /* Neat debug macro. */
31 #define DEBUG_EXIT 0
32 #define die assert( DEBUG_EXIT )
33
34
35 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> MISC <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
36
37
38 /* Return a binary number as a string of 1's and 0's. */
39 char *bits2string( uint bin );
40
41
42 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
43
44