Mercurial > hg > minc-tools
changeset 2408:4ae5977fbfd8
* added static to all global variables in main programs to avoid linking
problems with libraries (compress in mincconvert and libz for example)
author | rotor <rotor> |
---|---|
date | Tue, 11 Dec 2007 12:43:01 +0000 |
parents | 29afbfd41fc2 |
children | 6b594f624680 |
files | conversion/vff2mnc/vff2mnc.c conversion/vff2mnc/vff2mnc.h progs/minc_modify_header/minc_modify_header.c progs/mincaverage/mincaverage.c progs/minccalc/minccalc.c progs/minccopy/minccopy.c progs/mincextract/mincextract.c progs/mincinfo/mincinfo.c progs/minclookup/minclookup.c progs/mincmakescalar/mincmakescalar.c progs/mincmakevector/mincmakevector.c progs/mincmath/mincmath.c progs/mincstats/mincstats.c progs/minctoraw/minctoraw.c progs/mincwindow/mincwindow.c |
diffstat | 15 files changed, 215 insertions(+), 156 deletions(-) [+] |
line wrap: on
line diff
--- a/conversion/vff2mnc/vff2mnc.c +++ b/conversion/vff2mnc/vff2mnc.c @@ -5,7 +5,11 @@ @CREATED : Jul 2006 (Leila Baghdadi) @MODIFIED : * $Log: vff2mnc.c,v $ - * Revision 1.2 2007-01-19 17:52:56 baghdadi + * Revision 1.3 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 1.2 2007/01/19 17:52:56 baghdadi * Added minor revision for string manipulations. * * Revision 1.1 2007/01/16 18:37:57 baghdadi @@ -25,8 +29,8 @@ #include <windows.h> #endif +#include <time_stamp.h> #include <ParseArgv.h> -#include <../dcm2mnc/string_to_filename.h> /* Function Prototypes */ @@ -55,7 +59,7 @@ #define VERSION_STRING "2.0.12 built " __DATE__ " " __TIME__ -ArgvInfo argTable[] = { +static ArgvInfo argTable[] = { {NULL, ARGV_VERINFO, VERSION_STRING, NULL, NULL }, {"-noswap", ARGV_CONSTANT, (char *) FALSE, (char *) &G.little_endian, "Change to noswap default is swap"},
--- a/conversion/vff2mnc/vff2mnc.h +++ b/conversion/vff2mnc/vff2mnc.h @@ -6,7 +6,11 @@ @CREATED : Jul 2006 (Leila Baghdadi) @MODIFIED : * $Log: vff2mnc.h,v $ - * Revision 1.1 2007-01-16 18:38:18 baghdadi + * Revision 1.2 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 1.1 2007/01/16 18:38:18 baghdadi * header file for vff2mnc * * Adopted from vfftominc (perl script) of John G. Sled. @@ -30,8 +34,7 @@ #include <float.h> #endif -#include <time_stamp.h> -#include "minc2.h" +#include <minc2.h> #ifndef TRUE # define TRUE 1
--- a/progs/minc_modify_header/minc_modify_header.c +++ b/progs/minc_modify_header/minc_modify_header.c @@ -10,7 +10,11 @@ @CREATED : March 31, 1995 (Peter Neelin) @MODIFIED : * $Log: minc_modify_header.c,v $ - * Revision 6.10 2004-11-01 22:38:38 bert + * Revision 6.11 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.10 2004/11/01 22:38:38 bert * Eliminate all references to minc_def.h * * Revision 6.9 2004/06/11 15:19:34 bert @@ -78,7 +82,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/minc_modify_header/minc_modify_header.c,v 6.10 2004-11-01 22:38:38 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/minc_modify_header/minc_modify_header.c,v 6.11 2007-12-11 12:43:01 rotor Exp $"; #endif #include "config.h" @@ -126,7 +130,7 @@ } *attribute_list = NULL; /* Argument table */ -ArgvInfo argTable[] = { +static ArgvInfo argTable[] = { {NULL, ARGV_HELP, NULL, NULL, "Options for specifying attribute values by name."}, {"-sinsert", ARGV_FUNC, (char *) get_attribute, NULL,
--- a/progs/mincaverage/mincaverage.c +++ b/progs/mincaverage/mincaverage.c @@ -10,7 +10,11 @@ @CREATED : April 28, 1995 (Peter Neelin) @MODIFIED : * $Log: mincaverage.c,v $ - * Revision 6.8 2005-08-26 21:07:16 bert + * Revision 6.9 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.8 2005/08/26 21:07:16 bert * Use #if rather than #ifdef with MINC2 symbol, and be sure to include config.h whereever MINC2 is used * * Revision 6.7 2004/12/14 23:52:50 bert @@ -77,7 +81,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincaverage/mincaverage.c,v 6.8 2005-08-26 21:07:16 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincaverage/mincaverage.c,v 6.9 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -160,30 +164,30 @@ static char **read_file_names(char *filelist, int *num_files); /* Argument variables */ -int clobber = FALSE; -int verbose = TRUE; -int debug = FALSE; -int check_dimensions = TRUE; +static int clobber = FALSE; +static int verbose = TRUE; +static int debug = FALSE; +static int check_dimensions = TRUE; #ifdef NO_DEFAULT_NORM -int normalize = -1; +static int normalize = -1; #else -int normalize = FALSE; +static int normalize = FALSE; #endif -char *sdfile = NULL; -nc_type datatype = MI_ORIGINAL_TYPE; -int is_signed = FALSE; -double valid_range[2] = {0.0, 0.0}; -int copy_all_header = DEFAULT_BOOLEAN; -char *averaging_dimension = NULL; -int max_buffer_size_in_kb = 4 * 1024; -int binarize = FALSE; -double binrange[2] = {DBL_MAX, -DBL_MAX}; -double binvalue = -DBL_MAX; -Double_Array weights = {0, NULL}; -int width_weighted = FALSE; -char *filelist = NULL; +static char *sdfile = NULL; +static nc_type datatype = MI_ORIGINAL_TYPE; +static int is_signed = FALSE; +static double valid_range[2] = {0.0, 0.0}; +static int copy_all_header = DEFAULT_BOOLEAN; +static char *averaging_dimension = NULL; +static int max_buffer_size_in_kb = 4 * 1024; +static int binarize = FALSE; +static double binrange[2] = {DBL_MAX, -DBL_MAX}; +static double binvalue = -DBL_MAX; +static Double_Array weights = {0, NULL}; +static int width_weighted = FALSE; +static char *filelist = NULL; #if MINC2 -int minc2_format = FALSE; +static int minc2_format = FALSE; #endif /* MINC2 */ /* Argument table */
--- a/progs/minccalc/minccalc.c +++ b/progs/minccalc/minccalc.c @@ -19,7 +19,11 @@ This is predominately a rehash of mincmath by Peter Neelin * $Log: minccalc.c,v $ - * Revision 1.13 2005-08-26 21:07:16 bert + * Revision 1.14 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 1.13 2005/08/26 21:07:16 bert * Use #if rather than #ifdef with MINC2 symbol, and be sure to include config.h whereever MINC2 is used * * Revision 1.12 2004/12/14 23:52:23 bert @@ -78,7 +82,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/minccalc/minccalc.c,v 1.13 2005-08-26 21:07:16 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/minccalc/minccalc.c,v 1.14 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -126,32 +130,32 @@ static int get_list_option(char *dst, char *key, int argc, char **argv); /* Argument variables */ -int Output_list_size = 0; -int Output_list_alloc = 0; +static int Output_list_size = 0; +static int Output_list_alloc = 0; struct { char *symbol; char *file; } *Output_list = NULL; -int clobber = FALSE; -int verbose = TRUE; -int debug = FALSE; -int is_signed = FALSE; -int propagate_nan = TRUE; -int check_dim_info = TRUE; -int copy_all_header = DEFAULT_BOOL; -int use_nan_for_illegal_values = TRUE; -int max_buffer_size_in_kb = 4 * 1024; -double valid_range[2] = {0.0, 0.0}; -double constant = DEFAULT_DBL; -double constant2[2] = {DEFAULT_DBL, DEFAULT_DBL}; -double value_for_illegal_operations = DEFAULT_DBL; -nc_type datatype = MI_ORIGINAL_TYPE; -char *filelist = NULL; -char *expr_file = NULL; -char *expression = NULL; -int eval_width = 200; +static int clobber = FALSE; +static int verbose = TRUE; +int debug = FALSE; +static int is_signed = FALSE; +int propagate_nan = TRUE; +static int check_dim_info = TRUE; +static int copy_all_header = DEFAULT_BOOL; +static int use_nan_for_illegal_values = TRUE; +static int max_buffer_size_in_kb = 4 * 1024; +static double valid_range[2] = {0.0, 0.0}; +static double constant = DEFAULT_DBL; +static double constant2[2] = {DEFAULT_DBL, DEFAULT_DBL}; +double value_for_illegal_operations = DEFAULT_DBL; +static nc_type datatype = MI_ORIGINAL_TYPE; +static char *filelist = NULL; +static char *expr_file = NULL; +char *expression = NULL; +static int eval_width = 200; #if MINC2 -int minc2_format = FALSE; +static int minc2_format = FALSE; #endif /* MINC2 */ /* Argument table */
--- a/progs/minccopy/minccopy.c +++ b/progs/minccopy/minccopy.c @@ -11,7 +11,11 @@ @CREATED : May 13, 1993 (Peter Neelin) @MODIFIED : * $Log: minccopy.c,v $ - * Revision 6.3 2006-05-19 00:35:58 bert + * Revision 6.4 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.3 2006/05/19 00:35:58 bert * Add config.h to several files that might need it * * Revision 6.2 2004/11/01 22:38:38 bert @@ -57,7 +61,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/minccopy/minccopy.c,v 6.3 2006-05-19 00:35:58 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/minccopy/minccopy.c,v 6.4 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -77,7 +81,7 @@ #endif /* Variables used for argument parsing */ -int copy_pixel_values = FALSE; +static int copy_pixel_values = FALSE; /* Argument table */ ArgvInfo argTable[] = {
--- a/progs/mincextract/mincextract.c +++ b/progs/mincextract/mincextract.c @@ -10,7 +10,11 @@ @CREATED : June 10, 1993 (Peter Neelin) @MODIFIED : * $Log: mincextract.c,v $ - * Revision 6.6 2006-05-19 00:35:58 bert + * Revision 6.7 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.6 2006/05/19 00:35:58 bert * Add config.h to several files that might need it * * Revision 6.5 2004/11/01 22:38:38 bert @@ -91,7 +95,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincextract/mincextract.c,v 6.6 2006-05-19 00:35:58 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincextract/mincextract.c,v 6.7 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -129,18 +133,18 @@ static int get_arg_vector(char *dst, char *key, char *nextArg); /* Variables used for argument parsing */ -int arg_odatatype = TYPE_ASCII; -nc_type output_datatype = NC_DOUBLE; -int output_signed = INT_MAX; -double valid_range[2] = {DBL_MAX, DBL_MAX}; -int normalize_output = TRUE; -double image_range[2] = {DBL_MAX, DBL_MAX}; -long hs_start[MAX_VAR_DIMS] = {LONG_MIN}; -long hs_count[MAX_VAR_DIMS] = {LONG_MIN}; -int xdirection = INT_MAX; -int ydirection = INT_MAX; -int zdirection = INT_MAX; -int default_direction = INT_MAX; +static int arg_odatatype = TYPE_ASCII; +static nc_type output_datatype = NC_DOUBLE; +static int output_signed = INT_MAX; +static double valid_range[2] = {DBL_MAX, DBL_MAX}; +static int normalize_output = TRUE; +static double image_range[2] = {DBL_MAX, DBL_MAX}; +static long hs_start[MAX_VAR_DIMS] = {LONG_MIN}; +static long hs_count[MAX_VAR_DIMS] = {LONG_MIN}; +static int xdirection = INT_MAX; +static int ydirection = INT_MAX; +static int zdirection = INT_MAX; +static int default_direction = INT_MAX; /* Argument table */ ArgvInfo argTable[] = {
--- a/progs/mincinfo/mincinfo.c +++ b/progs/mincinfo/mincinfo.c @@ -10,7 +10,11 @@ @CREATED : May 19, 1993 (Peter Neelin) @MODIFIED : * $Log: mincinfo.c,v $ - * Revision 6.8 2006-07-28 18:20:53 baghdadi + * Revision 6.9 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.8 2006/07/28 18:20:53 baghdadi * *** empty log message *** * * Revision 6.7 2006/07/28 17:51:01 baghdadi @@ -92,7 +96,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincinfo/mincinfo.c,v 6.8 2006-07-28 18:20:53 baghdadi Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincinfo/mincinfo.c,v 6.9 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -115,9 +119,9 @@ #define MAX_NUM_OPTIONS 100 /* Name of program, for error reporting */ -char* exec_name; +static char* exec_name; -char *type_names[] = { +static char *type_names[] = { NULL, "byte", "char", "short", "long", "float", "double" }; @@ -145,9 +149,9 @@ static int get_attname(int mincid, char *string, int *varid, char *name); static int print_image_info(char *filename, int mincid); /* Variables used for argument parsing */ -char *error_string = NULL; -Option_type option_list[MAX_NUM_OPTIONS] = {ENDLIST}; -int length_option_list = 0; +static char *error_string = NULL; +static Option_type option_list[MAX_NUM_OPTIONS] = {ENDLIST}; +static int length_option_list = 0; /* Argument table */ ArgvInfo argTable[] = {
--- a/progs/minclookup/minclookup.c +++ b/progs/minclookup/minclookup.c @@ -11,7 +11,11 @@ @CREATED : December 6, 1994 (Peter Neelin) @MODIFIED : * $Log: minclookup.c,v $ - * Revision 6.7 2005-08-26 21:07:17 bert + * Revision 6.8 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.7 2005/08/26 21:07:17 bert * Use #if rather than #ifdef with MINC2 symbol, and be sure to include config.h whereever MINC2 is used * * Revision 6.6 2004/12/03 21:57:08 bert @@ -75,7 +79,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/minclookup/minclookup.c,v 6.7 2005-08-26 21:07:17 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/minclookup/minclookup.c,v 6.8 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -200,23 +204,23 @@ }; /* Argument variables */ -int clobber = FALSE; -int verbose = TRUE; -nc_type datatype = MI_ORIGINAL_TYPE; -int is_signed = FALSE; -double valid_range[2] = {0.0, 0.0}; -int buffer_size = 10 * 1024; -char *lookup_file = NULL; -char *lookup_string = NULL; -Lookup_Type lookup_type = LU_GRAY; -int invert_table = FALSE; -double lookup_range[2] = {DEFAULT_RANGE, DEFAULT_RANGE}; -double lookup_min = DEFAULT_RANGE; -double lookup_max = DEFAULT_RANGE; -int discrete_lookup = FALSE; -char *null_value_string = NULL; +static int clobber = FALSE; +static int verbose = TRUE; +static nc_type datatype = MI_ORIGINAL_TYPE; +static int is_signed = FALSE; +static double valid_range[2] = {0.0, 0.0}; +static int buffer_size = 10 * 1024; +static char *lookup_file = NULL; +static char *lookup_string = NULL; +static Lookup_Type lookup_type = LU_GRAY; +static int invert_table = FALSE; +static double lookup_range[2] = {DEFAULT_RANGE, DEFAULT_RANGE}; +static double lookup_min = DEFAULT_RANGE; +static double lookup_max = DEFAULT_RANGE; +static int discrete_lookup = FALSE; +static char *null_value_string = NULL; #if MINC2 -int minc2_format = FALSE; +static int minc2_format = FALSE; #endif /* MINC2 */ /* Argument table */
--- a/progs/mincmakescalar/mincmakescalar.c +++ b/progs/mincmakescalar/mincmakescalar.c @@ -10,7 +10,11 @@ @CREATED : August 7, 1997 (Peter Neelin) @MODIFIED : * $Log: mincmakescalar.c,v $ - * Revision 6.7 2005-08-26 21:07:17 bert + * Revision 6.8 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.7 2005/08/26 21:07:17 bert * Use #if rather than #ifdef with MINC2 symbol, and be sure to include config.h whereever MINC2 is used * * Revision 6.6 2005/01/28 19:34:09 bert @@ -49,7 +53,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincmakescalar/mincmakescalar.c,v 6.7 2005-08-26 21:07:17 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincmakescalar/mincmakescalar.c,v 6.8 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -104,20 +108,20 @@ static long get_vector_length(int mincid); /* Argument variables */ -int clobber = FALSE; +static int clobber = FALSE; #if MINC2 -int v2format = FALSE; +static int v2format = FALSE; #endif /* MINC2 */ -int verbose = TRUE; -nc_type datatype = MI_ORIGINAL_TYPE; -int is_signed = FALSE; -double valid_range[2] = {0.0, 0.0}; -int buffer_size = 10 * 1024; -Conversion_Type conversion_type = CONV_DEFAULT; -Double_Array linear_coefficients = {0, NULL}; +static int verbose = TRUE; +static nc_type datatype = MI_ORIGINAL_TYPE; +static int is_signed = FALSE; +static double valid_range[2] = {0.0, 0.0}; +static int buffer_size = 10 * 1024; +static Conversion_Type conversion_type = CONV_DEFAULT; +static Double_Array linear_coefficients = {0, NULL}; /* Argument table */ -ArgvInfo argTable[] = { +static ArgvInfo argTable[] = { #if MINC2 {"-2", ARGV_CONSTANT, (char *) TRUE, (char *) &v2format, "Produce a MINC 2.0 format output file."}, @@ -168,7 +172,7 @@ {NULL, ARGV_END, NULL, NULL, NULL} }; -const char str_wrong_dimension_order[] = { +static const char str_wrong_dimension_order[] = { "Your input file contains an image with a vector dimension, but the\n" "vector dimension isn't the last (i.e. fastest-varying) dimension in\n" "the image. Please restructure the file using mincreshape before\n"
--- a/progs/mincmakevector/mincmakevector.c +++ b/progs/mincmakevector/mincmakevector.c @@ -11,7 +11,11 @@ @CREATED : August 11, 1997 (Peter Neelin) @MODIFIED : * $Log: mincmakevector.c,v $ - * Revision 6.7 2005-08-26 21:07:17 bert + * Revision 6.8 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.7 2005/08/26 21:07:17 bert * Use #if rather than #ifdef with MINC2 symbol, and be sure to include config.h whereever MINC2 is used * * Revision 6.6 2004/11/01 22:38:38 bert @@ -47,7 +51,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincmakevector/mincmakevector.c,v 6.7 2005-08-26 21:07:17 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincmakevector/mincmakevector.c,v 6.8 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -88,18 +92,18 @@ static long get_vector_length(int mincid); /* Argument variables */ -int clobber = FALSE; -int verbose = TRUE; +static int clobber = FALSE; +static int verbose = TRUE; #if MINC2 -int v2format = FALSE; +static int v2format = FALSE; #endif /* MINC2 */ -nc_type datatype = MI_ORIGINAL_TYPE; -int is_signed = FALSE; -double valid_range[2] = {0.0, 0.0}; -int buffer_size = 10 * 1024; +static nc_type datatype = MI_ORIGINAL_TYPE; +static int is_signed = FALSE; +static double valid_range[2] = {0.0, 0.0}; +static int buffer_size = 10 * 1024; /* Argument table */ -ArgvInfo argTable[] = { +static ArgvInfo argTable[] = { #if MINC2 {"-2", ARGV_CONSTANT, (char *) TRUE, (char *) &v2format, "Produce a MINC 2.0 format output file."},
--- a/progs/mincmath/mincmath.c +++ b/progs/mincmath/mincmath.c @@ -10,7 +10,11 @@ @CREATED : April 28, 1995 (Peter Neelin) @MODIFIED : * $Log: mincmath.c,v $ - * Revision 6.10 2005-08-26 21:07:17 bert + * Revision 6.11 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.10 2005/08/26 21:07:17 bert * Use #if rather than #ifdef with MINC2 symbol, and be sure to include config.h whereever MINC2 is used * * Revision 6.9 2004/12/14 23:40:07 bert @@ -81,7 +85,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincmath/mincmath.c,v 6.10 2005-08-26 21:07:17 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincmath/mincmath.c,v 6.11 2007-12-11 12:43:01 rotor Exp $"; #endif #define _GNU_SOURCE 1 @@ -197,29 +201,29 @@ static char **read_file_names(char *filelist, int *num_files); /* Argument variables */ -int clobber = FALSE; -int verbose = TRUE; -int debug = FALSE; -nc_type datatype = MI_ORIGINAL_TYPE; -int is_signed = FALSE; -double valid_range[2] = {0.0, 0.0}; -int copy_all_header = DEFAULT_BOOL; -char *loop_dimension = NULL; -int max_buffer_size_in_kb = 4 * 1024; -double constant = DEFAULT_DBL; -double constant2[2] = {DEFAULT_DBL, DEFAULT_DBL}; -Operation operation = UNSPECIFIED_OP; -int propagate_nan = TRUE; -int use_nan_for_illegal_values = TRUE; -double value_for_illegal_operations = DEFAULT_DBL; -int check_dim_info = TRUE; -char *filelist = NULL; +static int clobber = FALSE; +static int verbose = TRUE; +static int debug = FALSE; +static nc_type datatype = MI_ORIGINAL_TYPE; +static int is_signed = FALSE; +static double valid_range[2] = {0.0, 0.0}; +static int copy_all_header = DEFAULT_BOOL; +static char *loop_dimension = NULL; +static int max_buffer_size_in_kb = 4 * 1024; +static double constant = DEFAULT_DBL; +static double constant2[2] = {DEFAULT_DBL, DEFAULT_DBL}; +static Operation operation = UNSPECIFIED_OP; +static int propagate_nan = TRUE; +static int use_nan_for_illegal_values = TRUE; +static double value_for_illegal_operations = DEFAULT_DBL; +static int check_dim_info = TRUE; +static char *filelist = NULL; #if MINC2 -int minc2_format = FALSE; +static int minc2_format = FALSE; #endif /* MINC2 */ /* Argument table */ -ArgvInfo argTable[] = { +static ArgvInfo argTable[] = { {NULL, ARGV_HELP, (char *) NULL, (char *) NULL, "General options:"}, #if MINC2
--- a/progs/mincstats/mincstats.c +++ b/progs/mincstats/mincstats.c @@ -1,11 +1,15 @@ /* mincstats.c * - * Andrew Janke - rotor@cmr.uq.edu.au + * Andrew Janke - a.janke@gmail.com * Centre for Magnetic Resonance * University of Queensland, Australia * * $Log: mincstats.c,v $ - * Revision 1.23 2007-09-27 01:06:31 rotor + * Revision 1.24 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 1.23 2007/09/27 01:06:31 rotor * * bugfix to histogram stats with a zero volume, discovered by Simon, fixed by * Claude * @@ -267,7 +271,7 @@ int file_ndims = 0; /* Argument table */ -ArgvInfo argTable[] = { +static ArgvInfo argTable[] = { {NULL, ARGV_HELP, (char *)NULL, (char *)NULL, "General options:"}, {"-verbose", ARGV_CONSTANT, (char *)TRUE, (char *)&verbose, "Print out extra information."},
--- a/progs/minctoraw/minctoraw.c +++ b/progs/minctoraw/minctoraw.c @@ -10,7 +10,11 @@ @CREATED : February 11, 1993 (Peter Neelin) @MODIFIED : * $Log: minctoraw.c,v $ - * Revision 6.9 2006-05-19 00:35:58 bert + * Revision 6.10 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.9 2006/05/19 00:35:58 bert * Add config.h to several files that might need it * * Revision 6.8 2004/11/01 22:38:39 bert @@ -85,7 +89,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/minctoraw/minctoraw.c,v 6.9 2006-05-19 00:35:58 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/minctoraw/minctoraw.c,v 6.10 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -108,13 +112,13 @@ #define BOOLEAN_DEFAULT -1 /* Variables used for argument parsing */ -int output_datatype = INT_MAX; -int output_signed = INT_MAX; -double valid_range[2] = {DBL_MAX, DBL_MAX}; -int normalize_output = BOOLEAN_DEFAULT; +static int output_datatype = INT_MAX; +static int output_signed = INT_MAX; +static double valid_range[2] = {DBL_MAX, DBL_MAX}; +static int normalize_output = BOOLEAN_DEFAULT; /* Argument table */ -ArgvInfo argTable[] = { +static ArgvInfo argTable[] = { {"-byte", ARGV_CONSTANT, (char *) NC_BYTE, (char *) &output_datatype, "Write out data as bytes"}, {"-short", ARGV_CONSTANT, (char *) NC_SHORT, (char *) &output_datatype,
--- a/progs/mincwindow/mincwindow.c +++ b/progs/mincwindow/mincwindow.c @@ -10,7 +10,11 @@ @CREATED : January 10, 1994 (Peter Neelin) @MODIFIED : * $Log: mincwindow.c,v $ - * Revision 6.4 2005-08-26 21:07:18 bert + * Revision 6.5 2007-12-11 12:43:01 rotor + * * added static to all global variables in main programs to avoid linking + * problems with libraries (compress in mincconvert and libz for example) + * + * Revision 6.4 2005/08/26 21:07:18 bert * Use #if rather than #ifdef with MINC2 symbol, and be sure to include config.h whereever MINC2 is used * * Revision 6.3 2004/11/01 22:38:39 bert @@ -70,7 +74,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincwindow/mincwindow.c,v 6.4 2005-08-26 21:07:18 bert Exp $"; +static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincwindow/mincwindow.c,v 6.5 2007-12-11 12:43:01 rotor Exp $"; #endif #if HAVE_CONFIG_H @@ -108,14 +112,14 @@ Loop_Info *loop_info); /* Argument variables */ -int clobber = FALSE; -int verbose = TRUE; +static int clobber = FALSE; +static int verbose = TRUE; #if MINC2 -int v2format = FALSE; +static int v2format = FALSE; #endif /* MINC2 */ /* Argument table */ -ArgvInfo argTable[] = { +static ArgvInfo argTable[] = { #if MINC2 {"-2", ARGV_CONSTANT, (char *) TRUE, (char *) &v2format, "Produce a MINC 2.0 format output file."},