--- trunk/OOPSE-4/src/utils/simError.h 2004/09/24 04:16:43 1490 +++ trunk/OOPSE-4/src/utils/simError.h 2005/07/13 15:54:00 2263 @@ -1,6 +1,7 @@ + #ifndef __FORTRAN90 -#ifndef __SIMERROR_H__ -#define __SIMERROR_H__ +#ifndef UTILS_SIMERROR_H +#define UTILS_SIMERROR_H #define MAX_SIM_ERROR_MSG_LENGTH 2000 @@ -14,7 +15,7 @@ typedef struct{ int severity; #ifdef IS_MPI int isEventLoop; -#endif // IS_MPI +#endif } errorStruct; extern errorStruct painCave; @@ -28,43 +29,43 @@ extern "C" { #ifdef __cplusplus extern "C" { -#endif // __cplusplus +#endif - int simError( void ); // returns 1 if handled. 0 otherwise. + int simError( void ); - void initSimError( void ); // needed to be called from main before anything - // goes wrong. + void initSimError( void ); + #ifdef IS_MPI void MPIcheckPoint( void ); -#endif // IS_MPI +#endif #ifdef __cplusplus } -#endif //__cplusplus +#endif -#endif // __SIMERROR_H__ +#endif -#else // __FORTRAN90 +#else INTEGER, PARAMETER:: OOPSE_ERROR = 1 INTEGER, PARAMETER:: OOPSE_WARNING = 2 INTEGER, PARAMETER:: OOPSE_INFO = 3 INTEGER, PARAMETER:: MAX_SIM_ERROR_MSG_LENGTH = 2000 -type, public :: errorStruct - PRIVATE - SEQUENCE - character(len = MAX_SIM_ERROR_MSG_LENGTH) :: errMsg - logical :: isFatal - integer :: severity + type, public :: errorStruct + PRIVATE + SEQUENCE + character(len = MAX_SIM_ERROR_MSG_LENGTH) :: errMsg + logical :: isFatal + integer :: severity #ifdef IS_MPI - logical :: isEventLoop; -#endif // IS_MPI -end type errorStruct + logical :: isEventLoop; +#endif + end type errorStruct -type (errorStruct), public, save :: painCave + type (errorStruct), public, save :: painCave -#endif // __FORTRAN90 +#endif