]> git.donarmstrong.com Git - biopieces.git/blob - code_c/Maasha/src/inc/common.h
minor updates
[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 #include <getopt.h>
14
15 typedef unsigned char uchar;
16 typedef unsigned short ushort;
17 typedef long long llong;
18 typedef char boolean;
19
20 #ifndef bool
21 #define bool boolean
22 #endif
23
24 #ifndef TRUE
25 #define TRUE 1
26 #endif
27
28 #ifndef FALSE
29 #define FALSE 0
30 #endif
31
32 /* Macros for determining min or max of two given values. */
33 #define MAX( a, b ) a < b ? b : a
34 #define MIN( a, b ) a > b ? b : a
35
36 /* Macros for abs and int functions. */
37 #define ABS( x ) ( ( x ) < 0 ) ? -( x ) : ( x )
38 #define INT( x ) ( int ) x
39
40 /* Neat debug macro. */
41 #define DEBUG_EXIT 0
42
43 #ifndef die
44 #define die assert( DEBUG_EXIT )
45 #endif
46
47
48 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> MISC <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
49
50
51 /* Function that prints "pong" to stderr. */
52 void maasha_ping();
53
54 /* Return a binary number as a string of 1's and 0's. */
55 char *bits2string( uint bin );
56
57
58 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
59
60