diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-02-28 18:19:05 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-02-28 18:19:05 (GMT) |
commit | 808a5e6be1b7f1025c6b1182e160cefbce0f8e68 (patch) | |
tree | 59eabaf3e7991d5791b83dbaa0d5797fc5e44ae9 /src/H5private.h | |
parent | 0b4d32bb4a12fe0e34026c0f069aa99bf34cd834 (diff) | |
download | hdf5-808a5e6be1b7f1025c6b1182e160cefbce0f8e68.zip hdf5-808a5e6be1b7f1025c6b1182e160cefbce0f8e68.tar.gz hdf5-808a5e6be1b7f1025c6b1182e160cefbce0f8e68.tar.bz2 |
[svn-r302] Changes since 19980227
----------------------
./html/Errors.html [NEW]
./html/H5.user.html
./MANIFEST
Documents the new error handling interface and gives examples.
./src/H5.c
./src/H5private.h
./src/H5Apublic.h
./src/H5E.c
./src/H5Eprivate.h
./src/H5Epublic.h
Rewrote error handling. Got rid of `push' overloading and
added a few API functions. The error stack is statically
allocated and not entered into H5A, simplifying error handling
within the error handler. Rudimentary support for threads.
Changed the names of some errors.
./src/H5G.c
./src/H5Gnode.c
./src/H5H.c
./src/H5O.c
./src/H5T.c
Changed H5ECLEAR to H5E_clear().
./src/Makefile.in
Alphabetized source list.
./test/dsets.c
Turned off error reporting around functions that are expected
to fail. Error messages are sent to stdout.
./test/testhdf5.c
./test/testhdf5.h
Turned off automatic error reporting since this file mostly
calls internal functions and does its own error reporting.
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/H5private.h b/src/H5private.h index 1fc944b..49437cc 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -421,11 +421,15 @@ extern char *strdup(const char *s); extern hbool_t library_initialize_g; /*good thing C's lazy about extern! */ extern hbool_t thread_initialize_g; /*don't decl interface_initialize_g */ -#define PRINT(N,S) { \ +/* Print S on file N followed by a newline */ +#define H5_PRINT(N,S) { \ write ((N), (S), strlen((S))); \ write ((N), "\n", 1); \ } +/* Is `S' the name of an API function? */ +#define H5_IS_API(S) ('_'!=S[2] && '_'!=S[3] && (!S[4] || '_'!=S[4])) + #define FUNC_ENTER(func_name,err) FUNC_ENTER_INIT(func_name,INTERFACE_INIT,err) #define FUNC_ENTER_INIT(func_name,interface_init_func,err) { \ @@ -463,10 +467,9 @@ extern hbool_t thread_initialize_g; /*don't decl interface_initialize_g */ } \ \ /* Clear thread error stack entering public functions */ \ - if (H5E_clearable_g && '_'!=FUNC[2] && '_'!=FUNC[3] && \ - (!FUNC[4] || '_'!=FUNC[4])) { \ - PRINT (55, #func_name); \ - H5Eclear (H5E_thrdid_g); \ + if (H5E_clearable_g && H5_IS_API (FUNC)) { \ + H5_PRINT (55, #func_name); \ + H5E_clear (); \ } \ { |