COMPILATION LISTING OF SEGMENT create_projfile Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/09/85 1139.0 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 /* create_projfile.pl1 -- minimal program to invent an empty projfile. */ 7 /* format: style2 */ 8 /* BIM 1984-08-25 */ 9 create_projfile: 10 procedure options (variable); 11 12 declare com_err_ entry () options (variable); 13 declare command_query_$yes_no entry () options (variable); 14 declare cu_$arg_count entry (fixed bin, fixed bin (35)); 15 declare cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 16 declare expand_pathname_ entry (character (*), character (*), character (*), fixed binary (35)); 17 declare get_group_id_ entry () returns (char (32)); 18 declare get_wdir_ entry() returns(character (168)); 19 declare initiate_file_$create entry (character (*), character (*), bit (*), pointer, bit (1) aligned, 20 fixed binary (24), fixed binary (35)); 21 declare pathname_ entry (character (*), character (*)) returns (character (168)); 22 declare terminate_file_ entry (pointer, fixed binary (24), bit (*), fixed binary (35)); 23 24 declare error_table_$namedup fixed bin (35) ext static; 25 26 declare arg_count fixed bin; 27 declare ap pointer; 28 declare al fixed bin (21); 29 declare argument char (al) based (ap); 30 declare code fixed bin (35); 31 declare created bit (1) aligned; 32 declare dir_name char (168); 33 declare entryname char (32); 34 declare pp pointer; 35 declare yes_sw bit (1) aligned; 36 37 declare ME char (32) init ("create_projfile") int static options (constant); 38 1 1 /* BEGIN INCLUDE FILE .. projfile.incl.pl1 */ 1 2 /* Modified by T. Casey April 1976 to change disk_infs (obsolete) to dir_disk_use */ 1 3 /* Modified 1984-07-09 BIM for dir_disk_quota, version */ 1 4 /* Modified 1984-09-14 BIM for reasonable array size */ 1 5 1 6 dcl 1 projfile based (pp) aligned, /* Project history file */ 1 7 2 nproj fixed bin (35), /* number of entries */ 1 8 2 version fixed bin, 1 9 2 projfilexx0 (6) bit (36) aligned, 1 10 2 projfiletab (3000), /* in seg limit */ 1 11 3 id char (12) unal, /* project ID */ 1 12 3 title char (52) unal, /* project title */ 1 13 3 inv char (32) unal, /* name of principal investigator */ 1 14 3 inv_addr char (32) unal, /* address */ 1 15 3 sup char (32) unal, /* name of supervisor */ 1 16 3 sup_addr char (32) unal, /* address */ 1 17 3 sup_phone char (16) unal, /* telephone */ 1 18 3 on fixed bin (71), /* date on */ 1 19 3 off fixed bin (71), /* date off */ 1 20 3 disk_psec fixed bin (71), /* project disk page-seconds */ 1 21 3 disk_quota fixed bin (35), /* project disk quota */ 1 22 3 dir_disk_quota fixed bin (35), /* project dir disk quota */ 1 23 3 disk_use fixed bin (35), /* total segment pages used */ 1 24 3 dir_disk_use fixed bin (35), /* total directory pages used */ 1 25 3 misc_charges float bin, /* manuals, etc */ 1 26 3 n_misc fixed bin, /* number of entries */ 1 27 3 processed fixed bin, /* temp for usage-report */ 1 28 3 pad bit (36) aligned; /* out to even number of words */ 1 29 1 30 dcl loph int static fixed bin (17) options (constant) init (8), /* lth of projfile header */ 1 31 lope int static fixed bin (17) options (constant) init (66); /* lth of projflile entry */ 1 32 1 33 dcl PROJFILE_VERSION fixed bin init (3) int static options (constant); 1 34 1 35 /* END INCLUDE FILE ... projfile.incl.pl1 */ 39 2 1 /* BEGIN INCLUDE FILE ... access_mode_values.incl.pl1 2 2* 2 3* Values for the "access mode" argument so often used in hardcore 2 4* James R. Davis 26 Jan 81 MCR 4844 2 5* Added constants for SM access 4/28/82 Jay Pattin 2 6* Added text strings 03/19/85 Chris Jones 2 7**/ 2 8 2 9 2 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 2 11 dcl ( 2 12 N_ACCESS init ("000"b), 2 13 R_ACCESS init ("100"b), 2 14 E_ACCESS init ("010"b), 2 15 W_ACCESS init ("001"b), 2 16 RE_ACCESS init ("110"b), 2 17 REW_ACCESS init ("111"b), 2 18 RW_ACCESS init ("101"b), 2 19 S_ACCESS init ("100"b), 2 20 M_ACCESS init ("010"b), 2 21 A_ACCESS init ("001"b), 2 22 SA_ACCESS init ("101"b), 2 23 SM_ACCESS init ("110"b), 2 24 SMA_ACCESS init ("111"b) 2 25 ) bit (3) internal static options (constant); 2 26 2 27 /* The following arrays are meant to be accessed by doing either 1) bin (bit_value) or 2 28* 2) divide (bin_value, 2) to come up with an index into the array. */ 2 29 2 30 dcl SEG_ACCESS_MODE_NAMES (0:7) init ("null", "W", "E", "EW", "R", "RW", "RE", "REW") char (4) internal 2 31 static options (constant); 2 32 2 33 dcl DIR_ACCESS_MODE_NAMES (0:7) init ("null", "A", "M", "MA", "S", "SA", "SM", "SMA") char (4) internal 2 34 static options (constant); 2 35 2 36 dcl ( 2 37 N_ACCESS_BIN init (00000b), 2 38 R_ACCESS_BIN init (01000b), 2 39 E_ACCESS_BIN init (00100b), 2 40 W_ACCESS_BIN init (00010b), 2 41 RW_ACCESS_BIN init (01010b), 2 42 RE_ACCESS_BIN init (01100b), 2 43 REW_ACCESS_BIN init (01110b), 2 44 S_ACCESS_BIN init (01000b), 2 45 M_ACCESS_BIN init (00010b), 2 46 A_ACCESS_BIN init (00001b), 2 47 SA_ACCESS_BIN init (01001b), 2 48 SM_ACCESS_BIN init (01010b), 2 49 SMA_ACCESS_BIN init (01011b) 2 50 ) fixed bin (5) internal static options (constant); 2 51 2 52 /* END INCLUDE FILE ... access_mode_values.incl.pl1 */ 40 3 1 /* BEGIN INCLUDE FILE ... terminate_file.incl.pl1 */ 3 2 /* format: style2,^inddcls,idind32 */ 3 3 3 4 declare 1 terminate_file_switches based, 3 5 2 truncate bit (1) unaligned, 3 6 2 set_bc bit (1) unaligned, 3 7 2 terminate bit (1) unaligned, 3 8 2 force_write bit (1) unaligned, 3 9 2 delete bit (1) unaligned; 3 10 3 11 declare TERM_FILE_TRUNC bit (1) internal static options (constant) initial ("1"b); 3 12 declare TERM_FILE_BC bit (2) internal static options (constant) initial ("01"b); 3 13 declare TERM_FILE_TRUNC_BC bit (2) internal static options (constant) initial ("11"b); 3 14 declare TERM_FILE_TERM bit (3) internal static options (constant) initial ("001"b); 3 15 declare TERM_FILE_TRUNC_BC_TERM bit (3) internal static options (constant) initial ("111"b); 3 16 declare TERM_FILE_FORCE_WRITE bit (4) internal static options (constant) initial ("0001"b); 3 17 declare TERM_FILE_DELETE bit (5) internal static options (constant) initial ("00001"b); 3 18 3 19 /* END INCLUDE FILE ... terminate_file.incl.pl1 */ 41 42 43 44 call cu_$arg_count (arg_count, code); 45 if code ^= 0 46 then do; 47 call com_err_ (code, ME); 48 return; 49 end; 50 51 if arg_count ^= 1 52 then do; 53 call com_err_ (0, ME, "Usage: ^a NEW_PROJFILE_PN", ME); 54 return; 55 end; 56 57 pp = null (); 58 59 call cu_$arg_ptr (1, ap, al, (0)); 60 call expand_pathname_ (argument, dir_name, entryname, code); 61 if code ^= 0 62 then do; 63 call com_err_ (code, ME, "^a", argument); 64 return; 65 end; 66 67 call initiate_file_$create (dir_name, entryname, RW_ACCESS, pp, created, (0), code); 68 if code ^= 0 69 then do; 70 call com_err_ (code, ME, "^a", pathname_ (dir_name, entryname)); 71 return; 72 end; 73 74 if ^created 75 then do; 76 call command_query_$yes_no (yes_sw, error_table_$namedup, ME, 77 "The create_projfile command will discard all information in an existing projfile.^/ Answer ""no"" unless you are sure that you want to discard the information in this segment." 78 , "projfile ""^a"" already exists. Do you wish to overwrite it.?", pathname_ (dir_name, entryname)); 79 if ^yes_sw 80 then do; 81 call terminate_file_ (pp, (0), TERM_FILE_TERM, (0)); 82 return; 83 end; 84 end; 85 86 projfile.nproj = 0; 87 projfile.projfilexx0 = ""b; 88 projfile.projfiletab (*).id = ""; 89 projfile.projfiletab (*).title = ""; 90 projfile.projfiletab (*).inv = ""; 91 projfile.projfiletab (*).inv_addr = ""; 92 projfile.projfiletab (*).sup = ""; 93 projfile.projfiletab (*).sup_addr = ""; 94 projfile.projfiletab (*).sup_phone = ""; 95 projfile.version = PROJFILE_VERSION; 96 call terminate_file_ (pp, 0, TERM_FILE_TERM, (0)); 97 return; 98 end create_projfile; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/08/85 1133.4 create_projfile.pl1 >spec>on>41-15>create_projfile.pl1 39 1 09/20/84 0925.7 projfile.incl.pl1 >ldd>include>projfile.incl.pl1 40 2 04/09/85 1109.7 access_mode_values.incl.pl1 >spec>on>41-15>access_mode_values.incl.pl1 41 3 04/06/83 1239.4 terminate_file.incl.pl1 >ldd>include>terminate_file.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. ME 000002 constant char(32) initial unaligned dcl 37 set ref 47* 53* 53* 63* 70* 76* PROJFILE_VERSION constant fixed bin(17,0) initial dcl 1-33 ref 95 RW_ACCESS 000001 constant bit(3) initial unaligned dcl 2-11 set ref 67* TERM_FILE_TERM 000000 constant bit(3) initial unaligned dcl 3-14 set ref 81* 96* al 000104 automatic fixed bin(21,0) dcl 28 set ref 59* 60 60 63 63 ap 000102 automatic pointer dcl 27 set ref 59* 60 63 arg_count 000100 automatic fixed bin(17,0) dcl 26 set ref 44* 51 argument based char unaligned dcl 29 set ref 60* 63* code 000105 automatic fixed bin(35,0) dcl 30 set ref 44* 45 47* 60* 61 63* 67* 68 70* com_err_ 000010 constant entry external dcl 12 ref 47 53 63 70 command_query_$yes_no 000012 constant entry external dcl 13 ref 76 created 000106 automatic bit(1) dcl 31 set ref 67* 74 cu_$arg_count 000014 constant entry external dcl 14 ref 44 cu_$arg_ptr 000016 constant entry external dcl 15 ref 59 dir_name 000107 automatic char(168) unaligned dcl 32 set ref 60* 67* 70* 70* 76* 76* entryname 000161 automatic char(32) unaligned dcl 33 set ref 60* 67* 70* 70* 76* 76* error_table_$namedup 000030 external static fixed bin(35,0) dcl 24 set ref 76* expand_pathname_ 000020 constant entry external dcl 16 ref 60 id 10 based char(12) array level 3 packed unaligned dcl 1-6 set ref 88* initiate_file_$create 000022 constant entry external dcl 19 ref 67 inv 30 based char(32) array level 3 packed unaligned dcl 1-6 set ref 90* inv_addr 40 based char(32) array level 3 packed unaligned dcl 1-6 set ref 91* nproj based fixed bin(35,0) level 2 dcl 1-6 set ref 86* pathname_ 000024 constant entry external dcl 21 ref 70 70 76 76 pp 000172 automatic pointer dcl 34 set ref 57* 67* 81* 86 87 88 89 90 91 92 93 94 95 96* projfile based structure level 1 dcl 1-6 projfiletab 10 based structure array level 2 dcl 1-6 projfilexx0 2 based bit(36) array level 2 dcl 1-6 set ref 87* sup 50 based char(32) array level 3 packed unaligned dcl 1-6 set ref 92* sup_addr 60 based char(32) array level 3 packed unaligned dcl 1-6 set ref 93* sup_phone 70 based char(16) array level 3 packed unaligned dcl 1-6 set ref 94* terminate_file_ 000026 constant entry external dcl 22 ref 81 96 title 13 based char(52) array level 3 packed unaligned dcl 1-6 set ref 89* version 1 based fixed bin(17,0) level 2 dcl 1-6 set ref 95* yes_sw 000174 automatic bit(1) dcl 35 set ref 76* 79 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. A_ACCESS internal static bit(3) initial unaligned dcl 2-11 A_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 DIR_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 2-33 E_ACCESS internal static bit(3) initial unaligned dcl 2-11 E_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 M_ACCESS internal static bit(3) initial unaligned dcl 2-11 M_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 N_ACCESS internal static bit(3) initial unaligned dcl 2-11 N_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 REW_ACCESS internal static bit(3) initial unaligned dcl 2-11 REW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 RE_ACCESS internal static bit(3) initial unaligned dcl 2-11 RE_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 RW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 R_ACCESS internal static bit(3) initial unaligned dcl 2-11 R_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 SA_ACCESS internal static bit(3) initial unaligned dcl 2-11 SA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 SEG_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 2-30 SMA_ACCESS internal static bit(3) initial unaligned dcl 2-11 SMA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 SM_ACCESS internal static bit(3) initial unaligned dcl 2-11 SM_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 S_ACCESS internal static bit(3) initial unaligned dcl 2-11 S_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 TERM_FILE_BC internal static bit(2) initial unaligned dcl 3-12 TERM_FILE_DELETE internal static bit(5) initial unaligned dcl 3-17 TERM_FILE_FORCE_WRITE internal static bit(4) initial unaligned dcl 3-16 TERM_FILE_TRUNC internal static bit(1) initial unaligned dcl 3-11 TERM_FILE_TRUNC_BC internal static bit(2) initial unaligned dcl 3-13 TERM_FILE_TRUNC_BC_TERM internal static bit(3) initial unaligned dcl 3-15 W_ACCESS internal static bit(3) initial unaligned dcl 2-11 W_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 get_group_id_ 000000 constant entry external dcl 17 get_wdir_ 000000 constant entry external dcl 18 lope internal static fixed bin(17,0) initial dcl 1-30 loph internal static fixed bin(17,0) initial dcl 1-30 terminate_file_switches based structure level 1 packed unaligned dcl 3-4 NAME DECLARED BY EXPLICIT CONTEXT. create_projfile 000135 constant entry external dcl 9 NAME DECLARED BY CONTEXT OR IMPLICATION. null builtin function ref 57 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1132 1164 1002 1142 Length 1416 1002 32 215 127 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME create_projfile 278 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME create_projfile 000100 arg_count create_projfile 000102 ap create_projfile 000104 al create_projfile 000105 code create_projfile 000106 created create_projfile 000107 dir_name create_projfile 000161 entryname create_projfile 000172 pp create_projfile 000174 yes_sw create_projfile THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ command_query_$yes_no cu_$arg_count cu_$arg_ptr expand_pathname_ initiate_file_$create pathname_ terminate_file_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$namedup LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 9 000134 44 000142 45 000152 47 000154 48 000171 51 000172 53 000175 54 000225 57 000226 59 000230 60 000250 61 000300 63 000302 64 000334 67 000335 68 000377 70 000401 71 000450 74 000451 76 000454 79 000537 81 000542 82 000571 86 000572 87 000573 88 000605 89 000623 90 000641 91 000657 92 000675 93 000713 94 000731 95 000747 96 000752 97 001001 ----------------------------------------------------------- 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