COMPILATION LISTING OF SEGMENT match_request_id_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1800.1 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 match_request_id_: 12 procedure (msg_time, id_arg) returns (bit aligned); 13 14 /* This procedure provides request ID displaying and matching for absentee and I/O daemon requests. 15* 16* dcl match_request_id_ entry (fixed bin (71), char (*)) returns (bit (1) aligned); 17* if match_request_id_ (request.msg_time, ID_arg) then ... ; 18* 19* A long request ID is a 19-character string, displaying the time the request was entered, in 20* the form YYMMDDhhmmss.ffffff - that is, the year, month, day, hour, minute, second, 21* and 6-digit fractional second. In most cases, the 6 digits to the left of the decimal point 22* (hhmmss) will be enough to uniquely identify a request from among all other requests in the system. 23* Those 6 digits are displayed by default by the request entering and listing commands. Display of 24* the full 19 digits can be requested by using the -long_id control argument. 25* 26* The user, when identifying a request with the -id ID argument pair, may give any number of 27* digits. The match_request_id_ entry point of this procedure matches such a substring against 28* (the display form of) a message time, and returns true ("1"b) if it matches, and false (""b) if it doesn't. 29* The user-supplied substring is oriented within the 19 digit field by means of the decimal point 30* (with one being assumed to the right of the last digit if none is given). If the corresponding 31* substrings match, the IDs are said to match. It is the responsibility of the caller to search the 32* entire set of requests that are selected (by other arguments or by default) and take appropriate action 33* if the user-supplied ID matches more than one request (e.g., select all of them for listing, 34* but select none for cancelling, and ask for a longer ID). 35* 36* Although some of the digits in a request ID have a limited range (e.g., MM must be 01-12), and of 37* course the ID can contain only decimal digits and at most one decimal point, and so some validity checking could 38* be performed on an ID, it is considered not worthwhile, and is not done by this procedure. Callers could, 39* if they wish, verify that the string contains only decimal digits and a decimal point, but that 40* is probably not worthwhile either. Most user typing errors will consist of incorrect or transposed 41* digits, not detectable by any error checking. 42* 43* Initial coding by T. Casey, May 1978 44* Modified April 1979 by T. Casey for MR7.0a to fix minor bugs. 45* Modified February 1980 by C. Hornig to remove request_id_ 46* /* 47* 48* /* DECLARATIONS */ 49 /* Input arguments */ 50 51 dcl msg_time fixed bin (71); /* first argument to both entry points */ 52 dcl id_arg char (*); /* second argument to match_... entry point */ 53 54 /* Misc. automatic variables */ 55 56 dcl (dp, l) fixed bin; /* char counters, for matching */ 57 dcl id char (19); /* display form of msg_time, for returning or matching */ 58 dcl vid char (20) varying; /* copy of id_arg, with leading and trailing blanks removed */ 59 60 /* Other stuff */ 61 62 dcl request_id_ entry (fixed bin (71)) returns (char (19)); 63 64 dcl (index, length, ltrim, rtrim, substr) builtin; /* for matching */ 65 66 /* PROCEDURE */ 67 68 id = request_id_ (msg_time); 69 vid = rtrim (ltrim (id_arg)); /* strip off leading and trailing blanks and get length of result */ 70 l = length (vid); /* l is easier to type */ 71 if l > 19 72 then /* this is why vid is char (20) varying */ 73 return ("0"b); /* string too long - could not possibly match */ 74 dp = index (vid, "."); /* look for decimal point */ 75 if dp = 0 76 then /* if none */ 77 dp = l + 1; /* pretend there's one after the last digit */ 78 if dp > 13 then return ("0"b); /* too many digits to left of decimal point */ 79 if l - dp > 6 then return ("0"b); /* too many to right of it */ 80 if substr (id, 14 - dp, l) = vid 81 then return ("1"b); 82 else return ("0"b); 83 84 end match_request_id_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1624.7 match_request_id_.pl1 >dumps>old>recomp>match_request_id_.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. dp 000100 automatic fixed bin(17,0) dcl 56 set ref 74* 75 75* 78 79 80 id 000102 automatic char(19) unaligned dcl 57 set ref 68* 80 id_arg parameter char unaligned dcl 52 ref 11 69 index builtin function dcl 64 ref 74 l 000101 automatic fixed bin(17,0) dcl 56 set ref 70* 71 75 79 80 length builtin function dcl 64 ref 70 ltrim builtin function dcl 64 ref 69 msg_time parameter fixed bin(71,0) dcl 51 set ref 11 68* request_id_ 000010 constant entry external dcl 62 ref 68 rtrim builtin function dcl 64 ref 69 substr builtin function dcl 64 ref 80 vid 000107 automatic varying char(20) dcl 58 set ref 69* 70 74 80 NAME DECLARED BY EXPLICIT CONTEXT. match_request_id_ 000010 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 202 214 145 212 Length 360 145 12 127 34 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME match_request_id_ 87 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME match_request_id_ 000100 dp match_request_id_ 000101 l match_request_id_ 000102 id match_request_id_ 000107 vid match_request_id_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. request_id_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000004 68 000023 69 000034 70 000072 71 000074 74 000100 75 000112 78 000116 79 000122 80 000130 82 000143 ----------------------------------------------------------- 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