1 /* Begin include file window_io_attach_data_.incl.pl1 BIM June 1981 */
  2 
  3 /* Modified by Chris Jones December 1981 to add MORE_MODE_FOLD */
  4 /* Modified by William York 26 January 1982 to add more_handler_in_use
  5    and more_handler to the attach_data structure. */
  6 /* Modified 18 October 1982 by WMY to add the window_image_ptr,
  7    conversion_tct_table and token_characters. */
  8 /* Modified 30 September 1983 by Jon A. Rochlis to add column_origin for
  9    partial screen width windows. */
 10 /* Modified 8 January 1983 by JR to delete attach_data.capabilites.  See
 11    window_io_ and wioctl_ for more info. */
 12 /* Modified 5 March 1984 by Barmar to add dispatch_table.name, .description,
 13    and .info_path. */
 14 /* Modified 22 March 1984 by Barmar to add attach_data.auditor_iocb_ptr. */
 15 /* Modified 01 September 1984 by JR to add edited mode. */
 16 
 17 
 18 /****^  HISTORY COMMENTS:
 19   1) change(86-05-18,GDixon), approve(86-05-18,MCR7357),
 20      audit(86-06-16,Farley), install(86-07-18,MR12.0-1098):
 21      Modify attach_data.conversion_tct_table to make it aligned.  When tct_ was
 22      replaced by find_char_, the new calling sequence required an aligned
 23      table.
 24                                                    END HISTORY COMMENTS */
 25 
 26 
 27 /* format: style3 */
 28 declare   attach_data_ptr     pointer;
 29 declare   1 attach_data       aligned based (attach_data_ptr),
 30             2 window_id       bit (36) aligned,
 31             2 async_count     fixed bin,
 32             2 attach_description
 33                               character (128) var,          /* attach description */
 34             2 open_description
 35                               character (64) varying,
 36             2 target_iocb_ptr pointer,
 37             2 flags,
 38               3 discard_output
 39                               bit (1) unal,                 /* more processing: throw away all output */
 40               3 debug         bit (1) unal,
 41               3 more_processing
 42                               bit (1) unal,                 /* more mode */
 43               3 vertsp        bit (1) unal,                 /* vertsp mode */
 44               3 can           bit (1) unal,                 /* can mode */
 45               3 esc           bit (1) unal,                 /* can mode */
 46               3 erkl          bit (1) unal,                 /* erkl mode */
 47               3 rawo          bit (1) unal,                 /* rawo mode */
 48               3 red           bit (1) unal,                 /* red mode */
 49               3 ctl_char      bit (1) unal,                 /* allow ctrl chars input? */
 50               3 status_pending
 51                               bit (1) unal,
 52               3 cursor_valid  bit (1) unal,
 53               3 suppress_echo bit (1) unal,
 54               3 ignore_status bit (1) unal,
 55               3 edited        bit (1) unal,                 /* edited mode */
 56               3 pad           bit (21) unal,
 57             2 status          aligned like window_status,
 58             2 lines_written_since_read
 59                               fixed bin,                    /* more processing */
 60             2 cursor_position,                              /* Where in this window */
 61               3 line          fixed bin,                    /* line number */
 62               3 col           fixed bin,                    /* column */
 63               3 row_at_rawo   fixed bin,
 64               3 col_at_rawo   fixed bin,                    /* when we went raw */
 65             2 more_mode       fixed bin,                    /* which flavor */
 66             2 more_prompt     character (80),               /* "MORE?" */
 67             2 more_responses,
 68               3 n_yeses       fixed bin,                    /* number valid */
 69               3 n_noes        fixed bin,
 70               3 more_yeses    character (32) unaligned,     /* at most 32 yeses */
 71               3 more_noes     character (32) unaligned,
 72             2 editing_chars,
 73               3 erase_char    character (1),
 74               3 kill_char     character (1),
 75               3 input_escape_char
 76                               character (1),                /* normally "\" */
 77             2 breaks          bit (128) unaligned,
 78             2 line_editor_breaks
 79                               bit (128) unaligned,
 80             2 current,                                      /* describes us */
 81               3 rows          fixed bin,                    /* how many lines */
 82               3 columns       fixed bin,                    /* how wide lines in this window are */
 83               3 line_origin   fixed bin,                    /* on containing screen (terminal) */
 84               3 column_origin fixed bin,                    /* on containing screen (terminal) */
 85             2 kill_ring_info,
 86               3 top_killer    ptr,                          /* top of ring */
 87               3 army          ptr,                          /* surplus  killers kept here */
 88             2 output_cv_ptr   ptr,                          /* to cv_trans */
 89             2 special_ptr     ptr,                          /* to special_chars */
 90             2 saved_buffer_ptr                              /* for saving text across editor calls */
 91                               pointer,
 92             2 dispatch_table_ptr                            /* for editor key bindings */
 93                               pointer,
 94             2 more_handler_in_use
 95                               bit(1),
 96             2 more_handler    entry (pointer, bit(1) aligned, fixed bin(35)),
 97             2 conversion_tct_table
 98                               char(512),
 99             2 token_character_count               /* count of valid chars */
