Blob Blame History Raw
'\" et
.TH PRS "1P" 2013 "IEEE/The Open Group" "POSIX Programmer's Manual"
.SH PROLOG
This manual page is part of the POSIX Programmer's Manual.
The Linux implementation of this interface may differ (consult
the corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.

.SH NAME
prs
\(em print an SCCS file (\fBDEVELOPMENT\fP)
.SH SYNOPSIS
.LP
.nf
prs \fB[\fR\(mia\fB] [\fR\(mid \fIdataspec\fB] [\fR\(mir\fB[\fISID\fB]]\fI file\fR...
.P
prs \fB[\fR\(mie|\(mil\fB]\fR \(mic \fIcutoff \fB[\fR\(mid \fIdataspec\fB]\fI file\fR...
.P
prs \fB[\fR\(mie|\(mil\fB]\fR \(mir\fB[\fISID\fB] [\fR\(mid \fIdataspec\fB] \fIfile\fR...
.fi
.SH DESCRIPTION
The
.IR prs
utility shall write to standard output parts or all of an SCCS file in
a user-supplied format.
.SH OPTIONS
The
.IR prs
utility shall conform to the Base Definitions volume of POSIX.1\(hy2008,
.IR "Section 12.2" ", " "Utility Syntax Guidelines",
except that the
.BR \(mir
option has an optional option-argument. This optional option-argument
cannot be presented as a separate argument. The following options
shall be supported:
.IP "\fB\(mid\ \fIdataspec\fR" 10
Specify the output data specification. The
.IR dataspec
shall be a string consisting of SCCS file
.IR data
.IR keywords
(see
.IR "Data Keywords")
interspersed with optional user-supplied text.
.IP "\fB\(mir[\fISID\fB]\fR" 10
Specify the SCCS identification string (SID) of a delta for which
information is desired. If no
.IR SID
option-argument is specified, the SID of the most recently created
delta shall be assumed.
.IP "\fB\(mie\fP" 10
Request information for all deltas created earlier than and including
the delta designated via the
.BR \(mir
option or the date-time given by the
.BR \(mic
option.
.IP "\fB\(mil\fP" 10
Request information for all deltas created later than and including the
delta designated via the
.BR \(mir
option or the date-time given by the
.BR \(mic
option.
.IP "\fB\(mic\ \fIcutoff\fR" 10
Indicate the
.IR cutoff
date-time, in the form:
.RS 10 
.sp
.RS 4
.nf
\fB
\fIYY\fB[\fIMM\fB[\fIDD\fB[\fIHH\fB[\fIMM\fB[\fISS\fB]]]]]\fR
.fi \fR
.P
.RE
.P
For the
.IR 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.
.TP 10
.BR Note:
It is expected that in a future version of this standard the default
century inferred from a 2-digit year will change. (This would apply to
all commands accepting a 2-digit year as input.)
.P
.P
No changes (deltas) to the SCCS file that were created after the
specified
.IR cutoff
date-time shall be included in the output. Units omitted from the
date-time default to their maximum possible values; for example,
.BR \(mic\07502
is equivalent to
.BR \(mic\0750228235959 .
.RE
.IP "\fB\(mia\fP" 10
Request writing of information for both removed\(emthat is,
.IR delta
.IR type =\c
.IR R
(see
.IR "\fIrmdel\fR\^")\(em\c
and existing\(emthat is,
.IR delta
.IR type =\c
.IR D ,\(em\c
deltas. If the
.BR \(mia
option is not specified, information for existing deltas only shall be
provided.
.SH OPERANDS
The following operand shall be supported:
.IP "\fIfile\fR" 10
A pathname of an existing SCCS file or a directory. If
.IR file
is a directory, the
.IR prs
utility shall behave 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
.BR s. )
and unreadable files shall be silently ignored.
.RS 10 
.P
If exactly one
.IR file
operand appears, and it is
.BR '\(mi' ,
the standard input shall be read; each line of the standard input shall
be taken to be the name of an SCCS file to be processed. Non-SCCS
files and unreadable files shall be silently ignored.
.RE
.SH STDIN
The standard input shall be a text file used only when the
.IR file
operand is specified as
.BR '\(mi' .
Each line of the text file shall be interpreted as an SCCS pathname.
.SH "INPUT FILES"
Any SCCS files displayed are files of an unspecified format.
.SH "ENVIRONMENT VARIABLES"
The following environment variables shall affect the execution of
.IR prs :
.IP "\fILANG\fP" 10
Provide a default value for the internationalization variables that are
unset or null. (See the Base Definitions volume of POSIX.1\(hy2008,
.IR "Section 8.2" ", " "Internationalization Variables"
the precedence of internationalization variables used to determine the
values of locale categories.)
.IP "\fILC_ALL\fP" 10
If set to a non-empty string value, override the values of all the
other internationalization variables.
.IP "\fILC_CTYPE\fP" 10
Determine the locale for the interpretation of sequences of bytes of
text data as characters (for example, single-byte as opposed to
multi-byte characters in arguments and input files).
.IP "\fILC_MESSAGES\fP" 10
.br
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard error.
.IP "\fINLSPATH\fP" 10
Determine the location of message catalogs for the processing of
.IR LC_MESSAGES .
.SH "ASYNCHRONOUS EVENTS"
Default.
.SH STDOUT
The standard output shall be a text file whose format is dependent on
the data keywords specified with the
.BR \(mid
option.
.SS "Data Keywords"
.P
Data keywords specify which parts of an SCCS file shall be retrieved
and output. All parts of an SCCS file have an associated data
keyword. A data keyword may appear in a
.IR dataspec
multiple times.
.P
The information written by
.IR prs
shall consist of:
.IP " 1." 4
The user-supplied text
.IP " 2." 4
Appropriate values (extracted from the SCCS file) substituted for the
recognized data keywords in the order of appearance in the
.IR dataspec
.P
The format of a data keyword value shall either be simple (\c
.BR 'S' ),
in which keyword substitution is direct, or multi-line (\c
.BR 'M' ).
.P
User-supplied text shall be any text other than recognized data
keywords. A
<tab>
shall be specified by
.BR '\et' 
and
<newline>
by
.BR '\en' .
When the
.BR \(mir
option is not specified, the default
.IR dataspec
shall be:
.sp
.RS 4
.nf
\fB
:PN::\en\en
.fi \fR
.P
.RE
.P
and the following
.IR dataspec
shall be used for each selected delta:
.sp
.RS 4
.nf
\fB
:Dt:\et:DL:\enMRs:\en:MR:COMMENTS:\en:C:
.fi \fR
.P
.RE
.TS
center box tab(!);
cB s s s s
cB | cB | cB | cB | cB
lB | l | c | lB | c.
SCCS File Data Keywords
_
Keyword!Data Item!File Section!Value!Format
_
:Dt:!Delta information!Delta Table!\fRSee below*\fP!S
:DL:!Delta line statistics!"!:Li:/:Ld:/:Lu:!S
:Li:!Lines inserted by Delta!"!\fInnnnn\fR***!S
:Ld:!Lines deleted by Delta!"!\fInnnnn\fR***!S
:Lu:!Lines unchanged by Delta!"!\fInnnnn\fR***!S
:DT:!Delta type!"!D or R!S
:I:!SCCS ID string (SID)!"!\fRSee below**\fP!S
:R:!Release number!"!\fInnnn\fR!S
:L:!Level number!"!\fInnnn\fR!S
:B:!Branch number!"!\fInnnn\fR!S
:S:!Sequence number!"!\fInnnn\fR!S
:D:!Date delta created!"!:Dy:/:Dm:/:Dd:!S
:Dy:!Year delta created!"!\fInn\fR!S
:Dm:!Month delta created!"!\fInn\fR!S
:Dd:!Day delta created!"!\fInn\fR!S
:T:!Time delta created!"!:Th:::Tm:::Ts:!S
:Th:!Hour delta created!"!\fInn\fR!S
:Tm:!Minutes delta created!"!\fInn\fR!S
:Ts:!Seconds delta created!"!\fInn\fR!S
:P:!Programmer who created Delta!"!\fIlogname\fR!S
:DS:!Delta sequence number!"!\fInnnn\fR!S
:DP:!Predecessor Delta sequence!"!\fInnnn\fR!S
!number
:DI:!Sequence number of deltas!"!:Dn:/:Dx:/:Dg:!S
!included, excluded, or ignored
:Dn:!Deltas included (sequence #)!"!:DS: :DS: .\|.\|.!S
:Dx:!Deltas excluded (sequence #)!"!:DS: :DS: .\|.\|.!S
:Dg:!Deltas ignored (sequence #)!"!:DS: :DS: .\|.\|.!S
:MR:!MR numbers for delta!"!\fItext\fR!M
:C:!Comments for delta!"!\fItext\fR!M
:UN:!User names!User Names!\fItext\fR!M
:FL:!Flag list!Flags!\fItext\fP!M
:Y:!Module type flag!"!\fItext\fR!S
:MF:!MR validation flag!"!yes \fRor\fP no!S
:MP:!MR validation program name!"!\fItext\fR!S
:KF:!Keyword error, warning flag!"!yes \fRor\fP no!S
:KV:!Keyword validation string!"!\fItext\fR!S
:BF:!Branch flag!"!yes \fRor\fP no!S
:J:!Joint edit flag!"!yes \fRor\fP no!S
:LK:!Locked releases!"!:R: .\|.\|.!S
:Q:!User-defined keyword!"!\fItext\fR!S
:M:!Module name!"!\fItext\fR!S
:FB:!Floor boundary!"!:R:!S
:CB:!Ceiling boundary!"!:R:!S
:Ds:!Default SID!"!:I:!S
:ND:!Null delta flag!"!yes \fRor\fP no!S
:FD:!File descriptive text!Comments!\fItext\fR!M
:BD:!Body!Body!\fItext\fR!M
:GB:!Gotten body!"!\fItext\fR!M
:W:!A form of \fIwhat\fP string!N/A!:Z::M:\et:I:!S
:A:!A form of \fIwhat\fP string!N/A!:Z::Y: :M: :I::Z:!S
:Z:!\fIwhat\fP string delimiter!N/A!\fR@(#)\fR!S
:F:!SCCS filename!N/A!\fItext\fR!S
:PN:!SCCS file pathname!N/A!\fItext\fR!S
.TE
.IP * 6
.BR :Dt: =\c
.BR ":DT: :I: :D: :T: :P: :DS: :DP:"
.IP ** 6
.BR ":R:.:L:.:B:.:S:"
if the delta is a branch delta (\c
.BR :BF: =\|=\c
.BR yes )
.br
.BR ":R:.:L:"
if the delta is not a branch delta (\c
.BR :BF: =\|=\c
.BR no )
.IP *** 6
The line statistics are capped at 99\|999. For example, if 100\|000
lines were unchanged in a certain revision,
.BR :Lu:
shall produce the value 99\|999.
.SH STDERR
The standard error shall be used only for diagnostic messages.
.SH "OUTPUT FILES"
None.
.SH "EXTENDED DESCRIPTION"
None.
.SH "EXIT STATUS"
The following exit values shall be returned:
.IP "\00" 6
Successful completion.
.IP >0 6
An error occurred.
.SH "CONSEQUENCES OF ERRORS"
Default.
.LP
.IR "The following sections are informative."
.SH "APPLICATION USAGE"
None.
.SH EXAMPLES
.IP " 1." 4
The following example:
.RS 4 
.sp
.RS 4
.nf
\fB
prs \(mid "User Names for :F: are:\en:UN:" s.file
.fi \fR
.P
.RE
.P
might write to standard output:
.sp
.RS 4
.nf
\fB
User Names for s.file are:
xyz
131
abc
.fi \fR
.P
.RE
.RE
.IP " 2." 4
The following example:
.RS 4 
.sp
.RS 4
.nf
\fB
prs \(mid "Delta for pgm :M:: :I: \(mi :D: By :P:" \(mir s.file
.fi \fR
.P
.RE
.P
might write to standard output:
.sp
.RS 4
.nf
\fB
Delta for pgm main.c: 3.7 \(mi 77/12/01 By cas
.fi \fR
.P
.RE
.RE
.IP " 3." 4
As a special case:
.RS 4 
.sp
.RS 4
.nf
\fB
prs s.file
.fi \fR
.P
.RE
.P
might write to standard output:
.sp
.RS 4
.nf
\fB
s.file:
<\fIblank line\fP>
D 1.1 77/12/01 00:00:00 cas 1 000000/00000/00000
MRs:
bl78\(mi12345
bl79\(mi54321
COMMENTS:
this is the comment line for s.file initial delta
<\fIblank line\fP>
.fi \fR
.P
.RE
.P
for each delta table entry of the
.BR D
type. The only option allowed to be used with this special case is the
.BR \(mia
option.
.RE
.SH RATIONALE
None.
.SH "FUTURE DIRECTIONS"
None.
.SH "SEE ALSO"
.IR "\fIadmin\fR\^",
.IR "\fIdelta\fR\^",
.IR "\fIget\fR\^",
.IR "\fIwhat\fR\^"
.P
The Base Definitions volume of POSIX.1\(hy2008,
.IR "Chapter 8" ", " "Environment Variables",
.IR "Section 12.2" ", " "Utility Syntax Guidelines"
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 7, Copyright (C) 2013 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group.
(This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.unix.org/online.html .

Any typographical or formatting errors that appear
in this page are most likely
to have been introduced during the conversion of the source files to
man page format. To report such errors, see
https://www.kernel.org/doc/man-pages/reporting_bugs.html .