COMPILATION LISTING OF SEGMENT forum_find_v1 Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/09/85 1150.1 mst Tue Options: optimize map 1 /* ************************************************************** 2* * * 3* * Copyright, (C) Massachusetts Institute of Technology, 1985 * 4* * * 5* ************************************************************** */ 6 ffv1: 7 forum_find_v1: 8 proc (); 9 1 1 /* BEGIN INCLUDE FILE . . . star_structures.incl.pl1 */ 1 2 1 3 /* This include file contains structures for the hcs_$star_, 1 4* hcs_$star_list_ and hcs_$star_dir_list_ entry points. 1 5* 1 6* Written 23 October 1978 by Monte Davidoff. 1 7* Modified January 1979 by Michael R. Jordan to use unsigned and different pointers for different structures. 1 8* Modified June 1981 by C. Hornig to count link pathnames more efficiently. 1 9**/ 1 10 1 11 /* automatic */ 1 12 1 13 declare star_branch_count fixed binary; /* hcs_$star_list_, hcs_$star_dir_list_: matching branch count */ 1 14 declare star_entry_count fixed binary; /* hcs_$star_: number of matching entries */ 1 15 declare star_entry_ptr pointer; /* hcs_$star_: pointer to array of entry information */ 1 16 declare star_list_branch_ptr pointer; /* hcs_$star_list_, hcs_$star_dir_list_: ptr to array of info */ 1 17 declare star_link_count fixed binary; /* hcs_$star_list_, hcs_$star_dir_list_: matching link count */ 1 18 declare star_linkx fixed binary; /* hcs_$star_list_, hcs_$star_dir_list_: index into star_links */ 1 19 declare star_names_ptr pointer; /* hcs_$star_: pointer to array of entry names */ 1 20 declare star_list_names_ptr pointer; /* hcs_$star_list_, hcs_$star_dir_list_: ptr to entry names */ 1 21 declare star_select_sw fixed binary (3); /* hcs_$star_list_, hcs_$star_dir_list_: what info to return */ 1 22 1 23 /* based */ 1 24 1 25 /* hcs_$star_ entry structure */ 1 26 1 27 declare 1 star_entries (star_entry_count) aligned based (star_entry_ptr), 1 28 2 type fixed binary (2) unsigned unaligned, 1 29 /* storage system type */ 1 30 2 nnames fixed binary (16) unsigned unaligned, 1 31 /* number of names of entry that match star_name */ 1 32 2 nindex fixed binary (18) unsigned unaligned; 1 33 /* index of first name in star_names */ 1 34 1 35 /* hcs_$star_ name structure */ 1 36 1 37 declare star_names (sum (star_entries (*).nnames)) char (32) based (star_names_ptr); 1 38 1 39 /* hcs_$star_list_ branch structure */ 1 40 1 41 declare 1 star_list_branch (star_branch_count + star_link_count) aligned based (star_list_branch_ptr), 1 42 2 type fixed binary (2) unsigned unaligned, 1 43 /* storage system type */ 1 44 2 nnames fixed binary (16) unsigned unaligned, 1 45 /* number of names of entry that match star_name */ 1 46 2 nindex fixed binary (18) unsigned unaligned, 1 47 /* index of first name in star_list_names */ 1 48 2 dtcm bit (36) unaligned, /* date-time contents of branch were last modified */ 1 49 2 dtu bit (36) unaligned, /* date-time branch was last used */ 1 50 2 mode bit (5) unaligned, /* user's access mode to the branch */ 1 51 2 raw_mode bit (5) unaligned, /* user's ACL access mode */ 1 52 2 master_dir bit (1) unaligned, /* is branch a master directory */ 1 53 2 pad bit (7) unaligned, 1 54 2 records fixed binary (18) unsigned unaligned; 1 55 /* records used by branch */ 1 56 1 57 /* hcs_$star_dir_list_ branch structure */ 1 58 1 59 declare 1 star_dir_list_branch (star_branch_count + star_link_count) aligned based (star_list_branch_ptr), 1 60 2 type fixed binary (2) unsigned unaligned, 1 61 /* storage system type */ 1 62 2 nnames fixed binary (16) unsigned unaligned, 1 63 /* number of names of entry that match star_name */ 1 64 2 nindex fixed binary (18) unsigned unaligned, 1 65 /* index of first name in star_list_names */ 1 66 2 dtem bit (36) unaligned, /* date-time directory entry of branch was last modified */ 1 67 2 pad bit (36) unaligned, 1 68 2 mode bit (5) unaligned, /* user's access mode to the branch */ 1 69 2 raw_mode bit (5) unaligned, /* user's ACL access mode */ 1 70 2 master_dir bit (1) unaligned, /* is branch a master directory */ 1 71 2 bit_count fixed binary (24) unaligned; 1 72 /* bit count of the branch */ 1 73 1 74 /* hcs_$star_list_ and hcs_$star_dir_list_ link structure */ 1 75 1 76 declare 1 star_links (star_branch_count + star_link_count) aligned based (star_list_branch_ptr), 1 77 2 type fixed binary (2) unsigned unaligned, 1 78 /* storage system type */ 1 79 2 nnames fixed binary (16) unsigned unaligned, 1 80 /* number of names of entry that match star_name */ 1 81 2 nindex fixed binary (18) unsigned unaligned, 1 82 /* index of first name in star_list_names */ 1 83 2 dtem bit (36) unaligned, /* date-time link was last modified */ 1 84 2 dtd bit (36) unaligned, /* date-time the link was last dumped */ 1 85 2 pathname_len fixed binary (18) unsigned unaligned, 1 86 /* length of the pathname of the link */ 1 87 2 pathname_index fixed binary (18) unsigned unaligned; 1 88 /* index of start of pathname in star_list_names */ 1 89 1 90 /* hcs_$star_list_ and hcs_$star_dir_list_ name array */ 1 91 1 92 declare star_list_names char (32) based (star_list_names_ptr) 1 93 dimension (star_links (star_branch_count + star_link_count).nindex 1 94 + star_links (star_branch_count + star_link_count).nnames 1 95 + divide (star_links (star_branch_count + star_link_count).pathname_len + 31, 32, 17, 0) 1 96 * binary ( 1 97 (star_links (star_branch_count + star_link_count).type = star_LINK) 1 98 & (star_select_sw >= star_LINKS_ONLY_WITH_LINK_PATHS), 1)); 1 99 1 100 /* hcs_$star_list_ and hcs_$star_dir_list_ link pathname */ 1 101 1 102 declare star_link_pathname char (star_links (star_linkx).pathname_len) 1 103 based (addr (star_list_names (star_links (star_linkx).pathname_index))); 1 104 1 105 /* internal static */ 1 106 1 107 /* star_select_sw values */ 1 108 1 109 declare star_LINKS_ONLY fixed binary (2) internal static options (constant) initial (1); 1 110 declare star_BRANCHES_ONLY fixed binary (2) internal static options (constant) initial (2); 1 111 declare star_ALL_ENTRIES fixed binary (2) internal static options (constant) initial (3); 1 112 declare star_LINKS_ONLY_WITH_LINK_PATHS 1 113 fixed binary (3) internal static options (constant) initial (5); 1 114 declare star_ALL_ENTRIES_WITH_LINK_PATHS 1 115 fixed binary (3) internal static options (constant) initial (7); 1 116 1 117 /* storage system types */ 1 118 1 119 declare star_LINK fixed binary (2) unsigned internal static options (constant) initial (0); 1 120 declare star_SEGMENT fixed binary (2) unsigned internal static options (constant) initial (1); 1 121 declare star_DIRECTORY fixed binary (2) unsigned internal static options (constant) initial (2); 1 122 1 123 /* END INCLUDE FILE . . . star_structures.incl.pl1 */ 10 2 1 /* --------------- BEGIN include file status_structures.incl.pl1 --------------- */ 2 2 2 3 /* Revised from existing include files 09/26/78 by C. D. Tavares */ 2 4 2 5 /* This include file contains branch and link structures returned by 2 6* hcs_$status_ and hcs_$status_long. */ 2 7 2 8 dcl 1 status_branch aligned based (status_ptr), 2 9 2 short aligned, 2 10 3 type fixed bin (2) unaligned unsigned, /* seg, dir, or link */ 2 11 3 nnames fixed bin (16) unaligned unsigned, /* number of names */ 2 12 3 names_relp bit (18) unaligned, /* see entry_names dcl */ 2 13 3 dtcm bit (36) unaligned, /* date/time contents last modified */ 2 14 3 dtu bit (36) unaligned, /* date/time last used */ 2 15 3 mode bit (5) unaligned, /* caller's effective access */ 2 16 3 raw_mode bit (5) unaligned, /* caller's raw "rew" modes */ 2 17 3 pad1 bit (8) unaligned, 2 18 3 records_used fixed bin (18) unaligned unsigned, /* number of NONZERO pages used */ 2 19 2 20 /* Limit of information returned by hcs_$status_ */ 2 21 2 22 2 long aligned, 2 23 3 dtd bit (36) unaligned, /* date/time last dumped */ 2 24 3 dtem bit (36) unaligned, /* date/time branch last modified */ 2 25 3 lvid bit (36) unaligned, /* logical volume ID */ 2 26 3 current_length fixed bin (12) unaligned unsigned, /* number of last page used */ 2 27 3 bit_count fixed bin (24) unaligned unsigned, /* reported length in bits */ 2 28 3 pad2 bit (8) unaligned, 2 29 3 copy_switch bit (1) unaligned, /* copy switch */ 2 30 3 tpd_switch bit (1) unaligned, /* transparent to paging device switch */ 2 31 3 mdir_switch bit (1) unaligned, /* is a master dir */ 2 32 3 damaged_switch bit (1) unaligned, /* salvager warned of possible damage */ 2 33 3 synchronized_switch bit (1) unaligned, /* DM synchronized file */ 2 34 3 pad3 bit (5) unaligned, 2 35 3 ring_brackets (0:2) fixed bin (6) unaligned unsigned, 2 36 3 uid bit (36) unaligned; /* unique ID */ 2 37 2 38 dcl 1 status_link aligned based (status_ptr), 2 39 2 type fixed bin (2) unaligned unsigned, /* as above */ 2 40 2 nnames fixed bin (16) unaligned unsigned, 2 41 2 names_relp bit (18) unaligned, 2 42 2 dtem bit (36) unaligned, 2 43 2 dtd bit (36) unaligned, 2 44 2 pathname_length fixed bin (17) unaligned, /* see pathname */ 2 45 2 pathname_relp bit (18) unaligned; /* see pathname */ 2 46 2 47 dcl status_entry_names (status_branch.nnames) character (32) aligned 2 48 based (pointer (status_area_ptr, status_branch.names_relp)), 2 49 /* array of names returned */ 2 50 status_pathname character (status_link.pathname_length) aligned 2 51 based (pointer (status_area_ptr, status_link.pathname_relp)), 2 52 /* link target path */ 2 53 status_area_ptr pointer, 2 54 status_ptr pointer; 2 55 2 56 dcl (Link initial (0), 2 57 Segment initial (1), 2 58 Directory initial (2)) fixed bin internal static options (constant); 2 59 /* values for type fields declared above */ 2 60 2 61 /* ---------------- END include file status_structures.incl.pl1 ---------------- */ 11 3 1 /* BEGIN INCLUDE FILE ... access_mode_values.incl.pl1 3 2* 3 3* Values for the "access mode" argument so often used in hardcore 3 4* James R. Davis 26 Jan 81 MCR 4844 3 5* Added constants for SM access 4/28/82 Jay Pattin 3 6* Added text strings 03/19/85 Chris Jones 3 7**/ 3 8 3 9 3 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 3 11 dcl ( 3 12 N_ACCESS init ("000"b), 3 13 R_ACCESS init ("100"b), 3 14 E_ACCESS init ("010"b), 3 15 W_ACCESS init ("001"b), 3 16 RE_ACCESS init ("110"b), 3 17 REW_ACCESS init ("111"b), 3 18 RW_ACCESS init ("101"b), 3 19 S_ACCESS init ("100"b), 3 20 M_ACCESS init ("010"b), 3 21 A_ACCESS init ("001"b), 3 22 SA_ACCESS init ("101"b), 3 23 SM_ACCESS init ("110"b), 3 24 SMA_ACCESS init ("111"b) 3 25 ) bit (3) internal static options (constant); 3 26 3 27 /* The following arrays are meant to be accessed by doing either 1) bin (bit_value) or 3 28* 2) divide (bin_value, 2) to come up with an index into the array. */ 3 29 3 30 dcl SEG_ACCESS_MODE_NAMES (0:7) init ("null", "W", "E", "EW", "R", "RW", "RE", "REW") char (4) internal 3 31 static options (constant); 3 32 3 33 dcl DIR_ACCESS_MODE_NAMES (0:7) init ("null", "A", "M", "MA", "S", "SA", "SM", "SMA") char (4) internal 3 34 static options (constant); 3 35 3 36 dcl ( 3 37 N_ACCESS_BIN init (00000b), 3 38 R_ACCESS_BIN init (01000b), 3 39 E_ACCESS_BIN init (00100b), 3 40 W_ACCESS_BIN init (00010b), 3 41 RW_ACCESS_BIN init (01010b), 3 42 RE_ACCESS_BIN init (01100b), 3 43 REW_ACCESS_BIN init (01110b), 3 44 S_ACCESS_BIN init (01000b), 3 45 M_ACCESS_BIN init (00010b), 3 46 A_ACCESS_BIN init (00001b), 3 47 SA_ACCESS_BIN init (01001b), 3 48 SM_ACCESS_BIN init (01010b), 3 49 SMA_ACCESS_BIN init (01011b) 3 50 ) fixed bin (5) internal static options (constant); 3 51 3 52 /* END INCLUDE FILE ... access_mode_values.incl.pl1 */ 12 13 14 declare arg_count fixed bin, 15 arg_ptr ptr, 16 arg_len fixed bin (21), 17 arg char (arg_len) based (arg_ptr), 18 (dir, dir_dir) char (168), 19 dir_name char (32), 20 dir_quota fixed bin (18), 21 dir_qused fixed bin (18), 22 idx fixed bin, 23 modes bit (36) aligned, 24 name char (32), 25 v1_recs_used fixed bin, 26 v2_qused fixed bin (18), 27 status fixed bin (35); 28 29 declare cu_$arg_count entry (fixed bin, fixed bin(35)), 30 cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)), 31 check_gate_access_ entry (char (*), ptr, fixed bin (35)), 32 com_err_ entry options (variable), 33 convert_status_code_ entry (fixed bin(35), char(8) aligned, char(100) aligned), 34 expand_pathname_ entry (char(*), char(*), char(*), fixed bin(35)), 35 forum_$delete_forum entry (char(*), char(*), fixed bin(35)), 36 forum_$get_forum_path entry (char(*), char(*), char(*), char(*), fixed bin(35)), 37 forum_$get_uid_file entry (char (*), char (*), bit (36) aligned, fixed bin (35)), 38 forum_admin_$convert entry (char (*), char (*), fixed bin (35)), 39 get_system_free_area_ entry returns (ptr), 40 get_wdir_ entry returns (char (168)), 41 hcs_$get_link_target entry (char(*), char(*), char(*), char(*), fixed bin(35)), 42 hcs_$get_user_access_modes entry (char(*), char(*), char(*), fixed bin, bit(36) aligned, bit(36) aligned, 43 fixed bin(35)), 44 hcs_$quota_read entry (char(*), fixed bin(18), fixed bin(71), bit(36) aligned, bit(36), fixed bin(1), 45 fixed bin(18), fixed bin(35)), 46 hcs_$star_ entry (char(*), char(*), fixed bin(2), ptr, fixed bin, ptr, ptr, fixed bin(35)), 47 hcs_$status_ entry (char(*), char(*), fixed bin(1), ptr, ptr, fixed bin(35)), 48 hphcs_$restore_quota entry (), 49 hphcs_$suspend_quota entry (), 50 ioa_$ioa_switch entry options (variable), 51 iox_$look_iocb entry (char(*), ptr, fixed bin(35)), 52 pathname_ entry (char(*), char(*)) returns(char(168)); 53 54 declare (link_switch, link_err_switch, meeting_switch, meeting_err_switch) 55 pointer static init (null ()), 56 iox_$error_output pointer external; 57 58 declare (error_table_$wrong_no_of_args, 59 error_table_$noaccess, 60 error_table_$noentry, 61 error_table_$no_info, 62 error_table_$nomatch, 63 forum_et_$not_a_forum, 64 forum_et_$no_suffix, 65 forum_et_$no_such_forum) fixed bin (35) external; 66 67 declare (length, addr, binary, sum, reverse, rtrim) 68 builtin, 69 (cleanup, linkage_error) condition; 70 71 declare 1 sb aligned like status_branch; 72 73 call cu_$arg_count (arg_count, status); 74 if status ^= 0 then do; 75 PUNT: call com_err_ (status, "forum_find_v1_links"); 76 return; 77 end; 78 79 if arg_count > 1 then do; 80 status = error_table_$wrong_no_of_args; 81 goto PUNT; 82 end; 83 if arg_count = 1 then do; 84 call cu_$arg_ptr (1, arg_ptr, arg_len, status); 85 if status ^= 0 then goto PUNT; 86 call expand_pathname_ (arg, dir, name, status); 87 if status ^= 0 then goto PUNT; 88 dir = pathname_ (dir, name); 89 end; 90 else dir = get_wdir_ (); 91 92 star_entry_ptr, star_names_ptr = null (); 93 on cleanup begin; 94 if star_names_ptr ^= null () then free star_names; 95 if star_entry_ptr ^= null () then free star_entries; 96 end; 97 98 call hcs_$star_ (dir, "**.*.control", star_LINKS_ONLY, get_system_free_area_ (), star_entry_count, 99 star_entry_ptr, star_names_ptr, status); 100 if status ^= 0 then do; 101 if status = error_table_$nomatch then goto LOOK_FOR_MEETINGS; 102 else do; 103 call ioa_$ioa_switch (iox_$error_output, "^a ^a", get_message (status), dir); 104 return; 105 end; 106 end; 107 108 do idx = 1 to star_entry_count; 109 if test_link (star_names (star_entries (idx).nindex)) then do; 110 free star_names; 111 free star_entries; 112 call ioa_$ioa_switch (link_switch, "^a", dir); 113 goto LOOK_FOR_MEETINGS; 114 end; 115 end; 116 free star_names; 117 free star_entries; 118 /* Now look for meetings */ 119 120 LOOK_FOR_MEETINGS: 121 call hcs_$star_ (dir, "**.*.control", star_ALL_ENTRIES, get_system_free_area_ (), star_entry_count, 122 star_entry_ptr, star_names_ptr, status); 123 if status ^= 0 then do; 124 if status = error_table_$nomatch then return; 125 else do; 126 call ioa_$ioa_switch (iox_$error_output, "^a ^a", get_message (status), dir); 127 return; 128 end; 129 end; 130 131 do idx = 1 to star_entry_count; 132 if star_entries (idx).type = star_SEGMENT then 133 call test_meeting (star_names (star_entries (idx).nindex)); 134 end; 135 136 free star_names; 137 free star_entries; 138 return; 139 140 test_link: 141 procedure (name) returns (bit (1) aligned); 142 143 declare name char (32), 144 target_dir char (168), 145 target_name char (32); 146 147 call forum_$get_forum_path (dir, name, target_dir, target_name, status); 148 if status = 0 then return ("1"b); 149 150 call hcs_$get_link_target (dir, name, target_dir, target_name, status); 151 if status = 0 then return ("0"b); /* target exists, not a meeting */ 152 153 if status = error_table_$noentry then do; 154 target_name = reverse (after (reverse (target_name), ".")) || ".forum"; 155 call forum_$get_forum_path (target_dir, target_name, target_dir, target_name, status); 156 if status = 0 then return ("1"b); /* already converted */ 157 if status ^= forum_et_$no_such_forum & status ^= forum_et_$no_suffix then 158 call ioa_$ioa_switch (link_err_switch, "^a In noentry ^a in ^a.", get_message (status), name, dir); 159 end; 160 else if status ^= error_table_$no_info & status ^= error_table_$noaccess then 161 call ioa_$ioa_switch (link_err_switch, "^a link target for ^a in ^a.", 162 get_message (status), name, dir); 163 164 return ("0"b); 165 end test_link; 166 167 test_meeting: 168 procedure (name); 169 170 declare name char (32), 171 uid bit (36) aligned; 172 173 call forum_$get_uid_file (dir, name, uid, status); 174 if status = 0 then do; 175 call ioa_$ioa_switch (meeting_switch, "^a", pathname_ (dir, name)); 176 return; 177 end; 178 179 if status ^= forum_et_$not_a_forum then 180 call ioa_$ioa_switch (meeting_err_switch, "^a ^a in ^a.", get_message (status), name, dir); 181 182 return; 183 end test_meeting; 184 185 get_message: 186 procedure (status) returns (char (100) aligned); 187 188 declare status fixed bin (35), 189 short char (8) aligned, 190 long char (100) aligned; 191 192 call convert_status_code_ (status, short, long); 193 return (long); 194 end get_message; 195 196 init_search: 197 entry (); 198 199 declare no_switch_ condition; 200 201 call iox_$look_iocb ("forum_links_", link_switch, status); 202 if link_switch = null () then signal no_switch_; 203 204 call iox_$look_iocb ("forum_meetings_", meeting_switch, status); 205 if meeting_switch = null () then signal no_switch_; 206 207 call iox_$look_iocb ("forum_link_errors_", link_err_switch, status); 208 if link_switch = null () then signal no_switch_; 209 210 call iox_$look_iocb ("forum_meeting_errors_", meeting_err_switch, status); 211 if meeting_switch = null () then signal no_switch_; 212 213 return; 214 215 init_convert: 216 entry (); 217 218 call check_gate_access_ ("hphcs_", codeptr (init_convert), status); 219 if status ^= 0 then do; 220 call com_err_ (status, "convert_meetings", "This command requires access to the hphcs_ gate."); 221 return; 222 end; 223 224 call check_gate_access_ ("forum_admin_", codeptr (init_convert), status); 225 if status ^= 0 then do; 226 call com_err_ (status, "convert_meetings", "This command requires access to the forum_admin_ gate."); 227 return; 228 end; 229 230 call hphcs_$suspend_quota (); 231 return; 232 233 cleanup_convert: 234 entry (); 235 236 call hphcs_$restore_quota (); 237 return; 238 239 /* convert one meeting. This is called as a command by the exec_com, don't 240* bother checking the arguments. */ 241 242 convert_one_meeting: 243 entry (meeting_path); 244 245 declare meeting_path char (*), 246 v2_name char (32), 247 proceedings_name char (32); 248 249 call expand_pathname_ (meeting_path, dir, name, status); 250 if status ^= 0 then do; 251 BADPATH: call ioa_$ioa_switch (iox_$error_output, "^a for ^a.", get_message (status), meeting_path); 252 return; 253 end; 254 255 call expand_pathname_ (dir, dir_dir, dir_name, status); 256 if status ^= 0 then goto BADPATH; 257 258 call hcs_$get_user_access_modes (dir_dir, dir_name, "", -1, modes, ""b, status); 259 if modes ^= SMA_ACCESS then do; 260 call ioa_$ioa_switch (iox_$error_output, "No sma permission on containing directory for ^a.", meeting_path); 261 return; 262 end; 263 264 call find_terminal_quota (dir_quota, dir_qused); 265 266 call forum_admin_$convert (dir, name, status); 267 if status ^= 0 then goto BADPATH; 268 269 v2_name = reverse (substr (reverse (rtrim (name)), 9)) || ".forum"; 270 271 call hcs_$quota_read (pathname_ (dir, v2_name), 0, 0, ""b, ""b, 0, v2_qused, status); 272 if status ^= 0 then do; 273 DELV2: call forum_$delete_forum (dir, v2_name, (0)); 274 call ioa_$ioa_switch (iox_$error_output, "^a after conversion of ^a.", get_message (status), meeting_path); 275 end; 276 277 if v2_qused + dir_qused <= dir_quota then do; /* obviously enough quota */ 278 call forum_$delete_forum (dir, name, (0)); 279 return; 280 end; 281 282 /* Now we need to determine how much quota the v1 meeting is using */ 283 284 proceedings_name = reverse (substr (reverse (rtrim (name)), 9)) || ".proceedings"; 285 286 call hcs_$status_ (dir, name, 0, addr (sb), null (), status); 287 if status ^= 0 then goto DELV2; 288 289 v1_recs_used = sb.records_used; 290 291 call hcs_$status_ (dir, proceedings_name, 0, addr (sb), null (), status); 292 if status ^= 0 then goto DELV2; 293 294 v1_recs_used = v1_recs_used + sb.records_used; 295 if dir_qused + v2_qused - v1_recs_used <= dir_quota + 5 /* SLOP */then do; 296 call forum_$delete_forum (dir, name, (0)); 297 return; 298 end; 299 300 call ioa_$ioa_switch (iox_$error_output, "Insufficient quota to convert ^a.", meeting_path); 301 call forum_$delete_forum (dir, v2_name, (0)); 302 303 return; 304 305 find_terminal_quota: 306 procedure (dir_quota, dir_qused); 307 308 declare (dir_quota, dir_qused) fixed bin (18), 309 local_dir char (168); 310 311 declare cant_find_terminal_quota condition; 312 313 local_dir = dir; 314 do while ("1"b); 315 call hcs_$quota_read (local_dir, dir_quota, 0, ""b, ""b, 0, dir_qused, status); 316 if status ^= 0 then goto BADPATH; 317 318 if dir_quota > 0 then return; 319 local_dir = reverse (after (reverse (local_dir), ">")); 320 321 if local_dir = "" then signal cant_find_terminal_quota; 322 end; 323 end find_terminal_quota; 324 325 end forum_find_v1; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/08/85 1130.6 forum_find_v1.pl1 >spec>on>41-15>forum_find_v1.pl1 10 1 06/10/82 1045.5 star_structures.incl.pl1 >ldd>include>star_structures.incl.pl1 11 2 11/22/82 0955.7 status_structures.incl.pl1 >ldd>include>status_structures.incl.pl1 12 3 04/09/85 1109.7 access_mode_values.incl.pl1 >spec>on>41-15>access_mode_values.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. SMA_ACCESS constant bit(3) initial unaligned dcl 3-11 ref 259 addr builtin function dcl 67 ref 286 286 291 291 arg based char unaligned dcl 14 set ref 86* arg_count 000106 automatic fixed bin(17,0) dcl 14 set ref 73* 79 83 arg_len 000112 automatic fixed bin(21,0) dcl 14 set ref 84* 86 86 arg_ptr 000110 automatic pointer dcl 14 set ref 84* 86 cant_find_terminal_quota 000572 stack reference condition dcl 311 ref 321 check_gate_access_ 000024 constant entry external dcl 29 ref 218 224 cleanup 000266 stack reference condition dcl 67 ref 93 com_err_ 000026 constant entry external dcl 29 ref 75 220 226 convert_status_code_ 000030 constant entry external dcl 29 ref 192 cu_$arg_count 000020 constant entry external dcl 29 ref 73 cu_$arg_ptr 000022 constant entry external dcl 29 ref 84 dir 000113 automatic char(168) unaligned dcl 14 set ref 86* 88* 88* 90* 98* 103* 112* 120* 126* 147* 150* 157* 160* 173* 175* 175* 179* 249* 255* 266* 271* 271* 273* 278* 286* 291* 296* 301* 313 dir_dir 000165 automatic char(168) unaligned dcl 14 set ref 255* 258* dir_name 000237 automatic char(32) unaligned dcl 14 set ref 255* 258* dir_quota 000247 automatic fixed bin(18,0) dcl 14 in procedure "forum_find_v1" set ref 264* 277 295 dir_quota parameter fixed bin(18,0) dcl 308 in procedure "find_terminal_quota" set ref 305 315* 318 dir_qused 000250 automatic fixed bin(18,0) dcl 14 in procedure "forum_find_v1" set ref 264* 277 295 dir_qused parameter fixed bin(18,0) dcl 308 in procedure "find_terminal_quota" set ref 305 315* error_table_$no_info 000104 external static fixed bin(35,0) dcl 58 ref 160 error_table_$noaccess 000100 external static fixed bin(35,0) dcl 58 ref 160 error_table_$noentry 000102 external static fixed bin(35,0) dcl 58 ref 153 error_table_$nomatch 000106 external static fixed bin(35,0) dcl 58 ref 101 124 error_table_$wrong_no_of_args 000076 external static fixed bin(35,0) dcl 58 ref 80 expand_pathname_ 000032 constant entry external dcl 29 ref 86 249 255 forum_$delete_forum 000034 constant entry external dcl 29 ref 273 278 296 301 forum_$get_forum_path 000036 constant entry external dcl 29 ref 147 155 forum_$get_uid_file 000040 constant entry external dcl 29 ref 173 forum_admin_$convert 000042 constant entry external dcl 29 ref 266 forum_et_$no_such_forum 000114 external static fixed bin(35,0) dcl 58 ref 157 forum_et_$no_suffix 000112 external static fixed bin(35,0) dcl 58 ref 157 forum_et_$not_a_forum 000110 external static fixed bin(35,0) dcl 58 ref 179 get_system_free_area_ 000044 constant entry external dcl 29 ref 98 98 120 120 get_wdir_ 000046 constant entry external dcl 29 ref 90 hcs_$get_link_target 000050 constant entry external dcl 29 ref 150 hcs_$get_user_access_modes 000052 constant entry external dcl 29 ref 258 hcs_$quota_read 000054 constant entry external dcl 29 ref 271 315 hcs_$star_ 000056 constant entry external dcl 29 ref 98 120 hcs_$status_ 000060 constant entry external dcl 29 ref 286 291 hphcs_$restore_quota 000062 constant entry external dcl 29 ref 236 hphcs_$suspend_quota 000064 constant entry external dcl 29 ref 230 idx 000251 automatic fixed bin(17,0) dcl 14 set ref 108* 109* 131* 132 132* ioa_$ioa_switch 000066 constant entry external dcl 29 ref 103 112 126 157 160 175 179 251 260 274 300 iox_$error_output 000074 external static pointer dcl 54 set ref 103* 126* 251* 260* 274* 300* iox_$look_iocb 000070 constant entry external dcl 29 ref 201 204 207 210 link_err_switch 000012 internal static pointer initial dcl 54 set ref 157* 160* 207* link_switch 000010 internal static pointer initial dcl 54 set ref 112* 201* 202 208 local_dir 000520 automatic char(168) unaligned dcl 308 set ref 313* 315* 319* 319 321 long 000460 automatic char(100) dcl 188 set ref 192* 193 meeting_err_switch 000016 internal static pointer initial dcl 54 set ref 179* 210* meeting_path parameter char unaligned dcl 245 set ref 242 249* 251* 260* 274* 300* meeting_switch 000014 internal static pointer initial dcl 54 set ref 175* 204* 205 211 modes 000252 automatic bit(36) dcl 14 set ref 258* 259 name parameter char(32) unaligned dcl 143 in procedure "test_link" set ref 140 147* 150* 157* 160* name 000253 automatic char(32) unaligned dcl 14 in procedure "forum_find_v1" set ref 86* 88* 249* 266* 269 278* 284 286* 296* name parameter char(32) unaligned dcl 170 in procedure "test_meeting" set ref 167 173* 175* 175* 179* nindex 0(18) based fixed bin(18,0) array level 2 packed unsigned unaligned dcl 1-27 ref 109 132 nnames 0(02) based fixed bin(16,0) array level 2 packed unsigned unaligned dcl 1-27 ref 94 110 116 136 no_switch_ 000306 stack reference condition dcl 199 ref 202 205 208 211 pathname_ 000072 constant entry external dcl 29 ref 88 175 175 271 271 proceedings_name 000324 automatic char(32) unaligned dcl 245 set ref 284* 291* records_used 3(18) 000274 automatic fixed bin(18,0) level 3 packed unsigned unaligned dcl 71 set ref 289 294 reverse builtin function dcl 67 ref 154 154 269 269 284 284 319 319 rtrim builtin function dcl 67 ref 269 284 sb 000274 automatic structure level 1 dcl 71 set ref 286 286 291 291 short 000274 automatic structure level 2 in structure "sb" dcl 71 in procedure "forum_find_v1" short 000456 automatic char(8) dcl 188 in procedure "get_message" set ref 192* star_ALL_ENTRIES 000000 constant fixed bin(2,0) initial dcl 1-111 set ref 120* star_LINKS_ONLY 000042 constant fixed bin(2,0) initial dcl 1-109 set ref 98* star_SEGMENT constant fixed bin(2,0) initial unsigned dcl 1-120 ref 132 star_entries based structure array level 1 dcl 1-27 ref 95 111 117 137 star_entry_count 000100 automatic fixed bin(17,0) dcl 1-14 set ref 94 95 98* 108 110 111 116 117 120* 131 136 137 star_entry_ptr 000102 automatic pointer dcl 1-15 set ref 92* 94 95 95 98* 109 110 111 116 117 120* 132 132 136 137 star_names based char(32) array unaligned dcl 1-37 set ref 94 109* 110 116 132* 136 star_names_ptr 000104 automatic pointer dcl 1-19 set ref 92* 94 94 98* 109 110 116 120* 132 136 status parameter fixed bin(35,0) dcl 188 in procedure "get_message" set ref 185 192* status 000265 automatic fixed bin(35,0) dcl 14 in procedure "forum_find_v1" set ref 73* 74 75* 80* 84* 85 86* 87 98* 100 101 103* 103* 120* 123 124 126* 126* 147* 148 150* 151 153 155* 156 157 157 157* 157* 160 160 160* 160* 173* 174 179 179* 179* 201* 204* 207* 210* 218* 219 220* 224* 225 226* 249* 250 251* 251* 255* 256 258* 266* 267 271* 272 274* 274* 286* 287 291* 292 315* 316 status_branch based structure level 1 dcl 2-8 sum builtin function dcl 67 ref 94 110 116 136 target_dir 000356 automatic char(168) unaligned dcl 143 set ref 147* 150* 155* 155* target_name 000430 automatic char(32) unaligned dcl 143 set ref 147* 150* 154* 154 155* 155* type based fixed bin(2,0) array level 2 packed unsigned unaligned dcl 1-27 ref 132 uid 000446 automatic bit(36) dcl 170 set ref 173* v1_recs_used 000263 automatic fixed bin(17,0) dcl 14 set ref 289* 294* 294 295 v2_name 000314 automatic char(32) unaligned dcl 245 set ref 269* 271* 271* 273* 301* v2_qused 000264 automatic fixed bin(18,0) dcl 14 set ref 271* 277 295 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. A_ACCESS internal static bit(3) initial unaligned dcl 3-11 A_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 DIR_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 3-33 Directory internal static fixed bin(17,0) initial dcl 2-56 E_ACCESS internal static bit(3) initial unaligned dcl 3-11 E_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 Link internal static fixed bin(17,0) initial dcl 2-56 M_ACCESS internal static bit(3) initial unaligned dcl 3-11 M_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 N_ACCESS internal static bit(3) initial unaligned dcl 3-11 N_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 REW_ACCESS internal static bit(3) initial unaligned dcl 3-11 REW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 RE_ACCESS internal static bit(3) initial unaligned dcl 3-11 RE_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 RW_ACCESS internal static bit(3) initial unaligned dcl 3-11 RW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 R_ACCESS internal static bit(3) initial unaligned dcl 3-11 R_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 SA_ACCESS internal static bit(3) initial unaligned dcl 3-11 SA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 SEG_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 3-30 SMA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 SM_ACCESS internal static bit(3) initial unaligned dcl 3-11 SM_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 S_ACCESS internal static bit(3) initial unaligned dcl 3-11 S_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 Segment internal static fixed bin(17,0) initial dcl 2-56 W_ACCESS internal static bit(3) initial unaligned dcl 3-11 W_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 binary builtin function dcl 67 length builtin function dcl 67 linkage_error 000000 stack reference condition dcl 67 star_ALL_ENTRIES_WITH_LINK_PATHS internal static fixed bin(3,0) initial dcl 1-114 star_BRANCHES_ONLY internal static fixed bin(2,0) initial dcl 1-110 star_DIRECTORY internal static fixed bin(2,0) initial unsigned dcl 1-121 star_LINK internal static fixed bin(2,0) initial unsigned dcl 1-119 star_LINKS_ONLY_WITH_LINK_PATHS internal static fixed bin(3,0) initial dcl 1-112 star_branch_count automatic fixed bin(17,0) dcl 1-13 star_dir_list_branch based structure array level 1 dcl 1-59 star_link_count automatic fixed bin(17,0) dcl 1-17 star_link_pathname based char unaligned dcl 1-102 star_links based structure array level 1 dcl 1-76 star_linkx automatic fixed bin(17,0) dcl 1-18 star_list_branch based structure array level 1 dcl 1-41 star_list_branch_ptr automatic pointer dcl 1-16 star_list_names based char(32) array unaligned dcl 1-92 star_list_names_ptr automatic pointer dcl 1-20 star_select_sw automatic fixed bin(3,0) dcl 1-21 status_area_ptr automatic pointer dcl 2-47 status_entry_names based char(32) array dcl 2-47 status_link based structure level 1 dcl 2-38 status_pathname based char dcl 2-47 status_ptr automatic pointer dcl 2-47 NAMES DECLARED BY EXPLICIT CONTEXT. BADPATH 001644 constant label dcl 251 ref 256 267 316 DELV2 002207 constant label dcl 273 set ref 287 292 LOOK_FOR_MEETINGS 001002 constant label dcl 120 ref 101 113 PUNT 000302 constant label dcl 75 ref 81 85 87 cleanup_convert 001562 constant entry external dcl 233 convert_one_meeting 001600 constant entry external dcl 242 ffv1 000263 constant entry external dcl 6 find_terminal_quota 003275 constant entry internal dcl 305 ref 264 forum_find_v1 000254 constant entry external dcl 6 get_message 003252 constant entry internal dcl 185 ref 103 103 126 126 157 157 160 160 179 179 251 251 274 274 init_convert 001377 constant entry external dcl 215 ref 218 218 224 224 init_search 001204 constant entry external dcl 196 test_link 002574 constant entry internal dcl 140 ref 109 test_meeting 003107 constant entry internal dcl 167 ref 132 NAMES DECLARED BY CONTEXT OR IMPLICATION. after builtin function ref 154 319 codeptr builtin function ref 218 218 224 224 null builtin function ref 92 94 95 202 205 208 211 286 286 291 291 substr builtin function ref 269 284 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 4114 4232 3460 4124 Length 4566 3460 116 320 434 10 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME forum_find_v1 750 external procedure is an external procedure. on unit on line 93 64 on unit test_link internal procedure shares stack frame of external procedure forum_find_v1. test_meeting internal procedure shares stack frame of external procedure forum_find_v1. get_message internal procedure shares stack frame of external procedure forum_find_v1. find_terminal_quota internal procedure shares stack frame of external procedure forum_find_v1. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 link_switch forum_find_v1 000012 link_err_switch forum_find_v1 000014 meeting_switch forum_find_v1 000016 meeting_err_switch forum_find_v1 STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME forum_find_v1 000100 star_entry_count forum_find_v1 000102 star_entry_ptr forum_find_v1 000104 star_names_ptr forum_find_v1 000106 arg_count forum_find_v1 000110 arg_ptr forum_find_v1 000112 arg_len forum_find_v1 000113 dir forum_find_v1 000165 dir_dir forum_find_v1 000237 dir_name forum_find_v1 000247 dir_quota forum_find_v1 000250 dir_qused forum_find_v1 000251 idx forum_find_v1 000252 modes forum_find_v1 000253 name forum_find_v1 000263 v1_recs_used forum_find_v1 000264 v2_qused forum_find_v1 000265 status forum_find_v1 000274 sb forum_find_v1 000314 v2_name forum_find_v1 000324 proceedings_name forum_find_v1 000356 target_dir test_link 000430 target_name test_link 000446 uid test_meeting 000456 short get_message 000460 long get_message 000520 local_dir find_terminal_quota THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. cat_realloc_cs call_ext_out_desc call_ext_out return mpfx2 signal enable shorten_stack ext_entry ext_entry_desc int_entry reverse_cs set_cs_eis free_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. check_gate_access_ com_err_ convert_status_code_ cu_$arg_count cu_$arg_ptr expand_pathname_ forum_$delete_forum forum_$get_forum_path forum_$get_uid_file forum_admin_$convert get_system_free_area_ get_wdir_ hcs_$get_link_target hcs_$get_user_access_modes hcs_$quota_read hcs_$star_ hcs_$status_ hphcs_$restore_quota hphcs_$suspend_quota ioa_$ioa_switch iox_$look_iocb pathname_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$no_info error_table_$noaccess error_table_$noentry error_table_$nomatch error_table_$wrong_no_of_args forum_et_$no_such_forum forum_et_$no_suffix forum_et_$not_a_forum iox_$error_output LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 6 000253 73 000270 74 000300 75 000302 76 000325 79 000326 80 000331 81 000334 83 000335 84 000336 85 000355 86 000357 87 000407 88 000411 89 000431 90 000432 92 000441 93 000444 94 000460 95 000515 96 000524 98 000525 100 000604 101 000606 103 000611 104 000642 108 000643 109 000653 110 000673 111 000722 112 000724 113 000747 115 000750 116 000752 117 001000 120 001002 123 001061 124 001063 126 001066 127 001117 131 001120 132 001127 134 001147 136 001151 137 001200 138 001202 196 001203 201 001211 202 001236 204 001246 205 001275 207 001305 208 001331 210 001341 211 001365 213 001375 215 001376 218 001404 219 001431 220 001433 221 001465 224 001466 225 001516 226 001520 227 001552 230 001553 231 001560 233 001561 236 001567 237 001574 242 001575 249 001613 250 001642 251 001644 252 001701 255 001702 256 001726 258 001730 259 001774 260 001777 261 002025 264 002026 266 002030 267 002051 269 002053 271 002112 272 002205 273 002207 274 002231 277 002265 278 002271 279 002313 284 002314 286 002353 287 002415 289 002417 291 002422 292 002463 294 002465 295 002470 296 002500 297 002522 300 002523 301 002551 303 002573 140 002574 147 002576 148 002626 150 002634 151 002664 153 002671 154 002674 155 002737 156 002766 157 002774 159 003040 160 003041 164 003104 167 003107 173 003111 174 003137 175 003141 176 003205 179 003206 182 003251 185 003252 192 003254 193 003267 305 003275 313 003277 315 003302 316 003354 318 003356 319 003362 321 003416 322 003426 323 003427 ----------------------------------------------------------- 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