100                               fixed bin,
101             2 token_characters                    /* token delimiters for line editor */
102                               char(128) unaligned,
103             2 window_image_ptr pointer,           /* to character array for this window */
104             2 auditor_iocb_ptr pointer;           /* set by set_audit_iocb_ptr control order */
105 
106 dcl       (
107           MORE_MODE_SCROLL    init (1),
108           MORE_MODE_CLEAR     init (2),
109           MORE_MODE_WRAP      init (3),
110           MORE_MODE_FOLD      init (4)
111           )                   fixed bin internal static options (constant);
112 
113 dcl       attach_data_area    area based (get_system_free_area_ ());
114 
115 declare   get_system_free_area_
116                               entry returns (pointer);
117 
118 dcl       1 killer            based (attach_data.top_killer),
119             2 next            pointer,                      /* if you rotate */
120             2 prev            pointer,                      /* dbl thread for conven. */
121             2 max_size        fixed bin (21),
122             2 words           character (killer_alloc_size refer (killer.max_size)) varying;
123 
124 dcl       killer_alloc_size   fixed bin;
125 dcl       killer_initial_alloc_size
126                               fixed bin init (128) internal static options (constant);
127 declare   breaks_array        (0:127) bit (1) unaligned defined (attach_data.breaks) position (1);
128 declare   line_editor_breaks_array
129                               (0:127) bit (1) unaligned defined (attach_data.line_editor_breaks) position (1);
130 
131 dcl  valid_token_characters   char(attach_data.token_character_count) based (addr (attach_data.token_characters));
132 
133 /* Each window has its own window image, which must be re-allocated if the
134    window size changes. */
135 dcl  window_image             (attach_data.current.rows) char (attach_data.current.columns)
136                               based (attach_data.window_image_ptr);
137 
138 /* Single based string for clearing. */
139 dcl  window_image_string      char(attach_data.current.rows * attach_data.current.columns) based (window_image_ptr);
140 
141 /* editor key binding dispatch table.
142 
143 If type = 0, the keystroke is associated with the editor routine specified by
144 routine.  Simply call the routine.
145 
146 If type < 0, the keystroke is a prefix character, and the pointer in next_table
147 points to the next dispatch table.
148 
149 If type > 0, it is an index into the table of builtin editor commands (i.e.
150 the editor routines implemented by this module).  Perform a quick call of the
151 builtin routine.  */
152 
153 dcl  dispatch_table_ptr       pointer;
154 
155 dcl  1 dispatch_table         aligned based (dispatch_table_ptr),
156        2 key                  (0:127),
157          3 type               fixed bin,
158          3 pad                fixed bin,
159          3 next_table         pointer,
160          3 routine            entry (pointer, fixed bin(35)),
161          3 numarg_action      fixed bin, /* only for external routines */
162          3 name               char (64) varying,
163          3 description        char (256) varying,
164          3 info_path,
165            4 info_dir         char (168),
166            4 info_entry       char (32);
167 
168 %include window_editor_values;
169 %include window_status;
170 %include terminal_capabilities;
171 
172 /* End include file window_io_attach_data_.incl.pl1 */