There are several types and macros defined for use with the BIC Volume IO Library.
All function declarations in the library are preceded with either
the word public or private, which indicates whether the
function is accessible from outside the file in which it resides.
Users of the library will only be interested in those functions
preceded by public. They are defined as follows:
#define public
#define private static
A type for logical values is defined:
typedef int BOOLEAN
#define FALSE 0
#define TRUE 1
#define OFF FALSE
#define ON TRUE
Other useful types defined include:
typedef double Real;
#define MAX_STRING_LENGTH 200
typedef char STRING[MAX_STRING_LENGTH+1];
typedef enum
{ OK, ERROR, INTERNAL_ERROR, END_OF_FILE, QUIT }
Status;
typedef char Smallest_int;
Some macros useful for general programming include:
N_DIMENSIONS
X
Y
Z
SIZEOF_STATIC_ARRAY( array )
{
int size;
int array[] = { 1, 2, 3 };
size = SIZEOF_STATIC_ARRAY( array ); /* == 3 */
}
ROUND( x )
IS_INT( x )
FRACTION( x )
FLOOR( x )
CEILING( x )
ABS( x )
MAX( x, y )
MAX3( x, y, z )
MIN( x, y )
MIN3( x, y, z )
INTERPOLATE( alpha, a, b )
PI
DEG_TO_RAD
RAD_TO_DEG
IJ( i, j, nj )
IJK( i, j, k, nj, nk )
for_less( i, start, end )
for_inclusive( i, start, end )
GLUE(x,y)
GLUE3(x,y,z)