1PRS(P) POSIX Programmer's Manual PRS(P)
2
3
4
6 prs - print an SCCS file (DEVELOPMENT)
7
9 prs [-a][-d dataspec][-r[SID]] file...
10
11
12
13 prs [ -e| -l] -c cutoff [-d dataspec] file...
14
15
16
17 prs [ -e| -l] -r[SID][-d dataspec]file...
18
19
21 The prs utility shall write to standard output parts or all of an SCCS
22 file in a user-supplied format.
23
25 The prs utility shall conform to the Base Definitions volume of
26 IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines, except
27 that the -r option has an optional option-argument. This optional
28 option-argument cannot be presented as a separate argument. The follow‐
29 ing options shall be supported:
30
31 -d dataspec
32 Specify the output data specification. The dataspec shall be a
33 string consisting of SCCS file data keywords (see Data Keywords
34 ) interspersed with optional user-supplied text.
35
36 -r[SID]
37 Specify the SCCS identification string (SID) of a delta for
38 which information is desired. If no SID option-argument is spec‐
39 ified, the SID of the most recently created delta shall be
40 assumed.
41
42 -e Request information for all deltas created earlier than and
43 including the delta designated via the -r option or the date-
44 time given by the -c option.
45
46 -l Request information for all deltas created later than and
47 including the delta designated via the -r option or the date-
48 time given by the -c option.
49
50 -c cutoff
51 Indicate the cutoff date-time, in the form:
52
53
54 YY[MM[DD[HH[MM[SS]]]]]
55
56 For the YY component, values in the range [69,99] shall refer to years
57 1969 to 1999 inclusive, and values in the range [00,68] shall refer to
58 years 2000 to 2068 inclusive.
59
60 Note:
61 It is expected that in a future version of IEEE Std 1003.1-2001
62 the default century inferred from a 2-digit year will change.
63 (This would apply to all commands accepting a 2-digit year as
64 input.)
65
66
67 No changes (deltas) to the SCCS file that were created after the speci‐
68 fied cutoff date-time shall be included in the output. Units omitted
69 from the date-time default to their maximum possible values; for exam‐
70 ple, -c 7502 is equivalent to -c 750228235959.
71
72 -a Request writing of information for both removed-that is, delta
73 type= R (see rmdel )- and existing-that is, delta type= D,-
74 deltas. If the -a option is not specified, information for
75 existing deltas only shall be provided.
76
77
79 The following operand shall be supported:
80
81 file A pathname of an existing SCCS file or a directory. If file is a
82 directory, the prs utility shall behave as though each file in
83 the directory were specified as a named file, except that non-
84 SCCS files (last component of the pathname does not begin with
85 s.) and unreadable files shall be silently ignored.
86
87 If exactly one file operand appears, and it is '-' , the standard input
88 shall be read; each line of the standard input shall be taken to be the
89 name of an SCCS file to be processed. Non-SCCS files and unreadable
90 files shall be silently ignored.
91
92
94 The standard input shall be a text file used only when the file operand
95 is specified as '-' . Each line of the text file shall be interpreted
96 as an SCCS pathname.
97
99 Any SCCS files displayed are files of an unspecified format.
100
102 The following environment variables shall affect the execution of prs:
103
104 LANG Provide a default value for the internationalization variables
105 that are unset or null. (See the Base Definitions volume of
106 IEEE Std 1003.1-2001, Section 8.2, Internationalization Vari‐
107 ables for the precedence of internationalization variables used
108 to determine the values of locale categories.)
109
110 LC_ALL If set to a non-empty string value, override the values of all
111 the other internationalization variables.
112
113 LC_CTYPE
114 Determine the locale for the interpretation of sequences of
115 bytes of text data as characters (for example, single-byte as
116 opposed to multi-byte characters in arguments and input files).
117
118 LC_MESSAGES
119 Determine the locale that should be used to affect the format
120 and contents of diagnostic messages written to standard error.
121
122 NLSPATH
123 Determine the location of message catalogs for the processing of
124 LC_MESSAGES .
125
126
128 Default.
129
131 The standard output shall be a text file whose format is dependent on
132 the data keywords specified with the -d option.
133
134 Data Keywords
135 Data keywords specify which parts of an SCCS file shall be retrieved
136 and output. All parts of an SCCS file have an associated data keyword.
137 A data keyword may appear in a dataspec multiple times.
138
139 The information written by prs shall consist of:
140
141 1. The user-supplied text
142
143 2. Appropriate values (extracted from the SCCS file) substituted for
144 the recognized data keywords in the order of appearance in the
145 dataspec
146
147 The format of a data keyword value shall either be simple ( 'S' ), in
148 which keyword substitution is direct, or multi-line ( 'M' ).
149
150 User-supplied text shall be any text other than recognized data key‐
151 words. A <tab> shall be specified by '\t' and <newline> by '\n' . When
152 the -r option is not specified, the default dataspec shall be:
153
154
155 :PN::\n\n
156
157 and the following dataspec shall be used for each selected delta:
158
159
160 :Dt:\t:DL:\nMRs:\n:MR:COMMENTS:\n:C:
161
162 SCCS File Data Keywords
163 Keyword Data Item File Section Value Format
164 :Dt: Delta information Delta Table See below* S
165 :DL: Delta line statistics " :Li:/:Ld:/:Lu: S
166 :Li: Lines inserted by Delta " nnnnn*** S
167 :Ld: Lines deleted by Delta " nnnnn*** S
168 :Lu: Lines unchanged by Delta " nnnnn*** S
169 :DT: Delta type " D or R S
170 :I: SCCS ID string (SID) " See below** S
171 :R: Release number " nnnn S
172 :L: Level number " nnnn S
173 :B: Branch number " nnnn S
174 :S: Sequence number " nnnn S
175 :D: Date delta created " :Dy:/:Dm:/:Dd: S
176 :Dy: Year delta created " nn S
177 :Dm: Month delta created " nn S
178 :Dd: Day delta created " nn S
179 :T: Time delta created " :Th:::Tm:::Ts: S
180 :Th: Hour delta created " nn S
181 :Tm: Minutes delta created " nn S
182 :Ts: Seconds delta created " nn S
183 :P: Programmer who created Delta " logname S
184 :DS: Delta sequence number " nnnn S
185 :DP: Predecessor Delta sequence " nnnn S
186 number
187 :DI: Sequence number of deltas " :Dn:/:Dx:/:Dg: S
188 included, excluded, or ignored
189 :Dn: Deltas included (sequence #) " :DS: :DS: ... S
190 :Dx: Deltas excluded (sequence #) " :DS: :DS: ... S
191 :Dg: Deltas ignored (sequence #) " :DS: :DS: ... S
192 :MR: MR numbers for delta " text M
193 :C: Comments for delta " text M
194 :UN: User names User Names text M
195 :FL: Flag list Flags text M
196 :Y: Module type flag " text S
197 :MF: MR validation flag " yes or no S
198
199 :MP: MR validation program name " text S
200 :KF: Keyword error, warning flag " yes or no S
201 :KV: Keyword validation string " text S
202 :BF: Branch flag " yes or no S
203 :J: Joint edit flag " yes or no S
204 :LK: Locked releases " :R: ... S
205 :Q: User-defined keyword " text S
206 :M: Module name " text S
207 :FB: Floor boundary " :R: S
208 :CB: Ceiling boundary " :R: S
209 :Ds: Default SID " :I: S
210 :ND: Null delta flag " yes or no S
211 :FD: File descriptive text Comments text M
212 :BD: Body Body text M
213 :GB: Gotten body " text M
214 :W: A form of what string N/A :Z::M:\t:I: S
215 :A: A form of what string N/A :Z::Y: :M: :I::Z: S
216 :Z: what string delimiter N/A @(#) S
217 :F: SCCS filename N/A text S
218 :PN: SCCS file pathname N/A text S
219
220 * :Dt:= :DT: :I: :D: :T: :P: :DS: :DP:
221
222 ** :R:.:L:.:B:.:S: if the delta is a branch delta ( :BF:== yes)
223 :R:.:L: if the delta is not a branch delta ( :BF:== no)
224
225 *** The line statistics are capped at 99999. For example, if 100000
226 lines were unchanged in a certain revision, :Lu: shall produce
227 the value 99999.
228
229
231 The standard error shall be used only for diagnostic messages.
232
234 None.
235
237 None.
238
240 The following exit values shall be returned:
241
242 0 Successful completion.
243
244 >0 An error occurred.
245
246
248 Default.
249
250 The following sections are informative.
251
253 None.
254
256 1. The following example:
257
258
259 prs -d "User Names for :F: are:\n:UN:" s.file
260
261 might write to standard output:
262
263
264 User Names for s.file are:
265 xyz
266 131
267 abc
268
269 2. The following example:
270
271
272 prs -d "Delta for pgm :M:: :I: - :D: By :P:" -r s.file
273
274 might write to standard output:
275
276
277 Delta for pgm main.c: 3.7 - 77/12/01 By cas
278
279 3. As a special case:
280
281
282 prs s.file
283
284 might write to standard output:
285
286
287 s.file:
288 <blank line>
289 D 1.1 77/12/01 00:00:00 cas 1 000000/00000/00000
290 MRs:
291 bl78-12345
292 bl79-54321
293 COMMENTS:
294 this is the comment line for s.file initial delta
295 <blank line>
296
297 for each delta table entry of the D type. The only option allowed to be
298 used with this special case is the -a option.
299
301 None.
302
304 None.
305
307 admin , delta , get , what
308
310 Portions of this text are reprinted and reproduced in electronic form
311 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
312 -- Portable Operating System Interface (POSIX), The Open Group Base
313 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
314 Electrical and Electronics Engineers, Inc and The Open Group. In the
315 event of any discrepancy between this version and the original IEEE and
316 The Open Group Standard, the original IEEE and The Open Group Standard
317 is the referee document. The original Standard can be obtained online
318 at http://www.opengroup.org/unix/online.html .
319
320
321
322IEEE/The Open Group 2003 PRS(P)