get - get a version of an SCCS file (DEVELOPMENT)
get [-begkmnlLpst][-c cutoff][-i list][-r SID][-x list] file...
The get utility shall generate a text file from each named SCCS file according to the specifications given by its options.
The generated text shall normally be written into a file called the g-file whose name is derived from the SCCS filename by simply removing the leading "s." .
The get utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
The following options shall be supported:
YY[MM[DD[HH[MM[SS]]]]]
For the YY component, values in the range [69,99] shall refer to years 1969 to 1999 inclusive, and values in the range [00,68] shall refer to years 2000 to 2068 inclusive.
No changes (deltas) to the SCCS file that were created after the specified cutoff date-time shall be included in the generated text file. Units omitted from the date-time default to their maximum possible values; for example, -c 7502 is equivalent to -c 750228235959.
Any number of non-numeric characters may separate the various 2-digit pieces of the cutoff date-time. This feature allows the user to specify a cutoff date in the form: -c "77/2/2 9:22:25".
If the g-file generated by get with a -e option is accidentally ruined in the process of editing, it may be regenerated by re-executing the get command with the -k option in place of the -e option.
SCCS file protection specified via the ceiling, floor, and authorized user list stored in the SCCS file shall be enforced when the -e option is used.
<list> ::= <range> | <list> , <range> <range> ::= SID | SID - SID
SID, the SCCS Identification of a delta, may be in any form shown in the "SID Specified" column of the table in the EXTENDED DESCRIPTION section, except that the result of supplying a partial SID is unspecified. A diagnostic message shall be written if the first SID in the range is not an ancestor of the second SID in the range.
"%s\t%s", <SID>, <text line>
"%s\t%s", <%M% value>, <text line>
When both the -m and -n options are used, the <text line> shall be replaced by the -m option-generated format.
The following operands shall be supported:
If exactly one file operand appears, and it is '-' , the standard input shall be read; each line of the standard input is taken to be the name of an SCCS file to be processed. Non-SCCS files and unreadable files shall be silently ignored.
The standard input shall be a text file used only if the file operand is specified as '-' . Each line of the text file shall be interpreted as an SCCS pathname.
The SCCS files shall be files of an unspecified format.
The following environment variables shall affect the execution of get:
For each file processed, get shall write to standard output the SID being accessed and the number of lines retrieved from the SCCS file, in the following format:
"%s\n%d lines\n", <SID>, <number of lines>
If the -e option is used, the SID of the delta to be made shall appear after the SID accessed and before the number of lines generated, in the POSIX locale:
"%s\nnew delta %s\n%d lines\n", <SID accessed>, <SID to be made>, <number of lines>
If there is more than one named file or if a directory or standard input is named, each pathname shall be written before each of the lines shown in one of the preceding formats:
"\n%s:\n", <pathname>
If the -L option is used, a delta summary shall be written following the format specified below for l-files.
If the -i option is used, included deltas shall be listed following the notation, in the POSIX locale:
"Included:\n"
If the -x option is used, excluded deltas shall be listed following the notation, in the POSIX locale:
"Excluded:\n"
If the -p or -L options are specified, the standard output shall consist of the text retrieved from the SCCS file.
The standard error shall be used only for diagnostic messages, except if the -p or -L options are specified, it shall include all informative messages normally sent to standard output.
Several auxiliary files may be created by get. These files are known generically as the g-file, l-file, p-file, and z-file. The letter before the hyphen is called the tag. An auxiliary filename shall be formed from the SCCS filename: the application shall ensure that the last component of all SCCS filenames is of the form s. module-name; the auxiliary files shall be named by replacing the leading s with the tag. The g-file shall be an exception to this scheme: the g-file is named by removing the s. prefix. For example, for s.xyz.c, the auxiliary filenames would be xyz.c, l.xyz.c, p.xyz.c, and z.xyz.c, respectively.
The g-file, which contains the generated text, shall be created in the current directory (unless the -p option is used). A g-file shall be created in all cases, whether or not any lines of text were generated by the get. It shall be owned by the real user. If the -k option is used or implied, the g-file shall be writable by the owner only (read-only for everyone else); otherwise, it shall be read-only. Only the real user need have write permission in the current directory.
The l-file shall contain a table showing which deltas were applied in generating the retrieved text. The l-file shall be created in the current directory if the -l option is used; it shall be read-only and it is owned by the real user. Only the real user need have write permission in the current directory.
Lines in the l-file shall have the following format:
"%c%c%c%s\t%s%s\n", <code1>, <code2>, <code3>, <SID>, <date-time>, <login>
where the entries are:
The comments and MR data shall follow on subsequent lines, indented one <tab>. A blank line shall terminate each entry.
The p-file shall be used to pass information resulting from a get with a -e option along to delta. Its contents shall also be used to prevent a subsequent execution of get with a -e option for the same SID until delta is executed or the joint edit flag, j, is set in the SCCS file. The p-file shall be created in the directory containing the SCCS file and the application shall ensure that the effective user has write permission in that directory. It shall be writable by owner only, and owned by the effective user. Each line in the p-file shall have the following format:
"%s%s%s%s%s%s\n", <g-file SID>, <SID of new delta>, <login-name of real user>, <date-time>, <i-value>, <x-value>
where <i-value> uses the format "" if no -i option was specified, and shall use the format:
"-i%s", <-i option option-argument>
if a -i option was specified and <x-value> uses the format "" if no -x option was specified, and shall use the format:
"-x%s", <-x option option-argument>
if a -x option was specified. There can be an arbitrary number of lines in the p-file at any time; no two lines shall have the same new delta SID.
The z-file shall serve as a lock-out mechanism against simultaneous
updates. Its contents shall be the binary process ID
of the command (that is, get) that created it. The z-file
shall be created in the directory containing the SCCS file
for the duration of get. The same protection restrictions as
those for the p-file shall apply for the z-file.
The z-file shall be created read-only.
<th colspan="5" align="center"> Determination of SCCS Identification String | ||||||||||
SID* | -b Keyletter | Other | SID | SID of Delta | ||||||
Specified | Used | Conditions | Retrieved | to be Created | ||||||
none | no | R defaults to mR | mR.mL | mR.(mL+1) | ||||||
none | yes | R defaults to mR | mR.mL | mR.mL.(mB+1).1 | ||||||
R | no | R > mR | mR.mL | R.1*** | ||||||
R | no | R = mR | mR.mL | mR.(mL+1) | ||||||
R | yes | R > mR | mR.mL | mR.mL.(mB+1).1 | ||||||
R | yes | R = mR | mR.mL | mR.mL.(mB+1).1 | ||||||
R | - | R < mR and R does not exist | hR.mL** | hR.mL.(mB+1).1 | ||||||
R | - | Trunk successor in release > R and R exists | R.mL | R.mL.(mB+1).1 | ||||||
R.L | no | No trunk successor | R.L | R.(L+1) | ||||||
R.L | yes | No trunk successor | R.L | R.L.(mB+1).1 | ||||||
R.L | - | Trunk successor in release >= R | R.L | R.L.(mB+1).1 | ||||||
R.L.B | no | No branch successor | R.L.B.mS | R.L.B.(mS+1) | ||||||
R.L.B | yes | No branch successor | R.L.B.mS | R.L.(mB+1).1 | ||||||
R.L.B.S | no | No branch successor | R.L.B.S | R.L.B.(S+1) | ||||||
R.L.B.S | yes | No branch successor | R.L.B.S | R.L.(mB+1).1 | ||||||
R.L.B.S | - | Branch successor | R.L.B.S | R.L.(mB+1).1 |
When a g-file is generated, the creation time of deltas in the SCCS file may be taken into account. If any of these times are apparently in the future, the behavior is unspecified.
Identifying information shall be inserted into the text retrieved from the SCCS file by replacing identification keywords with their value wherever they occur. The following keywords may be used in the text stored in an SCCS file:
%W%=%Z%%M%<tab>%I%
%A%=%Z%%Y%%M%%I%%Z%
The following exit values shall be returned:
Default.
The following sections are informative.
Problems can arise if the system date and time have been modified (for example, put forward and then back again, or unsynchronized clocks across a network) and can also arise when different values of the TZ environment variable are used.
Problems of a similar nature can also arise for the operation of the delta utility, which compares the previous file body against the working file as part of its normal operation.
The -lp option may be withdrawn in a future version.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |