/* * * Descriptor definitions, based on Starlet. Use instead. */ #ifndef _DSCDEF_H #define _DSCDEF_H /* Define Procedure argument data types */ #define DSC$K_DTYPE_Z 0 /* Unspecified; assume correct type. */ #define DSC$K_DTYPE_V 1 /* Bit; an aligned bit string */ #define DSC$K_DTYPE_BU 2 /* Byte Logical. 8-bit unsigned quantity */ #define DSC$K_DTYPE_WU 3 /* Word Logical. 16-bit unsigned quantity */ #define DSC$K_DTYPE_LU 4 /* Longword Logical. 32-bit unsigned quantity */ #define DSC$K_DTYPE_QU 5 /* Quadword Logical. 64-bit unsigned quantity */ #define DSC$K_DTYPE_OU 25 /* Octaword Logical. 128-bit unsigned quantity */ #define DSC$K_DTYPE_B 6 /* Byte Integer. 8-bit signed 2's-complement */ #define DSC$K_DTYPE_W 7 /* Word Integer. 16-bit signed 2's-complement */ #define DSC$K_DTYPE_L 8 /* Longword Integer. 32-bit signed 2's-complement */ #define DSC$K_DTYPE_Q 9 /* Quadword Integer. 64-bit signed 2's-complement */ #define DSC$K_DTYPE_O 26 /* Octaword Integer. 128-bit signed 2's-complement */ #define DSC$K_DTYPE_F 10 /* F_floating. 32-bit F_floating (single-precision) */ #define DSC$K_DTYPE_D 11 /* D_floating. 64-bit D_floating (double-precision) */ #define DSC$K_DTYPE_G 27 /* G_floating. 64-bit G_floating (double-precision) */ #define DSC$K_DTYPE_H 28 /* H_floating. 128-bit H_floating (quadruple-precision) */ #define DSC$K_DTYPE_FC 12 /* F_floating complex. */ #define DSC$K_DTYPE_DC 13 /* D_floating complex. */ #define DSC$K_DTYPE_GC 29 /* G_floating complex. */ #define DSC$K_DTYPE_HC 30 /* H_floating complex. */ #define DSC$K_DTYPE_CIT 31 /* COBOL Intermediate Temporary. (section 7.4 of SRM Appendix C) */ #define DSC$K_DTYPE_VU 34 /* Bit Unaligned. */ /* The following string types are ordinarily described by a string */ /* descriptor. The data type codes below occur in those descriptors: */ #define DSC$K_DTYPE_T 14 /* Character-coded text. (ordinary string) */ #define DSC$K_DTYPE_VT 37 /* Varying Character-coded Text Data Type. */ #define DSC$K_DTYPE_T2 38 /* 16-bit Text (Asian workstations) */ #define DSC$K_DTYPE_NU 15 /* Numeric string, unsigned. */ #define DSC$K_DTYPE_NL 16 /* Numeric string, left separate sign. */ #define DSC$K_DTYPE_NLO 17 /* Numeric string, left overpunched sign. */ #define DSC$K_DTYPE_NR 18 /* Numeric string, right separate sign. */ #define DSC$K_DTYPE_NRO 19 /* Numeric string, right overpunched sign. */ #define DSC$K_DTYPE_NZ 20 /* Numeric string, zoned sign. */ #define DSC$K_DTYPE_P 21 /* Packed decimal string. */ /* The following encodings are used for miscellaneous data types: */ #define DSC$K_DTYPE_ZI 22 /* Sequence of instructions. */ #define DSC$K_DTYPE_ZEM 23 /* Procedure entry mask. */ #define DSC$K_DTYPE_DSC 24 /* Descriptor. */ #define DSC$K_DTYPE_BPV 32 /* Bound Procedure Value. */ #define DSC$K_DTYPE_BLV 33 /* Bound label value. */ #define DSC$K_DTYPE_ADT 35 /* Absolute Date and Time */ /* DSC$K_DTYPE_??? 36 \* DTYPE code 36 is reserved for future definition */ #ifndef NO_VMS_V6 #define DSC$K_DTYPE_FS 52 /* 32-bit S_float IEEE single precision */ #define DSC$K_DTYPE_FT 53 /* 64-bit T_float IEEE double precision */ #define DSC$K_DTYPE_FSC 54 /* 64-bit S_complex IEEE */ #define DSC$K_DTYPE_FTC 55 /* 128-bit T_complex IEEE */ #define DSC$K_DTYPE_FX 57 /* 128-bit X_float IEEE quadruple precision */ #define DSC$K_DTYPE_FXC 58 /* 256-bit X_complex IEEE */ #endif /* The following types are used by the VAX/VMS Debug Facility: */ #define DSC$K_DTYPE_CAD 178 /* Address calculation command (see $DSTDEF) */ #define DSC$K_DTYPE_ENT 179 /* Entry global definition */ #define DSC$K_DTYPE_GBL 180 /* Global symbol definition */ #define DSC$K_DTYPE_EPT 181 /* Entry point to routine. */ #define DSC$K_DTYPE_R11 182 /* Line number relative to R11 correlation table. */ #define DSC$K_DTYPE_FLD 183 /* BLISS FIELD name. */ #define DSC$K_DTYPE_PCT 184 /* PSECT information. */ #define DSC$K_DTYPE_DPC 185 /* PC correlation table for FORTRAN IV+ */ #define DSC$K_DTYPE_LBL 186 /* LITERAL or LABEL */ #define DSC$K_DTYPE_SLB 187 /* Label in non-assembly language modules */ #define DSC$K_DTYPE_MOD 188 /* Beginning of new module */ #define DSC$K_DTYPE_EOM 189 /* End of module */ #define DSC$K_DTYPE_RTN 190 /* Beginning of new routine */ #define DSC$K_DTYPE_EOR 191 /* End of routine */ /* The following type codes are RESERVED for future use: 37-177 RESERVED to DEC 192-255 RESERVED to CSS and customers */ /* Define the descriptor class codes */ #define DSC$K_CLASS_Z 0 /* Unspecified */ #define DSC$K_CLASS_S 1 /* Scalar, String Descriptor */ #define DSC$K_CLASS_D 2 /* Dynamic String Descriptor */ #define DSC$K_CLASS_V 3 /* Reserved for use by Digital */ #define DSC$K_CLASS_A 4 /* Array Descriptor */ #define DSC$K_CLASS_P 5 /* Procedure Descriptor */ #define DSC$K_CLASS_PI 6 /* Procedure Incarnation Descriptor */ #define DSC$K_CLASS_J 7 /* Reserved for use by Digital */ #define DSC$K_CLASS_JI 8 /* Obsolete */ #define DSC$K_CLASS_SD 9 /* Decimal Scalar String Descriptor */ #define DSC$K_CLASS_NCA 10 /* Non-contiguous Array Descriptor */ #define DSC$K_CLASS_VS 11 /* Varying String Descriptor */ #define DSC$K_CLASS_VSA 12 /* Varying String Array Descriptor */ #define DSC$K_CLASS_UBS 13 /* Unaligned Bit String Descriptor */ #define DSC$K_CLASS_UBA 14 /* Unaligned Bit Array Descriptor */ #define DSC$K_CLASS_SB 15 /* String with Bounds Descriptor */ #define DSC$K_CLASS_UBSB 16 /* Unaligned Bit String with Bounds Descriptor */ /* The following descriptor class is FOR INTERNAL USE ONLY by RTL and debugger */ #define DSC$K_CLASS_BFA 191 /* BASIC File Array Descriptor */ /* Descriptor classes 17-190 are RESERVED to DEC. Classes 192 through 255 are RESERVED to CSS and customers. */ /* * Array Descriptor (DSC$K_CLASS_A) An array descriptor consists of 3 contiguous blocks. The first block contains the descriptor prototype information and is part of every array descriptor. The second and third blocks are optional. If the third block is present then so is the second. A complete array descriptor has the form: +-------+-------+---------------+ | 4 | DTYPE | LENGTH | :Descriptor +-------+-------+---------------+ | POINTER | +-------+-------+---------------+ | DIMCT | AFLAGS|DIGITS | SCALE | Block 1 - Prototype +-------+-------+---------------+ | ARSIZE | +-------------------------------+ +-------------------------------+ | A0 | +-------------------------------+ | M1 | +-------------------------------+ | ... | Block 2 - Multipliers +-------------------------------+ | M(n-1) | +-------------------------------+ | Mn | +-------------------------------+ +-------------------------------+ | L1 | +-------------------------------+ | U1 | +-------------------------------+ | ... | Block 3 - Bounds +-------------------------------+ | Ln | +-------------------------------+ | Un | +-------------------------------+ * */ struct dscdef { /* WARNING: aggregate has origin of -12 */ /* following three fields are only valid for descriptor class DSC$K_CLASS_BFA */ int *dsc$a_handle; /* The address of a vector of data concerning the current state of processing of */ /* the array. This is set to zero by the creator of the descriptor, and maintained */ /* thereafter by the BASIC file array processing functions. */ unsigned long dsc$l_byteoff; /* Byte offset in the file of element 0,0,...,0 of the array. This need not be within */ /* the array, or even within the file if the array does not have zero origin. */ unsigned long dsc$l_logunit; /* The logical unit number (BASIC channel) on which the file containing the array has been */ /* opened. This is set by the creator of the descriptor before first referencing the array. */ /* end of BASIC File Array specific descriptor fields; rest are common to all arrays */ unsigned short dsc$w_length; /* A one-word field specifiec to the descriptor class; typically a 16-bit (unsigned) length. */ }; struct dscdef1 { unsigned short dsc$w_maxstrlen; /* Max length of the BODY field of the varying string */ /* in bytes in the range 0 to 2**16-1. (Classes VS, VSA) */ unsigned char dsc$b_dtype; /* one-byte atomic data type code */ unsigned char dsc$b_class; /* one-byte descriptor class code */ char *dsc$a_pointer; /* longword pointing to the first byte of the data */ }; #define DSC$K_Z_BLN 8 /* block length in bytes for Z class descr */ #define DSC$C_Z_BLN 8 #define DSC$K_S_BLN 8 /* block length in bytes for S class descr */ #define DSC$C_S_BLN 8 #define DSC$K_D_BLN 8 /* block length in bytes for D class descr */ #define DSC$C_D_BLN 8 #define DSC$K_P_BLN 8 /* block length in bytes for P class descr */ #define DSC$C_P_BLN 8 #define DSC$K_J_BLN 8 /* block length in bytes for J class descr */ #define DSC$C_J_BLN 8 #define DSC$K_VS_BLN 8 /* block length in bytes for VS class descr */ #define DSC$C_VS_BLN 8 struct dscdef2 { unsigned short dsc$w_length; /* max length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ void *dsc$a_base; /* Base of address relative to which the signed relative */ /* bit position, POS, is used to locate the bit string. */ /* (Classes UBS, UBA and UBSB) */ }; /* Unaligned bit string definitions. */ #define DSC$K_UBS_BLN 12 /* block length in bytes for UBS class descr */ #define DSC$C_UBS_BLN 12 struct dscdef3 { unsigned short dsc$w_length; /* max length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ void *dsc$a_base; /* base address */ unsigned long dsc$l_pos; /* Signed longword relative bit position with respect */ /* to BASE of the first bit of unaligned bit string */ /* Do not use this field to reference class UBA descriptors! The DSC$L_POS in that */ /* descriptor is at a variable location after the bounds and multiplier blocks. */ }; /* Varying type descriptor definitions [this is bogus for varying strings] */ #define DSC$K_SD_BLN 12 /* block length in bytes for SD class descr */ #define DSC$C_SD_BLN 12 struct dscdef4 { unsigned short dsc$w_length; /* max length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ void *dsc$a_base; /* base address */ unsigned short dsc$w_maxlen; /* An unsigned word specifying the maximum length */ /* of the data item (i.e., the space allocated) */ unsigned : 16; /* short fill; reserved word */ }; /* Array Descriptor definitions */ struct dscdef5 { unsigned short dsc$w_length; /* max length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ void *dsc$a_base; /* base address */ char dsc$b_scale; /* signed power of ten multiplier */ unsigned char dsc$b_digits; /* If non-zero, unsigned number of decimal digits in the external representation. */ /* If zero, the number of digits can be computed based on DSC$W_LENGTH. */ union { unsigned char dsc$b_aflags; /* array flag bits */ struct { unsigned : 4; /* reserved to Digital */ unsigned dsc$v_fl_redim : 1; /* If set, the array can be redimensioned; i.e., DSC$A_A0, DSC$L_Mi, */ /* DSC$L_Li, and DSC$L_Ui may be changed. The redimensioned array */ /* cannot exceed the size allocated to the array (i.e. DSC$L_ARSIZE). */ unsigned dsc$v_fl_column : 1; /* If set, the elements of the array are stored by columns (FORTRAN). */ /* Otherwise the elements are stored by rows. */ unsigned dsc$v_fl_coeff : 1; /* If set, the multiplicative coefficients in Block 2 are present. */ unsigned dsc$v_fl_bounds : 1; /* If set, the bounds information in Block 3 is present. */ } dsc$r_aflags_bits; } dsc$r_aflags_overlay; unsigned char dsc$b_dimct; /* number of dimensions */ unsigned long dsc$l_arsize; /* total size of array (in bytes unless DTYPE is V or P) */ int *dsc$a_a0; /* Address of element A(0,0,...,0). This need not be within the */ /* actual array; it is the same as DSC$A_POINTER for 0-origin arrays. */ }; struct dscdef6 { unsigned short dsc$w_length; /* max length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ void *dsc$a_base; /* base address */ char dsc$b_scale; unsigned char dsc$b_digits; union { unsigned char dsc$b_aflags; struct { unsigned : 4; unsigned dsc$v_fl_redim : 1; unsigned dsc$v_fl_column : 1; unsigned dsc$v_fl_coeff : 1; unsigned dsc$v_fl_bounds : 1; } dsc$r_aflags_bits; } dsc$r_aflags_overlay; unsigned char dsc$b_dimct; /* number of dimensions */ unsigned long dsc$l_arsize; /* total size of array */ unsigned long dsc$l_v0; /* signed bit offset of element A(0,0,...0) */ /* The following two fields have meaning only if the array is of */ /* class DSC$K_CLASS_NCA (Non-contiguous array). */ unsigned long dsc$l_s1; /* Stride of the first dimension, i.e. the difference between */ /* the addresses of successive elements of the first dimension. */ unsigned long dsc$l_s2; /* Stride of the second dimension. */ }; struct dscdef7 { unsigned short dsc$w_length; /* max length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ void *dsc$a_base; /* base address */ char dsc$b_scale; unsigned char dsc$b_digits; union { unsigned char dsc$b_aflags; struct { unsigned : 4; unsigned dsc$v_fl_redim : 1; unsigned dsc$v_fl_column : 1; unsigned dsc$v_fl_coeff : 1; unsigned dsc$v_fl_bounds : 1; } dsc$r_aflags_bits; } dsc$r_aflags_overlay; unsigned char dsc$b_dimct; unsigned long dsc$l_arsize; unsigned long dsc$l_v0; unsigned long dsc$l_m1; /* addressing coefficient M1 = U1-L1+1 */ unsigned long dsc$l_m2; /* addressing coefficient M2 = U2-L2+1 */ }; /* Procedure Incarnation descriptor (DSC$K_CLASS_PI) */ /* and Label Incarnation descriptor (DSC$K_CLASS_JI). */ #define DSC$K_PI_BLN 12 /* block length in bytes for PI class descr */ #define DSC$C_PI_BLN 12 #define DSC$K_JI_BLN 12 /* block length in bytes for JI class descr */ #define DSC$C_JI_BLN 12 struct dscdef8 { unsigned short dsc$w_length; /* max length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ void *dsc$a_base; /* base address */ int *dsc$a_frame; /* address of frame */ }; /* String with Bounds descriptor (DSC$K_CLASS_SB). */ struct dscdef9 { unsigned short dsc$w_length; /* max length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ char *dsc$a_base; /* base address */ long dsc$l_sb_l1; /* signed lower bound of first dimension */ long dsc$l_sb_u1; /* signed upper bound of first dimension */ }; /* Unaligned Bit String with Bounds descriptor (DSC$K_CLASS_UBSB). */ struct dscdef10 { unsigned short dsc$w_length; /* max length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ void *dsc$a_base; /* base address */ unsigned long dsc$l_pos; /* bit offset from base */ long dsc$l_ubsb_l1; /* signed lower bound of first dimension */ long dsc$l_ubsb_u1; /* signed upper bound of first dimension */ }; #endif /*_DSCDEF_H*/