Print this page
6205 onbld manuals should be declared as 1onbld
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/scripts/hdrchk.1
+++ new/usr/src/tools/scripts/hdrchk.1onbld
1 1 .\" CDDL HEADER START
2 2 .\"
3 3 .\" The contents of this file are subject to the terms of the
4 4 .\" Common Development and Distribution License (the "License").
5 5 .\" You may not use this file except in compliance with the License.
6 6 .\"
7 7 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8 8 .\" or http://www.opensolaris.org/os/licensing.
9 9 .\" See the License for the specific language governing permissions
10 10 .\" and limitations under the License.
11 11 .\"
12 12 .\" When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14 14 .\" If applicable, add the following below this CDDL HEADER, with the
15 15 .\" fields enclosed by brackets "[]" replaced with your own identifying
16 16 .\" information: Portions Copyright [yyyy] [name of copyright owner]
17 17 .\"
18 18 .\" CDDL HEADER END
19 19 .\"
20 20 .\" Copyright 2008 Sun Microsystems, Inc. All rights reserved.
21 21 .\" Use is subject to license terms.
22 22 .\"
23 -.\" ident "%Z%%M% %I% %E% SMI"
24 -.\"
25 -.TH hdrchk 1 "02 July 2008"
23 +.TH hdrchk 1ONBLD "02 July 2008"
26 24 .SH NAME
27 25 hdrchk \- check that header files conform to ON standards
28 26 .SH SYNOPSIS
29 27 .nf
30 28 \fBhdrchk\fR [\fB-a\fP] \fIfile\fR [\fIfile ...\fR]\fP
31 29 .fi
32 30 .LP
33 31 .SH DESCRIPTION
34 32 .IX "OS-Net build tools" "hdrchk" "" "\fBhdrchk\fP"
35 33 .LP
36 34 .I hdrchk
37 35 verifies that C header files (*.h) conform to the standards of the ON
38 36 consolidation.
39 37 See HEADER STANDARDS for details.
40 38 .LP
41 39 .SH OPTIONS
42 40 .LP
43 41 .TP 10
44 42 .B -a
45 43 Apply (more lenient) application header rules.
46 44 .LP
47 45 .SH HEADER STANDARDS
48 46 .LP
49 47 Standards for all header files:
50 48 .TP 4
51 49 .B 1.
52 50 Begin with a comment containing a copyright message.
53 51 .LP
54 52 .TP 4
55 53 .B 2.
56 54 Enclosed in a guard of the form:
57 55 .LP
58 56 .nf
59 57 #ifndef GUARD
60 58 #define GUARD
61 59 #endif /* [!]GUARD */
62 60 .fi
63 61 .sp
64 62 .RS 4n
65 63 The preferred form is without the bang character, but either is
66 64 acceptable.
67 65 .RE
68 66 .LP
69 67 .TP 4
70 68 .B 3.
71 69 Has a valid ident declaration.
72 70 .LP
73 71 Additional standards for system header files:
74 72 .TP 4
75 73 .B 1.
76 74 The file guard must take the form '_\fBFILENAME\fP_H[_]', where
77 75 \fBFILENAME\fP matches the basename of the file.
78 76 If it is installed in a subdirectory, it should be of the
79 77 form '_\fBDIR\fP_\fBFILENAME\fP_H[_]', though this is not currently enforced.
80 78 The form without the trailing underscore is preferred in both cases.
81 79 .LP
82 80 .TP 4
83 81 .B 2.
84 82 All #include directives must use the <> form.
85 83 .LP
86 84 .TP 4
87 85 .B 3.
88 86 If the header file contains anything besides comments and preprocessor
89 87 directives, then it must be enclosed in a C++ guard of the form:
90 88 .LP
91 89 .nf
92 90 #ifdef __cplusplus
93 91 extern "C" {
94 92 #endif
95 93
96 94 #ifdef __cplusplus
97 95 }
98 96 #endif
99 97 .fi
100 98
↓ open down ↓ |
65 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX