From 5c2734ec514de41c773de7b22027eeff8fd2dace Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 14 May 2010 16:53:41 -0500 Subject: [svn-r18815] Move progname and d_status functions from h5tools to h5tools_util Tested: linux and windows --- tools/lib/h5tools.c | 30 ------------------------------ tools/lib/h5tools.h | 4 ---- tools/lib/h5tools_utils.c | 30 ++++++++++++++++++++++++++++++ tools/lib/h5tools_utils.h | 4 ++++ 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index ff0437c..cce7d47 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -42,8 +42,6 @@ FILE *rawdatastream; /* should initialize to stdout but gcc moans about it int bin_output; /* binary output */ int bin_form; /* binary form */ int region_output; /* region output */ -static int h5tools_d_status = 0; -static const char *h5tools_progname = "h5tools"; #ifdef H5_HAVE_H5DUMP_PACKED_BITS int packed_bits_num; /* number of packed bits to display */ int packed_normalize; /* number of bits to shift right to display normalized */ @@ -290,34 +288,6 @@ enum { /*------------------------------------------------------------------------- * Audience: Public * Chapter: H5Tools Library - * Purpose: Initialize the name and operation status of the H5 Tools library - * Description: - * These are utility functions to set/get the program name and operation status. - *------------------------------------------------------------------------- - */ -void h5tools_setprogname(const char *Progname) -{ - h5tools_progname = Progname; -} - -void h5tools_setstatus(int D_status) -{ - h5tools_d_status = D_status; -} - -const char*h5tools_getprogname() -{ - return h5tools_progname; -} - -int h5tools_getstatus() -{ - return h5tools_d_status; -} - -/*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library * Purpose: Initialize the H5 Tools library * Description: * This should be called before any other h5tools function is called. diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 9d2d9e6..b44948a 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -542,10 +542,6 @@ H5TOOLS_DLLVAR int region_output; /* region output */ #define H5_TOOLS_DATATYPE "DATATYPE" /* Definitions of useful routines */ -H5TOOLS_DLL const char *h5tools_getprogname(void); -H5TOOLS_DLL void h5tools_setprogname(const char*progname); -H5TOOLS_DLL int h5tools_getstatus(void); -H5TOOLS_DLL void h5tools_setstatus(int d_status); H5TOOLS_DLL void h5tools_init(void); H5TOOLS_DLL void h5tools_close(void); H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index a51a286..0913501 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -39,6 +39,8 @@ int nCols = 80; int opt_err = 1; /*get_option prints errors if this is on */ int opt_ind = 1; /*token pointer */ const char *opt_arg; /*flag argument (or value) */ +static int h5tools_d_status = 0; +static const char *h5tools_progname = "h5tools"; /* local functions */ static void init_table(table_t **tbl); @@ -758,3 +760,31 @@ out: return Ret; } + +/*------------------------------------------------------------------------- + * Audience: Public + * Chapter: H5Tools Library + * Purpose: Initialize the name and operation status of the H5 Tools library + * Description: + * These are utility functions to set/get the program name and operation status. + *------------------------------------------------------------------------- + */ +void h5tools_setprogname(const char *Progname) +{ + h5tools_progname = Progname; +} + +void h5tools_setstatus(int D_status) +{ + h5tools_d_status = D_status; +} + +const char*h5tools_getprogname() +{ + return h5tools_progname; +} + +int h5tools_getstatus() +{ + return h5tools_d_status; +} diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index 438ca64..9e0b0d0 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -152,6 +152,10 @@ typedef struct { /* Definitions of routines */ H5TOOLS_DLL int H5tools_get_link_info(hid_t file_id, const char * linkpath, h5tool_link_info_t *link_info); +H5TOOLS_DLL const char *h5tools_getprogname(void); +H5TOOLS_DLL void h5tools_setprogname(const char*progname); +H5TOOLS_DLL int h5tools_getstatus(void); +H5TOOLS_DLL void h5tools_setstatus(int d_status); #ifdef __cplusplus } -- cgit v0.12