COMPILATION LISTING OF SEGMENT abbrev Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Adv Computing Technology Centre Compiled on: 04/12/90 1539.5 mdt Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) BULL HN Information Systems Inc., 1990 * 4* * * 5* * Copyright, (C) Honeywell Bull Inc., 1987 * 6* * * 7* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 8* * * 9* *********************************************************** */ 10 11 /* format: off */ 12 13 /* The Multics standard abbreviation processor */ 14 15 /* Created: February 1982 by G. Palter based on various previous versions */ 16 /****^ HISTORY COMMENTS: 17* 1) change(86-05-01,Gilcrease), approve(86-05-10,MCR7409), 18* audit(86-08-01,GWMay), install(86-08-04,MR12.0-1112): 19* (old history comments) 20* 21* Modified: 7 March 1982 to insure that set_profile_ptr is quick, move 22* special requests check into standard request checking code, and add the 23* following warning 24* 25* Modified: 12 March 1982 by G. Palter to set the bit count on the profile 26* segment after an add request 27* 28* Modified: 18 March 1982 by G. Palter to terminate the old profile when 29* appropriate after a ".u" request 30* 31* Modified: 30 July 1982 by G. Palter to make abbrev as an active function 32* return true/flase if expansion is enabled/disabled, respectively 33* 34* Modified: April 1983 by G. Palter for version 1.2: 35* (1) Added initial support for multiple character break sequences and 36* defined "::" as a break sequence; 37* (2) Added the ".rename" request to allow users to rename old 38* abbreviations whose names contain "::" 39* 40* Modified: 29 February 1984 by G. Palter for version 1.2a which fixes the 41* following bugs: 42* #0052: If abbrev has to reinitialize the default profile, it will 43* erroneously state that it created the profile. In addition, 44* abbrev will always initiate the default profile twice. 45* #0053: If the last character of the line to be expanded is the first 46* character of a multi-character break sequence, abbrev will loop 47* indefinitely 48* 49* Modified: January 1983 by G. Palter for version 3.0: 50* (1) Added the ".edit" request to allow editing the definition of an 51* abbreviation using qedx_; 52* (2) Added the ".switch_on" and ".switch_off" requests to manipulate an 53* abbreviation's beginning-of-line switch; 54* (3) Renamed the ".call_debug" request to ".debug" and the ".call_probe" 55* request to ".probe" (Version 2 was the "Goldman" abbrev which lived 56* in EXL on MIT and System-M for many, many years) 57* 2) change(86-05-01,Gilcrease), approve(86-05-10,MCR7409), 58* audit(86-08-01,GWMay), install(86-08-04,MR12.0-1112): 59* (more old history comments) 60* 61* Modified: March 1983 by G. Palter for version 3.1: 62* (1) Changed the ".edit" request to print the abbreviation's definition 63* and a prompt before invoking qedx_ and to query if overwriting an 64* existing abbreviation (if not the "default pathname"); 65* (2) Added the ".escape" request and the "-escape" abbrev control 66* argument to set the character used to identify abbrev request lines; 67* (3) Added the "-on", "-off", and "-profile" control arguments for 68* compatibility with the standard abbrev subsystem request 69* 70* Modified: 6 August 1985 by G. Palter for version 3.1a which fixes the 71* following bugs: 72* #0092: If the ".use" request is used in a subsystem which is using the 73* same profile as Multics command level, abbrev will incorrectly 74* terminate the profile which will cause subsequent command lines 75* to fault until the ".quit" request is issued. 76* #0107: If the new name given for an abbreviation by the ".rename" 77* request is too long (i.e., more than 8 characters), the error 78* message printed by abbrev includes 32 random characters instead 79* of the supplied name 80* 3) change(86-05-01,Gilcrease), approve(86-05-10,MCR7409), 81* audit(86-08-01,GWMay), install(86-08-04,MR12.0-1112): 82* Call ioa_ rather than com_err_ on "Profile create" message. 83* (command_environment 123), and implement .? request, install version 84* 3.1a abbrev. 85* 4) change(86-05-17,GDixon), approve(86-05-17,MCR7357), 86* audit(86-07-10,Farley), install(86-07-18,MR12.0-1098): 87* Change call to tct_ to reference find_char_$first_in_table instead. The 88* tct_ subroutines were renamed. 89* 5) change(86-10-10,Gilcrease), approve(87-02-27,MCR7626), 90* audit(87-03-09,Parisek), install(87-03-20,MR12.1-1005): 91* Add version 2 list requests. 92* 6) change(87-06-20,Gilcrease), approve(87-07-15,MCR7738), 93* audit(87-07-16,Parisek), install(87-07-17,MR12.1-1042): 94* Fix bug in .lx request. 95* 7) change(87-07-01,GWMay), approve(87-07-01,MCR7730), audit(87-08-10,JRGray), 96* install(87-09-10,MR12.1-1104): 97* Added the pipe token combination ";|" and the left bracket "[" to the 98* list of beginning of line breaks. Fixed a minor bug with the .lx 99* request. 100* 8) change(87-10-16,TLNguyen), approve(87-10-16,MCR7778), 101* audit(87-12-02,Farley), install(87-12-07,MR12.2-1009): 102* - Make the abbrev .use request strip one level of quotes from the 103* pathname, if specified. 104* 105* - Add the new entry point named abbrev_$expand_line which will be like 106* the "abbrev_$expanded_line" current entry point; however, this new 107* entry point will have one new argument to say what kind of abbrevs 108* to expand. This argument can be EXPAND_BOL_ONLY (1), or 109* EXPAND_INTERNAL_ONLY (2), or EXPAND_BOTH (3). For solving the 110* TR #14559, the EXPAND_INTERNAL_ONLY (2) constant will be used. 111* 112* - Clear out errors found at run time after compiled with 113* -prefix size,strg,strz,subrg. 114* 9) change(90-03-15,Vu), approve(90-03-15,MCR8161), audit(90-03-19,Kallstrom), 115* install(90-04-12,MR12.4-1002): 116* The abbrev command .lx should not limit its argument's length. 117* END HISTORY COMMENTS */ 118 119 /* Note: In order to insure that the main path through the command/request line expander does not entail the overhead of 120* calls to non-quick procedures, two internal procedures, set_profile_ptr and lookup_abbrev, are duplicated. One version 121* appears either in the expand_line procedure or as a top-level internal procedure; the other version appears as an 122* internal procedure of the begin block in the process_request_line internal procedure. Anyone modifying either of these 123* two procedures should be certain to modify both copies of the procedure. (An attempt will be made at a future date to 124* eliminate the need for two copies of these procedures) */ 125 126 /* format: on,style4,delnl,insnl,ifthenstmt,ifthen */ 127 128 129 abbrev: 130 ab: 131 procedure () options (variable); 132 133 134 /* Parameters */ 135 136 dcl P_code fixed binary (35) parameter; 137 138 dcl P_command_processor entry (pointer, fixed binary (21), fixed binary (35)) variable parameter; 139 /* set_cp: the command processor to always invoke */ 140 141 dcl P_breaks character (*) parameter; /* set_break, reset_break: the break chars to add/delete */ 142 143 dcl P_abbrev_type fixed bin; /* = 1 expand beginning-of-line (bol) abbrevs only. 144* = 2 expand internal (non-bol) abbrevs only. 145* = 3 expand both bol and non-bol abbrevs */ 146 147 dcl P_input_line_ptr pointer parameter; /* abbrev_processor, expanded_line: -> line to expand */ 148 dcl P_input_line_lth fixed binary (21) parameter; /* abbrev_processor, expanded_line: length of the line */ 149 150 dcl P_subsystem_name character (*) parameter; /* subsys_process_line: name of the subsystem */ 151 dcl P_sci_ptr pointer parameter; /* subsys_process_line: -> the subsystem's control data */ 152 dcl P_execute_request entry () variable parameter; /* subsys_process_line: entry to invoke a single request */ 153 dcl P_subsys_cp_info_ptr pointer parameter; /* subsys_process_line: -> data of subsys request processor */ 154 dcl P_subsys_cp entry (character (*), pointer, entry, pointer, character (*), fixed binary (35)) variable parameter; 155 /* subsys_process_line: the subsystem request processor */ 156 dcl P_default_profile_ptr pointer parameter; /* subsys_process_line: -> default profile segment */ 157 dcl P_profile_ptr pointer parameter; /* subsys_process_line: -> current profile segment */ 158 dcl P_request_line character (*) parameter; /* subsys_process_line: the request line itself */ 159 160 dcl P_workspace_ptr pointer parameter; /* expanded_line: -> buffer where expansion is placed */ 161 dcl P_workspace_lth fixed binary (21) parameter; /* expanded_line: length of the buffer */ 162 dcl P_output_line_ptr pointer parameter; /* expanded_line: set -> the expansion */ 163 dcl P_output_line_lth fixed binary (21) parameter; /* expanded_line: set to length of the expansion */ 164 165 166 /* Local copies of parameters */ 167 168 dcl abbrev_type fixed bin; /* = 1 expand beginning-of-line (bol) abbrevs only. 169* = 2 expand internal (non-bol) abbrevs only. 170* = 3 expand both bol and non-bol abbrevs */ 171 172 dcl input_line character (input_line_lth) based (input_line_ptr); 173 dcl input_line_lth fixed binary (21); 174 dcl input_line_ptr pointer; 175 176 dcl P_output_line character (P_output_line_lth) based (P_output_line_ptr); 177 178 dcl code fixed binary (35); 179 180 181 /* Remaining declarations */ 182 183 dcl system_area area based (system_area_ptr); 184 dcl system_area_ptr pointer; 185 186 dcl expanded_line character (expanded_line_lth) based (expanded_line_ptr); 187 dcl expanded_line_lth fixed binary (21); 188 dcl expanded_line_ptr pointer; 189 190 dcl expansion_stack_space_lth fixed binary (21); 191 dcl expansion_stack_space_ptr pointer; 192 dcl extended_stack bit (1) aligned; /* ON => expansion is in the stack extension */ 193 194 dcl expansion_temp_segment character (4 * sys_info$max_seg_size) based (expansion_temp_segment_ptr); 195 dcl expansion_temp_segment_ptr pointer; 196 dcl used_temp_segment bit (1) aligned; /* ON => expansion is in a temporary segment */ 197 198 dcl based_word fixed binary (35) based; 199 200 dcl (subsystem_entry, return_expansion, allow_request_lines, have_return_code, null_line) bit (1) aligned; 201 202 dcl start fixed binary (21); 203 204 dcl cp_variable entry (pointer, fixed binary (21), fixed binary (35)) variable; 205 206 dcl ABBREV character (32) static options (constant) initial ("abbrev"); 207 208 dcl EXPAND_BOL_ONLY fixed bin static options (constant) initial (1); 209 /* expand beginning-of-line (bol) abbrevs only */ 210 dcl EXPAND_INTERNAL_ONLY fixed bin static options (constant) initial (2); 211 /* expand internal (non-bol) abbrevs only */ 212 dcl EXPAND_BOTH fixed bin static options (constant) initial (3); 213 /* expand both bol and non-bol abbrevs */ 214 215 dcl MAX_STACK_EXTENSION fixed binary (18) static options (constant) initial (16384); 216 /* grow the stack no more than 16K characters */ 217 218 dcl WHITE_SPACE character (4) static options (constant) initial (" "); /* SP HT VT FF */ 219 220 dcl WHITE_SPACE_AND_NL character (5) static options (constant) initial (" 221 "); /* SP HT VT FF NL */ 222 223 dcl DEFAULT_ABBREV_ESCAPE_CHARACTER character (1) static options (constant) initial ("."); 224 225 dcl DEFAULT_BREAKS character (21) static options (constant) initial (" 226 ""$'().:;<>[]`{|}"); /* HT NL VT FF SP QUOTE, etc: must be in collating sequence */ 227 228 dcl SP character (1) static options (constant) initial (" "); 229 dcl NL character (1) static options (constant) initial (" 230 "); 231 dcl LEFT_BRACKET character (1) static options (constant) initial ("["); 232 dcl SEMICOLON character (1) static options (constant) initial (";"); 233 dcl VERTICAL_BAR character (1) static options (constant) initial ("|"); 234 dcl QUOTE character (1) static options (constant) initial (""""); 235 236 dcl abbrev_data_$version character (32) unaligned external; 237 dcl abbrev_data_$default_breaks_list bit (36) aligned external; 238 dcl abbrev_data_$default_breaks_tct_table character (512) unaligned external; 239 240 /* format: off */ 241 dcl (error_table_$badopt, error_table_$bad_segment, error_table_$bad_subr_arg, error_table_$command_line_overflow, 242 error_table_$moderr, error_table_$noarg, error_table_$noentry, error_table_$not_act_fnc, 243 error_table_$request_not_recognized, error_table_$unbalanced_quotes, error_table_$unimplemented_version) 244 fixed binary (35) external; 245 /* format: on */ 246 247 dcl sys_info$max_seg_size fixed binary (19) external; 248 249 dcl active_fnc_err_$suppress_name entry () options (variable); 250 dcl com_err_ entry () options (variable); 251 dcl com_err_$suppress_name entry () options (variable); 252 dcl command_processor_ entry (pointer, fixed binary (21), fixed binary (35)); 253 dcl command_query_$yes_no entry () options (variable); 254 dcl cu_$af_return_arg_rel entry (fixed binary, pointer, fixed binary (21), fixed binary (35), pointer); 255 dcl cu_$arg_list_ptr entry () returns (pointer); 256 dcl cu_$arg_ptr_rel entry (fixed binary, pointer, fixed binary (21), fixed binary (35), pointer); 257 dcl cu_$cp entry (pointer, fixed binary (21), fixed binary (35)); 258 dcl cu_$get_command_processor entry (entry (pointer, fixed binary (21), fixed binary (35))); 259 dcl cu_$grow_stack_frame entry (fixed binary (18), pointer, fixed binary (35)); 260 dcl cu_$set_command_processor entry (entry (pointer, fixed binary (21), fixed binary (35))); 261 dcl cu_$shrink_stack_frame entry (pointer, fixed binary (35)); 262 dcl debug entry () options (variable); 263 dcl expand_pathname_$add_suffix entry (character (*), character (*), character (*), character (*), fixed binary (35)); 264 dcl probe entry () options (variable); 265 dcl get_system_free_area_ entry () returns (pointer); 266 dcl get_temp_segment_ entry (character (*), pointer, fixed binary (35)); 267 dcl hcs_$fs_get_mode entry (pointer, fixed binary (5), fixed binary (35)); 268 dcl hcs_$fs_get_path_name entry (pointer, character (*), fixed binary, character (*), fixed binary (35)); 269 dcl initiate_file_ entry (character (*), character (*), bit (*), pointer, fixed binary (24), fixed binary (35)); 270 dcl initiate_file_$create 271 entry (character (*), character (*), bit (*), pointer, bit (1) aligned, fixed binary (24), fixed binary (35)); 272 dcl ioa_ entry () options (variable); 273 dcl ioa_$nnl entry () options (variable); 274 dcl pathname_ entry (character (*), character (*)) returns (character (168)); 275 dcl qedx_ entry (pointer, fixed binary (35)); 276 dcl release_temp_segment_ entry (character (*), pointer, fixed binary (35)); 277 dcl sort_items_$char entry (pointer, fixed binary (24)); 278 dcl terminate_file_ entry (pointer, fixed binary (24), bit (*), fixed binary (35)); 279 dcl find_char_$first_in_table entry (char (*), char (512) aligned) returns (fixed bin (21)) reducible; 280 dcl user_info_ entry (character (*)); 281 dcl user_info_$homedir entry (character (*)); 282 283 dcl cleanup condition; 284 285 dcl (addcharno, addr, after, baseptr, before, codeptr, currentsize, divide, fixed, hbound, high, index, lbound, length, 286 low, ltrim, max, mod, null, pointer, rank, rel, reverse, rtrim, search, string, substr, verify) builtin; 287 288 /* State of abbreviation processing in this process */ 289 290 dcl first_call bit (1) aligned static initial ("1"b); 291 292 dcl 1 abbrev_state aligned static, 293 2 command_processor entry (pointer, fixed binary (21), fixed binary (35)) variable, 294 2 previous_command_processor entry (pointer, fixed binary (21), fixed binary (35)) variable, 295 2 profile_ptr pointer, /* -> profile in use at command level */ 296 2 remembered_line, /* data about the last expansion we did ... */ 297 3 remembered_line_buffer_ptr pointer, /* ... -> buffer used to hold the lines */ 298 3 remembered_line_buffer_lth fixed binary (21), /* ... length of the buffer */ 299 3 remembered_line_lth fixed binary (21), /* ... length of line currently saved therein */ 300 2 escape_character character (1) aligned, /* character used to trigger request line processing */ 301 2 flags, 302 3 set_cp bit (1) unaligned, /* ON => we have established ourselves as the CP */ 303 3 set_cp_explicit bit (1) unaligned, /* ON => abbrev_$set_cp was called */ 304 3 remember_lines bit (1) unaligned, /* ON => remember last expanded line */ 305 3 default_breaks bit (1) unaligned, /* ON => using default break characters */ 306 3 pad bit (32) unaligned, 307 2 breaks_info, /* data used to find break sequences ... */ 308 3 user_breaks character (128) varying, /* ... 1st characters of all sequences if not default */ 309 3 tct_table character (512), /* ... used to search for above sequences if not default */ 310 3 breaks_list_ptr pointer; /* ... -> breaks_list defining the sequences */ 311 312 dcl abbrev_state_tct_table_as_binary (0:511) fixed binary (9) unaligned unsigned based (addr (abbrev_state.tct_table)); 313 314 dcl 1 breaks_list aligned based (abbrev_state.breaks_list_ptr), 315 2 n_break_sequences fixed binary, /* # of distinct break sequences */ 316 2 break_strings_lth fixed binary, /* combined length of all break sequences */ 317 2 break_sequences (breaks_list_n_break_sequences refer (breaks_list.n_break_sequences)), 318 3 start fixed binary, /* ... index in break_strings where this sequence starts */ 319 3 lth fixed binary, /* ... how long this sequence actually is */ 320 2 break_strings character (breaks_list_break_strings_lth refer (breaks_list.break_strings_lth)) unaligned; 321 dcl (breaks_list_n_break_sequences, breaks_list_break_strings_lth) fixed binary; 322 323 dcl remembered_line_buffer character (abbrev_state.remembered_line_buffer_lth) 324 based (abbrev_state.remembered_line_buffer_ptr); 325 dcl remembered_line character (abbrev_state.remembered_line_lth) based (abbrev_state.remembered_line_buffer_ptr); 326 327 dcl debug_entry_variable entry () options (variable) variable static; 328 dcl probe_entry_variable entry () options (variable) variable static; 329 330 dcl abbrev_rqd (87) char (72) static options (constant) /* For the .? abbrev request */ 331 init (".", /* Three lines of print, 3rd line */ 332 " displays the current version of abbrev.", /* "" if not needed */ 333 "", /* ( as for this "." request) */ 334 ".? ...", " describes the function and usage of the given abbrev control", 335 " request(s). If none are given, all abbrev requests are described.", ".LINE", 336 /* can't be individually displayed */ 337 " passes LINE directly to the current command processor without", " expanding any embedded abbreviations.", 338 ".a name LINE, .af name LINE", " adds LINE as the definition of a new abbreviation with the given", 339 " name to the current profile. '.af' adds with no query.", ".ab name LINE, .abf name LINE", 340 " adds LINE as the definition of a new abbreviation with the given", 341 " name to the current profile. '.abf' adds with no query.", ".debug", " invokes debug.", "", 342 ".delete names, .dl names, .d names", " deletes the given abbreviations from the current profile.", "", 343 ".edit name", " invokes the qedx editor to edit the given abbreviation's", " definition.", 344 ".escape {STR}, .esc {STR}", " changes the escape character which is used to indicate that a", 345 " command line is actually an abbrev request line. ", ".forget, .f", " disables remember mode. ", "", 346 ".l {names}", " displays the names, switches, and definitions of the given", 347 " abbreviations in alphabetic order.", ".la STRs", 348 " displays the names, switches, and definitions of any abbreviations", 349 " whose name starts with one of the given strings.", ".lab STRs, .la^b STRs", 350 " displays beginning-line (.lab) or not-beginning-line (.la^b)", 351 " information for abbreviations beginning with STRs.", ".lb {names}", 352 " displays information on beginning-of-line abbreviations which", 353 " match {names}, or if no {names}, all bol abreviations.", ".l^b {names}", 354 " displays information on not-beginning-of-line abbreviations which", 355 " which match {name}, or if no {names}, all not-bol abbreviaions.", ".ls STRs", 356 " displays the names, switches, and definitions of any abbreviations", " which contain STRs.", 357 ".lsb STRs, .ls^b STRs", " displays beginning-of-line (.lsb) or not-beginning-of-line ", 358 " information of abbreviations which contain STRs.", ".lx STRs", 359 " displays information of abbreviation expansions which contain", " STRs.", ".lxb STRs, .lx^b STRs", 360 " displays information of beginning-line abbreviation expansions", 361 " (.lxb) or not-beginning-line (.lx^b) containing STRs.", ".probe", " invokes probe.", "", ".profile, .p", 362 " prints the pathname of the profile segment presently being used to", " expand abbreviations.", 363 ".quit, .q", " disables abbreviation processing of subsequent command lines.", "", ".remember, .r", 364 " enables remember mode. In remember mode, abbrev saves the expansion", 365 " of the last line that it has processed. See the '.show' request.", 366 ".rename old_name1 new_name1 ..., .rn old_name1 new_name1...", 367 " renames the given abbreviations. If an abbreviation is already", 368 " defined, abbrev will query for permission to replace it.", ".show {LINE}, .s {LINE}", 369 " if LINE is given, displays the expansion of that line without", 370 " executing it. If LINE is not given, displays the last line expanded.", 371 ".switch_on switch_name names, .swn switch_name names", 372 " turns on the given switch in the definitions of the given", 373 " abbreviations. See the 'abbrev' online help file for more details.", 374 ".switch_off switch_name names, .swf switch_name names", 375 " turns off the given switch in the definitions of the given", 376 " abbreviations. See the 'abbrev' online help file for more details.", ".terminate_process", 377 " causes a fatal process error. This request is intended for use ", 378 " only under special conditions. See the 'abbrev' online help file.", ".use {path}, .u {path}", 379 " changes the pathname of the profile segment. The 'profile' suffix", 380 " is assumed. If no {path} given, the default profile is used."); 381 382 dcl ard (46) char (19) varying static options (constant) init 383 /* control request literals table */ 384 (".", ".?", ". ", ".a", ".af", ".ab", ".abf", ".debug", ".delete", ".dl", ".d", ".edit", ".escape", ".esc", 385 ".forget", ".f", ".l", ".la", ".lab", ".la^b", ".lb", ".l^b", ".ls", ".lsb", ".ls^b", ".lx", ".lxb", ".lx^b", 386 ".probe", ".profile", ".p", ".quit", ".q", ".remember", ".r", ".rename", ".rn", ".show", ".s", ".switch_on", 387 ".swn", ".switch_off", ".swf", ".terminate_process", ".use", ".u"); 388 389 dcl ardx (46) fixed bin static options (constant) init /* corresponding index into abbrev_rqd table */ 390 (1, 4, 7, 10, 10, 13, 13, 16, 19, 19, 19, 22, 25, 25, 28, 28, 31, 34, 37, 37, 40, 43, 46, 49, 49, 52, 55, 55, 391 58, 61, 61, 64, 64, 67, 67, 70, 70, 73, 73, 76, 76, 79, 79, 82, 85, 85); 392 393 394 395 396 /* abbrev command/AF: As a command, establishes ourself as the command processor; as an active function, returns 397* true/false if command line expansion is enabled/disabled, respectively. If enabling abbrev and there was a previous 398* call to set_cp_explicit, assume that the caller always wants us to call whatever command processor he provided */ 399 400 /* abbrev: ab: entry () options (variable); */ 401 402 if first_call then /* be sure static is setup */ 403 call initialize_abbrev_state (); 404 405 call process_abbrev_command_or_af (cu_$arg_list_ptr ()); 406 407 return; 408 409 410 411 /* Does the actual work of the abbrev command/AF to keep the main stack frame as small as possible */ 412 413 process_abbrev_command_or_af: 414 procedure (p_argument_list) options (non_quick); 415 416 dcl p_argument_list pointer parameter; 417 418 dcl argument character (argument_lth) unaligned based (argument_ptr); 419 dcl argument_ptr pointer; 420 dcl argument_lth fixed binary (21); 421 dcl (n_arguments, argument_idx) fixed binary; 422 423 dcl return_string character (return_string_max_lth) varying based (return_string_ptr); 424 dcl return_string_max_lth fixed binary (21); 425 dcl return_string_ptr pointer; 426 427 dcl active_function bit (1) aligned; 428 429 dcl enable_abbrev bit (1) aligned; 430 dcl new_escape_character character (1) aligned; 431 432 dcl new_profile_dirname character (168); 433 dcl new_profile_ename character (32); 434 dcl new_profile_ptr pointer; 435 dcl created_here bit (1) aligned; 436 dcl try_to_create bit (1); 437 438 439 call cu_$af_return_arg_rel (n_arguments, return_string_ptr, return_string_max_lth, code, p_argument_list); 440 441 if code = 0 then active_function = "1"b; 442 443 else if code = error_table_$not_act_fnc then active_function = "0"b; 444 445 else do; /* something wrong with the argument list header */ 446 call com_err_ (code, ABBREV); 447 return; 448 end; 449 450 451 if active_function then do; /* tell user if abbrev is on/off */ 452 if n_arguments = 0 then /* ... but only if properly invoked */ 453 if abbrev_state.set_cp then 454 return_string = "true"; 455 else return_string = "false"; 456 457 else call active_fnc_err_$suppress_name (0, ABBREV, "Usage: [^a]", ABBREV); 458 459 return; 460 end; 461 462 463 /* Here iff invoked as a command */ 464 465 enable_abbrev = "1"b; /* turn abbreviation processing on by default */ 466 new_escape_character = abbrev_state.escape_character; 467 468 new_profile_ptr = null (); /* for cleanup handler */ 469 created_here = "0"b; 470 471 on condition (cleanup) 472 begin; 473 if new_profile_ptr ^= null () then 474 if created_here then 475 call terminate_file_ (new_profile_ptr, 0, TERM_FILE_DELETE, (0)); 476 else call terminate_file_ (new_profile_ptr, 0, TERM_FILE_TERM, (0)); 477 end; 478 479 480 do argument_idx = 1 to n_arguments; 481 482 call cu_$arg_ptr_rel (argument_idx, argument_ptr, argument_lth, code, p_argument_list); 483 if code ^= 0 then do; 484 call com_err_ (code, ABBREV, "Fetching argument #^d.", argument_idx); 485 go to RETURN_FROM_ABBREV_COMMAND; 486 end; 487 488 if index (argument, "-") = 1 then /* a control argument ... */ 489 if argument = "-on" then enable_abbrev = "1"b; 490 else if argument = "-off" then enable_abbrev = "0"b; 491 492 else if (argument = "-escape") | (argument = "-esc") then 493 if argument_idx = n_arguments then do; 494 call com_err_ (error_table_$noarg, ABBREV, "Escape character after ""^a"".", argument); 495 go to RETURN_FROM_ABBREV_COMMAND; 496 end; 497 else do; /* ... there is something following it */ 498 argument_idx = argument_idx + 1; 499 call cu_$arg_ptr_rel (argument_idx, argument_ptr, argument_lth, code, p_argument_list); 500 if code ^= 0 then do; 501 call com_err_ (code, ABBREV, "Fetching argument #^d.", argument_idx); 502 go to RETURN_FROM_ABBREV_COMMAND; 503 end; 504 if length (rtrim (argument)) > length (abbrev_state.escape_character) then do; 505 call com_err_ (0, ABBREV, 506 "The escape sequence must be a single character; not ""^a"".", argument); 507 go to RETURN_FROM_ABBREV_COMMAND; 508 end; 509 new_escape_character = argument; 510 end; 511 512 else if (argument = "-profile") | (argument = "-pf") then 513 if argument_idx = n_arguments then do; 514 call com_err_ (error_table_$noarg, ABBREV, "Profile pathname after ""^a"".", argument); 515 go to RETURN_FROM_ABBREV_COMMAND; 516 end; 517 else do; 518 argument_idx = argument_idx + 1; 519 call cu_$arg_ptr_rel (argument_idx, argument_ptr, argument_lth, code, p_argument_list); 520 if code ^= 0 then do; 521 call com_err_ (code, ABBREV, "Fetching argument #^d.", argument_idx); 522 go to RETURN_FROM_ABBREV_COMMAND; 523 end; 524 call expand_pathname_$add_suffix (argument, "profile", new_profile_dirname, 525 new_profile_ename, code); 526 if code ^= 0 then do; 527 call com_err_ (code, ABBREV, "^a", argument); 528 go to RETURN_FROM_ABBREV_COMMAND; 529 end; 530 if new_profile_ptr ^= null () then 531 if created_here then /* ... there was a previous use of -profile ... */ 532 call terminate_file_ (new_profile_ptr, 0, TERM_FILE_DELETE, (0)); 533 else call terminate_file_ (new_profile_ptr, 0, TERM_FILE_TERM, (0)); 534 created_here = "0"b; 535 call initiate_file_ (new_profile_dirname, new_profile_ename, R_ACCESS, new_profile_ptr, (0), 536 code); 537 if code ^= 0 then /* couldn't find it */ 538 if code = error_table_$noentry then do; 539 call command_query_$yes_no (try_to_create, 0, ABBREV, "", 540 "Profile ^a not found. Do you want to create it?", 541 pathname_ (new_profile_dirname, new_profile_ename)); 542 if try_to_create then 543 call initiate_file_$create (new_profile_dirname, new_profile_ename, 544 RW_ACCESS, new_profile_ptr, created_here, (0), code); 545 else go to RETURN_FROM_ABBREV_COMMAND; 546 /* user doesn't want to try */ 547 end; 548 if new_profile_ptr = null () then do; 549 call com_err_ (code, ABBREV, "^a", pathname_ (new_profile_dirname, new_profile_ename)); 550 go to RETURN_FROM_ABBREV_COMMAND; 551 end; 552 end; 553 554 else do; 555 call com_err_ (error_table_$badopt, ABBREV, """^a""", argument); 556 go to RETURN_FROM_ABBREV_COMMAND; 557 end; 558 559 else do; 560 call com_err_$suppress_name (0, ABBREV, "Usage: ^a {-control_args}", ABBREV); 561 go to RETURN_FROM_ABBREV_COMMAND; 562 end; 563 end; 564 565 566 /* Here iff all arguments are OK: enable/disable abbrev and switch profiles as requested */ 567 568 abbrev_state.escape_character = new_escape_character; 569 570 if enable_abbrev then /* turn on abbreviation processing ... */ 571 if ^abbrev_state.set_cp then do; /* ... if it wasn't already in use */ 572 call cu_$get_command_processor (cp_variable); 573 if cp_variable ^= abbrev_processor then do; 574 /* ... avoid infinite recursion if we're already enabled */ 575 abbrev_state.previous_command_processor = cp_variable; 576 if ^abbrev_state.set_cp_explicit then abbrev_state.command_processor = cp_variable; 577 /* ... don't override the explicitly set processor */ 578 call cu_$set_command_processor (abbrev_processor); 579 abbrev_state.set_cp = "1"b; /* ... have set ourselves up now */ 580 end; 581 end; 582 583 else ; /* ... it was already on so this is a no-op */ 584 585 else do; /* turn abbrev off ... */ 586 if abbrev_state.set_cp then do; /* ... and we are the command processor */ 587 call cu_$set_command_processor (abbrev_state.previous_command_processor); 588 abbrev_state.set_cp = "0"b; 589 end; 590 if abbrev_state.profile_ptr ^= null () then /* ... don't need it any more */ 591 call terminate_file_ (abbrev_state.profile_ptr, 0, TERM_FILE_TERM, (0)); 592 end; 593 594 if new_profile_ptr ^= null () then do; /* switch to the requested profile */ 595 if abbrev_state.profile_ptr ^= null () then 596 call terminate_file_ (abbrev_state.profile_ptr, 0, TERM_FILE_TERM, (0)); 597 abbrev_state.profile_ptr, ap_ptr = new_profile_ptr; 598 new_profile_ptr = null (); /* avoid accidently terminating what is now the profile */ 599 expansion_temp_segment_ptr = null (); /* in case initialize_profile fails ... */ 600 have_return_code = "0"b; /* ... */ 601 call initialize_profile (^created_here, created_here); 602 end; 603 604 RETURN_FROM_ABBREV_COMMAND: 605 if new_profile_ptr ^= null () then 606 if created_here then 607 call terminate_file_ (new_profile_ptr, 0, TERM_FILE_DELETE, (0)); 608 else call terminate_file_ (new_profile_ptr, 0, TERM_FILE_TERM, (0)); 609 610 return; 611 612 end process_abbrev_command_or_af; 613 614 /* Return the current version of abbrev for use by use_exl_abbrev */ 615 616 get_version: 617 entry () returns (character (32)); 618 619 return (abbrev_data_$version); 620 621 /* Provide an explicit entry for abbrev to use as the command processor: overrides whatever entry the abbrev command 622* establishes as the previous command processor */ 623 624 set_cp: 625 entry (P_command_processor); 626 627 if first_call then call initialize_abbrev_state (); 628 629 if codeptr (P_command_processor) = null () then /* use the default command processor */ 630 abbrev_state.command_processor = command_processor_; 631 else abbrev_state.command_processor = P_command_processor; 632 633 abbrev_state.set_cp_explicit = "1"b; /* override the abbrev command */ 634 635 return; 636 637 /* Adds the given characters as break characters */ 638 639 set_break: 640 entry (P_breaks); 641 642 if first_call then call initialize_abbrev_state (); 643 644 call add_breaks (P_breaks); 645 646 return; 647 648 649 650 /* Do the actual work in an internal procedure to save space on the main procedure's stack */ 651 652 add_breaks: 653 procedure (p_breaks) options (non_quick); 654 655 dcl p_breaks character (*) parameter; 656 dcl current_breaks character (128) varying; 657 dcl break_character character (1) aligned; 658 dcl (idx, jdx) fixed binary (21); 659 dcl added bit (1) aligned; 660 661 if abbrev_state.default_breaks then /* everything but "::" due to deficiencies of the interface */ 662 current_breaks = before (DEFAULT_BREAKS, ":") || after (DEFAULT_BREAKS, ":"); 663 else current_breaks = abbrev_state.user_breaks; 664 665 do idx = 1 to length (p_breaks); 666 break_character = substr (p_breaks, idx, 1); 667 if break_character <= high (1) then do; /* only if it's ASCII ... */ 668 added = "0"b; 669 do jdx = 1 to length (current_breaks) while (^added); 670 if substr (current_breaks, jdx, 1) = break_character then added = "1"b; 671 else if substr (current_breaks, jdx, 1) > break_character then do; 672 current_breaks = 673 substr (current_breaks, 1, (jdx - 1)) || break_character 674 || substr (current_breaks, jdx); 675 added = "1"b; 676 end; 677 end; 678 if ^added then /* wasn't added in the middle: stick it on the end */ 679 current_breaks = current_breaks || break_character; 680 end; 681 end; 682 683 call set_user_breaks (current_breaks); 684 685 return; 686 687 end add_breaks; 688 689 /* Deletes the given characters from the list of break characters */ 690 691 reset_break: 692 entry (P_breaks); 693 694 if first_call then call initialize_abbrev_state (); 695 696 call delete_breaks (P_breaks); 697 698 return; 699 700 701 702 /* Do the actual work in an internal procedure to save space on the main procedure's stack */ 703 704 delete_breaks: 705 procedure (p_breaks) options (non_quick); 706 707 dcl p_breaks character (*) parameter; 708 dcl current_breaks character (128) varying; 709 dcl break_character character (1) aligned; 710 dcl (idx, jdx) fixed binary (21); 711 dcl deleted bit (1) aligned; 712 713 if abbrev_state.default_breaks then /* everything but "::" due to deficiencies of the interface */ 714 current_breaks = before (DEFAULT_BREAKS, ":") || after (DEFAULT_BREAKS, ":"); 715 else current_breaks = abbrev_state.user_breaks; 716 717 do idx = 1 to length (p_breaks); 718 break_character = substr (p_breaks, idx, 1); 719 deleted = "0"b; 720 do jdx = 1 to length (current_breaks) while (^deleted); 721 if substr (current_breaks, jdx, 1) = break_character then do; 722 current_breaks = substr (current_breaks, 1, (jdx - 1)) || substr (current_breaks, (jdx + 1)); 723 deleted = "1"b; 724 end; 725 end; 726 end; 727 728 call set_user_breaks (current_breaks); /* still not the default: build the appropriate TCT table */ 729 730 return; 731 732 end delete_breaks; 733 734 /* Sets the break sequences used by abbrev to the individual characters in the supplied string */ 735 736 set_user_breaks: 737 procedure (p_new_breaks) options (non_quick); 738 739 dcl p_new_breaks character (128) varying parameter; 740 dcl idx fixed binary; 741 742 system_area_ptr = get_system_free_area_ (); 743 744 if ^abbrev_state.default_breaks then free breaks_list in (system_area); 745 746 breaks_list_n_break_sequences, breaks_list_break_strings_lth = length (p_new_breaks); 747 allocate breaks_list in (system_area) set (abbrev_state.breaks_list_ptr); 748 /* nothing but single character break sequences */ 749 750 abbrev_state.user_breaks, breaks_list.break_strings = p_new_breaks; 751 752 abbrev_state.tct_table = low (length (abbrev_state.tct_table)); 753 754 do idx = 1 to length (abbrev_state.user_breaks); 755 abbrev_state_tct_table_as_binary (rank (substr (abbrev_state.user_breaks, idx, 1))) = idx; 756 breaks_list.break_sequences (idx).start = idx; 757 breaks_list.break_sequences (idx).lth = 1; 758 end; 759 760 abbrev_state.default_breaks = "0"b; /* no longer using the default */ 761 762 return; 763 764 end set_user_breaks; 765 766 /* Initialize abbrev's internal state */ 767 768 initialize_abbrev_state: 769 procedure () /* options (quick) */; 770 771 code = codeptr (debug) -> based_word; /* snap the links */ 772 debug_entry_variable = debug; 773 774 code = codeptr (probe) -> based_word; /* ... in case the linker gets wedged */ 775 probe_entry_variable = probe; 776 777 string (abbrev_state.flags) = ""b; /* turn them all off ... */ 778 abbrev_state.default_breaks = "1"b; /* ... except that we use the default breaks */ 779 780 abbrev_state.profile_ptr = null (); 781 782 abbrev_state.remembered_line_buffer_ptr = null (); 783 abbrev_state.remembered_line_buffer_lth, abbrev_state.remembered_line_lth = 0; 784 785 abbrev_state.escape_character = DEFAULT_ABBREV_ESCAPE_CHARACTER; 786 787 abbrev_state.tct_table = abbrev_data_$default_breaks_tct_table; 788 abbrev_state.breaks_list_ptr = addr (abbrev_data_$default_breaks_list); 789 790 first_call = "0"b; 791 792 return; 793 794 end initialize_abbrev_state; 795 796 /* Command processor interface: called via cu_$cp to process a command line */ 797 798 abbrev_: 799 abbrev_processor: 800 entry (P_input_line_ptr, P_input_line_lth, P_code); 801 802 abbrev_type = EXPAND_BOTH; 803 804 input_line_ptr = P_input_line_ptr; 805 input_line_lth = P_input_line_lth; 806 807 subsystem_entry = "0"b; 808 return_expansion = "0"b; 809 allow_request_lines, have_return_code = "1"b; 810 811 go to EXPAND_COMMON; 812 813 814 815 /* Subsystem request processor interface: called directly by ssu_$listen to expand and execute a subsystem request line */ 816 817 subsys_process_line: 818 entry (P_subsystem_name, P_sci_ptr, P_execute_request, P_subsys_cp_info_ptr, P_subsys_cp, P_default_profile_ptr, 819 P_profile_ptr, P_request_line, P_code); 820 821 abbrev_type = EXPAND_BOTH; 822 823 input_line_ptr = addr (P_request_line); 824 input_line_lth = length (P_request_line); 825 826 subsystem_entry = "1"b; 827 return_expansion = "0"b; 828 allow_request_lines, have_return_code = "1"b; 829 830 go to EXPAND_COMMON; 831 832 833 /* Expand only a selected abbrev type and return it to the caller */ 834 835 abbrev_$expand_line: 836 entry (P_abbrev_type, P_input_line_ptr, P_input_line_lth, P_workspace_ptr, P_workspace_lth, P_output_line_ptr, 837 P_output_line_lth); 838 839 abbrev_type = P_abbrev_type; 840 goto EXPANDED_LINE; 841 842 843 /* Expand a line and return it to the caller */ 844 845 abbrev_$expanded_line: /* avoids PL/I naming rules */ 846 entry (P_input_line_ptr, P_input_line_lth, P_workspace_ptr, P_workspace_lth, P_output_line_ptr, P_output_line_lth); 847 848 abbrev_type = EXPAND_BOTH; 849 850 EXPANDED_LINE: 851 input_line_ptr = P_input_line_ptr; 852 input_line_lth = P_input_line_lth; 853 854 subsystem_entry = "0"b; 855 return_expansion = "1"b; 856 allow_request_lines, have_return_code = "0"b; 857 858 go to EXPAND_COMMON; 859 860 861 /* Actual expansion starts here */ 862 863 EXPAND_COMMON: 864 if first_call then call initialize_abbrev_state (); 865 866 if ^abbrev_state.set_cp & ^abbrev_state.set_cp_explicit then 867 call cu_$get_command_processor (abbrev_state.command_processor); 868 /* no one had yet set a command processor to call */ 869 870 code = 0; /* assume success */ 871 872 system_area_ptr = get_system_free_area_ (); 873 874 extended_stack, used_temp_segment, null_line = "0"b; 875 expansion_stack_space_lth = 0; /* haven't extended the stack ... */ 876 expansion_temp_segment_ptr = null (); /* ... or used a temp seg yet */ 877 878 if input_line_lth = 0 then do; /* special case zero-length lines: avoids faults... */ 879 null_line = "1"b; /* don't remember this line if in ".r" mode */ 880 EXPANSION_IS_INPUT_LINE: 881 expanded_line_ptr = input_line_ptr; 882 expanded_line_lth = input_line_lth; 883 go to EXPANSION_COMPLETED; 884 end; 885 886 start = verify (input_line, WHITE_SPACE_AND_NL); /* "strip" leading white space */ 887 888 if start = 0 then do; /* all whitespace ... */ 889 null_line = "1"b; 890 go to EXPANSION_IS_INPUT_LINE; 891 end; 892 893 894 /* format: off */ 895 896 /* Check for the ".." escape here as the user might have changed the escape character: 897* "..": pass the rest of the line to the current command processor; this request allows typeahead of command lines 898* when one isn't sure if a subsystem or Multics proper will read the line in question */ 899 900 /* format: on */ 901 902 if allow_request_lines & ^subsystem_entry then /* only if we'll call cu_$cp eventually ... */ 903 if input_line_lth > (start + 1) then /* ... and there's enough on the line to allow ".." ... */ 904 if substr (input_line, start, 2) = ".." then do; 905 call cu_$cp (addcharno (input_line_ptr, (start + 1)), (input_line_lth - start - 1), code); 906 go to RETURN_FROM_ABBREV_PROCESSOR;/* ... reflect execution's error code to caller */ 907 end; 908 909 910 /* Check for and process abbrev request lines */ 911 912 if (substr (input_line, start, 1) = abbrev_state.escape_character) then 913 /* a request line ... */ 914 if allow_request_lines then do; /* ... and request lines are OK */ 915 call process_request_line (); 916 code = 0; /* requests ALWAYS "work" */ 917 go to RETURN_FROM_ABBREV_PROCESSOR; 918 end; 919 920 else go to EXPANSION_IS_INPUT_LINE; /* ... no request lines: just give it back */ 921 922 923 /* Non-request line: expand the line, remember it (if appropriate), and execute/return it */ 924 925 call set_profile_ptr (return_expansion); /* will need the profile for certain now */ 926 927 if return_expansion & (ap_ptr = null ()) then /* no profile to expand the line with ... */ 928 go to EXPANSION_IS_INPUT_LINE; 929 930 on condition (cleanup) 931 begin; 932 if expansion_temp_segment_ptr ^= null () then 933 call release_temp_segment_ (ABBREV, expansion_temp_segment_ptr, (0)); 934 end; 935 936 call expand_line (abbrev_type, start); /* grows our stack frame */ 937 938 EXPANSION_COMPLETED: 939 if return_expansion then do; /* expanded_line entry ... */ 940 if expanded_line_lth <= P_workspace_lth then /* ... fits into caller's buffer */ 941 P_output_line_ptr = P_workspace_ptr; 942 else allocate expanded_line in (system_area) set (P_output_line_ptr); 943 P_output_line_lth = expanded_line_lth; 944 P_output_line = expanded_line; 945 go to RETURN_FROM_ABBREV_PROCESSOR; 946 end; 947 948 if abbrev_state.remember_lines & ^null_line then do; 949 if abbrev_state.remembered_line_buffer_lth < expanded_line_lth then do; 950 if abbrev_state.remembered_line_buffer_ptr ^= null () then 951 free remembered_line_buffer in (system_area); 952 abbrev_state.remembered_line_buffer_lth = 128 * divide (expanded_line_lth + 127, 128, 21, 0); 953 allocate remembered_line_buffer in (system_area) set (abbrev_state.remembered_line_buffer_ptr); 954 end; 955 abbrev_state.remembered_line_lth = expanded_line_lth; 956 remembered_line = expanded_line; 957 end; 958 959 if subsystem_entry then 960 call P_subsys_cp (P_subsystem_name, P_sci_ptr, P_execute_request, P_subsys_cp_info_ptr, expanded_line, 961 code); 962 else call abbrev_state.command_processor (expanded_line_ptr, expanded_line_lth, code); 963 964 965 RETURN_FROM_ABBREV_PROCESSOR: 966 if expansion_temp_segment_ptr ^= null () then 967 call release_temp_segment_ (ABBREV, expansion_temp_segment_ptr, (0)); 968 969 if have_return_code then /* let the caller know how we did */ 970 P_code = code; 971 972 return; 973 974 /* Returns the pathname of a profile */ 975 976 profile_pathname: 977 procedure () returns (character (168)) options (non_quick); 978 979 dcl profile_dirname character (168); 980 dcl profile_ename character (32); 981 982 call hcs_$fs_get_path_name (ap_ptr, profile_dirname, (0), profile_ename, (0)); 983 984 return (pathname_ (profile_dirname, profile_ename)); 985 986 end profile_pathname; 987 988 989 990 /* Aborts abbrev with the given error message: if command level is using the profile identified by ap_ptr, abbreviation 991* processing is turned off as this entry is only called when said profile is unusable */ 992 993 abort_abbrev_processor: 994 procedure (p_code, p_message, p_pathname) options (non_quick); 995 996 dcl p_code fixed binary (35) parameter; 997 dcl (p_message, p_pathname) character (*) parameter; 998 999 if ap_ptr = abbrev_state.profile_ptr then do; /* command level was using this profile */ 1000 if abbrev_state.set_cp then do; /* ... and we are the command processor */ 1001 call cu_$set_command_processor (abbrev_state.previous_command_processor); 1002 abbrev_state.set_cp = "0"b; 1003 end; 1004 if ap_ptr ^= null () then /* ... don't need it any more */ 1005 call terminate_file_ (ap_ptr, 0, TERM_FILE_TERM, (0)); 1006 abbrev_state.profile_ptr = null (); /* ... no longer have a profile */ 1007 end; 1008 1009 call com_err_ (p_code, ABBREV, p_message, p_pathname); 1010 1011 code = p_code; /* make sure right error gets back to caller */ 1012 1013 go to RETURN_FROM_ABBREV_PROCESSOR; 1014 1015 end abort_abbrev_processor; 1016 1017 /* Sets ap_ptr to locate the proper profile to be used for expansion in this case: initializes the profile if necessary; 1018* two versions of this procedure exist to insure that this one is quick */ 1019 1020 set_profile_ptr: 1021 procedure (p_dont_create_profile) /* options (quick) */; 1022 1023 dcl p_dont_create_profile bit (1) aligned; 1024 1025 ap_ptr = null (); /* start somewhere */ 1026 1027 if subsystem_entry then /* subsystems use arbitrary profiles */ 1028 if (P_default_profile_ptr = null ()) & (P_profile_ptr = null ()) then 1029 /* ... use same profile as Multics command level */ 1030 if abbrev_state.profile_ptr = null () then 1031 call get_default_profile (p_dont_create_profile); 1032 /* ... need not succeed if called at expanded_line entry */ 1033 else ap_ptr = abbrev_state.profile_ptr; 1034 1035 else do; /* subsystem supplied the profile */ 1036 if P_profile_ptr ^= null () then 1037 ap_ptr = P_profile_ptr; 1038 else ap_ptr = P_default_profile_ptr; 1039 call initialize_profile ("1"b, "0"b); /* ... make sure it's good */ 1040 end; 1041 1042 else do; /* command level invocation */ 1043 if abbrev_state.profile_ptr = null () then 1044 call get_default_profile (p_dont_create_profile); 1045 /* ... need not succeed if called at expanded_line entry */ 1046 else ap_ptr = abbrev_state.profile_ptr; 1047 end; 1048 1049 return; 1050 1051 end set_profile_ptr; 1052 1053 /* Sets the profile used by Multics command level to the default profile segment (Person.profile in the home directory): 1054* creates the profile if request or prints an error message and disables abbrev processing if invoked to expand and 1055* execute a command/request line */ 1056 1057 get_default_profile: 1058 procedure (p_dont_create_profile) options (non_quick); 1059 1060 dcl p_dont_create_profile bit (1) aligned parameter; 1061 dcl profile_dirname character (168); 1062 dcl (profile_ename, person_id) character (32); 1063 dcl created_here bit (1) aligned; 1064 1065 call user_info_ (person_id); 1066 call user_info_$homedir (profile_dirname); 1067 1068 profile_ename = rtrim (person_id) || ".profile"; 1069 1070 created_here = "0"b; 1071 1072 call initiate_file_ (profile_dirname, profile_ename, R_ACCESS, abbrev_state.profile_ptr, (0), code); 1073 1074 if code = error_table_$noentry then /* not found ... */ 1075 if p_dont_create_profile then 1076 return; /* ... but that's OK */ 1077 else do; /* ... must be able to create it */ 1078 call initiate_file_$create (profile_dirname, profile_ename, RW_ACCESS, abbrev_state.profile_ptr, 1079 created_here, (0), code); 1080 if code ^= 0 then 1081 call abort_abbrev_processor (code, "Profile ^a could not be created.", 1082 pathname_ (profile_dirname, profile_ename)); 1083 end; 1084 1085 else if code ^= 0 then /* wrong access, etc... */ 1086 call abort_abbrev_processor (code, "^a", pathname_ (profile_dirname, profile_ename)); 1087 1088 ap_ptr = abbrev_state.profile_ptr; /* got it */ 1089 1090 call initialize_profile ("1"b, created_here); /* make sure it's OK */ 1091 1092 return; 1093 1094 end get_default_profile; 1095 1096 /* Insure that a profile segment has been properly initialized */ 1097 1098 initialize_profile: 1099 procedure (p_announce, p_created_or_initialized) options (non_quick); 1100 1101 dcl p_announce bit (1) aligned parameter; 1102 dcl p_created_or_initialized bit (1) aligned parameter; 1103 dcl profile_mode fixed binary (5); 1104 1105 if abbrev_profile.version > 127 then /* older style: garbage collection will fix it */ 1106 call compact_profile (); 1107 1108 call hcs_$fs_get_mode (ap_ptr, profile_mode, code); 1109 if code ^= 0 then /* have to be able to determine our access */ 1110 call abort_abbrev_processor (code, "Can not determine access to profile ^a", profile_pathname ()); 1111 1112 if abbrev_profile.next_free = 0 then /* freshly created profile */ 1113 if (profile_mode = RW_ACCESS_BIN) | (profile_mode = REW_ACCESS_BIN) then do; 1114 if p_announce then 1115 call ioa_ ("^a: Profile ^a ^[created^;initialized^].", ABBREV, profile_pathname (), 1116 p_created_or_initialized); 1117 abbrev_profile.version = ABBREV_PROFILE_VERSION_1; 1118 abbrev_profile.next_free = fixed (rel (addr (abbrev_profile.data_space)), 18, 0); 1119 call terminate_file_ (ap_ptr, (36 * abbrev_profile.next_free), TERM_FILE_TRUNC_BC, (0)); 1120 end; /* truncate and set bit count in case it contained garbage */ 1121 1122 else call abort_abbrev_processor (error_table_$moderr, "Can not complete initialization of profile ^a", 1123 profile_pathname ()); 1124 1125 else if abbrev_profile.version = 0 then /* simple upgrade to version 1 */ 1126 if (profile_mode = RW_ACCESS_BIN) | (profile_mode = REW_ACCESS_BIN) then 1127 abbrev_profile.version = ABBREV_PROFILE_VERSION_1; 1128 1129 return; 1130 1131 end initialize_profile; 1132 1133 /* Expands a line: if any expansion actually occurs, the caller's stack frame is expanded to hold the result; if the 1134* expanded string exceeds 16K characters, it is placed in a temporary segment instead */ 1135 1136 expand_line: 1137 procedure (p_abbrev_type, p_start) /* options (quick) */; 1138 1139 dcl p_abbrev_type fixed bin; /* get the type of abbreviations to expand */ 1140 dcl p_start fixed binary (21) parameter; /* where in line to start expansion */ 1141 1142 dcl abbrev_name character (8) aligned; 1143 dcl break_character character (1) aligned; 1144 dcl (recognize_bol_abbrevs, need_break_sequence, found_end) bit (1) aligned; 1145 dcl (start, last_copied_idx, last_expanded_idx, last_quote_idx, break_idx, idx) fixed binary (21); 1146 dcl break_lth fixed binary; 1147 1148 expanded_line_ptr = input_line_ptr; /* assume we don't have to copy/expand it at all */ 1149 expanded_line_lth = input_line_lth; 1150 1151 last_copied_idx = 0; /* haven't copied any of the line yet */ 1152 last_expanded_idx = 0; 1153 1154 recognize_bol_abbrevs = "1"b; 1155 1156 start = p_start; 1157 1158 do while (start <= input_line_lth); 1159 1160 begin; 1161 1162 dcl rest_of_line character (input_line_lth - start + 1) unaligned defined (input_line) position (start); 1163 1164 need_break_sequence = "1"b; /* find next break sequence */ 1165 break_idx, break_lth = 0; /* no break sequence yet */ 1166 do while (need_break_sequence & (break_idx <= length (rest_of_line))); 1167 begin; 1168 dcl rest_of_rest_of_line character (length (rest_of_line) - break_idx) unaligned defined (input_line) 1169 position (start + break_idx); 1170 if abbrev_state.default_breaks then 1171 idx = search (rest_of_rest_of_line, DEFAULT_BREAKS); 1172 else idx = find_char_$first_in_table (rest_of_rest_of_line, abbrev_state.tct_table); 1173 end; 1174 if idx = 0 then /* no more break sequences present */ 1175 break_idx = length (rest_of_line) + 1; 1176 else do; /* a possibility */ 1177 break_idx = break_idx + idx; 1178 break_character = substr (rest_of_line, break_idx, 1); 1179 /* format: off */ 1180 do idx = abbrev_state_tct_table_as_binary (rank (break_character)) 1181 to breaks_list.n_break_sequences 1182 while (need_break_sequence & 1183 (substr (breaks_list.break_strings, 1184 breaks_list.break_sequences (idx).start, 1) = 1185 break_character)); 1186 if (break_idx + breaks_list.break_sequences (idx).lth - 1) <= length (rest_of_line) then 1187 if substr (rest_of_line, break_idx, breaks_list.break_sequences (idx).lth) = 1188 substr (breaks_list.break_strings, breaks_list.break_sequences (idx).start, 1189 breaks_list.break_sequences (idx).lth) 1190 then do; /* found it */ 1191 need_break_sequence = "0"b; 1192 break_lth = breaks_list.break_sequences (idx).lth; 1193 end; 1194 end; /* format: on */ 1195 end; 1196 end; 1197 1198 if break_idx > 1 then do; /* check for an abbreviation */ 1199 if break_idx <= (length (ape.name) + 1) then do; 1200 abbrev_name = substr (rest_of_line, 1, (break_idx - 1)); 1201 ape_ptr = lookup_abbrev (); 1202 if ape_ptr ^= null () then /* found one */ 1203 if (recognize_bol_abbrevs & ape.bol & (p_abbrev_type ^= EXPAND_INTERNAL_ONLY)) 1204 | (^ape.bol & (p_abbrev_type ^= EXPAND_BOL_ONLY)) then do; 1205 begin; 1206 dcl uncopied_text character (start - last_copied_idx - 1) unaligned defined (input_line) position (last_copied_idx + 1); 1207 call make_space (length (uncopied_text) + ape.value_lth); 1208 expanded_line_lth = expanded_line_lth + length (uncopied_text); 1209 substr (expanded_line, (last_expanded_idx + 1), length (uncopied_text)) = 1210 uncopied_text; 1211 last_expanded_idx = last_expanded_idx + length (uncopied_text); 1212 last_copied_idx = last_copied_idx + length (uncopied_text); 1213 end; /* just copied in the previously uncopied text */ 1214 1215 expanded_line_lth = expanded_line_lth + ape.value_lth; 1216 substr (expanded_line, (last_expanded_idx + 1), ape.value_lth) = ape.value; 1217 last_expanded_idx = last_expanded_idx + ape.value_lth; 1218 expanded_line_lth = last_expanded_idx; 1219 last_copied_idx = last_copied_idx + break_idx - 1; 1220 end; /* just "copied" in the abbrev */ 1221 end; 1222 recognize_bol_abbrevs = "0"b; /* not anymore */ 1223 end; 1224 end; 1225 1226 start = start + break_idx + break_lth - 1; /* to character after the break sequence */ 1227 1228 if start <= input_line_lth then do; /* something left on line: check special characters */ 1229 1230 if ape_ptr ^= null () then do; 1231 if substr (ltrim (reverse (expanded_line)), 1, length (SEMICOLON)) = SEMICOLON 1232 | substr (ltrim (reverse (expanded_line)), 1, length (LEFT_BRACKET)) = LEFT_BRACKET 1233 | substr (ltrim (reverse (expanded_line)), 1, length (VERTICAL_BAR || SEMICOLON)) 1234 = VERTICAL_BAR || SEMICOLON then 1235 recognize_bol_abbrevs = "1"b; 1236 end; 1237 1238 if (start - 1) > 0 then /* ... don't reference off the end */ 1239 break_character = substr (input_line, (start - 1), 1); 1240 else break_character = SP; /* ... assume a space before the line */ 1241 if (break_character = NL) | (break_character = SEMICOLON) | (break_character = LEFT_BRACKET) then 1242 recognize_bol_abbrevs = "1"b; 1243 else if (break_character = VERTICAL_BAR) then do; 1244 if substr (input_line, (start - length (SEMICOLON || VERTICAL_BAR)), length (SEMICOLON)) 1245 = SEMICOLON then 1246 recognize_bol_abbrevs = "1"b; 1247 end; 1248 1249 else recognize_bol_abbrevs = recognize_bol_abbrevs & (index (WHITE_SPACE, break_character) ^= 0); 1250 if break_character = QUOTE then do; 1251 begin; 1252 dcl rest_of_line character (input_line_lth - start + 1) unaligned defined (input_line) position (start); 1253 found_end = "0"b; /* a quoted string: ignore everything inside it */ 1254 last_quote_idx = 0; 1255 do while (^found_end); 1256 begin; 1257 dcl rest_of_rest_of_line character (length (rest_of_line) - last_quote_idx) unaligned defined (input_line) 1258 position (start + last_quote_idx); 1259 idx = index (rest_of_rest_of_line, QUOTE); 1260 if idx = 0 then idx = length (rest_of_rest_of_line) + 1; 1261 if (idx + 1) <= length (rest_of_rest_of_line) then 1262 if substr (rest_of_rest_of_line, (idx + 1), 1) = QUOTE then 1263 last_quote_idx = last_quote_idx + idx + 1; 1264 else do; 1265 last_quote_idx = last_quote_idx + idx; 1266 found_end = "1"b; 1267 end; 1268 else do; /* unbalanced quotes */ 1269 last_quote_idx = length (rest_of_line) + 1; 1270 found_end = "1"b; 1271 end; 1272 end; 1273 end; 1274 end; 1275 start = start + last_quote_idx; 1276 end; 1277 end; 1278 end; 1279 1280 if extended_stack | used_temp_segment then do; /* had to copy user's input */ 1281 begin; 1282 dcl uncopied_text character (input_line_lth - last_copied_idx) unaligned defined (input_line) 1283 position (last_copied_idx + 1); 1284 call make_space (length (uncopied_text)); 1285 1286 expanded_line_lth = expanded_line_lth + length (uncopied_text); 1287 substr (expanded_line, (last_expanded_idx + 1), length (uncopied_text)) = uncopied_text; 1288 last_expanded_idx = last_expanded_idx + length (uncopied_text); 1289 end; 1290 expanded_line_lth = last_expanded_idx; 1291 end; 1292 1293 return; 1294 1295 /* Searches the profile for an abbreviation (internal to expand_line): two versions of this procedure exist to insure that 1296* this one is quick */ 1297 1298 lookup_abbrev: 1299 procedure () returns (pointer) /* options (quick) */; 1300 1301 dcl offset fixed binary (18); 1302 1303 do offset = abbrev_profile.hash_table (rank (substr (abbrev_name, 1, 1))) repeat (ape.next) 1304 while (offset ^= 0); 1305 ape_ptr = pointer (ap_ptr, offset); 1306 if ape.name = abbrev_name then return (ape_ptr); 1307 end; 1308 1309 return (null ()); /* here iff not found */ 1310 1311 end lookup_abbrev; 1312 1313 /* Insures that there is sufficient room either in the stack extension or in the temporary segment to add the requested 1314* number of characters to the current expansion of the command/request line (internal to expand_line) */ 1315 1316 make_space: 1317 procedure (p_amount) /* options (quick) */; 1318 1319 dcl p_amount fixed binary (21) parameter; 1320 dcl extension_ptr pointer; 1321 dcl new_size fixed binary (21); 1322 dcl amount_to_grow fixed binary (18); 1323 1324 new_size = last_expanded_idx + p_amount; 1325 1326 if (new_size <= MAX_STACK_EXTENSION) & ^used_temp_segment then 1327 if new_size > expansion_stack_space_lth then do; 1328 amount_to_grow = /* double extension or enough room to cover the new piece */ 1329 16 * divide ((max (expansion_stack_space_lth, p_amount) + 63), 64, 18, 0); 1330 call cu_$grow_stack_frame (amount_to_grow, extension_ptr, code); 1331 if code ^= 0 then go to USE_TEMP_SEGMENT; 1332 if ^extended_stack then do; /* first time: don't set these variables unless ... */ 1333 extended_stack = "1"b; /* ... cu_$grow_stack_frame succeeds */ 1334 expansion_stack_space_ptr, expanded_line_ptr = extension_ptr; 1335 expanded_line_lth = 0; 1336 end; 1337 expansion_stack_space_lth = expansion_stack_space_lth + (4 * amount_to_grow); 1338 end; 1339 else ; /* already using stack extension and its still big enough */ 1340 1341 else if new_size <= length (expansion_temp_segment) then 1342 USE_TEMP_SEGMENT: /* try to use a segment for the expansion */ 1343 if ^used_temp_segment then do; /* ... first time: get the segment ... */ 1344 call get_temp_segment_ (ABBREV, expansion_temp_segment_ptr, code); 1345 if code ^= 0 then go to RETURN_FROM_ABBREV_PROCESSOR; 1346 if extended_stack then do; /* ... and copy whatever was on the stack */ 1347 substr (expansion_temp_segment_ptr -> expanded_line, 1, last_expanded_idx) = 1348 substr (expansion_stack_space_ptr -> expanded_line, 1, last_expanded_idx); 1349 call cu_$shrink_stack_frame (expansion_stack_space_ptr, (0)); 1350 extended_stack = "0"b; 1351 end; 1352 expanded_line_ptr = expansion_temp_segment_ptr; 1353 used_temp_segment = "1"b; 1354 end; 1355 else ; /* already using the temporary segment */ 1356 1357 else do; /* expansion won't fit into a segment */ 1358 code = error_table_$command_line_overflow; 1359 go to RETURN_FROM_ABBREV_PROCESSOR; 1360 end; 1361 1362 return; 1363 1364 end make_space; 1365 1366 end; 1367 1368 /* Process an abbrev request line */ 1369 1370 process_request_line: 1371 procedure () options (non_quick); 1372 1373 dcl profile_dirname character (168); 1374 dcl (request_name, token, profile_ename) character (32); 1375 dcl new_escape_character character (1) aligned; 1376 dcl used fixed binary (21); 1377 1378 1379 start = start + 1; /* pass over the request character */ 1380 1381 input_line_lth = length (rtrim (input_line, WHITE_SPACE_AND_NL)); 1382 /* strip trailing whitespace */ 1383 1384 begin; 1385 1386 dcl request_line character (input_line_lth - start + 1) unaligned defined (input_line) position (start); 1387 /* the request line (without the request character) */ 1388 1389 1390 /* Self-identify request ("."): not accepted in subsystems where there is usually a "." request which identifies the 1391* subsystem itself */ 1392 1393 if length (request_line) = 0 then 1394 if subsystem_entry then do; 1395 null_line = "1"b; /* don't bother to remember this request line */ 1396 go to EXPANSION_IS_INPUT_LINE; 1397 end; 1398 else do; 1399 call ioa_ ("^a ^a", ABBREV, abbrev_data_$version); 1400 return; 1401 end; 1402 1403 1404 /* Quit abbrev: doesn't require the profile to exist; not accepted in subsystems */ 1405 1406 if (request_line = "quit") | (request_line = "q") then do; 1407 if subsystem_entry then 1408 call com_err_ (0, ABBREV, """^aq"" is not valid within subsystems.", 1409 abbrev_state.escape_character); 1410 else do; /* Multics command level */ 1411 if abbrev_state.set_cp then do; /* ... we were the command processor: reset it */ 1412 call cu_$set_command_processor (abbrev_state.previous_command_processor); 1413 abbrev_state.set_cp = "0"b; 1414 end; 1415 if abbrev_state.profile_ptr ^= null () then 1416 call terminate_file_ (abbrev_state.profile_ptr, 0, TERM_FILE_TERM, (0)); 1417 end; /* ... and we no longer know where the profile is */ 1418 return; 1419 end; 1420 1421 1422 /* ". ": pass the rest of the line to the previous command processor without expansion or remembering */ 1423 1424 if substr (request_line, 1, 1) = " " then 1425 begin; 1426 dcl rest_of_line character (length (request_line) - 1) unaligned defined (input_line) position (start + 1); 1427 if subsystem_entry then 1428 call P_subsys_cp (P_subsystem_name, P_sci_ptr, P_execute_request, P_subsys_cp_info_ptr, 1429 rest_of_line, code); 1430 else call abbrev_state.command_processor (addr (rest_of_line), length (rest_of_line), code); 1431 go to RETURN_FROM_ABBREV_PROCESSOR; /* reflect execution's error code to caller */ 1432 end; 1433 1434 1435 /* Remaining requests use the parsed version of the request line */ 1436 1437 used = 0; /* haven't look at the line yet */ 1438 1439 request_name = get_token (); /* get the request name */ 1440 1441 if (request_name = "use") | (request_name = "u") then do; 1442 call do_use_request (); /* switch profiles */ 1443 return; 1444 end; 1445 1446 else if request_name = "terminate_process" then do; 1447 call validate_no_arguments ("terminate_process"); 1448 code = pointer (baseptr (-2), "400000"b3) -> based_word; 1449 end; /* terminates the process without prejudice */ 1450 1451 else if request_name = "debug" then do; 1452 call validate_no_arguments ("debug"); 1453 call ioa_ ("debug:"); 1454 call debug_entry_variable (); /* invokes debug in a possibly damaged process */ 1455 return; 1456 end; 1457 1458 else if request_name = "probe" then do; 1459 call validate_no_arguments ("probe"); 1460 call probe_entry_variable (); /* invokes probe in a possibly damaged process */ 1461 return; 1462 end; 1463 1464 else if request_name = "?" then do; /* display request list */ 1465 call do_help_request (); 1466 return; 1467 end; 1468 call set_profile_ptr ("0"b); /* all other requests require that the profile exist */ 1469 1470 1471 /* Print the pathname of the current profile */ 1472 1473 if (request_name = "profile") | (request_name = "p") then do; 1474 call validate_no_arguments ("p"); /* use short name for compatibility with documentation */ 1475 call hcs_$fs_get_path_name (ap_ptr, profile_dirname, (0), profile_ename, (0)); 1476 call ioa_ ("^a", pathname_ (profile_dirname, profile_ename)); 1477 end; 1478 1479 1480 /* Set/reset remember mode: in remember mode, abbrev will save the expansion of the last command/request line executed */ 1481 1482 else if (request_name = "remember") | (request_name = "r") then do; 1483 call validate_no_arguments ("r"); 1484 abbrev_state.remember_lines = "1"b; /* just set the flag */ 1485 end; 1486 1487 else if (request_name = "forget") | (request_name = "f") then do; 1488 call validate_no_arguments ("f"); 1489 abbrev_state.remember_lines = "0"b; /* stop remembering and get rid of old remembered line ... */ 1490 if abbrev_state.remembered_line_buffer_ptr ^= null () then 1491 free remembered_line_buffer in (system_area); 1492 abbrev_state.remembered_line_buffer_ptr = null (); 1493 abbrev_state.remembered_line_buffer_lth, abbrev_state.remembered_line_lth = 0; 1494 end; 1495 1496 1497 /* Set the escape character which is the trigger for request lines */ 1498 1499 else if (request_name = "escape") | (request_name = "esc") then do; 1500 token = get_token (); /* is there a new request character? */ 1501 if token ^= "" then /* ... yes: make sure it's not too long */ 1502 if length (rtrim (token)) > length (abbrev_state.escape_character) then 1503 call com_err_ (0, ABBREV, "The escape sequence must be a single character; not ""^a"".", 1504 token); 1505 else do; /* ... length is OK */ 1506 new_escape_character = substr (token, 1, 1); 1507 token = get_token (); 1508 if token = "" then /* ... nothing else on the line */ 1509 abbrev_state.escape_character = new_escape_character; 1510 else call com_err_ (0, ABBREV, "Only one escape character may be specified. ""^a""", token); 1511 end; 1512 else call ioa_ ("Abbrev escape character: ^a", abbrev_state.escape_character); 1513 end; 1514 1515 1516 /* Following requests are all complex enough that they are each implemented as separate internal procedures */ 1517 1518 else if (request_name = "show") | (request_name = "s") then call do_show_request (); 1519 /* show an expansion */ 1520 1521 else if (request_name = "l") | (request_name = "la") | (request_name = "lab") | (request_name = "la^b") 1522 | (request_name = "lb") | (request_name = "l^b") | (request_name = "ls") | (request_name = "lsb") 1523 | (request_name = "ls^b") | (request_name = "lx") | (request_name = "lxb") | (request_name = "lx^b") 1524 then 1525 call do_list_request (); /* list one or more abbrev definitions */ 1526 1527 else if (request_name = "a") | (request_name = "af") | (request_name = "ab") | (request_name = "abf") then 1528 call do_add_request (); /* define a new abbreviation */ 1529 1530 else if (request_name = "delete") | (request_name = "dl") | (request_name = "d") then 1531 call do_delete_request (); /* delete one or more abbreviations */ 1532 1533 else if (request_name = "rename") | (request_name = "rn") then call do_rename_request (); 1534 /* rename one or more abbreviations */ 1535 1536 else if request_name = "edit" then call do_edit_request (); 1537 1538 /* edit the definition of an abbreviation */ 1539 1540 else if (request_name = "switch_on") | (request_name = "swn") then call do_switch_request ("1"b); 1541 /* turn on switches for one or more abbreviations */ 1542 1543 else if (request_name = "switch_off") | (request_name = "swf") then call do_switch_request ("0"b); 1544 /* turn off switches for one or more abbreviations */ 1545 1546 1547 /* Here iff the request is not recognized */ 1548 1549 else call com_err_ (error_table_$request_not_recognized, ABBREV, """^a^a""", abbrev_state.escape_character, 1550 request_name); 1551 1552 return; 1553 1554 /* Switch to another profile (internal to process_request_line begin block): if no profile pathname is given, reverts to 1555* the default profile; otherwise, the given pathname is abbrev expanded (if possible) before we actually try to use it as 1556* a convenience */ 1557 1558 do_use_request: 1559 procedure (); 1560 1561 dcl expanded_pathname_buffer character (256); 1562 dcl expanded_pathname character (expanded_pathname_lth) based (expanded_pathname_ptr); 1563 dcl expanded_pathname_lth fixed binary (21); 1564 dcl expanded_pathname_ptr pointer; 1565 1566 dcl new_profile_dirname character (168); 1567 dcl (new_profile_ename) character (32); 1568 1569 dcl new_profile_ptr pointer; 1570 1571 dcl created_here bit (1) aligned; 1572 dcl try_to_create bit (1); /* command_query_$yes_no is declared wrong... */ 1573 1574 1575 call skip_whitespace (); /* find start of pathname */ 1576 1577 begin; 1578 1579 dcl original_pathname character (length (request_line) - used) unaligned defined (input_line) position (start + used); 1580 1581 new_profile_ptr = null (); /* haven't gotten it yet */ 1582 1583 call set_profile_ptr ("1"b); /* try to get the current profile */ 1584 1585 if original_pathname = "" then do; /* reset to default profile */ 1586 call terminate_old_profile (); 1587 if subsystem_entry then /* ... reset to default for this invocation */ 1588 P_profile_ptr = null (); 1589 else call get_default_profile ("1"b); 1590 return; 1591 end; 1592 1593 if abbrev_state.profile_ptr = null () then do; 1594 expanded_pathname_ptr = addr (original_pathname); 1595 expanded_pathname_lth = length (original_pathname); 1596 end; 1597 1598 else call abbrev_$expand_line (EXPAND_INTERNAL_ONLY, addr (original_pathname), length (original_pathname), 1599 addr (expanded_pathname_buffer), length (expanded_pathname_buffer), expanded_pathname_ptr, 1600 expanded_pathname_lth); 1601 1602 if substr (expanded_pathname, 1, length (QUOTE)) = QUOTE then 1603 if substr (expanded_pathname, expanded_pathname_lth, length (QUOTE)) = QUOTE then 1604 expanded_pathname = substr (expanded_pathname, 2, expanded_pathname_lth - 2); 1605 /* remove one level of quotes */ 1606 else do; 1607 call com_err_ (error_table_$unbalanced_quotes, ABBREV, expanded_pathname); 1608 return; 1609 end; 1610 else ; 1611 1612 call expand_pathname_$add_suffix (expanded_pathname, "profile", new_profile_dirname, new_profile_ename, 1613 code); 1614 if code ^= 0 then /* before we release the storage */ 1615 call com_err_ (code, ABBREV, "^a", expanded_pathname); 1616 if (expanded_pathname_ptr ^= addr (original_pathname)) 1617 & (expanded_pathname_ptr ^= addr (expanded_pathname_buffer)) then 1618 free expanded_pathname in (system_area); 1619 if code ^= 0 then return; /* ... message already printed */ 1620 1621 created_here = "0"b; /* assume we find it */ 1622 1623 call initiate_file_ (new_profile_dirname, new_profile_ename, R_ACCESS, new_profile_ptr, (0), code); 1624 if code ^= 0 then 1625 if code = error_table_$noentry then do; 1626 call command_query_$yes_no (try_to_create, 0, ABBREV, "", 1627 "Profile ^a not found. Do you want to create it?", 1628 pathname_ (new_profile_dirname, new_profile_ename)); 1629 if try_to_create then 1630 call initiate_file_$create (new_profile_dirname, new_profile_ename, RW_ACCESS, 1631 new_profile_ptr, created_here, (0), code); 1632 else return; /* user doesn't want to try */ 1633 end; 1634 1635 if code ^= 0 then do; 1636 call com_err_ (code, ABBREV, "^a", pathname_ (new_profile_dirname, new_profile_ename)); 1637 return; /* couldn't switch ... */ 1638 end; 1639 1640 call terminate_old_profile (); 1641 1642 if subsystem_entry then /* change this invocation's profile */ 1643 P_profile_ptr, ap_ptr = new_profile_ptr; 1644 else abbrev_state.profile_ptr, ap_ptr = new_profile_ptr; 1645 /* change command level's profile */ 1646 call initialize_profile (^created_here, created_here); 1647 1648 return; 1649 end; 1650 1651 1652 1653 /* Terminate the old profile segment (internal to do_use_request) */ 1654 1655 terminate_old_profile: 1656 procedure (); 1657 1658 if ap_ptr ^= null () then /* terminate the old profile ... */ 1659 if subsystem_entry then /* ... but only if not the subsystem's default profile */ 1660 if (ap_ptr ^= P_default_profile_ptr) 1661 & ((P_default_profile_ptr ^= null ()) 1662 | ((P_default_profile_ptr = null ()) & (P_profile_ptr ^= null ()))) then 1663 call terminate_file_ (ap_ptr, 0, TERM_FILE_TERM, (0)); 1664 else ; 1665 1666 else call terminate_file_ (ap_ptr, 0, TERM_FILE_TERM, (0)); 1667 1668 return; 1669 1670 end terminate_old_profile; 1671 1672 end do_use_request; 1673 1674 /* Show an expansion (internal to process_request_line begin block): if anything else is present on the line, expand it; 1675* otherwise, show the last expansion if remember mode is set */ 1676 1677 do_show_request: 1678 procedure (); 1679 1680 dcl result_line character (result_line_lth) based (result_line_ptr); 1681 dcl result_line_lth fixed binary (21); 1682 dcl result_line_ptr pointer; 1683 1684 call skip_whitespace (); /* skip to request line (if any) */ 1685 1686 if used < length (request_line) then 1687 begin; 1688 dcl rest_of_line character (length (request_line) - used) unaligned defined (input_line) position (start + used); 1689 call abbrev_$expanded_line (addr (rest_of_line), length (rest_of_line), null (), 0, result_line_ptr, 1690 result_line_lth); 1691 call ioa_ ("^a", result_line); 1692 free result_line in (system_area); /* guarenteed to have been allocated */ 1693 end; 1694 1695 else if abbrev_state.remember_lines then 1696 if abbrev_state.remembered_line_lth > 0 then 1697 call ioa_$nnl ("^a^[^/^]", remembered_line, 1698 (substr (remembered_line, abbrev_state.remembered_line_lth, 1) ^= NL)); 1699 else call com_err_ (0, ABBREV, "Nothing has been remembered yet."); 1700 1701 else call com_err_ (0, ABBREV, "Remember mode is not enabled."); 1702 1703 return; 1704 1705 end do_show_request; 1706 1707 /* List one or more abbreviation definitions (internal to process_request_line begin block): options are to list all 1708* abbrevs, specific abbrevs, or all abbrevs which start with a given character sequence */ 1709 1710 do_list_request: 1711 procedure (); 1712 1713 dcl 1 list aligned based (list_segment_ptr), 1714 2 n_abbrevs fixed binary, 1715 2 pad bit (36), 1716 2 abbrevs (0 refer (list.n_abbrevs)) like lae; 1717 dcl list_segment_ptr pointer; 1718 1719 dcl 1 lae aligned based, 1720 2 name character (8), 1721 2 ptr pointer; 1722 1723 dcl 1 list_sort_list aligned based (list_sort_list_ptr), 1724 2 n fixed binary, 1725 2 ptrs (0 refer (list.n_abbrevs)) pointer unaligned; 1726 dcl list_sort_list_ptr pointer; 1727 1728 dcl offset fixed binary (18); 1729 dcl (hash_slot, previous_n_abbrevs, token_lth, idx) fixed binary; 1730 dcl exact_match bit (1) aligned; 1731 dcl (la, ls, lx, bol, nbol) bit (1); 1732 dcl emessage char (64); 1733 1734 1735 call skip_whitespace (); /* ".la" requires some arguments */ 1736 if used = length (request_line) & request_name ^= "l" & request_name ^= "lb" & request_name ^= "l^b" then do; 1737 call com_err_ (0, ABBREV, " Usage: ^a^a STRs", abbrev_state.escape_character, request_name); 1738 go to RETURN_FROM_PROCESS_REQUEST_LINE; 1739 end; 1740 1741 call get_temp_segment_ (ABBREV, list_segment_ptr, code); 1742 if code ^= 0 then do; 1743 call com_err_ (code, ABBREV, "Getting sorting space for listing abbreviations."); 1744 go to RETURN_FROM_PROCESS_REQUEST_LINE; 1745 end; 1746 1747 on condition (cleanup) 1748 begin; 1749 if list_segment_ptr ^= null () then call release_temp_segment_ (ABBREV, list_segment_ptr, (0)); 1750 end; 1751 1752 exact_match = request_name = "l" | request_name = "lb" | request_name = "l^b"; 1753 la = substr (request_name, 1, 2) = "la"; 1754 ls = substr (request_name, 1, 2) = "ls"; 1755 lx = substr (request_name, 1, 2) = "lx"; 1756 bol = index (request_name, "b") ^= 0 & index (request_name, "^") = 0; 1757 nbol = index (request_name, "b") ^= 0 & index (request_name, "^") ^= 0; 1758 1759 if exact_match & (used = length (request_line)) then do; 1760 list.n_abbrevs = 0; /* list all abbreviations */ 1761 do hash_slot = lbound (abbrev_profile.hash_table, 1) to hbound (abbrev_profile.hash_table, 1); 1762 do offset = abbrev_profile.hash_table (hash_slot) repeat (ape.next) while (offset ^= 0); 1763 ape_ptr = pointer (ap_ptr, offset); 1764 if ape.name ^= "" then do; 1765 if request_name = "l" then call set_list_entry (); 1766 if request_name = "lb" then do; 1767 if ape.bol then call set_list_entry (); 1768 end; 1769 if request_name = "l^b" then do; 1770 if ^ape.bol then call set_list_entry (); 1771 end; 1772 end; 1773 end; 1774 end; 1775 if list.n_abbrevs = 0 then do; 1776 call com_err_ (0, ABBREV, "No abbreviations defined."); 1777 go to RETURN_FROM_PROCESS_REQUEST_LINE; 1778 end; /* cleanup handler gets the temp segment */ 1779 end; 1780 1781 else if exact_match then do; /* list explicit abbreviations */ 1782 list.n_abbrevs = 0; 1783 do token = get_token () repeat (get_token ()) while (token ^= ""); 1784 if length (rtrim (token)) > length (ape.name) then 1785 call com_err_ (0, ABBREV, "Maximum length of an abbreviation name is ^d characters. ""^a""", 1786 length (ape.name), token); 1787 else do; 1788 ape_ptr = lookup_abbrev (token); 1789 if ape_ptr = null () then /* not found */ 1790 call com_err_ (0, ABBREV, """^a"" is not defined.", token); 1791 else do; 1792 if request_name = "l" then call set_list_entry (); 1793 if request_name = "lb" then do; 1794 if ape.bol then call set_list_entry (); 1795 end; 1796 if request_name = "l^b" then do; 1797 if ^ape.bol then call set_list_entry (); 1798 end; 1799 end; 1800 end; 1801 end; 1802 if list.n_abbrevs = 0 then go to RETURN_FROM_PROCESS_REQUEST_LINE; 1803 end; /* didn't find any at all */ 1804 1805 else do; /* list all abbreviations starting with the given string */ 1806 list.n_abbrevs = 0; 1807 do token = get_token () repeat (get_token ()) while (token ^= ""); 1808 previous_n_abbrevs = list.n_abbrevs; 1809 token_lth = length (rtrim (token)); 1810 if (token_lth > length (ape.name)) & ^lx then 1811 call com_err_ (0, ABBREV, "Maximum length of an abbreviation name is ^d characters. ""^a""", 1812 length (ape.name), token); 1813 else do; 1814 do hash_slot = lbound (abbrev_profile.hash_table, 1) to hbound (abbrev_profile.hash_table, 1); 1815 do offset = abbrev_profile.hash_table (hash_slot) repeat (ape.next) while (offset ^= 0); 1816 ape_ptr = pointer (ap_ptr, offset); 1817 if ape.name ^= "" then do; 1818 if ^bol & ^nbol then call set_list_entry (); 1819 if bol & ape.bol then call set_list_entry (); 1820 else if nbol & ^ape.bol then call set_list_entry (); 1821 end; 1822 end; 1823 end; 1824 if previous_n_abbrevs = list.n_abbrevs then do; 1825 emessage = ""; 1826 if la then emessage = "No abbreviations defined which start with"; 1827 else if lx then emessage = "No abbreviation expansions defined which contain"; 1828 else emessage = "No abbreviations defined which contain"; 1829 call com_err_ (0, ABBREV, "^a ""^a"".", emessage, token); 1830 end; 1831 end; 1832 end; 1833 if list.n_abbrevs = 0 then go to RETURN_FROM_PROCESS_REQUEST_LINE; 1834 end; 1835 1836 list_sort_list_ptr = pointer (list_segment_ptr, currentsize (list)); 1837 list_sort_list.n = list.n_abbrevs; 1838 1839 do idx = 1 to list_sort_list.n; 1840 list_sort_list.ptrs (idx) = addr (list.abbrevs (idx).name); 1841 end; 1842 1843 call sort_items_$char (list_sort_list_ptr, length (ape.name)); 1844 1845 do idx = 1 to list_sort_list.n; 1846 ape_ptr = list_sort_list.ptrs (idx) -> lae.ptr; 1847 call ioa_ ("^[b^;^x^]^x^a^12t^a", ape.bol, ape.name, ape.value); 1848 end; 1849 1850 call release_temp_segment_ (ABBREV, list_segment_ptr, (0)); 1851 1852 return; 1853 1854 set_list_entry: 1855 proc (); 1856 1857 if ^ls & ^lx & ^la then go to set_entry; 1858 if la then do; 1859 if token = substr (ape.name, 1, token_lth) then go to set_entry; 1860 return; 1861 end; 1862 if ls then do; 1863 if index (ape.name, substr (token, 1, token_lth)) ^= 0 then go to set_entry; 1864 return; 1865 end; 1866 if lx then do; 1867 if index (ape.value, substr (token, 1, token_lth)) ^= 0 then go to set_entry; 1868 return; 1869 end; 1870 set_entry: 1871 list.n_abbrevs, idx = list.n_abbrevs + 1; 1872 list.abbrevs (idx).name = ape.name; 1873 list.abbrevs (idx).ptr = ape_ptr; 1874 1875 return; 1876 1877 end set_list_entry; 1878 1879 end do_list_request; 1880 1881 /* Defines a new abbreviation (internal to process_request_line begin block): if the abbreviation is already defined and 1882* the user did not explicitly request to overwrite it, ask the user if they wish to redefine the abbreviation */ 1883 1884 do_add_request: 1885 procedure (); 1886 1887 dcl last_ape_ptr pointer; 1888 dcl abbrev_name character (32); 1889 dcl (old_size, hash_slot) fixed binary (18); 1890 dcl (force, bol) bit (1) aligned; 1891 dcl add_it bit (1); 1892 1893 if ^write_access () then do; 1894 call com_err_ (error_table_$moderr, ABBREV, "Can not add abbreviations to profile ^a", profile_pathname ()) 1895 ; 1896 go to RETURN_FROM_PROCESS_REQUEST_LINE; 1897 end; 1898 1899 token = get_token (); /* pick up name of the abbreviation */ 1900 1901 if token = "" then do; /* no abbreviation */ 1902 PRINT_ADD_REQUEST_USAGE: 1903 call com_err_ (0, ABBREV, " Usage: ^a^a name expansion", abbrev_state.escape_character, request_name); 1904 go to RETURN_FROM_PROCESS_REQUEST_LINE; 1905 end; 1906 1907 abbrev_name = token; /* save it */ 1908 if ^validate_abbrev_name (abbrev_name) then go to RETURN_FROM_PROCESS_REQUEST_LINE; 1909 1910 call skip_whitespace (); /* find the definition */ 1911 if used = length (request_line) then go to PRINT_ADD_REQUEST_USAGE; 1912 1913 force = (request_name = "af") | (request_name = "abf"); 1914 bol = (request_name = "ab") | (request_name = "abf"); 1915 1916 begin; 1917 1918 dcl definition character (length (request_line) - used) unaligned defined (input_line) position (start + used); 1919 1920 ape_ptr = lookup_abbrev (abbrev_name); /* see if it's already defined */ 1921 1922 if ape_ptr ^= null () then /* already defined ... */ 1923 if force then do; /* ... and the user wants it redefined */ 1924 OVERWRITE_PREVIOUS_DEFINITION: 1925 if ape.value_lth >= length (definition) then do; 1926 old_size = currentsize (ape); /* ... enough room in old entry for new definition */ 1927 ape.bol = bol; /* ... redefinition could change this value */ 1928 ape.value_lth = length (definition); 1929 ape.value = definition; 1930 abbrev_profile.garbage = abbrev_profile.garbage + old_size - currentsize (ape); 1931 end; 1932 else do; /* ... not enough room: delete it and add to the end */ 1933 ape.name = ""; 1934 abbrev_profile.garbage = abbrev_profile.garbage + currentsize (ape); 1935 go to CREATE_NEW_DEFINITION; 1936 end; 1937 end; 1938 1939 else do; /* ... user didn't know it: ask them about it */ 1940 call command_query_$yes_no (add_it, 0, ABBREV, "", 1941 "Abbreviation is already defined as:^/^3x^[b^;^x^]^x^a^15t^a^/Do you wish to redefine it?", 1942 ape.bol, ape.name, ape.value); 1943 if add_it then go to OVERWRITE_PREVIOUS_DEFINITION; 1944 end; /* if answer is no we fall through and do nothing */ 1945 1946 else do; /* brand new abbreviation ... */ 1947 CREATE_NEW_DEFINITION: 1948 ape_ptr = pointer (ap_ptr, abbrev_profile.next_free); 1949 substr (ape.name, 1, length (ape.name)) = substr (abbrev_name, 1, length (ape.name)); 1950 ape.next = 0; /* last abbreviation in this bucket */ 1951 string (ape.flags) = ""b; 1952 ape.bol = bol; 1953 ape.value_lth = length (definition); 1954 ape.value = definition; 1955 abbrev_profile.next_free = abbrev_profile.next_free + currentsize (ape); 1956 hash_slot = rank (substr (abbrev_name, 1, 1)); 1957 if abbrev_profile.hash_table (hash_slot) = 0 then 1958 abbrev_profile.hash_table (hash_slot) = fixed (rel (ape_ptr), 18, 0); 1959 else do; /* add to end of the chain */ 1960 do last_ape_ptr = pointer (ap_ptr, abbrev_profile.hash_table (hash_slot)) 1961 repeat (pointer (ap_ptr, last_ape_ptr -> ape.next)) while (last_ape_ptr -> ape.next ^= 0); 1962 end; 1963 last_ape_ptr -> ape.next = fixed (rel (ape_ptr), 18, 0); 1964 end; 1965 end; 1966 end; 1967 1968 call compact_profile_if_needed ("1"b); 1969 1970 return; 1971 1972 end do_add_request; 1973 1974 /* Deletes one or more abbreviation definitions (internal to process_request_line begin block) */ 1975 1976 do_delete_request: 1977 procedure (); 1978 1979 if ^write_access () then do; 1980 call com_err_ (error_table_$moderr, ABBREV, "Can not delete abbreviations from profile ^a", 1981 profile_pathname ()); 1982 go to RETURN_FROM_PROCESS_REQUEST_LINE; 1983 end; 1984 1985 call skip_whitespace (); /* make sure there are some abbreviations to delete */ 1986 if used = length (request_line) then do; 1987 call com_err_ (0, ABBREV, " Usage: ^ad names", abbrev_state.escape_character); 1988 go to RETURN_FROM_PROCESS_REQUEST_LINE; 1989 end; 1990 1991 do token = get_token () repeat (get_token ()) while (token ^= ""); 1992 if length (rtrim (token)) > length (ape.name) then 1993 call com_err_ (0, ABBREV, "Maximum length of an abbreviation name is ^d characters. ""^a""", 1994 length (ape.name), token); 1995 else do; /* abbreviation name is the right length at least */ 1996 ape_ptr = lookup_abbrev (token); 1997 if ape_ptr = null () then 1998 call com_err_ (0, ABBREV, """^a"" is not defined.", token); 1999 else do; /* found it... */ 2000 ape.name = ""; /* ... mark it as deleted */ 2001 abbrev_profile.garbage = abbrev_profile.garbage + currentsize (ape); 2002 end; 2003 end; 2004 end; 2005 2006 call compact_profile_if_needed ("0"b); 2007 2008 return; 2009 2010 end do_delete_request; 2011 2012 /* Renames one or more abbreviations */ 2013 2014 do_rename_request: 2015 procedure (); 2016 2017 dcl (old_abbrev_name, new_abbrev_name) character (32); 2018 dcl (old_ape_ptr, new_ape_ptr, the_ape_ptr, prior_ape_ptr) pointer; 2019 dcl rename_it bit (1); 2020 dcl (old_hash_slot, new_hash_slot) fixed binary; 2021 2022 if ^write_access () then do; 2023 call com_err_ (error_table_$moderr, ABBREV, "Can not rename abbreviations in profile ^a.", 2024 profile_pathname ()); 2025 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2026 end; 2027 2028 old_abbrev_name = get_token (); 2029 2030 if old_abbrev_name = "" then do; /* nothing given at all ... */ 2031 call com_err_ (0, ABBREV, "Usage: ^arename old_name1 new_name1 {... old_nameN new_nameN}", 2032 abbrev_state.escape_character); 2033 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2034 end; 2035 2036 do while (old_abbrev_name ^= ""); /* as long as there's at least one name */ 2037 2038 new_abbrev_name = get_token (); 2039 if new_abbrev_name = "" then do; /* odd number of arguments */ 2040 call com_err_ (error_table_$noarg, ABBREV, "New name for abbreviation ""^a"".", old_abbrev_name); 2041 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2042 end; 2043 2044 old_ape_ptr = lookup_abbrev (old_abbrev_name); 2045 2046 if old_ape_ptr ^= null () then /* really is something to rename */ 2047 if validate_abbrev_name (new_abbrev_name) then do; 2048 new_ape_ptr = lookup_abbrev (new_abbrev_name); 2049 2050 if new_ape_ptr = null () then do; /* new name not yet used ... */ 2051 RENAME_THE_OLD_ABBREVIATION: /* ... OK to rename */ 2052 old_hash_slot = rank (substr (old_abbrev_name, 1, 1)); 2053 new_hash_slot = rank (substr (new_abbrev_name, 1, 1)); 2054 if old_hash_slot = new_hash_slot then 2055 /*** same hash for both names: just rename it */ 2056 substr (old_ape_ptr -> ape.name, 1, length (old_ape_ptr -> ape.name)) = 2057 substr (new_abbrev_name, 1, length (old_ape_ptr -> ape.name)); 2058 else do; 2059 /*** different hash: splice the abbrev out of the old chain ... */ 2060 prior_ape_ptr = null (); 2061 do the_ape_ptr = pointer (ap_ptr, abbrev_profile.hash_table (old_hash_slot)) 2062 repeat (pointer (ap_ptr, the_ape_ptr -> ape.next)) 2063 while ((the_ape_ptr ^= old_ape_ptr) & (the_ape_ptr -> ape.next ^= 0)); 2064 prior_ape_ptr = the_ape_ptr; 2065 end; 2066 if the_ape_ptr ^= old_ape_ptr then 2067 call abort_abbrev_processor (error_table_$bad_segment, "^a", profile_pathname ()); 2068 if prior_ape_ptr = null () then 2069 abbrev_profile.hash_table (old_hash_slot) = old_ape_ptr -> ape.next; 2070 else prior_ape_ptr -> ape.next = old_ape_ptr -> ape.next; 2071 /*** ... and add it to the end of its new chain */ 2072 substr (old_ape_ptr -> ape.name, 1, length (old_ape_ptr -> ape.name)) = 2073 substr (new_abbrev_name, 1, length (old_ape_ptr -> ape.name)); 2074 old_ape_ptr -> ape.next = 0; 2075 if abbrev_profile.hash_table (new_hash_slot) = 0 then 2076 abbrev_profile.hash_table (new_hash_slot) = fixed (rel (old_ape_ptr), 18, 0); 2077 else do; 2078 do prior_ape_ptr = pointer (ap_ptr, abbrev_profile.hash_table (new_hash_slot)) 2079 repeat (pointer (ap_ptr, prior_ape_ptr -> ape.next)) 2080 while (prior_ape_ptr -> ape.next ^= 0); 2081 end; 2082 prior_ape_ptr -> ape.next = fixed (rel (old_ape_ptr), 18, 0); 2083 end; 2084 end; 2085 end; 2086 2087 else do; /* new name already used: get permission to redefine */ 2088 call command_query_$yes_no (rename_it, 0, ABBREV, "", 2089 "Abbreviation is already defined as:^/^3x^[b^;^x^]^x^a^15t^a^/Do you wish to redefine it by renaming:^/^3x^[b^;^x^]^x^a^15t^a^/to ""^a""?", 2090 new_ape_ptr -> ape.bol, new_ape_ptr -> ape.name, new_ape_ptr -> ape.value, 2091 old_ape_ptr -> ape.bol, old_ape_ptr -> ape.name, old_ape_ptr -> ape.value, 2092 new_ape_ptr -> ape.name); 2093 if rename_it then do; /* ... delete the old definition */ 2094 new_ape_ptr -> ape.name = ""; 2095 abbrev_profile.garbage = abbrev_profile.garbage + currentsize (new_ape_ptr -> ape); 2096 go to RENAME_THE_OLD_ABBREVIATION; 2097 end; 2098 end; /* ... a no falls through to do next rename (if any) */ 2099 end; 2100 2101 else ; /* validate_abbrev_name has already complained */ 2102 2103 else call com_err_ (0, ABBREV, """^a"" is not defined.", old_abbrev_name); 2104 2105 old_abbrev_name = get_token (); 2106 end; 2107 2108 call compact_profile_if_needed ("0"b); 2109 2110 return; 2111 2112 end do_rename_request; 2113 2114 /* Edits the definition of one or more abbreviations (internal to process_request_line begin block) via qedx_ */ 2115 2116 do_edit_request: 2117 procedure (); 2118 2119 dcl 1 local_qi aligned, /* data to invoke the editor */ 2120 2 header like qedx_info.header, 2121 2 buffer like qedx_info.buffers; 2122 dcl initial_abbrev_name character (32); 2123 2124 2125 if ^write_access () then do; 2126 call com_err_ (error_table_$moderr, ABBREV, "Can not edit abbreviations in profile ^a.", 2127 profile_pathname ()); 2128 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2129 end; 2130 2131 2132 /* Parse arguments: exactly one allowed -- the name of an existing abbreviation */ 2133 2134 initial_abbrev_name = get_token (); /* get name of abbreviation to start editing */ 2135 2136 if initial_abbrev_name = "" then do; 2137 PRINT_EDIT_REQUEST_USAGE: 2138 call com_err_ (0, ABBREV, "Usage: ^aedit name", abbrev_state.escape_character); 2139 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2140 end; 2141 2142 token = get_token (); /* shouldn't be anything else... */ 2143 if token ^= "" then go to PRINT_EDIT_REQUEST_USAGE; 2144 2145 if ^validate_abbrev_name (initial_abbrev_name) then go to RETURN_FROM_PROCESS_REQUEST_LINE; 2146 /* invalid name */ 2147 2148 ape_ptr = lookup_abbrev (initial_abbrev_name); 2149 if ape_ptr = null () then do; /* the abbreviation must exist */ 2150 call com_err_ (0, ABBREV, """^a"" is not defined.", initial_abbrev_name); 2151 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2152 end; 2153 2154 2155 /* Print the abbreviation's definition and the editor prompt */ 2156 2157 call ioa_ ("^[b^;^x^]^x^a^12t^a", ape.bol, ape.name, ape.value); 2158 call ioa_ ("Edit:"); 2159 2160 2161 /* Setup and invoke the editor */ 2162 2163 local_qi.version = QEDX_INFO_VERSION_1; 2164 local_qi.editor_name = ABBREV; 2165 local_qi.buffer_io = abbrev_io; /* we will read/write definitions directly */ 2166 2167 string (local_qi.header.flags) = ""b; 2168 local_qi.query_if_modified, local_qi.caller_does_io = "1"b; 2169 2170 local_qi.n_buffers = 1; 2171 local_qi.buffer_name = "0"; /* buffer "0": the default buffer */ 2172 local_qi.buffer_pathname = initial_abbrev_name; /* ... fill it with definition user wants edited */ 2173 string (local_qi.buffer.flags) = ""b; /* ... let the caller switch abbreviations */ 2174 2175 call qedx_ (addr (local_qi), (0)); /* do it */ 2176 2177 return; /* needn't check the code */ 2178 2179 /* Read/write an abbreviation's definition to the editor's buffer (internal to do_edit_request) */ 2180 2181 abbrev_io: 2182 procedure (p_qbii_ptr, p_ok); 2183 2184 dcl p_qbii_ptr pointer parameter; 2185 dcl p_ok bit (1) aligned parameter; 2186 2187 dcl 1 qbii aligned based (qbii_ptr) like qedx_buffer_io_info; 2188 dcl qbii_value character (qbii.buffer_lth) based (qbii.buffer_ptr); 2189 dcl last_ape_ptr pointer; 2190 dcl (old_size, hash_slot) fixed binary (18); 2191 dcl bol bit (1) aligned; 2192 dcl redefine_it bit (1); 2193 2194 2195 qbii_ptr = p_qbii_ptr; 2196 2197 if qbii.version ^= QEDX_BUFFER_IO_INFO_VERSION_1 then do; 2198 call com_err_ (error_table_$unimplemented_version, ABBREV, "Buffer I/O from qedx_."); 2199 p_ok = "0"b; 2200 end; 2201 2202 2203 else if qbii.direction = QEDX_READ_FILE then do; 2204 2205 /* Fetch abbreviation definition from profile */ 2206 2207 if validate_abbrev_name (rtrim (qbii.pathname)) then do; 2208 ape_ptr = lookup_abbrev (rtrim (qbii.pathname)); 2209 2210 if ape_ptr ^= null () then /* ... it exists */ 2211 if (ape.value_lth + 1) <= qbii.buffer_max_lth then do; 2212 qbii.buffer_lth = ape.value_lth; 2213 qbii_value = ape.value; 2214 if substr (qbii_value, qbii.buffer_lth, 1) ^= NL then do; 2215 qbii.buffer_lth = qbii.buffer_lth + 1; 2216 substr (qbii_value, qbii.buffer_lth, 1) = NL; 2217 end; 2218 p_ok = "1"b; /* ... success */ 2219 end; 2220 2221 else do; /* ... won't fit */ 2222 call com_err_ (0, qbii.editor_name, 2223 "Definition of ""^a"" is too large for the editor.", qbii.pathname); 2224 p_ok = "0"b; 2225 end; 2226 2227 else do; /* ... no such abbreviation */ 2228 call com_err_ (0, qbii.editor_name, """^a"" is not defined.", qbii.pathname); 2229 p_ok = "0"b; 2230 end; 2231 end; 2232 2233 else p_ok = "0"b; /* ... illegal abbreviation name */ 2234 end; 2235 2236 2237 else if qbii.direction = QEDX_WRITE_FILE then do; 2238 2239 /* Write the editor's buffer as the definition of an abbreviation: if the abbreviation doesn't already exist, it will be 2240* created as an expand-anywhere abbrevation */ 2241 2242 if validate_abbrev_name (rtrim (qbii.pathname)) then do; 2243 if substr (qbii_value, qbii.buffer_lth, 1) = NL then qbii.buffer_lth = qbii.buffer_lth - 1; 2244 /* strip trailing newline added for convenience */ 2245 2246 ape_ptr = lookup_abbrev (rtrim (qbii.pathname)); 2247 2248 if ape_ptr ^= null () then do; /* already defined ... */ 2249 bol = ape.bol; /* ... in case we have to move it elsewhere */ 2250 2251 if ^qbii.default_pathname then do; 2252 /* ... not the abbrev being edited by default: query ... */ 2253 call command_query_$yes_no (redefine_it, 0, ABBREV, "", 2254 "Abbreviation is already defined as:^/^3x^[b^;^x^]^x^a^15t^a^/Do you wish to redefine it?", 2255 ape.bol, ape.name, ape.value); 2256 if ^redefine_it then do; /* ... ... user didn't realize and didn't mean it */ 2257 p_ok = "0"b; 2258 return; 2259 end; 2260 end; /* ... ...user says it's OK anyway */ 2261 2262 if ape.value_lth >= qbii.buffer_lth then do; 2263 old_size = currentsize (ape); 2264 ape.value_lth = qbii.buffer_lth; 2265 ape.value = qbii_value; 2266 abbrev_profile.garbage = abbrev_profile.garbage + old_size - currentsize (ape); 2267 end; 2268 else do; /* ... not enough room: delete it and add to the end */ 2269 ape.name = ""; 2270 abbrev_profile.garbage = abbrev_profile.garbage + currentsize (ape); 2271 go to CREATE_NEW_DEFINITION; 2272 end; 2273 end; 2274 2275 else do; /* ... brand new abbreviation ... */ 2276 bol = "0"b; /* ... defaults to anywhere on line expansion */ 2277 CREATE_NEW_DEFINITION: 2278 ape_ptr = pointer (ap_ptr, abbrev_profile.next_free); 2279 substr (ape.name, 1, length (ape.name)) = substr (qbii.pathname, 1, length (ape.name)); 2280 ape.next = 0; /* ... last abbreviation in this bucket */ 2281 string (ape.flags) = ""b; 2282 ape.bol = bol; 2283 ape.value_lth = qbii.buffer_lth; 2284 ape.value = qbii_value; 2285 abbrev_profile.next_free = abbrev_profile.next_free + currentsize (ape); 2286 hash_slot = rank (substr (qbii.pathname, 1, 1)); 2287 if abbrev_profile.hash_table (hash_slot) = 0 then 2288 abbrev_profile.hash_table (hash_slot) = fixed (rel (ape_ptr), 18, 0); 2289 else do; /* ... add to end of the chain */ 2290 do last_ape_ptr = pointer (ap_ptr, abbrev_profile.hash_table (hash_slot)) 2291 repeat (pointer (ap_ptr, last_ape_ptr -> ape.next)) 2292 while (last_ape_ptr -> ape.next ^= 0); 2293 end; 2294 last_ape_ptr -> ape.next = fixed (rel (ape_ptr), 18, 0); 2295 end; 2296 end; 2297 2298 call compact_profile_if_needed ("1"b); 2299 2300 p_ok = "1"b; /* success */ 2301 end; 2302 2303 else p_ok = "0"b; /* ... illegal abbreviation name */ 2304 end; 2305 2306 2307 else do; /* will never get here, but ... */ 2308 call com_err_ (error_table_$bad_subr_arg, qbii.editor_name, "Buffer operation type ^d.", 2309 qbii.direction); 2310 p_ok = "0"b; 2311 end; 2312 2313 return; 2314 2315 end abbrev_io; 2316 2317 end do_edit_request; 2318 2319 /* Turns the specified switch of one or more abbreviations on or off (internal to process_request_line begin block) */ 2320 2321 do_switch_request: 2322 procedure (p_switch_value); 2323 2324 dcl p_switch_value bit (1) aligned parameter; /* new value for the switch */ 2325 2326 dcl (request_name, the_switch, abbrev_name) character (32); 2327 dcl switch_idx fixed binary; 2328 dcl (have_switch, first_abbrev) bit (1) aligned; 2329 2330 /* format: off */ 2331 dcl SWITCH_NAMES (1, 2) character (32) static options (constant) initial ( 2332 "beginning_of_line", "bol"); 2333 /* format: on */ 2334 2335 if ^write_access () then do; 2336 call com_err_ (error_table_$moderr, ABBREV, "Can not change abbreviation switches in profile ^a.", 2337 profile_pathname ()); 2338 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2339 end; 2340 2341 if p_switch_value then 2342 request_name = "switch_on"; 2343 else request_name = "switch_off"; 2344 2345 2346 /* Get the name of the switch */ 2347 2348 the_switch = get_token (); 2349 2350 if the_switch = "" then do; 2351 PRINT_SWITCH_REQUEST_USAGE: 2352 call com_err_ (0, ABBREV, "Usage: ^a^a switch_name abbrev_names", abbrev_state.escape_character, 2353 request_name); 2354 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2355 end; 2356 2357 have_switch = "0"b; /* let's lookup the name */ 2358 switch_idx = 0; 2359 2360 do while (^have_switch & (switch_idx < hbound (SWITCH_NAMES, 1))); 2361 switch_idx = switch_idx + 1; /* ... PL/I do loop would do an extra increment */ 2362 if (the_switch = SWITCH_NAMES (switch_idx, 1)) | (the_switch = SWITCH_NAMES (switch_idx, 2)) then 2363 have_switch = "1"b; /* ... a good name */ 2364 end; 2365 2366 if ^have_switch then do; /* foo */ 2367 call com_err_ (0, ABBREV, "Unrecognized switch name. ""^a""", the_switch); 2368 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2369 end; 2370 2371 2372 /* Now do it to the switch for the specified abbreviations */ 2373 2374 first_abbrev = "1"b; /* for error message (later) */ 2375 2376 abbrev_name = "foo"; /* PL/I lacks do until */ 2377 2378 do while (abbrev_name ^= ""); /* while there are names left on the request line ... */ 2379 abbrev_name = get_token (); /* next abbreviation please */ 2380 2381 if abbrev_name ^= "" then do; 2382 first_abbrev = "0"b; /* won't need a Usage message anymore */ 2383 2384 if validate_abbrev_name (abbrev_name) then do; 2385 ape_ptr = lookup_abbrev (abbrev_name); 2386 2387 if ape_ptr ^= null () then do; 2388 go to SET_SWITCH (switch_idx); 2389 2390 SET_SWITCH (1): /* beginning of line */ 2391 ape.bol = p_switch_value; 2392 go to PROCEED_WITH_NEXT_ABBREVIATION; 2393 2394 PROCEED_WITH_NEXT_ABBREVIATION: 2395 end; 2396 2397 else call com_err_ (0, ABBREV, """^a"" is not defined.", abbrev_name); 2398 end; 2399 end; 2400 end; 2401 2402 if first_abbrev then go to PRINT_SWITCH_REQUEST_USAGE; 2403 2404 return; 2405 2406 end do_switch_request; 2407 2408 /* Returns "1"b if the user has effective write access to the profile (internal to process_request_line begin block) */ 2409 2410 write_access: 2411 procedure () returns (bit (1) aligned); 2412 2413 dcl profile_mode fixed binary (5); 2414 2415 call hcs_$fs_get_mode (ap_ptr, profile_mode, code); 2416 if code ^= 0 then do; 2417 call com_err_ (code, ABBREV, "Can not determine access to profile ^a", profile_pathname ()); 2418 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2419 end; 2420 2421 return ((profile_mode = RW_ACCESS_BIN) | (profile_mode = REW_ACCESS_BIN)); 2422 2423 end write_access; 2424 2425 2426 2427 /* Validates that the given abbreviation name is legal */ 2428 2429 validate_abbrev_name: 2430 procedure (p_abbrev_name) returns (bit (1) aligned); 2431 2432 dcl p_abbrev_name character (32) parameter; /* the candidate abbreviation name */ 2433 dcl abbrev_name character (32) varying; 2434 dcl idx fixed binary; 2435 2436 if length (rtrim (p_abbrev_name)) > length (ape.name) then do; 2437 call com_err_ (0, ABBREV, "Maximum length of an abbreviation name is ^d characters. ""^a""", 2438 length (ape.name), p_abbrev_name); 2439 return ("0"b); 2440 end; 2441 2442 abbrev_name = rtrim (p_abbrev_name); /* copy it to strip trailing whitespace */ 2443 2444 do idx = 1 to breaks_list.n_break_sequences; 2445 begin; 2446 dcl break_sequence character (breaks_list.break_sequences (idx).lth) unaligned 2447 defined (breaks_list.break_strings) position (breaks_list.break_sequences (idx).start); 2448 if index (abbrev_name, break_sequence) ^= 0 then do; 2449 call com_err_ (0, ABBREV, "Abbreviation names may not contain break sequences. ^a in ""^a""", 2450 break_sequence, abbrev_name); 2451 return ("0"b); 2452 end; 2453 end; 2454 end; 2455 2456 return ("1"b); /* it's OK */ 2457 2458 end validate_abbrev_name; 2459 2460 /* Skips to next non-white character in the request line (internal to process_request_line begin block) */ 2461 2462 skip_whitespace: 2463 procedure (); 2464 2465 dcl idx fixed binary (21); 2466 2467 idx = verify (substr (request_line, (used + 1)), WHITE_SPACE_AND_NL); 2468 2469 if idx = 0 then /* rest of the line is whitespace */ 2470 used = length (request_line); 2471 else used = used + idx - 1; /* found something */ 2472 2473 return; 2474 2475 end skip_whitespace; 2476 2477 2478 2479 /* Returns the next token in the request line; tokens are delimited by whitespace (internal to process_request_line begin 2480* block) */ 2481 2482 get_token: 2483 procedure () returns (character (32)); 2484 2485 dcl (token_start, token_lth, idx) fixed binary (21); 2486 2487 call skip_whitespace (); /* skip any leading whitespace */ 2488 2489 if used = length (request_line) then /* nothing left ... */ 2490 return (""); 2491 2492 idx = search (substr (request_line, (used + 1)), WHITE_SPACE); 2493 if idx = 0 then /* rest of the line is the token */ 2494 idx = length (request_line) - used + 1; 2495 2496 token_start = used + 1; 2497 token_lth = idx - 1; 2498 2499 used = used + token_lth; /* update amount we've looked at */ 2500 2501 return (substr (request_line, token_start, token_lth)); 2502 2503 end get_token; 2504 2505 /* Sets ap_ptr to locate the proper profile to be used for expansion in this case (internal to process_request_line begin 2506* block): initializes the profile if necessary; two versions of this procedure exist to insure that the one used during 2507* command/request line expansion is quick */ 2508 2509 set_profile_ptr: 2510 procedure (p_dont_create_profile) /* options (quick) */; 2511 2512 dcl p_dont_create_profile bit (1) aligned; 2513 2514 ap_ptr = null (); /* start somewhere */ 2515 2516 if subsystem_entry then /* subsystems use arbitrary profiles */ 2517 if (P_default_profile_ptr = null ()) & (P_profile_ptr = null ()) then 2518 /* ... use same profile as Multics command level */ 2519 if abbrev_state.profile_ptr = null () then 2520 call get_default_profile (p_dont_create_profile); 2521 /* ... need not succeed if called at expanded_line entry */ 2522 else ap_ptr = abbrev_state.profile_ptr; 2523 2524 else do; /* subsystem supplied the profile */ 2525 if P_profile_ptr ^= null () then 2526 ap_ptr = P_profile_ptr; 2527 else ap_ptr = P_default_profile_ptr; 2528 call initialize_profile ("1"b, "0"b); /* ... make sure it's good */ 2529 end; 2530 2531 else do; /* command level invocation */ 2532 if abbrev_state.profile_ptr = null () then 2533 call get_default_profile (p_dont_create_profile); 2534 /* ... need not succeed if called at expanded_line entry */ 2535 else ap_ptr = abbrev_state.profile_ptr; 2536 end; 2537 2538 return; 2539 2540 end set_profile_ptr; 2541 2542 2543 2544 /* Searches the profile for an abbreviation (internal to process_request_line begin block): two versions of this procedure 2545* exist to insure that the one used by the expand_line procedure is quick */ 2546 2547 lookup_abbrev: 2548 procedure (p_name) returns (pointer) /* options (quick) */; 2549 2550 dcl p_name character (32) parameter; 2551 dcl offset fixed binary (18); 2552 2553 do offset = abbrev_profile.hash_table (rank (substr (p_name, 1, 1))) repeat (ape.next) while (offset ^= 0); 2554 ape_ptr = pointer (ap_ptr, offset); 2555 if ape.name = p_name then return (ape_ptr); 2556 end; 2557 2558 return (null ()); /* here iff not found */ 2559 2560 end lookup_abbrev; 2561 2562 /* Validates that the remainder of the request line is blank and prints an error if it isn't (internal to 2563* process_request_line begin block) */ 2564 2565 validate_no_arguments: 2566 procedure (p_request_name); 2567 2568 dcl p_request_name character (*) parameter; 2569 2570 call skip_whitespace (); 2571 2572 if used ^= length (request_line) then do; 2573 call com_err_ (0, ABBREV, "The ""^a^a"" request does not accept arguments.", abbrev_state.escape_character, 2574 p_request_name); 2575 go to RETURN_FROM_PROCESS_REQUEST_LINE; 2576 end; 2577 2578 return; 2579 2580 end validate_no_arguments; 2581 2582 2583 2584 /* Compact the profile if needed (internal to process_request_line begin block) */ 2585 2586 compact_profile_if_needed: 2587 procedure (p_set_bit_count); 2588 2589 dcl p_set_bit_count bit (1) aligned parameter; 2590 2591 if (((4 * abbrev_profile.garbage) > abbrev_profile.next_free) | (abbrev_profile.garbage > 512)) 2592 & (abbrev_profile.garbage > mod (abbrev_profile.next_free, 1024)) then 2593 call compact_profile (); /* compact at 25% or half page wasted but only if the 2594* compaction will make it shorter */ 2595 2596 else if p_set_bit_count then /* caller added something to the end: be sure bit count OK */ 2597 call terminate_file_ (ap_ptr, (36 * abbrev_profile.next_free), TERM_FILE_BC, (0)); 2598 2599 return; 2600 2601 end compact_profile_if_needed; 2602 2603 do_help_request: 2604 proc (); /* The ? (help) request */ 2605 2606 dcl (element, ndx) fixed binary; 2607 2608 call skip_whitespace (); 2609 2610 if used = length (request_line) then do; /* No requests, do all */ 2611 call ioa_ ("Abbrev requests:"); 2612 do element = 1 to hbound (abbrev_rqd, 1); 2613 call display_help_line (abbrev_rqd (element)); 2614 end; 2615 end; 2616 2617 else do token = get_token () repeat (get_token ()) while (token ^= ""); 2618 /* request(s) */ 2619 do element = 1 to hbound (ard, 1); 2620 if ard (element) = rtrim (token) then go to found_request; 2621 end; 2622 call com_err_ (0, ABBREV, """^a"" is not a legal abbrev request.", token); 2623 go to end_request_lookup; 2624 found_request: 2625 element = ardx (element); 2626 do ndx = 0 to 2; 2627 call display_help_line (abbrev_rqd (element + ndx)); 2628 end; 2629 end_request_lookup: 2630 end; 2631 2632 return; 2633 2634 display_help_line: 2635 proc (display_line); 2636 2637 dcl display_line char (*) parameter; 2638 2639 if display_line ^= "" then call ioa_ ("^a", display_line); 2640 2641 return; 2642 2643 end display_help_line; 2644 2645 end do_help_request; 2646 2647 end; 2648 2649 RETURN_FROM_PROCESS_REQUEST_LINE: 2650 return; 2651 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 */ 2652 2653 2 1 /* BEGIN INCLUDE FILE ... qedx_buffer_io_info.incl.pl1 */ 2 2 /* Created: January 1983 by G. Palter */ 2 3 2 4 /* Data structure used by qedx_ to invoke the caller's buffer_io procedure to read/write all or part of an editor buffer 2 5* to the specified "file" */ 2 6 2 7 dcl 1 qedx_buffer_io_info aligned based (qbii_ptr), 2 8 2 version character (8), 2 9 2 editor_name character (72), /* for error messages */ 2 10 2 pathname character (256) unaligned, /* pathname of "file" to be read/written */ 2 11 2 buffer_ptr pointer, /* -> the buffer to write/read */ 2 12 2 buffer_max_lth fixed binary (21), /* read: maximum size of above buffer; write: ignored */ 2 13 2 buffer_lth fixed binary (21), /* read: amount of data read into buffer from the "file"; 2 14* write: amount of data to write into the "file" */ 2 15 2 direction fixed binary, /* whether to read/write */ 2 16 2 flags, 2 17 3 default_pathname bit (1) unaligned, /* ON => pathname above is the default for this buffer */ 2 18 3 pad bit (35) unaligned; 2 19 2 20 dcl qbii_ptr pointer; 2 21 2 22 dcl QEDX_BUFFER_IO_INFO_VERSION_1 character (8) static options (constant) initial ("qbii_001"); 2 23 2 24 dcl (QEDX_READ_FILE initial (1), /* read data from the "file" */ 2 25 QEDX_WRITE_FILE initial (2)) /* write data into the "file" */ 2 26 fixed binary static options (constant); 2 27 2 28 /* END INCLUDE FILE ... qedx_buffer_io_info.incl.pl1 */ 2654 2655 2656 end process_request_line; 2657 2658 /* Garbage collect a profile */ 2659 2660 compact_profile: 2661 procedure () options (non_quick); 2662 2663 dcl 1 new_profile aligned based (new_profile_ptr) like abbrev_profile; 2664 dcl new_profile_ptr pointer; 2665 2666 dcl new_profile_words (new_profile.next_free) bit (36) aligned based (new_profile_ptr); 2667 2668 dcl 1 new_ape aligned based (new_ape_ptr), 2669 2 header like ape.header, 2670 2 value character (0 refer (new_ape.value_lth)); 2671 dcl new_ape_ptr pointer; 2672 2673 dcl 1 old_profile aligned based (old_profile_ptr) like abbrev_profile; 2674 dcl 1 old_old_profile aligned based (old_profile_ptr), /* prior version */ 2675 2 next_free fixed binary (18), 2676 2 pad (3) bit (36), 2677 2 hash_table (4:127) fixed binary (18); 2678 dcl old_profile_ptr pointer; 2679 2680 dcl 1 old_ape aligned based (old_ape_ptr), 2681 2 header like ape.header, 2682 2 value character (0 refer (old_ape.value_lth)); 2683 dcl old_ape_ptr pointer; 2684 2685 dcl old_style_profile bit (1) aligned; 2686 dcl old_profile_mode fixed binary (5); 2687 dcl (hash_slot, lower_hash_bound) fixed binary; 2688 dcl (first_offset, old_offset) fixed binary (18); 2689 dcl last_new_ape_ptr pointer; 2690 2691 2692 old_profile_ptr = ap_ptr; 2693 old_style_profile = (old_profile.version > 127); 2694 2695 call hcs_$fs_get_mode (old_profile_ptr, old_profile_mode, code); 2696 if code ^= 0 then 2697 call abort_abbrev_processor (code, "Can not determine access to profile ^a", profile_pathname ()); 2698 2699 if (old_profile_mode ^= RW_ACCESS_BIN) & (old_profile_mode ^= REW_ACCESS_BIN) then 2700 if old_style_profile then /* can't upgrade an old profile: can't use it */ 2701 call abort_abbrev_processor (error_table_$moderr, "Can not upgrade profile ^a to current version.", 2702 profile_pathname ()); 2703 else return; /* can't garbage collect it: doesn't matter */ 2704 2705 call get_temp_segment_ (ABBREV, new_profile_ptr, code); 2706 if code ^= 0 then return; 2707 2708 on condition (cleanup) 2709 begin; 2710 if new_profile_ptr ^= null () then call release_temp_segment_ (ABBREV, new_profile_ptr, code); 2711 end; 2712 2713 new_profile.version = ABBREV_PROFILE_VERSION_1; 2714 new_profile.next_free = fixed (rel (addr (new_profile.data_space)), 18, 0); 2715 2716 if old_style_profile then /* get right lower bound; upper bounds are the same */ 2717 lower_hash_bound = lbound (old_old_profile.hash_table, 1); 2718 else lower_hash_bound = lbound (old_profile.hash_table, 1); 2719 2720 do hash_slot = lower_hash_bound to hbound (new_profile.hash_table, 1); 2721 last_new_ape_ptr = null (); 2722 if old_style_profile then /* get starting offset */ 2723 first_offset = old_old_profile.hash_table (hash_slot); 2724 else first_offset = old_profile.hash_table (hash_slot); 2725 do old_offset = first_offset repeat (old_ape.next) while (old_offset ^= 0); 2726 old_ape_ptr = pointer (old_profile_ptr, old_offset); 2727 if old_ape.name ^= "" then do; /* copy only if not deleted */ 2728 new_ape_ptr = pointer (new_profile_ptr, new_profile.next_free); 2729 new_ape.header = old_ape.header; /* makes refer extents work */ 2730 new_ape.next = 0; /* but no forward thread yet */ 2731 new_ape.value = old_ape.value; 2732 new_profile.next_free = new_profile.next_free + currentsize (new_ape); 2733 if last_new_ape_ptr = null () then /* first entry in this hash slot */ 2734 new_profile.hash_table (hash_slot) = fixed (rel (new_ape_ptr), 18, 0); 2735 else last_new_ape_ptr -> new_ape.next = fixed (rel (new_ape_ptr), 18, 0); 2736 last_new_ape_ptr = new_ape_ptr; 2737 end; 2738 end; 2739 end; 2740 2741 old_profile_ptr -> new_profile_words = new_profile_ptr -> new_profile_words; 2742 /* put the new one in place */ 2743 call terminate_file_ (old_profile_ptr, (36 * new_profile.next_free), TERM_FILE_TRUNC_BC, (0)); 2744 2745 call release_temp_segment_ (ABBREV, new_profile_ptr, (0)); 2746 2747 return; 2748 2749 end compact_profile; 2750 3 1 /* BEGIN INCLUDE FILE ... _abbrev_profile.incl.pl1 */ 3 2 /* Created: 18 February 1982 by G. Palter */ 3 3 3 4 3 5 /* Format of the profile maintained by the abbrev command */ 3 6 3 7 dcl 1 abbrev_profile aligned based (ap_ptr), 3 8 2 version fixed binary, 3 9 2 next_free fixed binary (18), /* offset of next free word (RTBOS) */ 3 10 2 garbage fixed binary (18), /* # of words of unreferenced space: controls compaction */ 3 11 2 pad1 bit (36), 3 12 2 old_cis_time fixed binary (71), /* check_info_segs kept its time here: now uses value_ */ 3 13 2 pad2 (26) bit (36), 3 14 2 hash_table (0 : 127) fixed binary (18), /* offset first abbrev starting with given letter (RTBOS) */ 3 15 2 data_space (0 : 0) bit (36) aligned; /* contains abbreviations */ 3 16 3 17 dcl ap_ptr pointer; 3 18 3 19 dcl ABBREV_PROFILE_VERSION_1 fixed binary static options (constant) initial (1); 3 20 3 21 3 22 /* A single abbreviation */ 3 23 3 24 dcl 1 ape aligned based (ape_ptr), 3 25 2 header, 3 26 3 flags unaligned, 3 27 4 bol bit (1) unaligned, /* ON => expand only at beginning of line */ 3 28 4 pad bit (17) unaligned, 3 29 3 next fixed binary (18) unsigned unaligned, /* to next abbreviation in this chain (RTBOS) */ 3 30 3 value_lth fixed binary (21), /* # of characters int the expansion */ 3 31 3 name character (8), /* name of the abbreviation */ 3 32 2 value character (0 refer (ape.value_lth)); 3 33 3 34 dcl ape_ptr pointer; 3 35 3 36 /* END INCLUDE FILE ... _abbrev_profile.incl.pl1 */ 2751 2752 4 1 /* BEGIN INCLUDE FILE ... access_mode_values.incl.pl1 4 2* 4 3* Values for the "access mode" argument so often used in hardcore 4 4* James R. Davis 26 Jan 81 MCR 4844 4 5* Added constants for SM access 4/28/82 Jay Pattin 4 6* Added text strings 03/19/85 Chris Jones 4 7**/ 4 8 4 9 4 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 4 11 dcl ( 4 12 N_ACCESS init ("000"b), 4 13 R_ACCESS init ("100"b), 4 14 E_ACCESS init ("010"b), 4 15 W_ACCESS init ("001"b), 4 16 RE_ACCESS init ("110"b), 4 17 REW_ACCESS init ("111"b), 4 18 RW_ACCESS init ("101"b), 4 19 S_ACCESS init ("100"b), 4 20 M_ACCESS init ("010"b), 4 21 A_ACCESS init ("001"b), 4 22 SA_ACCESS init ("101"b), 4 23 SM_ACCESS init ("110"b), 4 24 SMA_ACCESS init ("111"b) 4 25 ) bit (3) internal static options (constant); 4 26 4 27 /* The following arrays are meant to be accessed by doing either 1) bin (bit_value) or 4 28* 2) divide (bin_value, 2) to come up with an index into the array. */ 4 29 4 30 dcl SEG_ACCESS_MODE_NAMES (0:7) init ("null", "W", "E", "EW", "R", "RW", "RE", "REW") char (4) internal 4 31 static options (constant); 4 32 4 33 dcl DIR_ACCESS_MODE_NAMES (0:7) init ("null", "A", "M", "MA", "S", "SA", "SM", "SMA") char (4) internal 4 34 static options (constant); 4 35 4 36 dcl ( 4 37 N_ACCESS_BIN init (00000b), 4 38 R_ACCESS_BIN init (01000b), 4 39 E_ACCESS_BIN init (00100b), 4 40 W_ACCESS_BIN init (00010b), 4 41 RW_ACCESS_BIN init (01010b), 4 42 RE_ACCESS_BIN init (01100b), 4 43 REW_ACCESS_BIN init (01110b), 4 44 S_ACCESS_BIN init (01000b), 4 45 M_ACCESS_BIN init (00010b), 4 46 A_ACCESS_BIN init (00001b), 4 47 SA_ACCESS_BIN init (01001b), 4 48 SM_ACCESS_BIN init (01010b), 4 49 SMA_ACCESS_BIN init (01011b) 4 50 ) fixed bin (5) internal static options (constant); 4 51 4 52 /* END INCLUDE FILE ... access_mode_values.incl.pl1 */ 2753 2754 5 1 /* BEGIN INCLUDE FILE ... terminate_file.incl.pl1 */ 5 2 /* format: style2,^inddcls,idind32 */ 5 3 5 4 declare 1 terminate_file_switches based, 5 5 2 truncate bit (1) unaligned, 5 6 2 set_bc bit (1) unaligned, 5 7 2 terminate bit (1) unaligned, 5 8 2 force_write bit (1) unaligned, 5 9 2 delete bit (1) unaligned; 5 10 5 11 declare TERM_FILE_TRUNC bit (1) internal static options (constant) initial ("1"b); 5 12 declare TERM_FILE_BC bit (2) internal static options (constant) initial ("01"b); 5 13 declare TERM_FILE_TRUNC_BC bit (2) internal static options (constant) initial ("11"b); 5 14 declare TERM_FILE_TERM bit (3) internal static options (constant) initial ("001"b); 5 15 declare TERM_FILE_TRUNC_BC_TERM bit (3) internal static options (constant) initial ("111"b); 5 16 declare TERM_FILE_FORCE_WRITE bit (4) internal static options (constant) initial ("0001"b); 5 17 declare TERM_FILE_DELETE bit (5) internal static options (constant) initial ("00001"b); 5 18 5 19 /* END INCLUDE FILE ... terminate_file.incl.pl1 */ 2755 2756 2757 end abbrev; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/12/90 1539.5 abbrev.pl1 >spec>install>1002>abbrev.pl1 2652 1 05/04/83 1218.0 qedx_info.incl.pl1 >ldd>include>qedx_info.incl.pl1 2654 2 05/04/83 1218.0 qedx_buffer_io_info.incl.pl1 >ldd>include>qedx_buffer_io_info.incl.pl1 2751 3 04/13/82 1720.2 _abbrev_profile.incl.pl1 >ldd>include>_abbrev_profile.incl.pl1 2753 4 04/11/85 1552.6 access_mode_values.incl.pl1 >ldd>include>access_mode_values.incl.pl1 2755 5 04/06/83 1339.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. ABBREV 003603 constant char(32) initial packed unaligned dcl 206 set ref 446* 457* 457* 484* 494* 501* 505* 514* 521* 527* 539* 549* 555* 560* 560* 932* 965* 1009* 1114* 1344* 1399* 1407* 1501* 1510* 1549* 1607* 1614* 1626* 1636* 1699* 1701* 1737* 1741* 1743* 1749* 1776* 1784* 1789* 1810* 1829* 1850* 1894* 1902* 1940* 1980* 1987* 1992* 1997* 2023* 2031* 2040* 2088* 2103* 2126* 2137* 2150* 2164 2198* 2253* 2336* 2351* 2367* 2397* 2417* 2437* 2449* 2573* 2622* 2705* 2710* 2745* ABBREV_PROFILE_VERSION_1 constant fixed bin(17,0) initial dcl 3-19 ref 1117 1125 2713 DEFAULT_ABBREV_ESCAPE_CHARACTER constant char(1) initial packed unaligned dcl 223 ref 785 DEFAULT_BREAKS 003572 constant char(21) initial packed unaligned dcl 225 ref 661 661 713 713 1170 EXPAND_BOL_ONLY constant fixed bin(17,0) initial dcl 208 ref 1202 EXPAND_BOTH constant fixed bin(17,0) initial dcl 212 ref 802 821 848 EXPAND_INTERNAL_ONLY 003732 constant fixed bin(17,0) initial dcl 210 set ref 1202 1598* LEFT_BRACKET 025426 constant char(1) initial packed unaligned dcl 231 ref 1231 1231 1241 MAX_STACK_EXTENSION constant fixed bin(18,0) initial dcl 215 ref 1326 NL 025427 constant char(1) initial packed unaligned dcl 229 ref 1241 1695 2214 2216 2243 P_abbrev_type parameter fixed bin(17,0) dcl 143 ref 835 839 P_breaks parameter char packed unaligned dcl 141 set ref 639 644* 691 696* P_code parameter fixed bin(35,0) dcl 136 set ref 798 798 817 969* P_command_processor parameter entry variable dcl 138 ref 624 629 631 P_default_profile_ptr parameter pointer dcl 156 ref 817 1027 1038 1658 1658 1658 2516 2527 P_execute_request parameter entry variable dcl 152 set ref 817 959* 1427* P_input_line_lth parameter fixed bin(21,0) dcl 148 ref 798 798 805 835 845 852 P_input_line_ptr parameter pointer dcl 147 ref 798 798 804 835 845 850 P_output_line based char packed unaligned dcl 176 set ref 944* P_output_line_lth parameter fixed bin(21,0) dcl 163 set ref 835 845 943* 944 P_output_line_ptr parameter pointer dcl 162 set ref 835 845 940* 942* 944 P_profile_ptr parameter pointer dcl 157 set ref 817 1027 1036 1036 1587* 1642* 1658 2516 2525 2525 P_request_line parameter char packed unaligned dcl 158 set ref 817 823 824 P_sci_ptr parameter pointer dcl 151 set ref 817 959* 1427* P_subsys_cp parameter entry variable dcl 154 ref 817 959 1427 P_subsys_cp_info_ptr parameter pointer dcl 153 set ref 817 959* 1427* P_subsystem_name parameter char packed unaligned dcl 150 set ref 817 959* 1427* P_workspace_lth parameter fixed bin(21,0) dcl 161 ref 835 845 940 P_workspace_ptr parameter pointer dcl 160 ref 835 845 940 QEDX_BUFFER_IO_INFO_VERSION_1 000022 constant char(8) initial packed unaligned dcl 2-22 ref 2197 QEDX_INFO_VERSION_1 000024 constant char(8) initial packed unaligned dcl 1-44 ref 2163 QEDX_READ_FILE constant fixed bin(17,0) initial dcl 2-24 ref 2203 QEDX_WRITE_FILE constant fixed bin(17,0) initial dcl 2-24 ref 2237 QUOTE 025424 constant char(1) initial packed unaligned dcl 234 ref 1250 1259 1261 1602 1602 1602 1602 REW_ACCESS_BIN constant fixed bin(5,0) initial dcl 4-36 ref 1112 1125 2421 2699 RW_ACCESS 003737 constant bit(3) initial packed unaligned dcl 4-11 set ref 542* 1078* 1629* RW_ACCESS_BIN constant fixed bin(5,0) initial dcl 4-36 ref 1112 1125 2421 2699 R_ACCESS 003730 constant bit(3) initial packed unaligned dcl 4-11 set ref 535* 1072* 1623* SEMICOLON 025425 constant char(1) initial packed unaligned dcl 232 ref 1231 1231 1231 1231 1241 1244 1244 1244 SP constant char(1) initial packed unaligned dcl 228 ref 1240 SWITCH_NAMES 000001 constant char(32) initial array packed unaligned dcl 2331 ref 2360 2362 2362 TERM_FILE_BC 000031 constant bit(2) initial packed unaligned dcl 5-12 set ref 2596* TERM_FILE_DELETE 000026 constant bit(5) initial packed unaligned dcl 5-17 set ref 473* 530* 604* TERM_FILE_TERM 000027 constant bit(3) initial packed unaligned dcl 5-14 set ref 476* 533* 590* 595* 608* 1004* 1415* 1658* 1666* TERM_FILE_TRUNC_BC 000030 constant bit(2) initial packed unaligned dcl 5-13 set ref 1119* 2743* VERTICAL_BAR constant char(1) initial packed unaligned dcl 233 ref 1231 1231 1243 1244 WHITE_SPACE 003602 constant char(4) initial packed unaligned dcl 218 ref 1249 2492 WHITE_SPACE_AND_NL 003600 constant char(5) initial packed unaligned dcl 220 ref 886 1381 2467 abbrev_data_$default_breaks_list 000310 external static bit(36) dcl 237 set ref 788 abbrev_data_$default_breaks_tct_table 000312 external static char(512) packed unaligned dcl 238 ref 787 abbrev_data_$version 000306 external static char(32) packed unaligned dcl 236 set ref 619 1399* abbrev_name 000744 automatic char(32) packed unaligned dcl 2326 in procedure "do_switch_request" set ref 2376* 2378 2379* 2381 2384* 2385* 2397* abbrev_name 000446 automatic char(32) packed unaligned dcl 1888 in procedure "do_add_request" set ref 1907* 1908* 1920* 1949 1956 abbrev_name 000100 automatic varying char(32) dcl 2433 in procedure "validate_abbrev_name" set ref 2442* 2448 2449* abbrev_name 000216 automatic char(8) dcl 1142 in procedure "expand_line" set ref 1200* 1303 1306 abbrev_profile based structure level 1 dcl 3-7 abbrev_rqd 000534 constant char(72) initial array packed unaligned dcl 330 set ref 2612 2613* 2627* abbrev_state 000012 internal static structure level 1 dcl 292 abbrev_state_tct_table_as_binary based fixed bin(9,0) array packed unsigned unaligned dcl 312 set ref 755* 1180 abbrev_type 000100 automatic fixed bin(17,0) dcl 168 set ref 802* 821* 839* 848* 936* abbrevs 2 based structure array level 2 dcl 1713 active_fnc_err_$suppress_name 000344 constant entry external dcl 249 ref 457 active_function 000110 automatic bit(1) dcl 427 set ref 441* 443* 451 add_it 000462 automatic bit(1) packed unaligned dcl 1891 set ref 1940* 1943 addcharno builtin function dcl 285 ref 905 905 added 000144 automatic bit(1) dcl 659 set ref 668* 669 670* 675* 678 addr builtin function dcl 285 ref 755 788 823 1118 1180 1430 1430 1594 1598 1598 1598 1598 1616 1616 1689 1689 1840 2175 2175 2714 after builtin function dcl 285 ref 661 713 allow_request_lines 000127 automatic bit(1) dcl 200 set ref 809* 828* 856* 902 912 amount_to_grow 000265 automatic fixed bin(18,0) dcl 1322 set ref 1328* 1330* 1337 ap_ptr 000150 automatic pointer dcl 3-17 set ref 597* 927 982* 999 1004 1004* 1025* 1033* 1036* 1038* 1046* 1088* 1105 1108* 1112 1117 1118 1118 1119* 1119 1125 1125 1303 1305 1475* 1642* 1644* 1658 1658 1658* 1666* 1761 1761 1762 1763 1814 1814 1815 1816 1930 1930 1934 1934 1947 1947 1955 1955 1957 1957 1960 1960 1962 2001 2001 2061 2061 2065 2068 2075 2075 2078 2078 2081 2095 2095 2266 2266 2270 2270 2277 2277 2285 2285 2287 2287 2290 2290 2293 2415* 2514* 2522* 2525* 2527* 2535* 2553 2554 2591 2591 2591 2591 2591 2596* 2596 2692 ape based structure level 1 dcl 3-24 set ref 1926 1930 1934 1955 2001 2095 2263 2266 2270 2285 ape_ptr 000152 automatic pointer dcl 3-34 set ref 1199 1201* 1202 1202 1202 1207 1215 1216 1216 1217 1230 1305* 1306 1306 1307 1763* 1764 1767 1770 1773 1784 1784 1784 1788* 1789 1794 1797 1810 1810 1810 1816* 1817 1819 1820 1822 1843 1843 1846* 1847 1847 1847 1859 1863 1867 1872 1873 1920* 1922 1924 1926 1927 1928 1929 1930 1933 1934 1940 1940 1940 1947* 1949 1949 1949 1950 1951 1952 1953 1954 1955 1957 1963 1992 1992 1992 1996* 1997 2000 2001 2148* 2149 2157 2157 2157 2208* 2210 2210 2212 2213 2246* 2248 2249 2253 2253 2253 2262 2263 2264 2265 2266 2269 2270 2277* 2279 2279 2279 2280 2281 2282 2283 2284 2285 2287 2294 2385* 2387 2390 2436 2437 2437 2554* 2555 2555 2556 ard 000110 constant varying char(19) initial array dcl 382 ref 2619 2620 ardx 000032 constant fixed bin(17,0) initial array dcl 389 ref 2624 argument based char packed unaligned dcl 418 set ref 488 488 490 492 492 494* 504 505* 509 512 512 514* 524* 527* 555* argument_idx 000104 automatic fixed bin(17,0) dcl 421 set ref 480* 482* 484* 492 498* 498 499* 501* 512 518* 518 519* 521* argument_lth 000102 automatic fixed bin(21,0) dcl 420 set ref 482* 488 488 490 492 492 494 494 499* 504 505 505 509 512 512 514 514 519* 524 524 527 527 555 555 argument_ptr 000100 automatic pointer dcl 419 set ref 482* 488 488 490 492 492 494 499* 504 505 509 512 512 514 519* 524 527 555 based_word based fixed bin(35,0) dcl 198 ref 771 774 1448 baseptr builtin function dcl 285 ref 1448 before builtin function dcl 285 ref 661 713 bol 000104 automatic bit(1) dcl 2191 in procedure "abbrev_io" set ref 2249* 2276* 2282 bol 000115 automatic bit(1) packed unaligned dcl 1731 in procedure "do_list_request" set ref 1756* 1818 1819 bol based bit(1) level 4 in structure "ape" packed packed unaligned dcl 3-24 in procedure "ab" set ref 1202 1202 1767 1770 1794 1797 1819 1820 1847* 1927* 1940* 1952* 2088* 2088* 2157* 2249 2253* 2282* 2390* bol 000461 automatic bit(1) dcl 1890 in procedure "do_add_request" set ref 1914* 1927 1952 break_character 000141 automatic char(1) dcl 709 in procedure "delete_breaks" set ref 718* 721 break_character 000141 automatic char(1) dcl 657 in procedure "add_breaks" set ref 666* 667 670 671 672 678 break_character 000220 automatic char(1) dcl 1143 in procedure "expand_line" set ref 1178* 1180 1180 1238* 1240* 1241 1241 1241 1243 1249 1250 break_idx 000230 automatic fixed bin(21,0) dcl 1145 set ref 1165* 1166 1168 1170 1172 1174* 1177* 1177 1178 1186 1186 1198 1199 1200 1219 1226 break_lth 000232 automatic fixed bin(17,0) dcl 1146 set ref 1165* 1192* 1226 break_sequence defined char packed unaligned dcl 2446 set ref 2448 2449* break_sequences 2 based structure array level 2 dcl 314 break_strings based char level 2 packed packed unaligned dcl 314 set ref 750* 1180 1186 2448 2448 2449 2449 break_strings_lth 1 based fixed bin(17,0) level 2 dcl 314 set ref 744 747* 750 1180 1186 2448 2449 breaks_info 20 000012 internal static structure level 2 dcl 292 breaks_list based structure level 1 dcl 314 set ref 744 747 breaks_list_break_strings_lth 000147 automatic fixed bin(17,0) dcl 321 set ref 746* 747 747 breaks_list_n_break_sequences 000146 automatic fixed bin(17,0) dcl 321 set ref 746* 747 747 breaks_list_ptr 262 000012 internal static pointer level 3 dcl 292 set ref 744 747* 750 756 757 788* 1180 1180 1180 1186 1186 1186 1186 1186 1192 2444 2446 2448 2448 2449 2449 buffer 32 000542 automatic structure level 2 dcl 2119 buffer_io 24 000542 automatic entry variable level 3 dcl 2119 set ref 2165* buffer_lth 127 based fixed bin(21,0) level 2 dcl 2187 set ref 2212* 2213 2214 2214 2215* 2215 2216 2216 2243 2243 2243* 2243 2262 2264 2265 2283 2284 buffer_max_lth 126 based fixed bin(21,0) level 2 dcl 2187 ref 2210 buffer_name 32 000542 automatic char(16) level 3 packed packed unaligned dcl 2119 set ref 2171* buffer_pathname 36 000542 automatic char(256) level 3 packed packed unaligned dcl 2119 set ref 2172* buffer_ptr 124 based pointer level 2 dcl 2187 ref 2213 2214 2216 2243 2265 2284 buffers 32 based structure array level 2 dcl 1-6 caller_does_io 30(02) 000542 automatic bit(1) level 4 packed packed unaligned dcl 2119 set ref 2168* cleanup 000140 stack reference condition dcl 283 ref 471 930 1747 2708 code 000104 automatic fixed bin(35,0) dcl 178 set ref 439* 441 443 446* 482* 483 484* 499* 500 501* 519* 520 521* 524* 526 527* 535* 537 537 542* 549* 771* 774* 870* 905* 916* 959* 962* 969 1011* 1072* 1074 1078* 1080 1080* 1085 1085* 1108* 1109 1109* 1330* 1331 1344* 1345 1358* 1427* 1430* 1448* 1612* 1614 1614* 1619 1623* 1624 1624 1629* 1635 1636* 1741* 1742 1743* 2415* 2416 2417* 2695* 2696 2696* 2705* 2706 2710* codeptr builtin function dcl 285 ref 629 771 774 com_err_ 000346 constant entry external dcl 250 ref 446 484 494 501 505 514 521 527 549 555 1009 1407 1501 1510 1549 1607 1614 1636 1699 1701 1737 1743 1776 1784 1789 1810 1829 1894 1902 1980 1987 1992 1997 2023 2031 2040 2103 2126 2137 2150 2198 2222 2228 2308 2336 2351 2367 2397 2417 2437 2449 2573 2622 com_err_$suppress_name 000350 constant entry external dcl 251 ref 560 command_processor 000012 internal static entry variable level 2 dcl 292 set ref 576* 629* 631* 866* 962 1430 command_processor_ 000352 constant entry external dcl 252 ref 629 command_query_$yes_no 000354 constant entry external dcl 253 ref 539 1626 1940 2088 2253 cp_variable 000134 automatic entry variable dcl 204 set ref 572* 573 575 576 created_here 000200 automatic bit(1) dcl 435 in procedure "process_abbrev_command_or_af" set ref 469* 473 530 534* 542* 601 601* 604 created_here 000410 automatic bit(1) dcl 1571 in procedure "do_use_request" set ref 1621* 1629* 1646 1646* created_here 000172 automatic bit(1) dcl 1063 in procedure "get_default_profile" set ref 1070* 1078* 1090* cu_$af_return_arg_rel 000356 constant entry external dcl 254 ref 439 cu_$arg_list_ptr 000360 constant entry external dcl 255 ref 405 405 cu_$arg_ptr_rel 000362 constant entry external dcl 256 ref 482 499 519 cu_$cp 000364 constant entry external dcl 257 ref 905 cu_$get_command_processor 000366 constant entry external dcl 258 ref 572 866 cu_$grow_stack_frame 000370 constant entry external dcl 259 ref 1330 cu_$set_command_processor 000372 constant entry external dcl 260 ref 578 587 1001 1412 cu_$shrink_stack_frame 000374 constant entry external dcl 261 ref 1349 current_breaks 000100 automatic varying char(128) dcl 708 in procedure "delete_breaks" set ref 713* 715* 720 721 722* 722 722 728* current_breaks 000100 automatic varying char(128) dcl 656 in procedure "add_breaks" set ref 661* 663* 669 670 671 672* 672 672 678* 678 683* currentsize builtin function dcl 285 ref 1836 1926 1930 1934 1955 2001 2095 2263 2266 2270 2285 2732 data_space 240 based bit(36) array level 2 in structure "abbrev_profile" dcl 3-7 in procedure "ab" set ref 1118 data_space 240 based bit(36) array level 2 in structure "new_profile" dcl 2663 in procedure "compact_profile" set ref 2714 debug 000376 constant entry external dcl 262 ref 771 772 debug_entry_variable 000276 internal static entry variable dcl 327 set ref 772* 1454 default_breaks 17(03) 000012 internal static bit(1) level 3 packed packed unaligned dcl 292 set ref 661 713 744 760* 778* 1170 default_pathname 131 based bit(1) level 3 packed packed unaligned dcl 2187 ref 2251 definition defined char packed unaligned dcl 1918 ref 1924 1928 1929 1953 1954 deleted 000144 automatic bit(1) dcl 711 set ref 719* 720 723* direction 130 based fixed bin(17,0) level 2 dcl 2187 set ref 2203 2237 2308* display_line parameter char packed unaligned dcl 2637 set ref 2634 2639 2639* divide builtin function dcl 285 ref 952 1328 editor_name 2 000542 automatic char(72) level 3 in structure "local_qi" packed packed unaligned dcl 2119 in procedure "do_edit_request" set ref 2164* editor_name 2 based char(72) level 2 in structure "qbii" dcl 2187 in procedure "abbrev_io" set ref 2222* 2228* 2308* element 001012 automatic fixed bin(17,0) dcl 2606 set ref 2612* 2613* 2619* 2620* 2624* 2624 2627 emessage 000117 automatic char(64) packed unaligned dcl 1732 set ref 1825* 1826* 1827* 1828* 1829* enable_abbrev 000111 automatic bit(1) dcl 429 set ref 465* 488* 490* 570 error_table_$bad_segment 000316 external static fixed bin(35,0) dcl 241 set ref 2066* error_table_$bad_subr_arg 000320 external static fixed bin(35,0) dcl 241 set ref 2308* error_table_$badopt 000314 external static fixed bin(35,0) dcl 241 set ref 555* error_table_$command_line_overflow 000322 external static fixed bin(35,0) dcl 241 ref 1358 error_table_$moderr 000324 external static fixed bin(35,0) dcl 241 set ref 1122* 1894* 1980* 2023* 2126* 2336* 2699* error_table_$noarg 000326 external static fixed bin(35,0) dcl 241 set ref 494* 514* 2040* error_table_$noentry 000330 external static fixed bin(35,0) dcl 241 ref 537 1074 1624 error_table_$not_act_fnc 000332 external static fixed bin(35,0) dcl 241 ref 443 error_table_$request_not_recognized 000334 external static fixed bin(35,0) dcl 241 set ref 1549* error_table_$unbalanced_quotes 000336 external static fixed bin(35,0) dcl 241 set ref 1607* error_table_$unimplemented_version 000340 external static fixed bin(35,0) dcl 241 set ref 2198* escape_character 16 000012 internal static char(1) level 2 dcl 292 set ref 466 504 568* 785* 912 1407* 1501 1508* 1512* 1549* 1737* 1902* 1987* 2031* 2137* 2351* 2573* exact_match 000111 automatic bit(1) dcl 1730 set ref 1752* 1759 1781 expand_pathname_$add_suffix 000400 constant entry external dcl 263 ref 524 1612 expanded_line based char packed unaligned dcl 186 set ref 942 944 956 959* 1209* 1216* 1231 1231 1231 1287* 1347* 1347 expanded_line_lth 000110 automatic fixed bin(21,0) dcl 187 set ref 882* 940 942 942 943 944 949 952 955 956 959 959 962* 1149* 1208* 1208 1209 1215* 1215 1216 1218* 1231 1231 1231 1286* 1286 1287 1290* 1335* 1347 1347 expanded_line_ptr 000112 automatic pointer dcl 188 set ref 880* 944 956 959 962* 1148* 1209 1216 1231 1231 1231 1287 1334* 1352* expanded_pathname based char packed unaligned dcl 1562 set ref 1602 1602 1602* 1602 1607* 1612* 1614* 1616 expanded_pathname_buffer 000220 automatic char(256) packed unaligned dcl 1561 set ref 1598 1598 1598 1598 1616 expanded_pathname_lth 000320 automatic fixed bin(21,0) dcl 1563 set ref 1595* 1598* 1602 1602 1602 1602 1602 1602 1607 1607 1612 1612 1614 1614 1616 1616 expanded_pathname_ptr 000322 automatic pointer dcl 1564 set ref 1594* 1598* 1602 1602 1602 1602 1607 1612 1614 1616 1616 1616 expansion_stack_space_lth 000114 automatic fixed bin(21,0) dcl 190 set ref 875* 1326 1328 1337* 1337 expansion_stack_space_ptr 000116 automatic pointer dcl 191 set ref 1334* 1347 1349* expansion_temp_segment based char packed unaligned dcl 194 ref 1341 expansion_temp_segment_ptr 000122 automatic pointer dcl 195 set ref 599* 876* 932 932* 965 965* 1341 1344* 1347 1352 extended_stack 000120 automatic bit(1) dcl 192 set ref 874* 1280 1332 1333* 1346 1350* extension_ptr 000262 automatic pointer dcl 1320 set ref 1330* 1334 find_char_$first_in_table 000436 constant entry external dcl 279 ref 1172 first_abbrev 000756 automatic bit(1) dcl 2328 set ref 2374* 2382* 2402 first_call 000010 internal static bit(1) initial dcl 290 set ref 402 627 642 694 790* 863 first_offset 000114 automatic fixed bin(18,0) dcl 2688 set ref 2722* 2724* 2725 fixed builtin function dcl 285 ref 1118 1957 1963 2075 2082 2287 2294 2714 2733 2735 flags 17 000012 internal static structure level 2 in structure "abbrev_state" dcl 292 in procedure "ab" set ref 777* flags 131 based structure level 2 in structure "qbii" dcl 2187 in procedure "abbrev_io" flags 143 000542 automatic structure level 3 in structure "local_qi" dcl 2119 in procedure "do_edit_request" set ref 2173* flags 30 000542 automatic structure level 3 in structure "local_qi" dcl 2119 in procedure "do_edit_request" set ref 2167* flags based structure level 3 in structure "ape" packed packed unaligned dcl 3-24 in procedure "ab" set ref 1951* 2281* force 000460 automatic bit(1) dcl 1890 set ref 1913* 1922 found_end 000223 automatic bit(1) dcl 1144 set ref 1253* 1255 1266* 1270* garbage 2 based fixed bin(18,0) level 2 dcl 3-7 set ref 1930* 1930 1934* 1934 2001* 2001 2095* 2095 2266* 2266 2270* 2270 2591 2591 2591 get_system_free_area_ 000404 constant entry external dcl 265 ref 742 872 get_temp_segment_ 000406 constant entry external dcl 266 ref 1344 1741 2705 hash_slot 000105 automatic fixed bin(17,0) dcl 1729 in procedure "do_list_request" set ref 1761* 1762* 1814* 1815* hash_slot 000112 automatic fixed bin(17,0) dcl 2687 in procedure "compact_profile" set ref 2720* 2722 2724 2733* hash_slot 000457 automatic fixed bin(18,0) dcl 1889 in procedure "do_add_request" set ref 1956* 1957 1957 1960 hash_slot 000103 automatic fixed bin(18,0) dcl 2190 in procedure "abbrev_io" set ref 2286* 2287 2287 2290 hash_table 40 based fixed bin(18,0) array level 2 in structure "new_profile" dcl 2663 in procedure "compact_profile" set ref 2720 2733* hash_table 4 based fixed bin(18,0) array level 2 in structure "old_old_profile" dcl 2674 in procedure "compact_profile" ref 2716 2722 hash_table 40 based fixed bin(18,0) array level 2 in structure "abbrev_profile" dcl 3-7 in procedure "ab" set ref 1303 1761 1761 1762 1814 1814 1815 1957 1957* 1960 2061 2068* 2075 2075* 2078 2287 2287* 2290 2553 hash_table 40 based fixed bin(18,0) array level 2 in structure "old_profile" dcl 2673 in procedure "compact_profile" ref 2718 2724 have_return_code 000130 automatic bit(1) dcl 200 set ref 600* 809* 828* 856* 969 have_switch 000755 automatic bit(1) dcl 2328 set ref 2357* 2360 2362* 2366 hbound builtin function dcl 285 ref 1761 1814 2360 2612 2619 2720 hcs_$fs_get_mode 000410 constant entry external dcl 267 ref 1108 2415 2695 hcs_$fs_get_path_name 000412 constant entry external dcl 268 ref 982 1475 header based structure level 2 in structure "ape" dcl 3-24 in procedure "ab" header based structure level 2 in structure "old_ape" dcl 2680 in procedure "compact_profile" ref 2729 header 000542 automatic structure level 2 in structure "local_qi" dcl 2119 in procedure "do_edit_request" header based structure level 2 in structure "qedx_info" dcl 1-6 in procedure "process_request_line" header based structure level 2 in structure "new_ape" dcl 2668 in procedure "compact_profile" set ref 2729* high builtin function dcl 285 ref 667 idx 000100 automatic fixed bin(21,0) dcl 2465 in procedure "skip_whitespace" set ref 2467* 2469 2471 idx 000110 automatic fixed bin(17,0) dcl 1729 in procedure "do_list_request" set ref 1839* 1840 1840* 1845* 1846* 1870* 1872 1873 idx 000102 automatic fixed bin(21,0) dcl 2485 in procedure "get_token" set ref 2492* 2493 2493* 2497 idx 000142 automatic fixed bin(21,0) dcl 658 in procedure "add_breaks" set ref 665* 666* idx 000231 automatic fixed bin(21,0) dcl 1145 in procedure "expand_line" set ref 1170* 1172* 1174 1177 1180* 1180* 1186 1186 1186 1186 1192* 1259* 1260 1260* 1261 1261 1261 1265 idx 000142 automatic fixed bin(21,0) dcl 710 in procedure "delete_breaks" set ref 717* 718* idx 000100 automatic fixed bin(17,0) dcl 740 in procedure "set_user_breaks" set ref 754* 755 755 756 756 757* idx 000111 automatic fixed bin(17,0) dcl 2434 in procedure "validate_abbrev_name" set ref 2444* 2446 2448 2449 index builtin function dcl 285 ref 488 1249 1259 1756 1756 1757 1757 1863 1867 2448 initial_abbrev_name 000706 automatic char(32) packed unaligned dcl 2122 set ref 2134* 2136 2145* 2148* 2150* 2172 initiate_file_ 000414 constant entry external dcl 269 ref 535 1072 1623 initiate_file_$create 000416 constant entry external dcl 270 ref 542 1078 1629 input_line based char packed unaligned dcl 172 ref 886 902 912 1166 1166 1168 1168 1170 1170 1172 1172 1174 1174 1178 1178 1186 1186 1186 1186 1200 1200 1207 1207 1208 1208 1209 1209 1209 1209 1211 1211 1212 1212 1238 1244 1257 1257 1259 1259 1260 1260 1261 1261 1261 1261 1269 1269 1284 1284 1284 1284 1286 1286 1287 1287 1287 1287 1288 1288 1381 1393 1393 1406 1406 1406 1406 1424 1424 1426 1426 1427 1427 1430 1430 1430 1430 1430 1430 1430 1430 1579 1579 1585 1585 1594 1594 1595 1595 1598 1598 1598 1598 1598 1598 1598 1598 1616 1616 1686 1686 1688 1688 1689 1689 1689 1689 1689 1689 1689 1689 1736 1736 1759 1759 1911 1911 1918 1918 1924 1924 1928 1928 1929 1929 1953 1953 1954 1954 1986 1986 2467 2467 2469 2469 2489 2489 2492 2492 2493 2493 2501 2501 2572 2572 2610 2610 input_line_lth 000101 automatic fixed bin(21,0) dcl 173 set ref 805* 824* 852* 878 882 886 902 902 905 912 1149 1158 1162 1166 1168 1170 1172 1174 1178 1186 1186 1200 1207 1208 1209 1209 1211 1212 1228 1238 1244 1252 1257 1259 1260 1261 1261 1269 1282 1284 1284 1286 1287 1287 1288 1381* 1381 1386 1393 1406 1406 1424 1426 1427 1430 1430 1430 1430 1579 1585 1594 1595 1598 1598 1598 1598 1616 1686 1688 1689 1689 1689 1689 1736 1759 1911 1918 1924 1928 1929 1953 1954 1986 2467 2469 2489 2492 2493 2501 2572 2610 input_line_ptr 000102 automatic pointer dcl 174 set ref 804* 823* 850* 880 886 902 905 905 912 1148 1166 1168 1170 1172 1174 1178 1186 1186 1200 1207 1208 1209 1209 1211 1212 1238 1244 1257 1259 1260 1261 1261 1269 1284 1284 1286 1287 1287 1288 1381 1393 1406 1406 1424 1426 1427 1430 1430 1430 1430 1579 1585 1594 1595 1598 1598 1598 1598 1616 1686 1688 1689 1689 1689 1689 1736 1759 1911 1918 1924 1928 1929 1953 1954 1986 2467 2469 2489 2492 2493 2501 2572 2610 ioa_ 000420 constant entry external dcl 272 ref 1114 1399 1453 1476 1512 1691 1847 2157 2158 2611 2639 ioa_$nnl 000422 constant entry external dcl 273 ref 1695 jdx 000143 automatic fixed bin(21,0) dcl 658 in procedure "add_breaks" set ref 669* 670 671 672 672* jdx 000143 automatic fixed bin(21,0) dcl 710 in procedure "delete_breaks" set ref 720* 721 722 722* la 000112 automatic bit(1) packed unaligned dcl 1731 set ref 1753* 1826 1857 1858 lae based structure level 1 dcl 1719 last_ape_ptr 000100 automatic pointer dcl 2189 in procedure "abbrev_io" set ref 2290* 2290* 2293 2294 last_ape_ptr 000444 automatic pointer dcl 1887 in procedure "do_add_request" set ref 1960* 1960* 1962 1963 last_copied_idx 000225 automatic fixed bin(21,0) dcl 1145 set ref 1151* 1206 1207 1208 1209 1209 1211 1212* 1212 1212 1219* 1219 1282 1284 1284 1286 1287 1287 1288 last_expanded_idx 000226 automatic fixed bin(21,0) dcl 1145 set ref 1152* 1209 1211* 1211 1216 1217* 1217 1218 1287 1288* 1288 1290 1324 1347 1347 last_new_ape_ptr 000116 automatic pointer dcl 2689 set ref 2721* 2733 2735 2736* last_quote_idx 000227 automatic fixed bin(21,0) dcl 1145 set ref 1254* 1257 1259 1260 1261 1261 1261* 1261 1265* 1265 1269* 1275 lbound builtin function dcl 285 ref 1761 1814 2716 2718 length builtin function dcl 285 ref 504 504 665 669 717 720 746 752 754 824 1166 1168 1174 1186 1199 1207 1208 1209 1211 1212 1231 1231 1231 1244 1244 1257 1260 1261 1269 1284 1284 1286 1287 1288 1341 1381 1393 1426 1430 1430 1501 1501 1579 1595 1598 1598 1598 1598 1602 1602 1686 1688 1689 1689 1736 1759 1784 1784 1784 1784 1809 1810 1810 1810 1843 1843 1911 1918 1924 1928 1949 1949 1953 1986 1992 1992 1992 1992 2054 2054 2072 2072 2279 2279 2436 2436 2437 2437 2469 2489 2493 2572 2610 list based structure level 1 dcl 1713 set ref 1836 list_segment_ptr 000100 automatic pointer dcl 1717 set ref 1741* 1749 1749* 1760 1775 1782 1802 1806 1808 1824 1833 1836 1836 1837 1840 1850* 1870 1870 1872 1873 list_sort_list based structure level 1 dcl 1723 list_sort_list_ptr 000102 automatic pointer dcl 1726 set ref 1836* 1837 1839 1840 1843* 1845 1846 local_qi 000542 automatic structure level 1 dcl 2119 set ref 2175 2175 low builtin function dcl 285 ref 752 lower_hash_bound 000113 automatic fixed bin(17,0) dcl 2687 set ref 2716* 2718* 2720 ls 000113 automatic bit(1) packed unaligned dcl 1731 set ref 1754* 1857 1862 lth 3 based fixed bin(17,0) array level 3 dcl 314 set ref 757* 1186 1186 1186 1192 2446 ltrim builtin function dcl 285 ref 1231 1231 1231 lx 000114 automatic bit(1) packed unaligned dcl 1731 set ref 1755* 1810 1827 1857 1866 max builtin function dcl 285 ref 1328 mod builtin function dcl 285 ref 2591 n based fixed bin(17,0) level 2 dcl 1723 set ref 1837* 1839 1845 n_abbrevs based fixed bin(17,0) level 2 dcl 1713 set ref 1760* 1775 1782* 1802 1806* 1808 1824 1833 1836 1837 1870 1870* n_arguments 000103 automatic fixed bin(17,0) dcl 421 set ref 439* 452 480 492 512 n_break_sequences based fixed bin(17,0) level 2 dcl 314 set ref 744 747* 750 1180 1180 1186 2444 2448 2449 n_buffers 31 000542 automatic fixed bin(17,0) level 3 dcl 2119 set ref 2170* name 2 based char(8) level 3 in structure "ape" dcl 3-24 in procedure "ab" set ref 1199 1306 1764 1784 1784 1784 1810 1810 1810 1817 1843 1843 1847* 1859 1863 1872 1933* 1940* 1949 1949* 1949 1992 1992 1992 2000* 2054 2054* 2054 2072 2072* 2072 2088* 2088* 2088* 2094* 2157* 2253* 2269* 2279 2279* 2279 2436 2437 2437 2555 name 2 based char(8) level 3 in structure "old_ape" dcl 2680 in procedure "compact_profile" ref 2727 name 2 based char(8) array level 3 in structure "list" dcl 1713 in procedure "do_list_request" set ref 1840 1872* nbol 000116 automatic bit(1) packed unaligned dcl 1731 set ref 1757* 1818 1820 ndx 001013 automatic fixed bin(17,0) dcl 2606 set ref 2626* 2627* need_break_sequence 000222 automatic bit(1) dcl 1144 set ref 1164* 1166 1180 1191* new_abbrev_name 000510 automatic char(32) packed unaligned dcl 2017 set ref 2038* 2039 2046* 2048* 2053 2054 2072 new_ape based structure level 1 dcl 2668 set ref 2732 new_ape_ptr 000522 automatic pointer dcl 2018 in procedure "do_rename_request" set ref 2048* 2050 2088 2088 2088 2088 2094 2095 new_ape_ptr 000102 automatic pointer dcl 2671 in procedure "compact_profile" set ref 2728* 2729 2730 2731 2732 2733 2735 2736 new_escape_character 000202 automatic char(1) dcl 1375 in procedure "process_request_line" set ref 1506* 1508 new_escape_character 000112 automatic char(1) dcl 430 in procedure "process_abbrev_command_or_af" set ref 466* 509* 568 new_hash_slot 000532 automatic fixed bin(17,0) dcl 2020 set ref 2053* 2054 2075 2075 2078 new_profile based structure level 1 dcl 2663 new_profile_dirname 000324 automatic char(168) packed unaligned dcl 1566 in procedure "do_use_request" set ref 1612* 1623* 1626* 1626* 1629* 1636* 1636* new_profile_dirname 000113 automatic char(168) packed unaligned dcl 432 in procedure "process_abbrev_command_or_af" set ref 524* 535* 539* 539* 542* 549* 549* new_profile_ename 000165 automatic char(32) packed unaligned dcl 433 in procedure "process_abbrev_command_or_af" set ref 524* 535* 539* 539* 542* 549* 549* new_profile_ename 000376 automatic char(32) packed unaligned dcl 1567 in procedure "do_use_request" set ref 1612* 1623* 1626* 1626* 1629* 1636* 1636* new_profile_ptr 000100 automatic pointer dcl 2664 in procedure "compact_profile" set ref 2705* 2710 2710* 2713 2714 2714 2720 2728 2728 2732 2732 2733 2741 2741 2743 2745* new_profile_ptr 000406 automatic pointer dcl 1569 in procedure "do_use_request" set ref 1581* 1623* 1629* 1642 1644 new_profile_ptr 000176 automatic pointer dcl 434 in procedure "process_abbrev_command_or_af" set ref 468* 473 473* 476* 530 530* 533* 535* 542* 548 594 597 598* 604 604* 608* new_profile_words based bit(36) array dcl 2666 set ref 2741* 2741 new_size 000264 automatic fixed bin(21,0) dcl 1321 set ref 1324* 1326 1326 1341 next 0(18) based fixed bin(18,0) level 3 in structure "old_ape" packed packed unsigned unaligned dcl 2680 in procedure "compact_profile" ref 2738 next 0(18) based fixed bin(18,0) level 3 in structure "ape" packed packed unsigned unaligned dcl 3-24 in procedure "ab" set ref 1307 1773 1822 1950* 1960 1962 1963* 2061 2065 2068 2070* 2070 2074* 2078 2081 2082* 2280* 2290 2293 2294* 2556 next 0(18) based fixed bin(18,0) level 3 in structure "new_ape" packed packed unsigned unaligned dcl 2668 in procedure "compact_profile" set ref 2730* 2735* next_free 1 based fixed bin(18,0) level 2 in structure "abbrev_profile" dcl 3-7 in procedure "ab" set ref 1112 1118* 1119 1947 1955* 1955 2277 2285* 2285 2591 2591 2596 next_free 1 based fixed bin(18,0) level 2 in structure "new_profile" dcl 2663 in procedure "compact_profile" set ref 2714* 2728 2732* 2732 2741 2743 null builtin function dcl 285 ref 468 473 530 548 590 594 595 598 599 604 629 780 782 876 927 932 950 965 1004 1006 1025 1027 1027 1027 1036 1043 1202 1230 1309 1415 1490 1492 1581 1587 1593 1658 1658 1658 1658 1689 1689 1749 1789 1922 1997 2046 2050 2060 2068 2149 2210 2248 2387 2514 2516 2516 2516 2525 2532 2558 2710 2721 2733 null_line 000131 automatic bit(1) dcl 200 set ref 874* 879* 889* 948 1395* offset 000252 automatic fixed bin(18,0) dcl 1301 in procedure "lookup_abbrev" set ref 1303* 1303* 1305* offset 000100 automatic fixed bin(18,0) dcl 2551 in procedure "lookup_abbrev" set ref 2553* 2553* 2554* offset 000104 automatic fixed bin(18,0) dcl 1728 in procedure "do_list_request" set ref 1762* 1762* 1763* 1815* 1815* 1816* old_abbrev_name 000500 automatic char(32) packed unaligned dcl 2017 set ref 2028* 2030 2036 2040* 2044* 2051 2103* 2105* old_ape based structure level 1 dcl 2680 old_ape_ptr 000106 automatic pointer dcl 2683 in procedure "compact_profile" set ref 2726* 2727 2729 2731 2738 old_ape_ptr 000520 automatic pointer dcl 2018 in procedure "do_rename_request" set ref 2044* 2046 2054 2054 2054 2061 2066 2068 2070 2072 2072 2072 2074 2075 2082 2088 2088 2088 old_hash_slot 000531 automatic fixed bin(17,0) dcl 2020 set ref 2051* 2054 2061 2068 old_offset 000115 automatic fixed bin(18,0) dcl 2688 set ref 2725* 2725* 2726* old_old_profile based structure level 1 dcl 2674 old_profile based structure level 1 dcl 2673 old_profile_mode 000111 automatic fixed bin(5,0) dcl 2686 set ref 2695* 2699 2699 old_profile_ptr 000104 automatic pointer dcl 2678 set ref 2692* 2693 2695* 2716 2718 2722 2724 2726 2741 2743* old_size 000456 automatic fixed bin(18,0) dcl 1889 in procedure "do_add_request" set ref 1926* 1930 old_size 000102 automatic fixed bin(18,0) dcl 2190 in procedure "abbrev_io" set ref 2263* 2266 old_style_profile 000110 automatic bit(1) dcl 2685 set ref 2693* 2699 2716 2722 original_pathname defined char packed unaligned dcl 1579 set ref 1585 1594 1595 1598 1598 1598 1598 1616 p_abbrev_name parameter char(32) packed unaligned dcl 2432 set ref 2429 2436 2437* 2442 p_abbrev_type parameter fixed bin(17,0) dcl 1139 ref 1136 1202 1202 p_amount parameter fixed bin(21,0) dcl 1319 ref 1316 1324 1328 p_announce parameter bit(1) dcl 1101 ref 1098 1114 p_argument_list parameter pointer dcl 416 set ref 413 439* 482* 499* 519* p_breaks parameter char packed unaligned dcl 707 in procedure "delete_breaks" ref 704 717 718 p_breaks parameter char packed unaligned dcl 655 in procedure "add_breaks" ref 652 665 666 p_code parameter fixed bin(35,0) dcl 996 set ref 993 1009* 1011 p_created_or_initialized parameter bit(1) dcl 1102 set ref 1098 1114* p_dont_create_profile parameter bit(1) dcl 1023 in procedure "set_profile_ptr" set ref 1020 1027* 1043* p_dont_create_profile parameter bit(1) dcl 2512 in procedure "set_profile_ptr" set ref 2509 2516* 2532* p_dont_create_profile parameter bit(1) dcl 1060 in procedure "get_default_profile" ref 1057 1074 p_message parameter char packed unaligned dcl 997 set ref 993 1009* p_name parameter char(32) packed unaligned dcl 2550 ref 2547 2553 2555 p_new_breaks parameter varying char(128) dcl 739 ref 736 746 750 p_ok parameter bit(1) dcl 2185 set ref 2181 2199* 2218* 2224* 2229* 2233* 2257* 2300* 2303* 2310* p_pathname parameter char packed unaligned dcl 997 set ref 993 1009* p_qbii_ptr parameter pointer dcl 2184 ref 2181 2195 p_request_name parameter char packed unaligned dcl 2568 set ref 2565 2573* p_set_bit_count parameter bit(1) dcl 2589 ref 2586 2596 p_start parameter fixed bin(21,0) dcl 1140 ref 1136 1156 p_switch_value parameter bit(1) dcl 2324 ref 2321 2341 2390 pathname 24 based char(256) level 2 packed packed unaligned dcl 2187 set ref 2207 2207 2208 2208 2222* 2228* 2242 2242 2246 2246 2279 2286 pathname_ 000424 constant entry external dcl 274 ref 539 539 549 549 984 1080 1080 1085 1085 1476 1476 1626 1626 1636 1636 person_id 000162 automatic char(32) packed unaligned dcl 1062 set ref 1065* 1068 pointer builtin function dcl 285 ref 1305 1448 1763 1816 1836 1947 1960 1962 2061 2065 2078 2081 2277 2290 2293 2554 2726 2728 previous_command_processor 4 000012 internal static entry variable level 2 dcl 292 set ref 575* 587* 1001* 1412* previous_n_abbrevs 000106 automatic fixed bin(17,0) dcl 1729 set ref 1808* 1824 prior_ape_ptr 000526 automatic pointer dcl 2018 set ref 2060* 2064* 2068 2070 2078* 2078* 2081 2082 probe 000402 constant entry external dcl 264 ref 774 775 probe_entry_variable 000302 internal static entry variable dcl 328 set ref 775* 1460 profile_dirname 000100 automatic char(168) packed unaligned dcl 1061 in procedure "get_default_profile" set ref 1066* 1072* 1078* 1080* 1080* 1085* 1085* profile_dirname 000100 automatic char(168) packed unaligned dcl 1373 in procedure "process_request_line" set ref 1475* 1476* 1476* profile_dirname 000100 automatic char(168) packed unaligned dcl 979 in procedure "profile_pathname" set ref 982* 984* profile_ename 000172 automatic char(32) packed unaligned dcl 1374 in procedure "process_request_line" set ref 1475* 1476* 1476* profile_ename 000152 automatic char(32) packed unaligned dcl 1062 in procedure "get_default_profile" set ref 1068* 1072* 1078* 1080* 1080* 1085* 1085* profile_ename 000152 automatic char(32) packed unaligned dcl 980 in procedure "profile_pathname" set ref 982* 984* profile_mode 000766 automatic fixed bin(5,0) dcl 2413 in procedure "write_access" set ref 2415* 2421 2421 profile_mode 000100 automatic fixed bin(5,0) dcl 1103 in procedure "initialize_profile" set ref 1108* 1112 1112 1125 1125 profile_ptr 10 000012 internal static pointer level 2 dcl 292 set ref 590 590* 595 595* 597* 780* 999 1006* 1027 1033 1043 1046 1072* 1078* 1088 1415 1415* 1593 1644* 2516 2522 2532 2535 ptr 4 based pointer array level 3 in structure "list" dcl 1713 in procedure "do_list_request" set ref 1873* ptr 2 based pointer level 2 in structure "lae" dcl 1719 in procedure "do_list_request" ref 1846 ptrs 1 based pointer array level 2 packed packed unaligned dcl 1723 set ref 1840* 1846 qbii based structure level 1 dcl 2187 qbii_ptr 000204 automatic pointer dcl 2-20 set ref 2195* 2197 2203 2207 2207 2208 2208 2210 2212 2213 2213 2214 2214 2214 2215 2215 2216 2216 2216 2222 2222 2228 2228 2237 2242 2242 2243 2243 2243 2243 2243 2246 2246 2251 2262 2264 2265 2265 2279 2283 2284 2284 2286 2308 2308 qbii_value based char packed unaligned dcl 2188 set ref 2213* 2214 2216* 2243 2265 2284 qedx_ 000426 constant entry external dcl 275 ref 2175 qedx_buffer_io_info based structure level 1 dcl 2-7 qedx_info based structure level 1 dcl 1-6 query_if_modified 30(01) 000542 automatic bit(1) level 4 packed packed unaligned dcl 2119 set ref 2168* rank builtin function dcl 285 ref 755 1180 1303 1956 2051 2053 2286 2553 recognize_bol_abbrevs 000221 automatic bit(1) dcl 1144 set ref 1154* 1202 1222* 1231* 1241* 1244* 1249* 1249 redefine_it 000105 automatic bit(1) packed unaligned dcl 2192 set ref 2253* 2256 rel builtin function dcl 285 ref 1118 1957 1963 2075 2082 2287 2294 2714 2733 2735 release_temp_segment_ 000430 constant entry external dcl 276 ref 932 965 1749 1850 2710 2745 remember_lines 17(02) 000012 internal static bit(1) level 3 packed packed unaligned dcl 292 set ref 948 1484* 1489* 1695 remembered_line 12 000012 internal static structure level 2 in structure "abbrev_state" dcl 292 in procedure "ab" remembered_line based char packed unaligned dcl 325 in procedure "ab" set ref 956* 1695* 1695 remembered_line_buffer based char packed unaligned dcl 323 ref 950 953 1490 remembered_line_buffer_lth 14 000012 internal static fixed bin(21,0) level 3 dcl 292 set ref 783* 949 950 950 952* 953 953 1490 1490 1493* remembered_line_buffer_ptr 12 000012 internal static pointer level 3 dcl 292 set ref 782* 950 950 953* 956 1490 1490 1492* 1695 1695 remembered_line_lth 15 000012 internal static fixed bin(21,0) level 3 dcl 292 set ref 783* 955* 956 1493* 1695 1695 1695 1695 1695 rename_it 000530 automatic bit(1) packed unaligned dcl 2019 set ref 2088* 2093 request_line defined char packed unaligned dcl 1386 ref 1393 1406 1406 1424 1426 1579 1686 1688 1736 1759 1911 1918 1986 2467 2469 2489 2492 2493 2501 2572 2610 request_name 000724 automatic char(32) packed unaligned dcl 2326 in procedure "do_switch_request" set ref 2341* 2343* 2351* request_name 000152 automatic char(32) packed unaligned dcl 1374 in procedure "process_request_line" set ref 1439* 1441 1441 1446 1451 1458 1464 1473 1473 1482 1482 1487 1487 1499 1499 1518 1518 1521 1521 1521 1521 1521 1521 1521 1521 1521 1521 1521 1521 1527 1527 1527 1527 1530 1530 1530 1533 1533 1536 1540 1540 1543 1543 1549* 1736 1736 1736 1737* 1752 1752 1752 1753 1754 1755 1756 1756 1757 1757 1765 1766 1769 1792 1793 1796 1902* 1913 1913 1914 1914 rest_of_line defined char packed unaligned dcl 1426 in begin block on line 1424 set ref 1427* 1430 1430 1430 1430 rest_of_line defined char packed unaligned dcl 1162 in begin block on line 1160 ref 1166 1168 1174 1178 1186 1186 1200 rest_of_line defined char packed unaligned dcl 1252 in begin block on line 1251 ref 1257 1269 rest_of_line defined char packed unaligned dcl 1688 in begin block on line 1686 set ref 1689 1689 1689 1689 rest_of_rest_of_line defined char packed unaligned dcl 1257 in begin block on line 1256 ref 1259 1260 1261 1261 rest_of_rest_of_line defined char packed unaligned dcl 1168 in begin block on line 1167 set ref 1170 1172* result_line based char packed unaligned dcl 1680 set ref 1691* 1692 result_line_lth 000430 automatic fixed bin(21,0) dcl 1681 set ref 1689* 1691 1691 1692 1692 result_line_ptr 000432 automatic pointer dcl 1682 set ref 1689* 1691 1692 return_expansion 000126 automatic bit(1) dcl 200 set ref 808* 827* 855* 925* 927 938 return_string based varying char dcl 423 set ref 452* 455* return_string_max_lth 000105 automatic fixed bin(21,0) dcl 424 set ref 439* 452 455 return_string_ptr 000106 automatic pointer dcl 425 set ref 439* 452 455 reverse builtin function dcl 285 ref 1231 1231 1231 rtrim builtin function dcl 285 ref 504 1068 1381 1501 1784 1809 1992 2207 2207 2208 2208 2242 2242 2246 2246 2436 2442 2620 search builtin function dcl 285 ref 1170 2492 set_cp 17 000012 internal static bit(1) level 3 packed packed unaligned dcl 292 set ref 452 570 579* 586 588* 866 1000 1002* 1411 1413* set_cp_explicit 17(01) 000012 internal static bit(1) level 3 packed packed unaligned dcl 292 set ref 576 633* 866 sort_items_$char 000432 constant entry external dcl 277 ref 1843 start 000224 automatic fixed bin(21,0) dcl 1145 in procedure "expand_line" set ref 1156* 1158 1162 1166 1168 1170 1172 1174 1178 1186 1186 1200 1206 1226* 1226 1228 1238 1238 1244 1252 1257 1259 1260 1261 1261 1269 1275* 1275 start 2 based fixed bin(17,0) array level 3 in structure "breaks_list" dcl 314 in procedure "ab" set ref 756* 1180 1186 2448 2449 start 000132 automatic fixed bin(21,0) dcl 202 in procedure "ab" set ref 886* 888 902 902 905 905 905 912 936* 1379* 1379 1386 1393 1406 1406 1424 1426 1427 1430 1430 1430 1430 1579 1585 1594 1595 1598 1598 1598 1598 1616 1686 1688 1689 1689 1689 1689 1736 1759 1911 1918 1924 1928 1929 1953 1954 1986 2467 2469 2489 2492 2493 2501 2572 2610 string builtin function dcl 285 set ref 777* 1951* 2167* 2173* 2281* substr builtin function dcl 285 set ref 666 670 671 672 672 718 721 722 722 755 902 912 1178 1180 1186 1186 1200 1209* 1216* 1231 1231 1231 1238 1244 1261 1287* 1303 1347* 1347 1424 1506 1602 1602 1602 1695 1753 1754 1755 1859 1863 1867 1949* 1949 1956 2051 2053 2054* 2054 2072* 2072 2214 2216* 2243 2279* 2279 2286 2467 2492 2501 2553 subsystem_entry 000125 automatic bit(1) dcl 200 set ref 807* 826* 854* 902 959 1027 1393 1407 1427 1587 1642 1658 2516 switch_idx 000754 automatic fixed bin(17,0) dcl 2327 set ref 2358* 2360 2361* 2361 2362 2362 2388 sys_info$max_seg_size 000342 external static fixed bin(19,0) dcl 247 ref 1341 system_area based area(1024) dcl 183 ref 744 747 942 950 953 1490 1616 1692 system_area_ptr 000106 automatic pointer dcl 184 set ref 742* 744 747 872* 942 950 953 1490 1616 1692 tct_table 61 000012 internal static char(512) level 3 dcl 292 set ref 752* 752 755 787* 1172* 1180 terminate_file_ 000434 constant entry external dcl 278 ref 473 476 530 533 590 595 604 608 1004 1119 1415 1658 1666 2596 2743 the_ape_ptr 000524 automatic pointer dcl 2018 set ref 2061* 2061 2061* 2064* 2065 2066 the_switch 000734 automatic char(32) packed unaligned dcl 2326 set ref 2348* 2350 2362 2362 2367* token 000162 automatic char(32) packed unaligned dcl 1374 set ref 1500* 1501 1501 1501* 1506 1507* 1508 1510* 1783* 1783* 1784 1784* 1788* 1789* 1807* 1807* 1809 1810* 1829* 1859 1863 1867 1899* 1901 1907 1991* 1991* 1992 1992* 1996* 1997* 2142* 2143 2617* 2617* 2620 2622* token_lth 000101 automatic fixed bin(21,0) dcl 2485 in procedure "get_token" set ref 2497* 2499 2501 token_lth 000107 automatic fixed bin(17,0) dcl 1729 in procedure "do_list_request" set ref 1809* 1810 1859 1863 1867 token_start 000100 automatic fixed bin(21,0) dcl 2485 set ref 2496* 2501 try_to_create 000201 automatic bit(1) packed unaligned dcl 436 in procedure "process_abbrev_command_or_af" set ref 539* 542 try_to_create 000411 automatic bit(1) packed unaligned dcl 1572 in procedure "do_use_request" set ref 1626* 1629 uncopied_text defined char packed unaligned dcl 1206 in begin block on line 1205 ref 1207 1208 1209 1209 1211 1212 uncopied_text defined char packed unaligned dcl 1282 in begin block on line 1281 ref 1284 1284 1286 1287 1287 1288 used 000203 automatic fixed bin(21,0) dcl 1376 set ref 1437* 1579 1585 1594 1595 1598 1598 1598 1598 1616 1686 1688 1689 1689 1689 1689 1736 1759 1911 1918 1924 1928 1929 1953 1954 1986 2467 2469* 2471* 2471 2489 2492 2493 2496 2499* 2499 2572 2610 used_temp_segment 000124 automatic bit(1) dcl 196 set ref 874* 1280 1326 1341 1353* user_breaks 20 000012 internal static varying char(128) level 3 dcl 292 set ref 663 715 750* 754 755 user_info_ 000440 constant entry external dcl 280 ref 1065 user_info_$homedir 000442 constant entry external dcl 281 ref 1066 value 4 based char level 2 in structure "new_ape" dcl 2668 in procedure "compact_profile" set ref 2731* value 4 based char level 2 in structure "old_ape" dcl 2680 in procedure "compact_profile" ref 2731 value 4 based char level 2 in structure "ape" dcl 3-24 in procedure "ab" set ref 1216 1847* 1867 1929* 1940* 1954* 2088* 2088* 2157* 2213 2253* 2265* 2284* value_lth 1 based fixed bin(21,0) level 3 in structure "ape" dcl 3-24 in procedure "ab" set ref 1207 1215 1216 1216 1217 1847 1847 1867 1924 1926 1928* 1929 1930 1934 1940 1940 1953* 1954 1955 2001 2088 2088 2088 2088 2095 2157 2157 2210 2212 2213 2253 2253 2262 2263 2264* 2265 2266 2270 2283* 2284 2285 value_lth 1 based fixed bin(21,0) level 3 in structure "old_ape" dcl 2680 in procedure "compact_profile" ref 2731 value_lth 1 based fixed bin(21,0) level 3 in structure "new_ape" dcl 2668 in procedure "compact_profile" set ref 2731 2732 verify builtin function dcl 285 ref 886 2467 version 000542 automatic char(8) level 3 in structure "local_qi" dcl 2119 in procedure "do_edit_request" set ref 2163* version based char(8) level 2 in structure "qbii" dcl 2187 in procedure "abbrev_io" ref 2197 version based fixed bin(17,0) level 2 in structure "abbrev_profile" dcl 3-7 in procedure "ab" set ref 1105 1117* 1125 1125* version based fixed bin(17,0) level 2 in structure "old_profile" dcl 2673 in procedure "compact_profile" ref 2693 version based fixed bin(17,0) level 2 in structure "new_profile" dcl 2663 in procedure "compact_profile" set ref 2713* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. A_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 A_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 DIR_ACCESS_MODE_NAMES internal static char(4) initial array packed unaligned dcl 4-33 E_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 E_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 M_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 M_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 N_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 N_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 REW_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 RE_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 RE_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 R_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 SA_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 SA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 SEG_ACCESS_MODE_NAMES internal static char(4) initial array packed unaligned dcl 4-30 SMA_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 SMA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 SM_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 SM_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 S_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 S_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 TERM_FILE_FORCE_WRITE internal static bit(4) initial packed unaligned dcl 5-16 TERM_FILE_TRUNC internal static bit(1) initial packed unaligned dcl 5-11 TERM_FILE_TRUNC_BC_TERM internal static bit(3) initial packed unaligned dcl 5-15 W_ACCESS internal static bit(3) initial packed unaligned dcl 4-11 W_ACCESS_BIN internal static fixed bin(5,0) initial dcl 4-36 qedx_info_n_buffers automatic fixed bin(17,0) dcl 1-42 qedx_info_ptr automatic pointer dcl 1-41 terminate_file_switches based structure level 1 packed packed unaligned dcl 5-4 NAMES DECLARED BY EXPLICIT CONTEXT. CREATE_NEW_DEFINITION 017606 constant label dcl 1947 in begin block on line 1916 ref 1935 CREATE_NEW_DEFINITION 022102 constant label dcl 2277 in procedure "abbrev_io" ref 2271 EXPANDED_LINE 005475 constant label dcl 850 ref 840 EXPAND_COMMON 005510 constant label dcl 863 ref 811 830 858 EXPANSION_COMPLETED 005727 constant label dcl 938 ref 883 EXPANSION_IS_INPUT_LINE 005550 constant label dcl 880 ref 890 912 927 1396 OVERWRITE_PREVIOUS_DEFINITION 017446 constant label dcl 1924 ref 1943 PRINT_ADD_REQUEST_USAGE 017320 constant label dcl 1902 ref 1911 PRINT_EDIT_REQUEST_USAGE 021100 constant label dcl 2137 ref 2143 PRINT_SWITCH_REQUEST_USAGE 022344 constant label dcl 2351 ref 2402 PROCEED_WITH_NEXT_ABBREVIATION 022554 constant label dcl 2394 ref 2392 RENAME_THE_OLD_ABBREVIATION 020443 constant label dcl 2051 ref 2096 RETURN_FROM_ABBREV_COMMAND 010036 constant label dcl 604 ref 485 495 502 507 515 522 528 542 550 556 561 RETURN_FROM_ABBREV_PROCESSOR 006106 constant label dcl 965 ref 906 917 945 1013 1345 1359 1431 RETURN_FROM_PROCESS_REQUEST_LINE 024043 constant label dcl 2649 ref 1738 1744 1777 1802 1833 1896 1904 1908 1982 1988 2025 2033 2041 2128 2139 2145 2151 2338 2354 2368 2418 2575 SET_SWITCH 000000 constant label array(1) dcl 2390 ref 2388 USE_TEMP_SEGMENT 013135 constant label dcl 1341 ref 1331 ab 004770 constant entry external dcl 129 abbrev 005001 constant entry external dcl 129 abbrev_ 005277 constant entry external dcl 798 abbrev_$expand_line 005411 constant entry external dcl 835 ref 1598 abbrev_$expanded_line 005447 constant entry external dcl 845 ref 1689 abbrev_io 021344 constant entry internal dcl 2181 ref 2165 abbrev_processor 005256 constant entry external dcl 798 ref 573 578 578 abort_abbrev_processor 011104 constant entry internal dcl 993 ref 1080 1085 1109 1122 2066 2696 2699 add_breaks 010126 constant entry internal dcl 652 ref 644 compact_profile 024045 constant entry internal dcl 2660 ref 1105 2591 compact_profile_if_needed 023513 constant entry internal dcl 2586 ref 1968 2006 2108 2298 delete_breaks 010367 constant entry internal dcl 704 ref 696 display_help_line 024003 constant entry internal dcl 2634 ref 2613 2627 do_add_request 017240 constant entry internal dcl 1884 ref 1527 do_delete_request 017715 constant entry internal dcl 1976 ref 1530 do_edit_request 021020 constant entry internal dcl 2116 ref 1536 do_help_request 023602 constant entry internal dcl 2603 ref 1465 do_list_request 015654 constant entry internal dcl 1710 ref 1521 do_rename_request 020217 constant entry internal dcl 2014 ref 1533 do_show_request 015436 constant entry internal dcl 1677 ref 1518 do_switch_request 022250 constant entry internal dcl 2321 ref 1540 1543 do_use_request 014477 constant entry internal dcl 1558 ref 1442 end_request_lookup 023773 constant label dcl 2629 ref 2623 expand_line 012154 constant entry internal dcl 1136 ref 936 found_request 023750 constant label dcl 2624 ref 2620 get_default_profile 011346 constant entry internal dcl 1057 ref 1027 1043 1589 2516 2532 get_token 023155 constant entry internal dcl 2482 ref 1439 1500 1507 1783 1801 1807 1832 1899 1991 2004 2028 2038 2105 2134 2142 2348 2379 2617 2629 get_version 005042 constant entry external dcl 616 initialize_abbrev_state 010752 constant entry internal dcl 768 ref 402 627 642 694 863 initialize_profile 011674 constant entry internal dcl 1098 ref 601 1039 1090 1646 2528 lookup_abbrev 013021 constant entry internal dcl 1298 in procedure "expand_line" ref 1201 lookup_abbrev 023362 constant entry internal dcl 2547 in begin block on line 1384 ref 1788 1920 1996 2044 2048 2148 2208 2246 2385 make_space 013054 constant entry internal dcl 1316 ref 1207 1284 process_abbrev_command_or_af 006150 constant entry internal dcl 413 ref 405 process_request_line 013217 constant entry internal dcl 1370 ref 915 profile_pathname 011015 constant entry internal dcl 976 ref 1109 1109 1114 1114 1122 1122 1894 1894 1980 1980 2023 2023 2066 2066 2126 2126 2336 2336 2417 2417 2696 2696 2699 2699 reset_break 005210 constant entry external dcl 691 set_break 005144 constant entry external dcl 639 set_cp 005071 constant entry external dcl 624 set_entry 017220 constant label dcl 1870 ref 1857 1859 1863 1867 set_list_entry 017142 constant entry internal dcl 1854 ref 1765 1767 1770 1792 1794 1797 1818 1819 1820 set_profile_ptr 023250 constant entry internal dcl 2509 in begin block on line 1384 ref 1468 1583 set_profile_ptr 011240 constant entry internal dcl 1020 in procedure "ab" ref 925 set_user_breaks 010570 constant entry internal dcl 736 ref 683 728 skip_whitespace 023114 constant entry internal dcl 2462 ref 1575 1684 1735 1910 1985 2487 2570 2608 subsys_process_line 005341 constant entry external dcl 817 terminate_old_profile 015325 constant entry internal dcl 1655 ref 1586 1640 validate_abbrev_name 022710 constant entry internal dcl 2429 ref 1908 2046 2145 2207 2242 2384 validate_no_arguments 023431 constant entry internal dcl 2565 ref 1447 1452 1459 1474 1483 1488 write_access 022613 constant entry internal dcl 2410 ref 1893 1979 2022 2125 2335 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 26602 27246 25456 26612 Length 30106 25456 444 623 1124 276 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ab 295 external procedure is an external procedure. process_abbrev_command_or_af 280 internal procedure enables or reverts conditions, and is declared options(non_quick). on unit on line 471 84 on unit add_breaks 114 internal procedure is declared options(non_quick). delete_breaks 114 internal procedure is declared options(non_quick). set_user_breaks 71 internal procedure is declared options(non_quick). initialize_abbrev_state internal procedure shares stack frame of external procedure ab. on unit on line 930 80 on unit profile_pathname 180 internal procedure is declared options(non_quick). abort_abbrev_processor 90 internal procedure is declared options(non_quick). set_profile_ptr internal procedure shares stack frame of external procedure ab. get_default_profile 228 internal procedure is declared options(non_quick). initialize_profile 164 internal procedure is declared options(non_quick). expand_line internal procedure shares stack frame of external procedure ab. begin block on line 1160 begin block shares stack frame of external procedure ab. begin block on line 1167 begin block shares stack frame of external procedure ab. begin block on line 1205 begin block shares stack frame of external procedure ab. begin block on line 1251 begin block shares stack frame of external procedure ab. begin block on line 1256 begin block shares stack frame of external procedure ab. begin block on line 1281 begin block shares stack frame of external procedure ab. lookup_abbrev internal procedure shares stack frame of external procedure ab. make_space internal procedure shares stack frame of external procedure ab. process_request_line 1518 internal procedure is declared options(non_quick). begin block on line 1384 begin block shares stack frame of internal procedure process_request_line. begin block on line 1424 begin block shares stack frame of internal procedure process_request_line. do_use_request internal procedure shares stack frame of internal procedure process_request_line. begin block on line 1577 begin block shares stack frame of internal procedure process_request_line. terminate_old_profile internal procedure shares stack frame of internal procedure process_request_line. do_show_request internal procedure shares stack frame of internal procedure process_request_line. begin block on line 1686 begin block shares stack frame of internal procedure process_request_line. do_list_request 179 internal procedure enables or reverts conditions. on unit on line 1747 80 on unit set_list_entry internal procedure shares stack frame of internal procedure do_list_request. do_add_request internal procedure shares stack frame of internal procedure process_request_line. begin block on line 1916 begin block shares stack frame of internal procedure process_request_line. do_delete_request internal procedure shares stack frame of internal procedure process_request_line. do_rename_request internal procedure shares stack frame of internal procedure process_request_line. do_edit_request internal procedure shares stack frame of internal procedure process_request_line. abbrev_io 176 internal procedure is assigned to an entry variable. do_switch_request internal procedure shares stack frame of internal procedure process_request_line. write_access internal procedure shares stack frame of internal procedure process_request_line. validate_abbrev_name 158 internal procedure is called by several nonquick procedures. begin block on line 2445 begin block shares stack frame of internal procedure validate_abbrev_name. skip_whitespace 66 internal procedure is called by several nonquick procedures. get_token 68 internal procedure is called by several nonquick procedures. set_profile_ptr internal procedure shares stack frame of internal procedure process_request_line. lookup_abbrev 66 internal procedure is called by several nonquick procedures. validate_no_arguments internal procedure shares stack frame of internal procedure process_request_line. compact_profile_if_needed 84 internal procedure is called by several nonquick procedures. do_help_request internal procedure shares stack frame of internal procedure process_request_line. display_help_line internal procedure shares stack frame of internal procedure process_request_line. compact_profile 182 internal procedure enables or reverts conditions, and is declared options(non_quick). on unit on line 2708 78 on unit STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 first_call ab 000012 abbrev_state ab 000276 debug_entry_variable ab 000302 probe_entry_variable ab STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ab 000100 abbrev_type ab 000101 input_line_lth ab 000102 input_line_ptr ab 000104 code ab 000106 system_area_ptr ab 000110 expanded_line_lth ab 000112 expanded_line_ptr ab 000114 expansion_stack_space_lth ab 000116 expansion_stack_space_ptr ab 000120 extended_stack ab 000122 expansion_temp_segment_ptr ab 000124 used_temp_segment ab 000125 subsystem_entry ab 000126 return_expansion ab 000127 allow_request_lines ab 000130 have_return_code ab 000131 null_line ab 000132 start ab 000134 cp_variable ab 000146 breaks_list_n_break_sequences ab 000147 breaks_list_break_strings_lth ab 000150 ap_ptr ab 000152 ape_ptr ab 000216 abbrev_name expand_line 000220 break_character expand_line 000221 recognize_bol_abbrevs expand_line 000222 need_break_sequence expand_line 000223 found_end expand_line 000224 start expand_line 000225 last_copied_idx expand_line 000226 last_expanded_idx expand_line 000227 last_quote_idx expand_line 000230 break_idx expand_line 000231 idx expand_line 000232 break_lth expand_line 000252 offset lookup_abbrev 000262 extension_ptr make_space 000264 new_size make_space 000265 amount_to_grow make_space abbrev_io 000100 last_ape_ptr abbrev_io 000102 old_size abbrev_io 000103 hash_slot abbrev_io 000104 bol abbrev_io 000105 redefine_it abbrev_io add_breaks 000100 current_breaks add_breaks 000141 break_character add_breaks 000142 idx add_breaks 000143 jdx add_breaks 000144 added add_breaks compact_profile 000100 new_profile_ptr compact_profile 000102 new_ape_ptr compact_profile 000104 old_profile_ptr compact_profile 000106 old_ape_ptr compact_profile 000110 old_style_profile compact_profile 000111 old_profile_mode compact_profile 000112 hash_slot compact_profile 000113 lower_hash_bound compact_profile 000114 first_offset compact_profile 000115 old_offset compact_profile 000116 last_new_ape_ptr compact_profile delete_breaks 000100 current_breaks delete_breaks 000141 break_character delete_breaks 000142 idx delete_breaks 000143 jdx delete_breaks 000144 deleted delete_breaks do_list_request 000100 list_segment_ptr do_list_request 000102 list_sort_list_ptr do_list_request 000104 offset do_list_request 000105 hash_slot do_list_request 000106 previous_n_abbrevs do_list_request 000107 token_lth do_list_request 000110 idx do_list_request 000111 exact_match do_list_request 000112 la do_list_request 000113 ls do_list_request 000114 lx do_list_request 000115 bol do_list_request 000116 nbol do_list_request 000117 emessage do_list_request get_default_profile 000100 profile_dirname get_default_profile 000152 profile_ename get_default_profile 000162 person_id get_default_profile 000172 created_here get_default_profile get_token 000100 token_start get_token 000101 token_lth get_token 000102 idx get_token initialize_profile 000100 profile_mode initialize_profile lookup_abbrev 000100 offset lookup_abbrev process_abbrev_command_or_af 000100 argument_ptr process_abbrev_command_or_af 000102 argument_lth process_abbrev_command_or_af 000103 n_arguments process_abbrev_command_or_af 000104 argument_idx process_abbrev_command_or_af 000105 return_string_max_lth process_abbrev_command_or_af 000106 return_string_ptr process_abbrev_command_or_af 000110 active_function process_abbrev_command_or_af 000111 enable_abbrev process_abbrev_command_or_af 000112 new_escape_character process_abbrev_command_or_af 000113 new_profile_dirname process_abbrev_command_or_af 000165 new_profile_ename process_abbrev_command_or_af 000176 new_profile_ptr process_abbrev_command_or_af 000200 created_here process_abbrev_command_or_af 000201 try_to_create process_abbrev_command_or_af process_request_line 000100 profile_dirname process_request_line 000152 request_name process_request_line 000162 token process_request_line 000172 profile_ename process_request_line 000202 new_escape_character process_request_line 000203 used process_request_line 000204 qbii_ptr process_request_line 000220 expanded_pathname_buffer do_use_request 000320 expanded_pathname_lth do_use_request 000322 expanded_pathname_ptr do_use_request 000324 new_profile_dirname do_use_request 000376 new_profile_ename do_use_request 000406 new_profile_ptr do_use_request 000410 created_here do_use_request 000411 try_to_create do_use_request 000430 result_line_lth do_show_request 000432 result_line_ptr do_show_request 000444 last_ape_ptr do_add_request 000446 abbrev_name do_add_request 000456 old_size do_add_request 000457 hash_slot do_add_request 000460 force do_add_request 000461 bol do_add_request 000462 add_it do_add_request 000500 old_abbrev_name do_rename_request 000510 new_abbrev_name do_rename_request 000520 old_ape_ptr do_rename_request 000522 new_ape_ptr do_rename_request 000524 the_ape_ptr do_rename_request 000526 prior_ape_ptr do_rename_request 000530 rename_it do_rename_request 000531 old_hash_slot do_rename_request 000532 new_hash_slot do_rename_request 000542 local_qi do_edit_request 000706 initial_abbrev_name do_edit_request 000724 request_name do_switch_request 000734 the_switch do_switch_request 000744 abbrev_name do_switch_request 000754 switch_idx do_switch_request 000755 have_switch do_switch_request 000756 first_abbrev do_switch_request 000766 profile_mode write_access 001012 element do_help_request 001013 ndx do_help_request profile_pathname 000100 profile_dirname profile_pathname 000152 profile_ename profile_pathname set_user_breaks 000100 idx set_user_breaks skip_whitespace 000100 idx skip_whitespace validate_abbrev_name 000100 abbrev_name validate_abbrev_name 000111 idx validate_abbrev_name THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_g_a r_e_as r_ne_as alloc_char_temp cat_realloc_chars call_ent_var_desc call_ent_var call_ext_in call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc call_int_other begin_return_mac return_mac tra_ext_1 mdfx1 signal_op enable_op shorten_stack ext_entry ext_entry_desc int_entry int_entry_desc reverse_cs set_chars_eis index_chars_eis op_alloc_ op_freen_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. active_fnc_err_$suppress_name com_err_ com_err_$suppress_name command_processor_ command_query_$yes_no cu_$af_return_arg_rel cu_$arg_list_ptr cu_$arg_ptr_rel cu_$cp cu_$get_command_processor cu_$grow_stack_frame cu_$set_command_processor cu_$shrink_stack_frame debug expand_pathname_$add_suffix find_char_$first_in_table get_system_free_area_ get_temp_segment_ hcs_$fs_get_mode hcs_$fs_get_path_name initiate_file_ initiate_file_$create ioa_ ioa_$nnl pathname_ probe qedx_ release_temp_segment_ sort_items_$char terminate_file_ user_info_ user_info_$homedir THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. abbrev_data_$default_breaks_list abbrev_data_$default_breaks_tct_table abbrev_data_$version error_table_$bad_segment error_table_$bad_subr_arg error_table_$badopt error_table_$command_line_overflow error_table_$moderr error_table_$noarg error_table_$noentry error_table_$not_act_fnc error_table_$request_not_recognized error_table_$unbalanced_quotes error_table_$unimplemented_version sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 129 004767 402 005010 405 005013 407 005030 616 005037 619 005050 624 005066 627 005100 629 005104 631 005122 633 005130 635 005132 639 005141 642 005161 644 005165 646 005177 691 005206 694 005225 696 005231 698 005243 798 005252 802 005315 804 005317 805 005322 807 005324 808 005325 809 005326 811 005331 817 005332 821 005366 823 005370 824 005373 826 005375 827 005377 828 005400 830 005402 835 005403 839 005435 840 005440 845 005441 848 005473 850 005475 852 005500 854 005502 855 005503 856 005505 858 005507 863 005510 866 005514 870 005526 872 005527 874 005536 875 005541 876 005542 878 005544 879 005546 880 005550 882 005552 883 005554 886 005555 888 005570 889 005571 890 005573 902 005574 905 005611 906 005632 912 005633 915 005643 916 005647 917 005650 925 005651 927 005653 930 005662 932 005676 934 005724 936 005725 938 005727 940 005732 942 005741 943 005750 944 005752 945 005760 948 005761 949 005767 950 005772 952 006003 953 006011 955 006022 956 006024 959 006031 962 006074 965 006106 969 006134 972 006140 413 006147 439 006155 441 006175 443 006203 446 006210 447 006224 451 006225 452 006227 455 006247 457 006261 459 006312 465 006313 466 006315 468 006321 469 006323 471 006324 473 006340 476 006377 477 006425 480 006426 482 006435 483 006456 484 006461 485 006511 488 006512 490 006535 492 006543 494 006556 495 006611 498 006612 499 006613 500 006633 501 006636 502 006666 504 006667 505 006704 507 006740 509 006741 510 006745 512 006746 514 006761 515 007014 518 007015 519 007016 520 007036 521 007041 522 007071 524 007072 526 007130 527 007133 528 007165 530 007166 533 007225 534 007254 535 007255 537 007314 539 007322 542 007402 548 007450 549 007454 550 007524 552 007525 555 007526 556 007560 557 007561 560 007562 561 007612 563 007613 568 007615 570 007620 572 007625 573 007634 575 007651 576 007656 578 007665 579 007677 583 007702 586 007703 587 007706 588 007714 590 007717 594 007751 595 007755 597 010010 598 010015 599 010017 600 010020 601 010021 604 010036 608 010075 610 010124 652 010125 661 010141 663 010214 665 010222 666 010235 667 010243 668 010247 669 010250 670 010261 671 010272 672 010274 675 010336 677 010341 678 010343 681 010354 683 010356 685 010365 704 010366 713 010402 715 010455 717 010463 718 010475 719 010503 720 010504 721 010515 722 010521 723 010550 725 010553 726 010555 728 010557 730 010566 736 010567 742 010575 744 010604 746 010622 747 010630 750 010652 752 010704 754 010710 755 010717 756 010734 757 010741 758 010744 760 010746 762 010751 768 010752 771 010753 772 010757 774 010763 775 010766 777 010772 778 010773 780 010775 782 010777 783 011000 785 011002 787 011004 788 011010 790 011012 792 011013 976 011014 982 011022 984 011055 993 011103 999 011124 1000 011131 1001 011134 1002 011142 1004 011145 1006 011200 1009 011203 1011 011231 1013 011235 1020 011240 1025 011242 1027 011244 1033 011273 1036 011276 1038 011306 1039 011311 1040 011325 1043 011326 1046 011342 1049 011344 1057 011345 1065 011353 1066 011363 1068 011374 1070 011422 1072 011424 1074 011463 1078 011474 1080 011535 1083 011605 1085 011606 1088 011653 1090 011657 1092 011672 1098 011673 1105 011701 1108 011712 1109 011726 1112 011765 1114 011776 1117 012042 1118 012045 1119 012053 1120 012104 1122 012105 1125 012142 1129 012153 1136 012154 1148 012156 1149 012160 1151 012162 1152 012163 1154 012164 1156 012166 1158 012170 1162 012173 1164 012177 1165 012201 1166 012203 1168 012211 1170 012214 1172 012237 1174 012267 1177 012275 1178 012276 1180 012306 1186 012345 1191 012367 1192 012370 1194 012372 1196 012374 1198 012375 1199 012400 1200 012403 1201 012412 1202 012414 1206 012440 1207 012444 1208 012451 1209 012453 1211 012465 1212 012467 1215 012470 1216 012473 1217 012500 1218 012501 1219 012503 1222 012507 1226 012510 1228 012515 1230 012517 1231 012523 1236 012614 1238 012616 1240 012630 1241 012632 1243 012644 1244 012646 1247 012656 1249 012657 1250 012671 1252 012674 1253 012700 1254 012701 1255 012702 1257 012704 1259 012707 1260 012725 1261 012731 1265 012750 1266 012752 1267 012754 1269 012755 1270 012760 1273 012762 1275 012763 1278 012765 1280 012766 1282 012772 1284 012775 1286 013000 1287 013002 1288 013014 1290 013016 1293 013020 1298 013021 1303 013023 1305 013032 1306 013035 1307 013044 1309 013050 1316 013054 1324 013056 1326 013061 1328 013067 1330 013077 1331 013112 1332 013114 1333 013116 1334 013120 1335 013123 1337 013124 1339 013127 1341 013130 1344 013137 1345 013160 1346 013162 1347 013164 1349 013172 1350 013204 1352 013205 1353 013207 1355 013211 1358 013212 1359 013214 1362 013215 1370 013216 1379 013224 1381 013226 1386 013241 1393 013246 1395 013251 1396 013253 1399 013256 1400 013300 1406 013302 1407 013314 1411 013350 1412 013354 1413 013362 1415 013365 1418 013417 1424 013421 1426 013425 1427 013430 1430 013475 1431 013516 1437 013521 1439 013522 1441 013530 1442 013540 1443 013541 1446 013543 1447 013547 1448 013560 1449 013570 1451 013571 1452 013575 1453 013602 1454 013615 1455 013622 1458 013624 1459 013630 1460 013635 1461 013642 1464 013644 1465 013650 1466 013651 1468 013653 1473 013657 1474 013667 1475 013674 1476 013730 1477 013767 1482 013770 1483 014000 1484 014005 1485 014010 1487 014011 1488 014021 1489 014026 1490 014031 1492 014042 1493 014045 1494 014047 1499 014050 1500 014060 1501 014066 1506 014136 1507 014141 1508 014147 1510 014157 1511 014207 1512 014210 1513 014230 1518 014231 1521 014243 1527 014330 1530 014352 1533 014370 1536 014402 1540 014410 1543 014425 1549 014442 1552 014474 2647 014476 1558 014477 1575 014500 1579 014504 1581 014507 1583 014511 1585 014515 1586 014527 1587 014530 1589 014537 1590 014550 1593 014551 1594 014556 1595 014563 1596 014565 1598 014566 1602 014623 1607 014643 1608 014667 1612 014670 1614 014727 1616 014764 1619 015014 1621 015020 1623 015021 1624 015057 1626 015065 1629 015145 1632 015214 1635 015215 1636 015220 1637 015270 1640 015271 1642 015272 1644 015302 1646 015306 1648 015323 1672 015324 1655 015325 1658 015326 1664 015405 1666 015406 1668 015435 1677 015436 1684 015437 1686 015443 1688 015446 1689 015451 1691 015507 1692 015531 1686 015536 1695 015537 1699 015601 1701 015626 1703 015652 1710 015653 1735 015661 1736 015666 1737 015706 1738 015742 1741 015745 1742 015767 1743 015773 1744 016017 1747 016022 1749 016036 1750 016064 1752 016065 1753 016107 1754 016115 1755 016121 1756 016125 1757 016154 1759 016160 1760 016165 1761 016166 1762 016173 1763 016202 1764 016207 1765 016215 1766 016223 1767 016230 1769 016235 1770 016242 1773 016247 1774 016255 1775 016257 1776 016261 1777 016306 1779 016311 1781 016312 1782 016314 1783 016315 1784 016331 1788 016402 1789 016414 1792 016457 1793 016465 1794 016472 1796 016477 1797 016504 1801 016511 1802 016522 1803 016527 1806 016530 1807 016531 1808 016545 1809 016547 1810 016561 1814 016623 1815 016627 1816 016636 1817 016643 1818 016651 1819 016656 1820 016670 1822 016675 1823 016703 1824 016705 1825 016710 1826 016713 1827 016721 1828 016727 1829 016732 1832 016766 1833 016777 1836 017004 1837 017012 1839 017014 1840 017023 1841 017030 1843 017032 1845 017045 1846 017055 1847 017062 1848 017115 1850 017117 1852 017141 1854 017142 1857 017143 1858 017151 1859 017153 1860 017163 1862 017164 1863 017166 1864 017201 1866 017202 1867 017204 1868 017217 1870 017220 1872 017224 1873 017236 1875 017237 1884 017240 1893 017241 1894 017246 1896 017305 1899 017306 1901 017314 1902 017320 1904 017354 1907 017355 1908 017360 1910 017373 1911 017377 1913 017402 1914 017415 1918 017423 1920 017426 1922 017437 1924 017446 1926 017453 1927 017457 1928 017463 1929 017465 1930 017500 1931 017512 1933 017513 1934 017516 1935 017524 1937 017525 1940 017526 1943 017602 1944 017605 1947 017606 1949 017613 1950 017616 1951 017620 1952 017622 1953 017626 1954 017630 1955 017643 1956 017651 1957 017654 1960 017663 1962 017672 1963 017677 1968 017704 1970 017714 1976 017715 1979 017716 1980 017723 1982 017762 1985 017763 1986 017767 1987 017772 1988 020026 1991 020027 1992 020042 1996 020113 1997 020124 2000 020165 2001 020171 2004 020177 2006 020206 2008 020216 2014 020217 2022 020220 2023 020225 2025 020264 2028 020265 2030 020273 2031 020277 2033 020330 2036 020331 2038 020336 2039 020344 2040 020350 2041 020377 2044 020400 2046 020410 2048 020427 2050 020437 2051 020443 2053 020446 2054 020451 2060 020460 2061 020462 2064 020503 2065 020505 2066 020512 2068 020551 2070 020564 2072 020567 2074 020573 2075 020575 2078 020606 2081 020616 2082 020623 2085 020627 2088 020630 2093 020725 2094 020730 2095 020734 2096 020743 2101 020744 2103 020745 2105 021000 2106 021006 2108 021007 2110 021017 2116 021020 2125 021021 2126 021026 2128 021065 2134 021066 2136 021074 2137 021100 2139 021131 2142 021132 2143 021140 2145 021144 2148 021157 2149 021170 2150 021175 2151 021230 2157 021231 2158 021265 2163 021300 2164 021302 2165 021305 2167 021310 2168 021311 2170 021315 2171 021317 2172 021322 2173 021325 2175 021326 2177 021342 2181 021343 2195 021351 2197 021356 2198 021362 2199 021405 2200 021407 2203 021410 2207 021413 2208 021443 2210 021473 2212 021510 2213 021512 2214 021517 2215 021523 2216 021525 2218 021531 2219 021534 2222 021535 2224 021566 2225 021570 2228 021571 2229 021627 2231 021631 2233 021632 2234 021634 2237 021635 2242 021637 2243 021667 2246 021701 2248 021727 2249 021735 2251 021740 2253 021745 2256 022021 2257 022024 2258 022026 2262 022027 2263 022037 2264 022043 2265 022045 2266 022053 2267 022065 2269 022066 2270 022071 2271 022077 2273 022100 2276 022101 2277 022102 2279 022107 2280 022115 2281 022117 2282 022121 2283 022125 2284 022127 2285 022134 2286 022141 2287 022144 2290 022153 2293 022162 2294 022170 2298 022176 2300 022207 2301 022212 2303 022213 2304 022215 2308 022216 2310 022245 2313 022247 2321 022250 2335 022252 2336 022257 2338 022316 2341 022317 2343 022327 2348 022332 2350 022340 2351 022344 2354 022400 2357 022401 2358 022402 2360 022403 2361 022413 2362 022414 2364 022433 2366 022434 2367 022436 2368 022466 2374 022467 2376 022471 2378 022474 2379 022500 2381 022506 2382 022512 2384 022513 2385 022526 2387 022537 2388 022544 2390 022546 2392 022553 2397 022554 2400 022607 2402 022610 2404 022612 2410 022613 2415 022615 2416 022631 2417 022634 2418 022674 2421 022675 2429 022707 2436 022715 2437 022733 2439 022767 2442 022772 2444 023001 2446 023011 2448 023020 2449 023040 2451 023101 2454 023105 2456 023107 2462 023113 2467 023121 2469 023144 2471 023150 2473 023153 2482 023154 2487 023162 2489 023167 2492 023201 2493 023223 2496 023227 2497 023232 2499 023235 2501 023236 2509 023250 2514 023252 2516 023255 2522 023305 2525 023310 2527 023320 2528 023323 2529 023340 2532 023341 2535 023356 2538 023360 2547 023361 2553 023367 2554 023404 2555 023411 2556 023421 2558 023425 2565 023431 2570 023442 2572 023446 2573 023451 2575 023510 2578 023511 2586 023512 2591 023520 2596 023545 2599 023601 2603 023602 2608 023603 2610 023607 2611 023612 2612 023631 2613 023637 2614 023650 2615 023652 2617 023653 2619 023666 2620 023673 2621 023715 2622 023717 2623 023747 2624 023750 2626 023753 2627 023757 2628 023771 2629 023773 2632 024002 2634 024003 2639 024014 2641 024042 2649 024043 2660 024044 2692 024052 2693 024055 2695 024061 2696 024074 2699 024133 2703 024177 2705 024200 2706 024222 2708 024225 2710 024241 2711 024267 2713 024270 2714 024272 2716 024300 2718 024306 2720 024307 2721 024315 2722 024317 2724 024325 2725 024331 2726 024334 2727 024337 2728 024345 2729 024352 2730 024355 2731 024357 2732 024364 2733 024370 2735 024401 2736 024405 2738 024406 2739 024412 2741 024414 2743 024423 2745 024454 2747 024476 ----------------------------------------------------------- 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