summaryrefslogtreecommitdiffstats
path: root/man1p/delta.1p
blob: 3863f282bb69c219ceb9703462288e84230e6f25 (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
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "DELTA" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" delta 
.SH NAME
delta \- make a delta (change) to an SCCS file (\fBDEVELOPMENT\fP)
.SH SYNOPSIS
.LP
\fBdelta\fP \fB[\fP\fB-nps\fP\fB][\fP\fB-g\fP \fIlist\fP\fB][\fP\fB-m\fP
\fImrlist\fP\fB][\fP\fB-r\fP \fISID\fP\fB][\fP\fB-y\fP\fB[\fP\fIcomment\fP\fB]]\fP
\fIfile\fP\fB... \fP
.SH DESCRIPTION
.LP
The \fIdelta\fP utility shall be used to permanently introduce into
the named SCCS files changes that were made to the files
retrieved by \fIget\fP (called the \fIg-files\fP, or generated files).
.SH OPTIONS
.LP
The \fIdelta\fP utility shall conform to the Base Definitions volume
of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
except that the \fB-y\fP option has an
optional option-argument. This optional option-argument shall not
be presented as a separate argument.
.LP
The following options shall be supported:
.TP 7
\fB-r\ \fP \fISID\fP
Uniquely identify which delta is to be made to the SCCS file. The
use of this option shall be necessary only if two or more
outstanding \fIget\fP commands for editing ( \fIget\fP
\fB-e\fP) on the same SCCS file were done by the same person (login
name). The SID value specified with the \fB-r\fP option can
be either the SID specified on the \fIget\fP command line or the SID
to be made as reported by
the \fIget\fP utility; see \fIget\fP .
.TP 7
\fB-s\fP
Suppress the report to standard output of the activity associated
with each \fIfile\fP. See the STDOUT section.
.TP 7
\fB-n\fP
Specify retention of the edited \fIg-file\fP (normally removed at
completion of delta processing).
.TP 7
\fB-g\ \fP \fIlist\fP
Specify a \fIlist\fP (see \fIget\fP for the definition of \fIlist\fP)
of deltas that shall be ignored
when the file is accessed at the change level (SID) created by this
delta.
.TP 7
\fB-m\ \fP \fImrlist\fP
Specify a modification request (MR) number that the application shall
supply as the reason for creating the new delta. This
shall be used if the SCCS file has the \fBv\fP flag set; see \fIadmin\fP
\&. 
.LP
If \fB-m\fP is not used and \fB'-'\fP is not specified as a file argument,
and the standard input is a terminal, the prompt
described in the STDOUT section shall be written to standard output
before the standard input is read; if the standard input is not
a terminal, no prompt shall be issued.
.LP
MRs in a list shall be separated by <blank>s or escaped <newline>s.
An unescaped <newline> shall terminate the
MR list. The escape character is <backslash>.
.LP
If the \fBv\fP flag has a value, it shall be taken to be the name
of a program which validates the correctness of the MR
numbers. If a non-zero exit status is returned from the MR number
validation program, the \fIdelta\fP utility shall terminate. (It
is assumed that the MR numbers were not all valid.)
.TP 7
\fB-y[\fP\fIcomment\fP\fB]\fP
Describe the reason for making the delta. The \fIcomment\fP shall
be an arbitrary group of lines that would meet the
definition of a text file. Implementations shall support \fIcomment\fPs
from zero to 512 bytes and may support longer values. A
null string (specified as either \fB-y\fP, \fB-y\fP \fB""\fP , or
in response to a prompt for a comment) shall be considered a
valid \fIcomment\fP. 
.LP
If \fB-y\fP is not specified and \fB'-'\fP is not specified as a file
argument, and the standard input is a terminal, the
prompt described in the STDOUT section shall be written to standard
output before the standard input is read; if the standard input
is not a terminal, no prompt shall be issued. An unescaped <newline>
shall terminate the comment text. The escape character
is <backslash>.
.LP
The \fB-y\fP option shall be required if the \fIfile\fP operand is
specified as \fB'-'\fP .
.TP 7
\fB-p\fP
Write (to standard output) the SCCS file differences before and after
the delta is applied in \fIdiff\fP format; see \fIdiff\fP .
.sp
.SH OPERANDS
.LP
The following operand shall be supported:
.TP 7
\fIfile\fP
A pathname of an existing SCCS file or a directory. If \fIfile\fP
is a directory, the \fIdelta\fP 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 \fBs.\fP) and unreadable files shall be silently ignored.
.LP
If exactly one \fIfile\fP operand appears, and it is \fB'-'\fP , 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.
.sp
.SH STDIN
.LP
The standard input shall be a text file used only in the following
cases:
.IP " *" 3
To read an \fImrlist\fP or a \fIcomment\fP (see the \fB-m\fP and \fB-y\fP
options).
.LP
.IP " *" 3
A \fIfile\fP operand shall be specified as \fB'-'\fP . In this case,
the \fB-y\fP option must be used to specify the
comment, and if the SCCS file has the \fBv\fP flag set, the \fB-m\fP
option must also be used to specify the MR list.
.LP
.SH INPUT FILES
.LP
Input files shall be text files whose data is to be included in the
SCCS files. If the first character of any line of an input
file is <SOH> in the POSIX locale, the results are unspecified. If
this file contains more than 99999 lines, the number of
lines recorded in the header for this file shall be 99999 for this
delta.
.SH ENVIRONMENT VARIABLES
.LP
The following environment variables shall affect the execution of
\fIdelta\fP:
.TP 7
\fILANG\fP
Provide a default value for the internationalization variables that
are unset or null. (See the Base Definitions volume of
IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
for
the precedence of internationalization variables used to determine
the values of locale categories.)
.TP 7
\fILC_ALL\fP
If set to a non-empty string value, override the values of all the
other internationalization variables.
.TP 7
\fILC_CTYPE\fP
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).
.TP 7
\fILC_MESSAGES\fP
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard error,
and informative messages written to standard output.
.TP 7
\fINLSPATH\fP
Determine the location of message catalogs for the processing of \fILC_MESSAGES
\&.\fP
.TP 7
\fITZ\fP
Determine the timezone in which the time and date are written in the
SCCS file. If the \fITZ\fP variable is unset or NULL, an
unspecified system default timezone is used.
.sp
.SH ASYNCHRONOUS EVENTS
.LP
If SIGINT is caught, temporary files shall be cleaned up and \fIdelta\fP
shall exit with a non-zero exit code. The standard
action shall be taken for all other signals; see \fIUtility Description
Defaults\fP .
.SH STDOUT
.LP
The standard output shall be used only for the following messages
in the POSIX locale:
.IP " *" 3
Prompts (see the \fB-m\fP and \fB-y\fP options) in the following formats:
.sp
.RS
.nf

