logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

val.1p (7093B)


  1. '\" et
  2. .TH VAL "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. val
  12. \(em validate SCCS files (\fBDEVELOPMENT\fP)
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. val -
  17. .P
  18. val \fB[\fR-s\fB] [\fR-m \fIname\fB] [\fR-r \fISID\fB] [\fR-y \fItype\fB] \fIfile\fR...
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. .IR val
  23. utility shall determine whether the specified
  24. .IR file
  25. is an SCCS file meeting the characteristics specified by the options.
  26. .SH OPTIONS
  27. The
  28. .IR val
  29. utility shall conform to the Base Definitions volume of POSIX.1\(hy2017,
  30. .IR "Section 12.2" ", " "Utility Syntax Guidelines",
  31. except that the usage of the
  32. .BR '\-'
  33. operand is not strictly as intended by the guidelines (that is, reading
  34. options and operands from standard input).
  35. .P
  36. The following options shall be supported:
  37. .IP "\fB\-m\ \fIname\fR" 10
  38. Specify a
  39. .IR name ,
  40. which is compared with the SCCS %\fBM\fP% keyword in
  41. .IR file ;
  42. see
  43. .IR "\fIget\fR\^".
  44. .IP "\fB\-r\ \fISID\fR" 10
  45. Specify a
  46. .IR SID
  47. (SCCS Identification String), an SCCS delta number. A check shall be
  48. made to determine whether the
  49. .IR SID
  50. is ambiguous (for example,
  51. .BR "\-r\ 1"
  52. is ambiguous because it physically does not exist but implies 1.1, 1.2,
  53. and so on, which may exist) or invalid (for example,
  54. .BR "\-r\ 1.0"
  55. or
  56. .BR "\-r\ 1.1.0"
  57. are invalid because neither case can exist as a valid delta number).
  58. If the
  59. .IR SID
  60. is valid and not ambiguous, a check shall be made to determine whether
  61. it actually exists.
  62. .IP "\fB\-s\fP" 10
  63. Silence the diagnostic message normally written to standard output for
  64. any error that is detected while processing each named file on a given
  65. command line.
  66. .IP "\fB\-y\ \fItype\fR" 10
  67. Specify a
  68. .IR type ,
  69. which shall be compared with the SCCS %\fBY\fP% keyword in
  70. .IR file ;
  71. see
  72. .IR "\fIget\fR\^".
  73. .SH OPERANDS
  74. The following operands shall be supported:
  75. .IP "\fIfile\fR" 10
  76. A pathname of an existing SCCS file. If exactly one
  77. .IR file
  78. operand appears, and it is
  79. .BR '\-' ,
  80. the standard input shall be read: each line shall be independently
  81. processed as if it were a command line argument list. (However, the
  82. line is not subjected to any of the shell word expansions, such as
  83. parameter expansion or quote removal.)
  84. .SH STDIN
  85. The standard input shall be a text file used only when the
  86. .IR file
  87. operand is specified as
  88. .BR '\-' .
  89. .SH "INPUT FILES"
  90. Any SCCS files processed shall be files of an unspecified format.
  91. .SH "ENVIRONMENT VARIABLES"
  92. The following environment variables shall affect the execution of
  93. .IR val :
  94. .IP "\fILANG\fP" 10
  95. Provide a default value for the internationalization variables that are
  96. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  97. .IR "Section 8.2" ", " "Internationalization Variables"
  98. for the precedence of internationalization variables used to determine
  99. the values of locale categories.)
  100. .IP "\fILC_ALL\fP" 10
  101. If set to a non-empty string value, override the values of all the
  102. other internationalization variables.
  103. .IP "\fILC_CTYPE\fP" 10
  104. Determine the locale for the interpretation of sequences of bytes of
  105. text data as characters (for example, single-byte as opposed to
  106. multi-byte characters in arguments and input files).
  107. .IP "\fILC_MESSAGES\fP" 10
  108. .br
  109. Determine the locale that should be used to affect the format and
  110. contents of diagnostic messages written to standard error, and
  111. informative messages written to standard output.
  112. .IP "\fINLSPATH\fP" 10
  113. Determine the location of message catalogs for the processing of
  114. .IR LC_MESSAGES .
  115. .SH "ASYNCHRONOUS EVENTS"
  116. Default.
  117. .SH STDOUT
  118. The standard output shall consist of informative messages about either:
  119. .IP " 1." 4
  120. Each file processed
  121. .IP " 2." 4
  122. Each command line read from standard input
  123. .P
  124. If the standard input is not used, for each
  125. .IR file
  126. operand yielding a discrepancy, the output line shall have the
  127. following format:
  128. .sp
  129. .RS 4
  130. .nf
  131. "%s: %s\en", <\fIpathname\fR>, <\fIunspecified string\fR>
  132. .fi
  133. .P
  134. .RE
  135. .P
  136. If the standard input is used, for each input line yielding a discrepancy,
  137. the output shall have the following format:
  138. .sp
  139. .RS 4
  140. .nf
  141. "%s\en\en %s: %s\en", <\fIinput\fR>, <\fIpathname\fR>, <\fIunspecified string\fR>
  142. .fi
  143. .P
  144. .RE
  145. .P
  146. where <\fIinput\fP> is the input line minus its terminating
  147. <newline>.
  148. .SH STDERR
  149. Not used.
  150. .SH "OUTPUT FILES"
  151. None.
  152. .SH "EXTENDED DESCRIPTION"
  153. None.
  154. .SH "EXIT STATUS"
  155. The 8-bit code returned by
  156. .IR val
  157. shall be a disjunction of the possible errors; that is, it can be
  158. interpreted as a bit string where set bits are interpreted as follows:
  159. .TS
  160. tab(@);
  161. l c l.
  162. 0x80@\&=@Missing file argument.
  163. 0x40@\&=@Unknown or duplicate option.
  164. 0x20@\&=@Corrupted SCCS file.
  165. 0x10@\&=@Cannot open file or file not SCCS.
  166. 0x08@\&=@\fISID\fR is invalid or ambiguous.
  167. 0x04@\&=@\fISID\fR does not exist.
  168. 0x02@\&=@%\fBY\fR%, \fB\-y\fR mismatch.
  169. 0x01@\&=@%\fBM\fR%, \fB\-m\fR mismatch.
  170. .TE
  171. .P
  172. Note that
  173. .IR val
  174. can process two or more files on a given command line and can process
  175. multiple command lines (when reading the standard input). In these
  176. cases an aggregate code shall be returned: a logical OR of the codes
  177. generated for each command line and file processed.
  178. .SH "CONSEQUENCES OF ERRORS"
  179. Default.
  180. .LP
  181. .IR "The following sections are informative."
  182. .SH "APPLICATION USAGE"
  183. Since the
  184. .IR val
  185. exit status sets the 0x80 bit, shell applications checking
  186. .BR \(dq$?\(dq
  187. cannot tell if it terminated due to a missing file argument or receipt
  188. of a signal.
  189. .SH EXAMPLES
  190. In a directory with three SCCS files\(em\c
  191. .BR s.x
  192. (of
  193. .BR t
  194. type ``text''),
  195. .BR s.y ,
  196. and
  197. .BR s.z
  198. (a corrupted file)\(emthe following command could produce the output
  199. shown:
  200. .sp
  201. .RS 4
  202. .nf
  203. val - <<EOF
  204. -y source s.x
  205. -m y s.y
  206. s.z
  207. EOF
  208. -y source s.x
  209. .P
  210. s.x: %\|Y\|%, -y mismatch
  211. s.z
  212. .P
  213. s.z: corrupted SCCS file
  214. .fi
  215. .P
  216. .RE
  217. .SH RATIONALE
  218. None.
  219. .SH "FUTURE DIRECTIONS"
  220. None.
  221. .SH "SEE ALSO"
  222. .IR "\fIadmin\fR\^",
  223. .IR "\fIdelta\fR\^",
  224. .IR "\fIget\fR\^",
  225. .IR "\fIprs\fR\^"
  226. .P
  227. The Base Definitions volume of POSIX.1\(hy2017,
  228. .IR "Chapter 8" ", " "Environment Variables",
  229. .IR "Section 12.2" ", " "Utility Syntax Guidelines"
  230. .\"
  231. .SH COPYRIGHT
  232. Portions of this text are reprinted and reproduced in electronic form
  233. from IEEE Std 1003.1-2017, Standard for Information Technology
  234. -- Portable Operating System Interface (POSIX), The Open Group Base
  235. Specifications Issue 7, 2018 Edition,
  236. Copyright (C) 2018 by the Institute of
  237. Electrical and Electronics Engineers, Inc and The Open Group.
  238. In the event of any discrepancy between this version and the original IEEE and
  239. The Open Group Standard, the original IEEE and The Open Group Standard
  240. is the referee document. The original Standard can be obtained online at
  241. http://www.opengroup.org/unix/online.html .
  242. .PP
  243. Any typographical or formatting errors that appear
  244. in this page are most likely
  245. to have been introduced during the conversion of the source files to
  246. man page format. To report such errors, see
  247. https://www.kernel.org/doc/man-pages/reporting_bugs.html .