diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1998-01-16 22:23:43 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1998-01-16 22:23:43 (GMT) |
commit | c2c94c31878dc42926661c9cb7e71be620196fc1 (patch) | |
tree | ee9ce2ae309882348dc1eafc1d105b5e6646605e /src/H5Eprivate.h | |
parent | 903e677366a86ea385d5cfe1241f3f53132941de (diff) | |
download | hdf5-c2c94c31878dc42926661c9cb7e71be620196fc1.zip hdf5-c2c94c31878dc42926661c9cb7e71be620196fc1.tar.gz hdf5-c2c94c31878dc42926661c9cb7e71be620196fc1.tar.bz2 |
[svn-r157] Reformatted code with indent...
Diffstat (limited to 'src/H5Eprivate.h')
-rw-r--r-- | src/H5Eprivate.h | 87 |
1 files changed, 42 insertions, 45 deletions
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index 8e809c4..2b0ce4e 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -36,24 +36,24 @@ Assume that func and file are both stored in static space, or at least be not corrupted in the meanwhile. */ -#define HERROR(maj, min, str) H5Epush (H5E_thrdid_g, maj, min, \ - FUNC, __FILE__, __LINE__, str) +#define HERROR(maj, min, str) H5Epush (H5E_thrdid_g, maj, min, \ + FUNC, __FILE__, __LINE__, str) /* HRETURN_ERROR macro, used to facilitate error reporting. Makes same assumptions as HERROR. IN ADDITION, this macro causes a return from the calling routine */ -#define HRETURN_ERROR(maj, min, ret_val, str) { \ - HERROR (maj, min, str); \ - PABLO_TRACE_OFF (PABLO_MASK, pablo_func_id); \ - return (ret_val); \ +#define HRETURN_ERROR(maj, min, ret_val, str) { \ + HERROR (maj, min, str); \ + PABLO_TRACE_OFF (PABLO_MASK, pablo_func_id); \ + return (ret_val); \ } /* HRETURN macro, similar to HRETURN_ERROR() except for success */ -#define HRETURN(ret_val) { \ - PABLO_TRACE_OFF (PABLO_MASK, pablo_func_id); \ - return (ret_val); \ +#define HRETURN(ret_val) { \ + PABLO_TRACE_OFF (PABLO_MASK, pablo_func_id); \ + return (ret_val); \ } /* HGOTO_ERROR macro, used to facilitate error reporting. Makes @@ -61,10 +61,10 @@ a jump to the label 'done' which should be in every fucntion Also there is an assumption of a variable 'ret_value' */ -#define HGOTO_ERROR(maj, min, ret_val, str) { \ - HERROR (maj, min, str); \ - ret_value = ret_val; \ - goto done; \ +#define HGOTO_ERROR(maj, min, ret_val, str) { \ + HERROR (maj, min, str); \ + ret_value = ret_val; \ + goto done; \ } /* HGOTO_DONE macro, used to facilitate the new error reporting model. @@ -80,28 +80,28 @@ #define H5ECLEAR H5Eclear(H5E_thrdid_g) /* Maximum length of function name to push onto error stack */ -#define MAX_FUNC_NAME 32 +#define MAX_FUNC_NAME 32 /* * error_messages is the list of error messages in the system, kept as * error_code-message pairs. */ typedef struct H5E_major_mesg_t { - H5E_major_t error_code; - const char *str; + H5E_major_t error_code; + const char *str; } H5E_major_mesg_t; typedef struct H5E_minor_mesg_t { - H5E_minor_t error_code; - const char *str; + H5E_minor_t error_code; + const char *str; } H5E_minor_mesg_t; /* Function pointer to report errors through */ -struct H5E_t; /*forward decl*/ -typedef herr_t (*H5E_push_t)(struct H5E_t *estack, H5E_major_t maj_num, - H5E_minor_t min_num, const char *function_name, - const char *file_name, intn line, - const char *desc); +struct H5E_t; /*forward decl */ +typedef herr_t (*H5E_push_t) (struct H5E_t *estack, H5E_major_t maj_num, + H5E_minor_t min_num, const char *function_name, + const char *file_name, intn line, + const char *desc); /* * We use a stack to hold the errors plus we keep track of the function, file @@ -110,34 +110,31 @@ typedef herr_t (*H5E_push_t)(struct H5E_t *estack, H5E_major_t maj_num, /* the structure of the error stack element */ typedef struct H5E_error_t { - H5E_major_t maj_num; /* Major error number */ - H5E_minor_t min_num; /* Minor error number */ - char func_name[MAX_FUNC_NAME]; /* function where error occur */ - const char *file_name; /* file where error occur */ - intn line; /* line in file where error occurs */ - char *desc; /* optional supplied description */ + H5E_major_t maj_num; /* Major error number */ + H5E_minor_t min_num; /* Minor error number */ + char func_name[MAX_FUNC_NAME]; /* function where error occur */ + const char *file_name; /* file where error occur */ + intn line; /* line in file where error occurs */ + char *desc; /* optional supplied description */ } H5E_error_t; /* Structure to store error information for a thread */ typedef struct H5E_t { - uintn nelmts; /* Num elements allocated in the stack */ - uintn top; /* Index of the next open stack element */ - H5E_error_t *stack; /* Pointer to the error stack */ - H5E_push_t push; /* Func that pushes new error on stack */ + uintn nelmts; /* Num elements allocated in the stack */ + uintn top; /* Index of the next open stack element */ + H5E_error_t *stack; /* Pointer to the error stack */ + H5E_push_t push; /* Func that pushes new error on stack */ } H5E_t; /* Private global variables in H5E.c */ -extern hid_t H5E_thrdid_g; /* Thread-specific "global" error-handler ID */ -extern hbool_t install_atexit; /* Whether to install the atexit routine */ - -herr_t H5E_close (H5E_t *estack); -herr_t H5E_clear (H5E_t *estack); -herr_t H5E_print (H5E_t *estack, FILE *file); -herr_t H5E_push (H5E_t *estack, H5E_major_t maj_num, H5E_minor_t min_num, - const char *function_name, const char *file_name, intn line, - const char *desc); - - - +extern hid_t H5E_thrdid_g; /* Thread-specific "global" error-handler ID */ +extern hbool_t install_atexit; /* Whether to install the atexit routine */ + +herr_t H5E_close(H5E_t *estack); +herr_t H5E_clear(H5E_t *estack); +herr_t H5E_print(H5E_t *estack, FILE * file); +herr_t H5E_push(H5E_t *estack, H5E_major_t maj_num, H5E_minor_t min_num, + const char *function_name, const char *file_name, intn line, + const char *desc); #endif |