COMPILATION LISTING OF SEGMENT mlsys_user_mte_syntax_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 06/18/84 1237.2 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* format: off */ 8 9 /* Validates the syntax of User_ids and mail table entry (MTE) names */ 10 11 /* Created: June 1983 by G. Palter */ 12 /* Modified: March 1984 by G. Palter to fix mail system error #0415 -- read_mail, print_mail, and have_mail/have_messages 13* do not reject starnames as invalid mailbox specifications */ 14 15 /* format: on,style4,delnl,insnl,ifthenstmt,ifthen */ 16 17 18 mlsys_user_mte_syntax_: 19 procedure (); 20 21 return; /* not an entrypoint */ 22 23 24 /* Parameters */ 25 26 dcl P_name character (*) varying parameter; /* the name to be validated as a User_id or MTE name */ 27 28 dcl P_is_mte_name bit (1) aligned parameter; /* classify_and_validate: set ON => MTEname; OFF => User_id */ 29 30 dcl P_person_id character (*) varying parameter; /* classify_and_validate, validate_user_id: set to ... */ 31 dcl P_project_id character (*) varying parameter; /* ... Person_id and Project_id of the User_id respectively */ 32 33 dcl P_code fixed binary (35) parameter; 34 35 36 /* Local copies of parameters */ 37 38 dcl person_id character (64) varying; 39 dcl project_id character (64) varying; 40 41 42 /* Remaining declarations */ 43 44 dcl LONGEST_PERSON_ID character (28) static options (constant) initial (""); 45 dcl LONGEST_PROJECT_ID character (32) static options (constant) initial (""); 46 dcl LONGEST_MTE_NAME character (32) static options (constant) initial (""); 47 48 dcl INVALID_MTE_CHARACTERS character (12) static options (constant) initial (",:;\()<>{}""@"); 49 50 dcl WHITESPACE character (5) static options (constant) initial (" 51 "); /* SP HT VT FF NL */ 52 53 dcl WHITESPACE_OTHER_THAN_SPACE character (4) static options (constant) initial (" 54 "); /* HT VT FF NL */ 55 56 /* format: off */ 57 dcl (mlsys_et_$invalid_mte_syntax, mlsys_et_$invalid_person_id_syntax, mlsys_et_$invalid_user_id_syntax) 58 fixed binary (35) external; 59 /* format: on */ 60 61 dcl check_star_name_$entry entry (character (*), fixed binary (35)); 62 63 dcl (after, before, index, length, search) builtin; 64 65 /* Determines if the given name is a User_id or MTE name and then validates its syntax */ 66 67 classify_and_validate: 68 entry (P_name, P_is_mte_name, P_person_id, P_project_id, P_code); 69 70 if search (P_name, WHITESPACE) = 0 then /* a User_id contains no whitespace ... */ 71 if (index (P_name, ".") ^= 0) & (index (after (P_name, "."), ".") = 0) then 72 P_is_mte_name = "0"b; /* ... and exactly one period */ 73 else P_is_mte_name = "1"b; 74 else P_is_mte_name = "1"b; 75 76 if P_is_mte_name then /* perform appropriate syntax checks */ 77 call validate_mte_name (P_name, P_code); 78 else do; 79 call validate_user_id (P_name, P_person_id, P_project_id, P_code); 80 if P_code = 0 then do; /* ... reject starnames in User_ids when parsing only */ 81 call check_star_name_$entry ((P_name), P_code); 82 if P_code ^= 0 then P_code = mlsys_et_$invalid_user_id_syntax; 83 end; 84 end; 85 86 return; 87 88 /* Validates the syntax of a User_id and returns its component Person_id and Project_id */ 89 90 validate_user_id: 91 entry (P_name, P_person_id, P_project_id, P_code); 92 93 if search (P_name, WHITESPACE) ^= 0 then do; /* no embedded whitespace is allowed */ 94 BAD_USER_ID_SYNTAX: /* invalid User_id syntax */ 95 P_code = mlsys_et_$invalid_user_id_syntax; 96 return; 97 end; 98 99 if index (P_name, ".") = 0 then go to BAD_USER_ID_SYNTAX; 100 if index (after (P_name, "."), ".") ^= 0 then go to BAD_USER_ID_SYNTAX; 101 /* not exactly one period */ 102 103 if search (P_name, "<>") ^= 0 then go to BAD_USER_ID_SYNTAX; 104 /* only other unacceptable characters in a User_id */ 105 106 person_id = before (P_name, "."); /* isolate the components */ 107 project_id = after (P_name, "."); 108 109 if (length (person_id) > length (LONGEST_PERSON_ID)) | (length (project_id) > length (LONGEST_PROJECT_ID)) then 110 go to BAD_USER_ID_SYNTAX; /* either Person_id is over 28 or Project_id is over 32 */ 111 112 if (person_id = "") | (project_id = "") then /* neither part can be null */ 113 go to BAD_USER_ID_SYNTAX; 114 115 P_person_id = person_id; /* validate User_id */ 116 P_project_id = project_id; 117 P_code = 0; 118 119 return; 120 121 /* Validates the syntax of a Person_id */ 122 123 validate_person_id: 124 entry (P_person_id, P_code); 125 126 if search (P_person_id, WHITESPACE) ^= 0 then do; /* no embedded whitespace is allowed */ 127 BAD_PERSON_ID_SYNTAX: /* invalid Person_id syntax */ 128 P_code = mlsys_et_$invalid_person_id_syntax; 129 return; 130 end; 131 132 if index (P_name, ".") ^= 0 then go to BAD_PERSON_ID_SYNTAX; 133 /* can not have any periods */ 134 135 if search (P_name, "<>") ^= 0 then go to BAD_PERSON_ID_SYNTAX; 136 /* only other unacceptable characters in a Person_id */ 137 138 if length (P_person_id) > length (LONGEST_PERSON_ID) then go to BAD_PERSON_ID_SYNTAX; 139 /* Person_id can not exceed 28 characters */ 140 141 if P_person_id = "" then go to BAD_PERSON_ID_SYNTAX; 142 /* can't be a null string */ 143 144 P_code = 0; 145 146 return; 147 148 /* Validates the syntax of a mail table entry (MTE) name */ 149 150 validate_mte_name: 151 entry (P_name, P_code); 152 153 if length (P_name) > length (LONGEST_MTE_NAME) then do; 154 INVALID_MTE_NAME_SYNTAX: /* invalid MTE name syntax */ 155 P_code = mlsys_et_$invalid_mte_syntax; 156 return; 157 end; 158 159 if search (P_name, WHITESPACE_OTHER_THAN_SPACE) ^= 0 then go to INVALID_MTE_NAME_SYNTAX; 160 161 if search (P_name, INVALID_MTE_CHARACTERS) ^= 0 then go to INVALID_MTE_NAME_SYNTAX; 162 163 if P_name = "" then go to INVALID_MTE_NAME_SYNTAX;/* can't be a null string */ 164 165 P_code = 0; /* success */ 166 167 return; 168 169 end mlsys_user_mte_syntax_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 06/18/84 1224.5 mlsys_user_mte_syntax_.pl1 >special_ldd>on>06/15/84>mlsys_user_mte_syntax_.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. INVALID_MTE_CHARACTERS 000004 constant char(12) initial unaligned dcl 48 ref 161 LONGEST_MTE_NAME constant char(32) initial unaligned dcl 46 ref 153 LONGEST_PERSON_ID constant char(28) initial unaligned dcl 44 ref 109 138 LONGEST_PROJECT_ID constant char(32) initial unaligned dcl 45 ref 109 P_code parameter fixed bin(35,0) dcl 33 set ref 67 76* 79* 80 81* 82 82* 90 94* 117* 123 127* 144* 150 154* 165* P_is_mte_name parameter bit(1) dcl 28 set ref 67 70* 73* 74* 76 P_name parameter varying char dcl 26 set ref 67 70 70 70 76* 79* 81 90 93 99 100 103 106 107 132 135 150 153 159 161 163 P_person_id parameter varying char dcl 30 set ref 67 79* 90 115* 123 126 138 141 P_project_id parameter varying char dcl 31 set ref 67 79* 90 116* WHITESPACE 000002 constant char(5) initial unaligned dcl 50 ref 70 93 126 WHITESPACE_OTHER_THAN_SPACE 000000 constant char(4) initial unaligned dcl 53 ref 159 after builtin function dcl 63 ref 70 100 107 before builtin function dcl 63 ref 106 check_star_name_$entry 000016 constant entry external dcl 61 ref 81 index builtin function dcl 63 ref 70 70 99 100 132 length builtin function dcl 63 ref 109 109 109 109 138 138 153 153 mlsys_et_$invalid_mte_syntax 000010 external static fixed bin(35,0) dcl 57 ref 154 mlsys_et_$invalid_person_id_syntax 000012 external static fixed bin(35,0) dcl 57 ref 127 mlsys_et_$invalid_user_id_syntax 000014 external static fixed bin(35,0) dcl 57 ref 82 94 person_id 000100 automatic varying char(64) dcl 38 set ref 106* 109 112 115 project_id 000121 automatic varying char(64) dcl 39 set ref 107* 109 112 116 search builtin function dcl 63 ref 70 93 103 126 135 159 161 NAMES DECLARED BY EXPLICIT CONTEXT. BAD_PERSON_ID_SYNTAX 000535 constant label dcl 127 ref 132 135 138 141 BAD_USER_ID_SYNTAX 000316 constant label dcl 94 ref 99 100 103 109 112 INVALID_MTE_NAME_SYNTAX 000627 constant label dcl 154 ref 159 161 163 classify_and_validate 000027 constant entry external dcl 67 mlsys_user_mte_syntax_ 000014 constant entry external dcl 18 validate_mte_name 000604 constant entry external dcl 150 ref 76 validate_person_id 000504 constant entry external dcl 123 validate_user_id 000253 constant entry external dcl 90 ref 79 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2030 2050 1670 2040 Length 2236 1670 20 152 140 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mlsys_user_mte_syntax_ 141 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mlsys_user_mte_syntax_ 000100 person_id mlsys_user_mte_syntax_ 000121 project_id mlsys_user_mte_syntax_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_in_desc call_ext_out_desc return shorten_stack ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. check_star_name_$entry THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. mlsys_et_$invalid_mte_syntax mlsys_et_$invalid_person_id_syntax mlsys_et_$invalid_user_id_syntax LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 18 000013 21 000021 67 000022 70 000055 73 000133 74 000136 76 000140 79 000161 80 000206 81 000210 82 000237 86 000245 90 000246 93 000301 94 000316 96 000321 99 000322 100 000334 103 000362 106 000375 107 000412 109 000422 112 000430 115 000442 116 000460 117 000476 119 000477 123 000500 126 000521 127 000535 129 000540 132 000541 135 000555 138 000570 141 000573 144 000600 146 000601 150 000602 153 000622 154 000627 156 000632 159 000633 161 000646 163 000661 165 000666 167 000667 ----------------------------------------------------------- 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