1 /* ^L */
 2 /* BEGIN INCLUDE ...............imp_dim_buf ........... */
 3 
 4 /* For IMP DIM. */
 5 
 6 /* Following variables are for buffer management */
 7 
 8 dcl 1 imp_data$buf external aligned,
 9 
10     2 (max_buf,
11      max_buf_in_use,
12      no_buf_in_use) fixed bin (34);
13 
14 /* Pageable buffer segment. */
15 
16 
17 
18 
19 dcl  imp_dim_buf_$ ext aligned;                             /* Name of the buffer segment */
20 dcl  bp pointer;                                            /* Pointer used to refer to buffer segment. */
21 
22 dcl 1 bs based (bp) aligned,                                /* Strcture of the buffer segment */
23     2 buf (0: 273) aligned,                                 /* Array of buffer headers. */
24                                                             /* Never use buffer zero buf(0) (avoid zero address ) */
25       3 bufdummy (1: 8) fixed bin (35),                     /* Each header is eight words long */
26 
27     2 message (273) bit (8352) aligned;                     /* Array of 8352 bit buffers. 8352 = 232 *36, 232=8*29 */
28 
29 
30 
31 dcl  bufferp pointer;                                       /* Always use this to refer to a buffer */
32 dcl 1 buffer aligned based (bufferp),                       /* Structure of a buffer header */
33     2 lock bit (36) aligned,                                /* If buffer in use this lock is set */
34     2 rel fixed bin (18),                                   /* Address of the data associated with this buffer */
35     2 length fixed bin (17),                                /* Maximum length of this buffer in bits */
36     2 data_offset fixed bin (17),                           /* offset of current data in bits */
37     2 data_length fixed bin (17),                           /* Length of message in number of bits. */
38     2 bufferqthread aligned,                                /* thread for a chain of buffers */
39         4 forward bit (18) unaligned,                       /* points to next buffer */
40         4 backward bit (18) unaligned,                      /* points to previous buffer */
41     2 message_count fixed binary,                           /* number of messages in this buffer */
42     2 complete_message bit (1) aligned;                     /* If on, a complete message is saved
43                                                                rather than the text */
44 
45 
46 dcl  buffer_datap pointer;                                  /* Used to address data area of the buffer */
47 dcl 1 buffer_data aligned based (buffer_datap),
48     2 empty_space bit (buffer.data_offset) unaligned,       /* Space not used */
49     2 previous_text bit (buffer.data_length) unaligned,     /* the relevant area */
50     2 available_space bit (buffer.length - (buffer.data_offset+buffer.data_length)) unaligned;
51 
52 
53 
54 /* END INCLUDE .................imp_dim_buf ........... */