COMPILATION LISTING OF SEGMENT sc_edit_motd_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1018.1 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 6* * * 7* *********************************************************** */ 8 9 /* format: style2,idind30 */ 10 11 /**** Guts of the "message" request, which allows the operator to 12* edit the MOTD. */ 13 14 /**** Written 1984-11-01 BIM */ 15 16 17 /****^ HISTORY COMMENTS: 18* 1) change(87-02-08,GDixon), approve(87-05-25,MCR7680), 19* audit(87-05-06,Parisek), install(87-08-04,MR12.1-1055): 20* Fix coding standard violations. 21* END HISTORY COMMENTS */ 22 23 24 sc_edit_motd_: 25 procedure; 26 dcl code fixed bin (35); 27 dcl 1 my_qedx_info aligned, 28 2 header aligned like qedx_info.header, 29 2 buffers aligned like qedx_info.buffers; 30 /* just one */ 31 dcl motd_pathname char (168); /* Path name for message of the day */ 32 dcl motd_entryname char (32) int static init ("message_of_the_day") options (constant); 33 dcl saved_command_processor entry variable; 34 35 dcl cu_$get_command_processor entry (entry); 36 dcl cu_$set_command_processor entry (entry); 37 dcl pathname_ entry (character (*), character (*)) returns (character (168)); 38 dcl qedx_ entry (ptr, fixed bin (35)); 39 dcl ssu_$print_message entry () options (variable); 40 41 dcl (addr, unspec) builtin; 42 43 dcl cleanup condition; 44 45 call cu_$get_command_processor (saved_command_processor); 46 on cleanup call cu_$set_command_processor (saved_command_processor); 47 call cu_$set_command_processor (trap_editor_execute); 48 /* Trap "E" requests. */ 49 motd_pathname = pathname_ (sc_stat_$sysdir, motd_entryname); 50 unspec (my_qedx_info) = "0"b; 51 qedx_info_ptr = addr (my_qedx_info); 52 qedx_info.version = QEDX_INFO_VERSION_1; 53 qedx_info.editor_name = "message"; 54 qedx_info.flags.no_rw_path = "1"b; 55 qedx_info.flags.query_if_modified = "1"b; 56 qedx_info.n_buffers = 1; 57 qedx_info.buffers (1).buffer_name = "0"; 58 qedx_info.buffers (1).buffer_pathname = motd_pathname; 59 qedx_info.buffers (1).flags.locked_pathname = "1"b; 60 qedx_info.buffers (1).flags.default_read_ok = "1"b; 61 qedx_info.buffers (1).flags.default_write_ok = "1"b; 62 call qedx_ (qedx_info_ptr, code); 63 64 call cu_$set_command_processor (saved_command_processor); 65 return; /* Done. */ 66 67 trap_editor_execute: 68 procedure; 69 70 call ssu_$print_message (sc_stat_$admin_sci_ptr, 0, """e"" request not permitted."); 71 72 end trap_editor_execute; 73 1 1 /* BEGIN INCLUDE FILE ... qedx_info.incl.pl1 */ 1 2 /* Created: January 1983 by G. Palter */ 1 3 1 4 /* Data structure which supplies input/output arguments to qedx_ subroutine */ 1 5 1 6 dcl 1 qedx_info aligned based (qedx_info_ptr), 1 7 2 header, /* allows use of like to build automatic version */ 1 8 3 version character (8), 1 9 3 editor_name character (72) unaligned, 1 10 3 buffer_io entry (pointer, bit (1) aligned), /* procedure invoked to read/write an editor buffer */ 1 11 3 flags, 1 12 4 no_rw_path bit (1) unaligned, /* ON => no r/w may use a pathname and R/W are illegal */ 1 13 4 query_if_modified bit (1) unaligned, /* ON => query on exit if modified buffers exist */ 1 14 4 caller_does_io bit (1) unaligned, /* ON => caller does actual work of read/write requests */ 1 15 4 quit_forced bit (1) unaligned, /* set ON => user used Q or asked to punt modified buffers */ 1 16 4 buffers_truncated bit (1) unaligned, /* set ON => some editing lost when written */ 1 17 4 pad bit (29) unaligned, 1 18 3 n_buffers fixed binary, /* # of buffers supplied by caller */ 1 19 2 buffers (qedx_info_n_buffers refer (qedx_info.n_buffers)), 1 20 3 buffer_name character (16) unaligned, /* name of the buffer */ 1 21 3 buffer_pathname character (256) unaligned, /* initial default pathname of buffer */ 1 22 3 region_ptr pointer, /* -> caller's optional region */ 1 23 3 region_max_lth fixed binary (21), /* # of characters which will fit in caller's region */ 1 24 3 region_initial_lth fixed binary (21), /* # of characters in caller's region for initial read */ 1 25 3 region_final_lth fixed binary (21), /* set to # of characters placed in caller's region on exit */ 1 26 3 flags, 1 27 4 read_write_region bit (1) unaligned, /* ON => use caller's region as default for read/write; 1 28* OFF => use file specified by pathname as default */ 1 29 4 locked_pathname bit (1) unaligned, /* ON => read/write will never change default pathname or 1 30* prevent qedx from trusting the default path; 1 31* OFF => read with pathname sets ^trusted and write with 1 32* pathname changes the default */ 1 33 4 execute_buffer bit (1) unaligned, /* ON => execute it's contents before reading from terminal */ 1 34 /*** following switches apply only when read_write_region is ON ... */ 1 35 4 default_read_ok bit (1) unaligned, /* ON => r without explicit pathname is OK */ 1 36 4 default_write_ok bit (1) unaligned, /* ON => w without explicit pathname is OK */ 1 37 4 auto_write bit (1) unaligned, /* ON => automatically write buffer contents on "q" */ 1 38 4 truncated bit (1) unaligned, /* set ON => edited version is too long for caller's region */ 1 39 4 pad bit (29) unaligned; 1 40 1 41 dcl qedx_info_ptr pointer; 1 42 dcl qedx_info_n_buffers fixed binary; /* needed to allocate above structure */ 1 43 1 44 dcl QEDX_INFO_VERSION_1 character (8) static options (constant) initial ("qxi_01.1"); 1 45 1 46 /* END INCLUDE FILE ... qedx_info.incl.pl1 */ 74 75 2 1 /* BEGIN: sc_stat_.incl.pl1 * * * * * */ 2 2 2 3 2 4 /****^ HISTORY COMMENTS: 2 5* 1) change(87-02-04,GDixon), approve(87-05-25,MCR7690), 2 6* audit(87-06-02,Parisek), install(87-08-04,MR12.1-1056): 2 7* Add sc_stat_$vchn_requires_accept in support of DSA virtual channels. 2 8* 2) change(87-02-04,GDixon), approve(87-05-25,MCR7680), 2 9* audit(87-06-02,Parisek), install(87-08-04,MR12.1-1056): 2 10* Reorganized by type of data to improve readability. 2 11* END HISTORY COMMENTS */ 2 12 2 13 2 14 /* ACCESS NAMES */ 2 15 dcl ( 2 16 sc_stat_$exec_access_name, /* check MC access in an exec request */ 2 17 sc_stat_$unidentified_access_name /* check access if no one is logged in. */ 2 18 ) char(32) ext static; 2 19 2 20 /* PATHNAMES */ 2 21 dcl ( 2 22 sc_stat_$info_dir, /* admin info segs directory */ 2 23 sc_stat_$log_dir, /* as log segs directory */ 2 24 sc_stat_$mc_acs_dir, /* message coordinator ACS segments (.mcacs) dir */ 2 25 sc_stat_$sysdir /* system control directory */ 2 26 ) char(168) ext static; 2 27 2 28 /* OTHER CHAR STRINGS */ 2 29 dcl ( 2 30 sc_stat_$master_channel /* Master TTY channel. */ 2 31 ) char(6) aligned ext static; 2 32 2 33 /* LABELS */ 2 34 dcl ( 2 35 sc_stat_$admin_listener_exit_label, /* GO here to exit admin mode. Set to */ 2 36 /* ssu_$null_label unless */ 2 37 /* admin_listener is active. */ 2 38 sc_stat_$master_abort_label, /* GO here after fault that is not */ 2 39 /* attributable to a particular */ 2 40 /* command. */ 2 41 sc_stat_$system_shutdown_label /* GO here to shut down system */ 2 42 ) label variable ext static; 2 43 2 44 /* POINTERS TO */ 2 45 dcl ( 2 46 sc_stat_$admin_log_iocb, /* IOCB for admin log */ 2 47 sc_stat_$admin_log_write_ptr, /* DATA for log_write_ calls on the admin log */ 2 48 sc_stat_$admin_sci_ptr, /* DATA ssu_ for terminal currently executing */ 2 49 sc_stat_$as_log_write_ptr, /* DATA for log_write_ calls on as log, used */ 2 50 /* by sys_log_. */ 2 51 sc_stat_$initzer_ttyp, /* ENT mc_ate for initializer terminal */ 2 52 sc_stat_$master_iocb, /* IOCB for "master_i/o" */ 2 53 sc_stat_$master_sci_ptr, /* DATA ssu_ (permanent) for system control */ 2 54 sc_stat_$mc_ansp, /* HEAD of mc_anstbl */ 2 55 sc_stat_$mc_iocb, /* IOCB ptr for "mc_i/o" */ 2 56 sc_stat_$sv1_iocb, /* IOCB ptr for "severity1" */ 2 57 sc_stat_$sv2_iocb, /* IOCB ptr for "severity2" */ 2 58 sc_stat_$sv3_iocb /* IOCB ptr for "severity3" */ 2 59 ) ptr ext static; 2 60 2 61 /* SWITCHES */ 2 62 dcl ( 2 63 sc_stat_$Go, /* TRUE after answering service is listening*/ 2 64 sc_stat_$Go_typed, /* TRUE immediately after 'go' is typed */ 2 65 sc_stat_$Multics, /* TRUE after answering service started */ 2 66 sc_stat_$Multics_typed, /* TRUE immediately after 'mult' is typed */ 2 67 sc_stat_$Star_typed, /* TRUE if 'mult' and 'go' came from 'star' */ 2 68 sc_stat_$admin_listener_switch, /* TRUE if in the admin listener */ 2 69 sc_stat_$did_part1, /* TRUE if part 1 of system startup ec done */ 2 70 sc_stat_$did_part2, /* TRUE if part 2 of system startup ec done */ 2 71 sc_stat_$did_part3, /* TRUE if part 3 of system startup ec done */ 2 72 sc_stat_$mc_is_on, /* TRUE if message coordinator running */ 2 73 sc_stat_$no_operator_login, /* TRUE if operator login not required, or */ 2 74 /* if PNT not yet available. */ 2 75 sc_stat_$shutdown_typed, /* TRUE if 'shutdown' command in progress. */ 2 76 sc_stat_$test_mode, /* TRUE if in test environment */ 2 77 sc_stat_$vchn_requires_accept /* TRUE if vchn may only be used if accepted*/ 2 78 /* by operator signed on system console*/ 2 79 ) bit(1) aligned ext static; 2 80 2 81 2 82 /* END OF: sc_stat_.incl.pl1 * * * * * */ 76 77 78 end sc_edit_motd_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0809.1 sc_edit_motd_.pl1 >spec>install>1112>sc_edit_motd_.pl1 74 1 05/04/83 1118.0 qedx_info.incl.pl1 >ldd>include>qedx_info.incl.pl1 76 2 08/06/87 0913.5 sc_stat_.incl.pl1 >ldd>include>sc_stat_.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. QEDX_INFO_VERSION_1 000000 constant char(8) initial packed unaligned dcl 1-44 ref 52 addr builtin function dcl 41 ref 51 buffer_name 32 based char(16) array level 3 packed packed unaligned dcl 1-6 set ref 57* buffer_pathname 36 based char(256) array level 3 packed packed unaligned dcl 1-6 set ref 58* buffers 32 based structure array level 2 dcl 1-6 cleanup 000324 stack reference condition dcl 43 ref 46 code 000100 automatic fixed bin(35,0) dcl 26 set ref 62* cu_$get_command_processor 000010 constant entry external dcl 35 ref 45 cu_$set_command_processor 000012 constant entry external dcl 36 ref 46 47 64 default_read_ok 143(03) based bit(1) array level 4 packed packed unaligned dcl 1-6 set ref 60* default_write_ok 143(04) based bit(1) array level 4 packed packed unaligned dcl 1-6 set ref 61* editor_name 2 based char(72) level 3 packed packed unaligned dcl 1-6 set ref 53* flags 143 based structure array level 3 in structure "qedx_info" dcl 1-6 in procedure "sc_edit_motd_" flags 30 based structure level 3 in structure "qedx_info" dcl 1-6 in procedure "sc_edit_motd_" header based structure level 2 dcl 1-6 locked_pathname 143(01) based bit(1) array level 4 packed packed unaligned dcl 1-6 set ref 59* motd_entryname 000002 constant char(32) initial packed unaligned dcl 32 set ref 49* motd_pathname 000246 automatic char(168) packed unaligned dcl 31 set ref 49* 58 my_qedx_info 000102 automatic structure level 1 dcl 27 set ref 50* 51 n_buffers 31 based fixed bin(17,0) level 3 dcl 1-6 set ref 56* no_rw_path 30 based bit(1) level 4 packed packed unaligned dcl 1-6 set ref 54* pathname_ 000014 constant entry external dcl 37 ref 49 qedx_ 000016 constant entry external dcl 38 ref 62 qedx_info based structure level 1 dcl 1-6 qedx_info_ptr 000332 automatic pointer dcl 1-41 set ref 51* 52 53 54 55 56 57 58 59 60 61 62* query_if_modified 30(01) based bit(1) level 4 packed packed unaligned dcl 1-6 set ref 55* saved_command_processor 000320 automatic entry variable dcl 33 set ref 45* 46* 64* sc_stat_$admin_sci_ptr 000024 external static pointer dcl 2-45 set ref 70* sc_stat_$sysdir 000022 external static char(168) packed unaligned dcl 2-21 set ref 49* ssu_$print_message 000020 constant entry external dcl 39 ref 70 unspec builtin function dcl 41 set ref 50* version based char(8) level 3 dcl 1-6 set ref 52* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. qedx_info_n_buffers automatic fixed bin(17,0) dcl 1-42 sc_stat_$Go external static bit(1) dcl 2-62 sc_stat_$Go_typed external static bit(1) dcl 2-62 sc_stat_$Multics external static bit(1) dcl 2-62 sc_stat_$Multics_typed external static bit(1) dcl 2-62 sc_stat_$Star_typed external static bit(1) dcl 2-62 sc_stat_$admin_listener_exit_label external static label variable dcl 2-34 sc_stat_$admin_listener_switch external static bit(1) dcl 2-62 sc_stat_$admin_log_iocb external static pointer dcl 2-45 sc_stat_$admin_log_write_ptr external static pointer dcl 2-45 sc_stat_$as_log_write_ptr external static pointer dcl 2-45 sc_stat_$did_part1 external static bit(1) dcl 2-62 sc_stat_$did_part2 external static bit(1) dcl 2-62 sc_stat_$did_part3 external static bit(1) dcl 2-62 sc_stat_$exec_access_name external static char(32) packed unaligned dcl 2-15 sc_stat_$info_dir external static char(168) packed unaligned dcl 2-21 sc_stat_$initzer_ttyp external static pointer dcl 2-45 sc_stat_$log_dir external static char(168) packed unaligned dcl 2-21 sc_stat_$master_abort_label external static label variable dcl 2-34 sc_stat_$master_channel external static char(6) dcl 2-29 sc_stat_$master_iocb external static pointer dcl 2-45 sc_stat_$master_sci_ptr external static pointer dcl 2-45 sc_stat_$mc_acs_dir external static char(168) packed unaligned dcl 2-21 sc_stat_$mc_ansp external static pointer dcl 2-45 sc_stat_$mc_iocb external static pointer dcl 2-45 sc_stat_$mc_is_on external static bit(1) dcl 2-62 sc_stat_$no_operator_login external static bit(1) dcl 2-62 sc_stat_$shutdown_typed external static bit(1) dcl 2-62 sc_stat_$sv1_iocb external static pointer dcl 2-45 sc_stat_$sv2_iocb external static pointer dcl 2-45 sc_stat_$sv3_iocb external static pointer dcl 2-45 sc_stat_$system_shutdown_label external static label variable dcl 2-34 sc_stat_$test_mode external static bit(1) dcl 2-62 sc_stat_$unidentified_access_name external static char(32) packed unaligned dcl 2-15 sc_stat_$vchn_requires_accept external static bit(1) dcl 2-62 NAMES DECLARED BY EXPLICIT CONTEXT. sc_edit_motd_ 000034 constant entry external dcl 24 trap_editor_execute 000204 constant entry internal dcl 67 ref 47 47 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 370 416 237 400 Length 626 237 26 173 131 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME sc_edit_motd_ 242 external procedure is an external procedure. on unit on line 46 68 on unit trap_editor_execute 88 internal procedure is assigned to an entry variable. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME sc_edit_motd_ 000100 code sc_edit_motd_ 000102 my_qedx_info sc_edit_motd_ 000246 motd_pathname sc_edit_motd_ 000320 saved_command_processor sc_edit_motd_ 000332 qedx_info_ptr sc_edit_motd_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac enable_op ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$get_command_processor cu_$set_command_processor pathname_ qedx_ ssu_$print_message THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. sc_stat_$admin_sci_ptr sc_stat_$sysdir LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 24 000033 45 000041 46 000047 47 000073 49 000105 50 000125 51 000130 52 000132 53 000135 54 000140 55 000142 56 000144 57 000146 58 000151 59 000154 60 000156 61 000160 62 000162 64 000173 65 000202 67 000203 70 000211 72 000235 ----------------------------------------------------------- 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