1 /* Including standard libraries */
12 typedef unsigned char uchar;
13 typedef unsigned short ushort;
19 /* Macros for determining min or max of two given values. */
20 #define MAX( a, b ) a < b ? b : a
21 #define MIN( a, b ) a > b ? b : a
23 /* Macros for abs and int functions. */
24 #define ABS( x ) ( ( x ) < 0 ) ? -( x ) : ( x )
25 #define INT( x ) ( int ) x
27 /* Neat debug macro. */
29 #define die assert( DEBUG_EXIT )
32 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ARRAYS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
35 /* Binary search an array of integers for an integer value. */
36 bool binary_search_array( int *array, int array_size, int val );
39 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> MISC <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
42 /* Return a binary number as a string of 1's and 0's. */
43 char *bits2string( uint bin );
46 /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/