changeset 1879:c444aa48e6df

Minor updates for Windows, merged from minc-1-X-branch
author bert <bert>
date Mon, 04 Oct 2004 20:23:51 +0000
parents 42c2994a82fe
children 2785fdbe52e2
files volume_io/Geometry/colour.c volume_io/Geometry/colour_def.c volume_io/Geometry/gaussian.c volume_io/Geometry/inverse.c volume_io/Geometry/newton.c volume_io/Geometry/points.c volume_io/Geometry/splines.c volume_io/Geometry/tensors.c volume_io/Geometry/transforms.c volume_io/Include/internal_volume_io.h volume_io/Include/volume_io.h volume_io/Include/volume_io/alloc.h volume_io/Include/volume_io/arrays.h volume_io/Include/volume_io/basic.h volume_io/Include/volume_io/def_math.h volume_io/Include/volume_io/files.h volume_io/Include/volume_io/geom_structs.h volume_io/Include/volume_io/geometry.h volume_io/Include/volume_io/multidim.h volume_io/Include/volume_io/progress.h volume_io/Include/volume_io/string_funcs.h volume_io/Include/volume_io/transforms.h volume_io/Include/volume_io/vol_io_prototypes.h volume_io/Include/volume_io/volume.h volume_io/Include/volume_io/volume_cache.h volume_io/MNI_formats/gen_xf_io.c volume_io/MNI_formats/gen_xfs.c volume_io/MNI_formats/grid_transforms.c volume_io/MNI_formats/mni_io.c volume_io/MNI_formats/tag_points.c volume_io/MNI_formats/thin_plate_spline.c volume_io/Prog_utils/alloc.c volume_io/Prog_utils/alloc_check.c volume_io/Prog_utils/arrays.c volume_io/Prog_utils/files.c volume_io/Prog_utils/print.c volume_io/Prog_utils/progress.c volume_io/Prog_utils/string.c volume_io/Prog_utils/time.c volume_io/Volumes/evaluate.c volume_io/Volumes/get_hyperslab.c volume_io/Volumes/input_free.c volume_io/Volumes/input_mnc.c volume_io/Volumes/input_volume.c volume_io/Volumes/multidim_arrays.c volume_io/Volumes/output_mnc.c volume_io/Volumes/output_volume.c volume_io/Volumes/set_hyperslab.c volume_io/Volumes/volume_cache.c volume_io/Volumes/volumes.c
diffstat 50 files changed, 1971 insertions(+), 1906 deletions(-) [+]
line wrap: on
line diff
--- a/volume_io/Geometry/colour.c
+++ b/volume_io/Geometry/colour.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/colour.c,v 1.3 1996-05-17 19:36:10 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/colour.c,v 1.4 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -34,7 +34,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Colour  make_Colour(
+VIOAPI  Colour  make_Colour(
     int   r,
     int   g,
     int   b )
@@ -55,7 +55,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_Colour_r_0_1(
+VIOAPI  Real  get_Colour_r_0_1(
     Colour   colour )
 {
     return( (Real) get_Colour_r(colour) / 255.0 );
@@ -75,7 +75,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_Colour_g_0_1(
+VIOAPI  Real  get_Colour_g_0_1(
     Colour   colour )
 {
     return( (Real) get_Colour_g(colour) / 255.0 );
@@ -95,7 +95,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_Colour_b_0_1(
+VIOAPI  Real  get_Colour_b_0_1(
     Colour   colour )
 {
     return( (Real) get_Colour_b(colour) / 255.0 );
@@ -115,7 +115,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_Colour_a_0_1(
+VIOAPI  Real  get_Colour_a_0_1(
     Colour   colour )
 {
     return( (Real) get_Colour_a(colour) / 255.0 );
@@ -137,7 +137,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Colour  make_Colour_0_1(
+VIOAPI  Colour  make_Colour_0_1(
     Real   r,
     Real   g,
     Real   b )
@@ -164,7 +164,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Colour  make_rgba_Colour_0_1(
+VIOAPI  Colour  make_rgba_Colour_0_1(
     Real   r,
     Real   g,
     Real   b,
--- a/volume_io/Geometry/colour_def.c
+++ b/volume_io/Geometry/colour_def.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/colour_def.c,v 1.6 1996-11-15 16:09:41 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/colour_def.c,v 1.7 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -40,7 +40,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Colour  make_rgba_Colour(
+VIOAPI  Colour  make_rgba_Colour(
     int    r,
     int    g,
     int    b,
@@ -73,7 +73,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_Colour_r(
+VIOAPI  int  get_Colour_r(
     Colour   colour )
 {
     unsigned  char  *b;
@@ -96,7 +96,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_Colour_g(
+VIOAPI  int  get_Colour_g(
     Colour   colour )
 {
     unsigned  char  *b;
@@ -119,7 +119,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_Colour_b(
+VIOAPI  int  get_Colour_b(
     Colour   colour )
 {
     unsigned  char  *b;
@@ -143,7 +143,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_Colour_a(
+VIOAPI  int  get_Colour_a(
     Colour   colour )
 {
     unsigned  char  *b;
--- a/volume_io/Geometry/gaussian.c
+++ b/volume_io/Geometry/gaussian.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/gaussian.c,v 1.8 2003-09-18 14:35:47 bert Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/gaussian.c,v 1.9 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -36,7 +36,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  scaled_maximal_pivoting_gaussian_elimination(
+VIOAPI  BOOLEAN  scaled_maximal_pivoting_gaussian_elimination(
     int   n,
     int   row[],
     Real  **a,
@@ -161,7 +161,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  BOOLEAN  scaled_maximal_pivoting_gaussian_elimination_real(
+static BOOLEAN scaled_maximal_pivoting_gaussian_elimination_real(
     int   n,
     Real  **coefs,
     int   n_values,
@@ -219,7 +219,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  solve_linear_system(
+VIOAPI  BOOLEAN  solve_linear_system(
     int   n,
     Real  **coefs,
     Real  values[],
@@ -248,7 +248,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  invert_square_matrix(
+VIOAPI  BOOLEAN  invert_square_matrix(
     int   n,
     Real  **matrix,
     Real  **inverse )
--- a/volume_io/Geometry/inverse.c
+++ b/volume_io/Geometry/inverse.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/inverse.c,v 1.8 1995-07-31 13:44:28 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/inverse.c,v 1.9 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -31,7 +31,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN   compute_transform_inverse(
+VIOAPI  BOOLEAN   compute_transform_inverse(
     Transform  *transform,
     Transform  *inverse )
 {
--- a/volume_io/Geometry/newton.c
+++ b/volume_io/Geometry/newton.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/newton.c,v 1.6 1996-05-17 19:36:09 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/newton.c,v 1.7 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 #define  STEP_RATIO  1.0
@@ -49,7 +49,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  newton_root_find(
+VIOAPI  BOOLEAN  newton_root_find(
     int    n_dimensions,
     void   (*function) ( void *, Real [],  Real [], Real ** ),
     void   *function_data,
--- a/volume_io/Geometry/points.c
+++ b/volume_io/Geometry/points.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/points.c,v 1.13 1996-05-17 19:36:08 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/points.c,v 1.14 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -33,7 +33,7 @@
                                                 orthogonal
 ---------------------------------------------------------------------------- */
 
-public  void  create_orthogonal_vector(
+VIOAPI  void  create_orthogonal_vector(
     Vector  *v,
     Vector  *ortho )
 {
@@ -61,7 +61,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  create_two_orthogonal_vectors(
+VIOAPI  void  create_two_orthogonal_vectors(
     Vector   *v,
     Vector   *v1,
     Vector   *v2 )
--- a/volume_io/Geometry/splines.c
+++ b/volume_io/Geometry/splines.c
@@ -15,26 +15,26 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/splines.c,v 1.5 1995-07-31 13:44:29 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/splines.c,v 1.6 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /*--- Weighting functions which define the splines, all of which are
       interpolation splines, with the exception of the quadratic spline */
 
-private  Real   constant_coefs[1][1] = {   { 1.0 }  };
+static Real   constant_coefs[1][1] = {   { 1.0 }  };
 
-private  Real   linear_coefs[2][2] = {
+static Real   linear_coefs[2][2] = {
                                            {  1.0,  0.0 },
                                            { -1.0,  1.0 }
                                       };
 
-private  Real   quadratic_coefs[3][3] = {
+static Real   quadratic_coefs[3][3] = {
                                            {  0.5,  0.5,  0.0 },
                                            { -1.0,  1.0,  0.0 },
                                            {  0.5, -1.0,  0.5 }
                                         };
 
-private  Real   cubic_coefs[4][4] = {
+static Real   cubic_coefs[4][4] = {
                                         {  0.0,  1.0,  0.0,  0.0 },
                                         { -0.5,  0.0,  0.5,  0.0 },
                                         {  1.0, -2.5,  2.0, -0.5 },
@@ -54,7 +54,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_linear_spline_coefs(
+VIOAPI  void  get_linear_spline_coefs(
     Real  **coefs )
 {
     int    i, j;
@@ -77,7 +77,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_quadratic_spline_coefs(
+VIOAPI  void  get_quadratic_spline_coefs(
     Real  **coefs )
 {
     int    i, j;
@@ -101,7 +101,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_cubic_spline_coefs(
+VIOAPI  void  get_cubic_spline_coefs(
     Real  **coefs )
 {
     int    i, j;
@@ -130,7 +130,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  cubic_interpolate(
+VIOAPI  Real  cubic_interpolate(
     Real   u,
     Real   v0,
     Real   v1,
@@ -166,7 +166,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  evaluate_univariate_interpolating_spline(
+VIOAPI  void  evaluate_univariate_interpolating_spline(
     Real    u,
     int     degree,
     Real    coefs[],
@@ -199,7 +199,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  evaluate_bivariate_interpolating_spline(
+VIOAPI  void  evaluate_bivariate_interpolating_spline(
     Real    u,
     Real    v,
     int     degree,
@@ -241,7 +241,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  evaluate_trivariate_interpolating_spline(
+VIOAPI  void  evaluate_trivariate_interpolating_spline(
     Real    u,
     Real    v,
     Real    w,
@@ -291,7 +291,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  evaluate_interpolating_spline(
+VIOAPI  void  evaluate_interpolating_spline(
     int     n_dims,
     Real    parameters[],
     int     degree,
--- a/volume_io/Geometry/tensors.c
+++ b/volume_io/Geometry/tensors.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/tensors.c,v 1.6 1995-07-31 13:44:30 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/tensors.c,v 1.7 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -37,7 +37,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  multiply_basis_matrices(
+static void multiply_basis_matrices(
     int    n_derivs,
     int    n_degs,
     Real   m1[],
@@ -98,7 +98,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  multiply_matrices(
+static void multiply_matrices(
     int    x1,
     int    y1,
     Real   m1[],
@@ -172,7 +172,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  spline_tensor_product(
+VIOAPI  void  spline_tensor_product(
     int     n_dims,
     Real    positions[],
     int     degrees[],
--- a/volume_io/Geometry/transforms.c
+++ b/volume_io/Geometry/transforms.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/transforms.c,v 1.19 1997-08-13 13:21:28 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Geometry/transforms.c,v 1.20 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -31,7 +31,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  make_identity_transform( Transform   *transform )
+VIOAPI  void  make_identity_transform( Transform   *transform )
 {
     Transform_elem( *transform, 0, 0 ) = 1.0;
     Transform_elem( *transform, 0, 1 ) = 0.0;
@@ -64,7 +64,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  close_to_identity(
+VIOAPI  BOOLEAN  close_to_identity(
     Transform   *transform )
 {
 #define   TOLERANCE   0.001
@@ -108,7 +108,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_transform_origin(
+VIOAPI  void  get_transform_origin(
     Transform   *transform,
     Point       *origin )
 {
@@ -132,7 +132,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_transform_origin(
+VIOAPI  void  set_transform_origin(
     Transform   *transform,
     Point       *origin )
 {
@@ -155,7 +155,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_transform_origin_real(
+VIOAPI  void  get_transform_origin_real(
     Transform   *transform,
     Real        origin[] )
 {
@@ -178,7 +178,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_transform_x_axis(
+VIOAPI  void  get_transform_x_axis(
     Transform   *transform,
     Vector      *x_axis )
 {
@@ -202,7 +202,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_transform_x_axis_real(
+VIOAPI  void  get_transform_x_axis_real(
     Transform   *transform,
     Real        x_axis[] )
 {
@@ -225,7 +225,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_transform_x_axis(
+VIOAPI  void  set_transform_x_axis(
     Transform   *transform,
     Vector      *x_axis )
 {
@@ -248,7 +248,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_transform_x_axis_real(
+VIOAPI  void  set_transform_x_axis_real(
     Transform   *transform,
     Real        x_axis[] )
 {
@@ -271,7 +271,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_transform_y_axis(
+VIOAPI  void  get_transform_y_axis(
     Transform   *transform,
     Vector      *y_axis )
 {
@@ -295,7 +295,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_transform_y_axis_real(
+VIOAPI  void  get_transform_y_axis_real(
     Transform   *transform,
     Real        y_axis[] )
 {
@@ -318,7 +318,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_transform_y_axis(
+VIOAPI  void  set_transform_y_axis(
     Transform   *transform,
     Vector      *y_axis )
 {
@@ -341,7 +341,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_transform_y_axis_real(
+VIOAPI  void  set_transform_y_axis_real(
     Transform   *transform,
     Real        y_axis[] )
 {
@@ -364,7 +364,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_transform_z_axis(
+VIOAPI  void  get_transform_z_axis(
     Transform   *transform,
     Vector      *z_axis )
 {
@@ -388,7 +388,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_transform_z_axis_real(
+VIOAPI  void  get_transform_z_axis_real(
     Transform   *transform,
     Real        z_axis[] )
 {
@@ -411,7 +411,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_transform_z_axis(
+VIOAPI  void  set_transform_z_axis(
     Transform   *transform,
     Vector      *z_axis )
 {
@@ -434,7 +434,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_transform_z_axis_real(
+VIOAPI  void  set_transform_z_axis_real(
     Transform   *transform,
     Real        z_axis[] )
 {
@@ -461,7 +461,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void   make_change_to_bases_transform(
+VIOAPI  void   make_change_to_bases_transform(
     Point      *origin,
     Vector     *x_axis,
     Vector     *y_axis,
@@ -504,7 +504,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void   make_change_from_bases_transform(
+VIOAPI  void   make_change_from_bases_transform(
     Point      *origin,
     Vector     *x_axis,
     Vector     *y_axis,
@@ -550,7 +550,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void   concat_transforms(
+VIOAPI  void   concat_transforms(
     Transform   *result,
     Transform   *t1,
     Transform   *t2 )
@@ -613,7 +613,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  homogenous_transform_point(
+static  void  homogenous_transform_point(
     Transform  *transform,
     Real       x,
     Real       y,
@@ -672,7 +672,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  transform_point(
+VIOAPI  void  transform_point(
     Transform  *transform,
     Real       x,
     Real       y,
@@ -703,7 +703,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  transform_vector(
+VIOAPI  void  transform_vector(
     Transform  *transform,
     Real       x,
     Real       y,
--- a/volume_io/Include/internal_volume_io.h
+++ b/volume_io/Include/internal_volume_io.h
@@ -15,15 +15,15 @@
               express or implied warranty.
 ---------------------------------------------------------------------------- */
 
-#ifndef  public
-#define  public
-#endif
+#include "config.h"
 
-#ifndef  private
-#define  private   static
-#endif
-
-#include "config.h"
+#ifndef  VIOAPI
+#if defined(_MSC_VER)
+#define  VIOAPI __declspec(dllexport)
+#else
+#define  VIOAPI
+#endif /* _MSC_VER not defined */
+#endif /* VIOAPI not defined */
 
 #include  <volume_io.h>
 
--- a/volume_io/Include/volume_io.h
+++ b/volume_io/Include/volume_io.h
@@ -14,7 +14,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io.h,v 1.11 2001-12-14 17:12:29 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io.h,v 1.12 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -40,16 +40,15 @@
 #include  <volume_io/volume.h>
 #include  <volume_io/transforms.h>
 
-#ifndef  public
-#define       public   extern
-#define       public_was_defined_here
-#endif
+#ifndef  VIOAPI
+
+#if defined(_MSC_VER)
+#define       VIOAPI   __declspec(dllimport)
+#else
+#define       VIOAPI   extern
+#endif /* _MSC_VER not defined */
+#endif /* VIOAPI not defined */
 
 #include  <volume_io/vol_io_prototypes.h>
 
-#ifdef  public_was_defined_here
-#undef       public
-#undef       public_was_defined_here
-#endif
-
-#endif
+#endif /* DEF_VOLUME_IO */
--- a/volume_io/Include/volume_io/alloc.h
+++ b/volume_io/Include/volume_io/alloc.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/alloc.h,v 1.17 2001-12-14 17:12:24 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/alloc.h,v 1.18 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -45,6 +45,8 @@
          print_alloc_source_line( filename, line_number );
 #endif
 
+#ifndef MINC_PLAY_NICE
+
 /* ----------------------------- MNI Header -----------------------------------
 @NAME       : ALLOC
 @INPUT      : n_items
@@ -292,4 +294,5 @@
 #define  FREE5D( ptr )                                                        \
          free_memory_5d( (void ******) &(ptr) _ALLOC_SOURCE_LINE )
 
+#endif /* MINC_PLAY_NICE */
 #endif
--- a/volume_io/Include/volume_io/arrays.h
+++ b/volume_io/Include/volume_io/arrays.h
@@ -12,7 +12,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/arrays.h,v 1.12 2001-12-14 17:12:24 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/arrays.h,v 1.13 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -140,4 +140,4 @@
              ++(n_elems);                                                     \
          }
 
-#endif
+#endif /* DEF_ARRAYS */
--- a/volume_io/Include/volume_io/basic.h
+++ b/volume_io/Include/volume_io/basic.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/basic.h,v 1.33 2003-11-23 16:07:11 stever Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/basic.h,v 1.34 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -52,6 +52,37 @@
 #define  TRUE   1
 #endif
 
+/* These are the internal typedefs, which are aliased to their "classic"
+ * volume_io names below, if the new MINC_PLAY_NICE macro is not installed
+ */
+typedef char *VIO_STR;
+typedef int VIO_BOOL;
+typedef double VIO_Real;
+typedef signed char VIO_SCHAR;
+typedef unsigned char VIO_UCHAR;
+typedef enum { 
+               OK,
+               ERROR,
+               INTERNAL_ERROR,
+               END_OF_FILE,
+               QUIT
+             } VIO_Status;
+
+
+#ifndef MINC_PLAY_NICE          /* Play nice with others */
+
+#ifndef __cplusplus
+#ifndef private
+#define private static
+#endif /* private */
+#ifndef public
+#define public
+#endif /* public */
+#ifndef semiprivate
+#define semiprivate
+#endif /* semiprivate */
+#endif /* __cplusplus */
+
 #define  OFF     FALSE
 #define  ON      TRUE
 
@@ -68,7 +99,6 @@
 /* --------- PI, and angles -------------------------------- */
 
 #define  PI           M_PI                  /* from math.h */
-
 #define  DEG_TO_RAD   (PI / 180.0)
 #define  RAD_TO_DEG   (180.0 / PI)
 
@@ -122,17 +152,15 @@
 
 /* Basic types */
 
-typedef  signed char     Smallest_int;
-
-typedef  unsigned char   unsigned_byte;
-
-typedef  int             BOOLEAN;
-
-typedef  double          Real;
+typedef VIO_SCHAR Smallest_int;
+typedef VIO_UCHAR unsigned_byte;
+typedef VIO_BOOL BOOLEAN;
+typedef VIO_Real Real;
+typedef VIO_STR STRING;
+typedef VIO_Status Status;
 
 #define  REAL_MAX        DBL_MAX
 
-typedef  char            *STRING;
 
 /* --------------- */
 
@@ -162,17 +190,9 @@
               ((min2) + (2 * (x1) + 1 - 2 * (min1)) * ((max2) - (min2) + 1) / \
                                                       ((max1) - (min1) + 1) / 2)
 
-/* -------------------- Status --------------------- */
-
-typedef enum { 
-               OK,
-               ERROR,
-               INTERNAL_ERROR,
-               END_OF_FILE,
-               QUIT
-             } Status;
-
 #define  HANDLE_INTERNAL_ERROR( X )                                           \
          handle_internal_error( X )
 
-#endif
+#endif /* MINC_PLAY_NICE */
+
+#endif /* DEF_BASIC */
--- a/volume_io/Include/volume_io/def_math.h
+++ b/volume_io/Include/volume_io/def_math.h
@@ -13,23 +13,9 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/def_math.h,v 1.8 2001-12-14 17:12:25 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/def_math.h,v 1.9 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
-/*  Redefines y1 and y0 so lint does not make erroneous messages */
-
-#ifdef lint
-#define  y1   math_y1
-#define  y0   math_y0
-#define  fcabs( x )   fcabs_avoid_lint_message( float )
-#endif
-
 #include  <math.h>
 
-#ifdef lint
-#undef  fcabs
-#undef  y1
-#undef  y0
 #endif
-
-#endif
--- a/volume_io/Include/volume_io/files.h
+++ b/volume_io/Include/volume_io/files.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/files.h,v 1.8 2001-12-14 17:12:25 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/files.h,v 1.9 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -32,8 +32,13 @@
 #include  <stdio.h>
 #include  <volume_io/basic.h>
 
-typedef  enum  { ASCII_FORMAT, BINARY_FORMAT }          File_formats;
+typedef  enum  { ASCII_FORMAT, BINARY_FORMAT }          VIO_File_formats;
+
+typedef  enum  { READ_FILE, WRITE_FILE, APPEND_FILE }   VIO_IO_types;
 
-typedef  enum  { READ_FILE, WRITE_FILE, APPEND_FILE }   IO_types;
+#ifndef MINC_PLAY_NICE
+typedef VIO_File_formats File_formats;
+typedef VIO_IO_types IO_types;
+#endif /* MINC_PLAY_NICE */
 
-#endif
+#endif /* DEF_FILES */
--- a/volume_io/Include/volume_io/geom_structs.h
+++ b/volume_io/Include/volume_io/geom_structs.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/geom_structs.h,v 1.20 2003-06-02 20:30:07 bert Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/geom_structs.h,v 1.21 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -29,11 +29,21 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-#define  N_DIMENSIONS  3
+/* Define the structure of a point in world coordinates */
+#define VIO_N_DIMENSIONS 3
+#define VIO_X 0
+#define VIO_Y 1
+#define VIO_Z 2
+
+#ifndef MINC_PLAY_NICE /* Don't define commonly used symbols */
 
-#define  X             0
-#define  Y             1
-#define  Z             2
+#define  N_DIMENSIONS  VIO_N_DIMENSIONS
+
+#define  X             VIO_X
+#define  Y             VIO_Y
+#define  Z             VIO_Z
+
+#endif /* MINC_PLAY_NICE */
 
 /* ----------------------------- MNI Header -----------------------------------
 @NAME       : Point   type
@@ -48,12 +58,12 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-typedef  float   Point_coord_type;
+typedef  float   VIO_Point_coord_type;
 
 typedef  struct
 {
-    Point_coord_type   coords[N_DIMENSIONS];
-} Point;
+    VIO_Point_coord_type   coords[VIO_N_DIMENSIONS];
+} VIO_Point;
 
 /* --- access the given coordinate of the point */
 
@@ -61,9 +71,9 @@
 
 /* --- access x, y, or z coordinate of the point */
 
-#define  Point_x( point ) Point_coord( point, X )
-#define  Point_y( point ) Point_coord( point, Y )
-#define  Point_z( point ) Point_coord( point, Z )
+#define  Point_x( point ) Point_coord( point, VIO_X )
+#define  Point_y( point ) Point_coord( point, VIO_Y )
+#define  Point_z( point ) Point_coord( point, VIO_Z )
 
 /* --- assign all 3 coordinates of the point */
 
@@ -89,8 +99,8 @@
 
 typedef  struct
 {
-    Point_coord_type   coords[N_DIMENSIONS];
-} Vector;
+    VIO_Point_coord_type   coords[VIO_N_DIMENSIONS];
+} VIO_Vector;
 
 /* --- access the given coordinate of the vector */
 
@@ -98,9 +108,9 @@
 
 /* --- access x, y, or z coordinate of the vector */
 
-#define  Vector_x( vector ) Vector_coord( vector, X )
-#define  Vector_y( vector ) Vector_coord( vector, Y )
-#define  Vector_z( vector ) Vector_coord( vector, Z )
+#define  Vector_x( vector ) Vector_coord( vector, VIO_X )
+#define  Vector_y( vector ) Vector_coord( vector, VIO_Y )
+#define  Vector_z( vector ) Vector_coord( vector, VIO_Z )
 
 /* --- assign all 3 coordinates of the vector */
 
@@ -132,7 +142,7 @@
  * exactly 4 bytes, so you get weird results on 64-bit architectures
  * if Colour is a 'long'.
  */
-typedef  unsigned  int     Colour;
+typedef  unsigned  int     VIO_Colour;
 
 #define  MULT_COLOURS( prod, c1, c2 )                  \
         { \
@@ -182,14 +192,14 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-typedef  float  Spr_type;
+typedef  float  VIO_Spr_type;
 
 typedef  struct
 {
-    Spr_type   a, d, s;
-    Spr_type   se;
-    Spr_type   t;
-} Surfprop;
+    VIO_Spr_type   a, d, s;
+    VIO_Spr_type   se;
+    VIO_Spr_type   t;
+} VIO_Surfprop;
 
 /* --- access the given element of the surface property */
 
@@ -223,12 +233,12 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-typedef  double  Transform_elem_type;
+typedef  double  VIO_Transform_elem_type;
 
 typedef  struct
 {
-    Transform_elem_type    m2d[2][3];
-} Transform_2d;
+    VIO_Transform_elem_type    m2d[2][3];
+} VIO_Transform_2d;
 
 #define  Transform_2d_elem( t, i, j ) ((t).m2d[i][j])
 
@@ -247,9 +257,21 @@
 
 typedef  struct
 {
-    Transform_elem_type    m[4][4];
-} Transform;
+    VIO_Transform_elem_type    m[4][4];
+} VIO_Transform;
 
 #define  Transform_elem( t, i, j ) ((t).m[j][i])
 
+#ifndef MINC_PLAY_NICE
+typedef VIO_Transform Transform;
+typedef VIO_Vector Vector;
+typedef VIO_Colour Colour;
+typedef VIO_Transform_2d Transform_2d;
+typedef VIO_Transform_elem_type Transform_elem_type;
+typedef VIO_Spr_type Spr_type;
+typedef VIO_Surfprop Surfprop;
+typedef VIO_Point Point;
+typedef VIO_Point_coord_type Point_coord_type;
+#endif /* MINC_PLAY_NICE */
+
 #endif
--- a/volume_io/Include/volume_io/geometry.h
+++ b/volume_io/Include/volume_io/geometry.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/geometry.h,v 1.11 2001-12-14 17:12:26 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/geometry.h,v 1.12 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -33,8 +33,8 @@
 #include  <volume_io/basic.h>
 #include  <volume_io/geom_structs.h>
 
-#define  Point_coord_cast(x) ((Point_coord_type) (x))
-#define  Real_cast(x) ((Real) (x))
+#define  Point_coord_cast(x) ((VIO_Point_coord_type) (x))
+#define  Real_cast(x) ((VIO_Real) (x))
 
 #define  RPoint_x( p )  Real_cast(Point_x(p))
 #define  RPoint_y( p )  Real_cast(Point_y(p))
@@ -153,13 +153,13 @@
 
 /* --- return the magnitude of a vector */
 
-#define  MAGNITUDE( v ) (Real) sqrt( DOT_VECTORS(v,v) )
+#define  MAGNITUDE( v ) Real_cast(sqrt( DOT_VECTORS(v,v) ))
 
 /* --- set vn to the value of the vector v, normalized to length 1 */
 
 #define  NORMALIZE_VECTOR( vn, v ) \
          { \
-             Real  _mag_; \
+             VIO_Real  _mag_; \
  \
              _mag_ = MAGNITUDE( v ); \
              if( _mag_ != 0.0 ) \
@@ -208,4 +208,4 @@
             fill_Point( point, \
                         Vector_x(vector), Vector_y(vector), Vector_z(vector) )
 
-#endif
+#endif /* DEF_GEOMETRY */
--- a/volume_io/Include/volume_io/multidim.h
+++ b/volume_io/Include/volume_io/multidim.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/multidim.h,v 1.5 2001-12-14 17:12:26 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/multidim.h,v 1.6 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -29,7 +29,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-#define  MAX_DIMENSIONS     5
+#define  VIO_MAX_DIMENSIONS     5
 
 /* -------------------------- Data_types ------------------------- */
 
@@ -42,15 +42,15 @@
                  SIGNED_INT,
                  FLOAT,
                  DOUBLE,
-                 MAX_DATA_TYPE }   Data_types;
+                 MAX_DATA_TYPE }   VIO_Data_types;
 
 typedef  struct
 {
     int                     n_dimensions;
-    int                     sizes[MAX_DIMENSIONS];
-    Data_types              data_type;
+    int                     sizes[VIO_MAX_DIMENSIONS];
+    VIO_Data_types          data_type;
     void                    *data;
-} multidim_array;
+} VIO_multidim_array;
 
 /* ------------------------- set value ---------------------------- */
 
@@ -278,4 +278,10 @@
          case 5:  GET_MULTIDIM_PTR_5D( ptr, array, x, y, z, t, v );  break; \
          }
 
+#ifndef MINC_PLAY_NICE
+typedef VIO_multidim_array multidim_array;
+typedef VIO_Data_types Data_types;
+#define MAX_DIMENSIONS VIO_MAX_DIMENSIONS
+#endif /* MINC_PLAY_NICE */
+
 #endif
--- a/volume_io/Include/volume_io/progress.h
+++ b/volume_io/Include/volume_io/progress.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/progress.h,v 1.8 2001-12-14 17:12:27 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/progress.h,v 1.9 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -33,23 +33,27 @@
 
 typedef  struct
 {
-    BOOLEAN    force_one_line;
-    BOOLEAN    first_msg_displayed;
-    BOOLEAN    one_line_flag;
+    VIO_BOOL   force_one_line;
+    VIO_BOOL   first_msg_displayed;
+    VIO_BOOL   one_line_flag;
     int        n_steps;
     int        n_dots_so_far;
     int        total_n_dots;
-    Real       start_time;
-    Real       previous_time;
-    Real       update_rate;
-    Real       sum_xy;
-    Real       sum_xx;
-    STRING     title;
+    VIO_Real   start_time;
+    VIO_Real   previous_time;
+    VIO_Real   update_rate;
+    VIO_Real   sum_xy;
+    VIO_Real   sum_xx;
+    VIO_STR    title;
 
-    Real       last_check_time;
+    VIO_Real   last_check_time;
     int        check_every;
     int        next_check_step;
     int        last_check_step;
-} progress_struct;
+} VIO_progress_struct;
 
-#endif
+#ifndef MINC_PLAY_NICE
+typedef VIO_progress_struct progress_struct;
+#endif /* MINC_PLAY_NICE */
+
+#endif /* DEF_PROGRESS */
--- a/volume_io/Include/volume_io/string_funcs.h
+++ b/volume_io/Include/volume_io/string_funcs.h
@@ -13,11 +13,11 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/string_funcs.h,v 1.7 2001-12-14 17:12:27 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/string_funcs.h,v 1.8 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
-@NAME       : string.h
+@NAME       : string_funcs.h
 @INPUT      : 
 @OUTPUT     : 
 @RETURNS    : 
@@ -31,6 +31,7 @@
 
 #include  <string.h>
 
+#ifndef MINC_PLAY_NICE
 #define  EXTREMELY_LARGE_STRING_SIZE  10000
 
 #define  END_OF_STRING                  ((char) 0)
@@ -38,5 +39,6 @@
 #define  COPY_MEMORY( dest, src, n_items )                                  \
          (void) memcpy( (void *) (dest), (void *) (src),                    \
                         (size_t) (n_items) * sizeof((src)[0]) )
+#endif /* MINC_PLAY_NICE */
 
-#endif
+#endif /* DEF_STRING */
--- a/volume_io/Include/volume_io/transforms.h
+++ b/volume_io/Include/volume_io/transforms.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/transforms.h,v 1.12 2001-12-14 17:12:28 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/transforms.h,v 1.13 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -33,36 +33,36 @@
 
 typedef enum { LINEAR, THIN_PLATE_SPLINE, USER_TRANSFORM,
                CONCATENATED_TRANSFORM, GRID_TRANSFORM }
-               Transform_types;
+              VIO_Transform_types;
 
 /* --- the user transformation function */
 
-typedef  void   (*User_transform_function)( void  *user_data,
-                                            Real  x,
-                                            Real  y,
-                                            Real  z,
-                                            Real  *x_trans,
-                                            Real  *y_trans,
-                                            Real  *z_trans );
+typedef  void   (*VIO_User_transform_function)( void  *user_data,
+                                            VIO_Real  x,
+                                            VIO_Real  y,
+                                            VIO_Real  z,
+                                            VIO_Real  *x_trans,
+                                            VIO_Real  *y_trans,
+                                            VIO_Real  *z_trans );
 
 /* --- the general transformation type */
 
-typedef struct General_transform
+typedef struct VIO_General_transform
 {
-    Transform_types             type;
-    BOOLEAN                     inverse_flag;
+    VIO_Transform_types         type;
+    VIO_BOOL                    inverse_flag;
 
     /* --- linear transform */
 
-    Transform                   *linear_transform;
-    Transform                   *inverse_linear_transform;
+    VIO_Transform               *linear_transform;
+    VIO_Transform               *inverse_linear_transform;
 
     /* --- non-linear transform */
 
     int                         n_points;
     int                         n_dimensions;
-    Real                        **points;
-    Real                        **displacements;   /* n_points + n_dim + 1 by */
+    VIO_Real                    **points;
+    VIO_Real                    **displacements;   /* n_points + n_dim + 1 by */
                                                    /* n_dim */
 
     /* --- grid transform */
@@ -73,14 +73,20 @@
 
     void                        *user_data;
     size_t                      size_user_data;
-    User_transform_function     user_transform_function;
-    User_transform_function     user_inverse_transform_function;
+    VIO_User_transform_function     user_transform_function;
+    VIO_User_transform_function     user_inverse_transform_function;
 
     /* --- concatenated transform */
 
     int                         n_transforms;
-    struct General_transform    *transforms;
+    struct VIO_General_transform    *transforms;
+
+} VIO_General_transform;
 
-} General_transform;
+#ifndef MINC_PLAY_NICE
+typedef VIO_Transform_types Transform_types;
+typedef VIO_General_transform General_transform;
+typedef VIO_User_transform_function User_transform_function;
+#endif /* MINC_PLAY_NICE */
 
 #endif
--- a/volume_io/Include/volume_io/vol_io_prototypes.h
+++ b/volume_io/Include/volume_io/vol_io_prototypes.h
@@ -1,89 +1,89 @@
 #ifndef  DEF_vol_io_prototypes
 #define  DEF_vol_io_prototypes
 
-public  Real  convert_voxel_to_value(
-    Volume   volume,
-    Real     voxel );
+VIOAPI  VIO_Real  convert_voxel_to_value(
+    VIO_Volume   volume,
+    VIO_Real     voxel );
 
-public  Real  convert_value_to_voxel(
-    Volume   volume,
-    Real     value );
+VIOAPI  VIO_Real  convert_value_to_voxel(
+    VIO_Volume   volume,
+    VIO_Real     value );
 
-public  Real  get_volume_voxel_value(
-    Volume   volume,
+VIOAPI  VIO_Real  get_volume_voxel_value(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
     int      v3,
     int      v4 );
 
-public  Real  get_volume_real_value(
-    Volume   volume,
+VIOAPI  VIO_Real  get_volume_real_value(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
     int      v3,
     int      v4 );
 
-public  void  set_volume_voxel_value(
-    Volume   volume,
+VIOAPI  void  set_volume_voxel_value(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
     int      v3,
     int      v4,
-    Real     voxel );
+    VIO_Real     voxel );
 
-public  void  set_volume_real_value(
-    Volume   volume,
+VIOAPI  void  set_volume_real_value(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
     int      v3,
     int      v4,
-    Real     value );
+    VIO_Real     value );
 
-public  void  set_volume_interpolation_tolerance(
-    Real   tolerance );
+VIOAPI  void  set_volume_interpolation_tolerance(
+    VIO_Real   tolerance );
 
-public  int   evaluate_volume(
-    Volume         volume,
-    Real           voxel[],
-    BOOLEAN        interpolating_dimensions[],
+VIOAPI  int   evaluate_volume(
+    VIO_Volume         volume,
+    VIO_Real           voxel[],
+    VIO_BOOL       interpolating_dimensions[],
     int            degrees_continuity,
-    BOOLEAN        use_linear_at_edge,
-    Real           outside_value,
-    Real           values[],
-    Real           **first_deriv,
-    Real           ***second_deriv );
+    VIO_BOOL       use_linear_at_edge,
+    VIO_Real           outside_value,
+    VIO_Real           values[],
+    VIO_Real           **first_deriv,
+    VIO_Real           ***second_deriv );
 
-public  void   evaluate_volume_in_world(
-    Volume         volume,
-    Real           x,
-    Real           y,
-    Real           z,
+VIOAPI  void   evaluate_volume_in_world(
+    VIO_Volume         volume,
+    VIO_Real           x,
+    VIO_Real           y,
+    VIO_Real           z,
     int            degrees_continuity,
-    BOOLEAN        use_linear_at_edge,
-    Real           outside_value,
-    Real           values[],
-    Real           deriv_x[],
-    Real           deriv_y[],
-    Real           deriv_z[],
-    Real           deriv_xx[],
-    Real           deriv_xy[],
-    Real           deriv_xz[],
-    Real           deriv_yy[],
-    Real           deriv_yz[],
-    Real           deriv_zz[] );
+    VIO_BOOL       use_linear_at_edge,
+    VIO_Real           outside_value,
+    VIO_Real           values[],
+    VIO_Real           deriv_x[],
+    VIO_Real           deriv_y[],
+    VIO_Real           deriv_z[],
+    VIO_Real           deriv_xx[],
+    VIO_Real           deriv_xy[],
+    VIO_Real           deriv_xz[],
+    VIO_Real           deriv_yy[],
+    VIO_Real           deriv_yz[],
+    VIO_Real           deriv_zz[] );
 
-public  void  convert_voxels_to_values(
-    Volume   volume,
+VIOAPI  void  convert_voxels_to_values(
+    VIO_Volume   volume,
     int      n_voxels,
-    Real     voxels[],
-    Real     values[] );
+    VIO_Real     voxels[],
+    VIO_Real     values[] );
 
-public  void  get_volume_value_hyperslab(
-    Volume   volume,
+VIOAPI  void  get_volume_value_hyperslab(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -94,10 +94,10 @@
     int      n2,
     int      n3,
     int      n4,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_value_hyperslab_5d(
-    Volume   volume,
+VIOAPI  void  get_volume_value_hyperslab_5d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -108,10 +108,10 @@
     int      n2,
     int      n3,
     int      n4,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_value_hyperslab_4d(
-    Volume   volume,
+VIOAPI  void  get_volume_value_hyperslab_4d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -120,69 +120,69 @@
     int      n1,
     int      n2,
     int      n3,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_value_hyperslab_3d(
-    Volume   volume,
+VIOAPI  void  get_volume_value_hyperslab_3d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
     int      n0,
     int      n1,
     int      n2,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_value_hyperslab_2d(
-    Volume   volume,
+VIOAPI  void  get_volume_value_hyperslab_2d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      n0,
     int      n1,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_value_hyperslab_1d(
-    Volume   volume,
+VIOAPI  void  get_volume_value_hyperslab_1d(
+    VIO_Volume   volume,
     int      v0,
     int      n0,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_voxel_values_5d(
-    Data_types  data_type,
+VIOAPI  void  get_voxel_values_5d(
+    VIO_Data_types data_type,
     void        *void_ptr,
     int         steps[],
     int         counts[],
-    Real        values[] );
+    VIO_Real        values[] );
 
-public  void  get_voxel_values_4d(
-    Data_types  data_type,
+VIOAPI  void  get_voxel_values_4d(
+    VIO_Data_types  data_type,
     void        *void_ptr,
     int         steps[],
     int         counts[],
-    Real        values[] );
+    VIO_Real        values[] );
 
-public  void  get_voxel_values_3d(
-    Data_types  data_type,
+VIOAPI  void  get_voxel_values_3d(
+    VIO_Data_types  data_type,
     void        *void_ptr,
     int         steps[],
     int         counts[],
-    Real        values[] );
+    VIO_Real        values[] );
 
-public  void  get_voxel_values_2d(
-    Data_types  data_type,
+VIOAPI  void  get_voxel_values_2d(
+    VIO_Data_types  data_type,
     void        *void_ptr,
     int         steps[],
     int         counts[],
-    Real        values[] );
+    VIO_Real        values[] );
 
-public  void  get_voxel_values_1d(
-    Data_types  data_type,
+VIOAPI  void  get_voxel_values_1d(
+    VIO_Data_types  data_type,
     void        *void_ptr,
     int         step0,
     int         n0,
-    Real        values[] );
+    VIO_Real        values[] );
 
-public  void  get_volume_voxel_hyperslab_5d(
-    Volume   volume,
+VIOAPI  void  get_volume_voxel_hyperslab_5d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -193,10 +193,10 @@
     int      n2,
     int      n3,
     int      n4,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_voxel_hyperslab_4d(
-    Volume   volume,
+VIOAPI  void  get_volume_voxel_hyperslab_4d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -205,34 +205,34 @@
     int      n1,
     int      n2,
     int      n3,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_voxel_hyperslab_3d(
-    Volume   volume,
+VIOAPI  void  get_volume_voxel_hyperslab_3d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
     int      n0,
     int      n1,
     int      n2,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_voxel_hyperslab_2d(
-    Volume   volume,
+VIOAPI  void  get_volume_voxel_hyperslab_2d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      n0,
     int      n1,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_voxel_hyperslab_1d(
-    Volume   volume,
+VIOAPI  void  get_volume_voxel_hyperslab_1d(
+    VIO_Volume   volume,
     int      v0,
     int      n0,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  get_volume_voxel_hyperslab(
-    Volume   volume,
+VIOAPI  void  get_volume_voxel_hyperslab(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -243,43 +243,43 @@
     int      n2,
     int      n3,
     int      n4,
-    Real     voxels[] );
+    VIO_Real     voxels[] );
 
-public  Status  initialize_free_format_input(
-    STRING               filename,
-    Volume               volume,
+VIOAPI  VIO_Status  initialize_free_format_input(
+    VIO_STR               filename,
+    VIO_Volume               volume,
     volume_input_struct  *volume_input );
 
-public  void  delete_free_format_input(
+VIOAPI  void  delete_free_format_input(
     volume_input_struct   *volume_input );
 
-public  BOOLEAN  input_more_free_format_file(
-    Volume                volume,
+VIOAPI  VIO_BOOL input_more_free_format_file(
+    VIO_Volume                volume,
     volume_input_struct   *volume_input,
-    Real                  *fraction_done );
+    VIO_Real                  *fraction_done );
 
-public  int   get_minc_file_n_dimensions(
-    STRING   filename );
+VIOAPI  int   get_minc_file_n_dimensions(
+    VIO_STR   filename );
 
-public  Minc_file  initialize_minc_input_from_minc_id(
+VIOAPI  Minc_file  initialize_minc_input_from_minc_id(
     int                  minc_id,
-    Volume               volume,
+    VIO_Volume               volume,
     minc_input_options   *options );
 
-public  Minc_file  initialize_minc_input(
-    STRING               filename,
-    Volume               volume,
+VIOAPI  Minc_file  initialize_minc_input(
+    VIO_STR               filename,
+    VIO_Volume               volume,
     minc_input_options   *options );
 
-public  int  get_n_input_volumes(
+VIOAPI  int  get_n_input_volumes(
     Minc_file  file );
 
-public  Status  close_minc_input(
+VIOAPI  VIO_Status  close_minc_input(
     Minc_file   file );
 
-public  Status  input_minc_hyperslab(
+VIOAPI  VIO_Status  input_minc_hyperslab(
     Minc_file        file,
-    Data_types       data_type,
+    VIO_Data_types   data_type,
     int              n_array_dims,
     int              array_sizes[],
     void             *array_data_ptr,
@@ -287,142 +287,142 @@
     int              start[],
     int              count[] );
 
-public  BOOLEAN  input_more_minc_file(
+VIOAPI  VIO_BOOL input_more_minc_file(
     Minc_file   file,
-    Real        *fraction_done );
+    VIO_Real        *fraction_done );
 
-public  BOOLEAN  advance_input_volume(
+VIOAPI  VIO_BOOL advance_input_volume(
     Minc_file   file );
 
-public  void  reset_input_volume(
+VIOAPI  void  reset_input_volume(
     Minc_file   file );
 
-public  int  get_minc_file_id(
+VIOAPI  int  get_minc_file_id(
     Minc_file  file );
 
-public  void  set_default_minc_input_options(
+VIOAPI  void  set_default_minc_input_options(
     minc_input_options  *options );
 
-public  void  set_minc_input_promote_invalid_to_zero_flag(
+VIOAPI  void  set_minc_input_promote_invalid_to_zero_flag(
     minc_input_options  *options,
-    BOOLEAN             flag );
+    VIO_BOOL            flag );
 
-public  void  set_minc_input_promote_invalid_to_min_flag(
+VIOAPI  void  set_minc_input_promote_invalid_to_min_flag(
     minc_input_options  *options,
-    BOOLEAN             flag );
+    VIO_BOOL            flag );
 
-public  void  set_minc_input_vector_to_scalar_flag(
+VIOAPI  void  set_minc_input_vector_to_scalar_flag(
     minc_input_options  *options,
-    BOOLEAN             flag );
+    VIO_BOOL            flag );
 
-public  void  set_minc_input_vector_to_colour_flag(
+VIOAPI  void  set_minc_input_vector_to_colour_flag(
     minc_input_options  *options,
-    BOOLEAN             flag );
+    VIO_BOOL            flag );
 
-public  void  set_minc_input_colour_dimension_size(
+VIOAPI  void  set_minc_input_colour_dimension_size(
     minc_input_options  *options,
     int                 size );
 
-public  void  set_minc_input_colour_max_dimension_size(
+VIOAPI  void  set_minc_input_colour_max_dimension_size(
     minc_input_options  *options,
     int                 size );
 
-public  void  set_minc_input_colour_indices(
+VIOAPI  void  set_minc_input_colour_indices(
     minc_input_options  *options,
     int                 indices[4] );
 
-public  void  set_minc_input_user_real_range(
+VIOAPI  void  set_minc_input_user_real_range(
     minc_input_options  *options,
     double              minimum,
     double              maximum );
 
-public  Status  start_volume_input(
-    STRING               filename,
+VIOAPI  VIO_Status  start_volume_input(
+    VIO_STR               filename,
     int                  n_dimensions,
-    STRING               dim_names[],
+    VIO_STR               dim_names[],
     nc_type              volume_nc_data_type,
-    BOOLEAN              volume_signed_flag,
-    Real                 volume_voxel_min,
-    Real                 volume_voxel_max,
-    BOOLEAN              create_volume_flag,
-    Volume               *volume,
+    VIO_BOOL             volume_signed_flag,
+    VIO_Real                 volume_voxel_min,
+    VIO_Real                 volume_voxel_max,
+    VIO_BOOL             create_volume_flag,
+    VIO_Volume               *volume,
     minc_input_options   *options,
     volume_input_struct  *input_info );
 
-public  void  delete_volume_input(
+VIOAPI  void  delete_volume_input(
     volume_input_struct   *input_info );
 
-public  BOOLEAN  input_more_of_volume(
-    Volume                volume,
+VIOAPI  VIO_BOOL input_more_of_volume(
+    VIO_Volume                volume,
     volume_input_struct   *input_info,
-    Real                  *fraction_done );
+    VIO_Real                  *fraction_done );
 
-public  void  cancel_volume_input(
-    Volume                volume,
+VIOAPI  void  cancel_volume_input(
+    VIO_Volume                volume,
     volume_input_struct   *input_info );
 
-public  Status  input_volume(
-    STRING               filename,
+VIOAPI  VIO_Status  input_volume(
+    VIO_STR               filename,
     int                  n_dimensions,
-    STRING               dim_names[],
+    VIO_STR               dim_names[],
     nc_type              volume_nc_data_type,
-    BOOLEAN              volume_signed_flag,
-    Real                 volume_voxel_min,
-    Real                 volume_voxel_max,
-    BOOLEAN              create_volume_flag,
-    Volume               *volume,
+    VIO_BOOL             volume_signed_flag,
+    VIO_Real                 volume_voxel_min,
+    VIO_Real                 volume_voxel_max,
+    VIO_BOOL             create_volume_flag,
+    VIO_Volume               *volume,
     minc_input_options   *options );
 
-public  Minc_file   get_volume_input_minc_file(
+VIOAPI  Minc_file   get_volume_input_minc_file(
     volume_input_struct   *volume_input );
 
-public   void   create_empty_multidim_array(
-    multidim_array  *array,
+VIOAPI   void   create_empty_multidim_array(
+    VIO_multidim_array  *array,
     int             n_dimensions,
-    Data_types      data_type );
+    VIO_Data_types  data_type );
 
-public  Data_types  get_multidim_data_type(
-    multidim_array       *array );
+VIOAPI  VIO_Data_types  get_multidim_data_type(
+    VIO_multidim_array       *array );
 
-public  void  set_multidim_data_type(
-    multidim_array       *array,
-    Data_types           data_type );
+VIOAPI  void  set_multidim_data_type(
+    VIO_multidim_array   *array,
+    VIO_Data_types       data_type );
 
-public  int  get_type_size(
-    Data_types   type );
+VIOAPI  int  get_type_size(
+    VIO_Data_types   type );
 
-public  void  get_type_range(
-    Data_types   type,
-    Real         *min_value,
-    Real         *max_value );
+VIOAPI  void  get_type_range(
+    VIO_Data_types   type,
+    VIO_Real         *min_value,
+    VIO_Real         *max_value );
 
-public  void  set_multidim_sizes(
-    multidim_array   *array,
+VIOAPI  void  set_multidim_sizes(
+    VIO_multidim_array   *array,
     int              sizes[] );
 
-public  void  get_multidim_sizes(
-    multidim_array   *array,
+VIOAPI  void  get_multidim_sizes(
+    VIO_multidim_array   *array,
     int              sizes[] );
 
-public  BOOLEAN  multidim_array_is_alloced(
-    multidim_array   *array );
+VIOAPI  VIO_BOOL multidim_array_is_alloced(
+    VIO_multidim_array   *array );
 
-public  void  alloc_multidim_array(
-    multidim_array   *array );
+VIOAPI  void  alloc_multidim_array(
+    VIO_multidim_array   *array );
 
-public   void   create_multidim_array(
-    multidim_array  *array,
+VIOAPI   void   create_multidim_array(
+    VIO_multidim_array  *array,
     int             n_dimensions,
     int             sizes[],
-    Data_types      data_type );
+    VIO_Data_types  data_type );
 
-public  void  delete_multidim_array(
-    multidim_array   *array );
+VIOAPI  void  delete_multidim_array(
+    VIO_multidim_array   *array );
 
-public  int  get_multidim_n_dimensions(
-    multidim_array   *array );
+VIOAPI  int  get_multidim_n_dimensions(
+    VIO_multidim_array   *array );
 
-public  void  copy_multidim_data_reordered(
+VIOAPI  void  copy_multidim_data_reordered(
     int                 type_size,
     void                *void_dest_ptr,
     int                 n_dest_dims,
@@ -432,49 +432,49 @@
     int                 src_sizes[],
     int                 counts[],
     int                 to_dest_index[],
-    BOOLEAN             use_src_order );
+    VIO_BOOL            use_src_order );
 
-public  void  copy_multidim_reordered(
-    multidim_array      *dest,
+VIOAPI  void  copy_multidim_reordered(
+    VIO_multidim_array  *dest,
     int                 dest_ind[],
-    multidim_array      *src,
+    VIO_multidim_array  *src,
     int                 src_ind[],
     int                 counts[],
     int                 to_dest_index[] );
 
-public  Minc_file  initialize_minc_output(
-    STRING                 filename,
+VIOAPI  Minc_file  initialize_minc_output(
+    VIO_STR                 filename,
     int                    n_dimensions,
-    STRING                 dim_names[],
+    VIO_STR                 dim_names[],
     int                    sizes[],
     nc_type                file_nc_data_type,
-    BOOLEAN                file_signed_flag,
-    Real                   file_voxel_min,
-    Real                   file_voxel_max,
-    General_transform      *voxel_to_world_transform,
-    Volume                 volume_to_attach,
+    VIO_BOOL               file_signed_flag,
+    VIO_Real                   file_voxel_min,
+    VIO_Real                   file_voxel_max,
+    VIO_General_transform      *voxel_to_world_transform,
+    VIO_Volume                 volume_to_attach,
     minc_output_options    *options );
 
-public  Status  copy_auxiliary_data_from_minc_file(
+VIOAPI  VIO_Status  copy_auxiliary_data_from_minc_file(
     Minc_file   file,
-    STRING      filename,
-    STRING      history_string );
+    VIO_STR      filename,
+    VIO_STR      history_string );
 
-public  Status  copy_auxiliary_data_from_open_minc_file(
+VIOAPI  VIO_Status  copy_auxiliary_data_from_open_minc_file(
     Minc_file   file,
     int         src_cdfid,
-    STRING      history_string );
+    VIO_STR      history_string );
 
-public  Status  add_minc_history(
+VIOAPI  VIO_Status  add_minc_history(
     Minc_file   file,
-    STRING      history_string );
+    VIO_STR      history_string );
 
-public  Status  set_minc_output_random_order(
+VIOAPI  VIO_Status  set_minc_output_random_order(
     Minc_file   file );
 
-public  Status  output_minc_hyperslab(
+VIOAPI  VIO_Status  output_minc_hyperslab(
     Minc_file           file,
-    Data_types          data_type,
+    VIO_Data_types      data_type,
     int                 n_array_dims,
     int                 array_sizes[],
     void                *array_data_ptr,
@@ -482,88 +482,88 @@
     int                 file_start[],
     int                 file_count[] );
 
-public  Status  output_volume_to_minc_file_position(
+VIOAPI  VIO_Status  output_volume_to_minc_file_position(
     Minc_file   file,
-    Volume      volume,
+    VIO_Volume      volume,
     int         volume_count[],
     long        file_start[] );
 
-public  Status  output_minc_volume(
+VIOAPI  VIO_Status  output_minc_volume(
     Minc_file   file );
 
-public  Status  close_minc_output(
+VIOAPI  VIO_Status  close_minc_output(
     Minc_file   file );
 
-public  void  set_default_minc_output_options(
+VIOAPI  void  set_default_minc_output_options(
     minc_output_options  *options           );
 
-public  void  copy_minc_output_options(
+VIOAPI  void  copy_minc_output_options(
     minc_output_options  *src,
     minc_output_options  *dest );
 
-public  void  delete_minc_output_options(
+VIOAPI  void  delete_minc_output_options(
     minc_output_options  *options           );
 
-public  void  set_minc_output_dimensions_order(
+VIOAPI  void  set_minc_output_dimensions_order(
     minc_output_options  *options,
     int                  n_dimensions,
-    STRING               dimension_names[] );
+    VIO_STR               dimension_names[] );
 
-public  void  set_minc_output_real_range(
+VIOAPI  void  set_minc_output_real_range(
     minc_output_options  *options,
-    Real                 real_min,
-    Real                 real_max );
+    VIO_Real                 real_min,
+    VIO_Real                 real_max );
 
-public  void  set_minc_output_use_volume_starts_and_steps_flag(
+VIOAPI  void  set_minc_output_use_volume_starts_and_steps_flag(
     minc_output_options  *options,
-    BOOLEAN              flag );
+    VIO_BOOL             flag );
 
-public  Status   get_file_dimension_names(
-    STRING   filename,
+VIOAPI  VIO_Status   get_file_dimension_names(
+    VIO_STR   filename,
     int      *n_dims,
-    STRING   *dim_names[] );
+    VIO_STR   *dim_names[] );
 
-public  STRING  *create_output_dim_names(
-    Volume                volume,
-    STRING                original_filename,
+VIOAPI  VIO_STR  *create_output_dim_names(
+    VIO_Volume                volume,
+    VIO_STR                original_filename,
     minc_output_options   *options,
     int                   file_sizes[] );
 
-public  Status   copy_volume_auxiliary_and_history(
+VIOAPI  VIO_Status   copy_volume_auxiliary_and_history(
     Minc_file   minc_file,
-    STRING      filename,
-    STRING      original_filename,
-    STRING      history );
+    VIO_STR      filename,
+    VIO_STR      original_filename,
+    VIO_STR      history );
 
-public  Status  output_modified_volume(
-    STRING                filename,
+VIOAPI  VIO_Status  output_modified_volume(
+    VIO_STR                filename,
     nc_type               file_nc_data_type,
-    BOOLEAN               file_signed_flag,
-    Real                  file_voxel_min,
-    Real                  file_voxel_max,
-    Volume                volume,
-    STRING                original_filename,
-    STRING                history,
+    VIO_BOOL              file_signed_flag,
+    VIO_Real                  file_voxel_min,
+    VIO_Real                  file_voxel_max,
+    VIO_Volume                volume,
+    VIO_STR                original_filename,
+    VIO_STR                history,
     minc_output_options   *options );
 
-public  Status  output_volume(
-    STRING                filename,
+VIOAPI  VIO_Status  output_volume(
+    VIO_STR                filename,
     nc_type               file_nc_data_type,
-    BOOLEAN               file_signed_flag,
-    Real                  file_voxel_min,
-    Real                  file_voxel_max,
-    Volume                volume,
-    STRING                history,
+    VIO_BOOL              file_signed_flag,
+    VIO_Real                  file_voxel_min,
+    VIO_Real                  file_voxel_max,
+    VIO_Volume                volume,
+    VIO_STR                history,
     minc_output_options   *options );
 
-public  void  convert_values_to_voxels(
-    Volume   volume,
+VIOAPI  void  convert_values_to_voxels(
+    VIO_Volume   volume,
     int      n_voxels,
-    Real     values[],
-    Real     voxels[] );
+    VIO_Real     values[],
+    VIO_Real     voxels[] );
 
-public  void  set_volume_value_hyperslab(
-    Volume   volume,
+VIOAPI  void  set_volume_value_hyperslab(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -574,10 +574,10 @@
     int      n2,
     int      n3,
     int      n4,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_value_hyperslab_5d(
-    Volume   volume,
+VIOAPI  void  set_volume_value_hyperslab_5d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -588,10 +588,10 @@
     int      n2,
     int      n3,
     int      n4,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_value_hyperslab_4d(
-    Volume   volume,
+VIOAPI  void  set_volume_value_hyperslab_4d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -600,34 +600,34 @@
     int      n1,
     int      n2,
     int      n3,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_value_hyperslab_3d(
-    Volume   volume,
+VIOAPI  void  set_volume_value_hyperslab_3d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
     int      n0,
     int      n1,
     int      n2,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_value_hyperslab_2d(
-    Volume   volume,
+VIOAPI  void  set_volume_value_hyperslab_2d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      n0,
     int      n1,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_value_hyperslab_1d(
-    Volume   volume,
+VIOAPI  void  set_volume_value_hyperslab_1d(
+    VIO_Volume   volume,
     int      v0,
     int      n0,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_voxel_hyperslab_5d(
-    Volume   volume,
+VIOAPI  void  set_volume_voxel_hyperslab_5d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -638,10 +638,10 @@
     int      n2,
     int      n3,
     int      n4,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_voxel_hyperslab_4d(
-    Volume   volume,
+VIOAPI  void  set_volume_voxel_hyperslab_4d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -650,34 +650,34 @@
     int      n1,
     int      n2,
     int      n3,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_voxel_hyperslab_3d(
-    Volume   volume,
+VIOAPI  void  set_volume_voxel_hyperslab_3d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
     int      n0,
     int      n1,
     int      n2,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_voxel_hyperslab_2d(
-    Volume   volume,
+VIOAPI  void  set_volume_voxel_hyperslab_2d(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      n0,
     int      n1,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_voxel_hyperslab_1d(
-    Volume   volume,
+VIOAPI  void  set_volume_voxel_hyperslab_1d(
+    VIO_Volume   volume,
     int      v0,
     int      n0,
-    Real     values[] );
+    VIO_Real     values[] );
 
-public  void  set_volume_voxel_hyperslab(
-    Volume   volume,
+VIOAPI  void  set_volume_voxel_hyperslab(
+    VIO_Volume   volume,
     int      v0,
     int      v1,
     int      v2,
@@ -688,920 +688,920 @@
     int      n2,
     int      n3,
     int      n4,
-    Real     voxels[] );
+    VIO_Real     voxels[] );
 
-public  void  set_n_bytes_cache_threshold(
+VIOAPI  void  set_n_bytes_cache_threshold(
     int  threshold );
 
-public  int  get_n_bytes_cache_threshold( void );
+VIOAPI  int  get_n_bytes_cache_threshold( void );
 
-public  void  set_default_max_bytes_in_cache(
+VIOAPI  void  set_default_max_bytes_in_cache(
     int   max_bytes );
 
-public  int  get_default_max_bytes_in_cache( void );
+VIOAPI  int  get_default_max_bytes_in_cache( void );
 
-public  void  set_default_cache_block_sizes(
+VIOAPI  void  set_default_cache_block_sizes(
     int                      block_sizes[] );
 
-public  void  set_cache_block_sizes_hint(
-    Cache_block_size_hints  hint );
+VIOAPI  void  set_cache_block_sizes_hint(
+    VIO_Cache_block_size_hints  hint );
 
-public  void  initialize_volume_cache(
-    volume_cache_struct   *cache,
-    Volume                volume );
+VIOAPI  void  initialize_volume_cache(
+    VIO_volume_cache_struct   *cache,
+    VIO_Volume                volume );
 
-public  BOOLEAN  volume_cache_is_alloced(
-    volume_cache_struct   *cache );
+VIOAPI  VIO_BOOL volume_cache_is_alloced(
+    VIO_volume_cache_struct   *cache );
 
-public  void  flush_volume_cache(
-    Volume                volume );
+VIOAPI  void  flush_volume_cache(
+    VIO_Volume                volume );
 
-public  void  delete_volume_cache(
-    volume_cache_struct   *cache,
-    Volume                volume );
+VIOAPI  void  delete_volume_cache(
+    VIO_volume_cache_struct   *cache,
+    VIO_Volume                volume );
 
-public  void  set_volume_cache_block_sizes(
-    Volume    volume,
+VIOAPI  void  set_volume_cache_block_sizes(
+    VIO_Volume    volume,
     int       block_sizes[] );
 
-public  void  set_volume_cache_size(
-    Volume    volume,
+VIOAPI  void  set_volume_cache_size(
+    VIO_Volume    volume,
     int       max_memory_bytes );
 
-public  void  set_cache_output_volume_parameters(
-    Volume                      volume,
-    STRING                      filename,
+VIOAPI  void  set_cache_output_volume_parameters(
+    VIO_Volume                      volume,
+    VIO_STR                      filename,
     nc_type                     file_nc_data_type,
-    BOOLEAN                     file_signed_flag,
-    Real                        file_voxel_min,
-    Real                        file_voxel_max,
-    STRING                      original_filename,
-    STRING                      history,
+    VIO_BOOL                    file_signed_flag,
+    VIO_Real                        file_voxel_min,
+    VIO_Real                        file_voxel_max,
+    VIO_STR                      original_filename,
+    VIO_STR                      history,
     minc_output_options         *options )
 ;
 
-public  void  open_cache_volume_input_file(
-    volume_cache_struct   *cache,
-    Volume                volume,
-    STRING                filename,
+VIOAPI  void  open_cache_volume_input_file(
+    VIO_volume_cache_struct   *cache,
+    VIO_Volume                volume,
+    VIO_STR                filename,
     minc_input_options    *options );
 
-public  void  cache_volume_range_has_changed(
-    Volume   volume );
+VIOAPI  void  cache_volume_range_has_changed(
+    VIO_Volume   volume );
 
-public  void  set_cache_volume_file_offset(
-    volume_cache_struct   *cache,
-    Volume                volume,
+VIOAPI  void  set_cache_volume_file_offset(
+    VIO_volume_cache_struct *cache,
+    VIO_Volume            volume,
     long                  file_offset[] );
 
-public  Real  get_cached_volume_voxel(
-    Volume   volume,
+VIOAPI  VIO_Real  get_cached_volume_voxel(
+    VIO_Volume   volume,
     int      x,
     int      y,
     int      z,
     int      t,
     int      v );
 
-public  void  set_cached_volume_voxel(
-    Volume   volume,
+VIOAPI  void  set_cached_volume_voxel(
+    VIO_Volume   volume,
     int      x,
     int      y,
     int      z,
     int      t,
     int      v,
-    Real     value );
+    VIO_Real     value );
 
-public  BOOLEAN  cached_volume_has_been_modified(
-    volume_cache_struct  *cache );
+VIOAPI  VIO_BOOL cached_volume_has_been_modified(
+    VIO_volume_cache_struct  *cache );
 
-public  BOOLEAN  volume_is_cached(
-    Volume  volume );
+VIOAPI  VIO_BOOL volume_is_cached(
+    VIO_Volume  volume );
 
-public  void   set_volume_cache_debugging(
-    Volume   volume,
+VIOAPI  void   set_volume_cache_debugging(
+    VIO_Volume   volume,
     int      output_every );
 
-public  STRING  *get_default_dim_names(
+VIOAPI  VIO_STR  *get_default_dim_names(
     int    n_dimensions );
 
-public  BOOLEAN  convert_dim_name_to_spatial_axis(
-    STRING  name,
+VIOAPI  VIO_BOOL convert_dim_name_to_spatial_axis(
+    VIO_STR  name,
     int     *axis );
 
-public   Volume   create_volume(
+VIOAPI   VIO_Volume   create_volume(
     int         n_dimensions,
-    STRING      dimension_names[],
+    VIO_STR      dimension_names[],
     nc_type     nc_data_type,
-    BOOLEAN     signed_flag,
-    Real        voxel_min,
-    Real        voxel_max );
+    VIO_BOOL    signed_flag,
+    VIO_Real        voxel_min,
+    VIO_Real        voxel_max );
 
-public  void  set_volume_type(
-    Volume       volume,
+VIOAPI  void  set_volume_type(
+    VIO_Volume       volume,
     nc_type      nc_data_type,
-    BOOLEAN      signed_flag,
-    Real         voxel_min,
-    Real         voxel_max );
+    VIO_BOOL     signed_flag,
+    VIO_Real         voxel_min,
+    VIO_Real         voxel_max );
 
-public  nc_type  get_volume_nc_data_type(
-    Volume       volume,
-    BOOLEAN      *signed_flag );
+VIOAPI  nc_type  get_volume_nc_data_type(
+    VIO_Volume       volume,
+    VIO_BOOL     *signed_flag );
 
-public  Data_types  get_volume_data_type(
-    Volume       volume );
+VIOAPI  VIO_Data_types  get_volume_data_type(
+    VIO_Volume       volume );
 
-public  void  set_rgb_volume_flag(
-    Volume   volume,
-    BOOLEAN  flag );
+VIOAPI  void  set_rgb_volume_flag(
+    VIO_Volume   volume,
+    VIO_BOOL flag );
 
-public  BOOLEAN  is_an_rgb_volume(
-    Volume   volume );
+VIOAPI  VIO_BOOL is_an_rgb_volume(
+    VIO_Volume   volume );
 
-public  void  alloc_volume_data(
-    Volume   volume );
+VIOAPI  void  alloc_volume_data(
+    VIO_Volume   volume );
 
-public  BOOLEAN  volume_is_alloced(
-    Volume   volume );
+VIOAPI  VIO_BOOL volume_is_alloced(
+    VIO_Volume   volume );
 
-public  void  free_volume_data(
-    Volume   volume );
+VIOAPI  void  free_volume_data(
+    VIO_Volume   volume );
 
-public  void  delete_volume(
-    Volume   volume );
+VIOAPI  void  delete_volume(
+    VIO_Volume volume );
 
-public  int  get_volume_n_dimensions(
-    Volume   volume );
+VIOAPI  int  get_volume_n_dimensions(
+    VIO_Volume volume );
 
-public  void  get_volume_sizes(
-    Volume   volume,
+VIOAPI  void  get_volume_sizes(
+    VIO_Volume volume,
     int      sizes[] );
 
-public  void  set_volume_sizes(
-    Volume       volume,
+VIOAPI  void  set_volume_sizes(
+    VIO_Volume   volume,
     int          sizes[] );
 
-public  unsigned int  get_volume_total_n_voxels(
-    Volume    volume );
+VIOAPI  unsigned int  get_volume_total_n_voxels(
+    VIO_Volume    volume );
 
-public  void  compute_world_transform(
-    int                 spatial_axes[N_DIMENSIONS],
-    Real                separations[],
-    Real                direction_cosines[][N_DIMENSIONS],
-    Real                starts[],
-    General_transform   *world_transform );
+VIOAPI  void  compute_world_transform(
+    int                 spatial_axes[VIO_N_DIMENSIONS],
+    VIO_Real            separations[],
+    VIO_Real            direction_cosines[][VIO_N_DIMENSIONS],
+    VIO_Real            starts[],
+    VIO_General_transform   *world_transform );
 
-public  void  convert_transform_to_starts_and_steps(
-    General_transform  *transform,
+VIOAPI  void  convert_transform_to_starts_and_steps(
+    VIO_General_transform  *transform,
     int                n_volume_dimensions,
-    Real               step_signs[],
+    VIO_Real           step_signs[],
     int                spatial_axes[],
-    Real               starts[],
-    Real               steps[],
-    Real               dir_cosines[][N_DIMENSIONS] );
+    VIO_Real           starts[],
+    VIO_Real           steps[],
+    VIO_Real           dir_cosines[][VIO_N_DIMENSIONS] );
 
-public  void  set_voxel_to_world_transform(
-    Volume             volume,
-    General_transform  *transform );
+VIOAPI  void  set_voxel_to_world_transform(
+    VIO_Volume             volume,
+    VIO_General_transform  *transform );
 
-public  General_transform  *get_voxel_to_world_transform(
-    Volume   volume );
+VIOAPI  VIO_General_transform  *get_voxel_to_world_transform(
+    VIO_Volume   volume );
 
-public  STRING  *get_volume_dimension_names(
-    Volume   volume );
+VIOAPI  VIO_STR  *get_volume_dimension_names(
+    VIO_Volume   volume );
 
-public  void  delete_dimension_names(
-    Volume   volume,
-    STRING   dimension_names[] );
+VIOAPI  void  delete_dimension_names(
+    VIO_Volume   volume,
+    VIO_STR   dimension_names[] );
 
-public  STRING  get_volume_space_type(
-    Volume   volume );
+VIOAPI  VIO_STR  get_volume_space_type(
+    VIO_Volume   volume );
 
-public  void  set_volume_space_type(
-    Volume   volume,
-    STRING   name );
+VIOAPI  void  set_volume_space_type(
+    VIO_Volume   volume,
+    VIO_STR   name );
 
-public  void  get_volume_separations(
-    Volume   volume,
-    Real     separations[] );
+VIOAPI  void  get_volume_separations(
+    VIO_Volume   volume,
+    VIO_Real     separations[] );
 
-public  void  set_volume_separations(
-    Volume   volume,
-    Real     separations[] );
+VIOAPI  void  set_volume_separations(
+    VIO_Volume   volume,
+    VIO_Real     separations[] );
 
-public  void  set_volume_starts(
-    Volume  volume,
-    Real    starts[] );
+VIOAPI  void  set_volume_starts(
+    VIO_Volume  volume,
+    VIO_Real    starts[] );
 
-public  void  get_volume_starts(
-    Volume  volume,
-    Real    starts[] );
+VIOAPI  void  get_volume_starts(
+    VIO_Volume  volume,
+    VIO_Real    starts[] );
 
-public  void  set_volume_direction_unit_cosine(
-    Volume   volume,
+VIOAPI  void  set_volume_direction_unit_cosine(
+    VIO_Volume   volume,
     int      axis,
-    Real     dir[] );
+    VIO_Real     dir[] );
 
-public  void  set_volume_direction_cosine(
-    Volume   volume,
+VIOAPI  void  set_volume_direction_cosine(
+    VIO_Volume   volume,
     int      axis,
-    Real     dir[] );
+    VIO_Real     dir[] );
 
-public  void  get_volume_direction_cosine(
-    Volume   volume,
+VIOAPI  void  get_volume_direction_cosine(
+    VIO_Volume   volume,
     int      axis,
-    Real     dir[] );
+    VIO_Real     dir[] );
 
-public  void  set_volume_translation(
-    Volume  volume,
-    Real    voxel[],
-    Real    world_space_voxel_maps_to[] );
+VIOAPI  void  set_volume_translation(
+    VIO_Volume  volume,
+    VIO_Real    voxel[],
+    VIO_Real    world_space_voxel_maps_to[] );
 
-public  void  get_volume_translation(
-    Volume  volume,
-    Real    voxel[],
-    Real    world_space_voxel_maps_to[] );
+VIOAPI  void  get_volume_translation(
+    VIO_Volume  volume,
+    VIO_Real    voxel[],
+    VIO_Real    world_space_voxel_maps_to[] );
 
-public  void  reorder_voxel_to_xyz(
-    Volume   volume,
-    Real     voxel[],
-    Real     xyz[] );
+VIOAPI  void  reorder_voxel_to_xyz(
+    VIO_Volume   volume,
+    VIO_Real     voxel[],
+    VIO_Real     xyz[] );
 
-public  void  reorder_xyz_to_voxel(
-    Volume   volume,
-    Real     xyz[],
-    Real     voxel[] );
+VIOAPI  void  reorder_xyz_to_voxel(
+    VIO_Volume   volume,
+    VIO_Real     xyz[],
+    VIO_Real     voxel[] );
 
-public  void  convert_voxel_to_world(
-    Volume   volume,
-    Real     voxel[],
-    Real     *x_world,
-    Real     *y_world,
-    Real     *z_world );
+VIOAPI  void  convert_voxel_to_world(
+    VIO_Volume   volume,
+    VIO_Real     voxel[],
+    VIO_Real     *x_world,
+    VIO_Real     *y_world,
+    VIO_Real     *z_world );
 
-public  void  convert_3D_voxel_to_world(
-    Volume   volume,
-    Real     voxel1,
-    Real     voxel2,
-    Real     voxel3,
-    Real     *x_world,
-    Real     *y_world,
-    Real     *z_world );
+VIOAPI  void  convert_3D_voxel_to_world(
+    VIO_Volume   volume,
+    VIO_Real     voxel1,
+    VIO_Real     voxel2,
+    VIO_Real     voxel3,
+    VIO_Real     *x_world,
+    VIO_Real     *y_world,
+    VIO_Real     *z_world );
 
-public  void  convert_voxel_normal_vector_to_world(
-    Volume          volume,
-    Real            voxel_vector[],
-    Real            *x_world,
-    Real            *y_world,
-    Real            *z_world );
+VIOAPI  void  convert_voxel_normal_vector_to_world(
+    VIO_Volume          volume,
+    VIO_Real            voxel_vector[],
+    VIO_Real            *x_world,
+    VIO_Real            *y_world,
+    VIO_Real            *z_world );
 
-public  void  convert_voxel_vector_to_world(
-    Volume          volume,
-    Real            voxel_vector[],
-    Real            *x_world,
-    Real            *y_world,
-    Real            *z_world );
+VIOAPI  void  convert_voxel_vector_to_world(
+    VIO_Volume          volume,
+    VIO_Real            voxel_vector[],
+    VIO_Real            *x_world,
+    VIO_Real            *y_world,
+    VIO_Real            *z_world );
 
-public  void  convert_world_vector_to_voxel(
-    Volume          volume,
-    Real            x_world,
-    Real            y_world,
-    Real            z_world,
-    Real            voxel_vector[] );
+VIOAPI  void  convert_world_vector_to_voxel(
+    VIO_Volume          volume,
+    VIO_Real            x_world,
+    VIO_Real            y_world,
+    VIO_Real            z_world,
+    VIO_Real            voxel_vector[] );
 
-public  void  convert_world_to_voxel(
-    Volume   volume,
-    Real     x_world,
-    Real     y_world,
-    Real     z_world,
-    Real     voxel[] );
+VIOAPI  void  convert_world_to_voxel(
+    VIO_Volume   volume,
+    VIO_Real     x_world,
+    VIO_Real     y_world,
+    VIO_Real     z_world,
+    VIO_Real     voxel[] );
 
-public  void  convert_3D_world_to_voxel(
-    Volume   volume,
-    Real     x_world,
-    Real     y_world,
-    Real     z_world,
-    Real     *voxel1,
-    Real     *voxel2,
-    Real     *voxel3 );
+VIOAPI  void  convert_3D_world_to_voxel(
+    VIO_Volume   volume,
+    VIO_Real     x_world,
+    VIO_Real     y_world,
+    VIO_Real     z_world,
+    VIO_Real     *voxel1,
+    VIO_Real     *voxel2,
+    VIO_Real     *voxel3 );
 
-public  Real  get_volume_voxel_min(
-    Volume   volume );
+VIOAPI  VIO_Real  get_volume_voxel_min(
+    VIO_Volume   volume );
 
-public  Real  get_volume_voxel_max(
-    Volume   volume );
+VIOAPI  VIO_Real  get_volume_voxel_max(
+    VIO_Volume   volume );
 
-public  void  get_volume_voxel_range(
-    Volume     volume,
-    Real       *voxel_min,
-    Real       *voxel_max );
+VIOAPI  void  get_volume_voxel_range(
+    VIO_Volume     volume,
+    VIO_Real       *voxel_min,
+    VIO_Real       *voxel_max );
 
-public  void  set_volume_voxel_range(
-    Volume   volume,
-    Real     voxel_min,
-    Real     voxel_max );
+VIOAPI  void  set_volume_voxel_range(
+    VIO_Volume   volume,
+    VIO_Real     voxel_min,
+    VIO_Real     voxel_max );
 
-public  void  get_volume_real_range(
-    Volume     volume,
-    Real       *min_value,
-    Real       *max_value );
+VIOAPI  void  get_volume_real_range(
+    VIO_Volume     volume,
+    VIO_Real       *min_value,
+    VIO_Real       *max_value );
 
-public  Real  get_volume_real_min(
-    Volume     volume );
+VIOAPI  VIO_Real  get_volume_real_min(
+    VIO_Volume     volume );
 
-public  Real  get_volume_real_max(
-    Volume     volume );
+VIOAPI  VIO_Real  get_volume_real_max(
+    VIO_Volume     volume );
 
-public  void  set_volume_real_range(
-    Volume   volume,
-    Real     real_min,
-    Real     real_max );
+VIOAPI  void  set_volume_real_range(
+    VIO_Volume   volume,
+    VIO_Real     real_min,
+    VIO_Real     real_max );
 
-public  Volume   copy_volume_definition_no_alloc(
-    Volume   volume,
+VIOAPI  VIO_Volume   copy_volume_definition_no_alloc(
+    VIO_Volume   volume,
     nc_type  nc_data_type,
-    BOOLEAN  signed_flag,
-    Real     voxel_min,
-    Real     voxel_max );
+    VIO_BOOL signed_flag,
+    VIO_Real     voxel_min,
+    VIO_Real     voxel_max );
 
-public  Volume   copy_volume_definition(
-    Volume   volume,
+VIOAPI  VIO_Volume   copy_volume_definition(
+    VIO_Volume   volume,
     nc_type  nc_data_type,
-    BOOLEAN  signed_flag,
-    Real     voxel_min,
-    Real     voxel_max );
+    VIO_BOOL signed_flag,
+    VIO_Real     voxel_min,
+    VIO_Real     voxel_max );
 
-public  Volume  copy_volume(
-    Volume   volume );
+VIOAPI  VIO_Volume  copy_volume(
+    VIO_Volume   volume );
 
-public  void  grid_transform_point(
-    General_transform   *transform,
-    Real                x,
-    Real                y,
-    Real                z,
-    Real                *x_transformed,
-    Real                *y_transformed,
-    Real                *z_transformed );
+VIOAPI  void  grid_transform_point(
+    VIO_General_transform   *transform,
+    VIO_Real                x,
+    VIO_Real                y,
+    VIO_Real                z,
+    VIO_Real                *x_transformed,
+    VIO_Real                *y_transformed,
+    VIO_Real                *z_transformed );
 
-public  void  grid_inverse_transform_point(
-    General_transform   *transform,
-    Real                x,
-    Real                y,
-    Real                z,
-    Real                *x_transformed,
-    Real                *y_transformed,
-    Real                *z_transformed );
+VIOAPI  void  grid_inverse_transform_point(
+    VIO_General_transform   *transform,
+    VIO_Real                x,
+    VIO_Real                y,
+    VIO_Real                z,
+    VIO_Real                *x_transformed,
+    VIO_Real                *y_transformed,
+    VIO_Real                *z_transformed );
 
-public  Status  mni_get_nonwhite_character(
+VIOAPI  VIO_Status  mni_get_nonwhite_character(
     FILE   *file,
     char   *ch );
 
-public  Status  mni_skip_expected_character(
+VIOAPI  VIO_Status  mni_skip_expected_character(
     FILE   *file,
     char   expected_ch );
 
-public  Status  mni_input_line(
+VIOAPI  VIO_Status  mni_input_line(
     FILE     *file,
-    STRING   *string );
+    VIO_STR   *string );
 
-public  Status  mni_input_string(
+VIOAPI  VIO_Status  mni_input_string(
     FILE     *file,
-    STRING   *string,
+    VIO_STR   *string,
     char     termination_char1,
     char     termination_char2 );
 
-public  Status  mni_input_keyword_and_equal_sign(
+VIOAPI  VIO_Status  mni_input_keyword_and_equal_sign(
     FILE         *file,
     const char   keyword[],
-    BOOLEAN      print_error_message );
+    VIO_BOOL     print_error_message );
 
-public  Status  mni_input_real(
+VIOAPI  VIO_Status  mni_input_real(
     FILE    *file,
-    Real    *d );
+    VIO_Real    *d );
 
-public  Status  mni_input_reals(
+VIOAPI  VIO_Status  mni_input_reals(
     FILE    *file,
     int     *n,
-    Real    *reals[] );
+    VIO_Real    *reals[] );
 
-public  Status  mni_input_int(
+VIOAPI  VIO_Status  mni_input_int(
     FILE    *file,
     int     *i );
 
-public  void  output_comments(
+VIOAPI  void  output_comments(
     FILE     *file,
-    STRING   comments );
+    VIO_STR   comments );
 
-public  STRING  get_default_tag_file_suffix( void );
+VIOAPI  VIO_STR  get_default_tag_file_suffix( void );
 
-public  Status  initialize_tag_file_output(
+VIOAPI  VIO_Status  initialize_tag_file_output(
     FILE      *file,
-    STRING    comments,
+    VIO_STR    comments,
     int       n_volumes );
 
-public  Status  output_one_tag(
+VIOAPI  VIO_Status  output_one_tag(
     FILE      *file,
     int       n_volumes,
-    Real      tag_volume1[],
-    Real      tag_volume2[],
-    Real      *weight,
+    VIO_Real      tag_volume1[],
+    VIO_Real      tag_volume2[],
+    VIO_Real      *weight,
     int       *structure_id,
     int       *patient_id,
-    STRING    label );
+    VIO_STR    label );
 
-public  void  terminate_tag_file_output(
+VIOAPI  void  terminate_tag_file_output(
     FILE    *file );
 
-public  Status  output_tag_points(
+VIOAPI  VIO_Status  output_tag_points(
     FILE      *file,
-    STRING    comments,
+    VIO_STR    comments,
     int       n_volumes,
     int       n_tag_points,
-    Real      **tags_volume1,
-    Real      **tags_volume2,
-    Real      weights[],
+    VIO_Real      **tags_volume1,
+    VIO_Real      **tags_volume2,
+    VIO_Real      weights[],
     int       structure_ids[],
     int       patient_ids[],
-    STRING    *labels );
+    VIO_STR    *labels );
 
-public  void  free_tag_points(
+VIOAPI  void  free_tag_points(
     int       n_volumes,
     int       n_tag_points,
-    Real      **tags_volume1,
-    Real      **tags_volume2,
-    Real      weights[],
+    VIO_Real      **tags_volume1,
+    VIO_Real      **tags_volume2,
+    VIO_Real      weights[],
     int       structure_ids[],
     int       patient_ids[],
     char      **labels );
 
-public  Status  initialize_tag_file_input(
+VIOAPI  VIO_Status  initialize_tag_file_input(
     FILE      *file,
     int       *n_volumes_ptr );
 
-public  Status  output_tag_file(
-    STRING    filename,
-    STRING    comments,
+VIOAPI  VIO_Status  output_tag_file(
+    VIO_STR    filename,
+    VIO_STR    comments,
     int       n_volumes,
     int       n_tag_points,
-    Real      **tags_volume1,
-    Real      **tags_volume2,
-    Real      weights[],
+    VIO_Real      **tags_volume1,
+    VIO_Real      **tags_volume2,
+    VIO_Real      weights[],
     int       structure_ids[],
     int       patient_ids[],
-    STRING    labels[] );
+    VIO_STR    labels[] );
 
-public  Status  input_tag_file(
-    STRING    filename,
+VIOAPI  VIO_Status  input_tag_file(
+    VIO_STR    filename,
     int       *n_volumes,
     int       *n_tag_points,
-    Real      ***tags_volume1,
-    Real      ***tags_volume2,
-    Real      **weights,
+    VIO_Real      ***tags_volume1,
+    VIO_Real      ***tags_volume2,
+    VIO_Real      **weights,
     int       **structure_ids,
     int       **patient_ids,
-    STRING    *labels[] );
+    VIO_STR    *labels[] );
 
-public  BOOLEAN  input_one_tag(
+VIOAPI  VIO_BOOL input_one_tag(
     FILE      *file,
     int       n_volumes,
-    Real      tag_volume1[],
-    Real      tag_volume2[],
-    Real      *weight,
+    VIO_Real      tag_volume1[],
+    VIO_Real      tag_volume2[],
+    VIO_Real      *weight,
     int       *structure_id,
     int       *patient_id,
-    STRING    *label,
-    Status    *status );
+    VIO_STR    *label,
+    VIO_Status    *status );
 
-public  Status  input_tag_points(
+VIOAPI  VIO_Status  input_tag_points(
     FILE      *file,
     int       *n_volumes_ptr,
     int       *n_tag_points,
-    Real      ***tags_volume1,
-    Real      ***tags_volume2,
-    Real      **weights,
+    VIO_Real      ***tags_volume1,
+    VIO_Real      ***tags_volume2,
+    VIO_Real      **weights,
     int       **structure_ids,
     int       **patient_ids,
-    STRING    *labels[] );
+    VIO_STR    *labels[] );
 
-public  void  evaluate_thin_plate_spline(
+VIOAPI  void  evaluate_thin_plate_spline(
     int     n_dims,
     int     n_values,
     int     n_points,
-    Real    **points,
-    Real    **weights,
-    Real    pos[],
-    Real    values[],
-    Real    **derivs );
+    VIO_Real    **points,
+    VIO_Real    **weights,
+    VIO_Real    pos[],
+    VIO_Real    values[],
+    VIO_Real    **derivs );
 
-public  void  thin_plate_spline_transform(
+VIOAPI  void  thin_plate_spline_transform(
     int     n_dims,
     int     n_points,
-    Real    **points,
-    Real    **weights,
-    Real    x,
-    Real    y,
-    Real    z,
-    Real    *x_transformed,
-    Real    *y_transformed,
-    Real    *z_transformed );
+    VIO_Real    **points,
+    VIO_Real    **weights,
+    VIO_Real    x,
+    VIO_Real    y,
+    VIO_Real    z,
+    VIO_Real    *x_transformed,
+    VIO_Real    *y_transformed,
+    VIO_Real    *z_transformed );
 
-public  void  thin_plate_spline_inverse_transform(
+VIOAPI  void  thin_plate_spline_inverse_transform(
     int     n_dims,
     int     n_points,
-    Real    **points,
-    Real    **weights,
-    Real    x,
-    Real    y,
-    Real    z,
-    Real    *x_transformed,
-    Real    *y_transformed,
-    Real    *z_transformed );
+    VIO_Real    **points,
+    VIO_Real    **weights,
+    VIO_Real    x,
+    VIO_Real    y,
+    VIO_Real    z,
+    VIO_Real    *x_transformed,
+    VIO_Real    *y_transformed,
+    VIO_Real    *z_transformed );
 
-public  Real  thin_plate_spline_U(
-    Real   pos[],
-    Real   landmark[],
+VIOAPI  VIO_Real  thin_plate_spline_U(
+    VIO_Real   pos[],
+    VIO_Real   landmark[],
     int    n_dims );
 
-public  STRING  get_default_transform_file_suffix( void );
+VIOAPI  VIO_STR  get_default_transform_file_suffix( void );
 
-public  Status  output_transform(
+VIOAPI  VIO_Status  output_transform(
     FILE                *file,
-    STRING              filename,
+    VIO_STR              filename,
     int                 *volume_count_ptr,
-    STRING              comments,
-    General_transform   *transform );
+    VIO_STR              comments,
+    VIO_General_transform   *transform );
 
-public  Status  input_transform(
+VIOAPI  VIO_Status  input_transform(
     FILE                *file,
-    STRING              filename,
-    General_transform   *transform );
+    VIO_STR              filename,
+    VIO_General_transform   *transform );
 
-public  Status  output_transform_file(
-    STRING              filename,
-    STRING              comments,
-    General_transform   *transform );
+VIOAPI  VIO_Status  output_transform_file(
+    VIO_STR              filename,
+    VIO_STR              comments,
+    VIO_General_transform   *transform );
 
-public  Status  input_transform_file(
-    STRING              filename,
-    General_transform   *transform );
+VIOAPI  VIO_Status  input_transform_file(
+    VIO_STR              filename,
+    VIO_General_transform   *transform );
 
-public  void  create_linear_transform(
-    General_transform   *transform,
-    Transform           *linear_transform );
+VIOAPI  void  create_linear_transform(
+    VIO_General_transform   *transform,
+    VIO_Transform           *linear_transform );
 
-public  void  create_thin_plate_transform_real(
-    General_transform    *transform,
+VIOAPI  void  create_thin_plate_transform_real(
+    VIO_General_transform    *transform,
     int                  n_dimensions,
     int                  n_points,
-    Real                 **points,
-    Real                 **displacements );
+    VIO_Real                 **points,
+    VIO_Real                 **displacements );
 
-public  void  create_thin_plate_transform(
-    General_transform    *transform,
+VIOAPI  void  create_thin_plate_transform(
+    VIO_General_transform    *transform,
     int                  n_dimensions,
     int                  n_points,
     float                **points,
     float                **displacements );
 
-public  void  create_grid_transform(
-    General_transform    *transform,
-    Volume               displacement_volume );
+VIOAPI  void  create_grid_transform(
+    VIO_General_transform    *transform,
+    VIO_Volume               displacement_volume );
 
-public  void  create_grid_transform_no_copy(
-    General_transform    *transform,
-    Volume               displacement_volume );
+VIOAPI  void  create_grid_transform_no_copy(
+    VIO_General_transform    *transform,
+    VIO_Volume               displacement_volume );
 
-public  void  create_user_transform(
-    General_transform         *transform,
+VIOAPI  void  create_user_transform(
+    VIO_General_transform         *transform,
     void                      *user_data,
     size_t                    size_user_data,
-    User_transform_function   transform_function,
-    User_transform_function   inverse_transform_function );
+    VIO_User_transform_function   transform_function,
+    VIO_User_transform_function   inverse_transform_function );
 
-public  Transform_types  get_transform_type(
-    General_transform   *transform );
+VIOAPI  VIO_Transform_types  get_transform_type(
+    VIO_General_transform   *transform );
 
-public  int  get_n_concated_transforms(
-    General_transform   *transform );
+VIOAPI  int  get_n_concated_transforms(
+    VIO_General_transform   *transform );
 
-public  General_transform  *get_nth_general_transform(
-    General_transform   *transform,
+VIOAPI  VIO_General_transform  *get_nth_general_transform(
+    VIO_General_transform   *transform,
     int                 n );
 
-public  Transform  *get_linear_transform_ptr(
-    General_transform   *transform );
+VIOAPI  VIO_Transform  *get_linear_transform_ptr(
+    VIO_General_transform   *transform );
 
-public  Transform  *get_inverse_linear_transform_ptr(
-    General_transform   *transform );
+VIOAPI  VIO_Transform  *get_inverse_linear_transform_ptr(
+    VIO_General_transform   *transform );
 
-public  void  general_transform_point(
-    General_transform   *transform,
-    Real                x,
-    Real                y,
-    Real                z,
-    Real                *x_transformed,
-    Real                *y_transformed,
-    Real                *z_transformed );
+VIOAPI  void  general_transform_point(
+    VIO_General_transform   *transform,
+    VIO_Real                x,
+    VIO_Real                y,
+    VIO_Real                z,
+    VIO_Real                *x_transformed,
+    VIO_Real                *y_transformed,
+    VIO_Real                *z_transformed );
 
-public  void  general_inverse_transform_point(
-    General_transform   *transform,
-    Real                x,
-    Real                y,
-    Real                z,
-    Real                *x_transformed,
-    Real                *y_transformed,
-    Real                *z_transformed );
+VIOAPI  void  general_inverse_transform_point(
+    VIO_General_transform   *transform,
+    VIO_Real                x,
+    VIO_Real                y,
+    VIO_Real                z,
+    VIO_Real                *x_transformed,
+    VIO_Real                *y_transformed,
+    VIO_Real                *z_transformed );
 
-public  void  copy_general_transform(
-    General_transform   *transform,
-    General_transform   *copy );
+VIOAPI  void  copy_general_transform(
+    VIO_General_transform   *transform,
+    VIO_General_transform   *copy );
 
-public  void  invert_general_transform(
-    General_transform   *transform );
+VIOAPI  void  invert_general_transform(
+    VIO_General_transform   *transform );
 
-public  void  create_inverse_general_transform(
-    General_transform   *transform,
-    General_transform   *inverse );
+VIOAPI  void  create_inverse_general_transform(
+    VIO_General_transform   *transform,
+    VIO_General_transform   *inverse );
 
-public  void  concat_general_transforms(
-    General_transform   *first,
-    General_transform   *second,
-    General_transform   *result );
+VIOAPI  void  concat_general_transforms(
+    VIO_General_transform   *first,
+    VIO_General_transform   *second,
+    VIO_General_transform   *result );
 
-public  void  delete_general_transform(
-    General_transform   *transform );
+VIOAPI  void  delete_general_transform(
+    VIO_General_transform   *transform );
 
-public  Colour  make_rgba_Colour(
+VIOAPI  VIO_Colour  make_rgba_Colour(
     int    r,
     int    g,
     int    b,
     int    a );
 
-public  int  get_Colour_r(
-    Colour   colour );
+VIOAPI  int  get_Colour_r(
+    VIO_Colour   colour );
 
-public  int  get_Colour_g(
-    Colour   colour );
+VIOAPI  int  get_Colour_g(
+    VIO_Colour   colour );
 
-public  int  get_Colour_b(
-    Colour   colour );
+VIOAPI  int  get_Colour_b(
+    VIO_Colour   colour );
 
-public  int  get_Colour_a(
-    Colour   colour );
+VIOAPI  int  get_Colour_a(
+    VIO_Colour   colour );
 
-public  Colour  make_Colour(
+VIOAPI  VIO_Colour  make_Colour(
     int   r,
     int   g,
     int   b );
 
-public  Real  get_Colour_r_0_1(
-    Colour   colour );
+VIOAPI  VIO_Real  get_Colour_r_0_1(
+    VIO_Colour   colour );
 
-public  Real  get_Colour_g_0_1(
-    Colour   colour );
+VIOAPI  VIO_Real  get_Colour_g_0_1(
+    VIO_Colour   colour );
 
-public  Real  get_Colour_b_0_1(
-    Colour   colour );
+VIOAPI  VIO_Real  get_Colour_b_0_1(
+    VIO_Colour   colour );
 
-public  Real  get_Colour_a_0_1(
-    Colour   colour );
+VIOAPI  VIO_Real  get_Colour_a_0_1(
+    VIO_Colour   colour );
 
-public  Colour  make_Colour_0_1(
-    Real   r,
-    Real   g,
-    Real   b );
+VIOAPI  VIO_Colour  make_Colour_0_1(
+    VIO_Real   r,
+    VIO_Real   g,
+    VIO_Real   b );
 
-public  Colour  make_rgba_Colour_0_1(
-    Real   r,
-    Real   g,
-    Real   b,
-    Real   a );
+VIOAPI  VIO_Colour  make_rgba_Colour_0_1(
+    VIO_Real   r,
+    VIO_Real   g,
+    VIO_Real   b,
+    VIO_Real   a );
 
-public  BOOLEAN  scaled_maximal_pivoting_gaussian_elimination(
+VIOAPI  VIO_BOOL scaled_maximal_pivoting_gaussian_elimination(
     int   n,
     int   row[],
-    Real  **a,
+    VIO_Real  **a,
     int   n_values,
-    Real  **solution );
+    VIO_Real  **solution );
 
-public  BOOLEAN  solve_linear_system(
+VIOAPI  VIO_BOOL solve_linear_system(
     int   n,
-    Real  **coefs,
-    Real  values[],
-    Real  solution[] );
+    VIO_Real  **coefs,
+    VIO_Real  values[],
+    VIO_Real  solution[] );
 
-public  BOOLEAN  invert_square_matrix(
+VIOAPI  VIO_BOOL invert_square_matrix(
     int   n,
-    Real  **matrix,
-    Real  **inverse );
+    VIO_Real  **matrix,
+    VIO_Real  **inverse );
 
-public  BOOLEAN  newton_root_find(
+VIOAPI  VIO_BOOL newton_root_find(
     int    n_dimensions,
-    void   (*function) ( void *, Real [],  Real [], Real ** ),
+    void   (*function) ( void *, VIO_Real [],  VIO_Real [], VIO_Real ** ),
     void   *function_data,
-    Real   initial_guess[],
-    Real   desired_values[],
-    Real   solution[],
-    Real   function_tolerance,
-    Real   delta_tolerance,
+    VIO_Real   initial_guess[],
+    VIO_Real   desired_values[],
+    VIO_Real   solution[],
+    VIO_Real   function_tolerance,
+    VIO_Real   delta_tolerance,
     int    max_iterations );
 
-public  void  create_orthogonal_vector(
-    Vector  *v,
-    Vector  *ortho );
+VIOAPI  void  create_orthogonal_vector(
+    VIO_Vector  *v,
+    VIO_Vector  *ortho );
 
-public  void  create_two_orthogonal_vectors(
-    Vector   *v,
-    Vector   *v1,
-    Vector   *v2 );
+VIOAPI  void  create_two_orthogonal_vectors(
+    VIO_Vector   *v,
+    VIO_Vector   *v1,
+    VIO_Vector   *v2 );
 
-public  BOOLEAN   compute_transform_inverse(
-    Transform  *transform,
-    Transform  *inverse );
+VIOAPI  VIO_BOOL  compute_transform_inverse(
+    VIO_Transform  *transform,
+    VIO_Transform  *inverse );
 
-public  void  get_linear_spline_coefs(
-    Real  **coefs );
+VIOAPI  void  get_linear_spline_coefs(
+    VIO_Real  **coefs );
 
-public  void  get_quadratic_spline_coefs(
-    Real  **coefs );
+VIOAPI  void  get_quadratic_spline_coefs(
+    VIO_Real  **coefs );
 
-public  void  get_cubic_spline_coefs(
-    Real  **coefs );
+VIOAPI  void  get_cubic_spline_coefs(
+    VIO_Real  **coefs );
 
-public  Real  cubic_interpolate(
-    Real   u,
-    Real   v0,
-    Real   v1,
-    Real   v2,
-    Real   v3 );
+VIOAPI  VIO_Real  cubic_interpolate(
+    VIO_Real   u,
+    VIO_Real   v0,
+    VIO_Real   v1,
+    VIO_Real   v2,
+    VIO_Real   v3 );
 
-public  void  evaluate_univariate_interpolating_spline(
-    Real    u,
+VIOAPI  void  evaluate_univariate_interpolating_spline(
+    VIO_Real    u,
     int     degree,
-    Real    coefs[],
+    VIO_Real    coefs[],
     int     n_derivs,
-    Real    derivs[] );
+    VIO_Real    derivs[] );
 
-public  void  evaluate_bivariate_interpolating_spline(
-    Real    u,
-    Real    v,
+VIOAPI  void  evaluate_bivariate_interpolating_spline(
+    VIO_Real    u,
+    VIO_Real    v,
     int     degree,
-    Real    coefs[],
+    VIO_Real    coefs[],
     int     n_derivs,
-    Real    derivs[] );
+    VIO_Real    derivs[] );
 
-public  void  evaluate_trivariate_interpolating_spline(
-    Real    u,
-    Real    v,
-    Real    w,
+VIOAPI  void  evaluate_trivariate_interpolating_spline(
+    VIO_Real    u,
+    VIO_Real    v,
+    VIO_Real    w,
     int     degree,
-    Real    coefs[],
+    VIO_Real    coefs[],
     int     n_derivs,
-    Real    derivs[] );
+    VIO_Real    derivs[] );
 
-public  void  evaluate_interpolating_spline(
+VIOAPI  void  evaluate_interpolating_spline(
     int     n_dims,
-    Real    parameters[],
+    VIO_Real    parameters[],
     int     degree,
     int     n_values,
-    Real    coefs[],
+    VIO_Real    coefs[],
     int     n_derivs,
-    Real    derivs[] );
+    VIO_Real    derivs[] );
 
-public  void  spline_tensor_product(
+VIOAPI  void  spline_tensor_product(
     int     n_dims,
-    Real    positions[],
+    VIO_Real    positions[],
     int     degrees[],
-    Real    *bases[],
+    VIO_Real    *bases[],
     int     n_values,
-    Real    coefs[],
+    VIO_Real    coefs[],
     int     n_derivs[],
-    Real    results[] );
+    VIO_Real    results[] );
 
-public  void  make_identity_transform( Transform   *transform );
+VIOAPI  void  make_identity_transform( VIO_Transform   *transform );
 
-public  BOOLEAN  close_to_identity(
-    Transform   *transform );
+VIOAPI  VIO_BOOL close_to_identity(
+    VIO_Transform   *transform );
 
-public  void  get_transform_origin(
-    Transform   *transform,
-    Point       *origin );
+VIOAPI  void  get_transform_origin(
+    VIO_Transform   *transform,
+    VIO_Point       *origin );
 
-public  void  set_transform_origin(
-    Transform   *transform,
-    Point       *origin );
+VIOAPI  void  set_transform_origin(
+    VIO_Transform   *transform,
+    VIO_Point       *origin );
 
-public  void  get_transform_origin_real(
-    Transform   *transform,
-    Real        origin[] );
+VIOAPI  void  get_transform_origin_real(
+    VIO_Transform   *transform,
+    VIO_Real        origin[] );
 
-public  void  get_transform_x_axis(
-    Transform   *transform,
-    Vector      *x_axis );
+VIOAPI  void  get_transform_x_axis(
+    VIO_Transform   *transform,
+    VIO_Vector      *x_axis );
 
-public  void  get_transform_x_axis_real(
-    Transform   *transform,
-    Real        x_axis[] );
+VIOAPI  void  get_transform_x_axis_real(
+    VIO_Transform   *transform,
+    VIO_Real        x_axis[] );
 
-public  void  set_transform_x_axis(
-    Transform   *transform,
-    Vector      *x_axis );
+VIOAPI  void  set_transform_x_axis(
+    VIO_Transform   *transform,
+    VIO_Vector      *x_axis );
 
-public  void  set_transform_x_axis_real(
-    Transform   *transform,
-    Real        x_axis[] );
+VIOAPI  void  set_transform_x_axis_real(
+    VIO_Transform   *transform,
+    VIO_Real        x_axis[] );
 
-public  void  get_transform_y_axis(
-    Transform   *transform,
-    Vector      *y_axis );
+VIOAPI  void  get_transform_y_axis(
+    VIO_Transform   *transform,
+    VIO_Vector      *y_axis );
 
-public  void  get_transform_y_axis_real(
-    Transform   *transform,
-    Real        y_axis[] );
+VIOAPI  void  get_transform_y_axis_real(
+    VIO_Transform   *transform,
+    VIO_Real        y_axis[] );
 
-public  void  set_transform_y_axis(
-    Transform   *transform,
-    Vector      *y_axis );
+VIOAPI  void  set_transform_y_axis(
+    VIO_Transform   *transform,
+    VIO_Vector      *y_axis );
 
-public  void  set_transform_y_axis_real(
-    Transform   *transform,
-    Real        y_axis[] );
+VIOAPI  void  set_transform_y_axis_real(
+    VIO_Transform   *transform,
+    VIO_Real        y_axis[] );
 
-public  void  get_transform_z_axis(
-    Transform   *transform,
-    Vector      *z_axis );
+VIOAPI  void  get_transform_z_axis(
+    VIO_Transform   *transform,
+    VIO_Vector      *z_axis );
 
-public  void  get_transform_z_axis_real(
-    Transform   *transform,
-    Real        z_axis[] );
+VIOAPI  void  get_transform_z_axis_real(
+    VIO_Transform   *transform,
+    VIO_Real        z_axis[] );
 
-public  void  set_transform_z_axis(
-    Transform   *transform,
-    Vector      *z_axis );
+VIOAPI  void  set_transform_z_axis(
+    VIO_Transform   *transform,
+    VIO_Vector      *z_axis );
 
-public  void  set_transform_z_axis_real(
-    Transform   *transform,
-    Real        z_axis[] );
+VIOAPI  void  set_transform_z_axis_real(
+    VIO_Transform   *transform,
+    VIO_Real        z_axis[] );
 
-public  void   make_change_to_bases_transform(
-    Point      *origin,
-    Vector     *x_axis,
-    Vector     *y_axis,
-    Vector     *z_axis,
-    Transform  *transform );
+VIOAPI  void   make_change_to_bases_transform(
+    VIO_Point      *origin,
+    VIO_Vector     *x_axis,
+    VIO_Vector     *y_axis,
+    VIO_Vector     *z_axis,
+    VIO_Transform  *transform );
 
-public  void   make_change_from_bases_transform(
-    Point      *origin,
-    Vector     *x_axis,
-    Vector     *y_axis,
-    Vector     *z_axis,
-    Transform  *transform );
+VIOAPI  void   make_change_from_bases_transform(
+    VIO_Point      *origin,
+    VIO_Vector     *x_axis,
+    VIO_Vector     *y_axis,
+    VIO_Vector     *z_axis,
+    VIO_Transform  *transform );
 
-public  void   concat_transforms(
-    Transform   *result,
-    Transform   *t1,
-    Transform   *t2 );
+VIOAPI  void   concat_transforms(
+    VIO_Transform   *result,
+    VIO_Transform   *t1,
+    VIO_Transform   *t2 );
 
-public  void  transform_point(
-    Transform  *transform,
-    Real       x,
-    Real       y,
-    Real       z,
-    Real       *x_trans,
-    Real       *y_trans,
-    Real       *z_trans );
+VIOAPI  void  transform_point(
+    VIO_Transform  *transform,
+    VIO_Real       x,
+    VIO_Real       y,
+    VIO_Real       z,
+    VIO_Real       *x_trans,
+    VIO_Real       *y_trans,
+    VIO_Real       *z_trans );
 
-public  void  transform_vector(
-    Transform  *transform,
-    Real       x,
-    Real       y,
-    Real       z,
-    Real       *x_trans,
-    Real       *y_trans,
-    Real       *z_trans );
+VIOAPI  void  transform_vector(
+    VIO_Transform  *transform,
+    VIO_Real       x,
+    VIO_Real       y,
+    VIO_Real       z,
+    VIO_Real       *x_trans,
+    VIO_Real       *y_trans,
+    VIO_Real       *z_trans );
 
-public  void  *alloc_memory_in_bytes(
+VIOAPI  void  *alloc_memory_in_bytes(
     size_t       n_bytes
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  *alloc_memory_1d(
+VIOAPI  void  *alloc_memory_1d(
     size_t       n_elements,
     size_t       type_size
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  *alloc_memory_2d(
+VIOAPI  void  *alloc_memory_2d(
     size_t       n1,
     size_t       n2,
     size_t       type_size
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  *alloc_memory_3d(
+VIOAPI  void  *alloc_memory_3d(
     size_t       n1,
     size_t       n2,
     size_t       n3,
     size_t       type_size
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  *alloc_memory_4d(
+VIOAPI  void  *alloc_memory_4d(
     size_t       n1,
     size_t       n2,
     size_t       n3,
@@ -1609,7 +1609,7 @@
     size_t       type_size
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  *alloc_memory_5d(
+VIOAPI  void  *alloc_memory_5d(
     size_t       n1,
     size_t       n2,
     size_t       n3,
@@ -1618,64 +1618,64 @@
     size_t       type_size
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  realloc_memory(
+VIOAPI  void  realloc_memory(
     void      **ptr,
     size_t    n_elements,
     size_t    type_size
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  free_memory_1d(
+VIOAPI  void  free_memory_1d(
     void   **ptr
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  free_memory_2d(
+VIOAPI  void  free_memory_2d(
     void   ***ptr
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  free_memory_3d(
+VIOAPI  void  free_memory_3d(
     void   ****ptr
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  free_memory_4d(
+VIOAPI  void  free_memory_4d(
     void   *****ptr
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  void  free_memory_5d(
+VIOAPI  void  free_memory_5d(
     void   ******ptr
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  size_t  get_total_memory_alloced( void );
+VIOAPI  size_t  get_total_memory_alloced( void );
 
-public  BOOLEAN  alloc_checking_enabled( void );
+VIOAPI  VIO_BOOL alloc_checking_enabled( void );
 
-public  void  set_alloc_checking( BOOLEAN state );
+VIOAPI  void  set_alloc_checking( VIO_BOOL state );
 
-public  void  record_ptr_alloc_check(
+VIOAPI  void  record_ptr_alloc_check(
     void      *ptr,
     size_t    n_bytes,
-    STRING    source_file,
+    VIO_STR    source_file,
     int       line_number );
 
-public  void  change_ptr_alloc_check(
+VIOAPI  void  change_ptr_alloc_check(
     void      *old_ptr,
     void      *new_ptr,
     size_t    n_bytes,
-    STRING    source_file,
+    VIO_STR    source_file,
     int       line_number );
 
-public  BOOLEAN  unrecord_ptr_alloc_check(
+VIOAPI  VIO_BOOL unrecord_ptr_alloc_check(
     void     *ptr,
-    STRING   source_file,
+    VIO_STR   source_file,
     int      line_number );
 
-public  void  output_alloc_to_file(
-    STRING   filename );
+VIOAPI  void  output_alloc_to_file(
+    VIO_STR   filename );
 
-public  void  print_alloc_source_line(
-    STRING  filename,
+VIOAPI  void  print_alloc_source_line(
+    VIO_STR  filename,
     int     line_number );
 
-public  void  set_array_size(
+VIOAPI  void  set_array_size(
     void      **array,
     size_t    type_size,
     size_t    previous_n_elems,
@@ -1683,395 +1683,395 @@
     size_t    chunk_size
     _ALLOC_SOURCE_LINE_ARG_DEF );
 
-public  BOOLEAN  real_is_double( void );
+VIOAPI  VIO_BOOL real_is_double( void );
 
-public  BOOLEAN  file_exists(
-    STRING        filename );
+VIOAPI  VIO_BOOL file_exists(
+    VIO_STR        filename );
 
-public  BOOLEAN  file_directory_exists(
-    STRING        filename );
+VIOAPI  VIO_BOOL file_directory_exists(
+    VIO_STR        filename );
 
-public  BOOLEAN  check_clobber_file(
-    STRING   filename );
+VIOAPI  VIO_BOOL check_clobber_file(
+    VIO_STR   filename );
 
-public  BOOLEAN  check_clobber_file_default_suffix(
-    STRING   filename,
-    STRING   default_suffix );
+VIOAPI  VIO_BOOL check_clobber_file_default_suffix(
+    VIO_STR   filename,
+    VIO_STR   default_suffix );
 
-public  Status  make_backup_file(
-    STRING   filename,
-    STRING   *backup_filename );
+VIOAPI  VIO_Status  make_backup_file(
+    VIO_STR   filename,
+    VIO_STR   *backup_filename );
 
-public  void  cleanup_backup_file(
-    STRING   filename,
-    STRING   backup_filename,
-    Status   status_of_write );
+VIOAPI  void  cleanup_backup_file(
+    VIO_STR   filename,
+    VIO_STR   backup_filename,
+    VIO_Status   status_of_write );
 
-public  void  remove_file(
-    STRING  filename );
+VIOAPI  void  remove_file(
+    VIO_STR  filename );
 
-public  Status  copy_file(
-    STRING  src,
-    STRING  dest );
+VIOAPI  VIO_Status  copy_file(
+    VIO_STR  src,
+    VIO_STR  dest );
 
-public  Status  move_file(
-    STRING  src,
-    STRING  dest );
+VIOAPI  VIO_Status  move_file(
+    VIO_STR  src,
+    VIO_STR  dest );
 
-public  STRING  expand_filename(
-    STRING  filename );
+VIOAPI  VIO_STR  expand_filename(
+    VIO_STR  filename );
 
-public  BOOLEAN  filename_extension_matches(
-    STRING   filename,
-    STRING   extension );
+VIOAPI  VIO_BOOL filename_extension_matches(
+    VIO_STR   filename,
+    VIO_STR   extension );
 
-public  STRING  remove_directories_from_filename(
-    STRING  filename );
+VIOAPI  VIO_STR  remove_directories_from_filename(
+    VIO_STR  filename );
 
-public  BOOLEAN  file_exists_as_compressed(
-    STRING       filename,
-    STRING       *compressed_filename );
+VIOAPI  VIO_BOOL file_exists_as_compressed(
+    VIO_STR       filename,
+    VIO_STR       *compressed_filename );
 
-public  STRING  get_temporary_filename( void );
+VIOAPI  VIO_STR  get_temporary_filename( void );
 
-public  Status  open_file(
-    STRING             filename,
-    IO_types           io_type,
-    File_formats       file_format,
+VIOAPI  VIO_Status  open_file(
+    VIO_STR            filename,
+    VIO_IO_types       io_type,
+    VIO_File_formats   file_format,
     FILE               **file );
 
-public  Status  open_file_with_default_suffix(
-    STRING             filename,
-    STRING             default_suffix,
-    IO_types           io_type,
-    File_formats       file_format,
+VIOAPI  VIO_Status  open_file_with_default_suffix(
+    VIO_STR            filename,
+    VIO_STR            default_suffix,
+    VIO_IO_types       io_type,
+    VIO_File_formats   file_format,
     FILE               **file );
 
-public  Status  set_file_position(
+VIOAPI  VIO_Status  set_file_position(
     FILE     *file,
     long     byte_position );
 
-public  Status  close_file(
+VIOAPI  VIO_Status  close_file(
     FILE     *file );
 
-public  STRING  extract_directory(
-    STRING    filename );
+VIOAPI  VIO_STR  extract_directory(
+    VIO_STR    filename );
 
-public  STRING  get_absolute_filename(
-    STRING    filename,
-    STRING    directory );
+VIOAPI  VIO_STR  get_absolute_filename(
+    VIO_STR    filename,
+    VIO_STR    directory );
 
-public  Status  flush_file(
+VIOAPI  VIO_Status  flush_file(
     FILE     *file );
 
-public  Status  input_character(
+VIOAPI  VIO_Status  input_character(
     FILE  *file,
     char   *ch );
 
-public  Status  unget_character(
+VIOAPI  VIO_Status  unget_character(
     FILE  *file,
     char  ch );
 
-public  Status  input_nonwhite_character(
+VIOAPI  VIO_Status  input_nonwhite_character(
     FILE   *file,
     char   *ch );
 
-public  Status  output_character(
+VIOAPI  VIO_Status  output_character(
     FILE   *file,
     char   ch );
 
-public  Status   skip_input_until(
+VIOAPI  VIO_Status   skip_input_until(
     FILE   *file,
     char   search_char );
 
-public  Status  output_string(
+VIOAPI  VIO_Status  output_string(
     FILE    *file,
-    STRING  str );
+    VIO_STR  str );
 
-public  Status  input_string(
+VIOAPI  VIO_Status  input_string(
     FILE    *file,
-    STRING  *str,
+    VIO_STR  *str,
     char    termination_char );
 
-public  Status  input_quoted_string(
+VIOAPI  VIO_Status  input_quoted_string(
     FILE            *file,
-    STRING          *str );
+    VIO_STR          *str );
 
-public  Status  input_possibly_quoted_string(
+VIOAPI  VIO_Status  input_possibly_quoted_string(
     FILE            *file,
-    STRING          *str );
+    VIO_STR          *str );
 
-public  Status  output_quoted_string(
+VIOAPI  VIO_Status  output_quoted_string(
     FILE            *file,
-    STRING          str );
+    VIO_STR          str );
 
-public  Status  input_binary_data(
+VIOAPI  VIO_Status  input_binary_data(
     FILE            *file,
     void            *data,
     size_t          element_size,
     int             n );
 
-public  Status  output_binary_data(
+VIOAPI  VIO_Status  output_binary_data(
     FILE            *file,
     void            *data,
     size_t          element_size,
     int             n );
 
-public  Status  input_newline(
+VIOAPI  VIO_Status  input_newline(
     FILE            *file );
 
-public  Status  output_newline(
+VIOAPI  VIO_Status  output_newline(
     FILE            *file );
 
-public  Status  input_line(
+VIOAPI  VIO_Status  input_line(
     FILE    *file,
-    STRING  *line );
+    VIO_STR  *line );
 
-public  Status  input_boolean(
+VIOAPI  VIO_Status  input_boolean(
     FILE            *file,
-    BOOLEAN         *b );
+    VIO_BOOL        *b );
 
-public  Status  output_boolean(
+VIOAPI  VIO_Status  output_boolean(
     FILE            *file,
-    BOOLEAN         b );
+    VIO_BOOL        b );
 
-public  Status  input_short(
+VIOAPI  VIO_Status  input_short(
     FILE            *file,
     short           *s );
 
-public  Status  output_short(
+VIOAPI  VIO_Status  output_short(
     FILE            *file,
     short           s );
 
-public  Status  input_unsigned_short(
+VIOAPI  VIO_Status  input_unsigned_short(
     FILE            *file,
     unsigned short  *s );
 
-public  Status  output_unsigned_short(
+VIOAPI  VIO_Status  output_unsigned_short(
     FILE            *file,
     unsigned short  s );
 
-public  Status  input_int(
+VIOAPI  VIO_Status  input_int(
     FILE  *file,
     int   *i );
 
-public  Status  output_int(
+VIOAPI  VIO_Status  output_int(
     FILE            *file,
     int             i );
 
-public  Status  input_real(
+VIOAPI  VIO_Status  input_real(
     FILE            *file,
-    Real            *r );
+    VIO_Real            *r );
 
-public  Status  output_real(
+VIOAPI  VIO_Status  output_real(
     FILE            *file,
-    Real            r );
+    VIO_Real            r );
 
-public  Status  input_float(
+VIOAPI  VIO_Status  input_float(
     FILE            *file,
     float           *f );
 
-public  Status  output_float(
+VIOAPI  VIO_Status  output_float(
     FILE            *file,
     float           f );
 
-public  Status  input_double(
+VIOAPI  VIO_Status  input_double(
     FILE            *file,
     double          *d );
 
-public  Status  output_double(
+VIOAPI  VIO_Status  output_double(
     FILE            *file,
     double          d );
 
-public  Status  io_binary_data(
+VIOAPI  VIO_Status  io_binary_data(
     FILE            *file,
-    IO_types        io_flag,
+    VIO_IO_types    io_flag,
     void            *data,
     size_t          element_size,
     int             n );
 
-public  Status  io_newline(
+VIOAPI  VIO_Status  io_newline(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format );
+    VIO_IO_types     io_flag,
+    VIO_File_formats format );
 
-public  Status  io_quoted_string(
+VIOAPI  VIO_Status  io_quoted_string(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
-    STRING          *str );
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
+    VIO_STR          *str );
 
-public  Status  io_boolean(
+VIOAPI  VIO_Status  io_boolean(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
-    BOOLEAN         *b );
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
+    VIO_BOOL        *b );
 
-public  Status  io_short(
+VIOAPI  VIO_Status  io_short(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
     short           *short_int );
 
-public  Status  io_unsigned_short(
+VIOAPI  VIO_Status  io_unsigned_short(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
     unsigned short  *unsigned_short );
 
-public  Status  io_unsigned_char(
+VIOAPI  VIO_Status  io_unsigned_char(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
     unsigned  char  *c );
 
-public  Status  io_int(
+VIOAPI  VIO_Status  io_int(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
     int             *i );
 
-public  Status  io_real(
+VIOAPI  VIO_Status  io_real(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
-    Real            *r );
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
+    VIO_Real         *r );
 
-public  Status  io_float(
+VIOAPI  VIO_Status  io_float(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
     float           *f );
 
-public  Status  io_double(
+VIOAPI  VIO_Status  io_double(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
     double          *d );
 
-public  Status  io_ints(
+VIOAPI  VIO_Status  io_ints(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
     int             n,
     int             *ints[] );
 
-public  Status  io_unsigned_chars(
+VIOAPI  VIO_Status  io_unsigned_chars(
     FILE            *file,
-    IO_types        io_flag,
-    File_formats    format,
+    VIO_IO_types     io_flag,
+    VIO_File_formats format,
     int             n,
     unsigned char   *unsigned_chars[] );
 
-public  void  set_print_function( void  (*function) ( STRING ) );
+VIOAPI  void  set_print_function( void  (*function) ( VIO_STR ) );
 
-public  void  push_print_function( void );
+VIOAPI  void  push_print_function( void );
 
-public  void  pop_print_function( void );
+VIOAPI  void  pop_print_function( void );
 
-public  void  print( STRING format, ... );
+VIOAPI  void  print( VIO_STR format, ... );
 
-public  void  set_print_error_function( void  (*function) ( char [] ) );
+VIOAPI  void  set_print_error_function( void  (*function) ( char [] ) );
 
-public  void  push_print_error_function( void );
+VIOAPI  void  push_print_error_function( void );
 
-public  void  pop_print_error_function( void );
+VIOAPI  void  pop_print_error_function( void );
 
-public  void  print_error( char format[], ... );
+VIOAPI  void  print_error( char format[], ... );
 
-public  void   handle_internal_error( char  str[] );
+VIOAPI  void   handle_internal_error( char  str[] );
 
-public  void  abort_if_allowed( void );
+VIOAPI  void  abort_if_allowed( void );
 
-public  void  initialize_progress_report(
-    progress_struct   *progress,
-    BOOLEAN           one_line_only,
+VIOAPI  void  initialize_progress_report(
+    VIO_progress_struct *progress,
+    VIO_BOOL          one_line_only,
     int               n_steps,
-    STRING            title );
+    VIO_STR            title );
 
-public  void  update_progress_report(
-    progress_struct   *progress,
+VIOAPI  void  update_progress_report(
+    VIO_progress_struct   *progress,
     int               current_step );
 
-public  void  terminate_progress_report(
-    progress_struct   *progress );
+VIOAPI  void  terminate_progress_report(
+    VIO_progress_struct   *progress );
 
-public  STRING  alloc_string(
+VIOAPI  VIO_STR  alloc_string(
     int   length );
 
-public  STRING  create_string(
-    STRING    initial );
+VIOAPI  VIO_STR  create_string(
+    VIO_STR    initial );
 
-public  void  delete_string(
-    STRING   string );
+VIOAPI  void  delete_string(
+    VIO_STR   string );
 
-public  STRING  concat_strings(
-    STRING   str1,
-    STRING   str2 );
+VIOAPI  VIO_STR  concat_strings(
+    VIO_STR   str1,
+    VIO_STR   str2 );
 
-public  void  replace_string(
-    STRING   *string,
-    STRING   new_string );
+VIOAPI  void  replace_string(
+    VIO_STR   *string,
+    VIO_STR   new_string );
 
-public  void  concat_char_to_string(
-    STRING   *string,
+VIOAPI  void  concat_char_to_string(
+    VIO_STR   *string,
     char     ch );
 
-public  void  concat_to_string(
-    STRING   *string,
-    STRING   str2 );
+VIOAPI  void  concat_to_string(
+    VIO_STR   *string,
+    VIO_STR   str2 );
 
-public  int  string_length(
-    STRING   string );
+VIOAPI  int  string_length(
+    VIO_STR   string );
 
-public  BOOLEAN  equal_strings(
-    STRING   str1,
-    STRING   str2 );
+VIOAPI  VIO_BOOL equal_strings(
+    VIO_STR   str1,
+    VIO_STR   str2 );
 
-public  BOOLEAN  is_lower_case(
+VIOAPI  VIO_BOOL is_lower_case(
     char  ch );
 
-public  BOOLEAN  is_upper_case(
+VIOAPI  VIO_BOOL is_upper_case(
     char  ch );
 
-public  char  get_lower_case(
+VIOAPI  char  get_lower_case(
     char   ch );
 
-public  char  get_upper_case(
+VIOAPI  char  get_upper_case(
     char   ch );
 
-public  BOOLEAN  string_ends_in(
-    STRING   string,
-    STRING   ending );
+VIOAPI  VIO_BOOL string_ends_in(
+    VIO_STR   string,
+    VIO_STR   ending );
 
-public    STRING   strip_outer_blanks(
-    STRING  str );
+VIOAPI    VIO_STR   strip_outer_blanks(
+    VIO_STR  str );
 
-public  int  find_character(
-    STRING    string,
+VIOAPI  int  find_character(
+    VIO_STR    string,
     char      ch );
 
-public  void  make_string_upper_case(
-    STRING    string );
+VIOAPI  void  make_string_upper_case(
+    VIO_STR    string );
 
-public  BOOLEAN  blank_string(
-    STRING   string );
+VIOAPI  VIO_BOOL blank_string(
+    VIO_STR   string );
 
-public  Real  current_cpu_seconds( void );
+VIOAPI  VIO_Real  current_cpu_seconds( void );
 
-public  Real  current_realtime_seconds( void );
+VIOAPI  VIO_Real  current_realtime_seconds( void );
 
-public  STRING  format_time(
-    STRING   format,
-    Real     seconds );
+VIOAPI  VIO_STR  format_time(
+    VIO_STR   format,
+    VIO_Real     seconds );
 
-public  void  print_time(
-    STRING   format,
-    Real     seconds );
+VIOAPI  void  print_time(
+    VIO_STR   format,
+    VIO_Real     seconds );
 
-public  STRING  get_clock_time( void );
+VIOAPI  VIO_STR  get_clock_time( void );
 
-public  void  sleep_program( Real seconds );
+VIOAPI  void  sleep_program( VIO_Real seconds );
 
-public  STRING  get_date( void );
+VIOAPI  VIO_STR  get_date( void );
 #endif
--- a/volume_io/Include/volume_io/volume.h
+++ b/volume_io/Include/volume_io/volume.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/volume.h,v 1.53 2001-12-14 17:12:28 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/volume.h,v 1.54 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 
@@ -30,24 +30,22 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-#define  cmode  nc_cmode
 #include  <minc.h>
-#undef  cmode
 #include  <volume_io/transforms.h>
 #include  <volume_io/multidim.h>
 
 typedef  struct
 {
-    Real     global_image_range[2];
-    STRING   dimension_names[MAX_DIMENSIONS];
-    BOOLEAN  use_starts_set;
-    BOOLEAN  use_volume_starts_and_steps;
+    VIO_Real global_image_range[2];
+    VIO_STR  dimension_names[VIO_MAX_DIMENSIONS];
+    VIO_BOOL use_starts_set;
+    VIO_BOOL use_volume_starts_and_steps;
 } minc_output_options;
 
 #include  <volume_io/volume_cache.h>
 
-extern  STRING   XYZ_dimension_names[];
-extern  STRING   File_order_dimension_names[];
+extern  VIO_STR   XYZ_dimension_names[];
+extern  VIO_STR   File_order_dimension_names[];
 
 /* -------------------------- volume struct --------------------- */
 
@@ -57,44 +55,48 @@
 
 typedef  struct
 {
-    BOOLEAN                 is_cached_volume;
-    volume_cache_struct     cache;
+    VIO_BOOL                is_cached_volume;
+    VIO_volume_cache_struct cache;
 
-    multidim_array          array;
+    VIO_multidim_array      array;
 
-    STRING                  dimension_names[MAX_DIMENSIONS];
-    int                     spatial_axes[N_DIMENSIONS];
+    VIO_STR                 dimension_names[VIO_MAX_DIMENSIONS];
+    int                     spatial_axes[VIO_N_DIMENSIONS];
     nc_type                 nc_data_type;
-    BOOLEAN                 signed_flag;
-    BOOLEAN                 is_rgba_data;
+    VIO_BOOL                signed_flag;
+    VIO_BOOL                is_rgba_data;
 
-    Real                    voxel_min;
-    Real                    voxel_max;
-    BOOLEAN                 real_range_set;
-    Real                    real_value_scale;
-    Real                    real_value_translation;
+    VIO_Real                voxel_min;
+    VIO_Real                voxel_max;
+    VIO_BOOL                real_range_set;
+    VIO_Real                real_value_scale;
+    VIO_Real                real_value_translation;
 
-    Real                    separations[MAX_DIMENSIONS];
-    Real                    starts[MAX_DIMENSIONS];
-    Real                    direction_cosines[MAX_DIMENSIONS][N_DIMENSIONS];
+    VIO_Real                separations[VIO_MAX_DIMENSIONS];
+    VIO_Real                starts[VIO_MAX_DIMENSIONS];
+    VIO_Real                direction_cosines[VIO_MAX_DIMENSIONS][VIO_N_DIMENSIONS];
 
-    BOOLEAN                 voxel_to_world_transform_uptodate;
-    General_transform       voxel_to_world_transform;
+    VIO_BOOL                voxel_to_world_transform_uptodate;
+    VIO_General_transform   voxel_to_world_transform;
 
-    STRING                  coordinate_system_name;
+    VIO_STR                  coordinate_system_name;
 } volume_struct;
 
-typedef  volume_struct  *Volume;
+typedef  volume_struct  *VIO_Volume;
+
+#ifndef MINC_PLAY_NICE
+typedef VIO_Volume Volume;
+#endif /* MINC_PLAY_NICE */
 
 /* ---- macro for stepping through entire volume */
 
 #define  BEGIN_ALL_VOXELS( volume, v0, v1, v2, v3, v4 )                       \
          {                                                                    \
-             int  _i_, _sizes_[MAX_DIMENSIONS];                               \
+             int  _i_, _sizes_[VIO_MAX_DIMENSIONS];                           \
              int  _size0_, _size1_, _size2_, _size3_, _size4_;                \
                                                                               \
              get_volume_sizes( volume, _sizes_ );                             \
-             for_less( _i_, get_volume_n_dimensions(volume), MAX_DIMENSIONS ) \
+             for_less( _i_, get_volume_n_dimensions(volume), VIO_MAX_DIMENSIONS ) \
                  _sizes_[_i_] = 1;                                            \
              _size0_ = _sizes_[0];                                            \
              _size1_ = _sizes_[1];                                            \
@@ -345,9 +347,9 @@
 
 typedef  struct
 {
-    BOOLEAN     promote_invalid_to_zero_flag;
-    BOOLEAN     convert_vector_to_scalar_flag;
-    BOOLEAN     convert_vector_to_colour_flag;
+    VIO_BOOL    promote_invalid_to_zero_flag;
+    VIO_BOOL    convert_vector_to_scalar_flag;
+    VIO_BOOL    convert_vector_to_colour_flag;
     int         dimension_size_for_colour_data;
     int         max_dimension_size_for_colour_data;
     int         rgba_indices[4];
@@ -356,7 +358,7 @@
 
 typedef  struct
 {
-    BOOLEAN            file_is_being_read;
+    VIO_BOOL           file_is_being_read;
 
     /* input and output */
 
@@ -365,26 +367,26 @@
     int                n_file_dimensions;
     long               sizes_in_file[MAX_VAR_DIMS];
     long               indices[MAX_VAR_DIMS];
-    STRING             dim_names[MAX_VAR_DIMS];
-    Volume             volume;
+    VIO_STR            dim_names[MAX_VAR_DIMS];
+    VIO_Volume         volume;
     int                to_volume_index[MAX_VAR_DIMS];
-    int                to_file_index[MAX_DIMENSIONS];
+    int                to_file_index[VIO_MAX_DIMENSIONS];
     int                minc_icv;
-    STRING             filename;
+    VIO_STR            filename;
 
     /* input only */
 
-    BOOLEAN            end_volume_flag;
-    BOOLEAN            converting_to_colour;
+    VIO_BOOL           end_volume_flag;
+    VIO_BOOL           converting_to_colour;
     int                rgba_indices[4];
     int                n_volumes_in_file;
 
-    int                valid_file_axes[MAX_DIMENSIONS];
+    int                valid_file_axes[VIO_MAX_DIMENSIONS];
 
     int                n_slab_dims;
 
-    int                spatial_axes[N_DIMENSIONS];
-    General_transform  voxel_to_world_transform;
+    int                spatial_axes[VIO_N_DIMENSIONS];
+    VIO_General_transform  voxel_to_world_transform;
     minc_input_options original_input_options;
 
     /* output only */
@@ -393,14 +395,14 @@
     int                min_id;
     int                max_id;
     double             image_range[2];
-    BOOLEAN            end_def_done;
-    BOOLEAN            ignoring_because_cached;
-    BOOLEAN            variables_written;
+    VIO_BOOL           end_def_done;
+    VIO_BOOL           ignoring_because_cached;
+    VIO_BOOL           variables_written;
     int                dim_ids[MAX_VAR_DIMS];
-    BOOLEAN            outputting_in_order;
-    BOOLEAN            entire_file_written;
+    VIO_BOOL           outputting_in_order;
+    VIO_BOOL           entire_file_written;
     nc_type            nc_data_type;
-    BOOLEAN            signed_flag;
+    VIO_BOOL           signed_flag;
     double             valid_range[2];
     int                image_dims[MAX_VAR_DIMS];
     int                src_cdfid;
@@ -425,12 +427,12 @@
 
     FILE                 *volume_file;
     int                  slice_index;
-    long                 sizes_in_file[MAX_DIMENSIONS];
-    int                  axis_index_from_file[MAX_DIMENSIONS];
-    Data_types           file_data_type;
-    BOOLEAN              one_file_per_slice;
-    STRING               directory;
-    STRING               *slice_filenames;
+    long                 sizes_in_file[VIO_MAX_DIMENSIONS];
+    int                  axis_index_from_file[VIO_MAX_DIMENSIONS];
+    VIO_Data_types       file_data_type;
+    VIO_BOOL             one_file_per_slice;
+    VIO_STR              directory;
+    VIO_STR              *slice_filenames;
     int                  *slice_byte_offsets;
     unsigned char        *byte_slice_buffer;
     unsigned short       *short_slice_buffer;
--- a/volume_io/Include/volume_io/volume_cache.h
+++ b/volume_io/Include/volume_io/volume_cache.h
@@ -13,7 +13,7 @@
               make no representations about the suitability of this
               software for any purpose.  It is provided "as is" without
               express or implied warranty.
-@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/volume_cache.h,v 1.9 2001-12-14 17:12:28 neelin Exp $
+@VERSION    : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/volume_cache.h,v 1.10 2004-10-04 20:23:51 bert Exp $
 ---------------------------------------------------------------------------- */
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -33,67 +33,74 @@
 #include  <volume_io/multidim.h>
 
 typedef  enum  { SLICE_ACCESS, RANDOM_VOLUME_ACCESS }
-               Cache_block_size_hints;
+               VIO_Cache_block_size_hints;
 
 #define  CACHE_DEBUGGING
 #undef   CACHE_DEBUGGING
 
-typedef  struct  cache_block_struct
+typedef  struct  VIO_cache_block_struct
 {
     int                         block_index;
-    Smallest_int                modified_flag;
-    multidim_array              array;
-    struct  cache_block_struct  *prev_used;
-    struct  cache_block_struct  *next_used;
-    struct  cache_block_struct  **prev_hash;
-    struct  cache_block_struct  *next_hash;
-} cache_block_struct;
+    VIO_SCHAR                modified_flag;
+    VIO_multidim_array              array;
+    struct  VIO_cache_block_struct  *prev_used;
+    struct  VIO_cache_block_struct  *next_used;
+    struct  VIO_cache_block_struct  **prev_hash;
+    struct  VIO_cache_block_struct  *next_hash;
+} VIO_cache_block_struct;
 
 typedef  struct
 {
     int       block_index_offset;
     int       block_offset;
-} cache_lookup_struct;
+} VIO_cache_lookup_struct;
 
 typedef struct
 {
     int                         n_dimensions;
-    int                         file_offset[MAX_DIMENSIONS];
-    STRING                      input_filename;
+    int                         file_offset[VIO_MAX_DIMENSIONS];
+    VIO_STR                     input_filename;
 
-    STRING                      output_filename;
+    VIO_STR                     output_filename;
     nc_type                     file_nc_data_type;
-    BOOLEAN                     file_signed_flag;
-    Real                        file_voxel_min;
-    Real                        file_voxel_max;
-    STRING                      original_filename;
-    STRING                      history;
+    VIO_BOOL                    file_signed_flag;
+    VIO_Real                    file_voxel_min;
+    VIO_Real                    file_voxel_max;
+    VIO_STR                     original_filename;
+    VIO_STR                     history;
     minc_output_options         options;
 
-    BOOLEAN                     writing_to_temp_file;
+    VIO_BOOL                    writing_to_temp_file;
     int                         total_block_size;
-    int                         block_sizes[MAX_DIMENSIONS];
-    int                         blocks_per_dim[MAX_DIMENSIONS];
-    BOOLEAN                     output_file_is_open;
-    BOOLEAN                     must_read_blocks_before_use;
+    int                         block_sizes[VIO_MAX_DIMENSIONS];
+    int                         blocks_per_dim[VIO_MAX_DIMENSIONS];
+    VIO_BOOL                    output_file_is_open;
+    VIO_BOOL                    must_read_blocks_before_use;
     void                        *minc_file;
     int                         n_blocks;
     int                         max_cache_bytes;
     int                         max_blocks;
     int                         hash_table_size;
-    cache_block_struct          *head;
-    cache_block_struct          *tail;
-    cache_block_struct          **hash_table;
+    VIO_cache_block_struct      *head;
+    VIO_cache_block_struct      *tail;
+    VIO_cache_block_struct      **hash_table;
 
-    cache_lookup_struct         *lookup[MAX_DIMENSIONS];
-    cache_block_struct          *previous_block;
+    VIO_cache_lookup_struct     *lookup[VIO_MAX_DIMENSIONS];
+    VIO_cache_block_struct      *previous_block;
     int                         previous_block_index;
 
-    BOOLEAN                     debugging_on;
+    VIO_BOOL                    debugging_on;
     int                         n_accesses;
     int                         output_every;
     int                         n_hits;
     int                         n_prev_hits;
-} volume_cache_struct;
+} VIO_volume_cache_struct;
+
+#ifndef MINC_PLAY_NICE
+typedef VIO_Cache_block_size_hints Cache_block_size_hints;
+typedef VIO_cache_block_struct cache_block_struct;
+typedef VIO_cache_lookup_struct cache_lookup_struct;
+typedef VIO_volume_cache_struct volume_cache_struct;
+#endif /* MINC_PLAY_NICE */
 
 #endif
--- a/volume_io/MNI_formats/gen_xf_io.c
+++ b/volume_io/MNI_formats/gen_xf_io.c
@@ -15,26 +15,26 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/gen_xf_io.c,v 1.22 2003-06-02 02:49:36 stever Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/gen_xf_io.c,v 1.23 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /*--------------------- file format keywords ------------------------------ */
 
-static   const STRING      TRANSFORM_FILE_HEADER = "MNI Transform File";
-static   const STRING      TYPE_STRING = "Transform_Type";
-static   const STRING      LINEAR_TRANSFORM_STRING = "Linear_Transform";
-static   const STRING      LINEAR_TYPE = "Linear";
-static   const STRING      THIN_PLATE_SPLINE_STRING =
+static const STRING      TRANSFORM_FILE_HEADER = "MNI Transform File";
+static const STRING      TYPE_STRING = "Transform_Type";
+static const STRING      LINEAR_TRANSFORM_STRING = "Linear_Transform";
+static const STRING      LINEAR_TYPE = "Linear";
+static const STRING      THIN_PLATE_SPLINE_STRING =
                                               "Thin_Plate_Spline_Transform";
-static   const STRING      INVERT_FLAG_STRING = "Invert_Flag";
-static   const STRING      TRUE_STRING = "True";
-static   const STRING      FALSE_STRING = "False";
-static   const STRING      N_DIMENSIONS_STRING = "Number_Dimensions";
-static   const STRING      POINTS_STRING = "Points";
-static   const STRING      DISPLACEMENTS_STRING = "Displacements";
+static const STRING      INVERT_FLAG_STRING = "Invert_Flag";
+static const STRING      TRUE_STRING = "True";
+static const STRING      FALSE_STRING = "False";
+static const STRING      N_DIMENSIONS_STRING = "Number_Dimensions";
+static const STRING      POINTS_STRING = "Points";
+static const STRING      DISPLACEMENTS_STRING = "Displacements";
 
-static   const STRING      GRID_TRANSFORM_STRING = "Grid_Transform";
-static   const STRING      DISPLACEMENT_VOLUME = "Displacement_Volume";
+static const STRING      GRID_TRANSFORM_STRING = "Grid_Transform";
+static const STRING      DISPLACEMENT_VOLUME = "Displacement_Volume";
 
 /* ----------------------------- MNI Header -----------------------------------
 @NAME       : get_default_transform_file_suffix
@@ -49,7 +49,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  get_default_transform_file_suffix( void )
+VIOAPI  STRING  get_default_transform_file_suffix( void )
 {
     return( "xfm" );
 }
@@ -72,7 +72,7 @@
 @MODIFIED   : Feb 21, 1995    David MacDonald : added grid transforms 
 ---------------------------------------------------------------------------- */
 
-private  void  output_one_transform(
+static  void  output_one_transform(
     FILE                *file,
     STRING              filename,
     int                 *volume_count,
@@ -258,7 +258,7 @@
 @MODIFIED   : Feb. 21, 1995   D. MacDonald
 ---------------------------------------------------------------------------- */
 
-public  Status  output_transform(
+VIOAPI  Status  output_transform(
     FILE                *file,
     STRING              filename,
     int                 *volume_count_ptr,
@@ -309,20 +309,20 @@
 @MODIFIED   : Feb. 21, 1995   David MacDonald - added grid transforms
 ---------------------------------------------------------------------------- */
 
-private  Status  input_one_transform(
+static Status input_one_transform(
     FILE                *file,
     STRING              filename,
     General_transform   *transform )
 {
-    Status            status;
+    Status        status;
     int               i, j, n_points, n_dimensions;
-    Real              **points, **displacements;
-    Real              value, *points_1d;
-    STRING            type_name, str, volume_filename, directory, tmp_filename;
-    Volume            volume;
-    Transform         linear_transform;
+    Real          **points, **displacements;
+    Real          value, *points_1d;
+    STRING           type_name, str, volume_filename, directory, tmp_filename;
+    Volume        volume;
+    Transform     linear_transform;
     Transform_types   type;
-    BOOLEAN           inverse_flag;
+    BOOLEAN          inverse_flag;
     General_transform inverse;
     minc_input_options  options;
 
@@ -606,7 +606,7 @@
 @MODIFIED   : Feb. 21, 1995   D. MacDonald
 ---------------------------------------------------------------------------- */
 
-public  Status  input_transform(
+VIOAPI  Status  input_transform(
     FILE                *file,
     STRING              filename,
     General_transform   *transform )
@@ -686,7 +686,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_transform_file(
+VIOAPI  Status  output_transform_file(
     STRING              filename,
     STRING              comments,
     General_transform   *transform )
@@ -724,7 +724,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_transform_file(
+VIOAPI  Status  input_transform_file(
     STRING              filename,
     General_transform   *transform )
 {
--- a/volume_io/MNI_formats/gen_xfs.c
+++ b/volume_io/MNI_formats/gen_xfs.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/gen_xfs.c,v 1.22 2002-09-03 23:27:31 stever Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/gen_xfs.c,v 1.23 2004-10-04 20:23:51 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -31,7 +31,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  alloc_linear_transform(
+static  void  alloc_linear_transform(
     General_transform   *transform )
 {
     transform->type = LINEAR;
@@ -56,7 +56,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  create_linear_transform(
+VIOAPI  void  create_linear_transform(
     General_transform   *transform,
     Transform           *linear_transform )
 {
@@ -91,7 +91,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  initialize_thin_plate_transform(
+static  void  initialize_thin_plate_transform(
     General_transform    *transform,
     int                  n_dimensions,
     int                  n_points )
@@ -123,7 +123,7 @@
 @MODIFIED   : Feb. 21, 1995   David MacDonald - make a real and float version
 ---------------------------------------------------------------------------- */
 
-public  void  create_thin_plate_transform_real(
+VIOAPI  void  create_thin_plate_transform_real(
     General_transform    *transform,
     int                  n_dimensions,
     int                  n_points,
@@ -163,7 +163,7 @@
 @MODIFIED   : Feb. 21, 1995   David MacDonald - make a real and float version
 ---------------------------------------------------------------------------- */
 
-public  void  create_thin_plate_transform(
+VIOAPI  void  create_thin_plate_transform(
     General_transform    *transform,
     int                  n_dimensions,
     int                  n_points,
@@ -200,7 +200,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  internal_create_grid_transform(
+static  void  internal_create_grid_transform(
     General_transform    *transform,
     Volume               displacement_volume,
     BOOLEAN              copy_flag )
@@ -294,7 +294,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  create_grid_transform(
+VIOAPI  void  create_grid_transform(
     General_transform    *transform,
     Volume               displacement_volume )
 {
@@ -316,7 +316,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  create_grid_transform_no_copy(
+VIOAPI  void  create_grid_transform_no_copy(
     General_transform    *transform,
     Volume               displacement_volume )
 {
@@ -339,7 +339,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  create_user_transform(
+VIOAPI  void  create_user_transform(
     General_transform         *transform,
     void                      *user_data,
     size_t                    size_user_data,
@@ -372,7 +372,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Transform_types  get_transform_type(
+VIOAPI  Transform_types  get_transform_type(
     General_transform   *transform )
 {
     return( transform->type );
@@ -392,7 +392,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_n_concated_transforms(
+VIOAPI  int  get_n_concated_transforms(
     General_transform   *transform )
 {
     if( transform->type == CONCATENATED_TRANSFORM )
@@ -415,7 +415,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  General_transform  *get_nth_general_transform(
+VIOAPI  General_transform  *get_nth_general_transform(
     General_transform   *transform,
     int                 n )
 {
@@ -444,7 +444,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Transform  *get_linear_transform_ptr(
+VIOAPI  Transform  *get_linear_transform_ptr(
     General_transform   *transform )
 {
     if( transform->type == LINEAR )
@@ -475,7 +475,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Transform  *get_inverse_linear_transform_ptr(
+VIOAPI  Transform  *get_inverse_linear_transform_ptr(
     General_transform   *transform )
 {
     if( transform->type == LINEAR )
@@ -512,7 +512,7 @@
 @MODIFIED   : Feb. 27, 1995   D. MacDonald  - added grid transforms
 ---------------------------------------------------------------------------- */
 
-private  void  transform_or_invert_point(
+static  void  transform_or_invert_point(
     General_transform   *transform,
     BOOLEAN             inverse_flag,
     Real                x,
@@ -641,7 +641,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  general_transform_point(
+VIOAPI  void  general_transform_point(
     General_transform   *transform,
     Real                x,
     Real                y,
@@ -673,7 +673,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  general_inverse_transform_point(
+VIOAPI  void  general_inverse_transform_point(
     General_transform   *transform,
     Real                x,
     Real                y,
@@ -702,7 +702,7 @@
 @MODIFIED   : Feb. 27, 1995   D. MacDonald  - added grid transforms
 ---------------------------------------------------------------------------- */
 
-private  void  copy_and_invert_transform(
+static  void  copy_and_invert_transform(
     General_transform   *transform,
     BOOLEAN             invert_it,
     General_transform   *copy )
@@ -798,7 +798,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  copy_general_transform(
+VIOAPI  void  copy_general_transform(
     General_transform   *transform,
     General_transform   *copy )
 {
@@ -818,7 +818,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  invert_general_transform(
+VIOAPI  void  invert_general_transform(
     General_transform   *transform )
 {
     transform->inverse_flag = !transform->inverse_flag;
@@ -837,7 +837,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  create_inverse_general_transform(
+VIOAPI  void  create_inverse_general_transform(
     General_transform   *transform,
     General_transform   *inverse )
 {
@@ -860,7 +860,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  concat_general_transforms(
+VIOAPI  void  concat_general_transforms(
     General_transform   *first,
     General_transform   *second,
     General_transform   *result )
@@ -1014,7 +1014,7 @@
 @MODIFIED   : Feb. 27, 1995   D. MacDonald  - added grid transforms
 ---------------------------------------------------------------------------- */
 
-public  void  delete_general_transform(
+VIOAPI  void  delete_general_transform(
     General_transform   *transform )
 {
     int   trans;
--- a/volume_io/MNI_formats/grid_transforms.c
+++ b/volume_io/MNI_formats/grid_transforms.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/grid_transforms.c,v 1.10 1996-05-17 19:36:27 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/grid_transforms.c,v 1.11 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #define   DEGREES_CONTINUITY         2    /* Cubic interpolation */
@@ -29,7 +29,7 @@
 #define   INVERSE_DELTA_TOLERANCE        1.0e-5
 #define   MAX_INVERSE_ITERATIONS         20
 
-private  void   evaluate_grid_volume(
+static void   evaluate_grid_volume(
     Volume         volume,
     Real           x,
     Real           y,
@@ -58,7 +58,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  grid_transform_point(
+VIOAPI  void  grid_transform_point(
     General_transform   *transform,
     Real                x,
     Real                y,
@@ -171,7 +171,7 @@
 
 ---------------------------------------------------------------------------- */
 
-public  void  grid_inverse_transform_point(
+VIOAPI  void  grid_inverse_transform_point(
     General_transform   *transform,
     Real                x,
     Real                y,
@@ -238,7 +238,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  grid_inverse_transform_point(
+VIOAPI  void  grid_inverse_transform_point(
     General_transform   *transform,
     Real                x,
     Real                y,
@@ -321,7 +321,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void   evaluate_grid_volume(
+static  void   evaluate_grid_volume(
     Volume         volume,
     Real           x,
     Real           y,
--- a/volume_io/MNI_formats/mni_io.c
+++ b/volume_io/MNI_formats/mni_io.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/mni_io.c,v 1.10 1995-10-19 15:47:17 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/mni_io.c,v 1.11 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 static   const char      COMMENT_CHAR1 = '%';
@@ -38,7 +38,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  mni_get_nonwhite_character(
+VIOAPI Status  mni_get_nonwhite_character(
     FILE   *file,
     char   *ch )
 {
@@ -80,7 +80,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  mni_skip_expected_character(
+VIOAPI Status  mni_skip_expected_character(
     FILE   *file,
     char   expected_ch )
 {
@@ -120,7 +120,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  mni_input_line(
+VIOAPI Status  mni_input_line(
     FILE     *file,
     STRING   *string )
 {
@@ -166,7 +166,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  mni_input_string(
+VIOAPI Status  mni_input_string(
     FILE     *file,
     STRING   *string,
     char     termination_char1,
@@ -174,7 +174,7 @@
 {
     Status   status;
     char     ch;
-    BOOLEAN  quoted;
+    BOOLEAN quoted;
 
     *string = create_string( NULL );
 
@@ -229,10 +229,10 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  mni_input_keyword_and_equal_sign(
+VIOAPI Status  mni_input_keyword_and_equal_sign(
     FILE         *file,
     const char   keyword[],
-    BOOLEAN      print_error_message )
+    BOOLEAN     print_error_message )
 {
     Status     status;
     STRING     str;
@@ -272,7 +272,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  unget_string(
+static void  unget_string(
     FILE    *file,
     STRING  str )
 {
@@ -300,7 +300,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  mni_input_real(
+VIOAPI Status  mni_input_real(
     FILE    *file,
     Real    *d )
 {
@@ -335,7 +335,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  mni_input_reals(
+VIOAPI Status  mni_input_reals(
     FILE    *file,
     int     *n,
     Real    *reals[] )
@@ -365,11 +365,11 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  mni_input_int(
+VIOAPI Status  mni_input_int(
     FILE    *file,
     int     *i )
 {
-    Status   status;
+    Status status;
     STRING   str;
 
     status = mni_input_string( file, &str, (char) ' ', (char) ';' );
@@ -402,7 +402,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  output_comments(
+VIOAPI  void  output_comments(
     FILE     *file,
     STRING   comments )
 {
--- a/volume_io/MNI_formats/tag_points.c
+++ b/volume_io/MNI_formats/tag_points.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/tag_points.c,v 1.22 1996-11-15 16:09:49 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/tag_points.c,v 1.23 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 static   const char      *TAG_FILE_HEADER = "MNI Tag Point File";
@@ -35,7 +35,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  get_default_tag_file_suffix( void )
+VIOAPI  STRING  get_default_tag_file_suffix( void )
 {
     return( "tag" );
 }
@@ -55,7 +55,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  initialize_tag_file_output(
+VIOAPI  Status  initialize_tag_file_output(
     FILE      *file,
     STRING    comments,
     int       n_volumes )
@@ -115,7 +115,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_one_tag(
+VIOAPI  Status  output_one_tag(
     FILE      *file,
     int       n_volumes,
     Real      tag_volume1[],
@@ -188,7 +188,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  terminate_tag_file_output(
+VIOAPI  void  terminate_tag_file_output(
     FILE    *file )
 {
     (void) fprintf( file, ";\n" );
@@ -220,7 +220,7 @@
                               tags_volume2 with n_volumes==1
 ---------------------------------------------------------------------------- */
 
-public  Status  output_tag_points(
+VIOAPI  Status  output_tag_points(
     FILE      *file,
     STRING    comments,
     int       n_volumes,
@@ -274,7 +274,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private   void  free_tags(
+static void free_tags(
     Real    **tags,
     int     n_tag_points )
 {
@@ -307,7 +307,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  free_tag_points(
+VIOAPI  void  free_tag_points(
     int       n_volumes,
     int       n_tag_points,
     Real      **tags_volume1,
@@ -360,7 +360,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  STRING  extract_label(
+static STRING extract_label(
     STRING     str )
 {
     BOOLEAN  quoted;
@@ -411,7 +411,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  initialize_tag_file_input(
+VIOAPI  Status  initialize_tag_file_input(
     FILE      *file,
     int       *n_volumes_ptr )
 {
@@ -492,7 +492,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  read_one_tag(
+static Status read_one_tag(
     FILE      *file,
     int       n_volumes,
     Real      tags_volume1_ptr[],
@@ -659,7 +659,7 @@
 @MODIFIED   : Oct. 19, 1995   D. MacDonald    - now calls the 1 at a time funcs
 ---------------------------------------------------------------------------- */
 
-public  Status  output_tag_file(
+VIOAPI  Status  output_tag_file(
     STRING    filename,
     STRING    comments,
     int       n_volumes,
@@ -709,7 +709,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_tag_file(
+VIOAPI  Status  input_tag_file(
     STRING    filename,
     int       *n_volumes,
     int       *n_tag_points,
@@ -758,7 +758,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  input_one_tag(
+VIOAPI  BOOLEAN  input_one_tag(
     FILE      *file,
     int       n_volumes,
     Real      tag_volume1[],
@@ -807,7 +807,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_tag_points(
+VIOAPI  Status  input_tag_points(
     FILE      *file,
     int       *n_volumes_ptr,
     int       *n_tag_points,
--- a/volume_io/MNI_formats/thin_plate_spline.c
+++ b/volume_io/MNI_formats/thin_plate_spline.c
@@ -15,7 +15,7 @@
 #include <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/thin_plate_spline.c,v 1.13 1997-03-23 21:11:33 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/MNI_formats/thin_plate_spline.c,v 1.14 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #define   INVERSE_FUNCTION_TOLERANCE     0.01
@@ -54,13 +54,13 @@
 
 /*------------ private functions -----------------*/
 
-private  void   newton_function(
+static  void   newton_function(
     void     *function_data,
     Real     parameters[],
     Real     values[],
     Real     **first_derivs );
 
-private  Real  thin_plate_spline_U_deriv(
+static  Real  thin_plate_spline_U_deriv(
    Real   pos[],
    Real   landmark[],
    int    n_dims,
@@ -92,7 +92,7 @@
               Louis Collins
 ---------------------------------------------------------------------------- */
 
-public  void  evaluate_thin_plate_spline(
+VIOAPI  void  evaluate_thin_plate_spline(
     int     n_dims,
     int     n_values,
     int     n_points,
@@ -198,7 +198,7 @@
                     reorganized to call evaluate_thin_plane_spline()
 ---------------------------------------------------------------------------- */
 
-public  void  thin_plate_spline_transform(
+VIOAPI  void  thin_plate_spline_transform(
     int     n_dims,
     int     n_points,
     Real    **points,
@@ -256,7 +256,7 @@
                     reorganized to call evaluate_thin_plane_spline()
 ---------------------------------------------------------------------------- */
 
-public  void  thin_plate_spline_inverse_transform(
+VIOAPI  void  thin_plate_spline_inverse_transform(
     int     n_dims,
     int     n_points,
     Real    **points,
@@ -325,7 +325,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void   newton_function(
+static  void   newton_function(
     void     *function_data,
     Real     parameters[],
     Real     values[],
@@ -359,7 +359,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  thin_plate_spline_U(
+VIOAPI  Real  thin_plate_spline_U(
     Real   pos[],
     Real   landmark[],
     int    n_dims )
@@ -420,7 +420,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Real  thin_plate_spline_U_deriv(
+static  Real  thin_plate_spline_U_deriv(
    Real   pos[],
    Real   landmark[],
    int    n_dims,
--- a/volume_io/Prog_utils/alloc.c
+++ b/volume_io/Prog_utils/alloc.c
@@ -16,7 +16,7 @@
 #include  <stdlib.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/alloc.c,v 1.24 1998-04-30 19:17:43 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/alloc.c,v 1.25 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -36,7 +36,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  set_up_array_pointers_2D(
+static  void  set_up_array_pointers_2D(
     void      **ptr,
     size_t    n1,
     size_t    n2,
@@ -61,7 +61,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  private_alloc_memory(
+static  Status  private_alloc_memory(
     void         **ptr,
     size_t       n_bytes )
 {
@@ -93,7 +93,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  private_alloc_memory_2d(
+static  Status  private_alloc_memory_2d(
     void         ***ptr,
     size_t       n1,
     size_t       n2,
@@ -126,7 +126,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  private_alloc_memory_3d(
+static Status private_alloc_memory_3d(
     void         ****ptr,
     size_t       n1,
     size_t       n2,
@@ -161,7 +161,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  private_alloc_memory_4d(
+static Status private_alloc_memory_4d(
     void         *****ptr,
     size_t       n1,
     size_t       n2,
@@ -199,7 +199,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  private_alloc_memory_5d(
+static Status private_alloc_memory_5d(
     void         ******ptr,
     size_t       n1,
     size_t       n2,
@@ -237,7 +237,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  *alloc_memory_in_bytes(
+VIOAPI  void  *alloc_memory_in_bytes(
     size_t       n_bytes
     _ALLOC_SOURCE_LINE_ARG_DEF )
 {
@@ -273,7 +273,7 @@
 @MODIFIED   : Apr. 16, 1996   D. MacDonald    : returns the pointer
 ---------------------------------------------------------------------------- */
 
-public  void  *alloc_memory_1d(
+VIOAPI  void  *alloc_memory_1d(
     size_t       n_elements,
     size_t       type_size
     _ALLOC_SOURCE_LINE_ARG_DEF )
@@ -313,7 +313,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  *alloc_memory_2d(
+VIOAPI  void  *alloc_memory_2d(
     size_t       n1,
     size_t       n2,
     size_t       type_size
@@ -359,7 +359,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  *alloc_memory_3d(
+VIOAPI  void  *alloc_memory_3d(
     size_t       n1,
     size_t       n2,
     size_t       n3,
@@ -409,7 +409,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  *alloc_memory_4d(
+VIOAPI  void  *alloc_memory_4d(
     size_t       n1,
     size_t       n2,
     size_t       n3,
@@ -463,7 +463,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  *alloc_memory_5d(
+VIOAPI  void  *alloc_memory_5d(
     size_t       n1,
     size_t       n2,
     size_t       n3,
@@ -517,7 +517,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  realloc_memory(
+VIOAPI  void  realloc_memory(
     void      **ptr,
     size_t    n_elements,
     size_t    type_size
@@ -565,7 +565,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  private_free_memory_1d(
+static  void  private_free_memory_1d(
     void   **ptr)
 {
     if( *ptr != NULL )
@@ -589,7 +589,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  private_free_memory_2d(
+static  void  private_free_memory_2d(
     void   ***ptr)
 {
     private_free_memory_1d( *ptr );
@@ -609,7 +609,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  private_free_memory_3d(
+static  void  private_free_memory_3d(
     void   ****ptr)
 {
     private_free_memory_1d( **ptr );
@@ -629,7 +629,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  private_free_memory_4d(
+static  void  private_free_memory_4d(
     void   *****ptr)
 {
     private_free_memory_1d( ***ptr );
@@ -649,7 +649,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  private_free_memory_5d(
+static  void  private_free_memory_5d(
     void   ******ptr)
 {
     private_free_memory_1d( ****ptr );
@@ -671,7 +671,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  free_memory_1d(
+VIOAPI  void  free_memory_1d(
     void   **ptr
     _ALLOC_SOURCE_LINE_ARG_DEF )
 {
@@ -696,7 +696,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  free_memory_2d(
+VIOAPI  void  free_memory_2d(
     void   ***ptr
     _ALLOC_SOURCE_LINE_ARG_DEF )
 {
@@ -722,7 +722,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  free_memory_3d(
+VIOAPI  void  free_memory_3d(
     void   ****ptr
     _ALLOC_SOURCE_LINE_ARG_DEF )
 {
@@ -749,7 +749,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  free_memory_4d(
+VIOAPI  void  free_memory_4d(
     void   *****ptr
     _ALLOC_SOURCE_LINE_ARG_DEF )
 {
@@ -777,7 +777,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  free_memory_5d(
+VIOAPI  void  free_memory_5d(
     void   ******ptr
     _ALLOC_SOURCE_LINE_ARG_DEF )
 {
--- a/volume_io/Prog_utils/alloc_check.c
+++ b/volume_io/Prog_utils/alloc_check.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/alloc_check.c,v 1.22 1998-02-20 14:59:34 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/alloc_check.c,v 1.23 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -61,11 +61,11 @@
     skip_entry   *update[MAX_SKIP_LEVELS];
 } update_struct;
 
-private  void     update_total_memory( alloc_struct *, size_t );
-private  int      get_random_level( void );
-private  void     output_entry( FILE *, skip_entry * );
-private  BOOLEAN  size_display_enabled( void );
-private  size_t   skip_alloc_size = 0;
+static  void     update_total_memory( alloc_struct *, size_t );
+static  int      get_random_level( void );
+static  void     output_entry( FILE *, skip_entry * );
+static  BOOLEAN  size_display_enabled( void );
+static  size_t   skip_alloc_size = 0;
 
 typedef  void      *alloc_ptr;
 
@@ -86,7 +86,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private   void  initialize_alloc_list(
+static   void  initialize_alloc_list(
     alloc_struct  *alloc_list )
 {
     int   i;
@@ -116,7 +116,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  check_initialized_alloc_list(
+static  void  check_initialized_alloc_list(
     alloc_struct  *alloc_list )
 {
     static   BOOLEAN  first = TRUE;
@@ -143,7 +143,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  BOOLEAN  find_pointer_position(
+static  BOOLEAN  find_pointer_position(
     alloc_struct    *alloc_list,
     void            *ptr,
     update_struct   *update )
@@ -189,7 +189,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private   void  insert_ptr_in_alloc_list(
+static   void  insert_ptr_in_alloc_list(
     alloc_struct   *alloc_list,
     update_struct  *update,
     void           *ptr,
@@ -245,7 +245,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  BOOLEAN  check_overlap(
+static  BOOLEAN  check_overlap(
     alloc_struct       *alloc_list,
     update_struct      *update,
     void               *ptr,
@@ -292,7 +292,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private   BOOLEAN  remove_ptr_from_alloc_list(
+static   BOOLEAN  remove_ptr_from_alloc_list(
     alloc_struct   *alloc_list,
     void           *ptr,
     STRING         *source_file,
@@ -352,7 +352,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Real  get_random_0_to_1( void )
+static  Real  get_random_0_to_1( void )
 {
     return( (Real) rand() );
 }
@@ -371,7 +371,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  int  get_random_level( void )
+static  int  get_random_level( void )
 {
     int    level;
 
@@ -397,7 +397,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  BOOLEAN  memory_still_alloced(
+static  BOOLEAN  memory_still_alloced(
     alloc_struct  *alloc_list )
 {
     return( alloc_list->header->forward[0] != (skip_entry *) NULL );
@@ -417,7 +417,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  output_alloc_list(
+static  void  output_alloc_list(
     FILE          *file,
     alloc_struct  *alloc_list )
 {
@@ -446,7 +446,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  update_total_memory(
+static  void  update_total_memory(
     alloc_struct  *alloc_list,
     size_t        n_bytes )
 {
@@ -479,7 +479,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  print_source_location(
+static  void  print_source_location(
     STRING   source_file,
     int      line_number,
     int      sequence_number )
@@ -502,7 +502,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  output_entry(
+static  void  output_entry(
     FILE          *file,
     skip_entry    *entry )
 {
@@ -518,7 +518,7 @@
 --------------------------------------------------------------------------
 */
 
-private   alloc_struct   alloc_list;
+static   alloc_struct   alloc_list;
 
 /* ----------------------------- MNI Header -----------------------------------
 @NAME       : get_total_memory_alloced
@@ -534,7 +534,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  size_t  get_total_memory_alloced( void )
+VIOAPI  size_t  get_total_memory_alloced( void )
 {
     return( alloc_list.total_memory_allocated );
 }
@@ -556,7 +556,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  alloc_checking_enabled( void )
+VIOAPI  BOOLEAN  alloc_checking_enabled( void )
 {
 #ifdef NO_DEBUG_ALLOC
     return( FALSE );
@@ -570,7 +570,7 @@
 #endif
 }
 
-public  void  set_alloc_checking( BOOLEAN state )
+VIOAPI  void  set_alloc_checking( BOOLEAN state )
 {
     enabled_initialized = TRUE;
     checking_enabled = state;
@@ -590,7 +590,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  BOOLEAN  size_display_enabled( void )
+static  BOOLEAN  size_display_enabled( void )
 {
 #ifdef NO_DEBUG_ALLOC
     return( FALSE );
@@ -625,7 +625,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  int  get_stop_sequence_number( void )
+static  int  get_stop_sequence_number( void )
 {
     static   int   first = TRUE;
     static   int   stop_sequence_number = -1;
@@ -658,7 +658,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  int  get_current_sequence_number( void )
+static  int  get_current_sequence_number( void )
 {
     static   int  current_sequence_number = 0;
 
@@ -686,7 +686,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  record_ptr_alloc_check(
+VIOAPI  void  record_ptr_alloc_check(
     void      *ptr,
     size_t    n_bytes,
     STRING    source_file,
@@ -754,7 +754,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  change_ptr_alloc_check(
+VIOAPI  void  change_ptr_alloc_check(
     void      *old_ptr,
     void      *new_ptr,
     size_t    n_bytes,
@@ -824,7 +824,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  unrecord_ptr_alloc_check(
+VIOAPI  BOOLEAN  unrecord_ptr_alloc_check(
     void     *ptr,
     STRING   source_file,
     int      line_number )
@@ -875,7 +875,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  output_alloc_to_file(
+VIOAPI  void  output_alloc_to_file(
     STRING   filename )
 {
     FILE     *file;
@@ -922,7 +922,7 @@
 
 #ifndef  NO_DEBUG_ALLOC
 
-public  void  print_alloc_source_line(
+VIOAPI  void  print_alloc_source_line(
     STRING  filename,
     int     line_number )
 {
--- a/volume_io/Prog_utils/arrays.c
+++ b/volume_io/Prog_utils/arrays.c
@@ -13,7 +13,7 @@
 ---------------------------------------------------------------------------- */
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/arrays.c,v 1.3 1996-05-17 19:36:17 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/arrays.c,v 1.4 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #include  <internal_volume_io.h>
@@ -38,7 +38,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_array_size(
+VIOAPI  void  set_array_size(
     void      **array,
     size_t    type_size,
     size_t    previous_n_elems,
--- a/volume_io/Prog_utils/files.c
+++ b/volume_io/Prog_utils/files.c
@@ -17,18 +17,20 @@
 #include  <pwd.h>
 #endif /* HAVE_PWD_H */
 #include  <stdlib.h>
+#if HAVE_UNISTD_H
 #include  <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include  <errno.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/files.c,v 1.39 2004-03-23 21:17:40 bert Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/files.c,v 1.40 2004-10-04 20:23:52 bert Exp $";
 #endif
 
-private  BOOLEAN  has_no_extension( STRING );
-private  STRING   compressed_endings[] = { ".z", ".Z", ".gz" };
+static  BOOLEAN  has_no_extension( STRING );
+static  STRING   compressed_endings[] = { ".z", ".Z", ".gz" };
 
 #if !HAVE_STRERROR
-private char *strerror(int errnum)
+static char *strerror(int errnum)
 {
     extern int  sys_nerr;
     extern char *sys_errlist[];
@@ -56,7 +58,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  print_system_error( void )
+static  void  print_system_error( void )
 {
     char   *error;
 
@@ -78,7 +80,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  real_is_double( void )
+VIOAPI  BOOLEAN  real_is_double( void )
 {
     static  const  size_t  constant_8 = sizeof(double);
     return( sizeof(Real) == constant_8 );
@@ -97,7 +99,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  file_exists(
+VIOAPI  BOOLEAN  file_exists(
     STRING        filename )
 {
     BOOLEAN  exists;
@@ -134,7 +136,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  file_directory_exists(
+VIOAPI  BOOLEAN  file_directory_exists(
     STRING        filename )
 {
     BOOLEAN  exists;
@@ -166,7 +168,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  check_clobber_file(
+VIOAPI  BOOLEAN  check_clobber_file(
     STRING   filename )
 {
     char     ch;
@@ -215,7 +217,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  check_clobber_file_default_suffix(
+VIOAPI  BOOLEAN  check_clobber_file_default_suffix(
     STRING   filename,
     STRING   default_suffix )
 {
@@ -252,7 +254,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  STRING  create_backup_filename(
+static  STRING  create_backup_filename(
     STRING   filename )
 {
     int      i, len, count;
@@ -321,7 +323,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  make_backup_file(
+VIOAPI  Status  make_backup_file(
     STRING   filename,
     STRING   *backup_filename )
 {
@@ -364,7 +366,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  cleanup_backup_file(
+VIOAPI  void  cleanup_backup_file(
     STRING   filename,
     STRING   backup_filename,
     Status   status_of_write )
@@ -405,7 +407,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  remove_file(
+VIOAPI  void  remove_file(
     STRING  filename )
 {
     STRING   expanded;
@@ -435,7 +437,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  copy_file(
+VIOAPI  Status  copy_file(
     STRING  src,
     STRING  dest )
 {
@@ -480,7 +482,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  move_file(
+VIOAPI  Status  move_file(
     STRING  src,
     STRING  dest )
 {
@@ -524,7 +526,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  STRING  get_user_home_directory(
+static  STRING  get_user_home_directory(
     STRING   user_name )
 {
 #if HAVE_GETPWNAM
@@ -560,7 +562,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  expand_filename(
+VIOAPI  STRING  expand_filename(
     STRING  filename )
 {
     int      i, new_i, dest, len, env_index;
@@ -691,7 +693,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  filename_extension_matches(
+VIOAPI  BOOLEAN  filename_extension_matches(
     STRING   filename,
     STRING   extension )
 {
@@ -737,7 +739,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  remove_directories_from_filename(
+VIOAPI  STRING  remove_directories_from_filename(
     STRING  filename )
 {
     STRING   expanded, no_directories;
@@ -773,7 +775,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  file_exists_as_compressed(
+VIOAPI  BOOLEAN  file_exists_as_compressed(
     STRING       filename,
     STRING       *compressed_filename )
 {
@@ -809,7 +811,7 @@
     return( gzipped );
 }
 
-public  STRING  get_temporary_filename( void )
+VIOAPI  STRING  get_temporary_filename( void )
 {
     return micreate_tempfile();
 }
@@ -829,7 +831,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  open_file(
+VIOAPI  Status  open_file(
     STRING             filename,
     IO_types           io_type,
     File_formats       file_format,
@@ -965,7 +967,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  open_file_with_default_suffix(
+VIOAPI  Status  open_file_with_default_suffix(
     STRING             filename,
     STRING             default_suffix,
     IO_types           io_type,
@@ -1026,7 +1028,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  BOOLEAN  has_no_extension(
+static  BOOLEAN  has_no_extension(
     STRING   filename )
 {
     STRING   base_name;
@@ -1055,7 +1057,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  set_file_position(
+VIOAPI  Status  set_file_position(
     FILE     *file,
     long     byte_position )
 {
@@ -1088,7 +1090,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  close_file(
+VIOAPI  Status  close_file(
     FILE     *file )
 {
     if( file != NULL )
@@ -1114,7 +1116,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  extract_directory(
+VIOAPI  STRING  extract_directory(
     STRING    filename )
 {
     int     i, slash_index;
@@ -1162,7 +1164,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  get_absolute_filename(
+VIOAPI  STRING  get_absolute_filename(
     STRING    filename,
     STRING    directory )
 {
@@ -1205,7 +1207,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  flush_file(
+VIOAPI  Status  flush_file(
     FILE     *file )
 {
     Status   status;
@@ -1237,7 +1239,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_character(
+VIOAPI  Status  input_character(
     FILE  *file,
     char   *ch )
 {
@@ -1272,7 +1274,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  unget_character(
+VIOAPI  Status  unget_character(
     FILE  *file,
     char  ch )
 {
@@ -1302,7 +1304,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_nonwhite_character(
+VIOAPI  Status  input_nonwhite_character(
     FILE   *file,
     char   *ch )
 {
@@ -1331,7 +1333,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_character(
+VIOAPI  Status  output_character(
     FILE   *file,
     char   ch )
 {
@@ -1364,7 +1366,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status   skip_input_until(
+VIOAPI  Status   skip_input_until(
     FILE   *file,
     char   search_char )
 {
@@ -1396,7 +1398,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_string(
+VIOAPI  Status  output_string(
     FILE    *file,
     STRING  str )
 {
@@ -1429,7 +1431,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_string(
+VIOAPI  Status  input_string(
     FILE    *file,
     STRING  *str,
     char    termination_char )
@@ -1475,7 +1477,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_quoted_string(
+VIOAPI  Status  input_quoted_string(
     FILE            *file,
     STRING          *str )
 {
@@ -1526,7 +1528,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_possibly_quoted_string(
+VIOAPI  Status  input_possibly_quoted_string(
     FILE            *file,
     STRING          *str )
 {
@@ -1587,7 +1589,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_quoted_string(
+VIOAPI  Status  output_quoted_string(
     FILE            *file,
     STRING          str )
 {
@@ -1616,7 +1618,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_binary_data(
+VIOAPI  Status  input_binary_data(
     FILE            *file,
     void            *data,
     size_t          element_size,
@@ -1656,7 +1658,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_binary_data(
+VIOAPI  Status  output_binary_data(
     FILE            *file,
     void            *data,
     size_t          element_size,
@@ -1693,7 +1695,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_newline(
+VIOAPI  Status  input_newline(
     FILE            *file )
 {
     Status   status;
@@ -1723,7 +1725,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_newline(
+VIOAPI  Status  output_newline(
     FILE            *file )
 {
     Status   status;
@@ -1754,7 +1756,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_line(
+VIOAPI  Status  input_line(
     FILE    *file,
     STRING  *line )
 {
@@ -1794,7 +1796,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_boolean(
+VIOAPI  Status  input_boolean(
     FILE            *file,
     BOOLEAN         *b )
 {
@@ -1830,7 +1832,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_boolean(
+VIOAPI  Status  output_boolean(
     FILE            *file,
     BOOLEAN         b )
 {
@@ -1867,7 +1869,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_short(
+VIOAPI  Status  input_short(
     FILE            *file,
     short           *s )
 {
@@ -1895,7 +1897,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_short(
+VIOAPI  Status  output_short(
     FILE            *file,
     short           s )
 {
@@ -1926,7 +1928,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_unsigned_short(
+VIOAPI  Status  input_unsigned_short(
     FILE            *file,
     unsigned short  *s )
 {
@@ -1958,7 +1960,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_unsigned_short(
+VIOAPI  Status  output_unsigned_short(
     FILE            *file,
     unsigned short  s )
 {
@@ -1989,7 +1991,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_int(
+VIOAPI  Status  input_int(
     FILE  *file,
     int   *i )
 {
@@ -2017,7 +2019,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_int(
+VIOAPI  Status  output_int(
     FILE            *file,
     int             i )
 {
@@ -2048,7 +2050,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_real(
+VIOAPI  Status  input_real(
     FILE            *file,
     Real            *r )
 {
@@ -2080,7 +2082,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_real(
+VIOAPI  Status  output_real(
     FILE            *file,
     Real            r )
 {
@@ -2111,7 +2113,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_float(
+VIOAPI  Status  input_float(
     FILE            *file,
     float           *f )
 {
@@ -2141,7 +2143,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_float(
+VIOAPI  Status  output_float(
     FILE            *file,
     float           f )
 {
@@ -2172,7 +2174,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_double(
+VIOAPI  Status  input_double(
     FILE            *file,
     double          *d )
 {
@@ -2202,7 +2204,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_double(
+VIOAPI  Status  output_double(
     FILE            *file,
     double          d )
 {
@@ -2237,7 +2239,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_binary_data(
+VIOAPI  Status  io_binary_data(
     FILE            *file,
     IO_types        io_flag,
     void            *data,
@@ -2269,7 +2271,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_newline(
+VIOAPI  Status  io_newline(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format )
@@ -2306,7 +2308,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_quoted_string(
+VIOAPI  Status  io_quoted_string(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2365,7 +2367,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_boolean(
+VIOAPI  Status  io_boolean(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2404,7 +2406,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_short(
+VIOAPI  Status  io_short(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2444,7 +2446,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_unsigned_short(
+VIOAPI  Status  io_unsigned_short(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2484,7 +2486,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_unsigned_char(
+VIOAPI  Status  io_unsigned_char(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2540,7 +2542,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_int(
+VIOAPI  Status  io_int(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2579,7 +2581,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_real(
+VIOAPI  Status  io_real(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2618,7 +2620,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_float(
+VIOAPI  Status  io_float(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2657,7 +2659,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_double(
+VIOAPI  Status  io_double(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2697,7 +2699,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_ints(
+VIOAPI  Status  io_ints(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
@@ -2757,7 +2759,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  io_unsigned_chars(
+VIOAPI  Status  io_unsigned_chars(
     FILE            *file,
     IO_types        io_flag,
     File_formats    format,
--- a/volume_io/Prog_utils/print.c
+++ b/volume_io/Prog_utils/print.c
@@ -16,18 +16,18 @@
 #include  <stdarg.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/print.c,v 1.12 1996-05-17 19:36:16 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/print.c,v 1.13 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #define  MAX_PRINT_STACK  100
 
 typedef  void (*print_function_type) ( STRING );
 
-private  print_function_type  print_function[MAX_PRINT_STACK] = { NULL };
-private  int                  top_of_stack = 0;
+static  print_function_type  print_function[MAX_PRINT_STACK] = { NULL };
+static  int                  top_of_stack = 0;
 
-private  print_function_type  print_error_function[MAX_PRINT_STACK] = { NULL };
-private  int                  top_of_error_stack = 0;
+static  print_function_type  print_error_function[MAX_PRINT_STACK] = { NULL };
+static  int                  top_of_error_stack = 0;
 
 /* ----------------------------- MNI Header -----------------------------------
 @NAME       : set_print_function
@@ -46,7 +46,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_print_function( void  (*function) ( STRING ) )
+VIOAPI  void  set_print_function( void  (*function) ( STRING ) )
 {
     print_function[top_of_stack] = function;
 }
@@ -65,7 +65,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  push_print_function( void )
+VIOAPI  void  push_print_function( void )
 {
     if( top_of_stack < MAX_PRINT_STACK - 1 )
     {
@@ -89,7 +89,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  pop_print_function( void )
+VIOAPI  void  pop_print_function( void )
 {
     if( top_of_stack > 0 )
         --top_of_stack;
@@ -113,7 +113,7 @@
 ---------------------------------------------------------------------------- */
 
 /* VARARGS */
-public  void  print( STRING format, ... )
+VIOAPI  void  print( STRING format, ... )
 {
     va_list  ap;
     char     print_buffer[EXTREMELY_LARGE_STRING_SIZE];
@@ -145,7 +145,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_print_error_function( void  (*function) ( char [] ) )
+VIOAPI  void  set_print_error_function( void  (*function) ( char [] ) )
 {
     print_error_function[top_of_error_stack] = function;
 }
@@ -164,7 +164,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  push_print_error_function( void )
+VIOAPI  void  push_print_error_function( void )
 {
     if( top_of_error_stack < MAX_PRINT_STACK - 1 )
     {
@@ -188,7 +188,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  pop_print_error_function( void )
+VIOAPI  void  pop_print_error_function( void )
 {
     if( top_of_error_stack > 0 )
         --top_of_error_stack;
@@ -212,7 +212,7 @@
 ---------------------------------------------------------------------------- */
 
 /* VARARGS */
-public  void  print_error( char format[], ... )
+VIOAPI  void  print_error( char format[], ... )
 {
     va_list  ap;
     char     print_buffer[EXTREMELY_LARGE_STRING_SIZE];
@@ -241,7 +241,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void   handle_internal_error( char  str[] )
+VIOAPI  void   handle_internal_error( char  str[] )
 {
     print_error( "Internal error:  %s\n", str );
     abort_if_allowed();
@@ -260,7 +260,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  abort_if_allowed( void )
+VIOAPI  void  abort_if_allowed( void )
 {
     char  ch;
 
--- a/volume_io/Prog_utils/progress.c
+++ b/volume_io/Prog_utils/progress.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/progress.c,v 1.9 1996-05-17 19:36:17 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/progress.c,v 1.10 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #define  FIRST_MESSAGE_THRESHOLD   5.0
@@ -32,11 +32,11 @@
 #define  DOUBLE_THRESHOLD          0.01
 #define  HALF_THRESHOLD            0.5
 
-private  void  show_one_line_progress(
+static  void  show_one_line_progress(
     progress_struct    *progress,
     int                current_step );
 
-private  void  show_multi_line_progress(
+static  void  show_multi_line_progress(
     progress_struct    *progress,
     int                current_step,
     Real               time_so_far,
@@ -62,7 +62,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  initialize_progress_report(
+VIOAPI  void  initialize_progress_report(
     progress_struct   *progress,
     BOOLEAN           one_line_only,
     int               n_steps,
@@ -105,7 +105,7 @@
                                              to time so far
 ---------------------------------------------------------------------------- */
 
-public  void  update_progress_report(
+VIOAPI  void  update_progress_report(
     progress_struct   *progress,
     int               current_step )
 {
@@ -197,7 +197,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  show_one_line_progress(
+static  void  show_one_line_progress(
     progress_struct    *progress,
     int                current_step )
 {
@@ -243,7 +243,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  show_multi_line_progress(
+static  void  show_multi_line_progress(
     progress_struct    *progress,
     int                current_step,
     Real               time_so_far,
@@ -281,7 +281,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  terminate_progress_report(
+VIOAPI  void  terminate_progress_report(
     progress_struct   *progress )
 {
     Real    total_time;
--- a/volume_io/Prog_utils/string.c
+++ b/volume_io/Prog_utils/string.c
@@ -15,12 +15,12 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/string.c,v 1.9 1995-11-10 20:23:11 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/string.c,v 1.10 2004-10-04 20:23:52 bert Exp $";
 #endif
 
-private  const  STRING  empty_string = "";
+static const  STRING  empty_string = "";
 
-public  STRING  alloc_string(
+VIOAPI  STRING  alloc_string(
     int   length )
 {
     STRING   str;
@@ -30,7 +30,7 @@
     return( str );
 }
 
-public  STRING  create_string(
+VIOAPI  STRING  create_string(
     STRING    initial )
 {
     STRING   str;
@@ -45,14 +45,14 @@
     return( str );
 }
 
-public  void  delete_string(
+VIOAPI  void  delete_string(
     STRING   string )
 {
     if( string != NULL )
         FREE( string );
 }
 
-public  STRING  concat_strings(
+VIOAPI  STRING  concat_strings(
     STRING   str1,
     STRING   str2 )
 {
@@ -72,7 +72,7 @@
     return( str );
 }
 
-public  void  replace_string(
+VIOAPI  void  replace_string(
     STRING   *string,
     STRING   new_string )
 {
@@ -80,7 +80,7 @@
     *string = new_string;
 }
 
-public  void  concat_char_to_string(
+VIOAPI  void  concat_char_to_string(
     STRING   *string,
     char     ch )
 {
@@ -97,7 +97,7 @@
     (*string)[len+1] = END_OF_STRING;
 }
 
-public  void  concat_to_string(
+VIOAPI  void  concat_to_string(
     STRING   *string,
     STRING   str2 )
 {
@@ -107,7 +107,7 @@
     replace_string( string, new_string );
 }
 
-public  int  string_length(
+VIOAPI  int  string_length(
     STRING   string )
 {
     if( string == NULL )
@@ -116,7 +116,7 @@
         return( (int) strlen( string ) );
 }
 
-public  BOOLEAN  equal_strings(
+VIOAPI  BOOLEAN  equal_strings(
     STRING   str1,
     STRING   str2 )
 {
@@ -128,19 +128,19 @@
     return( strcmp( str1, str2 ) == 0 );
 }
 
-public  BOOLEAN  is_lower_case(
+VIOAPI  BOOLEAN  is_lower_case(
     char  ch )
 {
     return( ch >= 'a' && ch <= 'z' );
 }
 
-public  BOOLEAN  is_upper_case(
+VIOAPI  BOOLEAN  is_upper_case(
     char  ch )
 {
     return( ch >= 'A' && ch <= 'Z' );
 }
 
-public  char  get_lower_case(
+VIOAPI  char  get_lower_case(
     char   ch )
 {
     if( is_upper_case( ch ) )
@@ -149,7 +149,7 @@
         return( ch );
 }
 
-public  char  get_upper_case(
+VIOAPI  char  get_upper_case(
     char   ch )
 {
     if( is_lower_case( ch ) )
@@ -173,7 +173,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  string_ends_in(
+VIOAPI  BOOLEAN  string_ends_in(
     STRING   string,
     STRING   ending )
 {
@@ -206,7 +206,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public    STRING   strip_outer_blanks(
+VIOAPI    STRING   strip_outer_blanks(
     STRING  str )
 {
     STRING  stripped;
@@ -259,7 +259,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  find_character(
+VIOAPI  int  find_character(
     STRING    string,
     char      ch )
 {
@@ -292,7 +292,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  make_string_upper_case(
+VIOAPI  void  make_string_upper_case(
     STRING    string )
 {
     int   i, len;
@@ -319,7 +319,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  blank_string(
+VIOAPI  BOOLEAN  blank_string(
     STRING   string )
 {
     int      i;
--- a/volume_io/Prog_utils/time.c
+++ b/volume_io/Prog_utils/time.c
@@ -12,7 +12,7 @@
               express or implied warranty.
 ---------------------------------------------------------------------------- */
 
-#include "config.h"
+#include  <internal_volume_io.h>
 
 #include  <sys/types.h>
 
@@ -26,11 +26,12 @@
 #  include <time.h>
 # endif
 #endif
+#if HAVE_UNISTD_H
 #include  <unistd.h>
-#include  <internal_volume_io.h>
+#endif
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/time.c,v 1.21 2004-03-23 21:36:33 bert Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/time.c,v 1.22 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -47,7 +48,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Real  get_clock_ticks_per_second( void )
+static Real  get_clock_ticks_per_second( void )
 {
     static  BOOLEAN  initialized = FALSE;
     static  Real     clock_ticks_per_second;
@@ -74,7 +75,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  current_cpu_seconds( void )
+VIOAPI Real  current_cpu_seconds( void )
 {
     static BOOLEAN first_call = TRUE;
     static clock_t first;
@@ -109,7 +110,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  current_realtime_seconds( void )
+VIOAPI  Real  current_realtime_seconds( void )
 {
     static BOOLEAN first_call = TRUE;
     static time_t first;
@@ -146,7 +147,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  format_time(
+VIOAPI  STRING  format_time(
     STRING   format,
     Real     seconds )
 {
@@ -198,7 +199,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  print_time(
+VIOAPI  void  print_time(
     STRING   format,
     Real     seconds )
 {
@@ -224,7 +225,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  get_clock_time( void )
+VIOAPI  STRING  get_clock_time( void )
 {
     time_t           clock_time;
     struct  tm       *time_tm;
@@ -252,7 +253,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  sleep_program( Real seconds )
+VIOAPI  void  sleep_program( Real seconds )
 {
 #if HAVE_SELECT
     struct  timeval  timeout;
@@ -279,7 +280,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  get_date( void )
+VIOAPI  STRING  get_date( void )
 {
     time_t           clock_time;
     struct  tm       *time_tm;
--- a/volume_io/Volumes/evaluate.c
+++ b/volume_io/Volumes/evaluate.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/evaluate.c,v 1.34 2001-11-08 14:44:23 neelin Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/evaluate.c,v 1.35 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -32,7 +32,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  convert_voxel_to_value(
+VIOAPI  Real  convert_voxel_to_value(
     Volume   volume,
     Real     voxel )
 {
@@ -57,7 +57,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  convert_value_to_voxel(
+VIOAPI  Real  convert_value_to_voxel(
     Volume   volume,
     Real     value )
 {
@@ -86,7 +86,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_volume_voxel_value(
+VIOAPI  Real  get_volume_voxel_value(
     Volume   volume,
     int      v0,
     int      v1,
@@ -119,7 +119,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_volume_real_value(
+VIOAPI  Real  get_volume_real_value(
     Volume   volume,
     int      v0,
     int      v1,
@@ -155,7 +155,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_voxel_value(
+VIOAPI  void  set_volume_voxel_value(
     Volume   volume,
     int      v0,
     int      v1,
@@ -186,7 +186,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_real_value(
+VIOAPI  void  set_volume_real_value(
     Volume   volume,
     int      v0,
     int      v1,
@@ -231,7 +231,7 @@
                                               done inside this procedure
 ---------------------------------------------------------------------------- */
 
-private  void    trilinear_interpolate(
+static void trilinear_interpolate(
     Volume   volume,
     Real     voxel[],
     Real     outside_value,
@@ -375,7 +375,7 @@
 
 #define  MAX_DERIV_SIZE  100
 
-private  void   interpolate_volume(
+static void   interpolate_volume(
     int      n_dims,
     Real     parameters[],
     int      n_values,
@@ -506,7 +506,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void   extract_coefficients(
+static void   extract_coefficients(
     Volume         volume,
     int            start[],
     int            end[],
@@ -661,7 +661,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_interpolation_tolerance(
+VIOAPI  void  set_volume_interpolation_tolerance(
     Real   tolerance )
 {
     interpolation_tolerance = tolerance;
@@ -702,7 +702,7 @@
 
 #define MAX_COEF_SPACE   1000
 
-public  int   evaluate_volume(
+VIOAPI  int   evaluate_volume(
     Volume         volume,
     Real           voxel[],
     BOOLEAN        interpolating_dimensions[],
@@ -1027,7 +1027,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void   evaluate_volume_in_world(
+VIOAPI  void   evaluate_volume_in_world(
     Volume         volume,
     Real           x,
     Real           y,
--- a/volume_io/Volumes/get_hyperslab.c
+++ b/volume_io/Volumes/get_hyperslab.c
@@ -15,10 +15,10 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/get_hyperslab.c,v 1.9 2001-04-17 18:40:29 neelin Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/get_hyperslab.c,v 1.10 2004-10-04 20:23:52 bert Exp $";
 #endif
 
-public  void  convert_voxels_to_values(
+VIOAPI  void  convert_voxels_to_values(
     Volume   volume,
     int      n_voxels,
     Real     voxels[],
@@ -44,7 +44,7 @@
         values[v] = scale * voxels[v] + trans;
 }
 
-public  void  get_volume_value_hyperslab(
+VIOAPI  void  get_volume_value_hyperslab(
     Volume   volume,
     int      v0,
     int      v1,
@@ -80,7 +80,7 @@
     }
 }
 
-public  void  get_volume_value_hyperslab_5d(
+VIOAPI  void  get_volume_value_hyperslab_5d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -100,7 +100,7 @@
     convert_voxels_to_values( volume, n0 * n1 * n2 * n3 * n4, values, values );
 }
 
-public  void  get_volume_value_hyperslab_4d(
+VIOAPI  void  get_volume_value_hyperslab_4d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -118,7 +118,7 @@
     convert_voxels_to_values( volume, n0 * n1 * n2 * n3, values, values );
 }
 
-public  void  get_volume_value_hyperslab_3d(
+VIOAPI  void  get_volume_value_hyperslab_3d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -133,7 +133,7 @@
     convert_voxels_to_values( volume, n0 * n1 * n2, values, values );
 }
 
-public  void  get_volume_value_hyperslab_2d(
+VIOAPI  void  get_volume_value_hyperslab_2d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -146,7 +146,7 @@
     convert_voxels_to_values( volume, n0 * n1, values, values );
 }
 
-public  void  get_volume_value_hyperslab_1d(
+VIOAPI  void  get_volume_value_hyperslab_1d(
     Volume   volume,
     int      v0,
     int      n0,
@@ -157,7 +157,7 @@
     convert_voxels_to_values( volume, n0, values, values );
 }
 
-private  void  slow_get_volume_voxel_hyperslab(
+static  void  slow_get_volume_voxel_hyperslab(
     Volume   volume,
     int      v0,
     int      v1,
@@ -198,9 +198,9 @@
     }
 }
 
-private  Real  *int_to_real_conversion = NULL;
+static  Real  *int_to_real_conversion = NULL;
 
-private  void  check_real_conversion_lookup( void )
+static  void  check_real_conversion_lookup( void )
 {
     Real   min_value1, max_value1, min_value2, max_value2;
     long   i, long_min, long_max;
@@ -226,7 +226,7 @@
         int_to_real_conversion[i] = (Real) i;
 }
 
-public  void  get_voxel_values_5d(
+VIOAPI  void  get_voxel_values_5d(
     Data_types  data_type,
     void        *void_ptr,
     int         steps[],
@@ -478,7 +478,7 @@
     }
 }
 
-public  void  get_voxel_values_4d(
+VIOAPI  void  get_voxel_values_4d(
     Data_types  data_type,
     void        *void_ptr,
     int         steps[],
@@ -693,7 +693,7 @@
     }
 }
 
-public  void  get_voxel_values_3d(
+VIOAPI  void  get_voxel_values_3d(
     Data_types  data_type,
     void        *void_ptr,
     int         steps[],
@@ -903,7 +903,7 @@
     }
 }
 
-public  void  get_voxel_values_2d(
+VIOAPI  void  get_voxel_values_2d(
     Data_types  data_type,
     void        *void_ptr,
     int         steps[],
@@ -1045,7 +1045,7 @@
     }
 }
 
-public  void  get_voxel_values_1d(
+VIOAPI  void  get_voxel_values_1d(
     Data_types  data_type,
     void        *void_ptr,
     int         step0,
@@ -1148,7 +1148,7 @@
     }
 }
 
-private  void  get_voxel_values(
+static  void  get_voxel_values(
     Volume   volume,
     void     *void_ptr,
     int      n_dims,
@@ -1182,7 +1182,7 @@
     }
 }
 
-public  void  get_volume_voxel_hyperslab_5d(
+VIOAPI  void  get_volume_voxel_hyperslab_5d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -1259,7 +1259,7 @@
                       values );
 }
 
-public  void  get_volume_voxel_hyperslab_4d(
+VIOAPI  void  get_volume_voxel_hyperslab_4d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -1326,7 +1326,7 @@
                       values );
 }
 
-public  void  get_volume_voxel_hyperslab_3d(
+VIOAPI  void  get_volume_voxel_hyperslab_3d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -1383,7 +1383,7 @@
                       values );
 }
 
-public  void  get_volume_voxel_hyperslab_2d(
+VIOAPI  void  get_volume_voxel_hyperslab_2d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -1430,7 +1430,7 @@
                       values );
 }
 
-public  void  get_volume_voxel_hyperslab_1d(
+VIOAPI  void  get_volume_voxel_hyperslab_1d(
     Volume   volume,
     int      v0,
     int      n0,
@@ -1466,7 +1466,7 @@
                       values );
 }
 
-public  void  get_volume_voxel_hyperslab(
+VIOAPI  void  get_volume_voxel_hyperslab(
     Volume   volume,
     int      v0,
     int      v1,
--- a/volume_io/Volumes/input_free.c
+++ b/volume_io/Volumes/input_free.c
@@ -16,14 +16,14 @@
 #include  <minc.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/input_free.c,v 1.28 1997-08-13 13:21:32 david Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/input_free.c,v 1.29 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #define  DEFAULT_SUFFIX  "fre"
 
 #define  NUM_BYTE_VALUES      256
 
-private  Status  input_slice(
+static  Status  input_slice(
     volume_input_struct   *volume_input );
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -40,7 +40,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald  - now uses volume starts
 ---------------------------------------------------------------------------- */
 
-public  Status  initialize_free_format_input(
+VIOAPI  Status  initialize_free_format_input(
     STRING               filename,
     Volume               volume,
     volume_input_struct  *volume_input )
@@ -357,7 +357,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  delete_free_format_input(
+VIOAPI  void  delete_free_format_input(
     volume_input_struct   *volume_input )
 {
     long   slice;
@@ -398,7 +398,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  input_slice(
+static  Status  input_slice(
     volume_input_struct   *volume_input )
 {
     Status           status;
@@ -475,7 +475,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  input_more_free_format_file(
+VIOAPI  BOOLEAN  input_more_free_format_file(
     Volume                volume,
     volume_input_struct   *volume_input,
     Real                  *fraction_done )
--- a/volume_io/Volumes/input_mnc.c
+++ b/volume_io/Volumes/input_mnc.c
@@ -16,7 +16,7 @@
 #include  <minc.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/input_mnc.c,v 1.65 2003-09-18 14:35:03 bert Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/input_mnc.c,v 1.66 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #define  INVALID_AXIS   -1
@@ -24,7 +24,7 @@
 #define  MIN_SLAB_SIZE    10000     /* at least 10000 entries per read */
 #define  MAX_SLAB_SIZE   400000     /* no more than 200 K at a time */
 
-private  BOOLEAN  match_dimension_names(
+static  BOOLEAN  match_dimension_names(
     int               n_volume_dims,
     STRING            volume_dimension_names[],
     int               n_file_dims,
@@ -44,7 +44,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int   get_minc_file_n_dimensions(
+VIOAPI  int   get_minc_file_n_dimensions(
     STRING   filename )
 {
     int       cdfid, img_var, n_dims;
@@ -97,7 +97,7 @@
                                              store starts/steps/dircos
 ---------------------------------------------------------------------------- */
 
-public  Minc_file  initialize_minc_input_from_minc_id(
+VIOAPI  Minc_file  initialize_minc_input_from_minc_id(
     int                  minc_id,
     Volume               volume,
     minc_input_options   *options )
@@ -581,7 +581,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Minc_file  initialize_minc_input(
+VIOAPI  Minc_file  initialize_minc_input(
     STRING               filename,
     Volume               volume,
     minc_input_options   *options )
@@ -629,7 +629,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_n_input_volumes(
+VIOAPI  int  get_n_input_volumes(
     Minc_file  file )
 {
     return( file->n_volumes_in_file );
@@ -648,7 +648,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  close_minc_input(
+VIOAPI  Status  close_minc_input(
     Minc_file   file )
 {
     int  d;
@@ -693,7 +693,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_minc_hyperslab(
+VIOAPI  Status  input_minc_hyperslab(
     Minc_file        file,
     Data_types       data_type,
     int              n_array_dims,
@@ -881,7 +881,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  input_slab(
+static  void  input_slab(
     Minc_file   file,
     Volume      volume,
     int         to_volume[],
@@ -934,7 +934,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  input_more_minc_file(
+VIOAPI  BOOLEAN  input_more_minc_file(
     Minc_file   file,
     Real        *fraction_done )
 {
@@ -1046,7 +1046,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  advance_input_volume(
+VIOAPI  BOOLEAN  advance_input_volume(
     Minc_file   file )
 {
     int                 ind, c, axis;
@@ -1135,7 +1135,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  reset_input_volume(
+VIOAPI  void  reset_input_volume(
     Minc_file   file )
 {
     int   d;
@@ -1172,7 +1172,7 @@
                                                 to the volume
 ---------------------------------------------------------------------------- */
 
-private  BOOLEAN  match_dimension_names(
+static  BOOLEAN  match_dimension_names(
     int               n_volume_dims,
     STRING            volume_dimension_names[],
     int               n_file_dims,
@@ -1268,7 +1268,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_minc_file_id(
+VIOAPI  int  get_minc_file_id(
     Minc_file  file )
 {
     return( file->cdfid );
@@ -1287,7 +1287,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_default_minc_input_options(
+VIOAPI  void  set_default_minc_input_options(
     minc_input_options  *options )
 {
     static  int     default_rgba_indices[4] = { 0, 1, 2, 3 };
@@ -1315,7 +1315,7 @@
                                                 used to be min_valid
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_input_promote_invalid_to_zero_flag(
+VIOAPI  void  set_minc_input_promote_invalid_to_zero_flag(
     minc_input_options  *options,
     BOOLEAN             flag )
 {
@@ -1337,7 +1337,7 @@
 @MODIFIED   : Oct. 25, 1996   D. MacDonald    - replaced with above function
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_input_promote_invalid_to_min_flag(
+VIOAPI  void  set_minc_input_promote_invalid_to_min_flag(
     minc_input_options  *options,
     BOOLEAN             flag )
 {
@@ -1357,7 +1357,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_input_vector_to_scalar_flag(
+VIOAPI  void  set_minc_input_vector_to_scalar_flag(
     minc_input_options  *options,
     BOOLEAN             flag )
 {
@@ -1379,7 +1379,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_input_vector_to_colour_flag(
+VIOAPI  void  set_minc_input_vector_to_colour_flag(
     minc_input_options  *options,
     BOOLEAN             flag )
 {
@@ -1400,7 +1400,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_input_colour_dimension_size(
+VIOAPI  void  set_minc_input_colour_dimension_size(
     minc_input_options  *options,
     int                 size )
 {
@@ -1427,7 +1427,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_input_colour_max_dimension_size(
+VIOAPI  void  set_minc_input_colour_max_dimension_size(
     minc_input_options  *options,
     int                 size )
 {
@@ -1454,7 +1454,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_input_colour_indices(
+VIOAPI  void  set_minc_input_colour_indices(
     minc_input_options  *options,
     int                 indices[4] )
 {
@@ -1481,7 +1481,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_input_user_real_range(
+VIOAPI  void  set_minc_input_user_real_range(
     minc_input_options  *options,
     double              minimum,
     double              maximum )
--- a/volume_io/Volumes/input_volume.c
+++ b/volume_io/Volumes/input_volume.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/input_volume.c,v 1.41 2000-10-23 19:04:24 neelin Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/input_volume.c,v 1.42 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #include  <minc.h>
@@ -40,7 +40,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  start_volume_input(
+VIOAPI  Status  start_volume_input(
     STRING               filename,
     int                  n_dimensions,
     STRING               dim_names[],
@@ -131,7 +131,7 @@
 @MODIFIED   :
 ---------------------------------------------------------------------------- */
 
-public  void  delete_volume_input(
+VIOAPI  void  delete_volume_input(
     volume_input_struct   *input_info )
 {
     switch( input_info->file_format )
@@ -159,7 +159,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  input_more_of_volume(
+VIOAPI  BOOLEAN  input_more_of_volume(
     Volume                volume,
     volume_input_struct   *input_info,
     Real                  *fraction_done )
@@ -194,7 +194,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  cancel_volume_input(
+VIOAPI  void  cancel_volume_input(
     Volume                volume,
     volume_input_struct   *input_info )
 {
@@ -215,7 +215,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  input_volume(
+VIOAPI  Status  input_volume(
     STRING               filename,
     int                  n_dimensions,
     STRING               dim_names[],
@@ -271,7 +271,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Minc_file   get_volume_input_minc_file(
+VIOAPI  Minc_file   get_volume_input_minc_file(
     volume_input_struct   *volume_input )
 {
     return( volume_input->minc_file );
--- a/volume_io/Volumes/multidim_arrays.c
+++ b/volume_io/Volumes/multidim_arrays.c
@@ -17,7 +17,7 @@
 #include  <float.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/multidim_arrays.c,v 1.15 2001-04-17 18:40:30 neelin Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/multidim_arrays.c,v 1.16 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -34,7 +34,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public   void   create_empty_multidim_array(
+VIOAPI   void   create_empty_multidim_array(
     multidim_array  *array,
     int             n_dimensions,
     Data_types      data_type )
@@ -64,7 +64,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Data_types  get_multidim_data_type(
+VIOAPI  Data_types  get_multidim_data_type(
     multidim_array       *array )
 {
     return( array->data_type );
@@ -84,7 +84,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_multidim_data_type(
+VIOAPI  void  set_multidim_data_type(
     multidim_array       *array,
     Data_types           data_type )
 {
@@ -104,7 +104,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_type_size(
+VIOAPI  int  get_type_size(
     Data_types   type )
 {
     int   size;
@@ -124,7 +124,7 @@
     return( size );
 }
 
-public  void  get_type_range(
+VIOAPI  void  get_type_range(
     Data_types   type,
     Real         *min_value,
     Real         *max_value )
@@ -172,7 +172,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_multidim_sizes(
+VIOAPI  void  set_multidim_sizes(
     multidim_array   *array,
     int              sizes[] )
 {
@@ -195,7 +195,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_multidim_sizes(
+VIOAPI  void  get_multidim_sizes(
     multidim_array   *array,
     int              sizes[] )
 {
@@ -218,7 +218,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  multidim_array_is_alloced(
+VIOAPI  BOOLEAN  multidim_array_is_alloced(
     multidim_array   *array )
 {
     return( array->data != NULL );
@@ -237,7 +237,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  alloc_multidim_array(
+VIOAPI  void  alloc_multidim_array(
     multidim_array   *array )
 {
     int     dim;
@@ -306,7 +306,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public   void   create_multidim_array(
+VIOAPI   void   create_multidim_array(
     multidim_array  *array,
     int             n_dimensions,
     int             sizes[],
@@ -330,7 +330,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  delete_multidim_array(
+VIOAPI  void  delete_multidim_array(
     multidim_array   *array )
 {
     if( array->data == NULL )
@@ -369,7 +369,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_multidim_n_dimensions(
+VIOAPI  int  get_multidim_n_dimensions(
     multidim_array   *array )
 {
     return( array->n_dimensions );
@@ -401,7 +401,7 @@
 @MODIFIED   : Feb. 27, 1996   D. MacDonald  - made more efficient
 ---------------------------------------------------------------------------- */
 
-public  void  copy_multidim_data_reordered(
+VIOAPI  void  copy_multidim_data_reordered(
     int                 type_size,
     void                *void_dest_ptr,
     int                 n_dest_dims,
@@ -593,7 +593,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  copy_multidim_reordered(
+VIOAPI  void  copy_multidim_reordered(
     multidim_array      *dest,
     int                 dest_ind[],
     multidim_array      *src,
--- a/volume_io/Volumes/output_mnc.c
+++ b/volume_io/Volumes/output_mnc.c
@@ -16,7 +16,7 @@
 #include  <minc.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/output_mnc.c,v 1.59 2001-09-18 15:33:17 neelin Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/output_mnc.c,v 1.60 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #define  INVALID_AXIS   -1
@@ -26,7 +26,7 @@
 
 #define  UNITS           "mm"
 
-private  Status  get_dimension_ordering(
+static  Status  get_dimension_ordering(
     int          n_vol_dims,
     STRING       vol_dim_names[],
     int          n_file_dims,
@@ -49,7 +49,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  BOOLEAN  is_default_direction_cosine(
+static  BOOLEAN  is_default_direction_cosine(
     int        axis,
     double     dir_cosines[] )
 {
@@ -88,7 +88,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - added use_volume_starts_and_steps
 ---------------------------------------------------------------------------- */
 
-private  Status  output_world_transform(
+static  Status  output_world_transform(
     Minc_file              file,
     STRING                 space_type,
     General_transform      *voxel_to_world_transform,
@@ -222,7 +222,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private void create_image_variable(Minc_file file)
+static void create_image_variable(Minc_file file)
 {
     int old_ncopts;
 
@@ -285,7 +285,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private Status end_file_def(Minc_file file)
+static Status end_file_def(Minc_file file)
 {
    int ret;
 
@@ -328,7 +328,7 @@
                                               found by peter
 ---------------------------------------------------------------------------- */
 
-public  Minc_file  initialize_minc_output(
+VIOAPI  Minc_file  initialize_minc_output(
     STRING                 filename,
     int                    n_dimensions,
     STRING                 dim_names[],
@@ -558,7 +558,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  copy_auxiliary_data_from_minc_file(
+VIOAPI  Status  copy_auxiliary_data_from_minc_file(
     Minc_file   file,
     STRING      filename,
     STRING      history_string )
@@ -610,7 +610,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  copy_auxiliary_data_from_open_minc_file(
+VIOAPI  Status  copy_auxiliary_data_from_open_minc_file(
     Minc_file   file,
     int         src_cdfid,
     STRING      history_string )
@@ -733,7 +733,7 @@
                                            concating to non-existent history
 ---------------------------------------------------------------------------- */
 
-public  Status  add_minc_history(
+VIOAPI  Status  add_minc_history(
     Minc_file   file,
     STRING      history_string )
 {
@@ -807,7 +807,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  get_dimension_ordering(
+static  Status  get_dimension_ordering(
     int          n_vol_dims,
     STRING       vol_dim_names[],
     int          n_file_dims,
@@ -866,7 +866,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  check_minc_output_variables(
+static  Status  check_minc_output_variables(
     Minc_file   file )
 {
     int               d, axis;
@@ -975,7 +975,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  set_minc_output_random_order(
+VIOAPI  Status  set_minc_output_random_order(
     Minc_file   file )
 {
     Status  status;
@@ -1007,7 +1007,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_minc_hyperslab(
+VIOAPI  Status  output_minc_hyperslab(
     Minc_file           file,
     Data_types          data_type,
     int                 n_array_dims,
@@ -1144,7 +1144,7 @@
 @MODIFIED   : Sep  1, 1995    D. MacDonald - added cached volumes.
 ---------------------------------------------------------------------------- */
 
-private  void  output_slab(
+static  void  output_slab(
     Minc_file   file,
     Volume      volume,
     int         to_volume[],
@@ -1281,7 +1281,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  output_the_volume(
+static  Status  output_the_volume(
     Minc_file   file,
     Volume      volume,
     int         volume_count[],
@@ -1532,7 +1532,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_volume_to_minc_file_position(
+VIOAPI  Status  output_volume_to_minc_file_position(
     Minc_file   file,
     Volume      volume,
     int         volume_count[],
@@ -1559,7 +1559,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_minc_volume(
+VIOAPI  Status  output_minc_volume(
     Minc_file   file )
 {
     int        d, volume_count[MAX_DIMENSIONS];
@@ -1629,7 +1629,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  close_minc_output(
+VIOAPI  Status  close_minc_output(
     Minc_file   file )
 {
     int    d;
@@ -1677,7 +1677,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - added use_volume_starts_and_steps
 ---------------------------------------------------------------------------- */
 
-public  void  set_default_minc_output_options(
+VIOAPI  void  set_default_minc_output_options(
     minc_output_options  *options           )
 {
     int   dim;
@@ -1705,7 +1705,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  copy_minc_output_options(
+VIOAPI  void  copy_minc_output_options(
     minc_output_options  *src,
     minc_output_options  *dest )
 {
@@ -1739,7 +1739,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  delete_minc_output_options(
+VIOAPI  void  delete_minc_output_options(
     minc_output_options  *options           )
 {
     int   i;
@@ -1764,7 +1764,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_output_dimensions_order(
+VIOAPI  void  set_minc_output_dimensions_order(
     minc_output_options  *options,
     int                  n_dimensions,
     STRING               dimension_names[] )
@@ -1793,7 +1793,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_output_real_range(
+VIOAPI  void  set_minc_output_real_range(
     minc_output_options  *options,
     Real                 real_min,
     Real                 real_max )
@@ -1819,7 +1819,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_minc_output_use_volume_starts_and_steps_flag(
+VIOAPI  void  set_minc_output_use_volume_starts_and_steps_flag(
     minc_output_options  *options,
     BOOLEAN              flag )
 {
--- a/volume_io/Volumes/output_volume.c
+++ b/volume_io/Volumes/output_volume.c
@@ -15,7 +15,7 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/output_volume.c,v 1.22 2001-04-24 13:38:49 neelin Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/output_volume.c,v 1.23 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------
@@ -34,7 +34,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status   get_file_dimension_names(
+VIOAPI  Status   get_file_dimension_names(
     STRING   filename,
     int      *n_dims,
     STRING   *dim_names[] )
@@ -90,7 +90,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  *create_output_dim_names(
+VIOAPI  STRING  *create_output_dim_names(
     Volume                volume,
     STRING                original_filename,
     minc_output_options   *options,
@@ -227,7 +227,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status   copy_volume_auxiliary_and_history(
+VIOAPI  Status   copy_volume_auxiliary_and_history(
     Minc_file   minc_file,
     STRING      filename,
     STRING      original_filename,
@@ -296,7 +296,7 @@
                                             use_volume_starts_and_steps flag
 ---------------------------------------------------------------------------- */
 
-public  Status  output_modified_volume(
+VIOAPI  Status  output_modified_volume(
     STRING                filename,
     nc_type               file_nc_data_type,
     BOOLEAN               file_signed_flag,
@@ -390,7 +390,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Status  output_volume(
+VIOAPI  Status  output_volume(
     STRING                filename,
     nc_type               file_nc_data_type,
     BOOLEAN               file_signed_flag,
--- a/volume_io/Volumes/set_hyperslab.c
+++ b/volume_io/Volumes/set_hyperslab.c
@@ -15,10 +15,10 @@
 #include  <internal_volume_io.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/set_hyperslab.c,v 1.2 2001-04-17 18:40:31 neelin Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/set_hyperslab.c,v 1.3 2004-10-04 20:23:52 bert Exp $";
 #endif
 
-public  void  convert_values_to_voxels(
+VIOAPI  void  convert_values_to_voxels(
     Volume   volume,
     int      n_voxels,
     Real     values[],
@@ -44,7 +44,7 @@
         voxels[v] = (values[v] - trans) / scale;
 }
 
-public  void  set_volume_value_hyperslab(
+VIOAPI  void  set_volume_value_hyperslab(
     Volume   volume,
     int      v0,
     int      v1,
@@ -80,7 +80,7 @@
     }
 }
 
-public  void  set_volume_value_hyperslab_5d(
+VIOAPI  void  set_volume_value_hyperslab_5d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -108,7 +108,7 @@
     FREE( voxels );
 }
 
-public  void  set_volume_value_hyperslab_4d(
+VIOAPI  void  set_volume_value_hyperslab_4d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -134,7 +134,7 @@
     FREE( voxels );
 }
 
-public  void  set_volume_value_hyperslab_3d(
+VIOAPI  void  set_volume_value_hyperslab_3d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -157,7 +157,7 @@
     FREE( voxels );
 }
 
-public  void  set_volume_value_hyperslab_2d(
+VIOAPI  void  set_volume_value_hyperslab_2d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -178,7 +178,7 @@
     FREE( voxels );
 }
 
-public  void  set_volume_value_hyperslab_1d(
+VIOAPI  void  set_volume_value_hyperslab_1d(
     Volume   volume,
     int      v0,
     int      n0,
@@ -195,7 +195,7 @@
     FREE( voxels );
 }
 
-private  void  slow_set_volume_voxel_hyperslab(
+static  void  slow_set_volume_voxel_hyperslab(
     Volume   volume,
     int      v0,
     int      v1,
@@ -236,7 +236,7 @@
     }
 }
 
-private  void  set_voxel_values_5d(
+static  void  set_voxel_values_5d(
     Data_types  data_type,
     void        *void_ptr,
     int         steps[],
@@ -488,7 +488,7 @@
     }
 }
 
-private  void  set_voxel_values_4d(
+static  void  set_voxel_values_4d(
     Data_types  data_type,
     void        *void_ptr,
     int         steps[],
@@ -703,7 +703,7 @@
     }
 }
 
-private  void  set_voxel_values_3d(
+static  void  set_voxel_values_3d(
     Data_types  data_type,
     void        *void_ptr,
     int         steps[],
@@ -880,7 +880,7 @@
     }
 }
 
-private  void  set_voxel_values_2d(
+static  void  set_voxel_values_2d(
     Data_types  data_type,
     void        *void_ptr,
     int         steps[],
@@ -1021,7 +1021,7 @@
     }
 }
 
-private  void  set_voxel_values_1d(
+static  void  set_voxel_values_1d(
     Data_types  data_type,
     void        *void_ptr,
     int         step0,
@@ -1122,7 +1122,7 @@
     }
 }
 
-private  void  set_voxel_values(
+static  void  set_voxel_values(
     Volume   volume,
     void     *void_ptr,
     int      n_dims,
@@ -1156,7 +1156,7 @@
     }
 }
 
-public  void  set_volume_voxel_hyperslab_5d(
+VIOAPI  void  set_volume_voxel_hyperslab_5d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -1233,7 +1233,7 @@
                       values );
 }
 
-public  void  set_volume_voxel_hyperslab_4d(
+VIOAPI  void  set_volume_voxel_hyperslab_4d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -1300,7 +1300,7 @@
                       values );
 }
 
-public  void  set_volume_voxel_hyperslab_3d(
+VIOAPI  void  set_volume_voxel_hyperslab_3d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -1357,7 +1357,7 @@
                       values );
 }
 
-public  void  set_volume_voxel_hyperslab_2d(
+VIOAPI  void  set_volume_voxel_hyperslab_2d(
     Volume   volume,
     int      v0,
     int      v1,
@@ -1404,7 +1404,7 @@
                       values );
 }
 
-public  void  set_volume_voxel_hyperslab_1d(
+VIOAPI  void  set_volume_voxel_hyperslab_1d(
     Volume   volume,
     int      v0,
     int      n0,
@@ -1440,7 +1440,7 @@
                       values );
 }
 
-public  void  set_volume_voxel_hyperslab(
+VIOAPI  void  set_volume_voxel_hyperslab(
     Volume   volume,
     int      v0,
     int      v1,
--- a/volume_io/Volumes/volume_cache.c
+++ b/volume_io/Volumes/volume_cache.c
@@ -13,7 +13,7 @@
 ---------------------------------------------------------------------------- */
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/volume_cache.c,v 1.28 2004-06-08 16:20:24 bert Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/volume_cache.c,v 1.29 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 #include  <internal_volume_io.h>
@@ -41,21 +41,21 @@
                                                      DEFAULT_BLOCK_SIZE,
                                                      DEFAULT_BLOCK_SIZE };
 
-private  void  alloc_volume_cache(
+static  void  alloc_volume_cache(
     volume_cache_struct   *cache,
     Volume                volume );
 
 #ifdef  CACHE_DEBUGGING
-private  void  initialize_cache_debug(
+static  void  initialize_cache_debug(
     volume_cache_struct  *cache );
 
-private  void  record_cache_hit(
+static  void  record_cache_hit(
     volume_cache_struct  *cache );
 
-private  void  record_cache_prev_hit(
+static  void  record_cache_prev_hit(
     volume_cache_struct  *cache );
 
-private  void  record_cache_no_hit(
+static  void  record_cache_no_hit(
     volume_cache_struct  *cache );
 #endif
 
@@ -74,7 +74,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_n_bytes_cache_threshold(
+VIOAPI  void  set_n_bytes_cache_threshold(
     int  threshold )
 {
     n_bytes_cache_threshold = threshold;
@@ -96,7 +96,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_n_bytes_cache_threshold( void )
+VIOAPI  int  get_n_bytes_cache_threshold( void )
 {
     int   n_bytes;
 
@@ -127,7 +127,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_default_max_bytes_in_cache(
+VIOAPI  void  set_default_max_bytes_in_cache(
     int   max_bytes )
 {
     default_cache_size_set = TRUE;
@@ -148,7 +148,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_default_max_bytes_in_cache( void )
+VIOAPI  int  get_default_max_bytes_in_cache( void )
 {
     int   n_bytes;
 
@@ -181,7 +181,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_default_cache_block_sizes(
+VIOAPI  void  set_default_cache_block_sizes(
     int                      block_sizes[] )
 {
     int   dim;
@@ -207,7 +207,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_cache_block_sizes_hint(
+VIOAPI  void  set_cache_block_sizes_hint(
     Cache_block_size_hints  hint )
 {
     block_size_hint = hint;
@@ -229,7 +229,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  get_default_cache_block_sizes(
+static  void  get_default_cache_block_sizes(
     int    n_dims,
     int    volume_sizes[],
     int    block_sizes[] )
@@ -288,7 +288,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  initialize_volume_cache(
+VIOAPI  void  initialize_volume_cache(
     volume_cache_struct   *cache,
     Volume                volume )
 {
@@ -338,7 +338,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  alloc_volume_cache(
+static  void  alloc_volume_cache(
     volume_cache_struct   *cache,
     Volume                volume )
 {
@@ -396,7 +396,7 @@
     cache->n_blocks = 0;
 }
 
-public  BOOLEAN  volume_cache_is_alloced(
+VIOAPI  BOOLEAN  volume_cache_is_alloced(
     volume_cache_struct   *cache )
 {
     return( cache->hash_table != NULL );
@@ -416,7 +416,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  get_block_start(
+static  void  get_block_start(
     volume_cache_struct  *cache,
     int                  block_index,
     int                  block_start[] )
@@ -447,7 +447,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  write_cache_block(
+static  void  write_cache_block(
     volume_cache_struct  *cache,
     Volume               volume,
     cache_block_struct   *block )
@@ -510,7 +510,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  flush_cache_blocks(
+static  void  flush_cache_blocks(
     volume_cache_struct   *cache,
     Volume                volume,
     BOOLEAN               deleting_volume_flag )
@@ -550,7 +550,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  flush_volume_cache(
+VIOAPI  void  flush_volume_cache(
     Volume                volume )
 {
     flush_cache_blocks( &volume->cache, volume, FALSE );
@@ -572,7 +572,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  delete_cache_blocks(
+static  void  delete_cache_blocks(
     volume_cache_struct   *cache,
     Volume                volume,
     BOOLEAN               deleting_volume_flag )
@@ -622,7 +622,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  delete_volume_cache(
+VIOAPI  void  delete_volume_cache(
     volume_cache_struct   *cache,
     Volume                volume )
 {
@@ -675,7 +675,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_cache_block_sizes(
+VIOAPI  void  set_volume_cache_block_sizes(
     Volume    volume,
     int       block_sizes[] )
 {
@@ -737,7 +737,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_cache_size(
+VIOAPI  void  set_volume_cache_size(
     Volume    volume,
     int       max_memory_bytes )
 {
@@ -786,7 +786,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_cache_output_volume_parameters(
+VIOAPI  void  set_cache_output_volume_parameters(
     Volume                      volume,
     STRING                      filename,
     nc_type                     file_nc_data_type,
@@ -824,7 +824,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  open_cache_volume_input_file(
+VIOAPI  void  open_cache_volume_input_file(
     volume_cache_struct   *cache,
     Volume                volume,
     STRING                filename,
@@ -851,7 +851,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  Status  open_cache_volume_output_file(
+static  Status  open_cache_volume_output_file(
     volume_cache_struct   *cache,
     Volume                volume )
 {
@@ -961,7 +961,7 @@
     return( OK );
 }
 
-public  void  cache_volume_range_has_changed(
+VIOAPI  void  cache_volume_range_has_changed(
     Volume   volume )
 {
     if( !volume->is_cached_volume )
@@ -991,7 +991,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_cache_volume_file_offset(
+VIOAPI  void  set_cache_volume_file_offset(
     volume_cache_struct   *cache,
     Volume                volume,
     long                  file_offset[] )
@@ -1029,7 +1029,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  read_cache_block(
+static  void  read_cache_block(
     volume_cache_struct  *cache,
     Volume               volume,
     cache_block_struct   *block,
@@ -1087,7 +1087,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  cache_block_struct  *appropriate_a_cache_block(
+static  cache_block_struct  *appropriate_a_cache_block(
     volume_cache_struct  *cache,
     Volume               volume )
 {
@@ -1150,7 +1150,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  int  hash_block_index(
+static  int  hash_block_index(
     int  key,
     int  table_size )
 {
@@ -1186,7 +1186,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  cache_block_struct  *get_cache_block_for_voxel(
+static  cache_block_struct  *get_cache_block_for_voxel(
     Volume   volume,
     int      x,
     int      y,
@@ -1400,7 +1400,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_cached_volume_voxel(
+VIOAPI  Real  get_cached_volume_voxel(
     Volume   volume,
     int      x,
     int      y,
@@ -1441,7 +1441,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_cached_volume_voxel(
+VIOAPI  void  set_cached_volume_voxel(
     Volume   volume,
     int      x,
     int      y,
@@ -1479,13 +1479,13 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  cached_volume_has_been_modified(
+VIOAPI  BOOLEAN  cached_volume_has_been_modified(
     volume_cache_struct  *cache )
 {
     return( cache->minc_file != NULL );
 }
 
-public  BOOLEAN  volume_is_cached(
+VIOAPI  BOOLEAN  volume_is_cached(
     Volume  volume )
 {
     return( volume->is_cached_volume );
@@ -1495,7 +1495,7 @@
 /* ARGSUSED */
 #endif
 
-public  void   set_volume_cache_debugging(
+VIOAPI  void   set_volume_cache_debugging(
     Volume   volume,
     int      output_every )
 {
@@ -1514,7 +1514,7 @@
 
 #ifdef  CACHE_DEBUGGING
 
-private  void  initialize_cache_debug(
+static  void  initialize_cache_debug(
     volume_cache_struct  *cache )
 {
     int      output_every;
@@ -1536,7 +1536,7 @@
     cache->n_prev_hits = 0;
 }
 
-private  void  increment_n_accesses(
+static  void  increment_n_accesses(
     volume_cache_struct  *cache )
 {
     ++cache->n_accesses;
@@ -1555,7 +1555,7 @@
     }
 }
 
-private  void  record_cache_hit(
+static  void  record_cache_hit(
     volume_cache_struct  *cache )
 {
     if( cache->debugging_on )
@@ -1565,7 +1565,7 @@
     }
 }
 
-private  void  record_cache_prev_hit(
+static  void  record_cache_prev_hit(
     volume_cache_struct  *cache )
 {
     if( cache->debugging_on )
@@ -1575,7 +1575,7 @@
     }
 }
 
-private  void  record_cache_no_hit(
+static  void  record_cache_no_hit(
     volume_cache_struct  *cache )
 {
     if( cache->debugging_on )
--- a/volume_io/Volumes/volumes.c
+++ b/volume_io/Volumes/volumes.c
@@ -17,13 +17,13 @@
 #include  <float.h>
 
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/volumes.c,v 1.72 2002-08-23 03:16:44 stever Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/volumes.c,v 1.73 2004-10-04 20:23:52 bert Exp $";
 #endif
 
 STRING   XYZ_dimension_names[] = { MIxspace, MIyspace, MIzspace };
 STRING   File_order_dimension_names[] = { "", "", "", "", "" };
 
-private  STRING  default_dimension_names[MAX_DIMENSIONS][MAX_DIMENSIONS] =
+static  STRING  default_dimension_names[MAX_DIMENSIONS][MAX_DIMENSIONS] =
 {
     { MIxspace },
     { MIyspace, MIxspace },
@@ -46,7 +46,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  *get_default_dim_names(
+VIOAPI  STRING  *get_default_dim_names(
     int    n_dimensions )
 {
     return( default_dimension_names[n_dimensions-1] );
@@ -65,7 +65,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  STRING  convert_spatial_axis_to_dim_name(
+static  STRING  convert_spatial_axis_to_dim_name(
     int   axis )
 {
     switch( axis )
@@ -94,7 +94,7 @@
 @MODIFIED   :
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  convert_dim_name_to_spatial_axis(
+VIOAPI  BOOLEAN  convert_dim_name_to_spatial_axis(
     STRING  name,
     int     *axis )
 {
@@ -139,7 +139,7 @@
 @MODIFIED   : May  22, 1996    D. MacDonald    - now stores starts/steps
 ---------------------------------------------------------------------------- */
 
-public   Volume   create_volume(
+VIOAPI   Volume   create_volume(
     int         n_dimensions,
     STRING      dimension_names[],
     nc_type     nc_data_type,
@@ -235,7 +235,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_type(
+VIOAPI  void  set_volume_type(
     Volume       volume,
     nc_type      nc_data_type,
     BOOLEAN      signed_flag,
@@ -301,7 +301,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  nc_type  get_volume_nc_data_type(
+VIOAPI  nc_type  get_volume_nc_data_type(
     Volume       volume,
     BOOLEAN      *signed_flag )
 {
@@ -323,7 +323,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Data_types  get_volume_data_type(
+VIOAPI  Data_types  get_volume_data_type(
     Volume       volume )
 {
     return( get_multidim_data_type( &volume->array ) );
@@ -345,7 +345,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_rgb_volume_flag(
+VIOAPI  void  set_rgb_volume_flag(
     Volume   volume,
     BOOLEAN  flag )
 {
@@ -366,7 +366,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  is_an_rgb_volume(
+VIOAPI  BOOLEAN  is_an_rgb_volume(
     Volume   volume )
 {
     return( volume->is_rgba_data );
@@ -386,7 +386,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  alloc_volume_data(
+VIOAPI  void  alloc_volume_data(
     Volume   volume )
 {
     unsigned long   data_size;
@@ -420,7 +420,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  BOOLEAN  volume_is_alloced(
+VIOAPI  BOOLEAN  volume_is_alloced(
     Volume   volume )
 {
     return( volume->is_cached_volume &&
@@ -442,7 +442,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  free_volume_data(
+VIOAPI  void  free_volume_data(
     Volume   volume )
 {
     if( volume->is_cached_volume )
@@ -464,7 +464,7 @@
 @MODIFIED   : Nov. 15, 1996    D. MacDonald    - handles space type
 ---------------------------------------------------------------------------- */
 
-public  void  delete_volume(
+VIOAPI  void  delete_volume(
     Volume   volume )
 {
     int   d;
@@ -500,7 +500,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  int  get_volume_n_dimensions(
+VIOAPI  int  get_volume_n_dimensions(
     Volume   volume )
 {
     return( get_multidim_n_dimensions( &volume->array ) );
@@ -520,7 +520,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_volume_sizes(
+VIOAPI  void  get_volume_sizes(
     Volume   volume,
     int      sizes[] )
 {
@@ -541,7 +541,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_sizes(
+VIOAPI  void  set_volume_sizes(
     Volume       volume,
     int          sizes[] )
 {
@@ -561,7 +561,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  unsigned int  get_volume_total_n_voxels(
+VIOAPI  unsigned int  get_volume_total_n_voxels(
     Volume    volume )
 {
     unsigned  int  n;
@@ -592,7 +592,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  assign_voxel_to_world_transform(
+static  void  assign_voxel_to_world_transform(
     Volume             volume,
     General_transform  *transform )
 {
@@ -617,7 +617,7 @@
 @MODIFIED   :
 ---------------------------------------------------------------------------- */
 
-private  Real   dot_vectors(
+static  Real   dot_vectors(
     int    n,
     Real   v1[],
     Real   v2[] )
@@ -647,7 +647,7 @@
 @MODIFIED   :
 ---------------------------------------------------------------------------- */
 
-private  void   cross_3D_vector(
+static  void   cross_3D_vector(
     Real   v1[],
     Real   v2[],
     Real   cross[] )
@@ -672,7 +672,7 @@
 @MODIFIED   :
 ---------------------------------------------------------------------------- */
 
-private  void   normalize_vector(
+static  void   normalize_vector(
     Real   v1[],
     Real   v1_normalized[] )
 {
@@ -709,7 +709,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - now uses starts/steps
 ---------------------------------------------------------------------------- */
 
-public  void  compute_world_transform(
+VIOAPI  void  compute_world_transform(
     int                 spatial_axes[N_DIMENSIONS],
     Real                separations[],
     Real                direction_cosines[][N_DIMENSIONS],
@@ -842,7 +842,7 @@
 @MODIFIED   : May  20, 1997   D. MacDonald - now checks update flag
 ---------------------------------------------------------------------------- */
 
-private  void  check_recompute_world_transform(
+static  void  check_recompute_world_transform(
     Volume  volume )
 {
     General_transform        world_transform;
@@ -878,7 +878,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-private  void  convert_transform_origin_to_starts(
+static  void  convert_transform_origin_to_starts(
     Real               origin[],
     int                n_volume_dimensions,
     int                spatial_axes[],
@@ -984,7 +984,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  convert_transform_to_starts_and_steps(
+VIOAPI  void  convert_transform_to_starts_and_steps(
     General_transform  *transform,
     int                n_volume_dimensions,
     Real               step_signs[],
@@ -1072,7 +1072,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - recomputes the starts/steps
 ---------------------------------------------------------------------------- */
 
-public  void  set_voxel_to_world_transform(
+VIOAPI  void  set_voxel_to_world_transform(
     Volume             volume,
     General_transform  *transform )
 {
@@ -1104,7 +1104,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - now delays recomputing transform
 ---------------------------------------------------------------------------- */
 
-public  General_transform  *get_voxel_to_world_transform(
+VIOAPI  General_transform  *get_voxel_to_world_transform(
     Volume   volume )
 {
     check_recompute_world_transform( volume );
@@ -1127,7 +1127,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  *get_volume_dimension_names(
+VIOAPI  STRING  *get_volume_dimension_names(
     Volume   volume )
 {
     int      i;
@@ -1166,7 +1166,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  delete_dimension_names(
+VIOAPI  void  delete_dimension_names(
     Volume   volume,
     STRING   dimension_names[] )
 {
@@ -1193,7 +1193,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  STRING  get_volume_space_type(
+VIOAPI  STRING  get_volume_space_type(
     Volume   volume )
 {
     return( create_string( volume->coordinate_system_name ) );
@@ -1214,7 +1214,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_space_type(
+VIOAPI  void  set_volume_space_type(
     Volume   volume,
     STRING   name )
 {
@@ -1236,7 +1236,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_volume_separations(
+VIOAPI  void  get_volume_separations(
     Volume   volume,
     Real     separations[] )
 {
@@ -1260,7 +1260,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - now delays recomputing transform
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_separations(
+VIOAPI  void  set_volume_separations(
     Volume   volume,
     Real     separations[] )
 {
@@ -1287,7 +1287,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - now delays recomputing transform
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_starts(
+VIOAPI  void  set_volume_starts(
     Volume  volume,
     Real    starts[] )
 {
@@ -1312,7 +1312,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_volume_starts(
+VIOAPI  void  get_volume_starts(
     Volume  volume,
     Real    starts[] )
 {
@@ -1337,7 +1337,7 @@
 @CREATED    : May  20, 1997     David MacDonald
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_direction_unit_cosine(
+VIOAPI  void  set_volume_direction_unit_cosine(
     Volume   volume,
     int      axis,
     Real     dir[] )
@@ -1386,7 +1386,7 @@
                                             set_volume_direction_unit_cosine
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_direction_cosine(
+VIOAPI  void  set_volume_direction_cosine(
     Volume   volume,
     int      axis,
     Real     dir[] )
@@ -1428,7 +1428,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_volume_direction_cosine(
+VIOAPI  void  get_volume_direction_cosine(
     Volume   volume,
     int      axis,
     Real     dir[] )
@@ -1480,7 +1480,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_translation(
+VIOAPI  void  set_volume_translation(
     Volume  volume,
     Real    voxel[],
     Real    world_space_voxel_maps_to[] )
@@ -1656,7 +1656,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_volume_translation(
+VIOAPI  void  get_volume_translation(
     Volume  volume,
     Real    voxel[],
     Real    world_space_voxel_maps_to[] )
@@ -1686,7 +1686,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  reorder_voxel_to_xyz(
+VIOAPI  void  reorder_voxel_to_xyz(
     Volume   volume,
     Real     voxel[],
     Real     xyz[] )
@@ -1718,7 +1718,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  reorder_xyz_to_voxel(
+VIOAPI  void  reorder_xyz_to_voxel(
     Volume   volume,
     Real     xyz[],
     Real     voxel[] )
@@ -1754,7 +1754,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - checks to recompute transform
 ---------------------------------------------------------------------------- */
 
-public  void  convert_voxel_to_world(
+VIOAPI  void  convert_voxel_to_world(
     Volume   volume,
     Real     voxel[],
     Real     *x_world,
@@ -1793,7 +1793,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  convert_3D_voxel_to_world(
+VIOAPI  void  convert_3D_voxel_to_world(
     Volume   volume,
     Real     voxel1,
     Real     voxel2,
@@ -1833,7 +1833,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - checks to recompute transform
 ---------------------------------------------------------------------------- */
 
-public  void  convert_voxel_normal_vector_to_world(
+VIOAPI  void  convert_voxel_normal_vector_to_world(
     Volume          volume,
     Real            voxel_vector[],
     Real            *x_world,
@@ -1879,7 +1879,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  convert_voxel_vector_to_world(
+VIOAPI  void  convert_voxel_vector_to_world(
     Volume          volume,
     Real            voxel_vector[],
     Real            *x_world,
@@ -1914,7 +1914,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  convert_world_vector_to_voxel(
+VIOAPI  void  convert_world_vector_to_voxel(
     Volume          volume,
     Real            x_world,
     Real            y_world,
@@ -1946,7 +1946,7 @@
 @MODIFIED   : May  22, 1997   D. MacDonald - checks to recompute transform
 ---------------------------------------------------------------------------- */
 
-public  void  convert_world_to_voxel(
+VIOAPI  void  convert_world_to_voxel(
     Volume   volume,
     Real     x_world,
     Real     y_world,
@@ -1983,7 +1983,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  convert_3D_world_to_voxel(
+VIOAPI  void  convert_3D_world_to_voxel(
     Volume   volume,
     Real     x_world,
     Real     y_world,
@@ -2020,7 +2020,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_volume_voxel_min(
+VIOAPI  Real  get_volume_voxel_min(
     Volume   volume )
 {
     return( volume->voxel_min );
@@ -2039,7 +2039,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_volume_voxel_max(
+VIOAPI  Real  get_volume_voxel_max(
     Volume   volume )
 {
     return( volume->voxel_max );
@@ -2059,7 +2059,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_volume_voxel_range(
+VIOAPI  void  get_volume_voxel_range(
     Volume     volume,
     Real       *voxel_min,
     Real       *voxel_max )
@@ -2085,7 +2085,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_voxel_range(
+VIOAPI  void  set_volume_voxel_range(
     Volume   volume,
     Real     voxel_min,
     Real     voxel_max )
@@ -2151,7 +2151,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  get_volume_real_range(
+VIOAPI  void  get_volume_real_range(
     Volume     volume,
     Real       *min_value,
     Real       *max_value )
@@ -2173,7 +2173,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_volume_real_min(
+VIOAPI  Real  get_volume_real_min(
     Volume     volume )
 {
     Real   real_min;
@@ -2199,7 +2199,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Real  get_volume_real_max(
+VIOAPI  Real  get_volume_real_max(
     Volume     volume )
 {
     Real   real_max;
@@ -2228,7 +2228,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  void  set_volume_real_range(
+VIOAPI  void  set_volume_real_range(
     Volume   volume,
     Real     real_min,
     Real     real_max )
@@ -2287,7 +2287,7 @@
 @MODIFIED   : Nov. 15, 1996    D. MacDonald    - handles space type
 ---------------------------------------------------------------------------- */
 
-public  Volume   copy_volume_definition_no_alloc(
+VIOAPI  Volume   copy_volume_definition_no_alloc(
     Volume   volume,
     nc_type  nc_data_type,
     BOOLEAN  signed_flag,
@@ -2357,7 +2357,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Volume   copy_volume_definition(
+VIOAPI  Volume   copy_volume_definition(
     Volume   volume,
     nc_type  nc_data_type,
     BOOLEAN  signed_flag,
@@ -2387,7 +2387,7 @@
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
 
-public  Volume  copy_volume(
+VIOAPI  Volume  copy_volume(
     Volume   volume )
 {
     Volume   copy;