summaryrefslogtreecommitdiffstats
path: root/man-pages-posix-2017/man1p/prs.1p
blob: 05f056d08aae99541adff5a748b21cc0994ee34b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
'\" et
.TH PRS "1P" 2017 "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-a\fB] [\fR-d \fIdataspec\fB] [\fR-r\fB[\fISID\fB]]\fI file\fR...
.P
prs \fB[\fR-e|-l\fB]\fR -c \fIcutoff \fB[\fR-d \fIdataspec\fB]\fI file\fR...
.P
prs \fB[\fR-e|-l\fB]\fR -r\fB[\fISID\fB] [\fR-d \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\(hy2017,
.IR "Section 12.2" ", " "Utility Syntax Guidelines",
except that the
.BR \-r
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\-d\ \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\-r[\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\-e\fP" 10
Request information for all deltas created earlier than and including
the delta designated via the
.BR \-r
option or the date-time given by the
.BR \-c
option.
.IP "\fB\-l\fP" 10
Request information for all deltas created later than and including the
delta designated via the
.BR \-r
option or the date-time given by the
.BR \-c
option.
.IP "\fB\-c\ \fIcutoff\fR" 10
Indicate the
.IR cutoff
date-time, in the form:
.RS 10 
.sp
.RS 4
.nf

\fIYY\fB[\fIMM\fB[\fIDD\fB[\fIHH\fB[\fIMM\fB[\fISS\fB]]]]]\fR
.fi
.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 \-c\07502
is equivalent to
.BR \-c\0750228235959 .
.RE
.IP "\fB\-a\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 \-a
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 '\-' ,
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 '\-' .
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\(hy2017,
.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 \-d
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 \-r
option is not specified, the default
.IR dataspec
shall be:
.sp
.RS 4
.nf

:PN::\en\en
.fi
.P
.RE
.P
and the following
.IR dataspec
shall be used for each selected delta:
.sp
.RS 4
.nf

:Dt:\et:DL:\enMRs:\en:MR:COMMENTS:\en:C:
.fi
.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

prs -d "User Names for :F: are:\en:UN:" s.file
.fi
.P
.RE
.P
might write to standard output:
.sp
.RS 4
.nf

User Names for s.file are:
xyz
131
abc
.fi
.P
.RE
.RE
.IP " 2." 4
The following example:
.RS 4 
.sp
.RS 4
.nf

prs -d "Delta for pgm :M:: :I: - :D: By :P:" -r s.file
.fi
.P
.RE
.P
might write to standard output:
.sp
.RS 4
.nf

Delta for pgm main.c: 3.7 - 77/12/01 By cas
.fi
.P
.RE
.RE
.IP " 3." 4
As a special case:
.RS 4 
.sp
.RS 4
.nf

prs s.file
.fi
.P
.RE
.P
might write to standard output:
.sp
.RS 4
.nf

s.file:
<\fIblank line\fP>
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
<\fIblank line\fP>
.fi
.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 \-a
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\(hy2017,
.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-2017, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 7, 2018 Edition,
Copyright (C) 2018 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group.
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.opengroup.org/unix/online.html .
.PP
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 .