1 /* Begin include file . . . lsm_formats.incl.pl1 */
 2 
 3 /* CONSTANTS */
 4 
 5 dcl (LSM_version_7 initial (7),                             /* current version, root is always symtab */
 6      LSM_version_6 initial (6))                             /* root wasn't automatically symtab */
 7      fixed bin static options (constant);
 8 
 9 dcl 1 lsm_constants aligned static options (constant),
10     2 n_types fixed bin initial (9),
11     2 types,
12       3 indirect_type initial (1),
13       3 fixed_type initial (2),
14       3 float_type initial (3),
15       3 bit_type initial (4),
16       3 char_type initial (5),
17       3 symtab_type initial (6),
18       3 symbol_type initial (7),
19       3 list_type initial (8),
20       3 array_type initial (9),
21     2 data_length_factors (9) initial (1, 1, 1, 36, 4, 1, 1, 1, 1),
22     2 max_allocation fixed bin initial (4095),
23     2 initial_component_slots fixed bin initial (8);
24 
25 dcl  lsm_segptr pointer;
26 
27 dcl 1 lsm aligned based (lsm_segptr),                       /* declaration of head of lsm_ segment */
28     2 version fixed bin,                                    /* number of lsm_ version that created this seg */
29     2 free fixed bin (18),                                  /* word number of first free word in seg */
30     2 root_symtab fixed bin (18),                           /* node number of the root symbol table */
31     2 lock bit (36) aligned,
32     2 component_slots fixed bin,
33     2 components fixed bin,
34     2 pad (26) fixed bin (18),
35     2 component_ptrs (lsm_constants.initial_component_slots refer (lsm.component_slots)) pointer unaligned;
36 
37 
38 /* Formats of different node types used by lsm_ */
39 
40 dcl  node_ptr pointer;
41 
42 dcl 1 header aligned based (node_ptr),                      /* Used in all formats below */
43     2 type fixed bin (6) unsigned unaligned,                /* type of node */
44     2 allocated_len fixed bin (12) unsigned unaligned,      /* allocated length of data space */
45     2 data_len fixed bin (18) unsigned unaligned;           /* current length of data in block */
46                                                             /* (in appropriate units) */
47 
48 dcl 1 any_node aligned based (node_ptr),                    /* general node description */
49     2 header like header aligned,
50     2 data_space (0 refer (any_node.allocated_len)) bit (36) aligned;
51 
52 dcl 1 indirect_node aligned based (node_ptr),               /* internal to lsm_ */
53     2 header like header,
54     2 new_node fixed bin (18);                              /* numberof reallocated node */
55 
56 dcl 1 fixed_node aligned based (node_ptr),                  /* array of fixed bin (35) */
57     2 header like header,
58     2 element (0 refer (fixed_node.data_len)) fixed bin (35); /* array of values */
59 
60 dcl 1 float_node aligned based (node_ptr),                  /* array of float binary (27) */
61     2 header like header,
62     2 element (0 refer (float_node.data_len)) float bin (27);
63 
64 dcl 1 bit_node aligned based (node_ptr),                    /* string of bits */
65     2 header like header,
66     2 string bit (0 refer (bit_node.data_len));             /* bit string of max length */
67 
68 dcl 1 char_node aligned based (node_ptr),                   /* string of characters */
69     2 header like header,
70     2 string char (0 refer (char_node.data_len)) unaligned; /* character string of max length */
71 
72 dcl 1 symtab_node aligned based (node_ptr),                 /* symbol table node */
73     2 header like header,
74     2 bucket_root (0 : 1 refer (symtab_node.data_len)) fixed bin (18);
75                                                             /* actually, it is (0 : data_len - 1), but there's no way to do */
76                                                             /* this with a refer option, and it's invalid not to use refer */
77 
78 dcl 1 symbol_node aligned based (node_ptr),                 /* symbol node */
79     2 header like header,
80     2 name_node fixed bin (18),                             /* number of character string node containing symbol name */
81     2 value_node fixed bin (18),                            /* number of node that is the "value" of this symbol */
82     2 next_node fixed bin (18);                             /* number of next symbol node in this bucket chain */
83                                                             /* =0 if this is last node o chain */
84 
85 dcl 1 list_node aligned based (node_ptr),                   /* non-terminal list node */
86     2 header like header,
87     2 node (0 refer (list_node.data_len)) fixed bin (18);   /* numbers of nodes comprising this list */
88 
89 dcl 1 array_node aligned based (node_ptr),                  /* non-terminal list with terminal properties */
90     2 header like header,
91     2 node (0 refer (array_node.data_len)) fixed bin (18);  /* numbers of nodes comprising this array */
92 
93 
94 /* End include file . . . lsm_formats.incl.pl1 */