summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_utils.h
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-05-11 20:10:25 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-05-11 20:10:25 (GMT)
commit68fa42f3360945d07a0443289025a6a91618aac5 (patch)
treeca90a2cf0244915347d531bddd78e7e7d898825d /tools/lib/h5tools_utils.h
parentfe49632588af7cafdd220998be6006d91ed0247c (diff)
downloadhdf5-68fa42f3360945d07a0443289025a6a91618aac5.zip
hdf5-68fa42f3360945d07a0443289025a6a91618aac5.tar.gz
hdf5-68fa42f3360945d07a0443289025a6a91618aac5.tar.bz2
[svn-r18759] pull r18757 from 1.8 branch
Enable tools lib to be built as a dll on windows. Added two get/set functions for progname and d_status. Also add windows import/export declarations to functions. Updated error_mesg() and warn_mesg() to remove progname argument and use get functions Tested: Windows, linux
Diffstat (limited to 'tools/lib/h5tools_utils.h')
-rw-r--r--tools/lib/h5tools_utils.h39
1 files changed, 23 insertions, 16 deletions
diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h
index dcd8f2b..3720afd 100644
--- a/tools/lib/h5tools_utils.h
+++ b/tools/lib/h5tools_utils.h
@@ -24,12 +24,16 @@
#include "hdf5.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* begin get_option section
*/
-extern int opt_err; /* getoption prints errors if this is on */
-extern int opt_ind; /* token pointer */
-extern const char *opt_arg; /* flag argument (or value) */
+H5TOOLS_DLLVAR int opt_err; /* getoption prints errors if this is on */
+H5TOOLS_DLLVAR int opt_ind; /* token pointer */
+H5TOOLS_DLLVAR const char *opt_arg; /* flag argument (or value) */
enum {
no_arg = 0, /* doesn't take an argument */
@@ -72,7 +76,7 @@ typedef struct long_options {
* this gets returned from get_option */
} long_options;
-extern int get_option(int argc, const char **argv, const char *opt,
+H5TOOLS_DLL int get_option(int argc, const char **argv, const char *opt,
const struct long_options *l_opt);
/*
* end get_option section
@@ -101,25 +105,24 @@ typedef struct find_objs_t {
table_t *dset_table;
} find_objs_t;
-extern int nCols; /*max number of columns for outputting */
+H5TOOLS_DLLVAR int nCols; /*max number of columns for outputting */
/* Definitions of useful routines */
-extern void indentation(int);
-extern void print_version(const char *progname);
-extern void error_msg(const char *progname, const char *fmt, ...);
-extern void warn_msg(const char *progname, const char *fmt, ...);
-extern void free_table(table_t *table);
+H5TOOLS_DLL void indentation(int);
+H5TOOLS_DLL void print_version(const char *progname);
+H5TOOLS_DLL void error_msg(const char *fmt, ...);
+H5TOOLS_DLL void warn_msg(const char *fmt, ...);
+H5TOOLS_DLL void free_table(table_t *table);
#ifdef H5DUMP_DEBUG
-extern void dump_tables(find_objs_t *info)
+H5TOOLS_DLL void dump_tables(find_objs_t *info)
#endif /* H5DUMP_DEBUG */
-extern herr_t init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
+H5TOOLS_DLL herr_t init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
table_t **dset_table, table_t **type_table);
-extern obj_t *search_obj(table_t *temp, haddr_t objno);
+H5TOOLS_DLL obj_t *search_obj(table_t *temp, haddr_t objno);
#ifndef H5_HAVE_TMPFILE
-extern FILE * tmpfile(void);
+H5TOOLS_DLL FILE * tmpfile(void);
#endif
-
/*************************************************************
*
* candidate functions to be public
@@ -148,6 +151,10 @@ typedef struct {
/* Definitions of routines */
-extern int H5tools_get_link_info(hid_t file_id, const char * linkpath, h5tool_link_info_t *link_info);
+H5TOOLS_DLL int H5tools_get_link_info(hid_t file_id, const char * linkpath, h5tool_link_info_t *link_info);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* H5TOOLS_UTILS_H__ */