COMPILATION LISTING OF SEGMENT cv_userid_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1756.2 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 cv_userid_: procedure (arg) returns (char(32)); 12 13 14 /* 15* 16* This procedure converts an unnormalized process group id to 17* standard format. Example: ".SysLib" becomes "*.SysLib.*". 18* Calling sequence: 19* 20* normal_id = cv_userid_(string); 21* 22* The user, project, and tag fields are limited to 20, 9, and 1 23* characters in length, respectively. 24* 25* P. Bos, May 1972 26* 27**/ 28 29 30 dcl arg char(*); /* unnormalized userid e.g. ".SysLib" */ 31 32 dcl (addr, length, substr) builtin; 33 34 dcl (end, start) (3) fixed bin init ((3) 1), 35 string (3) char(20) varying; 36 37 dcl lmax (3) fixed bin int static init (20, 9, 1); 38 39 dcl chr char(1) aligned, 40 cp ptr, 41 (i, j, l) fixed bin; 42 43 dcl 1 c based (cp), /* char array overlaid on arg */ 44 2 char (l) char(1) unal; 45 46 /* */ 47 48 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 49 50 51 cp = addr (arg); /* get pointer to unnormalized id */ 52 l = length (arg); /* and its size */ 53 i = 1; /* starting on first name component */ 54 55 do j = 1 to l; /* scan char by char */ 56 chr = c.char(j); /* align this char */ 57 if chr = " " then do; /* blank implies end of string */ 58 end(i) = j; /* mark it */ 59 go to done; /* and exit */ 60 end; 61 if chr = "." then do; /* "." marks end of component */ 62 end(i) = j; /* save index */ 63 if i = 3 then /* userid has only three components */ 64 go to done; /* exit after third one */ 65 i = i + 1; /* starting next component */ 66 start(i) = j + 1; /* mark start index for new component */ 67 end; 68 end; 69 end(i) = j; /* fell off end, mark index */ 70 71 done: do i = 1 to 3; /* extract name components */ 72 l = end(i) - start(i); /* optimize */ 73 if l > 0 then do; /* is this field really there? */ 74 if l > lmax(i) then /* each field has maximum width */ 75 l = lmax(i); /* adjust if too big */ 76 string(i) = substr (arg, start(i), l); /* extract subfield */ 77 end; 78 else /* nothing there */ 79 string(i) = "*"; /* null component implies "*" */ 80 end; 81 82 return (string(1) || "." || string(2) || "." || string(3)); /* form normalized id and return */ 83 84 end cv_userid_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1624.4 cv_userid_.pl1 >dumps>old>recomp>cv_userid_.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. addr builtin function dcl 32 ref 51 arg parameter char unaligned dcl 30 set ref 11 51 52 76 c based structure level 1 packed unaligned dcl 43 char based char(1) array level 2 packed unaligned dcl 43 ref 56 chr 000130 automatic char(1) dcl 39 set ref 56* 57 61 cp 000132 automatic pointer dcl 39 set ref 51* 56 end 000100 automatic fixed bin(17,0) initial array dcl 34 set ref 34* 34* 34* 58* 62* 69* 72 i 000134 automatic fixed bin(17,0) dcl 39 set ref 53* 58 62 63 65* 65 66 69 71* 72 72 74 74 76 76 78* j 000135 automatic fixed bin(17,0) dcl 39 set ref 55* 56 58 62 66* 69 l 000136 automatic fixed bin(17,0) dcl 39 set ref 52* 55 72* 73 74 74* 76 length builtin function dcl 32 ref 52 lmax 000000 constant fixed bin(17,0) initial array dcl 37 ref 74 74 start 000103 automatic fixed bin(17,0) initial array dcl 34 set ref 34* 34* 34* 66* 72 76 string 000106 automatic varying char(20) array dcl 34 set ref 76* 78* 82 82 82 substr builtin function dcl 32 ref 76 NAMES DECLARED BY EXPLICIT CONTEXT. cv_userid_ 000011 constant entry external dcl 11 done 000122 constant label dcl 71 ref 59 63 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 272 302 245 302 Length 442 245 10 123 24 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME cv_userid_ 101 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME cv_userid_ 000100 end cv_userid_ 000103 start cv_userid_ 000106 string cv_userid_ 000130 chr cv_userid_ 000132 cp cv_userid_ 000134 i cv_userid_ 000135 j cv_userid_ 000136 l cv_userid_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs return ext_entry_desc NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000005 34 000024 51 000051 52 000054 53 000056 55 000060 56 000067 57 000074 58 000077 59 000101 61 000102 62 000104 63 000106 65 000111 66 000112 68 000116 69 000120 71 000122 72 000127 73 000133 74 000134 76 000140 77 000157 78 000160 80 000166 82 000170 ----------------------------------------------------------- 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