--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:30 by OpenVMS SDL EV3-3 -- Source: 21-APR-1993 16:22:29 $1$DGA8085:[LIB_ADA.LIS]NMBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package NMBDEF is -- module $NMBDEF --+ -- -- FORMAT OF THE FILE NAME BLOCK. THE FILE NAME BLOCK IS USED AS AN INTERNAL -- INTERFACE TO THE DIRECTORY SCAN ROUTINE, AND IS ALSO THE FORMAT OF A -- DIRECTORY RECORD. -- --- NMB_K_DIRENTRY : constant := 16; -- LENGTH OF DIRECTORY ENTRY NMB_C_DIRENTRY : constant := 16; -- LENGTH OF DIRECTORY ENTRY NMB_M_ALLVER : constant := 16#00000008#; NMB_M_ALLTYP : constant := 16#00000010#; NMB_M_ALLNAM : constant := 16#00000020#; NMB_M_WILD : constant := 16#00000100#; NMB_M_NEWVER : constant := 16#00000200#; NMB_M_SUPERSEDE : constant := 16#00000400#; NMB_M_FINDFID : constant := 16#00000800#; NMB_M_LOWVER : constant := 16#00004000#; NMB_M_HIGHVER : constant := 16#00008000#; NMB_K_LENGTH : constant := 40; -- LENGTH OF NAME BLOCK NMB_C_LENGTH : constant := 40; -- LENGTH OF NAME BLOCK NMB_S_NMBDEF : constant := 40; type NMB_FID_COMPONENT_TYPE is -- FILE ID record FID_NUM : UNSIGNED_WORD; -- FID - FILE NUMBER FID_SEQ : UNSIGNED_WORD; -- FID - FILE SEQUENCE NUMBER FID_RVN : UNSIGNED_WORD; -- FID - RELATIVE VOLUME NUMBER end record; for NMB_FID_COMPONENT_TYPE use record FID_NUM at 0 range 0 .. 15; FID_SEQ at 2 range 0 .. 15; FID_RVN at 4 range 0 .. 15; end record; for NMB_FID_COMPONENT_TYPE'SIZE use 48; NMB_FID_COMPONENT_TYPE_INIT : constant NMB_FID_COMPONENT_TYPE := (FID_NUM => 0, FID_SEQ => 0, FID_RVN => 0); TYPE NMB_FID_TYPE is ARRAY (1 .. 3) of NMB_FID_COMPONENT_TYPE; NMB_FID_TYPE_INIT : constant NMB_FID_TYPE := ( others => NMB_FID_COMPONENT_TYPE_INIT); type NMB_FLAGS_TYPE is -- NAME STATUS FLAGS record FILLER_1 : UNSIGNED_3; ALLVER : BOOLEAN; -- MATCH ALL VERSIONS ALLTYP : BOOLEAN; -- MATCH ALL TYPES ALLNAM : BOOLEAN; -- MATCH ALL NAMES FILLER_2 : UNSIGNED_2; WILD : BOOLEAN; -- WILD CARDS IN FILE NAME NEWVER : BOOLEAN; -- MAXIMIZE VERSION NUMBER SUPERSEDE : BOOLEAN; -- SUPERSEDE EXISTING FILE FINDFID : BOOLEAN; -- SEARCH FOR FILE ID FILLER_3 : UNSIGNED_2; LOWVER : BOOLEAN; -- LOWER VERSION OF FILE EXISTS HIGHVER : BOOLEAN; -- HIGHER VERSION OF FILE EXISTS end record; for NMB_FLAGS_TYPE use record FILLER_1 at 0 range 0 .. 2; ALLVER at 0 range 3 .. 3; ALLTYP at 0 range 4 .. 4; ALLNAM at 0 range 5 .. 5; FILLER_2 at 0 range 6 .. 7; WILD at 1 range 0 .. 0; NEWVER at 1 range 1 .. 1; SUPERSEDE at 1 range 2 .. 2; FINDFID at 1 range 3 .. 3; FILLER_3 at 1 range 4 .. 5; LOWVER at 1 range 6 .. 6; HIGHVER at 1 range 7 .. 7; end record; for NMB_FLAGS_TYPE'SIZE use 16; NMB_FLAGS_TYPE_INIT : constant NMB_FLAGS_TYPE := (FILLER_1 => 0, ALLVER => FALSE, ALLTYP => FALSE, ALLNAM => FALSE, FILLER_2 => 0, WILD => FALSE, NEWVER => FALSE, SUPERSEDE => FALSE, FINDFID => FALSE, FILLER_3 => 0, LOWVER => FALSE, HIGHVER => FALSE); type NMB_ASCNAME_TYPE is record ASCNAMSIZ : UNSIGNED_BYTE; ASCNAMTXT : STRING(1 .. 19); end record; for NMB_ASCNAME_TYPE use record ASCNAMSIZ at 0 range 0 .. 7; ASCNAMTXT at 1 range 0 .. 151; end record; for NMB_ASCNAME_TYPE'SIZE use 160; NMB_ASCNAME_TYPE_INIT : constant NMB_ASCNAME_TYPE := (ASCNAMSIZ => 0, ASCNAMTXT => (others => ASCII.NUL)); type NMB_TYPE is record FID : NMB_FID_COMPONENT_TYPE; -- FILE ID NAME : UNSIGNED_WORD_ARRAY (1 .. 3); -- FILE NAME (RAD-50) TYP : UNSIGNED_WORD; -- FILE TYPE (RAD-50) VERSION : INTEGER_16; -- VERSION NUMBER FLAGS : NMB_FLAGS_TYPE; -- NAME STATUS FLAGS ASCNAME : NMB_ASCNAME_TYPE; CONTEXT : UNSIGNED_WORD; -- START POINT FOR NEXT FIND end record; for NMB_TYPE use record FID at 0 range 0 .. 47; NAME at 6 range 0 .. 47; TYP at 12 range 0 .. 15; VERSION at 14 range 0 .. 15; FLAGS at 16 range 0 .. 15; ASCNAME at 18 range 0 .. 159; CONTEXT at 38 range 0 .. 15; end record; for NMB_TYPE'SIZE use 320; NMB_TYPE_INIT : constant NMB_TYPE := ( FID => NMB_FID_COMPONENT_TYPE_INIT, NAME => (others => 0), TYP => 0, VERSION => 0, FLAGS => NMB_FLAGS_TYPE_INIT, ASCNAME => NMB_ASCNAME_TYPE_INIT, CONTEXT => 0); end NMBDEF;