#ifndef __STSDEF_LOADED #define __STSDEF_LOADED 1 /* * - VMS Status codes * * Copyright 1993, 1994 Digital Equipment Corporation. All rights reserved. * * DEC C for OpenVMS VAX * DEC C++ for OpenVMS VAX */ #if defined(__DECC) || defined(__DECCXX) #pragma __nostandard /* This file uses non-ANSI-Standard features */ #else #pragma nostandard #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #else #define __unknown_params #endif #if !defined(__VAXC) && !defined(VAXC) #define __struct struct #define __union union #else #define __struct variant_struct #define __union variant_union #endif #define STS$M_SEVERITY 0x7 #define STS$M_COND_ID 0xFFFFFF8 #define STS$M_CONTROL 0x0 #define STS$M_SUCCESS 0x1 #define STS$M_MSG_NO 0xFFF8 #define STS$M_CODE 0x7FF8 #define STS$M_FAC_SP 0x8000 #define STS$M_CUST_DEF 0x8000000 #define STS$M_INHIB_MSG 0x10000000 #define STS$M_FAC_NO 0xFFF0000 #define STS$K_WARNING 0 /* WARNING */ #define STS$K_SUCCESS 1 /* SUCCESSFUL COMPLETION */ #define STS$K_ERROR 2 /* ERROR */ #define STS$K_INFO 3 /* INFORMATION */ #define STS$K_SEVERE 4 /* SEVERE ERROR */ union stsdef { __struct { unsigned sts$v_severity : 3; /* severity code */ unsigned sts$v_cond_id : 25; /* condition id */ unsigned sts$v_control : 4; /* control bits */ } sts$r_stsdef_bits0; __struct { unsigned sts$v_success : 1; /* Success */ unsigned stsdef$$_fill_1 : 2; /* skip severity field */ unsigned sts$v_msg_no : 13; /* Message number */ } sts$r_stsdef_bits1; __struct { unsigned stsdef$$_fill_2 : 3; /* Skip severity field */ unsigned sts$v_code : 12; /* code */ unsigned sts$v_fac_sp : 1; /* 1 if facility specific */ unsigned stsdef$$_fill_3 : 11; unsigned sts$v_cust_def : 1; /* 1 if sub-system is customer (or CSS) defined */ unsigned sts$v_inhib_msg : 1; /* 1 if message should not be printed */ unsigned stsdef$$_fill_4 : 3; /* reserved control bits */ } sts$r_stsdef_bits2; __struct { unsigned stsdef$$_fill_5 : 16; /* Skip message nubmer field */ unsigned sts$v_fac_no : 12; /* Facility is 12 bits */ unsigned stsdef$$_fill_6 : 4; /* Control bits */ } sts$r_stsdef_bits3; } ; #if !defined(__VAXC) && !defined(VAXC) #define sts$v_severity sts$r_stsdef_bits0.sts$v_severity #define sts$v_cond_id sts$r_stsdef_bits0.sts$v_cond_id #define sts$v_control sts$r_stsdef_bits0.sts$v_control #define sts$v_success sts$r_stsdef_bits1.sts$v_success #define sts$v_msg_no sts$r_stsdef_bits1.sts$v_msg_no #define sts$v_code sts$r_stsdef_bits2.sts$v_code #define sts$v_fac_sp sts$r_stsdef_bits2.sts$v_fac_sp #define sts$v_cust_def sts$r_stsdef_bits2.sts$v_cust_def #define sts$v_inhib_msg sts$r_stsdef_bits2.sts$v_inhib_msg #define sts$v_fac_no sts$r_stsdef_bits3.sts$v_fac_no #endif #define STS$S_CODE 0x0C #define STS$S_COND_ID 0x19 #define STS$S_CONTROL 0x04 #define STS$S_FAC_NO 0x0C #define STS$S_MSG_NO 0x0D #define STS$S_SEVERITY 0x03 #define STS$V_CODE 0x03 #define STS$V_COND_ID 0x03 #define STS$V_CONTROL 0x1C #define STS$V_CUST_DEF 0x1B #define STS$V_FAC_NO 0x10 #define STS$V_FAC_SP 0x0F #define STS$V_INHIB_MSG 0x1C #define STS$V_MSG_NO 0x03 #define STS$V_SEVERITY 0x00 #define STS$V_SUCCESS 0x00 /* Define MACROS to extract individual fields from a status value */ #define $VMS_STATUS_CODE(code) ( ( (code) & STS$M_CODE ) >> STS$V_CODE ) #define $VMS_STATUS_COND_ID(code) ( ( (code) & STS$M_COND_ID ) >> STS$V_COND_ID ) #define $VMS_STATUS_CONTROL(code) ( ( (code) & STS$M_CONTROL ) >> STS$V_CONTROL ) #define $VMS_STATUS_CUST_DEF(code) ( ( (code) & STS$M_CUST_DEF ) >> STS$V_CUST_DEF ) #define $VMS_STATUS_FAC_NO(code) ( ( (code) & STS$M_FAC_NO ) >> STS$V_FAC_NO ) #define $VMS_STATUS_FAC_SP(code) ( ( (code) & STS$M_FAC_SP ) >> STS$V_FAC_SP ) #define $VMS_STATUS_INHIB_MSG(code) ( ( (code) & STS$M_INHIB_MSG ) >> STS$V_INHIB_MSG ) #define $VMS_STATUS_MSG_NO(code) ( ( (code) & STS$M_MSG_NO ) >> STS$V_MSG_NO ) #define $VMS_STATUS_SEVERITY(code) ( ( (code) & STS$M_SEVERITY ) >> STS$V_SEVERITY ) #define $VMS_STATUS_SUCCESS(code) ( ( (code) & STS$M_SUCCESS ) >> STS$V_SUCCESS ) #ifdef __cplusplus } #endif #if defined(__DECC) || defined(__DECCXX) #pragma __standard /* This file uses non-ANSI-Standard features */ #else #pragma standard #endif #endif /* __STSDEF_LOADED */