diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1997-07-30 21:17:56 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1997-07-30 21:17:56 (GMT) |
commit | 03997b1f368f935ab4b3a9a878fd3587cbc74862 (patch) | |
tree | 193909bb46d7310f8ea8d31308cddc8850530220 /src/hdf5gen.h | |
parent | ad9255a57faca8454d0a5f2f955001eed32833ea (diff) | |
download | hdf5-03997b1f368f935ab4b3a9a878fd3587cbc74862.zip hdf5-03997b1f368f935ab4b3a9a878fd3587cbc74862.tar.gz hdf5-03997b1f368f935ab4b3a9a878fd3587cbc74862.tar.bz2 |
[svn-r2] Oops...
Diffstat (limited to 'src/hdf5gen.h')
-rw-r--r-- | src/hdf5gen.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/hdf5gen.h b/src/hdf5gen.h new file mode 100644 index 0000000..4d01685 --- /dev/null +++ b/src/hdf5gen.h @@ -0,0 +1,49 @@ +/**************************************************************************** + * NCSA HDF * + * Software Development Group * + * National Center for Supercomputing Applications * + * University of Illinois at Urbana-Champaign * + * 605 E. Springfield, Champaign IL 61820 * + * * + * For conditions of distribution and use, see the accompanying * + * hdf/COPYING file. * + * * + ****************************************************************************/ + +/* $Id$ */ + +/* + * This file contains general macros used throughout HDF5 library & interfaces + */ + +#ifndef HDF5GEN_H +#define HDF5GEN_H + +/* return code - since some unix/c routines use 0 and -1 as their return + code, and some assumption had been made in the code about that, it is + important to keep these constants the same values. For explicitly + boolean functions, use TRUE and FALSE */ + +#define SUCCEED 0 +#define FAIL (-1) + +/* boolean values, reminder: NEVER compare with numeric values */ + +#ifndef FALSE +# define FALSE 0 +#endif +#ifndef TRUE +# define TRUE (!FALSE) +#endif + +/* Function entry & exit macros */ +#define FUNC_ENTER(pablo_mask,pablo_func_id,interface_init_func,err) \ + { PABLO_TRACE_ON(pablo_mask,pablo_func_id); \ + if(library_initialize==FALSE) if(H5_init_library()==FAIL) HGOTO_ERROR(H5E_FUNC,H5E_CANTINIT,err); \ + if(thread_initialize==FALSE) if(H5_init_thread()==FAIL) HGOTO_ERROR(H5E_FUNC,H5E_CANTINIT,err); \ + if(interface_initialize==FALSE) if(interface_init_func()==FAIL) HGOTO_ERROR(H5E_FUNC,H5E_CANTINIT,err); } +#define FUNC_LEAVE(pablo_mask,pablo_func_id,return_value) \ + { PABLO_TRACE_OFF(pablo_mask,pablo_func_id); return(return_value); } + +#endif /* HDF5GEN_H */ + |