COMPILATION LISTING OF SEGMENT linus_restore_format_option Compiled by: Multics PL/I Compiler, Release 28b, of April 11, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 09/16/83 1803.8 mst Fri Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /* format: off */ 7 8 /* This is the main level procedure called by ssu_ to implement the 9* linus restore_format_options request. Description and usage follows. 10* 11* Description: 12* 13* This request takes the pathname given as input and calls the 14* ssu_$execute_string entrypoint to do a subsystem exec_com 15* on the user specified file. 16* 17* Usage: "restore_format_options path" 18* 19* Both parameters are passed to this request by ssu_. 20* 21* 22* Known Bugs: 23* 24* Other Problems: 25* 26* History: 27* 28* Written - Al Dupuis - August 1983 29* 30**/ 31 32 linus_restore_format_option: proc (sci_ptr_parm, lcb_ptr_parm); 33 34 dcl sci_ptr_parm ptr parm; /* ptr to the subsystem control info structure */ 35 dcl lcb_ptr_parm ptr parm; /* ptr to the linus control block info structure */ 36 37 /* 38* Mainline Processing Overview. 39* 40* (1) Get and expand/suffix the pathname arg. 41* 42* (2) Make sure the file exists. 43* 44* (3) Get ssu_ to do a subsystem ec on the file. 45**/ 46 47 48 sci_ptr = sci_ptr_parm; 49 50 /* The first and only arg must be pathname. */ 51 52 call ssu_$arg_count (sci_ptr, number_of_args_supplied); 53 54 if number_of_args_supplied ^= 1 55 then do; 56 if number_of_args_supplied = 0 57 then code = error_table_$noarg; 58 else code = error_table_$inconsistent; 59 call ssu_$abort_line (sci_ptr, code, 60 "^/Usage: restore_format_options path"); 61 end; 62 63 call ssu_$arg_ptr (sci_ptr, 1, arg_ptr, arg_length); 64 pathname = arg; 65 call expand_pathname_$add_suffix (pathname, "fo.lec", 66 dir_name, entry_name, code); 67 if code ^= 0 68 then call ssu_$abort_line (sci_ptr, code, 69 "^/The pathname ^a couldn't be expanded.", pathname); 70 71 call hcs_$status_minf (dir_name, entry_name, 1, file_type, 72 bit_count, code); 73 if code = error_table_$noentry 74 then call ssu_$abort_line (sci_ptr, code, 75 "^/The file ^a doesn't exist.", 76 rtrim (dir_name) || ">" || rtrim (entry_name)); 77 78 call ssu_$execute_string (sci_ptr, "ec " || rtrim (dir_name) 79 || ">" || rtrim (entry_name), code); 80 81 return; 82 83 84 dcl arg char (arg_length) based (arg_ptr); 85 dcl arg_length fixed bin (21); 86 dcl arg_ptr ptr; 87 88 dcl bit_count fixed bin (24); 89 90 dcl code fixed bin (35); 91 92 dcl dir_name char (168); 93 94 dcl entry_name char (32); 95 dcl error_table_$inconsistent fixed bin(35) ext static; 96 dcl error_table_$noarg fixed bin(35) ext static; 97 dcl error_table_$noentry fixed bin(35) ext static; 98 dcl expand_pathname_$add_suffix entry (char(*), char(*), char(*), char(*), fixed bin(35)); 99 100 dcl file_type fixed bin (2); 101 102 dcl hcs_$status_minf entry (char(*), char(*), fixed bin(1), fixed bin(2), fixed bin(24), fixed bin(35)); 103 104 dcl number_of_args_supplied fixed bin; 105 106 dcl pathname char (168); 107 108 dcl rtrim builtin; 109 110 dcl sci_ptr ptr; 111 dcl ssu_$abort_line entry() options(variable); 112 dcl ssu_$arg_count entry (ptr, fixed bin); 113 dcl ssu_$arg_ptr entry (ptr, fixed bin, ptr, fixed bin(21)); 114 dcl ssu_$execute_string entry (ptr, char(*), fixed bin(35)); 115 116 end linus_restore_format_option; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/16/83 1740.3 linus_restore_format_option.pl1 >spec>on>09/16/83-linus>linus_restore_format_option.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. arg based char unaligned dcl 84 ref 64 arg_length 000100 automatic fixed bin(21,0) dcl 85 set ref 63* 64 arg_ptr 000102 automatic pointer dcl 86 set ref 63* 64 bit_count 000104 automatic fixed bin(24,0) dcl 88 set ref 71* code 000105 automatic fixed bin(35,0) dcl 90 set ref 56* 58* 59* 65* 67 67* 71* 73 73* 78* dir_name 000106 automatic char(168) unaligned dcl 92 set ref 65* 71* 73 78 entry_name 000160 automatic char(32) unaligned dcl 94 set ref 65* 71* 73 78 error_table_$inconsistent 000010 external static fixed bin(35,0) dcl 95 ref 58 error_table_$noarg 000012 external static fixed bin(35,0) dcl 96 ref 56 error_table_$noentry 000014 external static fixed bin(35,0) dcl 97 ref 73 expand_pathname_$add_suffix 000016 constant entry external dcl 98 ref 65 file_type 000170 automatic fixed bin(2,0) dcl 100 set ref 71* hcs_$status_minf 000020 constant entry external dcl 102 ref 71 lcb_ptr_parm parameter pointer dcl 35 ref 32 number_of_args_supplied 000171 automatic fixed bin(17,0) dcl 104 set ref 52* 54 56 pathname 000172 automatic char(168) unaligned dcl 106 set ref 64* 65* 67* rtrim builtin function dcl 108 ref 73 73 78 78 sci_ptr 000244 automatic pointer dcl 110 set ref 48* 52* 59* 63* 67* 73* 78* sci_ptr_parm parameter pointer dcl 34 ref 32 48 ssu_$abort_line 000022 constant entry external dcl 111 ref 59 67 73 ssu_$arg_count 000024 constant entry external dcl 112 ref 52 ssu_$arg_ptr 000026 constant entry external dcl 113 ref 63 ssu_$execute_string 000030 constant entry external dcl 114 ref 78 NAME DECLARED BY EXPLICIT CONTEXT. linus_restore_format_option 000056 constant entry external dcl 32 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 652 704 517 662 Length 1074 517 32 153 132 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_restore_format_option 251 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME linus_restore_format_option 000100 arg_length linus_restore_format_option 000102 arg_ptr linus_restore_format_option 000104 bit_count linus_restore_format_option 000105 code linus_restore_format_option 000106 dir_name linus_restore_format_option 000160 entry_name linus_restore_format_option 000170 file_type linus_restore_format_option 000171 number_of_args_supplied linus_restore_format_option 000172 pathname linus_restore_format_option 000244 sci_ptr linus_restore_format_option THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. expand_pathname_$add_suffix hcs_$status_minf ssu_$abort_line ssu_$arg_count ssu_$arg_ptr ssu_$execute_string THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$inconsistent error_table_$noarg error_table_$noentry LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 32 000052 48 000063 52 000067 54 000077 56 000102 58 000110 59 000113 63 000136 64 000155 65 000162 67 000214 71 000246 73 000305 78 000411 81 000514 ----------------------------------------------------------- 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