1 /* BEGIN INCLUDE FILE ... qedx_internal_data.incl.pl1 */
 2 /* Created:  January 1983 by G. Palter */
 3 
 4 /* Data used by a single invocation of qedx or qedx_ */
 5 
 6 dcl 1 qid aligned based (qid_ptr),
 7       2 editor_name character (72) unaligned,               /* name of the editor (eg: "send_mail (qedx)") */
 8       2 editor_area_ptr pointer,                            /* -> area used to allocate data */
 9       2 qedx_info_ptr pointer,                              /* -> caller's definition of this qedx invocation */
10       2 edx_util_data_ptr pointer,                          /* -> data used by edx_util_ */
11       2 regexp_data_ptr pointer,                            /* -> data used by qx_search_file_ */
12       2 flags,
13         3 no_rw_path bit (1) unaligned,
14         3 query_if_modified bit (1) unaligned,
15         3 pad bit (34) unaligned,
16       2 b0 like b,                                          /* buffer 0 */
17       2 tw like b;                                          /* typewriter buffer */
18 
19 dcl  qid_ptr pointer;
20 
21 dcl  editor_area area based (qid.editor_area_ptr);
22 
23 
24 /* Description of an element of the buffer recursion stack */
25 
26 dcl 1 sv based aligned,
27       2 prev pointer,                                       /* pointer to previous element in stack */
28       2 bp pointer,                                         /* pointer to control block for this element */
29       2 (ti, te) fixed binary (21);                         /* saved copies of buffer read indexes */
30 %page;
31 /* Description of a single qedx buffer:  Buffers are managed in two sections, a top and a bottom.  The gap between the
32    sections is the end of the current line, and permits easy insertion and deletion of text, without extraineous data
33    movement.
34 
35    An empty section is indicated when the pointers are out-of-sequence.  For example for the bottom section if lb
36    (last_bottom) is < 1 then the bottom is empty.  If ft (first_top) is > (file_end) then the top is empty.
37 
38    In addition only one temporary file is needed to support operations on the buffers
39 
40    Line and range pointers:
41    li     - Start index of current line.
42    le     - End index of current line. Points to NL.
43 
44    lli    - Start index of last line of range.
45    lle    - End index of last line of range. Points to NL.
46 
47    fli    - Start index of first line of range.
48    fle    - End index of first line of range.
49 
50    Gapped buffer standards:
51    1      - Start index of buffer.
52    ilb    - End index of first part of buffer.  Should point to NL.
53    ift    - Start index of second part of buffer.
54    ife    - End index of buffer.  Should be one of: 1024*4*4,  1024*4*16, 1024*4*64, or 1024*4*255;
55 
56    Gapped standards permit the range to split across the gap, but a line of text cannot split across the gap.  Therefore
57    when the gap is moved one should also move li and le if they are in the moved section of buffer.
58 
59    The gap, when processing insert, delete, change, substitute, is either immediately before, or immediately after the
60    range specified.  This is dependant upon the type of operation.  I/O such as writing and printing of buffer contents,
61    or searching and line indexing is done without moving the gap, and is done in sections as appropriate for the current
62    operational positioning and the current gap position */
63 
64 dcl 1 b based (bp) aligned,
65       2 name character (16),                                /* buffer name */
66       2 next pointer,                                       /* pointer to next buffer control block (if any) */
67       2 dp pointer,                                         /* pointer to beginning of buffer data */
68       2 default_path character (256),                       /* default output pathname for this buffer */
69       2 lb fixed binary (21),                               /* index of last character of bottom section */
70       2 ft fixed binary (21),                               /* index of first character of top section */
71       2 de fixed binary (21),                               /* index of last character in buffer */
72       2 li fixed binary (21),                               /* index of first character of current line */
73       2 le fixed binary (21),                               /* index of last character of current line */
74       2 ti fixed binary (21),                               /* index of next char. to be read from buffer */
75       2 te fixed binary (21),                               /* index of last char. of line being read from buffer */
76       2 tw_sw bit (1),                                      /* typewriter buffer switch (OFF for normal buffers) */
77       2 callers_idx fixed binary,                           /* index in caller's qedx_info.buffers of this buffer */
78       2 flags,
79         3 modified bit (1) unaligned,                       /* buffer has been modified since last write */
80         3 default_was_region bit (1) unaligned,             /* default pathname was originally caller's region */
81         3 default_is_region bit (1) unaligned,              /* default pathname is currently caller's region */
82         3 default_locked bit (1) unaligned,                 /* default pathname can not be changed by r/w requests */
83         3 default_untrusted bit (1) unaligned,              /* buffer pathname is not trustworthy */
84         3 pad bit (31) unaligned;
85 
86 dcl  bp pointer;
87 
88 /* END INCLUDE FILE ... qedx_internal_data.incl.pl1 */