Mercurial > hg > minc-tools
changeset 2030:c4d3f4a24c49
Change MINC_PLAY_NICE to VIO_PREFIX_NAMES
author | bert <bert> |
---|---|
date | Thu, 31 Mar 2005 17:39:48 +0000 |
parents | 8980384efc7f |
children | 800a85ed0ace |
files | ChangeLog volume_io/Include/volume_io.h volume_io/Include/volume_io/alloc.h volume_io/Include/volume_io/basic.h volume_io/Include/volume_io/files.h volume_io/Include/volume_io/geom_structs.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/volume.h volume_io/Include/volume_io/volume_cache.h |
diffstat | 12 files changed, 53 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-03-31 Bert Vincent <bert@bic.mni.mcgill.ca> + * Port A. Janke's fix to volume_io/Prog_utils/files.c to the + 1.X branch. This replaces any ':' characters in a temporary + filename with '-' characters, to avoid errors on Windows. + * Replace MINC_PLAY_NICE macro with VIO_PREFIX_NAMES macro. + 2005-03-16 Bert Vincent <bert@bic.mni.mcgill.ca> * Port other changes from 2.0 branch - new mincconcat bimodal threshold calculations, get rid of minc_def.h for all programs.
--- 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.2.1 2004-10-04 20:16:39 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io.h,v 1.11.2.2 2005-03-31 17:39:49 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -30,6 +30,10 @@ @MODIFIED : ---------------------------------------------------------------------------- */ +#ifndef VIO_PREFIX_NAMES +#define VIO_PREFIX_NAMES 0 /* Allow old-fashioned namespace pollution */ +#endif /* VIO_PREFIX_NAMES */ + #include <volume_io/basic.h> #include <volume_io/string_funcs.h> #include <volume_io/files.h>
--- 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.2.1 2004-10-04 20:16:38 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/alloc.h,v 1.17.2.2 2005-03-31 17:39:48 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -45,7 +45,7 @@ print_alloc_source_line( filename, line_number ); #endif -#ifndef MINC_PLAY_NICE +#if !VIO_PREFIX_NAMES /* ----------------------------- MNI Header ----------------------------------- @NAME : ALLOC @@ -294,5 +294,5 @@ #define FREE5D( ptr ) \ free_memory_5d( (void ******) &(ptr) _ALLOC_SOURCE_LINE ) -#endif /* MINC_PLAY_NICE */ +#endif /* !VIO_PREFIX_NAMES */ #endif
--- 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.2.1 2004-10-04 20:16:38 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/basic.h,v 1.33.2.2 2005-03-31 17:39:48 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -53,7 +53,8 @@ #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 + * volume_io names below, if the new VIO_PREFIX_NAMES macro is set to + * zero. */ typedef char *VIO_STR; typedef int VIO_BOOL; @@ -69,7 +70,7 @@ } VIO_Status; -#ifndef MINC_PLAY_NICE /* Play nice with others */ +#if !VIO_PREFIX_NAMES /* Play nice with others */ #ifndef __cplusplus #ifndef private @@ -193,6 +194,6 @@ #define HANDLE_INTERNAL_ERROR( X ) \ handle_internal_error( X ) -#endif /* MINC_PLAY_NICE */ +#endif /* !VIO_PREFIX_NAMES */ #endif /* DEF_BASIC */
--- 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.2.1 2004-10-04 20:16:39 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/files.h,v 1.8.2.2 2005-03-31 17:39:49 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -36,9 +36,9 @@ typedef enum { READ_FILE, WRITE_FILE, APPEND_FILE } VIO_IO_types; -#ifndef MINC_PLAY_NICE +#if !VIO_PREFIX_NAMES typedef VIO_File_formats File_formats; typedef VIO_IO_types IO_types; -#endif /* MINC_PLAY_NICE */ +#endif /* !VIO_PREFIX_NAMES */ #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.2.1 2004-10-04 20:16:39 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/geom_structs.h,v 1.20.2.2 2005-03-31 17:39:49 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -35,7 +35,7 @@ #define VIO_Y 1 #define VIO_Z 2 -#ifndef MINC_PLAY_NICE /* Don't define commonly used symbols */ +#if !VIO_PREFIX_NAMES /* Don't define commonly used symbols */ #define N_DIMENSIONS VIO_N_DIMENSIONS @@ -43,7 +43,7 @@ #define Y VIO_Y #define Z VIO_Z -#endif /* MINC_PLAY_NICE */ +#endif /* !VIO_PREFIX_NAMES */ /* ----------------------------- MNI Header ----------------------------------- @NAME : Point type @@ -262,7 +262,7 @@ #define Transform_elem( t, i, j ) ((t).m[j][i]) -#ifndef MINC_PLAY_NICE +#if !VIO_PREFIX_NAMES typedef VIO_Transform Transform; typedef VIO_Vector Vector; typedef VIO_Colour Colour; @@ -270,8 +270,15 @@ typedef VIO_Transform_elem_type Transform_elem_type; typedef VIO_Spr_type Spr_type; typedef VIO_Surfprop Surfprop; +/* Th 'Point' typedef is annoying to Mac OS users, since Point has been + * a basic type on Macs since the beginning. Testing __MACTYPES__ should + * work at least with the OS X codebase, I don't know if it existed in + * earlier versions of the MacTypes.h header. + */ +#ifndef __MACTYPES__ typedef VIO_Point Point; +#endif /* __MACTYPES__ not defined */ typedef VIO_Point_coord_type Point_coord_type; -#endif /* MINC_PLAY_NICE */ +#endif /* !VIO_PREFIX_NAMES */ -#endif +#endif /* DEF_GEOM_STRUCTS */
--- 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.2.1 2004-10-04 20:16:39 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/multidim.h,v 1.5.2.2 2005-03-31 17:39:49 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -278,10 +278,10 @@ case 5: GET_MULTIDIM_PTR_5D( ptr, array, x, y, z, t, v ); break; \ } -#ifndef MINC_PLAY_NICE +#if !VIO_PREFIX_NAMES typedef VIO_multidim_array multidim_array; typedef VIO_Data_types Data_types; #define MAX_DIMENSIONS VIO_MAX_DIMENSIONS -#endif /* MINC_PLAY_NICE */ +#endif /* !VIO_PREFIX_NAMES */ #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.2.1 2004-10-04 20:16:39 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/progress.h,v 1.8.2.2 2005-03-31 17:39:49 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -52,8 +52,8 @@ int last_check_step; } VIO_progress_struct; -#ifndef MINC_PLAY_NICE +#if !VIO_PREFIX_NAMES typedef VIO_progress_struct progress_struct; -#endif /* MINC_PLAY_NICE */ +#endif /* VIO_PREFIX_NAMES */ #endif /* DEF_PROGRESS */
--- a/volume_io/Include/volume_io/string_funcs.h +++ b/volume_io/Include/volume_io/string_funcs.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/string_funcs.h,v 1.7.2.1 2004-10-04 20:16:39 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/string_funcs.h,v 1.7.2.2 2005-03-31 17:39:49 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -31,7 +31,7 @@ #include <string.h> -#ifndef MINC_PLAY_NICE +#if !VIO_PREFIX_NAMES #define EXTREMELY_LARGE_STRING_SIZE 10000 #define END_OF_STRING ((char) 0) @@ -39,6 +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 /* !VIO_PREFIX_NAMES */ #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.2.1 2004-10-04 20:16:39 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/transforms.h,v 1.12.2.2 2005-03-31 17:39:49 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -83,10 +83,10 @@ } VIO_General_transform; -#ifndef MINC_PLAY_NICE +#if !VIO_PREFIX_NAMES 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 /* !VIO_PREFIX_NAMES */ #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.2.1 2004-10-04 20:16:39 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/volume.h,v 1.53.2.2 2005-03-31 17:39:49 bert Exp $ ---------------------------------------------------------------------------- */ @@ -84,9 +84,9 @@ typedef volume_struct *VIO_Volume; -#ifndef MINC_PLAY_NICE +#if !VIO_PREFIX_NAMES typedef VIO_Volume Volume; -#endif /* MINC_PLAY_NICE */ +#endif /* !VIO_PREFIX_NAMES */ /* ---- macro for stepping through entire volume */
--- 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.2.1 2004-10-04 20:16:39 bert Exp $ +@VERSION : $Header: /private-cvsroot/minc/volume_io/Include/volume_io/volume_cache.h,v 1.9.2.2 2005-03-31 17:39:49 bert Exp $ ---------------------------------------------------------------------------- */ /* ----------------------------- MNI Header ----------------------------------- @@ -96,11 +96,11 @@ int n_prev_hits; } VIO_volume_cache_struct; -#ifndef MINC_PLAY_NICE +#if !VIO_PREFIX_NAMES 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 /* !VIO_PREFIX_NAMES */ #endif