389 lines
11 KiB
HTML
389 lines
11 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>val</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="val"></a> <a name="tag_04_166"></a><!-- val -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_04_166_01"></a>NAME</h4>
|
|
|
|
<blockquote>val - validate SCCS files (<b>DEVELOPMENT</b>)</blockquote>
|
|
|
|
<h4><a name="tag_04_166_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> val -<br>
|
|
<br>
|
|
val</tt> <b>[</b><tt>-s</tt><b>][</b><tt>-m</tt> <i>name</i><b>][</b><tt>-r</tt> <i>SID</i><b>][</b><tt>-y</tt>
|
|
<i>type</i><b>]</b> <i>file</i><tt>... <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
|
|
|
<tt><br>
|
|
</tt></blockquote>
|
|
|
|
<h4><a name="tag_04_166_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>val</i> utility shall determine whether the specified <i>file</i> is an SCCS file meeting the characteristics specified
|
|
by the options.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_04"></a>OPTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>val</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>, except that the usage of the <tt>'-'</tt>
|
|
operand is not strictly as intended by the guidelines (that is, reading options and operands from standard input).</p>
|
|
|
|
<p>The following options shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><b>-m </b> <i>name</i></dt>
|
|
|
|
<dd>Specify a <i>name</i>, which is compared with the SCCS %<b>M</b>% keyword in <i>file</i>; see <a href="get.html"><i>get</i></a>
|
|
.</dd>
|
|
|
|
<dt><b>-r </b> <i>SID</i></dt>
|
|
|
|
<dd>Specify a <i>SID</i> (SCCS Identification String), an SCCS delta number. A check shall be made to determine whether the
|
|
<i>SID</i> is ambiguous (for example, <b>-r 1</b> is ambiguous because it physically does not exist but implies 1.1, 1.2, and
|
|
so on, which may exist) or invalid (for example, <b>-r 1.0</b> or <b>-r 1.1.0</b> are invalid because neither case can
|
|
exist as a valid delta number). If the <i>SID</i> is valid and not ambiguous, a check shall be made to determine whether it
|
|
actually exists.</dd>
|
|
|
|
<dt><b>-s</b></dt>
|
|
|
|
<dd>Silence the diagnostic message normally written to standard output for any error that is detected while processing each named
|
|
file on a given command line.</dd>
|
|
|
|
<dt><b>-y </b> <i>type</i></dt>
|
|
|
|
<dd>Specify a <i>type</i>, which shall be compared with the SCCS %<b>Y</b>% keyword in <i>file</i>; see <a href=
|
|
"get.html"><i>get</i></a> .</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_05"></a>OPERANDS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following operands shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>file</i></dt>
|
|
|
|
<dd>A pathname of an existing SCCS file. If exactly one <i>file</i> operand appears, and it is <tt>'-'</tt> , the standard input
|
|
shall be read: each line shall be independently processed as if it were a command line argument list. (However, the line is not
|
|
subjected to any of the shell word expansions, such as parameter expansion or quote removal.)</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_06"></a>STDIN</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard input shall be a text file used only when the <i>file</i> operand is specified as <tt>'-'</tt> .</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_07"></a>INPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>Any SCCS files processed shall be files of an unspecified format.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_08"></a>ENVIRONMENT VARIABLES</h4>
|
|
|
|
<blockquote>
|
|
<p>The following environment variables shall affect the execution of <i>val</i>:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>LANG</i></dt>
|
|
|
|
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
|
|
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
|
|
|
|
<dt><i>LC_ALL</i></dt>
|
|
|
|
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
|
|
|
|
<dt><i>LC_CTYPE</i></dt>
|
|
|
|
<dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
|
|
opposed to multi-byte characters in arguments and input files).</dd>
|
|
|
|
<dt><i>LC_MESSAGES</i></dt>
|
|
|
|
<dd>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.</dd>
|
|
|
|
<dt><i>NLSPATH</i></dt>
|
|
|
|
<dd>Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i></dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_09"></a>ASYNCHRONOUS EVENTS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_10"></a>STDOUT</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard output shall consist of informative messages about either:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Each file processed</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Each command line read from standard input</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>If the standard input is not used, for each <i>file</i> operand yielding a discrepancy, the output line shall have the following
|
|
format:</p>
|
|
|
|
<pre>
|
|
<tt>"%s: %s\n", <</tt><i>pathname</i><tt>>, <</tt><i>unspecified string</i><tt>>
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>If standard input is used, a line of input shall be written before each of the preceding lines for files containing
|
|
discrepancies:</p>
|
|
|
|
<pre>
|
|
<tt>"%s:\n", <</tt><i>input line</i><tt>>
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_11"></a>STDERR</h4>
|
|
|
|
<blockquote>
|
|
<p>Not used.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_12"></a>OUTPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_13"></a>EXTENDED DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_14"></a>EXIT STATUS</h4>
|
|
|
|
<blockquote>
|
|
<p>The 8-bit code returned by <i>val</i> shall be a disjunction of the possible errors; that is, it can be interpreted as a bit
|
|
string where set bits are interpreted as follows:</p>
|
|
|
|
<table cellpadding="3">
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">0x80</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Missing file argument.</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">0x40</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Unknown or duplicate option.</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">0x20</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Corrupted SCCS file.</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">0x10</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Cannot open file or file not SCCS.</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">0x08</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>SID</i> is invalid or ambiguous.</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">0x04</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>SID</i> does not exist.</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">0x02</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">%<b>Y</b>%, <b>-y</b> mismatch.</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">0x01</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">%<b>M</b>%, <b>-m</b> mismatch.</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>Note that <i>val</i> 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 shall be returned: a logical OR of the codes generated for each command line
|
|
and file processed.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_15"></a>CONSEQUENCES OF ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_04_166_16"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>Since the <i>val</i> exit status sets the 0x80 bit, shell applications checking <tt>"$?"</tt> cannot tell if it terminated due
|
|
to a missing file argument or receipt of a signal.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_17"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<p>In a directory with three SCCS files- <b>s.x</b> (of <b>t</b> type "text"), <b>s.y</b>, and <b>s.z</b> (a corrupted file)-the
|
|
following command could produce the output shown:</p>
|
|
|
|
<pre>
|
|
<tt>val - <<EOF
|
|
-y source s.x
|
|
-m y s.y
|
|
s.z
|
|
EOF
|
|
<br>
|
|
-y source s.x
|
|
<br>
|
|
s.x: %Y%, -y mismatch
|
|
s.z
|
|
<br>
|
|
s.z: corrupted SCCS file
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_18"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_19"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_20"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="admin.html"><i>admin</i></a> , <a href="delta.html"><i>delta</i></a> , <a href="get.html"><i>get</i></a> , <a href=
|
|
"prs.html"><i>prs</i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_21"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 2.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_166_22"></a>Issue 6</h4>
|
|
|
|
<blockquote>
|
|
<p>The Open Group Corrigendum U025/4 is applied, correcting a typographical error in the EXIT STATUS.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|