00001 #ifndef stsdef_h 00002 #define stsdef_h 00003 00004 #define STS_M_SEVERITY 0x7 00005 #define STS_M_COND_ID 0xFFFFFF8 00006 #define STS_M_CONTROL 0xF0000000 00007 #define STS_M_SUCCESS 0x1 00008 #define STS_M_MSG_NO 0xFFF8 00009 #define STS_M_CODE 0x7FF8 00010 #define STS_M_FAC_SP 0x8000 00011 #define STS_M_CUST_DEF 0x8000000 00012 #define STS_M_INHIB_MSG 0x10000000 00013 #define STS_M_FAC_NO 0xFFF0000 00014 #define STS_K_WARNING 0 00015 #define STS_K_SUCCESS 1 00016 #define STS_K_ERROR 2 00017 #define STS_K_INFO 3 00018 #define STS_K_SEVERE 4 00019 00020 union _stsdef { 00021 struct { 00022 unsigned sts_v_severity : 3; 00023 unsigned sts_v_cond_id : 25; 00024 unsigned sts_v_control : 4; 00025 }; 00026 struct { 00027 unsigned sts_v_success : 1; 00028 unsigned stsdef_$_fill_1 : 2; 00029 unsigned sts_v_msg_no : 13; 00030 }; 00031 struct { 00032 unsigned stsdef_$_fill_2 : 3; 00033 unsigned sts_v_code : 12; 00034 unsigned sts_v_fac_sp : 1; 00035 unsigned stsdef_$_fill_3 : 11; 00036 unsigned sts_v_cust_def : 1; 00037 unsigned sts_v_inhib_msg : 1; 00038 unsigned stsdef_$_fill_4 : 3; 00039 }; 00040 struct { 00041 unsigned stsdef_$_fill_5 : 16; 00042 unsigned sts_v_fac_no : 12; 00043 unsigned stsdef_$_fill_6 : 4; 00044 }; 00045 }; 00046 00047 #define STS_S_CODE 0x0C 00048 #define STS_S_COND_ID 0x19 00049 #define STS_S_CONTROL 0x04 00050 #define STS_S_FAC_NO 0x0C 00051 #define STS_S_MSG_NO 0x0D 00052 #define STS_S_SEVERITY 0x03 00053 #define STS_V_CODE 0x03 00054 #define STS_V_COND_ID 0x03 00055 #define STS_V_CONTROL 0x1C 00056 #define STS_V_CUST_DEF 0x1B 00057 #define STS_V_FAC_NO 0x10 00058 #define STS_V_FAC_SP 0x0F 00059 #define STS_V_INHIB_MSG 0x1C 00060 #define STS_V_MSG_NO 0x03 00061 #define STS_V_SEVERITY 0x00 00062 #define STS_V_SUCCESS 0x00 00063 00064 #define _VMS_STATUS_CODE(code) ( ( (code) & STS$M_CODE ) >> STS$V_CODE ) 00065 #define _VMS_STATUS_COND_ID(code) ( ( (code) & STS$M_COND_ID ) >> STS$V_COND_ID ) 00066 #define _VMS_STATUS_CONTROL(code) ( ( (code) & STS$M_CONTROL ) >> STS$V_CONTROL ) 00067 #define _VMS_STATUS_CUST_DEF(code) ( ( (code) & STS$M_CUST_DEF ) >> STS$V_CUST_DEF ) 00068 #define _VMS_STATUS_FAC_NO(code) ( ( (code) & STS$M_FAC_NO ) >> STS$V_FAC_NO ) 00069 #define _VMS_STATUS_FAC_SP(code) ( ( (code) & STS$M_FAC_SP ) >> STS$V_FAC_SP ) 00070 #define _VMS_STATUS_INHIB_MSG(code) ( ( (code) & STS$M_INHIB_MSG ) >> STS$V_INHIB_MSG ) 00071 #define _VMS_STATUS_MSG_NO(code) ( ( (code) & STS$M_MSG_NO ) >> STS$V_MSG_NO ) 00072 #define _VMS_STATUS_SEVERITY(code) ( ( (code) & STS$M_SEVERITY ) >> STS$V_SEVERITY ) 00073 #define _VMS_STATUS_SUCCESS(code) ( ( (code) & STS$M_SUCCESS ) >> STS$V_SUCCESS ) 00074 00075 #endif 00076 00077