Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ed(1)

help(1)



VC(1)                    DOMAIN/IX SYS5                     VC(1)



NAME
     vc - version control

USAGE
     vc [ -a ] [ -t ] [ -cchar ] [ -s ] [ keyword=value ...
     keyword=value ]

DESCRIPTION
     Vc copies lines from the standard input to the standard out-
     put under control of its arguments and control statements
     encountered in the standard input.  In the process of per-
     forming the copy operation, user-declared keywords may be
     replaced by their string value when they appear in plain
     text and/or control statements.

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

     A control statement is a single line beginning with a con-
     trol character, except as modified by the -t option (see
     below).  The default control character is a colon (:),
     except as modified by the -c option (see below).  Input
     lines beginning with a backslash (\) and followed by a con-
     trol character are not control lines.  These lines are
     copied to the standard output with the backslash removed.
     Lines beginning with a backslash and followed by a non-
     control character are copied in their entirety.

     A keyword is composed of nine or fewer alphanumerics; the
     first must be alphabetic.  A value is any ASCII string that
     can be created with ed(1); a numeric value is an unsigned
     string of digits.  Keyword values may not contain blanks or
     tabs.

     Vc replaces keywords by values whenever it finds a keyword
     surrounded by control characters on a version control state-
     ment.  The -a option (see below) forces replacement of key-
     words in all lines of text.  An uninterpreted control char-
     acter may be included in a value by preceding it with a
     backslash.  If a literal \ is desired, then it too must be
     preceded by a backslash.

OPTIONS
     -a        Force replacement of keywords surrounded by con-
               trol characters with their assigned value in all
               text lines.

     -t        Ignore all characters from the beginning of a line



Printed 12/4/86                                              VC-1







VC(1)                    DOMAIN/IX SYS5                     VC(1)



               up to and including the first tab character, for
               the purpose of detecting a control statement.  If
               one is found, discard all characters up to and
               including the tab.

     -cchar    Specify a control character to be used in place of
               a colon.

     -s        Silence warning messages (not error) that are nor-
               mally printed on the diagnostic output.

VERSION CONTROL STATEMENTS
     :dcl keyword[, ..., keyword]
          Declare keywords.  All keywords must be declared.

     :asg keyword=value
          Assign values to keywords.  An asg statement overrides
          the assignment for the corresponding keyword on the vc
          command line and all previous asg's for that keyword.
          Keywords declared but not assigned values have null
          values.

     :if condition
          .
          .
     :end

          Skip lines of the standard input. If the condition is
          true, all lines between the if statement and the match-
          ing end statement are copied to the standard output.
          If the condition is false, all intervening lines are
          discarded, including control statements.  Note that
          intervening if statements and matching end statements
          are recognized solely for the purpose of maintaining
          the proper if-end matching.

          The syntax of a condition is:

           <cond>  ::= [ ``not'' ] <or>
           <or>    ::= <and> | <and> ``|'' <or>
           <and>   ::= <exp> | <exp> ``&'' <and>
           <exp>   ::= ``('' <or> ``)'' | <value> <op> <value>
           <op>    ::= ``='' | ``!='' | ``<'' | ``>''
           <value> ::= <arbitrary ASCII string> | <numeric string>

          The available operators and their meanings are:

             =      equal
             !=     not equal
             &      and
             |      or



VC-2                                              Printed 12/4/86






VC(1)                    DOMAIN/IX SYS5                     VC(1)



             >      greater than
             <      less than
             ( )    used for logical groupings
             not    may only occur immediately after the if, and
                    when present, inverts the value of the
                    entire condition

          The > and < operate only on unsigned integer values
          (e.g., : 012 > 12 is false).  All other operators take
          strings as arguments (e.g., : 012 != 12 is true).  The
          precedence of the operators (from highest to lowest)
          is:

             = != > <      all of equal precedence
             &
             |

          Values must be separated from operators or parentheses
          by at least one blank or tab.
          Parentheses may be used to alter the order of pre-
          cedence.

     ::text
          Replace keywords on lines copied to the standard out-
          put.  Remove the two leading control characters, and
          replace keywords surrounded by control characters in
          text by their value before copying the line to the out-
          put file.  This action is independent of the -a option.

     :on

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

     :ctl char
          Change the control character to char.

     :msg message
          Print the given message on the diagnostic output.

     :err message
          Print the given message followed by:

               ERROR: err statement on line ... (915)

          on the diagnostic output.  Halt vc execution, and
          return an exit code of 1.






Printed 12/4/86                                              VC-3







VC(1)                    DOMAIN/IX SYS5                     VC(1)



EXIT CODES
     0 - normal
     1 - any error

DIAGNOSTICS
     Use help(1) for explanations.

RELATED INFORMATION
     ed(1), help(1).












































VC-4                                              Printed 12/4/86





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