COMPILATION LISTING OF SEGMENT where_doc Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 06/18/86 1332.2 mst Wed Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 8 /****^ HISTORY COMMENTS: 9* 1) change(86-06-12,GJohnson), approve(86-06-12,MCR7410), 10* audit(86-06-17,Martinson), install(86-06-18,MR12.0-1079): 11* Changed to use iox_ user_output. 12* END HISTORY COMMENTS */ 13 14 15 /* format: style2 */ 16 where_doc: 17 wdoc: 18 proc; 19 20 /* HISTORY: 21*Written by Jim Paradise, fall 1980. 22*Modified: 23*03/02/81 by M. Pierret to leave data base open. 24*06/16/81 by M. Pierret to canonicalize names, accept multi-word 25* entry names, surround operation with set/del scope. 26*10/15/81 by M. Pierret to accept -(dont_a a)llow_partial_match control arg 27* and to select manuals by doing an index comparison on each 28* entry_name_rel.entry_name, if -allow_partial_match given. 29*10/19/81 by M. Pierret to use display_info instead of display_flags, and to 30* display topics selected when -apm specified. 31*04/22/83 by Matthew Pierret: Reformatted the HISTORY section to be useable by 32* automatic subsys tools. 33* Changed to set display_info.short_name_flag off by default. 34* Added an automatic local_display_info, like display_info, upon 35* which display_info is based (display_info_ptr = addr 36* (local_display_info)). 37*05/13/83 by J. Siwila: Added facility to display a menu when user has asked 38* for a description of some part of the manuals found and the number 39* of manuals found is greater than one. Also made 40* -allow_partial_matches the default. Fixed cleanup procedures to 41* act according to whether or not the menu facility has been invoked. 42*06/15/83 by J. Siwila: Changed -dont_allow_partial_matches to the default and 43* added prompt asking user whether or not to do partial match search 44* when neither -allow_partial_matches nor -dont_allow_partial_matches 45* has been specified explicitly. Also turned topics_flag on for all 46* cases when partial matches are searched for. 47*07/18/83 by J. Siwila: Added -no_description, -no_audience, 48* -no_table_of_contents, and -no_new_features control arguments. 49*09/01/83 by M. Pierret: Changed to clean up the screen and display without 50* menu if any error occurs while setting up the menu. Changed 51* cleanup handler to cleanup the screen. Removed -brief. 52*09/21/83 by M. Pierret: Made many changes to in general clean up the code. 53* Added comments and more useful error messages, prompts and menu 54* headers. Added more complete argument checking. Changed to only 55* use a menu if video is already on, i.e., to never turn video on. 56* Changed to clear bottom window before displaying. 57* Changed default database path to >doc>facilities_data_dir. 58*09/29/83 by M. Pierret: Changed to always open the database when -dbpn is 59* specified and close the existing opening, if there is one. 60* Changed to print all manuals if -output_file is specified rather 61* than setting up a menu. Simplified the setup_menu algorithm. 62* Changed -apm to set dont_allow_partial_matches to off (-dapm 63* already did the converse). 64*09/30/83 by Matthew Pierret: Changed to print "where_doc must be followed..." 65* instead of "Command name must be followed...". Delayed clearing of 66* user_io window until just before shrinking it. Removed an 67* invalid ioa_ control string. Changed the clean_up subroutine to use 68* a local variable instead of (0) in its external calls. This is because 69* dsl_$close complains if it doesn't get a fixed bin (35) last arg. 70**/ 71 72 /* 73*DESCRIPTION: 74* where_doc returns information, as determined by control args, relevant 75* to a given topic_name. 76* 77* The data base is only opened once per process by either where_doc or 78* explain_doc; the module online_doc_db_index keeps track of the index 79* of the opening. 80**/ 81 82 /* START of DECLARATIONS */ 83 /* Automatic */ 84 85 dcl (topic_name, temp_topic_name) 86 char (64) var; 87 dcl topic_array (25) char (64) varying; 88 dcl entry_name char (64); 89 dcl mrds_database_path char (256); 90 dcl output_switch_name char (32); 91 dcl output_file_path char (256); 92 93 dcl (accept_control_argument, mrds_scope_set, database_path_sw, output_file_sw, use_menu_display, 94 partial_matches_allowed, dont_allow_partial_matches) 95 bit (1) aligned init ("0"b); 96 dcl yes_sw bit (1) aligned; 97 98 dcl ( 99 arg_idx, 100 arg_len, 101 control_argument_idx, 102 manual_idx, 103 manual_array (25), 104 manual_number, 105 nargs, 106 number_of_manuals 107 ) fixed bin; 108 dcl ( 109 current_mrds_dbi init (0), 110 mrds_dbi init (0), 111 code 112 ) fixed bin (35); 113 114 dcl output_ptr ptr; 115 dcl arg_ptr ptr; 116 117 dcl 1 local_display_info aligned like display_info; 118 119 /* Based */ 120 121 dcl arg char (arg_len) based (arg_ptr); 122 123 /* Internal static */ 124 125 dcl argument_type (1:4) char (64) varying options (constant) 126 init ("topic name", "output file path name", "", "MRDS database path name") 127 internal static; 128 129 dcl control_argument (1:28) char (32) varying options (constant) 130 init ("where_doc", "-output_file", "-of", "-database_pathname", "-dbpn", 131 "-description", "-desc", "-audience", "-aud", "-table_of_contents", "-toc", 132 "-new_features", "-nf", "", "-a", "-all", "-allow_partial_matches", "-apm", 133 "-dont_allow_partial_matches", "-dapm", "-no_description", "-no_desc", "-no_audience", 134 "-no_aud", "-no_table_of_contents", "-no_toc", "-no_new_features", "-no_nf") 135 internal static; 136 137 dcl myname char (9) options (constant) init ("where_doc") internal static; 138 dcl LOWER_CASE_ALPHA char (26) init ("abcdefghijklmnopqrstuvwxyz"); 139 dcl UPPER_CASE_ALPHA char (26) init ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); 140 141 /* Error table */ 142 143 dcl ( 144 error_table_$noarg, 145 error_table_$badopt, 146 error_table_$bad_arg, 147 error_table_$not_act_fnc, 148 error_table_$active_function, 149 error_table_$noentry, 150 mrds_error_$invalid_db_index, 151 mrds_error_$tuple_not_found 152 ) external fixed bin (35); 153 154 /* Entries */ 155 156 dcl absolute_pathname_ entry (char (*), char (*), fixed bin (35)); 157 dcl absolute_pathname_$add_suffix 158 entry (char (*), char (*), char (*), fixed bin (35)); 159 dcl active_fnc_err_ entry () options (variable); 160 dcl command_query_$yes_no entry options (variable); 161 dcl com_err_ entry options (variable); 162 dcl complain entry variable options (variable); 163 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 164 dcl cu_$af_return_arg entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 165 dcl display_doc entry (ptr, fixed bin (35), fixed bin, ptr, char (*) var, fixed bin (35)); 166 dcl dsl_$close entry () options (variable); 167 dcl dsl_$dl_scope_all entry (fixed binary (35), fixed binary (35)); 168 dcl dsl_$open entry options (variable); 169 dcl dsl_$retrieve entry options (variable); 170 dcl dsl_$set_scope_all entry options (variable); 171 dcl online_doc_db_index$set_index 172 entry (fixed bin (35)); 173 dcl online_doc_db_index$return_index 174 entry (fixed bin (35)); 175 176 /* Conditions */ 177 178 dcl cleanup condition; 179 180 /* Builtins */ 181 182 dcl (after, before, copy, empty, hbound, length, rtrim, string, substr, translate, ltrim, index) 183 builtin; 184 185 /* Menu dcls */ 186 187 dcl ( 188 video_is_on, 189 choice_flag init ("1"b), 190 fkey 191 ) bit (1) aligned; 192 dcl (choice, choices_idx, number_of_options) 193 fixed bin; 194 195 dcl menu_io_switch_name char (32); 196 dcl choices (number_of_options) char (64) var based (choices_ptr); 197 dcl headers (2) char (70) var; 198 dcl trailers (2) char (60) var; 199 200 dcl 1 user_io_window_info like window_position_info; 201 dcl 1 current_user_io_window_info 202 like window_position_info; 203 dcl 1 menu_window_info like window_position_info; 204 dcl 1 local_menu_format like menu_format; 205 dcl 1 local_menu_requirements 206 like menu_requirements; 207 dcl 1 local_area_info like area_info; 208 209 dcl (menu_io_ptr, choices_ptr, menu_ptr, work_area_ptr) 210 ptr; 211 212 dcl video_data_$terminal_iocb 213 ptr external; 214 215 dcl (addr, null, unspec) builtin; 216 217 dcl work_area area (sys_info$max_seg_size) based (work_area_ptr); 218 219 dcl sys_info$max_seg_size ext fixed bin (35); 220 221 dcl unique_chars_ entry (bit (*)) returns (char (15)); 222 dcl define_area_ entry (ptr, fixed bin (35)); 223 dcl release_area_ entry (ptr); 224 225 /* END OF DECLARATIONS */ 226 227 /* format: indcomtxt,^indblkcom */ 228 229 current_user_io_window_info.version = -1; 230 menu_io_ptr, output_ptr, work_area_ptr = null; 231 mrds_scope_set = "0"b; 232 video_is_on = (video_data_$terminal_iocb ^= null); 233 234 mrds_database_path = ">doc>facilities_data_dir>online_doc.db"; 235 /* Should be ">site>online_doc.db" or some-such */ 236 topic_name = ""; 237 topic_array = ""; 238 239 display_info_ptr = addr (local_display_info); 240 string (display_info) = "0"b; 241 string (display_info.header) = copy ("1"b, length (string (display_info.header))); 242 display_info.header.short_name_flag = "0"b; 243 display_info.header.topics_flag = "0"b; 244 245 call cu_$af_return_arg (nargs, (null), (0), code); 246 if code = 0 247 then call active_fnc_err_ (error_table_$active_function, myname, ""); 248 else if code ^= error_table_$not_act_fnc 249 then do; 250 call com_err_ (code, myname); 251 return; 252 end; 253 254 complain = com_err_; 255 256 if nargs = 0 257 then do; 258 call complain (error_table_$noarg, myname, "^/Usage: ^a topic_name {-control_args}", myname); 259 return; 260 end; 261 accept_control_argument = "0"b; /* First argument cannot be a control argument. */ 262 control_argument_idx = 1; /* First argument must be of argument_type (1) - topic name. */ 263 264 ARGUMENT_PROCESSING_LOOP: 265 do arg_idx = 1 to nargs; 266 call cu_$arg_ptr (arg_idx, arg_ptr, arg_len, code); 267 if index (arg, "-") ^= 1 268 then do; 269 goto ARG (control_argument_idx); 270 271 /*** The argument is not a control argument. If no control argument has 272* been processed yet, the argument is of type argument_type (1). If a 273* control argument has been processed but the last control argument does not 274* expect an arguemnt, control_argument_idx is 0 and this case is in error. 275* If an argument to a control argument is expected, it is of type 276* argument_type (control_argument_idx). */ 277 278 ARG (0): /* unexpected argument */ 279 call complain (error_table_$badopt, myname, "Argument is out of place: ^a.", arg); 280 return; 281 282 ARG (1): /* topic name, immediately follows the command name. */ 283 if length (arg) + length (topic_name) >= 64 284 then do; 285 call complain (error_table_$bad_arg, myname, 286 "Topic name ""^a ^a"" exceeds the 64 character limit.", topic_name, arg); 287 return; 288 end; 289 if length (topic_name) ^= 0 290 then topic_name = topic_name || " "; 291 topic_name = topic_name || ltrim (rtrim (arg)); 292 accept_control_argument = "1"b; 293 control_argument_idx = 1; 294 goto NEXT_1; 295 296 ARG (2): 297 call absolute_pathname_ (arg, output_file_path, code); 298 if code ^= 0 299 then do; 300 call complain (code, myname, "Output file pathname argument ^a.", arg); 301 return; 302 end; 303 accept_control_argument = "1"b; 304 control_argument_idx = 0; 305 goto NEXT_1; 306 307 ARG (4): 308 call absolute_pathname_$add_suffix (arg, "db", mrds_database_path, code); 309 if code ^= 0 310 then do; 311 call complain (code, myname, "Data base pathname argument ^a.", arg); 312 return; 313 end; 314 accept_control_argument = "1"b; 315 control_argument_idx = 0; 316 goto NEXT_1; 317 318 NEXT_1: 319 end; 320 else if ^accept_control_argument 321 then do; 322 323 /*** A control argument was specified, but the command was not expecting 324* a control argument at this point. It was expecting the argument 325* associated with control_argument(control_argument_idx), which is 326* described in argument_type (control_argument_idx). 327* It should never be the case that accept_control_argument is off and 328* control_argument_idx is equal to 0. */ 329 330 call complain (error_table_$noarg, myname, "^a must be followed by a^[n^] ^a.", 331 control_argument (control_argument_idx), 332 (index ("aeiouh", substr (argument_type (control_argument_idx), 1, 1)) > 0), 333 argument_type (control_argument_idx)); 334 return; 335 end; 336 else do; 337 338 /*** The argument is a control argument and it is expected. Find the control 339* argument in the control_argument array. The index into this array identifies 340* the case to process in the following case statement (computed goto). */ 341 342 do control_argument_idx = 2 to hbound (control_argument, 1) 343 while (control_argument (control_argument_idx) ^= arg); 344 end; 345 if control_argument_idx > hbound (control_argument, 1) 346 then do; 347 call complain (error_table_$badopt, myname, "^a", arg); 348 return; 349 end; 350 351 goto CONTROL_ARG (control_argument_idx); 352 353 /*** Case of control argument with the index control_argument_idx. In each 354* case where an argument is expected to follow the control argument, 355* accept_control_argument is turned off so that an error occurs if the 356* next argument is a control argument. If no argument is expected, 357* accept_control_argument is turned on, meaning that control arguments are 358* allowed, and control_argument_idx is set to 0, indicating that there is 359* no control argument expecting an argument. */ 360 361 362 CONTROL_ARG (2): 363 CONTROL_ARG (3): /* -output_file, -of */ 364 output_file_sw = "1"b; 365 accept_control_argument = "0"b; 366 control_argument_idx = 2; 367 goto NEXT_ARG; 368 369 CONTROL_ARG (4): 370 CONTROL_ARG (5): /* -database_pathname, -dbpn */ 371 database_path_sw = "1"b; 372 accept_control_argument = "0"b; 373 control_argument_idx = 4; 374 goto NEXT_ARG; 375 376 CONTROL_ARG (6): 377 CONTROL_ARG (7): /* -description, -desc */ 378 display_info.text.description_flag = "1"b; 379 accept_control_argument = "1"b; 380 control_argument_idx = 0; 381 goto NEXT_ARG; 382 383 CONTROL_ARG (8): 384 CONTROL_ARG (9): /* -audience, -aud */ 385 display_info.text.audience_flag = "1"b; 386 accept_control_argument = "1"b; 387 control_argument_idx = 0; 388 goto NEXT_ARG; 389 390 CONTROL_ARG (10): 391 CONTROL_ARG (11): /* -table_of_contents, -toc */ 392 display_info.text.table_of_contents_flag = "1"b; 393 accept_control_argument = "1"b; 394 control_argument_idx = 0; 395 goto NEXT_ARG; 396 397 CONTROL_ARG (12): 398 CONTROL_ARG (13): /* -new_features, -nf */ 399 display_info.text.new_features_flag = "1"b; 400 accept_control_argument = "1"b; 401 control_argument_idx = 0; 402 goto NEXT_ARG; 403 404 CONTROL_ARG (14): /* "" */ 405 goto NEXT_ARG; 406 407 CONTROL_ARG (15): 408 CONTROL_ARG (16): /* -all, -a */ 409 string (display_info.text) = copy ("1"b, length (string (display_info.text))); 410 string (display_info.header) = copy ("1"b, length (string (display_info.header))); 411 display_info.header.topics_flag = "0"b; 412 /* Value of this flag is set depending on whether partial matches are selected. */ 413 accept_control_argument = "1"b; 414 control_argument_idx = 0; 415 goto NEXT_ARG; 416 417 CONTROL_ARG (17): 418 CONTROL_ARG (18): /* -allow_partial_match, -acm */ 419 partial_matches_allowed = "1"b; 420 dont_allow_partial_matches = "0"b; 421 display_info.header.topics_flag = "1"b; 422 accept_control_argument = "1"b; 423 control_argument_idx = 0; 424 goto NEXT_ARG; 425 426 CONTROL_ARG (19): 427 CONTROL_ARG (20): /* -dont_allow_partial_match, -dacm */ 428 partial_matches_allowed = "0"b; 429 dont_allow_partial_matches = "1"b; 430 display_info.header.topics_flag = "0"b; 431 accept_control_argument = "1"b; 432 control_argument_idx = 0; 433 goto NEXT_ARG; 434 435 CONTROL_ARG (21): 436 CONTROL_ARG (22): /* -no_description, -nd */ 437 display_info.text.description_flag = "0"b; 438 accept_control_argument = "1"b; 439 control_argument_idx = 0; 440 goto NEXT_ARG; 441 442 CONTROL_ARG (23): 443 CONTROL_ARG (24): /* -no_audience, -no_aud */ 444 display_info.text.audience_flag = "0"b; 445 accept_control_argument = "1"b; 446 control_argument_idx = 0; 447 goto NEXT_ARG; 448 449 CONTROL_ARG (25): 450 CONTROL_ARG (26): /* -no_table_of_contents, -no_toc */ 451 display_info.text.table_of_contents_flag = "0"b; 452 accept_control_argument = "1"b; 453 control_argument_idx = 0; 454 goto NEXT_ARG; 455 456 CONTROL_ARG (27): 457 CONTROL_ARG (28): /* -no_new_features, -nnf */ 458 display_info.text.new_features_flag = "0"b; 459 accept_control_argument = "1"b; 460 control_argument_idx = 0; 461 goto NEXT_ARG; 462 463 NEXT_ARG: 464 ; 465 end; 466 end ARGUMENT_PROCESSING_LOOP; 467 468 /* format: ^indblkcom,indcomtxt */ 469 470 if control_argument_idx ^= 0 & ^accept_control_argument 471 then do; 472 473 /*** An argument was expected since control_argument_idx is non-zero, and 474* the argument was not optional, since accept_control_argument is off. */ 475 476 call complain (error_table_$noarg, myname, "^a must be followed by a^[n^] ^a.", 477 control_argument (control_argument_idx), 478 (index ("aeiouh", substr (argument_type (control_argument_idx), 1, 1)) > 0), 479 argument_type (control_argument_idx)); 480 return; 481 end; 482 483 /**** End of argument processing. Execute the command. */ 484 485 on cleanup call cleanup_all; 486 487 /*** Prepare to access the online_doc data base by setting MRDS scope and/or 488* opening the data base. */ 489 490 call online_doc_db_index$return_index (current_mrds_dbi); 491 492 if database_path_sw 493 then mrds_dbi = 0; /* To guarantee opening a new database. */ 494 else mrds_dbi = current_mrds_dbi; /* Continue using same opening */ 495 496 if mrds_dbi = 0 497 then do; 498 499 /*** The online_doc data base has not been opened yet in this process. Open it. */ 500 501 call open_data_base (mrds_database_path, mrds_dbi, code); 502 if code ^= 0 503 then call cleanup_and_abort (code, 504 "^/^10xThe data base is temporarily out of service. Try again shortly.^/^10xIf this problem persists, see your administrator.^s" 505 , ""); 506 end; 507 508 /*** Set the MRDS scope to allow this opening to read and to prevent nothing */ 509 510 call dsl_$set_scope_all (mrds_dbi, 1, 0, 30, code); 511 if code ^= 0 512 then if code = mrds_error_$invalid_db_index 513 then do; 514 515 /*** The index held by online_doc_db_index is incorrect. Reset it to zero and 516* re-open the data base. */ 517 518 call online_doc_db_index$set_index (0); 519 call open_data_base (mrds_database_path, mrds_dbi, code); 520 if code ^= 0 521 then call cleanup_and_abort (code, 522 "^/^10xThe data base is temporarily out of service. Try again shortly.^/^10xIf this problem persists, see your administrator.^s" 523 , ""); 524 call dsl_$set_scope_all (mrds_dbi, 1, 0, 30, code); 525 end; 526 527 if code ^= 0 528 then call cleanup_and_abort (code, 529 "^/^10xThe data base is temporarily out of service. Try again shortly.^/^10xIf this problem persists, see your administrator.^s" 530 , ""); 531 mrds_scope_set = "1"b; 532 533 /*** Canonicalize topic_name before searching */ 534 535 do while (index (topic_name, " ") ^= 0); /* reduce double-blanks to single */ 536 temp_topic_name = after (topic_name, " "); 537 topic_name = before (topic_name, " ") || " " || temp_topic_name; 538 end; 539 topic_name = translate (topic_name, LOWER_CASE_ALPHA, UPPER_CASE_ALPHA); 540 541 /*** Search for topic_name in the entry_name_rel relation. */ 542 543 number_of_manuals = 0; 544 545 call dsl_$retrieve (mrds_dbi, "-range (x entry_name_rel) -select x.manual_number -where x.entry_name = .V.", 546 topic_name, manual_number, code); 547 548 if code ^= 0 549 then do; 550 551 /*** No exact match was found for the given topic_name. Search for 552* partial matches if the user so requests. This search is a linear 553* search of the entire entry_name_rel relation. */ 554 555 if code ^= mrds_error_$tuple_not_found 556 then call cleanup_and_abort (code, 557 "^/This programming error occurred while searching for ^a.^/Please report this error to your adminstrator." 558 , (topic_name)); 559 560 code = 0; 561 if ^partial_matches_allowed & ^dont_allow_partial_matches 562 then do; 563 call command_query_$yes_no (yes_sw, 0, myname, 564 "There is no exact match for the topic ""^a"". Do you want^/to see if the topic you've asked about partially matches any^/topics in the data base?" 565 , 566 "Cannot find the topic ""^a"". Do you want to search for^/partial matches (this can be a time-consuming search)?" 567 , topic_name); 568 if ^yes_sw 569 then do; 570 call clean_up; 571 return; 572 end; 573 else call partial_matches; 574 end; 575 else if partial_matches_allowed 576 then call partial_matches; 577 578 end; 579 else 580 RETRIEVE_ONLY_EXACT_MATCHES: 581 do; 582 583 /*** An exact match was found for topic_name. Retrieve all other exact matches. */ 584 585 display_info.header.topics_flag = "0"b; /* No need to display what the user typed. */ 586 587 do while (code = 0 & number_of_manuals < hbound (manual_array, 1)); 588 number_of_manuals = number_of_manuals + 1; 589 manual_array (number_of_manuals) = manual_number; 590 topic_array (number_of_manuals) = ""; 591 592 call dsl_$retrieve (mrds_dbi, "-another", topic_name, manual_number, code); 593 end; 594 595 topic_array (1) = topic_name; /* Since this is an match exact, there is only one topic. */ 596 597 end RETRIEVE_ONLY_EXACT_MATCHES; 598 599 if code ^= 0 600 then if code ^= mrds_error_$tuple_not_found 601 then call cleanup_and_abort (code, 602 "^/This programming error occurred while searching for ""^a"".^/Please report this error to your adminstrator." 603 , (topic_name)); 604 605 if number_of_manuals = 0 606 then call cleanup_and_abort (error_table_$noentry, "^/No information was found about ^a.", (topic_name)); 607 608 code = 0; 609 610 611 /*** Display all manuals in manual_arrray. Use menu to selectively 612* display manuals only if there are more than one manual, the video system is 613* already on and the user requested textual information be displayed on the terminal. */ 614 615 if string (display_info.text) ^= "0"b & number_of_manuals > 1 & video_is_on & ^output_file_sw 616 then call setup_menu (use_menu_display); /* If the menu was set up correctly, use_menu_display is on. */ 617 618 if output_file_sw 619 then do; 620 621 /*** Output should be directed to output_file_path. */ 622 623 output_switch_name = "online_doc_output" || unique_chars_ ("0"b); 624 call iox_$attach_name (output_switch_name, output_ptr, ("vfile_ " || output_file_path || " -extend"), 625 null, code); 626 if code ^= 0 627 then call cleanup_and_abort (code, "^/Output could not be directed to ^a.", (output_file_path)); 628 call iox_$open (output_ptr, Stream_output, "0"b, code); 629 if code ^= 0 630 then call cleanup_and_abort (code, "^/Output could not be directed to ^a.", (output_file_path)); 631 end; 632 else output_ptr = iox_$user_output; 633 634 /*** Select and display manuals. */ 635 636 if use_menu_display 637 then call menu_display; 638 else call display; 639 640 641 call clean_up; 642 RETURN: 643 return; 644 645 open_data_base: 646 proc (mrds_database_path, mrds_dbi, code); 647 648 /* This subroutine opens the MRDS database at mrds_database_path and sets */ 649 /* the online_doc_db_index to the newly opened database's index (mrds_dbi). */ 650 651 dcl mrds_database_path char (*); 652 dcl mrds_dbi fixed bin (35); 653 dcl code fixed bin (35); 654 655 656 call dsl_$open (mrds_database_path, mrds_dbi, 1, code); 657 if code = 0 658 then call online_doc_db_index$set_index (mrds_dbi); 659 660 return; 661 662 end open_data_base; 663 664 setup_menu: 665 proc (sm_menu_was_created); 666 667 /* This subroutine sets up a menu from which manuals are to be selected for */ 668 /* display. If an error occurs, the screen is cleaned up and the parameter */ 669 /* flag sm_menu_was_created is returned with a value of "0"b. */ 670 671 dcl sm_menu_was_created bit (1) aligned; 672 dcl sm_code fixed bin (35) init (0); 673 674 sm_menu_was_created = "0"b; 675 676 headers (1) = "The following manuals match your topic."; 677 headers (2) = "On which manuals do you wish to see details? (Choose one at a time.)"; 678 trailers (1) = "Type the associated number to select a manual."; 679 trailers (2) = "-"; 680 681 /*** Get info about the current user_io window. Save a copy, use a copy for user_io and use another copy for menu. */ 682 683 user_io_window_info.version = window_position_info_version_1; 684 call iox_$control (iox_$user_io, "get_window_info", addr (user_io_window_info), sm_code); 685 if sm_code ^= 0 686 then call sm_cleanup_and_return; 687 688 current_user_io_window_info = user_io_window_info; 689 menu_window_info = user_io_window_info; 690 691 /*** Define format of menu. */ 692 693 local_menu_format.version = menu_format_version_1; 694 local_menu_format.max_width = user_io_window_info.width; 695 local_menu_format.max_height = number_of_manuals + 5; 696 local_menu_format.n_columns = 1; 697 local_menu_format.center_headers = "1"b; 698 local_menu_format.center_trailers = "1"b; 699 local_menu_format.pad = "0"b; 700 local_menu_format.pad_char = "-"; 701 702 local_menu_requirements = menu_requirements_version_1; 703 704 /*** Define an work area in which to allocate choices array. */ 705 706 unspec (local_area_info) = "0"b; 707 local_area_info.version = 1; 708 local_area_info.control.extend = "1"b; 709 local_area_info.owner = myname; 710 local_area_info.size = sys_info$max_seg_size; 711 local_area_info.areap = null; 712 call define_area_ (addr (local_area_info), sm_code); 713 if sm_code ^= 0 714 then call sm_cleanup_and_return; 715 work_area_ptr = local_area_info.areap; 716 717 /*** Allocate array of choices */ 718 719 number_of_options = number_of_manuals + 1; 720 alloc choices in (work_area); 721 722 /*** Carve out menu i/o window from user i/o window. If there is not at 723* least five lines for the display window, don't use menu. */ 724 725 if user_io_window_info.height > local_menu_format.max_height + 5 726 then do; 727 728 /*** The current user_io window is large enough to fit a menu window and 729* a moderately sized (at least 5 lines) user_io window. Before shrinking 730* the user_io window to make room for the menu window, clear the whole 731* current user_io window, in effect clearing the new user_io window and the new 732* menu window at the same time. */ 733 734 call window_$clear_window (iox_$user_io, sm_code); 735 if sm_code ^= 0 736 then call sm_cleanup_and_return; 737 738 /*** Set up the origins and heights of the menu and user_io windows. The 739* menu window will begin where the existing user_io window begins; the new 740* user_io window will shrink, taking up what's left of the existing user_io window. */ 741 742 menu_window_info.extent.height = local_menu_format.max_height; 743 user_io_window_info.origin.line = menu_window_info.origin.line + menu_window_info.extent.height; 744 user_io_window_info.extent.height = 745 user_io_window_info.extent.height - menu_window_info.extent.height; 746 call iox_$control (iox_$user_io, "set_window_info", addr (user_io_window_info), sm_code); 747 if sm_code ^= 0 748 then call sm_cleanup_and_return; 749 750 /*** Create the menu window. An iocb is needed first. */ 751 752 menu_io_switch_name = "menu_i/o" || unique_chars_ ("0"b); 753 call iox_$find_iocb (menu_io_switch_name, menu_io_ptr, sm_code); 754 if sm_code ^= 0 755 then call sm_cleanup_and_return; 756 757 call window_$create (video_data_$terminal_iocb, addr (menu_window_info), menu_io_ptr, sm_code); 758 if sm_code ^= 0 759 then call sm_cleanup_and_return; 760 761 /*** Set up contents of menu. */ 762 763 do choices_idx = 1 to number_of_manuals; 764 call dsl_$retrieve (mrds_dbi, 765 "-range (x full_name_rel) -select x.full_name -where x.manual_number = .V.", 766 manual_array (choices_idx), choices (choices_idx), sm_code); 767 end; 768 769 choices (number_of_options) = "None of the above / No More"; 770 771 do choices_idx = 1 to number_of_manuals; 772 choices (choices_idx) = translate (choices (choices_idx), " ", "_"); 773 end; 774 call menu_$create (choices, headers, trailers, addr (local_menu_format), MENU_OPTION_KEYS, 775 work_area_ptr, addr (local_menu_requirements), menu_ptr, sm_code); 776 if sm_code ^= 0 777 then call sm_cleanup_and_return; 778 779 call menu_$display (menu_io_ptr, menu_ptr, sm_code); 780 if sm_code ^= 0 781 then call sm_cleanup_and_return; 782 783 sm_menu_was_created = "1"b; 784 end; 785 786 SM_RETURN: 787 return; 788 789 sm_cleanup_and_return: 790 proc; 791 792 /*** Return instead of aborting because information can still be display 793* without a menu. */ 794 795 call cleanup_screen; 796 goto SM_RETURN; 797 798 end sm_cleanup_and_return; 799 800 end setup_menu; 801 802 803 menu_display: 804 proc; 805 806 /* This subroutine displays information about manuals selected from a */ 807 /* menu. The menu must already be set up (at menu_io_ptr). */ 808 809 dcl md_code fixed bin (35) init (0); 810 811 choice_flag = "1"b; 812 display_info.display_leading_blank_line = output_file_sw; 813 814 do while (choice_flag); 815 call menu_$get_choice (menu_io_ptr, menu_ptr, null, fkey, choice, md_code); 816 if md_code ^= 0 817 then call cleanup_and_abort (md_code, "Unable to get menu choice.^s", ""); 818 if fkey 819 then call window_$bell (menu_io_ptr, 0); 820 else if choice < number_of_options 821 then do; 822 manual_number = manual_array (choice); 823 call window_$clear_window (output_ptr, md_code); 824 if md_code ^= 0 825 then call complain (md_code, myname); 826 call display_doc (output_ptr, mrds_dbi, manual_number, display_info_ptr, (topic_array (choice)), 827 md_code); 828 if md_code ^= 0 829 then call complain (md_code, myname); 830 end; 831 else if choice = number_of_options 832 then do; /* No mas! No mas! Quit out of menu */ 833 choice_flag = "0"b; 834 call cleanup_screen; 835 end; 836 else call window_$bell (menu_io_ptr, 0); 837 end; 838 839 end menu_display; 840 841 842 display: 843 proc; 844 845 /* This subroutine display information about the manuals in manual_array. */ 846 /* This subroutine is used for displaying without menus. */ 847 848 dcl d_code fixed bin (35) init (0); 849 850 display_info.display_leading_blank_line = "1"b; 851 852 do manual_idx = 1 to number_of_manuals; 853 854 manual_number = manual_array (manual_idx); 855 call display_doc (output_ptr, mrds_dbi, manual_number, display_info_ptr, (topic_array (manual_idx)), 856 d_code); 857 if d_code ^= 0 858 then call complain (d_code, myname, "^/A manual could not be displayed."); 859 860 end; 861 end display; 862 863 partial_matches: 864 proc; 865 866 /* This subroutine searches for entry_names which "partially match" the */ 867 /* topic name. An entry_name is a partial match if it contains topic name. */ 868 869 code = 0; 870 display_info.header.topics_flag = "1"b; 871 872 call dsl_$retrieve (mrds_dbi, "-range (x entry_name_rel) -select x.entry_name x.manual_number", entry_name, 873 manual_number, code); 874 875 if code ^= 0 876 then if code = mrds_error_$tuple_not_found 877 then call cleanup_and_abort (error_table_$noentry, "^/The online_doc database contains no data.^s", ""); 878 else call cleanup_and_abort (code, "^/Unable to access the data base.^s", ""); 879 880 881 RETRIEVE_EACH_TUPLE_LOOP: 882 do while (code = 0 & number_of_manuals < hbound (manual_array, 1)); 883 if index (entry_name, topic_name) ^= 0 884 then do; 885 do manual_idx = 1 to number_of_manuals while (manual_array (manual_idx) ^= manual_number); 886 end; 887 if manual_idx > number_of_manuals 888 then do; 889 number_of_manuals = number_of_manuals + 1; 890 manual_array (number_of_manuals) = manual_number; 891 topic_array (number_of_manuals) = rtrim (entry_name); 892 end; 893 end; 894 895 call dsl_$retrieve (mrds_dbi, "-another", entry_name, manual_number, code); 896 897 end RETRIEVE_EACH_TUPLE_LOOP; 898 899 return; 900 901 end partial_matches; 902 903 /* cleanup procedures */ 904 905 cleanup_and_abort: 906 proc (p_code, p_err_msg, p_err_msg_arg); 907 908 dcl p_code fixed bin (35); 909 dcl p_err_msg char (*) var; 910 dcl p_err_msg_arg char (*); 911 912 if video_is_on 913 then call cleanup_screen; 914 call clean_up; 915 call complain (p_code, myname, p_err_msg, p_err_msg_arg); 916 goto RETURN; 917 918 end cleanup_and_abort; 919 920 cleanup_all: 921 proc; 922 923 call cleanup_screen; 924 call clean_up; 925 926 end cleanup_all; 927 928 clean_up: 929 proc; 930 931 dcl cu_code fixed bin (35) init (0); 932 933 if output_ptr ^= null & output_file_sw 934 then do; 935 call iox_$close (output_ptr, (cu_code)); 936 call iox_$detach_iocb (output_ptr, (cu_code)); 937 end; 938 939 if mrds_scope_set 940 then call dsl_$dl_scope_all (mrds_dbi, (cu_code)); 941 if current_mrds_dbi ^= 0 & current_mrds_dbi ^= mrds_dbi 942 then call dsl_$close (current_mrds_dbi, (cu_code)); 943 if work_area_ptr ^= null 944 then call release_area_ (work_area_ptr); 945 946 end clean_up; 947 948 cleanup_screen: 949 proc; 950 951 if video_is_on 952 then do; 953 if menu_io_ptr ^= null () 954 then call window_$destroy (menu_io_ptr, (0)); 955 if current_user_io_window_info.version = window_position_info_version_1 956 then call iox_$control (iox_$user_io, "set_window_info", addr (current_user_io_window_info), (0)); 957 if menu_io_ptr ^= null 958 then call window_$clear_window (iox_$user_io, code); 959 end; 960 961 962 end cleanup_screen; 963 964 965 966 1 1 /* BEGIN INCLUDE FILE display_doc_info.incl.pl1 */ 1 2 1 3 /* this file contains the declarations for the flags, etc. needed by 1 4*display_doc. 1 5* 1 6*HISTORY: 1 7*Written by Jim Paradise, 09/29/80 1 8*Modified: 1 9*81-03-05 by M. Pierret to lengthen to two words. 1 10*81-10-19 by M. Pierret changing name from display_doc_data to display_doc_info, 1 11* display_flags to display_info. Added topics_flag for displaying 1 12* selected topics (for wdoc). 1 13*83-09-01 by M. Pierret adding display_leading_blank_line. 1 14*83-09-20 by M. Pierret removing one bit from pad1. 1 15*-----------------------------------------------------------------------------*/ 1 16 /* format: style2 */ 1 17 1 18 dcl display_info_ptr ptr; 1 19 1 20 dcl 1 display_info aligned based (display_info_ptr), 1 21 2 header unal, 1 22 3 order_number_flag 1 23 bit (1), 1 24 3 revision_flag bit (1), 1 25 3 full_name_flag bit (1), 1 26 3 short_name_flag bit (1), 1 27 3 release_supported_flag 1 28 bit (1), 1 29 3 topics_flag bit (1), 1 30 2 pad1 bit (30) unal, 1 31 2 text unal, 1 32 3 description_flag bit (1), 1 33 3 audience_flag bit (1), 1 34 3 table_of_contents_flag 1 35 bit (1), 1 36 3 new_features_flag 1 37 bit (1), 1 38 2 display_leading_blank_line 1 39 bit (1) unal, 1 40 2 pad2 bit (31) unal; 1 41 1 42 /* END INCLUDE FILE display_doc_info.incl.pl1 */ 967 968 2 1 /* begin include fine window_dcls.incl.pl1 BIM June 1981 */ 2 2 /* Modified 9 October 1983 by Jon A. Rochlis to add window_$edit_line. */ 2 3 2 4 /* format: style3 */ 2 5 2 6 declare window_$bell entry (pointer, fixed binary (35)); 2 7 declare window_$clear_region 2 8 entry (pointer, fixed binary, fixed binary, fixed binary, fixed binary, fixed binary (35)); 2 9 declare window_$clear_to_end_of_line 2 10 entry (pointer, fixed binary (35)); 2 11 declare window_$clear_to_end_of_window 2 12 entry (pointer, fixed binary (35)); 2 13 declare window_$clear_window 2 14 entry (pointer, fixed binary (35)); 2 15 declare window_$delete_chars 2 16 entry (pointer, fixed binary, fixed binary (35)); 2 17 declare window_$get_cursor_position 2 18 entry (pointer, fixed binary, fixed binary, fixed binary (35)); 2 19 2 20 /* Call window_$get_echoed_chars (iocb_ptr, n_to_read, read_buffer, n_read, read_break, code); */ 2 21 2 22 declare window_$get_echoed_chars 2 23 entry (pointer, fixed binary (21), character (*), fixed binary (21), character (1) var, 2 24 fixed binary (35)); 2 25 declare window_$get_unechoed_chars 2 26 entry (pointer, fixed binary (21), character (*), fixed binary (21), character (1) var, 2 27 fixed binary (35)); 2 28 declare window_$insert_text entry (pointer, character (*), fixed binary (35)); 2 29 declare window_$overwrite_text 2 30 entry (pointer, character (*), fixed binary (35)); 2 31 declare window_$position_cursor 2 32 entry (pointer, fixed binary, fixed binary, fixed binary (35)); 2 33 2 34 /* Call window_$position_cursor_rel (iocb_ptr, delta_line, delta_column, code); */ 2 35 2 36 declare window_$position_cursor_rel 2 37 entry (pointer, fixed binary, fixed binary, fixed binary (35)); 2 38 2 39 /* Call window_$scroll_region (iocb_ptr, first_line_of_region, n_lines_of_region, distance_to_scroll_region_negative_is_up, 2 40* code); */ 2 41 2 42 declare window_$scroll_region 2 43 entry (pointer, fixed binary, fixed binary, fixed binary, fixed binary (35)); 2 44 declare window_$sync entry (pointer, fixed binary (35)); 2 45 2 46 /* Call window_$write_raw_text (iocb_ptr, text_string, code); */ 2 47 2 48 declare window_$write_raw_text 2 49 entry (pointer, character (*), fixed binary (35)); 2 50 2 51 /* Call window_$write_sync_read (iocb_ptr, prompt_string, n_to_read, read_buffer, n_read, break_char, code); */ 2 52 2 53 declare window_$write_sync_read 2 54 entry (pointer, character (*), fixed bin (21), character (*), fixed binary (21), 2 55 character (1) var, fixed binary (35)); 2 56 2 57 /* Call window_$change_line (iocb_ptr, new_line, code); */ 2 58 2 59 declare window_$change_line entry (pointer, fixed binary, fixed binary (35)); 2 60 2 61 /* Call window_$change_column (iocb_ptr, new_column, code); */ 2 62 2 63 declare window_$change_column 2 64 entry (pointer, fixed binary, fixed binary (35)); 2 65 2 66 /* Call window_$get_one_unechoed (iocb_ptr, char_or_len_0, block_flag, code); */ 2 67 declare ( 2 68 window_$get_one_unechoed, 2 69 window_$get_one_unechoed_char 2 70 ) entry (pointer, character (1) var, bit (1) aligned, fixed binary (35)); 2 71 2 72 declare window_$create entry (pointer, pointer, pointer, fixed binary (35)); 2 73 2 74 declare window_$destroy entry (pointer, fixed binary (35)); 2 75 2 76 declare window_$edit_line entry (pointer, pointer, pointer, fixed bin(21), fixed bin(21), fixed bin(35)); 2 77 2 78 /* call window_$edit_line (iocb_ptr, window_edit_line_info_ptr, buffer_ptr, 2 79* buffer_len, n_returned, code); */ 2 80 2 81 2 82 /* end include file window_dcls.incl.pl1 */ 969 970 3 1 /* BEGIN INCLUDE FILE menu_dcls.incl.pl1 3 2* declarations for the menu_ subroutines MTB 493 3 3* James R. Davis 26 Jan 81 to 20 Februrary 81 3 4**/ 3 5 3 6 /* format: off */ 3 7 3 8 dcl menu_$create entry ( 3 9 (*) char (*) varying, /* input: choices */ 3 10 (*) char (*) varying, /* input: headers */ 3 11 (*) char (*) varying, /* input: trailers */ 3 12 pointer, /* input: to format info */ 3 13 (*) char (1) unal, /* input: keys to use */ 3 14 pointer, /* input: to area */ 3 15 pointer, /* input: to needs str. */ 3 16 pointer, /* to menu: output */ 3 17 fixed bin (35) /* code */ 3 18 ); 3 19 3 20 dcl menu_$display entry ( 3 21 pointer, /* window */ 3 22 pointer, /* menu */ 3 23 fixed bin (35) /* code */ 3 24 ); 3 25 3 26 dcl menu_$get_choice entry ( 3 27 pointer, /* window */ 3 28 pointer, /* menu */ 3 29 pointer, /* to function key info */ 3 30 bit (1) aligned, /* function key hi: output */ 3 31 fixed bin, /* output: selection number */ 3 32 fixed bin (35) /* output: code */ 3 33 ); 3 34 3 35 dcl menu_$describe entry ( 3 36 pointer, /* menu */ 3 37 pointer, /* needs */ 3 38 fixed bin (35) /* code */ 3 39 ); 3 40 3 41 dcl menu_$destroy entry ( 3 42 pointer, /* menu */ 3 43 fixed bin (35) /* code */ 3 44 ); 3 45 3 46 dcl menu_$store entry ( 3 47 character (*), 3 48 character (*), 3 49 character (*), 3 50 bit (1) aligned, 3 51 pointer, 3 52 fixed bin (35)); 3 53 3 54 dcl menu_$retrieve entry ( 3 55 character (*), 3 56 character (*), 3 57 character (*), 3 58 pointer, 3 59 pointer, 3 60 fixed bin (35)); 3 61 dcl menu_$delete entry ( 3 62 character (*), 3 63 character (*), 3 64 character (*), 3 65 fixed binary (35)); 3 66 3 67 dcl menu_$list entry ( 3 68 character (*), 3 69 character (*), 3 70 character (*), 3 71 pointer, 3 72 fixed bin, 3 73 pointer, 3 74 fixed bin (35)); 3 75 3 76 dcl 1 menu_format aligned based (menu_format_ptr), 3 77 2 version fixed bin, 3 78 2 constraints, 3 79 3 max_width fixed bin, 3 80 3 max_height fixed bin, 3 81 2 n_columns fixed bin, 3 82 2 flags, 3 83 3 center_headers bit (1) unal, 3 84 3 center_trailers bit (1) unal, 3 85 3 pad bit (34) unal, 3 86 2 pad_char char (1); 3 87 3 88 dcl 1 menu_requirements aligned based (menu_requirements_ptr), 3 89 2 version fixed bin, 3 90 2 lines_needed fixed bin, 3 91 2 width_needed fixed bin, 3 92 2 n_options fixed bin; 3 93 3 94 dcl menu_format_ptr pointer; 3 95 dcl menu_requirements_ptr pointer; 3 96 3 97 dcl (menu_format_version_1, menu_requirements_version_1) 3 98 fixed bin internal static init (1) options (constant); 3 99 3 100 dcl MENU_OPTION_KEYS (35) char (1) unal internal static 3 101 options (constant) init 3 102 ("1", "2", "3", "4", "5", "6", "7", "8", "9", 3 103 "A", "B", "C", "D", "E", "F", "G", "H", "I", 3 104 "J", "K", "L", "M", "N", "O", "P", "Q", "R", 3 105 "S", "T", "U", "V", "W", "X", "Y", "Z"); 3 106 3 107 /* END INCLUDE FILE ... menu_dcls.incl.pl1 */ 971 972 4 1 /* --------------- BEGIN include file iox_dcls.incl.pl1 --------------- */ 4 2 4 3 /* Written 05/04/78 by C. D. Tavares */ 4 4 /* Fixed declaration of iox_$find_iocb_n 05/07/80 by R. Holmstedt */ 4 5 /* Modified 5/83 by S. Krupp to add declarations for: iox_$open_file, 4 6* iox_$close_file, iox_$detach and iox_$attach_loud entries. */ 4 7 4 8 dcl iox_$attach_name entry (char (*), pointer, char (*), pointer, fixed bin (35)), 4 9 iox_$attach_ptr entry (pointer, char (*), pointer, fixed bin (35)), 4 10 iox_$close entry (pointer, fixed bin (35)), 4 11 iox_$control entry (pointer, char (*), pointer, fixed bin (35)), 4 12 iox_$delete_record entry (pointer, fixed bin (35)), 4 13 iox_$destroy_iocb entry (pointer, fixed bin (35)), 4 14 iox_$detach_iocb entry (pointer, fixed bin (35)), 4 15 iox_$err_not_attached entry options (variable), 4 16 iox_$err_not_closed entry options (variable), 4 17 iox_$err_no_operation entry options (variable), 4 18 iox_$err_not_open entry options (variable), 4 19 iox_$find_iocb entry (char (*), pointer, fixed bin (35)), 4 20 iox_$find_iocb_n entry (fixed bin, ptr, fixed bin(35)), 4 21 iox_$get_chars entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 4 22 iox_$get_line entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 4 23 iox_$look_iocb entry (char (*), pointer, fixed bin (35)), 4 24 iox_$modes entry (pointer, char (*), char (*), fixed bin (35)), 4 25 iox_$move_attach entry (pointer, pointer, fixed bin (35)), 4 26 iox_$open entry (pointer, fixed bin, bit (1) aligned, fixed bin (35)), 4 27 iox_$position entry (pointer, fixed bin, fixed bin (21), fixed bin (35)), 4 28 iox_$propagate entry (pointer), 4 29 iox_$put_chars entry (pointer, pointer, fixed bin (21), fixed bin (35)), 4 30 iox_$read_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 4 31 iox_$read_length entry (pointer, fixed bin (21), fixed bin (35)), 4 32 iox_$read_record entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 4 33 iox_$rewrite_record entry (pointer, pointer, fixed bin (21), fixed bin (35)), 4 34 iox_$seek_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 4 35 iox_$write_record entry (pointer, pointer, fixed bin (21), fixed bin (35)), 4 36 iox_$open_file entry(ptr, fixed bin, char(*), bit(1) aligned, fixed bin(35)), 4 37 iox_$close_file entry(ptr, char(*), fixed bin(35)), 4 38 iox_$detach entry(ptr, char(*), fixed bin(35)), 4 39 iox_$attach_loud entry(ptr, char(*), ptr, fixed bin(35)); 4 40 4 41 dcl (iox_$user_output, 4 42 iox_$user_input, 4 43 iox_$user_io, 4 44 iox_$error_output) external static pointer; 4 45 4 46 /* ---------------- END include file iox_dcls.incl.pl1 ---------------- */ 973 974 5 1 /* Begin include file ..... iox_modes.incl.pl1 */ 5 2 5 3 /* Written by C. D. Tavares, 03/17/75 */ 5 4 /* Updated 10/31/77 by CDT to include short iox mode strings */ 5 5 5 6 dcl iox_modes (13) char (24) int static options (constant) aligned initial 5 7 ("stream_input", "stream_output", "stream_input_output", 5 8 "sequential_input", "sequential_output", "sequential_input_output", "sequential_update", 5 9 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 5 10 "direct_input", "direct_output", "direct_update"); 5 11 5 12 dcl short_iox_modes (13) char (4) int static options (constant) aligned initial 5 13 ("si", "so", "sio", "sqi", "sqo", "sqio", "squ", "ksqi", "ksqo", "ksqu", "di", "do", "du"); 5 14 5 15 dcl (Stream_input initial (1), 5 16 Stream_output initial (2), 5 17 Stream_input_output initial (3), 5 18 Sequential_input initial (4), 5 19 Sequential_output initial (5), 5 20 Sequential_input_output initial (6), 5 21 Sequential_update initial (7), 5 22 Keyed_sequential_input initial (8), 5 23 Keyed_sequential_output initial (9), 5 24 Keyed_sequential_update initial (10), 5 25 Direct_input initial (11), 5 26 Direct_output initial (12), 5 27 Direct_update initial (13)) fixed bin int static options (constant); 5 28 5 29 /* End include file ..... iox_modes.incl.pl1 */ 975 976 6 1 /* BEGIN INCLUDE FILE area_info.incl.pl1 12/75 */ 6 2 6 3 dcl area_info_version_1 fixed bin static init (1) options (constant); 6 4 6 5 dcl area_infop ptr; 6 6 6 7 dcl 1 area_info aligned based (area_infop), 6 8 2 version fixed bin, /* version number for this structure is 1 */ 6 9 2 control aligned like area_control, /* control bits for the area */ 6 10 2 owner char (32) unal, /* creator of the area */ 6 11 2 n_components fixed bin, /* number of components in the area (returned only) */ 6 12 2 size fixed bin (18), /* size of the area in words */ 6 13 2 version_of_area fixed bin, /* version of area (returned only) */ 6 14 2 areap ptr, /* pointer to the area (first component on multisegment area) */ 6 15 2 allocated_blocks fixed bin, /* number of blocks allocated */ 6 16 2 free_blocks fixed bin, /* number of free blocks not in virgin */ 6 17 2 allocated_words fixed bin (30), /* number of words allocated in the area */ 6 18 2 free_words fixed bin (30); /* number of words free in area not in virgin */ 6 19 6 20 dcl 1 area_control aligned based, 6 21 2 extend bit (1) unal, /* says area is extensible */ 6 22 2 zero_on_alloc bit (1) unal, /* says block gets zerod at allocation time */ 6 23 2 zero_on_free bit (1) unal, /* says block gets zerod at free time */ 6 24 2 dont_free bit (1) unal, /* debugging aid, turns off free requests */ 6 25 2 no_freeing bit (1) unal, /* for allocation method without freeing */ 6 26 2 system bit (1) unal, /* says area is managed by system */ 6 27 2 pad bit (30) unal; 6 28 6 29 /* END INCLUDE FILE area_info.incl.pl1 */ 977 978 7 1 /* BEGIN INCLUDE FILE ... window_control_info.incl.pl1 JRD */ 7 2 /* format: style3 */ 7 3 7 4 /* Modified 26 January 1982 by William York to add the set_more_handler 7 5* and reset_more_handler control orders. */ 7 6 /* Modified October 1982 by WMY to add set and get_token_characters, 7 7* set and get_more_prompt. */ 7 8 /* Modified February 1983 by WMY to add the line_editor_key_binding_info 7 9* structure. */ 7 10 /* Modified 30 September 1983 by Jon A. Rochlis to add the origin.column for 7 11* partial screen width windows. */ 7 12 /* Modified 9 October 1983 by JR to add version 1 window_edit_line_info. 7 13* This should be removed when window_info.incl.pl1 is created. */ 7 14 /* Modified 29 February 1984 by Barmar to add version 1 7 15* get_editor_key_bindings_info. */ 7 16 /* Modified 1 March 1984 by Barmar to add version 1 7 17* set_editor_key_bindings_info. */ 7 18 /* Modified 2 March 1984 by Barmar to upgrade to version 3 7 19* line_editor_key_bindings_info, which includes the name, description, and 7 20* info path */ 7 21 7 22 /* structure for the set_window_info and get_window_info 7 23* control orders. */ 7 24 7 25 dcl 1 window_position_info 7 26 based (window_position_info_ptr), 7 27 2 version fixed bin, 7 28 2 origin, 7 29 3 column fixed bin, 7 30 3 line fixed bin, 7 31 2 extent, 7 32 3 width fixed bin, 7 33 3 height fixed bin; 7 34 7 35 dcl (window_position_info_version, window_position_info_version_1) 7 36 fixed bin internal static init (1) options (constant); 7 37 dcl window_position_info_ptr 7 38 pointer; 7 39 7 40 /* structure for the set_window_status and get_window_status 7 41* control orders */ 7 42 7 43 declare window_status_info_ptr 7 44 pointer; 7 45 declare 1 window_status_info 7 46 aligned based (window_status_info_ptr), 7 47 2 version fixed bin, 7 48 2 status_string bit (36) aligned; /* string (window_status) */ 7 49 /* see window_status.incl.pl1 for the contents of this string */ 7 50 7 51 7 52 declare (window_status_version, window_status_version_1) 7 53 fixed bin internal static init (1) options (constant); 7 54 7 55 /* info structure for the set_more_responses and get_more_responses control 7 56* orders */ 7 57 7 58 7 59 dcl 1 more_responses_info 7 60 aligned based (more_responses_info_ptr), 7 61 2 version fixed bin, 7 62 2 n_yeses fixed bin, /* how many valid characters in the strings below */ 7 63 2 n_noes fixed bin, 7 64 2 yeses char (32) unaligned, 7 65 2 noes char (32) unaligned; 7 66 7 67 dcl (more_responses_info_version_1, more_responses_version) 7 68 fixed bin internal static init (1) options (constant); 7 69 dcl more_responses_info_ptr 7 70 pointer; 7 71 7 72 /* structure for the set_break_table and get_break_table 7 73* control orders */ 7 74 7 75 declare break_table_ptr pointer; 7 76 declare 1 break_table_info aligned based (break_table_ptr), 7 77 2 version fixed bin, 7 78 2 breaks (0:127) bit (1) unaligned; 7 79 7 80 declare (break_table_info_version, break_table_info_version_1) 7 81 fixed bin init (1) internal static options (constant); 7 82 7 83 declare 1 more_handler_info aligned based (more_handler_info_ptr), 7 84 2 version fixed bin, 7 85 2 flags unaligned, 7 86 3 old_handler_valid 7 87 bit(1), 7 88 3 pad bit(35), 7 89 2 more_handler entry (pointer, bit(1) aligned), 7 90 2 old_more_handler entry (pointer, bit(1) aligned); 7 91 7 92 declare more_handler_info_ptr pointer; 7 93 7 94 declare (more_handler_info_version, more_handler_info_version_3) 7 95 fixed bin internal static options (constant) init (3); 7 96 7 97 declare 1 token_characters_info aligned based (token_characters_info_ptr), 7 98 2 version char(8), 7 99 2 token_character_count 7 100 fixed bin, 7 101 2 token_characters 7 102 char (128) unaligned; 7 103 7 104 declare token_characters_info_ptr pointer; 7 105 7 106 declare token_characters_info_version_1 char(8) internal static options (constant) init ("wtci0001"); 7 107 7 108 declare 1 more_prompt_info aligned based (more_prompt_info_ptr), 7 109 2 version char(8), 7 110 2 more_prompt char(80); 7 111 7 112 declare more_prompt_info_ptr pointer; 7 113 7 114 declare more_prompt_info_version_1 char(8) static options (constant) init ("wsmp0001"); 7 115 7 116 /* Line editor stuff ... */ 7 117 7 118 dcl line_editor_key_binding_info_ptr 7 119 pointer; 7 120 7 121 dcl line_editor_binding_count 7 122 fixed bin; 7 123 dcl line_editor_longest_sequence 7 124 fixed bin; 7 125 /* For each binding, action defines what to do for that sequence. Constants 7 126* are defined in window_editor_values.incl.pl1. Only if action is set to 7 127* EXTERNAL_ROUTINE does the editor_routine entry variable get examined. */ 7 128 7 129 dcl 1 line_editor_key_binding_info 7 130 aligned based (line_editor_key_binding_info_ptr), 7 131 2 version char(8), 7 132 2 binding_count fixed bin, 7 133 2 longest_sequence fixed bin, 7 134 2 bindings (line_editor_binding_count refer 7 135 (line_editor_key_binding_info.binding_count)), 7 136 3 sequence char(line_editor_longest_sequence refer 7 137 (line_editor_key_binding_info.longest_sequence)) varying, 7 138 3 action fixed bin, 7 139 3 numarg_action fixed binary, 7 140 3 editor_routine entry (pointer, fixed bin(35)), 7 141 3 name char (64) varying unaligned, 7 142 3 description char (256) varying unaligned, 7 143 3 info_path unaligned, 7 144 4 info_dir char (168), 7 145 4 info_entry char (32); 7 146 7 147 7 148 dcl line_editor_key_binding_info_version_3 7 149 char(8) static options (constant) init ("lekbi003"); 7 150 7 151 dcl 1 get_editor_key_bindings_info aligned based (get_editor_key_bindings_info_ptr), 7 152 2 version char (8), 7 153 2 flags, 7 154 3 entire_state bit (1) unaligned, 7 155 3 mbz bit (35) unaligned, 7 156 2 key_binding_info_ptr ptr, 7 157 2 entire_state_ptr ptr; 7 158 7 159 dcl get_editor_key_bindings_info_ptr ptr; 7 160 dcl get_editor_key_bindings_info_version_1 char (8) int static options (constant) init ("gekbi_01"); 7 161 7 162 dcl 1 set_editor_key_bindings_info aligned 7 163 based (set_editor_key_bindings_info_ptr), 7 164 2 version char (8), 7 165 2 flags, 7 166 3 replace bit (1) unaligned, 7 167 3 update bit (1) unaligned, 7 168 3 mbz bit (34) unaligned, 7 169 2 key_binding_info_ptr ptr; 7 170 7 171 dcl set_editor_key_bindings_info_ptr ptr; 7 172 dcl set_editor_key_bindings_info_version_1 char (8) int static options (constant) init ("sekbi_01"); 7 173 7 174 /* This should be moved to window_info.incl.pl1 when that include file is 7 175* created. JR 2/1/84 */ 7 176 7 177 dcl 1 window_edit_line_info 7 178 based (window_edit_line_info_ptr), 7 179 2 version char (8), 7 180 2 line_ptr ptr, 7 181 2 line_length fixed bin (21); /* later we will hack initial cursor position, key bindings, etc. */ 7 182 7 183 dcl window_edit_line_info_version_1 7 184 char (8) static options (constant) init ("wedl0001"); 7 185 7 186 dcl window_edit_line_info_ptr 7 187 ptr; 7 188 7 189 /* END INCLUDE FILE window_control_info.incl.pl1 */ 979 980 981 end where_doc; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 06/18/86 1332.0 where_doc.pl1 >spec>install>1079>where_doc.pl1 967 1 10/10/83 1419.3 display_doc_info.incl.pl1 >ldd>include>display_doc_info.incl.pl1 969 2 09/12/84 0916.7 window_dcls.incl.pl1 >ldd>include>window_dcls.incl.pl1 971 3 03/27/82 0429.3 menu_dcls.incl.pl1 >ldd>include>menu_dcls.incl.pl1 973 4 05/23/83 0916.6 iox_dcls.incl.pl1 >ldd>include>iox_dcls.incl.pl1 975 5 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.incl.pl1 977 6 06/11/76 1043.4 area_info.incl.pl1 >ldd>include>area_info.incl.pl1 979 7 09/12/84 0916.7 window_control_info.incl.pl1 >ldd>include>window_control_info.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. LOWER_CASE_ALPHA 001324 automatic char(26) initial unaligned dcl 138 set ref 138* 539 MENU_OPTION_KEYS 000040 constant char(1) initial array unaligned dcl 3-100 set ref 774* Stream_output 000610 constant fixed bin(17,0) initial dcl 5-15 set ref 628* UPPER_CASE_ALPHA 001333 automatic char(26) initial unaligned dcl 139 set ref 139* 539 absolute_pathname_ 000030 constant entry external dcl 156 ref 296 absolute_pathname_$add_suffix 000032 constant entry external dcl 157 ref 307 accept_control_argument 001243 automatic bit(1) initial dcl 93 set ref 93* 261* 292* 303* 314* 320 365* 372* 379* 386* 393* 400* 413* 422* 431* 438* 445* 452* 459* 470 active_fnc_err_ 000034 constant entry external dcl 159 ref 246 addr builtin function dcl 215 ref 239 684 684 712 712 746 746 757 757 774 774 774 774 955 955 after builtin function dcl 182 ref 536 area_control based structure level 1 dcl 6-20 area_info based structure level 1 dcl 6-7 areap 16 001532 automatic pointer level 2 dcl 207 set ref 711* 715 arg based char unaligned dcl 121 set ref 267 278* 282 285* 291 296* 300* 307* 311* 342 347* arg_idx 001253 automatic fixed bin(17,0) dcl 98 set ref 264* 266* arg_len 001254 automatic fixed bin(17,0) dcl 98 set ref 266* 267 278 278 282 285 285 291 296 296 300 300 307 307 311 311 342 347 347 arg_ptr 001320 automatic pointer dcl 115 set ref 266* 267 278 282 285 291 296 300 307 311 342 347 argument_type 000450 constant varying char(64) initial array dcl 125 set ref 330 330* 476 476* audience_flag 1(01) based bit(1) level 3 packed unaligned dcl 1-20 set ref 383* 442* before builtin function dcl 182 ref 537 center_headers 4 001517 automatic bit(1) level 3 packed unaligned dcl 204 set ref 697* center_trailers 4(01) 001517 automatic bit(1) level 3 packed unaligned dcl 204 set ref 698* choice 001357 automatic fixed bin(17,0) dcl 192 set ref 815* 820 822 826 831 choice_flag 001355 automatic bit(1) initial dcl 187 set ref 187* 811* 814 833* choices based varying char(64) array dcl 196 set ref 720 764* 769* 772* 772 774* choices_idx 001360 automatic fixed bin(17,0) dcl 192 set ref 763* 764 764* 771* 772 772* choices_ptr 001560 automatic pointer dcl 209 set ref 720* 764 769 772 772 774 cleanup 001346 stack reference condition dcl 178 ref 485 code parameter fixed bin(35,0) dcl 653 in procedure "open_data_base" set ref 645 656* 657 code 001315 automatic fixed bin(35,0) dcl 108 in procedure "wdoc" set ref 245* 246 248 250* 266* 296* 298 300* 307* 309 311* 501* 502 502* 510* 511 511 519* 520 520* 524* 527 527* 545* 548 555 555* 560* 587 592* 599 599 599* 608* 624* 626 626* 628* 629 629* 869* 872* 875 875 878* 881 895* 957* com_err_ 000040 constant entry external dcl 161 ref 250 254 command_query_$yes_no 000036 constant entry external dcl 160 ref 563 complain 001342 automatic entry variable dcl 162 set ref 254* 258 278 285 300 311 330 347 476 824 828 857 915 constraints 1 001517 automatic structure level 2 unaligned dcl 204 control 1 001532 automatic structure level 2 dcl 207 control_argument 000054 constant varying char(32) initial array dcl 129 set ref 330* 342 342 345 476* control_argument_idx 001255 automatic fixed bin(17,0) dcl 98 set ref 262* 269 293* 304* 315* 330 330 330 342* 342* 345 351 366* 373* 380* 387* 394* 401* 414* 423* 432* 439* 446* 453* 460* 470 476 476 476 copy builtin function dcl 182 ref 241 407 410 cu_$af_return_arg 000044 constant entry external dcl 164 ref 245 cu_$arg_ptr 000042 constant entry external dcl 163 ref 266 cu_code 000100 automatic fixed bin(35,0) initial dcl 931 set ref 931* 935 936 939 941 current_mrds_dbi 001313 automatic fixed bin(35,0) initial dcl 108 set ref 108* 490* 494 941 941 941* current_user_io_window_info 001505 automatic structure level 1 unaligned dcl 201 set ref 688* 955 955 d_code 001636 automatic fixed bin(35,0) initial dcl 848 set ref 848* 855* 857 857* database_path_sw 001245 automatic bit(1) initial dcl 93 set ref 93* 369* 492 define_area_ 000074 constant entry external dcl 222 ref 712 description_flag 1 based bit(1) level 3 packed unaligned dcl 1-20 set ref 376* 435* display_doc 000046 constant entry external dcl 165 ref 826 855 display_info based structure level 1 dcl 1-20 set ref 240* display_info_ptr 001566 automatic pointer dcl 1-18 set ref 239* 240 241 241 242 243 376 383 390 397 407 407 410 410 411 421 430 435 442 449 456 585 615 812 826* 850 855* 870 display_leading_blank_line 1(04) based bit(1) level 2 packed unaligned dcl 1-20 set ref 812* 850* dont_allow_partial_matches 001251 automatic bit(1) initial dcl 93 set ref 93* 420* 429* 561 dsl_$close 000050 constant entry external dcl 166 ref 941 dsl_$dl_scope_all 000052 constant entry external dcl 167 ref 939 dsl_$open 000054 constant entry external dcl 168 ref 656 dsl_$retrieve 000056 constant entry external dcl 169 ref 545 592 764 872 895 dsl_$set_scope_all 000060 constant entry external dcl 170 ref 510 524 entry_name 001013 automatic char(64) unaligned dcl 88 set ref 872* 883 891 895* error_table_$active_function 000020 external static fixed bin(35,0) dcl 143 set ref 246* error_table_$bad_arg 000014 external static fixed bin(35,0) dcl 143 set ref 285* error_table_$badopt 000012 external static fixed bin(35,0) dcl 143 set ref 278* 347* error_table_$noarg 000010 external static fixed bin(35,0) dcl 143 set ref 258* 330* 476* error_table_$noentry 000022 external static fixed bin(35,0) dcl 143 set ref 605* 875* error_table_$not_act_fnc 000016 external static fixed bin(35,0) dcl 143 ref 248 extend 1 001532 automatic bit(1) level 3 packed unaligned dcl 207 set ref 708* extent 3 001512 automatic structure level 2 in structure "menu_window_info" unaligned dcl 203 in procedure "wdoc" extent 3 001500 automatic structure level 2 in structure "user_io_window_info" unaligned dcl 200 in procedure "wdoc" fkey 001356 automatic bit(1) dcl 187 set ref 815* 818 flags 4 001517 automatic structure level 2 packed unaligned dcl 204 hbound builtin function dcl 182 ref 342 345 587 881 header based structure level 2 packed unaligned dcl 1-20 set ref 241* 241 410* 410 headers 001372 automatic varying char(70) array dcl 197 set ref 676* 677* 774* height 4 001512 automatic fixed bin(17,0) level 3 in structure "menu_window_info" dcl 203 in procedure "wdoc" set ref 742* 743 744 height 4 001500 automatic fixed bin(17,0) level 3 in structure "user_io_window_info" dcl 200 in procedure "wdoc" set ref 725 744* 744 index builtin function dcl 182 ref 267 330 476 535 883 iox_$attach_name 000116 constant entry external dcl 4-8 ref 624 iox_$close 000120 constant entry external dcl 4-8 ref 935 iox_$control 000122 constant entry external dcl 4-8 ref 684 746 955 iox_$detach_iocb 000124 constant entry external dcl 4-8 ref 936 iox_$find_iocb 000126 constant entry external dcl 4-8 ref 753 iox_$open 000130 constant entry external dcl 4-8 ref 628 iox_$user_io 000134 external static pointer dcl 4-41 set ref 684* 734* 746* 955* 957* iox_$user_output 000132 external static pointer dcl 4-41 ref 632 length builtin function dcl 182 ref 241 282 282 289 407 410 line 2 001500 automatic fixed bin(17,0) level 3 in structure "user_io_window_info" dcl 200 in procedure "wdoc" set ref 743* line 2 001512 automatic fixed bin(17,0) level 3 in structure "menu_window_info" dcl 203 in procedure "wdoc" set ref 743 local_area_info 001532 automatic structure level 1 unaligned dcl 207 set ref 706* 712 712 local_display_info 001322 automatic structure level 1 dcl 117 set ref 239 local_menu_format 001517 automatic structure level 1 unaligned dcl 204 set ref 774 774 local_menu_requirements 001525 automatic structure level 1 unaligned dcl 205 set ref 702* 774 774 ltrim builtin function dcl 182 ref 291 manual_array 001257 automatic fixed bin(17,0) array dcl 98 set ref 587 589* 764* 822 854 881 885 890* manual_idx 001256 automatic fixed bin(17,0) dcl 98 set ref 852* 854 855* 885* 885* 887 manual_number 001310 automatic fixed bin(17,0) dcl 98 set ref 545* 589 592* 822* 826* 854* 855* 872* 885 890 895* max_height 2 001517 automatic fixed bin(17,0) level 3 dcl 204 set ref 695* 725 742 max_width 1 001517 automatic fixed bin(17,0) level 3 dcl 204 set ref 694* md_code 001626 automatic fixed bin(35,0) initial dcl 809 set ref 809* 815* 816 816* 823* 824 824* 826* 828 828* menu_$create 000110 constant entry external dcl 3-8 ref 774 menu_$display 000112 constant entry external dcl 3-20 ref 779 menu_$get_choice 000114 constant entry external dcl 3-26 ref 815 menu_format based structure level 1 dcl 3-76 menu_format_version_1 constant fixed bin(17,0) initial dcl 3-97 ref 693 menu_io_ptr 001556 automatic pointer dcl 209 set ref 230* 753* 757* 779* 815* 818* 836* 953 953* 957 menu_io_switch_name 001362 automatic char(32) unaligned dcl 195 set ref 752* 753* menu_ptr 001562 automatic pointer dcl 209 set ref 774* 779* 815* menu_requirements based structure level 1 dcl 3-88 menu_requirements_version_1 constant fixed bin(17,0) initial dcl 3-97 ref 702 menu_window_info 001512 automatic structure level 1 unaligned dcl 203 set ref 689* 757 757 mrds_database_path 001033 automatic char(256) unaligned dcl 89 in procedure "wdoc" set ref 234* 307* 501* 519* mrds_database_path parameter char unaligned dcl 651 in procedure "open_data_base" set ref 645 656* mrds_dbi parameter fixed bin(35,0) dcl 652 in procedure "open_data_base" set ref 645 656* 657* mrds_dbi 001314 automatic fixed bin(35,0) initial dcl 108 in procedure "wdoc" set ref 108* 492* 494* 496 501* 510* 519* 524* 545* 592* 764* 826* 855* 872* 895* 939* 941 mrds_error_$invalid_db_index 000024 external static fixed bin(35,0) dcl 143 ref 511 mrds_error_$tuple_not_found 000026 external static fixed bin(35,0) dcl 143 ref 555 599 875 mrds_scope_set 001244 automatic bit(1) initial dcl 93 set ref 93* 231* 531* 939 myname 000051 constant char(9) initial unaligned dcl 137 set ref 246* 250* 258* 258* 278* 285* 300* 311* 330* 347* 476* 563* 709 824* 828* 857* 915* n_columns 3 001517 automatic fixed bin(17,0) level 2 dcl 204 set ref 696* nargs 001311 automatic fixed bin(17,0) dcl 98 set ref 245* 256 264 new_features_flag 1(03) based bit(1) level 3 packed unaligned dcl 1-20 set ref 397* 456* null builtin function dcl 215 ref 230 232 245 624 624 711 815 815 933 943 953 957 number_of_manuals 001312 automatic fixed bin(17,0) dcl 98 set ref 543* 587 588* 588 589 590 605 615 695 719 763 771 852 881 885 887 889* 889 890 891 number_of_options 001361 automatic fixed bin(17,0) dcl 192 set ref 719* 720 769 774 820 831 online_doc_db_index$return_index 000064 constant entry external dcl 173 ref 490 online_doc_db_index$set_index 000062 constant entry external dcl 171 ref 518 657 origin 1 001512 automatic structure level 2 in structure "menu_window_info" unaligned dcl 203 in procedure "wdoc" origin 1 001500 automatic structure level 2 in structure "user_io_window_info" unaligned dcl 200 in procedure "wdoc" output_file_path 001143 automatic char(256) unaligned dcl 91 set ref 296* 624 626 629 output_file_sw 001246 automatic bit(1) initial dcl 93 set ref 93* 362* 615 618 812 933 output_ptr 001316 automatic pointer dcl 114 set ref 230* 624* 628* 632* 823* 826* 855* 933 935* 936* output_switch_name 001133 automatic char(32) unaligned dcl 90 set ref 623* 624* owner 2 001532 automatic char(32) level 2 packed unaligned dcl 207 set ref 709* p_code parameter fixed bin(35,0) dcl 908 set ref 905 915* p_err_msg parameter varying char dcl 909 set ref 905 915* p_err_msg_arg parameter char unaligned dcl 910 set ref 905 915* pad 4(02) 001517 automatic bit(34) level 3 packed unaligned dcl 204 set ref 699* pad_char 5 001517 automatic char(1) level 2 packed unaligned dcl 204 set ref 700* partial_matches_allowed 001250 automatic bit(1) initial dcl 93 set ref 93* 417* 426* 561 575 release_area_ 000076 constant entry external dcl 223 ref 943 rtrim builtin function dcl 182 ref 291 891 short_name_flag 0(03) based bit(1) level 3 packed unaligned dcl 1-20 set ref 242* size 13 001532 automatic fixed bin(18,0) level 2 dcl 207 set ref 710* sm_code 001606 automatic fixed bin(35,0) initial dcl 672 set ref 672* 684* 685 712* 713 734* 735 746* 747 753* 754 757* 758 764* 774* 776 779* 780 sm_menu_was_created parameter bit(1) dcl 671 set ref 664 674* 783* string builtin function dcl 182 set ref 240* 241* 241 407* 407 410* 410 615 substr builtin function dcl 182 ref 330 476 sys_info$max_seg_size 000070 external static fixed bin(35,0) dcl 219 ref 710 table_of_contents_flag 1(02) based bit(1) level 3 packed unaligned dcl 1-20 set ref 390* 449* temp_topic_name 000121 automatic varying char(64) dcl 85 set ref 536* 537 text 1 based structure level 2 packed unaligned dcl 1-20 set ref 407* 407 615 topic_array 000142 automatic varying char(64) array dcl 87 set ref 237* 590* 595* 826 855 891* topic_name 000100 automatic varying char(64) dcl 85 set ref 236* 282 285* 289 289* 289 291* 291 535 536 537* 537 539* 539 545* 555 563* 592* 595 599 605 883 topics_flag 0(05) based bit(1) level 3 packed unaligned dcl 1-20 set ref 243* 411* 421* 430* 585* 870* trailers 001440 automatic varying char(60) array dcl 198 set ref 678* 679* 774* translate builtin function dcl 182 ref 539 772 unique_chars_ 000072 constant entry external dcl 221 ref 623 752 unspec builtin function dcl 215 set ref 706* use_menu_display 001247 automatic bit(1) initial dcl 93 set ref 93* 615* 636 user_io_window_info 001500 automatic structure level 1 unaligned dcl 200 set ref 684 684 688 689 746 746 version 001532 automatic fixed bin(17,0) level 2 in structure "local_area_info" dcl 207 in procedure "wdoc" set ref 707* version 001517 automatic fixed bin(17,0) level 2 in structure "local_menu_format" dcl 204 in procedure "wdoc" set ref 693* version 001500 automatic fixed bin(17,0) level 2 in structure "user_io_window_info" dcl 200 in procedure "wdoc" set ref 683* version 001505 automatic fixed bin(17,0) level 2 in structure "current_user_io_window_info" dcl 201 in procedure "wdoc" set ref 229* 955 video_data_$terminal_iocb 000066 external static pointer dcl 212 set ref 232 757* video_is_on 001354 automatic bit(1) dcl 187 set ref 232* 615 912 951 width 3 001500 automatic fixed bin(17,0) level 3 dcl 200 set ref 694 window_$bell 000100 constant entry external dcl 2-6 ref 818 836 window_$clear_window 000102 constant entry external dcl 2-13 ref 734 823 957 window_$create 000104 constant entry external dcl 2-72 ref 757 window_$destroy 000106 constant entry external dcl 2-74 ref 953 window_position_info based structure level 1 unaligned dcl 7-25 window_position_info_version_1 constant fixed bin(17,0) initial dcl 7-35 ref 683 955 work_area based area dcl 217 ref 720 work_area_ptr 001564 automatic pointer dcl 209 set ref 230* 715* 720 774* 943 943* yes_sw 001252 automatic bit(1) dcl 96 set ref 563* 568 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Direct_input internal static fixed bin(17,0) initial dcl 5-15 Direct_output internal static fixed bin(17,0) initial dcl 5-15 Direct_update internal static fixed bin(17,0) initial dcl 5-15 Keyed_sequential_input internal static fixed bin(17,0) initial dcl 5-15 Keyed_sequential_output internal static fixed bin(17,0) initial dcl 5-15 Keyed_sequential_update internal static fixed bin(17,0) initial dcl 5-15 Sequential_input internal static fixed bin(17,0) initial dcl 5-15 Sequential_input_output internal static fixed bin(17,0) initial dcl 5-15 Sequential_output internal static fixed bin(17,0) initial dcl 5-15 Sequential_update internal static fixed bin(17,0) initial dcl 5-15 Stream_input internal static fixed bin(17,0) initial dcl 5-15 Stream_input_output internal static fixed bin(17,0) initial dcl 5-15 area_info_version_1 internal static fixed bin(17,0) initial dcl 6-3 area_infop automatic pointer dcl 6-5 break_table_info based structure level 1 dcl 7-76 break_table_info_version internal static fixed bin(17,0) initial dcl 7-80 break_table_info_version_1 internal static fixed bin(17,0) initial dcl 7-80 break_table_ptr automatic pointer dcl 7-75 empty builtin function dcl 182 get_editor_key_bindings_info based structure level 1 dcl 7-151 get_editor_key_bindings_info_ptr automatic pointer dcl 7-159 get_editor_key_bindings_info_version_1 internal static char(8) initial unaligned dcl 7-160 iox_$attach_loud 000000 constant entry external dcl 4-8 iox_$attach_ptr 000000 constant entry external dcl 4-8 iox_$close_file 000000 constant entry external dcl 4-8 iox_$delete_record 000000 constant entry external dcl 4-8 iox_$destroy_iocb 000000 constant entry external dcl 4-8 iox_$detach 000000 constant entry external dcl 4-8 iox_$err_no_operation 000000 constant entry external dcl 4-8 iox_$err_not_attached 000000 constant entry external dcl 4-8 iox_$err_not_closed 000000 constant entry external dcl 4-8 iox_$err_not_open 000000 constant entry external dcl 4-8 iox_$error_output external static pointer dcl 4-41 iox_$find_iocb_n 000000 constant entry external dcl 4-8 iox_$get_chars 000000 constant entry external dcl 4-8 iox_$get_line 000000 constant entry external dcl 4-8 iox_$look_iocb 000000 constant entry external dcl 4-8 iox_$modes 000000 constant entry external dcl 4-8 iox_$move_attach 000000 constant entry external dcl 4-8 iox_$open_file 000000 constant entry external dcl 4-8 iox_$position 000000 constant entry external dcl 4-8 iox_$propagate 000000 constant entry external dcl 4-8 iox_$put_chars 000000 constant entry external dcl 4-8 iox_$read_key 000000 constant entry external dcl 4-8 iox_$read_length 000000 constant entry external dcl 4-8 iox_$read_record 000000 constant entry external dcl 4-8 iox_$rewrite_record 000000 constant entry external dcl 4-8 iox_$seek_key 000000 constant entry external dcl 4-8 iox_$user_input external static pointer dcl 4-41 iox_$write_record 000000 constant entry external dcl 4-8 iox_modes internal static char(24) initial array dcl 5-6 line_editor_binding_count automatic fixed bin(17,0) dcl 7-121 line_editor_key_binding_info based structure level 1 dcl 7-129 line_editor_key_binding_info_ptr automatic pointer dcl 7-118 line_editor_key_binding_info_version_3 internal static char(8) initial unaligned dcl 7-148 line_editor_longest_sequence automatic fixed bin(17,0) dcl 7-123 menu_$delete 000000 constant entry external dcl 3-61 menu_$describe 000000 constant entry external dcl 3-35 menu_$destroy 000000 constant entry external dcl 3-41 menu_$list 000000 constant entry external dcl 3-67 menu_$retrieve 000000 constant entry external dcl 3-54 menu_$store 000000 constant entry external dcl 3-46 menu_format_ptr automatic pointer dcl 3-94 menu_requirements_ptr automatic pointer dcl 3-95 more_handler_info based structure level 1 dcl 7-83 more_handler_info_ptr automatic pointer dcl 7-92 more_handler_info_version internal static fixed bin(17,0) initial dcl 7-94 more_handler_info_version_3 internal static fixed bin(17,0) initial dcl 7-94 more_prompt_info based structure level 1 dcl 7-108 more_prompt_info_ptr automatic pointer dcl 7-112 more_prompt_info_version_1 internal static char(8) initial unaligned dcl 7-114 more_responses_info based structure level 1 dcl 7-59 more_responses_info_ptr automatic pointer dcl 7-69 more_responses_info_version_1 internal static fixed bin(17,0) initial dcl 7-67 more_responses_version internal static fixed bin(17,0) initial dcl 7-67 set_editor_key_bindings_info based structure level 1 dcl 7-162 set_editor_key_bindings_info_ptr automatic pointer dcl 7-171 set_editor_key_bindings_info_version_1 internal static char(8) initial unaligned dcl 7-172 short_iox_modes internal static char(4) initial array dcl 5-12 token_characters_info based structure level 1 dcl 7-97 token_characters_info_ptr automatic pointer dcl 7-104 token_characters_info_version_1 internal static char(8) initial unaligned dcl 7-106 window_$change_column 000000 constant entry external dcl 2-63 window_$change_line 000000 constant entry external dcl 2-59 window_$clear_region 000000 constant entry external dcl 2-7 window_$clear_to_end_of_line 000000 constant entry external dcl 2-9 window_$clear_to_end_of_window 000000 constant entry external dcl 2-11 window_$delete_chars 000000 constant entry external dcl 2-15 window_$edit_line 000000 constant entry external dcl 2-76 window_$get_cursor_position 000000 constant entry external dcl 2-17 window_$get_echoed_chars 000000 constant entry external dcl 2-22 window_$get_one_unechoed 000000 constant entry external dcl 2-67 window_$get_one_unechoed_char 000000 constant entry external dcl 2-67 window_$get_unechoed_chars 000000 constant entry external dcl 2-25 window_$insert_text 000000 constant entry external dcl 2-28 window_$overwrite_text 000000 constant entry external dcl 2-29 window_$position_cursor 000000 constant entry external dcl 2-31 window_$position_cursor_rel 000000 constant entry external dcl 2-36 window_$scroll_region 000000 constant entry external dcl 2-42 window_$sync 000000 constant entry external dcl 2-44 window_$write_raw_text 000000 constant entry external dcl 2-48 window_$write_sync_read 000000 constant entry external dcl 2-53 window_edit_line_info based structure level 1 unaligned dcl 7-177 window_edit_line_info_ptr automatic pointer dcl 7-186 window_edit_line_info_version_1 internal static char(8) initial unaligned dcl 7-183 window_position_info_ptr automatic pointer dcl 7-37 window_position_info_version internal static fixed bin(17,0) initial dcl 7-35 window_status_info based structure level 1 dcl 7-45 window_status_info_ptr automatic pointer dcl 7-43 window_status_version internal static fixed bin(17,0) initial dcl 7-52 window_status_version_1 internal static fixed bin(17,0) initial dcl 7-52 NAMES DECLARED BY EXPLICIT CONTEXT. ARG 000000 constant label array(0:4) dcl 278 ref 269 ARGUMENT_PROCESSING_LOOP 001747 constant label dcl 264 CONTROL_ARG 000005 constant label array(2:28) dcl 362 ref 351 NEXT_1 002347 constant label dcl 318 ref 294 305 316 NEXT_ARG 002667 constant label dcl 463 ref 367 374 381 388 395 402 404 415 424 433 440 447 454 461 RETRIEVE_EACH_TUPLE_LOOP 005601 constant label dcl 881 RETRIEVE_ONLY_EXACT_MATCHES 003551 constant label dcl 579 RETURN 004174 constant label dcl 642 ref 916 SM_RETURN 005060 constant label dcl 786 ref 796 clean_up 006026 constant entry internal dcl 928 ref 570 641 914 924 cleanup_all 006011 constant entry internal dcl 920 ref 485 cleanup_and_abort 005722 constant entry internal dcl 905 ref 502 520 527 555 599 605 626 629 816 875 878 cleanup_screen 006150 constant entry internal dcl 948 ref 795 834 912 923 display 005343 constant entry internal dcl 842 ref 638 menu_display 005067 constant entry internal dcl 803 ref 636 open_data_base 004175 constant entry internal dcl 645 ref 501 519 partial_matches 005462 constant entry internal dcl 863 ref 573 575 setup_menu 004251 constant entry internal dcl 664 ref 615 sm_cleanup_and_return 005061 constant entry internal dcl 789 ref 685 713 735 747 754 758 776 780 wdoc 001532 constant entry external dcl 16 where_doc 001542 constant entry external dcl 16 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 7226 7364 6507 7236 Length 10012 6507 136 411 517 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME wdoc 1452 external procedure is an external procedure. on unit on line 485 70 on unit open_data_base internal procedure shares stack frame of external procedure wdoc. setup_menu internal procedure shares stack frame of external procedure wdoc. sm_cleanup_and_return internal procedure shares stack frame of external procedure wdoc. menu_display internal procedure shares stack frame of external procedure wdoc. display internal procedure shares stack frame of external procedure wdoc. partial_matches internal procedure shares stack frame of external procedure wdoc. cleanup_and_abort 86 internal procedure is called during a stack extension. cleanup_all internal procedure shares stack frame of on unit on line 485. clean_up 82 internal procedure is called by several nonquick procedures. cleanup_screen 92 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME clean_up 000100 cu_code clean_up wdoc 000100 topic_name wdoc 000121 temp_topic_name wdoc 000142 topic_array wdoc 001013 entry_name wdoc 001033 mrds_database_path wdoc 001133 output_switch_name wdoc 001143 output_file_path wdoc 001243 accept_control_argument wdoc 001244 mrds_scope_set wdoc 001245 database_path_sw wdoc 001246 output_file_sw wdoc 001247 use_menu_display wdoc 001250 partial_matches_allowed wdoc 001251 dont_allow_partial_matches wdoc 001252 yes_sw wdoc 001253 arg_idx wdoc 001254 arg_len wdoc 001255 control_argument_idx wdoc 001256 manual_idx wdoc 001257 manual_array wdoc 001310 manual_number wdoc 001311 nargs wdoc 001312 number_of_manuals wdoc 001313 current_mrds_dbi wdoc 001314 mrds_dbi wdoc 001315 code wdoc 001316 output_ptr wdoc 001320 arg_ptr wdoc 001322 local_display_info wdoc 001324 LOWER_CASE_ALPHA wdoc 001333 UPPER_CASE_ALPHA wdoc 001342 complain wdoc 001354 video_is_on wdoc 001355 choice_flag wdoc 001356 fkey wdoc 001357 choice wdoc 001360 choices_idx wdoc 001361 number_of_options wdoc 001362 menu_io_switch_name wdoc 001372 headers wdoc 001440 trailers wdoc 001500 user_io_window_info wdoc 001505 current_user_io_window_info wdoc 001512 menu_window_info wdoc 001517 local_menu_format wdoc 001525 local_menu_requirements wdoc 001532 local_area_info wdoc 001556 menu_io_ptr wdoc 001560 choices_ptr wdoc 001562 menu_ptr wdoc 001564 work_area_ptr wdoc 001566 display_info_ptr wdoc 001606 sm_code setup_menu 001626 md_code menu_display 001636 d_code display THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_g_a r_ne_as alloc_cs cat_realloc_cs call_var_desc call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other return tra_ext enable shorten_stack ext_entry int_entry int_entry_desc set_cs_eis index_cs_eis translate_3 alloc_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. absolute_pathname_ absolute_pathname_$add_suffix active_fnc_err_ com_err_ command_query_$yes_no cu_$af_return_arg cu_$arg_ptr define_area_ display_doc dsl_$close dsl_$dl_scope_all dsl_$open dsl_$retrieve dsl_$set_scope_all iox_$attach_name iox_$close iox_$control iox_$detach_iocb iox_$find_iocb iox_$open menu_$create menu_$display menu_$get_choice online_doc_db_index$return_index online_doc_db_index$set_index release_area_ unique_chars_ window_$bell window_$clear_window window_$create window_$destroy THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$active_function error_table_$bad_arg error_table_$badopt error_table_$noarg error_table_$noentry error_table_$not_act_fnc iox_$user_io iox_$user_output mrds_error_$invalid_db_index mrds_error_$tuple_not_found sys_info$max_seg_size video_data_$terminal_iocb LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 93 001506 108 001515 138 001517 139 001522 187 001525 16 001531 229 001550 230 001552 231 001556 232 001557 234 001565 236 001570 237 001571 239 001603 240 001605 241 001610 242 001616 243 001620 245 001622 246 001642 248 001666 250 001671 251 001705 254 001706 256 001713 258 001715 259 001743 261 001744 262 001745 264 001747 266 001757 267 001774 269 002010 278 002012 280 002045 282 002046 285 002052 287 002111 289 002112 291 002123 292 002162 293 002164 294 002166 296 002167 298 002213 300 002215 301 002247 303 002250 304 002252 305 002253 307 002254 309 002306 311 002310 312 002342 314 002343 315 002345 316 002346 320 002347 330 002351 334 002432 342 002433 344 002452 345 002454 347 002457 348 002511 351 002512 362 002513 365 002515 366 002516 367 002520 369 002521 372 002523 373 002524 374 002526 376 002527 379 002532 380 002534 381 002535 383 002536 386 002541 387 002543 388 002544 390 002545 393 002550 394 002552 395 002553 397 002554 400 002557 401 002561 402 002562 404 002563 407 002564 410 002575 411 002603 413 002605 414 002607 415 002610 417 002611 420 002613 421 002614 422 002616 423 002620 424 002621 426 002622 429 002623 430 002625 431 002627 432 002631 433 002632 435 002633 438 002636 439 002640 440 002641 442 002642 445 002645 446 002647 447 002650 449 002651 452 002654 453 002656 454 002657 456 002660 459 002663 460 002665 461 002666 463 002667 466 002670 470 002672 476 002676 480 002756 485 002757 490 002775 492 003004 494 003010 496 003012 501 003014 502 003017 510 003046 511 003102 518 003107 519 003116 520 003121 524 003150 527 003204 531 003233 535 003235 536 003250 537 003274 538 003337 539 003341 543 003362 545 003364 548 003417 555 003421 560 003461 561 003463 563 003467 568 003533 570 003536 571 003542 573 003543 574 003544 575 003545 578 003550 585 003551 587 003553 588 003561 589 003562 590 003565 592 003570 593 003622 595 003623 599 003630 605 003672 608 003733 615 003735 618 003752 623 003754 624 004001 626 004051 628 004104 629 004123 631 004155 632 004156 636 004162 638 004167 641 004170 642 004174 645 004175 656 004206 657 004236 660 004250 664 004251 672 004253 674 004254 676 004255 677 004262 678 004267 679 004274 683 004300 684 004301 685 004333 688 004336 689 004341 693 004347 694 004351 695 004353 696 004356 697 004360 698 004362 699 004364 700 004366 702 004370 706 004375 707 004400 708 004402 709 004404 710 004407 711 004412 712 004414 713 004426 715 004431 719 004433 720 004436 725 004444 734 004450 735 004461 742 004464 743 004466 744 004470 746 004472 747 004524 752 004527 753 004561 754 004603 757 004606 758 004625 763 004630 764 004637 767 004700 769 004702 771 004714 772 004723 773 004746 774 004751 776 005034 779 005037 780 005052 783 005055 786 005060 789 005061 795 005062 796 005066 803 005067 809 005070 811 005071 812 005073 814 005101 815 005104 816 005127 818 005156 820 005174 822 005177 823 005201 824 005212 826 005230 828 005300 830 005317 831 005320 833 005321 834 005322 835 005326 836 005327 837 005341 839 005342 842 005343 848 005344 850 005345 852 005350 854 005357 855 005361 857 005431 860 005457 861 005461 863 005462 869 005463 870 005464 872 005466 875 005521 878 005554 881 005601 883 005607 885 005616 886 005630 887 005632 889 005635 890 005636 891 005641 895 005665 897 005717 899 005720 905 005721 912 005742 914 005752 915 005757 916 006006 920 006011 923 006012 924 006017 926 006024 928 006025 931 006033 933 006034 935 006043 936 006055 939 006071 941 006107 943 006132 946 006146 948 006147 951 006155 953 006160 955 006175 957 006234 962 006252 ----------------------------------------------------------- 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