NAME
prs — print an
SCCS file (DEVELOPMENT)
SYNOPSIS
prs |
[-a][-d
dataspec][-r[SID]file
...] file... |
prs |
[-e | -l]
-c cutoff
[-d dataspec] file... |
prs |
[-e | -l]
-r[SID][-d
dataspec]file... |
DESCRIPTION
The prs utility writes to standard output
parts or all of an SCCS file in a user-supplied format.
OPTIONS
The prs utility supports the XBD
specification, Utility Syntax Guidelines , except that the
-r option has an optional option-argument. This
optional option-argument cannot be presented as a separate argument. The
following options are supported:
- -d dataspec
- Specify the output data specification. The dataspec is a string consisting of SCCS file data keywords (see Data Keywords ) interspersed with optional user-supplied text.
- -r[SID]
- Specify the SCCS identification string (SID) of a delta for which information is desired. If no SID option-argument is specified, the SID of the most recently created delta is assumed.
- -e
- Request information for all deltas created earlier than and including the
delta designated via the
-roption or the date-time given by the-coption. - -l
- Request information for all deltas created later than and including the
delta designated via the
-roption or the date-time given by the-coption. - -c cutoff
- Indicate the cutoff date-time, in the form:
For the YY component, values in the range [69-99] refer to years in the twentieth century (1969 to 1999 inclusive); values in the range [00-68] refer to years in the twenty-first century (2000 to 2068 inclusive). No changes (deltas) to the SCCS file that were created after the specified cutoff date-time are included in the output. Units omitted from the date-time default to their maximum possible values; for example, -c 7502 is equivalent to -c 750228235959 .
YY[MM[DD[HH[MM[SS]]]]]
- -a
- Request writing of information for both removed, that is, delta type = R
(see rmdel ) type and existing, that is, delta type = D , deltas. If the a
-type= option is not specified, information for existing deltas only is provided.
OPERANDS
The following operand is supported:
- file
- A pathname of an existing SCCS file or a directory. If file is a
directory,
prsbehaves as though each file in the directory were specified as a named file, except that non-SCCS files (last component of the pathname does not begin with s.) and unreadable files are silently ignored. If a single instance file is specified as -, the standard input is 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 are silently ignored.
STDIN
The standard input is a text file used only when the file operand is specified as -. Each line of the text file is interpreted as an SCCS pathname.
INPUT FILES
Any SCCS files displayed are files of an unspecified format.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of
prs :
LANG- Provide a default value for the internationalisation variables that are
unset or null. If
LANGis unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined. LC_ALL- If set to a non-empty string value, override the values of all the other internationalisation variables.
LC_CTYPE- Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files).
LC_MESSAGES- Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
NLSPATH- Determine the location of message catalogues for the processing of LC_MESSAGES .
ASYNCHRONOUS EVENTS
Default.
STDOUT
The standard output is a text file whose format is dependent on
the data keywords specified with the -d option.
Data Keywords
Data keywords specify which parts of an SCCS file are to be retrieved and output. All parts of an SCCS file have an associated data keyword. A data keyword may appear in a dataspec multiple times.
The information written by prs consists
of: (1) the user-supplied text; and (2) appropriate values (extracted from
the SCCS file) substituted for the recognised data keywords in the order of
appearance in the dataspec. The format of a data keyword
value is either simple (S), in which keyword substitution is direct, or
multi-line (M).
User-supplied text is any text other than recognised data
keywords. A tab character is specified by \t and newline by \n. When the
-r option is not specified, the default
dataspec is: :PN::\n\n and the
following dataspec is used for each selected delta:
:Dt:\t:DL:\nMRs:\n:MR:COMMENTS:\n:C:\n
| SCCS File Data Keywords | ||||
| Keyword | Data Item | File Section | Value | Format |
| :Dt: | Delta information | Delta Table | See below* | S |
| :DL: | Delta line statistics | Ta :Li:/:Ld:/:Lu: Ta S | ||
| :Li: | Lines inserted by Delta | Ta nnnnn Ta S | ||
| :Ld: | Lines deleted by Delta | Ta nnnnn Ta S | ||
| :Lu: | Lines unchanged by Delta | Ta nnnnn Ta S | ||
| :DT: | Delta type | Ta D or R Ta S | ||
| :I: | SCCS ID string (SID) | Ta See below** Ta S | ||
| :R: | Release number | Ta nnnn Ta S | ||
| :L: | Level number | Ta nnnn Ta S | ||
| :B: | Branch number | Ta nnnn Ta S | ||
| :S: | Sequence number | Ta nnnn Ta S | ||
| :D: | Date delta created | Ta :Dy:/:Dm:/:Dd: Ta S | ||
| :Dy: | Year delta created | Ta nn Ta S | ||
| :Dm: | Month delta created | Ta nn Ta S | ||
| :Dd: | Day delta created | Ta nn Ta S | ||
| :T: | Time delta created | Ta :Th:::Tm:::Ts: Ta S | ||
| :Th: | Hour delta created | Ta nn Ta S | ||
| :Tm: | Minutes delta created | Ta nn Ta S | ||
| :Ts: | Seconds delta created | Ta nn Ta S | ||
| :P: | Programmer who created Delta | Ta logname Ta S | ||
| :DS: | Delta sequence number | Ta nnnn Ta S | ||
| :DP: | Predecessor Delta seq-no. | Ta nnnn Ta S | ||
| :DI: | Seq-no. of deltas included, excluded or ignored | Ta :Dn:/:Dx:/:Dg: Ta S | ||
| :Dn: | Deltas included (seq #) | Ta :DS:~:DS:... Ta S | ||
| :Dx: | Deltas excluded (seq #) | Ta :DS:~:DS:... Ta S | ||
| :Dg: | Deltas ignored (seq #) | Ta :DS:~:DS:... Ta S | ||
| :MR: | MR numbers for delta | Ta text Ta M | ||
| :C: | Comments for delta | Ta text Ta M | ||
| :UN: | User names | User Names | text | M |
| :FL: | Flag list | Flags | text | M |
| :Y: | Module type flag | Ta text Ta S | ||
| :MF: | MR validation flag | Ta yes or no Ta S | ||
| :MP: | MR validation pgm name | Ta text Ta S | ||
| :KF: | Keyword error, warning flag | Ta yes or no Ta S | ||
| :KV: | Keyword validation string | Ta text Ta S | ||
| :BF: | Branch flag | Ta yes or no Ta S | ||
| :J: | Joint edit flag | Ta yes or no Ta S | ||
| :LK: | Locked releases | Ta :R:... Ta S | ||
| :Q: | User-defined keyword | Ta text Ta S | ||
| :M: | Module name | Ta text Ta S | ||
| :FB: | Floor boundary | Ta :R: Ta S | ||
| :CB: | Ceiling boundary | Ta :R: Ta S | ||
| :Ds: | Default SID | Ta :I: Ta S | ||
| :ND: | Null delta flag | Ta yes or no Ta S | ||
| :FD: | File descriptive text | Comments | text | M |
| :BD: | Body | Body | text | M |
| :GB: | Gotten body | Ta text Ta M | ||
| :W: | A form of what string | N/A | :Z::M:\t:I: | S |
| :A: | A form of what string | N/A | :Z::Y: :M: :I::Z: | S |
| :Z: | what string delimiter | N/A | @(#) | S |
| :F: | SCCS filename | N/A | text | S |
| :PN: | SCCS file pathname | N/A | text | S |
STDERR
Used only for diagnostic messages.
OUTPUT FILES
None.
EXTENDED DESCRIPTION
None.
EXIT STATUS
The following exit values are returned:
CONSEQUENCES OF ERRORS
Default.
APPLICATION USAGE
None.
EXAMPLES
- The following example:
prs -d "User Names for :F: are:\n:UN:" s.file
- may write to standard output:
-
User Names for s.file are: xyz 131 abc
- The following example:
prs -d "Delta for pgm :M:: :I: - :D: By :P:" -r s.file
- may write to standard output:
Delta for pgm main.c: 3.7 - 77/12/01 By cas
- As a special case:
prs s.file
- may write to standard output:
s.file: <blank line> D 1.1 77/12/01 00:00:00 cas 1 000000/00000/00000 MRs: bl78-12345 bl79-54321 COMMENTS: this is the comment line for s.file initial delta <blank line>
- for each delta table entry of the D type. The only option allowed to be
used with this special case is the
-aoption.
FUTURE DIRECTIONS
A version of prs that fully supports the
XBD specification, Utility Syntax Guidelines may be
introduced in a future issue.