COMPILATION LISTING OF SEGMENT canon_for_volume_label_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1009.1 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 canon_for_volume_label_: proc (resource_type, label_in, label_out, volume_format, code); 14 15 /* This procedure performs canonicalization of labels for volumes (tapes, 16* disks, etc.) It can perform a standard, site-settable pre-canonicalization 17* of a user-typed label; or it will perform this and additionally add a 18* canonicalization of a chosen type to satisfy some standard for internal 19* labeling (e.g., create a six-character ANSI tape label from the given 20* name.) These operations are performed in this subroutine rather than 21* in the respective I/O modules so that RCP can perform the exact same 22* translations when it is checking magnetic labels for authentication. 23* 24* Written 04/11/79 by C. D. Tavares */ 25 26 dcl (resource_type char (*), 27 label_in char (*), 28 label_out char (*), 29 volume_format fixed bin, 30 code fixed bin (35)) parameter; 31 32 dcl buffer char (32) varying, 33 buffer_nonvar char (32) nonvarying; 34 35 dcl (NUMERICS char (10) initial ("0123456789"), 36 UPPERCASE char (26) initial ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), 37 LOWERCASE char (26) initial ("abcdefghijklmnopqrstuvwxyz")) static options (constant); 38 39 dcl (error_table_$smallarg, 40 error_table_$bad_label) ext fixed bin (35) static; 41 42 dcl (rtrim, ltrim, substr, length, verify, copy) builtin; 43 44 dcl resource_info_$canonicalize_name entry (char (*), char (*), char (*), fixed bin (35)); 45 1 1 /* --------------- BEGIN include file rcp_volume_formats.incl.pl1 --------------- */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(86-12-08,GWMay), approve(86-12-08,PBF7552), 1 7* audit(86-12-08,Martinson), install(86-12-17,MR12.0-1250): 1 8* added array entry 0 to the volume format types to indicate that the tape 1 9* volume was not authenticated by rcp. 1 10* END HISTORY COMMENTS */ 1 11 1 12 1 13 /* General volume types */ 1 14 1 15 dcl (Volume_unauthenticated initial (0), 1 16 Volume_blank initial (1), 1 17 Volume_unknown_format initial (6), 1 18 Volume_unreadable initial (7), 1 19 1 20 /* Tape volume types */ 1 21 1 22 Volume_multics_tape initial (2), 1 23 Volume_gcos_tape initial (3), 1 24 Volume_ibm_tape initial (4), 1 25 Volume_ansi_tape initial (5)) fixed bin static options (constant); 1 26 1 27 /* Printable descriptions of volume types */ 1 28 1 29 dcl Tape_volume_types (0:7) char (16) static options (constant) initial 1 30 ("unauthenticated", 1 31 "blank", 1 32 "Multics", 1 33 "GCOS", 1 34 "IBM", 1 35 "ANSI", 1 36 "unrecognizable", 1 37 "unreadable"); 1 38 1 39 /* ---------------- END include file rcp_volume_formats.incl.pl1 ---------------- */ 46 2 1 /* Begin include file ... rcp_resource_types.incl.pl1 2 2* * 2 3* * Created 3/79 by Michael R. Jordan for MR7.0R 2 4* * 2 5* * This include file defines the official RCP resource types. 2 6* * The array of names is indexed by the corresponding device type. 2 7* * MOD by RAF for MCA 2 8**/ 2 9 2 10 2 11 2 12 /****^ HISTORY COMMENTS: 2 13* 1) change(85-09-09,Fawcett), approve(85-09-09,MCR6979), 2 14* audit(85-12-09,CLJones), install(86-03-21,MR12.0-1033): 2 15* Support of MCA. 2 16* END HISTORY COMMENTS */ 2 17 2 18 dcl DEVICE_TYPE (8) char (32) 2 19 internal static options (constant) 2 20 init ("tape_drive", "disk_drive", "console", "printer", "punch", "reader", "special", "mca"); 2 21 2 22 dcl NUM_QUALIFIERS (8) fixed bin /* Number of qualifiers for each device type. */ 2 23 internal static init (3, 0, 0, 2, 0, 0, 0, 0); 2 24 2 25 dcl VOLUME_TYPE (8) char (32) 2 26 internal static options (constant) 2 27 init ("tape_vol", "disk_vol", "", "", "", "", "", ""); 2 28 2 29 dcl TAPE_DRIVE_DTYPEX fixed bin static internal options (constant) init (1); 2 30 dcl DISK_DRIVE_DTYPEX fixed bin static internal options (constant) init (2); 2 31 dcl CONSOLE_DTYPEX fixed bin static internal options (constant) init (3); 2 32 dcl PRINTER_DTYPEX fixed bin static internal options (constant) init (4); 2 33 dcl PUNCH_DTYPEX fixed bin static internal options (constant) init (5); 2 34 dcl READER_DTYPEX fixed bin static internal options (constant) init (6); 2 35 dcl SPECIAL_DTYPEX fixed bin static internal options (constant) init (7); 2 36 dcl MCA_DTYPEX fixed bin static internal options (constant) init (8); 2 37 dcl TAPE_VOL_VTYPEX fixed bin static internal options (constant) init (1); 2 38 dcl DISK_VOL_VTYPEX fixed bin static internal options (constant) init (2); 2 39 2 40 2 41 /* End include file ... rcp_resource_types.incl.pl1 */ 47 48 49 50 /* The first operation is to do the site-specifiable pre-canonicalization 51* as defined in the RTDT. */ 52 53 call resource_info_$canonicalize_name (resource_type, label_in, buffer_nonvar, code); 54 if code ^= 0 then return; 55 56 buffer = rtrim (buffer_nonvar); 57 if length (buffer) = 0 then do; 58 code = error_table_$bad_label; 59 return; 60 end; 61 62 /* Now we handle extra desired canonicalization */ 63 64 if resource_type = VOLUME_TYPE (TAPE_VOL_VTYPEX) then do; 65 66 if volume_format = Volume_ibm_tape 67 | volume_format = Volume_ansi_tape then do; 68 69 if length (buffer) > 6 then buffer = substr (buffer, 1, 6); 70 71 if verify (buffer, NUMERICS) = 0 then 72 if length (buffer) < 6 then 73 buffer = copy ("0", 6 - length (buffer)) || buffer; 74 /* pad with leading zeroes */ 75 else; 76 else buffer = translate (buffer, UPPERCASE, LOWERCASE); 77 end; 78 79 else if volume_format = Volume_gcos_tape then do; 80 81 if length (buffer) > 5 then buffer = substr (buffer, 1, 5); 82 83 if verify (buffer, NUMERICS) = 0 then 84 if length (buffer) < 5 then 85 buffer = copy ("0", 5 - length (buffer)) || buffer; 86 /* pad with leading zeroes */ 87 else; 88 else buffer = translate (buffer, UPPERCASE, LOWERCASE); 89 end; 90 91 else if volume_format = Volume_multics_tape then; /* none necessary */ 92 else if volume_format = 0 then; /* none requested */ 93 94 else do; 95 code = error_table_$bad_label; 96 return; 97 end; 98 end; 99 100 else do; 101 code = error_table_$bad_label; 102 return; 103 end; 104 105 if length (label_out) < length (buffer) then do; 106 code = error_table_$smallarg; 107 return; 108 end; 109 110 label_out = buffer; 111 code = 0; 112 return; 113 end canon_for_volume_label_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0810.1 canon_for_volume_label_.pl1 >spec>install>1112>canon_for_volume_label_.pl1 46 1 12/17/86 1550.5 rcp_volume_formats.incl.pl1 >ldd>include>rcp_volume_formats.incl.pl1 47 2 03/27/86 1120.0 rcp_resource_types.incl.pl1 >ldd>include>rcp_resource_types.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. LOWERCASE 000100 constant char(26) initial packed unaligned dcl 35 ref 76 88 NUMERICS 000116 constant char(10) initial packed unaligned dcl 35 ref 71 83 TAPE_VOL_VTYPEX constant fixed bin(17,0) initial dcl 2-37 ref 64 UPPERCASE 000107 constant char(26) initial packed unaligned dcl 35 ref 76 88 VOLUME_TYPE 000000 constant char(32) initial array packed unaligned dcl 2-25 ref 64 Volume_ansi_tape constant fixed bin(17,0) initial dcl 1-15 ref 66 Volume_gcos_tape constant fixed bin(17,0) initial dcl 1-15 ref 79 Volume_ibm_tape constant fixed bin(17,0) initial dcl 1-15 ref 66 Volume_multics_tape constant fixed bin(17,0) initial dcl 1-15 ref 91 buffer 000100 automatic varying char(32) dcl 32 set ref 56* 57 69 69* 69 71 71 71* 71 71 76* 76 81 81* 81 83 83 83* 83 83 88* 88 105 110 buffer_nonvar 000111 automatic char(32) packed unaligned dcl 32 set ref 53* 56 code parameter fixed bin(35,0) dcl 26 set ref 13 53* 54 58* 95* 101* 106* 111* copy builtin function dcl 42 ref 71 83 error_table_$bad_label 000012 external static fixed bin(35,0) dcl 39 ref 58 95 101 error_table_$smallarg 000010 external static fixed bin(35,0) dcl 39 ref 106 label_in parameter char packed unaligned dcl 26 set ref 13 53* label_out parameter char packed unaligned dcl 26 set ref 13 105 110* length builtin function dcl 42 ref 57 69 71 71 81 83 83 105 105 resource_info_$canonicalize_name 000014 constant entry external dcl 44 ref 53 resource_type parameter char packed unaligned dcl 26 set ref 13 53* 64 rtrim builtin function dcl 42 ref 56 substr builtin function dcl 42 ref 69 81 verify builtin function dcl 42 ref 71 83 volume_format parameter fixed bin(17,0) dcl 26 ref 13 66 66 79 91 92 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. CONSOLE_DTYPEX internal static fixed bin(17,0) initial dcl 2-31 DEVICE_TYPE internal static char(32) initial array packed unaligned dcl 2-18 DISK_DRIVE_DTYPEX internal static fixed bin(17,0) initial dcl 2-30 DISK_VOL_VTYPEX internal static fixed bin(17,0) initial dcl 2-38 MCA_DTYPEX internal static fixed bin(17,0) initial dcl 2-36 NUM_QUALIFIERS internal static fixed bin(17,0) initial array dcl 2-22 PRINTER_DTYPEX internal static fixed bin(17,0) initial dcl 2-32 PUNCH_DTYPEX internal static fixed bin(17,0) initial dcl 2-33 READER_DTYPEX internal static fixed bin(17,0) initial dcl 2-34 SPECIAL_DTYPEX internal static fixed bin(17,0) initial dcl 2-35 TAPE_DRIVE_DTYPEX internal static fixed bin(17,0) initial dcl 2-29 Tape_volume_types internal static char(16) initial array packed unaligned dcl 1-29 Volume_blank internal static fixed bin(17,0) initial dcl 1-15 Volume_unauthenticated internal static fixed bin(17,0) initial dcl 1-15 Volume_unknown_format internal static fixed bin(17,0) initial dcl 1-15 Volume_unreadable internal static fixed bin(17,0) initial dcl 1-15 ltrim builtin function dcl 42 NAME DECLARED BY EXPLICIT CONTEXT. canon_for_volume_label_ 000132 constant entry external dcl 13 NAME DECLARED BY CONTEXT OR IMPLICATION. translate builtin function ref 76 88 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1202 1220 1116 1212 Length 1430 1116 16 174 63 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME canon_for_volume_label_ 104 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME canon_for_volume_label_ 000100 buffer canon_for_volume_label_ 000111 buffer_nonvar canon_for_volume_label_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc return_mac shorten_stack ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. resource_info_$canonicalize_name THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_label error_table_$smallarg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000125 53 000157 54 000204 56 000207 57 000227 58 000231 59 000234 64 000235 66 000246 69 000253 71 000265 75 000332 76 000334 77 000352 79 000354 81 000356 83 000370 87 000435 88 000437 89 000455 91 000457 92 000462 95 000465 96 000470 98 000471 101 000472 102 000475 105 000476 106 000501 107 000505 110 000506 111 000514 112 000515 ----------------------------------------------------------- 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