\fB"MRs? "
.sp

"comments? "
\fP
.fi
.RE
.LP
The MR prompt, if written, shall always precede the comments prompt.
.LP
.IP " *" 3
A report of each file's activities (unless the \fB-s\fP option is
specified) in the following format:
.sp
.RS
.nf

\fB"%s\\n%d inserted\\n%d deleted\\n%d unchanged\\n", <\fP\fINew SID\fP\fB>,
    <\fP\fInumber of lines inserted\fP\fB>, <\fP\fInumber of lines deleted\fP\fB>,
    <\fP\fInumber of lines unchanged\fP\fB>
\fP
.fi
.RE
.LP
.SH STDERR
.LP
The standard error shall be used only for diagnostic messages.
.SH OUTPUT FILES
.LP
Any SCCS files updated shall be files of an unspecified format.
.SH EXTENDED DESCRIPTION
.SS System Date and Time
.LP
When a delta is added to an SCCS file, the system date and time shall
be recorded for the new delta. If a \fIget\fP is performed using an
SCCS file with a date recorded apparently in the future, the behavior
is unspecified.
.SH EXIT STATUS
.LP
The following exit values shall be returned:
.TP 7
\ 0
Successful completion.
.TP 7
>0
An error occurred.
.sp
.SH CONSEQUENCES OF ERRORS
.LP
Default.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
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 \fITZ\fP environment variable are
used.
.LP
Problems of a similar nature can also arise for the operation of the
\fIget\fP utility,
which records the date and time in the file body.
.SH EXAMPLES
.LP
None.
.SH RATIONALE
.LP
None.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fIUtility Description Defaults\fP , \fIadmin\fP , \fIdiff\fP , \fIget\fP
, \fIprs\fP , \fIrmdel\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 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 .