delta - make a delta (change) to an SCCS file (DEVELOPMENT)
delta [-nps][-g list][-m mrlist][-r SID][-y[comment]] file...
The delta utility is used to permanently introduce into the named SCCS files changes that were made to the files retrieved by get (called the g-files, or generated files).
The delta utility supports the XBD specification, Utility Syntax Guidelines , except that the -y option has an optional option-argument. This optional option-argument cannot be presented as a separate argument. The following options are supported:
- -r SID
- Uniquely identify which delta is to be made to the SCCS file. The use of this option is necessary only if two or more outstanding get commands for editing (get -e) on the same SCCS file were done by the same person (login name). The SID value specified with the -r option can be either the SID specified on the get command line or the SID to be made as reported by the get utility; see get.
- Suppress the report to standard output of the activity associated with each file. See the STDOUT section.
- Specify retention of the edited g-file (normally removed at completion of delta processing).
- -g list
- Specify a list, (see get for the definition of list) of deltas that are to be ignored when the file is accessed at the change level (SID) created by this delta.
- -m mrlist
- Specify a modification request (MR) number that must be supplied as the reason for creating the new delta. This is used if the SCCS file has the v flag set; see admin. If -m is not used and the standard input is a terminal, the prompt described in the STDOUT section is written to standard output before the standard input is read; if the standard input is not a terminal, no prompt is issued. MRs in a list are separated by blanks. An unescaped newline character terminates the MR list. Note that if the v flag has a value, it is taken to be the name of a program which will validate the correctness of the MR numbers. If a non-zero exit status is returned from the MR number validation program, delta terminates. (It is assumed that the MR numbers were not all valid.)
- Describe the reason for making the delta. This is an arbitrary group of lines that would meet the definition of a text file. Systems support comments from zero to 512 bytes and may support longer values. A null string (specified as either -y, -y"" or in response to a prompt for a comment) is considered a valid comment. If -y is not specified and the standard input is a terminal, the prompt described in the STDOUT section is written to standard output before the standard input is read; if the standard input is not a terminal, no prompt is issued. An unescaped newline character terminates the comment text. The -y option is required if the file operand is specified as -.
- Write (to standard output) the SCCS file differences before and after the delta is applied in diff format; see diff.
The following operands are supported:
- A pathname of an existing SCCS file or a directory. If file is a directory, delta behaves 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.
The standard input is a text file used only in the following cases:
- A prompt is issued for the -m or -y options.
- The file operand is specified as -.
Input files are 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 (binary 001), the results are unspecified.
The following environment variables affect the execution of delta:
- Provide a default value for the internationalisation variables that are unset or null. If LANG is 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.
- If set to a non-empty string value, override the values of all the other internationalisation variables.
- 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).
- 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.
- Determine the location of message catalogues for the processing of LC_MESSAGES .
The standard output is used only for the following messages in the POSIX locale:
- Prompts (see the -m and -y options) in the following formats:
"MRs? " "comments? "
The MR prompt, if written, always precedes the comments prompt.
- A report of each file's activities (unless the -s option is specified) in the following format:
"%s\n%d inserted\n%d deleted\n%d unchanged\n", <<New SID>,<number of lines inserted>, <number of lines deleted>>, <<number of lines unchanged>>.
Used only for diagnostic messages.
Any SCCS files updated are files of an unspecified format.
The following exit values are returned:
- Successful completion.
- An error occurred.
A version of delta that fully supports the XBD specification, Utility Syntax Guidelines may be introduced in a future issue.
admin, diff, get, prs, rmdel.