OLD-VC(1) General Commands Manual OLD-VC(1)
old-vc - version control
/usr/old/vc [ -a ] [ -s ] [ -t ] [ -cc ] [ keyword=value]...
The vc command copies lines from the standard input to the standard
output under control of its arguments and the control statements
encountered in the standard input. In the process of performing the
copy operation, a reference to a user-declared keyword is replaced by
its character-string value, when appearing in a plain text line or con-
Copying lines from the standard input to the standard output is condi-
tional, based on tests (in control statements) of keyword values speci-
fied either in control statements, or as vc command-line arguments.
-a Force replacement of keyword references in all text lines, and
not just in vc statements.
-s Silent. Suppress warning messages (but not error messages) that
are normally printed on the diagnostic output.
-t If a TAB character appears on a line, all characters from the
beginning of a line, up to and including the first TAB, are
ignored for the purpose of detecting a control statement. If
the TAB precedes a control statement, the leading text is dis-
-cc Specify an alternate control character to use instead of `:'.
vc distinguishes between text input lines and version control statement
lines. A version control statement (control statement) is a single
line beginning with a control character. The default control character
is colon (:), except as modified by the -cc option. Input lines begin-
ning with a backslash (\), and followed by a control character, are not
control lines and are copied to the standard output as text with the
backslash removed. Lines beginning with a backslash, but not followed
by a control character, are copied in their entirety.
A keyword is composed of 9 or less alphanumeric characters; the first
must be alphabetic. A value is any printable ASCII character or char-
acter string. An unsigned string of digits is treated as a numeric
value in control operations. Keyword values may not contain any SPACE
or TAB characters.
Keyword replacement is performed whenever a keyword, surrounded by con-
trol characters, is encountered on a version control statement. The -a
option forces replacement of keywords in all lines of text. An unin-
terpreted control character may be included in a value by preceding it
with `\'. If a literal `\' is desired, then it too must be preceded by
Version Control Statements
: dcl keyword[,keyword]
Declare a keyword. All keywords must be declared.
: asg keyword=value
Assign a value to a keyword. An asg statement overrides any
previous assignment for the corresponding keyword, including
those on the vc command line. Keywords declared, but not
assigned values, have null values.
:if [not] condition
:end Skip lines of the standard input. When condition is TRUE , all
lines between the if statement and the matching end statement
are copied to the standard output. Otherwise, the intervening
lines are discarded and ignored, including intervening control
statements. Intervening if and end control statements are rec-
ognized solely for the purpose of maintaining the proper if-end
matching. The not argument inverts the sense of the condition.
When it is used, intervening lines are included in the output
only when the conditions is false.
condition is a logical expression composed of comparisons and
logical operators. A comparison consists of two text values
(may be keyword references) separated by a comparison operator.
Each value must be separated from all operators by at least one
SPACE . Numeric strings are treated as unsigned integers for
certain comparisons. The comparison operators are:
= equal (string)
!= not equal (string)
>> greater than (numeric)
<< less than (numeric)
For instance, the line:
:if xxx != yyy
tests to see whether the string `xxx' is not equal to `yyy',
which is true; subsequent intervening lines are therefore
The logical sense of comparisons can be combined using the logi-
cal operators (in order of precedence):
( ) logical grouping
For instance, the line
:if xxx = yyy | xxx != yyy
is true because either comparison will make it true, while
:if xxx = yyy && xxx != yyy
is false, because in this case, both comparisons must be true.
::text Force keyword replacement on lines that are copied to the stan-
dard output, independent from the -a option. The two leading
control characters are removed, and keywords surrounded by con-
trol characters in text are replaced by their value before the
line is copied to the output file.
:off Turn on or off keyword replacement on all lines.
:ctl c Change the control character to c.
Print message on the diagnostic output.
Print the given message, followed by:
ERROR: err statement on line ... (915)
on the diagnostic output; vc halts execution, and returns an
exit code of 1.
Use sccs-help(1) for explanations.
16 November 1987 OLD-VC(1)