/*///////////////////////////////////////////////////////////*/ /**/ /* Management of the Module : Mrc*/ /**/ /* File Name : ErrMrc.h*/ /* Date : 97/07/21*/ /* Author : Yan Marchal*/ /**/ /*///////////////////////////////////////////////////////////*/ /**/ /* abbreviation of the module-name. Used in macro is 'Mrc'*/ /**/ /*///////////////////////////////////////////////////////////*/ #ifndef __ERRMRC_H__ #define __ERRMRC_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define C_szMrcVersion "MRC V1.0.0" /* The format is XXX Va.b.c with Xxx is the Tag of the module */ #define C_szMrcFullName "MRC BigFile"/* the complete and clear name of the module */ #define C_szMrcDate __DATE__ /*The format is "Mmm dd yyyy".You can use __DATE__ but be careful that you have the control of the compilation*/ /* For DLLs who are using this module : */ #undef CPA_EXPORT #if defined(CPA_WANTS_IMPORT) #define CPA_EXPORT __declspec(dllimport) #elif defined(CPA_WANTS_EXPORT) #define CPA_EXPORT __declspec(dllexport) #else #define CPA_EXPORT #endif #include "ERM.h" #define __FATAL_ERR_MRC__ #define __WARNING1_ERR_MRC__ #define __WARNING2_ERR_MRC__ #define __WARNING3_ERR_MRC__ /*----------*/ /* Constant */ /*----------*/ /* error of the Mrc Module*/ typedef enum e_uwMrcErrNumber_{ E_uwMrcFatalErr, #ifdef __FATAL_ERR_MRC__ /* -----------------*/ #endif /*__FATAL_ERR_MRC__*/ E_uwMrcStartOfWarning,/* important constant, it allows to recognize if an error is fatal or not.*/ #ifdef __WARNING1_ERR_MRC__ /* -------------------*/ E_uwMrcWarningCanNotAlloc, E_uwMrcWarningCanNotFree, E_uwMrcWarningCanNotInitBlock, E_uwMrcWarningCanNotFreeBlock, E_uwMrcWarningCanNotDeleteBlock, E_uwMrcWarningBigFileNotFound, E_uwMrcWarningBigFileSyntax, E_uwMrcWarningFileNotFound, E_uwMrcWarningInvalidPath, E_uwMrcWarningCannotOpen, E_uwMrcWarningCannotClose, E_uwMrcWarningCannotRead, E_uwMrcWarningCannotWrite, E_uwMrcWarningBadParameters, E_uwMrcWarningEOF, E_uwMrcWarningAsyncLaunch, E_uwMrcWarningFileNotReady, E_uwMrcWarningUnknown, E_uwMrcWarningNone, #endif /*__WARNING1_ERR_MRC__*/ #ifdef __WARNING2_ERR_MRC__ /* -------------------*/ #endif /*__WARNING2_ERR_MRC__*/ #ifdef __WARNING3_ERR_MRC__ /* -------------------*/ #endif /*__WARNING3_ERR_MRC__*/ E_uwMrcErrNumber } e_uwMrcErrNumber; /*------------------*/ /* Global Variables*/ /*------------------*/ #undef __ERRMRC_EXTERN #ifndef __DeclareGlobalVariableErrMrc_h__ #define __ERRMRC_EXTERN extern /*external declaration*/ #else /*__DeclareGlobalVariableErrMrc_h__*/ #define __ERRMRC_EXTERN /*replace by nothing : we have to declare*/ #endif /*__DeclareGlobalVariableErrMrc_h__*/ __ERRMRC_EXTERN CPA_EXPORT unsigned char g_ucMrcModuleId /*number of identification of the Erm module*/ #if defined(__DeclareGlobalVariableErrMrc_h__) && !defined(CPA_WANTS_IMPORT) = C_ucModuleNotInitialized #endif /*__DeclareGlobalVariableErrMrc_h__&& CPA_WANTS_IMPORT*/ ; #ifdef __ERROR_STRINGS__ __ERRMRC_EXTERN CPA_EXPORT char * g_a_szMrcInformationModule [] #if defined(__DeclareGlobalVariableErrMrc_h__) && !defined(CPA_WANTS_IMPORT) = {C_szMrcVersion, C_szMrcFullName, C_szMrcDate} #endif /*__DeclareGlobalVariableErrMrc_h__ && CPA_WANTS_IMPORT*/ ; __ERRMRC_EXTERN CPA_EXPORT char * g_szMrcModuleName /* Mandatory syntax 'g_sz'+[Abbreviation of ModuleName]+'ModuleName'*/ #if defined(__DeclareGlobalVariableErrMrc_h__) && !defined(CPA_WANTS_IMPORT) = "Module Mrc" #endif /*__DeclareGlobalVariableErrMrc_h__ && CPA_WANTS_IMPORT*/ ; __ERRMRC_EXTERN CPA_EXPORT struct tdstErrorMsg_ g_a_stMrcTabErr [] /* Mandatory syntax 'g_a_st'+[Abbreviation of ModuleName]+'TabErr'*/ #if defined(__DeclareGlobalVariableErrMrc_h__) && !defined(CPA_WANTS_IMPORT) ={ #ifdef __FATAL_ERR_MRC__ /* -------------*/ #endif /*__FATAL_ERR_MRC__*/ #ifdef __WARNING1_ERR_MRC__ /* ----------------*/ E_uwMrcWarningCanNotAlloc, "Failed in allocating memory", E_uwMrcWarningCanNotFree, "Failed in freeing memory", E_uwMrcWarningCanNotInitBlock, "Failed in initializing a static block of memory", E_uwMrcWarningCanNotFreeBlock, "Failed in reinitializing a static block of memory", E_uwMrcWarningCanNotDeleteBlock, "Failed in deleting a static block of memory", E_uwMrcWarningBigFileNotFound, "Big File not found", E_uwMrcWarningBigFileSyntax, "Syntax error in big file", E_uwMrcWarningFileNotFound, "File not found", E_uwMrcWarningInvalidPath, "Invalid path", E_uwMrcWarningCannotOpen, "Cannot open a file", E_uwMrcWarningCannotClose, "Cannot close a file", E_uwMrcWarningCannotRead, "Cannot read a file", E_uwMrcWarningCannotWrite, "Cannot write a file", E_uwMrcWarningBadParameters, "Bad parameters", E_uwMrcWarningEOF, "End of file encountered", E_uwMrcWarningAsyncLaunch, "Asynchronous launch", E_uwMrcWarningUnknown, "Unknown error", E_uwMrcWarningNone, "Everything's fine", #endif /*__WARNING1_ERR_MRC__*/ #ifdef __WARNING2_ERR_MRC__ /* ----------------*/ #endif /*__WARNING2_ERR_MRC__*/ #ifdef __WARNING3_ERR_MRC__ /* ----------------*/ #endif /*__WARNING3_ERR_MRC__*/ 0xFFFF, "\0"/*fin*/ }; #endif /*__DeclareGlobalVariableErrMrc_h__ && CPA_WANTS_IMPORT*/ ; #endif /*__ERROR_STRINGS__*/ #ifdef __cplusplus }; #endif /* __cplusplus */ #endif /*__ERRMRC_H__*/