1 /* Including standard libraries */
17 /* Macros for determining min or max of two given values. */
18 #define MAX( a, b ) a < b ? b : a
19 #define MIN( a, b ) a > b ? b : a
21 /* Macros for abs and int functions. */
22 #define ABS( x ) ( ( x ) < 0 ) ? -( x ) : ( x )
23 #define INT( x ) ( int ) x
25 /* Neat debug macro. */
27 #define die assert( DEBUG_EXIT )
30 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> STRUCTURE DECLARATIONS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
33 // At some point test if typdef struct list list will allow us to move all this stuff to list.h and list.c
36 /* Singly linked list with a pointer to the next element and a pointer to a value. */
43 /* Singly linked list with a pointer to the next element and an integer value. */
51 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ARRAYS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
54 /* Binary search an array of integers for an integer value. */
55 bool binary_search_array( int *array, int array_size, int val );
58 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> MISC <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
61 /* Return a binary number as a string of 1's and 0's. */
62 char *bits2string( uint bin );
65 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/