COMPILATION LISTING OF SEGMENT vt1xx_ctl_util_ Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 10/07/88 1208.6 mst Fri Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1978 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* * Copyright (c) 1972 by Massachusetts Institute of * 11* * Technology and Honeywell Information Systems, Inc. * 12* * * 13* *********************************************************** */ 14 15 /* Utility package used by Emacs VT1XX terminal CTL packages */ 16 17 /* Created: 11 March 1981 by G. Palter */ 18 19 20 /****^ HISTORY COMMENTS: 21* 1) change(88-08-14,GDixon), approve(88-09-20,MCR8002), audit(88-09-21,Blair), 22* install(88-10-07,MR12.2-1141): 23* Added $get_screen_size entrypoint for use in versaterm.ctl.lisp. 24* END HISTORY COMMENTS */ 25 26 27 vt1xx_ctl_util_: 28 procedure (); 29 30 return; /* not an entry */ 31 32 33 dcl code fixed bin(35) auto; 34 dcl tty_mode_string char(512); 35 36 dcl (addr, null) builtin; 37 38 dcl iox_$user_io pointer external; 39 40 dcl e_pl1_$get_emacs_data_ptr entry() returns(ptr); 41 dcl iox_$modes entry (pointer, character (*), character (*), fixed binary (35)); 42 dcl mode_string_$get_mode entry (char(*), char(*), ptr, fixed bin(35)); 43 44 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 45 46 /* Enable output flow control: Emacs resets "oflow" mode; however, for certain VT1XX terminal types, the terminal is 47* assumed to be running with XON/XOFF enabled. For these terminals, it is necessary to turn "oflow" mode back on */ 48 49 re_enable_oflow: 50 entry (); 51 52 call iox_$modes (iox_$user_io, "oflow", (""), (0)); 53 return; 54 55 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 56 57 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 58 /* */ 59 /* get_screen_size: */ 60 /* This entrypoint is called by versaterm.ctl to extract the current line and page lengths from */ 61 /* the command line values given in the emacs command, or else from the current values given in */ 62 /* the tty_ mode string. */ 63 /* */ 64 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 65 66 get_screen_size: 67 entry (P_ll, P_pl); 68 69 dcl P_ll fixed bin parm; /* Screen line length. (Out) */ 70 dcl P_pl fixed bin parm; /* Screen page length. (Out) */ 71 72 dcl DEFAULT_LINE_LEN fixed bin int static options(constant) init(79); 73 dcl DEFAULT_PAGE_LEN fixed bin int static options(constant) init(24); 74 75 emacs_data_ptr = e_pl1_$get_emacs_data_ptr(); /* Get pointer to emacs command line args*/ 76 if emacs_data_ptr = null then do; /* If not being called from emacs ctl, */ 77 P_ll = DEFAULT_LINE_LEN; /* then give up and return default */ 78 P_pl = DEFAULT_PAGE_LEN; /* values. */ 79 end; 80 81 else do; /* If being called from emacs ctl... */ 82 if emacs_data.arguments.ll ^= -1 then /* User typed: emacs -ll NN */ 83 P_ll = emacs_data.arguments.ll; /* so use the value he typed. */ 84 else do; /* Otherwise, extract llNN mode from */ 85 MV.version = mode_value_version_3; /* tty_ mode string and return that. */ 86 tty_mode_string = emacs_data.tty_modes; 87 call mode_string_$get_mode (tty_mode_string, "ll", addr(MV), code); 88 if code ^= 0 then 89 P_ll = DEFAULT_LINE_LEN; 90 else do; 91 if MV.flags.numeric_valuep then 92 P_ll = MV.numeric_value; 93 else 94 P_ll = DEFAULT_LINE_LEN; 95 end; 96 end; 97 98 if emacs_data.arguments.pl ^= -1 then /* User typed: emacs -pl NN */ 99 P_pl = emacs_data.arguments.pl; /* so use the value he typed. */ 100 else do; /* Otherwise, extract plNN mode from */ 101 MV.version = mode_value_version_3; /* tty_ mode string and return that. */ 102 tty_mode_string = emacs_data.tty_modes; 103 call mode_string_$get_mode (tty_mode_string, "pl", addr(MV), code); 104 if code ^= 0 then 105 P_pl = DEFAULT_PAGE_LEN; 106 else do; 107 if MV.flags.numeric_valuep then 108 P_pl = MV.numeric_value + 1; /* Add 1 to tty_ mode because tty_ */ 109 else /* reduces actual screen size by 1 to */ 110 P_pl = DEFAULT_PAGE_LEN; /* leave room for EOP prompt. Emacs */ 111 end; /* doesn't need an EOP line so we can */ 112 end; /* add back that line. */ 113 end; 114 return; 115 116 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 117 1 1 /* Begin include file emacs_data.incl.pl1 */ 1 2 /* format: style3 */ 1 3 /**** Created: RMSoley 5 August 1981 ****/ 1 4 /****^ HISTORY COMMENTS: 1 5* 1) change(81-11-19,Soley), approve(), audit(), install(): 1 6* for flags.got_cr 1 7* 2) change(82-04-15,Soley), approve(), audit(), install(): 1 8* for tasking.return_label 1 9* 3) change(82-06-02,Margolin), approve(), audit(), install(): 1 10* to also include level_info dcl 1 11* 4) change(84-09-23,Margolin), approve(), audit(), install(): 1 12* to add emacs_data.arguments.shared_static 1 13* 5) change(84-11-02,Margolin), approve(), audit(), install(): 1 14* to add emacs_data.arguments.force 1 15* 6) change(86-07-16,Margolin), approve(86-07-16,MCR7452), 1 16* audit(86-11-03,Coren), install(86-11-03,MR12.0-1205): 1 17* Added emacs_data.flags.turned_on_video and removed the copyright notice 1 18* (include files aren't supposed to have them). 1 19* 7) change(87-12-21,Schroth), approve(88-02-29,MCR7851), 1 20* audit(88-06-06,RBarstad), install(88-08-01,MR12.2-1071): 1 21* to add extended_ascii flag and extend breaktable for 8bit I/O. 1 22* END HISTORY COMMENTS */ 1 23 1 24 1 25 /* Stuff to manage invocations. */ 1 26 dcl e_find_invocation_ entry () returns (pointer); 1 27 dcl emacs_data_ptr pointer; 1 28 1 29 /* emacs_data information structure. */ 1 30 declare 1 emacs_data aligned based (emacs_data_ptr), 1 31 2 next_invocation pointer initial (null ()), /* invoc list */ 1 32 2 prev_invocation pointer initial (null ()), 1 33 2 frame_ptr pointer initial (null ()), /* cur emx frame */ 1 34 2 myname character (32) initial (""), /* emacs name */ 1 35 2 env_name character (32) initial (""), /* .sv.lisp name */ 1 36 2 log_name character (32) initial (""), /* for write_log */ 1 37 2 info_ptr pointer init (null ()), /* emacs_ ip */ 1 38 2 status_code fixed bin (35) init (0), /* emacs_ code */ 1 39 2 output_iocb pointer init (null ()), /* output IOCBP */ 1 40 2 input_iocb pointer init (null ()), /* input IOCBP */ 1 41 2 arg_list_ptr pointer init (null ()), 1 42 2 flags aligned, 1 43 3 debugging bit (1) unaligned init ("0"b),/* debugging */ 1 44 3 using_video bit (1) unaligned init ("0"b),/* use vidsys */ 1 45 3 in_emacs bit (1) unaligned init ("0"b),/* now inside */ 1 46 3 new_arguments bit (1) unaligned init ("0"b),/* have new args */ 1 47 3 using_r0_echnego 1 48 bit (1) unaligned init ("1"b), 1 49 3 netsw bit (1) unaligned init ("0"b),/* using net */ 1 50 3 messages_were_sent_here 1 51 bit (1) unal init ("0"b), 1 52 3 update_breaktable 1 53 bit (1) unal init ("1"b), /* need to upd */ 1 54 3 got_cr bit (1) unal init ("0"b), /* last char CR */ 1 55 3 turned_on_video 1 56 bit (1) unal init ("0"b), /* automatically turned on video */ 1 57 3 extended_ascii 1 58 bit (1) unal init ("0"b), /* 8-bit chars */ 1 59 3 pad2 bit (25) unaligned initial (""b), 1 60 2 arguments aligned, 1 61 3 ns bit (1) unal, /* -ns */ 1 62 3 query bit (1) unal, /* -query */ 1 63 3 reset bit (1) unal, /* -reset */ 1 64 3 task bit (1) unal, /* -task */ 1 65 3 no_task bit (1) unal, /* -no_task */ 1 66 3 destroy_task bit (1) unal, /* -destroy_task */ 1 67 3 shared_static bit (1) unal, /* -shared_static */ 1 68 3 force bit (1) unal, /* -force */ 1 69 3 ls fixed bin (17) aligned, /* -ls */ 1 70 3 pl fixed bin (17) unal, /* -pl */ 1 71 3 ll fixed bin (17) aligned, /* -ll */ 1 72 3 apply fixed bin (17) unal, /* 1+argno -ap */ 1 73 3 path_count fixed bin (17) aligned, /* # of paths */ 1 74 3 ttp character (168) unaligned, /* -ttp given */ 1 75 3 first_path pointer, /* ptr to chain */ 1 76 2 tasking aligned, 1 77 3 task_flags aligned, 1 78 4 in_task bit (1) unaligned initial ("0"b), 1 79 /* tasking on */ 1 80 4 destroy bit (1) unaligned initial ("0"b), 1 81 /* self destruct */ 1 82 4 pad1 bit (34) unaligned initial (""b), 1 83 3 task_id bit (36) aligned initial (""b), 1 84 /* task ID */ 1 85 3 saved_cl_intermediary 1 86 entry, /* old CLI */ 1 87 3 return_label label, /* for -dtk */ 1 88 2 interrupts aligned, 1 89 3 head pointer init (null ()), /* of intp chain */ 1 90 3 tail pointer init (null ()), /* of intp chain */ 1 91 3 array (0:1) fixed bin init ((2) 0), /* lisp/pl1 com */ 1 92 2 terminal_type character (256) init (""), /* saved ttp */ 1 93 2 tty_modes character (512) init (""), /* orig ttymodes */ 1 94 2 linel fixed bin (17) aligned, /* orig linel */ 1 95 2 ttyx fixed bin (17) aligned, /* tty index */ 1 96 2 netx fixed bin (35), /* net index */ 1 97 2 wnetx fixed bin (35), 1 98 2 chars_in_obuf fixed bin (21) init (0), /* to be dumped */ 1 99 2 echoed fixed bin (21) init (0), /* alrdy echoed */ 1 100 2 cgot fixed bin (21) init (0), /* echnego got */ 1 101 2 ctook fixed bin (21) init (0), /* took from buf */ 1 102 2 edir character (168) init (""), /* emacs dir */ 1 103 2 ledir character (168) init (""), /* e log dir */ 1 104 2 breaktable (0:255) bit (1) unal init ((256) (1)"1"b), 1 105 2 first_msgp pointer init (null ()), 1 106 2 last_msgp pointer init (null ()), 1 107 2 ibufptr pointer init (null ()), 1 108 2 obufptr pointer init (null ()), 1 109 2 ospeed fixed binary init (0), 1 110 2 level_ptr pointer init (null ()); 1 111 1 112 /* Pathname (for arguments.path, arguments.macro) structure. */ 1 113 dcl 1 path aligned based, 1 114 2 next_path pointer, 1 115 2 type fixed bin, 1 116 2 name character (168); 1 117 1 118 /* Types of paths. */ 1 119 dcl MACRO_PATH fixed bin initial (0); 1 120 dcl FIND_PATH fixed bin initial (1); 1 121 1 122 dcl 1 level_info aligned based, /* describes a level of recursion */ 1 123 2 prev_level pointer, 1 124 2 tty_modes character (256) unaligned, 1 125 2 n_used fixed binary, 1 126 2 n_allocated fixed binary, 1 127 2 segment_ptrs (n_to_allocate refer (level_info.n_allocated)) pointer; 1 128 1 129 /* END INCLUDE FILE emacs_data.incl.pl1 */ 118 119 2 1 /* BEGIN INCLUDE FILE mode_string_info.incl.pl1 */ 2 2 2 3 /* Structure for parse_mode_string_ JRDavis 20 October 1980 2 4* Last modified 12 January 1981 by J. Spencer Love for version 2, make char_value varying string */ 2 5 2 6 declare mode_value_ptr ptr, 2 7 number_of_modes fixed bin; 2 8 2 9 declare 1 mode_string_info aligned based (mode_string_info_ptr), 2 10 2 version fixed bin, 2 11 2 number fixed bin, 2 12 2 modes (number_of_modes refer (mode_string_info.number)) like mode_value; 2 13 2 14 declare mode_string_info_ptr ptr; 2 15 2 16 declare 1 mode_value aligned based (mode_value_ptr), 2 17 2 version fixed bin, 2 18 2 mode_name char (32) unaligned, 2 19 2 flags, 2 20 3 boolean_valuep bit (1) unaligned, 2 21 3 numeric_valuep bit (1) unaligned, 2 22 3 char_valuep bit (1) unaligned, 2 23 3 boolean_value bit (1) unaligned, 2 24 3 pad1 bit (32) unaligned, 2 25 2 numeric_value fixed bin (35), 2 26 2 char_value char (32) varying, 2 27 2 code fixed bin (35), 2 28 2 pad2 bit (36); 2 29 2 30 declare mode_string_info_version_2 fixed bin static options (constant) initial (2), 2 31 mode_value_version_3 fixed bin static options (constant) initial (3); 2 32 2 33 /* END INCLUDE FILE mode_string_info.incl.pl1 */ 120 121 122 dcl 1 MV aligned like mode_value auto; 123 124 end vt1xx_ctl_util_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/07/88 1208.6 vt1xx_ctl_util_.pl1 >spec>install>1141>vt1xx_ctl_util_.pl1 118 1 08/04/88 2008.4 emacs_data.incl.pl1 >ldd>include>emacs_data.incl.pl1 120 2 03/19/81 1206.8 mode_string_info.incl.pl1 >ldd>include>mode_string_info.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. DEFAULT_LINE_LEN constant fixed bin(17,0) initial dcl 72 ref 77 88 93 DEFAULT_PAGE_LEN constant fixed bin(17,0) initial dcl 73 ref 78 104 109 FIND_PATH 000305 automatic fixed bin(17,0) initial dcl 1-120 set ref 1-120* MACRO_PATH 000304 automatic fixed bin(17,0) initial dcl 1-119 set ref 1-119* MV 000306 automatic structure level 1 dcl 122 set ref 87 87 103 103 P_ll parameter fixed bin(17,0) dcl 69 set ref 66 77* 82* 88* 91* 93* P_pl parameter fixed bin(17,0) dcl 70 set ref 66 78* 98* 104* 107* 109* addr builtin function dcl 36 ref 87 87 103 103 arguments 52 based structure level 2 dcl 1-30 code 000100 automatic fixed bin(35,0) dcl 33 set ref 87* 88 103* 104 e_pl1_$get_emacs_data_ptr 000012 constant entry external dcl 40 ref 75 emacs_data based structure level 1 dcl 1-30 emacs_data_ptr 000302 automatic pointer dcl 1-27 set ref 75* 76 82 82 86 98 98 102 iox_$modes 000014 constant entry external dcl 41 ref 52 iox_$user_io 000010 external static pointer dcl 38 set ref 52* ll 55 based fixed bin(17,0) level 3 dcl 1-30 ref 82 82 mode_string_$get_mode 000016 constant entry external dcl 42 ref 87 103 mode_value based structure level 1 dcl 2-16 mode_value_version_3 constant fixed bin(17,0) initial dcl 2-30 ref 85 101 null builtin function dcl 36 ref 76 pl 54 based fixed bin(17,0) level 3 packed packed unaligned dcl 1-30 ref 98 98 tty_mode_string 000101 automatic char(512) packed unaligned dcl 34 set ref 86* 87* 102* 103* tty_modes 254 based char(512) initial level 2 dcl 1-30 ref 86 102 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. e_find_invocation_ 000000 constant entry external dcl 1-26 level_info based structure level 1 dcl 1-122 mode_string_info based structure level 1 dcl 2-9 mode_string_info_ptr automatic pointer dcl 2-14 mode_string_info_version_2 internal static fixed bin(17,0) initial dcl 2-30 mode_value_ptr automatic pointer dcl 2-6 number_of_modes automatic fixed bin(17,0) dcl 2-6 path based structure level 1 dcl 1-113 NAMES DECLARED BY EXPLICIT CONTEXT. get_screen_size 000076 constant entry external dcl 66 re_enable_oflow 000033 constant entry external dcl 49 vt1xx_ctl_util_ 000023 constant entry external dcl 27 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 410 430 305 420 Length 636 305 20 171 103 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME vt1xx_ctl_util_ 244 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME vt1xx_ctl_util_ 000100 code vt1xx_ctl_util_ 000101 tty_mode_string vt1xx_ctl_util_ 000302 emacs_data_ptr vt1xx_ctl_util_ 000304 MACRO_PATH vt1xx_ctl_util_ 000305 FIND_PATH vt1xx_ctl_util_ 000306 MV vt1xx_ctl_util_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. e_pl1_$get_emacs_data_ptr iox_$modes mode_string_$get_mode THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. iox_$user_io LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 1 119 000015 1 120 000016 27 000022 30 000031 49 000032 52 000041 53 000071 66 000072 75 000104 76 000113 77 000117 78 000122 79 000124 82 000125 85 000134 86 000136 87 000141 88 000172 91 000200 93 000207 98 000212 101 000223 102 000225 103 000230 104 000261 107 000267 109 000300 114 000303 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved