Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ old-vc(1) — SunOS 4.1.3B

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sccs-help(1)

OLD-VC(1)  —  USER COMMANDS

NAME

old-vc − version control

SYNOPSIS

/usr/old/vc [ −a ] [ −s ] [ −t ] [ −c c ] [ keyword=value]...

DESCRIPTION

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 control statement.

Copying lines from the standard input to the standard output is conditional, based on tests (in control statements) of keyword values specified either in control statements, or as vc command-line arguments. 

OPTIONS

−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 discarded. 

−cc Specify an alternate control character to use instead of ‘:’. 

USAGE

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 beginning 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.

Keyword Replacement

A keyword is composed of 9 or less alphanumeric characters; the first must be alphabetic.  A value is any printable ASCII character or character 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 control characters, is encountered on a version control statement.  The −a option forces replacement of keywords in all lines of text.  An uninterpreted control character may be included in a value by preceding it with ‘\’. If a literal ‘\’ is desired, then it too must be preceded by a ‘\’.

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 recognized 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 included.

The logical sense of comparisons can be combined using the logical operators (in order of precedence):

( ) logical grouping

& and

| or

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 standard output, independent from the −a option.  The two leading control characters are removed, and keywords surrounded by control characters in text are replaced by their value before the line is copied to the output file. 

:on

:off Turn on or off keyword replacement on all lines. 

:ctl c Change the control character to c.

:msg message
Print message on the diagnostic output. 

:err message
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. 

SEE ALSO

sccs-help(1)

DIAGNOSTICS

Use sccs-help(1) for explanations. 
 

Sun Release 4.1  —  Last change: 16 November 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026