1VAL(P)                     POSIX Programmer's Manual                    VAL(P)
2
3
4

NAME

6       val - validate SCCS files (DEVELOPMENT)
7

SYNOPSIS

9       val -
10
11       val [-s][-m name][-r SID][-y type] file...
12
13

DESCRIPTION

15       The  val  utility shall determine whether the specified file is an SCCS
16       file meeting the characteristics specified by the options.
17

OPTIONS

19       The val utility  shall  conform  to  the  Base  Definitions  volume  of
20       IEEE Std 1003.1-2001,  Section  12.2, Utility Syntax Guidelines, except
21       that the usage of the '-' operand is not strictly as  intended  by  the
22       guidelines (that is, reading options and operands from standard input).
23
24       The following options shall be supported:
25
26       -m  name
27              Specify  a  name, which is compared with the SCCS %M% keyword in
28              file; see get .
29
30       -r  SID
31              Specify a SID (SCCS Identification String), an SCCS  delta  num‐
32              ber.   A  check  shall  be  made to determine whether the SID is
33              ambiguous (for example, -r 1 is ambiguous because it  physically
34              does not exist but implies 1.1, 1.2, and so on, which may exist)
35              or invalid (for example, -r 1.0 or -r 1.1.0 are invalid  because
36              neither  case  can exist as a valid delta number). If the SID is
37              valid and not ambiguous, a check  shall  be  made  to  determine
38              whether it actually exists.
39
40       -s     Silence the diagnostic message normally written to standard out‐
41              put for any error that is detected while processing  each  named
42              file on a given command line.
43
44       -y  type
45              Specify  a  type, which shall be compared with the SCCS %Y% key‐
46              word in file; see get .
47
48

OPERANDS

50       The following operands shall be supported:
51
52       file   A pathname of an existing SCCS file. If exactly one file operand
53              appears,  and it is '-' , the standard input shall be read: each
54              line shall be independently processed as if it  were  a  command
55              line  argument  list. (However, the line is not subjected to any
56              of the shell word expansions, such  as  parameter  expansion  or
57              quote removal.)
58
59

STDIN

61       The standard input shall be a text file used only when the file operand
62       is specified as '-' .
63

INPUT FILES

65       Any SCCS files processed shall be files of an unspecified format.
66

ENVIRONMENT VARIABLES

68       The following environment variables shall affect the execution of val:
69
70       LANG   Provide a default value for the  internationalization  variables
71              that  are  unset  or  null.  (See the Base Definitions volume of
72              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
73              ables  for the precedence of internationalization variables used
74              to determine the values of locale categories.)
75
76       LC_ALL If set to a non-empty string value, override the values  of  all
77              the other internationalization variables.
78
79       LC_CTYPE
80              Determine  the  locale  for  the  interpretation of sequences of
81              bytes of text data as characters (for  example,  single-byte  as
82              opposed to multi-byte characters in arguments and input files).
83
84       LC_MESSAGES
85              Determine  the  locale  that should be used to affect the format
86              and contents of diagnostic messages written to  standard  error,
87              and informative messages written to standard output.
88
89       NLSPATH
90              Determine the location of message catalogs for the processing of
91              LC_MESSAGES .
92
93

ASYNCHRONOUS EVENTS

95       Default.
96

STDOUT

98       The standard output shall consist of informative messages about either:
99
100        1. Each file processed
101
102        2. Each command line read from standard input
103
104       If the standard input is not used, for each  file  operand  yielding  a
105       discrepancy, the output line shall have the following format:
106
107
108              "%s: %s\n", <pathname>, <unspecified string>
109
110       If standard input is used, a line of input shall be written before each
111       of the preceding lines for files containing discrepancies:
112
113
114              "%s:\n", <input line>
115

STDERR

117       Not used.
118

OUTPUT FILES

120       None.
121

EXTENDED DESCRIPTION

123       None.
124

EXIT STATUS

126       The 8-bit code returned by val shall be a disjunction of  the  possible
127       errors;  that  is, it can be interpreted as a bit string where set bits
128       are interpreted as follows:
129
130                    0x80 ───── Missing file argument.
131                    0x40 ───── Unknown or duplicate option.
132
133                    0x20 ───── Corrupted SCCS file.
134                    0x10 ───── Cannot open file or file not SCCS.
135                    0x08 ───── SID is invalid or ambiguous.
136                    0x04 ───── SID does not exist.
137                    0x02 ───── %Y%, -y mismatch.
138                    0x01 ───── %M%, -m mismatch.
139
140       Note that val can process two or more files on a given command line and
141       can  process  multiple command lines (when reading the standard input).
142       In these cases an aggregate code shall be returned: a logical OR of the
143       codes generated for each command line and file processed.
144

CONSEQUENCES OF ERRORS

146       Default.
147
148       The following sections are informative.
149

APPLICATION USAGE

151       Since  the val exit status sets the 0x80 bit, shell applications check‐
152       ing "$?" cannot tell if it terminated due to a missing file argument or
153       receipt of a signal.
154

EXAMPLES

156       In  a directory with three SCCS files- s.x (of t type "text"), s.y, and
157       s.z (a corrupted file)-the following command could produce  the  output
158       shown:
159
160
161              val - <<EOF
162              -y source s.x
163              -m y s.y
164              s.z
165              EOF
166
167
168              -y source s.x
169
170
171                  s.x: %Y%, -y mismatch
172              s.z
173
174
175                  s.z: corrupted SCCS file
176

RATIONALE

178       None.
179

FUTURE DIRECTIONS

181       None.
182

SEE ALSO

184       admin , delta , get , prs
185
187       Portions  of  this text are reprinted and reproduced in electronic form
188       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
189       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
190       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
191       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
192       event of any discrepancy between this version and the original IEEE and
193       The  Open Group Standard, the original IEEE and The Open Group Standard
194       is the referee document. The original Standard can be  obtained  online
195       at http://www.opengroup.org/unix/online.html .
196
197
198
199IEEE/The Open Group                  2003                               VAL(P)
Impressum