Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

admin(1)

delta(1)

get(1)

prs(1)

sccs(1)

val(1)

Name

val − validate SCCS file

Syntax

val −
val [−s] [−rSID] [−mname] [−ytype] files

Description

The val command determines if the specified file is an SCCS file meeting the characteristics specified by the optional argument list.  Arguments to val may appear in any order. The arguments consist of keyletter arguments that begin with a “-” and named files.

The val command has a special argument, “-,” which causes reading of the standard input until an end-of-file condition is detected. Each line read is independently processed, as if it were a command line argument list.

The val command generates diagnostic messages on the standard output for each command line and file processed and also returns a single 8-bit code upon exit as described below. 

Options

The effects of any keyletter argument apply independently to each named file on the command line.  The keyletter arguments are defined as follows:

−Causes stdin to be read until end of file. 

−sSuppresses all error messages. 

−rSID
Indicates specified delta version number. A check is made to determine if the SID is ambiguous, for example, r 1 is ambiguous because it physically does not exist but implies 1.1, 1.2, and so forth, which may exist) or invalid, for example, r 1.0 or r 1.1.0 are invalid because neither case can exist as a valid delta number).  If the SID is valid and not ambiguous, a check is made to determine if it actually exists. 

−mname
Compares specified value with the SCCS val.1 keyword.

−ytype
Compares specified type with SCCS  keyword.

The 8-bit code returned by val is a disjunction of the possible errors.  It can be interpreted as a bit string where set bits are interpreted (from left to right) as:

bit 0 = missing file argument
bit 1 = unknown or duplicate keyletter argument
bit 2 = corrupted SCCS file
bit 3 = can’t open file or file not SCCS
bit 4 = SID is invalid or ambiguous
bit 5 = SID does not exist
bit 6 = %Y%, −y mismatch
bit 7 = %M%, −m mismatch

Note that val can process two or more files on a given command line and can process multiple command lines when reading the standard input. In these cases, an aggregate code is returned − a logical OR of the codes generated for each command line and file processed.

Restrictions

The val command can process up to 50 files on a single command line. Any number above 50 produces a core dump.

Diagnostics

Use sccshelp() for explanations.

See Also

admin(1), delta(1), get(1), prs(1), sccs(1)
Guide to the Source Code Control System

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