1 /*        BEGIN INCLUDE FILE ... tty_convert.incl.pl1       */
  2 
  3 /* tty_ conversion tables */
  4 /* Created 11/3/75 by Robert S. Coren */
  5 /* Info structures added 5/19/77 by Robert S. Coren */
  6 /* Length of cv_trans changed from 128 to 256 05/03/78 by Robert Coren */
  7 /* conversion table mnemonics added JRDavis 21 Aug 80 */
  8 /* fix special_chars_struc to have good refers Fri 13 Feb 81 JRDavis */
  9 
 10 
 11 /****^  HISTORY COMMENTS:
 12   1) change(85-12-01,Negaret), approve(87-07-23,MCR7742),
 13      audit(87-07-23,GDixon), install(87-08-04,MR12.1-1056):
 14       Added INPUT_CONVERT_DSA_CR_PROCESSING constant.
 15   2) change(88-01-22,Brunelle), approve(88-01-22,MCR7813),
 16      audit(88-10-05,Blair), install(88-10-17,MR12.2-1171):
 17      Expand c_chars definition from 3 chars to 15.  Change SPECIAL_VERSION
 18      from 1 to 2.  Add version variable to get_special_info_struc and define
 19      SPECIAL_INFO_STRUCT_VERSION_1.
 20                                                    END HISTORY COMMENTS */
 21 
 22 
 23 /* format: style2,linecom,^indnoniterdo,indcomtxt,^inditerdo,dclind5,idind25 */
 24 
 25 
 26      dcl  1 special_chars          aligned based,           /* table of special character sequences */
 27             2 nl_seq               aligned like c_chars,    /* new-line sequence */
 28             2 cr_seq               aligned like c_chars,    /* carriage-return sequence */
 29             2 bs_seq               aligned like c_chars,    /* backspace sequence */
 30             2 tab_seq              aligned like c_chars,    /* horizontal tab sequence */
 31             2 vt_seq               aligned like c_chars,    /* vertical tab sequence */
 32             2 ff_seq               aligned like c_chars,    /* form-feed sequence */
 33             2 printer_on           aligned like c_chars,    /* printer-on sequence */
 34             2 printer_off          aligned like c_chars,    /* printer_off sequence */
 35             2 red_ribbon_shift     aligned like c_chars,    /* red ribbon shift sequence */
 36             2 black_ribbon_shift   aligned like c_chars,    /* black ribbon shift sequence */
 37             2 end_of_page          aligned like c_chars,    /* end-of-page warning sequence */
 38             2 escape_length        fixed bin,               /* number of escape sequences */
 39             2 not_edited_escapes   (sc_escape_len refer (special_chars.escape_length)) like c_chars,
 40                                                             /* use in ^edited mode */
 41             2 edited_escapes       (sc_escape_len refer (special_chars.escape_length)) like c_chars,
 42                                                             /* use in edited mode */
 43             2 input_escapes        aligned,
 44               3 len                fixed bin (8) unaligned, /* length of string */
 45               3 str                char (sc_input_escape_len refer (special_chars.input_escapes.len)) unaligned,
 46                                                             /* escape sequence characters */
 47             2 input_results        aligned,
 48               3 pad                bit (9) unaligned,       /* so that strings will look the same */
 49               3 str                char (sc_input_escape_len refer (special_chars.input_escapes.len)) unaligned;
 50                                                             /* results of escape sequences */
 51 
 52 
 53      dcl  c_chars_ptr              ptr;
 54      dcl  1 c_chars                based (c_chars_ptr) aligned,
 55             2 count                fixed bin (8) unaligned,
 56             2 chars                (15) char (1) unaligned;
 57 
 58      dcl  sc_escape_len            fixed bin;               /* count of output escapes to allocate in special_chars  */
 59      dcl  sc_input_escape_len      fixed bin;               /* count of input escapes to allocate in special_chars  */
 60 
 61 
 62      dcl  1 cv_trans               based aligned,           /* conversion/translation table format */
 63             2 value                (0:255) fixed bin (8) unal;
 64 
 65 
 66      dcl  1 delay                  based aligned,           /* delay counts for output */
 67             2 vert_nl              fixed bin,
 68             2 horz_nl              float bin,
 69             2 const_tab            fixed bin,
 70             2 var_tab              float bin,
 71             2 backspace            fixed bin,
 72             2 vt_ff                fixed bin;
 73 
 74 /* info structures used with orders */
 75 
 76      dcl  1 special_chars_struc    aligned based,
 77             2 version              fixed bin,
 78             2 default              fixed bin,               /* non-zero indicates use default */
 79             2 special_chars,                                /* same as level-1 above */
 80                                                             /* has to be spelled out instead of using like */
 81                                                             /* because of refer options */
 82               3 nl_seq             aligned like c_chars,    /* new-line sequence */
 83               3 cr_seq             aligned like c_chars,    /* carriage-return sequence */
 84               3 bs_seq             aligned like c_chars,    /* backspace sequence */
 85               3 tab_seq            aligned like c_chars,    /* horizontal tab sequence */
 86               3 vt_seq             aligned like c_chars,    /* vertical tab sequence */
 87               3 ff_seq             aligned like c_chars,    /* form-feed sequence */
 88               3 printer_on         aligned like c_chars,    /* printer-on sequence */
 89               3 printer_off        aligned like c_chars,    /* printer_off sequence */
 90               3 red_ribbon_shift   aligned like c_chars,    /* red ribbon shift sequence */
 91               3 black_ribbon_shift aligned like c_chars,    /* black ribbon shift sequence */
 92               3 end_of_page        aligned like c_chars,    /* end-of-page warning sequence */
 93               3 escape_length      fixed bin,               /* number of escape sequences */
 94               3 not_edited_escapes (sc_escape_len refer (special_chars_struc.escape_length)) like c_chars,
 95                                                             /* use in ^edited mode */
 96               3 edited_escapes     (sc_escape_len refer (special_chars_struc.escape_length)) like c_chars,
 97                                                             /* use in edited mode */
 98               3 input_escapes      aligned,
 99                 4 len              fixed bin (8) unaligned, /* length of string */
