1 /*  START OF:       window_line_editor.incl.pl1               *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
 2 
 3 /* Begin include file window_line_editor.incl.pl1
 4    William M. York, February, 1983 */
 5 /* Modified April 1984 by Jon A. Rochlis: Version 2  adds the suppress_redisplay
 6    flag, to be used when returning from an editor function. */
 7 
 8 /****^  HISTORY COMMENTS:
 9   1) change(2016-05-06,GDixon), approve(2016-06-12,MCR10013),
10      audit(2016-06-12,Swenson):
11      Version 3 adds new_break_character element to the structure.  This
12      provides an alternate method to continue editing after an external
13      editor function processes its own input, but needs to return a
14      break character for processing by the window_io_ line editor.
15      It also adds a redisplay element to the structure.
16                                                    END HISTORY COMMENTS */
17 
18 dcl  line_editor_info_ptr     pointer;
19 
20 dcl  1 line_editor_info       aligned based (line_editor_info_ptr),
21        2 version              char(8),
22        2 iocb_ptr             pointer,     /* to current window */
23        2 repetition_count      fixed bin,  /* number of times to perform operation */
24        2 flags,
25          3 return_from_editor  bit(1) unaligned,  /* to end editing session */
26          3 merge_next_kill     bit(1) unaligned,  /* don't touch */
27          3 old_merge_next_kill bit(1) unaligned,  /* don't touch */
28          3 last_kill_direction bit(1) unaligned,  /* don't touch */
29          3 numarg_given        bit(1) unaligned,
30          3 suppress_redisplay  bit(1) unaligned,  /* only meaningful if return_from_editor is set */
31          3 break_given         bit(1) unaligned,  /* version_3: new_break_character has been set by editing function. */
32          3 pad                 bit(29) unaligned,
33        2 user_data_ptr         pointer,           /* for carrying user state information */
34        2 cursor_index          fixed bin(21),     /* 0 < cursor_index <= line_length + 1 */
35        2 line_length           fixed bin(21),     /* 0 <= line_length <= length (input_buffer) */
36        2 input_buffer          character(512) unaligned,
37        2 key_sequence          character(128),    /* key sequence which caused user routine to be invoked */
38        2 redisplay             entry(ptr),        /* version_3: Redisplays the line_editor_info.input_buffer.   */
39                                                   /*   call line_editor_info.redisplay(line_editor_info_ptr);   */
40        2 new_break_character   character(1) unal, /* version_3: if break_given, break char is returned          */
41                                                   /*  to window_io_ line editor by external edit function.      */
42                                                   /*  Line editor will evaluate/implement this break character. */
43        2 pad2                  character(3) unal;
44 
45 dcl  line_editor_input_line   char(line_editor_info.line_length) based (addr (line_editor_info.input_buffer));
46 
47 dcl  line_editor_info_version_1
48                               char(8) static options (constant) init ("lei00001");
49 
50 dcl  line_editor_info_version_2
51                               char(8) static options (constant) init ("lei00002");
52 
53 dcl  line_editor_info_version_3
54                               char(8) static options (constant) init ("lei00003");
55 
56 /* User supplied editor routines may want to preserve state information of
57    their own across calls.  user_data_ptr points to a chain of data structures
58    that these routines may use.  The structures should all have the same header
59    (declared here), and the id field can be used to identify which structures
60    belong to which routines. */
61 
62 dcl  1 line_editor_user_data_header
63                               aligned based,
64        2 id                   fixed bin,
65        2 next_user_data_ptr   pointer;
66 
67 /*  END OF:         window_line_editor.incl.pl1               *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */