07/30/86 Equal Convention (general information) Some commands that accept more than one pathname as their arguments allow the entrynames of pathnames following the first, or source pathname, to be equalnames. This is to be generally expected if the command allows the source entryname to be a starname. An equalname is a special entryname which is used with the source entryname to construct the entryname actually used by the command. The equalname contains special characters which are replaced by characters from the source entryname. Use of the equal convention can reduce the typing required for the subsequent pathnames, and is essential when a starname is used, because the entrynames can't be determined from the command line alone, but depend on the entrynames which match the starname. Constructing Equalnames: An equalname is constructed according to the following rules. 1. An equalname is an entryname. Therefore, it is composed of a string of 32 or fewer ASCII printing graphics or spaces, none of which can be the greater-than (>) character. An equalname cannot contain control characters such as backspace, tab, or newline. 2. An equalname is composed of one or more nonnull components. This means that an equalname cannot begin or end with a period (.) and cannot contain two or more consecutive periods. 3. Each percent sign (%) character appearing in an equalname component is treated as a special character. 4. Each equal sign (=) appearing in an equalname component is treated as a special character. 5. An equalname component consisting only of a double (==) or triple equal sign (===) is treated as a special component. 6. An equalname containing four or more consecutive equal signs is illegal. Interpreting Equalnames: An equalname maps characters from the entrynames that match the star name (first entryname) into the second entryname of a pair according to the following rules. 1. Each percent sign (%) in an equalname component represents the single character in the corresponding component and character position of the corresponding entryname. An error occurs if the corresponding character does not exist. 2. An equal sign (=) in an equalname component represents the corresponding component of a corresponding entryname. An error occurs if the corresponding component does not exist. An error also occurs if an equal sign appears in a component that also contains a percent character. Only one equal sign can appear in each equalname component, except for a double or triple equal sign component, as noted in the next two rules. 3. The double equal sign (==) component of an equalname represents all components of an entryname that have no other corresponding components in the equalname. Often, the double equal sign component represents more than one component of the corresponding entryname. If so, the number of components represented by the entire equalname is the same as the number of components in the entryname. When the equalname contains the same number of components or more components than the entryname, a double equal sign is meaningless and, therefore, ignored. (See the examples below.) Only one double equal sign component can appear in an equalname. 4. The triple equal sign (===) component of an equalname represents the entire corresponding entryname. The triple equal sign component is used to add components to a name (see below). Only one triple equal sign component may appear in an equalname and no other component of that equalname may contain percent signs or equal signs. Notes: The rules above impose no restrictions on the form of the entrynames identified by the equalname. For example, the entrynames can contain null components. However, when the entrynames are present in directories, they have usually been subject to validity tests for entrynames, and thus are usually valid entrynames. For more information about the star convention, see starname.gi.info. For more information about entrynames, see entryname.gi.info. The add_name and rename commands normally accept starnames and equalnames, which they require to be valid entrynames. This helps to protect files from being given invalid entrynames. However, if files have invalid entrynames containing null components, control characters, or characters reserved by the star, equal, archive or virtual pointer or entry conventions, the -name control argument of the delete, delete_name and rename commands can be used to remove the files or their invalid names. Examples of equalnames: The following examples illustrate how equalnames might be used in rename and add_name commands. First, the single equal sign. The command rename random.data_base ordered.= is equivalent to rename random.data_base ordered.data_base and the command add_name world.data =.statistics =.census is equivalent to add_name world.data world.statistics world.census The command rename random.data.base =.= is equivalent to rename random.data.base random.data The star convention is used in the command rename *.data_base =.data to rename all two-component entrynames with data_base as their second component so these entrynames have, instead, a second component of data. The command rename program.pl1 old_=.= is equivalent to rename program.pl1 old_program.pl1 and the command add_name data first_=_set is equivalent to add_name data first_data_set An error would be produced by the command rename alpha beta.=.gamma because the first entryname of the pair does not contain a component corresponding to the equal sign in the second name. Next, the double equal sign. In the two examples that follow, the first entryname has components that correspond to the double equal sign in the equalname of each pair. As a result, the number of components represented by the equalname is the same as the number of components in the first entryname. The command rename one.two.three 1.== is equivalent to rename one.two.three 1.two.three and the command add_name one.two.three.four.five 1.==.5 is equivalent to add_name one.two.three.four.five 1.two.three.four.5 In the example that follows, the equalname contains the same number of components as the entryname. Therefore, the double equal sign does not correspond to any components of the entryname and is ignored. The commands rename alpha.beta ==.x.y rename alpha.beta x.y.== rename alpha.beta x.==.y are all equivalent to rename alpha.beta x.y In the next example, since the equalname contains more components than the entryname, the double equal sign corresponds to no components of the entryname and is ignored. The command add_name able ==.baker.charlie is equivalent to add_name able baker.charlie The command add_name **.ec ==.absin uses the star convention to add a name to each entry with an entryname whose last (or only) component is ec. The last component of this new name is absin instead of ec, and the first components (if any) are the same as those of the original name ending in ec (e.g., the name alpha.absin would be added to the entry named alpha.ec). The command rename foo.test.pl1 ==.old is equivalent to rename foo.test.pl1 foo.test.old With the triple equal sign, this command becomes rename foo.test.pl1 ===.old and is equivalent to rename foo.test.pl1 foo.test.pl1.old because the triple equal sign represents the entire corresponding entryname. For the same reason, the command add_name alpha.** ===.1 adds the name "alpha.1" to "alpha", "alpha.pl1.1" to "alpha.pl1", etc. Note that a triple sign component in an entryname implies that the new name will have more components than the old name. This is different from a double equal sign component as can be seen if the command add_name alpha.** ==.1 is used instead. The latter command has a different effect. For example, it attempts to add the name "alpha.1" to both "alpha.pl1" and "alpha.list", leading to a name duplication error. The command rename ???*.data %%%.= renames all two-component entrynames that have a last component of data and a first component containing three or more characters so that the first component is truncated to the first three characters and the second component is data (e.g., alpha.data would be renamed alp.data). The command rename *.data %%%.= results in an error if the first component of any name matching *.data has fewer than three characters. Archive-Component Pathnames and Equalnames: Some commands that accept multiple pathnames as their arguments allow any of the pathnames to be archive component pathnames. Pathnames after the first may contain equalnames. This is particularly to be expected if the first pathname is permitted to contain starnames. In an archive pathname, there are two entrynames, with the archive name appearing before the double colon ("::") and the component name after the double colon. The star and equal conventions handle the two names separately. The rules for constructing and interpreting equalnames in the two portions of an archive component pathname are identical to those for ordinary equalnames described earlier. Either or both of the archive and component names may be equalnames in pathnames subsequent to the first pathname. This usage makes it easy for the user to request an operation on sets of segments or archive components, where segment or archive entrynames and component names are derived using the equal convention. The following rules are used to determine whether to apply a given equalname to the archive or component name specified in the first (source) pathname when constructing subsequent (target) pathnames. 1. If neither the source nor target pathnames are archive component pathnames, an equalname in the target pathname is applied to the source pathname just as described in the previous section on equalnames. 2. If the source pathname is not an archive component pathname, but the target pathname is an archive component pathname, an equalname in the target component name is applied to the source entryname; an equalname is not permitted in the target archive name in this case. 3. If the source pathname is an archive component pathname, but the target pathname is not an archive component pathname, an equalname in the target entryname is applied to the source component name, not the source archive entryname. 4. If both the source and target pathnames are archive component pathnames, an equalname in the target archive entryname is applied to the source archive entryname, and an equalname in the target component name is applied to the source component name. When applying the equalname to the source archive entryname, the ".archive" suffix is first removed from the archive entryname. Examples of archive component equalnames: The following examples illustrate the use of archive component pathnames and the compare_ascii command. The command compare_ascii test.pl1 source::old.=== is equivalent to compare_ascii test.pl1 source::old.test.pl1 and compares the segment "test.pl1" with the component "old.test.pl1" in the archive "source.archive". The command compare_ascii source.s::print_data.pl1 ===.ud::=== is equivalent to compare_ascii source.s::print_data.pl1 source.s.ud::print_data.pl1 and compares the components named "print_data.pl1" in the two archives, "source.s.archive" and "source.s.ud.archive". The command compare_ascii my_prog.pl1 ===::his_prog.== is invalid because there is no archive name in the source pathname corresponding to the "===" in the target pathname. Finally, the command compare_ascii tools::my_prog.pl1 his_prog.== is equivalent to compare_ascii tools::my_prog.pl1 his_prog.pl1 ----------------------------------------------------------- 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