100                 4 str              char (sc_input_escape_len refer (special_chars_struc.input_escapes.len)) unaligned,
101                                                             /* escape sequence characters */
102               3 input_results      aligned,
103                 4 pad              bit (9) unaligned,       /* so that strings will look the same */
104                 4 str              char (sc_input_escape_len refer (special_chars_struc.input_escapes.len)) unaligned;
105                                                             /* results of escape sequences */
106 
107      dcl  1 cv_trans_struc         aligned based,           /* all conversion/translation tables */
108             2 version              fixed bin,
109             2 default              fixed bin,               /* as above */
110             2 cv_trans             like cv_trans;
111 
112      dcl  1 delay_struc            aligned based,
113             2 version              fixed bin,
114             2 default              fixed bin,               /* as above */
115             2 delay                like delay;
116 
117      dcl  1 get_special_info_struc based aligned,           /* get_special order */
118             2 version              char (8),
119             2 area_ptr             pointer,
120             2 table_ptr            pointer;
121 
122      dcl  SPECIAL_INFO_STRUCT_VERSION_1
123                                    char (8) int static options (constant) init ("sisv1000");
124      dcl  SPECIAL_VERSION          fixed bin int static options (constant) init (1);
125      dcl  SPECIAL_VERSION_2        fixed bin int static options (constant) init (2);
126      dcl  DELAY_VERSION            fixed bin int static options (constant) init (1);
127      dcl  CV_TRANS_VERSION         fixed bin int static options (constant) init (2);
128 
129      dcl  CV_TRANS_SIZE            (2) fixed bin int static options (constant) init (127, 255);
130                                                             /* indexed by version number */
131 
132 
133 /* values for input and output conversion tables */
134 
135      dcl  (
136           INPUT_CONVERT_ORDINARY   init (0),
137           INPUT_CONVERT_BREAK      init (1),
138           INPUT_CONVERT_ESCAPE     init (2),
139           INPUT_CONVERT_DISCARD    init (3),
140           INPUT_CONVERT_FORMFEED   init (4),
141           INPUT_CONVERT_PRECEDENCE_DISCARD
142                                    init (5),
143           INPUT_CONVERT_DSA_CR_PROCESSING
144                                    init (6)
145           )                        fixed bin (8) unaligned internal static options (constant);
146 
147      dcl  (
148           OUTPUT_CONVERT_ORDINARY  init (0),
149           OUTPUT_CONVERT_NEWLINE   init (1),
150           OUTPUT_CONVERT_CR        init (2),
151           OUTPUT_CONVERT_HT        init (3),
152           OUTPUT_CONVERT_BS        init (4),
153           OUTPUT_CONVERT_VT        init (5),
154           OUTPUT_CONVERT_FF        init (6),
155           OUTPUT_CONVERT_OCTAL     init (7),
156           OUTPUT_CONVERT_RRS       init (8),
157           OUTPUT_CONVERT_BRS       init (9),
158           OUTPUT_CONVERT_NO_MOTION init (10),
159           OUTPUT_CONVERT_PRECEDENCE_NO_MOTION
160                                    init (11),
161           OUTPUT_CONVERT_DONT_SEND init (12),
162           OUTPUT_CONVERT_NOT_USED_13
163                                    init (13),
164           OUTPUT_CONVERT_NOT_USED_14
165                                    init (14),
166           OUTPUT_CONVERT_NOT_USED_15
167                                    init (15),
168           OUTPUT_CONVERT_NOT_USED_16
169                                    init (16),
170           OUTPUT_CONVERT_FIRST_SPECIAL
171                                    init (17)
172           )                        fixed bin (8) unaligned internal static options (constant);
173 
174 /*        END INCLUDE FILE ... tty_convert.incl.pl1 */